VirtualBox

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

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

dhcp settings fixes

  • Property svn:eol-style set to native
File size: 486.2 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129
130#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
131# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
132 NS_IMPL_THREADSAFE_ADDREF(_class) \
133 NS_IMPL_THREADSAFE_RELEASE(_class) \
134 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
135 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
136#endif
137
138#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
139# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
140 NS_IMPL_THREADSAFE_ADDREF(_class) \
141 NS_IMPL_THREADSAFE_RELEASE(_class) \
142 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
143 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
144#endif
145
146#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
147# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
148 NS_INTERFACE_MAP_BEGIN(_class) \
149 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
150 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
151 NS_IMPL_QUERY_CLASSINFO(_class) \
152 NS_INTERFACE_MAP_END
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
157 _i2, _ic2) \
158 NS_INTERFACE_MAP_BEGIN(_class) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
160 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
161 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
162 NS_IMPL_QUERY_CLASSINFO(_class) \
163 NS_INTERFACE_MAP_END
164#endif
165
166#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
167#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
168
169#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
170# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
171 NS_IMPL_THREADSAFE_ADDREF(_class) \
172 NS_IMPL_THREADSAFE_RELEASE(_class) \
173 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
174 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
175#endif
176
177#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
178# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
179 _i2, _ic2) \
180 NS_IMPL_THREADSAFE_ADDREF(_class) \
181 NS_IMPL_THREADSAFE_RELEASE(_class) \
182 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2) \
184 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
185#endif
186 </cpp>
187</if>
188
189<library
190 name="VirtualBox"
191 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
192 version="1.3"
193 desc="VirtualBox Type Library"
194 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
195 supportsErrorInfo="yes"
196>
197
198
199 <!--
200 // COM result codes for VirtualBox
201 /////////////////////////////////////////////////////////////////////////
202 -->
203
204 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
205 <desc>
206 This section describes all VirtualBox-specific COM result codes that may
207 be returned by methods of VirtualBox COM interfaces in addition to
208 standard COM result codes.
209
210 Note that along with the result code, every VirtualBox method returns
211 extended error information through the IVirtualBoxErrorInfo interface on
212 failure. This interface is a preferred way to present the error to the end
213 user because it contains a human readable description of the error. Raw
214 result codes, both standard and described in this section, are intended to
215 be used by programs to analyze the reason of a failure and select an
216 appropriate course of action without involving the end user (for example,
217 retry the operation later or make a different call).
218
219 The standard COM result codes that may originate from our methods include:
220
221 <table>
222 <tr><td>E_INVALIDARG</td>
223 <td>
224 Returned when the value of the method's argument is not within the range
225 of valid values. This should not be confused with situations when the
226 value is within the range but simply doesn't suit the current object
227 state and there is a possibility that it will be accepted later (in such
228 cases VirtualBox-specific codes are returned, for example,
229 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
230 </td>
231 </tr>
232 <tr><td>E_POINTER</td>
233 <td>
234 Returned if a memory pointer for the output argument is invalid (for
235 example, <tt>NULL</tt>). Note that when pointers representing input
236 arguments (such as strings) are invalid, E_INVALIDARG is returned.
237 </td>
238 </tr>
239 <tr><td>E_ACCESSDENIED</td>
240 <td>
241 Returned when the called object is not ready. Since the lifetime of a
242 public COM object cannot be fully controlled by the implementation,
243 VirtualBox maintains the readiness state for all objects it creates and
244 returns this code in response to any method call on the object that was
245 deactivated by VirtualBox and is not functioning any more.
246 </td>
247 </tr>
248 <tr><td>E_OUTOFMEMORY</td>
249 <td>
250 Returned when a memory allocation operation fails.
251 </td>
252 </tr>
253 </table>
254 </desc>
255 </descGroup>
256
257 <!--
258 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
259 everything in <result>/<desc> after (and including) the first dot, so express
260 the matter of the error code in the first sentence and keep it short.
261 -->
262
263 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
264 <desc>
265 Object corresponding to the supplied arguments does not exist.
266 </desc>
267 </result>
268
269 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
270 <desc>
271 Current virtual machine state prevents the operation.
272 </desc>
273 </result>
274
275 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
276 <desc>
277 Virtual machine error occurred attempting the operation.
278 </desc>
279 </result>
280
281 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
282 <desc>
283 File not accessible or erroneous file contents.
284 </desc>
285 </result>
286
287 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
288 <desc>
289 Runtime subsystem error.
290 </desc>
291 </result>
292
293 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
294 <desc>
295 Pluggable Device Manager error.
296 </desc>
297 </result>
298
299 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
300 <desc>
301 Current object state prohibits operation.
302 </desc>
303 </result>
304
305 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
306 <desc>
307 Host operating system related error.
308 </desc>
309 </result>
310
311 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
312 <desc>
313 Requested operation is not supported.
314 </desc>
315 </result>
316
317 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
318 <desc>
319 Invalid XML found.
320 </desc>
321 </result>
322
323 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
324 <desc>
325 Current session state prohibits operation.
326 </desc>
327 </result>
328
329 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
330 <desc>
331 Object being in use prohibits operation.
332 </desc>
333 </result>
334
335 <!--
336 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
337 everything in <result>/<desc> after (and including) the first dot, so express
338 the matter of the error code in the first sentence and keep it short.
339 -->
340
341 <descGroup/>
342
343 <!--
344 // all common enums
345 /////////////////////////////////////////////////////////////////////////
346 -->
347
348 <enum
349 name="TSBool"
350 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
351 >
352 <desc>
353 Boolean variable having a third state, default.
354 </desc>
355
356 <const name="False" value="0"/>
357 <const name="True" value="1"/>
358 <const name="Default" value="2"/>
359 </enum>
360
361 <enum
362 name="MachineState"
363 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
364 >
365 <desc>
366 Virtual machine execution state.
367
368 This enumeration represents possible values of the <link
369 to="IMachine::state"/> attribute.
370
371 Below is the basic virtual machine state diagram. It shows how the state
372 changes during virtual machine execution. The text in square braces shows
373 a method of the IConsole interface that performs the given state
374 transition.
375
376 <pre>
377 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
378 V |
379 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
380 | | | | V |
381 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
382 | | ^ | ^ |
383 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
384 | ^ | | | |
385 | | +-----------------------------------------+-|-------------------+ +
386 | | | | |
387 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
388 | | | |
389 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
390 | | |
391 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
392 </pre>
393
394 Note that states to the right from PoweredOff, Aborted and Saved in the
395 above diagram are called <i>online VM states</i>. These states
396 represent the virtual machine which is being executed in a dedicated
397 process (usually with a GUI window attached to it where you can see the
398 activity of the virtual machine and interact with it). There are two
399 special pseudo-states, FirstOnline and LastOnline, that can be used in
400 relational expressions to detect if the given machine state is online or
401 not:
402
403 <pre>
404 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
405 machine.GetState() &lt;= MachineState_LastOnline)
406 {
407 ...the machine is being executed...
408 }
409 </pre>
410
411 When the virtual machine is in one of the online VM states (that is, being
412 executed), only a few machine settings can be modified. Methods working
413 with such settings contain an explicit note about that. An attempt to
414 change any oter setting or perform a modifying operation during this time
415 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
416
417 All online states except Running, Paused and Stuck are transitional: they
418 represent temporary conditions of the virtual machine that will last as
419 long as the operation that initiated such a condition.
420
421 The Stuck state is a special case. It means that execution of the machine
422 has reached the "Guru Meditation" condition. This condition indicates an
423 internal VMM (virtual machine manager) failure which may happen as a
424 result of either an unhandled low-level virtual hardware exception or one
425 of the recompiler exceptions (such as the <i>too-many-traps</i>
426 condition).
427
428 Note also that any online VM state may transit to the Aborted state. This
429 happens if the process that is executing the virtual machine terminates
430 unexpectedly (for example, crashes). Other than that, the Aborted state is
431 equivalent to PoweredOff.
432
433 There are also a few additional state diagrams that do not deal with
434 virtual machine execution and therefore are shown separately. The states
435 shown on these diagrams are called <i>offline VM states</i> (this includes
436 PoweredOff, Aborted and Saved too).
437
438 The first diagram shows what happens when a lengthy setup operation is
439 being executed (such as <link to="IMachine::attachHardDisk"/>).
440
441 <pre>
442 +-----------------------------------(same sate as before the call)------+
443 | |
444 +-&gt; PoweredOff --+ |
445 | | |
446 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
447 | |
448 +-&gt; Saved -------+
449 </pre>
450
451 The next two diagrams demonstrate the process of taking a snapshot of a
452 powered off virtual machine and performing one of the "discard..."
453 operations, respectively.
454
455 <pre>
456 +-----------------------------------(same sate as before the call)------+
457 | |
458 +-&gt; PoweredOff --+ |
459 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
460 +-&gt; Aborted -----+
461
462 +-&gt; PoweredOff --+
463 | |
464 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
465 | | [discardCurrentState()] |
466 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
467 | |
468 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
469 </pre>
470
471 Note that the Saving state is present in both the offline state group and
472 online state group. Currently, the only way to determine what group is
473 assumed in a particular case is to remember the previous machine state: if
474 it was Running or Paused, then Saving is an online state, otherwise it is
475 an offline state. This inconsistency may be removed in one of the future
476 versions of VirtualBox by adding a new state.
477
478 <note internal="yes">
479 For whoever decides to touch this enum: In order to keep the
480 comparisons involving FirstOnline and LastOnline pseudo-states valid,
481 the numeric values of these states must be correspondingly updated if
482 needed: for any online VM state, the condition
483 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
484 <tt>true</tt>. The same relates to transient states for which
485 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
486 <tt>true</tt>.
487 </note>
488 </desc>
489
490 <const name="Null" value="0">
491 <desc>Null value (nver used by the API).</desc>
492 </const>
493 <const name="PoweredOff" value="1">
494 <desc>
495 The machine is not running.
496 </desc>
497 </const>
498 <const name="Saved" value="2">
499 <desc>
500 The machine is not currently running, but the execution state of the machine
501 has been saved to an external file when it was running.
502 </desc>
503 </const>
504 <const name="Aborted" value="3">
505 <desc>
506 The process running the machine has terminated abnormally.
507 </desc>
508 </const>
509 <const name="Running" value="4">
510 <desc>
511 The machine is currently being executed.
512 <note internal="yes">
513 For whoever decides to touch this enum: In order to keep the
514 comparisons in the old source code valid, this state must immediately
515 precede the Paused state.
516 </note>
517 </desc>
518 </const>
519 <const name="Paused" value="5">
520 <desc>
521 Execution of the machine has been paused.
522 <note internal="yes">
523 For whoever decides to touch this enum: In order to keep the
524 comparisons in the old source code valid, this state must immediately
525 follow the Running state.
526 </note>
527 </desc>
528 </const>
529 <const name="Stuck" value="6">
530 <desc>
531 Execution of the machine has reached the "Guru Meditation"
532 condition.
533 </desc>
534 </const>
535 <const name="Starting" value="7">
536 <desc>
537 Machine is being started after powering it on from a
538 zero execution state.
539 </desc>
540 </const>
541 <const name="Stopping" value="8">
542 <desc>
543 Machine is being normally stopped powering it off, or after the guest OS
544 has initiated a shutdown sequence.
545 </desc>
546 </const>
547 <const name="Saving" value="9">
548 <desc>
549 Machine is saving its execution state to a file or an online
550 snapshot of the machine is being taken.
551 </desc>
552 </const>
553 <const name="Restoring" value="10">
554 <desc>
555 Execution state of the machine is being restored from a file
556 after powering it on from the saved execution state.
557 </desc>
558 </const>
559 <const name="Discarding" value="11">
560 <desc>
561 Snapshot of the machine is being discarded.
562 </desc>
563 </const>
564 <const name="SettingUp" value="12">
565 <desc>
566 Lengthy setup operation is in progress.
567 </desc>
568 </const>
569
570 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
571 <desc>
572 Pseudo-state: first online state (for use in relational expressions).
573 </desc>
574 </const>
575 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
576 <desc>
577 Pseudo-state: last online state (for use in relational expressions).
578 </desc>
579 </const>
580
581 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
582 <desc>
583 Pseudo-state: first transient state (for use in relational expressions).
584 </desc>
585 </const>
586 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
587 <desc>
588 Pseudo-state: last transient state (for use in relational expressions).
589 </desc>
590 </const>
591
592 </enum>
593
594 <enum
595 name="SessionState"
596 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
597 >
598 <desc>
599 Session state. This enumeration represents possible values of
600 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
601 attributes. See individual enumerator descriptions for the meaning for
602 every value.
603 </desc>
604
605 <const name="Null" value="0">
606 <desc>Null value (never used by the API).</desc>
607 </const>
608 <const name="Closed" value="1">
609 <desc>
610 The machine has no open sessions (<link to="IMachine::sessionState"/>);
611 the session is closed (<link to="ISession::state"/>)
612 </desc>
613 </const>
614 <const name="Open" value="2">
615 <desc>
616 The machine has an open direct session (<link to="IMachine::sessionState"/>);
617 the session is open (<link to="ISession::state"/>)
618 </desc>
619 </const>
620 <const name="Spawning" value="3">
621 <desc>
622 A new (direct) session is being opened for the machine
623 as a result of <link to="IVirtualBox::openRemoteSession"/>
624 call (<link to="IMachine::sessionState"/>);
625 the session is currently being opened
626 as a result of <link to="IVirtualBox::openRemoteSession"/>
627 call (<link to="ISession::state"/>)
628 </desc>
629 </const>
630 <const name="Closing" value="4">
631 <desc>
632 The direct session is being closed (<link to="IMachine::sessionState"/>);
633 the session is being closed (<link to="ISession::state"/>)
634 </desc>
635 </const>
636 </enum>
637
638 <enum
639 name="SessionType"
640 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
641 >
642 <desc>
643 Session type. This enumeration represents possible values of the
644 <link to="ISession::type"/> attribute.
645 </desc>
646
647 <const name="Null" value="0">
648 <desc>Null value (never used by the API).</desc>
649 </const>
650 <const name="Direct" value="1">
651 <desc>
652 Direct session
653 (opened by <link to="IVirtualBox::openSession"/>)
654 </desc>
655 </const>
656 <const name="Remote" value="2">
657 <desc>
658 Remote session
659 (opened by <link to="IVirtualBox::openRemoteSession"/>)
660 </desc>
661 </const>
662 <const name="Existing" value="3">
663 <desc>
664 Existing session
665 (opened by <link to="IVirtualBox::openExistingSession"/>)
666 </desc>
667 </const>
668 </enum>
669
670 <enum
671 name="DeviceType"
672 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
673 >
674 <desc>
675 Device type.
676 </desc>
677 <const name="Null" value="0">
678 <desc>
679 Null value, may also mean "no device" (not allowed for
680 <link to="IConsole::getDeviceActivity"/>).
681 </desc>
682 </const>
683 <const name="Floppy" value="1">
684 <desc>Floppy device.</desc>
685 </const>
686 <const name="DVD" value="2">
687 <desc>CD/DVD-ROM device.</desc>
688 </const>
689 <const name="HardDisk" value="3">
690 <desc>Hard disk device.</desc>
691 </const>
692 <const name="Network" value="4">
693 <desc>Network device.</desc>
694 </const>
695 <const name="USB" value="5">
696 <desc>USB device.</desc>
697 </const>
698 <const name="SharedFolder" value="6">
699 <desc>Shared folder device.</desc>
700 </const>
701 </enum>
702
703 <enum
704 name="DeviceActivity"
705 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
706 >
707 <desc>
708 Device activity for <link to="IConsole::getDeviceActivity"/>.
709 </desc>
710
711 <const name="Null" value="0"/>
712 <const name="Idle" value="1"/>
713 <const name="Reading" value="2"/>
714 <const name="Writing" value="3"/>
715 </enum>
716
717 <enum
718 name="ClipboardMode"
719 uuid="33364716-4008-4701-8f14-be0fa3d62950"
720 >
721 <desc>
722 Host-Guest clipboard interchange mode.
723 </desc>
724
725 <const name="Disabled" value="0"/>
726 <const name="HostToGuest" value="1"/>
727 <const name="GuestToHost" value="2"/>
728 <const name="Bidirectional" value="3"/>
729 </enum>
730
731 <enum
732 name="Scope"
733 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
734 >
735 <desc>
736 Scope of the operation.
737
738 A generic enumeration used in various methods to define the action or
739 argument scope.
740 </desc>
741
742 <const name="Global" value="0"/>
743 <const name="Machine" value="1"/>
744 <const name="Session" value="2"/>
745 </enum>
746
747 <enum
748 name="GuestStatisticType"
749 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
750 >
751 <desc>
752 Statistics type for <link to="IGuest::getStatistic"/>.
753 </desc>
754
755 <const name="CPULoad_Idle" value="0">
756 <desc>
757 Idle CPU load (0-100%) for last interval.
758 </desc>
759 </const>
760 <const name="CPULoad_Kernel" value="1">
761 <desc>
762 Kernel CPU load (0-100%) for last interval.
763 </desc>
764 </const>
765 <const name="CPULoad_User" value="2">
766 <desc>
767 User CPU load (0-100%) for last interval.
768 </desc>
769 </const>
770 <const name="Threads" value="3">
771 <desc>
772 Total number of threads in the system.
773 </desc>
774 </const>
775 <const name="Processes" value="4">
776 <desc>
777 Total number of processes in the system.
778 </desc>
779 </const>
780 <const name="Handles" value="5">
781 <desc>
782 Total number of handles in the system.
783 </desc>
784 </const>
785 <const name="MemoryLoad" value="6">
786 <desc>
787 Memory load (0-100%).
788 </desc>
789 </const>
790 <const name="PhysMemTotal" value="7">
791 <desc>
792 Total physical memory in megabytes.
793 </desc>
794 </const>
795 <const name="PhysMemAvailable" value="8">
796 <desc>
797 Free physical memory in megabytes.
798 </desc>
799 </const>
800 <const name="PhysMemBalloon" value="9">
801 <desc>
802 Ballooned physical memory in megabytes.
803 </desc>
804 </const>
805 <const name="MemCommitTotal" value="10">
806 <desc>
807 Total amount of memory in the committed state in megabytes.
808 </desc>
809 </const>
810 <const name="MemKernelTotal" value="11">
811 <desc>
812 Total amount of memory used by the guest OS's kernel in megabytes.
813 </desc>
814 </const>
815 <const name="MemKernelPaged" value="12">
816 <desc>
817 Total amount of paged memory used by the guest OS's kernel in megabytes.
818 </desc>
819 </const>
820 <const name="MemKernelNonpaged" value="13">
821 <desc>
822 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
823 </desc>
824 </const>
825 <const name="MemSystemCache" value="14">
826 <desc>
827 Total amount of memory used by the guest OS's system cache in megabytes.
828 </desc>
829 </const>
830 <const name="PageFileSize" value="15">
831 <desc>
832 Pagefile size in megabytes.
833 </desc>
834 </const>
835 <const name="SampleNumber" value="16">
836 <desc>
837 Statistics sample number
838 </desc>
839 </const>
840 <const name="MaxVal" value="17"/>
841 </enum>
842
843 <enum
844 name="BIOSBootMenuMode"
845 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
846 >
847 <desc>
848 BIOS boot menu mode.
849 </desc>
850
851 <const name="Disabled" value="0"/>
852 <const name="MenuOnly" value="1"/>
853 <const name="MessageAndMenu" value="2"/>
854 </enum>
855
856 <enum
857 name="DriveState"
858 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
859 >
860 <const name="Null" value="0">
861 <desc>Null value (never used by the API).</desc>
862 </const>
863 <const name="NotMounted" value="1"/>
864 <const name="ImageMounted" value="2"/>
865 <const name="HostDriveCaptured" value="3"/>
866 </enum>
867
868 <enum
869 name="ProcessorFeature"
870 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
871 >
872 <desc>
873 CPU features.
874 </desc>
875
876 <const name="HWVirtEx" value="0"/>
877 <const name="PAE" value="1"/>
878 <const name="LongMode" value="2"/>
879 </enum>
880
881
882 <!--
883 // IVirtualBoxErrorInfo
884 /////////////////////////////////////////////////////////////////////////
885 -->
886
887 <interface
888 name="IVirtualBoxErrorInfo" extends="$errorinfo"
889 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
890 supportsErrorInfo="no"
891 wsmap="suppress"
892 >
893 <desc>
894 The IVirtualBoxErrorInfo interface represents extended error information.
895
896 Extended error information can be set by VirtualBox components after
897 unsuccessful or partially successful method invocation. This information
898 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
899 and then shown to the client in addition to the plain 32-bit result code.
900
901 In MS COM, this interface extends the IErrorInfo interface,
902 in XPCOM, it extends the nsIException interface. In both cases,
903 it provides a set of common attributes to retrieve error
904 information.
905
906 Sometimes invocation of some component's method may involve methods of
907 other components that may also fail (independently of this method's
908 failure), or a series of non-fatal errors may precede a fatal error that
909 causes method failure. In cases like that, it may be desirable to preserve
910 information about all errors happened during method invocation and deliver
911 it to the caller. The <link to="#next"/> attribute is intended
912 specifically for this purpose and allows to represent a chain of errors
913 through a single IVirtualBoxErrorInfo object set after method invocation.
914
915 Note that errors are stored to a chain in the reverse order, i.e. the
916 initial error object you query right after method invocation is the last
917 error set by the callee, the object it points to in the @a next attribute
918 is the previous error and so on, up to the first error (which is the last
919 in the chain).
920 </desc>
921
922 <attribute name="resultCode" type="result" readonly="yes">
923 <desc>
924 Result code of the error.
925 Usually, it will be the same as the result code returned
926 by the method that provided this error information, but not
927 always. For example, on Win32, CoCreateInstance() will most
928 likely return E_NOINTERFACE upon unsuccessful component
929 instantiation attempt, but not the value the component factory
930 returned.
931 <note>
932 In MS COM, there is no equivalent.
933 In XPCOM, it is the same as nsIException::result.
934 </note>
935 </desc>
936 </attribute>
937
938 <attribute name="interfaceID" type="uuid" readonly="yes">
939 <desc>
940 UUID of the interface that defined the error.
941 <note>
942 In MS COM, it is the same as IErrorInfo::GetGUID.
943 In XPCOM, there is no equivalent.
944 </note>
945 </desc>
946 </attribute>
947
948 <attribute name="component" type="wstring" readonly="yes">
949 <desc>
950 Name of the component that generated the error.
951 <note>
952 In MS COM, it is the same as IErrorInfo::GetSource.
953 In XPCOM, there is no equivalent.
954 </note>
955 </desc>
956 </attribute>
957
958 <attribute name="text" type="wstring" readonly="yes">
959 <desc>
960 Text description of the error.
961 <note>
962 In MS COM, it is the same as IErrorInfo::GetDescription.
963 In XPCOM, it is the same as nsIException::message.
964 </note>
965 </desc>
966 </attribute>
967
968 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
969 <desc>
970 Next error object if there is any, or @c null otherwise.
971 <note>
972 In MS COM, there is no equivalent.
973 In XPCOM, it is the same as nsIException::inner.
974 </note>
975 </desc>
976 </attribute>
977
978 </interface>
979
980
981 <!--
982 // IVirtualBox
983 /////////////////////////////////////////////////////////////////////////
984 -->
985
986 <interface
987 name="IVirtualBoxCallback" extends="$unknown"
988 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
989 wsmap="suppress"
990 >
991 <method name="onMachineStateChange">
992 <desc>
993 The execution state of the given machine has changed.
994 <see>IMachine::state</see>
995 </desc>
996 <param name="machineId" type="uuid" dir="in">
997 <desc>ID of the machine this event relates to.</desc>
998 </param>
999 <param name="state" type="MachineState" dir="in">
1000 <desc>New execution state.</desc>
1001 </param>
1002 </method>
1003
1004 <method name="onMachineDataChange">
1005 <desc>
1006 Any of the settings of the given machine has changed.
1007 </desc>
1008 <param name="machineId" type="uuid" dir="in">
1009 <desc>ID of the machine this event relates to.</desc>
1010 </param>
1011 </method>
1012
1013 <method name="onExtraDataCanChange">
1014 <desc>
1015 Notification when someone tries to change extra data for
1016 either the given machine or (if null) global extra data.
1017 This gives the chance to veto against changes.
1018 </desc>
1019 <param name="machineId" type="uuid" dir="in">
1020 <desc>
1021 ID of the machine this event relates to
1022 (null ID for global extra data change requests).
1023 </desc>
1024 </param>
1025 <param name="key" type="wstring" dir="in">
1026 <desc>
1027 Extra data key for the attempted write.
1028 </desc>
1029 </param>
1030 <param name="value" type="wstring" dir="in">
1031 <desc>
1032 Extra data value for the given key.
1033 </desc>
1034 </param>
1035 <param name="error" type="wstring" dir="out">
1036 <desc>
1037 Optional error message describing the reason of the
1038 veto (ignored if this notification returns @c true).
1039 </desc>
1040 </param>
1041 <param name="allowChange" type="boolean" dir="return">
1042 <desc>
1043 Flag to indicate whether the callee agrees (@c true)
1044 or vetoes against the change (@c false).
1045 </desc>
1046 </param>
1047 </method>
1048
1049 <method name="onExtraDataChange">
1050 <desc>
1051 Notification when machine specific or global extra data
1052 has changed.
1053 </desc>
1054 <param name="machineId" type="uuid" dir="in">
1055 <desc>
1056 ID of the machine this event relates to.
1057 Null for global extra data changes.
1058 </desc>
1059 </param>
1060 <param name="key" type="wstring" dir="in">
1061 <desc>
1062 Extra data key that has changed.
1063 </desc>
1064 </param>
1065 <param name="value" type="wstring" dir="in">
1066 <desc>
1067 Extra data value for the given key.
1068 </desc>
1069 </param>
1070 </method>
1071
1072 <method name="onMediaRegistered">
1073 <desc>
1074 The given media was registered or unregistered
1075 within this VirtualBox installation.
1076
1077 The @a mediaType parameter describes what type of
1078 media the specified @a mediaId refers to. Possible
1079 values are:
1080
1081 <ul>
1082 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1083 that, if registered, can be obtained using the
1084 <link to="IVirtualBox::getHardDisk"/> call.</li>
1085 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1086 that, if registered, can be obtained using the
1087 <link to="IVirtualBox::getDVDImage"/> call.</li>
1088 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1089 that, if registered, can be obtained using the
1090 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1091 </ul>
1092
1093 Note that if this is a deregistration notification,
1094 there is no way to access the object representing the
1095 unregistered media. It is supposed that the
1096 application will do required cleanup based on the
1097 @a mediaId value.
1098 </desc>
1099 <param name="mediaId" type="uuid" dir="in">
1100 <desc>ID of the media this event relates to.</desc>
1101 </param>
1102 <param name="mediaType" type="DeviceType" dir="in">
1103 <desc>Type of the media this event relates to.</desc>
1104 </param>
1105 <param name="registered" type="boolean" dir="in">
1106 <desc>
1107 If true, the media was registered, otherwise it was
1108 unregistered.
1109 </desc>
1110 </param>
1111 </method>
1112
1113 <method name="onMachineRegistered">
1114 <desc>
1115 The given machine was registered or unregistered
1116 within this VirtualBox installation.
1117 </desc>
1118 <param name="machineId" type="uuid" dir="in">
1119 <desc>ID of the machine this event relates to.</desc>
1120 </param>
1121 <param name="registered" type="boolean" dir="in">
1122 <desc>
1123 If true, the machine was registered, otherwise it was
1124 unregistered.
1125 </desc>
1126 </param>
1127 </method>
1128
1129 <method name="onSessionStateChange">
1130 <desc>
1131 The state of the session for the given machine was changed.
1132 <see>IMachine::sessionState</see>
1133 </desc>
1134 <param name="machineId" type="uuid" dir="in">
1135 <desc>ID of the machine this event relates to.</desc>
1136 </param>
1137 <param name="state" type="SessionState" dir="in">
1138 <desc>New session state.</desc>
1139 </param>
1140 </method>
1141
1142 <method name="onSnapshotTaken">
1143 <desc>
1144 A new snapshot of the machine has been taken.
1145 <see>ISnapshot</see>
1146 </desc>
1147 <param name="machineId" type="uuid" dir="in">
1148 <desc>ID of the machine this event relates to.</desc>
1149 </param>
1150 <param name="snapshotId" type="uuid" dir="in">
1151 <desc>ID of the new snapshot.</desc>
1152 </param>
1153 </method>
1154
1155 <method name="onSnapshotDiscarded">
1156 <desc>
1157 Snapshot of the given machine has been discarded.
1158
1159 <note>
1160 This notification is delivered <b>after</b> the snapshot
1161 object has been uninitialized on the server (so that any
1162 attempt to call its methods will return an error).
1163 </note>
1164
1165 <see>ISnapshot</see>
1166 </desc>
1167 <param name="machineId" type="uuid" dir="in">
1168 <desc>ID of the machine this event relates to.</desc>
1169 </param>
1170 <param name="snapshotId" type="uuid" dir="in">
1171 <desc>
1172 ID of the discarded snapshot. <tt>null</tt> means the
1173 current machine state has been discarded (restored from
1174 the current snapshot).
1175 </desc>
1176 </param>
1177 </method>
1178
1179 <method name="onSnapshotChange">
1180 <desc>
1181 Snapshot properties (name and/or description) have been changed.
1182 <see>ISnapshot</see>
1183 </desc>
1184 <param name="machineId" type="uuid" dir="in">
1185 <desc>ID of the machine this event relates to.</desc>
1186 </param>
1187 <param name="snapshotId" type="uuid" dir="in">
1188 <desc>ID of the changed snapshot.</desc>
1189 </param>
1190 </method>
1191
1192 <method name="onGuestPropertyChange">
1193 <desc>
1194 Notification when a guest property has changed.
1195 </desc>
1196 <param name="machineId" type="uuid" dir="in">
1197 <desc>
1198 ID of the machine this event relates to.
1199 </desc>
1200 </param>
1201 <param name="name" type="wstring" dir="in">
1202 <desc>
1203 The name of the property that has changed.
1204 </desc>
1205 </param>
1206 <param name="value" type="wstring" dir="in">
1207 <desc>
1208 The new property value.
1209 </desc>
1210 </param>
1211 <param name="flags" type="wstring" dir="in">
1212 <desc>
1213 The new property flags.
1214 </desc>
1215 </param>
1216 </method>
1217
1218 </interface>
1219
1220 <interface
1221 name="IDhcpServer" extends="$unknown"
1222 uuid="ed5c8393-e245-476d-a272-b65063a5d542"
1223 wsmap="managed"
1224 >
1225 <desc>
1226 The IDhcpServer interface represents the vbox dhcp server configuration.
1227
1228 To enumerate all the dhcp servers on the host, use the
1229 <link to="IVirtualBox::dhcpServers"/> attribute.
1230 </desc>
1231
1232 <attribute name="enabled" type="boolean">
1233 <desc>
1234 specifies if the dhcp server is enabled
1235 </desc>
1236 </attribute>
1237
1238 <attribute name="IPAddress" type="wstring" readonly="yes">
1239 <desc>
1240 specifies server IP
1241 </desc>
1242 </attribute>
1243
1244 <attribute name="networkMask" type="wstring" readonly="yes">
1245 <desc>
1246 specifies server network mask
1247 </desc>
1248 </attribute>
1249
1250 <attribute name="networkName" type="wstring" readonly="yes">
1251 <desc>
1252 specifies internal network name the server is used for
1253 </desc>
1254 </attribute>
1255
1256 <attribute name="lowerIP" type="wstring" readonly="yes">
1257 <desc>
1258 specifies from IP adrres in server address range
1259 </desc>
1260 </attribute>
1261
1262 <attribute name="upperIP" type="wstring" readonly="yes">
1263 <desc>
1264 specifies to IP adrres in server address range
1265 </desc>
1266 </attribute>
1267
1268 <method name="setConfiguration">
1269 <desc>
1270 configures the server
1271 <result name="E_INVALIDARG">
1272 invalid configuration supplied
1273 </result>
1274 </desc>
1275 <param name="IPAddress" type="wstring" dir="in">
1276 <desc>
1277 server IP address
1278 </desc>
1279 </param>
1280 <param name="networkMask" type="wstring" dir="in">
1281 <desc>
1282 server network mask
1283 </desc>
1284 </param>
1285 <param name="FromIPAddress" type="wstring" dir="in">
1286 <desc>
1287 server From IP address for address range
1288 </desc>
1289 </param>
1290 <param name="ToIPAddress" type="wstring" dir="in">
1291 <desc>
1292 server To IP address for address range
1293 </desc>
1294 </param>
1295 </method>
1296 </interface>
1297
1298 <interface
1299 name="IVirtualBox" extends="$dispatched"
1300 uuid="779264f4-65ed-48ed-be39-518ca549e296"
1301 wsmap="managed"
1302 >
1303 <desc>
1304 The IVirtualBox interface represents the main interface exposed by the
1305 product that provides virtual machine management.
1306
1307 An instance of IVirtualBox is required for the product to do anything
1308 useful. Even though the interface does not expose this, internally,
1309 IVirtualBox is implemented as a singleton and actually lives in the
1310 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1311 IVirtualBox can track the state of all virtual machines on a particular
1312 host, regardless of which frontend started them.
1313
1314 To enumerate all the virtual machines on the host, use the
1315 <link to="IVirtualBox::machines"/> attribute.
1316 </desc>
1317
1318 <attribute name="version" type="wstring" readonly="yes">
1319 <desc>
1320 A string representing the version number of the product. The
1321 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1322 last number represents the build number and will frequently change.
1323 </desc>
1324 </attribute>
1325
1326 <attribute name="revision" type="unsigned long" readonly="yes">
1327 <desc>
1328 The internal build revision number of the product.
1329 </desc>
1330 </attribute>
1331
1332 <attribute name="packageType" type="wstring" readonly="yes">
1333 <desc>
1334 A string representing the package type of this product. The
1335 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1336 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1337 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1338 this.
1339 </desc>
1340 </attribute>
1341
1342 <attribute name="homeFolder" type="wstring" readonly="yes">
1343 <desc>
1344 Full path to the directory where the global settings file,
1345 <tt>VirtualBox.xml</tt>, is stored.
1346
1347 In this version of VirtualBox, the value of this property is
1348 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1349 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1350 as determined by the host OS), and cannot be changed.
1351
1352 This path is also used as the base to resolve relative paths in
1353 places where relative paths are allowed (unless otherwise
1354 expressly indicated).
1355 </desc>
1356 </attribute>
1357
1358 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1359 <desc>
1360 Full name of the global settings file.
1361 The value of this property corresponds to the value of
1362 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1363 </desc>
1364 </attribute>
1365
1366 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1367 <desc>
1368 Current version of the format of the global VirtualBox settings file
1369 (<tt>VirtualBox.xml</tt>).
1370
1371 The version string has the following format:
1372 <pre>
1373 x.y-platform
1374 </pre>
1375 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1376 versions, and <tt>platform</tt> is the platform identifier.
1377
1378 The current version usually matches the value of the
1379 <link to="#settingsFormatVersion"/> attribute unless the
1380 settings file was created by an older version of VirtualBox and there
1381 was a change of the settings file format since then.
1382
1383 Note that VirtualBox automatically converts settings files from older
1384 versions to the most recent version when reading them (usually at
1385 VirtualBox startup) but it doesn't save the changes back until
1386 you call a method that implicitly saves settings (such as
1387 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
1388 explicitly. Therefore, if the value of this attribute differs from the
1389 value of <link to="#settingsFormatVersion"/>, then it
1390 means that the settings file was converted but the result of the
1391 conversion is not yet saved to disk.
1392
1393 The above feature may be used by interactive front-ends to inform users
1394 about the settings file format change and offer them to explicitly save
1395 all converted settings files (the global and VM-specific ones),
1396 optionally create backup copies of the old settings files before saving,
1397 etc.
1398
1399 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1400 </desc>
1401 </attribute>
1402
1403 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1404 <desc>
1405 Most recent version of the settings file format.
1406
1407 The version string has the following format:
1408 <pre>
1409 x.y-platform
1410 </pre>
1411 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1412 versions, and <tt>platform</tt> is the platform identifier.
1413
1414 VirtualBox uses this version of the format when saving settings files
1415 (either as a result of method calls that require to save settings or as
1416 a result of an explicit call to <link to="#saveSettings"/>).
1417
1418 <see>settingsFileVersion</see>
1419 </desc>
1420 </attribute>
1421
1422 <attribute name="host" type="IHost" readonly="yes">
1423 <desc>Associated host object.</desc>
1424 </attribute>
1425
1426 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1427 <desc>Associated system information object.</desc>
1428 </attribute>
1429
1430 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1431 <desc>
1432 Array of machine objects registered within this VirtualBox instance.
1433 </desc>
1434 </attribute>
1435
1436 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1437 <desc>
1438 Array of hard disk objects known to this VirtualBox installation.
1439
1440 This array contains only base (root) hard disks. All differencing
1441 hard disks of the given base hard disk can be enumerated using
1442 <link to="IHardDisk::children"/>.
1443 </desc>
1444 </attribute>
1445
1446 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1447 <desc>
1448 Array of CD/DVD image objects registered with this VirtualBox instance.
1449 </desc>
1450 </attribute>
1451
1452 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1453 <desc>
1454 Array of floppy image objects registered with this VirtualBox instance.
1455 </desc>
1456 </attribute>
1457
1458 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1459
1460 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1461
1462 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1463 <desc>
1464 Collection of global shared folders. Global shared folders are
1465 available to all virtual machines.
1466
1467 New shared folders are added to the collection using
1468 <link to="#createSharedFolder"/>. Existing shared folders can be
1469 removed using <link to="#removeSharedFolder"/>.
1470
1471 <note>
1472 In the current version of the product, global shared folders are not
1473 implemented and therefore this collection is always empty.
1474 </note>
1475 </desc>
1476 </attribute>
1477
1478 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1479 <desc>
1480 Associated performance collector object.
1481 </desc>
1482 </attribute>
1483
1484 <attribute name="dhcpServers" type="IDhcpServer" safearray="yes" readonly="yes">
1485 <desc>
1486 dhcp server settings.
1487 </desc>
1488 </attribute>
1489
1490 <method name="createMachine">
1491 <desc>
1492 Creates a new virtual machine.
1493
1494 The new machine is created unregistered, with the initial configuration
1495 set according to the specified guest OS type. A typical sequence of
1496 actions to create a new virtual machine is as follows:
1497
1498 <ol>
1499 <li>
1500 Call this method to have a new machine created. The returned machine
1501 object will be "mutable" allowing to change any machine property.
1502 </li>
1503
1504 <li>
1505 Configure the machine using the appropriate attributes and methods.
1506 </li>
1507
1508 <li>
1509 Call <link to="IMachine::saveSettings" /> to write the settings
1510 to the machine's XML settings file. The configuration of the newly
1511 created machine will not be saved to disk until this method is
1512 called.
1513 </li>
1514
1515 <li>
1516 Call <link to="#registerMachine" /> to add the machine to the list
1517 of machines known to VirtualBox.
1518 </li>
1519 </ol>
1520
1521 You should specify valid name for the newly created machine when calling
1522 this method. See the <link to="IMachine::name"/> attribute description
1523 for more details about the machine name.
1524
1525 The specified guest OS type identifier must match an ID of one of known
1526 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1527 array.
1528
1529 Every machine has a <i>settings file</i> that is used to store
1530 the machine configuration. This file is stored in a directory called the
1531 <i>machine settings subfolder</i>. Both the settings subfolder and file
1532 will have a name that corresponds to the name of the virtual machine.
1533 You can specify where to create the machine setting subfolder using the
1534 @a baseFolder argument. The base folder can be absolute (full path) or
1535 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1536 directory</link>.
1537
1538 If @a baseFolder is a null or empty string (which is recommended), the
1539 <link to="ISystemProperties::defaultMachineFolder">default machine
1540 settings folder</link> will be used as a base folder for the created
1541 machine. Otherwise the given base folder will be used. In either case,
1542 the full path to the resulting settings file has the following
1543 structure:
1544 <pre>
1545 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1546 </pre>
1547
1548 Note that if the resulting settings file already exists, this method
1549 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1550
1551 Optionally, you may specify an UUID of to assign to the created machine.
1552 However, this is not recommended and you should normally pass an empty
1553 (null) UUID to this method so that a new UUID will be automatically
1554 generated for every created machine. You can use UUID
1555 00000000-0000-0000-0000-000000000000 as null value.
1556
1557 <note>
1558 There is no way to change the name of the settings file or
1559 subfolder of the created machine directly.
1560 </note>
1561
1562 <result name="VBOX_E_OBJECT_NOT_FOUND">
1563 @a osTypeId is invalid.
1564 </result>
1565 <result name="VBOX_E_FILE_ERROR">
1566 Resulting settings file name is invalid or the settings file already
1567 exists or could not be created due to an I/O error.
1568 </result>
1569 <result name="E_INVALIDARG">
1570 @a name is empty or null.
1571 </result>
1572 </desc>
1573
1574 <param name="name" type="wstring" dir="in">
1575 <desc>Machine name.</desc>
1576 </param>
1577 <param name="osTypeId" type="wstring" dir="in">
1578 <desc>Guest OS Type ID.</desc>
1579 </param>
1580 <param name="baseFolder" type="wstring" dir="in">
1581 <desc>Base machine folder (optional).</desc>
1582 </param>
1583 <param name="id" type="uuid" dir="in">
1584 <desc>Machine UUID (optional).</desc>
1585 </param>
1586 <param name="machine" type="IMachine" dir="return">
1587 <desc>Created machine object.</desc>
1588 </param>
1589 </method>
1590
1591 <method name="createLegacyMachine">
1592 <desc>
1593 Creates a new virtual machine in "legacy" mode, using the specified
1594 settings file to store machine settings.
1595
1596 As opposed to machines created by <link to="#createMachine"/>,
1597 the settings file of the machine created in "legacy" mode is not
1598 automatically renamed when the machine name is changed -- it will always
1599 remain the same as specified in this method call.
1600
1601 The specified settings file name can be absolute (full path) or relative
1602 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1603 directory</link>. If the file name doesn't contain an extension, the
1604 default extension (.xml) will be appended.
1605
1606 Note that the configuration of the newly created machine is not
1607 saved to disk (and therefore no settings file is created)
1608 until <link to="IMachine::saveSettings"/> is called. If the
1609 specified settings file already exists, this method
1610 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1611
1612 See <link to="#createMachine"/> for more information.
1613
1614 @deprecated This method may be removed later. Use <link
1615 to="IVirtualBox::createMachine"/> instead.
1616
1617 <note>
1618 There is no way to change the name of the settings file
1619 of the machine created in "legacy" mode.
1620 </note>
1621
1622 <result name="VBOX_E_OBJECT_NOT_FOUND">
1623 @a osTypeId is invalid.
1624 </result>
1625 <result name="VBOX_E_FILE_ERROR">
1626 @a settingsFile is invalid or the settings file already exists or
1627 could not be created due to an I/O error.
1628 </result>
1629 <result name="E_INVALIDARG">
1630 @a name or @a settingsFile is empty or null.
1631 </result>
1632 </desc>
1633
1634 <param name="name" type="wstring" dir="in">
1635 <desc>Machine name.</desc>
1636 </param>
1637 <param name="osTypeId" type="wstring" dir="in">
1638 <desc>Machine OS Type ID.</desc>
1639 </param>
1640 <param name="settingsFile" type="wstring" dir="in">
1641 <desc>Name of the machine settings file.</desc>
1642 </param>
1643 <param name="id" type="uuid" dir="in">
1644 <desc>Machine UUID (optional).</desc>
1645 </param>
1646 <param name="machine" type="IMachine" dir="return">
1647 <desc>Created machine object.</desc>
1648 </param>
1649 </method>
1650
1651 <method name="openMachine">
1652 <desc>
1653 Opens a virtual machine from the existing settings file.
1654 The opened machine remains unregistered until you call
1655 <link to="#registerMachine"/>.
1656
1657 The specified settings file name can be absolute
1658 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1659 VirtualBox home directory</link>. This file must exist
1660 and must be a valid machine settings file whose contents
1661 will be used to construct the machine object.
1662
1663 @deprecated Will be removed soon.
1664 <result name="VBOX_E_FILE_ERROR">
1665 Settings file name invalid, not found or sharing violation.
1666 </result>
1667 </desc>
1668 <param name="settingsFile" type="wstring" dir="in">
1669 <desc>
1670 Name of the machine settings file.
1671 </desc>
1672 </param>
1673 <param name="machine" type="IMachine" dir="return">
1674 <desc>Opened machine object.</desc>
1675 </param>
1676 <note>
1677 <link to="IMachine::settingsModified"/> will return
1678 false for the created machine, until any of machine settings
1679 are changed.
1680 </note>
1681 </method>
1682
1683 <method name="registerMachine">
1684 <desc>
1685
1686 Registers the machine previously created using
1687 <link to="#createMachine"/> or opened using
1688 <link to="#openMachine"/> within this VirtualBox installation. After
1689 successful method invocation, the
1690 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1691 to all registered callbacks.
1692
1693 <note>
1694 This method implicitly calls <link to="IMachine::saveSettings"/>
1695 to save all current machine settings before registering it.
1696 </note>
1697
1698 <result name="VBOX_E_OBJECT_NOT_FOUND">
1699 No matching virtual machine found.
1700 </result>
1701 <result name="VBOX_E_INVALID_OBJECT_STATE">
1702 Virtual machine was not created within this VirtualBox instance.
1703 </result>
1704
1705 </desc>
1706 <param name="machine" type="IMachine" dir="in"/>
1707 </method>
1708
1709 <method name="getMachine">
1710 <desc>
1711 Attempts to find a virtual machine given its UUID.
1712 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1713 instead.
1714
1715 <result name="VBOX_E_OBJECT_NOT_FOUND">
1716 Could not find registered machine matching @a id.
1717 </result>
1718
1719 </desc>
1720 <param name="id" type="uuid" dir="in"/>
1721 <param name="machine" type="IMachine" dir="return"/>
1722 </method>
1723
1724 <method name="findMachine">
1725 <desc>
1726 Attempts to find a virtual machine given its name.
1727 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1728 instead.
1729
1730 <result name="VBOX_E_OBJECT_NOT_FOUND">
1731 Could not find registered machine matching @a name.
1732 </result>
1733
1734 </desc>
1735 <param name="name" type="wstring" dir="in"/>
1736 <param name="machine" type="IMachine" dir="return"/>
1737 </method>
1738
1739 <method name="unregisterMachine">
1740 <desc>
1741
1742 Unregisters the machine previously registered using
1743 <link to="#registerMachine"/>. After successful method invocation, the
1744 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1745 to all registered callbacks.
1746
1747 <note>
1748 The specified machine must not be in the Saved state, have an open
1749 (or a spawning) direct session associated with it, have snapshots or
1750 have hard disks attached.
1751 </note>
1752
1753 <note>
1754 This method implicitly calls <link to="IMachine::saveSettings"/> to
1755 save all current machine settings before unregistering it.
1756 </note>
1757
1758 <note>
1759 If the given machine is inaccessible (see
1760 <link to="IMachine::accessible"/>), it will be unregistered and
1761 fully uninitialized right afterwards. As a result, the returned
1762 machine object will be unusable and an attempt to call
1763 <b>any</b> method will return the "Object not ready" error.
1764 </note>
1765
1766 <result name="VBOX_E_OBJECT_NOT_FOUND">
1767 Could not find registered machine matching @a id.
1768 </result>
1769 <result name="VBOX_E_INVALID_VM_STATE">
1770 Machine is in Saved state.
1771 </result>
1772 <result name="VBOX_E_INVALID_OBJECT_STATE">
1773 Machine has snapshot or open session or hard disk attached.
1774 </result>
1775
1776 </desc>
1777 <param name="id" type="uuid" dir="in">
1778 <desc>UUID of the machine to unregister.</desc>
1779 </param>
1780 <param name="machine" type="IMachine" dir="return">
1781 <desc>Unregistered machine object.</desc>
1782 </param>
1783 </method>
1784
1785 <method name="createAppliance">
1786 <desc>
1787 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1788 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1789 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1790 </desc>
1791 <param name="appliance" type="IAppliance" dir="return">
1792 <desc>New appliance.</desc>
1793 </param>
1794 </method>
1795
1796 <method name="createHardDisk">
1797 <desc>
1798 Creates a new base hard disk object that will use the given storage
1799 format and location for hard disk data.
1800
1801 Note that the actual storage unit is not created by this method. In
1802 order to do it, and before you are able to attach the created hard disk
1803 to virtual machines, you must call one of the following methods to
1804 allocate a format-specific storage unit at the specified location:
1805 <ul>
1806 <li><link to="IHardDisk::createDynamicStorage"/></li>
1807 <li><link to="IHardDisk::createFixedStorage"/></li>
1808 <li><link to="IHardDisk::createDiffStorage"/></li>
1809 </ul>
1810
1811 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1812 remain uninitialized until the hard disk storage unit is successfully
1813 created by one of the above methods.
1814
1815 After the storage unit is successfully created, the hard disk gets
1816 remembered by this VirtualBox installation and will be accessible
1817 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1818 methods. Remembered root (base) hard disks are also returned as part of
1819 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1820
1821 The list of all storage formats supported by this VirtualBox
1822 installation can be obtained using
1823 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1824 attribute is empty or <tt>null</tt> then the default storage format
1825 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1826 be used for creating a storage unit of the hard disk.
1827
1828 Note that the format of the location string is storage format specific.
1829 See <link to="IMedium::location"/>, IHardDisk and
1830 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1831
1832 <result name="VBOX_E_OBJECT_NOT_FOUND">
1833 @a format identifier is invalid. See
1834 <link to="ISystemProperties::hardDiskFormats"/>.
1835 </result>
1836 <result name="VBOX_E_FILE_ERROR">
1837 @a location is a not valid file name (for file-based formats only).
1838 </result>
1839 <result name="E_INVALIDARG">
1840 @a format is a null or empty string.
1841 </result>
1842 </desc>
1843 <param name="format" type="wstring" dir="in">
1844 <desc>
1845 Identifier of the storage format to use for the new hard disk.
1846 </desc>
1847 </param>
1848 <param name="location" type="wstring" dir="in">
1849 <desc>
1850 Location of the storage unit for the new hard disk.
1851 </desc>
1852 </param>
1853 <param name="hardDisk" type="IHardDisk" dir="return">
1854 <desc>Created hard disk object.</desc>
1855 </param>
1856 </method>
1857
1858 <method name="openHardDisk">
1859 <desc>
1860 Opens a hard disk from an existing location.
1861
1862 After the hard disk is successfully opened by this method, it gets
1863 remembered by (known to) this VirtualBox installation and will be
1864 accessible through <link to="#getHardDisk"/> and
1865 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1866 are also returned as part of the <link to="#hardDisks"/> array and can
1867 be attached to virtual machines. See IHardDisk for more details.
1868
1869 If a differencing hard disk is to be opened by this method, the
1870 operation will succeed only if its parent hard disk and all ancestors,
1871 if any, are already known to this VirtualBox installation (for example,
1872 were opened by this method before).
1873
1874 This method tries to guess the storage format of the specified hard disk
1875 by reading hard disk data at the specified location.
1876
1877 Note that the format of the location string is storage format specific.
1878 See <link to="IMedium::location"/>, IHardDisk and
1879 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1880
1881
1882 <result name="VBOX_E_FILE_ERROR">
1883 Invalid hard disk storage file location.
1884 </result>
1885 <result name="VBOX_E_IPRT_ERROR">
1886 Could not get hard disk storage format.
1887 </result>
1888 <result name="E_INVALIDARG">
1889 Invalid hard disk storage format.
1890 </result>
1891
1892 </desc>
1893 <param name="location" type="wstring" dir="in">
1894 <desc>
1895 Location of the storage unit that contains hard disk data in one of
1896 the supported storage formats.
1897 </desc>
1898 </param>
1899 <param name="hardDisk" type="IHardDisk" dir="return">
1900 <desc>Opened hard disk object.</desc>
1901 </param>
1902 </method>
1903
1904 <method name="getHardDisk" const="yes">
1905 <desc>
1906 Returns a hard disk with the given UUID.
1907
1908 The hard disk with the given UUID must be known to this VirtualBox
1909 installation, i.e. it must be previously created by
1910 <link to="#createHardDisk"/> or opened by <link
1911 to="#openHardDisk"/>, or attached to some known virtual machine.
1912
1913 <result name="VBOX_E_OBJECT_NOT_FOUND">
1914 No hard disk object matching @a id found.
1915 </result>
1916
1917 </desc>
1918 <param name="id" type="uuid" dir="in">
1919 <desc>UUID of the hard disk to look for.</desc>
1920 </param>
1921 <param name="hardDisk" type="IHardDisk" dir="return">
1922 <desc>Found hard disk object.</desc>
1923 </param>
1924 </method>
1925
1926 <method name="findHardDisk">
1927 <desc>
1928 Returns a hard disk that uses the given location to store hard
1929 disk data.
1930
1931 The given hard disk must be known to this VirtualBox installation, i.e.
1932 it must be previously created by
1933 <link to="#createHardDisk"/> or opened by <link
1934 to="#openHardDisk"/>, or attached to some known virtual machine.
1935
1936 The search is done by comparing the value of the @a location argument to
1937 the <link to="IHardDisk::location"/> attribute of each known hard
1938 disk.
1939
1940 For locations represented by file names in the host's file system, the
1941 requested location can be a path relative to the
1942 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1943 only a file name without any path is given, the
1944 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1945 folder</link> will be prepended to the file name before searching. Note
1946 that on case sensitive file systems, a case sensitive comparison is
1947 performed, otherwise the case of symbols in the file path is ignored.
1948
1949 <result name="VBOX_E_OBJECT_NOT_FOUND">
1950 No hard disk object matching @a location found.
1951 </result>
1952
1953 </desc>
1954 <param name="location" type="wstring" dir="in">
1955 <desc>Location string to search for.</desc>
1956 </param>
1957 <param name="hardDisk" type="IHardDisk" dir="return">
1958 <desc>Found hard disk object.</desc>
1959 </param>
1960 </method>
1961
1962 <method name="openDVDImage">
1963 <desc>
1964 Opens a CD/DVD image contained in the specified file of the supported
1965 format and assigns it the given UUID.
1966
1967 After the image is successfully opened by this method, it gets
1968 remembered by (known to) this VirtualBox installation and will be
1969 accessible through <link to="#getDVDImage"/> and
1970 <link to="#findDVDImage"/> methods. Remembered images are also
1971 returned as part of the <link to="#DVDImages"/> array and can be mounted
1972 to virtual machines. See IMedium for more details.
1973
1974 See <link to="IMedium::location"/> to get more details about the format
1975 of the location string.
1976
1977 <note>
1978 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1979 </note>
1980
1981 <result name="VBOX_E_INVALID_OBJECT_STATE">
1982 CD/DVD image already exists in the media registry.
1983 </result>
1984
1985 </desc>
1986 <param name="location" type="wstring" dir="in">
1987 <desc>
1988 Full path to the file that contains a valid CD/DVD image.
1989 </desc>
1990 </param>
1991 <param name="id" type="uuid" dir="in">
1992 <desc>
1993 UUID to assign to the given image within this VirtualBox installation.
1994 If an empty (null) UUID is specified, the system will randomly
1995 generate a new UUID.
1996 </desc>
1997 </param>
1998 <param name="image" type="IDVDImage" dir="return">
1999 <desc>Opened CD/DVD image object.</desc>
2000 </param>
2001 </method>
2002
2003 <method name="getDVDImage">
2004 <desc>
2005 Returns a CD/DVD image with the given UUID.
2006
2007 The image with the given UUID must be known to this VirtualBox
2008 installation, i.e. it must be previously opened by <link
2009 to="#openDVDImage"/>, or mounted to some known virtual machine.
2010
2011 <result name="VBOX_E_OBJECT_NOT_FOUND">
2012 No matching DVD image found in the media registry.
2013 </result>
2014
2015 </desc>
2016 <param name="id" type="uuid" dir="in">
2017 <desc>UUID of the image to look for.</desc>
2018 </param>
2019 <param name="image" type="IDVDImage" dir="return">
2020 <desc>Found CD/DVD image object.</desc>
2021 </param>
2022 </method>
2023
2024 <method name="findDVDImage">
2025 <desc>
2026 Returns a CD/DVD image with the given image location.
2027
2028 The image with the given UUID must be known to this VirtualBox
2029 installation, i.e. it must be previously opened by <link
2030 to="#openDVDImage"/>, or mounted to some known virtual machine.
2031
2032 The search is done by comparing the value of the @a location argument to
2033 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2034
2035 The requested location can be a path relative to the
2036 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2037 only a file name without any path is given, the
2038 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2039 folder</link> will be prepended to the file name before searching. Note
2040 that on case sensitive file systems, a case sensitive comparison is
2041 performed, otherwise the case in the file path is ignored.
2042
2043 <result name="VBOX_E_FILE_ERROR">
2044 Invalid image file location.
2045 </result>
2046 <result name="VBOX_E_OBJECT_NOT_FOUND">
2047 No matching DVD image found in the media registry.
2048 </result>
2049
2050 </desc>
2051 <param name="location" type="wstring" dir="in">
2052 <desc>CD/DVD image file path to look for.</desc>
2053 </param>
2054 <param name="image" type="IDVDImage" dir="return">
2055 <desc>Found CD/DVD image object.</desc>
2056 </param>
2057 </method>
2058
2059 <method name="openFloppyImage">
2060 <desc>
2061 Opens a floppy image contained in the specified file of the supported
2062 format and assigns it the given UUID.
2063
2064 After the image is successfully opened by this method, it gets
2065 remembered by (known to) this VirtualBox installation and will be
2066 accessible through <link to="#getFloppyImage"/> and
2067 <link to="#findFloppyImage"/> methods. Remembered images are also
2068 returned as part of the <link to="#floppyImages"/> array and can be
2069 mounted to virtual machines. See IMedium for more details.
2070
2071 See <link to="IMedium::location"/> to get more details about the format
2072 of the location string.
2073
2074 <result name="VBOX_E_FILE_ERROR">
2075 Floppy image specified by @a location not accessible.
2076 </result>
2077 <result name="VBOX_E_INVALID_OBJECT_STATE">
2078 Floppy image already exists in the media registry.
2079 </result>
2080
2081 <note>
2082 Currently, only raw floppy images are supported by VirtualBox.
2083 </note>
2084 </desc>
2085 <param name="location" type="wstring" dir="in">
2086 <desc>
2087 Full path to the file that contains a valid floppy image.
2088 </desc>
2089 </param>
2090 <param name="id" type="uuid" dir="in">
2091 <desc>
2092 UUID to assign to the given image file within this VirtualBox
2093 installation. If an empty (null) UUID is specified, the system will
2094 randomly generate a new UUID.
2095 </desc>
2096 </param>
2097 <param name="image" type="IFloppyImage" dir="return">
2098 <desc>Opened floppy image object.</desc>
2099 </param>
2100 </method>
2101
2102 <method name="getFloppyImage">
2103 <desc>
2104 Returns a floppy image with the given UUID.
2105
2106 The image with the given UUID must be known to this VirtualBox
2107 installation, i.e. it must be previously opened by <link
2108 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2109
2110 <result name="VBOX_E_OBJECT_NOT_FOUND">
2111 No matching floppy image found in the media registry.
2112 </result>
2113
2114 </desc>
2115 <param name="id" type="uuid" dir="in">
2116 <desc>UUID of the image to look for.</desc>
2117 </param>
2118 <param name="image" type="IFloppyImage" dir="return">
2119 <desc>Found floppy image object.</desc>
2120 </param>
2121 </method>
2122
2123 <method name="findFloppyImage">
2124 <desc>
2125 Returns a floppy image with the given image location.
2126
2127 The image with the given UUID must be known to this VirtualBox
2128 installation, i.e. it must be previously opened by <link
2129 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2130
2131 The search is done by comparing the value of the @a location argument to
2132 the <link to="IMedium::location"/> attribute of each known floppy image.
2133
2134 The requested location can be a path relative to the
2135 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2136 only a file name without any path is given, the
2137 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2138 folder</link> will be prepended to the file name before searching. Note
2139 that on case sensitive file systems, a case sensitive comparison is
2140 performed, otherwise the case of symbols in the file path is ignored.
2141
2142 <result name="VBOX_E_FILE_ERROR">
2143 Invalid image file location.
2144 </result>
2145 <result name="VBOX_E_OBJECT_NOT_FOUND">
2146 No matching floppy image found in the media registry.
2147 </result>
2148
2149 </desc>
2150 <param name="location" type="wstring" dir="in">
2151 <desc>Floppy image file path to look for.</desc>
2152 </param>
2153 <param name="image" type="IFloppyImage" dir="return">
2154 <desc>Found floppy image object.</desc>
2155 </param>
2156 </method>
2157
2158 <method name="getGuestOSType">
2159 <desc>
2160 Returns an object describing the specified guest OS type.
2161
2162 The requested guest OS type is specified using a string which is a
2163 mnemonic identifier of the guest operating system, such as
2164 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2165 particular virtual machine can be read or set using the
2166 <link to="IMachine::OSTypeId"/> attribute.
2167
2168 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2169 available guest OS type objects. Each object has an
2170 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2171 the guest OS this object describes.
2172
2173 <result name="E_INVALIDARG">
2174 @a id is not a valid Guest OS type.
2175 </result>
2176
2177 </desc>
2178 <param name="id" type="wstring" dir="in">
2179 <desc>Guest OS type ID string.</desc>
2180 </param>
2181 <param name="type" type="IGuestOSType" dir="return">
2182 <desc>Guest OS type object.</desc>
2183 </param>
2184 </method>
2185
2186 <method name="createSharedFolder">
2187 <desc>
2188 Creates a new global shared folder by associating the given logical
2189 name with the given host path, adds it to the collection of shared
2190 folders and starts sharing it. Refer to the description of
2191 <link to="ISharedFolder"/> to read more about logical names.
2192 <note>
2193 In the current implementation, this operation is not
2194 implemented.
2195 </note>
2196 </desc>
2197 <param name="name" type="wstring" dir="in">
2198 <desc>Unique logical name of the shared folder.</desc>
2199 </param>
2200 <param name="hostPath" type="wstring" dir="in">
2201 <desc>Full path to the shared folder in the host file system.</desc>
2202 </param>
2203 <param name="writable" type="boolean" dir="in">
2204 <desc>Whether the share is writable or readonly</desc>
2205 </param>
2206 </method>
2207
2208 <method name="removeSharedFolder">
2209 <desc>
2210 Removes the global shared folder with the given name previously
2211 created by <link to="#createSharedFolder"/> from the collection of
2212 shared folders and stops sharing it.
2213 <note>
2214 In the current implementation, this operation is not
2215 implemented.
2216 </note>
2217 </desc>
2218 <param name="name" type="wstring" dir="in">
2219 <desc>Logical name of the shared folder to remove.</desc>
2220 </param>
2221 </method>
2222
2223 <method name="getNextExtraDataKey">
2224 <desc>
2225 Returns the global extra data key name following the supplied key.
2226
2227 An error is returned if the supplied @a key does not exist. @c NULL is
2228 returned in @a nextKey if the supplied key is the last key. When
2229 supplying @c NULL or an empty string for the @a key, the first key item
2230 is returned in @a nextKey (if there is any). @a nextValue is an optional
2231 parameter and if supplied, the next key's value is returned in it.
2232
2233 <result name="VBOX_E_OBJECT_NOT_FOUND">
2234 Extra data @a key not found.
2235 </result>
2236
2237 </desc>
2238 <param name="key" type="wstring" dir="in">
2239 <desc>Name of the data key to follow.</desc>
2240 </param>
2241 <param name="nextKey" type="wstring" dir="out">
2242 <desc>Name of the next data key.</desc>
2243 </param>
2244 <param name="nextValue" type="wstring" dir="out">
2245 <desc>Value of the next data key.</desc>
2246 </param>
2247 </method>
2248
2249 <method name="getExtraData">
2250 <desc>
2251 Returns associated global extra data.
2252
2253 If the requested data @a key does not exist, this function will
2254 succeed and return @c NULL in the @a value argument.
2255
2256 <result name="VBOX_E_FILE_ERROR">
2257 Settings file not accessible.
2258 </result>
2259 <result name="VBOX_E_XML_ERROR">
2260 Could not parse the settings file.
2261 </result>
2262
2263 </desc>
2264 <param name="key" type="wstring" dir="in">
2265 <desc>Name of the data key to get.</desc>
2266 </param>
2267 <param name="value" type="wstring" dir="return">
2268 <desc>Value of the requested data key.</desc>
2269 </param>
2270 </method>
2271
2272 <method name="setExtraData">
2273 <desc>
2274 Sets associated global extra data.
2275
2276 If you pass @c NULL as a key @a value, the given @a key will be
2277 deleted.
2278
2279 <note>
2280 Before performing the actual data change, this method will ask all
2281 registered callbacks using the
2282 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2283 notification for a permission. If one of the callbacks refuses the
2284 new value, the change will not be performed.
2285 </note>
2286 <note>
2287 On success, the
2288 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2289 is called to inform all registered callbacks about a successful data
2290 change.
2291 </note>
2292
2293 <result name="VBOX_E_FILE_ERROR">
2294 Settings file not accessible.
2295 </result>
2296 <result name="VBOX_E_XML_ERROR">
2297 Could not parse the settings file.
2298 </result>
2299 <result name="E_ACCESSDENIED">
2300 Modification request refused.
2301 </result>
2302
2303 </desc>
2304 <param name="key" type="wstring" dir="in">
2305 <desc>Name of the data key to set.</desc>
2306 </param>
2307 <param name="value" type="wstring" dir="in">
2308 <desc>Value to assign to the key.</desc>
2309 </param>
2310 </method>
2311
2312 <method name="openSession">
2313 <desc>
2314 Opens a new direct session with the given virtual machine.
2315
2316 A direct session acts as a local lock on the given VM.
2317 There can be only one direct session open at a time for every
2318 virtual machine, protecting the VM from being manipulated by
2319 conflicting actions from different processes. Only after a
2320 direct session has been opened, one can change all VM settings
2321 and execute the VM in the process space of the session object.
2322
2323 Sessions therefore can be compared to mutex semaphores that
2324 lock a given VM for modification and execution.
2325 See <link to="ISession">ISession</link> for details.
2326
2327 <note>Unless you are writing a new VM frontend, you will not
2328 want to execute a VM in the current process. To spawn a new
2329 process that executes a VM, use
2330 <link to="IVirtualBox::openRemoteSession" />
2331 instead.</note>
2332
2333 Upon successful return, the session object can be used to
2334 get access to the machine and to the VM console.
2335
2336 In VirtualBox terminology, the machine becomes "mutable" after
2337 a session has been opened. Note that the "mutable" machine
2338 object, on which you may invoke IMachine methods to change its
2339 settings, will be a different object from the immutable IMachine
2340 objects returned by various IVirtualBox methods. To obtain a
2341 mutable IMachine object (upon which you can invoke settings methods),
2342 use the <link to="ISession::machine" /> attribute.
2343
2344 One must always call <link to="ISession::close" /> to release the
2345 lock on the machine, or the machine's state will eventually be
2346 set to "Aborted".
2347
2348 In other words, to change settings on a machine, the following
2349 sequence is typically performed:
2350
2351 <ol>
2352 <li>Call this method (openSession) to have a machine locked for
2353 the current session.</li>
2354
2355 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2356
2357 <li>Change the settings of the machine.</li>
2358
2359 <li>Call <link to="IMachine::saveSettings" />.</li>
2360
2361 <li>Close the session by calling <link to="ISession::close"/>.</li>
2362 </ol>
2363
2364 <result name="E_UNEXPECTED">
2365 Virtual machine not registered.
2366 </result>
2367 <result name="E_ACCESSDENIED">
2368 Process not started by OpenRemoteSession.
2369 </result>
2370 <result name="VBOX_E_OBJECT_NOT_FOUND">
2371 No matching virtual machine found.
2372 </result>
2373 <result name="VBOX_E_INVALID_OBJECT_STATE">
2374 Session already open or being opened.
2375 </result>
2376 <result name="VBOX_E_VM_ERROR">
2377 Failed to assign machine to session.
2378 </result>
2379
2380 </desc>
2381 <param name="session" type="ISession" dir="in">
2382 <desc>
2383 Session object that will represent the opened session after
2384 successful method invocation. This object must not represent
2385 the already open session.
2386 <note>
2387 This session will be automatically closed if the
2388 VirtualBox server is terminated for some reason.
2389 </note>
2390 </desc>
2391 </param>
2392 <param name="machineId" type="uuid" dir="in">
2393 <desc>ID of the virtual machine to open a session with.</desc>
2394 </param>
2395 </method>
2396
2397 <method name="openRemoteSession">
2398 <desc>
2399 Spawns a new process that executes a virtual machine (called a
2400 "remote session").
2401
2402 Opening a remote session causes the VirtualBox server to start a new
2403 process that opens a direct session with the given VM. As a result, the
2404 VM is locked by that direct session in the new process, preventing
2405 conflicting changes from other processes. Since sessions act as locks
2406 that prevent conflicting changes, one cannot open a remote session
2407 for a VM that already has another open session (direct or remote), or
2408 is currently in the process of opening one (see <link
2409 to="IMachine::sessionState"/>).
2410
2411 While the remote session still provides some level of control over the
2412 VM execution to the caller (using the <link to="IConsole" /> interface),
2413 not all VM settings are available for modification within the remote
2414 session context.
2415
2416 This operation can take some time (a new VM is started in a new process,
2417 for which memory and other resources need to be set up). Because of this,
2418 an <link to="IProgress" /> is returned to allow the caller to wait for this
2419 asynchronous operation to be completed. Until then, the remote session
2420 object remains in the closed state, and accessing the machine or its
2421 console through it is invalid. It is recommended to use
2422 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2423 completion.
2424
2425 As with all <link to="ISession" /> objects, it is recommended to call
2426 <link to="ISession::close" /> on the local session object once openRemoteSession()
2427 has been called. However, the session's state (see <link to="ISession::state" />)
2428 will not return to "Closed" until the remote session has also closed (i.e.
2429 until the VM is no longer running). In that case, however, the state of
2430 the session will automatically change back to "Closed".
2431
2432 Currently supported session types (values of the @a type
2433 argument) are:
2434 <ul>
2435 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2436 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2437 </ul>
2438
2439 The @a environment argument is a string containing definitions of
2440 environment variables in the following format:
2441 @code
2442 NAME[=VALUE]\n
2443 NAME[=VALUE]\n
2444 ...
2445 @endcode
2446 where <tt>\\n</tt> is the new line character. These environment
2447 variables will be appended to the environment of the VirtualBox server
2448 process. If an environment variable exists both in the server process
2449 and in this list, the value from this list takes precedence over the
2450 server's variable. If the value of the environment variable is
2451 omitted, this variable will be removed from the resulting environment.
2452 If the environment string is @c null, the server environment is
2453 inherited by the started process as is.
2454
2455 <see>openExistingSession</see>
2456
2457 <result name="E_UNEXPECTED">
2458 Virtual machine not registered.
2459 </result>
2460 <result name="E_INVALIDARG">
2461 Invalid session type @a type.
2462 </result>
2463 <result name="VBOX_E_OBJECT_NOT_FOUND">
2464 No machine matching @a machineId found.
2465 </result>
2466 <result name="VBOX_E_INVALID_OBJECT_STATE">
2467 Session already open or being opened.
2468 </result>
2469 <result name="VBOX_E_IPRT_ERROR">
2470 Launching process for machine failed.
2471 </result>
2472 <result name="VBOX_E_VM_ERROR">
2473 Failed to assign machine to session.
2474 </result>
2475
2476 </desc>
2477 <param name="session" type="ISession" dir="in">
2478 <desc>
2479 Session object that will represent the opened remote session
2480 after successful method invocation (this object must not
2481 represent an already open session).
2482 </desc>
2483 </param>
2484 <param name="machineId" type="uuid" dir="in">
2485 <desc>ID of the virtual machine to open a session with.</desc>
2486 </param>
2487 <param name="type" type="wstring" dir="in">
2488 <desc>
2489 Type of the remote session (case sensitive).
2490 </desc>
2491 </param>
2492 <param name="environment" type="wstring" dir="in">
2493 <desc>
2494 Environment to pass to the opened session (may be @c null).
2495 </desc>
2496 </param>
2497 <param name="progress" type="IProgress" dir="return">
2498 <desc>Progress object to track the operation completion.</desc>
2499 </param>
2500 </method>
2501
2502 <method name="openExistingSession">
2503 <desc>
2504 Opens a new remote session with the virtual machine for
2505 which a direct session is already open.
2506
2507 The remote session provides some level of control over the VM
2508 execution (using the IConsole interface) to the caller; however,
2509 within the remote session context, not all VM settings are available
2510 for modification.
2511
2512 As opposed to <link to="#openRemoteSession"/>, the number of
2513 remote sessions opened this way is not limited by the API
2514
2515 <note>
2516 It is an error to open a remote session with the machine that
2517 doesn't have an open direct session.
2518 </note>
2519
2520 <result name="E_UNEXPECTED">
2521 Virtual machine not registered.
2522 </result>
2523 <result name="VBOX_E_OBJECT_NOT_FOUND">
2524 No machine matching @a machineId found.
2525 </result>
2526 <result name="VBOX_E_INVALID_OBJECT_STATE">
2527 Session already open or being opened.
2528 </result>
2529 <result name="VBOX_E_INVALID_SESSION_STATE">
2530 Direct session state not Open.
2531 </result>
2532 <result name="VBOX_E_VM_ERROR">
2533 Failed to get console object from direct session or assign
2534 machine to session.
2535 </result>
2536
2537 <see>openRemoteSession</see>
2538 </desc>
2539 <param name="session" type="ISession" dir="in">
2540 <desc>
2541 Session object that will represent the open remote session
2542 after successful method invocation. This object must not
2543 represent an already open session.
2544 <note>
2545 This session will be automatically closed when the peer
2546 (direct) session dies or gets closed.
2547 </note>
2548 </desc>
2549 </param>
2550 <param name="machineId" type="uuid" dir="in">
2551 <desc>ID of the virtual machine to open a session with.</desc>
2552 </param>
2553 </method>
2554
2555 <method name="registerCallback">
2556 <desc>
2557 Registers a new global VirtualBox callback. The methods of the given
2558 callback object will be called by VirtualBox when an appropriate
2559 event occurs.
2560
2561 <result name="E_INVALIDARG">
2562 A @c NULL callback cannot be registered.
2563 </result>
2564
2565 </desc>
2566 <param name="callback" type="IVirtualBoxCallback" dir="in">
2567 <desc>Callback object to register.</desc>
2568 </param>
2569 </method>
2570
2571 <method name="unregisterCallback">
2572 <desc>
2573 Unregisters the previously registered global VirtualBox callback.
2574
2575 <result name="E_INVALIDARG">
2576 Specified @a callback not registered.
2577 </result>
2578
2579 </desc>
2580 <param name="callback" type="IVirtualBoxCallback" dir="in">
2581 <desc>Callback object to unregister.</desc>
2582 </param>
2583 </method>
2584
2585 <method name="waitForPropertyChange">
2586 <desc>
2587 Blocks the caller until any of the properties represented by the
2588 @a what argument changes the value or until the given timeout interval
2589 expires.
2590
2591 The @a what argument is a comma separated list of property masks that
2592 describe properties the caller is interested in. The property mask is
2593 a string in the following format:
2594
2595 <pre>
2596 [[group.]subgroup.]name
2597 </pre>
2598
2599 where @c name is the property name and @c group, @c subgroup are zero
2600 or more property group specifiers. Each element (group or name) in
2601 the property mask may be either a Latin string or an asterisk symbol
2602 (@c "*") which is used to match any string for the given element. A
2603 property mask that doesn't contain asterisk symbols represents a
2604 single fully qualified property name.
2605
2606 Groups in the fully qualified property name go from more generic (the
2607 left-most part) to more specific (the right-most part). The first
2608 element is usually a name of the object the property belongs to. The
2609 second element may be either a property name, or a child object name,
2610 or an index if the preceding element names an object which is one of
2611 many objects of the same type. This way, property names form a
2612 hierarchy of properties. Here are some examples of property names:
2613
2614 <table>
2615 <tr>
2616 <td><tt>VirtualBox.version</tt></td>
2617 <td><link to="IVirtualBox::version"/> property</td>
2618 </tr>
2619 <tr>
2620 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2621 <td><link to="IMachine::name"/> property of the machine with the
2622 given UUID</td>
2623 </tr>
2624 </table>
2625
2626 Most property names directly correspond to the properties of objects
2627 (components) provided by the VirtualBox library and may be used to
2628 track changes to these properties. However, there may be
2629 pseudo-property names that don't correspond to any existing object's
2630 property directly, as well as there may be object properties that
2631 don't have a corresponding property name that is understood by this
2632 method, and therefore changes to such properties cannot be
2633 tracked. See individual object's property descriptions to get a
2634 fully qualified property name that can be used with this method (if
2635 any).
2636
2637 There is a special property mask @c "*" (i.e. a string consisting of a
2638 single asterisk symbol) that can be used to match all properties.
2639 Below are more examples of property masks:
2640
2641 <table>
2642 <tr>
2643 <td><tt>VirtualBox.*</tt></td>
2644 <td>Track all properties of the VirtualBox object</td>
2645 </tr>
2646 <tr>
2647 <td><tt>Machine.*.name</tt></td>
2648 <td>Track changes to the <link to="IMachine::name"/> property of
2649 all registered virtual machines</td>
2650 </tr>
2651 </table>
2652
2653 <note>
2654 This function is not implemented in the current version of the
2655 product.
2656 </note>
2657 </desc>
2658 <param name="what" type="wstring" dir="in">
2659 <desc>Comma separated list of property masks.</desc>
2660 </param>
2661 <param name="timeout" type="unsigned long" dir="in">
2662 <desc>
2663 Wait timeout in milliseconds.
2664 Specify -1 for an indefinite wait.
2665 </desc>
2666 </param>
2667 <param name="changed" type="wstring" dir="out">
2668 <desc>
2669 Comma separated list of properties that have been changed and caused
2670 this method to return to the caller.
2671 </desc>
2672 </param>
2673 <param name="values" type="wstring" dir="out">
2674 <desc>Reserved, not currently used.</desc>
2675 </param>
2676 </method>
2677
2678 <method name="saveSettings">
2679 <desc>
2680 Saves the global settings to the global settings file
2681 (<link to="#settingsFilePath"/>).
2682
2683 This method is only useful for explicitly saving the global settings
2684 file after it has been auto-converted from the old format to the most
2685 recent format (see <link to="#settingsFileVersion"/> for details).
2686 Normally, the global settings file is implicitly saved when a global
2687 setting is changed.
2688
2689 <result name="VBOX_E_FILE_ERROR">
2690 Settings file not accessible.
2691 </result>
2692 <result name="VBOX_E_XML_ERROR">
2693 Could not parse the settings file.
2694 </result>
2695
2696 </desc>
2697 </method>
2698
2699 <method name="saveSettingsWithBackup">
2700 <desc>
2701 Creates a backup copy of the global settings file
2702 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2703 calls <link to="#saveSettings"/>.
2704
2705 Note that the backup copy is created <b>only</b> if the settings file
2706 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2707 details). Otherwise, this call is fully equivalent to
2708 <link to="#saveSettings"/> and no backup copying is done.
2709
2710 The backup copy is created in the same directory where the original
2711 settings file is located. It is given the following file name:
2712 <pre>
2713 original.xml.x.y-platform.bak
2714 </pre>
2715 where <tt>original.xml</tt> is the original settings file name
2716 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2717 format of the settings file (before auto-conversion).
2718
2719 If the given backup file already exists, this method will try to add the
2720 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2721 0 to 9) and copy it again until it succeeds. If all suffixes are
2722 occupied, or if any other copy error occurs, this method will return a
2723 failure.
2724
2725 If the copy operation succeeds, the @a bakFileName return argument will
2726 receive a full path to the created backup file (for informational
2727 purposes). Note that this will happen even if the subsequent
2728 <link to="#saveSettings"/> call performed by this method after the
2729 copy operation, fails.
2730
2731 <note>
2732 The VirtualBox API never calls this method. It is intended purely for
2733 the purposes of creating backup copies of the settings files by
2734 front-ends before saving the results of the automatically performed
2735 settings conversion to disk.
2736 </note>
2737
2738 <see>settingsFileVersion</see>
2739
2740 <result name="VBOX_E_FILE_ERROR">
2741 Settings file not accessible.
2742 </result>
2743 <result name="VBOX_E_XML_ERROR">
2744 Could not parse the settings file.
2745 </result>
2746 <result name="VBOX_E_IPRT_ERROR">
2747 Could not copy the settings file.
2748 </result>
2749
2750 </desc>
2751 <param name="bakFileName" type="wstring" dir="return">
2752 <desc>Full path to the created backup copy.</desc>
2753 </param>
2754 </method>
2755
2756 <!--method name="createDhcpServerForInterface">
2757 <desc>
2758 Creates a dhcp server settings to be used for the given interface
2759 <result name="E_INVALIDARG">
2760 Host network interface @a name already exists.
2761 </result>
2762 </desc>
2763 <param name="interface" type="IHostNetworkInterface" dir="in">
2764 <desc>Network Interface</desc>
2765 </param>
2766 <param name="server" type="IDhcpServer" dir="out">
2767 <desc>Dhcp server settings</desc>
2768 </param>
2769 </method-->
2770
2771 <method name="createDhcpServer">
2772 <desc>
2773 Creates a dhcp server settings to be used for the given internal network name
2774 <result name="E_INVALIDARG">
2775 Host network interface @a name already exists.
2776 </result>
2777 </desc>
2778 <param name="name" type="wstring" dir="in">
2779 <desc>server name</desc>
2780 </param>
2781 <param name="server" type="IDhcpServer" dir="return">
2782 <desc>Dhcp server settings</desc>
2783 </param>
2784 </method>
2785
2786 <method name="findDhcpServerByName">
2787 <desc>
2788 Searches a dhcp server settings to be used for the given internal network name
2789 <result name="E_INVALIDARG">
2790 Host network interface @a name already exists.
2791 </result>
2792
2793 </desc>
2794 <param name="name" type="wstring" dir="in">
2795 <desc>server name</desc>
2796 </param>
2797 <param name="server" type="IDhcpServer" dir="return">
2798 <desc>Dhcp server settings</desc>
2799 </param>
2800 </method>
2801
2802 <!--method name="findDhcpServerForInterface">
2803 <desc>
2804 Searches a dhcp server settings to be used for the given interface
2805 <result name="E_INVALIDARG">
2806 Host network interface @a name already exists.
2807 </result>
2808 </desc>
2809 <param name="interface" type="IHostNetworkInterface" dir="in">
2810 <desc>Network Interface</desc>
2811 </param>
2812 <param name="server" type="IDhcpServer" dir="out">
2813 <desc>Dhcp server settings</desc>
2814 </param>
2815 </method-->
2816
2817 <method name="removeDhcpServer">
2818 <desc>
2819 Removes the dhcp server settings
2820 <result name="E_INVALIDARG">
2821 Host network interface @a name already exists.
2822 </result>
2823 </desc>
2824 <param name="server" type="IDhcpServer" dir="in">
2825 <desc>Dhcp server settings to be removed</desc>
2826 </param>
2827 </method>
2828
2829 </interface>
2830
2831 <!--
2832 // IAppliance
2833 /////////////////////////////////////////////////////////////////////////
2834 -->
2835
2836 <enum
2837 name="CIMOSType"
2838 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2839 >
2840 <desc>
2841 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2842 </desc>
2843
2844 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2845 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2846 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2847 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2848 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2849 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2850 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2851 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2852 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2853 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2854 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2855 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2856 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2857 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2858 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2859 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2860 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2861 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2862 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2863 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2864 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2865 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2866 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2867 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2868 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2869 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2870 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2871 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2872 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2873 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2874 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2875 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2876 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2877 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2878 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2879 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2880 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2881 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2882 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2883 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2884 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2885 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2886 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2887 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2888 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2889 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2890 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2891 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2892 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2893 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2894 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2895 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2896 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2897 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2898 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2899 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2900 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2901 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2902 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2903 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2904 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2905 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2906 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2907 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2908 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2909 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2910 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2911 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2912 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2913 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2914 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2915 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2916 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2917 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2918 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2919 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2920 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2921 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2922 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2923 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2924 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2925 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2926 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2927 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2928 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2929 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2930 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2931 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2932 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2933 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2934 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2935 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2936 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2937 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2938 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2939 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2940 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2941 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2942 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
2943 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
2944 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
2945 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
2946 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
2947 </enum>
2948
2949 <enum
2950 name="OVFResourceType"
2951 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
2952 >
2953 <desc>
2954 OVF resource type.
2955 </desc>
2956
2957 <const name="Other" value="1" />
2958 <const name="ComputerSystem" value="2" />
2959 <const name="Processor" value="3" />
2960 <const name="Memory" value="4" />
2961 <const name="IdeController" value="5" />
2962 <const name="ParallelScsiHba" value="6" />
2963 <const name="FcHba" value="7" />
2964 <const name="iScsiHba" value="8" />
2965 <const name="IbHca" value="9" />
2966 <const name="EthernetAdapter" value="10" />
2967 <const name="OtherNetworkAdapter" value="11" />
2968 <const name="IoSlot" value="12" />
2969 <const name="IoDevice" value="13" />
2970 <const name="FloppyDrive" value="14" />
2971 <const name="CdDrive" value="15" />
2972 <const name="DvdDrive" value="16" />
2973 <const name="HardDisk" value="17" />
2974 <const name="OtherStorageDevice" value="20" />
2975 <const name="UsbController" value="23" />
2976 <const name="SoundCard" value="35" />
2977 </enum>
2978
2979 <interface
2980 name="IAppliance" extends="$unknown"
2981 uuid="a7a71c1f-20d3-4483-95c0-7357dda77f50"
2982 wsmap="managed"
2983 >
2984 <desc>
2985 Represents a platform-independent appliance in OVF format. An instance of this is returned
2986 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2987 appliances with VirtualBox.
2988
2989 The OVF standard suggests two different physical file formats:
2990
2991 <ol>
2992 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
2993 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
2994 this descriptor file references other files, as OVF appliances distributed as a set of
2995 files most likely do, those files must be in the same directory as the descriptor file.</li>
2996
2997 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
2998 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2999 files and optionally other files.
3000
3001 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3002 be added with a later version.</li>
3003 </ol>
3004
3005 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3006 <link to="IMachine" /> involves the following sequence of API calls:
3007
3008 <ol>
3009 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3010 </li>
3011
3012 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3013 would like to import. So long as this file is syntactically valid, this will succeed
3014 and return an instance of IAppliance that contains the parsed data from the OVF file.
3015 </li>
3016
3017 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3018 contents of the IAppliance attributes accordingly. These can be inspected by a
3019 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3020 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3021 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3022 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3023 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3024 The GUI can then give the user the option to confirm and/or change these suggestions.
3025 </li>
3026
3027 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3028 virtual system to override the suggestions made by the interpret() routine.
3029 </li>
3030
3031 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3032 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3033 virtual system descriptions.
3034 </li>
3035 </ol>
3036
3037 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3038
3039 <ol>
3040 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3041 an empty IAppliance object.
3042 </li>
3043
3044 <li>For each machine you would like to export, call <link to="IMachine::export" />
3045 with the IAppliance object you just created. This creates an instance of
3046 <link to="IVirtualSystemDescription" /> inside the appliance.
3047 </li>
3048
3049 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3050 virtual system to override the suggestions made by the export() routine.
3051 </li>
3052
3053 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3054 file written.</li>
3055 </ol>
3056
3057 </desc>
3058
3059 <attribute name="path" type="wstring" readonly="yes">
3060 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3061 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3062 <link to="#write" /> (for export).
3063 This attribute is empty until one of these methods has been called.
3064 </desc>
3065 </attribute>
3066
3067 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3068 <desc>
3069 Array of virtual disk definitions. One such description exists for each
3070 disk definition in the OVF; each string array item represents one such piece of
3071 disk information, with the information fields separated by tab (\t) characters.
3072
3073 The caller should be prepared for additional fields being appended to
3074 this string in future versions of VirtualBox and therefore check for
3075 the number of tabs in the strings returned.
3076
3077 In the current version, the following eight fields are returned per string
3078 in the array:
3079
3080 <ol>
3081 <li>Disk ID (unique string identifier given to disk)</li>
3082
3083 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3084
3085 <li>Populated size (optional unsigned integer indicating the current size of the
3086 disk; can be approximate; -1 if unspecified)</li>
3087
3088 <li>Format (string identifying the disk format, typically
3089 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3090
3091 <li>Reference (where to find the disk image, typically a file name; if empty,
3092 then the disk should be created on import)</li>
3093
3094 <li>Image size (optional unsigned integer indicating the size of the image,
3095 which need not necessarily be the same as the values specified above, since
3096 the image may be compressed or sparse; -1 if not specified)</li>
3097
3098 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3099 presently unsupported and always -1)</li>
3100
3101 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3102 </ol>
3103 </desc>
3104 </attribute>
3105
3106 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3107 <desc> Array of virtual system descriptions. One such description is created
3108 for each virtual system found in the OVF.
3109 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3110 (for export) has been called.
3111 </desc>
3112 </attribute>
3113
3114 <method name="read">
3115 <desc>
3116 Reads an OVF file into the appliance object.
3117
3118 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3119 mere fact that this method returns successfully does not mean that VirtualBox supports all
3120 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3121 </desc>
3122 <param name="file" type="wstring" dir="in">
3123 <desc>
3124 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3125 on whether the appliance is distributed as a set of files or as a single file, respectively).
3126 </desc>
3127 </param>
3128 </method>
3129
3130 <method name="interpret">
3131 <desc>
3132 Interprets the OVF data that was read when the appliance was constructed. After
3133 calling this method, one can inspect the
3134 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3135 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3136 the appliance.
3137
3138 Calling this method is the second step of importing an appliance into VirtualBox;
3139 see <link to="IAppliance" /> for an overview.
3140
3141 After calling this method, one should call <link to="#getWarnings" /> to find out
3142 if problems were encountered during the processing which might later lead to
3143 errors.
3144 </desc>
3145 </method>
3146
3147 <method name="importMachines">
3148 <desc>
3149 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3150 and other interfaces that match the information contained in the appliance as
3151 closely as possible, as represented by the import instructions in the
3152 <link to="#virtualSystemDescriptions" /> array.
3153
3154 Calling this method is the final step of importing an appliance into VirtualBox;
3155 see <link to="IAppliance" /> for an overview.
3156
3157 Since importing the appliance will most probably involve copying and converting
3158 disk images, which can take a long time, this method operates asynchronously and
3159 returns an IProgress object to allow the caller to monitor the progress.
3160 </desc>
3161
3162 <param name="aProgress" type="IProgress" dir="return">
3163 <desc></desc>
3164 </param>
3165 </method>
3166
3167 <method name="write">
3168 <desc>
3169 Writes the contents of the appliance exports into a new OVF file.
3170
3171 Calling this method is the final step of exporting an appliance from VirtualBox;
3172 see <link to="IAppliance" /> for an overview.
3173
3174 Since exporting the appliance will most probably involve copying and converting
3175 disk images, which can take a long time, this method operates asynchronously and
3176 returns an IProgress object to allow the caller to monitor the progress.
3177 </desc>
3178 <param name="path" type="wstring" dir="in">
3179 <desc>
3180 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3181 on whether the appliance is distributed as a set of files or as a single file, respectively).
3182 </desc>
3183 </param>
3184 <param name="aProgress" type="IProgress" dir="return">
3185 <desc></desc>
3186 </param>
3187 </method>
3188
3189 <method name="getWarnings">
3190 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3191
3192 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3193 <desc></desc>
3194 </param>
3195 </method>
3196
3197 </interface>
3198
3199 <enum
3200 name="VirtualSystemDescriptionType"
3201 uuid="8ac36d00-bb7c-4a35-a835-3f004b27427b"
3202 >
3203 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3204 a configuration value.</desc>
3205
3206 <const name="Ignore" value="1" />
3207 <const name="OS" value="2" />
3208 <const name="Name" value="3" />
3209 <const name="CPU" value="4" />
3210 <const name="Memory" value="5" />
3211 <const name="HardDiskControllerIDE" value="6" />
3212 <const name="HardDiskControllerSATA" value="7" />
3213 <const name="HardDiskControllerSCSI" value="8" />
3214 <const name="HardDiskImage" value="9" />
3215 <const name="Floppy" value="10" />
3216 <const name="CDROM" value="11" />
3217 <const name="NetworkAdapter" value="12" />
3218 <const name="USBController" value="13" />
3219 <const name="SoundCard" value="14" />
3220
3221 </enum>
3222
3223 <interface
3224 name="IVirtualSystemDescription" extends="$unknown"
3225 uuid="8606c2ae-c06f-487f-9573-1465b44f9524"
3226 wsmap="managed"
3227 >
3228
3229 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3230 After <link to="IAppliance::interpret" /> has been called, that array contains
3231 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3232 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3233 into VirtualBox.
3234 </desc>
3235
3236 <attribute name="count" type="unsigned long" readonly="yes">
3237 <desc>Return the number of virtual system description entries.</desc>
3238 </attribute>
3239
3240 <method name="getDescription">
3241 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3242 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3243
3244 The list below identifies the value sets that are possible depending on the
3245 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3246 the array item with the same index in aOvfValues[] will contain the original value as contained
3247 in the OVF file (just for informational purposes), and the corresponding item in aVboxValues[]
3248 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3249 the aExtraConfigValues[] array item may also be used.
3250
3251 <ul>
3252 <li>
3253 "OS": the guest operating system type. There must be exactly one such array item on import. The
3254 corresponding item in aVboxValues[] contains the suggested guest operating system for VirtualBox.
3255 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3256 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF
3257 (see <link to="CIMOSType" />).
3258 </li>
3259 <li>
3260 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3261 if none is present on import, then an automatic name will be created from the operating system
3262 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3263 from the OVF file, and aVboxValues[] will contain a suggestion for a unique VirtualBox
3264 <link to="IMachine" /> name that does not exist yet.
3265 </li>
3266 <li>
3267 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3268 </li>
3269 <li>
3270 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3271 is present on import, then VirtualBox will set a meaningful default based on the operating system
3272 type.
3273 </li>
3274 <li>
3275 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3276 has no value in aOvfValues[] or aVboxValues[].
3277 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3278 type can use to specify which hard disk controller a virtual disk should be connected to.
3279 </li>
3280 <li>
3281 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3282 has no value in aOvfValues[] or aVboxValues[].
3283 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3284 </li>
3285 <li>
3286 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3287 The items in aOvfValues[] and aVboxValues[] will either be "LsiLogic" or "BusLogic".
3288 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3289 </li>
3290 <li>
3291 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3292 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3293
3294 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3295 a path since the image file should be in the same location as the OVF file itself), whereas the
3296 item in aVboxValues[] will contain a qualified path specification to where VirtualBox uses the
3297 hard disk image. This means that on import the image will be copied and converted from the
3298 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3299 On import, the target image will also be registered with VirtualBox.
3300
3301 The matching item in the aExtraConfigValues[] array must contain a string of the following
3302 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3303 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3304 the image to. That number must be the index of an array item with one of the hard disk controller
3305 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3306 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3307 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3308 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3309 SCSI conrollers, the channel can range from 0-29.
3310 </li>
3311 <li>
3312 "NetworkAdapter": a network adapter. The array item in aVboxValues[] will specify the hardware
3313 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3314 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3315 </li>
3316 <li>
3317 "USBController": a USB controller. There can be at most one such item. If and only if such an
3318 item ispresent, USB support will be enabled for the new virtual machine.
3319 </li>
3320 <li>
3321 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3322 present, sound support will be enabled for the new virtual machine. Note that the virtual
3323 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3324 may be different from the virtual soundcard expected by the appliance.
3325 </li>
3326 </ul>
3327
3328 </desc>
3329
3330 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3331 <desc></desc>
3332 </param>
3333
3334 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3335 <desc></desc>
3336 </param>
3337
3338 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3339 <desc></desc>
3340 </param>
3341
3342 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3343 <desc></desc>
3344 </param>
3345
3346 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3347 <desc></desc>
3348 </param>
3349
3350 </method>
3351
3352 <method name="setFinalValues">
3353 <desc>
3354 This method allows the appliance's user to change the configuration for the virtual
3355 system descriptions. For each array item returned from <link to="getDescription" />,
3356 you must pass in one boolean value and one configuration value.
3357
3358 Each item in the boolean array determines whether the particular configuration item
3359 should be enabled.
3360 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3361 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3362 and SoundCard.
3363
3364 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3365 as returned in the aVboxValues and aExtraConfigValues arrays from getDescription(),
3366 the configuration remains unchanged. Please see the documentation for getDescription()
3367 for valid configuration values for the individual array item types. If the
3368 corresponding item in the aEnabled array is false, the configuration value is ignored.
3369 </desc>
3370
3371 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3372 <desc></desc>
3373 </param>
3374
3375 <param name="aVboxValues" type="wstring" dir="in" safearray="yes">
3376 <desc></desc>
3377 </param>
3378
3379 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3380 <desc></desc>
3381 </param>
3382 </method>
3383 </interface>
3384
3385
3386 <!--
3387 // IMachine
3388 /////////////////////////////////////////////////////////////////////////
3389 -->
3390
3391 <interface
3392 name="IInternalMachineControl" extends="$unknown"
3393 uuid="2c88b969-7a74-4ef3-b95f-8a209a1535f3"
3394 internal="yes"
3395 wsmap="suppress"
3396 >
3397 <method name="updateState">
3398 <desc>
3399 Updates the VM state.
3400 <note>
3401 This operation will also update the settings file with
3402 the correct information about the saved state file
3403 and delete this file from disk when appropriate.
3404 </note>
3405 </desc>
3406 <param name="state" type="MachineState" dir="in"/>
3407 </method>
3408
3409 <method name="getIPCId">
3410 <param name="id" type="wstring" dir="return"/>
3411 </method>
3412
3413 <method name="runUSBDeviceFilters">
3414 <desc>
3415 Asks the server to run USB devices filters of the associated
3416 machine against the given USB device and tell if there is
3417 a match.
3418 <note>
3419 Intended to be used only for remote USB devices. Local
3420 ones don't require to call this method (this is done
3421 implicitly by the Host and USBProxyService).
3422 </note>
3423 </desc>
3424 <param name="device" type="IUSBDevice" dir="in"/>
3425 <param name="matched" type="boolean" dir="out"/>
3426 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3427 </method>
3428
3429 <method name="captureUSBDevice">
3430 <desc>
3431 Requests a capture of the given host USB device.
3432 When the request is completed, the VM process will
3433 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3434 notification.
3435 </desc>
3436 <param name="id" type="uuid" dir="in"/>
3437 </method>
3438
3439 <method name="detachUSBDevice">
3440 <desc>
3441 Notification that a VM is going to detach (done = false) or has
3442 already detached (done = true) the given USB device.
3443 When the done = true request is completed, the VM process will
3444 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3445 notification.
3446 <note>
3447 In the done = true case, the server must run its own filters
3448 and filters of all VMs but this one on the detached device
3449 as if it were just attached to the host computer.
3450 </note>
3451 </desc>
3452 <param name="id" type="uuid" dir="in"/>
3453 <param name="done" type="boolean" dir="in"/>
3454 </method>
3455
3456 <method name="autoCaptureUSBDevices">
3457 <desc>
3458 Requests a capture all matching USB devices attached to the host.
3459 When the request is completed, the VM process will
3460 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3461 notification per every captured device.
3462 </desc>
3463 </method>
3464
3465 <method name="detachAllUSBDevices">
3466 <desc>
3467 Notification that a VM that is being powered down. The done
3468 parameter indicates whether which stage of the power down
3469 we're at. When done = false the VM is announcing its
3470 intentions, while when done = true the VM is reporting
3471 what it has done.
3472 <note>
3473 In the done = true case, the server must run its own filters
3474 and filters of all VMs but this one on all detach devices as
3475 if they were just attached to the host computer.
3476 </note>
3477 </desc>
3478 <param name="done" type="boolean" dir="in"/>
3479 </method>
3480
3481 <method name="onSessionEnd">
3482 <desc>
3483 Triggered by the given session object when the session is about
3484 to close normally.
3485 </desc>
3486 <param name="session" type="ISession" dir="in">
3487 <desc>Session that is being closed</desc>
3488 </param>
3489 <param name="progress" type="IProgress" dir="return">
3490 <desc>
3491 Used to wait until the corresponding machine is actually
3492 dissociated from the given session on the server.
3493 Returned only when this session is a direct one.
3494 </desc>
3495 </param>
3496 </method>
3497
3498 <method name="beginSavingState">
3499 <desc>
3500 Called by the VM process to inform the server it wants to
3501 save the current state and stop the VM execution.
3502 </desc>
3503 <param name="progress" type="IProgress" dir="in">
3504 <desc>
3505 Progress object created by the VM process to wait until
3506 the state is saved.
3507 </desc>
3508 </param>
3509 <param name="stateFilePath" type="wstring" dir="out">
3510 <desc>
3511 File path the VM process must save the execution state to.
3512 </desc>
3513 </param>
3514 </method>
3515
3516 <method name="endSavingState">
3517 <desc>
3518 Called by the VM process to inform the server that saving
3519 the state previously requested by #beginSavingState is either
3520 successfully finished or there was a failure.
3521
3522 <result name="VBOX_E_FILE_ERROR">
3523 Settings file not accessible.
3524 </result>
3525 <result name="VBOX_E_XML_ERROR">
3526 Could not parse the settings file.
3527 </result>
3528
3529 </desc>
3530
3531 <param name="success" type="boolean" dir="in">
3532 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3533 otherwise.
3534 </desc>
3535 </param>
3536 </method>
3537
3538 <method name="adoptSavedState">
3539 <desc>
3540 Gets called by IConsole::adoptSavedState.
3541 <result name="VBOX_E_FILE_ERROR">
3542 Invalid saved state file path.
3543 </result>
3544 </desc>
3545 <param name="savedStateFile" type="wstring" dir="in">
3546 <desc>Path to the saved state file to adopt.</desc>
3547 </param>
3548 </method>
3549
3550 <method name="beginTakingSnapshot">
3551 <desc>
3552 Called by the VM process to inform the server it wants to
3553 take a snapshot.
3554
3555 <result name="VBOX_E_FILE_ERROR">
3556 Settings file not accessible.
3557 </result>
3558 <result name="VBOX_E_XML_ERROR">
3559 Could not parse the settings file.
3560 </result>
3561 </desc>
3562 <param name="initiator" type="IConsole" dir="in">
3563 <desc>The console object that initiated this call.</desc>
3564 </param>
3565 <param name="name" type="wstring" dir="in">
3566 <desc>Snapshot name.</desc>
3567 </param>
3568 <param name="description" type="wstring" dir="in">
3569 <desc>Snapshot description.</desc>
3570 </param>
3571 <param name="progress" type="IProgress" dir="in">
3572 <desc>
3573 Progress object created by the VM process to wait until
3574 the state is saved (only for online snapshots).
3575 </desc>
3576 </param>
3577 <param name="stateFilePath" type="wstring" dir="out">
3578 <desc>
3579 File path the VM process must save the execution state to.
3580 </desc>
3581 </param>
3582 <param name="serverProgress" type="IProgress" dir="out">
3583 <desc>
3584 Progress object created by the server process to wait until
3585 the snapshot is taken (VDI diff creation, etc.).
3586 </desc>
3587 </param>
3588 </method>
3589
3590 <method name="endTakingSnapshot">
3591 <desc>
3592 Called by the VM process to inform the server that the snapshot
3593 previously requested by #beginTakingSnapshot is either
3594 successfully taken or there was a failure.
3595 </desc>
3596
3597 <param name="success" type="boolean" dir="in">
3598 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3599 </param>
3600 </method>
3601
3602 <method name="discardSnapshot">
3603 <desc>
3604 Gets called by IConsole::discardSnapshot.
3605 <result name="VBOX_E_INVALID_OBJECT_STATE">
3606 Snapshot has more than one child snapshot.
3607 </result>
3608 </desc>
3609 <param name="initiator" type="IConsole" dir="in">
3610 <desc>The console object that initiated this call.</desc>
3611 </param>
3612 <param name="id" type="uuid" dir="in">
3613 <desc>UUID of the snapshot to discard.</desc>
3614 </param>
3615 <param name="machineState" type="MachineState" dir="out">
3616 <desc>New machine state after this operation is started.</desc>
3617 </param>
3618 <param name="progress" type="IProgress" dir="return">
3619 <desc>Progress object to track the operation completion.</desc>
3620 </param>
3621 </method>
3622
3623 <method name="discardCurrentState">
3624 <desc>
3625 Gets called by IConsole::discardCurrentState.
3626 <result name="VBOX_E_INVALID_OBJECT_STATE">
3627 Virtual machine does not have any snapshot.
3628 </result>
3629 </desc>
3630 <param name="initiator" type="IConsole" dir="in">
3631 <desc>The console object that initiated this call.</desc>
3632 </param>
3633 <param name="machineState" type="MachineState" dir="out">
3634 <desc>New machine state after this operation is started.</desc>
3635 </param>
3636 <param name="progress" type="IProgress" dir="return">
3637 <desc>Progress object to track the operation completion.</desc>
3638 </param>
3639 </method>
3640
3641 <method name="discardCurrentSnapshotAndState">
3642 <desc>
3643 Gets called by IConsole::discardCurrentSnapshotAndState.
3644 <result name="VBOX_E_INVALID_OBJECT_STATE">
3645 Virtual machine does not have any snapshot.
3646 </result>
3647 </desc>
3648 <param name="initiator" type="IConsole" dir="in">
3649 <desc>The console object that initiated this call.</desc>
3650 </param>
3651 <param name="machineState" type="MachineState" dir="out">
3652 <desc>New machine state after this operation is started.</desc>
3653 </param>
3654 <param name="progress" type="IProgress" dir="return">
3655 <desc>Progress object to track the operation completion.</desc>
3656 </param>
3657 </method>
3658
3659 <method name="pullGuestProperties">
3660 <desc>
3661 Get the list of the guest properties matching a set of patterns along
3662 with their values, time stamps and flags and give responsibility for
3663 managing properties to the console.
3664 </desc>
3665 <param name="name" type="wstring" dir="out" safearray="yes">
3666 <desc>
3667 The names of the properties returned.
3668 </desc>
3669 </param>
3670 <param name="value" type="wstring" dir="out" safearray="yes">
3671 <desc>
3672 The values of the properties returned. The array entries match the
3673 corresponding entries in the @a name array.
3674 </desc>
3675 </param>
3676 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3677 <desc>
3678 The time stamps of the properties returned. The array entries match
3679 the corresponding entries in the @a name array.
3680 </desc>
3681 </param>
3682 <param name="flags" type="wstring" dir="out" safearray="yes">
3683 <desc>
3684 The flags of the properties returned. The array entries match the
3685 corresponding entries in the @a name array.
3686 </desc>
3687 </param>
3688 </method>
3689
3690 <method name="pushGuestProperties">
3691 <desc>
3692 Set the list of the guest properties matching a set of patterns along
3693 with their values, time stamps and flags and return responsibility for
3694 managing properties to IMachine.
3695 </desc>
3696 <param name="name" type="wstring" dir="in" safearray="yes">
3697 <desc>
3698 The names of the properties.
3699 </desc>
3700 </param>
3701 <param name="value" type="wstring" dir="in" safearray="yes">
3702 <desc>
3703 The values of the properties. The array entries match the
3704 corresponding entries in the @a name array.
3705 </desc>
3706 </param>
3707 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3708 <desc>
3709 The time stamps of the properties. The array entries match
3710 the corresponding entries in the @a name array.
3711 </desc>
3712 </param>
3713 <param name="flags" type="wstring" dir="in" safearray="yes">
3714 <desc>
3715 The flags of the properties. The array entries match the
3716 corresponding entries in the @a name array.
3717 </desc>
3718 </param>
3719 </method>
3720 <method name="pushGuestProperty">
3721 <desc>
3722 Update a single guest property in IMachine.
3723 </desc>
3724 <param name="name" type="wstring" dir="in">
3725 <desc>
3726 The name of the property to be updated.
3727 </desc>
3728 </param>
3729 <param name="value" type="wstring" dir="in">
3730 <desc>
3731 The value of the property.
3732 </desc>
3733 </param>
3734 <param name="timestamp" type="unsigned long long" dir="in">
3735 <desc>
3736 The timestamp of the property.
3737 </desc>
3738 </param>
3739 <param name="flags" type="wstring" dir="in">
3740 <desc>
3741 The flags of the property.
3742 </desc>
3743 </param>
3744 </method>
3745
3746 <method name="lockMedia">
3747 <desc>
3748 Locks all media attached to the machine for writing and parents of
3749 attahced different hard disks (if any) for reading. This operation is
3750 atomic so that if it fails no media is actually locked.
3751
3752 This method is intended to be called when the machine is in Starting or
3753 Restoring state. The locked media will be automatically unlocked when
3754 the machine is powered off or crashed.
3755 </desc>
3756 </method>
3757 </interface>
3758
3759 <interface
3760 name="IBIOSSettings" extends="$unknown"
3761 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3762 wsmap="managed"
3763 >
3764 <desc>
3765 The IBIOSSettings interface represents BIOS settings of the virtual
3766 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3767 </desc>
3768 <attribute name="logoFadeIn" type="boolean">
3769 <desc>Fade in flag for BIOS logo animation.</desc>
3770 </attribute>
3771
3772 <attribute name="logoFadeOut" type="boolean">
3773 <desc>Fade out flag for BIOS logo animation.</desc>
3774 </attribute>
3775
3776 <attribute name="logoDisplayTime" type="unsigned long">
3777 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3778 </attribute>
3779
3780 <attribute name="logoImagePath" type="wstring">
3781 <desc>Local file system path for external BIOS image.</desc>
3782 </attribute>
3783
3784 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3785 <desc>Mode of the BIOS boot device menu.</desc>
3786 </attribute>
3787
3788 <attribute name="ACPIEnabled" type="boolean">
3789 <desc>ACPI support flag.</desc>
3790 </attribute>
3791
3792 <attribute name="IOAPICEnabled" type="boolean">
3793 <desc>
3794 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3795 and support IRQs above 15.
3796 </desc>
3797 </attribute>
3798
3799 <attribute name="timeOffset" type="long long">
3800 <desc>
3801 Offset in milliseconds from the host system time. This allows for
3802 guests running with a different system date/time than the host.
3803 It is equivalent to setting the system date/time in the BIOS except
3804 it is not an absolute value but a relative one. Guest Additions
3805 time synchronization honors this offset.
3806 </desc>
3807 </attribute>
3808
3809 <attribute name="PXEDebugEnabled" type="boolean">
3810 <desc>
3811 PXE debug logging flag. If set, VirtualBox will write extensive
3812 PXE trace information to the release log.
3813 </desc>
3814 </attribute>
3815
3816 </interface>
3817
3818 <interface
3819 name="IMachine" extends="$unknown"
3820 uuid="dcf6a64c-1466-4b5a-b822-9db04133dc74"
3821 wsmap="managed"
3822 >
3823 <desc>
3824 The IMachine interface represents a virtual machine, or guest, created
3825 in VirtualBox.
3826
3827 This interface is used in two contexts. First of all, a collection of
3828 objects implementing this interface is stored in the
3829 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3830 machines that are currently registered with this VirtualBox
3831 installation. Also, once a session has been opened for the given virtual
3832 machine (e.g. the virtual machine is running), the machine object
3833 associated with the open session can be queried from the session object;
3834 see <link to="ISession"/> for details.
3835
3836 The main role of this interface is to expose the settings of the virtual
3837 machine and provide methods to change various aspects of the virtual
3838 machine's configuration. For machine objects stored in the
3839 <link to="IVirtualBox::machines"/> collection, all attributes are
3840 read-only unless explicitly stated otherwise in individual attribute
3841 and method descriptions. In order to change a machine setting, a session
3842 for this machine must be opened using one of
3843 <link to="IVirtualBox::openSession"/>,
3844 <link to="IVirtualBox::openRemoteSession"/> or
3845 <link to="IVirtualBox::openExistingSession"/> methods. After the
3846 session has been successfully opened, a mutable machine object needs to
3847 be queried from the session object and then the desired settings changes
3848 can be applied to the returned object using IMachine attributes and
3849 methods. See the ISession interface description for more information
3850 about sessions.
3851
3852 Note that the IMachine interface does not provide methods to control
3853 virtual machine execution (such as start the machine, or power it
3854 down) -- these methods are grouped in a separate IConsole
3855 interface. Refer to the IConsole interface description to get more
3856 information about this topic.
3857
3858 <see>ISession, IConsole</see>
3859 </desc>
3860
3861 <attribute name="parent" type="IVirtualBox" readonly="yes">
3862 <desc>Associated parent object.</desc>
3863 </attribute>
3864
3865 <attribute name="accessible" type="boolean" readonly="yes">
3866 <desc>
3867 Whether this virtual machine is currently accessible or not.
3868
3869 The machine is considered to be inaccessible when:
3870 <ul>
3871 <li>It is a registered virtual machine, and
3872 </li>
3873 <li>Its settings file is inaccessible (for example, it is
3874 located on a network share that is not accessible during
3875 VirtualBox startup, or becomes inaccessible later, or if
3876 the settings file can be read but is invalid).
3877 </li>
3878 </ul>
3879
3880 Otherwise, the value of this property is always <tt>true</tt>.
3881
3882 Every time this property is read, the accessibility state of
3883 this machine is re-evaluated. If the returned value is |false|,
3884 the <link to="#accessError"/> property may be used to get the
3885 detailed error information describing the reason of
3886 inaccessibility.
3887
3888 When the machine is inaccessible, only the following properties
3889 can be used on it:
3890 <ul>
3891 <li><link to="#parent"/></li>
3892 <li><link to="#id"/></li>
3893 <li><link to="#settingsFilePath"/></li>
3894 <li><link to="#accessible"/></li>
3895 <li><link to="#accessError"/></li>
3896 </ul>
3897
3898 An attempt to access any other property or method will return
3899 an error.
3900
3901 The only possible action you can perform on an inaccessible
3902 machine is to unregister it using the
3903 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3904 for the accessibility state once more by querying this
3905 property).
3906
3907 <note>
3908 In the current implementation, once this property returns
3909 <tt>true</tt>, the machine will never become inaccessible
3910 later, even if its settings file cannot be successfully
3911 read/written any more (at least, until the VirtualBox
3912 server is restarted). This limitation may be removed in
3913 future releases.
3914 </note>
3915 </desc>
3916 </attribute>
3917
3918 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3919 <desc>
3920 Error information describing the reason of machine
3921 inaccessibility.
3922
3923 Reading this property is only valid after the last call to
3924 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3925 machine is currently unaccessible). Otherwise, a null
3926 IVirtualBoxErrorInfo object will be returned.
3927 </desc>
3928 </attribute>
3929
3930 <attribute name="name" type="wstring">
3931 <desc>
3932 Name of the virtual machine.
3933
3934 Besides being used for human-readable identification purposes
3935 everywhere in VirtualBox, the virtual machine name is also used
3936 as a name of the machine's settings file and as a name of the
3937 subdirectory this settings file resides in. Thus, every time you
3938 change the value of this property, the settings file will be
3939 renamed once you call <link to="#saveSettings"/> to confirm the
3940 change. The containing subdirectory will be also renamed, but
3941 only if it has exactly the same name as the settings file
3942 itself prior to changing this property (for backward compatibility
3943 with previous API releases). The above implies the following
3944 limitations:
3945 <ul>
3946 <li>The machine name cannot be empty.</li>
3947 <li>The machine name can contain only characters that are valid
3948 file name characters according to the rules of the file
3949 system used to store VirtualBox configuration.</li>
3950 <li>You cannot have two or more machines with the same name
3951 if they use the same subdirectory for storing the machine
3952 settings files.</li>
3953 <li>You cannot change the name of the machine if it is running,
3954 or if any file in the directory containing the settings file
3955 is being used by another running machine or by any other
3956 process in the host operating system at a time when
3957 <link to="#saveSettings"/> is called.
3958 </li>
3959 </ul>
3960 If any of the above limitations are hit, <link to="#saveSettings"/>
3961 will return an appropriate error message explaining the exact
3962 reason and the changes you made to this machine will not be
3963 saved.
3964 <note>
3965 For "legacy" machines created using the
3966 <link to="IVirtualBox::createLegacyMachine"/> call,
3967 the above naming limitations do not apply because the
3968 machine name does not affect the settings file name.
3969 The settings file name remains the same as it was specified
3970 during machine creation and never changes.
3971 </note>
3972 </desc>
3973 </attribute>
3974
3975 <attribute name="description" type="wstring">
3976 <desc>
3977 Description of the virtual machine.
3978
3979 The description attribute can contain any text and is
3980 typically used to describe the hardware and software
3981 configuration of the virtual machine in detail (i.e. network
3982 settings, versions of the installed software and so on).
3983 </desc>
3984 </attribute>
3985
3986 <attribute name="id" type="uuid" readonly="yes">
3987 <desc>UUID of the virtual machine.</desc>
3988 </attribute>
3989
3990 <attribute name="OSTypeId" type="wstring">
3991 <desc>
3992 User-defined identifier of the Guest OS type.
3993 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3994 an IGuestOSType object representing details about the given
3995 Guest OS type.
3996 <note>
3997 This value may differ from the value returned by
3998 <link to="IGuest::OSTypeId"/> if Guest Additions are
3999 installed to the guest OS.
4000 </note>
4001 </desc>
4002 </attribute>
4003
4004 <attribute name="HardwareVersion" type="wstring">
4005 <desc>Hardware version identifier. Internal use only for now.</desc>
4006 </attribute>
4007
4008 <attribute name="CPUCount" type="unsigned long">
4009 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
4010 </attribute>
4011
4012 <attribute name="memorySize" type="unsigned long">
4013 <desc>System memory size in megabytes.</desc>
4014 </attribute>
4015
4016 <attribute name="memoryBalloonSize" type="unsigned long">
4017 <desc>Initial memory balloon size in megabytes.</desc>
4018 </attribute>
4019
4020 <attribute name="statisticsUpdateInterval" type="unsigned long">
4021 <desc>Initial interval to update guest statistics in seconds.</desc>
4022 </attribute>
4023
4024 <attribute name="VRAMSize" type="unsigned long">
4025 <desc>Video memory size in megabytes.</desc>
4026 </attribute>
4027
4028 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4029 <desc>
4030 This setting determines whether VirtualBox allows guests to make use
4031 of the 3D graphics support available on the host. Currently limited
4032 to OpenGL only. </desc>
4033 </attribute>
4034
4035 <attribute name="monitorCount" type="unsigned long">
4036 <desc>
4037 Number of virtual monitors.
4038 <note>
4039 Only effective on Windows XP and later guests with
4040 Guest Additions installed.
4041 </note>
4042 </desc>
4043 </attribute>
4044
4045 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4046 <desc>Object containing all BIOS settings.</desc>
4047 </attribute>
4048
4049 <attribute name="HWVirtExEnabled" type="TSBool">
4050 <desc>
4051 This setting determines whether VirtualBox will try to make use of
4052 the host CPU's hardware virtualization extensions such as Intel VT-x
4053 and AMD-V. Note that in case such extensions are not available,
4054 they will not be used.
4055 </desc>
4056 </attribute>
4057
4058 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4059 <desc>
4060 This setting determines whether VirtualBox will try to make use of
4061 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4062 such extensions are not available, they will not be used.
4063 </desc>
4064 </attribute>
4065
4066 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4067 <desc>
4068 This setting determines whether VirtualBox will try to make use of
4069 the VPID extension of Intel VT-x. Note that in case such extensions are
4070 not available, they will not be used.
4071 </desc>
4072 </attribute>
4073
4074 <attribute name="PAEEnabled" type="boolean" default="false">
4075 <desc>
4076 This setting determines whether VirtualBox will expose the Physical Address
4077 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4078 is not available, it will not be reported.
4079 </desc>
4080 </attribute>
4081
4082 <attribute name="snapshotFolder" type="wstring">
4083 <desc>
4084 Full path to the directory used to store snapshot data
4085 (differencing hard disks and saved state files) of this machine.
4086
4087 The initial value of this property is
4088 <tt>&lt;</tt><link to="#settingsFilePath">
4089 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4090 <link to="#id">machine_uuid</link>
4091 <tt>&gt;</tt>.
4092
4093 Currently, it is an error to try to change this property on
4094 a machine that has snapshots (because this would require to
4095 move possibly large files to a different location).
4096 A separate method will be available for this purpose later.
4097
4098 <note>
4099 Setting this property to <tt>null</tt> will restore the
4100 initial value.
4101 </note>
4102 <note>
4103 When setting this property, the specified path can be
4104 absolute (full path) or relative to the directory where the
4105 <link to="#settingsFilePath">machine settings file</link>
4106 is located. When reading this property, a full path is
4107 always returned.
4108 </note>
4109 <note>
4110 The specified path may not exist, it will be created
4111 when necessary.
4112 </note>
4113 </desc>
4114 </attribute>
4115
4116 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4117 <desc>VRDP server object.</desc>
4118 </attribute>
4119
4120 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4121 <desc>Array of hard disks attached to this machine.</desc>
4122 </attribute>
4123
4124 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4125 <desc>Associated DVD drive object.</desc>
4126 </attribute>
4127
4128 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4129 <desc>Associated floppy drive object.</desc>
4130 </attribute>
4131
4132 <attribute name="USBController" type="IUSBController" readonly="yes">
4133 <desc>
4134 Associated USB controller object.
4135
4136 <note>
4137 This method may set a @ref com_warnings "warning result code".
4138 </note>
4139 <note>
4140 If USB functionality is not available in the given edition of
4141 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4142 </note>
4143 </desc>
4144 </attribute>
4145
4146 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4147 <desc>Associated audio adapter, always present.</desc>
4148 </attribute>
4149
4150 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4151 <desc>Array of storage controllers attached to this machine.</desc>
4152 </attribute>
4153
4154 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4155 <desc>
4156 Full name of the file containing machine settings data.
4157 </desc>
4158 </attribute>
4159
4160 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
4161 <desc>
4162 Current version of the format of the settings file of this machine
4163 (<link to="#settingsFilePath"/>).
4164
4165 The version string has the following format:
4166 <pre>
4167 x.y-platform
4168 </pre>
4169 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
4170 versions, and <tt>platform</tt> is the platform identifier.
4171
4172 The current version usually matches the value of the
4173 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
4174 settings file was created by an older version of VirtualBox and there
4175 was a change of the settings file format since then.
4176
4177 Note that VirtualBox automatically converts settings files from older
4178 versions to the most recent version when reading them (usually at
4179 VirtualBox startup) but it doesn't save the changes back until
4180 you call a method that implicitly saves settings (such as
4181 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
4182 explicitly. Therefore, if the value of this attribute differs from the
4183 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
4184 means that the settings file was converted but the result of the
4185 conversion is not yet saved to disk.
4186
4187 The above feature may be used by interactive front-ends to inform users
4188 about the settings file format change and offer them to explicitly save
4189 all converted settings files (the global and VM-specific ones),
4190 optionally create backup copies of the old settings files before saving,
4191 etc.
4192
4193 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
4194 </desc>
4195 </attribute>
4196
4197 <attribute name="settingsModified" type="boolean" readonly="yes">
4198 <desc>
4199 Whether the settings of this machine have been modified
4200 (but neither yet saved nor discarded).
4201 <note>
4202 Reading this property is only valid on instances returned
4203 by <link to="ISession::machine"/> and on new machines
4204 created by <link to="IVirtualBox::createMachine"/> or opened
4205 by <link to="IVirtualBox::openMachine"/> but not
4206 yet registered, or on unregistered machines after calling
4207 <link to="IVirtualBox::unregisterMachine"/>. For all other
4208 cases, the settings can never be modified.
4209 </note>
4210 <note>
4211 For newly created unregistered machines, the value of this
4212 property is always TRUE until <link to="#saveSettings"/>
4213 is called (no matter if any machine settings have been
4214 changed after the creation or not). For opened machines
4215 the value is set to FALSE (and then follows to normal rules).
4216 </note>
4217 </desc>
4218 </attribute>
4219
4220 <attribute name="sessionState" type="SessionState" readonly="yes">
4221 <desc>Current session state for this machine.</desc>
4222 </attribute>
4223
4224 <attribute name="sessionType" type="wstring" readonly="yes">
4225 <desc>
4226 Type of the session. If <link to="#sessionState"/> is
4227 SessionSpawning or SessionOpen, this attribute contains the
4228 same value as passed to the
4229 <link to="IVirtualBox::openRemoteSession"/> method in the
4230 @a type parameter. If the session was opened directly using
4231 <link to="IVirtualBox::openSession"/>, or if
4232 <link to="#sessionState"/> is SessionClosed, the value of this
4233 attribute is @c null.
4234 </desc>
4235 </attribute>
4236
4237 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4238 <desc>
4239 Identifier of the session process. This attribute contains the
4240 platform-dependent identifier of the process that has opened a
4241 direct session for this machine using the
4242 <link to="IVirtualBox::openSession"/> call. The returned value
4243 is only valid if <link to="#sessionState"/> is SessionOpen or
4244 SessionClosing (i.e. a session is currently open or being
4245 closed) by the time this property is read.
4246 </desc>
4247 </attribute>
4248
4249 <attribute name="state" type="MachineState" readonly="yes">
4250 <desc>Current execution state of this machine.</desc>
4251 </attribute>
4252
4253 <attribute name="lastStateChange" type="long long" readonly="yes">
4254 <desc>
4255 Time stamp of the last execution state change,
4256 in milliseconds since 1970-01-01 UTC.
4257 </desc>
4258 </attribute>
4259
4260 <attribute name="stateFilePath" type="wstring" readonly="yes">
4261 <desc>
4262 Full path to the file that stores the execution state of
4263 the machine when it is in the <link to="MachineState_Saved"/> state.
4264 <note>
4265 When the machine is not in the Saved state, this attribute
4266 <tt>null</tt>.
4267 </note>
4268 </desc>
4269 </attribute>
4270
4271 <attribute name="logFolder" type="wstring" readonly="yes">
4272 <desc>
4273 Full path to the folder that stores a set of rotated log files
4274 recorded during machine execution. The most recent log file is
4275 named <tt>VBox.log</tt>, the previous log file is
4276 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4277 in the current version).
4278 </desc>
4279 </attribute>
4280
4281 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4282 <desc>
4283 Current snapshot of this machine.
4284 <note>
4285 A <tt>null</tt> object is returned if the machine doesn't
4286 have snapshots.
4287 </note>
4288 <see><link to="ISnapshot"/></see>
4289 </desc>
4290 </attribute>
4291
4292 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4293 <desc>
4294 Number of snapshots taken on this machine. Zero means the
4295 machine doesn't have any snapshots.
4296 </desc>
4297 </attribute>
4298
4299 <attribute name="currentStateModified" type="boolean" readonly="yes">
4300 <desc>
4301 Returns <tt>true</tt> if the current state of the machine is not
4302 identical to the state stored in the current snapshot.
4303
4304 The current state is identical to the current snapshot right
4305 after one of the following calls are made:
4306 <ul>
4307 <li><link to="IConsole::discardCurrentState"/> or
4308 <link to="IConsole::discardCurrentSnapshotAndState"/>
4309 </li>
4310 <li><link to="IConsole::takeSnapshot"/> (issued on a
4311 powered off or saved machine, for which
4312 <link to="#settingsModified"/> returns <tt>false</tt>)
4313 </li>
4314 <li><link to="IMachine::setCurrentSnapshot"/>
4315 </li>
4316 </ul>
4317
4318 The current state remains identical until one of the following
4319 happens:
4320 <ul>
4321 <li>settings of the machine are changed</li>
4322 <li>the saved state is discarded</li>
4323 <li>the current snapshot is discarded</li>
4324 <li>an attempt to execute the machine is made</li>
4325 </ul>
4326
4327 <note>
4328 For machines that don't have snapshots, this property is
4329 always <tt>false</tt>.
4330 </note>
4331 </desc>
4332 </attribute>
4333
4334 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4335 <desc>
4336 Collection of shared folders for this machine (permanent shared
4337 folders). These folders are shared automatically at machine startup
4338 and available only to the guest OS installed within this machine.
4339
4340 New shared folders are added to the collection using
4341 <link to="#createSharedFolder"/>. Existing shared folders can be
4342 removed using <link to="#removeSharedFolder"/>.
4343 </desc>
4344 </attribute>
4345
4346 <attribute name="clipboardMode" type="ClipboardMode">
4347 <desc>
4348 Synchronization mode between the host OS clipboard
4349 and the guest OS clipboard.
4350 </desc>
4351 </attribute>
4352
4353 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4354 <desc>
4355 A comma-separated list of simple glob patterns. Changes to guest
4356 properties whose name matches one of the patterns will generate an
4357 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4358 </desc>
4359 </attribute>
4360
4361 <method name="setBootOrder">
4362 <desc>
4363 Puts the given device to the specified position in
4364 the boot order.
4365
4366 To indicate that no device is associated with the given position,
4367 <link to="DeviceType_Null"/> should be used.
4368
4369 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4370
4371 <result name="E_INVALIDARG">
4372 Boot @a position out of range.
4373 </result>
4374 <result name="E_NOTIMPL">
4375 Booting from USB @a device currently not supported.
4376 </result>
4377
4378 </desc>
4379 <param name="position" type="unsigned long" dir="in">
4380 <desc>
4381 Position in the boot order (<tt>1</tt> to the total number of
4382 devices the machine can boot from, as returned by
4383 <link to="ISystemProperties::maxBootPosition"/>).
4384 </desc>
4385 </param>
4386 <param name="device" type="DeviceType" dir="in">
4387 <desc>
4388 The type of the device used to boot at the given position.
4389 </desc>
4390 </param>
4391 </method>
4392
4393 <method name="getBootOrder" const="yes">
4394 <desc>
4395 Returns the device type that occupies the specified
4396 position in the boot order.
4397
4398 @todo [remove?]
4399 If the machine can have more than one device of the returned type
4400 (such as hard disks), then a separate method should be used to
4401 retrieve the individual device that occupies the given position.
4402
4403 If here are no devices at the given position, then
4404 <link to="DeviceType_Null"/> is returned.
4405
4406 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4407
4408 <result name="E_INVALIDARG">
4409 Boot @a position out of range.
4410 </result>
4411
4412 </desc>
4413 <param name="position" type="unsigned long" dir="in">
4414 <desc>
4415 Position in the boot order (<tt>1</tt> to the total number of
4416 devices the machine can boot from, as returned by
4417 <link to="ISystemProperties::maxBootPosition"/>).
4418 </desc>
4419 </param>
4420 <param name="device" type="DeviceType" dir="return">
4421 <desc>
4422 Device at the given position.
4423 </desc>
4424 </param>
4425 </method>
4426
4427 <method name="attachHardDisk">
4428 <desc>
4429 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4430 by the given UUID @a id) to the given hard disk controller
4431 (<link to="IStorageController" />, identified by @a name),
4432 at the indicated port and device.
4433
4434 For the IDE bus, the @a controllerPort parameter can be either
4435 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4436 respectively. For the primary controller of the IDE bus,
4437 @a device can be either @c 0 or @c 1, to specify the master or the
4438 slave device, respectively. For the secondary IDE controller, the
4439 device number must be @c 1 because VirtualBox reserves the
4440 secondary master for the CD-ROM drive.
4441
4442 For an SATA controller, @a controllerPort must be a number ranging
4443 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4444 be a number ranging from @c 0 to @c 15.
4445
4446 For both SCSI and SATA, the @a device parameter is unused and must
4447 be @c 0.
4448
4449 The specified device slot must not have another disk attached to it, or
4450 this method will fail.
4451
4452 See <link to="IHardDisk"/> for more detailed information about
4453 attaching hard disks.
4454
4455 <note>
4456 You cannot attach a hard disk to a running machine. Also, you cannot
4457 attach a hard disk to a newly created machine until this machine's
4458 settings are saved to disk using <link to="#saveSettings"/>.
4459 </note>
4460 <note>
4461 If the hard disk is being attached indirectly, a new differencing hard
4462 disk will implicitly be created for it and attached instead. If the
4463 changes made to the machine settings (including this indirect
4464 attachment) are later cancelled using <link to="#discardSettings"/>,
4465 this implicitly created differencing hard disk will implicitly
4466 be deleted.
4467 </note>
4468
4469 <result name="E_INVALIDARG">
4470 SATA device, SATA port, IDE port or IDE slot out of range.
4471 </result>
4472 <result name="VBOX_E_INVALID_OBJECT_STATE">
4473 Attempt to attach hard disk to an unregistered virtual machine.
4474 </result>
4475 <result name="VBOX_E_INVALID_VM_STATE">
4476 Invalid machine state.
4477 </result>
4478 <result name="VBOX_E_OBJECT_IN_USE">
4479 Hard disk already attached to this or another virtual machine.
4480 </result>
4481
4482 </desc>
4483 <param name="id" type="uuid" dir="in">
4484 <desc>UUID of the hard disk to attach.</desc>
4485 </param>
4486 <param name="name" type="wstring" dir="in">
4487 <desc>Name of the storage controller to attach the hard disk to.</desc>
4488 </param>
4489 <param name="controllerPort" type="long" dir="in">
4490 <desc>Port to attach the hard disk to.</desc>
4491 </param>
4492 <param name="device" type="long" dir="in">
4493 <desc>
4494 Device slot in the given port to attach the hard disk to.
4495 </desc>
4496 </param>
4497 </method>
4498
4499 <method name="getHardDisk" const="yes">
4500 <desc>
4501 Returns the virtual hard disk attached to a device slot of the specified
4502 bus.
4503
4504 Note that if the hard disk was indirectly attached by
4505 <link to="#attachHardDisk"/> to the given device slot then this
4506 method will return not the same object as passed to the
4507 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4508 more detailed information about attaching hard disks.
4509
4510 <result name="VBOX_E_OBJECT_NOT_FOUND">
4511 No hard disk attached to given slot/bus.
4512 </result>
4513
4514 </desc>
4515 <param name="name" type="wstring" dir="in">
4516 <desc>Name of the storage controller the hard disk is attached to.</desc>
4517 </param>
4518 <param name="controllerPort" type="long" dir="in">
4519 <desc>Port to query.</desc>
4520 </param>
4521 <param name="device" type="long" dir="in">
4522 <desc>Device slot in the given port to query.</desc>
4523 </param>
4524 <param name="hardDisk" type="IHardDisk" dir="return">
4525 <desc>Attached hard disk object.</desc>
4526 </param>
4527 </method>
4528
4529 <method name="detachHardDisk">
4530 <desc>
4531 Detaches the virtual hard disk attached to a device slot of the
4532 specified bus.
4533
4534 Detaching the hard disk from the virtual machine is deferred. This means
4535 that the hard disk remains associated with the machine when this method
4536 returns and gets actually de-associated only after a successful
4537 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4538 for more detailed information about attaching hard disks.
4539
4540 <note>
4541 You cannot detach the hard disk from a running machine.
4542 </note>
4543 <note>
4544 Detaching differencing hard disks implicitly created by <link
4545 to="#attachHardDisk"/> for the indirect attachment using this
4546 method will <b>not</b> implicitly delete them. The
4547 <link to="IHardDisk::deleteStorage"/> operation should be
4548 explicitly performed by the caller after the hard disk is successfully
4549 detached and the settings are saved with
4550 <link to="#saveSettings"/>, if it is the desired action.
4551 </note>
4552
4553 <result name="VBOX_E_INVALID_VM_STATE">
4554 Attempt to detach hard disk from a running virtual machine.
4555 </result>
4556 <result name="VBOX_E_OBJECT_NOT_FOUND">
4557 No hard disk attached to given slot/bus.
4558 </result>
4559 <result name="VBOX_E_NOT_SUPPORTED">
4560 Hard disk format does not support storage deletion.
4561 </result>
4562
4563 </desc>
4564 <param name="name" type="wstring" dir="in">
4565 <desc>name of the storage controller to detach the hard disk from.</desc>
4566 </param>
4567 <param name="controllerPort" type="long" dir="in">
4568 <desc>Port number to detach the hard disk from.</desc>
4569 </param>
4570 <param name="device" type="long" dir="in">
4571 <desc>Device slot number to detach the hard disk from.</desc>
4572 </param>
4573 </method>
4574
4575 <method name="getHardDiskAttachmentsOfController" const="yes">
4576 <desc>
4577 Returns an array of hard disk attachments which are attached to the
4578 the controller with the given name.
4579
4580 <result name="VBOX_E_OBJECT_NOT_FOUND">
4581 A storage controller with given name doesn't exist.
4582 </result>
4583 </desc>
4584 <param name="name" type="wstring" dir="in"/>
4585 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4586 </method>
4587
4588 <method name="getNetworkAdapter" const="yes">
4589 <desc>
4590 Returns the network adapter associated with the given slot.
4591 Slots are numbered sequentially, starting with zero. The total
4592 number of adapters per machine is defined by the
4593 <link to="ISystemProperties::networkAdapterCount"/> property,
4594 so the maximum slot number is one less than that property's value.
4595
4596 <result name="E_INVALIDARG">
4597 Invalid @a slot number.
4598 </result>
4599
4600 </desc>
4601 <param name="slot" type="unsigned long" dir="in"/>
4602 <param name="adapter" type="INetworkAdapter" dir="return"/>
4603 </method>
4604
4605 <method name="addStorageController">
4606 <desc>
4607 Adds a new storage controller (SCSI or SATA controller) to the
4608 machine and returns it as an instance of
4609 <link to="IStorageController" />.
4610
4611 @a name identifies the controller with subsequent calls such as
4612 <link to="#getStorageControllerByName" /> or
4613 <link to="#removeStorageController" /> or
4614 <link to="#attachHardDisk" />.
4615
4616 After the controller has been added, you can set its exact
4617 type by setting the <link to="IStorageController::controllerType" />.
4618
4619 <result name="VBOX_E_OBJECT_IN_USE">
4620 A storage controller with given name exists already.
4621 </result>
4622 <result name="E_INVALIDARG">
4623 Invalid @a controllerType.
4624 </result>
4625 </desc>
4626 <param name="name" type="wstring" dir="in"/>
4627 <param name="connectionType" type="StorageBus" dir="in"/>
4628 <param name="controller" type="IStorageController" dir="return"/>
4629 </method>
4630
4631 <method name="getStorageControllerByName" const="yes">
4632 <desc>
4633 Returns a storage controller with the given name.
4634
4635 <result name="VBOX_E_OBJECT_NOT_FOUND">
4636 A storage controller with given name doesn't exist.
4637 </result>
4638 </desc>
4639 <param name="name" type="wstring" dir="in"/>
4640 <param name="storageController" type="IStorageController" dir="return"/>
4641 </method>
4642
4643 <method name="removeStorageController">
4644 <desc>
4645 Removes a storage controller from the machine.
4646
4647 <result name="VBOX_E_OBJECT_NOT_FOUND">
4648 A storage controller with given name doesn't exist.
4649 </result>
4650 </desc>
4651 <param name="name" type="wstring" dir="in"/>
4652 </method>
4653
4654 <method name="getSerialPort" const="yes">
4655 <desc>
4656 Returns the serial port associated with the given slot.
4657 Slots are numbered sequentially, starting with zero. The total
4658 number of serial ports per machine is defined by the
4659 <link to="ISystemProperties::serialPortCount"/> property,
4660 so the maximum slot number is one less than that property's value.
4661
4662 <result name="E_INVALIDARG">
4663 Invalid @a slot number.
4664 </result>
4665
4666 </desc>
4667 <param name="slot" type="unsigned long" dir="in"/>
4668 <param name="port" type="ISerialPort" dir="return"/>
4669 </method>
4670
4671 <method name="getParallelPort" const="yes">
4672 <desc>
4673 Returns the parallel port associated with the given slot.
4674 Slots are numbered sequentially, starting with zero. The total
4675 number of parallel ports per machine is defined by the
4676 <link to="ISystemProperties::parallelPortCount"/> property,
4677 so the maximum slot number is one less than that property's value.
4678
4679 <result name="E_INVALIDARG">
4680 Invalid @a slot number.
4681 </result>
4682
4683 </desc>
4684 <param name="slot" type="unsigned long" dir="in"/>
4685 <param name="port" type="IParallelPort" dir="return"/>
4686 </method>
4687
4688 <method name="getNextExtraDataKey">
4689 <desc>
4690 Returns the machine-specific extra data key name following the
4691 supplied key.
4692
4693 An error is returned if the supplied @a key does not exist. @c NULL is
4694 returned in @a nextKey if the supplied key is the last key. When
4695 supplying @c NULL for the @a key, the first key item is returned in
4696 @a nextKey (if there is any). @a nextValue is an optional parameter and
4697 if supplied, the next key's value is returned in it.
4698
4699 <result name="VBOX_E_OBJECT_NOT_FOUND">
4700 Extra data @a key not found.
4701 </result>
4702
4703 </desc>
4704 <param name="key" type="wstring" dir="in">
4705 <desc>Name of the data key to follow.</desc>
4706 </param>
4707 <param name="nextKey" type="wstring" dir="out">
4708 <desc>Name of the next data key.</desc>
4709 </param>
4710 <param name="nextValue" type="wstring" dir="out">
4711 <desc>Value of the next data key.</desc>
4712 </param>
4713 </method>
4714
4715 <method name="getExtraData">
4716 <desc>
4717 Returns associated machine-specific extra data.
4718
4719 If the requested data @a key does not exist, this function will
4720 succeed and return @c NULL in the @a value argument.
4721
4722 <result name="VBOX_E_FILE_ERROR">
4723 Settings file not accessible.
4724 </result>
4725 <result name="VBOX_E_XML_ERROR">
4726 Could not parse the settings file.
4727 </result>
4728
4729 </desc>
4730 <param name="key" type="wstring" dir="in">
4731 <desc>Name of the data key to get.</desc>
4732 </param>
4733 <param name="value" type="wstring" dir="return">
4734 <desc>Value of the requested data key.</desc>
4735 </param>
4736 </method>
4737
4738 <method name="setExtraData">
4739 <desc>
4740 Sets associated machine-specific extra data.
4741
4742 If you pass @c NULL as a key @a value, the given @a key will be
4743 deleted.
4744
4745 <note>
4746 Before performing the actual data change, this method will ask all
4747 registered callbacks using the
4748 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4749 notification for a permission. If one of the callbacks refuses the
4750 new value, the change will not be performed.
4751 </note>
4752 <note>
4753 On success, the
4754 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4755 is called to inform all registered callbacks about a successful data
4756 change.
4757 </note>
4758 <note>
4759 This method can be called outside the machine session and therefore
4760 it's a caller's responsibility to handle possible race conditions
4761 when several clients change the same key at the same time.
4762 </note>
4763
4764 <result name="VBOX_E_FILE_ERROR">
4765 Settings file not accessible.
4766 </result>
4767 <result name="VBOX_E_XML_ERROR">
4768 Could not parse the settings file.
4769 </result>
4770
4771 </desc>
4772 <param name="key" type="wstring" dir="in">
4773 <desc>Name of the data key to set.</desc>
4774 </param>
4775 <param name="value" type="wstring" dir="in">
4776 <desc>Value to assign to the key.</desc>
4777 </param>
4778 </method>
4779
4780 <method name="saveSettings">
4781 <desc>
4782 Saves any changes to machine settings made since the session
4783 has been opened or a new machine has been created, or since the
4784 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4785 For registered machines, new settings become visible to all
4786 other VirtualBox clients after successful invocation of this
4787 method.
4788 <note>
4789 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4790 notification event after the configuration has been successfully
4791 saved (only for registered machines).
4792 </note>
4793 <note>
4794 Calling this method is only valid on instances returned
4795 by <link to="ISession::machine"/> and on new machines
4796 created by <link to="IVirtualBox::createMachine"/> but not
4797 yet registered, or on unregistered machines after calling
4798 <link to="IVirtualBox::unregisterMachine"/>.
4799 </note>
4800
4801 <result name="VBOX_E_FILE_ERROR">
4802 Settings file not accessible.
4803 </result>
4804 <result name="VBOX_E_XML_ERROR">
4805 Could not parse the settings file.
4806 </result>
4807 <result name="E_ACCESSDENIED">
4808 Modification request refused.
4809 </result>
4810
4811 </desc>
4812 </method>
4813
4814 <method name="saveSettingsWithBackup">
4815 <desc>
4816 Creates a backup copy of the machine settings file (<link
4817 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4818 <link to="#saveSettings"/>.
4819
4820 Note that the backup copy is created <b>only</b> if the settings file
4821 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4822 details). Otherwise, this call is fully equivalent to
4823 <link to="#saveSettings"/> and no backup copying is done.
4824
4825 The backup copy is created in the same directory where the original
4826 settings file is located. It is given the following file name:
4827 <pre>
4828 original.xml.x.y-platform.bak
4829 </pre>
4830 where <tt>original.xml</tt> is the original settings file name
4831 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4832 format of the settings file (before auto-conversion).
4833
4834 If the given backup file already exists, this method will try to add the
4835 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4836 0 to 9) and copy it again until it succeeds. If all suffixes are
4837 occupied, or if any other copy error occurs, this method will return a
4838 failure.
4839
4840 If the copy operation succeeds, the @a bakFileName return argument will
4841 receive a full path to the created backup file (for informational
4842 purposes). Note that this will happen even if the subsequent
4843 <link to="#saveSettings"/> call performed by this method after the
4844 copy operation, fails.
4845
4846 <note>
4847 The VirtualBox API never calls this method. It is intended purely for
4848 the purposes of creating backup copies of the settings files by
4849 front-ends before saving the results of the automatically performed
4850 settings conversion to disk.
4851 </note>
4852
4853 <see>settingsFileVersion</see>
4854
4855 <result name="VBOX_E_FILE_ERROR">
4856 Settings file not accessible.
4857 </result>
4858 <result name="VBOX_E_XML_ERROR">
4859 Could not parse the settings file.
4860 </result>
4861 <result name="VBOX_E_INVALID_VM_STATE">
4862 Virtual machine is not mutable.
4863 </result>
4864 <result name="E_ACCESSDENIED">
4865 Modification request refused.
4866 </result>
4867
4868 </desc>
4869 <param name="bakFileName" type="wstring" dir="return">
4870 <desc>Full path to the created backup copy.</desc>
4871 </param>
4872 </method>
4873
4874 <method name="discardSettings">
4875 <desc>
4876 Discards any changes to the machine settings made since the session
4877 has been opened or since the last call to <link to="#saveSettings"/>
4878 or <link to="#discardSettings"/>.
4879 <note>
4880 Calling this method is only valid on instances returned
4881 by <link to="ISession::machine"/> and on new machines
4882 created by <link to="IVirtualBox::createMachine"/> or
4883 opened by <link to="IVirtualBox::openMachine"/> but not
4884 yet registered, or on unregistered machines after calling
4885 <link to="IVirtualBox::unregisterMachine"/>.
4886 </note>
4887
4888 <result name="VBOX_E_INVALID_VM_STATE">
4889 Virtual machine is not mutable.
4890 </result>
4891
4892 </desc>
4893 </method>
4894
4895 <method name="deleteSettings">
4896 <desc>
4897 Deletes the settings file of this machine from disk.
4898 The machine must not be registered in order for this operation
4899 to succeed.
4900 <note>
4901 <link to="#settingsModified"/> will return TRUE after this
4902 method successfully returns.
4903 </note>
4904 <note>
4905 Calling this method is only valid on instances returned
4906 by <link to="ISession::machine"/> and on new machines
4907 created by <link to="IVirtualBox::createMachine"/> or
4908 opened by <link to="IVirtualBox::openMachine"/> but not
4909 yet registered, or on unregistered machines after calling
4910 <link to="IVirtualBox::unregisterMachine"/>.
4911 </note>
4912 <note>
4913 The deleted machine settings file can be restored (saved again)
4914 by calling <link to="#saveSettings"/>.
4915 </note>
4916
4917 <result name="VBOX_E_INVALID_VM_STATE">
4918 Cannot delete settings of a registered machine or
4919 machine not mutable.
4920 </result>
4921 <result name="VBOX_E_IPRT_ERROR">
4922 Could not delete the settings file.
4923 </result>
4924
4925 </desc>
4926 </method>
4927
4928 <method name="export">
4929 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
4930 steps required to export VirtualBox machines to OVF.
4931 </desc>
4932
4933 <param name="appliance" type="IAppliance" dir="in">
4934 <desc>Appliance to export this machine to.</desc>
4935 </param>
4936 </method >
4937
4938 <method name="getSnapshot">
4939 <desc>
4940 Returns a snapshot of this machine with the given UUID.
4941 A <tt>null</tt> UUID can be used to obtain the first snapshot
4942 taken on this machine. This is useful if you want to traverse
4943 the whole tree of snapshots starting from the root.
4944
4945 <result name="VBOX_E_OBJECT_NOT_FOUND">
4946 Virtual machine has no snapshots or snapshot not found.
4947 </result>
4948
4949 </desc>
4950 <param name="id" type="uuid" dir="in">
4951 <desc>UUID of the snapshot to get</desc>
4952 </param>
4953 <param name="snapshot" type="ISnapshot" dir="return">
4954 <desc>Snapshot object with the given UUID.</desc>
4955 </param>
4956 </method>
4957
4958 <method name="findSnapshot">
4959 <desc>
4960 Returns a snapshot of this machine with the given name.
4961
4962 <result name="VBOX_E_OBJECT_NOT_FOUND">
4963 Virtual machine has no snapshots or snapshot not found.
4964 </result>
4965
4966 </desc>
4967 <param name="name" type="wstring" dir="in">
4968 <desc>Name of the snapshot to find</desc>
4969 </param>
4970 <param name="snapshot" type="ISnapshot" dir="return">
4971 <desc>Snapshot object with the given name.</desc>
4972 </param>
4973 </method>
4974
4975 <method name="setCurrentSnapshot">
4976 <desc>
4977 Sets the current snapshot of this machine.
4978 <note>
4979 In the current implementation, this operation is not
4980 implemented.
4981 </note>
4982 </desc>
4983 <param name="id" type="uuid" dir="in">
4984 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4985 </param>
4986 </method>
4987
4988 <method name="createSharedFolder">
4989 <desc>
4990 Creates a new permanent shared folder by associating the given logical
4991 name with the given host path, adds it to the collection of shared
4992 folders and starts sharing it. Refer to the description of
4993 <link to="ISharedFolder"/> to read more about logical names.
4994
4995 <result name="VBOX_E_OBJECT_IN_USE">
4996 Shared folder already exists.
4997 </result>
4998 <result name="VBOX_E_FILE_ERROR">
4999 Shared folder @a hostPath not accessible.
5000 </result>
5001
5002 </desc>
5003 <param name="name" type="wstring" dir="in">
5004 <desc>Unique logical name of the shared folder.</desc>
5005 </param>
5006 <param name="hostPath" type="wstring" dir="in">
5007 <desc>Full path to the shared folder in the host file system.</desc>
5008 </param>
5009 <param name="writable" type="boolean" dir="in">
5010 <desc>Whether the share is writable or readonly</desc>
5011 </param>
5012 </method>
5013
5014 <method name="removeSharedFolder">
5015 <desc>
5016 Removes the permanent shared folder with the given name previously
5017 created by <link to="#createSharedFolder"/> from the collection of
5018 shared folders and stops sharing it.
5019
5020 <result name="VBOX_E_INVALID_VM_STATE">
5021 Virtual machine is not mutable.
5022 </result>
5023 <result name="VBOX_E_OBJECT_NOT_FOUND">
5024 Shared folder @a name does not exist.
5025 </result>
5026
5027 </desc>
5028 <param name="name" type="wstring" dir="in">
5029 <desc>Logical name of the shared folder to remove.</desc>
5030 </param>
5031 </method>
5032
5033 <method name="canShowConsoleWindow">
5034 <desc>
5035 Returns @c true if the VM console process can activate the
5036 console window and bring it to foreground on the desktop of
5037 the host PC.
5038 <note>
5039 This method will fail if a session for this machine is not
5040 currently open.
5041 </note>
5042
5043 <result name="VBOX_E_INVALID_VM_STATE">
5044 Machine session is not open.
5045 </result>
5046
5047 </desc>
5048 <param name="canShow" type="boolean" dir="return">
5049 <desc>
5050 @c true if the console window can be shown and @c
5051 false otherwise.
5052 </desc>
5053 </param>
5054 </method>
5055
5056 <method name="showConsoleWindow">
5057 <desc>
5058 Activates the console window and brings it to foreground on
5059 the desktop of the host PC. Many modern window managers on
5060 many platforms implement some sort of focus stealing
5061 prevention logic, so that it may be impossible to activate
5062 a window without the help of the currently active
5063 application. In this case, this method will return a non-zero
5064 identifier that represents the top-level window of the VM
5065 console process. The caller, if it represents a currently
5066 active process, is responsible to use this identifier (in a
5067 platform-dependent manner) to perform actual window
5068 activation.
5069 <note>
5070 This method will fail if a session for this machine is not
5071 currently open.
5072 </note>
5073
5074 <result name="VBOX_E_INVALID_VM_STATE">
5075 Machine session is not open.
5076 </result>
5077
5078 </desc>
5079 <param name="winId" type="unsigned long long" dir="return">
5080 <desc>
5081 Platform-dependent identifier of the top-level VM console
5082 window, or zero if this method has performed all actions
5083 necessary to implement the <i>show window</i> semantics for
5084 the given platform and/or VirtualBox front-end.
5085 </desc>
5086 </param>
5087 </method>
5088
5089 <method name="getGuestProperty">
5090 <desc>
5091 Reads an entry from the machine's guest property store.
5092
5093 <result name="VBOX_E_INVALID_VM_STATE">
5094 Machine session is not open.
5095 </result>
5096
5097 </desc>
5098 <param name="name" type="wstring" dir="in">
5099 <desc>
5100 The name of the property to read.
5101 </desc>
5102 </param>
5103 <param name="value" type="wstring" dir="out">
5104 <desc>
5105 The value of the property. If the property does not exist then this
5106 will be empty.
5107 </desc>
5108 </param>
5109 <param name="timestamp" type="unsigned long long" dir="out">
5110 <desc>
5111 The time at which the property was last modified, as seen by the
5112 server process.
5113 </desc>
5114 </param>
5115 <param name="flags" type="wstring" dir="out">
5116 <desc>
5117 Additional property parameters, passed as a comma-separated list of
5118 "name=value" type entries.
5119 </desc>
5120 </param>
5121 </method>
5122
5123 <method name="getGuestPropertyValue">
5124 <desc>
5125 Reads a value from the machine's guest property store.
5126
5127 <result name="VBOX_E_INVALID_VM_STATE">
5128 Machine session is not open.
5129 </result>
5130
5131 </desc>
5132 <param name="property" type="wstring" dir="in">
5133 <desc>
5134 The name of the property to read.
5135 </desc>
5136 </param>
5137 <param name="value" type="wstring" dir="return">
5138 <desc>
5139 The value of the property. If the property does not exist then this
5140 will be empty.
5141 </desc>
5142 </param>
5143 </method>
5144
5145 <method name="getGuestPropertyTimestamp">
5146 <desc>
5147 Reads a property timestamp 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="property" type="wstring" dir="in">
5155 <desc>
5156 The name of the property to read.
5157 </desc>
5158 </param>
5159 <param name="value" type="unsigned long long" dir="return">
5160 <desc>
5161 The timestamp. If the property does not exist then this will be
5162 empty.
5163 </desc>
5164 </param>
5165 </method>
5166
5167 <method name="setGuestProperty">
5168 <desc>
5169 Sets, changes or deletes an entry in the machine's guest property
5170 store.
5171
5172 <result name="E_ACCESSDENIED">
5173 Property cannot be changed.
5174 </result>
5175 <result name="E_INVALIDARG">
5176 Invalid @a flags.
5177 </result>
5178 <result name="VBOX_E_INVALID_VM_STATE">
5179 Virtual machine is not mutable or session not open.
5180 </result>
5181 <result name="VBOX_E_INVALID_OBJECT_STATE">
5182 Cannot set transient property when machine not running.
5183 </result>
5184
5185 </desc>
5186 <param name="property" type="wstring" dir="in">
5187 <desc>
5188 The name of the property to set, change or delete.
5189 </desc>
5190 </param>
5191 <param name="value" type="wstring" dir="in">
5192 <desc>
5193 The new value of the property to set, change or delete. If the
5194 property does not yet exist and value is non-empty, it will be
5195 created. If the value is empty, the key will be deleted if it
5196 exists.
5197 </desc>
5198 </param>
5199 <param name="flags" type="wstring" dir="in">
5200 <desc>
5201 Additional property parameters, passed as a comma-separated list of
5202 "name=value" type entries.
5203 </desc>
5204 </param>
5205 </method>
5206
5207 <method name="setGuestPropertyValue">
5208 <desc>
5209 Sets, changes or deletes a value in the machine's guest property
5210 store. The flags field will be left unchanged or created empty for a
5211 new property.
5212
5213 <result name="E_ACCESSDENIED">
5214 Property cannot be changed.
5215 </result>
5216 <result name="VBOX_E_INVALID_VM_STATE">
5217 Virtual machine is not mutable or session not open.
5218 </result>
5219 <result name="VBOX_E_INVALID_OBJECT_STATE">
5220 Cannot set transient property when machine not running.
5221 </result>
5222 </desc>
5223
5224 <param name="property" type="wstring" dir="in">
5225 <desc>
5226 The name of the property to set, change or delete.
5227 </desc>
5228 </param>
5229 <param name="value" type="wstring" dir="in">
5230 <desc>
5231 The new value of the property to set, change or delete. If the
5232 property does not yet exist and value is non-empty, it will be
5233 created. If value is empty, the property will be deleted if it
5234 exists.
5235 </desc>
5236 </param>
5237 </method>
5238
5239 <method name="enumerateGuestProperties">
5240 <desc>
5241 Return a list of the guest properties matching a set of patterns along
5242 with their values, time stamps and flags.
5243 </desc>
5244 <param name="patterns" type="wstring" dir="in">
5245 <desc>
5246 The patterns to match the properties against, separated by '|'
5247 characters. If this is empty or NULL, all properties will match.
5248 </desc>
5249 </param>
5250 <param name="name" type="wstring" dir="out" safearray="yes">
5251 <desc>
5252 The names of the properties returned.
5253 </desc>
5254 </param>
5255 <param name="value" type="wstring" dir="out" safearray="yes">
5256 <desc>
5257 The values of the properties returned. The array entries match the
5258 corresponding entries in the @a name array.
5259 </desc>
5260 </param>
5261 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5262 <desc>
5263 The time stamps of the properties returned. The array entries match
5264 the corresponding entries in the @a name array.
5265 </desc>
5266 </param>
5267 <param name="flags" type="wstring" dir="out" safearray="yes">
5268 <desc>
5269 The flags of the properties returned. The array entries match the
5270 corresponding entries in the @a name array.
5271 </desc>
5272 </param>
5273 </method>
5274</interface>
5275
5276 <!--
5277 // IConsole
5278 /////////////////////////////////////////////////////////////////////////
5279 -->
5280
5281 <interface
5282 name="IConsoleCallback" extends="$unknown"
5283 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5284 wsmap="suppress"
5285 >
5286
5287 <method name="onMousePointerShapeChange">
5288 <desc>
5289 Notification when the guest mouse pointer shape has
5290 changed. The new shape data is given.
5291 </desc>
5292 <param name="visible" type="boolean" dir="in">
5293 <desc>
5294 Flag whether the pointer is visible.
5295 </desc>
5296 </param>
5297 <param name="alpha" type="boolean" dir="in">
5298 <desc>
5299 Flag whether the pointer has an alpha channel.
5300 </desc>
5301 </param>
5302 <param name="xHot" type="unsigned long" dir="in">
5303 <desc>
5304 The pointer hot spot x coordinate.
5305 </desc>
5306 </param>
5307 <param name="yHot" type="unsigned long" dir="in">
5308 <desc>
5309 The pointer hot spot y coordinate.
5310 </desc>
5311 </param>
5312 <param name="width" type="unsigned long" dir="in">
5313 <desc>
5314 Width of the pointer shape in pixels.
5315 </desc>
5316 </param>
5317 <param name="height" type="unsigned long" dir="in">
5318 <desc>
5319 Height of the pointer shape in pixels.
5320 </desc>
5321 </param>
5322 <param name="shape" type="octet" mod="ptr" dir="in">
5323 <desc>
5324 Address of the shape buffer.
5325
5326 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5327 followed by a 32-bpp XOR (color) mask.
5328
5329 For pointers without alpha channel the XOR mask pixels are 32
5330 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5331 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5332
5333 An AND mask is used for pointers with alpha channel, so if the
5334 callback does not support alpha, the pointer could be
5335 displayed as a normal color pointer.
5336
5337 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5338 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5339 height</tt>. The padding bits at the end of each scanline are
5340 undefined.
5341
5342 The XOR mask follows the AND mask on the next 4-byte aligned
5343 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5344 Bytes in the gap between the AND and the XOR mask are undefined.
5345 The XOR mask scanlines have no gap between them and the size of
5346 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5347
5348 <note>
5349 If @a shape is 0, only the pointer visibility is changed.
5350 </note>
5351 </desc>
5352 </param>
5353 </method>
5354
5355 <method name="onMouseCapabilityChange">
5356 <desc>
5357 Notification when the mouse capabilities reported by the
5358 guest have changed. The new capabilities are passed.
5359 </desc>
5360 <param name="supportsAbsolute" type="boolean" dir="in"/>
5361 <param name="needsHostCursor" type="boolean" dir="in"/>
5362 </method>
5363
5364 <method name="onKeyboardLedsChange">
5365 <desc>
5366 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5367 to alter the state of the keyboard LEDs.
5368 </desc>
5369 <param name="numLock" type="boolean" dir="in"/>
5370 <param name="capsLock" type="boolean" dir="in"/>
5371 <param name="scrollLock" type="boolean" dir="in"/>
5372 </method>
5373
5374 <method name="onStateChange">
5375 <desc>
5376 Notification when the execution state of the machine has changed.
5377 The new state will be given.
5378 </desc>
5379 <param name="state" type="MachineState" dir="in"/>
5380 </method>
5381
5382 <method name="onAdditionsStateChange">
5383 <desc>
5384 Notification when a Guest Additions property changes.
5385 Interested callees should query IGuest attributes to
5386 find out what has changed.
5387 </desc>
5388 </method>
5389
5390 <method name="onDVDDriveChange">
5391 <desc>
5392 Notification when a property of the
5393 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5394 Interested callees should use IDVDDrive methods to find out what has
5395 changed.
5396 </desc>
5397 </method>
5398
5399 <method name="onFloppyDriveChange">
5400 <desc>
5401 Notification when a property of the
5402 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5403 Interested callees should use IFloppyDrive methods to find out what
5404 has changed.
5405 </desc>
5406 </method>
5407
5408 <method name="onNetworkAdapterChange">
5409 <desc>
5410 Notification when a property of one of the
5411 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5412 changes. Interested callees should use INetworkAdapter methods and
5413 attributes to find out what has changed.
5414 </desc>
5415 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5416 <desc>Network adapter that is subject to change.</desc>
5417 </param>
5418 </method>
5419
5420 <method name="onSerialPortChange">
5421 <desc>
5422 Notification when a property of one of the
5423 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5424 Interested callees should use ISerialPort methods and attributes
5425 to find out what has changed.
5426 </desc>
5427 <param name="serialPort" type="ISerialPort" dir="in">
5428 <desc>Serial port that is subject to change.</desc>
5429 </param>
5430 </method>
5431
5432 <method name="onParallelPortChange">
5433 <desc>
5434 Notification when a property of one of the
5435 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5436 changes. Interested callees should use ISerialPort methods and
5437 attributes to find out what has changed.
5438 </desc>
5439 <param name="parallelPort" type="IParallelPort" dir="in">
5440 <desc>Parallel port that is subject to change.</desc>
5441 </param>
5442 </method>
5443
5444 <method name="onStorageControllerChange">
5445 <desc>
5446 Notification when a property of one of the
5447 virtual <link to="IMachine::getStorageControllers">storage controllers</link>
5448 changes. Interested callees should use query the corresponding collections
5449 to find out what has changed.
5450 </desc>
5451 </method>
5452
5453 <method name="onVRDPServerChange">
5454 <desc>
5455 Notification when a property of the
5456 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5457 Interested callees should use IVRDPServer methods and attributes to
5458 find out what has changed.
5459 </desc>
5460 </method>
5461
5462 <method name="onUSBControllerChange">
5463 <desc>
5464 Notification when a property of the virtual
5465 <link to="IMachine::USBController">USB controller</link> changes.
5466 Interested callees should use IUSBController methods and attributes to
5467 find out what has changed.
5468 </desc>
5469 </method>
5470
5471 <method name="onUSBDeviceStateChange">
5472 <desc>
5473 Notification when a USB device is attached to or detached from
5474 the virtual USB controller.
5475
5476 This notification is sent as a result of the indirect
5477 request to attach the device because it matches one of the
5478 machine USB filters, or as a result of the direct request
5479 issued by <link to="IConsole::attachUSBDevice"/> or
5480 <link to="IConsole::detachUSBDevice"/>.
5481
5482 This notification is sent in case of both a succeeded and a
5483 failed request completion. When the request succeeds, the
5484 @a error parameter is @c null, and the given device has been
5485 already added to (when @a attached is @c true) or removed from
5486 (when @a attached is @c false) the collection represented by
5487 <link to="IConsole::USBDevices"/>. On failure, the collection
5488 doesn't change and the @a error parameter represents the error
5489 message describing the failure.
5490
5491 </desc>
5492 <param name="device" type="IUSBDevice" dir="in">
5493 <desc>Device that is subject to state change.</desc>
5494 </param>
5495 <param name="attached" type="boolean" dir="in">
5496 <desc>
5497 <tt>true</tt> if the device was attached
5498 and <tt>false</tt> otherwise.
5499 </desc>
5500 </param>
5501 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5502 <desc>
5503 <tt>null</tt> on success or an error message object on
5504 failure.
5505 </desc>
5506 </param>
5507 </method>
5508
5509 <method name="onSharedFolderChange">
5510 <desc>
5511 Notification when a shared folder is added or removed.
5512 The @a scope argument defines one of three scopes:
5513 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5514 (<link to="Scope_Global">Global</link>),
5515 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5516 the machine (<link to="Scope_Machine">Machine</link>) or <link
5517 to="IConsole::sharedFolders">transient shared folders</link> of the
5518 machine (<link to="Scope_Session">Session</link>). Interested callees
5519 should use query the corresponding collections to find out what has
5520 changed.
5521 </desc>
5522 <param name="scope" type="Scope" dir="in">
5523 <desc>Scope of the notification.</desc>
5524 </param>
5525 </method>
5526
5527 <method name="onRuntimeError">
5528 <desc>
5529 Notification when an error happens during the virtual
5530 machine execution.
5531
5532 There are three kinds of runtime errors:
5533 <ul>
5534 <li><i>fatal</i></li>
5535 <li><i>non-fatal with retry</i></li>
5536 <li><i>non-fatal warnings</i></li>
5537 </ul>
5538
5539 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5540 to <tt>true</tt>. In case of fatal errors, the virtual machine
5541 execution is always paused before calling this notification, and
5542 the notification handler is supposed either to immediately save
5543 the virtual machine state using <link to="IConsole::saveState"/>
5544 or power it off using <link to="IConsole::powerDown"/>.
5545 Resuming the execution can lead to unpredictable results.
5546
5547 <b>Non-fatal</b> errors and warnings are indicated by the
5548 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5549 is in the Paused state by the time the error notification is
5550 received, it means that the user can <i>try to resume</i> the machine
5551 execution after attempting to solve the problem that caused the
5552 error. In this case, the notification handler is supposed
5553 to show an appropriate message to the user (depending on the
5554 value of the @a id parameter) that offers several actions such
5555 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5556 wants to retry, the notification handler should continue
5557 the machine execution using the <link to="IConsole::resume"/>
5558 call. If the machine execution is not Paused during this
5559 notification, then it means this notification is a <i>warning</i>
5560 (for example, about a fatal condition that can happen very soon);
5561 no immediate action is required from the user, the machine
5562 continues its normal execution.
5563
5564 Note that in either case the notification handler
5565 <b>must not</b> perform any action directly on a thread
5566 where this notification is called. Everything it is allowed to
5567 do is to post a message to another thread that will then talk
5568 to the user and take the corresponding action.
5569
5570 Currently, the following error identifiers are known:
5571 <ul>
5572 <li><tt>"HostMemoryLow"</tt></li>
5573 <li><tt>"HostAudioNotResponding"</tt></li>
5574 <li><tt>"VDIStorageFull"</tt></li>
5575 </ul>
5576
5577 <note>
5578 This notification is not designed to be implemented by
5579 more than one callback at a time. If you have multiple
5580 IConsoleCallback instances registered on the given
5581 IConsole object, make sure you simply do nothing but
5582 return @c S_OK from all but one of them that does actual
5583 user notification and performs necessary actions.
5584 </note>
5585
5586 </desc>
5587 <param name="fatal" type="boolean" dir="in">
5588 <desc>Whether the error is fatal or not</desc>
5589 </param>
5590 <param name="id" type="wstring" dir="in">
5591 <desc>Error identifier</desc>
5592 </param>
5593 <param name="message" type="wstring" dir="in">
5594 <desc>Optional error message</desc>
5595 </param>
5596 </method>
5597
5598 <method name="onCanShowWindow">
5599 <desc>
5600 Notification when a call to
5601 <link to="IMachine::canShowConsoleWindow"/> is made by a
5602 front-end to check if a subsequent call to
5603 <link to="IMachine::showConsoleWindow"/> can succeed.
5604
5605 The callee should give an answer appropriate to the current
5606 machine state in the @a canShow argument. This answer must
5607 remain valid at least until the next
5608 <link to="IConsole::state">machine state</link> change.
5609
5610 <note>
5611 This notification is not designed to be implemented by
5612 more than one callback at a time. If you have multiple
5613 IConsoleCallback instances registered on the given
5614 IConsole object, make sure you simply do nothing but
5615 return @c true and @c S_OK from all but one of them that
5616 actually manages console window activation.
5617 </note>
5618 </desc>
5619 <param name="canShow" type="boolean" dir="return">
5620 <desc>
5621 @c true if the console window can be shown and @c
5622 false otherwise.
5623 </desc>
5624 </param>
5625 </method>
5626
5627 <method name="onShowWindow">
5628 <desc>
5629 Notification when a call to
5630 <link to="IMachine::showConsoleWindow"/>
5631 requests the console window to be activated and brought to
5632 foreground on the desktop of the host PC.
5633
5634 This notification should cause the VM console process to
5635 perform the requested action as described above. If it is
5636 impossible to do it at a time of this notification, this
5637 method should return a failure.
5638
5639 Note that many modern window managers on many platforms
5640 implement some sort of focus stealing prevention logic, so
5641 that it may be impossible to activate a window without the
5642 help of the currently active application (which is supposedly
5643 an initiator of this notification). In this case, this method
5644 must return a non-zero identifier that represents the
5645 top-level window of the VM console process. The caller, if it
5646 represents a currently active process, is responsible to use
5647 this identifier (in a platform-dependent manner) to perform
5648 actual window activation.
5649
5650 This method must set @a winId to zero if it has performed all
5651 actions necessary to complete the request and the console
5652 window is now active and in foreground, to indicate that no
5653 further action is required on the caller's side.
5654
5655 <note>
5656 This notification is not designed to be implemented by
5657 more than one callback at a time. If you have multiple
5658 IConsoleCallback instances registered on the given
5659 IConsole object, make sure you simply do nothing but
5660 return @c S_OK from all but one of them that actually
5661 manages console window activation.
5662 </note>
5663 </desc>
5664 <param name="winId" type="unsigned long long" dir="return">
5665 <desc>
5666 Platform-dependent identifier of the top-level VM console
5667 window, or zero if this method has performed all actions
5668 necessary to implement the <i>show window</i> semantics for
5669 the given platform and/or this VirtualBox front-end.
5670 </desc>
5671 </param>
5672 </method>
5673
5674 </interface>
5675
5676 <interface
5677 name="IRemoteDisplayInfo" extends="$unknown"
5678 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5679 wsmap="struct"
5680 >
5681 <desc>
5682 Contains information about the remote display (VRDP) capabilities and status.
5683 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5684 </desc>
5685
5686 <attribute name="active" type="boolean" readonly="yes">
5687 <desc>
5688 Whether the remote display connection is active.
5689 </desc>
5690 </attribute>
5691
5692 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5693 <desc>
5694 How many times a client connected.
5695 </desc>
5696 </attribute>
5697
5698 <attribute name="beginTime" type="long long" readonly="yes">
5699 <desc>
5700 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5701 </desc>
5702 </attribute>
5703
5704 <attribute name="endTime" type="long long" readonly="yes">
5705 <desc>
5706 When the last connection was terminated or the current time, if
5707 connection is still active, in milliseconds since 1970-01-01 UTC.
5708 </desc>
5709 </attribute>
5710
5711 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5712 <desc>
5713 How many bytes were sent in last or current, if still active, connection.
5714 </desc>
5715 </attribute>
5716
5717 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5718 <desc>
5719 How many bytes were sent in all connections.
5720 </desc>
5721 </attribute>
5722
5723 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5724 <desc>
5725 How many bytes were received in last or current, if still active, connection.
5726 </desc>
5727 </attribute>
5728
5729 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5730 <desc>
5731 How many bytes were received in all connections.
5732 </desc>
5733 </attribute>
5734
5735 <attribute name="user" type="wstring" readonly="yes">
5736 <desc>
5737 Login user name supplied by the client.
5738 </desc>
5739 </attribute>
5740
5741 <attribute name="domain" type="wstring" readonly="yes">
5742 <desc>
5743 Login domain name supplied by the client.
5744 </desc>
5745 </attribute>
5746
5747 <attribute name="clientName" type="wstring" readonly="yes">
5748 <desc>
5749 The client name supplied by the client.
5750 </desc>
5751 </attribute>
5752
5753 <attribute name="clientIP" type="wstring" readonly="yes">
5754 <desc>
5755 The IP address of the client.
5756 </desc>
5757 </attribute>
5758
5759 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5760 <desc>
5761 The client software version number.
5762 </desc>
5763 </attribute>
5764
5765 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5766 <desc>
5767 Public key exchange method used when connection was established.
5768 Values: 0 - RDP4 public key exchange scheme.
5769 1 - X509 certificates were sent to client.
5770 </desc>
5771 </attribute>
5772
5773 </interface>
5774
5775 <interface
5776 name="IConsole" extends="$unknown"
5777 uuid="9511bc54-15ee-4ddf-808e-472aba03809c"
5778 wsmap="managed"
5779 >
5780 <desc>
5781 The IConsole interface represents an interface to control virtual
5782 machine execution.
5783
5784 The console object that implements the IConsole interface is obtained
5785 from a session object after the session for the given machine has been
5786 opened using one of <link to="IVirtualBox::openSession"/>,
5787 <link to="IVirtualBox::openRemoteSession"/> or
5788 <link to="IVirtualBox::openExistingSession"/> methods.
5789
5790 Methods of the IConsole interface allow the caller to query the current
5791 virtual machine execution state, pause the machine or power it down, save
5792 the machine state or take a snapshot, attach and detach removable media
5793 and so on.
5794
5795 <see>ISession</see>
5796 </desc>
5797
5798 <attribute name="machine" type="IMachine" readonly="yes">
5799 <desc>
5800 Machine object this console is sessioned with.
5801 <note>
5802 This is a convenience property, it has the same value as
5803 <link to="ISession::machine"/> of the corresponding session
5804 object.
5805 </note>
5806 </desc>
5807 </attribute>
5808
5809 <attribute name="state" type="MachineState" readonly="yes">
5810 <desc>
5811 Current execution state of the machine.
5812 <note>
5813 This property always returns the same value as the corresponding
5814 property of the IMachine object this console is sessioned with.
5815 For the process that owns (executes) the VM, this is the
5816 preferable way of querying the VM state, because no IPC
5817 calls are made.
5818 </note>
5819 </desc>
5820 </attribute>
5821
5822 <attribute name="guest" type="IGuest" readonly="yes">
5823 <desc>Guest object.</desc>
5824 </attribute>
5825
5826 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5827 <desc>
5828 Virtual keyboard object.
5829 <note>
5830 If the machine is not running, any attempt to use
5831 the returned object will result in an error.
5832 </note>
5833 </desc>
5834 </attribute>
5835
5836 <attribute name="mouse" type="IMouse" readonly="yes">
5837 <desc>
5838 Virtual mouse object.
5839 <note>
5840 If the machine is not running, any attempt to use
5841 the returned object will result in an error.
5842 </note>
5843 </desc>
5844 </attribute>
5845
5846 <attribute name="display" type="IDisplay" readonly="yes">
5847 <desc>Virtual display object.
5848 <note>
5849 If the machine is not running, any attempt to use
5850 the returned object will result in an error.
5851 </note>
5852 </desc>
5853 </attribute>
5854
5855 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5856 <desc>Debugging interface.</desc>
5857 </attribute>
5858
5859 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5860 <desc>
5861 Collection of USB devices currently attached to the virtual
5862 USB controller.
5863 <note>
5864 The collection is empty if the machine is not running.
5865 </note>
5866 </desc>
5867 </attribute>
5868
5869 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5870 <desc>
5871 List of USB devices currently attached to the remote VRDP client.
5872 Once a new device is physically attached to the remote host computer,
5873 it appears in this list and remains there until detached.
5874 </desc>
5875 </attribute>
5876
5877 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5878 <desc>
5879 Collection of shared folders for the current session. These folders
5880 are called transient shared folders because they are available to the
5881 guest OS running inside the associated virtual machine only for the
5882 duration of the session (as opposed to
5883 <link to="IMachine::sharedFolders"/> which represent permanent shared
5884 folders). When the session is closed (e.g. the machine is powered down),
5885 these folders are automatically discarded.
5886
5887 New shared folders are added to the collection using
5888 <link to="#createSharedFolder"/>. Existing shared folders can be
5889 removed using <link to="#removeSharedFolder"/>.
5890 </desc>
5891 </attribute>
5892
5893 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5894 <desc>
5895 Interface that provides information on Remote Display (VRDP) connection.
5896 </desc>
5897 </attribute>
5898
5899 <method name="powerUp">
5900 <desc>
5901 Starts the virtual machine execution using the current machine
5902 state (that is, its current execution state, current settings and
5903 current hard disks).
5904
5905 If the machine is powered off or aborted, the execution will
5906 start from the beginning (as if the real hardware were just
5907 powered on).
5908
5909 If the machine is in the <link to="MachineState_Saved"/> state,
5910 it will continue its execution the point where the state has
5911 been saved.
5912
5913 <note>
5914 Unless you are trying to write a new VirtualBox front-end that
5915 performs direct machine execution (like the VirtualBox or VBoxSDL
5916 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5917 session opened by <link to="IVirtualBox::openSession"/> and use this
5918 session only to change virtual machine settings. If you simply want to
5919 start virtual machine execution using one of the existing front-ends
5920 (for example the VirtualBox GUI or headless server), simply use
5921 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5922 power up the machine automatically for you.
5923 </note>
5924
5925 <see>#saveState</see>
5926 <result name="VBOX_E_INVALID_VM_STATE">
5927 Virtual machine already running.
5928 </result>
5929 <result name="VBOX_E_HOST_ERROR">
5930 Host interface does not exist or name not set.
5931 </result>
5932 <result name="VBOX_E_FILE_ERROR">
5933 Invalid saved state file.
5934 </result>
5935 </desc>
5936 <param name="progress" type="IProgress" dir="return">
5937 <desc>Progress object to track the operation completion.</desc>
5938 </param>
5939 </method>
5940
5941 <method name="powerUpPaused">
5942 <desc>
5943 Identical to powerUp except that the VM will enter the
5944 <link to="MachineState_Paused"/> state, instead of
5945 <link to="MachineState_Running"/>.
5946
5947 <see>#powerUp</see>
5948 <result name="VBOX_E_INVALID_VM_STATE">
5949 Virtual machine already running.
5950 </result>
5951 <result name="VBOX_E_HOST_ERROR">
5952 Host interface does not exist or name not set.
5953 </result>
5954 <result name="VBOX_E_FILE_ERROR">
5955 Invalid saved state file.
5956 </result>
5957 </desc>
5958 <param name="progress" type="IProgress" dir="return">
5959 <desc>Progress object to track the operation completion.</desc>
5960 </param>
5961 </method>
5962
5963 <method name="powerDown">
5964 <desc>
5965 Stops the virtual machine execution.
5966 After this operation completes, the machine will go to the
5967 PoweredOff state.
5968
5969 @deprecated This method will be removed in VirtualBox 2.1 where the
5970 powerDownAsync() method will take its name. Do not use this method in
5971 the code.
5972 <result name="VBOX_E_INVALID_VM_STATE">
5973 Virtual machine must be Running, Paused or Stuck to be powered down.
5974 </result>
5975 <result name="VBOX_E_VM_ERROR">
5976 Unable to power off or destroy virtual machine.
5977 </result>
5978 </desc>
5979 </method>
5980
5981 <method name="powerDownAsync">
5982 <desc>
5983 Initiates the power down procedure to stop the virtual machine
5984 execution.
5985
5986 The completion of the power down procedure is tracked using the returned
5987 IProgress object. After the operation is complete, the machine will go
5988 to the PoweredOff state.
5989
5990 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5991 where the original powerDown() method will be removed. You will need to
5992 rename "powerDownAsync" to "powerDown" in your sources to make them
5993 build with version 2.1.
5994 <result name="VBOX_E_INVALID_VM_STATE">
5995 Virtual machine must be Running, Paused or Stuck to be powered down.
5996 </result>
5997 </desc>
5998 <param name="progress" type="IProgress" dir="return">
5999 <desc>Progress object to track the operation completion.</desc>
6000 </param>
6001 </method>
6002
6003 <method name="reset">
6004 <desc>Resets the virtual machine.
6005 <result name="VBOX_E_INVALID_VM_STATE">
6006 Virtual machine not in Running state.
6007 </result>
6008 <result name="VBOX_E_VM_ERROR">
6009 Virtual machine error in reset operation.
6010 </result>
6011 </desc>
6012 </method>
6013
6014 <method name="pause">
6015 <desc>Pauses the virtual machine execution.
6016 <result name="VBOX_E_INVALID_VM_STATE">
6017 Virtual machine not in Running state.
6018 </result>
6019 <result name="VBOX_E_VM_ERROR">
6020 Virtual machine error in suspend operation.
6021 </result>
6022 </desc>
6023 </method>
6024
6025 <method name="resume">
6026 <desc>Resumes the virtual machine execution.
6027 <result name="VBOX_E_INVALID_VM_STATE">
6028 Virtual machine not in Paused state.
6029 </result>
6030 <result name="VBOX_E_VM_ERROR">
6031 Virtual machine error in resume operation.
6032 </result>
6033 </desc>
6034 </method>
6035
6036 <method name="powerButton">
6037 <desc>Sends the ACPI power button event to the guest.
6038 <result name="VBOX_E_INVALID_VM_STATE">
6039 Virtual machine not in Running state.
6040 </result>
6041 <result name="VBOX_E_PDM_ERROR">
6042 Controlled power off failed.
6043 </result>
6044 </desc>
6045 </method>
6046
6047 <method name="sleepButton">
6048 <desc>Sends the ACPI sleep button event to the guest.
6049 <result name="VBOX_E_INVALID_VM_STATE">
6050 Virtual machine not in Running state.
6051 </result>
6052 <result name="VBOX_E_PDM_ERROR">
6053 Sending sleep button event failed.
6054 </result>
6055 </desc>
6056 </method>
6057
6058 <method name="getPowerButtonHandled">
6059 <desc>Checks if the last power button event was handled by guest.
6060 <result name="VBOX_E_PDM_ERROR">
6061 Checking if the event was handled by the guest OS failed.
6062 </result>
6063 </desc>
6064 <param name="handled" type="boolean" dir="return"/>
6065 </method>
6066
6067 <method name="getGuestEnteredACPIMode">
6068 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6069 G1 (sleeping). If this method returns false, the guest will
6070 most likely not respond to external ACPI events.
6071 <result name="VBOX_E_INVALID_VM_STATE">
6072 Virtual machine not in Running state.
6073 </result>
6074 </desc>
6075 <param name="entered" type="boolean" dir="return"/>
6076 </method>
6077
6078 <method name="saveState">
6079 <desc>
6080 Saves the current execution state of a running virtual machine
6081 and stops its execution.
6082
6083 After this operation completes, the machine will go to the
6084 Saved state. Next time it is powered up, this state will
6085 be restored and the machine will continue its execution from
6086 the place where it was saved.
6087
6088 This operation differs from taking a snapshot to the effect
6089 that it doesn't create new differencing hard disks. Also, once
6090 the machine is powered up from the state saved using this method,
6091 the saved state is deleted, so it will be impossible to return
6092 to this state later.
6093
6094 <note>
6095 On success, this method implicitly calls
6096 <link to="IMachine::saveSettings"/> to save all current machine
6097 settings (including runtime changes to the DVD drive, etc.).
6098 Together with the impossibility to change any VM settings when it is
6099 in the Saved state, this guarantees adequate hardware
6100 configuration of the machine when it is restored from the saved
6101 state file.
6102 </note>
6103
6104 <note>
6105 The machine must be in the Running or Paused state, otherwise
6106 the operation will fail.
6107 </note>
6108 <result name="VBOX_E_INVALID_VM_STATE">
6109 Virtual machine state neither Running nor Paused.
6110 </result>
6111 <result name="VBOX_E_FILE_ERROR">
6112 Failed to create directory for saved state file.
6113 </result>
6114
6115 <see><link to="#takeSnapshot"/></see>
6116 </desc>
6117 <param name="progress" type="IProgress" dir="return">
6118 <desc>Progress object to track the operation completion.</desc>
6119 </param>
6120 </method>
6121
6122 <method name="adoptSavedState">
6123 <desc>
6124 Associates the given saved state file to the virtual machine.
6125
6126 On success, the machine will go to the Saved state. Next time it is
6127 powered up, it will be restored from the adopted saved state and
6128 continue execution from the place where the saved state file was
6129 created.
6130
6131 The specified saved state file path may be absolute or relative to the
6132 folder the VM normally saves the state to (usually,
6133 <link to="IMachine::snapshotFolder"/>).
6134
6135 <note>
6136 It's a caller's responsibility to make sure the given saved state
6137 file is compatible with the settings of this virtual machine that
6138 represent its virtual hardware (memory size, hard disk configuration
6139 etc.). If there is a mismatch, the behavior of the virtual machine
6140 is undefined.
6141 </note>
6142 <result name="VBOX_E_INVALID_VM_STATE">
6143 Virtual machine state neither PoweredOff nor Aborted.
6144 </result>
6145 </desc>
6146 <param name="savedStateFile" type="wstring" dir="in">
6147 <desc>Path to the saved state file to adopt.</desc>
6148 </param>
6149 </method>
6150
6151 <method name="discardSavedState">
6152 <desc>
6153 Discards (deletes) the saved state of the virtual machine
6154 previously created by <link to="#saveState"/>. Next time the
6155 machine is powered up, a clean boot will occur.
6156 <note>
6157 This operation is equivalent to resetting or powering off
6158 the machine without doing a proper shutdown in the guest OS.
6159 </note>
6160 <result name="VBOX_E_INVALID_VM_STATE">
6161 Virtual machine not in state Saved.
6162 </result>
6163 </desc>
6164 </method>
6165
6166 <method name="getDeviceActivity">
6167 <desc>
6168 Gets the current activity type of a given device or device group.
6169 <result name="E_INVALIDARG">
6170 Invalid device type.
6171 </result>
6172 </desc>
6173 <param name="type" type="DeviceType" dir="in"/>
6174 <param name="activity" type="DeviceActivity" dir="return"/>
6175 </method>
6176
6177 <method name="attachUSBDevice">
6178 <desc>
6179 Attaches a host USB device with the given UUID to the
6180 USB controller of the virtual machine.
6181
6182 The device needs to be in one of the following states:
6183 <link to="USBDeviceState_Busy"/>,
6184 <link to="USBDeviceState_Available"/> or
6185 <link to="USBDeviceState_Held"/>,
6186 otherwise an error is immediately returned.
6187
6188 When the device state is
6189 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6190 be returned if the host computer refuses to release it for some reason.
6191
6192 <see>IUSBController::deviceFilters, USBDeviceState</see>
6193 <result name="VBOX_E_INVALID_VM_STATE">
6194 Virtual machine state neither Running nor Paused.
6195 </result>
6196 <result name="VBOX_E_PDM_ERROR">
6197 Virtual machine does not have a USB controller.
6198 </result>
6199 </desc>
6200 <param name="id" type="uuid" dir="in">
6201 <desc>UUID of the host USB device to attach.</desc>
6202 </param>
6203 </method>
6204
6205 <method name="detachUSBDevice">
6206 <desc>
6207 Detaches an USB device with the given UUID from the USB controller
6208 of the virtual machine.
6209
6210 After this method succeeds, the VirtualBox server re-initiates
6211 all USB filters as if the device were just physically attached
6212 to the host, but filters of this machine are ignored to avoid
6213 a possible automatic re-attachment.
6214
6215 <see>IUSBController::deviceFilters, USBDeviceState</see>
6216
6217 <result name="VBOX_E_PDM_ERROR">
6218 Virtual machine does not have a USB controller.
6219 </result>
6220 <result name="E_INVALIDARG">
6221 USB device not attached to this virtual machine.
6222 </result>
6223 </desc>
6224 <param name="id" type="uuid" dir="in">
6225 <desc>UUID of the USB device to detach.</desc>
6226 </param>
6227 <param name="device" type="IUSBDevice" dir="return">
6228 <desc>Detached USB device.</desc>
6229 </param>
6230 </method>
6231
6232 <method name="findUSBDeviceByAddress">
6233 <desc>
6234 Searches for a USB device with the given host address.
6235
6236 <result name="VBOX_E_OBJECT_NOT_FOUND">
6237 Given @c name does not correspond to any USB device.
6238 </result>
6239
6240 <see>IUSBDevice::address</see>
6241 </desc>
6242 <param name="name" type="wstring" dir="in">
6243 <desc>
6244 Address of the USB device (as assigned by the host) to
6245 search for.
6246 </desc>
6247 </param>
6248 <param name="device" type="IUSBDevice" dir="return">
6249 <desc>Found USB device object.</desc>
6250 </param>
6251 </method>
6252
6253 <method name="findUSBDeviceById">
6254 <desc>
6255 Searches for a USB device with the given UUID.
6256
6257 <result name="VBOX_E_OBJECT_NOT_FOUND">
6258 Given @c id does not correspond to any USB device.
6259 </result>
6260
6261 <see>IUSBDevice::id</see>
6262 </desc>
6263 <param name="id" type="uuid" dir="in">
6264 <desc>UUID of the USB device to search for.</desc>
6265 </param>
6266 <param name="device" type="IUSBDevice" dir="return">
6267 <desc>Found USB device object.</desc>
6268 </param>
6269 </method>
6270
6271 <method name="createSharedFolder">
6272 <desc>
6273 Creates a transient new shared folder by associating the given logical
6274 name with the given host path, adds it to the collection of shared
6275 folders and starts sharing it. Refer to the description of
6276 <link to="ISharedFolder"/> to read more about logical names.
6277
6278 <result name="VBOX_E_INVALID_VM_STATE">
6279 Virtual machine in Saved state or currently changing state.
6280 </result>
6281 <result name="VBOX_E_FILE_ERROR">
6282 Shared folder already exists or not accessible.
6283 </result>
6284 </desc>
6285 <param name="name" type="wstring" dir="in">
6286 <desc>Unique logical name of the shared folder.</desc>
6287 </param>
6288 <param name="hostPath" type="wstring" dir="in">
6289 <desc>Full path to the shared folder in the host file system.</desc>
6290 </param>
6291 <param name="writable" type="boolean" dir="in">
6292 <desc>Whether the share is writable or readonly</desc>
6293 </param>
6294 </method>
6295
6296 <method name="removeSharedFolder">
6297 <desc>
6298 Removes a transient shared folder with the given name previously
6299 created by <link to="#createSharedFolder"/> from the collection of
6300 shared folders and stops sharing it.
6301 <result name="VBOX_E_INVALID_VM_STATE">
6302 Virtual machine in Saved state or currently changing state.
6303 </result>
6304 <result name="VBOX_E_FILE_ERROR">
6305 Shared folder does not exists.
6306 </result>
6307 </desc>
6308 <param name="name" type="wstring" dir="in">
6309 <desc>Logical name of the shared folder to remove.</desc>
6310 </param>
6311 </method>
6312
6313 <method name="takeSnapshot">
6314 <desc>
6315 Saves the current execution state and all settings of the
6316 machine and creates differencing images for all
6317 normal (non-independent) hard disks.
6318
6319 This method can be called for a PoweredOff, Saved, Running or
6320 Paused virtual machine. When the machine is PoweredOff, an
6321 offline <link to="ISnapshot">snapshot</link> is created,
6322 in all other cases -- an online snapshot.
6323
6324 The taken snapshot is always based on the
6325 <link to="IMachine::currentSnapshot">current
6326 snapshot</link> of the associated virtual machine and becomes
6327 a new current snapshot.
6328
6329 <note>
6330 This method implicitly calls <link to="IMachine::saveSettings"/> to
6331 save all current machine settings before taking an offline snapshot.
6332 </note>
6333
6334 <see>ISnapshot, <link to="#saveState"/></see>
6335 <result name="VBOX_E_INVALID_VM_STATE">
6336 Virtual machine currently changing state.
6337 </result>
6338 </desc>
6339 <param name="name" type="wstring" dir="in">
6340 <desc>Short name for the snapshot.</desc>
6341 </param>
6342 <param name="description" type="wstring" dir="in">
6343 <desc>Optional description of the snapshot.</desc>
6344 </param>
6345 <param name="progress" type="IProgress" dir="return">
6346 <desc>Progress object to track the operation completion.</desc>
6347 </param>
6348 </method>
6349
6350 <method name="discardSnapshot">
6351 <desc>
6352
6353 Starts discarding the specified snapshot. The execution state
6354 and settings of the associated machine stored in the snapshot
6355 will be deleted. The contents of all differencing hard disks of
6356 this snapshot will be merged with the contents of their
6357 dependent child hard disks to keep the, disks valid (in other
6358 words, all changes represented by hard disks being discarded
6359 will be propagated to their child hard disks). After that, this
6360 snapshot's differencing hard disks will be deleted. The parent
6361 of this snapshot will become a new parent for all its child
6362 snapshots.
6363
6364 If the discarded snapshot is the current one, its parent
6365 snapshot will become a new current snapshot. The current machine
6366 state is not directly affected in this case, except that
6367 currently attached differencing hard disks based on hard disks
6368 of the discarded snapshot will be also merged as described
6369 above.
6370
6371 If the discarded snapshot is the first one (the root snapshot)
6372 and it has exactly one child snapshot, this child snapshot will
6373 become the first snapshot after discarding. If there are no
6374 children at all (i.e. the first snapshot is the only snapshot of
6375 the machine), both the current and the first snapshot of the
6376 machine will be set to null. In all other cases, the first
6377 snapshot cannot be discarded.
6378
6379 You cannot discard the snapshot if it
6380 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6381 hard disks that have differencing hard disks based on them. Snapshots of
6382 such kind can be discarded only when every normal hard disk has either
6383 no children at all or exactly one child. In the former case, the normal
6384 hard disk simply becomes unused (i.e. not attached to any VM). In the
6385 latter case, it receives all the changes stored in the child hard disk,
6386 and then it replaces the child hard disk in the configuration of the
6387 corresponding snapshot or machine.
6388
6389 Also, you cannot discard the snapshot if it stores hard disks
6390 (of any type) having differencing child hard disks that belong
6391 to other machines. Such snapshots can be only discarded after
6392 you discard all snapshots of other machines containing "foreign"
6393 child disks, or detach these "foreign" child disks from machines
6394 they are attached to.
6395
6396 One particular example of the snapshot storing normal hard disks
6397 is the first snapshot of a virtual machine that had normal hard
6398 disks attached when taking the snapshot. Be careful when
6399 discarding such snapshots because this implicitly commits
6400 changes (made since the snapshot being discarded has been taken)
6401 to normal hard disks (as described above), which may be not what
6402 you want.
6403
6404 The virtual machine is put to
6405 the <link to="MachineState_Discarding">Discarding</link> state until
6406 the discard operation is completed.
6407
6408 <note>
6409 The machine must not be running, otherwise the operation
6410 will fail.
6411 </note>
6412
6413 <note>
6414 Child hard disks of all normal hard disks of the discarded snapshot
6415 must be accessible (see <link to="IMedium::state"/>) for this
6416 operation to succeed. In particular, this means that all virtual
6417 machines, whose hard disks are directly or indirectly based on the
6418 hard disks of discarded snapshot, must be powered off.
6419 </note>
6420 <note>
6421 Merging hard disk contents can be very time and disk space
6422 consuming, if these disks are big in size and have many
6423 children. However, if the snapshot being discarded is the last
6424 (head) snapshot on the branch, the operation will be rather
6425 quick.
6426 </note>
6427 <note>
6428 Note that discarding the current snapshot
6429 will implicitly call <link to="IMachine::saveSettings"/> to
6430 make all current machine settings permanent.
6431 </note>
6432 <result name="VBOX_E_INVALID_VM_STATE">
6433 Virtual machine is running.
6434 </result>
6435 </desc>
6436 <param name="id" type="uuid" dir="in">
6437 <desc>UUID of the snapshot to discard.</desc>
6438 </param>
6439 <param name="progress" type="IProgress" dir="return">
6440 <desc>Progress object to track the operation completion.</desc>
6441 </param>
6442 </method>
6443
6444 <method name="discardCurrentState">
6445 <desc>
6446 This operation is similar to <link to="#discardSnapshot"/> but
6447 affects the current machine state. This means that the state stored in
6448 the current snapshot will become a new current state, and all current
6449 settings of the machine and changes stored in differencing hard disks
6450 will be lost.
6451
6452 After this operation is successfully completed, new empty differencing
6453 hard disks are created for all normal hard disks of the machine.
6454
6455 If the current snapshot of the machine is an online snapshot, the
6456 machine will go to the <link to="MachineState_Saved"> saved
6457 state</link>, so that the next time it is powered on, the execution
6458 state will be restored from the current snapshot.
6459
6460 <note>
6461 The machine must not be running, otherwise the operation will fail.
6462 </note>
6463
6464 <note>
6465 If the machine state is <link to="MachineState_Saved">Saved</link>
6466 prior to this operation, the saved state file will be implicitly
6467 discarded (as if <link to="IConsole::discardSavedState"/> were
6468 called).
6469 </note>
6470
6471 <result name="VBOX_E_INVALID_VM_STATE">
6472 Virtual machine is running.
6473 </result>
6474 </desc>
6475 <param name="progress" type="IProgress" dir="return">
6476 <desc>Progress object to track the operation completion.</desc>
6477 </param>
6478 </method>
6479
6480 <method name="discardCurrentSnapshotAndState">
6481 <desc>
6482
6483 This method is equivalent to
6484 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6485 (currentSnapshot.id(), progress) followed by
6486 <link to="#discardCurrentState"/>.
6487
6488 As a result, the machine will be fully restored from the
6489 snapshot preceding the current snapshot, while both the current
6490 snapshot and the current machine state will be discarded.
6491
6492 If the current snapshot is the first snapshot of the machine (i.e. it
6493 has the only snapshot), the current machine state will be
6494 discarded <b>before</b> discarding the snapshot. In other words, the
6495 machine will be restored from its last snapshot, before discarding
6496 it. This differs from performing a single
6497 <link to="#discardSnapshot"/> call (note that no
6498 <link to="#discardCurrentState"/> will be possible after it)
6499 to the effect that the latter will preserve the current state instead of
6500 discarding it.
6501
6502 Unless explicitly mentioned otherwise, all remarks and
6503 limitations of the above two methods also apply to this method.
6504
6505 <note>
6506 The machine must not be running, otherwise the operation
6507 will fail.
6508 </note>
6509
6510 <note>
6511 If the machine state is <link to="MachineState_Saved">Saved</link>
6512 prior to this operation, the saved state file will be implicitly
6513 discarded (as if <link to="#discardSavedState"/> were
6514 called).
6515 </note>
6516
6517 <note>
6518 This method is more efficient than calling both of the above
6519 methods separately: it requires less IPC calls and provides
6520 a single progress object.
6521 </note>
6522
6523 <result name="VBOX_E_INVALID_VM_STATE">
6524 Virtual machine is running.
6525 </result>
6526 </desc>
6527 <param name="progress" type="IProgress" dir="return">
6528 <desc>Progress object to track the operation completion.</desc>
6529 </param>
6530 </method>
6531
6532 <method name="registerCallback">
6533 <desc>
6534 Registers a new console callback on this instance. The methods of the
6535 callback interface will be called by this instance when the appropriate
6536 event occurs.
6537 </desc>
6538 <param name="callback" type="IConsoleCallback" dir="in"/>
6539 </method>
6540
6541 <method name="unregisterCallback">
6542 <desc>
6543 Unregisters the console callback previously registered using
6544 <link to="#registerCallback"/>.
6545 <result name="E_INVALIDARG">
6546 Given @a callback handler is not registered.
6547 </result>
6548 </desc>
6549 <param name="callback" type="IConsoleCallback" dir="in"/>
6550 </method>
6551 </interface>
6552
6553 <!--
6554 // IHost
6555 /////////////////////////////////////////////////////////////////////////
6556 -->
6557
6558 <interface
6559 name="IHostDVDDrive" extends="$unknown"
6560 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6561 wsmap="managed"
6562 >
6563 <desc>
6564 The IHostDVDDrive interface represents the physical CD/DVD drive
6565 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6566 </desc>
6567
6568 <attribute name="name" type="wstring" readonly="yes">
6569 <desc>
6570 Returns the platform-specific device identifier.
6571 On DOS-like platforms, it is a drive name (e.g. R:).
6572 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6573 </desc>
6574 </attribute>
6575 <attribute name="description" type="wstring" readonly="yes">
6576 <desc>
6577 Returns a human readable description for the drive. This
6578 description usually contains the product and vendor name. A
6579 @c null string is returned if the description is not available.
6580 </desc>
6581 </attribute>
6582 <attribute name="udi" type="wstring" readonly="yes">
6583 <desc>
6584 Returns the unique device identifier for the drive. This
6585 attribute is reserved for future use instead of
6586 <link to="#name"/>. Currently it is not used and may return
6587 @c null on some platforms.
6588 </desc>
6589 </attribute>
6590
6591 </interface>
6592
6593 <interface
6594 name="IHostFloppyDrive" extends="$unknown"
6595 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6596 wsmap="managed"
6597 >
6598 <desc>
6599 The IHostFloppyDrive interface represents the physical floppy drive
6600 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6601 </desc>
6602 <attribute name="name" type="wstring" readonly="yes">
6603 <desc>
6604 Returns the platform-specific device identifier.
6605 On DOS-like platforms, it is a drive name (e.g. A:).
6606 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6607 </desc>
6608 </attribute>
6609 <attribute name="description" type="wstring" readonly="yes">
6610 <desc>
6611 Returns a human readable description for the drive. This
6612 description usually contains the product and vendor name. A
6613 @c null string is returned if the description is not available.
6614 </desc>
6615 </attribute>
6616 <attribute name="udi" type="wstring" readonly="yes">
6617 <desc>
6618 Returns the unique device identifier for the drive. This
6619 attribute is reserved for future use instead of
6620 <link to="#name"/>. Currently it is not used and may return
6621 @c null on some platforms.
6622 </desc>
6623 </attribute>
6624 </interface>
6625
6626 <enum
6627 name="HostNetworkInterfaceMediumType"
6628 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6629 >
6630 <desc>
6631 Type of encapsulation. Ethernet encapsulation includes both wired and
6632 wireless Ethernet connections.
6633 <see>IHostNetworkInterface</see>
6634 </desc>
6635
6636 <const name="Unknown" value="0">
6637 <desc>
6638 The type of interface cannot be determined.
6639 </desc>
6640 </const>
6641 <const name="Ethernet" value="1">
6642 <desc>
6643 Ethernet frame encapsulation.
6644 </desc>
6645 </const>
6646 <const name="PPP" value="2">
6647 <desc>
6648 Point-to-point protocol encapsulation.
6649 </desc>
6650 </const>
6651 <const name="SLIP" value="3">
6652 <desc>
6653 Serial line IP encapsulation.
6654 </desc>
6655 </const>
6656 </enum>
6657
6658 <enum
6659 name="HostNetworkInterfaceStatus"
6660 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6661 >
6662 <desc>
6663 Current status of the interface.
6664 <see>IHostNetworkInterface</see>
6665 </desc>
6666
6667 <const name="Unknown" value="0">
6668 <desc>
6669 The state of interface cannot be determined.
6670 </desc>
6671 </const>
6672 <const name="Up" value="1">
6673 <desc>
6674 The interface is fully operational.
6675 </desc>
6676 </const>
6677 <const name="Down" value="2">
6678 <desc>
6679 The interface is not functioning.
6680 </desc>
6681 </const>
6682 </enum>
6683
6684 <enum
6685 name="HostNetworkInterfaceType"
6686 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6687 >
6688 <desc>
6689 Network interface type.
6690 </desc>
6691 <const name="Bridged" value="1"/>
6692 <const name="HostOnly" value="2"/>
6693 </enum>
6694
6695 <interface
6696 name="IHostNetworkInterface" extends="$unknown"
6697 uuid="88adaf3f-166b-4542-9457-0f1323507fae"
6698 wsmap="managed"
6699 >
6700 <desc>
6701 Reprents one of host's network interfaces. IP V6 address and network
6702 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6703 separated by colons.
6704 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6705 </desc>
6706 <attribute name="name" type="wstring" readonly="yes">
6707 <desc>Returns the host network interface name.</desc>
6708 </attribute>
6709
6710 <attribute name="id" type="uuid" readonly="yes">
6711 <desc>Returns the interface UUID.</desc>
6712 </attribute>
6713
6714 <attribute name="networkName" type="wstring" readonly="yes">
6715 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6716 </attribute>
6717
6718 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6719 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6720 </attribute>
6721
6722 <attribute name="IPAddress" type="wstring" readonly="yes">
6723 <desc>Returns the IP V4 address of the interface.</desc>
6724 </attribute>
6725
6726 <attribute name="networkMask" type="wstring" readonly="yes">
6727 <desc>Returns the network mask of the interface.</desc>
6728 </attribute>
6729
6730 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6731 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6732 </attribute>
6733
6734 <attribute name="IPV6Address" type="wstring" readonly="yes">
6735 <desc>Returns the IP V6 address of the interface.</desc>
6736 </attribute>
6737
6738 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6739 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6740 </attribute>
6741
6742 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6743 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6744 </attribute>
6745
6746 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6747 <desc>Type of protocol encapsulation used.</desc>
6748 </attribute>
6749
6750 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6751 <desc>Status of the interface.</desc>
6752 </attribute>
6753
6754 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6755 <desc>specifies the host interface type.</desc>
6756 </attribute>
6757
6758 <method name="enableStaticIpConfig">
6759 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6760 <param name="IPAddress" type="wstring" dir="in">
6761 <desc>
6762 IP address.
6763 </desc>
6764 </param>
6765 <param name="networkMask" type="wstring" dir="in">
6766 <desc>
6767 network mask.
6768 </desc>
6769 </param>
6770 </method>
6771
6772 <method name="enableStaticIpConfigV6">
6773 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6774 <param name="IPV6Address" type="wstring" dir="in">
6775 <desc>
6776 IP address.
6777 </desc>
6778 </param>
6779 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6780 <desc>
6781 network mask.
6782 </desc>
6783 </param>
6784 </method>
6785
6786 <method name="enableDynamicIpConfig">
6787 <desc>enables the dynamic IP configuration.</desc>
6788 </method>
6789
6790 <method name="dhcpRediscover">
6791 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6792 </method>
6793
6794 </interface>
6795
6796 <interface
6797 name="IHost" extends="$unknown"
6798 uuid="926469ca-9091-42ef-928e-582d78b66c70"
6799 wsmap="managed"
6800 >
6801 <desc>
6802 The IHost interface represents the physical machine that this VirtualBox
6803 installation runs on.
6804
6805 An object implementing this interface is returned by the
6806 <link to="IVirtualBox::host" /> attribute. This interface contains
6807 read-only information about the host's physical hardware (such as what
6808 processors and disks are available, what the host operating system is,
6809 and so on) and also allows for manipulating some of the host's hardware,
6810 such as global USB device filters and host interface networking.
6811
6812 </desc>
6813 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6814 <desc>List of DVD drives available on the host.</desc>
6815 </attribute>
6816
6817 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6818 <desc>List of floppy drives available on the host.</desc>
6819 </attribute>
6820
6821 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6822 <desc>
6823 List of USB devices currently attached to the host.
6824 Once a new device is physically attached to the host computer,
6825 it appears in this list and remains there until detached.
6826
6827 <note>
6828 This method may set a @ref com_warnings "warning result code".
6829 </note>
6830 <note>
6831 If USB functionality is not available in the given edition of
6832 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6833 </note>
6834 </desc>
6835 </attribute>
6836
6837 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6838 <desc>
6839 List of USB device filters in action.
6840 When a new device is physically attached to the host computer,
6841 filters from this list are applied to it (in order they are stored
6842 in the list). The first matched filter will determine the
6843 <link to="IHostUSBDeviceFilter::action">action</link>
6844 performed on the device.
6845
6846 Unless the device is ignored by these filters, filters of all
6847 currently running virtual machines
6848 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6849
6850 <note>
6851 This method may set a @ref com_warnings "warning result code".
6852 </note>
6853 <note>
6854 If USB functionality is not available in the given edition of
6855 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6856 </note>
6857
6858 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6859 </desc>
6860 </attribute>
6861
6862 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6863 <desc>List of host network interfaces currently defined on the host.</desc>
6864 </attribute>
6865
6866 <attribute name="processorCount" type="unsigned long" readonly="yes">
6867 <desc>Number of (logical) CPUs installed in the host system.</desc>
6868 </attribute>
6869
6870 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6871 <desc>Number of (logical) CPUs online in the host system.</desc>
6872 </attribute>
6873
6874 <method name="getProcessorSpeed">
6875 <desc>Query the (approximate) maximum speed of a specified host CPU in
6876 Megahertz.
6877 </desc>
6878 <param name="cpuId" type="unsigned long" dir="in">
6879 <desc>
6880 Identifier of the CPU.
6881 </desc>
6882 </param>
6883 <param name="speed" type="unsigned long" dir="return">
6884 <desc>
6885 Speed value. 0 is returned if value is not known or @a cpuId is
6886 invalid.
6887 </desc>
6888 </param>
6889 </method>
6890
6891 <method name="getProcessorFeature">
6892 <desc>Query whether a CPU feature is supported or not.</desc>
6893 <param name="feature" type="ProcessorFeature" dir="in">
6894 <desc>
6895 CPU Feature identifier.
6896 </desc>
6897 </param>
6898 <param name="supported" type="boolean" dir="return">
6899 <desc>
6900 Feature is supported or not.
6901 </desc>
6902 </param>
6903 </method>
6904
6905 <method name="getProcessorDescription">
6906 <desc>Query the model string of a specified host CPU.
6907 <note>
6908 This function is not implemented in the current version of the
6909 product.
6910 </note>
6911 </desc>
6912 <param name="cpuId" type="unsigned long" dir="in">
6913 <desc>
6914 Identifier of the CPU.
6915 </desc>
6916 </param>
6917 <param name="description" type="wstring" dir="return">
6918 <desc>
6919 Model string. A NULL string is returned if value is not known or
6920 @a cpuId is invalid.
6921 </desc>
6922 </param>
6923 </method>
6924
6925 <attribute name="memorySize" type="unsigned long" readonly="yes">
6926 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6927 </attribute>
6928
6929 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6930 <desc>Available system memory in the host system.</desc>
6931 </attribute>
6932
6933 <attribute name="operatingSystem" type="wstring" readonly="yes">
6934 <desc>Name of the host system's operating system.</desc>
6935 </attribute>
6936
6937 <attribute name="OSVersion" type="wstring" readonly="yes">
6938 <desc>Host operating system's version string.</desc>
6939 </attribute>
6940
6941 <attribute name="UTCTime" type="long long" readonly="yes">
6942 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6943 </attribute>
6944
6945<if target="midl">
6946 <method name="createHostOnlyNetworkInterface">
6947 <desc>
6948 Creates a new adapter for Host Only Networking.
6949 <result name="E_INVALIDARG">
6950 Host network interface @a name already exists.
6951 </result>
6952 </desc>
6953 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6954 <desc>
6955 Created host interface object.
6956 </desc>
6957 </param>
6958 <param name="progress" type="IProgress" dir="return">
6959 <desc>
6960 Progress object to track the operation completion.
6961 </desc>
6962 </param>
6963 </method>
6964 <method name="removeHostOnlyNetworkInterface">
6965 <desc>
6966 Removes the given Host Only Networking interface.
6967 <result name="VBOX_E_OBJECT_NOT_FOUND">
6968 No host network interface matching @a id found.
6969 </result>
6970 </desc>
6971 <param name="id" type="uuid" dir="in">
6972 <desc>
6973 Adapter GUID.
6974 </desc>
6975 </param>
6976 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6977 <desc>
6978 Removed host interface object.
6979 </desc>
6980 </param>
6981 <param name="progress" type="IProgress" dir="return">
6982 <desc>
6983 Progress object to track the operation completion.
6984 </desc>
6985 </param>
6986 </method>
6987</if>
6988
6989 <method name="createUSBDeviceFilter">
6990 <desc>
6991 Creates a new USB device filter. All attributes except
6992 the filter name are set to <tt>null</tt> (any match),
6993 <i>active</i> is <tt>false</tt> (the filter is not active).
6994
6995 The created filter can be added to the list of filters using
6996 <link to="#insertUSBDeviceFilter"/>.
6997
6998 <see>#USBDeviceFilters</see>
6999 </desc>
7000 <param name="name" type="wstring" dir="in">
7001 <desc>
7002 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7003 for more info.
7004 </desc>
7005 </param>
7006 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7007 <desc>Created filter object.</desc>
7008 </param>
7009 </method>
7010
7011 <method name="insertUSBDeviceFilter">
7012 <desc>
7013 Inserts the given USB device to the specified position
7014 in the list of filters.
7015
7016 Positions are numbered starting from <tt>0</tt>. If the specified
7017 position is equal to or greater than the number of elements in
7018 the list, the filter is added at the end of the collection.
7019
7020 <note>
7021 Duplicates are not allowed, so an attempt to insert a
7022 filter that is already in the list, will return an
7023 error.
7024 </note>
7025 <note>
7026 This method may set a @ref com_warnings "warning result code".
7027 </note>
7028 <note>
7029 If USB functionality is not available in the given edition of
7030 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7031 </note>
7032
7033 <see>#USBDeviceFilters</see>
7034
7035 <result name="VBOX_E_INVALID_OBJECT_STATE">
7036 USB device filter is not created within this VirtualBox instance.
7037 </result>
7038 <result name="E_INVALIDARG">
7039 USB device filter already in list.
7040 </result>
7041
7042 </desc>
7043 <param name="position" type="unsigned long" dir="in">
7044 <desc>Position to insert the filter to.</desc>
7045 </param>
7046 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7047 <desc>USB device filter to insert.</desc>
7048 </param>
7049 </method>
7050
7051 <method name="removeUSBDeviceFilter">
7052 <desc>
7053 Removes a USB device filter from the specified position in the
7054 list of filters.
7055
7056 Positions are numbered starting from <tt>0</tt>. Specifying a
7057 position equal to or greater than the number of elements in
7058 the list will produce an error.
7059
7060 <note>
7061 This method may set a @ref com_warnings "warning result code".
7062 </note>
7063 <note>
7064 If USB functionality is not available in the given edition of
7065 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7066 </note>
7067
7068 <see>#USBDeviceFilters</see>
7069
7070 <result name="E_INVALIDARG">
7071 USB device filter list empty or invalid @a position.
7072 </result>
7073
7074 </desc>
7075 <param name="position" type="unsigned long" dir="in">
7076 <desc>Position to remove the filter from.</desc>
7077 </param>
7078 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7079 <desc>Removed USB device filter.</desc>
7080 </param>
7081 </method>
7082
7083 <method name="findHostDVDDrive">
7084 <desc>
7085 Searches for a host DVD drive with the given @c name.
7086
7087 <result name="VBOX_E_OBJECT_NOT_FOUND">
7088 Given @c name does not correspond to any host drive.
7089 </result>
7090
7091 </desc>
7092 <param name="name" type="wstring" dir="in">
7093 <desc>Name of the host drive to search for</desc>
7094 </param>
7095 <param name="drive" type="IHostDVDDrive" dir="return">
7096 <desc>Found host drive object</desc>
7097 </param>
7098 </method>
7099
7100 <method name="findHostFloppyDrive">
7101 <desc>
7102 Searches for a host floppy drive with the given @c name.
7103
7104 <result name="VBOX_E_OBJECT_NOT_FOUND">
7105 Given @c name does not correspond to any host floppy drive.
7106 </result>
7107
7108 </desc>
7109 <param name="name" type="wstring" dir="in">
7110 <desc>Name of the host floppy drive to search for</desc>
7111 </param>
7112 <param name="drive" type="IHostFloppyDrive" dir="return">
7113 <desc>Found host floppy drive object</desc>
7114 </param>
7115 </method>
7116
7117 <method name="findHostNetworkInterfaceByName">
7118 <desc>
7119 Searches through all host network interfaces for an interface with
7120 the given @c name.
7121 <note>
7122 The method returns an error if the given @c name does not
7123 correspond to any host network interface.
7124 </note>
7125 </desc>
7126 <param name="name" type="wstring" dir="in">
7127 <desc>Name of the host network interface to search for.</desc>
7128 </param>
7129 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7130 <desc>Found host network interface object.</desc>
7131 </param>
7132 </method>
7133 <method name="findHostNetworkInterfaceById">
7134 <desc>
7135 Searches through all host network interfaces for an interface with
7136 the given GUID.
7137 <note>
7138 The method returns an error if the given GUID does not
7139 correspond to any host network interface.
7140 </note>
7141 </desc>
7142 <param name="id" type="uuid" dir="in">
7143 <desc>GUID of the host network interface to search for.</desc>
7144 </param>
7145 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7146 <desc>Found host network interface object.</desc>
7147 </param>
7148 </method>
7149 <method name="findHostNetworkInterfacesOfType">
7150 <desc>
7151 Searches through all host network interfaces and returns a list of interfaces of the specified type
7152 </desc>
7153 <param name="type" type="HostNetworkInterfaceType" dir="in">
7154 <desc>type of the host network interfaces to search for.</desc>
7155 </param>
7156 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7157 <desc>Found host network interface objects.</desc>
7158 </param>
7159 </method>
7160
7161 <method name="findUSBDeviceById">
7162 <desc>
7163 Searches for a USB device with the given UUID.
7164
7165 <result name="VBOX_E_OBJECT_NOT_FOUND">
7166 Given @id does not correspond to any USB device.
7167 </result>
7168
7169 <see>IHostUSBDevice::id</see>
7170 </desc>
7171 <param name="id" type="uuid" dir="in">
7172 <desc>UUID of the USB device to search for.</desc>
7173 </param>
7174 <param name="device" type="IHostUSBDevice" dir="return">
7175 <desc>Found USB device object.</desc>
7176 </param>
7177 </method>
7178
7179 <method name="findUSBDeviceByAddress">
7180 <desc>
7181 Searches for a USB device with the given host address.
7182
7183 <result name="VBOX_E_OBJECT_NOT_FOUND">
7184 Given @c name does not correspond to any USB device.
7185 </result>
7186
7187 <see>IHostUSBDevice::address</see>
7188 </desc>
7189 <param name="name" type="wstring" dir="in">
7190 <desc>
7191 Address of the USB device (as assigned by the host) to
7192 search for.
7193 </desc>
7194 </param>
7195 <param name="device" type="IHostUSBDevice" dir="return">
7196 <desc>Found USB device object.</desc>
7197 </param>
7198 </method>
7199
7200 </interface>
7201
7202 <!--
7203 // ISystemProperties
7204 /////////////////////////////////////////////////////////////////////////
7205 -->
7206
7207 <interface
7208 name="ISystemProperties"
7209 extends="$unknown"
7210 uuid="0760e03f-06d0-481e-9f81-be43fef092ba"
7211 wsmap="managed"
7212 >
7213 <desc>
7214 The ISystemProperties interface represents global properties of the given
7215 VirtualBox installation.
7216
7217 These properties define limits and default values for various attributes
7218 and parameters. Most of the properties are read-only, but some can be
7219 changed by a user.
7220 </desc>
7221
7222 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7223 <desc>Minimum guest system memory in Megabytes.</desc>
7224 </attribute>
7225
7226 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7227 <desc>Maximum guest system memory in Megabytes.</desc>
7228 </attribute>
7229
7230 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7231 <desc>Minimum guest video memory in Megabytes.</desc>
7232 </attribute>
7233
7234 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7235 <desc>Maximum guest video memory in Megabytes.</desc>
7236 </attribute>
7237
7238 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7239 <desc>Minimum CPU count.</desc>
7240 </attribute>
7241
7242 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7243 <desc>Maximum CPU count.</desc>
7244 </attribute>
7245
7246 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7247 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7248 </attribute>
7249
7250 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7251 <desc>
7252 Number of network adapters associated with every
7253 <link to="IMachine"/> instance.
7254 </desc>
7255 </attribute>
7256
7257 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7258 <desc>
7259 Number of serial ports associated with every
7260 <link to="IMachine"/> instance.
7261 </desc>
7262 </attribute>
7263
7264 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7265 <desc>
7266 Number of parallel ports associated with every
7267 <link to="IMachine"/> instance.
7268 </desc>
7269 </attribute>
7270
7271 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7272 <desc>
7273 Maximum device position in the boot order. This value corresponds
7274 to the total number of devices a machine can boot from, to make it
7275 possible to include all possible devices to the boot list.
7276 <see><link to="IMachine::setBootOrder"/></see>
7277 </desc>
7278 </attribute>
7279
7280 <attribute name="defaultMachineFolder" type="wstring">
7281 <desc>
7282 Full path to the default directory used to create new or open
7283 existing machines when a settings file name contains no
7284 path.
7285
7286 The initial value of this property is
7287 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7288 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7289
7290 <note>
7291 Setting this property to <tt>null</tt> will restore the
7292 initial value.
7293 </note>
7294 <note>
7295 When settings this property, the specified path can be
7296 absolute (full path) or relative
7297 to the <link to="IVirtualBox::homeFolder">
7298 VirtualBox home directory</link>.
7299 When reading this property, a full path is
7300 always returned.
7301 </note>
7302 <note>
7303 The specified path may not exist, it will be created
7304 when necessary.
7305 </note>
7306
7307 <see>
7308 <link to="IVirtualBox::createMachine"/>,
7309 <link to="IVirtualBox::openMachine"/>
7310 </see>
7311 </desc>
7312 </attribute>
7313
7314 <attribute name="defaultHardDiskFolder" type="wstring">
7315 <desc>
7316 Full path to the default directory used to create new or open existing
7317 virtual disks.
7318
7319 This path is used when the storage unit of a hard disk is a regular file
7320 in the host's file system and only a file name that contains no path is
7321 given.
7322
7323 The initial value of this property is
7324 <tt>&lt;</tt>
7325 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7326 <tt>&gt;/HardDisks</tt>.
7327
7328 <note>
7329 Setting this property to <tt>null</tt> will restore the
7330 initial value.
7331 </note>
7332 <note>
7333 When settings this property, the specified path can be relative
7334 to the
7335 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7336 absolute. When reading this property, a full path is
7337 always returned.
7338 </note>
7339 <note>
7340 The specified path may not exist, it will be created
7341 when necessary.
7342 </note>
7343
7344 <see>
7345 IHardDisk,
7346 <link to="IVirtualBox::createHardDisk"/>,
7347 <link to="IVirtualBox::openHardDisk"/>,
7348 <link to="IMedium::location"/>
7349 </see>
7350 </desc>
7351 </attribute>
7352
7353 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7354 <desc>
7355 List of all hard disk storage formats supported by this VirtualBox
7356 installation.
7357
7358 Keep in mind that the hard disk format identifier
7359 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7360 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7361 hard disk format is a case-insensitive string. This means that, for
7362 example, all of the following strings:
7363 <pre>
7364 "VDI"
7365 "vdi"
7366 "VdI"</pre>
7367 refer to the same hard disk format.
7368
7369 Note that the virtual hard disk framework is backend-based, therefore
7370 the list of supported formats depends on what backends are currently
7371 installed.
7372
7373 <see>
7374 <link to="IHardDiskFormat"/>,
7375 </see>
7376 </desc>
7377 </attribute>
7378
7379 <attribute name="defaultHardDiskFormat" type="wstring">
7380 <desc>
7381 Identifier of the default hard disk format used by VirtualBox.
7382
7383 The hard disk format set by this attribute is used by VirtualBox
7384 when the hard disk format was not specified explicitly. One example is
7385 <link to="IVirtualBox::createHardDisk"/> with the <tt>null</tt>
7386 format argument. A more complex example is implicit creation of
7387 differencing hard disks when taking a snapshot of a virtual machine:
7388 this operation will try to use a format of the parent hard disk first
7389 and if this format does not support differencing hard disks the default
7390 format specified by this argument will be used.
7391
7392 The list of supported hard disk formats may be obtained by the
7393 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7394 format must have a capability to create differencing hard disks;
7395 otherwise opeartions that create hard disks implicitly may fail
7396 unexpectedly.
7397
7398 The initial value of this property is <tt>VDI</tt> in the current
7399 version of the VirtualBox product, but may change in the future.
7400
7401 <note>
7402 Setting this property to <tt>null</tt> will restore the
7403 initial value.
7404 </note>
7405
7406 <see>
7407 <link to="#hardDiskFormats"/>,
7408 <link to="IHardDiskFormat::id"/>,
7409 <link to="IVirtualBox::createHardDisk"/>
7410 </see>
7411 </desc>
7412 </attribute>
7413
7414 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7415 <desc>
7416 Library that provides authentication for VRDP clients. The library
7417 is used if a virtual machine's authentication type is set to "external"
7418 in the VM RemoteDisplay configuration.
7419
7420 The system library extension (".DLL" or ".so") must be omitted.
7421 A full path can be specified; if not, then the library must reside on the
7422 system's default library path.
7423
7424 The default value of this property is <tt>VRDPAuth</tt>. There is a library
7425 of that name in one of the default VirtualBox library directories.
7426
7427 For details about VirtualBox authentication libraries and how to implement
7428 them, please refer to the VirtualBox manual.
7429
7430 <note>
7431 Setting this property to <tt>null</tt> will restore the
7432 initial value.
7433 </note>
7434 </desc>
7435 </attribute>
7436
7437 <attribute name="webServiceAuthLibrary" type="wstring">
7438 <desc>
7439 Library that provides authentication for webservice clients. The library
7440 is used if a virtual machine's authentication type is set to "external"
7441 in the VM RemoteDisplay configuration and will be called from
7442 within the <link to="IWebsessionManager::logon" /> implementation.
7443
7444 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7445 there is no per-VM setting for this, as the webservice is a global
7446 resource (if it is running). Only for this setting (for the webservice),
7447 setting this value to a literal "null" string disables authentication,
7448 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7449 no matter what user name and password are supplied.
7450
7451 The initial value of this property is <tt>VRDPAuth</tt>,
7452 meaning that the webservice will use the same authentication
7453 library that is used by default for VBoxVRDP (again, see
7454 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7455 The format and calling convention of authentication libraries
7456 is the same for the webservice as it is for VBoxVRDP.
7457
7458 </desc>
7459 </attribute>
7460
7461 <attribute name="HWVirtExEnabled" type="boolean">
7462 <desc>
7463 This specifies the default value for hardware virtualization
7464 extensions. If enabled, virtual machines will make use of
7465 hardware virtualization extensions such as Intel VT-x and
7466 AMD-V by default. This value can be overridden by each VM
7467 using their <link to="IMachine::HWVirtExEnabled" /> property.
7468 </desc>
7469 </attribute>
7470
7471 <attribute name="LogHistoryCount" type="unsigned long">
7472 <desc>
7473 This value specifies how many old release log files are kept.
7474 </desc>
7475 </attribute>
7476 </interface>
7477
7478 <!--
7479 // IGuest
7480 /////////////////////////////////////////////////////////////////////////
7481 -->
7482
7483 <interface
7484 name="IGuestOSType" extends="$unknown"
7485 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7486 wsmap="struct"
7487 >
7488 <desc>
7489 </desc>
7490
7491 <attribute name="familyId" type="wstring" readonly="yes">
7492 <desc>Guest OS family identifier string.</desc>
7493 </attribute>
7494
7495 <attribute name="familyDescription" type="wstring" readonly="yes">
7496 <desc>Human readable description of the guest OS family.</desc>
7497 </attribute>
7498
7499 <attribute name="id" type="wstring" readonly="yes">
7500 <desc>Guest OS identifier string.</desc>
7501 </attribute>
7502
7503 <attribute name="description" type="wstring" readonly="yes">
7504 <desc>Human readable description of the guest OS.</desc>
7505 </attribute>
7506
7507 <attribute name="is64Bit" type="boolean" readonly="yes">
7508 <desc>Returns @c true if the given OS is 64-bit</desc>
7509 </attribute>
7510
7511 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7512 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7513 </attribute>
7514
7515 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7516 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7517 </attribute>
7518
7519 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7520 <desc>Recommended RAM size in Megabytes.</desc>
7521 </attribute>
7522
7523 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7524 <desc>Recommended video RAM size in Megabytes.</desc>
7525 </attribute>
7526
7527 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7528 <desc>Recommended hard disk size in Megabytes.</desc>
7529 </attribute>
7530
7531 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7532 <desc>Returns recommended network adapter for this OS type.</desc>
7533 </attribute>
7534 </interface>
7535
7536 <interface
7537 name="IGuest" extends="$unknown"
7538 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7539
7540 wsmap="suppress"
7541 >
7542 <desc>
7543 The IGuest interface represents information about the operating system
7544 running inside the virtual machine. Used in
7545 <link to="IConsole::guest"/>.
7546
7547 IGuest provides information about the guest operating system, whether
7548 Guest Additions are installed and other OS-specific virtual machine
7549 properties.
7550 </desc>
7551
7552 <attribute name="OSTypeId" type="wstring" readonly="yes">
7553 <desc>
7554 Identifier of the Guest OS type as reported by the Guest
7555 Additions.
7556 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7557 an IGuestOSType object representing details about the given
7558 Guest OS type.
7559 <note>
7560 If Guest Additions are not installed, this value will be
7561 the same as <link to="IMachine::OSTypeId"/>.
7562 </note>
7563 </desc>
7564 </attribute>
7565
7566 <attribute name="additionsActive" type="boolean" readonly="yes">
7567 <desc>
7568 Flag whether the Guest Additions are installed and active
7569 in which case their version will be returned by the
7570 <link to="#additionsVersion"/> property.
7571 </desc>
7572 </attribute>
7573
7574 <attribute name="additionsVersion" type="wstring" readonly="yes">
7575 <desc>
7576 Version of the Guest Additions (3 decimal numbers separated
7577 by dots) or empty when the Additions are not installed. The
7578 Additions may also report a version but yet not be active as
7579 the version might be refused by VirtualBox (incompatible) or
7580 other failures occurred.
7581 </desc>
7582 </attribute>
7583
7584 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7585 <desc>
7586 Flag whether seamless guest display rendering (seamless desktop
7587 integration) is supported.
7588 </desc>
7589 </attribute>
7590
7591 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7592 <desc>
7593 Flag whether the guest is in graphics mode. If it is not, then
7594 seamless rendering will not work, resize hints are not immediately
7595 acted on and guest display resizes are probably not initiated by
7596 the guest additions.
7597 </desc>
7598 </attribute>
7599
7600 <attribute name="memoryBalloonSize" type="unsigned long">
7601 <desc>Guest system memory balloon size in megabytes.</desc>
7602 </attribute>
7603
7604 <attribute name="statisticsUpdateInterval" type="unsigned long">
7605 <desc>Interval to update guest statistics in seconds.</desc>
7606 </attribute>
7607
7608 <method name="setCredentials">
7609 <desc>
7610 Store login credentials that can be queried by guest operating
7611 systems with Additions installed. The credentials are transient
7612 to the session and the guest may also choose to erase them. Note
7613 that the caller cannot determine whether the guest operating system
7614 has queried or made use of the credentials.
7615
7616 <result name="VBOX_E_VM_ERROR">
7617 VMM device is not available.
7618 </result>
7619
7620 </desc>
7621 <param name="userName" type="wstring" dir="in">
7622 <desc>User name string, can be empty</desc>
7623 </param>
7624 <param name="password" type="wstring" dir="in">
7625 <desc>Password string, can be empty</desc>
7626 </param>
7627 <param name="domain" type="wstring" dir="in">
7628 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7629 </param>
7630 <param name="allowInteractiveLogon" type="boolean" dir="in">
7631 <desc>
7632 Flag whether the guest should alternatively allow the user to
7633 interactively specify different credentials. This flag might
7634 not be supported by all versions of the Additions.
7635 </desc>
7636 </param>
7637 </method>
7638
7639 <method name="getStatistic">
7640 <desc>
7641 Query specified guest statistics as reported by the VirtualBox Additions.
7642 </desc>
7643 <param name="cpuId" type="unsigned long" dir="in">
7644 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7645 </param>
7646 <param name="statistic" type="GuestStatisticType" dir="in">
7647 <desc>Statistic type.</desc>
7648 </param>
7649 <param name="statVal" type="unsigned long" dir="out">
7650 <desc>Statistics value</desc>
7651 </param>
7652 </method>
7653
7654 </interface>
7655
7656
7657 <!--
7658 // IProgress
7659 /////////////////////////////////////////////////////////////////////////
7660 -->
7661
7662 <interface
7663 name="IProgress" extends="$unknown"
7664 uuid="d3aa5417-6103-41fc-9e54-01ee1d08f42f"
7665 wsmap="managed"
7666 >
7667 <desc>
7668 The IProgress interface represents a task progress object that allows
7669 to wait for the completion of some asynchronous task.
7670
7671 The task consists of one or more operations that run sequentially,
7672 one by one. There is an individual percentage of completion of the
7673 current operation and the percentage of completion of the task as a
7674 whole. Similarly, you can wait for the completion of a particular
7675 operation or for the completion of the whole task.
7676
7677 Every operation is identified by a number (starting from 0)
7678 and has a separate description.
7679 </desc>
7680
7681 <attribute name="id" type="uuid" readonly="yes">
7682 <desc>ID of the task.</desc>
7683 </attribute>
7684
7685 <attribute name="description" type="wstring" readonly="yes">
7686 <desc>Description of the task.</desc>
7687 </attribute>
7688
7689 <attribute name="initiator" type="$unknown" readonly="yes">
7690 <desc>Initiator of the task.</desc>
7691 </attribute>
7692
7693 <attribute name="cancelable" type="boolean" readonly="yes">
7694 <desc>Whether the task can be interrupted.</desc>
7695 </attribute>
7696
7697 <attribute name="percent" type="long" readonly="yes">
7698 <desc>
7699 Current task progress value in percent.
7700 This value depends on how many operations are already complete.
7701 </desc>
7702 </attribute>
7703
7704 <attribute name="completed" type="boolean" readonly="yes">
7705 <desc>Whether the task has been completed.</desc>
7706 </attribute>
7707
7708 <attribute name="canceled" type="boolean" readonly="yes">
7709 <desc>Whether the task has been canceled.</desc>
7710 </attribute>
7711
7712 <attribute name="resultCode" type="result" readonly="yes">
7713 <desc>
7714 Result code of the progress task.
7715 Valid only if <link to="#completed"/> is true.
7716 </desc>
7717 </attribute>
7718
7719 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7720 <desc>
7721 Extended information about the unsuccessful result of the
7722 progress operation. May be NULL when no extended information
7723 is available.
7724 Valid only if <link to="#completed"/> is true and
7725 <link to="#resultCode"/> indicates a failure.
7726 </desc>
7727 </attribute>
7728
7729 <attribute name="operationCount" type="unsigned long" readonly="yes">
7730 <desc>
7731 Number of operations this task is divided into.
7732 Every task consists of at least one operation.
7733 </desc>
7734 </attribute>
7735
7736 <attribute name="operation" type="unsigned long" readonly="yes">
7737 <desc>Number of the operation being currently executed.</desc>
7738 </attribute>
7739
7740 <attribute name="operationDescription" type="wstring" readonly="yes">
7741 <desc>
7742 Description of the operation being currently executed.
7743 </desc>
7744 </attribute>
7745
7746 <attribute name="operationPercent" type="long" readonly="yes">
7747 <desc>Current operation progress value in percent.</desc>
7748 </attribute>
7749
7750 <method name="waitForCompletion">
7751 <desc>
7752 Waits until the task is done (including all operations) with a
7753 given timeout.
7754
7755 <result name="VBOX_E_IPRT_ERROR">
7756 Failed to wait for task completion.
7757 </result>
7758
7759 </desc>
7760 <param name="timeout" type="long" dir="in">
7761 <desc>
7762 Timeout value in milliseconds.
7763 Specify -1 for an indefinite wait.
7764 </desc>
7765 </param>
7766 </method>
7767
7768 <method name="waitForOperationCompletion">
7769 <desc>
7770 Waits until the given operation is done with a given timeout.
7771
7772 <result name="VBOX_E_IPRT_ERROR">
7773 Failed to wait for operation completion.
7774 </result>
7775
7776 </desc>
7777 <param name="operation" type="unsigned long" dir="in">
7778 <desc>
7779 Number of the operation to wait for.
7780 Must be less than <link to="#operationCount"/>.
7781 </desc>
7782 </param>
7783 <param name="timeout" type="long" dir="in">
7784 <desc>
7785 Timeout value in milliseconds.
7786 Specify -1 for an indefinite wait.
7787 </desc>
7788 </param>
7789 </method>
7790
7791 <method name="cancel">
7792 <desc>
7793 Cancels the task.
7794 <note>
7795 If <link to="#cancelable"/> is <tt>false</tt>, then
7796 this method will fail.
7797 </note>
7798
7799 <result name="VBOX_E_INVALID_OBJECT_STATE">
7800 Operation cannot be canceled.
7801 </result>
7802
7803 </desc>
7804 </method>
7805
7806 </interface>
7807
7808
7809 <!--
7810 // ISnapshot
7811 /////////////////////////////////////////////////////////////////////////
7812 -->
7813
7814 <interface
7815 name="ISnapshot" extends="$unknown"
7816 uuid="5db6b1d9-c76b-4424-a6f4-8257f642d6ea"
7817 wsmap="managed"
7818 >
7819 <desc>
7820 The ISnapshot interface represents a snapshot of the virtual
7821 machine.
7822
7823 The <i>snapshot</i> stores all the information about a virtual
7824 machine necessary to bring it to exactly the same state as it was at
7825 the time of taking the snapshot. The snapshot includes:
7826
7827 <ul>
7828 <li>all settings of the virtual machine (i.e. its hardware
7829 configuration: RAM size, attached hard disks, etc.)
7830 </li>
7831 <li>the execution state of the virtual machine (memory contents,
7832 CPU state, etc.).
7833 </li>
7834 </ul>
7835
7836 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7837 or <i>online</i> (taken when the VM is running). The execution
7838 state of the offline snapshot is called a <i>zero execution state</i>
7839 (it doesn't actually contain any information about memory contents
7840 or the CPU state, assuming that all hardware is just powered off).
7841
7842 <h3>Snapshot branches</h3>
7843
7844 Snapshots can be chained. Chained snapshots form a branch where
7845 every next snapshot is based on the previous one. This chaining is
7846 mostly related to hard disk branching (see <link to="IHardDisk"/>
7847 description). This means that every time a new snapshot is created,
7848 a new differencing hard disk is implicitly created for all normal
7849 hard disks attached to the given virtual machine. This allows to
7850 fully restore hard disk contents when the machine is later reverted
7851 to a particular snapshot.
7852
7853 In the current implementation, multiple snapshot branches within one
7854 virtual machine are not allowed. Every machine has a single branch,
7855 and <link to="IConsole::takeSnapshot"/> operation adds a new
7856 snapshot to the top of that branch.
7857
7858 Existing snapshots can be discarded using
7859 <link to="IConsole::discardSnapshot"/>.
7860
7861 <h3>Current snapshot</h3>
7862
7863 Every virtual machine has a current snapshot, identified by
7864 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
7865 a base for the <i>current machine state</i> (see below), to the effect
7866 that all normal hard disks of the machine and its execution
7867 state are based on this snapshot.
7868
7869 In the current implementation, the current snapshot is always the
7870 last taken snapshot (i.e. the head snapshot on the branch) and it
7871 cannot be changed.
7872
7873 The current snapshot is <tt>null</tt> if the machine doesn't have
7874 snapshots at all; in this case the current machine state is just
7875 current settings of this machine plus its current execution state.
7876
7877 <h3>Current machine state</h3>
7878
7879 The current machine state is what represented by IMachine instances got
7880 directly from IVirtualBox
7881 using <link
7882 to="IVirtualBox::getMachine">getMachine()</link>, <link
7883 to="IVirtualBox::findMachine">findMachine()</link>, etc. (as opposed
7884 to instances returned by <link to="ISnapshot::machine"/>). This state
7885 is always used when the machine is <link to="IConsole::powerUp"> powered
7886 on</link>.
7887
7888 The current machine state also includes the current execution state.
7889 If the machine is being currently executed
7890 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
7891 and above), its execution state is just what's happening now.
7892 If it is powered off (<link to="MachineState_PoweredOff"/> or
7893 <link to="MachineState_Aborted"/>), it has a zero execution state.
7894 If the machine is saved (<link to="MachineState_Saved"/>), its
7895 execution state is what saved in the execution state file
7896 (<link to="IMachine::stateFilePath"/>).
7897
7898 If the machine is in the saved state, then, next time it is powered
7899 on, its execution state will be fully restored from the saved state
7900 file and the execution will continue from the point where the state
7901 was saved.
7902
7903 Similarly to snapshots, the current machine state can be discarded
7904 using <link to="IConsole::discardCurrentState"/>.
7905
7906 <h3>Taking and discarding snapshots</h3>
7907
7908 The table below briefly explains the meaning of every snapshot
7909 operation:
7910
7911 <table>
7912 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7913
7914 <tr><td><link to="IConsole::takeSnapshot"/></td>
7915
7916 <td>Save the current state of the virtual machine, including all
7917 settings, contents of normal hard disks and the current modifications
7918 to immutable hard disks (for online snapshots)</td>
7919
7920 <td>The current state is not changed (the machine will continue
7921 execution if it is being executed when the snapshot is
7922 taken)</td></tr>
7923
7924 <tr><td><link to="IConsole::discardSnapshot"/></td>
7925
7926 <td>Forget the state of the virtual machine stored in the snapshot:
7927 dismiss all saved settings and delete the saved execution state (for
7928 online snapshots)</td>
7929
7930 <td>Other snapshots (including child snapshots, if any) and the
7931 current state are not directly affected</td></tr>
7932
7933 <tr><td><link to="IConsole::discardCurrentState"/></td>
7934
7935 <td>Restore the current state of the virtual machine from the state
7936 stored in the current snapshot, including all settings and hard disk
7937 contents</td>
7938
7939 <td>The current state of the machine existed prior to this operation
7940 is lost</td></tr>
7941
7942 <tr><td><link to="IConsole::discardCurrentSnapshotAndState"/></td>
7943
7944 <td>Completely revert the virtual machine to the state it was in
7945 before the current snapshot has been taken</td>
7946
7947 <td>The current state, as well as the current snapshot, are
7948 lost</td></tr>
7949
7950 </table>
7951
7952 </desc>
7953
7954 <attribute name="id" type="uuid" readonly="yes">
7955 <desc>UUID of the snapshot.</desc>
7956 </attribute>
7957
7958 <attribute name="name" type="wstring">
7959 <desc>Short name of the snapshot.</desc>
7960 </attribute>
7961
7962 <attribute name="description" type="wstring">
7963 <desc>Optional description of the snapshot.</desc>
7964 </attribute>
7965
7966 <attribute name="timeStamp" type="long long" readonly="yes">
7967 <desc>
7968 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7969 </desc>
7970 </attribute>
7971
7972 <attribute name="online" type="boolean" readonly="yes">
7973 <desc>
7974 <tt>true</tt> if this snapshot is an online snapshot and
7975 <tt>false</tt> otherwise.
7976
7977 <note>
7978 When this attribute is <tt>true</tt>, the
7979 <link to="IMachine::stateFilePath"/> attribute of the
7980 <link to="#machine"/> object associated with this snapshot
7981 will point to the saved state file. Otherwise, it will be
7982 <tt>null</tt>.
7983 </note>
7984 </desc>
7985 </attribute>
7986
7987 <attribute name="machine" type="IMachine" readonly="yes">
7988 <desc>
7989 Virtual machine this snapshot is taken on. This object
7990 stores all settings the machine had when taking this snapshot.
7991 <note>
7992 The returned machine object is immutable, i.e. no
7993 any settings can be changed.
7994 </note>
7995 </desc>
7996 </attribute>
7997
7998 <attribute name="parent" type="ISnapshot" readonly="yes">
7999 <desc>
8000 Parent snapshot (a snapshot this one is based on).
8001 <note>
8002 It's not an error to read this attribute on a snapshot
8003 that doesn't have a parent -- a null object will be
8004 returned to indicate this.
8005 </note>
8006 </desc>
8007 </attribute>
8008
8009 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8010 <desc>
8011 Child snapshots (all snapshots having this one as a parent).
8012 <note>
8013 In the current implementation, there can be only one
8014 child snapshot, or no children at all, meaning this is the
8015 last (head) snapshot.
8016 </note>
8017 </desc>
8018 </attribute>
8019
8020 </interface>
8021
8022
8023 <!--
8024 // IMedia
8025 /////////////////////////////////////////////////////////////////////////
8026 -->
8027
8028 <enum
8029 name="MediaState"
8030 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8031 >
8032 <desc>
8033 Virtual media state.
8034 <see>IMedia</see>
8035 </desc>
8036
8037 <const name="NotCreated" value="0">
8038 <desc>
8039 Associated media storage does not exist (either was not created yet or
8040 was deleted).
8041 </desc>
8042 </const>
8043 <const name="Created" value="1">
8044 <desc>
8045 Associated storage exists and accessible.
8046 </desc>
8047 </const>
8048 <const name="LockedRead" value="2">
8049 <desc>
8050 Media is locked for reading, no data modification is possible.
8051 </desc>
8052 </const>
8053 <const name="LockedWrite" value="3">
8054 <desc>
8055 Media is locked for writing, no concurrent data reading or modification
8056 is possible.
8057 </desc>
8058 </const>
8059 <const name="Inaccessible" value="4">
8060 <desc>
8061 Associated media storage is not accessible.
8062 </desc>
8063 </const>
8064 <const name="Creating" value="5">
8065 <desc>
8066 Associated media storage is being created.
8067 </desc>
8068 </const>
8069 <const name="Deleting" value="6">
8070 <desc>
8071 Associated media storage is being deleted.
8072 </desc>
8073 </const>
8074 </enum>
8075
8076 <interface
8077 name="IMedium" extends="$unknown"
8078 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
8079 wsmap="managed"
8080 >
8081 <desc>
8082 The IMedium interface is a common interface for all objects representing
8083 virtual media such as hard disks, DVD images.
8084
8085 Each medium is associated with a storage unit (such as a file on the host
8086 computer or a network resource) that holds actual data. The location of
8087 the storage unit is represented by the #location attribute. The value of
8088 this attribute is media type dependent.
8089
8090 The exact media type may be determined by querying the appropriate
8091 interface such as:
8092 <ul>
8093 <li>IHardDisk (virtual hard disks)</li>
8094 <li>IDVDImage (standard CD/DVD ISO image files)</li>
8095 <li>IFloppyImage (raw floppy image files)</li>
8096 </ul>
8097
8098 Existing media are opened using the following methods, depending on the
8099 media type:
8100 <ul>
8101 <li><link to="IVirtualBox::openHardDisk"/></li>
8102 <li><link to="IVirtualBox::openDVDImage"/></li>
8103 <li><link to="IVirtualBox::openFloppyImage"/></li>
8104 </ul>
8105
8106 New hard disk media are created using the
8107 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8108 images are created outside VirtualBox, usually by storing a copy
8109 of the real medium of the corresponding type in a regular file.
8110
8111 <h3>Known Media</h3>
8112
8113 When an existing medium gets opened for the first time, it gets
8114 automatically remembered by the given VirtualBox installation or, in other
8115 words, becomes a <i>known medium</i>. Known media are stored in the media
8116 registry transparently maintained by VirtualBox and stored in settings
8117 files so that this registry is preserved when VirtualBox is not running.
8118
8119 Newly created virtual hard disks get remembered only when the associated
8120 storage unit is actually created (see IHardDisk for more details).
8121
8122 All known media can be enumerated using
8123 <link to="IVirtualBox::hardDisks"/>,
8124 <link to="IVirtualBox::DVDImages"/> and
8125 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8126 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8127 and similar methods or by location using
8128 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8129
8130 Only known media can be attached to virtual machines.
8131
8132 Removing known media from the media registry is performed when the given
8133 medium is closed using the <link to="#close"/> method or when its
8134 associated storage unit is deleted (only for hard disks).
8135
8136 <h3>Accessibility Checks</h3>
8137
8138 The given medium (with the created storage unit) is considered to be
8139 <i>accessible</i> when its storage unit can be successfully read from.
8140 Accessible media are indicated by the <link to="MediaState_Created"/>
8141 value of the <link to="#state"/> attribute. When the storage unit cannot
8142 be read (for example, because it is located on a disconnected network
8143 resource, or was accidentally deleted outside VirtualBox), the medium is
8144 considered to be <i>inaccessible</i> which is indicated by the
8145 <link to="MediaState_Inaccessible"/> state. The details about the reason
8146 of being inaccessible can be obtained using the
8147 <link to="#lastAccessError"/> attribute.
8148
8149 A new accessibility check is performed each time the <link to="#state"/>
8150 attribute is read. Please note that this check may take long time (several
8151 seconds or even minutes, depending on the storage unit location and
8152 format), and will block the calling thread until finished. For this
8153 reason, it is recommended to never read this attribute on the main UI
8154 thread to avoid making the UI unresponsive.
8155
8156 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8157 created for the first time), all known media are in the
8158 <link to="MediaState_Inaccessible"/> state but the value of the <link
8159 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
8160 accessibility check is made on startup. This is done to make the
8161 VirtualBox object ready for serving requests as
8162 fast as possible and let the end-user application decide if it needs to
8163 check media accessibility right away or not.
8164 </desc>
8165
8166 <attribute name="id" type="uuid" readonly="yes">
8167 <desc>
8168 UUID of the medium. For a newly created medium, this value is a randomly
8169 generated UUID.
8170
8171 <note>
8172 For media in one of MediaState_NotCreated, MediaState_Creating or
8173 MediaState_Deleting states, the value of this property is undefined
8174 and will most likely be an empty UUID.
8175 </note>
8176 </desc>
8177 </attribute>
8178
8179 <attribute name="description" type="wstring">
8180 <desc>
8181 Optional description of the medium. For newly created media, the value
8182 of this attribute value is <tt>null</tt>.
8183
8184 Media types that don't support this attribute will return E_NOTIMPL in
8185 attempt to get or set this attribute's value.
8186
8187 <note>
8188 For some storage types, reading this attribute may return an outdated
8189 (last known) value when <link to="#state"/> is <link
8190 to="MediaState_Inaccessible"/> or <link
8191 to="MediaState_LockedWrite"/> because the value of this attribute is
8192 stored within the storage unit itself. Also note that changing the
8193 attribute value is not possible in such case, as well as when the
8194 medium is the <link to="MediaState_LockedRead"/> state.
8195 </note>
8196 </desc>
8197 </attribute>
8198
8199 <attribute name="state" type="MediaState" readonly="yes">
8200 <desc>
8201 Current media state. Inspect <link to="MediaState"/> values for details.
8202
8203 Reading this attribute may take long time because a new accessibility
8204 check of the storage unit is performed every time the attribute is read.
8205 This check may cause a significant delay if the storage unit of the
8206 given medium is, for example, a file located on a network share which is
8207 not currently accessible due to connectivity problems -- the call will
8208 not return until a timeout interval defined by the host OS for this
8209 operation expires.
8210
8211 If the last known state of the medium is <link to="MediaState_Created"/>
8212 and the accessibility check fails then the state would be set to
8213 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8214 may be used to get more details about the failure. If the state of the
8215 medium is <link to="MediaState_LockedRead"/> or
8216 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8217 non-null value of <link to="#lastAccessError"/> will indicate a failed
8218 accessibility check in this case.
8219
8220 Note that not all media states are applicable to certain media types.
8221 For example, states <link to="MediaState_NotCreated"/>,
8222 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8223 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8224 IFloppyImage media.
8225 </desc>
8226 </attribute>
8227
8228 <attribute name="location" type="wstring">
8229 <desc>
8230 Location of the storage unit holding media data.
8231
8232 The format of the location string is media type specific. For media
8233 types that use regular files in a host's file system, the location
8234 string is just a full file name.
8235
8236 Some media types may support changing the storage unit location by
8237 simply changing the value of this property. If this operation is not
8238 supported, the implementation will return E_NOTIMPL in attempt to set
8239 this attribute's value.
8240
8241 When setting a value of the location attribute which is a regular file
8242 in the host's file system, the given file name may be either relative to
8243 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8244 absolute. Note that if the given location specification does not contain
8245 the file extension part then a proper default extension will be
8246 automatically appended by the implementation depending on the media type.
8247 </desc>
8248 </attribute>
8249
8250 <attribute name="name" type="wstring" readonly="yes">
8251 <desc>
8252 Name of the storage unit holding media data.
8253
8254 The returned string is a short version of the <link to="#location"/>
8255 attribute that is suitable for representing the medium in situations
8256 where the full location specification is too long (such as lists
8257 and comboboxes in GUI frontends). This string is also used by frontends
8258 to sort the media list alphabetically when needed.
8259
8260 For example, for locations that are regular files in the host's file
8261 system, the value of this attribute is just a file name (+ extension),
8262 without the path specification.
8263
8264 Note that as opposed to the <link to="#location"/> attribute, the name
8265 attribute will not necessary be unique for a list of media of the
8266 given type and format.
8267 </desc>
8268 </attribute>
8269
8270 <attribute name="size" type="unsigned long long" readonly="yes">
8271 <desc>
8272 Physical size of the storage unit used to hold media data (in bytes).
8273
8274 <note>
8275 For media whose <link to="#state"/> is <link
8276 to="MediaState_Inaccessible"/>, the value of this property is the
8277 last known size. For <link to="MediaState_NotCreated"/> media,
8278 the returned value is zero.
8279 </note>
8280 </desc>
8281 </attribute>
8282
8283 <attribute name="lastAccessError" type="wstring" readonly="yes">
8284 <desc>
8285 Text message that represents the result of the last accessibility
8286 check.
8287
8288 Accessibility checks are performed each time the <link to="#state"/>
8289 attribute is read. A @c null string is returned if the last
8290 accessibility check was successful. A non-null string indicates a
8291 failure and should normally describe a reason of the failure (for
8292 example, a file read error).
8293 </desc>
8294 </attribute>
8295
8296 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
8297 <desc>
8298 Array of UUIDs of all machines this medium is attached to.
8299
8300 A <tt>null</tt> array is returned if this medium is not attached to any
8301 machine or to any machine's snapshot.
8302
8303 <note>
8304 The returned array will include a machine even if this medium is not
8305 attached to that machine in the current state but attached to it in
8306 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8307 details.
8308 </note>
8309 </desc>
8310 </attribute>
8311
8312 <method name="getSnapshotIds">
8313 <desc>
8314 Returns an array of UUIDs of all snapshots of the given machine where
8315 this medium is attached to it.
8316
8317 If the medium is attached to the machine in the current state, then the
8318 first element in the array will always be the ID of the queried machine
8319 (i.e. the value equal to the @c machineId argument), followed by
8320 snapshot IDs (if any).
8321
8322 If the medium is not attached to the machine in the current state, then
8323 the array will contain only snapshot IDs.
8324
8325 The returned array may be <tt>null</tt> if this medium is not attached
8326 to the given machine at all, neither in the current state nor in one of
8327 snapshots.
8328 </desc>
8329 <param name="machineId" type="uuid" dir="in">
8330 <desc>
8331 UUID of the machine to query.
8332 </desc>
8333 </param>
8334 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
8335 <desc>
8336 Array of snapshot UUIDs of the given machine using this medium.
8337 </desc>
8338 </param>
8339 </method>
8340
8341 <method name="lockRead">
8342 <desc>
8343 Locks this medium for reading.
8344
8345 The read lock is shared: many clients can simultaneously lock the
8346 same media for reading unless it is already locked for writing (see
8347 <link to="#lockWrite"/>) in which case an error is returned.
8348
8349 When the medium is locked for reading, it cannot be modified
8350 from within VirtualBox. This means that any method that changes
8351 the properties of this medium or contents of the storage unit
8352 will return an error (unless explicitly stated otherwise) and
8353 that an attempt to start a virtual machine that wants to modify
8354 the medium will also fail.
8355
8356 When the virtual machine is started up, it locks for reading all
8357 media it uses in read-only mode. If some media cannot be locked
8358 for reading, the startup procedure will fail.
8359
8360 The medium locked for reading must be unlocked using the <link
8361 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8362 can be nested and must be followed by the same number of paired
8363 <link to="#unlockRead"/> calls.
8364
8365 This method sets the media state to <link
8366 to="MediaState_LockedRead"/> on success. The state prior to
8367 this call must be <link to="MediaState_Created"/>, <link
8368 to="MediaState_Inaccessible"/> or <link
8369 to="MediaState_LockedRead"/>. As you can see, inaccessible
8370 media can be locked too. This is not an error; this method
8371 performs a logical lock that prevents modifications of this
8372 media through the VirtualBox API, not a physical lock of the
8373 underlying storage unit.
8374
8375 This method returns the current state of the medium
8376 <b>before</b> the operation.
8377
8378 <result name="VBOX_E_INVALID_OBJECT_STATE">
8379 Invalid media state (e.g. not created, locked, inaccessible,
8380 creating, deleting).
8381 </result>
8382
8383 </desc>
8384 <param name="state" type="MediaState" dir="return">
8385 <desc>
8386 State of the medium after the operation.
8387 </desc>
8388 </param>
8389 </method>
8390
8391 <method name="unlockRead">
8392 <desc>
8393 Cancels the read lock previously set by <link to="#lockRead"/>.
8394
8395 Either on success or on failure, this method returns the current state
8396 of the medium <b>after</b> the operation.
8397
8398 See <link to="#lockRead"/> for more details.
8399
8400 <result name="VBOX_E_INVALID_OBJECT_STATE">
8401 Medium not locked for reading.
8402 </result>
8403
8404 </desc>
8405 <param name="state" type="MediaState" dir="return">
8406 <desc>
8407 State of the medium after the operation.
8408 </desc>
8409 </param>
8410 </method>
8411
8412 <method name="lockWrite">
8413 <desc>
8414 Locks this medium for writing.
8415
8416 The write lock, as opposed to <link to="#lockRead"/>, is
8417 exclusive: there may be only one client that holds a write lock
8418 and there may be no read locks while the write lock is held.
8419
8420 When the medium is locked for writing, it cannot be modified
8421 from within VirtualBox and it is not guaranteed that the values
8422 of its properties are up-to-date. Any method that changes the
8423 properties of this medium or contents of the storage unit will
8424 return an error ((unless explicitly stated otherwise) and an
8425 attempt to start a virtual machine that wants to modify or to
8426 read the medium will also fail.
8427
8428 When the virtual machine is started up, it locks for writing all
8429 media it uses to write data to. If some media cannot be locked
8430 for writing, the startup procedure will fail.
8431
8432 The medium locked for writing must be unlocked using the <link
8433 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8434 can <b>not</b> be nested and must be followed by a paired <link
8435 to="#unlockWrite"/> call.
8436
8437 This method sets the media state to <link
8438 to="MediaState_LockedWrite"/> on success. The state prior to
8439 this call must be <link to="MediaState_Created"/> or <link
8440 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8441 media can be locked too. This is not an error; this method
8442 performs a logical lock that prevents modifications of this
8443 media through the VirtualBox API, not a physical lock of the
8444 underlying storage unit.
8445
8446 Either on success or on failure, this method returns the current
8447 state of the medium <b>before</b> the operation.
8448
8449 <result name="VBOX_E_INVALID_OBJECT_STATE">
8450 Invalid media state (e.g. not created, locked, inaccessible,
8451 creating, deleting).
8452 </result>
8453
8454 </desc>
8455 <param name="state" type="MediaState" dir="return">
8456 <desc>
8457 State of the medium after the operation.
8458 </desc>
8459 </param>
8460 </method>
8461
8462 <method name="unlockWrite">
8463 <desc>
8464 Cancels the write lock previously set by <link to="#lockWrite"/>.
8465
8466 Either on success or on failure, this method returns the current
8467 state of the medium <b>after</b> the operation.
8468
8469 See <link to="#lockWrite"/> for more details.
8470
8471 <result name="VBOX_E_INVALID_OBJECT_STATE">
8472 Medium not locked for writing.
8473 </result>
8474
8475 </desc>
8476 <param name="state" type="MediaState" dir="return">
8477 <desc>
8478 State of the medium after the operation.
8479 </desc>
8480 </param>
8481 </method>
8482
8483 <method name="close">
8484 <desc>
8485 Closes this medium.
8486
8487 The hard disk must not be attached to any known virtual machine
8488 and must not have any known child hard disks, otherwise the
8489 operation will fail.
8490
8491 When the hard disk is successfully closed, it gets removed from
8492 the list of remembered hard disks, but its storage unit is not
8493 deleted. In particular, this means that this hard disk can be
8494 later opened again using the <link
8495 to="IVirtualBox::openHardDisk"/> call.
8496
8497 Note that after this method successfully returns, the given hard
8498 disk object becomes uninitialized. This means that any attempt
8499 to call any of its methods or attributes will fail with the
8500 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8501
8502 <result name="VBOX_E_INVALID_OBJECT_STATE">
8503 Invalid media state (other than not created, created or
8504 inaccessible).
8505 </result>
8506 <result name="VBOX_E_OBJECT_IN_USE">
8507 Medium attached to virtual machine.
8508 </result>
8509 <result name="VBOX_E_FILE_ERROR">
8510 Settings file not accessible.
8511 </result>
8512 <result name="VBOX_E_XML_ERROR">
8513 Could not parse the settings file.
8514 </result>
8515
8516 </desc>
8517 </method>
8518
8519 </interface>
8520
8521
8522 <!--
8523 // IHardDisk
8524 /////////////////////////////////////////////////////////////////////////
8525 -->
8526
8527 <enum
8528 name="HardDiskType"
8529 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8530 >
8531 <desc>
8532 Virtual hard disk type.
8533 <see>IHardDisk</see>
8534 </desc>
8535
8536 <const name="Normal" value="0">
8537 <desc>
8538 Normal hard disk (attached directly or indirectly, preserved
8539 when taking snapshots).
8540 </desc>
8541 </const>
8542 <const name="Immutable" value="1">
8543 <desc>
8544 Immutable hard disk (attached indirectly, changes are wiped out
8545 after powering off the virtual machine).
8546 </desc>
8547 </const>
8548 <const name="Writethrough" value="2">
8549 <desc>
8550 Write through hard disk (attached directly, ignored when
8551 taking snapshots).
8552 </desc>
8553 </const>
8554 </enum>
8555
8556 <enum
8557 name="HardDiskVariant"
8558 uuid="3bc36e8c-bf7a-4dba-b6cb-df87cdc9cc19"
8559 >
8560 <desc>
8561 Virtual hard disk image variant. More than one flag may be set.
8562 <see>IHardDisk</see>
8563 </desc>
8564
8565 <const name="Standard" value="0">
8566 <desc>
8567 No particular variant requested, results in using the backend default.
8568 </desc>
8569 </const>
8570 <const name="VmdkSplit2G" value="0x01">
8571 <desc>
8572 VMDK image split in chunks of less than 2GByte.
8573 </desc>
8574 </const>
8575 <const name="VmdkStreamOptimized" value="0x04">
8576 <desc>
8577 VMDK streamOptimized image. Special import/export format which is
8578 read-only/append-only.
8579 </desc>
8580 </const>
8581 </enum>
8582
8583 <interface
8584 name="IHardDiskAttachment" extends="$unknown"
8585 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8586 wsmap="struct"
8587 >
8588 <desc>
8589 The IHardDiskAttachment interface represents a hard disk attachment of a
8590 virtual machine.
8591
8592 Every hard disk attachment specifies a slot of the virtual hard disk
8593 controller and a virtual hard disk attached to this slot.
8594
8595 The array of hard disk attachments is returned by
8596 <link to="IMachine::hardDiskAttachments"/>.
8597 </desc>
8598 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8599 <desc>Hard disk object associated with this attachment.</desc>
8600 </attribute>
8601
8602 <attribute name="controller" type="wstring" readonly="yes">
8603 <desc>Interface bus of this attachment.</desc>
8604 </attribute>
8605
8606 <attribute name="port" type="long" readonly="yes">
8607 <desc>Port number of this attachment.</desc>
8608 </attribute>
8609
8610 <attribute name="device" type="long" readonly="yes">
8611 <desc>Device slot number of this attachment.</desc>
8612 </attribute>
8613
8614 </interface>
8615
8616 <interface
8617 name="IHardDisk" extends="IMedium"
8618 uuid="a4d391a5-e2b1-474d-824e-2ff668a92d58"
8619 wsmap="managed"
8620 >
8621 <desc>
8622 The IHardDisk interface represents a virtual hard disk drive
8623 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8624
8625 Virtual hard disk objects virtualize the hard disk hardware and look like
8626 regular hard disks for the guest OS running inside the virtual machine.
8627
8628 <h3>Hard Disk Types</h3>
8629
8630 There are three types of hard disks:
8631 <link to="HardDiskType_Normal">Normal</link>,
8632 <link to="HardDiskType_Immutable">Immutable</link> and
8633 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8634 hard disk defines how the hard disk is attached to a virtual machine and
8635 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8636 machine with the attached hard disk is taken. The type of the hard disk is
8637 defined by the <link to="#type"/> attribute.
8638
8639 All hard disks can be also divided in two big groups: <i>base</i> hard
8640 disks and <i>differencing</i> hard disks. A base hard disk contains all
8641 sectors of the hard disk data in its storage unit and therefore can be
8642 used independently. On the contrary, a differencing hard disk contains
8643 only some part of the hard disk data (a subset of sectors) and needs
8644 another hard disk to get access to the missing sectors of data. This
8645 another hard disk is called a <i>parent</i> hard disk and defines a hard
8646 disk to which this differencing hard disk is known to be <i>linked to</i>.
8647 The parent hard disk may be itself a differencing hard disk. This
8648 way, differencing hard disks form a linked hard disk chain. This chain
8649 always ends with the base hard disk which is sometimes referred to as the
8650 root hard disk of this chain. Note that several differencing hard disks
8651 may be linked to the same parent hard disk. This way, all known hard disks
8652 form a hard disk tree which is based on their parent-child relationship.
8653
8654 Differencing hard disks can be distinguished from base hard disks by
8655 querying the <link to="#parent"/> attribute: base hard disks do not have
8656 parents they would depend on, so the value of this attribute is always
8657 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8658 the hard disk tree (from the child hard disk to its parent). It is also
8659 possible to walk down the tree using the <link to="#children"/>
8660 attribute.
8661
8662 Note that the type of all differencing hard disks is
8663 <link to="HardDiskType_Normal">Normal</link>; all other values are
8664 meaningless for them. Base hard disks may be of any type.
8665
8666 <h3>Creating Hard Disks</h3>
8667
8668 New base hard disks are created using
8669 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8670 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8671 disks are usually implicitly created by VirtualBox when needed but may
8672 also be created explicitly using <link to="#createDiffStorage"/>.
8673
8674 After the hard disk is successfully created (including the storage unit)
8675 or opened, it becomes a known hard disk (remembered in the internal media
8676 registry). Known hard disks can be attached to a virtual machine, accessed
8677 through <link to="IVirtualBox::getHardDisk"/> and
8678 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8679 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8680
8681 The following methods, besides <link to="IMedium::close"/>,
8682 automatically remove the hard disk from the media registry:
8683 <ul>
8684 <li><link to="#deleteStorage"/></li>
8685 <li><link to="#mergeTo"/></li>
8686 </ul>
8687
8688 If the storage unit of the hard disk is a regular file in the host's
8689 file system then the rules stated in the description of the
8690 <link to="IMedium::location"/> attribute apply when setting its value. In
8691 addition, a plain file name without any path may be given, in which case
8692 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8693 folder</link> will be prepended to it.
8694
8695 <h4>Automatic composition of the file name part</h4>
8696
8697 Another extension to the <link to="IMedium::location"/> attribute is that
8698 there is a possibility to cause VirtualBox to compose a unique value for
8699 the file name part of the location using the UUID of the hard disk. This
8700 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8701 e.g. before the storage unit is created, and works as follows. You set the
8702 value of the <link to="IMedium::location"/> attribute to a location
8703 specification which only contains the path specification but not the file
8704 name part and ends with either a forward slash or a backslash character.
8705 In response, VirtualBox will generate a new UUID for the hard disk and
8706 compose the file name using the following pattern:
8707 <pre>
8708 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8709 </pre>
8710 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8711 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8712 is the default extension for the storage format of this hard disk. After
8713 that, you may call any of the methods that create a new hard disk storage
8714 unit and they will use the generated UUID and file name.
8715
8716 <h3>Attaching Hard Disks</h3>
8717
8718 Hard disks are attached to virtual machines using the
8719 <link to="IMachine::attachHardDisk"/> method and detached using the
8720 <link to="IMachine::detachHardDisk"/> method. Depending on their
8721 <link to="#type"/>, hard disks are attached either
8722 <i>directly</i> or <i>indirectly</i>.
8723
8724 When a hard disk is being attached directly, it is associated with the
8725 virtual machine and used for hard disk operations when the machine is
8726 running. When a hard disk is being attached indirectly, a new differencing
8727 hard disk linked to it is implicitly created and this differencing hard
8728 disk is associated with the machine and used for hard disk operations.
8729 This also means that if <link to="IMachine::attachHardDisk"/> performs
8730 a direct attachment then the same hard disk will be returned in response
8731 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8732 an indirect attachment is performed then
8733 <link to="IMachine::getHardDisk"/> will return the implicitly created
8734 differencing hard disk, not the original one passed to <link
8735 to="IMachine::attachHardDisk"/>. The following table shows the
8736 dependency of the attachment type on the hard disk type:
8737
8738 <table>
8739 <tr>
8740 <th>Hard Disk Type</th>
8741 <th>Direct or Indirect?</th>
8742 </tr>
8743 <tr>
8744 <td>Normal (Base)</td>
8745 <td>
8746 Normal base hard disks that do not have children (i.e. differencing
8747 hard disks linked to them) and that are not already attached to
8748 virtual machines in snapshots are attached <b>directly</b>.
8749 Otherwise, they are attached <b>indirectly</b> because having
8750 dependent children or being part of the snapshot makes it impossible
8751 to modify hard disk contents without breaking the integrity of the
8752 dependent party. The <link to="#readOnly"/> attribute allows to
8753 quickly determine the kind of the attachment for the given hard
8754 disk. Note that if a normal base hard disk is to be indirectly
8755 attached to a virtual machine with snapshots then a special
8756 procedure called <i>smart attachment</i> is performed (see below).
8757 </td>
8758 </tr>
8759 <tr>
8760 <td>Normal (Differencing)</td>
8761 <td>
8762 Differencing hard disks are like normal base hard disks: attached
8763 <b>directly</b> if they do not have children and are not attached to
8764 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8765 that the smart attachment procedure is never performed for
8766 differencing hard disks.
8767 </td>
8768 </tr>
8769 <tr>
8770 <td>Immutable</td>
8771 <td>
8772 Immutable hard disks are always attached <b>indirectly</b> because
8773 they are designed to be non-writable. If an immutable hard disk is
8774 attached to a virtual machine with snapshots then a special
8775 procedure called smart attachment is performed (see below).
8776 </td>
8777 </tr>
8778 <tr>
8779 <td>Writethrough</td>
8780 <td>
8781 Writethrough hard disks are always attached <b>directly</b>, also as
8782 designed. This also means that writethrough hard disks cannot have
8783 other hard disks linked to them at all.
8784 </td>
8785 </tr>
8786 </table>
8787
8788 Note that the same hard disk, regardless of its type, may be attached to
8789 more than one virtual machine at a time. In this case, the machine that is
8790 started first gains exclusive access to the hard disk and attempts to
8791 start other machines having this hard disk attached will fail until the
8792 first machine is powered down.
8793
8794 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8795 that the given hard disk remains associated with the given machine after a
8796 successful <link to="IMachine::detachHardDisk"/> call until
8797 <link to="IMachine::saveSettings"/> is called to save all changes to
8798 machine settings to disk. This deferring is necessary to guarantee that
8799 the hard disk configuration may be restored at any time by a call to
8800 <link to="IMachine::discardSettings"/> before the settings
8801 are saved (committed).
8802
8803 Note that if <link to="IMachine::discardSettings"/> is called after
8804 indirectly attaching some hard disks to the machine but before a call to
8805 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8806 all differencing hard disks implicitly created by
8807 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
8808 Such implicitly created hard disks will also be immediately deleted when
8809 detached explicitly using the <link to="IMachine::detachHardDisk"/>
8810 call if it is made before <link to="IMachine::saveSettings"/>. This
8811 implicit deletion is safe because newly created differencing hard
8812 disks do not contain any user data.
8813
8814 However, keep in mind that detaching differencing hard disks that were
8815 implicitly created by <link to="IMachine::attachHardDisk"/>
8816 before the last <link to="IMachine::saveSettings"/> call will
8817 <b>not</b> implicitly delete them as they may already contain some data
8818 (for example, as a result of virtual machine execution). If these hard
8819 disks are no more necessary, the caller can always delete them explicitly
8820 using <link to="#deleteStorage"/> after they are actually de-associated
8821 from this machine by the <link to="IMachine::saveSettings"/> call.
8822
8823 <h3>Smart Attachment</h3>
8824
8825 When normal base or immutable hard disks are indirectly attached to a
8826 virtual machine then some additional steps are performed to make sure the
8827 virtual machine will have the most recent "view" of the hard disk being
8828 attached. These steps include walking through the machine's snapshots
8829 starting from the current one and going through ancestors up to the first
8830 snapshot. Hard disks attached to the virtual machine in all
8831 of the encountered snapshots are checked whether they are descendants of
8832 the given normal base or immutable hard disk. The first found child (which
8833 is the differencing hard disk) will be used instead of the normal base or
8834 immutable hard disk as a parent for creating a new differencing hard disk
8835 that will be actually attached to the machine. And only if no descendants
8836 are found or if the virtual machine does not have any snapshots then the
8837 normal base or immutable hard disk will be used itself as a parent for
8838 this differencing hard disk.
8839
8840 It is easier to explain what smart attachment does using the
8841 following example:
8842 <pre>
8843BEFORE attaching B.vdi: AFTER attaching B.vdi:
8844
8845Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8846 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8847 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8848 Snapshot 4 (none) Snapshot 4 (none)
8849 CurState (none) CurState (D3->D2.vdi)
8850
8851 NOT
8852 ...
8853 CurState (D3->B.vdi)
8854 </pre>
8855 The first column is the virtual machine configuration before the base hard
8856 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8857 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8858 mean that the hard disk that is actually attached to the machine is a
8859 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8860 another hard disk, <tt>B.vdi</tt>.
8861
8862 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8863 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8864 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8865 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8866 it cannot be attached directly and needs an indirect attachment (i.e.
8867 implicit creation of a new differencing hard disk). Due to the smart
8868 attachment procedure, the new differencing hard disk
8869 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8870 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8871 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8872 machine.
8873
8874 Note that if there is more than one descendant hard disk of the given base
8875 hard disk found in a snapshot, and there is an exact device, channel and
8876 bus match, then this exact match will be used. Otherwise, the youngest
8877 descendant will be picked up.
8878
8879 There is one more important aspect of the smart attachment procedure which
8880 is not related to snapshots at all. Before walking through the snapshots
8881 as described above, the backup copy of the current list of hard disk
8882 attachment is searched for descendants. This backup copy is created when
8883 the hard disk configuration is changed for the first time after the last
8884 <link to="IMachine::saveSettings"/> call and used by
8885 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8886 changes. When such a descendant is found in this backup copy, it will be
8887 simply re-attached back, without creating a new differencing hard disk for
8888 it. This optimization is necessary to make it possible to re-attach the
8889 base or immutable hard disk to a different bus, channel or device slot
8890 without losing the contents of the differencing hard disk actually
8891 attached to the machine in place of it.
8892 </desc>
8893
8894 <attribute name="format" type="wstring" readonly="yes">
8895 <desc>
8896 Storage format of this hard disk.
8897
8898 The value of this attribute is a string that specifies a backend used to
8899 store hard disk data. The storage format is defined when you create a
8900 new hard disk or automatically detected when you open an existing hard
8901 disk medium, and cannot be changed later.
8902
8903 The list of all storage formats supported by this VirtualBox
8904 installation can be obtained using
8905 <link to="ISystemProperties::hardDiskFormats"/>.
8906 </desc>
8907 </attribute>
8908
8909 <attribute name="type" type="HardDiskType">
8910 <desc>
8911 Type (role) of this hard disk.
8912
8913 The following constraints apply when changing the value of this
8914 attribute:
8915 <ul>
8916 <li>If a hard disk is attached to a virtual machine (either in the
8917 current state or in one of the snapshots), its type cannot be
8918 changed.
8919 </li>
8920 <li>As long as the hard disk has children, its type cannot be set
8921 to <link to="HardDiskType_Writethrough"/>.
8922 </li>
8923 <li>The type of all differencing hard disks is
8924 <link to="HardDiskType_Normal"/> and cannot be changed.
8925 </li>
8926 </ul>
8927
8928 The type of a newly created or opened hard disk is set to
8929 <link to="HardDiskType_Normal"/>.
8930 </desc>
8931 </attribute>
8932
8933 <attribute name="parent" type="IHardDisk" readonly="yes">
8934 <desc>
8935 Parent of this hard disk (a hard disk this hard disk is directly based
8936 on).
8937
8938 Only differencing hard disks have parents. For base (non-differencing)
8939 hard disks, <tt>null</tt> is returned.
8940 </desc>
8941 </attribute>
8942
8943 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
8944 <desc>
8945 Children of this hard disk (all differencing hard disks directly based
8946 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8947 does not have any children.
8948 </desc>
8949 </attribute>
8950
8951 <attribute name="root" type="IHardDisk" readonly="yes">
8952 <desc>
8953 Root hard disk of this hard disk.
8954
8955 If this is a differencing hard disk, its root hard disk is the base hard
8956 disk the given hard disk branch starts from. For all other types of hard
8957 disks, this property returns the hard disk object itself (i.e. the same
8958 object this property is read on).
8959 </desc>
8960 </attribute>
8961
8962 <attribute name="readOnly" type="boolean" readonly="yes">
8963 <desc>
8964 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8965 otherwise.
8966
8967 A hard disk is considered to be read-only when its contents cannot be
8968 modified without breaking the integrity of other parties that depend on
8969 this hard disk such as its child hard disks or snapshots of virtual
8970 machines where this hard disk is attached to these machines. If there
8971 are no children and no such snapshots then there is no dependency and
8972 the hard disk is not read-only.
8973
8974 The value of this attribute can be used to determine the kind of the
8975 attachment that will take place when attaching this hard disk to a
8976 virtual machine. If the value is <tt>false</tt> then the hard disk will
8977 be attached directly. If the value is <tt>true</tt> then the hard disk
8978 will be attached indirectly by creating a new differencing child hard
8979 disk for that. See the interface description for more information.
8980
8981 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8982 disks are always read-only while all
8983 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8984 always not.
8985
8986 <note>
8987 The read-only condition represented by this attribute is related to
8988 the hard disk type and usage, not to the current
8989 <link to="IMedium::state">media state</link> and not to the read-only
8990 state of the storage unit.
8991 </note>
8992 </desc>
8993 </attribute>
8994
8995 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8996 <desc>
8997 Logical size of this hard disk (in megabytes), as reported to the
8998 guest OS running inside the virtual machine this disk is
8999 attached to. The logical size is defined when the hard disk is created
9000 and cannot be changed later.
9001
9002 <note>
9003 Reading this property on a differencing hard disk will return the size
9004 of its <link to="#root"/> hard disk.
9005 </note>
9006 <note>
9007 For hard disks whose state is <link to="#state"/> is <link
9008 to="MediaState_Inaccessible"/>, the value of this property is the
9009 last known logical size. For <link to="MediaState_NotCreated"/> hard
9010 disks, the returned value is zero.
9011 </note>
9012 </desc>
9013 </attribute>
9014
9015 <attribute name="autoReset" type="boolean">
9016 <desc>
9017 Whether this differencing hard disk will be automatically reset each
9018 time a virtual machine it is attached to is powered up.
9019
9020 See <link to="#reset()"/> for more information about resetting
9021 differencing hard disks.
9022
9023 <note>
9024 Reading this property on a base (non-differencing) hard disk will
9025 always <tt>false</tt>. Changing the value of this property in this
9026 case is not supported.
9027 </note>
9028
9029 <result name="VBOX_E_NOT_SUPPORTED">
9030 This is not a differencing hard disk (when changing the attribute
9031 value).
9032 </result>
9033 </desc>
9034 </attribute>
9035
9036 <!-- storage methods -->
9037
9038 <method name="getProperty">
9039 <desc>
9040 Returns the value of the custom hard disk property with the given name.
9041
9042 The list of all properties supported by the given hard disk format can
9043 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9044
9045 Note that if this method returns a <tt>null</tt> @a value, the requested
9046 property is supported but currently not assigned any value.
9047
9048 <result name="VBOX_E_OBJECT_NOT_FOUND">
9049 Requested property does not exist (not supported by the format).
9050 </result>
9051 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9052 </desc>
9053 <param name="name" type="wstring" dir="in">
9054 <desc>Name of the property to get.</desc>
9055 </param>
9056 <param name="value" type="wstring" dir="return">
9057 <desc>Current property value.</desc>
9058 </param>
9059 </method>
9060
9061 <method name="setProperty">
9062 <desc>
9063 Sets the value of the custom hard disk property with the given name.
9064
9065 The list of all properties supported by the given hard disk format can
9066 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9067
9068 Note that setting the property value to <tt>null</tt> is equivalent to
9069 deleting the existing value. A default value (if it is defined for this
9070 property) will be used by the format backend in this case.
9071
9072 <result name="VBOX_E_OBJECT_NOT_FOUND">
9073 Requested property does not exist (not supported by the format).
9074 </result>
9075 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9076 </desc>
9077 <param name="name" type="wstring" dir="in">
9078 <desc>Name of the property to set.</desc>
9079 </param>
9080 <param name="value" type="wstring" dir="in">
9081 <desc>Property value to set.</desc>
9082 </param>
9083 </method>
9084
9085 <method name="getProperties">
9086 <desc>
9087 Returns values for a group of properties in one call.
9088
9089 The names of the properties to get are specified using the @a names
9090 argument which is a list of comma-separated property names or
9091 <tt>null</tt> if all properties are to be returned. Note that currently
9092 the value of this argument is ignored and the method always returns all
9093 existing properties.
9094
9095 The list of all properties supported by the given hard disk format can
9096 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9097
9098 The method returns two arrays, the array of property names corresponding
9099 to the @a names argument and the current values of these properties.
9100 Both arrays have the same number of elements with each elemend at the
9101 given index in the first array corresponds to an element at the same
9102 index in the second array.
9103
9104 Note that for properties that do not have assigned values,
9105 <tt>null</tt> is returned at the appropriate index in the
9106 @a returnValues array.
9107
9108 </desc>
9109 <param name="names" type="wstring" dir="in">
9110 <desc>
9111 Names of properties to get.
9112 </desc>
9113 </param>
9114 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9115 <desc>Names of returned properties.</desc>
9116 </param>
9117 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9118 <desc>Values of returned properties.</desc>
9119 </param>
9120 </method>
9121
9122 <method name="setProperties">
9123 <desc>
9124 Sets values for a group of properties in one call.
9125
9126 The names of the properties to set are passed in the @a names
9127 array along with the new values for them in the @a values array. Both
9128 arrays have the same number of elements with each elemend at the given
9129 index in the first array corresponding to an element at the same index
9130 in the second array.
9131
9132 If there is at least one property name in @a names that is not valid,
9133 the method will fail before changing the values of any other properties
9134 from the @a names array.
9135
9136 Using this method over <link to="#setProperty"/> is preferred if you
9137 need to set several properties at once since it will result into less
9138 IPC calls.
9139
9140 The list of all properties supported by the given hard disk format can
9141 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9142
9143 Note that setting the property value to <tt>null</tt> is equivalent to
9144 deleting the existing value. A default value (if it is defined for this
9145 property) will be used by the format backend in this case.
9146 </desc>
9147 <param name="names" type="wstring" safearray="yes" dir="in">
9148 <desc>Names of properties to set.</desc>
9149 </param>
9150 <param name="values" type="wstring" safearray="yes" dir="in">
9151 <desc>Values of properties to set.</desc>
9152 </param>
9153 </method>
9154
9155 <!-- storage methods -->
9156
9157 <method name="createDynamicStorage">
9158 <desc>
9159 Starts creating a dynamically expanding hard disk storage unit in the
9160 background. The previous storage unit created for this object, if
9161 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
9162 the operation will fail.
9163
9164 Before the operation starts, the hard disk is placed in
9165 <link to="MediaState_Creating"/> state. If the create operation
9166 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9167 state.
9168
9169 After the returned progress object reports that the operation has
9170 successfully completed, the media state will be set to <link
9171 to="MediaState_Created"/>, the hard disk will be remembered by this
9172 VirtualBox installation and may be attached to virtual machines.
9173
9174 <result name="VBOX_E_NOT_SUPPORTED">
9175 Dynamic storage creation operation is not supported. See <link
9176 to="IHardDiskFormat::capabilities"/>.
9177 </result>
9178 </desc>
9179 <param name="logicalSize" type="unsigned long long" dir="in">
9180 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9181 </param>
9182 <param name="variant" type="HardDiskVariant" dir="in">
9183 <desc>Exact image variant which should be created.</desc>
9184 </param>
9185 <param name="progress" type="IProgress" dir="return">
9186 <desc>Progress object to track the operation completion.</desc>
9187 </param>
9188 </method>
9189
9190 <method name="createFixedStorage">
9191 <desc>
9192 Starts creating a fixed-size hard disk storage unit in the background.
9193 The previous storage unit created for this object, if
9194 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
9195 the operation will fail.
9196
9197 Before the operation starts, the hard disk is placed to
9198 <link to="MediaState_Creating"/> state. If the create operation
9199 fails, the media will placed back to <link to="MediaState_NotCreated"/>
9200 state.
9201
9202 After the returned progress object reports that the operation is
9203 successfully complete, the media state will be set to <link
9204 to="MediaState_Created"/>, the hard disk will be remembered by this
9205 VirtualBox installation and may be attached to virtual machines.
9206
9207 <result name="VBOX_E_NOT_SUPPORTED">
9208 Fixed storage creation operation is not supported. See
9209 <link to="IHardDiskFormat::capabilities"/>.
9210 </result>
9211 </desc>
9212 <param name="logicalSize" type="unsigned long long" dir="in">
9213 <desc>Logical size of the hard disk in megabytes.</desc>
9214 </param>
9215 <param name="variant" type="HardDiskVariant" dir="in">
9216 <desc>Exact image variant which should be created.</desc>
9217 </param>
9218 <param name="progress" type="IProgress" dir="return">
9219 <desc>Progress object to track the operation completion.</desc>
9220 </param>
9221 </method>
9222
9223 <method name="deleteStorage">
9224 <desc>
9225 Starts deleting the storage unit of this hard disk.
9226
9227 The hard disk must not be attached to any known virtual machine and must
9228 not have any known child hard disks, otherwise the operation will fail.
9229 It will also fail if there is no storage unit to delete or if deletion
9230 is already in progress, or if the hard disk is being in use (locked for
9231 read or for write) or inaccessible. Therefore, the only valid state for
9232 this operation to succeed is <link to="MediaState_Created"/>.
9233
9234 Before the operation starts, the hard disk is placed to
9235 <link to="MediaState_Deleting"/> state and gets removed from the list
9236 of remembered hard disks (media registry). If the delete operation
9237 fails, the media will be remembered again and placed back to
9238 <link to="MediaState_Created"/> state.
9239
9240 After the returned progress object reports that the operation is
9241 complete, the media state will be set to
9242 <link to="MediaState_NotCreated"/> and you will be able to use one of
9243 the storage creation methods to create it again.
9244
9245 <see>#close()</see>
9246
9247 <result name="VBOX_E_OBJECT_IN_USE">
9248 Hard disk is attached to a virtual machine.
9249 </result>
9250 <result name="VBOX_E_NOT_SUPPORTED">
9251 Storage deletion is not allowed because neither of storage creation
9252 operations are supported. See
9253 <link to="IHardDiskFormat::capabilities"/>.
9254 </result>
9255
9256 <note>
9257 If the deletion operation fails, it is not guaranteed that the storage
9258 unit still exists. You may check the <link to="IMedium::state"/> value
9259 to answer this question.
9260 </note>
9261 </desc>
9262 <param name="progress" type="IProgress" dir="return">
9263 <desc>Progress object to track the operation completion.</desc>
9264 </param>
9265 </method>
9266
9267 <!-- diff methods -->
9268
9269 <method name="createDiffStorage">
9270 <desc>
9271 Starts creating an empty differencing storage unit based on this hard
9272 disk in the format and at the location defined by the @a target
9273 argument.
9274
9275 The target hard disk must be in <link to="MediaState_NotCreated"/>
9276 state (i.e. must not have an existing storage unit). Upon successful
9277 completion, this operation will set the type of the target hard disk to
9278 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9279 represent the differencing hard disk data in the given format (according
9280 to the storage format of the target object).
9281
9282 After the returned progress object reports that the operation is
9283 successfully complete, the target hard disk gets remembered by this
9284 VirtualBox installation and may be attached to virtual machines.
9285
9286 <note>
9287 The hard disk will be set to <link to="MediaState_LockedRead"/>
9288 state for the duration of this operation.
9289 </note>
9290 <result name="VBOX_E_OBJECT_IN_USE">
9291 Hard disk not in NotCreated state.
9292 </result>
9293 </desc>
9294 <param name="target" type="IHardDisk" dir="in">
9295 <desc>Target hard disk.</desc>
9296 </param>
9297 <param name="variant" type="HardDiskVariant" dir="in">
9298 <desc>Exact image variant which should be created.</desc>
9299 </param>
9300 <param name="progress" type="IProgress" dir="return">
9301 <desc>Progress object to track the operation completion.</desc>
9302 </param>
9303 </method>
9304
9305 <method name="mergeTo">
9306 <desc>
9307 Starts merging the contents of this hard disk and all intermediate
9308 differencing hard disks in the chain to the given target hard disk.
9309
9310 The target hard disk must be either a descendant of this hard disk or
9311 its ancestor (otherwise this method will immediately return a failure).
9312 It follows that there are two logical directions of the merge operation:
9313 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9314 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9315 chain:
9316
9317 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9318
9319 Here, calling this method on the <tt>Base</tt> hard disk object with
9320 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9321 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9322 merge. Note that in both cases the contents of the resulting hard disk
9323 will be the same, the only difference is the hard disk object that takes
9324 the result of the merge operation. In case of the forward merge in the
9325 above example, the result will be written to <tt>Diff_2</tt>; in case of
9326 the backward merge, the result will be written to <tt>Base</tt>. In
9327 other words, the result of the operation is always stored in the target
9328 hard disk.
9329
9330 Upon successful operation completion, the storage units of all hard
9331 disks in the chain between this (source) hard disk and the target hard
9332 disk, including the source hard disk itself, will be automatically
9333 deleted and the relevant hard disk objects (including this hard disk)
9334 will become uninitialized. This means that any attempt to call any of
9335 their methods or attributes will fail with the
9336 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9337 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9338 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9339 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9340 disk itself since it will no longer be based on any other hard disk.
9341
9342 Considering the above, all of the following conditions must be met in
9343 order for the merge operation to succeed:
9344 <ul>
9345 <li>
9346 Neither this (source) hard disk nor any intermediate
9347 differencing hard disk in the chain between it and the target
9348 hard disk is attached to any virtual machine.
9349 </li>
9350 <li>
9351 Neither the source hard disk nor the target hard disk is an
9352 <link to="HardDiskType_Immutable"/> hard disk.
9353 </li>
9354 <li>
9355 The part of the hard disk tree from the source hard disk to the
9356 target hard disk is a linear chain, i.e. all hard disks in this
9357 chain have exactly one child which is the next hard disk in this
9358 chain. The only exception from this rule is the target hard disk in
9359 the forward merge operation; it is allowed to have any number of
9360 child hard disks because the merge operation will hot change its
9361 logical contents (as it is seen by the guest OS or by children).
9362 </li>
9363 <li>
9364 None of the involved hard disks are in
9365 <link to="MediaState_LockedRead"/> or
9366 <link to="MediaState_LockedWrite"/> state.
9367 </li>
9368 </ul>
9369
9370 <note>
9371 This (source) hard disk and all intermediates will be placed to <link
9372 to="MediaState_Deleting"/> state and the target hard disk will be
9373 placed to <link to="MediaState_LockedWrite"/> state and for the
9374 duration of this operation.
9375 </note>
9376 </desc>
9377 <param name="targetId" type="uuid" dir="in">
9378 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9379 </param>
9380 <param name="progress" type="IProgress" dir="return">
9381 <desc>Progress object to track the operation completion.</desc>
9382 </param>
9383 </method>
9384
9385 <!-- clone methods -->
9386
9387 <method name="cloneTo">
9388 <desc>
9389 Starts creating a clone of this hard disk in the format and at the
9390 location defined by the @a target argument.
9391
9392 The target hard disk must be in <link to="MediaState_NotCreated"/>
9393 state (i.e. must not have an existing storage unit). Upon successful
9394 completion, the cloned hard disk will contain exactly the same sector
9395 data as the hard disk being cloned, except that a new UUID for the clone
9396 will be randomly generated.
9397
9398 After the returned progress object reports that the operation is
9399 successfully complete, the target hard disk gets remembered by this
9400 VirtualBox installation and may be attached to virtual machines.
9401
9402 <note>
9403 If the cloned hard disk is a differencing hard disk, it will inherit
9404 parent dependency of the original hard disk.
9405 </note>
9406 <note>
9407 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9408 state for the duration of this operation.
9409 </note>
9410 </desc>
9411 <param name="target" type="IHardDisk" dir="in">
9412 <desc>Target hard disk.</desc>
9413 </param>
9414 <param name="variant" type="HardDiskVariant" dir="in">
9415 <desc>Exact image variant which should be created.</desc>
9416 </param>
9417 <param name="progress" type="IProgress" dir="return">
9418 <desc>Progress object to track the operation completion.</desc>
9419 </param>
9420 </method>
9421
9422 <method name="flattenTo">
9423 <desc>
9424 Starts creating a deep (independent) clone of this hard disk in the
9425 format and at the location defined by the @a target argument.
9426
9427 This operation is similar to <link to="#cloneTo"/> except that when
9428 applied to a differencing hard disk, it will also copy missing hard disk
9429 data from all parent hard disks it is linked to. This will make the
9430 created clone an independent base hard disk that contains all hard disk
9431 data and does not need any other hard disks to operate.
9432
9433 After the returned progress object reports that the operation is
9434 successfully complete, the target hard disk gets remembered by this
9435 VirtualBox installation and may be attached to virtual machines.
9436
9437 <note>
9438 For base hard disks, this operation is identical to
9439 <link to="#cloneTo"/>.
9440 </note>
9441 <note>
9442 This hard disk and all its parent hard disks will be placed to <link
9443 to="MediaState_LockedRead"/> state for the duration of this
9444 operation.
9445 </note>
9446 </desc>
9447 <param name="target" type="IHardDisk" dir="in">
9448 <desc>Target hard disk.</desc>
9449 </param>
9450 <param name="variant" type="HardDiskVariant" dir="in">
9451 <desc>Exact image variant which should be created.</desc>
9452 </param>
9453 <param name="progress" type="IProgress" dir="return">
9454 <desc>Progress object to track the operation completion.</desc>
9455 </param>
9456 </method>
9457
9458 <!-- other methods -->
9459
9460 <method name="compact">
9461 <desc>
9462 Starts compacting of this hard disk. This means that the disk is
9463 transformed into a possibly more compact storage representation.
9464 This potentially creates temporary images, which can require a
9465 substantial amount of additional disk space.
9466
9467 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9468 state and all its parent hard disks (if any) will be placed to
9469 <link to="MediaState_LockedRead"/> state for the duration of this
9470 operation.
9471 </desc>
9472 <param name="progress" type="IProgress" dir="return">
9473 <desc>Progress object to track the operation completion.</desc>
9474 </param>
9475 </method>
9476
9477 <method name="reset">
9478 <desc>
9479 Starts erasing the contents of this differencing hard disk.
9480
9481 This operation will reset the differencing hard disk to its initial
9482 state when it does not contain any sector data and any read operation is
9483 redirected to its parent hard disk.
9484
9485 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9486 for the duration of this operation.
9487
9488 <result name="VBOX_E_NOT_SUPPORTED">
9489 This is not a differencing hard disk.
9490 </result>
9491 <result name="VBOX_E_INVALID_OBJECT_STATE">
9492 Hard disk is not in <link to="MediaState_Created"/> or
9493 <link to="MediaState_Inaccessible"/> state.
9494 </result>
9495 </desc>
9496 <param name="progress" type="IProgress" dir="return">
9497 <desc>Progress object to track the operation completion.</desc>
9498 </param>
9499 </method>
9500
9501 </interface>
9502
9503
9504 <!--
9505 // IHardDiskFormat
9506 /////////////////////////////////////////////////////////////////////////
9507 -->
9508
9509 <enum
9510 name="DataType"
9511 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9512 >
9513 <const name="Int32" value="0"/>
9514 <const name="Int8" value="1"/>
9515 <const name="String" value="2"/>
9516 </enum>
9517
9518 <enum
9519 name="DataFlags"
9520 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9521 >
9522 <const name="None" value="0x00"/>
9523 <const name="Mandatory" value="0x01"/>
9524 <const name="Expert" value="0x02"/>
9525 <const name="Array" value="0x04"/>
9526 <const name="FlagMask" value="0x07"/>
9527 </enum>
9528
9529 <enum
9530 name="HardDiskFormatCapabilities"
9531 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9532 >
9533 <desc>
9534 Hard disk format capability flags.
9535 </desc>
9536
9537 <const name="Uuid" value="0x01">
9538 <desc>
9539 Supports UUIDs as expected by VirtualBox code.
9540 </desc>
9541 </const>
9542
9543 <const name="CreateFixed" value="0x02">
9544 <desc>
9545 Supports creating fixed size images, allocating all space instantly.
9546 </desc>
9547 </const>
9548
9549 <const name="CreateDynamic" value="0x04">
9550 <desc>
9551 Supports creating dynamically growing images, allocating space on
9552 demand.
9553 </desc>
9554 </const>
9555
9556 <const name="CreateSplit2G" value="0x08">
9557 <desc>
9558 Supports creating images split in chunks of a bit less than 2 GBytes.
9559 </desc>
9560 </const>
9561
9562 <const name="Differencing" value="0x10">
9563 <desc>
9564 Supports being used as a format for differencing hard disks (see <link
9565 to="IHardDisk::createDiffStorage"/>).
9566 </desc>
9567 </const>
9568
9569 <const name="Asynchronous" value="0x20">
9570 <desc>
9571 Supports asynchronous I/O operations for at least some configurations.
9572 </desc>
9573 </const>
9574
9575 <const name="File" value="0x40">
9576 <desc>
9577 The format backend operates on files (the <link to="IMedium::location"/>
9578 attribute of the hard disk specifies a file used to store hard disk
9579 data; for a list of supported file extensions see
9580 <link to="IHardDiskFormat::fileExtensions"/>).
9581 </desc>
9582 </const>
9583
9584 <const name="Properties" value="0x80">
9585 <desc>
9586 The format backend uses the property interface to configure the storage
9587 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9588 method is used to get access to properties supported by the given hard
9589 disk format).
9590 </desc>
9591 </const>
9592
9593 <const name="CapabilityMask" value="0xFF"/>
9594 </enum>
9595
9596 <interface
9597 name="IHardDiskFormat" extends="$unknown"
9598 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9599 wsmap="managed"
9600 >
9601 <desc>
9602 The IHardDiskFormat interface represents a virtual hard disk format.
9603
9604 Each hard disk format has an associated backend which is used to handle
9605 hard disks stored in this format. This interface provides information
9606 about the properties of the associated backend.
9607
9608 Each hard disk format is identified by a string represented by the
9609 <link to="#id"/> attribute. This string is used in calls like
9610 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9611 format.
9612
9613 The list of all supported hard disk formats can be obtained using
9614 <link to="ISystemProperties::hardDiskFormats"/>.
9615
9616 <see>IHardDisk</see>
9617 </desc>
9618
9619 <attribute name="id" type="wstring" readonly="yes">
9620 <desc>
9621 Identifier of this format.
9622
9623 The format identifier is a non-null non-empty ASCII string. Note that
9624 this string is case-insensitive. This means that, for example, all of
9625 the following strings:
9626 <pre>
9627 "VDI"
9628 "vdi"
9629 "VdI"</pre>
9630 refer to the same hard disk format.
9631
9632 This string is used in methods of other interfaces where it is necessary
9633 to specify a hard disk format, such as
9634 <link to="IVirtualBox::createHardDisk"/>.
9635 </desc>
9636 </attribute>
9637
9638 <attribute name="name" type="wstring" readonly="yes">
9639 <desc>
9640 Human readable description of this format.
9641
9642 Mainly for use in file open dialogs.
9643 </desc>
9644 </attribute>
9645
9646 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9647 <desc>
9648 Array of strings containing the supported file extensions.
9649
9650 The first extension in the array is the extension preferred by the
9651 backend. It is recommended to use this extension when specifying a
9652 location of the storage unit for a new hard disk.
9653
9654 Note that some backends do not work on files, so this array may be
9655 empty.
9656
9657 <see>IHardDiskFormat::capabilities</see>
9658 </desc>
9659 </attribute>
9660
9661 <attribute name="capabilities" type="unsigned long" readonly="yes">
9662 <desc>
9663 Capabilities of the format as a set of bit flags.
9664
9665 For the meaning of individual capability flags see
9666 <link to="HardDiskFormatCapabilities"/>.
9667 </desc>
9668 </attribute>
9669
9670 <method name="describeProperties">
9671 <desc>
9672 Returns several arrays describing the properties supported by this
9673 format.
9674
9675 An element with the given index in each array describes one
9676 property. Thus, the number of elements in each returned array is the
9677 same and corresponds to the number of supported properties.
9678
9679 The returned arrays are filled in only if the
9680 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9681 All arguments must be non-NULL.
9682
9683 <see>DataType</see>
9684 <see>DataFlags</see>
9685 </desc>
9686
9687 <param name="names" type="wstring" safearray="yes" dir="out">
9688 <desc>Array of property names.</desc>
9689 </param>
9690 <param name="description" type="wstring" safearray="yes" dir="out">
9691 <desc>Array of property descriptions.</desc>
9692 </param>
9693 <param name="types" type="DataType" safearray="yes" dir="out">
9694 <desc>Array of property types.</desc>
9695 </param>
9696 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9697 <desc>Array of property flags.</desc>
9698 </param>
9699 <param name="defaults" type="wstring" safearray="yes" dir="out">
9700 <desc>Array of default property values.</desc>
9701 </param>
9702 </method>
9703
9704 </interface>
9705
9706
9707 <!--
9708 // IFloppyImage
9709 /////////////////////////////////////////////////////////////////////////
9710 -->
9711
9712 <interface
9713 name="IFloppyImage" extends="IMedium"
9714 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9715 wsmap="managed"
9716 >
9717 <desc>
9718 The IFloppyImage interface represents a medium containing the image
9719 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9720 </desc>
9721
9722 </interface>
9723
9724
9725 <!--
9726 // IDVDImage
9727 /////////////////////////////////////////////////////////////////////////
9728 -->
9729
9730 <interface
9731 name="IDVDImage" extends="IMedium"
9732 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9733 wsmap="managed"
9734 >
9735 <desc>
9736 The IDVDImage interface represents a medium containing the image
9737 of a CD or DVD disk in the ISO format.
9738
9739 This is a subclass of <link to="IMedium" />; see remarks there.
9740 </desc>
9741
9742 </interface>
9743
9744
9745 <!--
9746 // IDVDDrive
9747 /////////////////////////////////////////////////////////////////////////
9748 -->
9749
9750 <interface
9751 name="IDVDDrive" extends="$unknown"
9752 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9753 wsmap="managed"
9754 >
9755 <desc>
9756 The IDVDDrive interface represents the virtual CD/DVD drive of the
9757 virtual machine. An object of this type is returned by
9758 <link to="IMachine::DVDDrive"/>.
9759 </desc>
9760
9761 <attribute name="state" type="DriveState" readonly="yes">
9762 <desc>Current drive state.</desc>
9763 </attribute>
9764
9765 <attribute name="passthrough" type="boolean">
9766 <desc>
9767 When a host drive is mounted and passthrough is enabled
9768 the guest OS will be able to directly send SCSI commands to
9769 the host drive. This enables the guest OS to use CD/DVD writers
9770 but is potentially dangerous.
9771 </desc>
9772 </attribute>
9773
9774 <method name="mountImage">
9775 <desc>Mounts a CD/DVD image with the specified UUID.
9776
9777 <result name="VBOX_E_FILE_ERROR">
9778 Invalid image file location.
9779 </result>
9780 <result name="VBOX_E_OBJECT_NOT_FOUND">
9781 Could not find a CD/DVD image matching @a imageID.
9782 </result>
9783 <result name="VBOX_E_INVALID_OBJECT_STATE">
9784 Invalid media state.
9785 </result>
9786
9787 </desc>
9788 <param name="imageId" type="uuid" dir="in"/>
9789 </method>
9790
9791 <method name="captureHostDrive">
9792 <desc>Captures the specified host CD/DVD drive.</desc>
9793 <param name="drive" type="IHostDVDDrive" dir="in"/>
9794 </method>
9795
9796 <method name="unmount">
9797 <desc>Unmounts the currently mounted image or host drive.</desc>
9798 </method>
9799
9800 <method name="getImage">
9801 <desc>Returns the currently mounted CD/DVD image.</desc>
9802 <param name="image" type="IDVDImage" dir="return"/>
9803 </method>
9804
9805 <method name="getHostDrive">
9806 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9807 <param name="drive" type="IHostDVDDrive" dir="return"/>
9808 </method>
9809
9810 </interface>
9811
9812
9813 <!--
9814 // IFloppyDrive
9815 /////////////////////////////////////////////////////////////////////////
9816 -->
9817
9818 <interface
9819 name="IFloppyDrive" extends="$unknown"
9820 uuid="159412cd-bab8-452e-8097-218a020825a6"
9821 wsmap="managed"
9822 >
9823 <desc>
9824 The IFloppyDrive interface represents the virtual floppy drive of the
9825 virtual machine. An object of this type is returned by
9826 <link to="IMachine::floppyDrive" />.
9827 </desc>
9828
9829 <attribute name="enabled" type="boolean">
9830 <desc>
9831 Flag whether the floppy drive is enabled. If it is disabled,
9832 the floppy drive will not be reported to the guest OS.
9833 </desc>
9834 </attribute>
9835
9836 <attribute name="state" type="DriveState" readonly="yes">
9837 <desc>Current drive state.</desc>
9838 </attribute>
9839
9840 <method name="mountImage">
9841 <desc>Mounts a floppy image with the specified UUID.
9842
9843 <result name="VBOX_E_FILE_ERROR">
9844 Invalid image file location.
9845 </result>
9846 <result name="VBOX_E_OBJECT_NOT_FOUND">
9847 Could not find a floppy image matching @a imageID.
9848 </result>
9849 <result name="VBOX_E_INVALID_OBJECT_STATE">
9850 Invalid media state.
9851 </result>
9852
9853 </desc>
9854 <param name="imageId" type="uuid" dir="in"/>
9855 </method>
9856
9857 <method name="captureHostDrive">
9858 <desc>Captures the specified host floppy drive.</desc>
9859 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9860 </method>
9861
9862 <method name="unmount">
9863 <desc>Unmounts the currently mounted image or host drive.</desc>
9864 </method>
9865
9866 <method name="getImage">
9867 <desc>Returns the currently mounted floppy image.</desc>
9868 <param name="image" type="IFloppyImage" dir="return"/>
9869 </method>
9870
9871 <method name="getHostDrive">
9872 <desc>Returns the currently mounted host floppy drive.</desc>
9873 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9874 </method>
9875
9876 </interface>
9877
9878
9879 <!--
9880 // IKeyboard
9881 /////////////////////////////////////////////////////////////////////////
9882 -->
9883
9884 <interface
9885 name="IKeyboard" extends="$unknown"
9886 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9887 wsmap="managed"
9888 >
9889 <desc>
9890 The IKeyboard interface represents the virtual machine's keyboard. Used
9891 in <link to="IConsole::keyboard"/>.
9892
9893 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9894 to the virtual machine.
9895
9896 </desc>
9897 <method name="putScancode">
9898 <desc>Sends a scancode to the keyboard.
9899
9900 <result name="VBOX_E_IPRT_ERROR">
9901 Could not send scan code to virtual keyboard.
9902 </result>
9903
9904 </desc>
9905 <param name="scancode" type="long" dir="in"/>
9906 </method>
9907
9908 <method name="putScancodes">
9909 <desc>Sends an array of scancodes to the keyboard.
9910
9911 <result name="VBOX_E_IPRT_ERROR">
9912 Could not send all scan codes to virtual keyboard.
9913 </result>
9914
9915 </desc>
9916 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9917 <param name="codesStored" type="unsigned long" dir="return"/>
9918 </method>
9919
9920 <method name="putCAD">
9921 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9922 function is nothing special, it is just a convenience function
9923 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9924
9925 <result name="VBOX_E_IPRT_ERROR">
9926 Could not send all scan codes to virtual keyboard.
9927 </result>
9928
9929 </desc>
9930 </method>
9931
9932 </interface>
9933
9934
9935 <!--
9936 // IMouse
9937 /////////////////////////////////////////////////////////////////////////
9938 -->
9939
9940 <enum
9941 name="MouseButtonState"
9942 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9943 >
9944 <desc>
9945 Mouse button state.
9946 </desc>
9947
9948 <const name="LeftButton" value="0x01"/>
9949 <const name="RightButton" value="0x02"/>
9950 <const name="MiddleButton" value="0x04"/>
9951 <const name="WheelUp" value="0x08"/>
9952 <const name="WheelDown" value="0x10"/>
9953 <const name="MouseStateMask" value="0x1F"/>
9954 </enum>
9955
9956 <interface
9957 name="IMouse" extends="$unknown"
9958 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9959 wsmap="managed"
9960 >
9961 <desc>
9962 The IMouse interface represents the virtual machine's mouse. Used in
9963 <link to="IConsole::mouse"/>.
9964
9965 Through this interface, the virtual machine's virtual mouse can be
9966 controlled.
9967 </desc>
9968
9969 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9970 <desc>
9971 Whether the guest OS supports absolute mouse pointer positioning
9972 or not.
9973 <note>
9974 VirtualBox Guest Tools need to be installed to the guest OS
9975 in order to enable absolute mouse positioning support.
9976 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9977 callback to be instantly informed about changes of this attribute
9978 during virtual machine execution.
9979 </note>
9980 <see><link to="#putMouseEventAbsolute"/></see>
9981 </desc>
9982 </attribute>
9983
9984 <method name="putMouseEvent">
9985 <desc>
9986 Initiates a mouse event using relative pointer movements
9987 along x and y axis.
9988
9989 <result name="E_ACCESSDENIED">
9990 Console not powered up.
9991 </result>
9992 <result name="VBOX_E_IPRT_ERROR">
9993 Could not send mouse event to virtual mouse.
9994 </result>
9995
9996 </desc>
9997
9998 <param name="dx" type="long" dir="in">
9999 <desc>
10000 Amount of pixels the mouse should move to the right.
10001 Negative values move the mouse to the left.
10002 </desc>
10003 </param>
10004 <param name="dy" type="long" dir="in">
10005 <desc>
10006 Amount of pixels the mouse should move downwards.
10007 Negative values move the mouse upwards.
10008 </desc>
10009 </param>
10010 <param name="dz" type="long" dir="in">
10011 <desc>
10012 Amount of mouse wheel moves.
10013 Positive values describe clockwise wheel rotations,
10014 negative values describe counterclockwise rotations.
10015 </desc>
10016 </param>
10017 <param name="buttonState" type="long" dir="in">
10018 <desc>
10019 The current state of mouse buttons. Every bit represents
10020 a mouse button as follows:
10021 <table>
10022 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10023 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10024 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10025 </table>
10026 A value of <tt>1</tt> means the corresponding button is pressed.
10027 otherwise it is released.
10028 </desc>
10029 </param>
10030 </method>
10031
10032 <method name="putMouseEventAbsolute">
10033 <desc>
10034 Positions the mouse pointer using absolute x and y coordinates.
10035 These coordinates are expressed in pixels and
10036 start from <tt>[1,1]</tt> which corresponds to the top left
10037 corner of the virtual display.
10038
10039 <result name="E_ACCESSDENIED">
10040 Console not powered up.
10041 </result>
10042 <result name="VBOX_E_IPRT_ERROR">
10043 Could not send mouse event to virtual mouse.
10044 </result>
10045
10046 <note>
10047 This method will have effect only if absolute mouse
10048 positioning is supported by the guest OS.
10049 </note>
10050
10051 <see><link to="#absoluteSupported"/></see>
10052 </desc>
10053
10054 <param name="x" type="long" dir="in">
10055 <desc>
10056 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
10057 </desc>
10058 </param>
10059 <param name="y" type="long" dir="in">
10060 <desc>
10061 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
10062 </desc>
10063 </param>
10064 <param name="dz" type="long" dir="in">
10065 <desc>
10066 Amount of mouse wheel moves.
10067 Positive values describe clockwise wheel rotations,
10068 negative values describe counterclockwise rotations.
10069 </desc>
10070 </param>
10071 <param name="buttonState" type="long" dir="in">
10072 <desc>
10073 The current state of mouse buttons. Every bit represents
10074 a mouse button as follows:
10075 <table>
10076 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10077 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10078 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10079 </table>
10080 A value of <tt>1</tt> means the corresponding button is pressed.
10081 otherwise it is released.
10082 </desc>
10083 </param>
10084 </method>
10085
10086 </interface>
10087
10088 <!--
10089 // IDisplay
10090 /////////////////////////////////////////////////////////////////////////
10091 -->
10092
10093 <enum
10094 name="FramebufferAccelerationOperation"
10095 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
10096 >
10097 <desc>
10098 Frame buffer acceleration operation.
10099 </desc>
10100
10101 <const name="SolidFillAcceleration" value="1"/>
10102 <const name="ScreenCopyAcceleration" value="2"/>
10103 </enum>
10104
10105 <enum
10106 name="FramebufferPixelFormat"
10107 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10108 >
10109 <desc>
10110 Format of the video memory buffer. Constants represented by this enum can
10111 be used to test for particular values of <link
10112 to="IFramebuffer::pixelFormat"/>. See also <link
10113 to="IFramebuffer::requestResize"/>.
10114
10115 See also www.fourcc.org for more information about FOURCC pixel formats.
10116 </desc>
10117
10118 <const name="Opaque" value="0">
10119 <desc>
10120 Unknown buffer format (the user may not assume any particular format of
10121 the buffer).
10122 </desc>
10123 </const>
10124 <const name="FOURCC_RGB" value="0x32424752">
10125 <desc>
10126 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10127 bit layout).
10128 </desc>
10129 </const>
10130 </enum>
10131
10132 <interface
10133 name="IFramebuffer" extends="$unknown"
10134 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
10135 wsmap="suppress"
10136 >
10137 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10138 <desc>Address of the start byte of the frame buffer.</desc>
10139 </attribute>
10140
10141 <attribute name="width" type="unsigned long" readonly="yes">
10142 <desc>Frame buffer width, in pixels.</desc>
10143 </attribute>
10144
10145 <attribute name="height" type="unsigned long" readonly="yes">
10146 <desc>Frame buffer height, in pixels.</desc>
10147 </attribute>
10148
10149 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10150 <desc>
10151 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10152 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10153 are: 8, 15, 16, 24 and 32.
10154 </desc>
10155 </attribute>
10156
10157 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10158 <desc>
10159 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10160 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10161 size of the scan line must be aligned to 32 bits.
10162 </desc>
10163 </attribute>
10164
10165 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10166 <desc>
10167 Frame buffer pixel format. It's either one of the values defined by <link
10168 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10169 <note>
10170 This attribute must never return <link
10171 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10172 <link to="#address"/> points to must be always known.
10173 </note>
10174 </desc>
10175 </attribute>
10176
10177 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10178 <desc>
10179 Defines whether this frame buffer uses the virtual video card's memory
10180 buffer (guest VRAM) directly or not. See <link
10181 to="IFramebuffer::requestResize"/> for more information.
10182 </desc>
10183 </attribute>
10184
10185 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10186 <desc>
10187 Hint from the frame buffer about how much of the standard
10188 screen height it wants to use for itself. This information is
10189 exposed to the guest through the VESA BIOS and VMMDev interface
10190 so that it can use it for determining its video mode table. It
10191 is not guaranteed that the guest respects the value.
10192 </desc>
10193 </attribute>
10194
10195 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10196 <desc>
10197 An alpha-blended overlay which is superposed over the frame buffer.
10198 The initial purpose is to allow the display of icons providing
10199 information about the VM state, including disk activity, in front
10200 ends which do not have other means of doing that. The overlay is
10201 designed to controlled exclusively by IDisplay. It has no locking
10202 of its own, and any changes made to it are not guaranteed to be
10203 visible until the affected portion of IFramebuffer is updated. The
10204 overlay can be created lazily the first time it is requested. This
10205 attribute can also return NULL to signal that the overlay is not
10206 implemented.
10207 </desc>
10208 </attribute>
10209
10210 <attribute name="winId" type="unsigned long long" readonly="yes">
10211 <desc>
10212 Platform-dependent identifier of the window where context of this
10213 frame buffer is drawn, or zero if there's no such window.
10214 </desc>
10215 </attribute>
10216
10217 <method name="lock">
10218 <desc>
10219 Locks the frame buffer.
10220 Gets called by the IDisplay object where this frame buffer is
10221 bound to.
10222 </desc>
10223 </method>
10224
10225 <method name="unlock">
10226 <desc>
10227 Unlocks the frame buffer.
10228 Gets called by the IDisplay object where this frame buffer is
10229 bound to.
10230 </desc>
10231 </method>
10232
10233 <method name="notifyUpdate">
10234 <desc>
10235 Informs about an update.
10236 Gets called by the display object where this buffer is
10237 registered.
10238 </desc>
10239 <param name="x" type="unsigned long" dir="in"/>
10240 <param name="y" type="unsigned long" dir="in"/>
10241 <param name="width" type="unsigned long" dir="in"/>
10242 <param name="height" type="unsigned long" dir="in"/>
10243 <param name="finished" type="boolean" dir="return"/>
10244 </method>
10245
10246 <method name="requestResize">
10247 <desc>
10248 Requests a size and pixel format change.
10249
10250 There are two modes of working with the video buffer of the virtual
10251 machine. The <i>indirect</i> mode implies that the IFramebuffer
10252 implementation allocates a memory buffer for the requested display mode
10253 and provides it to the virtual machine. In <i>direct</i> mode, the
10254 IFramebuffer implementation uses the memory buffer allocated and owned
10255 by the virtual machine. This buffer represents the video memory of the
10256 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10257 usually faster because the implementation gets a raw pointer to the
10258 guest VRAM buffer which it can directly use for visualizing the contents
10259 of the virtual display, as opposed to the indirect mode where the
10260 contents of guest VRAM are copied to the memory buffer provided by
10261 the implementation every time a display update occurs.
10262
10263 It is important to note that the direct mode is really fast only when
10264 the implementation uses the given guest VRAM buffer directly, for
10265 example, by blitting it to the window representing the virtual machine's
10266 display, which saves at least one copy operation comparing to the
10267 indirect mode. However, using the guest VRAM buffer directly is not
10268 always possible: the format and the color depth of this buffer may be
10269 not supported by the target window, or it may be unknown (opaque) as in
10270 case of text or non-linear multi-plane VGA video modes. In this case,
10271 the indirect mode (that is always available) should be used as a
10272 fallback: when the guest VRAM contents are copied to the
10273 implementation-provided memory buffer, color and format conversion is
10274 done automatically by the underlying code.
10275
10276 The @a pixelFormat parameter defines whether the direct mode is
10277 available or not. If @a pixelFormat is <link
10278 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10279 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10280 @a bytesPerLine parameters must be ignored and the implementation must use
10281 the indirect mode (where it provides its own buffer in one of the
10282 supported formats). In all other cases, @a pixelFormat together with
10283 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10284 buffer pointed to by the @a VRAM parameter and the implementation is
10285 free to choose which mode to use. To indicate that this frame buffer uses
10286 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10287 attribute must return <tt>true</tt> and <link to="#address"/> must
10288 return exactly the same address that is passed in the @a VRAM parameter
10289 of this method; otherwise it is assumed that the indirect strategy is
10290 chosen.
10291
10292 The @a width and @a height parameters represent the size of the
10293 requested display mode in both modes. In case of indirect mode, the
10294 provided memory buffer should be big enough to store data of the given
10295 display mode. In case of direct mode, it is guaranteed that the given
10296 @a VRAM buffer contains enough space to represent the display mode of the
10297 given size. Note that this frame buffer's <link to="#width"/> and <link
10298 to="#height"/> attributes must return exactly the same values as
10299 passed to this method after the resize is completed (see below).
10300
10301 The @a finished output parameter determines if the implementation has
10302 finished resizing the frame buffer or not. If, for some reason, the
10303 resize cannot be finished immediately during this call, @a finished
10304 must be set to @c false, and the implementation must call
10305 <link to="IDisplay::resizeCompleted"/> after it has returned from
10306 this method as soon as possible. If @a finished is @c false, the
10307 machine will not call any frame buffer methods until
10308 <link to="IDisplay::resizeCompleted"/> is called.
10309
10310 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10311 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10312 this frame buffer must return exactly the same values as specified in the
10313 parameters of this method, after the resize is completed. If the
10314 indirect mode is chosen, these attributes must return values describing
10315 the format of the implementation's own memory buffer <link
10316 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10317 value must always correlate with <link to="#pixelFormat"/>. Note that
10318 the <link to="#pixelFormat"/> attribute must never return <link
10319 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10320
10321 <note>
10322 This method is called by the IDisplay object under the
10323 <link to="#lock"/> provided by this IFramebuffer
10324 implementation. If this method returns @c false in @a finished, then
10325 this lock is not released until
10326 <link to="IDisplay::resizeCompleted"/> is called.
10327 </note>
10328 </desc>
10329 <param name="screenId" type="unsigned long" dir="in">
10330 <desc>
10331 Logical screen number. Must be used in the corresponding call to
10332 <link to="IDisplay::resizeCompleted"/> if this call is made.
10333 </desc>
10334 </param>
10335 <param name="pixelFormat" type="unsigned long" dir="in">
10336 <desc>
10337 Pixel format of the memory buffer pointed to by @a VRAM.
10338 See also <link to="FramebufferPixelFormat"/>.
10339 </desc>
10340 </param>
10341 <param name="VRAM" type="octet" mod="ptr" dir="in">
10342 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10343 </param>
10344 <param name="bitsPerPixel" type="unsigned long" dir="in">
10345 <desc>Color depth, bits per pixel.</desc>
10346 </param>
10347 <param name="bytesPerLine" type="unsigned long" dir="in">
10348 <desc>Size of one scan line, in bytes.</desc>
10349 </param>
10350 <param name="width" type="unsigned long" dir="in">
10351 <desc>Width of the guest display, in pixels.</desc>
10352 </param>
10353 <param name="height" type="unsigned long" dir="in">
10354 <desc>Height of the guest display, in pixels.</desc>
10355 </param>
10356 <param name="finished" type="boolean" dir="return">
10357 <desc>
10358 Can the VM start using the new frame buffer immediately
10359 after this method returns or it should wait for
10360 <link to="IDisplay::resizeCompleted"/>.
10361 </desc>
10362 </param>
10363 </method>
10364
10365 <method name="operationSupported">
10366 <desc>
10367 Returns whether the given acceleration operation is supported
10368 by the IFramebuffer implementation. If not, the display object
10369 will not attempt to call the corresponding IFramebuffer entry
10370 point. Even if an operation is indicated as supported, the
10371 IFramebuffer implementation always has the option to return non
10372 supported from the corresponding acceleration method in which
10373 case the operation will be performed by the display engine. This
10374 allows for reduced IFramebuffer implementation complexity where
10375 only common cases are handled.
10376 </desc>
10377 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
10378 <param name="supported" type="boolean" dir="return"/>
10379 </method>
10380
10381 <method name="videoModeSupported">
10382 <desc>
10383 Returns whether the frame buffer implementation is willing to
10384 support a given video mode. In case it is not able to render
10385 the video mode (or for some reason not willing), it should
10386 return false. Usually this method is called when the guest
10387 asks the VMM device whether a given video mode is supported
10388 so the information returned is directly exposed to the guest.
10389 It is important that this method returns very quickly.
10390 </desc>
10391 <param name="width" type="unsigned long" dir="in"/>
10392 <param name="height" type="unsigned long" dir="in"/>
10393 <param name="bpp" type="unsigned long" dir="in"/>
10394 <param name="supported" type="boolean" dir="return"/>
10395 </method>
10396
10397 <method name="solidFill">
10398 <desc>
10399 Fills the specified rectangle on screen with a solid color.
10400 </desc>
10401 <param name="x" type="unsigned long" dir="in"/>
10402 <param name="y" type="unsigned long" dir="in"/>
10403 <param name="width" type="unsigned long" dir="in"/>
10404 <param name="height" type="unsigned long" dir="in"/>
10405 <param name="color" type="unsigned long" dir="in"/>
10406 <param name="handled" type="boolean" dir="return"/>
10407 </method>
10408
10409 <method name="copyScreenBits">
10410 <desc>
10411 Copies specified rectangle on the screen.
10412 </desc>
10413 <param name="xDst" type="unsigned long" dir="in"/>
10414 <param name="yDst" type="unsigned long" dir="in"/>
10415 <param name="xSrc" type="unsigned long" dir="in"/>
10416 <param name="ySrc" type="unsigned long" dir="in"/>
10417 <param name="width" type="unsigned long" dir="in"/>
10418 <param name="height" type="unsigned long" dir="in"/>
10419 <param name="handled" type="boolean" dir="return"/>
10420 </method>
10421
10422 <method name="getVisibleRegion">
10423 <desc>
10424 Returns the visible region of this frame buffer.
10425
10426 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
10427 @a count parameter is ignored and the number of elements necessary to
10428 describe the current visible region is returned in @a countCopied.
10429
10430 If @a rectangles is not <tt>NULL</tt> but @a count is less
10431 than the required number of elements to store region data, the method
10432 will report a failure. If @a count is equal or greater than the
10433 required number of elements, then the actual number of elements copied
10434 to the provided array will be returned in @a countCopied.
10435
10436 <note>
10437 The address of the provided array must be in the process space of
10438 this IFramebuffer object.
10439 </note>
10440 <note>
10441 Method not yet implemented.
10442 </note>
10443 </desc>
10444 <param name="rectangles" type="octet" mod="ptr" dir="in">
10445 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
10446 </param>
10447 <param name="count" type="unsigned long" dir="in">
10448 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10449 </param>
10450 <param name="countCopied" type="unsigned long" dir="return">
10451 <desc>Number of elements copied to the @a rectangles array.</desc>
10452 </param>
10453 </method>
10454
10455 <method name="setVisibleRegion">
10456 <desc>
10457 Suggests a new visible region to this frame buffer. This region
10458 represents the area of the VM display which is a union of regions of
10459 all top-level windows of the guest operating system running inside the
10460 VM (if the Guest Additions for this system support this
10461 functionality). This information may be used by the frontends to
10462 implement the seamless desktop integration feature.
10463
10464 <note>
10465 The address of the provided array must be in the process space of
10466 this IFramebuffer object.
10467 </note>
10468 <note>
10469 The IFramebuffer implementation must make a copy of the provided
10470 array of rectangles.
10471 </note>
10472 <note>
10473 Method not yet implemented.
10474 </note>
10475 </desc>
10476 <param name="rectangles" type="octet" mod="ptr" dir="in">
10477 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
10478 </param>
10479 <param name="count" type="unsigned long" dir="in">
10480 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10481 </param>
10482 </method>
10483
10484 </interface>
10485
10486 <interface
10487 name="IFramebufferOverlay" extends="IFramebuffer"
10488 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10489 wsmap="suppress"
10490 >
10491 <desc>
10492 The IFramebufferOverlay interface represents an alpha blended overlay
10493 for displaying status icons above an IFramebuffer. It is always created
10494 not visible, so that it must be explicitly shown. It only covers a
10495 portion of the IFramebuffer, determined by its width, height and
10496 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10497 that order) format, and may be written to directly. Do re-read the
10498 width though, after setting it, as it may be adjusted (increased) to
10499 make it more suitable for the front end.
10500 </desc>
10501 <attribute name="x" type="unsigned long" readonly="yes">
10502 <desc>X position of the overlay, relative to the frame buffer.</desc>
10503 </attribute>
10504
10505 <attribute name="y" type="unsigned long" readonly="yes">
10506 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10507 </attribute>
10508
10509 <attribute name="visible" type="boolean" readonly="no">
10510 <desc>
10511 Whether the overlay is currently visible.
10512 </desc>
10513 </attribute>
10514
10515 <attribute name="alpha" type="unsigned long" readonly="no">
10516 <desc>
10517 The global alpha value for the overlay. This may or may not be
10518 supported by a given front end.
10519 </desc>
10520 </attribute>
10521
10522 <method name="move">
10523 <desc>
10524 Changes the overlay's position relative to the IFramebuffer.
10525 </desc>
10526 <param name="x" type="unsigned long" dir="in"/>
10527 <param name="y" type="unsigned long" dir="in"/>
10528 </method>
10529
10530 </interface>
10531
10532 <interface
10533 name="IDisplay" extends="$unknown"
10534 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10535 wsmap="suppress"
10536 >
10537 <desc>
10538 The IDisplay interface represents the virtual machine's display.
10539
10540 The object implementing this interface is contained in each
10541 <link to="IConsole::display"/> attribute and represents the visual
10542 output of the virtual machine.
10543
10544 The virtual display supports pluggable output targets represented by the
10545 IFramebuffer interface. Examples of the output target are a window on
10546 the host computer or an RDP session's display on a remote computer.
10547 </desc>
10548 <attribute name="width" type="unsigned long" readonly="yes">
10549 <desc>Current display width.</desc>
10550 </attribute>
10551
10552 <attribute name="height" type="unsigned long" readonly="yes">
10553 <desc>Current display height.</desc>
10554 </attribute>
10555
10556 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10557 <desc>
10558 Current guest display color depth. Note that this may differ
10559 from <link to="IFramebuffer::bitsPerPixel"/>.
10560 </desc>
10561 </attribute>
10562
10563 <method name="setupInternalFramebuffer">
10564 <desc>
10565 Prepares an internally managed frame buffer.
10566 </desc>
10567 <param name="depth" type="unsigned long" dir="in"/>
10568 </method>
10569
10570 <method name="lockFramebuffer">
10571 <desc>
10572 Requests access to the internal frame buffer.
10573
10574 <result name="VBOX_E_NOT_SUPPORTED">
10575 Attempt to lock a non-internal frame buffer.
10576 </result>
10577
10578 </desc>
10579 <param name="address" type="octet" mod="ptr" dir="return"/>
10580 </method>
10581
10582 <method name="unlockFramebuffer">
10583 <desc>
10584 Releases access to the internal frame buffer.
10585
10586 <result name="VBOX_E_NOT_SUPPORTED">
10587 Attempt to unlock a non-internal frame buffer.
10588 </result>
10589
10590 </desc>
10591 </method>
10592
10593 <method name="registerExternalFramebuffer">
10594 <desc>
10595 Registers an external frame buffer.
10596 </desc>
10597 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10598 </method>
10599
10600 <method name="setFramebuffer">
10601 <desc>
10602 Sets the framebuffer for given screen.
10603 </desc>
10604 <param name="screenId" type="unsigned long" dir="in"/>
10605 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10606 </method>
10607
10608 <method name="getFramebuffer">
10609 <desc>
10610 Queries the framebuffer for given screen.
10611 </desc>
10612 <param name="screenId" type="unsigned long" dir="in"/>
10613 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10614 <param name="xOrigin" type="long" dir="out"/>
10615 <param name="yOrigin" type="long" dir="out"/>
10616 </method>
10617
10618 <method name="setVideoModeHint">
10619 <desc>
10620 Asks VirtualBox to request the given video mode from
10621 the guest. This is just a hint and it cannot be guaranteed
10622 that the requested resolution will be used. Guest Additions
10623 are required for the request to be seen by guests. The caller
10624 should issue the request and wait for a resolution change and
10625 after a timeout retry.
10626
10627 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10628 parameters means that the corresponding values should be taken from the
10629 current video mode (i.e. left unchanged).
10630
10631 If the guest OS supports multi-monitor configuration then the @a display
10632 parameter specifies the number of the guest display to send the hint to:
10633 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10634 so on. If the multi-monitor configuration is not supported, @a display
10635 must be <tt>0</tt>.
10636
10637 <result name="E_INVALIDARG">
10638 The @a display is not associated with any monitor.
10639 </result>
10640
10641 </desc>
10642 <param name="width" type="unsigned long" dir="in"/>
10643 <param name="height" type="unsigned long" dir="in"/>
10644 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10645 <param name="display" type="unsigned long" dir="in"/>
10646 </method>
10647
10648 <method name="setSeamlessMode">
10649 <desc>
10650 Enables or disables seamless guest display rendering (seamless desktop
10651 integration) mode.
10652 <note>
10653 Calling this method has no effect if <link
10654 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10655 </note>
10656 </desc>
10657 <param name="enabled" type="boolean" dir="in"/>
10658 </method>
10659
10660 <method name="takeScreenShot">
10661 <desc>
10662 Takes a screen shot of the requested size and copies it to the
10663 32-bpp buffer allocated by the caller.
10664
10665 <result name="E_NOTIMPL">
10666 Feature not implemented.
10667 </result>
10668 <result name="VBOX_E_IPRT_ERROR">
10669 Could not take a screenshot.
10670 </result>
10671
10672 </desc>
10673 <param name="address" type="octet" mod="ptr" dir="in"/>
10674 <param name="width" type="unsigned long" dir="in"/>
10675 <param name="height" type="unsigned long" dir="in"/>
10676 </method>
10677
10678 <method name="drawToScreen">
10679 <desc>
10680 Draws a 32-bpp image of the specified size from the given buffer
10681 to the given point on the VM display.
10682
10683 <result name="E_NOTIMPL">
10684 Feature not implemented.
10685 </result>
10686 <result name="VBOX_E_IPRT_ERROR">
10687 Could not draw to screen.
10688 </result>
10689
10690 </desc>
10691 <param name="address" type="octet" mod="ptr" dir="in"/>
10692 <param name="x" type="unsigned long" dir="in"/>
10693 <param name="y" type="unsigned long" dir="in"/>
10694 <param name="width" type="unsigned long" dir="in"/>
10695 <param name="height" type="unsigned long" dir="in"/>
10696 </method>
10697
10698 <method name="invalidateAndUpdate">
10699 <desc>
10700 Does a full invalidation of the VM display and instructs the VM
10701 to update it.
10702
10703 <result name="VBOX_E_IPRT_ERROR">
10704 Could not invalidate and update screen.
10705 </result>
10706
10707 </desc>
10708 </method>
10709
10710 <method name="resizeCompleted">
10711 <desc>
10712 Signals that a framebuffer has completed the resize operation.
10713
10714 <result name="VBOX_E_NOT_SUPPORTED">
10715 Operation only valid for external frame buffers.
10716 </result>
10717
10718 </desc>
10719 <param name="screenId" type="unsigned long" dir="in"/>
10720 </method>
10721
10722 <method name="updateCompleted">
10723 <desc>
10724 Signals that a framebuffer has completed the update operation.
10725
10726 <result name="VBOX_E_NOT_SUPPORTED">
10727 Operation only valid for external frame buffers.
10728 </result>
10729
10730 </desc>
10731 </method>
10732
10733 </interface>
10734
10735 <!--
10736 // INetworkAdapter
10737 /////////////////////////////////////////////////////////////////////////
10738 -->
10739
10740 <enum
10741 name="NetworkAttachmentType"
10742 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10743 >
10744 <desc>
10745 Network attachment type.
10746 </desc>
10747
10748 <const name="Null" value="0">
10749 <desc>Null value, also means "not attached".</desc>
10750 </const>
10751 <const name="NAT" value="1"/>
10752 <const name="Bridged" value="2"/>
10753 <const name="Internal" value="3"/>
10754 <const name="HostOnly" value="4"/>
10755 </enum>
10756
10757 <enum
10758 name="NetworkAdapterType"
10759 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10760 >
10761 <desc>
10762 Network adapter type.
10763 </desc>
10764
10765 <const name="Null" value="0">
10766 <desc>Null value (never used by the API).</desc>
10767 </const>
10768 <const name="Am79C970A" value="1"/>
10769 <const name="Am79C973" value="2"/>
10770 <const name="I82540EM" value="3"/>
10771 <const name="I82543GC" value="4"/>
10772 </enum>
10773
10774 <interface
10775 name="INetworkAdapter" extends="$unknown"
10776 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10777 wsmap="managed"
10778 >
10779 <desc>
10780 Represents a virtual network adapter that is attached to a virtual machine.
10781 Each virtual machine has a fixed number of network adapter slots with one
10782 instance of this attached to each of them. Call
10783 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10784 is attached to a given slot in a given machine.
10785
10786 Each network adapter can be in one of five attachment modes, which are
10787 represented by the <link to="NetworkAttachmentType" /> enumeration;
10788 see the <link to="#attachmentType" /> attribute.
10789 </desc>
10790
10791 <attribute name="adapterType" type="NetworkAdapterType">
10792 <desc>
10793 Type of the virtual network adapter. Depending on this value,
10794 VirtualBox will provide a different virtual network hardware
10795 to the guest.
10796 </desc>
10797 </attribute>
10798
10799 <attribute name="slot" type="unsigned long" readonly="yes">
10800 <desc>
10801 Slot number this adapter is plugged into. Corresponds to
10802 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10803 to obtain this instance.
10804 </desc>
10805 </attribute>
10806
10807 <attribute name="enabled" type="boolean">
10808 <desc>
10809 Flag whether the network adapter is present in the
10810 guest system. If disabled, the virtual guest hardware will
10811 not contain this network adapter. Can only be changed when
10812 the VM is not running.
10813 </desc>
10814 </attribute>
10815
10816 <attribute name="MACAddress" type="wstring">
10817 <desc>
10818 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10819 it to NULL, VirtualBox will generate a unique MAC address.
10820 </desc>
10821 </attribute>
10822
10823 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10824
10825 <attribute name="hostInterface" type="wstring">
10826 <desc>
10827 Name of the host network interface the VM is attached to.
10828 </desc>
10829 </attribute>
10830
10831 <attribute name="internalNetwork" type="wstring">
10832 <desc>
10833 Name of the internal network the VM is attached to.
10834 </desc>
10835 </attribute>
10836
10837 <attribute name="NATNetwork" type="wstring">
10838 <desc>
10839 Name of the NAT network the VM is attached to.
10840 </desc>
10841 </attribute>
10842
10843 <attribute name="cableConnected" type="boolean">
10844 <desc>
10845 Flag whether the adapter reports the cable as connected or not.
10846 It can be used to report offline situations to a VM.
10847 </desc>
10848 </attribute>
10849
10850 <attribute name="lineSpeed" type="unsigned long">
10851 <desc>
10852 Line speed reported by custom drivers, in units of 1 kbps.
10853 </desc>
10854 </attribute>
10855
10856 <attribute name="traceEnabled" type="boolean">
10857 <desc>
10858 Flag whether network traffic from/to the network card should be traced.
10859 Can only be toggled when the VM is turned off.
10860 </desc>
10861 </attribute>
10862
10863 <attribute name="traceFile" type="wstring">
10864 <desc>
10865 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10866 will be used.
10867 </desc>
10868 </attribute>
10869
10870 <method name="attachToNAT">
10871 <desc>
10872 Attach the network adapter to the Network Address Translation (NAT) interface.
10873 </desc>
10874 </method>
10875
10876 <method name="attachToBridgedInterface">
10877 <desc>
10878 Attach the network adapter to a bridged host interface.
10879 </desc>
10880 </method>
10881
10882 <method name="attachToInternalNetwork">
10883 <desc>
10884 Attach the network adapter to an internal network.
10885 </desc>
10886 </method>
10887
10888 <method name="attachToHostOnlyInterface">
10889 <desc>
10890 Attach the network adapter to the host-only network.
10891 </desc>
10892 </method>
10893
10894 <method name="detach">
10895 <desc>
10896 Detach the network adapter
10897 </desc>
10898 </method>
10899 </interface>
10900
10901
10902 <!--
10903 // ISerialPort
10904 /////////////////////////////////////////////////////////////////////////
10905 -->
10906
10907 <enum
10908 name="PortMode"
10909 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
10910 >
10911 <desc>
10912 The PortMode enumeration represents possible communication modes for
10913 the virtual serial port device.
10914 </desc>
10915
10916 <const name="Disconnected" value="0">
10917 <desc>Virtual device is not attached to any real host device.</desc>
10918 </const>
10919 <const name="HostPipe" value="1">
10920 <desc>Virtual device is attached to a host pipe.</desc>
10921 </const>
10922 <const name="HostDevice" value="2">
10923 <desc>Virtual device is attached to a host device.</desc>
10924 </const>
10925 </enum>
10926
10927 <interface
10928 name="ISerialPort" extends="$unknown"
10929 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10930 wsmap="managed"
10931 >
10932
10933 <desc>
10934 The ISerialPort interface represents the virtual serial port device.
10935
10936 The virtual serial port device acts like an ordinary serial port
10937 inside the virtual machine. This device communicates to the real
10938 serial port hardware in one of two modes: host pipe or host device.
10939
10940 In host pipe mode, the #path attribute specifies the path to the pipe on
10941 the host computer that represents a serial port. The #server attribute
10942 determines if this pipe is created by the virtual machine process at
10943 machine startup or it must already exist before starting machine
10944 execution.
10945
10946 In host device mode, the #path attribute specifies the name of the
10947 serial port device on the host computer.
10948
10949 There is also a third communication mode: the disconnected mode. In this
10950 mode, the guest OS running inside the virtual machine will be able to
10951 detect the serial port, but all port write operations will be discarded
10952 and all port read operations will return no data.
10953
10954 <see>IMachine::getSerialPort</see>
10955 </desc>
10956
10957 <attribute name="slot" type="unsigned long" readonly="yes">
10958 <desc>
10959 Slot number this serial port is plugged into. Corresponds to
10960 the value you pass to <link to="IMachine::getSerialPort"/>
10961 to obtain this instance.
10962 </desc>
10963 </attribute>
10964
10965 <attribute name="enabled" type="boolean">
10966 <desc>
10967 Flag whether the serial port is enabled. If disabled,
10968 the serial port will not be reported to the guest OS.
10969 </desc>
10970 </attribute>
10971
10972 <attribute name="IOBase" type="unsigned long">
10973 <desc>Base I/O address of the serial port.</desc>
10974 </attribute>
10975
10976 <attribute name="IRQ" type="unsigned long">
10977 <desc>IRQ number of the serial port.</desc>
10978 </attribute>
10979
10980 <attribute name="hostMode" type="PortMode">
10981 <desc>
10982 How is this port connected to the host.
10983 <note>
10984 Changing this attribute may fail if the conditions for
10985 <link to="#path"/> are not met.
10986 </note>
10987 </desc>
10988 </attribute>
10989
10990 <attribute name="server" type="boolean">
10991 <desc>
10992 Flag whether this serial port acts as a server (creates a new pipe on
10993 the host) or as a client (uses the existing pipe). This attribute is
10994 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10995 </desc>
10996 </attribute>
10997
10998 <attribute name="path" type="wstring">
10999 <desc>
11000 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
11001 PortMode_HostPipe, or the host serial device name when
11002 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
11003 cases, setting a @c null or an empty string as the attribute's value
11004 will result into an error. Otherwise, the value of this property is
11005 ignored.
11006 </desc>
11007 </attribute>
11008
11009 </interface>
11010
11011 <!--
11012 // IParallelPort
11013 /////////////////////////////////////////////////////////////////////////
11014 -->
11015
11016 <interface
11017 name="IParallelPort" extends="$unknown"
11018 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11019 wsmap="managed"
11020 >
11021
11022 <desc>
11023 The IParallelPort interface represents the virtual parallel port device.
11024
11025 The virtual parallel port device acts like an ordinary parallel port
11026 inside the virtual machine. This device communicates to the real
11027 parallel port hardware using the name of the parallel device on the host
11028 computer specified in the #path attribute.
11029
11030 Each virtual parallel port device is assigned a base I/O address and an
11031 IRQ number that will be reported to the guest operating system and used
11032 to operate the given parallel port from within the virtual machine.
11033
11034 <see>IMachine::getParallelPort</see>
11035 </desc>
11036
11037 <attribute name="slot" type="unsigned long" readonly="yes">
11038 <desc>
11039 Slot number this parallel port is plugged into. Corresponds to
11040 the value you pass to <link to="IMachine::getParallelPort"/>
11041 to obtain this instance.
11042 </desc>
11043 </attribute>
11044
11045 <attribute name="enabled" type="boolean">
11046 <desc>
11047 Flag whether the parallel port is enabled. If disabled,
11048 the parallel port will not be reported to the guest OS.
11049 </desc>
11050 </attribute>
11051
11052 <attribute name="IOBase" type="unsigned long">
11053 <desc>Base I/O address of the parallel port.</desc>
11054 </attribute>
11055
11056 <attribute name="IRQ" type="unsigned long">
11057 <desc>IRQ number of the parallel port.</desc>
11058 </attribute>
11059
11060 <attribute name="path" type="wstring">
11061 <desc>
11062 Host parallel device name. If this parallel port is enabled, setting a
11063 @c null or an empty string as this attribute's value will result into
11064 an error.
11065 </desc>
11066 </attribute>
11067
11068 </interface>
11069
11070
11071 <!--
11072 // IMachineDebugger
11073 /////////////////////////////////////////////////////////////////////////
11074 -->
11075
11076 <interface
11077 name="IMachineDebugger" extends="$unknown"
11078 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11079 wsmap="suppress"
11080 >
11081 <method name="resetStats">
11082 <desc>
11083 Reset VM statistics.
11084 </desc>
11085 <param name="pattern" type="wstring" dir="in">
11086 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11087 </param>
11088 </method>
11089
11090 <method name="dumpStats">
11091 <desc>
11092 Dumps VM statistics.
11093 </desc>
11094 <param name="pattern" type="wstring" dir="in">
11095 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11096 </param>
11097 </method>
11098
11099 <method name="getStats">
11100 <desc>
11101 Get the VM statistics in a XMLish format.
11102 </desc>
11103 <param name="pattern" type="wstring" dir="in">
11104 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11105 </param>
11106 <param name="withDescriptions" type="boolean" dir="in">
11107 <desc>Whether to include the descriptions.</desc>
11108 </param>
11109 <param name="stats" type="wstring" dir="out">
11110 <desc>The XML document containing the statistics.</desc>
11111 </param>
11112 </method>
11113
11114 <method name="injectNMI">
11115 <desc>
11116 Inject an NMI into a running VT-x/AMD-V VM.
11117 </desc>
11118 </method>
11119
11120 <attribute name="singlestep" type="boolean">
11121 <desc>Switch for enabling singlestepping.</desc>
11122 </attribute>
11123
11124 <attribute name="recompileUser" type="boolean">
11125 <desc>Switch for forcing code recompilation for user mode code.</desc>
11126 </attribute>
11127
11128 <attribute name="recompileSupervisor" type="boolean">
11129 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11130 </attribute>
11131
11132 <attribute name="PATMEnabled" type="boolean">
11133 <desc>Switch for enabling and disabling the PATM component.</desc>
11134 </attribute>
11135
11136 <attribute name="CSAMEnabled" type="boolean">
11137 <desc>Switch for enabling and disabling the CSAM component.</desc>
11138 </attribute>
11139
11140 <attribute name="logEnabled" type="boolean">
11141 <desc>Switch for enabling and disabling logging.</desc>
11142 </attribute>
11143
11144 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11145 <desc>
11146 Flag indicating whether the VM is currently making use of CPU hardware
11147 virtualization extensions.
11148 </desc>
11149 </attribute>
11150
11151 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11152 <desc>
11153 Flag indicating whether the VM is currently making use of the nested paging
11154 CPU hardware virtualization extension.
11155 </desc>
11156 </attribute>
11157
11158 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11159 <desc>
11160 Flag indicating whether the VM is currently making use of the VPID
11161 VT-x extension.
11162 </desc>
11163 </attribute>
11164
11165 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11166 <desc>
11167 Flag indicating whether the VM is currently making use of the Physical
11168 Address Extension CPU feature.
11169 </desc>
11170 </attribute>
11171
11172 <attribute name="virtualTimeRate" type="unsigned long">
11173 <desc>
11174 The rate at which the virtual time runs expressed as a percentage.
11175 The accepted range is 2% to 20000%.
11176 </desc>
11177 </attribute>
11178
11179 <!-- @todo method for setting log flags, groups and destination! -->
11180
11181 <attribute name="VM" type="unsigned long long" readonly="yes">
11182 <desc>
11183 Gets the VM handle. This is only for internal use while
11184 we carve the details of this interface.
11185 </desc>
11186 </attribute>
11187
11188 </interface>
11189
11190 <!--
11191 // IUSBController
11192 /////////////////////////////////////////////////////////////////////////
11193 -->
11194
11195 <interface
11196 name="IUSBController" extends="$unknown"
11197 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11198 wsmap="managed"
11199 >
11200 <attribute name="enabled" type="boolean">
11201 <desc>
11202 Flag whether the USB controller is present in the
11203 guest system. If disabled, the virtual guest hardware will
11204 not contain any USB controller. Can only be changed when
11205 the VM is powered off.
11206 </desc>
11207 </attribute>
11208
11209 <attribute name="enabledEhci" type="boolean">
11210 <desc>
11211 Flag whether the USB EHCI controller is present in the
11212 guest system. If disabled, the virtual guest hardware will
11213 not contain a USB EHCI controller. Can only be changed when
11214 the VM is powered off.
11215 </desc>
11216 </attribute>
11217
11218 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11219 <desc>
11220 USB standard version which the controller implements.
11221 This is a BCD which means that the major version is in the
11222 high byte and minor version is in the low byte.
11223 </desc>
11224 </attribute>
11225
11226 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11227 <desc>
11228 List of USB device filters associated with the machine.
11229
11230 If the machine is currently running, these filters are activated
11231 every time a new (supported) USB device is attached to the host
11232 computer that was not ignored by global filters
11233 (<link to="IHost::USBDeviceFilters"/>).
11234
11235 These filters are also activated when the machine is powered up.
11236 They are run against a list of all currently available USB
11237 devices (in states
11238 <link to="USBDeviceState_Available"/>,
11239 <link to="USBDeviceState_Busy"/>,
11240 <link to="USBDeviceState_Held"/>) that were not previously
11241 ignored by global filters.
11242
11243 If at least one filter matches the USB device in question, this
11244 device is automatically captured (attached to) the virtual USB
11245 controller of this machine.
11246
11247 <see>IUSBDeviceFilter, ::IUSBController</see>
11248 </desc>
11249 </attribute>
11250
11251 <method name="createDeviceFilter">
11252 <desc>
11253 Creates a new USB device filter. All attributes except
11254 the filter name are set to <tt>null</tt> (any match),
11255 <i>active</i> is <tt>false</tt> (the filter is not active).
11256
11257 The created filter can then be added to the list of filters using
11258 <link to="#insertDeviceFilter"/>.
11259
11260 <result name="VBOX_E_INVALID_VM_STATE">
11261 The virtual machine is not mutable.
11262 </result>
11263
11264 <see>#deviceFilters</see>
11265 </desc>
11266 <param name="name" type="wstring" dir="in">
11267 <desc>
11268 Filter name. See <link to="IUSBDeviceFilter::name"/>
11269 for more info.
11270 </desc>
11271 </param>
11272 <param name="filter" type="IUSBDeviceFilter" dir="return">
11273 <desc>Created filter object.</desc>
11274 </param>
11275 </method>
11276
11277 <method name="insertDeviceFilter">
11278 <desc>
11279 Inserts the given USB device to the specified position
11280 in the list of filters.
11281
11282 Positions are numbered starting from <tt>0</tt>. If the specified
11283 position is equal to or greater than the number of elements in
11284 the list, the filter is added to the end of the collection.
11285
11286 <note>
11287 Duplicates are not allowed, so an attempt to insert a
11288 filter that is already in the collection, will return an
11289 error.
11290 </note>
11291
11292 <result name="VBOX_E_INVALID_VM_STATE">
11293 Virtual machine is not mutable.
11294 </result>
11295 <result name="E_INVALIDARG">
11296 USB device filter not created within this VirtualBox instance.
11297 </result>
11298 <result name="VBOX_E_INVALID_OBJECT_STATE">
11299 USB device filter already in list.
11300 </result>
11301
11302 <see>#deviceFilters</see>
11303 </desc>
11304 <param name="position" type="unsigned long" dir="in">
11305 <desc>Position to insert the filter to.</desc>
11306 </param>
11307 <param name="filter" type="IUSBDeviceFilter" dir="in">
11308 <desc>USB device filter to insert.</desc>
11309 </param>
11310 </method>
11311
11312 <method name="removeDeviceFilter">
11313 <desc>
11314 Removes a USB device filter from the specified position in the
11315 list of filters.
11316
11317 Positions are numbered starting from <tt>0</tt>. Specifying a
11318 position equal to or greater than the number of elements in
11319 the list will produce an error.
11320
11321 <see>#deviceFilters</see>
11322
11323 <result name="VBOX_E_INVALID_VM_STATE">
11324 Virtual machine is not mutable.
11325 </result>
11326 <result name="E_INVALIDARG">
11327 USB device filter list empty or invalid @a position.
11328 </result>
11329
11330 </desc>
11331 <param name="position" type="unsigned long" dir="in">
11332 <desc>Position to remove the filter from.</desc>
11333 </param>
11334 <param name="filter" type="IUSBDeviceFilter" dir="return">
11335 <desc>Removed USB device filter.</desc>
11336 </param>
11337 </method>
11338
11339 </interface>
11340
11341
11342 <!--
11343 // IUSBDevice
11344 /////////////////////////////////////////////////////////////////////////
11345 -->
11346
11347 <interface
11348 name="IUSBDevice" extends="$unknown"
11349 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
11350 wsmap="managed"
11351 >
11352 <desc>
11353 The IUSBDevice interface represents a virtual USB device attached to the
11354 virtual machine.
11355
11356 A collection of objects implementing this interface is stored in the
11357 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11358 attached to a running virtual machine's USB controller.
11359 </desc>
11360
11361 <attribute name="id" type="uuid" readonly="yes">
11362 <desc>
11363 Unique USB device ID. This ID is built from #vendorId,
11364 #productId, #revision and #serialNumber.
11365 </desc>
11366 </attribute>
11367
11368 <attribute name="vendorId" type="unsigned short" readonly="yes">
11369 <desc>Vendor ID.</desc>
11370 </attribute>
11371
11372 <attribute name="productId" type="unsigned short" readonly="yes">
11373 <desc>Product ID.</desc>
11374 </attribute>
11375
11376 <attribute name="revision" type="unsigned short" readonly="yes">
11377 <desc>
11378 Product revision number. This is a packed BCD represented as
11379 unsigned short. The high byte is the integer part and the low
11380 byte is the decimal.
11381 </desc>
11382 </attribute>
11383
11384 <attribute name="manufacturer" type="wstring" readonly="yes">
11385 <desc>Manufacturer string.</desc>
11386 </attribute>
11387
11388 <attribute name="product" type="wstring" readonly="yes">
11389 <desc>Product string.</desc>
11390 </attribute>
11391
11392 <attribute name="serialNumber" type="wstring" readonly="yes">
11393 <desc>Serial number string.</desc>
11394 </attribute>
11395
11396 <attribute name="address" type="wstring" readonly="yes">
11397 <desc>Host specific address of the device.</desc>
11398 </attribute>
11399
11400 <attribute name="port" type="unsigned short" readonly="yes">
11401 <desc>
11402 Host USB port number the device is physically
11403 connected to.
11404 </desc>
11405 </attribute>
11406
11407 <attribute name="version" type="unsigned short" readonly="yes">
11408 <desc>
11409 The major USB version of the device - 1 or 2.
11410 </desc>
11411 </attribute>
11412
11413 <attribute name="portVersion" type="unsigned short" readonly="yes">
11414 <desc>
11415 The major USB version of the host USB port the device is
11416 physically connected to - 1 or 2. For devices not connected to
11417 anything this will have the same value as the version attribute.
11418 </desc>
11419 </attribute>
11420
11421 <attribute name="remote" type="boolean" readonly="yes">
11422 <desc>
11423 Whether the device is physically connected to a remote VRDP
11424 client or to a local host machine.
11425 </desc>
11426 </attribute>
11427
11428 </interface>
11429
11430
11431 <!--
11432 // IUSBDeviceFilter
11433 /////////////////////////////////////////////////////////////////////////
11434 -->
11435
11436 <interface
11437 name="IUSBDeviceFilter" extends="$unknown"
11438 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11439 wsmap="managed"
11440 >
11441 <desc>
11442 The IUSBDeviceFilter interface represents an USB device filter used
11443 to perform actions on a group of USB devices.
11444
11445 This type of filters is used by running virtual machines to
11446 automatically capture selected USB devices once they are physically
11447 attached to the host computer.
11448
11449 A USB device is matched to the given device filter if and only if all
11450 attributes of the device match the corresponding attributes of the
11451 filter (that is, attributes are joined together using the logical AND
11452 operation). On the other hand, all together, filters in the list of
11453 filters carry the semantics of the logical OR operation. So if it is
11454 desirable to create a match like "this vendor id OR this product id",
11455 one needs to create two filters and specify "any match" (see below)
11456 for unused attributes.
11457
11458 All filter attributes used for matching are strings. Each string
11459 is an expression representing a set of values of the corresponding
11460 device attribute, that will match the given filter. Currently, the
11461 following filtering expressions are supported:
11462
11463 <ul>
11464 <li><i>Interval filters</i>. Used to specify valid intervals for
11465 integer device attributes (Vendor ID, Product ID and Revision).
11466 The format of the string is:
11467
11468 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11469
11470 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11471 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11472 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11473 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11474 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11475 possible integer is assumed.
11476 </li>
11477 <li><i>Boolean filters</i>. Used to specify acceptable values for
11478 boolean device attributes. The format of the string is:
11479
11480 <tt>true|false|yes|no|0|1</tt>
11481
11482 </li>
11483 <li><i>Exact match</i>. Used to specify a single value for the given
11484 device attribute. Any string that doesn't start with <tt>int:</tt>
11485 represents the exact match. String device attributes are compared to
11486 this string including case of symbols. Integer attributes are first
11487 converted to a string (see individual filter attributes) and then
11488 compared ignoring case.
11489
11490 </li>
11491 <li><i>Any match</i>. Any value of the corresponding device attribute
11492 will match the given filter. An empty or <tt>null</tt> string is
11493 used to construct this type of filtering expressions.
11494
11495 </li>
11496 </ul>
11497
11498 <note>
11499 On the Windows host platform, interval filters are not currently
11500 available. Also all string filter attributes
11501 (<link to="#manufacturer"/>, <link to="#product"/>,
11502 <link to="#serialNumber"/>) are ignored, so they behave as
11503 <i>any match</i> no matter what string expression is specified.
11504 </note>
11505
11506 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11507 </desc>
11508
11509 <attribute name="name" type="wstring">
11510 <desc>
11511 Visible name for this filter.
11512 This name is used to visually distinguish one filter from another,
11513 so it can neither be <tt>null</tt> nor an empty string.
11514 </desc>
11515 </attribute>
11516
11517 <attribute name="active" type="boolean">
11518 <desc>Whether this filter active or has been temporarily disabled.</desc>
11519 </attribute>
11520
11521 <attribute name="vendorId" type="wstring">
11522 <desc>
11523 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11524 The string representation for the <i>exact matching</i>
11525 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11526 (including leading zeroes).
11527 </desc>
11528 </attribute>
11529
11530 <attribute name="productId" type="wstring">
11531 <desc>
11532 <link to="IUSBDevice::productId">Product ID</link> filter.
11533 The string representation for the <i>exact matching</i>
11534 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11535 (including leading zeroes).
11536 </desc>
11537 </attribute>
11538
11539 <attribute name="revision" type="wstring">
11540 <desc>
11541 <link to="IUSBDevice::productId">Product revision number</link>
11542 filter. The string representation for the <i>exact matching</i>
11543 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11544 of the integer part of the revision, and <tt>F</tt> is the
11545 decimal digit of its fractional part (including leading and
11546 trailing zeros).
11547 Note that for interval filters, it's best to use the hexadecimal
11548 form, because the revision is stored as a 16 bit packed BCD value;
11549 so the expression <tt>int:0x0100-0x0199</tt> will match any
11550 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11551 </desc>
11552 </attribute>
11553
11554 <attribute name="manufacturer" type="wstring">
11555 <desc>
11556 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11557 </desc>
11558 </attribute>
11559
11560 <attribute name="product" type="wstring">
11561 <desc>
11562 <link to="IUSBDevice::product">Product</link> filter.
11563 </desc>
11564 </attribute>
11565
11566 <attribute name="serialNumber" type="wstring">
11567 <desc>
11568 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11569 </desc>
11570 </attribute>
11571
11572 <attribute name="port" type="wstring">
11573 <desc>
11574 <link to="IUSBDevice::port">Host USB port</link> filter.
11575 </desc>
11576 </attribute>
11577
11578 <attribute name="remote" type="wstring">
11579 <desc>
11580 <link to="IUSBDevice::remote">Remote state</link> filter.
11581 <note>
11582 This filter makes sense only for machine USB filters,
11583 i.e. it is ignored by IHostUSBDeviceFilter objects.
11584 </note>
11585 </desc>
11586 </attribute>
11587
11588 <attribute name="maskedInterfaces" type="unsigned long">
11589 <desc>
11590 This is an advanced option for hiding one or more USB interfaces
11591 from the guest. The value is a bit mask where the bits that are set
11592 means the corresponding USB interface should be hidden, masked off
11593 if you like.
11594 This feature only works on Linux hosts.
11595 </desc>
11596 </attribute>
11597
11598 </interface>
11599
11600
11601 <!--
11602 // IHostUSBDevice
11603 /////////////////////////////////////////////////////////////////////////
11604 -->
11605
11606 <enum
11607 name="USBDeviceState"
11608 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11609 >
11610 <desc>
11611 USB device state. This enumeration represents all possible states
11612 of the USB device physically attached to the host computer regarding
11613 its state on the host computer and availability to guest computers
11614 (all currently running virtual machines).
11615
11616 Once a supported USB device is attached to the host, global USB
11617 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11618 either ignore the device, or put it to USBDeviceState_Held state, or do
11619 nothing. Unless the device is ignored by global filters, filters of all
11620 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11621 activated that can put it to USBDeviceState_Captured state.
11622
11623 If the device was ignored by global filters, or didn't match
11624 any filters at all (including guest ones), it is handled by the host
11625 in a normal way. In this case, the device state is determined by
11626 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11627 or USBDeviceState_Available, depending on the current device usage.
11628
11629 Besides auto-capturing based on filters, the device can be manually
11630 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11631 state is USBDeviceState_Busy, USBDeviceState_Available or
11632 USBDeviceState_Held.
11633
11634 <note>
11635 Due to differences in USB stack implementations in Linux and Win32,
11636 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11637 only to the Linux version of the product. This also means that (<link
11638 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11639 device state is USBDeviceState_Held.
11640 </note>
11641
11642 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11643 </desc>
11644
11645 <const name="NotSupported" value="0">
11646 <desc>
11647 Not supported by the VirtualBox server, not available to guests.
11648 </desc>
11649 </const>
11650 <const name="Unavailable" value="1">
11651 <desc>
11652 Being used by the host computer exclusively,
11653 not available to guests.
11654 </desc>
11655 </const>
11656 <const name="Busy" value="2">
11657 <desc>
11658 Being used by the host computer, potentially available to guests.
11659 </desc>
11660 </const>
11661 <const name="Available" value="3">
11662 <desc>
11663 Not used by the host computer, available to guests (the host computer
11664 can also start using the device at any time).
11665 </desc>
11666 </const>
11667 <const name="Held" value="4">
11668 <desc>
11669 Held by the VirtualBox server (ignored by the host computer),
11670 available to guests.
11671 </desc>
11672 </const>
11673 <const name="Captured" value="5">
11674 <desc>
11675 Captured by one of the guest computers, not available
11676 to anybody else.
11677 </desc>
11678 </const>
11679 </enum>
11680
11681 <interface
11682 name="IHostUSBDevice" extends="IUSBDevice"
11683 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11684 wsmap="managed"
11685 >
11686 <desc>
11687 The IHostUSBDevice interface represents a physical USB device attached
11688 to the host computer.
11689
11690 Besides properties inherited from IUSBDevice, this interface adds the
11691 <link to="#state"/> property that holds the current state of the USB
11692 device.
11693
11694 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11695 </desc>
11696
11697 <attribute name="state" type="USBDeviceState" readonly="yes">
11698 <desc>
11699 Current state of the device.
11700 </desc>
11701 </attribute>
11702
11703 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11704
11705 </interface>
11706
11707
11708 <!--
11709 // IHostUSBDeviceFilter
11710 /////////////////////////////////////////////////////////////////////////
11711 -->
11712
11713 <enum
11714 name="USBDeviceFilterAction"
11715 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11716 >
11717 <desc>
11718 Actions for host USB device filters.
11719 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11720 </desc>
11721
11722 <const name="Null" value="0">
11723 <desc>Null value (never used by the API).</desc>
11724 </const>
11725 <const name="Ignore" value="1">
11726 <desc>Ignore the matched USB device.</desc>
11727 </const>
11728 <const name="Hold" value="2">
11729 <desc>Hold the matched USB device.</desc>
11730 </const>
11731 </enum>
11732
11733 <interface
11734 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11735 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11736 wsmap="managed"
11737 >
11738 <desc>
11739 The IHostUSBDeviceFilter interface represents a global filter for a
11740 physical USB device used by the host computer. Used indirectly in
11741 <link to="IHost::USBDeviceFilters"/>.
11742
11743 Using filters of this type, the host computer determines the initial
11744 state of the USB device after it is physically attached to the
11745 host's USB controller.
11746
11747 <note>
11748 The <link to="#remote"/> attribute is ignored by this type of
11749 filters, because it makes sense only for
11750 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11751 </note>
11752
11753 <see>IHost::USBDeviceFilters</see>
11754 </desc>
11755
11756 <attribute name="action" type="USBDeviceFilterAction">
11757 <desc>
11758 Action performed by the host when an attached USB device
11759 matches this filter.
11760 </desc>
11761 </attribute>
11762
11763 </interface>
11764
11765 <!--
11766 // IAudioAdapter
11767 /////////////////////////////////////////////////////////////////////////
11768 -->
11769
11770 <enum
11771 name="AudioDriverType"
11772 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11773 >
11774 <desc>
11775 Host audio driver type.
11776 </desc>
11777
11778 <const name="Null" value="0">
11779 <desc>Null value, also means "dummy audio driver".</desc>
11780 </const>
11781 <const name="WinMM" value="1"/>
11782 <const name="OSS" value="2"/>
11783 <const name="ALSA" value="3"/>
11784 <const name="DirectSound" value="4"/>
11785 <const name="CoreAudio" value="5"/>
11786 <const name="MMPM" value="6"/>
11787 <const name="Pulse" value="7"/>
11788 <const name="SolAudio" value="8"/>
11789 </enum>
11790
11791 <enum
11792 name="AudioControllerType"
11793 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11794 >
11795 <desc>
11796 Virtual audio controller type.
11797 </desc>
11798
11799 <const name="AC97" value="0"/>
11800 <const name="SB16" value="1"/>
11801 </enum>
11802
11803 <interface
11804 name="IAudioAdapter" extends="$unknown"
11805 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11806 wsmap="managed"
11807 >
11808 <desc>
11809 The IAudioAdapter interface represents the virtual audio adapter of
11810 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11811 </desc>
11812 <attribute name="enabled" type="boolean">
11813 <desc>
11814 Flag whether the audio adapter is present in the
11815 guest system. If disabled, the virtual guest hardware will
11816 not contain any audio adapter. Can only be changed when
11817 the VM is not running.
11818 </desc>
11819 </attribute>
11820 <attribute name="audioController" type="AudioControllerType">
11821 <desc>
11822 The audio hardware we emulate.
11823 </desc>
11824 </attribute>
11825 <attribute name="audioDriver" type="AudioDriverType">
11826 <desc>
11827 Audio driver the adapter is connected to. This setting
11828 can only be changed when the VM is not running.
11829 </desc>
11830 </attribute>
11831 </interface>
11832
11833 <!--
11834 // IVRDPServer
11835 /////////////////////////////////////////////////////////////////////////
11836 -->
11837
11838 <enum
11839 name="VRDPAuthType"
11840 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11841 >
11842 <desc>
11843 VRDP authentication type.
11844 </desc>
11845
11846 <const name="Null" value="0">
11847 <desc>Null value, also means "no authentication".</desc>
11848 </const>
11849 <const name="External" value="1"/>
11850 <const name="Guest" value="2"/>
11851 </enum>
11852
11853 <interface
11854 name="IVRDPServer" extends="$unknown"
11855 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11856 wsmap="managed"
11857 >
11858 <attribute name="enabled" type="boolean">
11859 <desc>VRDP server status.</desc>
11860 </attribute>
11861
11862 <attribute name="port" type="unsigned long">
11863 <desc>
11864 VRDP server port number.
11865 <note>
11866 Setting the value of this property to <tt>0</tt> will reset the port
11867 number to the default value which is
11868 currently <tt>3389</tt>. Reading this property will always return a
11869 real port number, even after it has been set to <tt>0</tt> (in which
11870 case the default port is returned).
11871 </note>
11872 </desc>
11873 </attribute>
11874
11875 <attribute name="netAddress" type="wstring">
11876 <desc>VRDP server address.</desc>
11877 </attribute>
11878
11879 <attribute name="authType" type="VRDPAuthType">
11880 <desc>VRDP authentication method.</desc>
11881 </attribute>
11882
11883 <attribute name="authTimeout" type="unsigned long">
11884 <desc>Timeout for guest authentication. Milliseconds.</desc>
11885 </attribute>
11886
11887 <attribute name="allowMultiConnection" type="boolean">
11888 <desc>
11889 Flag whether multiple simultaneous connections to the VM are permitted.
11890 Note that this will be replaced by a more powerful mechanism in the future.
11891 </desc>
11892 </attribute>
11893
11894 <attribute name="reuseSingleConnection" type="boolean">
11895 <desc>
11896 Flag whether the existing connection must be dropped and a new connection
11897 must be established by the VRDP server, when a new client connects in single
11898 connection mode.
11899 </desc>
11900 </attribute>
11901
11902 </interface>
11903
11904
11905 <!--
11906 // ISharedFolder
11907 /////////////////////////////////////////////////////////////////////////
11908 -->
11909
11910 <interface
11911 name="ISharedFolder" extends="$unknown"
11912 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11913 wsmap="struct"
11914 >
11915 <desc>
11916 The ISharedFolder interface represents a folder in the host computer's
11917 file system accessible from the guest OS running inside a virtual
11918 machine using an associated logical name.
11919
11920 There are three types of shared folders:
11921 <ul>
11922 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11923 folders available to all virtual machines.</li>
11924 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11925 VM-specific shared folders available to the given virtual machine at
11926 startup.</li>
11927 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11928 VM-specific shared folders created in the session context (for
11929 example, when the virtual machine is running) and automatically
11930 discarded when the session is closed (the VM is powered off).</li>
11931 </ul>
11932
11933 Logical names of shared folders must be unique within the given scope
11934 (global, permanent or transient). However, they do not need to be unique
11935 across scopes. In this case, the definition of the shared folder in a
11936 more specific scope takes precedence over definitions in all other
11937 scopes. The order of precedence is (more specific to more general):
11938 <ol>
11939 <li>Transient definitions</li>
11940 <li>Permanent definitions</li>
11941 <li>Global definitions</li>
11942 </ol>
11943
11944 For example, if MyMachine has a shared folder named
11945 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11946 transient shared folder named <tt>C_DRIVE</tt> (that points
11947 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11948 of <tt>C_DRIVE</tt> in the guest OS so
11949 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11950 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11951 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11952 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11953 to <tt>C:\\</tt> if it still exists.
11954
11955 Note that permanent and transient shared folders of different machines
11956 are in different name spaces, so they don't overlap and don't need to
11957 have unique logical names.
11958
11959 <note>
11960 Global shared folders are not implemented in the current version of the
11961 product.
11962 </note>
11963 </desc>
11964
11965 <attribute name="name" type="wstring" readonly="yes">
11966 <desc>Logical name of the shared folder.</desc>
11967 </attribute>
11968
11969 <attribute name="hostPath" type="wstring" readonly="yes">
11970 <desc>Full path to the shared folder in the host file system.</desc>
11971 </attribute>
11972
11973 <attribute name="accessible" type="boolean" readonly="yes">
11974 <desc>
11975 Whether the folder defined by the host path is currently
11976 accessible or not.
11977 For example, the folder can be unaccessible if it is placed
11978 on the network share that is not available by the time
11979 this property is read.
11980 </desc>
11981 </attribute>
11982
11983 <attribute name="writable" type="boolean" readonly="yes">
11984 <desc>
11985 Whether the folder defined by the host path is writable or
11986 not.
11987 </desc>
11988 </attribute>
11989
11990 <attribute name="lastAccessError" type="wstring" readonly="yes">
11991 <desc>
11992 Text message that represents the result of the last accessibility
11993 check.
11994
11995 Accessibility checks are performed each time the <link to="#accessible"/>
11996 attribute is read. A @c null string is returned if the last
11997 accessibility check was successful. A non-null string indicates a
11998 failure and should normally describe a reason of the failure (for
11999 example, a file read error).
12000 </desc>
12001 </attribute>
12002
12003 </interface>
12004
12005 <!--
12006 // ISession
12007 /////////////////////////////////////////////////////////////////////////
12008 -->
12009
12010 <interface
12011 name="IInternalSessionControl" extends="$unknown"
12012 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
12013 internal="yes"
12014 wsmap="suppress"
12015 >
12016 <method name="getPID">
12017 <desc>PID of the process that has created this Session object.
12018 </desc>
12019 <param name="pid" type="unsigned long" dir="return"/>
12020 </method>
12021
12022 <method name="getRemoteConsole">
12023 <desc>
12024 Returns the console object suitable for remote control.
12025
12026 <result name="VBOX_E_INVALID_VM_STATE">
12027 Session state prevents operation.
12028 </result>
12029 <result name="VBOX_E_INVALID_OBJECT_STATE">
12030 Session type prevents operation.
12031 </result>
12032
12033 </desc>
12034 <param name="console" type="IConsole" dir="return"/>
12035 </method>
12036
12037 <method name="assignMachine">
12038 <desc>
12039 Assigns the machine object associated with this direct-type
12040 session or informs the session that it will be a remote one
12041 (if @a machine == NULL).
12042
12043 <result name="VBOX_E_INVALID_VM_STATE">
12044 Session state prevents operation.
12045 </result>
12046 <result name="VBOX_E_INVALID_OBJECT_STATE">
12047 Session type prevents operation.
12048 </result>
12049
12050 </desc>
12051 <param name="machine" type="IMachine" dir="in"/>
12052 </method>
12053
12054 <method name="assignRemoteMachine">
12055 <desc>
12056 Assigns the machine and the (remote) console object associated with
12057 this remote-type session.
12058
12059 <result name="VBOX_E_INVALID_VM_STATE">
12060 Session state prevents operation.
12061 </result>
12062
12063 </desc>
12064 <param name="machine" type="IMachine" dir="in"/>
12065 <param name="console" type="IConsole" dir="in"/>
12066 </method>
12067
12068 <method name="updateMachineState">
12069 <desc>
12070 Updates the machine state in the VM process.
12071 Must be called only in certain cases
12072 (see the method implementation).
12073
12074 <result name="VBOX_E_INVALID_VM_STATE">
12075 Session state prevents operation.
12076 </result>
12077 <result name="VBOX_E_INVALID_OBJECT_STATE">
12078 Session type prevents operation.
12079 </result>
12080
12081 </desc>
12082 <param name="aMachineState" type="MachineState" dir="in"/>
12083 </method>
12084
12085 <method name="uninitialize">
12086 <desc>
12087 Uninitializes (closes) this session. Used by VirtualBox to close
12088 the corresponding remote session when the direct session dies
12089 or gets closed.
12090
12091 <result name="VBOX_E_INVALID_VM_STATE">
12092 Session state prevents operation.
12093 </result>
12094
12095 </desc>
12096 </method>
12097
12098 <method name="onDVDDriveChange">
12099 <desc>
12100 Triggered when settings of the DVD drive object of the
12101 associated virtual machine have changed.
12102
12103 <result name="VBOX_E_INVALID_VM_STATE">
12104 Session state prevents operation.
12105 </result>
12106 <result name="VBOX_E_INVALID_OBJECT_STATE">
12107 Session type prevents operation.
12108 </result>
12109
12110 </desc>
12111 </method>
12112
12113 <method name="onFloppyDriveChange">
12114 <desc>
12115 Triggered when settings of the floppy drive object of the
12116 associated virtual machine have changed.
12117
12118 <result name="VBOX_E_INVALID_VM_STATE">
12119 Session state prevents operation.
12120 </result>
12121 <result name="VBOX_E_INVALID_OBJECT_STATE">
12122 Session type prevents operation.
12123 </result>
12124
12125 </desc>
12126 </method>
12127
12128 <method name="onNetworkAdapterChange">
12129 <desc>
12130 Triggered when settings of a network adapter of the
12131 associated virtual machine have changed.
12132
12133 <result name="VBOX_E_INVALID_VM_STATE">
12134 Session state prevents operation.
12135 </result>
12136 <result name="VBOX_E_INVALID_OBJECT_STATE">
12137 Session type prevents operation.
12138 </result>
12139
12140 </desc>
12141 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12142 </method>
12143
12144 <method name="onSerialPortChange">
12145 <desc>
12146 Triggered when settings of a serial port of the
12147 associated virtual machine have changed.
12148
12149 <result name="VBOX_E_INVALID_VM_STATE">
12150 Session state prevents operation.
12151 </result>
12152 <result name="VBOX_E_INVALID_OBJECT_STATE">
12153 Session type prevents operation.
12154 </result>
12155
12156 </desc>
12157 <param name="serialPort" type="ISerialPort" dir="in"/>
12158 </method>
12159
12160 <method name="onParallelPortChange">
12161 <desc>
12162 Triggered when settings of a parallel port of the
12163 associated virtual machine have changed.
12164
12165 <result name="VBOX_E_INVALID_VM_STATE">
12166 Session state prevents operation.
12167 </result>
12168 <result name="VBOX_E_INVALID_OBJECT_STATE">
12169 Session type prevents operation.
12170 </result>
12171
12172 </desc>
12173 <param name="parallelPort" type="IParallelPort" dir="in"/>
12174 </method>
12175
12176 <method name="onStorageControllerChange">
12177 <desc>
12178 Triggered when settings of a storage controller of the
12179 associated virtual machine have changed.
12180
12181 <result name="VBOX_E_INVALID_VM_STATE">
12182 Session state prevents operation.
12183 </result>
12184 <result name="VBOX_E_INVALID_OBJECT_STATE">
12185 Session type prevents operation.
12186 </result>
12187
12188 </desc>
12189 </method>
12190
12191 <method name="onVRDPServerChange">
12192 <desc>
12193 Triggered when settings of the VRDP server object of the
12194 associated virtual machine have changed.
12195
12196 <result name="VBOX_E_INVALID_VM_STATE">
12197 Session state prevents operation.
12198 </result>
12199 <result name="VBOX_E_INVALID_OBJECT_STATE">
12200 Session type prevents operation.
12201 </result>
12202
12203 </desc>
12204 </method>
12205
12206 <method name="onUSBControllerChange">
12207 <desc>
12208 Triggered when settings of the USB controller object of the
12209 associated virtual machine have changed.
12210
12211 <result name="VBOX_E_INVALID_VM_STATE">
12212 Session state prevents operation.
12213 </result>
12214 <result name="VBOX_E_INVALID_OBJECT_STATE">
12215 Session type prevents operation.
12216 </result>
12217
12218 </desc>
12219 </method>
12220
12221 <method name="onSharedFolderChange">
12222 <desc>
12223 Triggered when a permanent (global or machine) shared folder has been
12224 created or removed.
12225 <note>
12226 We don't pass shared folder parameters in this notification because
12227 the order in which parallel notifications are delivered is not defined,
12228 therefore it could happen that these parameters were outdated by the
12229 time of processing this notification.
12230 </note>
12231
12232 <result name="VBOX_E_INVALID_VM_STATE">
12233 Session state prevents operation.
12234 </result>
12235 <result name="VBOX_E_INVALID_OBJECT_STATE">
12236 Session type prevents operation.
12237 </result>
12238
12239 </desc>
12240 <param name="global" type="boolean" dir="in"/>
12241 </method>
12242
12243 <method name="onUSBDeviceAttach">
12244 <desc>
12245 Triggered when a request to capture a USB device (as a result
12246 of matched USB filters or direct call to
12247 <link to="IConsole::attachUSBDevice"/>) has completed.
12248 A @c null @a error object means success, otherwise it
12249 describes a failure.
12250
12251 <result name="VBOX_E_INVALID_VM_STATE">
12252 Session state prevents operation.
12253 </result>
12254 <result name="VBOX_E_INVALID_OBJECT_STATE">
12255 Session type prevents operation.
12256 </result>
12257
12258 </desc>
12259 <param name="device" type="IUSBDevice" dir="in"/>
12260 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12261 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12262 </method>
12263
12264 <method name="onUSBDeviceDetach">
12265 <desc>
12266 Triggered when a request to release the USB device (as a result
12267 of machine termination or direct call to
12268 <link to="IConsole::detachUSBDevice"/>) has completed.
12269 A @c null @a error object means success, otherwise it
12270
12271 <result name="VBOX_E_INVALID_VM_STATE">
12272 Session state prevents operation.
12273 </result>
12274 <result name="VBOX_E_INVALID_OBJECT_STATE">
12275 Session type prevents operation.
12276 </result>
12277
12278 </desc>
12279 <param name="id" type="uuid" dir="in"/>
12280 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12281 </method>
12282
12283 <method name="onShowWindow">
12284 <desc>
12285 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12286 <link to="IMachine::showConsoleWindow"/> in order to notify
12287 console callbacks
12288 <link to="IConsoleCallback::onCanShowWindow"/>
12289 and <link to="IConsoleCallback::onShowWindow"/>.
12290
12291 <result name="VBOX_E_INVALID_OBJECT_STATE">
12292 Session type prevents operation.
12293 </result>
12294
12295 </desc>
12296 <param name="check" type="boolean" dir="in"/>
12297 <param name="canShow" type="boolean" dir="out"/>
12298 <param name="winId" type="unsigned long long" dir="out"/>
12299 </method>
12300
12301 <method name="accessGuestProperty">
12302 <desc>
12303 Called by <link to="IMachine::getGuestProperty"/> and by
12304 <link to="IMachine::setGuestProperty"/> in order to read and
12305 modify guest properties.
12306
12307 <result name="VBOX_E_INVALID_VM_STATE">
12308 Machine session is not open.
12309 </result>
12310 <result name="VBOX_E_INVALID_OBJECT_STATE">
12311 Session type is not direct.
12312 </result>
12313
12314 </desc>
12315 <param name="name" type="wstring" dir="in"/>
12316 <param name="value" type="wstring" dir="in"/>
12317 <param name="flags" type="wstring" dir="in"/>
12318 <param name="isSetter" type="boolean" dir="in"/>
12319 <param name="retValue" type="wstring" dir="out"/>
12320 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12321 <param name="retFlags" type="wstring" dir="out"/>
12322 </method>
12323
12324 <method name="enumerateGuestProperties">
12325 <desc>
12326 Return a list of the guest properties matching a set of patterns along
12327 with their values, time stamps and flags.
12328
12329 <result name="VBOX_E_INVALID_VM_STATE">
12330 Machine session is not open.
12331 </result>
12332 <result name="VBOX_E_INVALID_OBJECT_STATE">
12333 Session type is not direct.
12334 </result>
12335
12336 </desc>
12337 <param name="patterns" type="wstring" dir="in">
12338 <desc>
12339 The patterns to match the properties against as a comma-separated
12340 string. If this is empty, all properties currently set will be
12341 returned.
12342 </desc>
12343 </param>
12344 <param name="key" type="wstring" dir="out" safearray="yes">
12345 <desc>
12346 The key names of the properties returned.
12347 </desc>
12348 </param>
12349 <param name="value" type="wstring" dir="out" safearray="yes">
12350 <desc>
12351 The values of the properties returned. The array entries match the
12352 corresponding entries in the @a key array.
12353 </desc>
12354 </param>
12355 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12356 <desc>
12357 The time stamps of the properties returned. The array entries match
12358 the corresponding entries in the @a key array.
12359 </desc>
12360 </param>
12361 <param name="flags" type="wstring" dir="out" safearray="yes">
12362 <desc>
12363 The flags of the properties returned. The array entries match the
12364 corresponding entries in the @a key array.
12365 </desc>
12366 </param>
12367 </method>
12368
12369 </interface>
12370
12371 <interface
12372 name="ISession" extends="$dispatched"
12373 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12374 wsmap="managed"
12375 >
12376 <desc>
12377 The ISession interface represents a serialization primitive for virtual
12378 machines.
12379
12380 With VirtualBox, every time one wishes to manipulate a virtual machine
12381 (e.g. change its settings or start execution), a session object is
12382 required. Such an object must be passed to one of the session methods
12383 that open the given session, which then initiates the machine manipulation.
12384
12385 A session serves several purposes: it identifies to the inter-process VirtualBox
12386 code which process is currently working with the virtual machine, and it ensures
12387 that there are no incompatible requests from several processes for the
12388 same virtual machine. Session objects can therefore be thought of as mutex
12389 semaphores that lock virtual machines to prevent conflicting accesses from
12390 several processes.
12391
12392 How sessions objects are used depends on whether you use the Main API
12393 via COM or via the webservice:
12394
12395 <ul>
12396 <li>When using the COM API directly, an object of the Session class from the
12397 VirtualBox type library needs to be created. In regular COM C++ client code,
12398 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12399 This object will then act as a local session object in further calls to open
12400 a session.
12401 </li>
12402
12403 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12404 one session object automatically when <link to="IWebsessionManager::logon" />
12405 is called. A managed object reference to that session object can be retrieved by
12406 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12407 reference can then be used to open sessions.
12408 </li>
12409 </ul>
12410
12411 Sessions are mainly used in two variations:
12412
12413 <ul>
12414 <li>
12415 To start a virtual machine in a separate process, one would call
12416 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12417 object as its first parameter. This session then identifies the caller
12418 and lets him control the started machine (for example, pause machine
12419 execution or power it down) as well as be notified about machine
12420 execution state changes.
12421 </li>
12422
12423 <li>To alter machine settings, or to start machine execution within the
12424 current process, one needs to open a direct session for the machine first by
12425 calling <link to="IVirtualBox::openSession"/>. While a direct session
12426 is open within one process, no any other process may open another direct
12427 session for the same machine. This prevents the machine from being changed
12428 by other processes while it is running or while the machine is being configured.
12429 </li>
12430 </ul>
12431
12432 One also can attach to an existing direct session already opened by
12433 another process (for example, in order to send a control request to the
12434 virtual machine such as the pause or the reset request). This is done by
12435 calling <link to="IVirtualBox::openExistingSession"/>.
12436
12437 <note>
12438 Unless you are trying to write a new VirtualBox front-end that
12439 performs direct machine execution (like the VirtualBox or VBoxSDL
12440 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12441 session opened by <link to="IVirtualBox::openSession"/> and use this
12442 session only to change virtual machine settings. If you simply want to
12443 start virtual machine execution using one of the existing front-ends
12444 (for example the VirtualBox GUI or headless server), simply use
12445 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12446 will power up the machine automatically for you.
12447 </note>
12448 </desc>
12449
12450 <attribute name="state" type="SessionState" readonly="yes">
12451 <desc>Current state of this session.</desc>
12452 </attribute>
12453
12454 <attribute name="type" type="SessionType" readonly="yes">
12455 <desc>
12456 Type of this session. The value of this attribute is valid only
12457 if the session is currently open (i.e. its #state is
12458 SessionType_SessionOpen), otherwise an error will be returned.
12459 </desc>
12460 </attribute>
12461
12462 <attribute name="machine" type="IMachine" readonly="yes">
12463 <desc>Machine object associated with this session.</desc>
12464 </attribute>
12465
12466 <attribute name="console" type="IConsole" readonly="yes">
12467 <desc>Console object associated with this session.</desc>
12468 </attribute>
12469
12470 <method name="close">
12471 <desc>
12472 Closes a session that was previously opened.
12473
12474 It is recommended that every time an "open session" method (such as
12475 <link to="IVirtualBox::openRemoteSession" /> or
12476 <link to="IVirtualBox::openSession" />) has been called to
12477 manipulate a virtual machine, the caller invoke
12478 ISession::close() when it's done doing so. Since sessions are
12479 serialization primitives much like ordinary mutexes, they are
12480 best used the same way: for each "open" call, there should be
12481 a matching "close" call, even when errors occur.
12482
12483 Otherwise, if a direct session for a machine opened with
12484 <link to="IVirtualBox::openSession"/> is not explicitly closed
12485 when the application terminates, the state of the machine will
12486 be set to <link to="MachineState_Aborted" /> on the server.
12487
12488 Generally, it is recommended to close all open sessions explicitly
12489 before terminating the application (regardless of the reason for
12490 the termination).
12491
12492 <note>
12493 Do not expect the session state (<link to="ISession::state" />
12494 to return to "Closed" immediately after you invoke
12495 ISession::close(), particularly if you have started a remote
12496 session to execute the VM in a new process. The session state will
12497 automatically return to "Closed" once the VM is no longer executing,
12498 which can of course take a very long time.
12499 </note>
12500
12501 <result name="E_UNEXPECTED">
12502 Session is not open.
12503 </result>
12504
12505 </desc>
12506 </method>
12507
12508 </interface>
12509
12510 <!--
12511 // IStorageController
12512 /////////////////////////////////////////////////////////////////////////
12513 -->
12514
12515 <enum
12516 name="StorageBus"
12517 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12518 >
12519 <desc>
12520 The connection type of the storage controller.
12521 </desc>
12522 <const name="Null" value="0">
12523 <desc><tt>null</tt> value. Never used by the API.</desc>
12524 </const>
12525 <const name="IDE" value="1"/>
12526 <const name="SATA" value="2"/>
12527 <const name="SCSI" value="3"/>
12528 </enum>
12529
12530 <enum
12531 name="StorageControllerType"
12532 uuid="685387db-a837-4320-a258-08f46a22f62a"
12533 >
12534 <desc>
12535 Storage controller type.
12536 </desc>
12537
12538 <const name="Null" value="0">
12539 <desc><tt>null</tt> value. Never used by the API.</desc>
12540 </const>
12541 <const name="LsiLogic" value="1"/>
12542 <const name="BusLogic" value="2"/>
12543 <const name="IntelAhci" value="3"/>
12544 <const name="PIIX3" value="4"/>
12545 <const name="PIIX4" value="5"/>
12546 <const name="ICH6" value="6"/>
12547 </enum>
12548
12549 <interface
12550 name="IStorageController" extends="$unknown"
12551 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12552 wsmap="managed"
12553 >
12554 <desc>
12555 Represents a storage controller that is attached to a virtual machine
12556 (<link to="IMachine" />). Just as hard disks are attached to storage
12557 controllers in a real computer, virtual hard disks (represented by
12558 <link to="IHardDisk" />) are attached to virtual storage controllers,
12559 represented by this interface.
12560
12561 VirtualBox supports three types of virtual storage controller hardware:
12562 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12563 these three is used, certain sub-types are available and can be
12564 selected in <link to="#controllerType" />.
12565 </desc>
12566
12567 <attribute name="name" type="wstring" readonly="yes">
12568 <desc>
12569 Name of the storage controller, as originally specified with
12570 <link to="IMachine::addStorageController" />. This then uniquely
12571 identifies this controller with other method calls such as
12572 <link to="IMachine::attachHardDisk" />.
12573 </desc>
12574 </attribute>
12575
12576 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12577 <desc>
12578 Maximum number of devices which can be attached to one port.
12579 </desc>
12580 </attribute>
12581
12582 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12583 <desc>
12584 Minimum number of ports which can be set with
12585 <link to="IStorageController::SetPortCount"/>.
12586 </desc>
12587 </attribute>
12588
12589 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12590 <desc>
12591 Maximum number of ports which can be set with
12592 <link to="IStorageController::SetPortCount"/>.
12593 </desc>
12594 </attribute>
12595
12596 <attribute name="instance" type="unsigned long">
12597 <desc>
12598 The instance number of the device in the running VM.
12599 </desc>
12600 </attribute>
12601
12602 <attribute name="portCount" type="unsigned long">
12603 <desc>
12604 The number of currently usable ports on the controller.
12605 The minimum and maximum number of ports for one controller type can
12606 be determined with <link to="IStorageController::GetMinPortCount"/>
12607 and <link to="IStorageController::GetMaxPortCount"/>..
12608 </desc>
12609 </attribute>
12610
12611 <attribute name="bus" type="StorageBus" readonly="yes">
12612 <desc>
12613 The connection type of the storage controller.
12614 </desc>
12615 </attribute>
12616
12617 <attribute name="controllerType" type="StorageControllerType">
12618 <desc>
12619 Type of the virtual storage controller. Depending on this value,
12620 VirtualBox will provide a different virtual storage controller hardware
12621 to the guest.
12622
12623 For SCSI controllers, the default type is LsiLogic.
12624 </desc>
12625 </attribute>
12626
12627 <method name="GetIDEEmulationPort">
12628 <desc>
12629 Gets the corresponding port number which is emulated as an IDE device.
12630
12631 <result name="E_INVALIDARG">
12632 The @a devicePosition is not in the range 0 to 3.
12633 </result>
12634 <result name="E_NOTIMPL">
12635 The storage controller type is not SATAIntelAhci.
12636 </result>
12637
12638 </desc>
12639 <param name="devicePosition" type="long" dir="in"/>
12640 <param name="portNumber" type="long" dir="return"/>
12641 </method>
12642
12643 <method name="SetIDEEmulationPort">
12644 <desc>
12645 Sets the port number which is emulated as an IDE device.
12646
12647 <result name="E_INVALIDARG">
12648 The @a devicePosition is not in the range 0 to 3 or the
12649 @a portNumber is not in the range 0 to 29.
12650 </result>
12651 <result name="E_NOTIMPL">
12652 The storage controller type is not SATAIntelAhci.
12653 </result>
12654
12655 </desc>
12656 <param name="devicePosition" type="long" dir="in"/>
12657 <param name="portNumber" type="long" dir="in"/>
12658 </method>
12659
12660 </interface>
12661
12662<if target="wsdl">
12663
12664 <!--
12665 // IManagedObjectRef
12666 /////////////////////////////////////////////////////////////////////////
12667 -->
12668
12669 <interface
12670 name="IManagedObjectRef" extends="$unknown"
12671 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12672 internal="yes"
12673 wsmap="managed"
12674 wscpp="hardcoded"
12675 >
12676 <desc>
12677 Managed object reference.
12678
12679 Only within the webservice, a managed object reference (which is really
12680 an opaque number) allows a webservice client to address an object
12681 that lives in the address space of the webservice server.
12682
12683 Behind each managed object reference, there is a COM object that lives
12684 in the webservice server's address space. The COM object is not freed
12685 until the managed object reference is released, either by an explicit
12686 call to <link to="IManagedObjectRef::release" /> or by logging off from
12687 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12688 all objects created during the webservice session.
12689
12690 Whenever a method call of the VirtualBox API returns a COM object, the
12691 webservice representation of that method will instead return a
12692 managed object reference, which can then be used to invoke methods
12693 on that object.
12694 </desc>
12695
12696 <method name="getInterfaceName">
12697 <desc>
12698 Returns the name of the interface that this managed object represents,
12699 for example, "IMachine", as a string.
12700 </desc>
12701 <param name="return" type="wstring" dir="return"/>
12702 </method>
12703
12704 <method name="release">
12705 <desc>
12706 Releases this managed object reference and frees the resources that
12707 were allocated for it in the webservice server process. After calling
12708 this method, the identifier of the reference can no longer be used.
12709 </desc>
12710 </method>
12711
12712 </interface>
12713
12714 <!--
12715 // IWebsessionManager
12716 /////////////////////////////////////////////////////////////////////////
12717 -->
12718
12719 <interface
12720 name="IWebsessionManager" extends="$unknown"
12721 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12722 internal="yes"
12723 wsmap="global"
12724 wscpp="hardcoded"
12725 >
12726 <desc>
12727 Websession manager. This provides essential services
12728 to webservice clients.
12729 </desc>
12730 <method name="logon">
12731 <desc>
12732 Logs a new client onto the webservice and returns a managed object reference to
12733 the IVirtualBox instance, which the client can then use as a basis to further
12734 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12735 interface, in one way or the other.
12736 </desc>
12737 <param name="username" type="wstring" dir="in"/>
12738 <param name="password" type="wstring" dir="in"/>
12739 <param name="return" type="IVirtualBox" dir="return"/>
12740 </method>
12741
12742 <method name="getSessionObject">
12743 <desc>
12744 Returns a managed object reference to the internal ISession object that was created
12745 for this web service session when the client logged on.
12746
12747 <see>ISession</see>
12748 </desc>
12749 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12750 <param name="return" type="ISession" dir="return"/>
12751 </method>
12752
12753 <method name="logoff">
12754 <desc>
12755 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12756 and destroys all resources associated with the session (most importantly, all
12757 managed objects created in the server while the session was active).
12758 </desc>
12759 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12760 </method>
12761
12762 </interface>
12763
12764</if>
12765
12766 <!--
12767 // IPerformanceCollector & friends
12768 /////////////////////////////////////////////////////////////////////////
12769 -->
12770
12771 <interface
12772 name="IPerformanceMetric" extends="$unknown"
12773 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12774 >
12775 <desc>
12776 The IPerformanceMetric interface represents parameters of the given
12777 performance metric.
12778 </desc>
12779
12780 <attribute name="metricName" type="wstring" readonly="yes">
12781 <desc>
12782 Name of the metric.
12783 </desc>
12784 </attribute>
12785
12786 <attribute name="object" type="$unknown" readonly="yes">
12787 <desc>
12788 Object this metric belongs to.
12789 </desc>
12790 </attribute>
12791
12792 <attribute name="description" type="wstring" readonly="yes">
12793 <desc>
12794 Textual description of the metric.
12795 </desc>
12796 </attribute>
12797
12798 <attribute name="period" type="unsigned long" readonly="yes">
12799 <desc>
12800 Time interval between samples, measured in seconds.
12801 </desc>
12802 </attribute>
12803
12804 <attribute name="count" type="unsigned long" readonly="yes">
12805 <desc>
12806 Number of recent samples retained by the performance collector for this
12807 metric.
12808
12809 When the collected sample count exceeds this number, older samples
12810 are discarded.
12811 </desc>
12812 </attribute>
12813
12814 <attribute name="unit" type="wstring" readonly="yes">
12815 <desc>
12816 Unit of measurement.
12817 </desc>
12818 </attribute>
12819
12820 <attribute name="minimumValue" type="long" readonly="yes">
12821 <desc>
12822 Minimum possible value of this metric.
12823 </desc>
12824 </attribute>
12825
12826 <attribute name="maximumValue" type="long" readonly="yes">
12827 <desc>
12828 Maximum possible value of this metric.
12829 </desc>
12830 </attribute>
12831 </interface>
12832
12833 <interface
12834 name="IPerformanceCollector" extends="$unknown"
12835 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12836 wsmap="managed"
12837 >
12838 <desc>
12839 The IPerformanceCollector interface represents a service that collects and
12840 stores performance metrics data.
12841
12842 Performance metrics are associated with objects like IHost and
12843 IMachine. Each object has a distinct set of performance metrics.
12844 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12845
12846 Metric data are collected at the specified intervals and are retained
12847 internally. The interval and the number of samples retained can be set
12848 with <link to="IPerformanceCollector::setupMetrics" />.
12849
12850 Metrics are organized hierarchically, each level separated by slash (/).
12851 General scheme for metric name is
12852 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12853 metric name stands for: CPU category, Load metric, User submetric, average
12854 aggregate. An aggregate function is computed over all retained data. Valid
12855 aggregate functions are:
12856
12857 <ul>
12858 <li>avg -- average</li>
12859 <li>min -- minimum</li>
12860 <li>max -- maximum</li>
12861 </ul>
12862
12863 "Category/Metric" together form base metric name. A base metric is the
12864 smallest unit for which a sampling interval and the number of retained
12865 samples can be set. Only base metrics can be enabled and disabled. All
12866 sub-metrics are collected when their base metric is collected.
12867 Collected values for any set of sub-metrics can be queried with
12868 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
12869 metric parameters, querying metric data, enabling or disabling metrics
12870 wildcards can be used in metric names to specify a subset of metrics. For
12871 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12872 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12873 values without aggregates <tt>*:</tt> can be used.
12874
12875 The valid names for base metrics are:
12876
12877 <ul>
12878 <li>CPU/Load</li>
12879 <li>CPU/MHz</li>
12880 <li>RAM/Usage</li>
12881 </ul>
12882
12883 The general sequence for collecting and retrieving the metrics is:
12884 <ul>
12885 <li>
12886 Obtain an instance of IPerformanceCollector with
12887 <link to="IVirtualBox::performanceCollector" />
12888 </li>
12889 <li>
12890 Allocate and populate an array with references to objects the metrics
12891 will be collected for. Use references to IHost and IMachine objects.
12892 </li>
12893 <li>
12894 Allocate and populate an array with base metric names the data will be
12895 collected for.
12896 </li>
12897 <li>
12898 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12899 metric data will be collected and stored.
12900 </li>
12901 <li>
12902 Wait for the data to get collected.
12903 </li>
12904 <li>
12905 Allocate and populate an array with references to objects the metric
12906 values will be queried for. You can re-use the object array used for
12907 setting base metrics.
12908 </li>
12909 <li>
12910 Allocate and populate an array with metric names the data will be
12911 collected for. Note that metric names differ from base metric names.
12912 </li>
12913 <li>
12914 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12915 have been collected so far are returned. Note that the values are still
12916 retained internally and data collection continues.
12917 </li>
12918 </ul>
12919
12920 For an example of usage refer to the following files in VirtualBox SDK:
12921 <ul>
12922 <li>
12923 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12924 </li>
12925 <li>
12926 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12927 </li>
12928 </ul>
12929 </desc>
12930
12931 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12932 <desc>
12933 Array of unique names of metrics.
12934
12935 This array represents all metrics supported by the performance
12936 collector. Individual objects do not necessarily support all of them.
12937 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12938 list of supported metrics for a particular object.
12939 </desc>
12940 </attribute>
12941
12942 <method name="getMetrics">
12943 <desc>
12944 Returns parameters of specified metrics for a set of objects.
12945 <note>
12946 @c Null metrics array means all metrics. @c Null object array means
12947 all existing objects.
12948 </note>
12949 </desc>
12950 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12951 <desc>
12952 Metric name filter. Currently, only a comma-separated list of metrics
12953 is supported.
12954 </desc>
12955 </param>
12956 <param name="objects" type="$unknown" dir="in" safearray="yes">
12957 <desc>
12958 Set of objects to return metric parameters for.
12959 </desc>
12960 </param>
12961 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12962 <desc>
12963 Array of returned metric parameters.
12964 </desc>
12965 </param>
12966 </method>
12967
12968 <method name="setupMetrics">
12969 <desc>
12970 Sets parameters of specified base metrics for a set of objects. Returns
12971 an array of <link to="IPerformanceMetric" /> describing the metrics have
12972 been affected.
12973 <note>
12974 @c Null or empty metric name array means all metrics. @c Null or empty
12975 object array means all existing objects. If metric name array contains
12976 a single element and object array contains many, the single metric
12977 name array element is applied to each object array element to form
12978 metric/object pairs.
12979 </note>
12980 </desc>
12981 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12982 <desc>
12983 Metric name filter. Comma-separated list of metrics with wildcard
12984 support.
12985 </desc>
12986 </param>
12987 <param name="objects" type="$unknown" dir="in" safearray="yes">
12988 <desc>
12989 Set of objects to setup metric parameters for.
12990 </desc>
12991 </param>
12992 <param name="period" type="unsigned long" dir="in">
12993 <desc>
12994 Time interval in seconds between two consecutive samples of performance
12995 data.
12996 </desc>
12997 </param>
12998 <param name="count" type="unsigned long" dir="in">
12999 <desc>
13000 Number of samples to retain in performance data history. Older samples
13001 get discarded.
13002 </desc>
13003 </param>
13004 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13005 <desc>
13006 Array of metrics that have been modified by the call to this method.
13007 </desc>
13008 </param>
13009 </method>
13010
13011 <method name="enableMetrics">
13012 <desc>
13013 Turns on collecting specified base metrics. Returns an array of
13014 <link to="IPerformanceMetric" /> describing the metrics have been
13015 affected.
13016 <note>
13017 @c Null or empty metric name array means all metrics. @c Null or empty
13018 object array means all existing objects. If metric name array contains
13019 a single element and object array contains many, the single metric
13020 name array element is applied to each object array element to form
13021 metric/object pairs.
13022 </note>
13023 </desc>
13024 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13025 <desc>
13026 Metric name filter. Comma-separated list of metrics with wildcard
13027 support.
13028 </desc>
13029 </param>
13030 <param name="objects" type="$unknown" dir="in" safearray="yes">
13031 <desc>
13032 Set of objects to enable metrics for.
13033 </desc>
13034 </param>
13035 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13036 <desc>
13037 Array of metrics that have been modified by the call to this method.
13038 </desc>
13039 </param>
13040 </method>
13041
13042 <method name="disableMetrics">
13043 <desc>
13044 Turns off collecting specified base metrics. Returns an array of
13045 <link to="IPerformanceMetric" /> describing the metrics have been
13046 affected.
13047 <note>
13048 @c Null or empty metric name array means all metrics. @c Null or empty
13049 object array means all existing objects. If metric name array contains
13050 a single element and object array contains many, the single metric
13051 name array element is applied to each object array element to form
13052 metric/object pairs.
13053 </note>
13054 </desc>
13055 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13056 <desc>
13057 Metric name filter. Comma-separated list of metrics with wildcard
13058 support.
13059 </desc>
13060 </param>
13061 <param name="objects" type="$unknown" dir="in" safearray="yes">
13062 <desc>
13063 Set of objects to disable metrics for.
13064 </desc>
13065 </param>
13066 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13067 <desc>
13068 Array of metrics that have been modified by the call to this method.
13069 </desc>
13070 </param>
13071 </method>
13072
13073 <method name="queryMetricsData">
13074 <desc>
13075 Queries collected metrics data for a set of objects.
13076
13077 The data itself and related metric information are returned in seven
13078 parallel and one flattened array of arrays. Elements of
13079 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13080 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13081 the same index describe one set of values corresponding to a single
13082 metric.
13083
13084 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13085 start and length of a sub-array is indicated by
13086 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13087 value for metric <tt>metricNames[i]</tt> is at
13088 <tt>returnData[returnIndices[i]]</tt>.
13089
13090 <note>
13091 @c Null or empty metric name array means all metrics. @c Null or empty
13092 object array means all existing objects. If metric name array contains
13093 a single element and object array contains many, the single metric
13094 name array element is applied to each object array element to form
13095 metric/object pairs.
13096 </note>
13097 <note>
13098 Data collection continues behind the scenes after call to
13099 @c queryMetricsData. The return data can be seen as the snapshot of
13100 the current state at the time of @c queryMetricsData call. The
13101 internally kept metric values are not cleared by the call. This makes
13102 possible querying different subsets of metrics or aggregates with
13103 subsequent calls. If periodic querying is needed it is highly
13104 suggested to query the values with @c interval*count period to avoid
13105 confusion. This way a completely new set of data values will be
13106 provided by each query.
13107 </note>
13108 </desc>
13109 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13110 <desc>
13111 Metric name filter. Comma-separated list of metrics with wildcard
13112 support.
13113 </desc>
13114 </param>
13115 <param name="objects" type="$unknown" dir="in" safearray="yes">
13116 <desc>
13117 Set of objects to query metrics for.
13118 </desc>
13119 </param>
13120 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13121 <desc>
13122 Names of metrics returned in @c returnData.
13123 </desc>
13124 </param>
13125 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13126 <desc>
13127 Objects associated with metrics returned in @c returnData.
13128 </desc>
13129 </param>
13130 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13131 <desc>
13132 Units of measurement for each returned metric.
13133 </desc>
13134 </param>
13135 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13136 <desc>
13137 Divisor that should be applied to return values in order to get
13138 floating point values. For example:
13139 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13140 will retrieve the floating point value of i-th sample of the first
13141 metric.
13142 </desc>
13143 </param>
13144 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13145 <desc>
13146 Sequence numbers of the first elements of value sequences of particular metrics
13147 returned in @c returnData. For aggregate metrics it is the sequence number of
13148 the sample the aggregate started calculation from.
13149 </desc>
13150 </param>
13151 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13152 <desc>
13153 Indices of the first elements of value sequences of particular metrics
13154 returned in @c returnData.
13155 </desc>
13156 </param>
13157 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13158 <desc>
13159 Lengths of value sequences of particular metrics.
13160 </desc>
13161 </param>
13162 <param name="returnData" type="long" dir="return" safearray="yes">
13163 <desc>
13164 Flattened array of all metric data containing sequences of values for
13165 each metric.
13166 </desc>
13167 </param>
13168 </method>
13169
13170 </interface>
13171
13172 <module name="VBoxSVC" context="LocalServer">
13173 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13174 namespace="virtualbox.org">
13175 <interface name="IVirtualBox" default="yes"/>
13176 </class>
13177 </module>
13178
13179 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13180 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13181 namespace="virtualbox.org">
13182 <interface name="ISession" default="yes"/>
13183 </class>
13184 </module>
13185
13186</library>
13187
13188</idl>
13189
13190<!-- 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