VirtualBox

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

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

Main: turn read/write param in OpenHardDisk into an enum

  • Property svn:eol-style set to native
File size: 487.0 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129
130#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
131# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
132 NS_IMPL_THREADSAFE_ADDREF(_class) \
133 NS_IMPL_THREADSAFE_RELEASE(_class) \
134 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
135 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
136#endif
137
138#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
139# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
140 NS_IMPL_THREADSAFE_ADDREF(_class) \
141 NS_IMPL_THREADSAFE_RELEASE(_class) \
142 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
143 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
144#endif
145
146#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
147# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
148 NS_INTERFACE_MAP_BEGIN(_class) \
149 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
150 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
151 NS_IMPL_QUERY_CLASSINFO(_class) \
152 NS_INTERFACE_MAP_END
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
157 _i2, _ic2) \
158 NS_INTERFACE_MAP_BEGIN(_class) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
160 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
161 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
162 NS_IMPL_QUERY_CLASSINFO(_class) \
163 NS_INTERFACE_MAP_END
164#endif
165
166#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
167#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
168
169#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
170# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
171 NS_IMPL_THREADSAFE_ADDREF(_class) \
172 NS_IMPL_THREADSAFE_RELEASE(_class) \
173 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
174 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
175#endif
176
177#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
178# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
179 _i2, _ic2) \
180 NS_IMPL_THREADSAFE_ADDREF(_class) \
181 NS_IMPL_THREADSAFE_RELEASE(_class) \
182 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2) \
184 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
185#endif
186 </cpp>
187</if>
188
189<library
190 name="VirtualBox"
191 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
192 version="1.3"
193 desc="VirtualBox Type Library"
194 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
195 supportsErrorInfo="yes"
196>
197
198
199 <!--
200 // COM result codes for VirtualBox
201 /////////////////////////////////////////////////////////////////////////
202 -->
203
204 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
205 <desc>
206 This section describes all VirtualBox-specific COM result codes that may
207 be returned by methods of VirtualBox COM interfaces in addition to
208 standard COM result codes.
209
210 Note that along with the result code, every VirtualBox method returns
211 extended error information through the IVirtualBoxErrorInfo interface on
212 failure. This interface is a preferred way to present the error to the end
213 user because it contains a human readable description of the error. Raw
214 result codes, both standard and described in this section, are intended to
215 be used by programs to analyze the reason of a failure and select an
216 appropriate course of action without involving the end user (for example,
217 retry the operation later or make a different call).
218
219 The standard COM result codes that may originate from our methods include:
220
221 <table>
222 <tr><td>E_INVALIDARG</td>
223 <td>
224 Returned when the value of the method's argument is not within the range
225 of valid values. This should not be confused with situations when the
226 value is within the range but simply doesn't suit the current object
227 state and there is a possibility that it will be accepted later (in such
228 cases VirtualBox-specific codes are returned, for example,
229 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
230 </td>
231 </tr>
232 <tr><td>E_POINTER</td>
233 <td>
234 Returned if a memory pointer for the output argument is invalid (for
235 example, <tt>NULL</tt>). Note that when pointers representing input
236 arguments (such as strings) are invalid, E_INVALIDARG is returned.
237 </td>
238 </tr>
239 <tr><td>E_ACCESSDENIED</td>
240 <td>
241 Returned when the called object is not ready. Since the lifetime of a
242 public COM object cannot be fully controlled by the implementation,
243 VirtualBox maintains the readiness state for all objects it creates and
244 returns this code in response to any method call on the object that was
245 deactivated by VirtualBox and is not functioning any more.
246 </td>
247 </tr>
248 <tr><td>E_OUTOFMEMORY</td>
249 <td>
250 Returned when a memory allocation operation fails.
251 </td>
252 </tr>
253 </table>
254 </desc>
255 </descGroup>
256
257 <!--
258 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
259 everything in <result>/<desc> after (and including) the first dot, so express
260 the matter of the error code in the first sentence and keep it short.
261 -->
262
263 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
264 <desc>
265 Object corresponding to the supplied arguments does not exist.
266 </desc>
267 </result>
268
269 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
270 <desc>
271 Current virtual machine state prevents the operation.
272 </desc>
273 </result>
274
275 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
276 <desc>
277 Virtual machine error occurred attempting the operation.
278 </desc>
279 </result>
280
281 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
282 <desc>
283 File not accessible or erroneous file contents.
284 </desc>
285 </result>
286
287 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
288 <desc>
289 Runtime subsystem error.
290 </desc>
291 </result>
292
293 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
294 <desc>
295 Pluggable Device Manager error.
296 </desc>
297 </result>
298
299 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
300 <desc>
301 Current object state prohibits operation.
302 </desc>
303 </result>
304
305 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
306 <desc>
307 Host operating system related error.
308 </desc>
309 </result>
310
311 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
312 <desc>
313 Requested operation is not supported.
314 </desc>
315 </result>
316
317 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
318 <desc>
319 Invalid XML found.
320 </desc>
321 </result>
322
323 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
324 <desc>
325 Current session state prohibits operation.
326 </desc>
327 </result>
328
329 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
330 <desc>
331 Object being in use prohibits operation.
332 </desc>
333 </result>
334
335 <!--
336 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
337 everything in <result>/<desc> after (and including) the first dot, so express
338 the matter of the error code in the first sentence and keep it short.
339 -->
340
341 <descGroup/>
342
343 <!--
344 // all common enums
345 /////////////////////////////////////////////////////////////////////////
346 -->
347
348 <enum
349 name="TSBool"
350 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
351 >
352 <desc>
353 Boolean variable having a third state, default.
354 </desc>
355
356 <const name="False" value="0"/>
357 <const name="True" value="1"/>
358 <const name="Default" value="2"/>
359 </enum>
360
361 <enum
362 name="AccessMode"
363 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
364 >
365 <desc>
366 Access mode for opening files.
367 </desc>
368
369 <const name="ReadOnly" value="1"/>
370 <const name="ReadWrite" value="2"/>
371 </enum>
372
373 <enum
374 name="MachineState"
375 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
376 >
377 <desc>
378 Virtual machine execution state.
379
380 This enumeration represents possible values of the <link
381 to="IMachine::state"/> attribute.
382
383 Below is the basic virtual machine state diagram. It shows how the state
384 changes during virtual machine execution. The text in square braces shows
385 a method of the IConsole interface that performs the given state
386 transition.
387
388 <pre>
389 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
390 V |
391 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
392 | | | | V |
393 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
394 | | ^ | ^ |
395 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
396 | ^ | | | |
397 | | +-----------------------------------------+-|-------------------+ +
398 | | | | |
399 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
400 | | | |
401 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
402 | | |
403 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
404 </pre>
405
406 Note that states to the right from PoweredOff, Aborted and Saved in the
407 above diagram are called <i>online VM states</i>. These states
408 represent the virtual machine which is being executed in a dedicated
409 process (usually with a GUI window attached to it where you can see the
410 activity of the virtual machine and interact with it). There are two
411 special pseudo-states, FirstOnline and LastOnline, that can be used in
412 relational expressions to detect if the given machine state is online or
413 not:
414
415 <pre>
416 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
417 machine.GetState() &lt;= MachineState_LastOnline)
418 {
419 ...the machine is being executed...
420 }
421 </pre>
422
423 When the virtual machine is in one of the online VM states (that is, being
424 executed), only a few machine settings can be modified. Methods working
425 with such settings contain an explicit note about that. An attempt to
426 change any oter setting or perform a modifying operation during this time
427 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
428
429 All online states except Running, Paused and Stuck are transitional: they
430 represent temporary conditions of the virtual machine that will last as
431 long as the operation that initiated such a condition.
432
433 The Stuck state is a special case. It means that execution of the machine
434 has reached the "Guru Meditation" condition. This condition indicates an
435 internal VMM (virtual machine manager) failure which may happen as a
436 result of either an unhandled low-level virtual hardware exception or one
437 of the recompiler exceptions (such as the <i>too-many-traps</i>
438 condition).
439
440 Note also that any online VM state may transit to the Aborted state. This
441 happens if the process that is executing the virtual machine terminates
442 unexpectedly (for example, crashes). Other than that, the Aborted state is
443 equivalent to PoweredOff.
444
445 There are also a few additional state diagrams that do not deal with
446 virtual machine execution and therefore are shown separately. The states
447 shown on these diagrams are called <i>offline VM states</i> (this includes
448 PoweredOff, Aborted and Saved too).
449
450 The first diagram shows what happens when a lengthy setup operation is
451 being executed (such as <link to="IMachine::attachHardDisk"/>).
452
453 <pre>
454 +-----------------------------------(same sate as before the call)------+
455 | |
456 +-&gt; PoweredOff --+ |
457 | | |
458 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
459 | |
460 +-&gt; Saved -------+
461 </pre>
462
463 The next two diagrams demonstrate the process of taking a snapshot of a
464 powered off virtual machine and performing one of the "discard..."
465 operations, respectively.
466
467 <pre>
468 +-----------------------------------(same sate as before the call)------+
469 | |
470 +-&gt; PoweredOff --+ |
471 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
472 +-&gt; Aborted -----+
473
474 +-&gt; PoweredOff --+
475 | |
476 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
477 | | [discardCurrentState()] |
478 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
479 | |
480 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
481 </pre>
482
483 Note that the Saving state is present in both the offline state group and
484 online state group. Currently, the only way to determine what group is
485 assumed in a particular case is to remember the previous machine state: if
486 it was Running or Paused, then Saving is an online state, otherwise it is
487 an offline state. This inconsistency may be removed in one of the future
488 versions of VirtualBox by adding a new state.
489
490 <note internal="yes">
491 For whoever decides to touch this enum: In order to keep the
492 comparisons involving FirstOnline and LastOnline pseudo-states valid,
493 the numeric values of these states must be correspondingly updated if
494 needed: for any online VM state, the condition
495 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
496 <tt>true</tt>. The same relates to transient states for which
497 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
498 <tt>true</tt>.
499 </note>
500 </desc>
501
502 <const name="Null" value="0">
503 <desc>Null value (nver used by the API).</desc>
504 </const>
505 <const name="PoweredOff" value="1">
506 <desc>
507 The machine is not running.
508 </desc>
509 </const>
510 <const name="Saved" value="2">
511 <desc>
512 The machine is not currently running, but the execution state of the machine
513 has been saved to an external file when it was running.
514 </desc>
515 </const>
516 <const name="Aborted" value="3">
517 <desc>
518 The process running the machine has terminated abnormally.
519 </desc>
520 </const>
521 <const name="Running" value="4">
522 <desc>
523 The machine is currently being executed.
524 <note internal="yes">
525 For whoever decides to touch this enum: In order to keep the
526 comparisons in the old source code valid, this state must immediately
527 precede the Paused state.
528 </note>
529 </desc>
530 </const>
531 <const name="Paused" value="5">
532 <desc>
533 Execution of the machine has been paused.
534 <note internal="yes">
535 For whoever decides to touch this enum: In order to keep the
536 comparisons in the old source code valid, this state must immediately
537 follow the Running state.
538 </note>
539 </desc>
540 </const>
541 <const name="Stuck" value="6">
542 <desc>
543 Execution of the machine has reached the "Guru Meditation"
544 condition.
545 </desc>
546 </const>
547 <const name="Starting" value="7">
548 <desc>
549 Machine is being started after powering it on from a
550 zero execution state.
551 </desc>
552 </const>
553 <const name="Stopping" value="8">
554 <desc>
555 Machine is being normally stopped powering it off, or after the guest OS
556 has initiated a shutdown sequence.
557 </desc>
558 </const>
559 <const name="Saving" value="9">
560 <desc>
561 Machine is saving its execution state to a file or an online
562 snapshot of the machine is being taken.
563 </desc>
564 </const>
565 <const name="Restoring" value="10">
566 <desc>
567 Execution state of the machine is being restored from a file
568 after powering it on from the saved execution state.
569 </desc>
570 </const>
571 <const name="Discarding" value="11">
572 <desc>
573 Snapshot of the machine is being discarded.
574 </desc>
575 </const>
576 <const name="SettingUp" value="12">
577 <desc>
578 Lengthy setup operation is in progress.
579 </desc>
580 </const>
581
582 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
583 <desc>
584 Pseudo-state: first online state (for use in relational expressions).
585 </desc>
586 </const>
587 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
588 <desc>
589 Pseudo-state: last online state (for use in relational expressions).
590 </desc>
591 </const>
592
593 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
594 <desc>
595 Pseudo-state: first transient state (for use in relational expressions).
596 </desc>
597 </const>
598 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
599 <desc>
600 Pseudo-state: last transient state (for use in relational expressions).
601 </desc>
602 </const>
603
604 </enum>
605
606 <enum
607 name="SessionState"
608 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
609 >
610 <desc>
611 Session state. This enumeration represents possible values of
612 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
613 attributes. See individual enumerator descriptions for the meaning for
614 every value.
615 </desc>
616
617 <const name="Null" value="0">
618 <desc>Null value (never used by the API).</desc>
619 </const>
620 <const name="Closed" value="1">
621 <desc>
622 The machine has no open sessions (<link to="IMachine::sessionState"/>);
623 the session is closed (<link to="ISession::state"/>)
624 </desc>
625 </const>
626 <const name="Open" value="2">
627 <desc>
628 The machine has an open direct session (<link to="IMachine::sessionState"/>);
629 the session is open (<link to="ISession::state"/>)
630 </desc>
631 </const>
632 <const name="Spawning" value="3">
633 <desc>
634 A new (direct) session is being opened for the machine
635 as a result of <link to="IVirtualBox::openRemoteSession"/>
636 call (<link to="IMachine::sessionState"/>);
637 the session is currently being opened
638 as a result of <link to="IVirtualBox::openRemoteSession"/>
639 call (<link to="ISession::state"/>)
640 </desc>
641 </const>
642 <const name="Closing" value="4">
643 <desc>
644 The direct session is being closed (<link to="IMachine::sessionState"/>);
645 the session is being closed (<link to="ISession::state"/>)
646 </desc>
647 </const>
648 </enum>
649
650 <enum
651 name="SessionType"
652 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
653 >
654 <desc>
655 Session type. This enumeration represents possible values of the
656 <link to="ISession::type"/> attribute.
657 </desc>
658
659 <const name="Null" value="0">
660 <desc>Null value (never used by the API).</desc>
661 </const>
662 <const name="Direct" value="1">
663 <desc>
664 Direct session
665 (opened by <link to="IVirtualBox::openSession"/>)
666 </desc>
667 </const>
668 <const name="Remote" value="2">
669 <desc>
670 Remote session
671 (opened by <link to="IVirtualBox::openRemoteSession"/>)
672 </desc>
673 </const>
674 <const name="Existing" value="3">
675 <desc>
676 Existing session
677 (opened by <link to="IVirtualBox::openExistingSession"/>)
678 </desc>
679 </const>
680 </enum>
681
682 <enum
683 name="DeviceType"
684 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
685 >
686 <desc>
687 Device type.
688 </desc>
689 <const name="Null" value="0">
690 <desc>
691 Null value, may also mean "no device" (not allowed for
692 <link to="IConsole::getDeviceActivity"/>).
693 </desc>
694 </const>
695 <const name="Floppy" value="1">
696 <desc>Floppy device.</desc>
697 </const>
698 <const name="DVD" value="2">
699 <desc>CD/DVD-ROM device.</desc>
700 </const>
701 <const name="HardDisk" value="3">
702 <desc>Hard disk device.</desc>
703 </const>
704 <const name="Network" value="4">
705 <desc>Network device.</desc>
706 </const>
707 <const name="USB" value="5">
708 <desc>USB device.</desc>
709 </const>
710 <const name="SharedFolder" value="6">
711 <desc>Shared folder device.</desc>
712 </const>
713 </enum>
714
715 <enum
716 name="DeviceActivity"
717 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
718 >
719 <desc>
720 Device activity for <link to="IConsole::getDeviceActivity"/>.
721 </desc>
722
723 <const name="Null" value="0"/>
724 <const name="Idle" value="1"/>
725 <const name="Reading" value="2"/>
726 <const name="Writing" value="3"/>
727 </enum>
728
729 <enum
730 name="ClipboardMode"
731 uuid="33364716-4008-4701-8f14-be0fa3d62950"
732 >
733 <desc>
734 Host-Guest clipboard interchange mode.
735 </desc>
736
737 <const name="Disabled" value="0"/>
738 <const name="HostToGuest" value="1"/>
739 <const name="GuestToHost" value="2"/>
740 <const name="Bidirectional" value="3"/>
741 </enum>
742
743 <enum
744 name="Scope"
745 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
746 >
747 <desc>
748 Scope of the operation.
749
750 A generic enumeration used in various methods to define the action or
751 argument scope.
752 </desc>
753
754 <const name="Global" value="0"/>
755 <const name="Machine" value="1"/>
756 <const name="Session" value="2"/>
757 </enum>
758
759 <enum
760 name="GuestStatisticType"
761 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
762 >
763 <desc>
764 Statistics type for <link to="IGuest::getStatistic"/>.
765 </desc>
766
767 <const name="CPULoad_Idle" value="0">
768 <desc>
769 Idle CPU load (0-100%) for last interval.
770 </desc>
771 </const>
772 <const name="CPULoad_Kernel" value="1">
773 <desc>
774 Kernel CPU load (0-100%) for last interval.
775 </desc>
776 </const>
777 <const name="CPULoad_User" value="2">
778 <desc>
779 User CPU load (0-100%) for last interval.
780 </desc>
781 </const>
782 <const name="Threads" value="3">
783 <desc>
784 Total number of threads in the system.
785 </desc>
786 </const>
787 <const name="Processes" value="4">
788 <desc>
789 Total number of processes in the system.
790 </desc>
791 </const>
792 <const name="Handles" value="5">
793 <desc>
794 Total number of handles in the system.
795 </desc>
796 </const>
797 <const name="MemoryLoad" value="6">
798 <desc>
799 Memory load (0-100%).
800 </desc>
801 </const>
802 <const name="PhysMemTotal" value="7">
803 <desc>
804 Total physical memory in megabytes.
805 </desc>
806 </const>
807 <const name="PhysMemAvailable" value="8">
808 <desc>
809 Free physical memory in megabytes.
810 </desc>
811 </const>
812 <const name="PhysMemBalloon" value="9">
813 <desc>
814 Ballooned physical memory in megabytes.
815 </desc>
816 </const>
817 <const name="MemCommitTotal" value="10">
818 <desc>
819 Total amount of memory in the committed state in megabytes.
820 </desc>
821 </const>
822 <const name="MemKernelTotal" value="11">
823 <desc>
824 Total amount of memory used by the guest OS's kernel in megabytes.
825 </desc>
826 </const>
827 <const name="MemKernelPaged" value="12">
828 <desc>
829 Total amount of paged memory used by the guest OS's kernel in megabytes.
830 </desc>
831 </const>
832 <const name="MemKernelNonpaged" value="13">
833 <desc>
834 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
835 </desc>
836 </const>
837 <const name="MemSystemCache" value="14">
838 <desc>
839 Total amount of memory used by the guest OS's system cache in megabytes.
840 </desc>
841 </const>
842 <const name="PageFileSize" value="15">
843 <desc>
844 Pagefile size in megabytes.
845 </desc>
846 </const>
847 <const name="SampleNumber" value="16">
848 <desc>
849 Statistics sample number
850 </desc>
851 </const>
852 <const name="MaxVal" value="17"/>
853 </enum>
854
855 <enum
856 name="BIOSBootMenuMode"
857 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
858 >
859 <desc>
860 BIOS boot menu mode.
861 </desc>
862
863 <const name="Disabled" value="0"/>
864 <const name="MenuOnly" value="1"/>
865 <const name="MessageAndMenu" value="2"/>
866 </enum>
867
868 <enum
869 name="DriveState"
870 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
871 >
872 <const name="Null" value="0">
873 <desc>Null value (never used by the API).</desc>
874 </const>
875 <const name="NotMounted" value="1"/>
876 <const name="ImageMounted" value="2"/>
877 <const name="HostDriveCaptured" value="3"/>
878 </enum>
879
880 <enum
881 name="ProcessorFeature"
882 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
883 >
884 <desc>
885 CPU features.
886 </desc>
887
888 <const name="HWVirtEx" value="0"/>
889 <const name="PAE" value="1"/>
890 <const name="LongMode" value="2"/>
891 </enum>
892
893
894 <!--
895 // IVirtualBoxErrorInfo
896 /////////////////////////////////////////////////////////////////////////
897 -->
898
899 <interface
900 name="IVirtualBoxErrorInfo" extends="$errorinfo"
901 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
902 supportsErrorInfo="no"
903 wsmap="suppress"
904 >
905 <desc>
906 The IVirtualBoxErrorInfo interface represents extended error information.
907
908 Extended error information can be set by VirtualBox components after
909 unsuccessful or partially successful method invocation. This information
910 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
911 and then shown to the client in addition to the plain 32-bit result code.
912
913 In MS COM, this interface extends the IErrorInfo interface,
914 in XPCOM, it extends the nsIException interface. In both cases,
915 it provides a set of common attributes to retrieve error
916 information.
917
918 Sometimes invocation of some component's method may involve methods of
919 other components that may also fail (independently of this method's
920 failure), or a series of non-fatal errors may precede a fatal error that
921 causes method failure. In cases like that, it may be desirable to preserve
922 information about all errors happened during method invocation and deliver
923 it to the caller. The <link to="#next"/> attribute is intended
924 specifically for this purpose and allows to represent a chain of errors
925 through a single IVirtualBoxErrorInfo object set after method invocation.
926
927 Note that errors are stored to a chain in the reverse order, i.e. the
928 initial error object you query right after method invocation is the last
929 error set by the callee, the object it points to in the @a next attribute
930 is the previous error and so on, up to the first error (which is the last
931 in the chain).
932 </desc>
933
934 <attribute name="resultCode" type="result" readonly="yes">
935 <desc>
936 Result code of the error.
937 Usually, it will be the same as the result code returned
938 by the method that provided this error information, but not
939 always. For example, on Win32, CoCreateInstance() will most
940 likely return E_NOINTERFACE upon unsuccessful component
941 instantiation attempt, but not the value the component factory
942 returned.
943 <note>
944 In MS COM, there is no equivalent.
945 In XPCOM, it is the same as nsIException::result.
946 </note>
947 </desc>
948 </attribute>
949
950 <attribute name="interfaceID" type="uuid" readonly="yes">
951 <desc>
952 UUID of the interface that defined the error.
953 <note>
954 In MS COM, it is the same as IErrorInfo::GetGUID.
955 In XPCOM, there is no equivalent.
956 </note>
957 </desc>
958 </attribute>
959
960 <attribute name="component" type="wstring" readonly="yes">
961 <desc>
962 Name of the component that generated the error.
963 <note>
964 In MS COM, it is the same as IErrorInfo::GetSource.
965 In XPCOM, there is no equivalent.
966 </note>
967 </desc>
968 </attribute>
969
970 <attribute name="text" type="wstring" readonly="yes">
971 <desc>
972 Text description of the error.
973 <note>
974 In MS COM, it is the same as IErrorInfo::GetDescription.
975 In XPCOM, it is the same as nsIException::message.
976 </note>
977 </desc>
978 </attribute>
979
980 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
981 <desc>
982 Next error object if there is any, or @c null otherwise.
983 <note>
984 In MS COM, there is no equivalent.
985 In XPCOM, it is the same as nsIException::inner.
986 </note>
987 </desc>
988 </attribute>
989
990 </interface>
991
992
993 <!--
994 // IVirtualBox
995 /////////////////////////////////////////////////////////////////////////
996 -->
997
998 <interface
999 name="IVirtualBoxCallback" extends="$unknown"
1000 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1001 wsmap="suppress"
1002 >
1003 <method name="onMachineStateChange">
1004 <desc>
1005 The execution state of the given machine has changed.
1006 <see>IMachine::state</see>
1007 </desc>
1008 <param name="machineId" type="uuid" dir="in">
1009 <desc>ID of the machine this event relates to.</desc>
1010 </param>
1011 <param name="state" type="MachineState" dir="in">
1012 <desc>New execution state.</desc>
1013 </param>
1014 </method>
1015
1016 <method name="onMachineDataChange">
1017 <desc>
1018 Any of the settings of the given machine has changed.
1019 </desc>
1020 <param name="machineId" type="uuid" dir="in">
1021 <desc>ID of the machine this event relates to.</desc>
1022 </param>
1023 </method>
1024
1025 <method name="onExtraDataCanChange">
1026 <desc>
1027 Notification when someone tries to change extra data for
1028 either the given machine or (if null) global extra data.
1029 This gives the chance to veto against changes.
1030 </desc>
1031 <param name="machineId" type="uuid" dir="in">
1032 <desc>
1033 ID of the machine this event relates to
1034 (null ID for global extra data change requests).
1035 </desc>
1036 </param>
1037 <param name="key" type="wstring" dir="in">
1038 <desc>
1039 Extra data key for the attempted write.
1040 </desc>
1041 </param>
1042 <param name="value" type="wstring" dir="in">
1043 <desc>
1044 Extra data value for the given key.
1045 </desc>
1046 </param>
1047 <param name="error" type="wstring" dir="out">
1048 <desc>
1049 Optional error message describing the reason of the
1050 veto (ignored if this notification returns @c true).
1051 </desc>
1052 </param>
1053 <param name="allowChange" type="boolean" dir="return">
1054 <desc>
1055 Flag to indicate whether the callee agrees (@c true)
1056 or vetoes against the change (@c false).
1057 </desc>
1058 </param>
1059 </method>
1060
1061 <method name="onExtraDataChange">
1062 <desc>
1063 Notification when machine specific or global extra data
1064 has changed.
1065 </desc>
1066 <param name="machineId" type="uuid" dir="in">
1067 <desc>
1068 ID of the machine this event relates to.
1069 Null for global extra data changes.
1070 </desc>
1071 </param>
1072 <param name="key" type="wstring" dir="in">
1073 <desc>
1074 Extra data key that has changed.
1075 </desc>
1076 </param>
1077 <param name="value" type="wstring" dir="in">
1078 <desc>
1079 Extra data value for the given key.
1080 </desc>
1081 </param>
1082 </method>
1083
1084 <method name="onMediaRegistered">
1085 <desc>
1086 The given media was registered or unregistered
1087 within this VirtualBox installation.
1088
1089 The @a mediaType parameter describes what type of
1090 media the specified @a mediaId refers to. Possible
1091 values are:
1092
1093 <ul>
1094 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1095 that, if registered, can be obtained using the
1096 <link to="IVirtualBox::getHardDisk"/> call.</li>
1097 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1098 that, if registered, can be obtained using the
1099 <link to="IVirtualBox::getDVDImage"/> call.</li>
1100 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1101 that, if registered, can be obtained using the
1102 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1103 </ul>
1104
1105 Note that if this is a deregistration notification,
1106 there is no way to access the object representing the
1107 unregistered media. It is supposed that the
1108 application will do required cleanup based on the
1109 @a mediaId value.
1110 </desc>
1111 <param name="mediaId" type="uuid" dir="in">
1112 <desc>ID of the media this event relates to.</desc>
1113 </param>
1114 <param name="mediaType" type="DeviceType" dir="in">
1115 <desc>Type of the media this event relates to.</desc>
1116 </param>
1117 <param name="registered" type="boolean" dir="in">
1118 <desc>
1119 If true, the media was registered, otherwise it was
1120 unregistered.
1121 </desc>
1122 </param>
1123 </method>
1124
1125 <method name="onMachineRegistered">
1126 <desc>
1127 The given machine was registered or unregistered
1128 within this VirtualBox installation.
1129 </desc>
1130 <param name="machineId" type="uuid" dir="in">
1131 <desc>ID of the machine this event relates to.</desc>
1132 </param>
1133 <param name="registered" type="boolean" dir="in">
1134 <desc>
1135 If true, the machine was registered, otherwise it was
1136 unregistered.
1137 </desc>
1138 </param>
1139 </method>
1140
1141 <method name="onSessionStateChange">
1142 <desc>
1143 The state of the session for the given machine was changed.
1144 <see>IMachine::sessionState</see>
1145 </desc>
1146 <param name="machineId" type="uuid" dir="in">
1147 <desc>ID of the machine this event relates to.</desc>
1148 </param>
1149 <param name="state" type="SessionState" dir="in">
1150 <desc>New session state.</desc>
1151 </param>
1152 </method>
1153
1154 <method name="onSnapshotTaken">
1155 <desc>
1156 A new snapshot of the machine has been taken.
1157 <see>ISnapshot</see>
1158 </desc>
1159 <param name="machineId" type="uuid" dir="in">
1160 <desc>ID of the machine this event relates to.</desc>
1161 </param>
1162 <param name="snapshotId" type="uuid" dir="in">
1163 <desc>ID of the new snapshot.</desc>
1164 </param>
1165 </method>
1166
1167 <method name="onSnapshotDiscarded">
1168 <desc>
1169 Snapshot of the given machine has been discarded.
1170
1171 <note>
1172 This notification is delivered <b>after</b> the snapshot
1173 object has been uninitialized on the server (so that any
1174 attempt to call its methods will return an error).
1175 </note>
1176
1177 <see>ISnapshot</see>
1178 </desc>
1179 <param name="machineId" type="uuid" dir="in">
1180 <desc>ID of the machine this event relates to.</desc>
1181 </param>
1182 <param name="snapshotId" type="uuid" dir="in">
1183 <desc>
1184 ID of the discarded snapshot. <tt>null</tt> means the
1185 current machine state has been discarded (restored from
1186 the current snapshot).
1187 </desc>
1188 </param>
1189 </method>
1190
1191 <method name="onSnapshotChange">
1192 <desc>
1193 Snapshot properties (name and/or description) have been changed.
1194 <see>ISnapshot</see>
1195 </desc>
1196 <param name="machineId" type="uuid" dir="in">
1197 <desc>ID of the machine this event relates to.</desc>
1198 </param>
1199 <param name="snapshotId" type="uuid" dir="in">
1200 <desc>ID of the changed snapshot.</desc>
1201 </param>
1202 </method>
1203
1204 <method name="onGuestPropertyChange">
1205 <desc>
1206 Notification when a guest property has changed.
1207 </desc>
1208 <param name="machineId" type="uuid" dir="in">
1209 <desc>
1210 ID of the machine this event relates to.
1211 </desc>
1212 </param>
1213 <param name="name" type="wstring" dir="in">
1214 <desc>
1215 The name of the property that has changed.
1216 </desc>
1217 </param>
1218 <param name="value" type="wstring" dir="in">
1219 <desc>
1220 The new property value.
1221 </desc>
1222 </param>
1223 <param name="flags" type="wstring" dir="in">
1224 <desc>
1225 The new property flags.
1226 </desc>
1227 </param>
1228 </method>
1229
1230 </interface>
1231
1232 <interface
1233 name="IDHCPServer" extends="$unknown"
1234 uuid="fab58256-c76e-4ddd-8029-18343e5b0069"
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 </interface>
1309
1310 <interface
1311 name="IVirtualBox" extends="$dispatched"
1312 uuid="779264f4-65ed-48ed-be39-518ca549e296"
1313 wsmap="managed"
1314 >
1315 <desc>
1316 The IVirtualBox interface represents the main interface exposed by the
1317 product that provides virtual machine management.
1318
1319 An instance of IVirtualBox is required for the product to do anything
1320 useful. Even though the interface does not expose this, internally,
1321 IVirtualBox is implemented as a singleton and actually lives in the
1322 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1323 IVirtualBox can track the state of all virtual machines on a particular
1324 host, regardless of which frontend started them.
1325
1326 To enumerate all the virtual machines on the host, use the
1327 <link to="IVirtualBox::machines"/> attribute.
1328 </desc>
1329
1330 <attribute name="version" type="wstring" readonly="yes">
1331 <desc>
1332 A string representing the version number of the product. The
1333 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1334 last number represents the build number and will frequently change.
1335 </desc>
1336 </attribute>
1337
1338 <attribute name="revision" type="unsigned long" readonly="yes">
1339 <desc>
1340 The internal build revision number of the product.
1341 </desc>
1342 </attribute>
1343
1344 <attribute name="packageType" type="wstring" readonly="yes">
1345 <desc>
1346 A string representing the package type of this product. The
1347 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1348 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1349 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1350 this.
1351 </desc>
1352 </attribute>
1353
1354 <attribute name="homeFolder" type="wstring" readonly="yes">
1355 <desc>
1356 Full path to the directory where the global settings file,
1357 <tt>VirtualBox.xml</tt>, is stored.
1358
1359 In this version of VirtualBox, the value of this property is
1360 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1361 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1362 as determined by the host OS), and cannot be changed.
1363
1364 This path is also used as the base to resolve relative paths in
1365 places where relative paths are allowed (unless otherwise
1366 expressly indicated).
1367 </desc>
1368 </attribute>
1369
1370 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1371 <desc>
1372 Full name of the global settings file.
1373 The value of this property corresponds to the value of
1374 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1375 </desc>
1376 </attribute>
1377
1378 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1379 <desc>
1380 Current version of the format of the global VirtualBox settings file
1381 (<tt>VirtualBox.xml</tt>).
1382
1383 The version string has the following format:
1384 <pre>
1385 x.y-platform
1386 </pre>
1387 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1388 versions, and <tt>platform</tt> is the platform identifier.
1389
1390 The current version usually matches the value of the
1391 <link to="#settingsFormatVersion"/> attribute unless the
1392 settings file was created by an older version of VirtualBox and there
1393 was a change of the settings file format since then.
1394
1395 Note that VirtualBox automatically converts settings files from older
1396 versions to the most recent version when reading them (usually at
1397 VirtualBox startup) but it doesn't save the changes back until
1398 you call a method that implicitly saves settings (such as
1399 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
1400 explicitly. Therefore, if the value of this attribute differs from the
1401 value of <link to="#settingsFormatVersion"/>, then it
1402 means that the settings file was converted but the result of the
1403 conversion is not yet saved to disk.
1404
1405 The above feature may be used by interactive front-ends to inform users
1406 about the settings file format change and offer them to explicitly save
1407 all converted settings files (the global and VM-specific ones),
1408 optionally create backup copies of the old settings files before saving,
1409 etc.
1410
1411 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1412 </desc>
1413 </attribute>
1414
1415 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1416 <desc>
1417 Most recent version of the settings file format.
1418
1419 The version string has the following format:
1420 <pre>
1421 x.y-platform
1422 </pre>
1423 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1424 versions, and <tt>platform</tt> is the platform identifier.
1425
1426 VirtualBox uses this version of the format when saving settings files
1427 (either as a result of method calls that require to save settings or as
1428 a result of an explicit call to <link to="#saveSettings"/>).
1429
1430 <see>settingsFileVersion</see>
1431 </desc>
1432 </attribute>
1433
1434 <attribute name="host" type="IHost" readonly="yes">
1435 <desc>Associated host object.</desc>
1436 </attribute>
1437
1438 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1439 <desc>Associated system information object.</desc>
1440 </attribute>
1441
1442 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1443 <desc>
1444 Array of machine objects registered within this VirtualBox instance.
1445 </desc>
1446 </attribute>
1447
1448 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1449 <desc>
1450 Array of hard disk objects known to this VirtualBox installation.
1451
1452 This array contains only base (root) hard disks. All differencing
1453 hard disks of the given base hard disk can be enumerated using
1454 <link to="IHardDisk::children"/>.
1455 </desc>
1456 </attribute>
1457
1458 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1459 <desc>
1460 Array of CD/DVD image objects registered with this VirtualBox instance.
1461 </desc>
1462 </attribute>
1463
1464 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1465 <desc>
1466 Array of floppy image objects registered with this VirtualBox instance.
1467 </desc>
1468 </attribute>
1469
1470 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1471
1472 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1473
1474 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1475 <desc>
1476 Collection of global shared folders. Global shared folders are
1477 available to all virtual machines.
1478
1479 New shared folders are added to the collection using
1480 <link to="#createSharedFolder"/>. Existing shared folders can be
1481 removed using <link to="#removeSharedFolder"/>.
1482
1483 <note>
1484 In the current version of the product, global shared folders are not
1485 implemented and therefore this collection is always empty.
1486 </note>
1487 </desc>
1488 </attribute>
1489
1490 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1491 <desc>
1492 Associated performance collector object.
1493 </desc>
1494 </attribute>
1495
1496 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1497 <desc>
1498 dhcp server settings.
1499 </desc>
1500 </attribute>
1501
1502 <method name="createMachine">
1503 <desc>
1504 Creates a new virtual machine.
1505
1506 The new machine is created unregistered, with the initial configuration
1507 set according to the specified guest OS type. A typical sequence of
1508 actions to create a new virtual machine is as follows:
1509
1510 <ol>
1511 <li>
1512 Call this method to have a new machine created. The returned machine
1513 object will be "mutable" allowing to change any machine property.
1514 </li>
1515
1516 <li>
1517 Configure the machine using the appropriate attributes and methods.
1518 </li>
1519
1520 <li>
1521 Call <link to="IMachine::saveSettings" /> to write the settings
1522 to the machine's XML settings file. The configuration of the newly
1523 created machine will not be saved to disk until this method is
1524 called.
1525 </li>
1526
1527 <li>
1528 Call <link to="#registerMachine" /> to add the machine to the list
1529 of machines known to VirtualBox.
1530 </li>
1531 </ol>
1532
1533 You should specify valid name for the newly created machine when calling
1534 this method. See the <link to="IMachine::name"/> attribute description
1535 for more details about the machine name.
1536
1537 The specified guest OS type identifier must match an ID of one of known
1538 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1539 array.
1540
1541 Every machine has a <i>settings file</i> that is used to store
1542 the machine configuration. This file is stored in a directory called the
1543 <i>machine settings subfolder</i>. Both the settings subfolder and file
1544 will have a name that corresponds to the name of the virtual machine.
1545 You can specify where to create the machine setting subfolder using the
1546 @a baseFolder argument. The base folder can be absolute (full path) or
1547 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1548 directory</link>.
1549
1550 If @a baseFolder is a null or empty string (which is recommended), the
1551 <link to="ISystemProperties::defaultMachineFolder">default machine
1552 settings folder</link> will be used as a base folder for the created
1553 machine. Otherwise the given base folder will be used. In either case,
1554 the full path to the resulting settings file has the following
1555 structure:
1556 <pre>
1557 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1558 </pre>
1559
1560 Note that if the resulting settings file already exists, this method
1561 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1562
1563 Optionally, you may specify an UUID of to assign to the created machine.
1564 However, this is not recommended and you should normally pass an empty
1565 (null) UUID to this method so that a new UUID will be automatically
1566 generated for every created machine. You can use UUID
1567 00000000-0000-0000-0000-000000000000 as null value.
1568
1569 <note>
1570 There is no way to change the name of the settings file or
1571 subfolder of the created machine directly.
1572 </note>
1573
1574 <result name="VBOX_E_OBJECT_NOT_FOUND">
1575 @a osTypeId is invalid.
1576 </result>
1577 <result name="VBOX_E_FILE_ERROR">
1578 Resulting settings file name is invalid or the settings file already
1579 exists or could not be created due to an I/O error.
1580 </result>
1581 <result name="E_INVALIDARG">
1582 @a name is empty or null.
1583 </result>
1584 </desc>
1585
1586 <param name="name" type="wstring" dir="in">
1587 <desc>Machine name.</desc>
1588 </param>
1589 <param name="osTypeId" type="wstring" dir="in">
1590 <desc>Guest OS Type ID.</desc>
1591 </param>
1592 <param name="baseFolder" type="wstring" dir="in">
1593 <desc>Base machine folder (optional).</desc>
1594 </param>
1595 <param name="id" type="uuid" dir="in">
1596 <desc>Machine UUID (optional).</desc>
1597 </param>
1598 <param name="machine" type="IMachine" dir="return">
1599 <desc>Created machine object.</desc>
1600 </param>
1601 </method>
1602
1603 <method name="createLegacyMachine">
1604 <desc>
1605 Creates a new virtual machine in "legacy" mode, using the specified
1606 settings file to store machine settings.
1607
1608 As opposed to machines created by <link to="#createMachine"/>,
1609 the settings file of the machine created in "legacy" mode is not
1610 automatically renamed when the machine name is changed -- it will always
1611 remain the same as specified in this method call.
1612
1613 The specified settings file name can be absolute (full path) or relative
1614 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1615 directory</link>. If the file name doesn't contain an extension, the
1616 default extension (.xml) will be appended.
1617
1618 Note that the configuration of the newly created machine is not
1619 saved to disk (and therefore no settings file is created)
1620 until <link to="IMachine::saveSettings"/> is called. If the
1621 specified settings file already exists, this method
1622 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1623
1624 See <link to="#createMachine"/> for more information.
1625
1626 @deprecated This method may be removed later. Use <link
1627 to="IVirtualBox::createMachine"/> instead.
1628
1629 <note>
1630 There is no way to change the name of the settings file
1631 of the machine created in "legacy" mode.
1632 </note>
1633
1634 <result name="VBOX_E_OBJECT_NOT_FOUND">
1635 @a osTypeId is invalid.
1636 </result>
1637 <result name="VBOX_E_FILE_ERROR">
1638 @a settingsFile is invalid or the settings file already exists or
1639 could not be created due to an I/O error.
1640 </result>
1641 <result name="E_INVALIDARG">
1642 @a name or @a settingsFile is empty or null.
1643 </result>
1644 </desc>
1645
1646 <param name="name" type="wstring" dir="in">
1647 <desc>Machine name.</desc>
1648 </param>
1649 <param name="osTypeId" type="wstring" dir="in">
1650 <desc>Machine OS Type ID.</desc>
1651 </param>
1652 <param name="settingsFile" type="wstring" dir="in">
1653 <desc>Name of the machine settings file.</desc>
1654 </param>
1655 <param name="id" type="uuid" dir="in">
1656 <desc>Machine UUID (optional).</desc>
1657 </param>
1658 <param name="machine" type="IMachine" dir="return">
1659 <desc>Created machine object.</desc>
1660 </param>
1661 </method>
1662
1663 <method name="openMachine">
1664 <desc>
1665 Opens a virtual machine from the existing settings file.
1666 The opened machine remains unregistered until you call
1667 <link to="#registerMachine"/>.
1668
1669 The specified settings file name can be absolute
1670 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1671 VirtualBox home directory</link>. This file must exist
1672 and must be a valid machine settings file whose contents
1673 will be used to construct the machine object.
1674
1675 @deprecated Will be removed soon.
1676 <result name="VBOX_E_FILE_ERROR">
1677 Settings file name invalid, not found or sharing violation.
1678 </result>
1679 </desc>
1680 <param name="settingsFile" type="wstring" dir="in">
1681 <desc>
1682 Name of the machine settings file.
1683 </desc>
1684 </param>
1685 <param name="machine" type="IMachine" dir="return">
1686 <desc>Opened machine object.</desc>
1687 </param>
1688 <note>
1689 <link to="IMachine::settingsModified"/> will return
1690 false for the created machine, until any of machine settings
1691 are changed.
1692 </note>
1693 </method>
1694
1695 <method name="registerMachine">
1696 <desc>
1697
1698 Registers the machine previously created using
1699 <link to="#createMachine"/> or opened using
1700 <link to="#openMachine"/> within this VirtualBox installation. After
1701 successful method invocation, the
1702 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1703 to all registered callbacks.
1704
1705 <note>
1706 This method implicitly calls <link to="IMachine::saveSettings"/>
1707 to save all current machine settings before registering it.
1708 </note>
1709
1710 <result name="VBOX_E_OBJECT_NOT_FOUND">
1711 No matching virtual machine found.
1712 </result>
1713 <result name="VBOX_E_INVALID_OBJECT_STATE">
1714 Virtual machine was not created within this VirtualBox instance.
1715 </result>
1716
1717 </desc>
1718 <param name="machine" type="IMachine" dir="in"/>
1719 </method>
1720
1721 <method name="getMachine">
1722 <desc>
1723 Attempts to find a virtual machine given its UUID.
1724 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1725 instead.
1726
1727 <result name="VBOX_E_OBJECT_NOT_FOUND">
1728 Could not find registered machine matching @a id.
1729 </result>
1730
1731 </desc>
1732 <param name="id" type="uuid" dir="in"/>
1733 <param name="machine" type="IMachine" dir="return"/>
1734 </method>
1735
1736 <method name="findMachine">
1737 <desc>
1738 Attempts to find a virtual machine given its name.
1739 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1740 instead.
1741
1742 <result name="VBOX_E_OBJECT_NOT_FOUND">
1743 Could not find registered machine matching @a name.
1744 </result>
1745
1746 </desc>
1747 <param name="name" type="wstring" dir="in"/>
1748 <param name="machine" type="IMachine" dir="return"/>
1749 </method>
1750
1751 <method name="unregisterMachine">
1752 <desc>
1753
1754 Unregisters the machine previously registered using
1755 <link to="#registerMachine"/>. After successful method invocation, the
1756 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1757 to all registered callbacks.
1758
1759 <note>
1760 The specified machine must not be in the Saved state, have an open
1761 (or a spawning) direct session associated with it, have snapshots or
1762 have hard disks attached.
1763 </note>
1764
1765 <note>
1766 This method implicitly calls <link to="IMachine::saveSettings"/> to
1767 save all current machine settings before unregistering it.
1768 </note>
1769
1770 <note>
1771 If the given machine is inaccessible (see
1772 <link to="IMachine::accessible"/>), it will be unregistered and
1773 fully uninitialized right afterwards. As a result, the returned
1774 machine object will be unusable and an attempt to call
1775 <b>any</b> method will return the "Object not ready" error.
1776 </note>
1777
1778 <result name="VBOX_E_OBJECT_NOT_FOUND">
1779 Could not find registered machine matching @a id.
1780 </result>
1781 <result name="VBOX_E_INVALID_VM_STATE">
1782 Machine is in Saved state.
1783 </result>
1784 <result name="VBOX_E_INVALID_OBJECT_STATE">
1785 Machine has snapshot or open session or hard disk attached.
1786 </result>
1787
1788 </desc>
1789 <param name="id" type="uuid" dir="in">
1790 <desc>UUID of the machine to unregister.</desc>
1791 </param>
1792 <param name="machine" type="IMachine" dir="return">
1793 <desc>Unregistered machine object.</desc>
1794 </param>
1795 </method>
1796
1797 <method name="createAppliance">
1798 <desc>
1799 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1800 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1801 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1802 </desc>
1803 <param name="appliance" type="IAppliance" dir="return">
1804 <desc>New appliance.</desc>
1805 </param>
1806 </method>
1807
1808 <method name="createHardDisk">
1809 <desc>
1810 Creates a new base hard disk object that will use the given storage
1811 format and location for hard disk data.
1812
1813 Note that the actual storage unit is not created by this method. In
1814 order to do it, and before you are able to attach the created hard disk
1815 to virtual machines, you must call one of the following methods to
1816 allocate a format-specific storage unit at the specified location:
1817 <ul>
1818 <li><link to="IHardDisk::createBaseStorage"/></li>
1819 <li><link to="IHardDisk::createDiffStorage"/></li>
1820 </ul>
1821
1822 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1823 remain uninitialized until the hard disk storage unit is successfully
1824 created by one of the above methods.
1825
1826 After the storage unit is successfully created, the hard disk gets
1827 remembered by this VirtualBox installation and will be accessible
1828 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1829 methods. Remembered root (base) hard disks are also returned as part of
1830 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1831
1832 The list of all storage formats supported by this VirtualBox
1833 installation can be obtained using
1834 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1835 attribute is empty or <tt>null</tt> then the default storage format
1836 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1837 be used for creating a storage unit of the hard disk.
1838
1839 Note that the format of the location string is storage format specific.
1840 See <link to="IMedium::location"/>, IHardDisk and
1841 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1842
1843 <result name="VBOX_E_OBJECT_NOT_FOUND">
1844 @a format identifier is invalid. See
1845 <link to="ISystemProperties::hardDiskFormats"/>.
1846 </result>
1847 <result name="VBOX_E_FILE_ERROR">
1848 @a location is a not valid file name (for file-based formats only).
1849 </result>
1850 <result name="E_INVALIDARG">
1851 @a format is a null or empty string.
1852 </result>
1853 </desc>
1854 <param name="format" type="wstring" dir="in">
1855 <desc>
1856 Identifier of the storage format to use for the new hard disk.
1857 </desc>
1858 </param>
1859 <param name="location" type="wstring" dir="in">
1860 <desc>
1861 Location of the storage unit for the new hard disk.
1862 </desc>
1863 </param>
1864 <param name="hardDisk" type="IHardDisk" dir="return">
1865 <desc>Created hard disk object.</desc>
1866 </param>
1867 </method>
1868
1869 <method name="openHardDisk">
1870 <desc>
1871 Opens a hard disk from an existing location.
1872
1873 After the hard disk is successfully opened by this method, it gets
1874 remembered by (known to) this VirtualBox installation and will be
1875 accessible through <link to="#getHardDisk"/> and
1876 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1877 are also returned as part of the <link to="#hardDisks"/> array and can
1878 be attached to virtual machines. See IHardDisk for more details.
1879
1880 If a differencing hard disk is to be opened by this method, the
1881 operation will succeed only if its parent hard disk and all ancestors,
1882 if any, are already known to this VirtualBox installation (for example,
1883 were opened by this method before).
1884
1885 This method tries to guess the storage format of the specified hard disk
1886 by reading hard disk data at the specified location.
1887
1888 If @a write is ReadWrite (which it should be), the image is opened for
1889 read/write access and must have according permissions, as VirtualBox
1890 may actually write status information into the disk's metadata sections.
1891
1892 Note that write access is required for all typical image usage in VirtualBox,
1893 since VirtualBox may need to write metadata such as a UUID into the image.
1894 The only exception is opening a source image temporarily for copying and
1895 cloning when the image will quickly be closed again.
1896
1897 Note that the format of the location string is storage format specific.
1898 See <link to="IMedium::location"/>, IHardDisk and
1899 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1900
1901 <result name="VBOX_E_FILE_ERROR">
1902 Invalid hard disk storage file location.
1903 </result>
1904 <result name="VBOX_E_IPRT_ERROR">
1905 Could not get hard disk storage format.
1906 </result>
1907 <result name="E_INVALIDARG">
1908 Invalid hard disk storage format.
1909 </result>
1910
1911 </desc>
1912 <param name="location" type="wstring" dir="in">
1913 <desc>
1914 Location of the storage unit that contains hard disk data in one of
1915 the supported storage formats.
1916 </desc>
1917 </param>
1918 <param name="accessMode" type="AccessMode" dir="in">
1919 <desc>
1920 Determines whether to open the image in read/write or read-only mode.
1921 </desc>
1922 </param>
1923 <param name="hardDisk" type="IHardDisk" dir="return">
1924 <desc>Opened hard disk object.</desc>
1925 </param>
1926 </method>
1927
1928 <method name="getHardDisk" const="yes">
1929 <desc>
1930 Returns a hard disk with the given UUID.
1931
1932 The hard disk with the given UUID must be known to this VirtualBox
1933 installation, i.e. it must be previously created by
1934 <link to="#createHardDisk"/> or opened by <link
1935 to="#openHardDisk"/>, or attached to some known virtual machine.
1936
1937 <result name="VBOX_E_OBJECT_NOT_FOUND">
1938 No hard disk object matching @a id found.
1939 </result>
1940
1941 </desc>
1942 <param name="id" type="uuid" dir="in">
1943 <desc>UUID of the hard disk to look for.</desc>
1944 </param>
1945 <param name="hardDisk" type="IHardDisk" dir="return">
1946 <desc>Found hard disk object.</desc>
1947 </param>
1948 </method>
1949
1950 <method name="findHardDisk">
1951 <desc>
1952 Returns a hard disk that uses the given location to store hard
1953 disk data.
1954
1955 The given hard disk must be known to this VirtualBox installation, i.e.
1956 it must be previously created by
1957 <link to="#createHardDisk"/> or opened by <link
1958 to="#openHardDisk"/>, or attached to some known virtual machine.
1959
1960 The search is done by comparing the value of the @a location argument to
1961 the <link to="IHardDisk::location"/> attribute of each known hard
1962 disk.
1963
1964 For locations represented by file names in the host's file system, the
1965 requested location can be a path relative to the
1966 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1967 only a file name without any path is given, the
1968 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1969 folder</link> will be prepended to the file name before searching. Note
1970 that on case sensitive file systems, a case sensitive comparison is
1971 performed, otherwise the case of symbols in the file path is ignored.
1972
1973 <result name="VBOX_E_OBJECT_NOT_FOUND">
1974 No hard disk object matching @a location found.
1975 </result>
1976
1977 </desc>
1978 <param name="location" type="wstring" dir="in">
1979 <desc>Location string to search for.</desc>
1980 </param>
1981 <param name="hardDisk" type="IHardDisk" dir="return">
1982 <desc>Found hard disk object.</desc>
1983 </param>
1984 </method>
1985
1986 <method name="openDVDImage">
1987 <desc>
1988 Opens a CD/DVD image contained in the specified file of the supported
1989 format and assigns it the given UUID.
1990
1991 After the image is successfully opened by this method, it gets
1992 remembered by (known to) this VirtualBox installation and will be
1993 accessible through <link to="#getDVDImage"/> and
1994 <link to="#findDVDImage"/> methods. Remembered images are also
1995 returned as part of the <link to="#DVDImages"/> array and can be mounted
1996 to virtual machines. See IMedium for more details.
1997
1998 See <link to="IMedium::location"/> to get more details about the format
1999 of the location string.
2000
2001 <note>
2002 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2003 </note>
2004
2005 <result name="VBOX_E_INVALID_OBJECT_STATE">
2006 CD/DVD image already exists in the media registry.
2007 </result>
2008
2009 </desc>
2010 <param name="location" type="wstring" dir="in">
2011 <desc>
2012 Full path to the file that contains a valid CD/DVD image.
2013 </desc>
2014 </param>
2015 <param name="id" type="uuid" dir="in">
2016 <desc>
2017 UUID to assign to the given image within this VirtualBox installation.
2018 If an empty (null) UUID is specified, the system will randomly
2019 generate a new UUID.
2020 </desc>
2021 </param>
2022 <param name="image" type="IDVDImage" dir="return">
2023 <desc>Opened CD/DVD image object.</desc>
2024 </param>
2025 </method>
2026
2027 <method name="getDVDImage">
2028 <desc>
2029 Returns a CD/DVD image with the given UUID.
2030
2031 The image with the given UUID must be known to this VirtualBox
2032 installation, i.e. it must be previously opened by <link
2033 to="#openDVDImage"/>, or mounted to some known virtual machine.
2034
2035 <result name="VBOX_E_OBJECT_NOT_FOUND">
2036 No matching DVD image found in the media registry.
2037 </result>
2038
2039 </desc>
2040 <param name="id" type="uuid" dir="in">
2041 <desc>UUID of the image to look for.</desc>
2042 </param>
2043 <param name="image" type="IDVDImage" dir="return">
2044 <desc>Found CD/DVD image object.</desc>
2045 </param>
2046 </method>
2047
2048 <method name="findDVDImage">
2049 <desc>
2050 Returns a CD/DVD image with the given image location.
2051
2052 The image with the given UUID must be known to this VirtualBox
2053 installation, i.e. it must be previously opened by <link
2054 to="#openDVDImage"/>, or mounted to some known virtual machine.
2055
2056 The search is done by comparing the value of the @a location argument to
2057 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2058
2059 The requested location can be a path relative to the
2060 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2061 only a file name without any path is given, the
2062 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2063 folder</link> will be prepended to the file name before searching. Note
2064 that on case sensitive file systems, a case sensitive comparison is
2065 performed, otherwise the case in the file path is ignored.
2066
2067 <result name="VBOX_E_FILE_ERROR">
2068 Invalid image file location.
2069 </result>
2070 <result name="VBOX_E_OBJECT_NOT_FOUND">
2071 No matching DVD image found in the media registry.
2072 </result>
2073
2074 </desc>
2075 <param name="location" type="wstring" dir="in">
2076 <desc>CD/DVD image file path to look for.</desc>
2077 </param>
2078 <param name="image" type="IDVDImage" dir="return">
2079 <desc>Found CD/DVD image object.</desc>
2080 </param>
2081 </method>
2082
2083 <method name="openFloppyImage">
2084 <desc>
2085 Opens a floppy image contained in the specified file of the supported
2086 format and assigns it the given UUID.
2087
2088 After the image is successfully opened by this method, it gets
2089 remembered by (known to) this VirtualBox installation and will be
2090 accessible through <link to="#getFloppyImage"/> and
2091 <link to="#findFloppyImage"/> methods. Remembered images are also
2092 returned as part of the <link to="#floppyImages"/> array and can be
2093 mounted to virtual machines. See IMedium for more details.
2094
2095 See <link to="IMedium::location"/> to get more details about the format
2096 of the location string.
2097
2098 <result name="VBOX_E_FILE_ERROR">
2099 Floppy image specified by @a location not accessible.
2100 </result>
2101 <result name="VBOX_E_INVALID_OBJECT_STATE">
2102 Floppy image already exists in the media registry.
2103 </result>
2104
2105 <note>
2106 Currently, only raw floppy images are supported by VirtualBox.
2107 </note>
2108 </desc>
2109 <param name="location" type="wstring" dir="in">
2110 <desc>
2111 Full path to the file that contains a valid floppy image.
2112 </desc>
2113 </param>
2114 <param name="id" type="uuid" dir="in">
2115 <desc>
2116 UUID to assign to the given image file within this VirtualBox
2117 installation. If an empty (null) UUID is specified, the system will
2118 randomly generate a new UUID.
2119 </desc>
2120 </param>
2121 <param name="image" type="IFloppyImage" dir="return">
2122 <desc>Opened floppy image object.</desc>
2123 </param>
2124 </method>
2125
2126 <method name="getFloppyImage">
2127 <desc>
2128 Returns a floppy image with the given UUID.
2129
2130 The image with the given UUID must be known to this VirtualBox
2131 installation, i.e. it must be previously opened by <link
2132 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2133
2134 <result name="VBOX_E_OBJECT_NOT_FOUND">
2135 No matching floppy image found in the media registry.
2136 </result>
2137
2138 </desc>
2139 <param name="id" type="uuid" dir="in">
2140 <desc>UUID of the image to look for.</desc>
2141 </param>
2142 <param name="image" type="IFloppyImage" dir="return">
2143 <desc>Found floppy image object.</desc>
2144 </param>
2145 </method>
2146
2147 <method name="findFloppyImage">
2148 <desc>
2149 Returns a floppy image with the given image location.
2150
2151 The image with the given UUID must be known to this VirtualBox
2152 installation, i.e. it must be previously opened by <link
2153 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2154
2155 The search is done by comparing the value of the @a location argument to
2156 the <link to="IMedium::location"/> attribute of each known floppy image.
2157
2158 The requested location can be a path relative to the
2159 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2160 only a file name without any path is given, the
2161 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2162 folder</link> will be prepended to the file name before searching. Note
2163 that on case sensitive file systems, a case sensitive comparison is
2164 performed, otherwise the case of symbols in the file path is ignored.
2165
2166 <result name="VBOX_E_FILE_ERROR">
2167 Invalid image file location.
2168 </result>
2169 <result name="VBOX_E_OBJECT_NOT_FOUND">
2170 No matching floppy image found in the media registry.
2171 </result>
2172
2173 </desc>
2174 <param name="location" type="wstring" dir="in">
2175 <desc>Floppy image file path to look for.</desc>
2176 </param>
2177 <param name="image" type="IFloppyImage" dir="return">
2178 <desc>Found floppy image object.</desc>
2179 </param>
2180 </method>
2181
2182 <method name="getGuestOSType">
2183 <desc>
2184 Returns an object describing the specified guest OS type.
2185
2186 The requested guest OS type is specified using a string which is a
2187 mnemonic identifier of the guest operating system, such as
2188 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2189 particular virtual machine can be read or set using the
2190 <link to="IMachine::OSTypeId"/> attribute.
2191
2192 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2193 available guest OS type objects. Each object has an
2194 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2195 the guest OS this object describes.
2196
2197 <result name="E_INVALIDARG">
2198 @a id is not a valid Guest OS type.
2199 </result>
2200
2201 </desc>
2202 <param name="id" type="wstring" dir="in">
2203 <desc>Guest OS type ID string.</desc>
2204 </param>
2205 <param name="type" type="IGuestOSType" dir="return">
2206 <desc>Guest OS type object.</desc>
2207 </param>
2208 </method>
2209
2210 <method name="createSharedFolder">
2211 <desc>
2212 Creates a new global shared folder by associating the given logical
2213 name with the given host path, adds it to the collection of shared
2214 folders and starts sharing it. Refer to the description of
2215 <link to="ISharedFolder"/> to read more about logical names.
2216 <note>
2217 In the current implementation, this operation is not
2218 implemented.
2219 </note>
2220 </desc>
2221 <param name="name" type="wstring" dir="in">
2222 <desc>Unique logical name of the shared folder.</desc>
2223 </param>
2224 <param name="hostPath" type="wstring" dir="in">
2225 <desc>Full path to the shared folder in the host file system.</desc>
2226 </param>
2227 <param name="writable" type="boolean" dir="in">
2228 <desc>Whether the share is writable or readonly</desc>
2229 </param>
2230 </method>
2231
2232 <method name="removeSharedFolder">
2233 <desc>
2234 Removes the global shared folder with the given name previously
2235 created by <link to="#createSharedFolder"/> from the collection of
2236 shared folders and stops sharing it.
2237 <note>
2238 In the current implementation, this operation is not
2239 implemented.
2240 </note>
2241 </desc>
2242 <param name="name" type="wstring" dir="in">
2243 <desc>Logical name of the shared folder to remove.</desc>
2244 </param>
2245 </method>
2246
2247 <method name="getNextExtraDataKey">
2248 <desc>
2249 Returns the global extra data key name following the supplied key.
2250
2251 An error is returned if the supplied @a key does not exist. @c NULL is
2252 returned in @a nextKey if the supplied key is the last key. When
2253 supplying @c NULL or an empty string for the @a key, the first key item
2254 is returned in @a nextKey (if there is any). @a nextValue is an optional
2255 parameter and if supplied, the next key's value is returned in it.
2256
2257 <result name="VBOX_E_OBJECT_NOT_FOUND">
2258 Extra data @a key not found.
2259 </result>
2260
2261 </desc>
2262 <param name="key" type="wstring" dir="in">
2263 <desc>Name of the data key to follow.</desc>
2264 </param>
2265 <param name="nextKey" type="wstring" dir="out">
2266 <desc>Name of the next data key.</desc>
2267 </param>
2268 <param name="nextValue" type="wstring" dir="out">
2269 <desc>Value of the next data key.</desc>
2270 </param>
2271 </method>
2272
2273 <method name="getExtraData">
2274 <desc>
2275 Returns associated global extra data.
2276
2277 If the requested data @a key does not exist, this function will
2278 succeed and return @c NULL in the @a value argument.
2279
2280 <result name="VBOX_E_FILE_ERROR">
2281 Settings file not accessible.
2282 </result>
2283 <result name="VBOX_E_XML_ERROR">
2284 Could not parse the settings file.
2285 </result>
2286
2287 </desc>
2288 <param name="key" type="wstring" dir="in">
2289 <desc>Name of the data key to get.</desc>
2290 </param>
2291 <param name="value" type="wstring" dir="return">
2292 <desc>Value of the requested data key.</desc>
2293 </param>
2294 </method>
2295
2296 <method name="setExtraData">
2297 <desc>
2298 Sets associated global extra data.
2299
2300 If you pass @c NULL as a key @a value, the given @a key will be
2301 deleted.
2302
2303 <note>
2304 Before performing the actual data change, this method will ask all
2305 registered callbacks using the
2306 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2307 notification for a permission. If one of the callbacks refuses the
2308 new value, the change will not be performed.
2309 </note>
2310 <note>
2311 On success, the
2312 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2313 is called to inform all registered callbacks about a successful data
2314 change.
2315 </note>
2316
2317 <result name="VBOX_E_FILE_ERROR">
2318 Settings file not accessible.
2319 </result>
2320 <result name="VBOX_E_XML_ERROR">
2321 Could not parse the settings file.
2322 </result>
2323 <result name="E_ACCESSDENIED">
2324 Modification request refused.
2325 </result>
2326
2327 </desc>
2328 <param name="key" type="wstring" dir="in">
2329 <desc>Name of the data key to set.</desc>
2330 </param>
2331 <param name="value" type="wstring" dir="in">
2332 <desc>Value to assign to the key.</desc>
2333 </param>
2334 </method>
2335
2336 <method name="openSession">
2337 <desc>
2338 Opens a new direct session with the given virtual machine.
2339
2340 A direct session acts as a local lock on the given VM.
2341 There can be only one direct session open at a time for every
2342 virtual machine, protecting the VM from being manipulated by
2343 conflicting actions from different processes. Only after a
2344 direct session has been opened, one can change all VM settings
2345 and execute the VM in the process space of the session object.
2346
2347 Sessions therefore can be compared to mutex semaphores that
2348 lock a given VM for modification and execution.
2349 See <link to="ISession">ISession</link> for details.
2350
2351 <note>Unless you are writing a new VM frontend, you will not
2352 want to execute a VM in the current process. To spawn a new
2353 process that executes a VM, use
2354 <link to="IVirtualBox::openRemoteSession" />
2355 instead.</note>
2356
2357 Upon successful return, the session object can be used to
2358 get access to the machine and to the VM console.
2359
2360 In VirtualBox terminology, the machine becomes "mutable" after
2361 a session has been opened. Note that the "mutable" machine
2362 object, on which you may invoke IMachine methods to change its
2363 settings, will be a different object from the immutable IMachine
2364 objects returned by various IVirtualBox methods. To obtain a
2365 mutable IMachine object (upon which you can invoke settings methods),
2366 use the <link to="ISession::machine" /> attribute.
2367
2368 One must always call <link to="ISession::close" /> to release the
2369 lock on the machine, or the machine's state will eventually be
2370 set to "Aborted".
2371
2372 In other words, to change settings on a machine, the following
2373 sequence is typically performed:
2374
2375 <ol>
2376 <li>Call this method (openSession) to have a machine locked for
2377 the current session.</li>
2378
2379 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2380
2381 <li>Change the settings of the machine.</li>
2382
2383 <li>Call <link to="IMachine::saveSettings" />.</li>
2384
2385 <li>Close the session by calling <link to="ISession::close"/>.</li>
2386 </ol>
2387
2388 <result name="E_UNEXPECTED">
2389 Virtual machine not registered.
2390 </result>
2391 <result name="E_ACCESSDENIED">
2392 Process not started by OpenRemoteSession.
2393 </result>
2394 <result name="VBOX_E_OBJECT_NOT_FOUND">
2395 No matching virtual machine found.
2396 </result>
2397 <result name="VBOX_E_INVALID_OBJECT_STATE">
2398 Session already open or being opened.
2399 </result>
2400 <result name="VBOX_E_VM_ERROR">
2401 Failed to assign machine to session.
2402 </result>
2403
2404 </desc>
2405 <param name="session" type="ISession" dir="in">
2406 <desc>
2407 Session object that will represent the opened session after
2408 successful method invocation. This object must not represent
2409 the already open session.
2410 <note>
2411 This session will be automatically closed if the
2412 VirtualBox server is terminated for some reason.
2413 </note>
2414 </desc>
2415 </param>
2416 <param name="machineId" type="uuid" dir="in">
2417 <desc>ID of the virtual machine to open a session with.</desc>
2418 </param>
2419 </method>
2420
2421 <method name="openRemoteSession">
2422 <desc>
2423 Spawns a new process that executes a virtual machine (called a
2424 "remote session").
2425
2426 Opening a remote session causes the VirtualBox server to start a new
2427 process that opens a direct session with the given VM. As a result, the
2428 VM is locked by that direct session in the new process, preventing
2429 conflicting changes from other processes. Since sessions act as locks
2430 that prevent conflicting changes, one cannot open a remote session
2431 for a VM that already has another open session (direct or remote), or
2432 is currently in the process of opening one (see <link
2433 to="IMachine::sessionState"/>).
2434
2435 While the remote session still provides some level of control over the
2436 VM execution to the caller (using the <link to="IConsole" /> interface),
2437 not all VM settings are available for modification within the remote
2438 session context.
2439
2440 This operation can take some time (a new VM is started in a new process,
2441 for which memory and other resources need to be set up). Because of this,
2442 an <link to="IProgress" /> is returned to allow the caller to wait for this
2443 asynchronous operation to be completed. Until then, the remote session
2444 object remains in the closed state, and accessing the machine or its
2445 console through it is invalid. It is recommended to use
2446 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2447 completion.
2448
2449 As with all <link to="ISession" /> objects, it is recommended to call
2450 <link to="ISession::close" /> on the local session object once openRemoteSession()
2451 has been called. However, the session's state (see <link to="ISession::state" />)
2452 will not return to "Closed" until the remote session has also closed (i.e.
2453 until the VM is no longer running). In that case, however, the state of
2454 the session will automatically change back to "Closed".
2455
2456 Currently supported session types (values of the @a type
2457 argument) are:
2458 <ul>
2459 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2460 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2461 </ul>
2462
2463 The @a environment argument is a string containing definitions of
2464 environment variables in the following format:
2465 @code
2466 NAME[=VALUE]\n
2467 NAME[=VALUE]\n
2468 ...
2469 @endcode
2470 where <tt>\\n</tt> is the new line character. These environment
2471 variables will be appended to the environment of the VirtualBox server
2472 process. If an environment variable exists both in the server process
2473 and in this list, the value from this list takes precedence over the
2474 server's variable. If the value of the environment variable is
2475 omitted, this variable will be removed from the resulting environment.
2476 If the environment string is @c null, the server environment is
2477 inherited by the started process as is.
2478
2479 <see>openExistingSession</see>
2480
2481 <result name="E_UNEXPECTED">
2482 Virtual machine not registered.
2483 </result>
2484 <result name="E_INVALIDARG">
2485 Invalid session type @a type.
2486 </result>
2487 <result name="VBOX_E_OBJECT_NOT_FOUND">
2488 No machine matching @a machineId found.
2489 </result>
2490 <result name="VBOX_E_INVALID_OBJECT_STATE">
2491 Session already open or being opened.
2492 </result>
2493 <result name="VBOX_E_IPRT_ERROR">
2494 Launching process for machine failed.
2495 </result>
2496 <result name="VBOX_E_VM_ERROR">
2497 Failed to assign machine to session.
2498 </result>
2499
2500 </desc>
2501 <param name="session" type="ISession" dir="in">
2502 <desc>
2503 Session object that will represent the opened remote session
2504 after successful method invocation (this object must not
2505 represent an already open session).
2506 </desc>
2507 </param>
2508 <param name="machineId" type="uuid" dir="in">
2509 <desc>ID of the virtual machine to open a session with.</desc>
2510 </param>
2511 <param name="type" type="wstring" dir="in">
2512 <desc>
2513 Type of the remote session (case sensitive).
2514 </desc>
2515 </param>
2516 <param name="environment" type="wstring" dir="in">
2517 <desc>
2518 Environment to pass to the opened session (may be @c null).
2519 </desc>
2520 </param>
2521 <param name="progress" type="IProgress" dir="return">
2522 <desc>Progress object to track the operation completion.</desc>
2523 </param>
2524 </method>
2525
2526 <method name="openExistingSession">
2527 <desc>
2528 Opens a new remote session with the virtual machine for
2529 which a direct session is already open.
2530
2531 The remote session provides some level of control over the VM
2532 execution (using the IConsole interface) to the caller; however,
2533 within the remote session context, not all VM settings are available
2534 for modification.
2535
2536 As opposed to <link to="#openRemoteSession"/>, the number of
2537 remote sessions opened this way is not limited by the API
2538
2539 <note>
2540 It is an error to open a remote session with the machine that
2541 doesn't have an open direct session.
2542 </note>
2543
2544 <result name="E_UNEXPECTED">
2545 Virtual machine not registered.
2546 </result>
2547 <result name="VBOX_E_OBJECT_NOT_FOUND">
2548 No machine matching @a machineId found.
2549 </result>
2550 <result name="VBOX_E_INVALID_OBJECT_STATE">
2551 Session already open or being opened.
2552 </result>
2553 <result name="VBOX_E_INVALID_SESSION_STATE">
2554 Direct session state not Open.
2555 </result>
2556 <result name="VBOX_E_VM_ERROR">
2557 Failed to get console object from direct session or assign
2558 machine to session.
2559 </result>
2560
2561 <see>openRemoteSession</see>
2562 </desc>
2563 <param name="session" type="ISession" dir="in">
2564 <desc>
2565 Session object that will represent the open remote session
2566 after successful method invocation. This object must not
2567 represent an already open session.
2568 <note>
2569 This session will be automatically closed when the peer
2570 (direct) session dies or gets closed.
2571 </note>
2572 </desc>
2573 </param>
2574 <param name="machineId" type="uuid" dir="in">
2575 <desc>ID of the virtual machine to open a session with.</desc>
2576 </param>
2577 </method>
2578
2579 <method name="registerCallback">
2580 <desc>
2581 Registers a new global VirtualBox callback. The methods of the given
2582 callback object will be called by VirtualBox when an appropriate
2583 event occurs.
2584
2585 <result name="E_INVALIDARG">
2586 A @c NULL callback cannot be registered.
2587 </result>
2588
2589 </desc>
2590 <param name="callback" type="IVirtualBoxCallback" dir="in">
2591 <desc>Callback object to register.</desc>
2592 </param>
2593 </method>
2594
2595 <method name="unregisterCallback">
2596 <desc>
2597 Unregisters the previously registered global VirtualBox callback.
2598
2599 <result name="E_INVALIDARG">
2600 Specified @a callback not registered.
2601 </result>
2602
2603 </desc>
2604 <param name="callback" type="IVirtualBoxCallback" dir="in">
2605 <desc>Callback object to unregister.</desc>
2606 </param>
2607 </method>
2608
2609 <method name="waitForPropertyChange">
2610 <desc>
2611 Blocks the caller until any of the properties represented by the
2612 @a what argument changes the value or until the given timeout interval
2613 expires.
2614
2615 The @a what argument is a comma separated list of property masks that
2616 describe properties the caller is interested in. The property mask is
2617 a string in the following format:
2618
2619 <pre>
2620 [[group.]subgroup.]name
2621 </pre>
2622
2623 where @c name is the property name and @c group, @c subgroup are zero
2624 or more property group specifiers. Each element (group or name) in
2625 the property mask may be either a Latin string or an asterisk symbol
2626 (@c "*") which is used to match any string for the given element. A
2627 property mask that doesn't contain asterisk symbols represents a
2628 single fully qualified property name.
2629
2630 Groups in the fully qualified property name go from more generic (the
2631 left-most part) to more specific (the right-most part). The first
2632 element is usually a name of the object the property belongs to. The
2633 second element may be either a property name, or a child object name,
2634 or an index if the preceding element names an object which is one of
2635 many objects of the same type. This way, property names form a
2636 hierarchy of properties. Here are some examples of property names:
2637
2638 <table>
2639 <tr>
2640 <td><tt>VirtualBox.version</tt></td>
2641 <td><link to="IVirtualBox::version"/> property</td>
2642 </tr>
2643 <tr>
2644 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2645 <td><link to="IMachine::name"/> property of the machine with the
2646 given UUID</td>
2647 </tr>
2648 </table>
2649
2650 Most property names directly correspond to the properties of objects
2651 (components) provided by the VirtualBox library and may be used to
2652 track changes to these properties. However, there may be
2653 pseudo-property names that don't correspond to any existing object's
2654 property directly, as well as there may be object properties that
2655 don't have a corresponding property name that is understood by this
2656 method, and therefore changes to such properties cannot be
2657 tracked. See individual object's property descriptions to get a
2658 fully qualified property name that can be used with this method (if
2659 any).
2660
2661 There is a special property mask @c "*" (i.e. a string consisting of a
2662 single asterisk symbol) that can be used to match all properties.
2663 Below are more examples of property masks:
2664
2665 <table>
2666 <tr>
2667 <td><tt>VirtualBox.*</tt></td>
2668 <td>Track all properties of the VirtualBox object</td>
2669 </tr>
2670 <tr>
2671 <td><tt>Machine.*.name</tt></td>
2672 <td>Track changes to the <link to="IMachine::name"/> property of
2673 all registered virtual machines</td>
2674 </tr>
2675 </table>
2676
2677 <note>
2678 This function is not implemented in the current version of the
2679 product.
2680 </note>
2681 </desc>
2682 <param name="what" type="wstring" dir="in">
2683 <desc>Comma separated list of property masks.</desc>
2684 </param>
2685 <param name="timeout" type="unsigned long" dir="in">
2686 <desc>
2687 Wait timeout in milliseconds.
2688 Specify -1 for an indefinite wait.
2689 </desc>
2690 </param>
2691 <param name="changed" type="wstring" dir="out">
2692 <desc>
2693 Comma separated list of properties that have been changed and caused
2694 this method to return to the caller.
2695 </desc>
2696 </param>
2697 <param name="values" type="wstring" dir="out">
2698 <desc>Reserved, not currently used.</desc>
2699 </param>
2700 </method>
2701
2702 <method name="saveSettings">
2703 <desc>
2704 Saves the global settings to the global settings file
2705 (<link to="#settingsFilePath"/>).
2706
2707 This method is only useful for explicitly saving the global settings
2708 file after it has been auto-converted from the old format to the most
2709 recent format (see <link to="#settingsFileVersion"/> for details).
2710 Normally, the global settings file is implicitly saved when a global
2711 setting is changed.
2712
2713 <result name="VBOX_E_FILE_ERROR">
2714 Settings file not accessible.
2715 </result>
2716 <result name="VBOX_E_XML_ERROR">
2717 Could not parse the settings file.
2718 </result>
2719
2720 </desc>
2721 </method>
2722
2723 <method name="saveSettingsWithBackup">
2724 <desc>
2725 Creates a backup copy of the global settings file
2726 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2727 calls <link to="#saveSettings"/>.
2728
2729 Note that the backup copy is created <b>only</b> if the settings file
2730 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2731 details). Otherwise, this call is fully equivalent to
2732 <link to="#saveSettings"/> and no backup copying is done.
2733
2734 The backup copy is created in the same directory where the original
2735 settings file is located. It is given the following file name:
2736 <pre>
2737 original.xml.x.y-platform.bak
2738 </pre>
2739 where <tt>original.xml</tt> is the original settings file name
2740 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2741 format of the settings file (before auto-conversion).
2742
2743 If the given backup file already exists, this method will try to add the
2744 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2745 0 to 9) and copy it again until it succeeds. If all suffixes are
2746 occupied, or if any other copy error occurs, this method will return a
2747 failure.
2748
2749 If the copy operation succeeds, the @a bakFileName return argument will
2750 receive a full path to the created backup file (for informational
2751 purposes). Note that this will happen even if the subsequent
2752 <link to="#saveSettings"/> call performed by this method after the
2753 copy operation, fails.
2754
2755 <note>
2756 The VirtualBox API never calls this method. It is intended purely for
2757 the purposes of creating backup copies of the settings files by
2758 front-ends before saving the results of the automatically performed
2759 settings conversion to disk.
2760 </note>
2761
2762 <see>settingsFileVersion</see>
2763
2764 <result name="VBOX_E_FILE_ERROR">
2765 Settings file not accessible.
2766 </result>
2767 <result name="VBOX_E_XML_ERROR">
2768 Could not parse the settings file.
2769 </result>
2770 <result name="VBOX_E_IPRT_ERROR">
2771 Could not copy the settings file.
2772 </result>
2773
2774 </desc>
2775 <param name="bakFileName" type="wstring" dir="return">
2776 <desc>Full path to the created backup copy.</desc>
2777 </param>
2778 </method>
2779
2780 <!--method name="createDHCPServerForInterface">
2781 <desc>
2782 Creates a dhcp server settings to be used for the given interface
2783 <result name="E_INVALIDARG">
2784 Host network interface @a name already exists.
2785 </result>
2786 </desc>
2787 <param name="interface" type="IHostNetworkInterface" dir="in">
2788 <desc>Network Interface</desc>
2789 </param>
2790 <param name="server" type="IDHCPServer" dir="out">
2791 <desc>Dhcp server settings</desc>
2792 </param>
2793 </method-->
2794
2795 <method name="createDHCPServer">
2796 <desc>
2797 Creates a dhcp server settings to be used for the given internal network name
2798 <result name="E_INVALIDARG">
2799 Host network interface @a name already exists.
2800 </result>
2801 </desc>
2802 <param name="name" type="wstring" dir="in">
2803 <desc>server name</desc>
2804 </param>
2805 <param name="server" type="IDHCPServer" dir="return">
2806 <desc>Dhcp server settings</desc>
2807 </param>
2808 </method>
2809
2810 <method name="findDHCPServerByNetworkName">
2811 <desc>
2812 Searches a dhcp server settings to be used for the given internal network name
2813 <result name="E_INVALIDARG">
2814 Host network interface @a name already exists.
2815 </result>
2816
2817 </desc>
2818 <param name="name" type="wstring" dir="in">
2819 <desc>server name</desc>
2820 </param>
2821 <param name="server" type="IDHCPServer" dir="return">
2822 <desc>Dhcp server settings</desc>
2823 </param>
2824 </method>
2825
2826 <!--method name="findDHCPServerForInterface">
2827 <desc>
2828 Searches a dhcp server settings to be used for the given interface
2829 <result name="E_INVALIDARG">
2830 Host network interface @a name already exists.
2831 </result>
2832 </desc>
2833 <param name="interface" type="IHostNetworkInterface" dir="in">
2834 <desc>Network Interface</desc>
2835 </param>
2836 <param name="server" type="IDHCPServer" dir="out">
2837 <desc>Dhcp server settings</desc>
2838 </param>
2839 </method-->
2840
2841 <method name="removeDHCPServer">
2842 <desc>
2843 Removes the dhcp server settings
2844 <result name="E_INVALIDARG">
2845 Host network interface @a name already exists.
2846 </result>
2847 </desc>
2848 <param name="server" type="IDHCPServer" dir="in">
2849 <desc>Dhcp server settings to be removed</desc>
2850 </param>
2851 </method>
2852
2853 </interface>
2854
2855 <!--
2856 // IAppliance
2857 /////////////////////////////////////////////////////////////////////////
2858 -->
2859
2860 <enum
2861 name="CIMOSType"
2862 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2863 >
2864 <desc>
2865 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2866 </desc>
2867
2868 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2869 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2870 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2871 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2872 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2873 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2874 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2875 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2876 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2877 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2878 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2879 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2880 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2881 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2882 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2883 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2884 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2885 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2886 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2887 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2888 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2889 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2890 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2891 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2892 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2893 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2894 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2895 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2896 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2897 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2898 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2899 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2900 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2901 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2902 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2903 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2904 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2905 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2906 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2907 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2908 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2909 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2910 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2911 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2912 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2913 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2914 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2915 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2916 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2917 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2918 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2919 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2920 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2921 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2922 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2923 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2924 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2925 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2926 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2927 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2928 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2929 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2930 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2931 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2932 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2933 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2934 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2935 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2936 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2937 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2938 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2939 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2940 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2941 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2942 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2943 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2944 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2945 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2946 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2947 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2948 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2949 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2950 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2951 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2952 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2953 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2954 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2955 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2956 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2957 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2958 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2959 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2960 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2961 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2962 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2963 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2964 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2965 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2966 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
2967 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
2968 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
2969 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
2970 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
2971 </enum>
2972
2973 <enum
2974 name="OVFResourceType"
2975 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
2976 >
2977 <desc>
2978 OVF resource type (as listed with CIM_ResourceAllocationSettingData; see for example
2979 http://msdn.microsoft.com/en-us/library/cc136877(VS.85).aspx).
2980 </desc>
2981
2982 <const name="Other" value="1" />
2983 <const name="ComputerSystem" value="2" />
2984 <const name="Processor" value="3" />
2985 <const name="Memory" value="4" />
2986 <const name="IDEController" value="5" />
2987 <const name="ParallelSCSIHBA" value="6" />
2988 <const name="FCHBA" value="7" />
2989 <const name="iSCSIHBA" value="8" />
2990 <const name="IBHCA" value="9" />
2991 <const name="EthernetAdapter" value="10" />
2992 <const name="OtherNetworkAdapter" value="11" />
2993 <const name="IOSlot" value="12" />
2994 <const name="IODevice" value="13" />
2995 <const name="FloppyDrive" value="14" />
2996 <const name="CDDrive" value="15" />
2997 <const name="DVDDrive" value="16" />
2998 <const name="HardDisk" value="17" />
2999 <const name="OtherStorageDevice" value="20" />
3000 <const name="USBController" value="23" />
3001 <const name="SoundCard" value="35" />
3002 </enum>
3003
3004 <interface
3005 name="IAppliance" extends="$unknown"
3006 uuid="a7a71c1f-20d3-4483-95c0-7357dda77f50"
3007 wsmap="managed"
3008 >
3009 <desc>
3010 Represents a platform-independent appliance in OVF format. An instance of this is returned
3011 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3012 appliances with VirtualBox.
3013
3014 The OVF standard suggests two different physical file formats:
3015
3016 <ol>
3017 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3018 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3019 this descriptor file references other files, as OVF appliances distributed as a set of
3020 files most likely do, those files must be in the same directory as the descriptor file.</li>
3021
3022 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3023 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3024 files and optionally other files.
3025
3026 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3027 be added with a later version.</li>
3028 </ol>
3029
3030 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3031 <link to="IMachine" /> involves the following sequence of API calls:
3032
3033 <ol>
3034 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3035 </li>
3036
3037 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3038 would like to import. So long as this file is syntactically valid, this will succeed
3039 and return an instance of IAppliance that contains the parsed data from the OVF file.
3040 </li>
3041
3042 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3043 contents of the IAppliance attributes accordingly. These can be inspected by a
3044 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3045 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3046 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3047 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3048 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3049 The GUI can then give the user the option to confirm and/or change these suggestions.
3050 </li>
3051
3052 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3053 virtual system to override the suggestions made by the interpret() routine.
3054 </li>
3055
3056 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3057 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3058 virtual system descriptions.
3059 </li>
3060 </ol>
3061
3062 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3063
3064 <ol>
3065 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3066 an empty IAppliance object.
3067 </li>
3068
3069 <li>For each machine you would like to export, call <link to="IMachine::export" />
3070 with the IAppliance object you just created. This creates an instance of
3071 <link to="IVirtualSystemDescription" /> inside the appliance.
3072 </li>
3073
3074 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3075 virtual system to override the suggestions made by the export() routine.
3076 </li>
3077
3078 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3079 file written.</li>
3080 </ol>
3081
3082 </desc>
3083
3084 <attribute name="path" type="wstring" readonly="yes">
3085 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3086 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3087 <link to="#write" /> (for export).
3088 This attribute is empty until one of these methods has been called.
3089 </desc>
3090 </attribute>
3091
3092 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3093 <desc>
3094 Array of virtual disk definitions. One such description exists for each
3095 disk definition in the OVF; each string array item represents one such piece of
3096 disk information, with the information fields separated by tab (\t) characters.
3097
3098 The caller should be prepared for additional fields being appended to
3099 this string in future versions of VirtualBox and therefore check for
3100 the number of tabs in the strings returned.
3101
3102 In the current version, the following eight fields are returned per string
3103 in the array:
3104
3105 <ol>
3106 <li>Disk ID (unique string identifier given to disk)</li>
3107
3108 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3109
3110 <li>Populated size (optional unsigned integer indicating the current size of the
3111 disk; can be approximate; -1 if unspecified)</li>
3112
3113 <li>Format (string identifying the disk format, typically
3114 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3115
3116 <li>Reference (where to find the disk image, typically a file name; if empty,
3117 then the disk should be created on import)</li>
3118
3119 <li>Image size (optional unsigned integer indicating the size of the image,
3120 which need not necessarily be the same as the values specified above, since
3121 the image may be compressed or sparse; -1 if not specified)</li>
3122
3123 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3124 presently unsupported and always -1)</li>
3125
3126 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3127 </ol>
3128 </desc>
3129 </attribute>
3130
3131 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3132 <desc> Array of virtual system descriptions. One such description is created
3133 for each virtual system found in the OVF.
3134 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3135 (for export) has been called.
3136 </desc>
3137 </attribute>
3138
3139 <method name="read">
3140 <desc>
3141 Reads an OVF file into the appliance object.
3142
3143 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3144 mere fact that this method returns successfully does not mean that VirtualBox supports all
3145 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3146 </desc>
3147 <param name="file" type="wstring" dir="in">
3148 <desc>
3149 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3150 on whether the appliance is distributed as a set of files or as a single file, respectively).
3151 </desc>
3152 </param>
3153 </method>
3154
3155 <method name="interpret">
3156 <desc>
3157 Interprets the OVF data that was read when the appliance was constructed. After
3158 calling this method, one can inspect the
3159 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3160 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3161 the appliance.
3162
3163 Calling this method is the second step of importing an appliance into VirtualBox;
3164 see <link to="IAppliance" /> for an overview.
3165
3166 After calling this method, one should call <link to="#getWarnings" /> to find out
3167 if problems were encountered during the processing which might later lead to
3168 errors.
3169 </desc>
3170 </method>
3171
3172 <method name="importMachines">
3173 <desc>
3174 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3175 and other interfaces that match the information contained in the appliance as
3176 closely as possible, as represented by the import instructions in the
3177 <link to="#virtualSystemDescriptions" /> array.
3178
3179 Calling this method is the final step of importing an appliance into VirtualBox;
3180 see <link to="IAppliance" /> for an overview.
3181
3182 Since importing the appliance will most probably involve copying and converting
3183 disk images, which can take a long time, this method operates asynchronously and
3184 returns an IProgress object to allow the caller to monitor the progress.
3185 </desc>
3186
3187 <param name="aProgress" type="IProgress" dir="return">
3188 <desc></desc>
3189 </param>
3190 </method>
3191
3192 <method name="write">
3193 <desc>
3194 Writes the contents of the appliance exports into a new OVF file.
3195
3196 Calling this method is the final step of exporting an appliance from VirtualBox;
3197 see <link to="IAppliance" /> for an overview.
3198
3199 Since exporting the appliance will most probably involve copying and converting
3200 disk images, which can take a long time, this method operates asynchronously and
3201 returns an IProgress object to allow the caller to monitor the progress.
3202 </desc>
3203 <param name="path" type="wstring" dir="in">
3204 <desc>
3205 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3206 on whether the appliance is distributed as a set of files or as a single file, respectively).
3207 </desc>
3208 </param>
3209 <param name="aProgress" type="IProgress" dir="return">
3210 <desc></desc>
3211 </param>
3212 </method>
3213
3214 <method name="getWarnings">
3215 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3216
3217 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3218 <desc></desc>
3219 </param>
3220 </method>
3221
3222 </interface>
3223
3224 <enum
3225 name="VirtualSystemDescriptionType"
3226 uuid="8ac36d00-bb7c-4a35-a835-3f004b27427b"
3227 >
3228 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3229 a configuration value.</desc>
3230
3231 <const name="Ignore" value="1" />
3232 <const name="OS" value="2" />
3233 <const name="Name" value="3" />
3234 <const name="Description" value="4" />
3235 <const name="CPU" value="5" />
3236 <const name="Memory" value="6" />
3237 <const name="HardDiskControllerIDE" value="7" />
3238 <const name="HardDiskControllerSATA" value="8" />
3239 <const name="HardDiskControllerSCSI" value="9" />
3240 <const name="HardDiskImage" value="10" />
3241 <const name="Floppy" value="11" />
3242 <const name="CDROM" value="12" />
3243 <const name="NetworkAdapter" value="13" />
3244 <const name="USBController" value="14" />
3245 <const name="SoundCard" value="15" />
3246
3247 </enum>
3248
3249 <interface
3250 name="IVirtualSystemDescription" extends="$unknown"
3251 uuid="c2e9f5b5-522c-47e5-be55-0d20b46a95d9"
3252 wsmap="managed"
3253 >
3254
3255 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3256 After <link to="IAppliance::interpret" /> has been called, that array contains
3257 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3258 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3259 into VirtualBox.
3260 </desc>
3261
3262 <attribute name="count" type="unsigned long" readonly="yes">
3263 <desc>Return the number of virtual system description entries.</desc>
3264 </attribute>
3265
3266 <method name="getDescription">
3267 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3268 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3269
3270 The list below identifies the value sets that are possible depending on the
3271 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3272 the array item with the same index in aOvfValues[] will contain the original value as contained
3273 in the OVF file (just for informational purposes), and the corresponding item in aVboxValues[]
3274 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3275 the aExtraConfigValues[] array item may also be used.
3276
3277 <ul>
3278 <li>
3279 "OS": the guest operating system type. There must be exactly one such array item on import. The
3280 corresponding item in aVboxValues[] contains the suggested guest operating system for VirtualBox.
3281 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3282 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF
3283 (see <link to="CIMOSType" />).
3284 </li>
3285 <li>
3286 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3287 if none is present on import, then an automatic name will be created from the operating system
3288 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3289 from the OVF file, and aVboxValues[] will contain a suggestion for a unique VirtualBox
3290 <link to="IMachine" /> name that does not exist yet.
3291 </li>
3292 <li>
3293 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3294 </li>
3295 <li>
3296 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3297 is present on import, then VirtualBox will set a meaningful default based on the operating system
3298 type.
3299 </li>
3300 <li>
3301 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3302 has no value in aOvfValues[] or aVboxValues[].
3303 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3304 type can use to specify which hard disk controller a virtual disk should be connected to.
3305 </li>
3306 <li>
3307 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3308 has no value in aOvfValues[] or aVboxValues[].
3309 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3310 </li>
3311 <li>
3312 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3313 The items in aOvfValues[] and aVboxValues[] will either be "LsiLogic" or "BusLogic".
3314 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3315 </li>
3316 <li>
3317 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3318 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3319
3320 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3321 a path since the image file should be in the same location as the OVF file itself), whereas the
3322 item in aVboxValues[] will contain a qualified path specification to where VirtualBox uses the
3323 hard disk image. This means that on import the image will be copied and converted from the
3324 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3325 On import, the target image will also be registered with VirtualBox.
3326
3327 The matching item in the aExtraConfigValues[] array must contain a string of the following
3328 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3329 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3330 the image to. That number must be the index of an array item with one of the hard disk controller
3331 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3332 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3333 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3334 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3335 SCSI conrollers, the channel can range from 0-29.
3336 </li>
3337 <li>
3338 "NetworkAdapter": a network adapter. The array item in aVboxValues[] will specify the hardware
3339 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3340 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3341 </li>
3342 <li>
3343 "USBController": a USB controller. There can be at most one such item. If and only if such an
3344 item ispresent, USB support will be enabled for the new virtual machine.
3345 </li>
3346 <li>
3347 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3348 present, sound support will be enabled for the new virtual machine. Note that the virtual
3349 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3350 may be different from the virtual soundcard expected by the appliance.
3351 </li>
3352 </ul>
3353
3354 </desc>
3355
3356 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3357 <desc></desc>
3358 </param>
3359
3360 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3361 <desc></desc>
3362 </param>
3363
3364 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3365 <desc></desc>
3366 </param>
3367
3368 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3369 <desc></desc>
3370 </param>
3371
3372 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3373 <desc></desc>
3374 </param>
3375
3376 </method>
3377
3378 <method name="getDescriptionByType">
3379 <desc>This is the same as <link to="getDescription" /> except that you can specify which types
3380 should be returned.</desc>
3381
3382 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3383 <desc></desc>
3384 </param>
3385
3386 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3387 <desc></desc>
3388 </param>
3389
3390 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3391 <desc></desc>
3392 </param>
3393
3394 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3395 <desc></desc>
3396 </param>
3397
3398 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3399 <desc></desc>
3400 </param>
3401
3402 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3403 <desc></desc>
3404 </param>
3405
3406 </method>
3407
3408 <method name="setFinalValues">
3409 <desc>
3410 This method allows the appliance's user to change the configuration for the virtual
3411 system descriptions. For each array item returned from <link to="getDescription" />,
3412 you must pass in one boolean value and one configuration value.
3413
3414 Each item in the boolean array determines whether the particular configuration item
3415 should be enabled.
3416 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3417 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3418 and SoundCard.
3419
3420 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3421 as returned in the aVboxValues and aExtraConfigValues arrays from getDescription(),
3422 the configuration remains unchanged. Please see the documentation for getDescription()
3423 for valid configuration values for the individual array item types. If the
3424 corresponding item in the aEnabled array is false, the configuration value is ignored.
3425 </desc>
3426
3427 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3428 <desc></desc>
3429 </param>
3430
3431 <param name="aVboxValues" type="wstring" dir="in" safearray="yes">
3432 <desc></desc>
3433 </param>
3434
3435 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3436 <desc></desc>
3437 </param>
3438 </method>
3439 </interface>
3440
3441
3442 <!--
3443 // IMachine
3444 /////////////////////////////////////////////////////////////////////////
3445 -->
3446
3447 <interface
3448 name="IInternalMachineControl" extends="$unknown"
3449 uuid="2c88b969-7a74-4ef3-b95f-8a209a1535f3"
3450 internal="yes"
3451 wsmap="suppress"
3452 >
3453 <method name="updateState">
3454 <desc>
3455 Updates the VM state.
3456 <note>
3457 This operation will also update the settings file with
3458 the correct information about the saved state file
3459 and delete this file from disk when appropriate.
3460 </note>
3461 </desc>
3462 <param name="state" type="MachineState" dir="in"/>
3463 </method>
3464
3465 <method name="getIPCId">
3466 <param name="id" type="wstring" dir="return"/>
3467 </method>
3468
3469 <method name="runUSBDeviceFilters">
3470 <desc>
3471 Asks the server to run USB devices filters of the associated
3472 machine against the given USB device and tell if there is
3473 a match.
3474 <note>
3475 Intended to be used only for remote USB devices. Local
3476 ones don't require to call this method (this is done
3477 implicitly by the Host and USBProxyService).
3478 </note>
3479 </desc>
3480 <param name="device" type="IUSBDevice" dir="in"/>
3481 <param name="matched" type="boolean" dir="out"/>
3482 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3483 </method>
3484
3485 <method name="captureUSBDevice">
3486 <desc>
3487 Requests a capture of the given host USB device.
3488 When the request is completed, the VM process will
3489 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3490 notification.
3491 </desc>
3492 <param name="id" type="uuid" dir="in"/>
3493 </method>
3494
3495 <method name="detachUSBDevice">
3496 <desc>
3497 Notification that a VM is going to detach (done = false) or has
3498 already detached (done = true) the given USB device.
3499 When the done = true request is completed, the VM process will
3500 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3501 notification.
3502 <note>
3503 In the done = true case, the server must run its own filters
3504 and filters of all VMs but this one on the detached device
3505 as if it were just attached to the host computer.
3506 </note>
3507 </desc>
3508 <param name="id" type="uuid" dir="in"/>
3509 <param name="done" type="boolean" dir="in"/>
3510 </method>
3511
3512 <method name="autoCaptureUSBDevices">
3513 <desc>
3514 Requests a capture all matching USB devices attached to the host.
3515 When the request is completed, the VM process will
3516 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3517 notification per every captured device.
3518 </desc>
3519 </method>
3520
3521 <method name="detachAllUSBDevices">
3522 <desc>
3523 Notification that a VM that is being powered down. The done
3524 parameter indicates whether which stage of the power down
3525 we're at. When done = false the VM is announcing its
3526 intentions, while when done = true the VM is reporting
3527 what it has done.
3528 <note>
3529 In the done = true case, the server must run its own filters
3530 and filters of all VMs but this one on all detach devices as
3531 if they were just attached to the host computer.
3532 </note>
3533 </desc>
3534 <param name="done" type="boolean" dir="in"/>
3535 </method>
3536
3537 <method name="onSessionEnd">
3538 <desc>
3539 Triggered by the given session object when the session is about
3540 to close normally.
3541 </desc>
3542 <param name="session" type="ISession" dir="in">
3543 <desc>Session that is being closed</desc>
3544 </param>
3545 <param name="progress" type="IProgress" dir="return">
3546 <desc>
3547 Used to wait until the corresponding machine is actually
3548 dissociated from the given session on the server.
3549 Returned only when this session is a direct one.
3550 </desc>
3551 </param>
3552 </method>
3553
3554 <method name="beginSavingState">
3555 <desc>
3556 Called by the VM process to inform the server it wants to
3557 save the current state and stop the VM execution.
3558 </desc>
3559 <param name="progress" type="IProgress" dir="in">
3560 <desc>
3561 Progress object created by the VM process to wait until
3562 the state is saved.
3563 </desc>
3564 </param>
3565 <param name="stateFilePath" type="wstring" dir="out">
3566 <desc>
3567 File path the VM process must save the execution state to.
3568 </desc>
3569 </param>
3570 </method>
3571
3572 <method name="endSavingState">
3573 <desc>
3574 Called by the VM process to inform the server that saving
3575 the state previously requested by #beginSavingState is either
3576 successfully finished or there was a failure.
3577
3578 <result name="VBOX_E_FILE_ERROR">
3579 Settings file not accessible.
3580 </result>
3581 <result name="VBOX_E_XML_ERROR">
3582 Could not parse the settings file.
3583 </result>
3584
3585 </desc>
3586
3587 <param name="success" type="boolean" dir="in">
3588 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3589 otherwise.
3590 </desc>
3591 </param>
3592 </method>
3593
3594 <method name="adoptSavedState">
3595 <desc>
3596 Gets called by IConsole::adoptSavedState.
3597 <result name="VBOX_E_FILE_ERROR">
3598 Invalid saved state file path.
3599 </result>
3600 </desc>
3601 <param name="savedStateFile" type="wstring" dir="in">
3602 <desc>Path to the saved state file to adopt.</desc>
3603 </param>
3604 </method>
3605
3606 <method name="beginTakingSnapshot">
3607 <desc>
3608 Called by the VM process to inform the server it wants to
3609 take a snapshot.
3610
3611 <result name="VBOX_E_FILE_ERROR">
3612 Settings file not accessible.
3613 </result>
3614 <result name="VBOX_E_XML_ERROR">
3615 Could not parse the settings file.
3616 </result>
3617 </desc>
3618 <param name="initiator" type="IConsole" dir="in">
3619 <desc>The console object that initiated this call.</desc>
3620 </param>
3621 <param name="name" type="wstring" dir="in">
3622 <desc>Snapshot name.</desc>
3623 </param>
3624 <param name="description" type="wstring" dir="in">
3625 <desc>Snapshot description.</desc>
3626 </param>
3627 <param name="progress" type="IProgress" dir="in">
3628 <desc>
3629 Progress object created by the VM process to wait until
3630 the state is saved (only for online snapshots).
3631 </desc>
3632 </param>
3633 <param name="stateFilePath" type="wstring" dir="out">
3634 <desc>
3635 File path the VM process must save the execution state to.
3636 </desc>
3637 </param>
3638 <param name="serverProgress" type="IProgress" dir="out">
3639 <desc>
3640 Progress object created by the server process to wait until
3641 the snapshot is taken (VDI diff creation, etc.).
3642 </desc>
3643 </param>
3644 </method>
3645
3646 <method name="endTakingSnapshot">
3647 <desc>
3648 Called by the VM process to inform the server that the snapshot
3649 previously requested by #beginTakingSnapshot is either
3650 successfully taken or there was a failure.
3651 </desc>
3652
3653 <param name="success" type="boolean" dir="in">
3654 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3655 </param>
3656 </method>
3657
3658 <method name="discardSnapshot">
3659 <desc>
3660 Gets called by IConsole::discardSnapshot.
3661 <result name="VBOX_E_INVALID_OBJECT_STATE">
3662 Snapshot has more than one child snapshot.
3663 </result>
3664 </desc>
3665 <param name="initiator" type="IConsole" dir="in">
3666 <desc>The console object that initiated this call.</desc>
3667 </param>
3668 <param name="id" type="uuid" dir="in">
3669 <desc>UUID of the snapshot to discard.</desc>
3670 </param>
3671 <param name="machineState" type="MachineState" dir="out">
3672 <desc>New machine state after this operation is started.</desc>
3673 </param>
3674 <param name="progress" type="IProgress" dir="return">
3675 <desc>Progress object to track the operation completion.</desc>
3676 </param>
3677 </method>
3678
3679 <method name="discardCurrentState">
3680 <desc>
3681 Gets called by IConsole::discardCurrentState.
3682 <result name="VBOX_E_INVALID_OBJECT_STATE">
3683 Virtual machine does not have any snapshot.
3684 </result>
3685 </desc>
3686 <param name="initiator" type="IConsole" dir="in">
3687 <desc>The console object that initiated this call.</desc>
3688 </param>
3689 <param name="machineState" type="MachineState" dir="out">
3690 <desc>New machine state after this operation is started.</desc>
3691 </param>
3692 <param name="progress" type="IProgress" dir="return">
3693 <desc>Progress object to track the operation completion.</desc>
3694 </param>
3695 </method>
3696
3697 <method name="discardCurrentSnapshotAndState">
3698 <desc>
3699 Gets called by IConsole::discardCurrentSnapshotAndState.
3700 <result name="VBOX_E_INVALID_OBJECT_STATE">
3701 Virtual machine does not have any snapshot.
3702 </result>
3703 </desc>
3704 <param name="initiator" type="IConsole" dir="in">
3705 <desc>The console object that initiated this call.</desc>
3706 </param>
3707 <param name="machineState" type="MachineState" dir="out">
3708 <desc>New machine state after this operation is started.</desc>
3709 </param>
3710 <param name="progress" type="IProgress" dir="return">
3711 <desc>Progress object to track the operation completion.</desc>
3712 </param>
3713 </method>
3714
3715 <method name="pullGuestProperties">
3716 <desc>
3717 Get the list of the guest properties matching a set of patterns along
3718 with their values, time stamps and flags and give responsibility for
3719 managing properties to the console.
3720 </desc>
3721 <param name="name" type="wstring" dir="out" safearray="yes">
3722 <desc>
3723 The names of the properties returned.
3724 </desc>
3725 </param>
3726 <param name="value" type="wstring" dir="out" safearray="yes">
3727 <desc>
3728 The values of the properties returned. The array entries match the
3729 corresponding entries in the @a name array.
3730 </desc>
3731 </param>
3732 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3733 <desc>
3734 The time stamps of the properties returned. The array entries match
3735 the corresponding entries in the @a name array.
3736 </desc>
3737 </param>
3738 <param name="flags" type="wstring" dir="out" safearray="yes">
3739 <desc>
3740 The flags of the properties returned. The array entries match the
3741 corresponding entries in the @a name array.
3742 </desc>
3743 </param>
3744 </method>
3745
3746 <method name="pushGuestProperties">
3747 <desc>
3748 Set the list of the guest properties matching a set of patterns along
3749 with their values, time stamps and flags and return responsibility for
3750 managing properties to IMachine.
3751 </desc>
3752 <param name="name" type="wstring" dir="in" safearray="yes">
3753 <desc>
3754 The names of the properties.
3755 </desc>
3756 </param>
3757 <param name="value" type="wstring" dir="in" safearray="yes">
3758 <desc>
3759 The values of the properties. The array entries match the
3760 corresponding entries in the @a name array.
3761 </desc>
3762 </param>
3763 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3764 <desc>
3765 The time stamps of the properties. The array entries match
3766 the corresponding entries in the @a name array.
3767 </desc>
3768 </param>
3769 <param name="flags" type="wstring" dir="in" safearray="yes">
3770 <desc>
3771 The flags of the properties. The array entries match the
3772 corresponding entries in the @a name array.
3773 </desc>
3774 </param>
3775 </method>
3776 <method name="pushGuestProperty">
3777 <desc>
3778 Update a single guest property in IMachine.
3779 </desc>
3780 <param name="name" type="wstring" dir="in">
3781 <desc>
3782 The name of the property to be updated.
3783 </desc>
3784 </param>
3785 <param name="value" type="wstring" dir="in">
3786 <desc>
3787 The value of the property.
3788 </desc>
3789 </param>
3790 <param name="timestamp" type="unsigned long long" dir="in">
3791 <desc>
3792 The timestamp of the property.
3793 </desc>
3794 </param>
3795 <param name="flags" type="wstring" dir="in">
3796 <desc>
3797 The flags of the property.
3798 </desc>
3799 </param>
3800 </method>
3801
3802 <method name="lockMedia">
3803 <desc>
3804 Locks all media attached to the machine for writing and parents of
3805 attahced different hard disks (if any) for reading. This operation is
3806 atomic so that if it fails no media is actually locked.
3807
3808 This method is intended to be called when the machine is in Starting or
3809 Restoring state. The locked media will be automatically unlocked when
3810 the machine is powered off or crashed.
3811 </desc>
3812 </method>
3813 </interface>
3814
3815 <interface
3816 name="IBIOSSettings" extends="$unknown"
3817 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3818 wsmap="managed"
3819 >
3820 <desc>
3821 The IBIOSSettings interface represents BIOS settings of the virtual
3822 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3823 </desc>
3824 <attribute name="logoFadeIn" type="boolean">
3825 <desc>Fade in flag for BIOS logo animation.</desc>
3826 </attribute>
3827
3828 <attribute name="logoFadeOut" type="boolean">
3829 <desc>Fade out flag for BIOS logo animation.</desc>
3830 </attribute>
3831
3832 <attribute name="logoDisplayTime" type="unsigned long">
3833 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3834 </attribute>
3835
3836 <attribute name="logoImagePath" type="wstring">
3837 <desc>Local file system path for external BIOS image.</desc>
3838 </attribute>
3839
3840 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3841 <desc>Mode of the BIOS boot device menu.</desc>
3842 </attribute>
3843
3844 <attribute name="ACPIEnabled" type="boolean">
3845 <desc>ACPI support flag.</desc>
3846 </attribute>
3847
3848 <attribute name="IOAPICEnabled" type="boolean">
3849 <desc>
3850 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3851 and support IRQs above 15.
3852 </desc>
3853 </attribute>
3854
3855 <attribute name="timeOffset" type="long long">
3856 <desc>
3857 Offset in milliseconds from the host system time. This allows for
3858 guests running with a different system date/time than the host.
3859 It is equivalent to setting the system date/time in the BIOS except
3860 it is not an absolute value but a relative one. Guest Additions
3861 time synchronization honors this offset.
3862 </desc>
3863 </attribute>
3864
3865 <attribute name="PXEDebugEnabled" type="boolean">
3866 <desc>
3867 PXE debug logging flag. If set, VirtualBox will write extensive
3868 PXE trace information to the release log.
3869 </desc>
3870 </attribute>
3871
3872 </interface>
3873
3874 <interface
3875 name="IMachine" extends="$unknown"
3876 uuid="dcf6a64c-1466-4b5a-b822-9db04133dc74"
3877 wsmap="managed"
3878 >
3879 <desc>
3880 The IMachine interface represents a virtual machine, or guest, created
3881 in VirtualBox.
3882
3883 This interface is used in two contexts. First of all, a collection of
3884 objects implementing this interface is stored in the
3885 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3886 machines that are currently registered with this VirtualBox
3887 installation. Also, once a session has been opened for the given virtual
3888 machine (e.g. the virtual machine is running), the machine object
3889 associated with the open session can be queried from the session object;
3890 see <link to="ISession"/> for details.
3891
3892 The main role of this interface is to expose the settings of the virtual
3893 machine and provide methods to change various aspects of the virtual
3894 machine's configuration. For machine objects stored in the
3895 <link to="IVirtualBox::machines"/> collection, all attributes are
3896 read-only unless explicitly stated otherwise in individual attribute
3897 and method descriptions. In order to change a machine setting, a session
3898 for this machine must be opened using one of
3899 <link to="IVirtualBox::openSession"/>,
3900 <link to="IVirtualBox::openRemoteSession"/> or
3901 <link to="IVirtualBox::openExistingSession"/> methods. After the
3902 session has been successfully opened, a mutable machine object needs to
3903 be queried from the session object and then the desired settings changes
3904 can be applied to the returned object using IMachine attributes and
3905 methods. See the ISession interface description for more information
3906 about sessions.
3907
3908 Note that the IMachine interface does not provide methods to control
3909 virtual machine execution (such as start the machine, or power it
3910 down) -- these methods are grouped in a separate IConsole
3911 interface. Refer to the IConsole interface description to get more
3912 information about this topic.
3913
3914 <see>ISession, IConsole</see>
3915 </desc>
3916
3917 <attribute name="parent" type="IVirtualBox" readonly="yes">
3918 <desc>Associated parent object.</desc>
3919 </attribute>
3920
3921 <attribute name="accessible" type="boolean" readonly="yes">
3922 <desc>
3923 Whether this virtual machine is currently accessible or not.
3924
3925 The machine is considered to be inaccessible when:
3926 <ul>
3927 <li>It is a registered virtual machine, and
3928 </li>
3929 <li>Its settings file is inaccessible (for example, it is
3930 located on a network share that is not accessible during
3931 VirtualBox startup, or becomes inaccessible later, or if
3932 the settings file can be read but is invalid).
3933 </li>
3934 </ul>
3935
3936 Otherwise, the value of this property is always <tt>true</tt>.
3937
3938 Every time this property is read, the accessibility state of
3939 this machine is re-evaluated. If the returned value is |false|,
3940 the <link to="#accessError"/> property may be used to get the
3941 detailed error information describing the reason of
3942 inaccessibility.
3943
3944 When the machine is inaccessible, only the following properties
3945 can be used on it:
3946 <ul>
3947 <li><link to="#parent"/></li>
3948 <li><link to="#id"/></li>
3949 <li><link to="#settingsFilePath"/></li>
3950 <li><link to="#accessible"/></li>
3951 <li><link to="#accessError"/></li>
3952 </ul>
3953
3954 An attempt to access any other property or method will return
3955 an error.
3956
3957 The only possible action you can perform on an inaccessible
3958 machine is to unregister it using the
3959 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3960 for the accessibility state once more by querying this
3961 property).
3962
3963 <note>
3964 In the current implementation, once this property returns
3965 <tt>true</tt>, the machine will never become inaccessible
3966 later, even if its settings file cannot be successfully
3967 read/written any more (at least, until the VirtualBox
3968 server is restarted). This limitation may be removed in
3969 future releases.
3970 </note>
3971 </desc>
3972 </attribute>
3973
3974 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3975 <desc>
3976 Error information describing the reason of machine
3977 inaccessibility.
3978
3979 Reading this property is only valid after the last call to
3980 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3981 machine is currently unaccessible). Otherwise, a null
3982 IVirtualBoxErrorInfo object will be returned.
3983 </desc>
3984 </attribute>
3985
3986 <attribute name="name" type="wstring">
3987 <desc>
3988 Name of the virtual machine.
3989
3990 Besides being used for human-readable identification purposes
3991 everywhere in VirtualBox, the virtual machine name is also used
3992 as a name of the machine's settings file and as a name of the
3993 subdirectory this settings file resides in. Thus, every time you
3994 change the value of this property, the settings file will be
3995 renamed once you call <link to="#saveSettings"/> to confirm the
3996 change. The containing subdirectory will be also renamed, but
3997 only if it has exactly the same name as the settings file
3998 itself prior to changing this property (for backward compatibility
3999 with previous API releases). The above implies the following
4000 limitations:
4001 <ul>
4002 <li>The machine name cannot be empty.</li>
4003 <li>The machine name can contain only characters that are valid
4004 file name characters according to the rules of the file
4005 system used to store VirtualBox configuration.</li>
4006 <li>You cannot have two or more machines with the same name
4007 if they use the same subdirectory for storing the machine
4008 settings files.</li>
4009 <li>You cannot change the name of the machine if it is running,
4010 or if any file in the directory containing the settings file
4011 is being used by another running machine or by any other
4012 process in the host operating system at a time when
4013 <link to="#saveSettings"/> is called.
4014 </li>
4015 </ul>
4016 If any of the above limitations are hit, <link to="#saveSettings"/>
4017 will return an appropriate error message explaining the exact
4018 reason and the changes you made to this machine will not be
4019 saved.
4020 <note>
4021 For "legacy" machines created using the
4022 <link to="IVirtualBox::createLegacyMachine"/> call,
4023 the above naming limitations do not apply because the
4024 machine name does not affect the settings file name.
4025 The settings file name remains the same as it was specified
4026 during machine creation and never changes.
4027 </note>
4028 </desc>
4029 </attribute>
4030
4031 <attribute name="description" type="wstring">
4032 <desc>
4033 Description of the virtual machine.
4034
4035 The description attribute can contain any text and is
4036 typically used to describe the hardware and software
4037 configuration of the virtual machine in detail (i.e. network
4038 settings, versions of the installed software and so on).
4039 </desc>
4040 </attribute>
4041
4042 <attribute name="id" type="uuid" readonly="yes">
4043 <desc>UUID of the virtual machine.</desc>
4044 </attribute>
4045
4046 <attribute name="OSTypeId" type="wstring">
4047 <desc>
4048 User-defined identifier of the Guest OS type.
4049 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4050 an IGuestOSType object representing details about the given
4051 Guest OS type.
4052 <note>
4053 This value may differ from the value returned by
4054 <link to="IGuest::OSTypeId"/> if Guest Additions are
4055 installed to the guest OS.
4056 </note>
4057 </desc>
4058 </attribute>
4059
4060 <attribute name="HardwareVersion" type="wstring">
4061 <desc>Hardware version identifier. Internal use only for now.</desc>
4062 </attribute>
4063
4064 <attribute name="CPUCount" type="unsigned long">
4065 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
4066 </attribute>
4067
4068 <attribute name="memorySize" type="unsigned long">
4069 <desc>System memory size in megabytes.</desc>
4070 </attribute>
4071
4072 <attribute name="memoryBalloonSize" type="unsigned long">
4073 <desc>Initial memory balloon size in megabytes.</desc>
4074 </attribute>
4075
4076 <attribute name="statisticsUpdateInterval" type="unsigned long">
4077 <desc>Initial interval to update guest statistics in seconds.</desc>
4078 </attribute>
4079
4080 <attribute name="VRAMSize" type="unsigned long">
4081 <desc>Video memory size in megabytes.</desc>
4082 </attribute>
4083
4084 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4085 <desc>
4086 This setting determines whether VirtualBox allows guests to make use
4087 of the 3D graphics support available on the host. Currently limited
4088 to OpenGL only. </desc>
4089 </attribute>
4090
4091 <attribute name="monitorCount" type="unsigned long">
4092 <desc>
4093 Number of virtual monitors.
4094 <note>
4095 Only effective on Windows XP and later guests with
4096 Guest Additions installed.
4097 </note>
4098 </desc>
4099 </attribute>
4100
4101 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4102 <desc>Object containing all BIOS settings.</desc>
4103 </attribute>
4104
4105 <attribute name="HWVirtExEnabled" type="TSBool">
4106 <desc>
4107 This setting determines whether VirtualBox will try to make use of
4108 the host CPU's hardware virtualization extensions such as Intel VT-x
4109 and AMD-V. Note that in case such extensions are not available,
4110 they will not be used.
4111 </desc>
4112 </attribute>
4113
4114 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4115 <desc>
4116 This setting determines whether VirtualBox will try to make use of
4117 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4118 such extensions are not available, they will not be used.
4119 </desc>
4120 </attribute>
4121
4122 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4123 <desc>
4124 This setting determines whether VirtualBox will try to make use of
4125 the VPID extension of Intel VT-x. Note that in case such extensions are
4126 not available, they will not be used.
4127 </desc>
4128 </attribute>
4129
4130 <attribute name="PAEEnabled" type="boolean" default="false">
4131 <desc>
4132 This setting determines whether VirtualBox will expose the Physical Address
4133 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4134 is not available, it will not be reported.
4135 </desc>
4136 </attribute>
4137
4138 <attribute name="snapshotFolder" type="wstring">
4139 <desc>
4140 Full path to the directory used to store snapshot data
4141 (differencing hard disks and saved state files) of this machine.
4142
4143 The initial value of this property is
4144 <tt>&lt;</tt><link to="#settingsFilePath">
4145 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4146 <link to="#id">machine_uuid</link>
4147 <tt>&gt;</tt>.
4148
4149 Currently, it is an error to try to change this property on
4150 a machine that has snapshots (because this would require to
4151 move possibly large files to a different location).
4152 A separate method will be available for this purpose later.
4153
4154 <note>
4155 Setting this property to <tt>null</tt> will restore the
4156 initial value.
4157 </note>
4158 <note>
4159 When setting this property, the specified path can be
4160 absolute (full path) or relative to the directory where the
4161 <link to="#settingsFilePath">machine settings file</link>
4162 is located. When reading this property, a full path is
4163 always returned.
4164 </note>
4165 <note>
4166 The specified path may not exist, it will be created
4167 when necessary.
4168 </note>
4169 </desc>
4170 </attribute>
4171
4172 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4173 <desc>VRDP server object.</desc>
4174 </attribute>
4175
4176 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4177 <desc>Array of hard disks attached to this machine.</desc>
4178 </attribute>
4179
4180 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4181 <desc>Associated DVD drive object.</desc>
4182 </attribute>
4183
4184 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4185 <desc>Associated floppy drive object.</desc>
4186 </attribute>
4187
4188 <attribute name="USBController" type="IUSBController" readonly="yes">
4189 <desc>
4190 Associated USB controller object.
4191
4192 <note>
4193 This method may set a @ref com_warnings "warning result code".
4194 </note>
4195 <note>
4196 If USB functionality is not available in the given edition of
4197 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4198 </note>
4199 </desc>
4200 </attribute>
4201
4202 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4203 <desc>Associated audio adapter, always present.</desc>
4204 </attribute>
4205
4206 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4207 <desc>Array of storage controllers attached to this machine.</desc>
4208 </attribute>
4209
4210 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4211 <desc>
4212 Full name of the file containing machine settings data.
4213 </desc>
4214 </attribute>
4215
4216 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
4217 <desc>
4218 Current version of the format of the settings file of this machine
4219 (<link to="#settingsFilePath"/>).
4220
4221 The version string has the following format:
4222 <pre>
4223 x.y-platform
4224 </pre>
4225 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
4226 versions, and <tt>platform</tt> is the platform identifier.
4227
4228 The current version usually matches the value of the
4229 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
4230 settings file was created by an older version of VirtualBox and there
4231 was a change of the settings file format since then.
4232
4233 Note that VirtualBox automatically converts settings files from older
4234 versions to the most recent version when reading them (usually at
4235 VirtualBox startup) but it doesn't save the changes back until
4236 you call a method that implicitly saves settings (such as
4237 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
4238 explicitly. Therefore, if the value of this attribute differs from the
4239 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
4240 means that the settings file was converted but the result of the
4241 conversion is not yet saved to disk.
4242
4243 The above feature may be used by interactive front-ends to inform users
4244 about the settings file format change and offer them to explicitly save
4245 all converted settings files (the global and VM-specific ones),
4246 optionally create backup copies of the old settings files before saving,
4247 etc.
4248
4249 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
4250 </desc>
4251 </attribute>
4252
4253 <attribute name="settingsModified" type="boolean" readonly="yes">
4254 <desc>
4255 Whether the settings of this machine have been modified
4256 (but neither yet saved nor discarded).
4257 <note>
4258 Reading this property is only valid on instances returned
4259 by <link to="ISession::machine"/> and on new machines
4260 created by <link to="IVirtualBox::createMachine"/> or opened
4261 by <link to="IVirtualBox::openMachine"/> but not
4262 yet registered, or on unregistered machines after calling
4263 <link to="IVirtualBox::unregisterMachine"/>. For all other
4264 cases, the settings can never be modified.
4265 </note>
4266 <note>
4267 For newly created unregistered machines, the value of this
4268 property is always TRUE until <link to="#saveSettings"/>
4269 is called (no matter if any machine settings have been
4270 changed after the creation or not). For opened machines
4271 the value is set to FALSE (and then follows to normal rules).
4272 </note>
4273 </desc>
4274 </attribute>
4275
4276 <attribute name="sessionState" type="SessionState" readonly="yes">
4277 <desc>Current session state for this machine.</desc>
4278 </attribute>
4279
4280 <attribute name="sessionType" type="wstring" readonly="yes">
4281 <desc>
4282 Type of the session. If <link to="#sessionState"/> is
4283 SessionSpawning or SessionOpen, this attribute contains the
4284 same value as passed to the
4285 <link to="IVirtualBox::openRemoteSession"/> method in the
4286 @a type parameter. If the session was opened directly using
4287 <link to="IVirtualBox::openSession"/>, or if
4288 <link to="#sessionState"/> is SessionClosed, the value of this
4289 attribute is @c null.
4290 </desc>
4291 </attribute>
4292
4293 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4294 <desc>
4295 Identifier of the session process. This attribute contains the
4296 platform-dependent identifier of the process that has opened a
4297 direct session for this machine using the
4298 <link to="IVirtualBox::openSession"/> call. The returned value
4299 is only valid if <link to="#sessionState"/> is SessionOpen or
4300 SessionClosing (i.e. a session is currently open or being
4301 closed) by the time this property is read.
4302 </desc>
4303 </attribute>
4304
4305 <attribute name="state" type="MachineState" readonly="yes">
4306 <desc>Current execution state of this machine.</desc>
4307 </attribute>
4308
4309 <attribute name="lastStateChange" type="long long" readonly="yes">
4310 <desc>
4311 Time stamp of the last execution state change,
4312 in milliseconds since 1970-01-01 UTC.
4313 </desc>
4314 </attribute>
4315
4316 <attribute name="stateFilePath" type="wstring" readonly="yes">
4317 <desc>
4318 Full path to the file that stores the execution state of
4319 the machine when it is in the <link to="MachineState_Saved"/> state.
4320 <note>
4321 When the machine is not in the Saved state, this attribute
4322 <tt>null</tt>.
4323 </note>
4324 </desc>
4325 </attribute>
4326
4327 <attribute name="logFolder" type="wstring" readonly="yes">
4328 <desc>
4329 Full path to the folder that stores a set of rotated log files
4330 recorded during machine execution. The most recent log file is
4331 named <tt>VBox.log</tt>, the previous log file is
4332 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4333 in the current version).
4334 </desc>
4335 </attribute>
4336
4337 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4338 <desc>
4339 Current snapshot of this machine.
4340 <note>
4341 A <tt>null</tt> object is returned if the machine doesn't
4342 have snapshots.
4343 </note>
4344 <see><link to="ISnapshot"/></see>
4345 </desc>
4346 </attribute>
4347
4348 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4349 <desc>
4350 Number of snapshots taken on this machine. Zero means the
4351 machine doesn't have any snapshots.
4352 </desc>
4353 </attribute>
4354
4355 <attribute name="currentStateModified" type="boolean" readonly="yes">
4356 <desc>
4357 Returns <tt>true</tt> if the current state of the machine is not
4358 identical to the state stored in the current snapshot.
4359
4360 The current state is identical to the current snapshot right
4361 after one of the following calls are made:
4362 <ul>
4363 <li><link to="IConsole::discardCurrentState"/> or
4364 <link to="IConsole::discardCurrentSnapshotAndState"/>
4365 </li>
4366 <li><link to="IConsole::takeSnapshot"/> (issued on a
4367 powered off or saved machine, for which
4368 <link to="#settingsModified"/> returns <tt>false</tt>)
4369 </li>
4370 <li><link to="IMachine::setCurrentSnapshot"/>
4371 </li>
4372 </ul>
4373
4374 The current state remains identical until one of the following
4375 happens:
4376 <ul>
4377 <li>settings of the machine are changed</li>
4378 <li>the saved state is discarded</li>
4379 <li>the current snapshot is discarded</li>
4380 <li>an attempt to execute the machine is made</li>
4381 </ul>
4382
4383 <note>
4384 For machines that don't have snapshots, this property is
4385 always <tt>false</tt>.
4386 </note>
4387 </desc>
4388 </attribute>
4389
4390 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4391 <desc>
4392 Collection of shared folders for this machine (permanent shared
4393 folders). These folders are shared automatically at machine startup
4394 and available only to the guest OS installed within this machine.
4395
4396 New shared folders are added to the collection using
4397 <link to="#createSharedFolder"/>. Existing shared folders can be
4398 removed using <link to="#removeSharedFolder"/>.
4399 </desc>
4400 </attribute>
4401
4402 <attribute name="clipboardMode" type="ClipboardMode">
4403 <desc>
4404 Synchronization mode between the host OS clipboard
4405 and the guest OS clipboard.
4406 </desc>
4407 </attribute>
4408
4409 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4410 <desc>
4411 A comma-separated list of simple glob patterns. Changes to guest
4412 properties whose name matches one of the patterns will generate an
4413 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4414 </desc>
4415 </attribute>
4416
4417 <method name="setBootOrder">
4418 <desc>
4419 Puts the given device to the specified position in
4420 the boot order.
4421
4422 To indicate that no device is associated with the given position,
4423 <link to="DeviceType_Null"/> should be used.
4424
4425 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4426
4427 <result name="E_INVALIDARG">
4428 Boot @a position out of range.
4429 </result>
4430 <result name="E_NOTIMPL">
4431 Booting from USB @a device currently not supported.
4432 </result>
4433
4434 </desc>
4435 <param name="position" type="unsigned long" dir="in">
4436 <desc>
4437 Position in the boot order (<tt>1</tt> to the total number of
4438 devices the machine can boot from, as returned by
4439 <link to="ISystemProperties::maxBootPosition"/>).
4440 </desc>
4441 </param>
4442 <param name="device" type="DeviceType" dir="in">
4443 <desc>
4444 The type of the device used to boot at the given position.
4445 </desc>
4446 </param>
4447 </method>
4448
4449 <method name="getBootOrder" const="yes">
4450 <desc>
4451 Returns the device type that occupies the specified
4452 position in the boot order.
4453
4454 @todo [remove?]
4455 If the machine can have more than one device of the returned type
4456 (such as hard disks), then a separate method should be used to
4457 retrieve the individual device that occupies the given position.
4458
4459 If here are no devices at the given position, then
4460 <link to="DeviceType_Null"/> is returned.
4461
4462 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4463
4464 <result name="E_INVALIDARG">
4465 Boot @a position out of range.
4466 </result>
4467
4468 </desc>
4469 <param name="position" type="unsigned long" dir="in">
4470 <desc>
4471 Position in the boot order (<tt>1</tt> to the total number of
4472 devices the machine can boot from, as returned by
4473 <link to="ISystemProperties::maxBootPosition"/>).
4474 </desc>
4475 </param>
4476 <param name="device" type="DeviceType" dir="return">
4477 <desc>
4478 Device at the given position.
4479 </desc>
4480 </param>
4481 </method>
4482
4483 <method name="attachHardDisk">
4484 <desc>
4485 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4486 by the given UUID @a id) to the given hard disk controller
4487 (<link to="IStorageController" />, identified by @a name),
4488 at the indicated port and device.
4489
4490 For the IDE bus, the @a controllerPort parameter can be either
4491 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4492 respectively. For the primary controller of the IDE bus,
4493 @a device can be either @c 0 or @c 1, to specify the master or the
4494 slave device, respectively. For the secondary IDE controller, the
4495 device number must be @c 1 because VirtualBox reserves the
4496 secondary master for the CD-ROM drive.
4497
4498 For an SATA controller, @a controllerPort must be a number ranging
4499 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4500 be a number ranging from @c 0 to @c 15.
4501
4502 For both SCSI and SATA, the @a device parameter is unused and must
4503 be @c 0.
4504
4505 The specified device slot must not have another disk attached to it, or
4506 this method will fail.
4507
4508 See <link to="IHardDisk"/> for more detailed information about
4509 attaching hard disks.
4510
4511 <note>
4512 You cannot attach a hard disk to a running machine. Also, you cannot
4513 attach a hard disk to a newly created machine until this machine's
4514 settings are saved to disk using <link to="#saveSettings"/>.
4515 </note>
4516 <note>
4517 If the hard disk is being attached indirectly, a new differencing hard
4518 disk will implicitly be created for it and attached instead. If the
4519 changes made to the machine settings (including this indirect
4520 attachment) are later cancelled using <link to="#discardSettings"/>,
4521 this implicitly created differencing hard disk will implicitly
4522 be deleted.
4523 </note>
4524
4525 <result name="E_INVALIDARG">
4526 SATA device, SATA port, IDE port or IDE slot out of range.
4527 </result>
4528 <result name="VBOX_E_INVALID_OBJECT_STATE">
4529 Attempt to attach hard disk to an unregistered virtual machine.
4530 </result>
4531 <result name="VBOX_E_INVALID_VM_STATE">
4532 Invalid machine state.
4533 </result>
4534 <result name="VBOX_E_OBJECT_IN_USE">
4535 Hard disk already attached to this or another virtual machine.
4536 </result>
4537
4538 </desc>
4539 <param name="id" type="uuid" dir="in">
4540 <desc>UUID of the hard disk to attach.</desc>
4541 </param>
4542 <param name="name" type="wstring" dir="in">
4543 <desc>Name of the storage controller to attach the hard disk to.</desc>
4544 </param>
4545 <param name="controllerPort" type="long" dir="in">
4546 <desc>Port to attach the hard disk to.</desc>
4547 </param>
4548 <param name="device" type="long" dir="in">
4549 <desc>
4550 Device slot in the given port to attach the hard disk to.
4551 </desc>
4552 </param>
4553 </method>
4554
4555 <method name="getHardDisk" const="yes">
4556 <desc>
4557 Returns the virtual hard disk attached to a device slot of the specified
4558 bus.
4559
4560 Note that if the hard disk was indirectly attached by
4561 <link to="#attachHardDisk"/> to the given device slot then this
4562 method will return not the same object as passed to the
4563 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4564 more detailed information about attaching hard disks.
4565
4566 <result name="VBOX_E_OBJECT_NOT_FOUND">
4567 No hard disk attached to given slot/bus.
4568 </result>
4569
4570 </desc>
4571 <param name="name" type="wstring" dir="in">
4572 <desc>Name of the storage controller the hard disk is attached to.</desc>
4573 </param>
4574 <param name="controllerPort" type="long" dir="in">
4575 <desc>Port to query.</desc>
4576 </param>
4577 <param name="device" type="long" dir="in">
4578 <desc>Device slot in the given port to query.</desc>
4579 </param>
4580 <param name="hardDisk" type="IHardDisk" dir="return">
4581 <desc>Attached hard disk object.</desc>
4582 </param>
4583 </method>
4584
4585 <method name="detachHardDisk">
4586 <desc>
4587 Detaches the virtual hard disk attached to a device slot of the
4588 specified bus.
4589
4590 Detaching the hard disk from the virtual machine is deferred. This means
4591 that the hard disk remains associated with the machine when this method
4592 returns and gets actually de-associated only after a successful
4593 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4594 for more detailed information about attaching hard disks.
4595
4596 <note>
4597 You cannot detach the hard disk from a running machine.
4598 </note>
4599 <note>
4600 Detaching differencing hard disks implicitly created by <link
4601 to="#attachHardDisk"/> for the indirect attachment using this
4602 method will <b>not</b> implicitly delete them. The
4603 <link to="IHardDisk::deleteStorage"/> operation should be
4604 explicitly performed by the caller after the hard disk is successfully
4605 detached and the settings are saved with
4606 <link to="#saveSettings"/>, if it is the desired action.
4607 </note>
4608
4609 <result name="VBOX_E_INVALID_VM_STATE">
4610 Attempt to detach hard disk from a running virtual machine.
4611 </result>
4612 <result name="VBOX_E_OBJECT_NOT_FOUND">
4613 No hard disk attached to given slot/bus.
4614 </result>
4615 <result name="VBOX_E_NOT_SUPPORTED">
4616 Hard disk format does not support storage deletion.
4617 </result>
4618
4619 </desc>
4620 <param name="name" type="wstring" dir="in">
4621 <desc>name of the storage controller to detach the hard disk from.</desc>
4622 </param>
4623 <param name="controllerPort" type="long" dir="in">
4624 <desc>Port number to detach the hard disk from.</desc>
4625 </param>
4626 <param name="device" type="long" dir="in">
4627 <desc>Device slot number to detach the hard disk from.</desc>
4628 </param>
4629 </method>
4630
4631 <method name="getHardDiskAttachmentsOfController" const="yes">
4632 <desc>
4633 Returns an array of hard disk attachments which are attached to the
4634 the controller with the given name.
4635
4636 <result name="VBOX_E_OBJECT_NOT_FOUND">
4637 A storage controller with given name doesn't exist.
4638 </result>
4639 </desc>
4640 <param name="name" type="wstring" dir="in"/>
4641 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4642 </method>
4643
4644 <method name="getNetworkAdapter" const="yes">
4645 <desc>
4646 Returns the network adapter associated with the given slot.
4647 Slots are numbered sequentially, starting with zero. The total
4648 number of adapters per machine is defined by the
4649 <link to="ISystemProperties::networkAdapterCount"/> property,
4650 so the maximum slot number is one less than that property's value.
4651
4652 <result name="E_INVALIDARG">
4653 Invalid @a slot number.
4654 </result>
4655
4656 </desc>
4657 <param name="slot" type="unsigned long" dir="in"/>
4658 <param name="adapter" type="INetworkAdapter" dir="return"/>
4659 </method>
4660
4661 <method name="addStorageController">
4662 <desc>
4663 Adds a new storage controller (SCSI or SATA controller) to the
4664 machine and returns it as an instance of
4665 <link to="IStorageController" />.
4666
4667 @a name identifies the controller with subsequent calls such as
4668 <link to="#getStorageControllerByName" /> or
4669 <link to="#removeStorageController" /> or
4670 <link to="#attachHardDisk" />.
4671
4672 After the controller has been added, you can set its exact
4673 type by setting the <link to="IStorageController::controllerType" />.
4674
4675 <result name="VBOX_E_OBJECT_IN_USE">
4676 A storage controller with given name exists already.
4677 </result>
4678 <result name="E_INVALIDARG">
4679 Invalid @a controllerType.
4680 </result>
4681 </desc>
4682 <param name="name" type="wstring" dir="in"/>
4683 <param name="connectionType" type="StorageBus" dir="in"/>
4684 <param name="controller" type="IStorageController" dir="return"/>
4685 </method>
4686
4687 <method name="getStorageControllerByName" const="yes">
4688 <desc>
4689 Returns a storage controller with the given name.
4690
4691 <result name="VBOX_E_OBJECT_NOT_FOUND">
4692 A storage controller with given name doesn't exist.
4693 </result>
4694 </desc>
4695 <param name="name" type="wstring" dir="in"/>
4696 <param name="storageController" type="IStorageController" dir="return"/>
4697 </method>
4698
4699 <method name="removeStorageController">
4700 <desc>
4701 Removes a storage controller from the machine.
4702
4703 <result name="VBOX_E_OBJECT_NOT_FOUND">
4704 A storage controller with given name doesn't exist.
4705 </result>
4706 </desc>
4707 <param name="name" type="wstring" dir="in"/>
4708 </method>
4709
4710 <method name="getSerialPort" const="yes">
4711 <desc>
4712 Returns the serial port associated with the given slot.
4713 Slots are numbered sequentially, starting with zero. The total
4714 number of serial ports per machine is defined by the
4715 <link to="ISystemProperties::serialPortCount"/> property,
4716 so the maximum slot number is one less than that property's value.
4717
4718 <result name="E_INVALIDARG">
4719 Invalid @a slot number.
4720 </result>
4721
4722 </desc>
4723 <param name="slot" type="unsigned long" dir="in"/>
4724 <param name="port" type="ISerialPort" dir="return"/>
4725 </method>
4726
4727 <method name="getParallelPort" const="yes">
4728 <desc>
4729 Returns the parallel port associated with the given slot.
4730 Slots are numbered sequentially, starting with zero. The total
4731 number of parallel ports per machine is defined by the
4732 <link to="ISystemProperties::parallelPortCount"/> property,
4733 so the maximum slot number is one less than that property's value.
4734
4735 <result name="E_INVALIDARG">
4736 Invalid @a slot number.
4737 </result>
4738
4739 </desc>
4740 <param name="slot" type="unsigned long" dir="in"/>
4741 <param name="port" type="IParallelPort" dir="return"/>
4742 </method>
4743
4744 <method name="getNextExtraDataKey">
4745 <desc>
4746 Returns the machine-specific extra data key name following the
4747 supplied key.
4748
4749 An error is returned if the supplied @a key does not exist. @c NULL is
4750 returned in @a nextKey if the supplied key is the last key. When
4751 supplying @c NULL for the @a key, the first key item is returned in
4752 @a nextKey (if there is any). @a nextValue is an optional parameter and
4753 if supplied, the next key's value is returned in it.
4754
4755 <result name="VBOX_E_OBJECT_NOT_FOUND">
4756 Extra data @a key not found.
4757 </result>
4758
4759 </desc>
4760 <param name="key" type="wstring" dir="in">
4761 <desc>Name of the data key to follow.</desc>
4762 </param>
4763 <param name="nextKey" type="wstring" dir="out">
4764 <desc>Name of the next data key.</desc>
4765 </param>
4766 <param name="nextValue" type="wstring" dir="out">
4767 <desc>Value of the next data key.</desc>
4768 </param>
4769 </method>
4770
4771 <method name="getExtraData">
4772 <desc>
4773 Returns associated machine-specific extra data.
4774
4775 If the requested data @a key does not exist, this function will
4776 succeed and return @c NULL in the @a value argument.
4777
4778 <result name="VBOX_E_FILE_ERROR">
4779 Settings file not accessible.
4780 </result>
4781 <result name="VBOX_E_XML_ERROR">
4782 Could not parse the settings file.
4783 </result>
4784
4785 </desc>
4786 <param name="key" type="wstring" dir="in">
4787 <desc>Name of the data key to get.</desc>
4788 </param>
4789 <param name="value" type="wstring" dir="return">
4790 <desc>Value of the requested data key.</desc>
4791 </param>
4792 </method>
4793
4794 <method name="setExtraData">
4795 <desc>
4796 Sets associated machine-specific extra data.
4797
4798 If you pass @c NULL as a key @a value, the given @a key will be
4799 deleted.
4800
4801 <note>
4802 Before performing the actual data change, this method will ask all
4803 registered callbacks using the
4804 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4805 notification for a permission. If one of the callbacks refuses the
4806 new value, the change will not be performed.
4807 </note>
4808 <note>
4809 On success, the
4810 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4811 is called to inform all registered callbacks about a successful data
4812 change.
4813 </note>
4814 <note>
4815 This method can be called outside the machine session and therefore
4816 it's a caller's responsibility to handle possible race conditions
4817 when several clients change the same key at the same time.
4818 </note>
4819
4820 <result name="VBOX_E_FILE_ERROR">
4821 Settings file not accessible.
4822 </result>
4823 <result name="VBOX_E_XML_ERROR">
4824 Could not parse the settings file.
4825 </result>
4826
4827 </desc>
4828 <param name="key" type="wstring" dir="in">
4829 <desc>Name of the data key to set.</desc>
4830 </param>
4831 <param name="value" type="wstring" dir="in">
4832 <desc>Value to assign to the key.</desc>
4833 </param>
4834 </method>
4835
4836 <method name="saveSettings">
4837 <desc>
4838 Saves any changes to machine settings made since the session
4839 has been opened or a new machine has been created, or since the
4840 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4841 For registered machines, new settings become visible to all
4842 other VirtualBox clients after successful invocation of this
4843 method.
4844 <note>
4845 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4846 notification event after the configuration has been successfully
4847 saved (only for registered machines).
4848 </note>
4849 <note>
4850 Calling this method is only valid on instances returned
4851 by <link to="ISession::machine"/> and on new machines
4852 created by <link to="IVirtualBox::createMachine"/> but not
4853 yet registered, or on unregistered machines after calling
4854 <link to="IVirtualBox::unregisterMachine"/>.
4855 </note>
4856
4857 <result name="VBOX_E_FILE_ERROR">
4858 Settings file not accessible.
4859 </result>
4860 <result name="VBOX_E_XML_ERROR">
4861 Could not parse the settings file.
4862 </result>
4863 <result name="E_ACCESSDENIED">
4864 Modification request refused.
4865 </result>
4866
4867 </desc>
4868 </method>
4869
4870 <method name="saveSettingsWithBackup">
4871 <desc>
4872 Creates a backup copy of the machine settings file (<link
4873 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4874 <link to="#saveSettings"/>.
4875
4876 Note that the backup copy is created <b>only</b> if the settings file
4877 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4878 details). Otherwise, this call is fully equivalent to
4879 <link to="#saveSettings"/> and no backup copying is done.
4880
4881 The backup copy is created in the same directory where the original
4882 settings file is located. It is given the following file name:
4883 <pre>
4884 original.xml.x.y-platform.bak
4885 </pre>
4886 where <tt>original.xml</tt> is the original settings file name
4887 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4888 format of the settings file (before auto-conversion).
4889
4890 If the given backup file already exists, this method will try to add the
4891 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4892 0 to 9) and copy it again until it succeeds. If all suffixes are
4893 occupied, or if any other copy error occurs, this method will return a
4894 failure.
4895
4896 If the copy operation succeeds, the @a bakFileName return argument will
4897 receive a full path to the created backup file (for informational
4898 purposes). Note that this will happen even if the subsequent
4899 <link to="#saveSettings"/> call performed by this method after the
4900 copy operation, fails.
4901
4902 <note>
4903 The VirtualBox API never calls this method. It is intended purely for
4904 the purposes of creating backup copies of the settings files by
4905 front-ends before saving the results of the automatically performed
4906 settings conversion to disk.
4907 </note>
4908
4909 <see>settingsFileVersion</see>
4910
4911 <result name="VBOX_E_FILE_ERROR">
4912 Settings file not accessible.
4913 </result>
4914 <result name="VBOX_E_XML_ERROR">
4915 Could not parse the settings file.
4916 </result>
4917 <result name="VBOX_E_INVALID_VM_STATE">
4918 Virtual machine is not mutable.
4919 </result>
4920 <result name="E_ACCESSDENIED">
4921 Modification request refused.
4922 </result>
4923
4924 </desc>
4925 <param name="bakFileName" type="wstring" dir="return">
4926 <desc>Full path to the created backup copy.</desc>
4927 </param>
4928 </method>
4929
4930 <method name="discardSettings">
4931 <desc>
4932 Discards any changes to the machine settings made since the session
4933 has been opened or since the last call to <link to="#saveSettings"/>
4934 or <link to="#discardSettings"/>.
4935 <note>
4936 Calling this method is only valid on instances returned
4937 by <link to="ISession::machine"/> and on new machines
4938 created by <link to="IVirtualBox::createMachine"/> or
4939 opened by <link to="IVirtualBox::openMachine"/> but not
4940 yet registered, or on unregistered machines after calling
4941 <link to="IVirtualBox::unregisterMachine"/>.
4942 </note>
4943
4944 <result name="VBOX_E_INVALID_VM_STATE">
4945 Virtual machine is not mutable.
4946 </result>
4947
4948 </desc>
4949 </method>
4950
4951 <method name="deleteSettings">
4952 <desc>
4953 Deletes the settings file of this machine from disk.
4954 The machine must not be registered in order for this operation
4955 to succeed.
4956 <note>
4957 <link to="#settingsModified"/> will return TRUE after this
4958 method successfully returns.
4959 </note>
4960 <note>
4961 Calling this method is only valid on instances returned
4962 by <link to="ISession::machine"/> and on new machines
4963 created by <link to="IVirtualBox::createMachine"/> or
4964 opened by <link to="IVirtualBox::openMachine"/> but not
4965 yet registered, or on unregistered machines after calling
4966 <link to="IVirtualBox::unregisterMachine"/>.
4967 </note>
4968 <note>
4969 The deleted machine settings file can be restored (saved again)
4970 by calling <link to="#saveSettings"/>.
4971 </note>
4972
4973 <result name="VBOX_E_INVALID_VM_STATE">
4974 Cannot delete settings of a registered machine or
4975 machine not mutable.
4976 </result>
4977 <result name="VBOX_E_IPRT_ERROR">
4978 Could not delete the settings file.
4979 </result>
4980
4981 </desc>
4982 </method>
4983
4984 <method name="export">
4985 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
4986 steps required to export VirtualBox machines to OVF.
4987 </desc>
4988
4989 <param name="appliance" type="IAppliance" dir="in">
4990 <desc>Appliance to export this machine to.</desc>
4991 </param>
4992 </method >
4993
4994 <method name="getSnapshot">
4995 <desc>
4996 Returns a snapshot of this machine with the given UUID.
4997 A <tt>null</tt> UUID can be used to obtain the first snapshot
4998 taken on this machine. This is useful if you want to traverse
4999 the whole tree of snapshots starting from the root.
5000
5001 <result name="VBOX_E_OBJECT_NOT_FOUND">
5002 Virtual machine has no snapshots or snapshot not found.
5003 </result>
5004
5005 </desc>
5006 <param name="id" type="uuid" dir="in">
5007 <desc>UUID of the snapshot to get</desc>
5008 </param>
5009 <param name="snapshot" type="ISnapshot" dir="return">
5010 <desc>Snapshot object with the given UUID.</desc>
5011 </param>
5012 </method>
5013
5014 <method name="findSnapshot">
5015 <desc>
5016 Returns a snapshot of this machine with the given name.
5017
5018 <result name="VBOX_E_OBJECT_NOT_FOUND">
5019 Virtual machine has no snapshots or snapshot not found.
5020 </result>
5021
5022 </desc>
5023 <param name="name" type="wstring" dir="in">
5024 <desc>Name of the snapshot to find</desc>
5025 </param>
5026 <param name="snapshot" type="ISnapshot" dir="return">
5027 <desc>Snapshot object with the given name.</desc>
5028 </param>
5029 </method>
5030
5031 <method name="setCurrentSnapshot">
5032 <desc>
5033 Sets the current snapshot of this machine.
5034 <note>
5035 In the current implementation, this operation is not
5036 implemented.
5037 </note>
5038 </desc>
5039 <param name="id" type="uuid" dir="in">
5040 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5041 </param>
5042 </method>
5043
5044 <method name="createSharedFolder">
5045 <desc>
5046 Creates a new permanent shared folder by associating the given logical
5047 name with the given host path, adds it to the collection of shared
5048 folders and starts sharing it. Refer to the description of
5049 <link to="ISharedFolder"/> to read more about logical names.
5050
5051 <result name="VBOX_E_OBJECT_IN_USE">
5052 Shared folder already exists.
5053 </result>
5054 <result name="VBOX_E_FILE_ERROR">
5055 Shared folder @a hostPath not accessible.
5056 </result>
5057
5058 </desc>
5059 <param name="name" type="wstring" dir="in">
5060 <desc>Unique logical name of the shared folder.</desc>
5061 </param>
5062 <param name="hostPath" type="wstring" dir="in">
5063 <desc>Full path to the shared folder in the host file system.</desc>
5064 </param>
5065 <param name="writable" type="boolean" dir="in">
5066 <desc>Whether the share is writable or readonly</desc>
5067 </param>
5068 </method>
5069
5070 <method name="removeSharedFolder">
5071 <desc>
5072 Removes the permanent shared folder with the given name previously
5073 created by <link to="#createSharedFolder"/> from the collection of
5074 shared folders and stops sharing it.
5075
5076 <result name="VBOX_E_INVALID_VM_STATE">
5077 Virtual machine is not mutable.
5078 </result>
5079 <result name="VBOX_E_OBJECT_NOT_FOUND">
5080 Shared folder @a name does not exist.
5081 </result>
5082
5083 </desc>
5084 <param name="name" type="wstring" dir="in">
5085 <desc>Logical name of the shared folder to remove.</desc>
5086 </param>
5087 </method>
5088
5089 <method name="canShowConsoleWindow">
5090 <desc>
5091 Returns @c true if the VM console process can activate the
5092 console window and bring it to foreground on the desktop of
5093 the host PC.
5094 <note>
5095 This method will fail if a session for this machine is not
5096 currently open.
5097 </note>
5098
5099 <result name="VBOX_E_INVALID_VM_STATE">
5100 Machine session is not open.
5101 </result>
5102
5103 </desc>
5104 <param name="canShow" type="boolean" dir="return">
5105 <desc>
5106 @c true if the console window can be shown and @c
5107 false otherwise.
5108 </desc>
5109 </param>
5110 </method>
5111
5112 <method name="showConsoleWindow">
5113 <desc>
5114 Activates the console window and brings it to foreground on
5115 the desktop of the host PC. Many modern window managers on
5116 many platforms implement some sort of focus stealing
5117 prevention logic, so that it may be impossible to activate
5118 a window without the help of the currently active
5119 application. In this case, this method will return a non-zero
5120 identifier that represents the top-level window of the VM
5121 console process. The caller, if it represents a currently
5122 active process, is responsible to use this identifier (in a
5123 platform-dependent manner) to perform actual window
5124 activation.
5125 <note>
5126 This method will fail if a session for this machine is not
5127 currently open.
5128 </note>
5129
5130 <result name="VBOX_E_INVALID_VM_STATE">
5131 Machine session is not open.
5132 </result>
5133
5134 </desc>
5135 <param name="winId" type="unsigned long long" dir="return">
5136 <desc>
5137 Platform-dependent identifier of the top-level VM console
5138 window, or zero if this method has performed all actions
5139 necessary to implement the <i>show window</i> semantics for
5140 the given platform and/or VirtualBox front-end.
5141 </desc>
5142 </param>
5143 </method>
5144
5145 <method name="getGuestProperty">
5146 <desc>
5147 Reads an entry from the machine's guest property store.
5148
5149 <result name="VBOX_E_INVALID_VM_STATE">
5150 Machine session is not open.
5151 </result>
5152
5153 </desc>
5154 <param name="name" type="wstring" dir="in">
5155 <desc>
5156 The name of the property to read.
5157 </desc>
5158 </param>
5159 <param name="value" type="wstring" dir="out">
5160 <desc>
5161 The value of the property. If the property does not exist then this
5162 will be empty.
5163 </desc>
5164 </param>
5165 <param name="timestamp" type="unsigned long long" dir="out">
5166 <desc>
5167 The time at which the property was last modified, as seen by the
5168 server process.
5169 </desc>
5170 </param>
5171 <param name="flags" type="wstring" dir="out">
5172 <desc>
5173 Additional property parameters, passed as a comma-separated list of
5174 "name=value" type entries.
5175 </desc>
5176 </param>
5177 </method>
5178
5179 <method name="getGuestPropertyValue">
5180 <desc>
5181 Reads a value from the machine's guest property store.
5182
5183 <result name="VBOX_E_INVALID_VM_STATE">
5184 Machine session is not open.
5185 </result>
5186
5187 </desc>
5188 <param name="property" type="wstring" dir="in">
5189 <desc>
5190 The name of the property to read.
5191 </desc>
5192 </param>
5193 <param name="value" type="wstring" dir="return">
5194 <desc>
5195 The value of the property. If the property does not exist then this
5196 will be empty.
5197 </desc>
5198 </param>
5199 </method>
5200
5201 <method name="getGuestPropertyTimestamp">
5202 <desc>
5203 Reads a property timestamp from the machine's guest property store.
5204
5205 <result name="VBOX_E_INVALID_VM_STATE">
5206 Machine session is not open.
5207 </result>
5208
5209 </desc>
5210 <param name="property" type="wstring" dir="in">
5211 <desc>
5212 The name of the property to read.
5213 </desc>
5214 </param>
5215 <param name="value" type="unsigned long long" dir="return">
5216 <desc>
5217 The timestamp. If the property does not exist then this will be
5218 empty.
5219 </desc>
5220 </param>
5221 </method>
5222
5223 <method name="setGuestProperty">
5224 <desc>
5225 Sets, changes or deletes an entry in the machine's guest property
5226 store.
5227
5228 <result name="E_ACCESSDENIED">
5229 Property cannot be changed.
5230 </result>
5231 <result name="E_INVALIDARG">
5232 Invalid @a flags.
5233 </result>
5234 <result name="VBOX_E_INVALID_VM_STATE">
5235 Virtual machine is not mutable or session not open.
5236 </result>
5237 <result name="VBOX_E_INVALID_OBJECT_STATE">
5238 Cannot set transient property when machine not running.
5239 </result>
5240
5241 </desc>
5242 <param name="property" type="wstring" dir="in">
5243 <desc>
5244 The name of the property to set, change or delete.
5245 </desc>
5246 </param>
5247 <param name="value" type="wstring" dir="in">
5248 <desc>
5249 The new value of the property to set, change or delete. If the
5250 property does not yet exist and value is non-empty, it will be
5251 created. If the value is empty, the key will be deleted if it
5252 exists.
5253 </desc>
5254 </param>
5255 <param name="flags" type="wstring" dir="in">
5256 <desc>
5257 Additional property parameters, passed as a comma-separated list of
5258 "name=value" type entries.
5259 </desc>
5260 </param>
5261 </method>
5262
5263 <method name="setGuestPropertyValue">
5264 <desc>
5265 Sets, changes or deletes a value in the machine's guest property
5266 store. The flags field will be left unchanged or created empty for a
5267 new property.
5268
5269 <result name="E_ACCESSDENIED">
5270 Property cannot be changed.
5271 </result>
5272 <result name="VBOX_E_INVALID_VM_STATE">
5273 Virtual machine is not mutable or session not open.
5274 </result>
5275 <result name="VBOX_E_INVALID_OBJECT_STATE">
5276 Cannot set transient property when machine not running.
5277 </result>
5278 </desc>
5279
5280 <param name="property" type="wstring" dir="in">
5281 <desc>
5282 The name of the property to set, change or delete.
5283 </desc>
5284 </param>
5285 <param name="value" type="wstring" dir="in">
5286 <desc>
5287 The new value of the property to set, change or delete. If the
5288 property does not yet exist and value is non-empty, it will be
5289 created. If value is empty, the property will be deleted if it
5290 exists.
5291 </desc>
5292 </param>
5293 </method>
5294
5295 <method name="enumerateGuestProperties">
5296 <desc>
5297 Return a list of the guest properties matching a set of patterns along
5298 with their values, time stamps and flags.
5299 </desc>
5300 <param name="patterns" type="wstring" dir="in">
5301 <desc>
5302 The patterns to match the properties against, separated by '|'
5303 characters. If this is empty or NULL, all properties will match.
5304 </desc>
5305 </param>
5306 <param name="name" type="wstring" dir="out" safearray="yes">
5307 <desc>
5308 The names of the properties returned.
5309 </desc>
5310 </param>
5311 <param name="value" type="wstring" dir="out" safearray="yes">
5312 <desc>
5313 The values of the properties returned. The array entries match the
5314 corresponding entries in the @a name array.
5315 </desc>
5316 </param>
5317 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5318 <desc>
5319 The time stamps of the properties returned. The array entries match
5320 the corresponding entries in the @a name array.
5321 </desc>
5322 </param>
5323 <param name="flags" type="wstring" dir="out" safearray="yes">
5324 <desc>
5325 The flags of the properties returned. The array entries match the
5326 corresponding entries in the @a name array.
5327 </desc>
5328 </param>
5329 </method>
5330</interface>
5331
5332 <!--
5333 // IConsole
5334 /////////////////////////////////////////////////////////////////////////
5335 -->
5336
5337 <interface
5338 name="IConsoleCallback" extends="$unknown"
5339 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5340 wsmap="suppress"
5341 >
5342
5343 <method name="onMousePointerShapeChange">
5344 <desc>
5345 Notification when the guest mouse pointer shape has
5346 changed. The new shape data is given.
5347 </desc>
5348 <param name="visible" type="boolean" dir="in">
5349 <desc>
5350 Flag whether the pointer is visible.
5351 </desc>
5352 </param>
5353 <param name="alpha" type="boolean" dir="in">
5354 <desc>
5355 Flag whether the pointer has an alpha channel.
5356 </desc>
5357 </param>
5358 <param name="xHot" type="unsigned long" dir="in">
5359 <desc>
5360 The pointer hot spot x coordinate.
5361 </desc>
5362 </param>
5363 <param name="yHot" type="unsigned long" dir="in">
5364 <desc>
5365 The pointer hot spot y coordinate.
5366 </desc>
5367 </param>
5368 <param name="width" type="unsigned long" dir="in">
5369 <desc>
5370 Width of the pointer shape in pixels.
5371 </desc>
5372 </param>
5373 <param name="height" type="unsigned long" dir="in">
5374 <desc>
5375 Height of the pointer shape in pixels.
5376 </desc>
5377 </param>
5378 <param name="shape" type="octet" mod="ptr" dir="in">
5379 <desc>
5380 Address of the shape buffer.
5381
5382 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5383 followed by a 32-bpp XOR (color) mask.
5384
5385 For pointers without alpha channel the XOR mask pixels are 32
5386 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5387 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5388
5389 An AND mask is used for pointers with alpha channel, so if the
5390 callback does not support alpha, the pointer could be
5391 displayed as a normal color pointer.
5392
5393 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5394 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5395 height</tt>. The padding bits at the end of each scanline are
5396 undefined.
5397
5398 The XOR mask follows the AND mask on the next 4-byte aligned
5399 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5400 Bytes in the gap between the AND and the XOR mask are undefined.
5401 The XOR mask scanlines have no gap between them and the size of
5402 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5403
5404 <note>
5405 If @a shape is 0, only the pointer visibility is changed.
5406 </note>
5407 </desc>
5408 </param>
5409 </method>
5410
5411 <method name="onMouseCapabilityChange">
5412 <desc>
5413 Notification when the mouse capabilities reported by the
5414 guest have changed. The new capabilities are passed.
5415 </desc>
5416 <param name="supportsAbsolute" type="boolean" dir="in"/>
5417 <param name="needsHostCursor" type="boolean" dir="in"/>
5418 </method>
5419
5420 <method name="onKeyboardLedsChange">
5421 <desc>
5422 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5423 to alter the state of the keyboard LEDs.
5424 </desc>
5425 <param name="numLock" type="boolean" dir="in"/>
5426 <param name="capsLock" type="boolean" dir="in"/>
5427 <param name="scrollLock" type="boolean" dir="in"/>
5428 </method>
5429
5430 <method name="onStateChange">
5431 <desc>
5432 Notification when the execution state of the machine has changed.
5433 The new state will be given.
5434 </desc>
5435 <param name="state" type="MachineState" dir="in"/>
5436 </method>
5437
5438 <method name="onAdditionsStateChange">
5439 <desc>
5440 Notification when a Guest Additions property changes.
5441 Interested callees should query IGuest attributes to
5442 find out what has changed.
5443 </desc>
5444 </method>
5445
5446 <method name="onDVDDriveChange">
5447 <desc>
5448 Notification when a property of the
5449 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5450 Interested callees should use IDVDDrive methods to find out what has
5451 changed.
5452 </desc>
5453 </method>
5454
5455 <method name="onFloppyDriveChange">
5456 <desc>
5457 Notification when a property of the
5458 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5459 Interested callees should use IFloppyDrive methods to find out what
5460 has changed.
5461 </desc>
5462 </method>
5463
5464 <method name="onNetworkAdapterChange">
5465 <desc>
5466 Notification when a property of one of the
5467 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5468 changes. Interested callees should use INetworkAdapter methods and
5469 attributes to find out what has changed.
5470 </desc>
5471 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5472 <desc>Network adapter that is subject to change.</desc>
5473 </param>
5474 </method>
5475
5476 <method name="onSerialPortChange">
5477 <desc>
5478 Notification when a property of one of the
5479 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5480 Interested callees should use ISerialPort methods and attributes
5481 to find out what has changed.
5482 </desc>
5483 <param name="serialPort" type="ISerialPort" dir="in">
5484 <desc>Serial port that is subject to change.</desc>
5485 </param>
5486 </method>
5487
5488 <method name="onParallelPortChange">
5489 <desc>
5490 Notification when a property of one of the
5491 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5492 changes. Interested callees should use ISerialPort methods and
5493 attributes to find out what has changed.
5494 </desc>
5495 <param name="parallelPort" type="IParallelPort" dir="in">
5496 <desc>Parallel port that is subject to change.</desc>
5497 </param>
5498 </method>
5499
5500 <method name="onStorageControllerChange">
5501 <desc>
5502 Notification when a property of one of the
5503 virtual <link to="IMachine::getStorageControllers">storage controllers</link>
5504 changes. Interested callees should use query the corresponding collections
5505 to find out what has changed.
5506 </desc>
5507 </method>
5508
5509 <method name="onVRDPServerChange">
5510 <desc>
5511 Notification when a property of the
5512 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5513 Interested callees should use IVRDPServer methods and attributes to
5514 find out what has changed.
5515 </desc>
5516 </method>
5517
5518 <method name="onUSBControllerChange">
5519 <desc>
5520 Notification when a property of the virtual
5521 <link to="IMachine::USBController">USB controller</link> changes.
5522 Interested callees should use IUSBController methods and attributes to
5523 find out what has changed.
5524 </desc>
5525 </method>
5526
5527 <method name="onUSBDeviceStateChange">
5528 <desc>
5529 Notification when a USB device is attached to or detached from
5530 the virtual USB controller.
5531
5532 This notification is sent as a result of the indirect
5533 request to attach the device because it matches one of the
5534 machine USB filters, or as a result of the direct request
5535 issued by <link to="IConsole::attachUSBDevice"/> or
5536 <link to="IConsole::detachUSBDevice"/>.
5537
5538 This notification is sent in case of both a succeeded and a
5539 failed request completion. When the request succeeds, the
5540 @a error parameter is @c null, and the given device has been
5541 already added to (when @a attached is @c true) or removed from
5542 (when @a attached is @c false) the collection represented by
5543 <link to="IConsole::USBDevices"/>. On failure, the collection
5544 doesn't change and the @a error parameter represents the error
5545 message describing the failure.
5546
5547 </desc>
5548 <param name="device" type="IUSBDevice" dir="in">
5549 <desc>Device that is subject to state change.</desc>
5550 </param>
5551 <param name="attached" type="boolean" dir="in">
5552 <desc>
5553 <tt>true</tt> if the device was attached
5554 and <tt>false</tt> otherwise.
5555 </desc>
5556 </param>
5557 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5558 <desc>
5559 <tt>null</tt> on success or an error message object on
5560 failure.
5561 </desc>
5562 </param>
5563 </method>
5564
5565 <method name="onSharedFolderChange">
5566 <desc>
5567 Notification when a shared folder is added or removed.
5568 The @a scope argument defines one of three scopes:
5569 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5570 (<link to="Scope_Global">Global</link>),
5571 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5572 the machine (<link to="Scope_Machine">Machine</link>) or <link
5573 to="IConsole::sharedFolders">transient shared folders</link> of the
5574 machine (<link to="Scope_Session">Session</link>). Interested callees
5575 should use query the corresponding collections to find out what has
5576 changed.
5577 </desc>
5578 <param name="scope" type="Scope" dir="in">
5579 <desc>Scope of the notification.</desc>
5580 </param>
5581 </method>
5582
5583 <method name="onRuntimeError">
5584 <desc>
5585 Notification when an error happens during the virtual
5586 machine execution.
5587
5588 There are three kinds of runtime errors:
5589 <ul>
5590 <li><i>fatal</i></li>
5591 <li><i>non-fatal with retry</i></li>
5592 <li><i>non-fatal warnings</i></li>
5593 </ul>
5594
5595 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5596 to <tt>true</tt>. In case of fatal errors, the virtual machine
5597 execution is always paused before calling this notification, and
5598 the notification handler is supposed either to immediately save
5599 the virtual machine state using <link to="IConsole::saveState"/>
5600 or power it off using <link to="IConsole::powerDown"/>.
5601 Resuming the execution can lead to unpredictable results.
5602
5603 <b>Non-fatal</b> errors and warnings are indicated by the
5604 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5605 is in the Paused state by the time the error notification is
5606 received, it means that the user can <i>try to resume</i> the machine
5607 execution after attempting to solve the problem that caused the
5608 error. In this case, the notification handler is supposed
5609 to show an appropriate message to the user (depending on the
5610 value of the @a id parameter) that offers several actions such
5611 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5612 wants to retry, the notification handler should continue
5613 the machine execution using the <link to="IConsole::resume"/>
5614 call. If the machine execution is not Paused during this
5615 notification, then it means this notification is a <i>warning</i>
5616 (for example, about a fatal condition that can happen very soon);
5617 no immediate action is required from the user, the machine
5618 continues its normal execution.
5619
5620 Note that in either case the notification handler
5621 <b>must not</b> perform any action directly on a thread
5622 where this notification is called. Everything it is allowed to
5623 do is to post a message to another thread that will then talk
5624 to the user and take the corresponding action.
5625
5626 Currently, the following error identifiers are known:
5627 <ul>
5628 <li><tt>"HostMemoryLow"</tt></li>
5629 <li><tt>"HostAudioNotResponding"</tt></li>
5630 <li><tt>"VDIStorageFull"</tt></li>
5631 </ul>
5632
5633 <note>
5634 This notification is not designed to be implemented by
5635 more than one callback at a time. If you have multiple
5636 IConsoleCallback instances registered on the given
5637 IConsole object, make sure you simply do nothing but
5638 return @c S_OK from all but one of them that does actual
5639 user notification and performs necessary actions.
5640 </note>
5641
5642 </desc>
5643 <param name="fatal" type="boolean" dir="in">
5644 <desc>Whether the error is fatal or not</desc>
5645 </param>
5646 <param name="id" type="wstring" dir="in">
5647 <desc>Error identifier</desc>
5648 </param>
5649 <param name="message" type="wstring" dir="in">
5650 <desc>Optional error message</desc>
5651 </param>
5652 </method>
5653
5654 <method name="onCanShowWindow">
5655 <desc>
5656 Notification when a call to
5657 <link to="IMachine::canShowConsoleWindow"/> is made by a
5658 front-end to check if a subsequent call to
5659 <link to="IMachine::showConsoleWindow"/> can succeed.
5660
5661 The callee should give an answer appropriate to the current
5662 machine state in the @a canShow argument. This answer must
5663 remain valid at least until the next
5664 <link to="IConsole::state">machine state</link> change.
5665
5666 <note>
5667 This notification is not designed to be implemented by
5668 more than one callback at a time. If you have multiple
5669 IConsoleCallback instances registered on the given
5670 IConsole object, make sure you simply do nothing but
5671 return @c true and @c S_OK from all but one of them that
5672 actually manages console window activation.
5673 </note>
5674 </desc>
5675 <param name="canShow" type="boolean" dir="return">
5676 <desc>
5677 @c true if the console window can be shown and @c
5678 false otherwise.
5679 </desc>
5680 </param>
5681 </method>
5682
5683 <method name="onShowWindow">
5684 <desc>
5685 Notification when a call to
5686 <link to="IMachine::showConsoleWindow"/>
5687 requests the console window to be activated and brought to
5688 foreground on the desktop of the host PC.
5689
5690 This notification should cause the VM console process to
5691 perform the requested action as described above. If it is
5692 impossible to do it at a time of this notification, this
5693 method should return a failure.
5694
5695 Note that many modern window managers on many platforms
5696 implement some sort of focus stealing prevention logic, so
5697 that it may be impossible to activate a window without the
5698 help of the currently active application (which is supposedly
5699 an initiator of this notification). In this case, this method
5700 must return a non-zero identifier that represents the
5701 top-level window of the VM console process. The caller, if it
5702 represents a currently active process, is responsible to use
5703 this identifier (in a platform-dependent manner) to perform
5704 actual window activation.
5705
5706 This method must set @a winId to zero if it has performed all
5707 actions necessary to complete the request and the console
5708 window is now active and in foreground, to indicate that no
5709 further action is required on the caller's side.
5710
5711 <note>
5712 This notification is not designed to be implemented by
5713 more than one callback at a time. If you have multiple
5714 IConsoleCallback instances registered on the given
5715 IConsole object, make sure you simply do nothing but
5716 return @c S_OK from all but one of them that actually
5717 manages console window activation.
5718 </note>
5719 </desc>
5720 <param name="winId" type="unsigned long long" dir="return">
5721 <desc>
5722 Platform-dependent identifier of the top-level VM console
5723 window, or zero if this method has performed all actions
5724 necessary to implement the <i>show window</i> semantics for
5725 the given platform and/or this VirtualBox front-end.
5726 </desc>
5727 </param>
5728 </method>
5729
5730 </interface>
5731
5732 <interface
5733 name="IRemoteDisplayInfo" extends="$unknown"
5734 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5735 wsmap="struct"
5736 >
5737 <desc>
5738 Contains information about the remote display (VRDP) capabilities and status.
5739 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5740 </desc>
5741
5742 <attribute name="active" type="boolean" readonly="yes">
5743 <desc>
5744 Whether the remote display connection is active.
5745 </desc>
5746 </attribute>
5747
5748 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5749 <desc>
5750 How many times a client connected.
5751 </desc>
5752 </attribute>
5753
5754 <attribute name="beginTime" type="long long" readonly="yes">
5755 <desc>
5756 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5757 </desc>
5758 </attribute>
5759
5760 <attribute name="endTime" type="long long" readonly="yes">
5761 <desc>
5762 When the last connection was terminated or the current time, if
5763 connection is still active, in milliseconds since 1970-01-01 UTC.
5764 </desc>
5765 </attribute>
5766
5767 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5768 <desc>
5769 How many bytes were sent in last or current, if still active, connection.
5770 </desc>
5771 </attribute>
5772
5773 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5774 <desc>
5775 How many bytes were sent in all connections.
5776 </desc>
5777 </attribute>
5778
5779 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5780 <desc>
5781 How many bytes were received in last or current, if still active, connection.
5782 </desc>
5783 </attribute>
5784
5785 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5786 <desc>
5787 How many bytes were received in all connections.
5788 </desc>
5789 </attribute>
5790
5791 <attribute name="user" type="wstring" readonly="yes">
5792 <desc>
5793 Login user name supplied by the client.
5794 </desc>
5795 </attribute>
5796
5797 <attribute name="domain" type="wstring" readonly="yes">
5798 <desc>
5799 Login domain name supplied by the client.
5800 </desc>
5801 </attribute>
5802
5803 <attribute name="clientName" type="wstring" readonly="yes">
5804 <desc>
5805 The client name supplied by the client.
5806 </desc>
5807 </attribute>
5808
5809 <attribute name="clientIP" type="wstring" readonly="yes">
5810 <desc>
5811 The IP address of the client.
5812 </desc>
5813 </attribute>
5814
5815 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5816 <desc>
5817 The client software version number.
5818 </desc>
5819 </attribute>
5820
5821 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5822 <desc>
5823 Public key exchange method used when connection was established.
5824 Values: 0 - RDP4 public key exchange scheme.
5825 1 - X509 certificates were sent to client.
5826 </desc>
5827 </attribute>
5828
5829 </interface>
5830
5831 <interface
5832 name="IConsole" extends="$unknown"
5833 uuid="9511bc54-15ee-4ddf-808e-472aba03809c"
5834 wsmap="managed"
5835 >
5836 <desc>
5837 The IConsole interface represents an interface to control virtual
5838 machine execution.
5839
5840 The console object that implements the IConsole interface is obtained
5841 from a session object after the session for the given machine has been
5842 opened using one of <link to="IVirtualBox::openSession"/>,
5843 <link to="IVirtualBox::openRemoteSession"/> or
5844 <link to="IVirtualBox::openExistingSession"/> methods.
5845
5846 Methods of the IConsole interface allow the caller to query the current
5847 virtual machine execution state, pause the machine or power it down, save
5848 the machine state or take a snapshot, attach and detach removable media
5849 and so on.
5850
5851 <see>ISession</see>
5852 </desc>
5853
5854 <attribute name="machine" type="IMachine" readonly="yes">
5855 <desc>
5856 Machine object this console is sessioned with.
5857 <note>
5858 This is a convenience property, it has the same value as
5859 <link to="ISession::machine"/> of the corresponding session
5860 object.
5861 </note>
5862 </desc>
5863 </attribute>
5864
5865 <attribute name="state" type="MachineState" readonly="yes">
5866 <desc>
5867 Current execution state of the machine.
5868 <note>
5869 This property always returns the same value as the corresponding
5870 property of the IMachine object this console is sessioned with.
5871 For the process that owns (executes) the VM, this is the
5872 preferable way of querying the VM state, because no IPC
5873 calls are made.
5874 </note>
5875 </desc>
5876 </attribute>
5877
5878 <attribute name="guest" type="IGuest" readonly="yes">
5879 <desc>Guest object.</desc>
5880 </attribute>
5881
5882 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5883 <desc>
5884 Virtual keyboard object.
5885 <note>
5886 If the machine is not running, any attempt to use
5887 the returned object will result in an error.
5888 </note>
5889 </desc>
5890 </attribute>
5891
5892 <attribute name="mouse" type="IMouse" readonly="yes">
5893 <desc>
5894 Virtual mouse object.
5895 <note>
5896 If the machine is not running, any attempt to use
5897 the returned object will result in an error.
5898 </note>
5899 </desc>
5900 </attribute>
5901
5902 <attribute name="display" type="IDisplay" readonly="yes">
5903 <desc>Virtual display object.
5904 <note>
5905 If the machine is not running, any attempt to use
5906 the returned object will result in an error.
5907 </note>
5908 </desc>
5909 </attribute>
5910
5911 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5912 <desc>Debugging interface.</desc>
5913 </attribute>
5914
5915 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5916 <desc>
5917 Collection of USB devices currently attached to the virtual
5918 USB controller.
5919 <note>
5920 The collection is empty if the machine is not running.
5921 </note>
5922 </desc>
5923 </attribute>
5924
5925 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5926 <desc>
5927 List of USB devices currently attached to the remote VRDP client.
5928 Once a new device is physically attached to the remote host computer,
5929 it appears in this list and remains there until detached.
5930 </desc>
5931 </attribute>
5932
5933 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5934 <desc>
5935 Collection of shared folders for the current session. These folders
5936 are called transient shared folders because they are available to the
5937 guest OS running inside the associated virtual machine only for the
5938 duration of the session (as opposed to
5939 <link to="IMachine::sharedFolders"/> which represent permanent shared
5940 folders). When the session is closed (e.g. the machine is powered down),
5941 these folders are automatically discarded.
5942
5943 New shared folders are added to the collection using
5944 <link to="#createSharedFolder"/>. Existing shared folders can be
5945 removed using <link to="#removeSharedFolder"/>.
5946 </desc>
5947 </attribute>
5948
5949 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5950 <desc>
5951 Interface that provides information on Remote Display (VRDP) connection.
5952 </desc>
5953 </attribute>
5954
5955 <method name="powerUp">
5956 <desc>
5957 Starts the virtual machine execution using the current machine
5958 state (that is, its current execution state, current settings and
5959 current hard disks).
5960
5961 If the machine is powered off or aborted, the execution will
5962 start from the beginning (as if the real hardware were just
5963 powered on).
5964
5965 If the machine is in the <link to="MachineState_Saved"/> state,
5966 it will continue its execution the point where the state has
5967 been saved.
5968
5969 <note>
5970 Unless you are trying to write a new VirtualBox front-end that
5971 performs direct machine execution (like the VirtualBox or VBoxSDL
5972 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5973 session opened by <link to="IVirtualBox::openSession"/> and use this
5974 session only to change virtual machine settings. If you simply want to
5975 start virtual machine execution using one of the existing front-ends
5976 (for example the VirtualBox GUI or headless server), simply use
5977 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5978 power up the machine automatically for you.
5979 </note>
5980
5981 <see>#saveState</see>
5982 <result name="VBOX_E_INVALID_VM_STATE">
5983 Virtual machine already running.
5984 </result>
5985 <result name="VBOX_E_HOST_ERROR">
5986 Host interface does not exist or name not set.
5987 </result>
5988 <result name="VBOX_E_FILE_ERROR">
5989 Invalid saved state file.
5990 </result>
5991 </desc>
5992 <param name="progress" type="IProgress" dir="return">
5993 <desc>Progress object to track the operation completion.</desc>
5994 </param>
5995 </method>
5996
5997 <method name="powerUpPaused">
5998 <desc>
5999 Identical to powerUp except that the VM will enter the
6000 <link to="MachineState_Paused"/> state, instead of
6001 <link to="MachineState_Running"/>.
6002
6003 <see>#powerUp</see>
6004 <result name="VBOX_E_INVALID_VM_STATE">
6005 Virtual machine already running.
6006 </result>
6007 <result name="VBOX_E_HOST_ERROR">
6008 Host interface does not exist or name not set.
6009 </result>
6010 <result name="VBOX_E_FILE_ERROR">
6011 Invalid saved state file.
6012 </result>
6013 </desc>
6014 <param name="progress" type="IProgress" dir="return">
6015 <desc>Progress object to track the operation completion.</desc>
6016 </param>
6017 </method>
6018
6019 <method name="powerDown">
6020 <desc>
6021 Stops the virtual machine execution.
6022 After this operation completes, the machine will go to the
6023 PoweredOff state.
6024
6025 @deprecated This method will be removed in VirtualBox 2.1 where the
6026 powerDownAsync() method will take its name. Do not use this method in
6027 the code.
6028 <result name="VBOX_E_INVALID_VM_STATE">
6029 Virtual machine must be Running, Paused or Stuck to be powered down.
6030 </result>
6031 <result name="VBOX_E_VM_ERROR">
6032 Unable to power off or destroy virtual machine.
6033 </result>
6034 </desc>
6035 </method>
6036
6037 <method name="powerDownAsync">
6038 <desc>
6039 Initiates the power down procedure to stop the virtual machine
6040 execution.
6041
6042 The completion of the power down procedure is tracked using the returned
6043 IProgress object. After the operation is complete, the machine will go
6044 to the PoweredOff state.
6045
6046 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
6047 where the original powerDown() method will be removed. You will need to
6048 rename "powerDownAsync" to "powerDown" in your sources to make them
6049 build with version 2.1.
6050 <result name="VBOX_E_INVALID_VM_STATE">
6051 Virtual machine must be Running, Paused or Stuck to be powered down.
6052 </result>
6053 </desc>
6054 <param name="progress" type="IProgress" dir="return">
6055 <desc>Progress object to track the operation completion.</desc>
6056 </param>
6057 </method>
6058
6059 <method name="reset">
6060 <desc>Resets the virtual machine.
6061 <result name="VBOX_E_INVALID_VM_STATE">
6062 Virtual machine not in Running state.
6063 </result>
6064 <result name="VBOX_E_VM_ERROR">
6065 Virtual machine error in reset operation.
6066 </result>
6067 </desc>
6068 </method>
6069
6070 <method name="pause">
6071 <desc>Pauses the virtual machine execution.
6072 <result name="VBOX_E_INVALID_VM_STATE">
6073 Virtual machine not in Running state.
6074 </result>
6075 <result name="VBOX_E_VM_ERROR">
6076 Virtual machine error in suspend operation.
6077 </result>
6078 </desc>
6079 </method>
6080
6081 <method name="resume">
6082 <desc>Resumes the virtual machine execution.
6083 <result name="VBOX_E_INVALID_VM_STATE">
6084 Virtual machine not in Paused state.
6085 </result>
6086 <result name="VBOX_E_VM_ERROR">
6087 Virtual machine error in resume operation.
6088 </result>
6089 </desc>
6090 </method>
6091
6092 <method name="powerButton">
6093 <desc>Sends the ACPI power button event to the guest.
6094 <result name="VBOX_E_INVALID_VM_STATE">
6095 Virtual machine not in Running state.
6096 </result>
6097 <result name="VBOX_E_PDM_ERROR">
6098 Controlled power off failed.
6099 </result>
6100 </desc>
6101 </method>
6102
6103 <method name="sleepButton">
6104 <desc>Sends the ACPI sleep button event to the guest.
6105 <result name="VBOX_E_INVALID_VM_STATE">
6106 Virtual machine not in Running state.
6107 </result>
6108 <result name="VBOX_E_PDM_ERROR">
6109 Sending sleep button event failed.
6110 </result>
6111 </desc>
6112 </method>
6113
6114 <method name="getPowerButtonHandled">
6115 <desc>Checks if the last power button event was handled by guest.
6116 <result name="VBOX_E_PDM_ERROR">
6117 Checking if the event was handled by the guest OS failed.
6118 </result>
6119 </desc>
6120 <param name="handled" type="boolean" dir="return"/>
6121 </method>
6122
6123 <method name="getGuestEnteredACPIMode">
6124 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6125 G1 (sleeping). If this method returns false, the guest will
6126 most likely not respond to external ACPI events.
6127 <result name="VBOX_E_INVALID_VM_STATE">
6128 Virtual machine not in Running state.
6129 </result>
6130 </desc>
6131 <param name="entered" type="boolean" dir="return"/>
6132 </method>
6133
6134 <method name="saveState">
6135 <desc>
6136 Saves the current execution state of a running virtual machine
6137 and stops its execution.
6138
6139 After this operation completes, the machine will go to the
6140 Saved state. Next time it is powered up, this state will
6141 be restored and the machine will continue its execution from
6142 the place where it was saved.
6143
6144 This operation differs from taking a snapshot to the effect
6145 that it doesn't create new differencing hard disks. Also, once
6146 the machine is powered up from the state saved using this method,
6147 the saved state is deleted, so it will be impossible to return
6148 to this state later.
6149
6150 <note>
6151 On success, this method implicitly calls
6152 <link to="IMachine::saveSettings"/> to save all current machine
6153 settings (including runtime changes to the DVD drive, etc.).
6154 Together with the impossibility to change any VM settings when it is
6155 in the Saved state, this guarantees adequate hardware
6156 configuration of the machine when it is restored from the saved
6157 state file.
6158 </note>
6159
6160 <note>
6161 The machine must be in the Running or Paused state, otherwise
6162 the operation will fail.
6163 </note>
6164 <result name="VBOX_E_INVALID_VM_STATE">
6165 Virtual machine state neither Running nor Paused.
6166 </result>
6167 <result name="VBOX_E_FILE_ERROR">
6168 Failed to create directory for saved state file.
6169 </result>
6170
6171 <see><link to="#takeSnapshot"/></see>
6172 </desc>
6173 <param name="progress" type="IProgress" dir="return">
6174 <desc>Progress object to track the operation completion.</desc>
6175 </param>
6176 </method>
6177
6178 <method name="adoptSavedState">
6179 <desc>
6180 Associates the given saved state file to the virtual machine.
6181
6182 On success, the machine will go to the Saved state. Next time it is
6183 powered up, it will be restored from the adopted saved state and
6184 continue execution from the place where the saved state file was
6185 created.
6186
6187 The specified saved state file path may be absolute or relative to the
6188 folder the VM normally saves the state to (usually,
6189 <link to="IMachine::snapshotFolder"/>).
6190
6191 <note>
6192 It's a caller's responsibility to make sure the given saved state
6193 file is compatible with the settings of this virtual machine that
6194 represent its virtual hardware (memory size, hard disk configuration
6195 etc.). If there is a mismatch, the behavior of the virtual machine
6196 is undefined.
6197 </note>
6198 <result name="VBOX_E_INVALID_VM_STATE">
6199 Virtual machine state neither PoweredOff nor Aborted.
6200 </result>
6201 </desc>
6202 <param name="savedStateFile" type="wstring" dir="in">
6203 <desc>Path to the saved state file to adopt.</desc>
6204 </param>
6205 </method>
6206
6207 <method name="discardSavedState">
6208 <desc>
6209 Discards (deletes) the saved state of the virtual machine
6210 previously created by <link to="#saveState"/>. Next time the
6211 machine is powered up, a clean boot will occur.
6212 <note>
6213 This operation is equivalent to resetting or powering off
6214 the machine without doing a proper shutdown in the guest OS.
6215 </note>
6216 <result name="VBOX_E_INVALID_VM_STATE">
6217 Virtual machine not in state Saved.
6218 </result>
6219 </desc>
6220 </method>
6221
6222 <method name="getDeviceActivity">
6223 <desc>
6224 Gets the current activity type of a given device or device group.
6225 <result name="E_INVALIDARG">
6226 Invalid device type.
6227 </result>
6228 </desc>
6229 <param name="type" type="DeviceType" dir="in"/>
6230 <param name="activity" type="DeviceActivity" dir="return"/>
6231 </method>
6232
6233 <method name="attachUSBDevice">
6234 <desc>
6235 Attaches a host USB device with the given UUID to the
6236 USB controller of the virtual machine.
6237
6238 The device needs to be in one of the following states:
6239 <link to="USBDeviceState_Busy"/>,
6240 <link to="USBDeviceState_Available"/> or
6241 <link to="USBDeviceState_Held"/>,
6242 otherwise an error is immediately returned.
6243
6244 When the device state is
6245 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6246 be returned if the host computer refuses to release it for some reason.
6247
6248 <see>IUSBController::deviceFilters, USBDeviceState</see>
6249 <result name="VBOX_E_INVALID_VM_STATE">
6250 Virtual machine state neither Running nor Paused.
6251 </result>
6252 <result name="VBOX_E_PDM_ERROR">
6253 Virtual machine does not have a USB controller.
6254 </result>
6255 </desc>
6256 <param name="id" type="uuid" dir="in">
6257 <desc>UUID of the host USB device to attach.</desc>
6258 </param>
6259 </method>
6260
6261 <method name="detachUSBDevice">
6262 <desc>
6263 Detaches an USB device with the given UUID from the USB controller
6264 of the virtual machine.
6265
6266 After this method succeeds, the VirtualBox server re-initiates
6267 all USB filters as if the device were just physically attached
6268 to the host, but filters of this machine are ignored to avoid
6269 a possible automatic re-attachment.
6270
6271 <see>IUSBController::deviceFilters, USBDeviceState</see>
6272
6273 <result name="VBOX_E_PDM_ERROR">
6274 Virtual machine does not have a USB controller.
6275 </result>
6276 <result name="E_INVALIDARG">
6277 USB device not attached to this virtual machine.
6278 </result>
6279 </desc>
6280 <param name="id" type="uuid" dir="in">
6281 <desc>UUID of the USB device to detach.</desc>
6282 </param>
6283 <param name="device" type="IUSBDevice" dir="return">
6284 <desc>Detached USB device.</desc>
6285 </param>
6286 </method>
6287
6288 <method name="findUSBDeviceByAddress">
6289 <desc>
6290 Searches for a USB device with the given host address.
6291
6292 <result name="VBOX_E_OBJECT_NOT_FOUND">
6293 Given @c name does not correspond to any USB device.
6294 </result>
6295
6296 <see>IUSBDevice::address</see>
6297 </desc>
6298 <param name="name" type="wstring" dir="in">
6299 <desc>
6300 Address of the USB device (as assigned by the host) to
6301 search for.
6302 </desc>
6303 </param>
6304 <param name="device" type="IUSBDevice" dir="return">
6305 <desc>Found USB device object.</desc>
6306 </param>
6307 </method>
6308
6309 <method name="findUSBDeviceById">
6310 <desc>
6311 Searches for a USB device with the given UUID.
6312
6313 <result name="VBOX_E_OBJECT_NOT_FOUND">
6314 Given @c id does not correspond to any USB device.
6315 </result>
6316
6317 <see>IUSBDevice::id</see>
6318 </desc>
6319 <param name="id" type="uuid" dir="in">
6320 <desc>UUID of the USB device to search for.</desc>
6321 </param>
6322 <param name="device" type="IUSBDevice" dir="return">
6323 <desc>Found USB device object.</desc>
6324 </param>
6325 </method>
6326
6327 <method name="createSharedFolder">
6328 <desc>
6329 Creates a transient new shared folder by associating the given logical
6330 name with the given host path, adds it to the collection of shared
6331 folders and starts sharing it. Refer to the description of
6332 <link to="ISharedFolder"/> to read more about logical names.
6333
6334 <result name="VBOX_E_INVALID_VM_STATE">
6335 Virtual machine in Saved state or currently changing state.
6336 </result>
6337 <result name="VBOX_E_FILE_ERROR">
6338 Shared folder already exists or not accessible.
6339 </result>
6340 </desc>
6341 <param name="name" type="wstring" dir="in">
6342 <desc>Unique logical name of the shared folder.</desc>
6343 </param>
6344 <param name="hostPath" type="wstring" dir="in">
6345 <desc>Full path to the shared folder in the host file system.</desc>
6346 </param>
6347 <param name="writable" type="boolean" dir="in">
6348 <desc>Whether the share is writable or readonly</desc>
6349 </param>
6350 </method>
6351
6352 <method name="removeSharedFolder">
6353 <desc>
6354 Removes a transient shared folder with the given name previously
6355 created by <link to="#createSharedFolder"/> from the collection of
6356 shared folders and stops sharing it.
6357 <result name="VBOX_E_INVALID_VM_STATE">
6358 Virtual machine in Saved state or currently changing state.
6359 </result>
6360 <result name="VBOX_E_FILE_ERROR">
6361 Shared folder does not exists.
6362 </result>
6363 </desc>
6364 <param name="name" type="wstring" dir="in">
6365 <desc>Logical name of the shared folder to remove.</desc>
6366 </param>
6367 </method>
6368
6369 <method name="takeSnapshot">
6370 <desc>
6371 Saves the current execution state and all settings of the
6372 machine and creates differencing images for all
6373 normal (non-independent) hard disks.
6374
6375 This method can be called for a PoweredOff, Saved, Running or
6376 Paused virtual machine. When the machine is PoweredOff, an
6377 offline <link to="ISnapshot">snapshot</link> is created,
6378 in all other cases -- an online snapshot.
6379
6380 The taken snapshot is always based on the
6381 <link to="IMachine::currentSnapshot">current
6382 snapshot</link> of the associated virtual machine and becomes
6383 a new current snapshot.
6384
6385 <note>
6386 This method implicitly calls <link to="IMachine::saveSettings"/> to
6387 save all current machine settings before taking an offline snapshot.
6388 </note>
6389
6390 <see>ISnapshot, <link to="#saveState"/></see>
6391 <result name="VBOX_E_INVALID_VM_STATE">
6392 Virtual machine currently changing state.
6393 </result>
6394 </desc>
6395 <param name="name" type="wstring" dir="in">
6396 <desc>Short name for the snapshot.</desc>
6397 </param>
6398 <param name="description" type="wstring" dir="in">
6399 <desc>Optional description of the snapshot.</desc>
6400 </param>
6401 <param name="progress" type="IProgress" dir="return">
6402 <desc>Progress object to track the operation completion.</desc>
6403 </param>
6404 </method>
6405
6406 <method name="discardSnapshot">
6407 <desc>
6408
6409 Starts discarding the specified snapshot. The execution state
6410 and settings of the associated machine stored in the snapshot
6411 will be deleted. The contents of all differencing hard disks of
6412 this snapshot will be merged with the contents of their
6413 dependent child hard disks to keep the, disks valid (in other
6414 words, all changes represented by hard disks being discarded
6415 will be propagated to their child hard disks). After that, this
6416 snapshot's differencing hard disks will be deleted. The parent
6417 of this snapshot will become a new parent for all its child
6418 snapshots.
6419
6420 If the discarded snapshot is the current one, its parent
6421 snapshot will become a new current snapshot. The current machine
6422 state is not directly affected in this case, except that
6423 currently attached differencing hard disks based on hard disks
6424 of the discarded snapshot will be also merged as described
6425 above.
6426
6427 If the discarded snapshot is the first one (the root snapshot)
6428 and it has exactly one child snapshot, this child snapshot will
6429 become the first snapshot after discarding. If there are no
6430 children at all (i.e. the first snapshot is the only snapshot of
6431 the machine), both the current and the first snapshot of the
6432 machine will be set to null. In all other cases, the first
6433 snapshot cannot be discarded.
6434
6435 You cannot discard the snapshot if it
6436 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6437 hard disks that have differencing hard disks based on them. Snapshots of
6438 such kind can be discarded only when every normal hard disk has either
6439 no children at all or exactly one child. In the former case, the normal
6440 hard disk simply becomes unused (i.e. not attached to any VM). In the
6441 latter case, it receives all the changes stored in the child hard disk,
6442 and then it replaces the child hard disk in the configuration of the
6443 corresponding snapshot or machine.
6444
6445 Also, you cannot discard the snapshot if it stores hard disks
6446 (of any type) having differencing child hard disks that belong
6447 to other machines. Such snapshots can be only discarded after
6448 you discard all snapshots of other machines containing "foreign"
6449 child disks, or detach these "foreign" child disks from machines
6450 they are attached to.
6451
6452 One particular example of the snapshot storing normal hard disks
6453 is the first snapshot of a virtual machine that had normal hard
6454 disks attached when taking the snapshot. Be careful when
6455 discarding such snapshots because this implicitly commits
6456 changes (made since the snapshot being discarded has been taken)
6457 to normal hard disks (as described above), which may be not what
6458 you want.
6459
6460 The virtual machine is put to
6461 the <link to="MachineState_Discarding">Discarding</link> state until
6462 the discard operation is completed.
6463
6464 <note>
6465 The machine must not be running, otherwise the operation
6466 will fail.
6467 </note>
6468
6469 <note>
6470 Child hard disks of all normal hard disks of the discarded snapshot
6471 must be accessible (see <link to="IMedium::state"/>) for this
6472 operation to succeed. In particular, this means that all virtual
6473 machines, whose hard disks are directly or indirectly based on the
6474 hard disks of discarded snapshot, must be powered off.
6475 </note>
6476 <note>
6477 Merging hard disk contents can be very time and disk space
6478 consuming, if these disks are big in size and have many
6479 children. However, if the snapshot being discarded is the last
6480 (head) snapshot on the branch, the operation will be rather
6481 quick.
6482 </note>
6483 <note>
6484 Note that discarding the current snapshot
6485 will implicitly call <link to="IMachine::saveSettings"/> to
6486 make all current machine settings permanent.
6487 </note>
6488 <result name="VBOX_E_INVALID_VM_STATE">
6489 Virtual machine is running.
6490 </result>
6491 </desc>
6492 <param name="id" type="uuid" dir="in">
6493 <desc>UUID of the snapshot to discard.</desc>
6494 </param>
6495 <param name="progress" type="IProgress" dir="return">
6496 <desc>Progress object to track the operation completion.</desc>
6497 </param>
6498 </method>
6499
6500 <method name="discardCurrentState">
6501 <desc>
6502 This operation is similar to <link to="#discardSnapshot"/> but
6503 affects the current machine state. This means that the state stored in
6504 the current snapshot will become a new current state, and all current
6505 settings of the machine and changes stored in differencing hard disks
6506 will be lost.
6507
6508 After this operation is successfully completed, new empty differencing
6509 hard disks are created for all normal hard disks of the machine.
6510
6511 If the current snapshot of the machine is an online snapshot, the
6512 machine will go to the <link to="MachineState_Saved"> saved
6513 state</link>, so that the next time it is powered on, the execution
6514 state will be restored from the current snapshot.
6515
6516 <note>
6517 The machine must not be running, otherwise the operation will fail.
6518 </note>
6519
6520 <note>
6521 If the machine state is <link to="MachineState_Saved">Saved</link>
6522 prior to this operation, the saved state file will be implicitly
6523 discarded (as if <link to="IConsole::discardSavedState"/> were
6524 called).
6525 </note>
6526
6527 <result name="VBOX_E_INVALID_VM_STATE">
6528 Virtual machine is running.
6529 </result>
6530 </desc>
6531 <param name="progress" type="IProgress" dir="return">
6532 <desc>Progress object to track the operation completion.</desc>
6533 </param>
6534 </method>
6535
6536 <method name="discardCurrentSnapshotAndState">
6537 <desc>
6538
6539 This method is equivalent to
6540 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6541 (currentSnapshot.id(), progress) followed by
6542 <link to="#discardCurrentState"/>.
6543
6544 As a result, the machine will be fully restored from the
6545 snapshot preceding the current snapshot, while both the current
6546 snapshot and the current machine state will be discarded.
6547
6548 If the current snapshot is the first snapshot of the machine (i.e. it
6549 has the only snapshot), the current machine state will be
6550 discarded <b>before</b> discarding the snapshot. In other words, the
6551 machine will be restored from its last snapshot, before discarding
6552 it. This differs from performing a single
6553 <link to="#discardSnapshot"/> call (note that no
6554 <link to="#discardCurrentState"/> will be possible after it)
6555 to the effect that the latter will preserve the current state instead of
6556 discarding it.
6557
6558 Unless explicitly mentioned otherwise, all remarks and
6559 limitations of the above two methods also apply to this method.
6560
6561 <note>
6562 The machine must not be running, otherwise the operation
6563 will fail.
6564 </note>
6565
6566 <note>
6567 If the machine state is <link to="MachineState_Saved">Saved</link>
6568 prior to this operation, the saved state file will be implicitly
6569 discarded (as if <link to="#discardSavedState"/> were
6570 called).
6571 </note>
6572
6573 <note>
6574 This method is more efficient than calling both of the above
6575 methods separately: it requires less IPC calls and provides
6576 a single progress object.
6577 </note>
6578
6579 <result name="VBOX_E_INVALID_VM_STATE">
6580 Virtual machine is running.
6581 </result>
6582 </desc>
6583 <param name="progress" type="IProgress" dir="return">
6584 <desc>Progress object to track the operation completion.</desc>
6585 </param>
6586 </method>
6587
6588 <method name="registerCallback">
6589 <desc>
6590 Registers a new console callback on this instance. The methods of the
6591 callback interface will be called by this instance when the appropriate
6592 event occurs.
6593 </desc>
6594 <param name="callback" type="IConsoleCallback" dir="in"/>
6595 </method>
6596
6597 <method name="unregisterCallback">
6598 <desc>
6599 Unregisters the console callback previously registered using
6600 <link to="#registerCallback"/>.
6601 <result name="E_INVALIDARG">
6602 Given @a callback handler is not registered.
6603 </result>
6604 </desc>
6605 <param name="callback" type="IConsoleCallback" dir="in"/>
6606 </method>
6607 </interface>
6608
6609 <!--
6610 // IHost
6611 /////////////////////////////////////////////////////////////////////////
6612 -->
6613
6614 <interface
6615 name="IHostDVDDrive" extends="$unknown"
6616 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6617 wsmap="managed"
6618 >
6619 <desc>
6620 The IHostDVDDrive interface represents the physical CD/DVD drive
6621 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6622 </desc>
6623
6624 <attribute name="name" type="wstring" readonly="yes">
6625 <desc>
6626 Returns the platform-specific device identifier.
6627 On DOS-like platforms, it is a drive name (e.g. R:).
6628 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6629 </desc>
6630 </attribute>
6631 <attribute name="description" type="wstring" readonly="yes">
6632 <desc>
6633 Returns a human readable description for the drive. This
6634 description usually contains the product and vendor name. A
6635 @c null string is returned if the description is not available.
6636 </desc>
6637 </attribute>
6638 <attribute name="udi" type="wstring" readonly="yes">
6639 <desc>
6640 Returns the unique device identifier for the drive. This
6641 attribute is reserved for future use instead of
6642 <link to="#name"/>. Currently it is not used and may return
6643 @c null on some platforms.
6644 </desc>
6645 </attribute>
6646
6647 </interface>
6648
6649 <interface
6650 name="IHostFloppyDrive" extends="$unknown"
6651 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6652 wsmap="managed"
6653 >
6654 <desc>
6655 The IHostFloppyDrive interface represents the physical floppy drive
6656 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6657 </desc>
6658 <attribute name="name" type="wstring" readonly="yes">
6659 <desc>
6660 Returns the platform-specific device identifier.
6661 On DOS-like platforms, it is a drive name (e.g. A:).
6662 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6663 </desc>
6664 </attribute>
6665 <attribute name="description" type="wstring" readonly="yes">
6666 <desc>
6667 Returns a human readable description for the drive. This
6668 description usually contains the product and vendor name. A
6669 @c null string is returned if the description is not available.
6670 </desc>
6671 </attribute>
6672 <attribute name="udi" type="wstring" readonly="yes">
6673 <desc>
6674 Returns the unique device identifier for the drive. This
6675 attribute is reserved for future use instead of
6676 <link to="#name"/>. Currently it is not used and may return
6677 @c null on some platforms.
6678 </desc>
6679 </attribute>
6680 </interface>
6681
6682 <enum
6683 name="HostNetworkInterfaceMediumType"
6684 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6685 >
6686 <desc>
6687 Type of encapsulation. Ethernet encapsulation includes both wired and
6688 wireless Ethernet connections.
6689 <see>IHostNetworkInterface</see>
6690 </desc>
6691
6692 <const name="Unknown" value="0">
6693 <desc>
6694 The type of interface cannot be determined.
6695 </desc>
6696 </const>
6697 <const name="Ethernet" value="1">
6698 <desc>
6699 Ethernet frame encapsulation.
6700 </desc>
6701 </const>
6702 <const name="PPP" value="2">
6703 <desc>
6704 Point-to-point protocol encapsulation.
6705 </desc>
6706 </const>
6707 <const name="SLIP" value="3">
6708 <desc>
6709 Serial line IP encapsulation.
6710 </desc>
6711 </const>
6712 </enum>
6713
6714 <enum
6715 name="HostNetworkInterfaceStatus"
6716 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6717 >
6718 <desc>
6719 Current status of the interface.
6720 <see>IHostNetworkInterface</see>
6721 </desc>
6722
6723 <const name="Unknown" value="0">
6724 <desc>
6725 The state of interface cannot be determined.
6726 </desc>
6727 </const>
6728 <const name="Up" value="1">
6729 <desc>
6730 The interface is fully operational.
6731 </desc>
6732 </const>
6733 <const name="Down" value="2">
6734 <desc>
6735 The interface is not functioning.
6736 </desc>
6737 </const>
6738 </enum>
6739
6740 <enum
6741 name="HostNetworkInterfaceType"
6742 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6743 >
6744 <desc>
6745 Network interface type.
6746 </desc>
6747 <const name="Bridged" value="1"/>
6748 <const name="HostOnly" value="2"/>
6749 </enum>
6750
6751 <interface
6752 name="IHostNetworkInterface" extends="$unknown"
6753 uuid="88adaf3f-166b-4542-9457-0f1323507fae"
6754 wsmap="managed"
6755 >
6756 <desc>
6757 Reprents one of host's network interfaces. IP V6 address and network
6758 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6759 separated by colons.
6760 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6761 </desc>
6762 <attribute name="name" type="wstring" readonly="yes">
6763 <desc>Returns the host network interface name.</desc>
6764 </attribute>
6765
6766 <attribute name="id" type="uuid" readonly="yes">
6767 <desc>Returns the interface UUID.</desc>
6768 </attribute>
6769
6770 <attribute name="networkName" type="wstring" readonly="yes">
6771 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6772 </attribute>
6773
6774 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6775 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6776 </attribute>
6777
6778 <attribute name="IPAddress" type="wstring" readonly="yes">
6779 <desc>Returns the IP V4 address of the interface.</desc>
6780 </attribute>
6781
6782 <attribute name="networkMask" type="wstring" readonly="yes">
6783 <desc>Returns the network mask of the interface.</desc>
6784 </attribute>
6785
6786 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6787 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6788 </attribute>
6789
6790 <attribute name="IPV6Address" type="wstring" readonly="yes">
6791 <desc>Returns the IP V6 address of the interface.</desc>
6792 </attribute>
6793
6794 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6795 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6796 </attribute>
6797
6798 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6799 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6800 </attribute>
6801
6802 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6803 <desc>Type of protocol encapsulation used.</desc>
6804 </attribute>
6805
6806 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6807 <desc>Status of the interface.</desc>
6808 </attribute>
6809
6810 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6811 <desc>specifies the host interface type.</desc>
6812 </attribute>
6813
6814 <method name="enableStaticIpConfig">
6815 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6816 <param name="IPAddress" type="wstring" dir="in">
6817 <desc>
6818 IP address.
6819 </desc>
6820 </param>
6821 <param name="networkMask" type="wstring" dir="in">
6822 <desc>
6823 network mask.
6824 </desc>
6825 </param>
6826 </method>
6827
6828 <method name="enableStaticIpConfigV6">
6829 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6830 <param name="IPV6Address" type="wstring" dir="in">
6831 <desc>
6832 IP address.
6833 </desc>
6834 </param>
6835 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6836 <desc>
6837 network mask.
6838 </desc>
6839 </param>
6840 </method>
6841
6842 <method name="enableDynamicIpConfig">
6843 <desc>enables the dynamic IP configuration.</desc>
6844 </method>
6845
6846 <method name="dhcpRediscover">
6847 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6848 </method>
6849
6850 </interface>
6851
6852 <interface
6853 name="IHost" extends="$unknown"
6854 uuid="926469ca-9091-42ef-928e-582d78b66c70"
6855 wsmap="managed"
6856 >
6857 <desc>
6858 The IHost interface represents the physical machine that this VirtualBox
6859 installation runs on.
6860
6861 An object implementing this interface is returned by the
6862 <link to="IVirtualBox::host" /> attribute. This interface contains
6863 read-only information about the host's physical hardware (such as what
6864 processors and disks are available, what the host operating system is,
6865 and so on) and also allows for manipulating some of the host's hardware,
6866 such as global USB device filters and host interface networking.
6867
6868 </desc>
6869 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6870 <desc>List of DVD drives available on the host.</desc>
6871 </attribute>
6872
6873 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6874 <desc>List of floppy drives available on the host.</desc>
6875 </attribute>
6876
6877 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6878 <desc>
6879 List of USB devices currently attached to the host.
6880 Once a new device is physically attached to the host computer,
6881 it appears in this list and remains there until detached.
6882
6883 <note>
6884 This method may set a @ref com_warnings "warning result code".
6885 </note>
6886 <note>
6887 If USB functionality is not available in the given edition of
6888 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6889 </note>
6890 </desc>
6891 </attribute>
6892
6893 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6894 <desc>
6895 List of USB device filters in action.
6896 When a new device is physically attached to the host computer,
6897 filters from this list are applied to it (in order they are stored
6898 in the list). The first matched filter will determine the
6899 <link to="IHostUSBDeviceFilter::action">action</link>
6900 performed on the device.
6901
6902 Unless the device is ignored by these filters, filters of all
6903 currently running virtual machines
6904 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6905
6906 <note>
6907 This method may set a @ref com_warnings "warning result code".
6908 </note>
6909 <note>
6910 If USB functionality is not available in the given edition of
6911 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6912 </note>
6913
6914 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6915 </desc>
6916 </attribute>
6917
6918 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6919 <desc>List of host network interfaces currently defined on the host.</desc>
6920 </attribute>
6921
6922 <attribute name="processorCount" type="unsigned long" readonly="yes">
6923 <desc>Number of (logical) CPUs installed in the host system.</desc>
6924 </attribute>
6925
6926 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6927 <desc>Number of (logical) CPUs online in the host system.</desc>
6928 </attribute>
6929
6930 <method name="getProcessorSpeed">
6931 <desc>Query the (approximate) maximum speed of a specified host CPU in
6932 Megahertz.
6933 </desc>
6934 <param name="cpuId" type="unsigned long" dir="in">
6935 <desc>
6936 Identifier of the CPU.
6937 </desc>
6938 </param>
6939 <param name="speed" type="unsigned long" dir="return">
6940 <desc>
6941 Speed value. 0 is returned if value is not known or @a cpuId is
6942 invalid.
6943 </desc>
6944 </param>
6945 </method>
6946
6947 <method name="getProcessorFeature">
6948 <desc>Query whether a CPU feature is supported or not.</desc>
6949 <param name="feature" type="ProcessorFeature" dir="in">
6950 <desc>
6951 CPU Feature identifier.
6952 </desc>
6953 </param>
6954 <param name="supported" type="boolean" dir="return">
6955 <desc>
6956 Feature is supported or not.
6957 </desc>
6958 </param>
6959 </method>
6960
6961 <method name="getProcessorDescription">
6962 <desc>Query the model string of a specified host CPU.
6963 <note>
6964 This function is not implemented in the current version of the
6965 product.
6966 </note>
6967 </desc>
6968 <param name="cpuId" type="unsigned long" dir="in">
6969 <desc>
6970 Identifier of the CPU.
6971 </desc>
6972 </param>
6973 <param name="description" type="wstring" dir="return">
6974 <desc>
6975 Model string. A NULL string is returned if value is not known or
6976 @a cpuId is invalid.
6977 </desc>
6978 </param>
6979 </method>
6980
6981 <attribute name="memorySize" type="unsigned long" readonly="yes">
6982 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6983 </attribute>
6984
6985 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6986 <desc>Available system memory in the host system.</desc>
6987 </attribute>
6988
6989 <attribute name="operatingSystem" type="wstring" readonly="yes">
6990 <desc>Name of the host system's operating system.</desc>
6991 </attribute>
6992
6993 <attribute name="OSVersion" type="wstring" readonly="yes">
6994 <desc>Host operating system's version string.</desc>
6995 </attribute>
6996
6997 <attribute name="UTCTime" type="long long" readonly="yes">
6998 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6999 </attribute>
7000
7001<if target="midl">
7002 <method name="createHostOnlyNetworkInterface">
7003 <desc>
7004 Creates a new adapter for Host Only Networking.
7005 <result name="E_INVALIDARG">
7006 Host network interface @a name already exists.
7007 </result>
7008 </desc>
7009 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7010 <desc>
7011 Created host interface object.
7012 </desc>
7013 </param>
7014 <param name="progress" type="IProgress" dir="return">
7015 <desc>
7016 Progress object to track the operation completion.
7017 </desc>
7018 </param>
7019 </method>
7020 <method name="removeHostOnlyNetworkInterface">
7021 <desc>
7022 Removes the given Host Only Networking interface.
7023 <result name="VBOX_E_OBJECT_NOT_FOUND">
7024 No host network interface matching @a id found.
7025 </result>
7026 </desc>
7027 <param name="id" type="uuid" dir="in">
7028 <desc>
7029 Adapter GUID.
7030 </desc>
7031 </param>
7032 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7033 <desc>
7034 Removed host interface object.
7035 </desc>
7036 </param>
7037 <param name="progress" type="IProgress" dir="return">
7038 <desc>
7039 Progress object to track the operation completion.
7040 </desc>
7041 </param>
7042 </method>
7043</if>
7044
7045 <method name="createUSBDeviceFilter">
7046 <desc>
7047 Creates a new USB device filter. All attributes except
7048 the filter name are set to <tt>null</tt> (any match),
7049 <i>active</i> is <tt>false</tt> (the filter is not active).
7050
7051 The created filter can be added to the list of filters using
7052 <link to="#insertUSBDeviceFilter"/>.
7053
7054 <see>#USBDeviceFilters</see>
7055 </desc>
7056 <param name="name" type="wstring" dir="in">
7057 <desc>
7058 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7059 for more info.
7060 </desc>
7061 </param>
7062 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7063 <desc>Created filter object.</desc>
7064 </param>
7065 </method>
7066
7067 <method name="insertUSBDeviceFilter">
7068 <desc>
7069 Inserts the given USB device to the specified position
7070 in the list of filters.
7071
7072 Positions are numbered starting from <tt>0</tt>. If the specified
7073 position is equal to or greater than the number of elements in
7074 the list, the filter is added at the end of the collection.
7075
7076 <note>
7077 Duplicates are not allowed, so an attempt to insert a
7078 filter that is already in the list, will return an
7079 error.
7080 </note>
7081 <note>
7082 This method may set a @ref com_warnings "warning result code".
7083 </note>
7084 <note>
7085 If USB functionality is not available in the given edition of
7086 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7087 </note>
7088
7089 <see>#USBDeviceFilters</see>
7090
7091 <result name="VBOX_E_INVALID_OBJECT_STATE">
7092 USB device filter is not created within this VirtualBox instance.
7093 </result>
7094 <result name="E_INVALIDARG">
7095 USB device filter already in list.
7096 </result>
7097
7098 </desc>
7099 <param name="position" type="unsigned long" dir="in">
7100 <desc>Position to insert the filter to.</desc>
7101 </param>
7102 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7103 <desc>USB device filter to insert.</desc>
7104 </param>
7105 </method>
7106
7107 <method name="removeUSBDeviceFilter">
7108 <desc>
7109 Removes a USB device filter from the specified position in the
7110 list of filters.
7111
7112 Positions are numbered starting from <tt>0</tt>. Specifying a
7113 position equal to or greater than the number of elements in
7114 the list will produce an error.
7115
7116 <note>
7117 This method may set a @ref com_warnings "warning result code".
7118 </note>
7119 <note>
7120 If USB functionality is not available in the given edition of
7121 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7122 </note>
7123
7124 <see>#USBDeviceFilters</see>
7125
7126 <result name="E_INVALIDARG">
7127 USB device filter list empty or invalid @a position.
7128 </result>
7129
7130 </desc>
7131 <param name="position" type="unsigned long" dir="in">
7132 <desc>Position to remove the filter from.</desc>
7133 </param>
7134 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7135 <desc>Removed USB device filter.</desc>
7136 </param>
7137 </method>
7138
7139 <method name="findHostDVDDrive">
7140 <desc>
7141 Searches for a host DVD drive with the given @c name.
7142
7143 <result name="VBOX_E_OBJECT_NOT_FOUND">
7144 Given @c name does not correspond to any host drive.
7145 </result>
7146
7147 </desc>
7148 <param name="name" type="wstring" dir="in">
7149 <desc>Name of the host drive to search for</desc>
7150 </param>
7151 <param name="drive" type="IHostDVDDrive" dir="return">
7152 <desc>Found host drive object</desc>
7153 </param>
7154 </method>
7155
7156 <method name="findHostFloppyDrive">
7157 <desc>
7158 Searches for a host floppy drive with the given @c name.
7159
7160 <result name="VBOX_E_OBJECT_NOT_FOUND">
7161 Given @c name does not correspond to any host floppy drive.
7162 </result>
7163
7164 </desc>
7165 <param name="name" type="wstring" dir="in">
7166 <desc>Name of the host floppy drive to search for</desc>
7167 </param>
7168 <param name="drive" type="IHostFloppyDrive" dir="return">
7169 <desc>Found host floppy drive object</desc>
7170 </param>
7171 </method>
7172
7173 <method name="findHostNetworkInterfaceByName">
7174 <desc>
7175 Searches through all host network interfaces for an interface with
7176 the given @c name.
7177 <note>
7178 The method returns an error if the given @c name does not
7179 correspond to any host network interface.
7180 </note>
7181 </desc>
7182 <param name="name" type="wstring" dir="in">
7183 <desc>Name of the host network interface to search for.</desc>
7184 </param>
7185 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7186 <desc>Found host network interface object.</desc>
7187 </param>
7188 </method>
7189 <method name="findHostNetworkInterfaceById">
7190 <desc>
7191 Searches through all host network interfaces for an interface with
7192 the given GUID.
7193 <note>
7194 The method returns an error if the given GUID does not
7195 correspond to any host network interface.
7196 </note>
7197 </desc>
7198 <param name="id" type="uuid" dir="in">
7199 <desc>GUID of the host network interface to search for.</desc>
7200 </param>
7201 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7202 <desc>Found host network interface object.</desc>
7203 </param>
7204 </method>
7205 <method name="findHostNetworkInterfacesOfType">
7206 <desc>
7207 Searches through all host network interfaces and returns a list of interfaces of the specified type
7208 </desc>
7209 <param name="type" type="HostNetworkInterfaceType" dir="in">
7210 <desc>type of the host network interfaces to search for.</desc>
7211 </param>
7212 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7213 <desc>Found host network interface objects.</desc>
7214 </param>
7215 </method>
7216
7217 <method name="findUSBDeviceById">
7218 <desc>
7219 Searches for a USB device with the given UUID.
7220
7221 <result name="VBOX_E_OBJECT_NOT_FOUND">
7222 Given @id does not correspond to any USB device.
7223 </result>
7224
7225 <see>IHostUSBDevice::id</see>
7226 </desc>
7227 <param name="id" type="uuid" dir="in">
7228 <desc>UUID of the USB device to search for.</desc>
7229 </param>
7230 <param name="device" type="IHostUSBDevice" dir="return">
7231 <desc>Found USB device object.</desc>
7232 </param>
7233 </method>
7234
7235 <method name="findUSBDeviceByAddress">
7236 <desc>
7237 Searches for a USB device with the given host address.
7238
7239 <result name="VBOX_E_OBJECT_NOT_FOUND">
7240 Given @c name does not correspond to any USB device.
7241 </result>
7242
7243 <see>IHostUSBDevice::address</see>
7244 </desc>
7245 <param name="name" type="wstring" dir="in">
7246 <desc>
7247 Address of the USB device (as assigned by the host) to
7248 search for.
7249 </desc>
7250 </param>
7251 <param name="device" type="IHostUSBDevice" dir="return">
7252 <desc>Found USB device object.</desc>
7253 </param>
7254 </method>
7255
7256 </interface>
7257
7258 <!--
7259 // ISystemProperties
7260 /////////////////////////////////////////////////////////////////////////
7261 -->
7262
7263 <interface
7264 name="ISystemProperties"
7265 extends="$unknown"
7266 uuid="0760e03f-06d0-481e-9f81-be43fef092ba"
7267 wsmap="managed"
7268 >
7269 <desc>
7270 The ISystemProperties interface represents global properties of the given
7271 VirtualBox installation.
7272
7273 These properties define limits and default values for various attributes
7274 and parameters. Most of the properties are read-only, but some can be
7275 changed by a user.
7276 </desc>
7277
7278 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7279 <desc>Minimum guest system memory in Megabytes.</desc>
7280 </attribute>
7281
7282 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7283 <desc>Maximum guest system memory in Megabytes.</desc>
7284 </attribute>
7285
7286 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7287 <desc>Minimum guest video memory in Megabytes.</desc>
7288 </attribute>
7289
7290 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7291 <desc>Maximum guest video memory in Megabytes.</desc>
7292 </attribute>
7293
7294 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7295 <desc>Minimum CPU count.</desc>
7296 </attribute>
7297
7298 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7299 <desc>Maximum CPU count.</desc>
7300 </attribute>
7301
7302 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7303 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7304 </attribute>
7305
7306 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7307 <desc>
7308 Number of network adapters associated with every
7309 <link to="IMachine"/> instance.
7310 </desc>
7311 </attribute>
7312
7313 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7314 <desc>
7315 Number of serial ports associated with every
7316 <link to="IMachine"/> instance.
7317 </desc>
7318 </attribute>
7319
7320 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7321 <desc>
7322 Number of parallel ports associated with every
7323 <link to="IMachine"/> instance.
7324 </desc>
7325 </attribute>
7326
7327 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7328 <desc>
7329 Maximum device position in the boot order. This value corresponds
7330 to the total number of devices a machine can boot from, to make it
7331 possible to include all possible devices to the boot list.
7332 <see><link to="IMachine::setBootOrder"/></see>
7333 </desc>
7334 </attribute>
7335
7336 <attribute name="defaultMachineFolder" type="wstring">
7337 <desc>
7338 Full path to the default directory used to create new or open
7339 existing machines when a settings file name contains no
7340 path.
7341
7342 The initial value of this property is
7343 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7344 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7345
7346 <note>
7347 Setting this property to <tt>null</tt> will restore the
7348 initial value.
7349 </note>
7350 <note>
7351 When settings this property, the specified path can be
7352 absolute (full path) or relative
7353 to the <link to="IVirtualBox::homeFolder">
7354 VirtualBox home directory</link>.
7355 When reading this property, a full path is
7356 always returned.
7357 </note>
7358 <note>
7359 The specified path may not exist, it will be created
7360 when necessary.
7361 </note>
7362
7363 <see>
7364 <link to="IVirtualBox::createMachine"/>,
7365 <link to="IVirtualBox::openMachine"/>
7366 </see>
7367 </desc>
7368 </attribute>
7369
7370 <attribute name="defaultHardDiskFolder" type="wstring">
7371 <desc>
7372 Full path to the default directory used to create new or open existing
7373 virtual disks.
7374
7375 This path is used when the storage unit of a hard disk is a regular file
7376 in the host's file system and only a file name that contains no path is
7377 given.
7378
7379 The initial value of this property is
7380 <tt>&lt;</tt>
7381 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7382 <tt>&gt;/HardDisks</tt>.
7383
7384 <note>
7385 Setting this property to <tt>null</tt> will restore the
7386 initial value.
7387 </note>
7388 <note>
7389 When settings this property, the specified path can be relative
7390 to the
7391 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7392 absolute. When reading this property, a full path is
7393 always returned.
7394 </note>
7395 <note>
7396 The specified path may not exist, it will be created
7397 when necessary.
7398 </note>
7399
7400 <see>
7401 IHardDisk,
7402 <link to="IVirtualBox::createHardDisk"/>,
7403 <link to="IVirtualBox::openHardDisk"/>,
7404 <link to="IMedium::location"/>
7405 </see>
7406 </desc>
7407 </attribute>
7408
7409 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7410 <desc>
7411 List of all hard disk storage formats supported by this VirtualBox
7412 installation.
7413
7414 Keep in mind that the hard disk format identifier
7415 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7416 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7417 hard disk format is a case-insensitive string. This means that, for
7418 example, all of the following strings:
7419 <pre>
7420 "VDI"
7421 "vdi"
7422 "VdI"</pre>
7423 refer to the same hard disk format.
7424
7425 Note that the virtual hard disk framework is backend-based, therefore
7426 the list of supported formats depends on what backends are currently
7427 installed.
7428
7429 <see>
7430 <link to="IHardDiskFormat"/>,
7431 </see>
7432 </desc>
7433 </attribute>
7434
7435 <attribute name="defaultHardDiskFormat" type="wstring">
7436 <desc>
7437 Identifier of the default hard disk format used by VirtualBox.
7438
7439 The hard disk format set by this attribute is used by VirtualBox
7440 when the hard disk format was not specified explicitly. One example is
7441 <link to="IVirtualBox::createHardDisk"/> with the <tt>null</tt>
7442 format argument. A more complex example is implicit creation of
7443 differencing hard disks when taking a snapshot of a virtual machine:
7444 this operation will try to use a format of the parent hard disk first
7445 and if this format does not support differencing hard disks the default
7446 format specified by this argument will be used.
7447
7448 The list of supported hard disk formats may be obtained by the
7449 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7450 format must have a capability to create differencing hard disks;
7451 otherwise opeartions that create hard disks implicitly may fail
7452 unexpectedly.
7453
7454 The initial value of this property is <tt>VDI</tt> in the current
7455 version of the VirtualBox product, but may change in the future.
7456
7457 <note>
7458 Setting this property to <tt>null</tt> will restore the
7459 initial value.
7460 </note>
7461
7462 <see>
7463 <link to="#hardDiskFormats"/>,
7464 <link to="IHardDiskFormat::id"/>,
7465 <link to="IVirtualBox::createHardDisk"/>
7466 </see>
7467 </desc>
7468 </attribute>
7469
7470 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7471 <desc>
7472 Library that provides authentication for VRDP clients. The library
7473 is used if a virtual machine's authentication type is set to "external"
7474 in the VM RemoteDisplay configuration.
7475
7476 The system library extension (".DLL" or ".so") must be omitted.
7477 A full path can be specified; if not, then the library must reside on the
7478 system's default library path.
7479
7480 The default value of this property is <tt>VRDPAuth</tt>. There is a library
7481 of that name in one of the default VirtualBox library directories.
7482
7483 For details about VirtualBox authentication libraries and how to implement
7484 them, please refer to the VirtualBox manual.
7485
7486 <note>
7487 Setting this property to <tt>null</tt> will restore the
7488 initial value.
7489 </note>
7490 </desc>
7491 </attribute>
7492
7493 <attribute name="webServiceAuthLibrary" type="wstring">
7494 <desc>
7495 Library that provides authentication for webservice clients. The library
7496 is used if a virtual machine's authentication type is set to "external"
7497 in the VM RemoteDisplay configuration and will be called from
7498 within the <link to="IWebsessionManager::logon" /> implementation.
7499
7500 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7501 there is no per-VM setting for this, as the webservice is a global
7502 resource (if it is running). Only for this setting (for the webservice),
7503 setting this value to a literal "null" string disables authentication,
7504 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7505 no matter what user name and password are supplied.
7506
7507 The initial value of this property is <tt>VRDPAuth</tt>,
7508 meaning that the webservice will use the same authentication
7509 library that is used by default for VBoxVRDP (again, see
7510 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7511 The format and calling convention of authentication libraries
7512 is the same for the webservice as it is for VBoxVRDP.
7513
7514 </desc>
7515 </attribute>
7516
7517 <attribute name="HWVirtExEnabled" type="boolean">
7518 <desc>
7519 This specifies the default value for hardware virtualization
7520 extensions. If enabled, virtual machines will make use of
7521 hardware virtualization extensions such as Intel VT-x and
7522 AMD-V by default. This value can be overridden by each VM
7523 using their <link to="IMachine::HWVirtExEnabled" /> property.
7524 </desc>
7525 </attribute>
7526
7527 <attribute name="LogHistoryCount" type="unsigned long">
7528 <desc>
7529 This value specifies how many old release log files are kept.
7530 </desc>
7531 </attribute>
7532 </interface>
7533
7534 <!--
7535 // IGuest
7536 /////////////////////////////////////////////////////////////////////////
7537 -->
7538
7539 <interface
7540 name="IGuestOSType" extends="$unknown"
7541 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7542 wsmap="struct"
7543 >
7544 <desc>
7545 </desc>
7546
7547 <attribute name="familyId" type="wstring" readonly="yes">
7548 <desc>Guest OS family identifier string.</desc>
7549 </attribute>
7550
7551 <attribute name="familyDescription" type="wstring" readonly="yes">
7552 <desc>Human readable description of the guest OS family.</desc>
7553 </attribute>
7554
7555 <attribute name="id" type="wstring" readonly="yes">
7556 <desc>Guest OS identifier string.</desc>
7557 </attribute>
7558
7559 <attribute name="description" type="wstring" readonly="yes">
7560 <desc>Human readable description of the guest OS.</desc>
7561 </attribute>
7562
7563 <attribute name="is64Bit" type="boolean" readonly="yes">
7564 <desc>Returns @c true if the given OS is 64-bit</desc>
7565 </attribute>
7566
7567 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7568 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7569 </attribute>
7570
7571 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7572 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7573 </attribute>
7574
7575 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7576 <desc>Recommended RAM size in Megabytes.</desc>
7577 </attribute>
7578
7579 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7580 <desc>Recommended video RAM size in Megabytes.</desc>
7581 </attribute>
7582
7583 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7584 <desc>Recommended hard disk size in Megabytes.</desc>
7585 </attribute>
7586
7587 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7588 <desc>Returns recommended network adapter for this OS type.</desc>
7589 </attribute>
7590 </interface>
7591
7592 <interface
7593 name="IGuest" extends="$unknown"
7594 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7595
7596 wsmap="suppress"
7597 >
7598 <desc>
7599 The IGuest interface represents information about the operating system
7600 running inside the virtual machine. Used in
7601 <link to="IConsole::guest"/>.
7602
7603 IGuest provides information about the guest operating system, whether
7604 Guest Additions are installed and other OS-specific virtual machine
7605 properties.
7606 </desc>
7607
7608 <attribute name="OSTypeId" type="wstring" readonly="yes">
7609 <desc>
7610 Identifier of the Guest OS type as reported by the Guest
7611 Additions.
7612 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7613 an IGuestOSType object representing details about the given
7614 Guest OS type.
7615 <note>
7616 If Guest Additions are not installed, this value will be
7617 the same as <link to="IMachine::OSTypeId"/>.
7618 </note>
7619 </desc>
7620 </attribute>
7621
7622 <attribute name="additionsActive" type="boolean" readonly="yes">
7623 <desc>
7624 Flag whether the Guest Additions are installed and active
7625 in which case their version will be returned by the
7626 <link to="#additionsVersion"/> property.
7627 </desc>
7628 </attribute>
7629
7630 <attribute name="additionsVersion" type="wstring" readonly="yes">
7631 <desc>
7632 Version of the Guest Additions (3 decimal numbers separated
7633 by dots) or empty when the Additions are not installed. The
7634 Additions may also report a version but yet not be active as
7635 the version might be refused by VirtualBox (incompatible) or
7636 other failures occurred.
7637 </desc>
7638 </attribute>
7639
7640 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7641 <desc>
7642 Flag whether seamless guest display rendering (seamless desktop
7643 integration) is supported.
7644 </desc>
7645 </attribute>
7646
7647 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7648 <desc>
7649 Flag whether the guest is in graphics mode. If it is not, then
7650 seamless rendering will not work, resize hints are not immediately
7651 acted on and guest display resizes are probably not initiated by
7652 the guest additions.
7653 </desc>
7654 </attribute>
7655
7656 <attribute name="memoryBalloonSize" type="unsigned long">
7657 <desc>Guest system memory balloon size in megabytes.</desc>
7658 </attribute>
7659
7660 <attribute name="statisticsUpdateInterval" type="unsigned long">
7661 <desc>Interval to update guest statistics in seconds.</desc>
7662 </attribute>
7663
7664 <method name="setCredentials">
7665 <desc>
7666 Store login credentials that can be queried by guest operating
7667 systems with Additions installed. The credentials are transient
7668 to the session and the guest may also choose to erase them. Note
7669 that the caller cannot determine whether the guest operating system
7670 has queried or made use of the credentials.
7671
7672 <result name="VBOX_E_VM_ERROR">
7673 VMM device is not available.
7674 </result>
7675
7676 </desc>
7677 <param name="userName" type="wstring" dir="in">
7678 <desc>User name string, can be empty</desc>
7679 </param>
7680 <param name="password" type="wstring" dir="in">
7681 <desc>Password string, can be empty</desc>
7682 </param>
7683 <param name="domain" type="wstring" dir="in">
7684 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7685 </param>
7686 <param name="allowInteractiveLogon" type="boolean" dir="in">
7687 <desc>
7688 Flag whether the guest should alternatively allow the user to
7689 interactively specify different credentials. This flag might
7690 not be supported by all versions of the Additions.
7691 </desc>
7692 </param>
7693 </method>
7694
7695 <method name="getStatistic">
7696 <desc>
7697 Query specified guest statistics as reported by the VirtualBox Additions.
7698 </desc>
7699 <param name="cpuId" type="unsigned long" dir="in">
7700 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7701 </param>
7702 <param name="statistic" type="GuestStatisticType" dir="in">
7703 <desc>Statistic type.</desc>
7704 </param>
7705 <param name="statVal" type="unsigned long" dir="out">
7706 <desc>Statistics value</desc>
7707 </param>
7708 </method>
7709
7710 </interface>
7711
7712
7713 <!--
7714 // IProgress
7715 /////////////////////////////////////////////////////////////////////////
7716 -->
7717
7718 <interface
7719 name="IProgress" extends="$unknown"
7720 uuid="d3aa5417-6103-41fc-9e54-01ee1d08f42f"
7721 wsmap="managed"
7722 >
7723 <desc>
7724 The IProgress interface represents a task progress object that allows
7725 to wait for the completion of some asynchronous task.
7726
7727 The task consists of one or more operations that run sequentially,
7728 one by one. There is an individual percentage of completion of the
7729 current operation and the percentage of completion of the task as a
7730 whole. Similarly, you can wait for the completion of a particular
7731 operation or for the completion of the whole task.
7732
7733 Every operation is identified by a number (starting from 0)
7734 and has a separate description.
7735 </desc>
7736
7737 <attribute name="id" type="uuid" readonly="yes">
7738 <desc>ID of the task.</desc>
7739 </attribute>
7740
7741 <attribute name="description" type="wstring" readonly="yes">
7742 <desc>Description of the task.</desc>
7743 </attribute>
7744
7745 <attribute name="initiator" type="$unknown" readonly="yes">
7746 <desc>Initiator of the task.</desc>
7747 </attribute>
7748
7749 <attribute name="cancelable" type="boolean" readonly="yes">
7750 <desc>Whether the task can be interrupted.</desc>
7751 </attribute>
7752
7753 <attribute name="percent" type="long" readonly="yes">
7754 <desc>
7755 Current task progress value in percent.
7756 This value depends on how many operations are already complete.
7757 </desc>
7758 </attribute>
7759
7760 <attribute name="completed" type="boolean" readonly="yes">
7761 <desc>Whether the task has been completed.</desc>
7762 </attribute>
7763
7764 <attribute name="canceled" type="boolean" readonly="yes">
7765 <desc>Whether the task has been canceled.</desc>
7766 </attribute>
7767
7768 <attribute name="resultCode" type="result" readonly="yes">
7769 <desc>
7770 Result code of the progress task.
7771 Valid only if <link to="#completed"/> is true.
7772 </desc>
7773 </attribute>
7774
7775 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7776 <desc>
7777 Extended information about the unsuccessful result of the
7778 progress operation. May be NULL when no extended information
7779 is available.
7780 Valid only if <link to="#completed"/> is true and
7781 <link to="#resultCode"/> indicates a failure.
7782 </desc>
7783 </attribute>
7784
7785 <attribute name="operationCount" type="unsigned long" readonly="yes">
7786 <desc>
7787 Number of operations this task is divided into.
7788 Every task consists of at least one operation.
7789 </desc>
7790 </attribute>
7791
7792 <attribute name="operation" type="unsigned long" readonly="yes">
7793 <desc>Number of the operation being currently executed.</desc>
7794 </attribute>
7795
7796 <attribute name="operationDescription" type="wstring" readonly="yes">
7797 <desc>
7798 Description of the operation being currently executed.
7799 </desc>
7800 </attribute>
7801
7802 <attribute name="operationPercent" type="long" readonly="yes">
7803 <desc>Current operation progress value in percent.</desc>
7804 </attribute>
7805
7806 <method name="waitForCompletion">
7807 <desc>
7808 Waits until the task is done (including all operations) with a
7809 given timeout.
7810
7811 <result name="VBOX_E_IPRT_ERROR">
7812 Failed to wait for task completion.
7813 </result>
7814
7815 </desc>
7816 <param name="timeout" type="long" dir="in">
7817 <desc>
7818 Timeout value in milliseconds.
7819 Specify -1 for an indefinite wait.
7820 </desc>
7821 </param>
7822 </method>
7823
7824 <method name="waitForOperationCompletion">
7825 <desc>
7826 Waits until the given operation is done with a given timeout.
7827
7828 <result name="VBOX_E_IPRT_ERROR">
7829 Failed to wait for operation completion.
7830 </result>
7831
7832 </desc>
7833 <param name="operation" type="unsigned long" dir="in">
7834 <desc>
7835 Number of the operation to wait for.
7836 Must be less than <link to="#operationCount"/>.
7837 </desc>
7838 </param>
7839 <param name="timeout" type="long" dir="in">
7840 <desc>
7841 Timeout value in milliseconds.
7842 Specify -1 for an indefinite wait.
7843 </desc>
7844 </param>
7845 </method>
7846
7847 <method name="cancel">
7848 <desc>
7849 Cancels the task.
7850 <note>
7851 If <link to="#cancelable"/> is <tt>false</tt>, then
7852 this method will fail.
7853 </note>
7854
7855 <result name="VBOX_E_INVALID_OBJECT_STATE">
7856 Operation cannot be canceled.
7857 </result>
7858
7859 </desc>
7860 </method>
7861
7862 </interface>
7863
7864
7865 <!--
7866 // ISnapshot
7867 /////////////////////////////////////////////////////////////////////////
7868 -->
7869
7870 <interface
7871 name="ISnapshot" extends="$unknown"
7872 uuid="5db6b1d9-c76b-4424-a6f4-8257f642d6ea"
7873 wsmap="managed"
7874 >
7875 <desc>
7876 The ISnapshot interface represents a snapshot of the virtual
7877 machine.
7878
7879 The <i>snapshot</i> stores all the information about a virtual
7880 machine necessary to bring it to exactly the same state as it was at
7881 the time of taking the snapshot. The snapshot includes:
7882
7883 <ul>
7884 <li>all settings of the virtual machine (i.e. its hardware
7885 configuration: RAM size, attached hard disks, etc.)
7886 </li>
7887 <li>the execution state of the virtual machine (memory contents,
7888 CPU state, etc.).
7889 </li>
7890 </ul>
7891
7892 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7893 or <i>online</i> (taken when the VM is running). The execution
7894 state of the offline snapshot is called a <i>zero execution state</i>
7895 (it doesn't actually contain any information about memory contents
7896 or the CPU state, assuming that all hardware is just powered off).
7897
7898 <h3>Snapshot branches</h3>
7899
7900 Snapshots can be chained. Chained snapshots form a branch where
7901 every next snapshot is based on the previous one. This chaining is
7902 mostly related to hard disk branching (see <link to="IHardDisk"/>
7903 description). This means that every time a new snapshot is created,
7904 a new differencing hard disk is implicitly created for all normal
7905 hard disks attached to the given virtual machine. This allows to
7906 fully restore hard disk contents when the machine is later reverted
7907 to a particular snapshot.
7908
7909 In the current implementation, multiple snapshot branches within one
7910 virtual machine are not allowed. Every machine has a single branch,
7911 and <link to="IConsole::takeSnapshot"/> operation adds a new
7912 snapshot to the top of that branch.
7913
7914 Existing snapshots can be discarded using
7915 <link to="IConsole::discardSnapshot"/>.
7916
7917 <h3>Current snapshot</h3>
7918
7919 Every virtual machine has a current snapshot, identified by
7920 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
7921 a base for the <i>current machine state</i> (see below), to the effect
7922 that all normal hard disks of the machine and its execution
7923 state are based on this snapshot.
7924
7925 In the current implementation, the current snapshot is always the
7926 last taken snapshot (i.e. the head snapshot on the branch) and it
7927 cannot be changed.
7928
7929 The current snapshot is <tt>null</tt> if the machine doesn't have
7930 snapshots at all; in this case the current machine state is just
7931 current settings of this machine plus its current execution state.
7932
7933 <h3>Current machine state</h3>
7934
7935 The current machine state is what represented by IMachine instances got
7936 directly from IVirtualBox
7937 using <link
7938 to="IVirtualBox::getMachine">getMachine()</link>, <link
7939 to="IVirtualBox::findMachine">findMachine()</link>, etc. (as opposed
7940 to instances returned by <link to="ISnapshot::machine"/>). This state
7941 is always used when the machine is <link to="IConsole::powerUp"> powered
7942 on</link>.
7943
7944 The current machine state also includes the current execution state.
7945 If the machine is being currently executed
7946 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
7947 and above), its execution state is just what's happening now.
7948 If it is powered off (<link to="MachineState_PoweredOff"/> or
7949 <link to="MachineState_Aborted"/>), it has a zero execution state.
7950 If the machine is saved (<link to="MachineState_Saved"/>), its
7951 execution state is what saved in the execution state file
7952 (<link to="IMachine::stateFilePath"/>).
7953
7954 If the machine is in the saved state, then, next time it is powered
7955 on, its execution state will be fully restored from the saved state
7956 file and the execution will continue from the point where the state
7957 was saved.
7958
7959 Similarly to snapshots, the current machine state can be discarded
7960 using <link to="IConsole::discardCurrentState"/>.
7961
7962 <h3>Taking and discarding snapshots</h3>
7963
7964 The table below briefly explains the meaning of every snapshot
7965 operation:
7966
7967 <table>
7968 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7969
7970 <tr><td><link to="IConsole::takeSnapshot"/></td>
7971
7972 <td>Save the current state of the virtual machine, including all
7973 settings, contents of normal hard disks and the current modifications
7974 to immutable hard disks (for online snapshots)</td>
7975
7976 <td>The current state is not changed (the machine will continue
7977 execution if it is being executed when the snapshot is
7978 taken)</td></tr>
7979
7980 <tr><td><link to="IConsole::discardSnapshot"/></td>
7981
7982 <td>Forget the state of the virtual machine stored in the snapshot:
7983 dismiss all saved settings and delete the saved execution state (for
7984 online snapshots)</td>
7985
7986 <td>Other snapshots (including child snapshots, if any) and the
7987 current state are not directly affected</td></tr>
7988
7989 <tr><td><link to="IConsole::discardCurrentState"/></td>
7990
7991 <td>Restore the current state of the virtual machine from the state
7992 stored in the current snapshot, including all settings and hard disk
7993 contents</td>
7994
7995 <td>The current state of the machine existed prior to this operation
7996 is lost</td></tr>
7997
7998 <tr><td><link to="IConsole::discardCurrentSnapshotAndState"/></td>
7999
8000 <td>Completely revert the virtual machine to the state it was in
8001 before the current snapshot has been taken</td>
8002
8003 <td>The current state, as well as the current snapshot, are
8004 lost</td></tr>
8005
8006 </table>
8007
8008 </desc>
8009
8010 <attribute name="id" type="uuid" readonly="yes">
8011 <desc>UUID of the snapshot.</desc>
8012 </attribute>
8013
8014 <attribute name="name" type="wstring">
8015 <desc>Short name of the snapshot.</desc>
8016 </attribute>
8017
8018 <attribute name="description" type="wstring">
8019 <desc>Optional description of the snapshot.</desc>
8020 </attribute>
8021
8022 <attribute name="timeStamp" type="long long" readonly="yes">
8023 <desc>
8024 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8025 </desc>
8026 </attribute>
8027
8028 <attribute name="online" type="boolean" readonly="yes">
8029 <desc>
8030 <tt>true</tt> if this snapshot is an online snapshot and
8031 <tt>false</tt> otherwise.
8032
8033 <note>
8034 When this attribute is <tt>true</tt>, the
8035 <link to="IMachine::stateFilePath"/> attribute of the
8036 <link to="#machine"/> object associated with this snapshot
8037 will point to the saved state file. Otherwise, it will be
8038 <tt>null</tt>.
8039 </note>
8040 </desc>
8041 </attribute>
8042
8043 <attribute name="machine" type="IMachine" readonly="yes">
8044 <desc>
8045 Virtual machine this snapshot is taken on. This object
8046 stores all settings the machine had when taking this snapshot.
8047 <note>
8048 The returned machine object is immutable, i.e. no
8049 any settings can be changed.
8050 </note>
8051 </desc>
8052 </attribute>
8053
8054 <attribute name="parent" type="ISnapshot" readonly="yes">
8055 <desc>
8056 Parent snapshot (a snapshot this one is based on).
8057 <note>
8058 It's not an error to read this attribute on a snapshot
8059 that doesn't have a parent -- a null object will be
8060 returned to indicate this.
8061 </note>
8062 </desc>
8063 </attribute>
8064
8065 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8066 <desc>
8067 Child snapshots (all snapshots having this one as a parent).
8068 <note>
8069 In the current implementation, there can be only one
8070 child snapshot, or no children at all, meaning this is the
8071 last (head) snapshot.
8072 </note>
8073 </desc>
8074 </attribute>
8075
8076 </interface>
8077
8078
8079 <!--
8080 // IMedia
8081 /////////////////////////////////////////////////////////////////////////
8082 -->
8083
8084 <enum
8085 name="MediaState"
8086 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8087 >
8088 <desc>
8089 Virtual media state.
8090 <see>IMedia</see>
8091 </desc>
8092
8093 <const name="NotCreated" value="0">
8094 <desc>
8095 Associated media storage does not exist (either was not created yet or
8096 was deleted).
8097 </desc>
8098 </const>
8099 <const name="Created" value="1">
8100 <desc>
8101 Associated storage exists and accessible.
8102 </desc>
8103 </const>
8104 <const name="LockedRead" value="2">
8105 <desc>
8106 Media is locked for reading, no data modification is possible.
8107 </desc>
8108 </const>
8109 <const name="LockedWrite" value="3">
8110 <desc>
8111 Media is locked for writing, no concurrent data reading or modification
8112 is possible.
8113 </desc>
8114 </const>
8115 <const name="Inaccessible" value="4">
8116 <desc>
8117 Associated media storage is not accessible.
8118 </desc>
8119 </const>
8120 <const name="Creating" value="5">
8121 <desc>
8122 Associated media storage is being created.
8123 </desc>
8124 </const>
8125 <const name="Deleting" value="6">
8126 <desc>
8127 Associated media storage is being deleted.
8128 </desc>
8129 </const>
8130 </enum>
8131
8132 <interface
8133 name="IMedium" extends="$unknown"
8134 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
8135 wsmap="managed"
8136 >
8137 <desc>
8138 The IMedium interface is a common interface for all objects representing
8139 virtual media such as hard disks, CD/DVD images and floppy images.
8140
8141 Each medium is associated with a storage unit (such as a file on the host
8142 computer or a network resource) that holds actual data. The location of
8143 the storage unit is represented by the #location attribute. The value of
8144 this attribute is media type dependent.
8145
8146 The exact media type may be determined by querying the appropriate
8147 interface such as:
8148 <ul>
8149 <li>IHardDisk (virtual hard disks)</li>
8150 <li>IDVDImage (standard CD/DVD ISO image files)</li>
8151 <li>IFloppyImage (raw floppy image files)</li>
8152 </ul>
8153
8154 Existing media are opened using the following methods, depending on the
8155 media type:
8156 <ul>
8157 <li><link to="IVirtualBox::openHardDisk"/></li>
8158 <li><link to="IVirtualBox::openDVDImage"/></li>
8159 <li><link to="IVirtualBox::openFloppyImage"/></li>
8160 </ul>
8161
8162 New hard disk media are created using the
8163 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8164 images are created outside VirtualBox, usually by storing a copy
8165 of the real medium of the corresponding type in a regular file.
8166
8167 <h3>Known Media</h3>
8168
8169 When an existing medium gets opened for the first time, it gets
8170 automatically remembered by the given VirtualBox installation or, in other
8171 words, becomes a <i>known medium</i>. Known media are stored in the media
8172 registry transparently maintained by VirtualBox and stored in settings
8173 files so that this registry is preserved when VirtualBox is not running.
8174
8175 Newly created virtual hard disks get remembered only when the associated
8176 storage unit is actually created (see IHardDisk for more details).
8177
8178 All known media can be enumerated using
8179 <link to="IVirtualBox::hardDisks"/>,
8180 <link to="IVirtualBox::DVDImages"/> and
8181 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8182 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8183 and similar methods or by location using
8184 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8185
8186 Only known media can be attached to virtual machines.
8187
8188 Removing known media from the media registry is performed when the given
8189 medium is closed using the <link to="#close"/> method or when its
8190 associated storage unit is deleted (only for hard disks).
8191
8192 <h3>Accessibility Checks</h3>
8193
8194 The given medium (with the created storage unit) is considered to be
8195 <i>accessible</i> when its storage unit can be read.
8196 Accessible media are indicated by the <link to="MediaState_Created"/>
8197 value of the <link to="#state"/> attribute. When the storage unit cannot
8198 be read (for example, because it is located on a disconnected network
8199 resource, or was accidentally deleted outside VirtualBox), the medium is
8200 considered to be <i>inaccessible</i> which is indicated by the
8201 <link to="MediaState_Inaccessible"/> state. The details about the reason
8202 of being inaccessible can be obtained using the
8203 <link to="#lastAccessError"/> attribute.
8204
8205 A new accessibility check is performed each time the <link to="#state"/>
8206 attribute is read. Please note that this check may take long time (several
8207 seconds or even minutes, depending on the storage unit location and
8208 format), and will block the calling thread until finished. For this
8209 reason, it is recommended to never read this attribute on the main UI
8210 thread to avoid making the UI unresponsive.
8211
8212 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8213 created for the first time), all known media are in the
8214 <link to="MediaState_Inaccessible"/> state but the value of the <link
8215 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
8216 accessibility check is made on startup. This is done to make the
8217 VirtualBox object ready for serving requests as
8218 fast as possible and let the end-user application decide if it needs to
8219 check media accessibility right away or not.
8220 </desc>
8221
8222 <attribute name="id" type="uuid" readonly="yes">
8223 <desc>
8224 UUID of the medium. For a newly created medium, this value is a randomly
8225 generated UUID.
8226
8227 <note>
8228 For media in one of MediaState_NotCreated, MediaState_Creating or
8229 MediaState_Deleting states, the value of this property is undefined
8230 and will most likely be an empty UUID.
8231 </note>
8232 </desc>
8233 </attribute>
8234
8235 <attribute name="description" type="wstring">
8236 <desc>
8237 Optional description of the medium. For newly created media, the value
8238 of this attribute value is <tt>null</tt>.
8239
8240 Media types that don't support this attribute will return E_NOTIMPL in
8241 attempt to get or set this attribute's value.
8242
8243 <note>
8244 For some storage types, reading this attribute may return an outdated
8245 (last known) value when <link to="#state"/> is <link
8246 to="MediaState_Inaccessible"/> or <link
8247 to="MediaState_LockedWrite"/> because the value of this attribute is
8248 stored within the storage unit itself. Also note that changing the
8249 attribute value is not possible in such case, as well as when the
8250 medium is the <link to="MediaState_LockedRead"/> state.
8251 </note>
8252 </desc>
8253 </attribute>
8254
8255 <attribute name="state" type="MediaState" readonly="yes">
8256 <desc>
8257 Current media state. Inspect <link to="MediaState"/> values for details.
8258
8259 Reading this attribute may take a long time because an accessibility
8260 check of the storage unit is performed each time the attribute is read.
8261 This check may cause a significant delay if the storage unit of the
8262 given medium is, for example, a file located on a network share which is
8263 not currently accessible due to connectivity problems -- the call will
8264 not return until a timeout interval defined by the host OS for this
8265 operation expires.
8266
8267 If the last known state of the medium is <link to="MediaState_Created"/>
8268 and the accessibility check fails then the state would be set to
8269 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8270 may be used to get more details about the failure. If the state of the
8271 medium is <link to="MediaState_LockedRead"/> or
8272 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8273 non-null value of <link to="#lastAccessError"/> will indicate a failed
8274 accessibility check in this case.
8275
8276 Note that not all media states are applicable to all media types.
8277 For example, states <link to="MediaState_NotCreated"/>,
8278 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8279 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8280 IFloppyImage media.
8281 </desc>
8282 </attribute>
8283
8284 <attribute name="location" type="wstring">
8285 <desc>
8286 Location of the storage unit holding media data.
8287
8288 The format of the location string is media type specific. For media
8289 types using regular files in a host's file system, the location
8290 string is the full file name.
8291
8292 Some media types may support changing the storage unit location by
8293 simply changing the value of this property. If this operation is not
8294 supported, the implementation will return E_NOTIMPL in attempt to set
8295 this attribute's value.
8296
8297 When setting a value of the location attribute which is a regular file
8298 in the host's file system, the given file name may be either relative to
8299 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8300 absolute. Note that if the given location specification does not contain
8301 the file extension part then a proper default extension will be
8302 automatically appended by the implementation depending on the media type.
8303 </desc>
8304 </attribute>
8305
8306 <attribute name="name" type="wstring" readonly="yes">
8307 <desc>
8308 Name of the storage unit holding media data.
8309
8310 The returned string is a short version of the <link to="#location"/>
8311 attribute that is suitable for representing the medium in situations
8312 where the full location specification is too long (such as lists
8313 and comboboxes in GUI frontends). This string is also used by frontends
8314 to sort the media list alphabetically when needed.
8315
8316 For example, for locations that are regular files in the host's file
8317 system, the value of this attribute is just the file name (+ extension),
8318 without the path specification.
8319
8320 Note that as opposed to the <link to="#location"/> attribute, the name
8321 attribute will not necessary be unique for a list of media of the
8322 given type and format.
8323 </desc>
8324 </attribute>
8325
8326 <attribute name="size" type="unsigned long long" readonly="yes">
8327 <desc>
8328 Physical size of the storage unit used to hold media data (in bytes).
8329
8330 <note>
8331 For media whose <link to="#state"/> is <link
8332 to="MediaState_Inaccessible"/>, the value of this property is the
8333 last known size. For <link to="MediaState_NotCreated"/> media,
8334 the returned value is zero.
8335 </note>
8336 </desc>
8337 </attribute>
8338
8339 <attribute name="lastAccessError" type="wstring" readonly="yes">
8340 <desc>
8341 Text message that represents the result of the last accessibility
8342 check.
8343
8344 Accessibility checks are performed each time the <link to="#state"/>
8345 attribute is read. A @c null string is returned if the last
8346 accessibility check was successful. A non-null string indicates a
8347 failure and should normally describe a reason of the failure (for
8348 example, a file read error).
8349 </desc>
8350 </attribute>
8351
8352 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
8353 <desc>
8354 Array of UUIDs of all machines this medium is attached to.
8355
8356 A <tt>null</tt> array is returned if this medium is not attached to any
8357 machine or to any machine's snapshot.
8358
8359 <note>
8360 The returned array will include a machine even if this medium is not
8361 attached to that machine in the current state but attached to it in
8362 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8363 details.
8364 </note>
8365 </desc>
8366 </attribute>
8367
8368 <method name="getSnapshotIds">
8369 <desc>
8370 Returns an array of UUIDs of all snapshots of the given machine where
8371 this medium is attached to.
8372
8373 If the medium is attached to the machine in the current state, then the
8374 first element in the array will always be the ID of the queried machine
8375 (i.e. the value equal to the @c machineId argument), followed by
8376 snapshot IDs (if any).
8377
8378 If the medium is not attached to the machine in the current state, then
8379 the array will contain only snapshot IDs.
8380
8381 The returned array may be <tt>null</tt> if this medium is not attached
8382 to the given machine at all, neither in the current state nor in one of
8383 the snapshots.
8384 </desc>
8385 <param name="machineId" type="uuid" dir="in">
8386 <desc>
8387 UUID of the machine to query.
8388 </desc>
8389 </param>
8390 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
8391 <desc>
8392 Array of snapshot UUIDs of the given machine using this medium.
8393 </desc>
8394 </param>
8395 </method>
8396
8397 <method name="lockRead">
8398 <desc>
8399 Locks this medium for reading.
8400
8401 The read lock is shared: many clients can simultaneously lock the
8402 same media for reading unless it is already locked for writing (see
8403 <link to="#lockWrite"/>) in which case an error is returned.
8404
8405 When the medium is locked for reading, it cannot be modified
8406 from within VirtualBox. This means that any method that changes
8407 the properties of this medium or contents of the storage unit
8408 will return an error (unless explicitly stated otherwise) and
8409 that an attempt to start a virtual machine that wants to modify
8410 the medium will also fail.
8411
8412 When the virtual machine is started up, it locks for reading all
8413 media it uses in read-only mode. If some media cannot be locked
8414 for reading, the startup procedure will fail.
8415
8416 The medium locked for reading must be unlocked using the <link
8417 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8418 can be nested and must be followed by the same number of paired
8419 <link to="#unlockRead"/> calls.
8420
8421 This method sets the media state to <link
8422 to="MediaState_LockedRead"/> on success. The state prior to
8423 this call must be <link to="MediaState_Created"/>, <link
8424 to="MediaState_Inaccessible"/> or <link
8425 to="MediaState_LockedRead"/>. As you can see, inaccessible
8426 media can be locked too. This is not an error; this method
8427 performs a logical lock that prevents modifications of this
8428 media through the VirtualBox API, not a physical lock of the
8429 underlying storage unit.
8430
8431 This method returns the current state of the medium
8432 <b>before</b> the operation.
8433
8434 <result name="VBOX_E_INVALID_OBJECT_STATE">
8435 Invalid media state (e.g. not created, locked, inaccessible,
8436 creating, deleting).
8437 </result>
8438
8439 </desc>
8440 <param name="state" type="MediaState" dir="return">
8441 <desc>
8442 State of the medium after the operation.
8443 </desc>
8444 </param>
8445 </method>
8446
8447 <method name="unlockRead">
8448 <desc>
8449 Cancels the read lock previously set by <link to="#lockRead"/>.
8450
8451 For both, success and failure, this method returns the current state
8452 of the medium <b>after</b> the operation.
8453
8454 See <link to="#lockRead"/> for more details.
8455
8456 <result name="VBOX_E_INVALID_OBJECT_STATE">
8457 Medium not locked for reading.
8458 </result>
8459
8460 </desc>
8461 <param name="state" type="MediaState" dir="return">
8462 <desc>
8463 State of the medium after the operation.
8464 </desc>
8465 </param>
8466 </method>
8467
8468 <method name="lockWrite">
8469 <desc>
8470 Locks this medium for writing.
8471
8472 The write lock, as opposed to <link to="#lockRead"/>, is
8473 exclusive: there may be only one client holding a write lock
8474 and there may be no read locks while the write lock is held.
8475
8476 When the medium is locked for writing, it cannot be modified
8477 from within VirtualBox and it is not guaranteed that the values
8478 of its properties are up-to-date. Any method that changes the
8479 properties of this medium or contents of the storage unit will
8480 return an error (unless explicitly stated otherwise) and an
8481 attempt to start a virtual machine wanting to modify or to
8482 read the medium will fail.
8483
8484 When the virtual machine is started up, it locks for writing all
8485 media it uses to write data to. If any medium could not be locked
8486 for writing, the startup procedure will fail.
8487
8488 The medium locked for writing must be unlocked using the <link
8489 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8490 can <b>not</b> be nested and must be followed by a<link
8491 to="#unlockWrite"/> call before the next lockWrite call.
8492
8493 This method sets the media state to <link
8494 to="MediaState_LockedWrite"/> on success. The state prior to
8495 this call must be <link to="MediaState_Created"/> or <link
8496 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8497 media can be locked too. This is not an error; this method
8498 performs a logical lock preventing modifications of this
8499 media through the VirtualBox API, not a physical lock of the
8500 underlying storage unit.
8501
8502 For both, success and failure, this method returns the current
8503 state of the medium <b>before</b> the operation.
8504
8505 <result name="VBOX_E_INVALID_OBJECT_STATE">
8506 Invalid media state (e.g. not created, locked, inaccessible,
8507 creating, deleting).
8508 </result>
8509
8510 </desc>
8511 <param name="state" type="MediaState" dir="return">
8512 <desc>
8513 State of the medium after the operation.
8514 </desc>
8515 </param>
8516 </method>
8517
8518 <method name="unlockWrite">
8519 <desc>
8520 Cancels the write lock previously set by <link to="#lockWrite"/>.
8521
8522 For both, success and failure, this method returns the current
8523 state of the medium <b>after</b> the operation.
8524
8525 See <link to="#lockWrite"/> for more details.
8526
8527 <result name="VBOX_E_INVALID_OBJECT_STATE">
8528 Medium not locked for writing.
8529 </result>
8530
8531 </desc>
8532 <param name="state" type="MediaState" dir="return">
8533 <desc>
8534 State of the medium after the operation.
8535 </desc>
8536 </param>
8537 </method>
8538
8539 <method name="close">
8540 <desc>
8541 Closes this medium.
8542
8543 The hard disk must not be attached to any known virtual machine
8544 and must not have any known child hard disks, otherwise the
8545 operation will fail.
8546
8547 When the hard disk is successfully closed, it gets removed from
8548 the list of remembered hard disks, but its storage unit is not
8549 deleted. In particular, this means that this hard disk can be
8550 later opened again using the <link
8551 to="IVirtualBox::openHardDisk"/> call.
8552
8553 Note that after this method successfully returns, the given hard
8554 disk object becomes uninitialized. This means that any attempt
8555 to call any of its methods or attributes will fail with the
8556 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8557
8558 <result name="VBOX_E_INVALID_OBJECT_STATE">
8559 Invalid media state (other than not created, created or
8560 inaccessible).
8561 </result>
8562 <result name="VBOX_E_OBJECT_IN_USE">
8563 Medium attached to virtual machine.
8564 </result>
8565 <result name="VBOX_E_FILE_ERROR">
8566 Settings file not accessible.
8567 </result>
8568 <result name="VBOX_E_XML_ERROR">
8569 Could not parse the settings file.
8570 </result>
8571
8572 </desc>
8573 </method>
8574
8575 </interface>
8576
8577
8578 <!--
8579 // IHardDisk
8580 /////////////////////////////////////////////////////////////////////////
8581 -->
8582
8583 <enum
8584 name="HardDiskType"
8585 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8586 >
8587 <desc>
8588 Virtual hard disk type.
8589 <see>IHardDisk</see>
8590 </desc>
8591
8592 <const name="Normal" value="0">
8593 <desc>
8594 Normal hard disk (attached directly or indirectly, preserved
8595 when taking snapshots).
8596 </desc>
8597 </const>
8598 <const name="Immutable" value="1">
8599 <desc>
8600 Immutable hard disk (attached indirectly, changes are wiped out
8601 after powering off the virtual machine).
8602 </desc>
8603 </const>
8604 <const name="Writethrough" value="2">
8605 <desc>
8606 Write through hard disk (attached directly, ignored when
8607 taking snapshots).
8608 </desc>
8609 </const>
8610 </enum>
8611
8612 <enum
8613 name="HardDiskVariant"
8614 uuid="99334b63-7ed0-4f61-8a7e-7ec3e20dd912"
8615 >
8616 <desc>
8617 Virtual hard disk image variant. More than one flag may be set.
8618 <see>IHardDisk</see>
8619 </desc>
8620
8621 <const name="Standard" value="0">
8622 <desc>
8623 No particular variant requested, results in using the backend default.
8624 </desc>
8625 </const>
8626 <const name="VmdkSplit2G" value="0x01">
8627 <desc>
8628 VMDK image split in chunks of less than 2GByte.
8629 </desc>
8630 </const>
8631 <const name="VmdkStreamOptimized" value="0x04">
8632 <desc>
8633 VMDK streamOptimized image. Special import/export format which is
8634 read-only/append-only.
8635 </desc>
8636 </const>
8637 <const name="Fixed" value="0x1000">
8638 <desc>
8639 Fixed image. Only allowed for base images.
8640 </desc>
8641 </const>
8642 <const name="Diff" value="0x2000">
8643 <desc>
8644 Fixed image. Only allowed for base images.
8645 </desc>
8646 </const>
8647 </enum>
8648
8649 <interface
8650 name="IHardDiskAttachment" extends="$unknown"
8651 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8652 wsmap="struct"
8653 >
8654 <desc>
8655 The IHardDiskAttachment interface represents a hard disk attachment of a
8656 virtual machine.
8657
8658 Every hard disk attachment specifies a slot of the virtual hard disk
8659 controller and a virtual hard disk attached to this slot.
8660
8661 The array of hard disk attachments is returned by
8662 <link to="IMachine::hardDiskAttachments"/>.
8663 </desc>
8664 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8665 <desc>Hard disk object associated with this attachment.</desc>
8666 </attribute>
8667
8668 <attribute name="controller" type="wstring" readonly="yes">
8669 <desc>Interface bus of this attachment.</desc>
8670 </attribute>
8671
8672 <attribute name="port" type="long" readonly="yes">
8673 <desc>Port number of this attachment.</desc>
8674 </attribute>
8675
8676 <attribute name="device" type="long" readonly="yes">
8677 <desc>Device slot number of this attachment.</desc>
8678 </attribute>
8679
8680 </interface>
8681
8682 <interface
8683 name="IHardDisk" extends="IMedium"
8684 uuid="3498d065-dee6-48bf-bcc5-47018fee4f42"
8685 wsmap="managed"
8686 >
8687 <desc>
8688 The IHardDisk interface represents a virtual hard disk drive
8689 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8690
8691 Virtual hard disk objects virtualize the hard disk hardware and look like
8692 regular hard disks for the guest OS running inside the virtual machine.
8693
8694 <h3>Hard Disk Types</h3>
8695
8696 There are three types of hard disks:
8697 <link to="HardDiskType_Normal">Normal</link>,
8698 <link to="HardDiskType_Immutable">Immutable</link> and
8699 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8700 hard disk defines how the hard disk is attached to a virtual machine and
8701 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8702 machine with the attached hard disk is taken. The type of the hard disk is
8703 defined by the <link to="#type"/> attribute.
8704
8705 All hard disks can be also divided in two big groups: <i>base</i> hard
8706 disks and <i>differencing</i> hard disks. A base hard disk contains all
8707 sectors of the hard disk data in its storage unit and therefore can be
8708 used independently. On the contrary, a differencing hard disk contains
8709 only some part of the hard disk data (a subset of sectors) and needs
8710 another hard disk to get access to the missing sectors of data. This
8711 another hard disk is called a <i>parent</i> hard disk and defines a hard
8712 disk to which this differencing hard disk is known to be <i>linked to</i>.
8713 The parent hard disk may be itself a differencing hard disk. This
8714 way, differencing hard disks form a linked hard disk chain. This chain
8715 always ends with the base hard disk which is sometimes referred to as the
8716 root hard disk of this chain. Note that several differencing hard disks
8717 may be linked to the same parent hard disk. This way, all known hard disks
8718 form a hard disk tree which is based on their parent-child relationship.
8719
8720 Differencing hard disks can be distinguished from base hard disks by
8721 querying the <link to="#parent"/> attribute: base hard disks do not have
8722 parents they would depend on, so the value of this attribute is always
8723 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8724 the hard disk tree (from the child hard disk to its parent). It is also
8725 possible to walk down the tree using the <link to="#children"/>
8726 attribute.
8727
8728 Note that the type of all differencing hard disks is
8729 <link to="HardDiskType_Normal">Normal</link>; all other values are
8730 meaningless for them. Base hard disks may be of any type.
8731
8732 <h3>Creating Hard Disks</h3>
8733
8734 New base hard disks are created using
8735 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8736 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8737 disks are usually implicitly created by VirtualBox when needed but may
8738 also be created explicitly using <link to="#createDiffStorage"/>.
8739
8740 After the hard disk is successfully created (including the storage unit)
8741 or opened, it becomes a known hard disk (remembered in the internal media
8742 registry). Known hard disks can be attached to a virtual machine, accessed
8743 through <link to="IVirtualBox::getHardDisk"/> and
8744 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8745 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8746
8747 The following methods, besides <link to="IMedium::close"/>,
8748 automatically remove the hard disk from the media registry:
8749 <ul>
8750 <li><link to="#deleteStorage"/></li>
8751 <li><link to="#mergeTo"/></li>
8752 </ul>
8753
8754 If the storage unit of the hard disk is a regular file in the host's
8755 file system then the rules stated in the description of the
8756 <link to="IMedium::location"/> attribute apply when setting its value. In
8757 addition, a plain file name without any path may be given, in which case
8758 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8759 folder</link> will be prepended to it.
8760
8761 <h4>Automatic composition of the file name part</h4>
8762
8763 Another extension to the <link to="IMedium::location"/> attribute is that
8764 there is a possibility to cause VirtualBox to compose a unique value for
8765 the file name part of the location using the UUID of the hard disk. This
8766 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8767 e.g. before the storage unit is created, and works as follows. You set the
8768 value of the <link to="IMedium::location"/> attribute to a location
8769 specification which only contains the path specification but not the file
8770 name part and ends with either a forward slash or a backslash character.
8771 In response, VirtualBox will generate a new UUID for the hard disk and
8772 compose the file name using the following pattern:
8773 <pre>
8774 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8775 </pre>
8776 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8777 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8778 is the default extension for the storage format of this hard disk. After
8779 that, you may call any of the methods that create a new hard disk storage
8780 unit and they will use the generated UUID and file name.
8781
8782 <h3>Attaching Hard Disks</h3>
8783
8784 Hard disks are attached to virtual machines using the
8785 <link to="IMachine::attachHardDisk"/> method and detached using the
8786 <link to="IMachine::detachHardDisk"/> method. Depending on their
8787 <link to="#type"/>, hard disks are attached either
8788 <i>directly</i> or <i>indirectly</i>.
8789
8790 When a hard disk is being attached directly, it is associated with the
8791 virtual machine and used for hard disk operations when the machine is
8792 running. When a hard disk is being attached indirectly, a new differencing
8793 hard disk linked to it is implicitly created and this differencing hard
8794 disk is associated with the machine and used for hard disk operations.
8795 This also means that if <link to="IMachine::attachHardDisk"/> performs
8796 a direct attachment then the same hard disk will be returned in response
8797 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8798 an indirect attachment is performed then
8799 <link to="IMachine::getHardDisk"/> will return the implicitly created
8800 differencing hard disk, not the original one passed to <link
8801 to="IMachine::attachHardDisk"/>. The following table shows the
8802 dependency of the attachment type on the hard disk type:
8803
8804 <table>
8805 <tr>
8806 <th>Hard Disk Type</th>
8807 <th>Direct or Indirect?</th>
8808 </tr>
8809 <tr>
8810 <td>Normal (Base)</td>
8811 <td>
8812 Normal base hard disks that do not have children (i.e. differencing
8813 hard disks linked to them) and that are not already attached to
8814 virtual machines in snapshots are attached <b>directly</b>.
8815 Otherwise, they are attached <b>indirectly</b> because having
8816 dependent children or being part of the snapshot makes it impossible
8817 to modify hard disk contents without breaking the integrity of the
8818 dependent party. The <link to="#readOnly"/> attribute allows to
8819 quickly determine the kind of the attachment for the given hard
8820 disk. Note that if a normal base hard disk is to be indirectly
8821 attached to a virtual machine with snapshots then a special
8822 procedure called <i>smart attachment</i> is performed (see below).
8823 </td>
8824 </tr>
8825 <tr>
8826 <td>Normal (Differencing)</td>
8827 <td>
8828 Differencing hard disks are like normal base hard disks: attached
8829 <b>directly</b> if they do not have children and are not attached to
8830 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8831 that the smart attachment procedure is never performed for
8832 differencing hard disks.
8833 </td>
8834 </tr>
8835 <tr>
8836 <td>Immutable</td>
8837 <td>
8838 Immutable hard disks are always attached <b>indirectly</b> because
8839 they are designed to be non-writable. If an immutable hard disk is
8840 attached to a virtual machine with snapshots then a special
8841 procedure called smart attachment is performed (see below).
8842 </td>
8843 </tr>
8844 <tr>
8845 <td>Writethrough</td>
8846 <td>
8847 Writethrough hard disks are always attached <b>directly</b>, also as
8848 designed. This also means that writethrough hard disks cannot have
8849 other hard disks linked to them at all.
8850 </td>
8851 </tr>
8852 </table>
8853
8854 Note that the same hard disk, regardless of its type, may be attached to
8855 more than one virtual machine at a time. In this case, the machine that is
8856 started first gains exclusive access to the hard disk and attempts to
8857 start other machines having this hard disk attached will fail until the
8858 first machine is powered down.
8859
8860 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8861 that the given hard disk remains associated with the given machine after a
8862 successful <link to="IMachine::detachHardDisk"/> call until
8863 <link to="IMachine::saveSettings"/> is called to save all changes to
8864 machine settings to disk. This deferring is necessary to guarantee that
8865 the hard disk configuration may be restored at any time by a call to
8866 <link to="IMachine::discardSettings"/> before the settings
8867 are saved (committed).
8868
8869 Note that if <link to="IMachine::discardSettings"/> is called after
8870 indirectly attaching some hard disks to the machine but before a call to
8871 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8872 all differencing hard disks implicitly created by
8873 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
8874 Such implicitly created hard disks will also be immediately deleted when
8875 detached explicitly using the <link to="IMachine::detachHardDisk"/>
8876 call if it is made before <link to="IMachine::saveSettings"/>. This
8877 implicit deletion is safe because newly created differencing hard
8878 disks do not contain any user data.
8879
8880 However, keep in mind that detaching differencing hard disks that were
8881 implicitly created by <link to="IMachine::attachHardDisk"/>
8882 before the last <link to="IMachine::saveSettings"/> call will
8883 <b>not</b> implicitly delete them as they may already contain some data
8884 (for example, as a result of virtual machine execution). If these hard
8885 disks are no more necessary, the caller can always delete them explicitly
8886 using <link to="#deleteStorage"/> after they are actually de-associated
8887 from this machine by the <link to="IMachine::saveSettings"/> call.
8888
8889 <h3>Smart Attachment</h3>
8890
8891 When normal base or immutable hard disks are indirectly attached to a
8892 virtual machine then some additional steps are performed to make sure the
8893 virtual machine will have the most recent "view" of the hard disk being
8894 attached. These steps include walking through the machine's snapshots
8895 starting from the current one and going through ancestors up to the first
8896 snapshot. Hard disks attached to the virtual machine in all
8897 of the encountered snapshots are checked whether they are descendants of
8898 the given normal base or immutable hard disk. The first found child (which
8899 is the differencing hard disk) will be used instead of the normal base or
8900 immutable hard disk as a parent for creating a new differencing hard disk
8901 that will be actually attached to the machine. And only if no descendants
8902 are found or if the virtual machine does not have any snapshots then the
8903 normal base or immutable hard disk will be used itself as a parent for
8904 this differencing hard disk.
8905
8906 It is easier to explain what smart attachment does using the
8907 following example:
8908 <pre>
8909BEFORE attaching B.vdi: AFTER attaching B.vdi:
8910
8911Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8912 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8913 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8914 Snapshot 4 (none) Snapshot 4 (none)
8915 CurState (none) CurState (D3->D2.vdi)
8916
8917 NOT
8918 ...
8919 CurState (D3->B.vdi)
8920 </pre>
8921 The first column is the virtual machine configuration before the base hard
8922 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8923 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8924 mean that the hard disk that is actually attached to the machine is a
8925 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8926 another hard disk, <tt>B.vdi</tt>.
8927
8928 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8929 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8930 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8931 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8932 it cannot be attached directly and needs an indirect attachment (i.e.
8933 implicit creation of a new differencing hard disk). Due to the smart
8934 attachment procedure, the new differencing hard disk
8935 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8936 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8937 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8938 machine.
8939
8940 Note that if there is more than one descendant hard disk of the given base
8941 hard disk found in a snapshot, and there is an exact device, channel and
8942 bus match, then this exact match will be used. Otherwise, the youngest
8943 descendant will be picked up.
8944
8945 There is one more important aspect of the smart attachment procedure which
8946 is not related to snapshots at all. Before walking through the snapshots
8947 as described above, the backup copy of the current list of hard disk
8948 attachment is searched for descendants. This backup copy is created when
8949 the hard disk configuration is changed for the first time after the last
8950 <link to="IMachine::saveSettings"/> call and used by
8951 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8952 changes. When such a descendant is found in this backup copy, it will be
8953 simply re-attached back, without creating a new differencing hard disk for
8954 it. This optimization is necessary to make it possible to re-attach the
8955 base or immutable hard disk to a different bus, channel or device slot
8956 without losing the contents of the differencing hard disk actually
8957 attached to the machine in place of it.
8958 </desc>
8959
8960 <attribute name="format" type="wstring" readonly="yes">
8961 <desc>
8962 Storage format of this hard disk.
8963
8964 The value of this attribute is a string that specifies a backend used to
8965 store hard disk data. The storage format is defined when you create a
8966 new hard disk or automatically detected when you open an existing hard
8967 disk medium, and cannot be changed later.
8968
8969 The list of all storage formats supported by this VirtualBox
8970 installation can be obtained using
8971 <link to="ISystemProperties::hardDiskFormats"/>.
8972 </desc>
8973 </attribute>
8974
8975 <attribute name="type" type="HardDiskType">
8976 <desc>
8977 Type (role) of this hard disk.
8978
8979 The following constraints apply when changing the value of this
8980 attribute:
8981 <ul>
8982 <li>If a hard disk is attached to a virtual machine (either in the
8983 current state or in one of the snapshots), its type cannot be
8984 changed.
8985 </li>
8986 <li>As long as the hard disk has children, its type cannot be set
8987 to <link to="HardDiskType_Writethrough"/>.
8988 </li>
8989 <li>The type of all differencing hard disks is
8990 <link to="HardDiskType_Normal"/> and cannot be changed.
8991 </li>
8992 </ul>
8993
8994 The type of a newly created or opened hard disk is set to
8995 <link to="HardDiskType_Normal"/>.
8996 </desc>
8997 </attribute>
8998
8999 <attribute name="parent" type="IHardDisk" readonly="yes">
9000 <desc>
9001 Parent of this hard disk (a hard disk this hard disk is directly based
9002 on).
9003
9004 Only differencing hard disks have parents. For base (non-differencing)
9005 hard disks, <tt>null</tt> is returned.
9006 </desc>
9007 </attribute>
9008
9009 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
9010 <desc>
9011 Children of this hard disk (all differencing hard disks directly based
9012 on this hard disk). A <tt>null</tt> array is returned if this hard disk
9013 does not have any children.
9014 </desc>
9015 </attribute>
9016
9017 <attribute name="root" type="IHardDisk" readonly="yes">
9018 <desc>
9019 Root hard disk of this hard disk.
9020
9021 If this is a differencing hard disk, its root hard disk is the base hard
9022 disk the given hard disk branch starts from. For all other types of hard
9023 disks, this property returns the hard disk object itself (i.e. the same
9024 object this property is read on).
9025 </desc>
9026 </attribute>
9027
9028 <attribute name="readOnly" type="boolean" readonly="yes">
9029 <desc>
9030 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
9031 otherwise.
9032
9033 A hard disk is considered to be read-only when its contents cannot be
9034 modified without breaking the integrity of other parties that depend on
9035 this hard disk such as its child hard disks or snapshots of virtual
9036 machines where this hard disk is attached to these machines. If there
9037 are no children and no such snapshots then there is no dependency and
9038 the hard disk is not read-only.
9039
9040 The value of this attribute can be used to determine the kind of the
9041 attachment that will take place when attaching this hard disk to a
9042 virtual machine. If the value is <tt>false</tt> then the hard disk will
9043 be attached directly. If the value is <tt>true</tt> then the hard disk
9044 will be attached indirectly by creating a new differencing child hard
9045 disk for that. See the interface description for more information.
9046
9047 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
9048 disks are always read-only while all
9049 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
9050 always not.
9051
9052 <note>
9053 The read-only condition represented by this attribute is related to
9054 the hard disk type and usage, not to the current
9055 <link to="IMedium::state">media state</link> and not to the read-only
9056 state of the storage unit.
9057 </note>
9058 </desc>
9059 </attribute>
9060
9061 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9062 <desc>
9063 Logical size of this hard disk (in megabytes), as reported to the
9064 guest OS running inside the virtual machine this disk is
9065 attached to. The logical size is defined when the hard disk is created
9066 and cannot be changed later.
9067
9068 <note>
9069 Reading this property on a differencing hard disk will return the size
9070 of its <link to="#root"/> hard disk.
9071 </note>
9072 <note>
9073 For hard disks whose state is <link to="#state"/> is <link
9074 to="MediaState_Inaccessible"/>, the value of this property is the
9075 last known logical size. For <link to="MediaState_NotCreated"/> hard
9076 disks, the returned value is zero.
9077 </note>
9078 </desc>
9079 </attribute>
9080
9081 <attribute name="autoReset" type="boolean">
9082 <desc>
9083 Whether this differencing hard disk will be automatically reset each
9084 time a virtual machine it is attached to is powered up.
9085
9086 See <link to="#reset()"/> for more information about resetting
9087 differencing hard disks.
9088
9089 <note>
9090 Reading this property on a base (non-differencing) hard disk will
9091 always <tt>false</tt>. Changing the value of this property in this
9092 case is not supported.
9093 </note>
9094
9095 <result name="VBOX_E_NOT_SUPPORTED">
9096 This is not a differencing hard disk (when changing the attribute
9097 value).
9098 </result>
9099 </desc>
9100 </attribute>
9101
9102 <!-- storage methods -->
9103
9104 <method name="getProperty">
9105 <desc>
9106 Returns the value of the custom hard disk property with the given name.
9107
9108 The list of all properties supported by the given hard disk format can
9109 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9110
9111 Note that if this method returns a <tt>null</tt> @a value, the requested
9112 property is supported but currently not assigned any value.
9113
9114 <result name="VBOX_E_OBJECT_NOT_FOUND">
9115 Requested property does not exist (not supported by the format).
9116 </result>
9117 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9118 </desc>
9119 <param name="name" type="wstring" dir="in">
9120 <desc>Name of the property to get.</desc>
9121 </param>
9122 <param name="value" type="wstring" dir="return">
9123 <desc>Current property value.</desc>
9124 </param>
9125 </method>
9126
9127 <method name="setProperty">
9128 <desc>
9129 Sets the value of the custom hard disk property with the given name.
9130
9131 The list of all properties supported by the given hard disk format can
9132 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9133
9134 Note that setting the property value to <tt>null</tt> is equivalent to
9135 deleting the existing value. A default value (if it is defined for this
9136 property) will be used by the format backend in this case.
9137
9138 <result name="VBOX_E_OBJECT_NOT_FOUND">
9139 Requested property does not exist (not supported by the format).
9140 </result>
9141 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9142 </desc>
9143 <param name="name" type="wstring" dir="in">
9144 <desc>Name of the property to set.</desc>
9145 </param>
9146 <param name="value" type="wstring" dir="in">
9147 <desc>Property value to set.</desc>
9148 </param>
9149 </method>
9150
9151 <method name="getProperties">
9152 <desc>
9153 Returns values for a group of properties in one call.
9154
9155 The names of the properties to get are specified using the @a names
9156 argument which is a list of comma-separated property names or
9157 <tt>null</tt> if all properties are to be returned. Note that currently
9158 the value of this argument is ignored and the method always returns all
9159 existing properties.
9160
9161 The list of all properties supported by the given hard disk format can
9162 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9163
9164 The method returns two arrays, the array of property names corresponding
9165 to the @a names argument and the current values of these properties.
9166 Both arrays have the same number of elements with each elemend at the
9167 given index in the first array corresponds to an element at the same
9168 index in the second array.
9169
9170 Note that for properties that do not have assigned values,
9171 <tt>null</tt> is returned at the appropriate index in the
9172 @a returnValues array.
9173
9174 </desc>
9175 <param name="names" type="wstring" dir="in">
9176 <desc>
9177 Names of properties to get.
9178 </desc>
9179 </param>
9180 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9181 <desc>Names of returned properties.</desc>
9182 </param>
9183 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9184 <desc>Values of returned properties.</desc>
9185 </param>
9186 </method>
9187
9188 <method name="setProperties">
9189 <desc>
9190 Sets values for a group of properties in one call.
9191
9192 The names of the properties to set are passed in the @a names
9193 array along with the new values for them in the @a values array. Both
9194 arrays have the same number of elements with each elemend at the given
9195 index in the first array corresponding to an element at the same index
9196 in the second array.
9197
9198 If there is at least one property name in @a names that is not valid,
9199 the method will fail before changing the values of any other properties
9200 from the @a names array.
9201
9202 Using this method over <link to="#setProperty"/> is preferred if you
9203 need to set several properties at once since it will result into less
9204 IPC calls.
9205
9206 The list of all properties supported by the given hard disk format can
9207 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9208
9209 Note that setting the property value to <tt>null</tt> is equivalent to
9210 deleting the existing value. A default value (if it is defined for this
9211 property) will be used by the format backend in this case.
9212 </desc>
9213 <param name="names" type="wstring" safearray="yes" dir="in">
9214 <desc>Names of properties to set.</desc>
9215 </param>
9216 <param name="values" type="wstring" safearray="yes" dir="in">
9217 <desc>Values of properties to set.</desc>
9218 </param>
9219 </method>
9220
9221 <!-- storage methods -->
9222
9223 <method name="createBaseStorage">
9224 <desc>
9225 Starts creating a hard disk storage unit (fixed/dynamic, according
9226 to the variant flags) in in the background. The previous storage unit
9227 created for this object, if any, must first be deleted using
9228 <link to="#deleteStorage"/>, otherwise the operation will fail.
9229
9230 Before the operation starts, the hard disk is placed in
9231 <link to="MediaState_Creating"/> state. If the create operation
9232 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9233 state.
9234
9235 After the returned progress object reports that the operation has
9236 successfully completed, the media state will be set to <link
9237 to="MediaState_Created"/>, the hard disk will be remembered by this
9238 VirtualBox installation and may be attached to virtual machines.
9239
9240 <result name="VBOX_E_NOT_SUPPORTED">
9241 The variant of storage creation operation is not supported. See <link
9242 to="IHardDiskFormat::capabilities"/>.
9243 </result>
9244 </desc>
9245 <param name="logicalSize" type="unsigned long long" dir="in">
9246 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9247 </param>
9248 <param name="variant" type="HardDiskVariant" dir="in">
9249 <desc>Exact image variant which should be created.</desc>
9250 </param>
9251 <param name="progress" type="IProgress" dir="return">
9252 <desc>Progress object to track the operation completion.</desc>
9253 </param>
9254 </method>
9255
9256 <method name="deleteStorage">
9257 <desc>
9258 Starts deleting the storage unit of this hard disk.
9259
9260 The hard disk must not be attached to any known virtual machine and must
9261 not have any known child hard disks, otherwise the operation will fail.
9262 It will also fail if there is no storage unit to delete or if deletion
9263 is already in progress, or if the hard disk is being in use (locked for
9264 read or for write) or inaccessible. Therefore, the only valid state for
9265 this operation to succeed is <link to="MediaState_Created"/>.
9266
9267 Before the operation starts, the hard disk is placed to
9268 <link to="MediaState_Deleting"/> state and gets removed from the list
9269 of remembered hard disks (media registry). If the delete operation
9270 fails, the media will be remembered again and placed back to
9271 <link to="MediaState_Created"/> state.
9272
9273 After the returned progress object reports that the operation is
9274 complete, the media state will be set to
9275 <link to="MediaState_NotCreated"/> and you will be able to use one of
9276 the storage creation methods to create it again.
9277
9278 <see>#close()</see>
9279
9280 <result name="VBOX_E_OBJECT_IN_USE">
9281 Hard disk is attached to a virtual machine.
9282 </result>
9283 <result name="VBOX_E_NOT_SUPPORTED">
9284 Storage deletion is not allowed because neither of storage creation
9285 operations are supported. See
9286 <link to="IHardDiskFormat::capabilities"/>.
9287 </result>
9288
9289 <note>
9290 If the deletion operation fails, it is not guaranteed that the storage
9291 unit still exists. You may check the <link to="IMedium::state"/> value
9292 to answer this question.
9293 </note>
9294 </desc>
9295 <param name="progress" type="IProgress" dir="return">
9296 <desc>Progress object to track the operation completion.</desc>
9297 </param>
9298 </method>
9299
9300 <!-- diff methods -->
9301
9302 <method name="createDiffStorage">
9303 <desc>
9304 Starts creating an empty differencing storage unit based on this hard
9305 disk in the format and at the location defined by the @a target
9306 argument.
9307
9308 The target hard disk must be in <link to="MediaState_NotCreated"/>
9309 state (i.e. must not have an existing storage unit). Upon successful
9310 completion, this operation will set the type of the target hard disk to
9311 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9312 represent the differencing hard disk data in the given format (according
9313 to the storage format of the target object).
9314
9315 After the returned progress object reports that the operation is
9316 successfully complete, the target hard disk gets remembered by this
9317 VirtualBox installation and may be attached to virtual machines.
9318
9319 <note>
9320 The hard disk will be set to <link to="MediaState_LockedRead"/>
9321 state for the duration of this operation.
9322 </note>
9323 <result name="VBOX_E_OBJECT_IN_USE">
9324 Hard disk not in NotCreated state.
9325 </result>
9326 </desc>
9327 <param name="target" type="IHardDisk" dir="in">
9328 <desc>Target hard disk.</desc>
9329 </param>
9330 <param name="variant" type="HardDiskVariant" dir="in">
9331 <desc>Exact image variant which should be created.</desc>
9332 </param>
9333 <param name="progress" type="IProgress" dir="return">
9334 <desc>Progress object to track the operation completion.</desc>
9335 </param>
9336 </method>
9337
9338 <method name="mergeTo">
9339 <desc>
9340 Starts merging the contents of this hard disk and all intermediate
9341 differencing hard disks in the chain to the given target hard disk.
9342
9343 The target hard disk must be either a descendant of this hard disk or
9344 its ancestor (otherwise this method will immediately return a failure).
9345 It follows that there are two logical directions of the merge operation:
9346 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9347 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9348 chain:
9349
9350 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9351
9352 Here, calling this method on the <tt>Base</tt> hard disk object with
9353 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9354 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9355 merge. Note that in both cases the contents of the resulting hard disk
9356 will be the same, the only difference is the hard disk object that takes
9357 the result of the merge operation. In case of the forward merge in the
9358 above example, the result will be written to <tt>Diff_2</tt>; in case of
9359 the backward merge, the result will be written to <tt>Base</tt>. In
9360 other words, the result of the operation is always stored in the target
9361 hard disk.
9362
9363 Upon successful operation completion, the storage units of all hard
9364 disks in the chain between this (source) hard disk and the target hard
9365 disk, including the source hard disk itself, will be automatically
9366 deleted and the relevant hard disk objects (including this hard disk)
9367 will become uninitialized. This means that any attempt to call any of
9368 their methods or attributes will fail with the
9369 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9370 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9371 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9372 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9373 disk itself since it will no longer be based on any other hard disk.
9374
9375 Considering the above, all of the following conditions must be met in
9376 order for the merge operation to succeed:
9377 <ul>
9378 <li>
9379 Neither this (source) hard disk nor any intermediate
9380 differencing hard disk in the chain between it and the target
9381 hard disk is attached to any virtual machine.
9382 </li>
9383 <li>
9384 Neither the source hard disk nor the target hard disk is an
9385 <link to="HardDiskType_Immutable"/> hard disk.
9386 </li>
9387 <li>
9388 The part of the hard disk tree from the source hard disk to the
9389 target hard disk is a linear chain, i.e. all hard disks in this
9390 chain have exactly one child which is the next hard disk in this
9391 chain. The only exception from this rule is the target hard disk in
9392 the forward merge operation; it is allowed to have any number of
9393 child hard disks because the merge operation will hot change its
9394 logical contents (as it is seen by the guest OS or by children).
9395 </li>
9396 <li>
9397 None of the involved hard disks are in
9398 <link to="MediaState_LockedRead"/> or
9399 <link to="MediaState_LockedWrite"/> state.
9400 </li>
9401 </ul>
9402
9403 <note>
9404 This (source) hard disk and all intermediates will be placed to <link
9405 to="MediaState_Deleting"/> state and the target hard disk will be
9406 placed to <link to="MediaState_LockedWrite"/> state and for the
9407 duration of this operation.
9408 </note>
9409 </desc>
9410 <param name="targetId" type="uuid" dir="in">
9411 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9412 </param>
9413 <param name="progress" type="IProgress" dir="return">
9414 <desc>Progress object to track the operation completion.</desc>
9415 </param>
9416 </method>
9417
9418 <!-- clone methods -->
9419
9420 <method name="cloneTo">
9421 <desc>
9422 Starts creating a clone of this hard disk in the format and at the
9423 location defined by the @a target argument.
9424
9425 The target hard disk must be in <link to="MediaState_NotCreated"/>
9426 state (i.e. must not have an existing storage unit). Upon successful
9427 completion, the cloned hard disk will contain exactly the same sector
9428 data as the hard disk being cloned, except that a new UUID for the clone
9429 will be randomly generated.
9430
9431 After the returned progress object reports that the operation is
9432 successfully complete, the target hard disk gets remembered by this
9433 VirtualBox installation and may be attached to virtual machines.
9434
9435 <note>
9436 If the cloned hard disk is a differencing hard disk, it will inherit
9437 parent dependency of the original hard disk.
9438 </note>
9439 <note>
9440 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9441 state for the duration of this operation.
9442 </note>
9443 </desc>
9444 <param name="target" type="IHardDisk" dir="in">
9445 <desc>Target hard disk.</desc>
9446 </param>
9447 <param name="variant" type="HardDiskVariant" dir="in">
9448 <desc>Exact image variant which should be created.</desc>
9449 </param>
9450 <param name="progress" type="IProgress" dir="return">
9451 <desc>Progress object to track the operation completion.</desc>
9452 </param>
9453 </method>
9454
9455 <method name="flattenTo">
9456 <desc>
9457 Starts creating a deep (independent) clone of this hard disk in the
9458 format and at the location defined by the @a target argument.
9459
9460 This operation is similar to <link to="#cloneTo"/> except that when
9461 applied to a differencing hard disk, it will also copy missing hard disk
9462 data from all parent hard disks it is linked to. This will make the
9463 created clone an independent base hard disk that contains all hard disk
9464 data and does not need any other hard disks to operate.
9465
9466 After the returned progress object reports that the operation is
9467 successfully complete, the target hard disk gets remembered by this
9468 VirtualBox installation and may be attached to virtual machines.
9469
9470 <note>
9471 For base hard disks, this operation is identical to
9472 <link to="#cloneTo"/>.
9473 </note>
9474 <note>
9475 This hard disk and all its parent hard disks will be placed to <link
9476 to="MediaState_LockedRead"/> state for the duration of this
9477 operation.
9478 </note>
9479 </desc>
9480 <param name="target" type="IHardDisk" dir="in">
9481 <desc>Target hard disk.</desc>
9482 </param>
9483 <param name="variant" type="HardDiskVariant" dir="in">
9484 <desc>Exact image variant which should be created.</desc>
9485 </param>
9486 <param name="progress" type="IProgress" dir="return">
9487 <desc>Progress object to track the operation completion.</desc>
9488 </param>
9489 </method>
9490
9491 <!-- other methods -->
9492
9493 <method name="compact">
9494 <desc>
9495 Starts compacting of this hard disk. This means that the disk is
9496 transformed into a possibly more compact storage representation.
9497 This potentially creates temporary images, which can require a
9498 substantial amount of additional disk space.
9499
9500 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9501 state and all its parent hard disks (if any) will be placed to
9502 <link to="MediaState_LockedRead"/> state for the duration of this
9503 operation.
9504 </desc>
9505 <param name="progress" type="IProgress" dir="return">
9506 <desc>Progress object to track the operation completion.</desc>
9507 </param>
9508 </method>
9509
9510 <method name="reset">
9511 <desc>
9512 Starts erasing the contents of this differencing hard disk.
9513
9514 This operation will reset the differencing hard disk to its initial
9515 state when it does not contain any sector data and any read operation is
9516 redirected to its parent hard disk.
9517
9518 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9519 for the duration of this operation.
9520
9521 <result name="VBOX_E_NOT_SUPPORTED">
9522 This is not a differencing hard disk.
9523 </result>
9524 <result name="VBOX_E_INVALID_OBJECT_STATE">
9525 Hard disk is not in <link to="MediaState_Created"/> or
9526 <link to="MediaState_Inaccessible"/> state.
9527 </result>
9528 </desc>
9529 <param name="progress" type="IProgress" dir="return">
9530 <desc>Progress object to track the operation completion.</desc>
9531 </param>
9532 </method>
9533
9534 </interface>
9535
9536
9537 <!--
9538 // IHardDiskFormat
9539 /////////////////////////////////////////////////////////////////////////
9540 -->
9541
9542 <enum
9543 name="DataType"
9544 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9545 >
9546 <const name="Int32" value="0"/>
9547 <const name="Int8" value="1"/>
9548 <const name="String" value="2"/>
9549 </enum>
9550
9551 <enum
9552 name="DataFlags"
9553 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9554 >
9555 <const name="None" value="0x00"/>
9556 <const name="Mandatory" value="0x01"/>
9557 <const name="Expert" value="0x02"/>
9558 <const name="Array" value="0x04"/>
9559 <const name="FlagMask" value="0x07"/>
9560 </enum>
9561
9562 <enum
9563 name="HardDiskFormatCapabilities"
9564 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9565 >
9566 <desc>
9567 Hard disk format capability flags.
9568 </desc>
9569
9570 <const name="Uuid" value="0x01">
9571 <desc>
9572 Supports UUIDs as expected by VirtualBox code.
9573 </desc>
9574 </const>
9575
9576 <const name="CreateFixed" value="0x02">
9577 <desc>
9578 Supports creating fixed size images, allocating all space instantly.
9579 </desc>
9580 </const>
9581
9582 <const name="CreateDynamic" value="0x04">
9583 <desc>
9584 Supports creating dynamically growing images, allocating space on
9585 demand.
9586 </desc>
9587 </const>
9588
9589 <const name="CreateSplit2G" value="0x08">
9590 <desc>
9591 Supports creating images split in chunks of a bit less than 2 GBytes.
9592 </desc>
9593 </const>
9594
9595 <const name="Differencing" value="0x10">
9596 <desc>
9597 Supports being used as a format for differencing hard disks (see <link
9598 to="IHardDisk::createDiffStorage"/>).
9599 </desc>
9600 </const>
9601
9602 <const name="Asynchronous" value="0x20">
9603 <desc>
9604 Supports asynchronous I/O operations for at least some configurations.
9605 </desc>
9606 </const>
9607
9608 <const name="File" value="0x40">
9609 <desc>
9610 The format backend operates on files (the <link to="IMedium::location"/>
9611 attribute of the hard disk specifies a file used to store hard disk
9612 data; for a list of supported file extensions see
9613 <link to="IHardDiskFormat::fileExtensions"/>).
9614 </desc>
9615 </const>
9616
9617 <const name="Properties" value="0x80">
9618 <desc>
9619 The format backend uses the property interface to configure the storage
9620 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9621 method is used to get access to properties supported by the given hard
9622 disk format).
9623 </desc>
9624 </const>
9625
9626 <const name="CapabilityMask" value="0xFF"/>
9627 </enum>
9628
9629 <interface
9630 name="IHardDiskFormat" extends="$unknown"
9631 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9632 wsmap="managed"
9633 >
9634 <desc>
9635 The IHardDiskFormat interface represents a virtual hard disk format.
9636
9637 Each hard disk format has an associated backend which is used to handle
9638 hard disks stored in this format. This interface provides information
9639 about the properties of the associated backend.
9640
9641 Each hard disk format is identified by a string represented by the
9642 <link to="#id"/> attribute. This string is used in calls like
9643 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9644 format.
9645
9646 The list of all supported hard disk formats can be obtained using
9647 <link to="ISystemProperties::hardDiskFormats"/>.
9648
9649 <see>IHardDisk</see>
9650 </desc>
9651
9652 <attribute name="id" type="wstring" readonly="yes">
9653 <desc>
9654 Identifier of this format.
9655
9656 The format identifier is a non-null non-empty ASCII string. Note that
9657 this string is case-insensitive. This means that, for example, all of
9658 the following strings:
9659 <pre>
9660 "VDI"
9661 "vdi"
9662 "VdI"</pre>
9663 refer to the same hard disk format.
9664
9665 This string is used in methods of other interfaces where it is necessary
9666 to specify a hard disk format, such as
9667 <link to="IVirtualBox::createHardDisk"/>.
9668 </desc>
9669 </attribute>
9670
9671 <attribute name="name" type="wstring" readonly="yes">
9672 <desc>
9673 Human readable description of this format.
9674
9675 Mainly for use in file open dialogs.
9676 </desc>
9677 </attribute>
9678
9679 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9680 <desc>
9681 Array of strings containing the supported file extensions.
9682
9683 The first extension in the array is the extension preferred by the
9684 backend. It is recommended to use this extension when specifying a
9685 location of the storage unit for a new hard disk.
9686
9687 Note that some backends do not work on files, so this array may be
9688 empty.
9689
9690 <see>IHardDiskFormat::capabilities</see>
9691 </desc>
9692 </attribute>
9693
9694 <attribute name="capabilities" type="unsigned long" readonly="yes">
9695 <desc>
9696 Capabilities of the format as a set of bit flags.
9697
9698 For the meaning of individual capability flags see
9699 <link to="HardDiskFormatCapabilities"/>.
9700 </desc>
9701 </attribute>
9702
9703 <method name="describeProperties">
9704 <desc>
9705 Returns several arrays describing the properties supported by this
9706 format.
9707
9708 An element with the given index in each array describes one
9709 property. Thus, the number of elements in each returned array is the
9710 same and corresponds to the number of supported properties.
9711
9712 The returned arrays are filled in only if the
9713 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9714 All arguments must be non-NULL.
9715
9716 <see>DataType</see>
9717 <see>DataFlags</see>
9718 </desc>
9719
9720 <param name="names" type="wstring" safearray="yes" dir="out">
9721 <desc>Array of property names.</desc>
9722 </param>
9723 <param name="description" type="wstring" safearray="yes" dir="out">
9724 <desc>Array of property descriptions.</desc>
9725 </param>
9726 <param name="types" type="DataType" safearray="yes" dir="out">
9727 <desc>Array of property types.</desc>
9728 </param>
9729 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9730 <desc>Array of property flags.</desc>
9731 </param>
9732 <param name="defaults" type="wstring" safearray="yes" dir="out">
9733 <desc>Array of default property values.</desc>
9734 </param>
9735 </method>
9736
9737 </interface>
9738
9739
9740 <!--
9741 // IFloppyImage
9742 /////////////////////////////////////////////////////////////////////////
9743 -->
9744
9745 <interface
9746 name="IFloppyImage" extends="IMedium"
9747 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9748 wsmap="managed"
9749 >
9750 <desc>
9751 The IFloppyImage interface represents a medium containing the image
9752 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9753 </desc>
9754
9755 </interface>
9756
9757
9758 <!--
9759 // IDVDImage
9760 /////////////////////////////////////////////////////////////////////////
9761 -->
9762
9763 <interface
9764 name="IDVDImage" extends="IMedium"
9765 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9766 wsmap="managed"
9767 >
9768 <desc>
9769 The IDVDImage interface represents a medium containing the image
9770 of a CD or DVD disk in the ISO format.
9771
9772 This is a subclass of <link to="IMedium" />; see remarks there.
9773 </desc>
9774
9775 </interface>
9776
9777
9778 <!--
9779 // IDVDDrive
9780 /////////////////////////////////////////////////////////////////////////
9781 -->
9782
9783 <interface
9784 name="IDVDDrive" extends="$unknown"
9785 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9786 wsmap="managed"
9787 >
9788 <desc>
9789 The IDVDDrive interface represents the virtual CD/DVD drive of the
9790 virtual machine. An object of this type is returned by
9791 <link to="IMachine::DVDDrive"/>.
9792 </desc>
9793
9794 <attribute name="state" type="DriveState" readonly="yes">
9795 <desc>Current drive state.</desc>
9796 </attribute>
9797
9798 <attribute name="passthrough" type="boolean">
9799 <desc>
9800 When a host drive is mounted and passthrough is enabled
9801 the guest OS will be able to directly send SCSI commands to
9802 the host drive. This enables the guest OS to use CD/DVD writers
9803 but is potentially dangerous.
9804 </desc>
9805 </attribute>
9806
9807 <method name="mountImage">
9808 <desc>Mounts a CD/DVD image with the specified UUID.
9809
9810 <result name="VBOX_E_FILE_ERROR">
9811 Invalid image file location.
9812 </result>
9813 <result name="VBOX_E_OBJECT_NOT_FOUND">
9814 Could not find a CD/DVD image matching @a imageId.
9815 </result>
9816 <result name="VBOX_E_INVALID_OBJECT_STATE">
9817 Invalid media state.
9818 </result>
9819
9820 </desc>
9821 <param name="imageId" type="uuid" dir="in"/>
9822 </method>
9823
9824 <method name="captureHostDrive">
9825 <desc>Captures the specified host CD/DVD drive.</desc>
9826 <param name="drive" type="IHostDVDDrive" dir="in"/>
9827 </method>
9828
9829 <method name="unmount">
9830 <desc>Unmounts the currently mounted image or host drive.</desc>
9831 </method>
9832
9833 <method name="getImage">
9834 <desc>Returns the currently mounted CD/DVD image.</desc>
9835 <param name="image" type="IDVDImage" dir="return"/>
9836 </method>
9837
9838 <method name="getHostDrive">
9839 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9840 <param name="drive" type="IHostDVDDrive" dir="return"/>
9841 </method>
9842
9843 </interface>
9844
9845
9846 <!--
9847 // IFloppyDrive
9848 /////////////////////////////////////////////////////////////////////////
9849 -->
9850
9851 <interface
9852 name="IFloppyDrive" extends="$unknown"
9853 uuid="159412cd-bab8-452e-8097-218a020825a6"
9854 wsmap="managed"
9855 >
9856 <desc>
9857 The IFloppyDrive interface represents the virtual floppy drive of the
9858 virtual machine. An object of this type is returned by
9859 <link to="IMachine::floppyDrive" />.
9860 </desc>
9861
9862 <attribute name="enabled" type="boolean">
9863 <desc>
9864 Flag whether the floppy drive is enabled. If it is disabled,
9865 the floppy drive will not be reported to the guest OS.
9866 </desc>
9867 </attribute>
9868
9869 <attribute name="state" type="DriveState" readonly="yes">
9870 <desc>Current drive state.</desc>
9871 </attribute>
9872
9873 <method name="mountImage">
9874 <desc>Mounts a floppy image with the specified UUID.
9875
9876 <result name="VBOX_E_FILE_ERROR">
9877 Invalid image file location.
9878 </result>
9879 <result name="VBOX_E_OBJECT_NOT_FOUND">
9880 Could not find a floppy image matching @a imageID.
9881 </result>
9882 <result name="VBOX_E_INVALID_OBJECT_STATE">
9883 Invalid media state.
9884 </result>
9885
9886 </desc>
9887 <param name="imageId" type="uuid" dir="in"/>
9888 </method>
9889
9890 <method name="captureHostDrive">
9891 <desc>Captures the specified host floppy drive.</desc>
9892 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9893 </method>
9894
9895 <method name="unmount">
9896 <desc>Unmounts the currently mounted image or host drive.</desc>
9897 </method>
9898
9899 <method name="getImage">
9900 <desc>Returns the currently mounted floppy image.</desc>
9901 <param name="image" type="IFloppyImage" dir="return"/>
9902 </method>
9903
9904 <method name="getHostDrive">
9905 <desc>Returns the currently mounted host floppy drive.</desc>
9906 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9907 </method>
9908
9909 </interface>
9910
9911
9912 <!--
9913 // IKeyboard
9914 /////////////////////////////////////////////////////////////////////////
9915 -->
9916
9917 <interface
9918 name="IKeyboard" extends="$unknown"
9919 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9920 wsmap="managed"
9921 >
9922 <desc>
9923 The IKeyboard interface represents the virtual machine's keyboard. Used
9924 in <link to="IConsole::keyboard"/>.
9925
9926 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9927 to the virtual machine.
9928
9929 </desc>
9930 <method name="putScancode">
9931 <desc>Sends a scancode to the keyboard.
9932
9933 <result name="VBOX_E_IPRT_ERROR">
9934 Could not send scan code to virtual keyboard.
9935 </result>
9936
9937 </desc>
9938 <param name="scancode" type="long" dir="in"/>
9939 </method>
9940
9941 <method name="putScancodes">
9942 <desc>Sends an array of scancodes to the keyboard.
9943
9944 <result name="VBOX_E_IPRT_ERROR">
9945 Could not send all scan codes to virtual keyboard.
9946 </result>
9947
9948 </desc>
9949 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9950 <param name="codesStored" type="unsigned long" dir="return"/>
9951 </method>
9952
9953 <method name="putCAD">
9954 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9955 function is nothing special, it is just a convenience function
9956 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9957
9958 <result name="VBOX_E_IPRT_ERROR">
9959 Could not send all scan codes to virtual keyboard.
9960 </result>
9961
9962 </desc>
9963 </method>
9964
9965 </interface>
9966
9967
9968 <!--
9969 // IMouse
9970 /////////////////////////////////////////////////////////////////////////
9971 -->
9972
9973 <enum
9974 name="MouseButtonState"
9975 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9976 >
9977 <desc>
9978 Mouse button state.
9979 </desc>
9980
9981 <const name="LeftButton" value="0x01"/>
9982 <const name="RightButton" value="0x02"/>
9983 <const name="MiddleButton" value="0x04"/>
9984 <const name="WheelUp" value="0x08"/>
9985 <const name="WheelDown" value="0x10"/>
9986 <const name="MouseStateMask" value="0x1F"/>
9987 </enum>
9988
9989 <interface
9990 name="IMouse" extends="$unknown"
9991 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9992 wsmap="managed"
9993 >
9994 <desc>
9995 The IMouse interface represents the virtual machine's mouse. Used in
9996 <link to="IConsole::mouse"/>.
9997
9998 Through this interface, the virtual machine's virtual mouse can be
9999 controlled.
10000 </desc>
10001
10002 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10003 <desc>
10004 Whether the guest OS supports absolute mouse pointer positioning
10005 or not.
10006 <note>
10007 VirtualBox Guest Tools need to be installed to the guest OS
10008 in order to enable absolute mouse positioning support.
10009 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10010 callback to be instantly informed about changes of this attribute
10011 during virtual machine execution.
10012 </note>
10013 <see><link to="#putMouseEventAbsolute"/></see>
10014 </desc>
10015 </attribute>
10016
10017 <method name="putMouseEvent">
10018 <desc>
10019 Initiates a mouse event using relative pointer movements
10020 along x and y axis.
10021
10022 <result name="E_ACCESSDENIED">
10023 Console not powered up.
10024 </result>
10025 <result name="VBOX_E_IPRT_ERROR">
10026 Could not send mouse event to virtual mouse.
10027 </result>
10028
10029 </desc>
10030
10031 <param name="dx" type="long" dir="in">
10032 <desc>
10033 Amount of pixels the mouse should move to the right.
10034 Negative values move the mouse to the left.
10035 </desc>
10036 </param>
10037 <param name="dy" type="long" dir="in">
10038 <desc>
10039 Amount of pixels the mouse should move downwards.
10040 Negative values move the mouse upwards.
10041 </desc>
10042 </param>
10043 <param name="dz" type="long" dir="in">
10044 <desc>
10045 Amount of mouse wheel moves.
10046 Positive values describe clockwise wheel rotations,
10047 negative values describe counterclockwise rotations.
10048 </desc>
10049 </param>
10050 <param name="buttonState" type="long" dir="in">
10051 <desc>
10052 The current state of mouse buttons. Every bit represents
10053 a mouse button as follows:
10054 <table>
10055 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10056 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10057 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10058 </table>
10059 A value of <tt>1</tt> means the corresponding button is pressed.
10060 otherwise it is released.
10061 </desc>
10062 </param>
10063 </method>
10064
10065 <method name="putMouseEventAbsolute">
10066 <desc>
10067 Positions the mouse pointer using absolute x and y coordinates.
10068 These coordinates are expressed in pixels and
10069 start from <tt>[1,1]</tt> which corresponds to the top left
10070 corner of the virtual display.
10071
10072 <result name="E_ACCESSDENIED">
10073 Console not powered up.
10074 </result>
10075 <result name="VBOX_E_IPRT_ERROR">
10076 Could not send mouse event to virtual mouse.
10077 </result>
10078
10079 <note>
10080 This method will have effect only if absolute mouse
10081 positioning is supported by the guest OS.
10082 </note>
10083
10084 <see><link to="#absoluteSupported"/></see>
10085 </desc>
10086
10087 <param name="x" type="long" dir="in">
10088 <desc>
10089 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
10090 </desc>
10091 </param>
10092 <param name="y" type="long" dir="in">
10093 <desc>
10094 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
10095 </desc>
10096 </param>
10097 <param name="dz" type="long" dir="in">
10098 <desc>
10099 Amount of mouse wheel moves.
10100 Positive values describe clockwise wheel rotations,
10101 negative values describe counterclockwise rotations.
10102 </desc>
10103 </param>
10104 <param name="buttonState" type="long" dir="in">
10105 <desc>
10106 The current state of mouse buttons. Every bit represents
10107 a mouse button as follows:
10108 <table>
10109 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10110 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10111 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10112 </table>
10113 A value of <tt>1</tt> means the corresponding button is pressed.
10114 otherwise it is released.
10115 </desc>
10116 </param>
10117 </method>
10118
10119 </interface>
10120
10121 <!--
10122 // IDisplay
10123 /////////////////////////////////////////////////////////////////////////
10124 -->
10125
10126 <enum
10127 name="FramebufferAccelerationOperation"
10128 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
10129 >
10130 <desc>
10131 Frame buffer acceleration operation.
10132 </desc>
10133
10134 <const name="SolidFillAcceleration" value="1"/>
10135 <const name="ScreenCopyAcceleration" value="2"/>
10136 </enum>
10137
10138 <enum
10139 name="FramebufferPixelFormat"
10140 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10141 >
10142 <desc>
10143 Format of the video memory buffer. Constants represented by this enum can
10144 be used to test for particular values of <link
10145 to="IFramebuffer::pixelFormat"/>. See also <link
10146 to="IFramebuffer::requestResize"/>.
10147
10148 See also www.fourcc.org for more information about FOURCC pixel formats.
10149 </desc>
10150
10151 <const name="Opaque" value="0">
10152 <desc>
10153 Unknown buffer format (the user may not assume any particular format of
10154 the buffer).
10155 </desc>
10156 </const>
10157 <const name="FOURCC_RGB" value="0x32424752">
10158 <desc>
10159 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10160 bit layout).
10161 </desc>
10162 </const>
10163 </enum>
10164
10165 <interface
10166 name="IFramebuffer" extends="$unknown"
10167 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
10168 wsmap="suppress"
10169 >
10170 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10171 <desc>Address of the start byte of the frame buffer.</desc>
10172 </attribute>
10173
10174 <attribute name="width" type="unsigned long" readonly="yes">
10175 <desc>Frame buffer width, in pixels.</desc>
10176 </attribute>
10177
10178 <attribute name="height" type="unsigned long" readonly="yes">
10179 <desc>Frame buffer height, in pixels.</desc>
10180 </attribute>
10181
10182 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10183 <desc>
10184 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10185 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10186 are: 8, 15, 16, 24 and 32.
10187 </desc>
10188 </attribute>
10189
10190 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10191 <desc>
10192 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10193 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10194 size of the scan line must be aligned to 32 bits.
10195 </desc>
10196 </attribute>
10197
10198 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10199 <desc>
10200 Frame buffer pixel format. It's either one of the values defined by <link
10201 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10202 <note>
10203 This attribute must never return <link
10204 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10205 <link to="#address"/> points to must be always known.
10206 </note>
10207 </desc>
10208 </attribute>
10209
10210 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10211 <desc>
10212 Defines whether this frame buffer uses the virtual video card's memory
10213 buffer (guest VRAM) directly or not. See <link
10214 to="IFramebuffer::requestResize"/> for more information.
10215 </desc>
10216 </attribute>
10217
10218 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10219 <desc>
10220 Hint from the frame buffer about how much of the standard
10221 screen height it wants to use for itself. This information is
10222 exposed to the guest through the VESA BIOS and VMMDev interface
10223 so that it can use it for determining its video mode table. It
10224 is not guaranteed that the guest respects the value.
10225 </desc>
10226 </attribute>
10227
10228 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10229 <desc>
10230 An alpha-blended overlay which is superposed over the frame buffer.
10231 The initial purpose is to allow the display of icons providing
10232 information about the VM state, including disk activity, in front
10233 ends which do not have other means of doing that. The overlay is
10234 designed to controlled exclusively by IDisplay. It has no locking
10235 of its own, and any changes made to it are not guaranteed to be
10236 visible until the affected portion of IFramebuffer is updated. The
10237 overlay can be created lazily the first time it is requested. This
10238 attribute can also return NULL to signal that the overlay is not
10239 implemented.
10240 </desc>
10241 </attribute>
10242
10243 <attribute name="winId" type="unsigned long long" readonly="yes">
10244 <desc>
10245 Platform-dependent identifier of the window where context of this
10246 frame buffer is drawn, or zero if there's no such window.
10247 </desc>
10248 </attribute>
10249
10250 <method name="lock">
10251 <desc>
10252 Locks the frame buffer.
10253 Gets called by the IDisplay object where this frame buffer is
10254 bound to.
10255 </desc>
10256 </method>
10257
10258 <method name="unlock">
10259 <desc>
10260 Unlocks the frame buffer.
10261 Gets called by the IDisplay object where this frame buffer is
10262 bound to.
10263 </desc>
10264 </method>
10265
10266 <method name="notifyUpdate">
10267 <desc>
10268 Informs about an update.
10269 Gets called by the display object where this buffer is
10270 registered.
10271 </desc>
10272 <param name="x" type="unsigned long" dir="in"/>
10273 <param name="y" type="unsigned long" dir="in"/>
10274 <param name="width" type="unsigned long" dir="in"/>
10275 <param name="height" type="unsigned long" dir="in"/>
10276 <param name="finished" type="boolean" dir="return"/>
10277 </method>
10278
10279 <method name="requestResize">
10280 <desc>
10281 Requests a size and pixel format change.
10282
10283 There are two modes of working with the video buffer of the virtual
10284 machine. The <i>indirect</i> mode implies that the IFramebuffer
10285 implementation allocates a memory buffer for the requested display mode
10286 and provides it to the virtual machine. In <i>direct</i> mode, the
10287 IFramebuffer implementation uses the memory buffer allocated and owned
10288 by the virtual machine. This buffer represents the video memory of the
10289 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10290 usually faster because the implementation gets a raw pointer to the
10291 guest VRAM buffer which it can directly use for visualizing the contents
10292 of the virtual display, as opposed to the indirect mode where the
10293 contents of guest VRAM are copied to the memory buffer provided by
10294 the implementation every time a display update occurs.
10295
10296 It is important to note that the direct mode is really fast only when
10297 the implementation uses the given guest VRAM buffer directly, for
10298 example, by blitting it to the window representing the virtual machine's
10299 display, which saves at least one copy operation comparing to the
10300 indirect mode. However, using the guest VRAM buffer directly is not
10301 always possible: the format and the color depth of this buffer may be
10302 not supported by the target window, or it may be unknown (opaque) as in
10303 case of text or non-linear multi-plane VGA video modes. In this case,
10304 the indirect mode (that is always available) should be used as a
10305 fallback: when the guest VRAM contents are copied to the
10306 implementation-provided memory buffer, color and format conversion is
10307 done automatically by the underlying code.
10308
10309 The @a pixelFormat parameter defines whether the direct mode is
10310 available or not. If @a pixelFormat is <link
10311 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10312 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10313 @a bytesPerLine parameters must be ignored and the implementation must use
10314 the indirect mode (where it provides its own buffer in one of the
10315 supported formats). In all other cases, @a pixelFormat together with
10316 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10317 buffer pointed to by the @a VRAM parameter and the implementation is
10318 free to choose which mode to use. To indicate that this frame buffer uses
10319 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10320 attribute must return <tt>true</tt> and <link to="#address"/> must
10321 return exactly the same address that is passed in the @a VRAM parameter
10322 of this method; otherwise it is assumed that the indirect strategy is
10323 chosen.
10324
10325 The @a width and @a height parameters represent the size of the
10326 requested display mode in both modes. In case of indirect mode, the
10327 provided memory buffer should be big enough to store data of the given
10328 display mode. In case of direct mode, it is guaranteed that the given
10329 @a VRAM buffer contains enough space to represent the display mode of the
10330 given size. Note that this frame buffer's <link to="#width"/> and <link
10331 to="#height"/> attributes must return exactly the same values as
10332 passed to this method after the resize is completed (see below).
10333
10334 The @a finished output parameter determines if the implementation has
10335 finished resizing the frame buffer or not. If, for some reason, the
10336 resize cannot be finished immediately during this call, @a finished
10337 must be set to @c false, and the implementation must call
10338 <link to="IDisplay::resizeCompleted"/> after it has returned from
10339 this method as soon as possible. If @a finished is @c false, the
10340 machine will not call any frame buffer methods until
10341 <link to="IDisplay::resizeCompleted"/> is called.
10342
10343 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10344 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10345 this frame buffer must return exactly the same values as specified in the
10346 parameters of this method, after the resize is completed. If the
10347 indirect mode is chosen, these attributes must return values describing
10348 the format of the implementation's own memory buffer <link
10349 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10350 value must always correlate with <link to="#pixelFormat"/>. Note that
10351 the <link to="#pixelFormat"/> attribute must never return <link
10352 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10353
10354 <note>
10355 This method is called by the IDisplay object under the
10356 <link to="#lock"/> provided by this IFramebuffer
10357 implementation. If this method returns @c false in @a finished, then
10358 this lock is not released until
10359 <link to="IDisplay::resizeCompleted"/> is called.
10360 </note>
10361 </desc>
10362 <param name="screenId" type="unsigned long" dir="in">
10363 <desc>
10364 Logical screen number. Must be used in the corresponding call to
10365 <link to="IDisplay::resizeCompleted"/> if this call is made.
10366 </desc>
10367 </param>
10368 <param name="pixelFormat" type="unsigned long" dir="in">
10369 <desc>
10370 Pixel format of the memory buffer pointed to by @a VRAM.
10371 See also <link to="FramebufferPixelFormat"/>.
10372 </desc>
10373 </param>
10374 <param name="VRAM" type="octet" mod="ptr" dir="in">
10375 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10376 </param>
10377 <param name="bitsPerPixel" type="unsigned long" dir="in">
10378 <desc>Color depth, bits per pixel.</desc>
10379 </param>
10380 <param name="bytesPerLine" type="unsigned long" dir="in">
10381 <desc>Size of one scan line, in bytes.</desc>
10382 </param>
10383 <param name="width" type="unsigned long" dir="in">
10384 <desc>Width of the guest display, in pixels.</desc>
10385 </param>
10386 <param name="height" type="unsigned long" dir="in">
10387 <desc>Height of the guest display, in pixels.</desc>
10388 </param>
10389 <param name="finished" type="boolean" dir="return">
10390 <desc>
10391 Can the VM start using the new frame buffer immediately
10392 after this method returns or it should wait for
10393 <link to="IDisplay::resizeCompleted"/>.
10394 </desc>
10395 </param>
10396 </method>
10397
10398 <method name="operationSupported">
10399 <desc>
10400 Returns whether the given acceleration operation is supported
10401 by the IFramebuffer implementation. If not, the display object
10402 will not attempt to call the corresponding IFramebuffer entry
10403 point. Even if an operation is indicated as supported, the
10404 IFramebuffer implementation always has the option to return non
10405 supported from the corresponding acceleration method in which
10406 case the operation will be performed by the display engine. This
10407 allows for reduced IFramebuffer implementation complexity where
10408 only common cases are handled.
10409 </desc>
10410 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
10411 <param name="supported" type="boolean" dir="return"/>
10412 </method>
10413
10414 <method name="videoModeSupported">
10415 <desc>
10416 Returns whether the frame buffer implementation is willing to
10417 support a given video mode. In case it is not able to render
10418 the video mode (or for some reason not willing), it should
10419 return false. Usually this method is called when the guest
10420 asks the VMM device whether a given video mode is supported
10421 so the information returned is directly exposed to the guest.
10422 It is important that this method returns very quickly.
10423 </desc>
10424 <param name="width" type="unsigned long" dir="in"/>
10425 <param name="height" type="unsigned long" dir="in"/>
10426 <param name="bpp" type="unsigned long" dir="in"/>
10427 <param name="supported" type="boolean" dir="return"/>
10428 </method>
10429
10430 <method name="solidFill">
10431 <desc>
10432 Fills the specified rectangle on screen with a solid color.
10433 </desc>
10434 <param name="x" type="unsigned long" dir="in"/>
10435 <param name="y" type="unsigned long" dir="in"/>
10436 <param name="width" type="unsigned long" dir="in"/>
10437 <param name="height" type="unsigned long" dir="in"/>
10438 <param name="color" type="unsigned long" dir="in"/>
10439 <param name="handled" type="boolean" dir="return"/>
10440 </method>
10441
10442 <method name="copyScreenBits">
10443 <desc>
10444 Copies specified rectangle on the screen.
10445 </desc>
10446 <param name="xDst" type="unsigned long" dir="in"/>
10447 <param name="yDst" type="unsigned long" dir="in"/>
10448 <param name="xSrc" type="unsigned long" dir="in"/>
10449 <param name="ySrc" type="unsigned long" dir="in"/>
10450 <param name="width" type="unsigned long" dir="in"/>
10451 <param name="height" type="unsigned long" dir="in"/>
10452 <param name="handled" type="boolean" dir="return"/>
10453 </method>
10454
10455 <method name="getVisibleRegion">
10456 <desc>
10457 Returns the visible region of this frame buffer.
10458
10459 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
10460 @a count parameter is ignored and the number of elements necessary to
10461 describe the current visible region is returned in @a countCopied.
10462
10463 If @a rectangles is not <tt>NULL</tt> but @a count is less
10464 than the required number of elements to store region data, the method
10465 will report a failure. If @a count is equal or greater than the
10466 required number of elements, then the actual number of elements copied
10467 to the provided array will be returned in @a countCopied.
10468
10469 <note>
10470 The address of the provided array must be in the process space of
10471 this IFramebuffer object.
10472 </note>
10473 <note>
10474 Method not yet implemented.
10475 </note>
10476 </desc>
10477 <param name="rectangles" type="octet" mod="ptr" dir="in">
10478 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
10479 </param>
10480 <param name="count" type="unsigned long" dir="in">
10481 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10482 </param>
10483 <param name="countCopied" type="unsigned long" dir="return">
10484 <desc>Number of elements copied to the @a rectangles array.</desc>
10485 </param>
10486 </method>
10487
10488 <method name="setVisibleRegion">
10489 <desc>
10490 Suggests a new visible region to this frame buffer. This region
10491 represents the area of the VM display which is a union of regions of
10492 all top-level windows of the guest operating system running inside the
10493 VM (if the Guest Additions for this system support this
10494 functionality). This information may be used by the frontends to
10495 implement the seamless desktop integration feature.
10496
10497 <note>
10498 The address of the provided array must be in the process space of
10499 this IFramebuffer object.
10500 </note>
10501 <note>
10502 The IFramebuffer implementation must make a copy of the provided
10503 array of rectangles.
10504 </note>
10505 <note>
10506 Method not yet implemented.
10507 </note>
10508 </desc>
10509 <param name="rectangles" type="octet" mod="ptr" dir="in">
10510 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
10511 </param>
10512 <param name="count" type="unsigned long" dir="in">
10513 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10514 </param>
10515 </method>
10516
10517 </interface>
10518
10519 <interface
10520 name="IFramebufferOverlay" extends="IFramebuffer"
10521 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10522 wsmap="suppress"
10523 >
10524 <desc>
10525 The IFramebufferOverlay interface represents an alpha blended overlay
10526 for displaying status icons above an IFramebuffer. It is always created
10527 not visible, so that it must be explicitly shown. It only covers a
10528 portion of the IFramebuffer, determined by its width, height and
10529 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10530 that order) format, and may be written to directly. Do re-read the
10531 width though, after setting it, as it may be adjusted (increased) to
10532 make it more suitable for the front end.
10533 </desc>
10534 <attribute name="x" type="unsigned long" readonly="yes">
10535 <desc>X position of the overlay, relative to the frame buffer.</desc>
10536 </attribute>
10537
10538 <attribute name="y" type="unsigned long" readonly="yes">
10539 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10540 </attribute>
10541
10542 <attribute name="visible" type="boolean" readonly="no">
10543 <desc>
10544 Whether the overlay is currently visible.
10545 </desc>
10546 </attribute>
10547
10548 <attribute name="alpha" type="unsigned long" readonly="no">
10549 <desc>
10550 The global alpha value for the overlay. This may or may not be
10551 supported by a given front end.
10552 </desc>
10553 </attribute>
10554
10555 <method name="move">
10556 <desc>
10557 Changes the overlay's position relative to the IFramebuffer.
10558 </desc>
10559 <param name="x" type="unsigned long" dir="in"/>
10560 <param name="y" type="unsigned long" dir="in"/>
10561 </method>
10562
10563 </interface>
10564
10565 <interface
10566 name="IDisplay" extends="$unknown"
10567 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10568 wsmap="suppress"
10569 >
10570 <desc>
10571 The IDisplay interface represents the virtual machine's display.
10572
10573 The object implementing this interface is contained in each
10574 <link to="IConsole::display"/> attribute and represents the visual
10575 output of the virtual machine.
10576
10577 The virtual display supports pluggable output targets represented by the
10578 IFramebuffer interface. Examples of the output target are a window on
10579 the host computer or an RDP session's display on a remote computer.
10580 </desc>
10581 <attribute name="width" type="unsigned long" readonly="yes">
10582 <desc>Current display width.</desc>
10583 </attribute>
10584
10585 <attribute name="height" type="unsigned long" readonly="yes">
10586 <desc>Current display height.</desc>
10587 </attribute>
10588
10589 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10590 <desc>
10591 Current guest display color depth. Note that this may differ
10592 from <link to="IFramebuffer::bitsPerPixel"/>.
10593 </desc>
10594 </attribute>
10595
10596 <method name="setupInternalFramebuffer">
10597 <desc>
10598 Prepares an internally managed frame buffer.
10599 </desc>
10600 <param name="depth" type="unsigned long" dir="in"/>
10601 </method>
10602
10603 <method name="lockFramebuffer">
10604 <desc>
10605 Requests access to the internal frame buffer.
10606
10607 <result name="VBOX_E_NOT_SUPPORTED">
10608 Attempt to lock a non-internal frame buffer.
10609 </result>
10610
10611 </desc>
10612 <param name="address" type="octet" mod="ptr" dir="return"/>
10613 </method>
10614
10615 <method name="unlockFramebuffer">
10616 <desc>
10617 Releases access to the internal frame buffer.
10618
10619 <result name="VBOX_E_NOT_SUPPORTED">
10620 Attempt to unlock a non-internal frame buffer.
10621 </result>
10622
10623 </desc>
10624 </method>
10625
10626 <method name="registerExternalFramebuffer">
10627 <desc>
10628 Registers an external frame buffer.
10629 </desc>
10630 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10631 </method>
10632
10633 <method name="setFramebuffer">
10634 <desc>
10635 Sets the framebuffer for given screen.
10636 </desc>
10637 <param name="screenId" type="unsigned long" dir="in"/>
10638 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10639 </method>
10640
10641 <method name="getFramebuffer">
10642 <desc>
10643 Queries the framebuffer for given screen.
10644 </desc>
10645 <param name="screenId" type="unsigned long" dir="in"/>
10646 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10647 <param name="xOrigin" type="long" dir="out"/>
10648 <param name="yOrigin" type="long" dir="out"/>
10649 </method>
10650
10651 <method name="setVideoModeHint">
10652 <desc>
10653 Asks VirtualBox to request the given video mode from
10654 the guest. This is just a hint and it cannot be guaranteed
10655 that the requested resolution will be used. Guest Additions
10656 are required for the request to be seen by guests. The caller
10657 should issue the request and wait for a resolution change and
10658 after a timeout retry.
10659
10660 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10661 parameters means that the corresponding values should be taken from the
10662 current video mode (i.e. left unchanged).
10663
10664 If the guest OS supports multi-monitor configuration then the @a display
10665 parameter specifies the number of the guest display to send the hint to:
10666 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10667 so on. If the multi-monitor configuration is not supported, @a display
10668 must be <tt>0</tt>.
10669
10670 <result name="E_INVALIDARG">
10671 The @a display is not associated with any monitor.
10672 </result>
10673
10674 </desc>
10675 <param name="width" type="unsigned long" dir="in"/>
10676 <param name="height" type="unsigned long" dir="in"/>
10677 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10678 <param name="display" type="unsigned long" dir="in"/>
10679 </method>
10680
10681 <method name="setSeamlessMode">
10682 <desc>
10683 Enables or disables seamless guest display rendering (seamless desktop
10684 integration) mode.
10685 <note>
10686 Calling this method has no effect if <link
10687 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10688 </note>
10689 </desc>
10690 <param name="enabled" type="boolean" dir="in"/>
10691 </method>
10692
10693 <method name="takeScreenShot">
10694 <desc>
10695 Takes a screen shot of the requested size and copies it to the
10696 32-bpp buffer allocated by the caller.
10697
10698 <result name="E_NOTIMPL">
10699 Feature not implemented.
10700 </result>
10701 <result name="VBOX_E_IPRT_ERROR">
10702 Could not take a screenshot.
10703 </result>
10704
10705 </desc>
10706 <param name="address" type="octet" mod="ptr" dir="in"/>
10707 <param name="width" type="unsigned long" dir="in"/>
10708 <param name="height" type="unsigned long" dir="in"/>
10709 </method>
10710
10711 <method name="drawToScreen">
10712 <desc>
10713 Draws a 32-bpp image of the specified size from the given buffer
10714 to the given point on the VM display.
10715
10716 <result name="E_NOTIMPL">
10717 Feature not implemented.
10718 </result>
10719 <result name="VBOX_E_IPRT_ERROR">
10720 Could not draw to screen.
10721 </result>
10722
10723 </desc>
10724 <param name="address" type="octet" mod="ptr" dir="in"/>
10725 <param name="x" type="unsigned long" dir="in"/>
10726 <param name="y" type="unsigned long" dir="in"/>
10727 <param name="width" type="unsigned long" dir="in"/>
10728 <param name="height" type="unsigned long" dir="in"/>
10729 </method>
10730
10731 <method name="invalidateAndUpdate">
10732 <desc>
10733 Does a full invalidation of the VM display and instructs the VM
10734 to update it.
10735
10736 <result name="VBOX_E_IPRT_ERROR">
10737 Could not invalidate and update screen.
10738 </result>
10739
10740 </desc>
10741 </method>
10742
10743 <method name="resizeCompleted">
10744 <desc>
10745 Signals that a framebuffer has completed the resize operation.
10746
10747 <result name="VBOX_E_NOT_SUPPORTED">
10748 Operation only valid for external frame buffers.
10749 </result>
10750
10751 </desc>
10752 <param name="screenId" type="unsigned long" dir="in"/>
10753 </method>
10754
10755 <method name="updateCompleted">
10756 <desc>
10757 Signals that a framebuffer has completed the update operation.
10758
10759 <result name="VBOX_E_NOT_SUPPORTED">
10760 Operation only valid for external frame buffers.
10761 </result>
10762
10763 </desc>
10764 </method>
10765
10766 </interface>
10767
10768 <!--
10769 // INetworkAdapter
10770 /////////////////////////////////////////////////////////////////////////
10771 -->
10772
10773 <enum
10774 name="NetworkAttachmentType"
10775 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10776 >
10777 <desc>
10778 Network attachment type.
10779 </desc>
10780
10781 <const name="Null" value="0">
10782 <desc>Null value, also means "not attached".</desc>
10783 </const>
10784 <const name="NAT" value="1"/>
10785 <const name="Bridged" value="2"/>
10786 <const name="Internal" value="3"/>
10787 <const name="HostOnly" value="4"/>
10788 </enum>
10789
10790 <enum
10791 name="NetworkAdapterType"
10792 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10793 >
10794 <desc>
10795 Network adapter type.
10796 </desc>
10797
10798 <const name="Null" value="0">
10799 <desc>Null value (never used by the API).</desc>
10800 </const>
10801 <const name="Am79C970A" value="1"/>
10802 <const name="Am79C973" value="2"/>
10803 <const name="I82540EM" value="3"/>
10804 <const name="I82543GC" value="4"/>
10805 </enum>
10806
10807 <interface
10808 name="INetworkAdapter" extends="$unknown"
10809 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10810 wsmap="managed"
10811 >
10812 <desc>
10813 Represents a virtual network adapter that is attached to a virtual machine.
10814 Each virtual machine has a fixed number of network adapter slots with one
10815 instance of this attached to each of them. Call
10816 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10817 is attached to a given slot in a given machine.
10818
10819 Each network adapter can be in one of five attachment modes, which are
10820 represented by the <link to="NetworkAttachmentType" /> enumeration;
10821 see the <link to="#attachmentType" /> attribute.
10822 </desc>
10823
10824 <attribute name="adapterType" type="NetworkAdapterType">
10825 <desc>
10826 Type of the virtual network adapter. Depending on this value,
10827 VirtualBox will provide a different virtual network hardware
10828 to the guest.
10829 </desc>
10830 </attribute>
10831
10832 <attribute name="slot" type="unsigned long" readonly="yes">
10833 <desc>
10834 Slot number this adapter is plugged into. Corresponds to
10835 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10836 to obtain this instance.
10837 </desc>
10838 </attribute>
10839
10840 <attribute name="enabled" type="boolean">
10841 <desc>
10842 Flag whether the network adapter is present in the
10843 guest system. If disabled, the virtual guest hardware will
10844 not contain this network adapter. Can only be changed when
10845 the VM is not running.
10846 </desc>
10847 </attribute>
10848
10849 <attribute name="MACAddress" type="wstring">
10850 <desc>
10851 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10852 it to NULL, VirtualBox will generate a unique MAC address.
10853 </desc>
10854 </attribute>
10855
10856 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10857
10858 <attribute name="hostInterface" type="wstring">
10859 <desc>
10860 Name of the host network interface the VM is attached to.
10861 </desc>
10862 </attribute>
10863
10864 <attribute name="internalNetwork" type="wstring">
10865 <desc>
10866 Name of the internal network the VM is attached to.
10867 </desc>
10868 </attribute>
10869
10870 <attribute name="NATNetwork" type="wstring">
10871 <desc>
10872 Name of the NAT network the VM is attached to.
10873 </desc>
10874 </attribute>
10875
10876 <attribute name="cableConnected" type="boolean">
10877 <desc>
10878 Flag whether the adapter reports the cable as connected or not.
10879 It can be used to report offline situations to a VM.
10880 </desc>
10881 </attribute>
10882
10883 <attribute name="lineSpeed" type="unsigned long">
10884 <desc>
10885 Line speed reported by custom drivers, in units of 1 kbps.
10886 </desc>
10887 </attribute>
10888
10889 <attribute name="traceEnabled" type="boolean">
10890 <desc>
10891 Flag whether network traffic from/to the network card should be traced.
10892 Can only be toggled when the VM is turned off.
10893 </desc>
10894 </attribute>
10895
10896 <attribute name="traceFile" type="wstring">
10897 <desc>
10898 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10899 will be used.
10900 </desc>
10901 </attribute>
10902
10903 <method name="attachToNAT">
10904 <desc>
10905 Attach the network adapter to the Network Address Translation (NAT) interface.
10906 </desc>
10907 </method>
10908
10909 <method name="attachToBridgedInterface">
10910 <desc>
10911 Attach the network adapter to a bridged host interface.
10912 </desc>
10913 </method>
10914
10915 <method name="attachToInternalNetwork">
10916 <desc>
10917 Attach the network adapter to an internal network.
10918 </desc>
10919 </method>
10920
10921 <method name="attachToHostOnlyInterface">
10922 <desc>
10923 Attach the network adapter to the host-only network.
10924 </desc>
10925 </method>
10926
10927 <method name="detach">
10928 <desc>
10929 Detach the network adapter
10930 </desc>
10931 </method>
10932 </interface>
10933
10934
10935 <!--
10936 // ISerialPort
10937 /////////////////////////////////////////////////////////////////////////
10938 -->
10939
10940 <enum
10941 name="PortMode"
10942 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
10943 >
10944 <desc>
10945 The PortMode enumeration represents possible communication modes for
10946 the virtual serial port device.
10947 </desc>
10948
10949 <const name="Disconnected" value="0">
10950 <desc>Virtual device is not attached to any real host device.</desc>
10951 </const>
10952 <const name="HostPipe" value="1">
10953 <desc>Virtual device is attached to a host pipe.</desc>
10954 </const>
10955 <const name="HostDevice" value="2">
10956 <desc>Virtual device is attached to a host device.</desc>
10957 </const>
10958 </enum>
10959
10960 <interface
10961 name="ISerialPort" extends="$unknown"
10962 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10963 wsmap="managed"
10964 >
10965
10966 <desc>
10967 The ISerialPort interface represents the virtual serial port device.
10968
10969 The virtual serial port device acts like an ordinary serial port
10970 inside the virtual machine. This device communicates to the real
10971 serial port hardware in one of two modes: host pipe or host device.
10972
10973 In host pipe mode, the #path attribute specifies the path to the pipe on
10974 the host computer that represents a serial port. The #server attribute
10975 determines if this pipe is created by the virtual machine process at
10976 machine startup or it must already exist before starting machine
10977 execution.
10978
10979 In host device mode, the #path attribute specifies the name of the
10980 serial port device on the host computer.
10981
10982 There is also a third communication mode: the disconnected mode. In this
10983 mode, the guest OS running inside the virtual machine will be able to
10984 detect the serial port, but all port write operations will be discarded
10985 and all port read operations will return no data.
10986
10987 <see>IMachine::getSerialPort</see>
10988 </desc>
10989
10990 <attribute name="slot" type="unsigned long" readonly="yes">
10991 <desc>
10992 Slot number this serial port is plugged into. Corresponds to
10993 the value you pass to <link to="IMachine::getSerialPort"/>
10994 to obtain this instance.
10995 </desc>
10996 </attribute>
10997
10998 <attribute name="enabled" type="boolean">
10999 <desc>
11000 Flag whether the serial port is enabled. If disabled,
11001 the serial port will not be reported to the guest OS.
11002 </desc>
11003 </attribute>
11004
11005 <attribute name="IOBase" type="unsigned long">
11006 <desc>Base I/O address of the serial port.</desc>
11007 </attribute>
11008
11009 <attribute name="IRQ" type="unsigned long">
11010 <desc>IRQ number of the serial port.</desc>
11011 </attribute>
11012
11013 <attribute name="hostMode" type="PortMode">
11014 <desc>
11015 How is this port connected to the host.
11016 <note>
11017 Changing this attribute may fail if the conditions for
11018 <link to="#path"/> are not met.
11019 </note>
11020 </desc>
11021 </attribute>
11022
11023 <attribute name="server" type="boolean">
11024 <desc>
11025 Flag whether this serial port acts as a server (creates a new pipe on
11026 the host) or as a client (uses the existing pipe). This attribute is
11027 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11028 </desc>
11029 </attribute>
11030
11031 <attribute name="path" type="wstring">
11032 <desc>
11033 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
11034 PortMode_HostPipe, or the host serial device name when
11035 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
11036 cases, setting a @c null or an empty string as the attribute's value
11037 will result into an error. Otherwise, the value of this property is
11038 ignored.
11039 </desc>
11040 </attribute>
11041
11042 </interface>
11043
11044 <!--
11045 // IParallelPort
11046 /////////////////////////////////////////////////////////////////////////
11047 -->
11048
11049 <interface
11050 name="IParallelPort" extends="$unknown"
11051 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11052 wsmap="managed"
11053 >
11054
11055 <desc>
11056 The IParallelPort interface represents the virtual parallel port device.
11057
11058 The virtual parallel port device acts like an ordinary parallel port
11059 inside the virtual machine. This device communicates to the real
11060 parallel port hardware using the name of the parallel device on the host
11061 computer specified in the #path attribute.
11062
11063 Each virtual parallel port device is assigned a base I/O address and an
11064 IRQ number that will be reported to the guest operating system and used
11065 to operate the given parallel port from within the virtual machine.
11066
11067 <see>IMachine::getParallelPort</see>
11068 </desc>
11069
11070 <attribute name="slot" type="unsigned long" readonly="yes">
11071 <desc>
11072 Slot number this parallel port is plugged into. Corresponds to
11073 the value you pass to <link to="IMachine::getParallelPort"/>
11074 to obtain this instance.
11075 </desc>
11076 </attribute>
11077
11078 <attribute name="enabled" type="boolean">
11079 <desc>
11080 Flag whether the parallel port is enabled. If disabled,
11081 the parallel port will not be reported to the guest OS.
11082 </desc>
11083 </attribute>
11084
11085 <attribute name="IOBase" type="unsigned long">
11086 <desc>Base I/O address of the parallel port.</desc>
11087 </attribute>
11088
11089 <attribute name="IRQ" type="unsigned long">
11090 <desc>IRQ number of the parallel port.</desc>
11091 </attribute>
11092
11093 <attribute name="path" type="wstring">
11094 <desc>
11095 Host parallel device name. If this parallel port is enabled, setting a
11096 @c null or an empty string as this attribute's value will result into
11097 an error.
11098 </desc>
11099 </attribute>
11100
11101 </interface>
11102
11103
11104 <!--
11105 // IMachineDebugger
11106 /////////////////////////////////////////////////////////////////////////
11107 -->
11108
11109 <interface
11110 name="IMachineDebugger" extends="$unknown"
11111 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11112 wsmap="suppress"
11113 >
11114 <method name="resetStats">
11115 <desc>
11116 Reset VM statistics.
11117 </desc>
11118 <param name="pattern" type="wstring" dir="in">
11119 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11120 </param>
11121 </method>
11122
11123 <method name="dumpStats">
11124 <desc>
11125 Dumps VM statistics.
11126 </desc>
11127 <param name="pattern" type="wstring" dir="in">
11128 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11129 </param>
11130 </method>
11131
11132 <method name="getStats">
11133 <desc>
11134 Get the VM statistics in a XMLish format.
11135 </desc>
11136 <param name="pattern" type="wstring" dir="in">
11137 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11138 </param>
11139 <param name="withDescriptions" type="boolean" dir="in">
11140 <desc>Whether to include the descriptions.</desc>
11141 </param>
11142 <param name="stats" type="wstring" dir="out">
11143 <desc>The XML document containing the statistics.</desc>
11144 </param>
11145 </method>
11146
11147 <method name="injectNMI">
11148 <desc>
11149 Inject an NMI into a running VT-x/AMD-V VM.
11150 </desc>
11151 </method>
11152
11153 <attribute name="singlestep" type="boolean">
11154 <desc>Switch for enabling singlestepping.</desc>
11155 </attribute>
11156
11157 <attribute name="recompileUser" type="boolean">
11158 <desc>Switch for forcing code recompilation for user mode code.</desc>
11159 </attribute>
11160
11161 <attribute name="recompileSupervisor" type="boolean">
11162 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11163 </attribute>
11164
11165 <attribute name="PATMEnabled" type="boolean">
11166 <desc>Switch for enabling and disabling the PATM component.</desc>
11167 </attribute>
11168
11169 <attribute name="CSAMEnabled" type="boolean">
11170 <desc>Switch for enabling and disabling the CSAM component.</desc>
11171 </attribute>
11172
11173 <attribute name="logEnabled" type="boolean">
11174 <desc>Switch for enabling and disabling logging.</desc>
11175 </attribute>
11176
11177 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11178 <desc>
11179 Flag indicating whether the VM is currently making use of CPU hardware
11180 virtualization extensions.
11181 </desc>
11182 </attribute>
11183
11184 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11185 <desc>
11186 Flag indicating whether the VM is currently making use of the nested paging
11187 CPU hardware virtualization extension.
11188 </desc>
11189 </attribute>
11190
11191 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11192 <desc>
11193 Flag indicating whether the VM is currently making use of the VPID
11194 VT-x extension.
11195 </desc>
11196 </attribute>
11197
11198 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11199 <desc>
11200 Flag indicating whether the VM is currently making use of the Physical
11201 Address Extension CPU feature.
11202 </desc>
11203 </attribute>
11204
11205 <attribute name="virtualTimeRate" type="unsigned long">
11206 <desc>
11207 The rate at which the virtual time runs expressed as a percentage.
11208 The accepted range is 2% to 20000%.
11209 </desc>
11210 </attribute>
11211
11212 <!-- @todo method for setting log flags, groups and destination! -->
11213
11214 <attribute name="VM" type="unsigned long long" readonly="yes">
11215 <desc>
11216 Gets the VM handle. This is only for internal use while
11217 we carve the details of this interface.
11218 </desc>
11219 </attribute>
11220
11221 </interface>
11222
11223 <!--
11224 // IUSBController
11225 /////////////////////////////////////////////////////////////////////////
11226 -->
11227
11228 <interface
11229 name="IUSBController" extends="$unknown"
11230 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11231 wsmap="managed"
11232 >
11233 <attribute name="enabled" type="boolean">
11234 <desc>
11235 Flag whether the USB controller is present in the
11236 guest system. If disabled, the virtual guest hardware will
11237 not contain any USB controller. Can only be changed when
11238 the VM is powered off.
11239 </desc>
11240 </attribute>
11241
11242 <attribute name="enabledEhci" type="boolean">
11243 <desc>
11244 Flag whether the USB EHCI controller is present in the
11245 guest system. If disabled, the virtual guest hardware will
11246 not contain a USB EHCI controller. Can only be changed when
11247 the VM is powered off.
11248 </desc>
11249 </attribute>
11250
11251 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11252 <desc>
11253 USB standard version which the controller implements.
11254 This is a BCD which means that the major version is in the
11255 high byte and minor version is in the low byte.
11256 </desc>
11257 </attribute>
11258
11259 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11260 <desc>
11261 List of USB device filters associated with the machine.
11262
11263 If the machine is currently running, these filters are activated
11264 every time a new (supported) USB device is attached to the host
11265 computer that was not ignored by global filters
11266 (<link to="IHost::USBDeviceFilters"/>).
11267
11268 These filters are also activated when the machine is powered up.
11269 They are run against a list of all currently available USB
11270 devices (in states
11271 <link to="USBDeviceState_Available"/>,
11272 <link to="USBDeviceState_Busy"/>,
11273 <link to="USBDeviceState_Held"/>) that were not previously
11274 ignored by global filters.
11275
11276 If at least one filter matches the USB device in question, this
11277 device is automatically captured (attached to) the virtual USB
11278 controller of this machine.
11279
11280 <see>IUSBDeviceFilter, ::IUSBController</see>
11281 </desc>
11282 </attribute>
11283
11284 <method name="createDeviceFilter">
11285 <desc>
11286 Creates a new USB device filter. All attributes except
11287 the filter name are set to <tt>null</tt> (any match),
11288 <i>active</i> is <tt>false</tt> (the filter is not active).
11289
11290 The created filter can then be added to the list of filters using
11291 <link to="#insertDeviceFilter"/>.
11292
11293 <result name="VBOX_E_INVALID_VM_STATE">
11294 The virtual machine is not mutable.
11295 </result>
11296
11297 <see>#deviceFilters</see>
11298 </desc>
11299 <param name="name" type="wstring" dir="in">
11300 <desc>
11301 Filter name. See <link to="IUSBDeviceFilter::name"/>
11302 for more info.
11303 </desc>
11304 </param>
11305 <param name="filter" type="IUSBDeviceFilter" dir="return">
11306 <desc>Created filter object.</desc>
11307 </param>
11308 </method>
11309
11310 <method name="insertDeviceFilter">
11311 <desc>
11312 Inserts the given USB device to the specified position
11313 in the list of filters.
11314
11315 Positions are numbered starting from <tt>0</tt>. If the specified
11316 position is equal to or greater than the number of elements in
11317 the list, the filter is added to the end of the collection.
11318
11319 <note>
11320 Duplicates are not allowed, so an attempt to insert a
11321 filter that is already in the collection, will return an
11322 error.
11323 </note>
11324
11325 <result name="VBOX_E_INVALID_VM_STATE">
11326 Virtual machine is not mutable.
11327 </result>
11328 <result name="E_INVALIDARG">
11329 USB device filter not created within this VirtualBox instance.
11330 </result>
11331 <result name="VBOX_E_INVALID_OBJECT_STATE">
11332 USB device filter already in list.
11333 </result>
11334
11335 <see>#deviceFilters</see>
11336 </desc>
11337 <param name="position" type="unsigned long" dir="in">
11338 <desc>Position to insert the filter to.</desc>
11339 </param>
11340 <param name="filter" type="IUSBDeviceFilter" dir="in">
11341 <desc>USB device filter to insert.</desc>
11342 </param>
11343 </method>
11344
11345 <method name="removeDeviceFilter">
11346 <desc>
11347 Removes a USB device filter from the specified position in the
11348 list of filters.
11349
11350 Positions are numbered starting from <tt>0</tt>. Specifying a
11351 position equal to or greater than the number of elements in
11352 the list will produce an error.
11353
11354 <see>#deviceFilters</see>
11355
11356 <result name="VBOX_E_INVALID_VM_STATE">
11357 Virtual machine is not mutable.
11358 </result>
11359 <result name="E_INVALIDARG">
11360 USB device filter list empty or invalid @a position.
11361 </result>
11362
11363 </desc>
11364 <param name="position" type="unsigned long" dir="in">
11365 <desc>Position to remove the filter from.</desc>
11366 </param>
11367 <param name="filter" type="IUSBDeviceFilter" dir="return">
11368 <desc>Removed USB device filter.</desc>
11369 </param>
11370 </method>
11371
11372 </interface>
11373
11374
11375 <!--
11376 // IUSBDevice
11377 /////////////////////////////////////////////////////////////////////////
11378 -->
11379
11380 <interface
11381 name="IUSBDevice" extends="$unknown"
11382 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
11383 wsmap="managed"
11384 >
11385 <desc>
11386 The IUSBDevice interface represents a virtual USB device attached to the
11387 virtual machine.
11388
11389 A collection of objects implementing this interface is stored in the
11390 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11391 attached to a running virtual machine's USB controller.
11392 </desc>
11393
11394 <attribute name="id" type="uuid" readonly="yes">
11395 <desc>
11396 Unique USB device ID. This ID is built from #vendorId,
11397 #productId, #revision and #serialNumber.
11398 </desc>
11399 </attribute>
11400
11401 <attribute name="vendorId" type="unsigned short" readonly="yes">
11402 <desc>Vendor ID.</desc>
11403 </attribute>
11404
11405 <attribute name="productId" type="unsigned short" readonly="yes">
11406 <desc>Product ID.</desc>
11407 </attribute>
11408
11409 <attribute name="revision" type="unsigned short" readonly="yes">
11410 <desc>
11411 Product revision number. This is a packed BCD represented as
11412 unsigned short. The high byte is the integer part and the low
11413 byte is the decimal.
11414 </desc>
11415 </attribute>
11416
11417 <attribute name="manufacturer" type="wstring" readonly="yes">
11418 <desc>Manufacturer string.</desc>
11419 </attribute>
11420
11421 <attribute name="product" type="wstring" readonly="yes">
11422 <desc>Product string.</desc>
11423 </attribute>
11424
11425 <attribute name="serialNumber" type="wstring" readonly="yes">
11426 <desc>Serial number string.</desc>
11427 </attribute>
11428
11429 <attribute name="address" type="wstring" readonly="yes">
11430 <desc>Host specific address of the device.</desc>
11431 </attribute>
11432
11433 <attribute name="port" type="unsigned short" readonly="yes">
11434 <desc>
11435 Host USB port number the device is physically
11436 connected to.
11437 </desc>
11438 </attribute>
11439
11440 <attribute name="version" type="unsigned short" readonly="yes">
11441 <desc>
11442 The major USB version of the device - 1 or 2.
11443 </desc>
11444 </attribute>
11445
11446 <attribute name="portVersion" type="unsigned short" readonly="yes">
11447 <desc>
11448 The major USB version of the host USB port the device is
11449 physically connected to - 1 or 2. For devices not connected to
11450 anything this will have the same value as the version attribute.
11451 </desc>
11452 </attribute>
11453
11454 <attribute name="remote" type="boolean" readonly="yes">
11455 <desc>
11456 Whether the device is physically connected to a remote VRDP
11457 client or to a local host machine.
11458 </desc>
11459 </attribute>
11460
11461 </interface>
11462
11463
11464 <!--
11465 // IUSBDeviceFilter
11466 /////////////////////////////////////////////////////////////////////////
11467 -->
11468
11469 <interface
11470 name="IUSBDeviceFilter" extends="$unknown"
11471 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11472 wsmap="managed"
11473 >
11474 <desc>
11475 The IUSBDeviceFilter interface represents an USB device filter used
11476 to perform actions on a group of USB devices.
11477
11478 This type of filters is used by running virtual machines to
11479 automatically capture selected USB devices once they are physically
11480 attached to the host computer.
11481
11482 A USB device is matched to the given device filter if and only if all
11483 attributes of the device match the corresponding attributes of the
11484 filter (that is, attributes are joined together using the logical AND
11485 operation). On the other hand, all together, filters in the list of
11486 filters carry the semantics of the logical OR operation. So if it is
11487 desirable to create a match like "this vendor id OR this product id",
11488 one needs to create two filters and specify "any match" (see below)
11489 for unused attributes.
11490
11491 All filter attributes used for matching are strings. Each string
11492 is an expression representing a set of values of the corresponding
11493 device attribute, that will match the given filter. Currently, the
11494 following filtering expressions are supported:
11495
11496 <ul>
11497 <li><i>Interval filters</i>. Used to specify valid intervals for
11498 integer device attributes (Vendor ID, Product ID and Revision).
11499 The format of the string is:
11500
11501 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11502
11503 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11504 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11505 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11506 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11507 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11508 possible integer is assumed.
11509 </li>
11510 <li><i>Boolean filters</i>. Used to specify acceptable values for
11511 boolean device attributes. The format of the string is:
11512
11513 <tt>true|false|yes|no|0|1</tt>
11514
11515 </li>
11516 <li><i>Exact match</i>. Used to specify a single value for the given
11517 device attribute. Any string that doesn't start with <tt>int:</tt>
11518 represents the exact match. String device attributes are compared to
11519 this string including case of symbols. Integer attributes are first
11520 converted to a string (see individual filter attributes) and then
11521 compared ignoring case.
11522
11523 </li>
11524 <li><i>Any match</i>. Any value of the corresponding device attribute
11525 will match the given filter. An empty or <tt>null</tt> string is
11526 used to construct this type of filtering expressions.
11527
11528 </li>
11529 </ul>
11530
11531 <note>
11532 On the Windows host platform, interval filters are not currently
11533 available. Also all string filter attributes
11534 (<link to="#manufacturer"/>, <link to="#product"/>,
11535 <link to="#serialNumber"/>) are ignored, so they behave as
11536 <i>any match</i> no matter what string expression is specified.
11537 </note>
11538
11539 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11540 </desc>
11541
11542 <attribute name="name" type="wstring">
11543 <desc>
11544 Visible name for this filter.
11545 This name is used to visually distinguish one filter from another,
11546 so it can neither be <tt>null</tt> nor an empty string.
11547 </desc>
11548 </attribute>
11549
11550 <attribute name="active" type="boolean">
11551 <desc>Whether this filter active or has been temporarily disabled.</desc>
11552 </attribute>
11553
11554 <attribute name="vendorId" type="wstring">
11555 <desc>
11556 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11557 The string representation for the <i>exact matching</i>
11558 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11559 (including leading zeroes).
11560 </desc>
11561 </attribute>
11562
11563 <attribute name="productId" type="wstring">
11564 <desc>
11565 <link to="IUSBDevice::productId">Product ID</link> filter.
11566 The string representation for the <i>exact matching</i>
11567 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11568 (including leading zeroes).
11569 </desc>
11570 </attribute>
11571
11572 <attribute name="revision" type="wstring">
11573 <desc>
11574 <link to="IUSBDevice::productId">Product revision number</link>
11575 filter. The string representation for the <i>exact matching</i>
11576 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11577 of the integer part of the revision, and <tt>F</tt> is the
11578 decimal digit of its fractional part (including leading and
11579 trailing zeros).
11580 Note that for interval filters, it's best to use the hexadecimal
11581 form, because the revision is stored as a 16 bit packed BCD value;
11582 so the expression <tt>int:0x0100-0x0199</tt> will match any
11583 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11584 </desc>
11585 </attribute>
11586
11587 <attribute name="manufacturer" type="wstring">
11588 <desc>
11589 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11590 </desc>
11591 </attribute>
11592
11593 <attribute name="product" type="wstring">
11594 <desc>
11595 <link to="IUSBDevice::product">Product</link> filter.
11596 </desc>
11597 </attribute>
11598
11599 <attribute name="serialNumber" type="wstring">
11600 <desc>
11601 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11602 </desc>
11603 </attribute>
11604
11605 <attribute name="port" type="wstring">
11606 <desc>
11607 <link to="IUSBDevice::port">Host USB port</link> filter.
11608 </desc>
11609 </attribute>
11610
11611 <attribute name="remote" type="wstring">
11612 <desc>
11613 <link to="IUSBDevice::remote">Remote state</link> filter.
11614 <note>
11615 This filter makes sense only for machine USB filters,
11616 i.e. it is ignored by IHostUSBDeviceFilter objects.
11617 </note>
11618 </desc>
11619 </attribute>
11620
11621 <attribute name="maskedInterfaces" type="unsigned long">
11622 <desc>
11623 This is an advanced option for hiding one or more USB interfaces
11624 from the guest. The value is a bit mask where the bits that are set
11625 means the corresponding USB interface should be hidden, masked off
11626 if you like.
11627 This feature only works on Linux hosts.
11628 </desc>
11629 </attribute>
11630
11631 </interface>
11632
11633
11634 <!--
11635 // IHostUSBDevice
11636 /////////////////////////////////////////////////////////////////////////
11637 -->
11638
11639 <enum
11640 name="USBDeviceState"
11641 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11642 >
11643 <desc>
11644 USB device state. This enumeration represents all possible states
11645 of the USB device physically attached to the host computer regarding
11646 its state on the host computer and availability to guest computers
11647 (all currently running virtual machines).
11648
11649 Once a supported USB device is attached to the host, global USB
11650 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11651 either ignore the device, or put it to USBDeviceState_Held state, or do
11652 nothing. Unless the device is ignored by global filters, filters of all
11653 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11654 activated that can put it to USBDeviceState_Captured state.
11655
11656 If the device was ignored by global filters, or didn't match
11657 any filters at all (including guest ones), it is handled by the host
11658 in a normal way. In this case, the device state is determined by
11659 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11660 or USBDeviceState_Available, depending on the current device usage.
11661
11662 Besides auto-capturing based on filters, the device can be manually
11663 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11664 state is USBDeviceState_Busy, USBDeviceState_Available or
11665 USBDeviceState_Held.
11666
11667 <note>
11668 Due to differences in USB stack implementations in Linux and Win32,
11669 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11670 only to the Linux version of the product. This also means that (<link
11671 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11672 device state is USBDeviceState_Held.
11673 </note>
11674
11675 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11676 </desc>
11677
11678 <const name="NotSupported" value="0">
11679 <desc>
11680 Not supported by the VirtualBox server, not available to guests.
11681 </desc>
11682 </const>
11683 <const name="Unavailable" value="1">
11684 <desc>
11685 Being used by the host computer exclusively,
11686 not available to guests.
11687 </desc>
11688 </const>
11689 <const name="Busy" value="2">
11690 <desc>
11691 Being used by the host computer, potentially available to guests.
11692 </desc>
11693 </const>
11694 <const name="Available" value="3">
11695 <desc>
11696 Not used by the host computer, available to guests (the host computer
11697 can also start using the device at any time).
11698 </desc>
11699 </const>
11700 <const name="Held" value="4">
11701 <desc>
11702 Held by the VirtualBox server (ignored by the host computer),
11703 available to guests.
11704 </desc>
11705 </const>
11706 <const name="Captured" value="5">
11707 <desc>
11708 Captured by one of the guest computers, not available
11709 to anybody else.
11710 </desc>
11711 </const>
11712 </enum>
11713
11714 <interface
11715 name="IHostUSBDevice" extends="IUSBDevice"
11716 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11717 wsmap="managed"
11718 >
11719 <desc>
11720 The IHostUSBDevice interface represents a physical USB device attached
11721 to the host computer.
11722
11723 Besides properties inherited from IUSBDevice, this interface adds the
11724 <link to="#state"/> property that holds the current state of the USB
11725 device.
11726
11727 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11728 </desc>
11729
11730 <attribute name="state" type="USBDeviceState" readonly="yes">
11731 <desc>
11732 Current state of the device.
11733 </desc>
11734 </attribute>
11735
11736 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11737
11738 </interface>
11739
11740
11741 <!--
11742 // IHostUSBDeviceFilter
11743 /////////////////////////////////////////////////////////////////////////
11744 -->
11745
11746 <enum
11747 name="USBDeviceFilterAction"
11748 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11749 >
11750 <desc>
11751 Actions for host USB device filters.
11752 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11753 </desc>
11754
11755 <const name="Null" value="0">
11756 <desc>Null value (never used by the API).</desc>
11757 </const>
11758 <const name="Ignore" value="1">
11759 <desc>Ignore the matched USB device.</desc>
11760 </const>
11761 <const name="Hold" value="2">
11762 <desc>Hold the matched USB device.</desc>
11763 </const>
11764 </enum>
11765
11766 <interface
11767 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11768 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11769 wsmap="managed"
11770 >
11771 <desc>
11772 The IHostUSBDeviceFilter interface represents a global filter for a
11773 physical USB device used by the host computer. Used indirectly in
11774 <link to="IHost::USBDeviceFilters"/>.
11775
11776 Using filters of this type, the host computer determines the initial
11777 state of the USB device after it is physically attached to the
11778 host's USB controller.
11779
11780 <note>
11781 The <link to="#remote"/> attribute is ignored by this type of
11782 filters, because it makes sense only for
11783 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11784 </note>
11785
11786 <see>IHost::USBDeviceFilters</see>
11787 </desc>
11788
11789 <attribute name="action" type="USBDeviceFilterAction">
11790 <desc>
11791 Action performed by the host when an attached USB device
11792 matches this filter.
11793 </desc>
11794 </attribute>
11795
11796 </interface>
11797
11798 <!--
11799 // IAudioAdapter
11800 /////////////////////////////////////////////////////////////////////////
11801 -->
11802
11803 <enum
11804 name="AudioDriverType"
11805 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11806 >
11807 <desc>
11808 Host audio driver type.
11809 </desc>
11810
11811 <const name="Null" value="0">
11812 <desc>Null value, also means "dummy audio driver".</desc>
11813 </const>
11814 <const name="WinMM" value="1"/>
11815 <const name="OSS" value="2"/>
11816 <const name="ALSA" value="3"/>
11817 <const name="DirectSound" value="4"/>
11818 <const name="CoreAudio" value="5"/>
11819 <const name="MMPM" value="6"/>
11820 <const name="Pulse" value="7"/>
11821 <const name="SolAudio" value="8"/>
11822 </enum>
11823
11824 <enum
11825 name="AudioControllerType"
11826 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11827 >
11828 <desc>
11829 Virtual audio controller type.
11830 </desc>
11831
11832 <const name="AC97" value="0"/>
11833 <const name="SB16" value="1"/>
11834 </enum>
11835
11836 <interface
11837 name="IAudioAdapter" extends="$unknown"
11838 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11839 wsmap="managed"
11840 >
11841 <desc>
11842 The IAudioAdapter interface represents the virtual audio adapter of
11843 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11844 </desc>
11845 <attribute name="enabled" type="boolean">
11846 <desc>
11847 Flag whether the audio adapter is present in the
11848 guest system. If disabled, the virtual guest hardware will
11849 not contain any audio adapter. Can only be changed when
11850 the VM is not running.
11851 </desc>
11852 </attribute>
11853 <attribute name="audioController" type="AudioControllerType">
11854 <desc>
11855 The audio hardware we emulate.
11856 </desc>
11857 </attribute>
11858 <attribute name="audioDriver" type="AudioDriverType">
11859 <desc>
11860 Audio driver the adapter is connected to. This setting
11861 can only be changed when the VM is not running.
11862 </desc>
11863 </attribute>
11864 </interface>
11865
11866 <!--
11867 // IVRDPServer
11868 /////////////////////////////////////////////////////////////////////////
11869 -->
11870
11871 <enum
11872 name="VRDPAuthType"
11873 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11874 >
11875 <desc>
11876 VRDP authentication type.
11877 </desc>
11878
11879 <const name="Null" value="0">
11880 <desc>Null value, also means "no authentication".</desc>
11881 </const>
11882 <const name="External" value="1"/>
11883 <const name="Guest" value="2"/>
11884 </enum>
11885
11886 <interface
11887 name="IVRDPServer" extends="$unknown"
11888 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11889 wsmap="managed"
11890 >
11891 <attribute name="enabled" type="boolean">
11892 <desc>VRDP server status.</desc>
11893 </attribute>
11894
11895 <attribute name="port" type="unsigned long">
11896 <desc>
11897 VRDP server port number.
11898 <note>
11899 Setting the value of this property to <tt>0</tt> will reset the port
11900 number to the default value which is
11901 currently <tt>3389</tt>. Reading this property will always return a
11902 real port number, even after it has been set to <tt>0</tt> (in which
11903 case the default port is returned).
11904 </note>
11905 </desc>
11906 </attribute>
11907
11908 <attribute name="netAddress" type="wstring">
11909 <desc>VRDP server address.</desc>
11910 </attribute>
11911
11912 <attribute name="authType" type="VRDPAuthType">
11913 <desc>VRDP authentication method.</desc>
11914 </attribute>
11915
11916 <attribute name="authTimeout" type="unsigned long">
11917 <desc>Timeout for guest authentication. Milliseconds.</desc>
11918 </attribute>
11919
11920 <attribute name="allowMultiConnection" type="boolean">
11921 <desc>
11922 Flag whether multiple simultaneous connections to the VM are permitted.
11923 Note that this will be replaced by a more powerful mechanism in the future.
11924 </desc>
11925 </attribute>
11926
11927 <attribute name="reuseSingleConnection" type="boolean">
11928 <desc>
11929 Flag whether the existing connection must be dropped and a new connection
11930 must be established by the VRDP server, when a new client connects in single
11931 connection mode.
11932 </desc>
11933 </attribute>
11934
11935 </interface>
11936
11937
11938 <!--
11939 // ISharedFolder
11940 /////////////////////////////////////////////////////////////////////////
11941 -->
11942
11943 <interface
11944 name="ISharedFolder" extends="$unknown"
11945 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11946 wsmap="struct"
11947 >
11948 <desc>
11949 The ISharedFolder interface represents a folder in the host computer's
11950 file system accessible from the guest OS running inside a virtual
11951 machine using an associated logical name.
11952
11953 There are three types of shared folders:
11954 <ul>
11955 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11956 folders available to all virtual machines.</li>
11957 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11958 VM-specific shared folders available to the given virtual machine at
11959 startup.</li>
11960 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11961 VM-specific shared folders created in the session context (for
11962 example, when the virtual machine is running) and automatically
11963 discarded when the session is closed (the VM is powered off).</li>
11964 </ul>
11965
11966 Logical names of shared folders must be unique within the given scope
11967 (global, permanent or transient). However, they do not need to be unique
11968 across scopes. In this case, the definition of the shared folder in a
11969 more specific scope takes precedence over definitions in all other
11970 scopes. The order of precedence is (more specific to more general):
11971 <ol>
11972 <li>Transient definitions</li>
11973 <li>Permanent definitions</li>
11974 <li>Global definitions</li>
11975 </ol>
11976
11977 For example, if MyMachine has a shared folder named
11978 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11979 transient shared folder named <tt>C_DRIVE</tt> (that points
11980 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11981 of <tt>C_DRIVE</tt> in the guest OS so
11982 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11983 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11984 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11985 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11986 to <tt>C:\\</tt> if it still exists.
11987
11988 Note that permanent and transient shared folders of different machines
11989 are in different name spaces, so they don't overlap and don't need to
11990 have unique logical names.
11991
11992 <note>
11993 Global shared folders are not implemented in the current version of the
11994 product.
11995 </note>
11996 </desc>
11997
11998 <attribute name="name" type="wstring" readonly="yes">
11999 <desc>Logical name of the shared folder.</desc>
12000 </attribute>
12001
12002 <attribute name="hostPath" type="wstring" readonly="yes">
12003 <desc>Full path to the shared folder in the host file system.</desc>
12004 </attribute>
12005
12006 <attribute name="accessible" type="boolean" readonly="yes">
12007 <desc>
12008 Whether the folder defined by the host path is currently
12009 accessible or not.
12010 For example, the folder can be unaccessible if it is placed
12011 on the network share that is not available by the time
12012 this property is read.
12013 </desc>
12014 </attribute>
12015
12016 <attribute name="writable" type="boolean" readonly="yes">
12017 <desc>
12018 Whether the folder defined by the host path is writable or
12019 not.
12020 </desc>
12021 </attribute>
12022
12023 <attribute name="lastAccessError" type="wstring" readonly="yes">
12024 <desc>
12025 Text message that represents the result of the last accessibility
12026 check.
12027
12028 Accessibility checks are performed each time the <link to="#accessible"/>
12029 attribute is read. A @c null string is returned if the last
12030 accessibility check was successful. A non-null string indicates a
12031 failure and should normally describe a reason of the failure (for
12032 example, a file read error).
12033 </desc>
12034 </attribute>
12035
12036 </interface>
12037
12038 <!--
12039 // ISession
12040 /////////////////////////////////////////////////////////////////////////
12041 -->
12042
12043 <interface
12044 name="IInternalSessionControl" extends="$unknown"
12045 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
12046 internal="yes"
12047 wsmap="suppress"
12048 >
12049 <method name="getPID">
12050 <desc>PID of the process that has created this Session object.
12051 </desc>
12052 <param name="pid" type="unsigned long" dir="return"/>
12053 </method>
12054
12055 <method name="getRemoteConsole">
12056 <desc>
12057 Returns the console object suitable for remote control.
12058
12059 <result name="VBOX_E_INVALID_VM_STATE">
12060 Session state prevents operation.
12061 </result>
12062 <result name="VBOX_E_INVALID_OBJECT_STATE">
12063 Session type prevents operation.
12064 </result>
12065
12066 </desc>
12067 <param name="console" type="IConsole" dir="return"/>
12068 </method>
12069
12070 <method name="assignMachine">
12071 <desc>
12072 Assigns the machine object associated with this direct-type
12073 session or informs the session that it will be a remote one
12074 (if @a machine == NULL).
12075
12076 <result name="VBOX_E_INVALID_VM_STATE">
12077 Session state prevents operation.
12078 </result>
12079 <result name="VBOX_E_INVALID_OBJECT_STATE">
12080 Session type prevents operation.
12081 </result>
12082
12083 </desc>
12084 <param name="machine" type="IMachine" dir="in"/>
12085 </method>
12086
12087 <method name="assignRemoteMachine">
12088 <desc>
12089 Assigns the machine and the (remote) console object associated with
12090 this remote-type session.
12091
12092 <result name="VBOX_E_INVALID_VM_STATE">
12093 Session state prevents operation.
12094 </result>
12095
12096 </desc>
12097 <param name="machine" type="IMachine" dir="in"/>
12098 <param name="console" type="IConsole" dir="in"/>
12099 </method>
12100
12101 <method name="updateMachineState">
12102 <desc>
12103 Updates the machine state in the VM process.
12104 Must be called only in certain cases
12105 (see the method implementation).
12106
12107 <result name="VBOX_E_INVALID_VM_STATE">
12108 Session state prevents operation.
12109 </result>
12110 <result name="VBOX_E_INVALID_OBJECT_STATE">
12111 Session type prevents operation.
12112 </result>
12113
12114 </desc>
12115 <param name="aMachineState" type="MachineState" dir="in"/>
12116 </method>
12117
12118 <method name="uninitialize">
12119 <desc>
12120 Uninitializes (closes) this session. Used by VirtualBox to close
12121 the corresponding remote session when the direct session dies
12122 or gets closed.
12123
12124 <result name="VBOX_E_INVALID_VM_STATE">
12125 Session state prevents operation.
12126 </result>
12127
12128 </desc>
12129 </method>
12130
12131 <method name="onDVDDriveChange">
12132 <desc>
12133 Triggered when settings of the DVD drive object of the
12134 associated virtual machine have changed.
12135
12136 <result name="VBOX_E_INVALID_VM_STATE">
12137 Session state prevents operation.
12138 </result>
12139 <result name="VBOX_E_INVALID_OBJECT_STATE">
12140 Session type prevents operation.
12141 </result>
12142
12143 </desc>
12144 </method>
12145
12146 <method name="onFloppyDriveChange">
12147 <desc>
12148 Triggered when settings of the floppy drive object of the
12149 associated virtual machine have changed.
12150
12151 <result name="VBOX_E_INVALID_VM_STATE">
12152 Session state prevents operation.
12153 </result>
12154 <result name="VBOX_E_INVALID_OBJECT_STATE">
12155 Session type prevents operation.
12156 </result>
12157
12158 </desc>
12159 </method>
12160
12161 <method name="onNetworkAdapterChange">
12162 <desc>
12163 Triggered when settings of a network adapter of the
12164 associated virtual machine have changed.
12165
12166 <result name="VBOX_E_INVALID_VM_STATE">
12167 Session state prevents operation.
12168 </result>
12169 <result name="VBOX_E_INVALID_OBJECT_STATE">
12170 Session type prevents operation.
12171 </result>
12172
12173 </desc>
12174 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12175 </method>
12176
12177 <method name="onSerialPortChange">
12178 <desc>
12179 Triggered when settings of a serial port of the
12180 associated virtual machine have changed.
12181
12182 <result name="VBOX_E_INVALID_VM_STATE">
12183 Session state prevents operation.
12184 </result>
12185 <result name="VBOX_E_INVALID_OBJECT_STATE">
12186 Session type prevents operation.
12187 </result>
12188
12189 </desc>
12190 <param name="serialPort" type="ISerialPort" dir="in"/>
12191 </method>
12192
12193 <method name="onParallelPortChange">
12194 <desc>
12195 Triggered when settings of a parallel port of the
12196 associated virtual machine have changed.
12197
12198 <result name="VBOX_E_INVALID_VM_STATE">
12199 Session state prevents operation.
12200 </result>
12201 <result name="VBOX_E_INVALID_OBJECT_STATE">
12202 Session type prevents operation.
12203 </result>
12204
12205 </desc>
12206 <param name="parallelPort" type="IParallelPort" dir="in"/>
12207 </method>
12208
12209 <method name="onStorageControllerChange">
12210 <desc>
12211 Triggered when settings of a storage controller of the
12212 associated virtual machine have changed.
12213
12214 <result name="VBOX_E_INVALID_VM_STATE">
12215 Session state prevents operation.
12216 </result>
12217 <result name="VBOX_E_INVALID_OBJECT_STATE">
12218 Session type prevents operation.
12219 </result>
12220
12221 </desc>
12222 </method>
12223
12224 <method name="onVRDPServerChange">
12225 <desc>
12226 Triggered when settings of the VRDP server object of the
12227 associated virtual machine have changed.
12228
12229 <result name="VBOX_E_INVALID_VM_STATE">
12230 Session state prevents operation.
12231 </result>
12232 <result name="VBOX_E_INVALID_OBJECT_STATE">
12233 Session type prevents operation.
12234 </result>
12235
12236 </desc>
12237 </method>
12238
12239 <method name="onUSBControllerChange">
12240 <desc>
12241 Triggered when settings of the USB controller object of the
12242 associated virtual machine have changed.
12243
12244 <result name="VBOX_E_INVALID_VM_STATE">
12245 Session state prevents operation.
12246 </result>
12247 <result name="VBOX_E_INVALID_OBJECT_STATE">
12248 Session type prevents operation.
12249 </result>
12250
12251 </desc>
12252 </method>
12253
12254 <method name="onSharedFolderChange">
12255 <desc>
12256 Triggered when a permanent (global or machine) shared folder has been
12257 created or removed.
12258 <note>
12259 We don't pass shared folder parameters in this notification because
12260 the order in which parallel notifications are delivered is not defined,
12261 therefore it could happen that these parameters were outdated by the
12262 time of processing this notification.
12263 </note>
12264
12265 <result name="VBOX_E_INVALID_VM_STATE">
12266 Session state prevents operation.
12267 </result>
12268 <result name="VBOX_E_INVALID_OBJECT_STATE">
12269 Session type prevents operation.
12270 </result>
12271
12272 </desc>
12273 <param name="global" type="boolean" dir="in"/>
12274 </method>
12275
12276 <method name="onUSBDeviceAttach">
12277 <desc>
12278 Triggered when a request to capture a USB device (as a result
12279 of matched USB filters or direct call to
12280 <link to="IConsole::attachUSBDevice"/>) has completed.
12281 A @c null @a error object means success, otherwise it
12282 describes a failure.
12283
12284 <result name="VBOX_E_INVALID_VM_STATE">
12285 Session state prevents operation.
12286 </result>
12287 <result name="VBOX_E_INVALID_OBJECT_STATE">
12288 Session type prevents operation.
12289 </result>
12290
12291 </desc>
12292 <param name="device" type="IUSBDevice" dir="in"/>
12293 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12294 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12295 </method>
12296
12297 <method name="onUSBDeviceDetach">
12298 <desc>
12299 Triggered when a request to release the USB device (as a result
12300 of machine termination or direct call to
12301 <link to="IConsole::detachUSBDevice"/>) has completed.
12302 A @c null @a error object means success, otherwise it
12303
12304 <result name="VBOX_E_INVALID_VM_STATE">
12305 Session state prevents operation.
12306 </result>
12307 <result name="VBOX_E_INVALID_OBJECT_STATE">
12308 Session type prevents operation.
12309 </result>
12310
12311 </desc>
12312 <param name="id" type="uuid" dir="in"/>
12313 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12314 </method>
12315
12316 <method name="onShowWindow">
12317 <desc>
12318 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12319 <link to="IMachine::showConsoleWindow"/> in order to notify
12320 console callbacks
12321 <link to="IConsoleCallback::onCanShowWindow"/>
12322 and <link to="IConsoleCallback::onShowWindow"/>.
12323
12324 <result name="VBOX_E_INVALID_OBJECT_STATE">
12325 Session type prevents operation.
12326 </result>
12327
12328 </desc>
12329 <param name="check" type="boolean" dir="in"/>
12330 <param name="canShow" type="boolean" dir="out"/>
12331 <param name="winId" type="unsigned long long" dir="out"/>
12332 </method>
12333
12334 <method name="accessGuestProperty">
12335 <desc>
12336 Called by <link to="IMachine::getGuestProperty"/> and by
12337 <link to="IMachine::setGuestProperty"/> in order to read and
12338 modify guest properties.
12339
12340 <result name="VBOX_E_INVALID_VM_STATE">
12341 Machine session is not open.
12342 </result>
12343 <result name="VBOX_E_INVALID_OBJECT_STATE">
12344 Session type is not direct.
12345 </result>
12346
12347 </desc>
12348 <param name="name" type="wstring" dir="in"/>
12349 <param name="value" type="wstring" dir="in"/>
12350 <param name="flags" type="wstring" dir="in"/>
12351 <param name="isSetter" type="boolean" dir="in"/>
12352 <param name="retValue" type="wstring" dir="out"/>
12353 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12354 <param name="retFlags" type="wstring" dir="out"/>
12355 </method>
12356
12357 <method name="enumerateGuestProperties">
12358 <desc>
12359 Return a list of the guest properties matching a set of patterns along
12360 with their values, time stamps and flags.
12361
12362 <result name="VBOX_E_INVALID_VM_STATE">
12363 Machine session is not open.
12364 </result>
12365 <result name="VBOX_E_INVALID_OBJECT_STATE">
12366 Session type is not direct.
12367 </result>
12368
12369 </desc>
12370 <param name="patterns" type="wstring" dir="in">
12371 <desc>
12372 The patterns to match the properties against as a comma-separated
12373 string. If this is empty, all properties currently set will be
12374 returned.
12375 </desc>
12376 </param>
12377 <param name="key" type="wstring" dir="out" safearray="yes">
12378 <desc>
12379 The key names of the properties returned.
12380 </desc>
12381 </param>
12382 <param name="value" type="wstring" dir="out" safearray="yes">
12383 <desc>
12384 The values of the properties returned. The array entries match the
12385 corresponding entries in the @a key array.
12386 </desc>
12387 </param>
12388 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12389 <desc>
12390 The time stamps of the properties returned. The array entries match
12391 the corresponding entries in the @a key array.
12392 </desc>
12393 </param>
12394 <param name="flags" type="wstring" dir="out" safearray="yes">
12395 <desc>
12396 The flags of the properties returned. The array entries match the
12397 corresponding entries in the @a key array.
12398 </desc>
12399 </param>
12400 </method>
12401
12402 </interface>
12403
12404 <interface
12405 name="ISession" extends="$dispatched"
12406 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12407 wsmap="managed"
12408 >
12409 <desc>
12410 The ISession interface represents a serialization primitive for virtual
12411 machines.
12412
12413 With VirtualBox, every time one wishes to manipulate a virtual machine
12414 (e.g. change its settings or start execution), a session object is
12415 required. Such an object must be passed to one of the session methods
12416 that open the given session, which then initiates the machine manipulation.
12417
12418 A session serves several purposes: it identifies to the inter-process VirtualBox
12419 code which process is currently working with the virtual machine, and it ensures
12420 that there are no incompatible requests from several processes for the
12421 same virtual machine. Session objects can therefore be thought of as mutex
12422 semaphores that lock virtual machines to prevent conflicting accesses from
12423 several processes.
12424
12425 How sessions objects are used depends on whether you use the Main API
12426 via COM or via the webservice:
12427
12428 <ul>
12429 <li>When using the COM API directly, an object of the Session class from the
12430 VirtualBox type library needs to be created. In regular COM C++ client code,
12431 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12432 This object will then act as a local session object in further calls to open
12433 a session.
12434 </li>
12435
12436 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12437 one session object automatically when <link to="IWebsessionManager::logon" />
12438 is called. A managed object reference to that session object can be retrieved by
12439 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12440 reference can then be used to open sessions.
12441 </li>
12442 </ul>
12443
12444 Sessions are mainly used in two variations:
12445
12446 <ul>
12447 <li>
12448 To start a virtual machine in a separate process, one would call
12449 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12450 object as its first parameter. This session then identifies the caller
12451 and lets him control the started machine (for example, pause machine
12452 execution or power it down) as well as be notified about machine
12453 execution state changes.
12454 </li>
12455
12456 <li>To alter machine settings, or to start machine execution within the
12457 current process, one needs to open a direct session for the machine first by
12458 calling <link to="IVirtualBox::openSession"/>. While a direct session
12459 is open within one process, no any other process may open another direct
12460 session for the same machine. This prevents the machine from being changed
12461 by other processes while it is running or while the machine is being configured.
12462 </li>
12463 </ul>
12464
12465 One also can attach to an existing direct session already opened by
12466 another process (for example, in order to send a control request to the
12467 virtual machine such as the pause or the reset request). This is done by
12468 calling <link to="IVirtualBox::openExistingSession"/>.
12469
12470 <note>
12471 Unless you are trying to write a new VirtualBox front-end that
12472 performs direct machine execution (like the VirtualBox or VBoxSDL
12473 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12474 session opened by <link to="IVirtualBox::openSession"/> and use this
12475 session only to change virtual machine settings. If you simply want to
12476 start virtual machine execution using one of the existing front-ends
12477 (for example the VirtualBox GUI or headless server), simply use
12478 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12479 will power up the machine automatically for you.
12480 </note>
12481 </desc>
12482
12483 <attribute name="state" type="SessionState" readonly="yes">
12484 <desc>Current state of this session.</desc>
12485 </attribute>
12486
12487 <attribute name="type" type="SessionType" readonly="yes">
12488 <desc>
12489 Type of this session. The value of this attribute is valid only
12490 if the session is currently open (i.e. its #state is
12491 SessionType_SessionOpen), otherwise an error will be returned.
12492 </desc>
12493 </attribute>
12494
12495 <attribute name="machine" type="IMachine" readonly="yes">
12496 <desc>Machine object associated with this session.</desc>
12497 </attribute>
12498
12499 <attribute name="console" type="IConsole" readonly="yes">
12500 <desc>Console object associated with this session.</desc>
12501 </attribute>
12502
12503 <method name="close">
12504 <desc>
12505 Closes a session that was previously opened.
12506
12507 It is recommended that every time an "open session" method (such as
12508 <link to="IVirtualBox::openRemoteSession" /> or
12509 <link to="IVirtualBox::openSession" />) has been called to
12510 manipulate a virtual machine, the caller invoke
12511 ISession::close() when it's done doing so. Since sessions are
12512 serialization primitives much like ordinary mutexes, they are
12513 best used the same way: for each "open" call, there should be
12514 a matching "close" call, even when errors occur.
12515
12516 Otherwise, if a direct session for a machine opened with
12517 <link to="IVirtualBox::openSession"/> is not explicitly closed
12518 when the application terminates, the state of the machine will
12519 be set to <link to="MachineState_Aborted" /> on the server.
12520
12521 Generally, it is recommended to close all open sessions explicitly
12522 before terminating the application (regardless of the reason for
12523 the termination).
12524
12525 <note>
12526 Do not expect the session state (<link to="ISession::state" />
12527 to return to "Closed" immediately after you invoke
12528 ISession::close(), particularly if you have started a remote
12529 session to execute the VM in a new process. The session state will
12530 automatically return to "Closed" once the VM is no longer executing,
12531 which can of course take a very long time.
12532 </note>
12533
12534 <result name="E_UNEXPECTED">
12535 Session is not open.
12536 </result>
12537
12538 </desc>
12539 </method>
12540
12541 </interface>
12542
12543 <!--
12544 // IStorageController
12545 /////////////////////////////////////////////////////////////////////////
12546 -->
12547
12548 <enum
12549 name="StorageBus"
12550 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12551 >
12552 <desc>
12553 The connection type of the storage controller.
12554 </desc>
12555 <const name="Null" value="0">
12556 <desc><tt>null</tt> value. Never used by the API.</desc>
12557 </const>
12558 <const name="IDE" value="1"/>
12559 <const name="SATA" value="2"/>
12560 <const name="SCSI" value="3"/>
12561 </enum>
12562
12563 <enum
12564 name="StorageControllerType"
12565 uuid="685387db-a837-4320-a258-08f46a22f62a"
12566 >
12567 <desc>
12568 Storage controller type.
12569 </desc>
12570
12571 <const name="Null" value="0">
12572 <desc><tt>null</tt> value. Never used by the API.</desc>
12573 </const>
12574 <const name="LsiLogic" value="1"/>
12575 <const name="BusLogic" value="2"/>
12576 <const name="IntelAhci" value="3"/>
12577 <const name="PIIX3" value="4"/>
12578 <const name="PIIX4" value="5"/>
12579 <const name="ICH6" value="6"/>
12580 </enum>
12581
12582 <interface
12583 name="IStorageController" extends="$unknown"
12584 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12585 wsmap="managed"
12586 >
12587 <desc>
12588 Represents a storage controller that is attached to a virtual machine
12589 (<link to="IMachine" />). Just as hard disks are attached to storage
12590 controllers in a real computer, virtual hard disks (represented by
12591 <link to="IHardDisk" />) are attached to virtual storage controllers,
12592 represented by this interface.
12593
12594 VirtualBox supports three types of virtual storage controller hardware:
12595 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12596 these three is used, certain sub-types are available and can be
12597 selected in <link to="#controllerType" />.
12598 </desc>
12599
12600 <attribute name="name" type="wstring" readonly="yes">
12601 <desc>
12602 Name of the storage controller, as originally specified with
12603 <link to="IMachine::addStorageController" />. This then uniquely
12604 identifies this controller with other method calls such as
12605 <link to="IMachine::attachHardDisk" />.
12606 </desc>
12607 </attribute>
12608
12609 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12610 <desc>
12611 Maximum number of devices which can be attached to one port.
12612 </desc>
12613 </attribute>
12614
12615 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12616 <desc>
12617 Minimum number of ports which can be set with
12618 <link to="IStorageController::SetPortCount"/>.
12619 </desc>
12620 </attribute>
12621
12622 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12623 <desc>
12624 Maximum number of ports which can be set with
12625 <link to="IStorageController::SetPortCount"/>.
12626 </desc>
12627 </attribute>
12628
12629 <attribute name="instance" type="unsigned long">
12630 <desc>
12631 The instance number of the device in the running VM.
12632 </desc>
12633 </attribute>
12634
12635 <attribute name="portCount" type="unsigned long">
12636 <desc>
12637 The number of currently usable ports on the controller.
12638 The minimum and maximum number of ports for one controller type can
12639 be determined with <link to="IStorageController::GetMinPortCount"/>
12640 and <link to="IStorageController::GetMaxPortCount"/>..
12641 </desc>
12642 </attribute>
12643
12644 <attribute name="bus" type="StorageBus" readonly="yes">
12645 <desc>
12646 The connection type of the storage controller.
12647 </desc>
12648 </attribute>
12649
12650 <attribute name="controllerType" type="StorageControllerType">
12651 <desc>
12652 Type of the virtual storage controller. Depending on this value,
12653 VirtualBox will provide a different virtual storage controller hardware
12654 to the guest.
12655
12656 For SCSI controllers, the default type is LsiLogic.
12657 </desc>
12658 </attribute>
12659
12660 <method name="GetIDEEmulationPort">
12661 <desc>
12662 Gets the corresponding port number which is emulated as an IDE device.
12663
12664 <result name="E_INVALIDARG">
12665 The @a devicePosition is not in the range 0 to 3.
12666 </result>
12667 <result name="E_NOTIMPL">
12668 The storage controller type is not SATAIntelAhci.
12669 </result>
12670
12671 </desc>
12672 <param name="devicePosition" type="long" dir="in"/>
12673 <param name="portNumber" type="long" dir="return"/>
12674 </method>
12675
12676 <method name="SetIDEEmulationPort">
12677 <desc>
12678 Sets the port number which is emulated as an IDE device.
12679
12680 <result name="E_INVALIDARG">
12681 The @a devicePosition is not in the range 0 to 3 or the
12682 @a portNumber is not in the range 0 to 29.
12683 </result>
12684 <result name="E_NOTIMPL">
12685 The storage controller type is not SATAIntelAhci.
12686 </result>
12687
12688 </desc>
12689 <param name="devicePosition" type="long" dir="in"/>
12690 <param name="portNumber" type="long" dir="in"/>
12691 </method>
12692
12693 </interface>
12694
12695<if target="wsdl">
12696
12697 <!--
12698 // IManagedObjectRef
12699 /////////////////////////////////////////////////////////////////////////
12700 -->
12701
12702 <interface
12703 name="IManagedObjectRef" extends="$unknown"
12704 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12705 internal="yes"
12706 wsmap="managed"
12707 wscpp="hardcoded"
12708 >
12709 <desc>
12710 Managed object reference.
12711
12712 Only within the webservice, a managed object reference (which is really
12713 an opaque number) allows a webservice client to address an object
12714 that lives in the address space of the webservice server.
12715
12716 Behind each managed object reference, there is a COM object that lives
12717 in the webservice server's address space. The COM object is not freed
12718 until the managed object reference is released, either by an explicit
12719 call to <link to="IManagedObjectRef::release" /> or by logging off from
12720 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12721 all objects created during the webservice session.
12722
12723 Whenever a method call of the VirtualBox API returns a COM object, the
12724 webservice representation of that method will instead return a
12725 managed object reference, which can then be used to invoke methods
12726 on that object.
12727 </desc>
12728
12729 <method name="getInterfaceName">
12730 <desc>
12731 Returns the name of the interface that this managed object represents,
12732 for example, "IMachine", as a string.
12733 </desc>
12734 <param name="return" type="wstring" dir="return"/>
12735 </method>
12736
12737 <method name="release">
12738 <desc>
12739 Releases this managed object reference and frees the resources that
12740 were allocated for it in the webservice server process. After calling
12741 this method, the identifier of the reference can no longer be used.
12742 </desc>
12743 </method>
12744
12745 </interface>
12746
12747 <!--
12748 // IWebsessionManager
12749 /////////////////////////////////////////////////////////////////////////
12750 -->
12751
12752 <interface
12753 name="IWebsessionManager" extends="$unknown"
12754 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12755 internal="yes"
12756 wsmap="global"
12757 wscpp="hardcoded"
12758 >
12759 <desc>
12760 Websession manager. This provides essential services
12761 to webservice clients.
12762 </desc>
12763 <method name="logon">
12764 <desc>
12765 Logs a new client onto the webservice and returns a managed object reference to
12766 the IVirtualBox instance, which the client can then use as a basis to further
12767 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12768 interface, in one way or the other.
12769 </desc>
12770 <param name="username" type="wstring" dir="in"/>
12771 <param name="password" type="wstring" dir="in"/>
12772 <param name="return" type="IVirtualBox" dir="return"/>
12773 </method>
12774
12775 <method name="getSessionObject">
12776 <desc>
12777 Returns a managed object reference to the internal ISession object that was created
12778 for this web service session when the client logged on.
12779
12780 <see>ISession</see>
12781 </desc>
12782 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12783 <param name="return" type="ISession" dir="return"/>
12784 </method>
12785
12786 <method name="logoff">
12787 <desc>
12788 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12789 and destroys all resources associated with the session (most importantly, all
12790 managed objects created in the server while the session was active).
12791 </desc>
12792 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12793 </method>
12794
12795 </interface>
12796
12797</if>
12798
12799 <!--
12800 // IPerformanceCollector & friends
12801 /////////////////////////////////////////////////////////////////////////
12802 -->
12803
12804 <interface
12805 name="IPerformanceMetric" extends="$unknown"
12806 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12807 >
12808 <desc>
12809 The IPerformanceMetric interface represents parameters of the given
12810 performance metric.
12811 </desc>
12812
12813 <attribute name="metricName" type="wstring" readonly="yes">
12814 <desc>
12815 Name of the metric.
12816 </desc>
12817 </attribute>
12818
12819 <attribute name="object" type="$unknown" readonly="yes">
12820 <desc>
12821 Object this metric belongs to.
12822 </desc>
12823 </attribute>
12824
12825 <attribute name="description" type="wstring" readonly="yes">
12826 <desc>
12827 Textual description of the metric.
12828 </desc>
12829 </attribute>
12830
12831 <attribute name="period" type="unsigned long" readonly="yes">
12832 <desc>
12833 Time interval between samples, measured in seconds.
12834 </desc>
12835 </attribute>
12836
12837 <attribute name="count" type="unsigned long" readonly="yes">
12838 <desc>
12839 Number of recent samples retained by the performance collector for this
12840 metric.
12841
12842 When the collected sample count exceeds this number, older samples
12843 are discarded.
12844 </desc>
12845 </attribute>
12846
12847 <attribute name="unit" type="wstring" readonly="yes">
12848 <desc>
12849 Unit of measurement.
12850 </desc>
12851 </attribute>
12852
12853 <attribute name="minimumValue" type="long" readonly="yes">
12854 <desc>
12855 Minimum possible value of this metric.
12856 </desc>
12857 </attribute>
12858
12859 <attribute name="maximumValue" type="long" readonly="yes">
12860 <desc>
12861 Maximum possible value of this metric.
12862 </desc>
12863 </attribute>
12864 </interface>
12865
12866 <interface
12867 name="IPerformanceCollector" extends="$unknown"
12868 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12869 wsmap="managed"
12870 >
12871 <desc>
12872 The IPerformanceCollector interface represents a service that collects and
12873 stores performance metrics data.
12874
12875 Performance metrics are associated with objects like IHost and
12876 IMachine. Each object has a distinct set of performance metrics.
12877 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12878
12879 Metric data are collected at the specified intervals and are retained
12880 internally. The interval and the number of samples retained can be set
12881 with <link to="IPerformanceCollector::setupMetrics" />.
12882
12883 Metrics are organized hierarchically, each level separated by slash (/).
12884 General scheme for metric name is
12885 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12886 metric name stands for: CPU category, Load metric, User submetric, average
12887 aggregate. An aggregate function is computed over all retained data. Valid
12888 aggregate functions are:
12889
12890 <ul>
12891 <li>avg -- average</li>
12892 <li>min -- minimum</li>
12893 <li>max -- maximum</li>
12894 </ul>
12895
12896 "Category/Metric" together form base metric name. A base metric is the
12897 smallest unit for which a sampling interval and the number of retained
12898 samples can be set. Only base metrics can be enabled and disabled. All
12899 sub-metrics are collected when their base metric is collected.
12900 Collected values for any set of sub-metrics can be queried with
12901 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
12902 metric parameters, querying metric data, enabling or disabling metrics
12903 wildcards can be used in metric names to specify a subset of metrics. For
12904 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12905 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12906 values without aggregates <tt>*:</tt> can be used.
12907
12908 The valid names for base metrics are:
12909
12910 <ul>
12911 <li>CPU/Load</li>
12912 <li>CPU/MHz</li>
12913 <li>RAM/Usage</li>
12914 </ul>
12915
12916 The general sequence for collecting and retrieving the metrics is:
12917 <ul>
12918 <li>
12919 Obtain an instance of IPerformanceCollector with
12920 <link to="IVirtualBox::performanceCollector" />
12921 </li>
12922 <li>
12923 Allocate and populate an array with references to objects the metrics
12924 will be collected for. Use references to IHost and IMachine objects.
12925 </li>
12926 <li>
12927 Allocate and populate an array with base metric names the data will be
12928 collected for.
12929 </li>
12930 <li>
12931 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12932 metric data will be collected and stored.
12933 </li>
12934 <li>
12935 Wait for the data to get collected.
12936 </li>
12937 <li>
12938 Allocate and populate an array with references to objects the metric
12939 values will be queried for. You can re-use the object array used for
12940 setting base metrics.
12941 </li>
12942 <li>
12943 Allocate and populate an array with metric names the data will be
12944 collected for. Note that metric names differ from base metric names.
12945 </li>
12946 <li>
12947 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12948 have been collected so far are returned. Note that the values are still
12949 retained internally and data collection continues.
12950 </li>
12951 </ul>
12952
12953 For an example of usage refer to the following files in VirtualBox SDK:
12954 <ul>
12955 <li>
12956 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12957 </li>
12958 <li>
12959 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12960 </li>
12961 </ul>
12962 </desc>
12963
12964 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12965 <desc>
12966 Array of unique names of metrics.
12967
12968 This array represents all metrics supported by the performance
12969 collector. Individual objects do not necessarily support all of them.
12970 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12971 list of supported metrics for a particular object.
12972 </desc>
12973 </attribute>
12974
12975 <method name="getMetrics">
12976 <desc>
12977 Returns parameters of specified metrics for a set of objects.
12978 <note>
12979 @c Null metrics array means all metrics. @c Null object array means
12980 all existing objects.
12981 </note>
12982 </desc>
12983 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12984 <desc>
12985 Metric name filter. Currently, only a comma-separated list of metrics
12986 is supported.
12987 </desc>
12988 </param>
12989 <param name="objects" type="$unknown" dir="in" safearray="yes">
12990 <desc>
12991 Set of objects to return metric parameters for.
12992 </desc>
12993 </param>
12994 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12995 <desc>
12996 Array of returned metric parameters.
12997 </desc>
12998 </param>
12999 </method>
13000
13001 <method name="setupMetrics">
13002 <desc>
13003 Sets parameters of specified base metrics for a set of objects. Returns
13004 an array of <link to="IPerformanceMetric" /> describing the metrics have
13005 been affected.
13006 <note>
13007 @c Null or empty metric name array means all metrics. @c Null or empty
13008 object array means all existing objects. If metric name array contains
13009 a single element and object array contains many, the single metric
13010 name array element is applied to each object array element to form
13011 metric/object pairs.
13012 </note>
13013 </desc>
13014 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13015 <desc>
13016 Metric name filter. Comma-separated list of metrics with wildcard
13017 support.
13018 </desc>
13019 </param>
13020 <param name="objects" type="$unknown" dir="in" safearray="yes">
13021 <desc>
13022 Set of objects to setup metric parameters for.
13023 </desc>
13024 </param>
13025 <param name="period" type="unsigned long" dir="in">
13026 <desc>
13027 Time interval in seconds between two consecutive samples of performance
13028 data.
13029 </desc>
13030 </param>
13031 <param name="count" type="unsigned long" dir="in">
13032 <desc>
13033 Number of samples to retain in performance data history. Older samples
13034 get discarded.
13035 </desc>
13036 </param>
13037 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13038 <desc>
13039 Array of metrics that have been modified by the call to this method.
13040 </desc>
13041 </param>
13042 </method>
13043
13044 <method name="enableMetrics">
13045 <desc>
13046 Turns on collecting specified base metrics. Returns an array of
13047 <link to="IPerformanceMetric" /> describing the metrics have been
13048 affected.
13049 <note>
13050 @c Null or empty metric name array means all metrics. @c Null or empty
13051 object array means all existing objects. If metric name array contains
13052 a single element and object array contains many, the single metric
13053 name array element is applied to each object array element to form
13054 metric/object pairs.
13055 </note>
13056 </desc>
13057 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13058 <desc>
13059 Metric name filter. Comma-separated list of metrics with wildcard
13060 support.
13061 </desc>
13062 </param>
13063 <param name="objects" type="$unknown" dir="in" safearray="yes">
13064 <desc>
13065 Set of objects to enable metrics for.
13066 </desc>
13067 </param>
13068 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13069 <desc>
13070 Array of metrics that have been modified by the call to this method.
13071 </desc>
13072 </param>
13073 </method>
13074
13075 <method name="disableMetrics">
13076 <desc>
13077 Turns off collecting specified base metrics. Returns an array of
13078 <link to="IPerformanceMetric" /> describing the metrics have been
13079 affected.
13080 <note>
13081 @c Null or empty metric name array means all metrics. @c Null or empty
13082 object array means all existing objects. If metric name array contains
13083 a single element and object array contains many, the single metric
13084 name array element is applied to each object array element to form
13085 metric/object pairs.
13086 </note>
13087 </desc>
13088 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13089 <desc>
13090 Metric name filter. Comma-separated list of metrics with wildcard
13091 support.
13092 </desc>
13093 </param>
13094 <param name="objects" type="$unknown" dir="in" safearray="yes">
13095 <desc>
13096 Set of objects to disable metrics for.
13097 </desc>
13098 </param>
13099 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13100 <desc>
13101 Array of metrics that have been modified by the call to this method.
13102 </desc>
13103 </param>
13104 </method>
13105
13106 <method name="queryMetricsData">
13107 <desc>
13108 Queries collected metrics data for a set of objects.
13109
13110 The data itself and related metric information are returned in seven
13111 parallel and one flattened array of arrays. Elements of
13112 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13113 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13114 the same index describe one set of values corresponding to a single
13115 metric.
13116
13117 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13118 start and length of a sub-array is indicated by
13119 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13120 value for metric <tt>metricNames[i]</tt> is at
13121 <tt>returnData[returnIndices[i]]</tt>.
13122
13123 <note>
13124 @c Null or empty metric name array means all metrics. @c Null or empty
13125 object array means all existing objects. If metric name array contains
13126 a single element and object array contains many, the single metric
13127 name array element is applied to each object array element to form
13128 metric/object pairs.
13129 </note>
13130 <note>
13131 Data collection continues behind the scenes after call to
13132 @c queryMetricsData. The return data can be seen as the snapshot of
13133 the current state at the time of @c queryMetricsData call. The
13134 internally kept metric values are not cleared by the call. This makes
13135 possible querying different subsets of metrics or aggregates with
13136 subsequent calls. If periodic querying is needed it is highly
13137 suggested to query the values with @c interval*count period to avoid
13138 confusion. This way a completely new set of data values will be
13139 provided by each query.
13140 </note>
13141 </desc>
13142 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13143 <desc>
13144 Metric name filter. Comma-separated list of metrics with wildcard
13145 support.
13146 </desc>
13147 </param>
13148 <param name="objects" type="$unknown" dir="in" safearray="yes">
13149 <desc>
13150 Set of objects to query metrics for.
13151 </desc>
13152 </param>
13153 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13154 <desc>
13155 Names of metrics returned in @c returnData.
13156 </desc>
13157 </param>
13158 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13159 <desc>
13160 Objects associated with metrics returned in @c returnData.
13161 </desc>
13162 </param>
13163 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13164 <desc>
13165 Units of measurement for each returned metric.
13166 </desc>
13167 </param>
13168 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13169 <desc>
13170 Divisor that should be applied to return values in order to get
13171 floating point values. For example:
13172 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13173 will retrieve the floating point value of i-th sample of the first
13174 metric.
13175 </desc>
13176 </param>
13177 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13178 <desc>
13179 Sequence numbers of the first elements of value sequences of particular metrics
13180 returned in @c returnData. For aggregate metrics it is the sequence number of
13181 the sample the aggregate started calculation from.
13182 </desc>
13183 </param>
13184 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13185 <desc>
13186 Indices of the first elements of value sequences of particular metrics
13187 returned in @c returnData.
13188 </desc>
13189 </param>
13190 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13191 <desc>
13192 Lengths of value sequences of particular metrics.
13193 </desc>
13194 </param>
13195 <param name="returnData" type="long" dir="return" safearray="yes">
13196 <desc>
13197 Flattened array of all metric data containing sequences of values for
13198 each metric.
13199 </desc>
13200 </param>
13201 </method>
13202
13203 </interface>
13204
13205 <module name="VBoxSVC" context="LocalServer">
13206 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13207 namespace="virtualbox.org">
13208 <interface name="IVirtualBox" default="yes"/>
13209 </class>
13210 </module>
13211
13212 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13213 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13214 namespace="virtualbox.org">
13215 <interface name="ISession" default="yes"/>
13216 </class>
13217 </module>
13218
13219</library>
13220
13221</idl>
13222
13223<!-- 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