VirtualBox

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

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

disable keywords on VirtualBox.xidl to avoid excessive recompiles after commit

  • Property svn:eol-style set to native
File size: 460.5 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-2008 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::attachHardDisk2()"/>).
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="StorageBus"
719 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
720 >
721 <desc>Interface bus type for storage devices.</desc>
722
723 <const name="Null" value="0">
724 <desc>Null value (never used by the API).</desc>
725 </const>
726
727 <const name="IDE" value="1"/>
728 <const name="SATA" value="2"/>
729 </enum>
730
731 <enum
732 name="ClipboardMode"
733 uuid="33364716-4008-4701-8f14-be0fa3d62950"
734 >
735 <desc>
736 Host-Guest clipboard interchange mode.
737 </desc>
738
739 <const name="Disabled" value="0"/>
740 <const name="HostToGuest" value="1"/>
741 <const name="GuestToHost" value="2"/>
742 <const name="Bidirectional" value="3"/>
743 </enum>
744
745 <enum
746 name="Scope"
747 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
748 >
749 <desc>
750 Scope of the operation.
751
752 A generic enumeration used in various methods to define the action or
753 argument scope.
754 </desc>
755
756 <const name="Global" value="0"/>
757 <const name="Machine" value="1"/>
758 <const name="Session" value="2"/>
759 </enum>
760
761 <enum
762 name="GuestStatisticType"
763 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
764 >
765 <desc>
766 Statistics type for <link to="IGuest::getStatistic"/>.
767 </desc>
768
769 <const name="CPULoad_Idle" value="0">
770 <desc>
771 Idle CPU load (0-100%) for last interval.
772 </desc>
773 </const>
774 <const name="CPULoad_Kernel" value="1">
775 <desc>
776 Kernel CPU load (0-100%) for last interval.
777 </desc>
778 </const>
779 <const name="CPULoad_User" value="2">
780 <desc>
781 User CPU load (0-100%) for last interval.
782 </desc>
783 </const>
784 <const name="Threads" value="3">
785 <desc>
786 Total number of threads in the system.
787 </desc>
788 </const>
789 <const name="Processes" value="4">
790 <desc>
791 Total number of processes in the system.
792 </desc>
793 </const>
794 <const name="Handles" value="5">
795 <desc>
796 Total number of handles in the system.
797 </desc>
798 </const>
799 <const name="MemoryLoad" value="6">
800 <desc>
801 Memory load (0-100%).
802 </desc>
803 </const>
804 <const name="PhysMemTotal" value="7">
805 <desc>
806 Total physical memory in megabytes.
807 </desc>
808 </const>
809 <const name="PhysMemAvailable" value="8">
810 <desc>
811 Free physical memory in megabytes.
812 </desc>
813 </const>
814 <const name="PhysMemBalloon" value="9">
815 <desc>
816 Ballooned physical memory in megabytes.
817 </desc>
818 </const>
819 <const name="MemCommitTotal" value="10">
820 <desc>
821 Total amount of memory in the committed state in megabytes.
822 </desc>
823 </const>
824 <const name="MemKernelTotal" value="11">
825 <desc>
826 Total amount of memory used by the guest OS's kernel in megabytes.
827 </desc>
828 </const>
829 <const name="MemKernelPaged" value="12">
830 <desc>
831 Total amount of paged memory used by the guest OS's kernel in megabytes.
832 </desc>
833 </const>
834 <const name="MemKernelNonpaged" value="13">
835 <desc>
836 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
837 </desc>
838 </const>
839 <const name="MemSystemCache" value="14">
840 <desc>
841 Total amount of memory used by the guest OS's system cache in megabytes.
842 </desc>
843 </const>
844 <const name="PageFileSize" value="15">
845 <desc>
846 Pagefile size in megabytes.
847 </desc>
848 </const>
849 <const name="SampleNumber" value="16">
850 <desc>
851 Statistics sample number
852 </desc>
853 </const>
854 <const name="MaxVal" value="17"/>
855 </enum>
856
857 <enum
858 name="BIOSBootMenuMode"
859 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
860 >
861 <desc>
862 BIOS boot menu mode.
863 </desc>
864
865 <const name="Disabled" value="0"/>
866 <const name="MenuOnly" value="1"/>
867 <const name="MessageAndMenu" value="2"/>
868 </enum>
869
870 <enum
871 name="IDEControllerType"
872 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
873 >
874 <desc>
875 IDE controller type.
876 </desc>
877
878 <const name="Null" value="0">
879 <desc>Null value (never used by the API).</desc>
880 </const>
881 <const name="PIIX3" value="1"/>
882 <const name="PIIX4" value="2"/>
883 </enum>
884
885 <enum
886 name="DriveState"
887 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
888 >
889 <const name="Null" value="0">
890 <desc>Null value (never used by the API).</desc>
891 </const>
892 <const name="NotMounted" value="1"/>
893 <const name="ImageMounted" value="2"/>
894 <const name="HostDriveCaptured" value="3"/>
895 </enum>
896
897 <enum
898 name="ProcessorFeature"
899 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
900 >
901 <desc>
902 CPU features.
903 </desc>
904
905 <const name="HWVirtEx" value="0"/>
906 <const name="PAE" value="1"/>
907 <const name="LongMode" value="2"/>
908 </enum>
909
910
911 <!--
912 // IVirtualBoxErrorInfo
913 /////////////////////////////////////////////////////////////////////////
914 -->
915
916 <interface
917 name="IVirtualBoxErrorInfo" extends="$errorinfo"
918 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
919 supportsErrorInfo="no"
920 wsmap="suppress"
921 >
922 <desc>
923 The IVirtualBoxErrorInfo interface represents extended error information.
924
925 Extended error information can be set by VirtualBox components after
926 unsuccessful or partially successful method invocation. This information
927 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
928 and then shown to the client in addition to the plain 32-bit result code.
929
930 In MS COM, this interface extends the IErrorInfo interface,
931 in XPCOM, it extends the nsIException interface. In both cases,
932 it provides a set of common attributes to retrieve error
933 information.
934
935 Sometimes invocation of some component's method may involve methods of
936 other components that may also fail (independently of this method's
937 failure), or a series of non-fatal errors may precede a fatal error that
938 causes method failure. In cases like that, it may be desirable to preserve
939 information about all errors happened during method invocation and deliver
940 it to the caller. The <link to="#next"/> attribute is intended
941 specifically for this purpose and allows to represent a chain of errors
942 through a single IVirtualBoxErrorInfo object set after method invocation.
943
944 Note that errors are stored to a chain in the reverse order, i.e. the
945 initial error object you query right after method invocation is the last
946 error set by the callee, the object it points to in the @a next attribute
947 is the previous error and so on, up to the first error (which is the last
948 in the chain).
949 </desc>
950
951 <attribute name="resultCode" type="result" readonly="yes">
952 <desc>
953 Result code of the error.
954 Usually, it will be the same as the result code returned
955 by the method that provided this error information, but not
956 always. For example, on Win32, CoCreateInstance() will most
957 likely return E_NOINTERFACE upon unsuccessful component
958 instantiation attempt, but not the value the component factory
959 returned.
960 <note>
961 In MS COM, there is no equivalent.
962 In XPCOM, it is the same as nsIException::result.
963 </note>
964 </desc>
965 </attribute>
966
967 <attribute name="interfaceID" type="uuid" readonly="yes">
968 <desc>
969 UUID of the interface that defined the error.
970 <note>
971 In MS COM, it is the same as IErrorInfo::GetGUID.
972 In XPCOM, there is no equivalent.
973 </note>
974 </desc>
975 </attribute>
976
977 <attribute name="component" type="wstring" readonly="yes">
978 <desc>
979 Name of the component that generated the error.
980 <note>
981 In MS COM, it is the same as IErrorInfo::GetSource.
982 In XPCOM, there is no equivalent.
983 </note>
984 </desc>
985 </attribute>
986
987 <attribute name="text" type="wstring" readonly="yes">
988 <desc>
989 Text description of the error.
990 <note>
991 In MS COM, it is the same as IErrorInfo::GetDescription.
992 In XPCOM, it is the same as nsIException::message.
993 </note>
994 </desc>
995 </attribute>
996
997 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
998 <desc>
999 Next error object if there is any, or @c null otherwise.
1000 <note>
1001 In MS COM, there is no equivalent.
1002 In XPCOM, it is the same as nsIException::inner.
1003 </note>
1004 </desc>
1005 </attribute>
1006
1007 </interface>
1008
1009
1010 <!--
1011 // IVirtualBox
1012 /////////////////////////////////////////////////////////////////////////
1013 -->
1014
1015 <interface
1016 name="IVirtualBoxCallback" extends="$unknown"
1017 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1018 wsmap="suppress"
1019 >
1020 <method name="onMachineStateChange">
1021 <desc>
1022 The execution state of the given machine has changed.
1023 <see>IMachine::state</see>
1024 </desc>
1025 <param name="machineId" type="uuid" dir="in">
1026 <desc>ID of the machine this event relates to.</desc>
1027 </param>
1028 <param name="state" type="MachineState" dir="in">
1029 <desc>New execution state.</desc>
1030 </param>
1031 </method>
1032
1033 <method name="onMachineDataChange">
1034 <desc>
1035 Any of the settings of the given machine has changed.
1036 </desc>
1037 <param name="machineId" type="uuid" dir="in">
1038 <desc>ID of the machine this event relates to.</desc>
1039 </param>
1040 </method>
1041
1042 <method name="onExtraDataCanChange">
1043 <desc>
1044 Notification when someone tries to change extra data for
1045 either the given machine or (if null) global extra data.
1046 This gives the chance to veto against changes.
1047 </desc>
1048 <param name="machineId" type="uuid" dir="in">
1049 <desc>
1050 ID of the machine this event relates to
1051 (null ID for global extra data change requests).
1052 </desc>
1053 </param>
1054 <param name="key" type="wstring" dir="in">
1055 <desc>
1056 Extra data key for the attempted write.
1057 </desc>
1058 </param>
1059 <param name="value" type="wstring" dir="in">
1060 <desc>
1061 Extra data value for the given key.
1062 </desc>
1063 </param>
1064 <param name="error" type="wstring" dir="out">
1065 <desc>
1066 Optional error message describing the reason of the
1067 veto (ignored if this notification returns @c true).
1068 </desc>
1069 </param>
1070 <param name="allowChange" type="boolean" dir="return">
1071 <desc>
1072 Flag to indicate whether the callee agrees (@c true)
1073 or vetoes against the change (@c false).
1074 </desc>
1075 </param>
1076 </method>
1077
1078 <method name="onExtraDataChange">
1079 <desc>
1080 Notification when machine specific or global extra data
1081 has changed.
1082 </desc>
1083 <param name="machineId" type="uuid" dir="in">
1084 <desc>
1085 ID of the machine this event relates to.
1086 Null for global extra data changes.
1087 </desc>
1088 </param>
1089 <param name="key" type="wstring" dir="in">
1090 <desc>
1091 Extra data key that has changed.
1092 </desc>
1093 </param>
1094 <param name="value" type="wstring" dir="in">
1095 <desc>
1096 Extra data value for the given key.
1097 </desc>
1098 </param>
1099 </method>
1100
1101 <method name="onMediaRegistered">
1102 <desc>
1103 The given media was registered or unregistered
1104 within this VirtualBox installation.
1105
1106 The @a mediaType parameter describes what type of
1107 media the specified @a mediaId refers to. Possible
1108 values are:
1109
1110 <ul>
1111 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1112 that, if registered, can be obtained using the
1113 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
1114 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1115 that, if registered, can be obtained using the
1116 <link to="IVirtualBox::getDVDImage()"/> call.</li>
1117 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1118 that, if registered, can be obtained using the
1119 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
1120 </ul>
1121
1122 Note that if this is a deregistration notification,
1123 there is no way to access the object representing the
1124 unregistered media. It is supposed that the
1125 application will do required cleanup based on the @a
1126 mediaId value.
1127 </desc>
1128 <param name="mediaId" type="uuid" dir="in">
1129 <desc>ID of the media this event relates to.</desc>
1130 </param>
1131 <param name="mediaType" type="DeviceType" dir="in">
1132 <desc>Type of the media this event relates to.</desc>
1133 </param>
1134 <param name="registered" type="boolean" dir="in">
1135 <desc>
1136 If true, the media was registered, otherwise it was
1137 unregistered.
1138 </desc>
1139 </param>
1140 </method>
1141
1142 <method name="onMachineRegistered">
1143 <desc>
1144 The given machine was registered or unregistered
1145 within this VirtualBox installation.
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="registered" type="boolean" dir="in">
1151 <desc>
1152 If true, the machine was registered, otherwise it was
1153 unregistered.
1154 </desc>
1155 </param>
1156 </method>
1157
1158 <method name="onSessionStateChange">
1159 <desc>
1160 The state of the session for the given machine was changed.
1161 <see>IMachine::sessionState</see>
1162 </desc>
1163 <param name="machineId" type="uuid" dir="in">
1164 <desc>ID of the machine this event relates to.</desc>
1165 </param>
1166 <param name="state" type="SessionState" dir="in">
1167 <desc>New session state.</desc>
1168 </param>
1169 </method>
1170
1171 <method name="onSnapshotTaken">
1172 <desc>
1173 A new snapshot of the machine has been taken.
1174 <see>ISnapshot</see>
1175 </desc>
1176 <param name="machineId" type="uuid" dir="in">
1177 <desc>ID of the machine this event relates to.</desc>
1178 </param>
1179 <param name="snapshotId" type="uuid" dir="in">
1180 <desc>ID of the new snapshot.</desc>
1181 </param>
1182 </method>
1183
1184 <method name="onSnapshotDiscarded">
1185 <desc>
1186 Snapshot of the given machine has been discarded.
1187
1188 <note>
1189 This notification is delivered <b>after</b> the snapshot
1190 object has been uninitialized on the server (so that any
1191 attempt to call its methods will return an error).
1192 </note>
1193
1194 <see>ISnapshot</see>
1195 </desc>
1196 <param name="machineId" type="uuid" dir="in">
1197 <desc>ID of the machine this event relates to.</desc>
1198 </param>
1199 <param name="snapshotId" type="uuid" dir="in">
1200 <desc>
1201 ID of the discarded snapshot. <tt>null</tt> means the
1202 current machine state has been discarded (restored from
1203 the current snapshot).
1204 </desc>
1205 </param>
1206 </method>
1207
1208 <method name="onSnapshotChange">
1209 <desc>
1210 Snapshot properties (name and/or description) have been changed.
1211 <see>ISnapshot</see>
1212 </desc>
1213 <param name="machineId" type="uuid" dir="in">
1214 <desc>ID of the machine this event relates to.</desc>
1215 </param>
1216 <param name="snapshotId" type="uuid" dir="in">
1217 <desc>ID of the changed snapshot.</desc>
1218 </param>
1219 </method>
1220
1221 <method name="onGuestPropertyChange">
1222 <desc>
1223 Notification when a guest property has changed.
1224 </desc>
1225 <param name="machineId" type="uuid" dir="in">
1226 <desc>
1227 ID of the machine this event relates to.
1228 </desc>
1229 </param>
1230 <param name="name" type="wstring" dir="in">
1231 <desc>
1232 The name of the property that has changed.
1233 </desc>
1234 </param>
1235 <param name="value" type="wstring" dir="in">
1236 <desc>
1237 The new property value.
1238 </desc>
1239 </param>
1240 <param name="flags" type="wstring" dir="in">
1241 <desc>
1242 The new property flags.
1243 </desc>
1244 </param>
1245 </method>
1246
1247 </interface>
1248
1249 <interface
1250 name="IVirtualBox" extends="$dispatched"
1251 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1252 wsmap="managed"
1253 >
1254 <desc>
1255 The IVirtualBox interface represents the main interface exposed by the
1256 product that provides virtual machine management.
1257
1258 An instance of IVirtualBox is required for the product to do anything
1259 useful. Even though the interface does not expose this, internally,
1260 IVirtualBox is implemented as a singleton and actually lives in the
1261 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1262 IVirtualBox can track the state of all virtual machines on a particular
1263 host, regardless of which frontend started them.
1264
1265 To enumerate all the virtual machines on the host, use the
1266 <link to="IVirtualBox::machines2"/> attribute.
1267 </desc>
1268
1269 <attribute name="version" type="wstring" readonly="yes">
1270 <desc>
1271 A string representing the version number of the product. The
1272 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1273 last number represents the build number and will frequently change.
1274 </desc>
1275 </attribute>
1276
1277 <attribute name="revision" type="unsigned long" readonly="yes">
1278 <desc>
1279 The internal build revision number of the product.
1280 </desc>
1281 </attribute>
1282
1283 <attribute name="packageType" type="wstring" readonly="yes">
1284 <desc>
1285 A string representing the package type of this product. The
1286 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1287 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1288 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1289 this.
1290 </desc>
1291 </attribute>
1292
1293 <attribute name="homeFolder" type="wstring" readonly="yes">
1294 <desc>
1295 Full path to the directory where the global settings file,
1296 <tt>VirtualBox.xml</tt>, is stored.
1297
1298 In this version of VirtualBox, the value of this property is
1299 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1300 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1301 as determined by the host OS), and cannot be changed.
1302
1303 This path is also used as the base to resolve relative paths in
1304 places where relative paths are allowed (unless otherwise
1305 expressly indicated).
1306 </desc>
1307 </attribute>
1308
1309 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1310 <desc>
1311 Full name of the global settings file.
1312 The value of this property corresponds to the value of
1313 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1314 </desc>
1315 </attribute>
1316
1317 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1318 <desc>
1319 Current version of the format of the global VirtualBox settings file
1320 (<tt>VirtualBox.xml</tt>).
1321
1322 The version string has the following format:
1323 <pre>
1324 x.y-platform
1325 </pre>
1326 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1327 versions, and <tt>platform</tt> is the platform identifier.
1328
1329 The current version usually matches the value of the
1330 <link to="#settingsFormatVersion"/> attribute unless the
1331 settings file was created by an older version of VirtualBox and there
1332 was a change of the settings file format since then.
1333
1334 Note that VirtualBox automatically converts settings files from older
1335 versions to the most recent version when reading them (usually at
1336 VirtualBox startup) but it doesn't save the changes back until
1337 you call a method that implicitly saves settings (such as
1338 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1339 explicitly. Therefore, if the value of this attribute differs from the
1340 value of <link to="#settingsFormatVersion"/>, then it
1341 means that the settings file was converted but the result of the
1342 conversion is not yet saved to disk.
1343
1344 The above feature may be used by interactive front-ends to inform users
1345 about the settings file format change and offer them to explicitly save
1346 all converted settings files (the global and VM-specific ones),
1347 optionally create backup copies of the old settings files before saving,
1348 etc.
1349
1350 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1351 </desc>
1352 </attribute>
1353
1354 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1355 <desc>
1356 Most recent version of the settings file format.
1357
1358 The version string has the following format:
1359 <pre>
1360 x.y-platform
1361 </pre>
1362 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1363 versions, and <tt>platform</tt> is the platform identifier.
1364
1365 VirtualBox uses this version of the format when saving settings files
1366 (either as a result of method calls that require to save settings or as
1367 a result of an explicit call to <link to="#saveSettings()"/>).
1368
1369 <see>settingsFileVersion</see>
1370 </desc>
1371 </attribute>
1372
1373 <attribute name="host" type="IHost" readonly="yes">
1374 <desc>Associated host object.</desc>
1375 </attribute>
1376
1377 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1378 <desc>Associated system information object.</desc>
1379 </attribute>
1380
1381 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1382 <desc>
1383 Array of machine objects registered within this VirtualBox instance.
1384 </desc>
1385 </attribute>
1386
1387 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1388 <desc>
1389 Array of hard disk objects known to this VirtualBox installation.
1390
1391 This array contains only base (root) hard disks. All differencing
1392 hard disks of the given base hard disk can be enumerated using
1393 <link to="IHardDisk2::children"/>.
1394 </desc>
1395 </attribute>
1396
1397 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1398 <desc>
1399 Array of CD/DVD image objects registered with this VirtualBox instance.
1400 </desc>
1401 </attribute>
1402
1403 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1404 <desc>
1405 Array of floppy image objects registered with this VirtualBox instance.
1406 </desc>
1407 </attribute>
1408
1409 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1410
1411 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1412
1413 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1414 <desc>
1415 Collection of global shared folders. Global shared folders are
1416 available to all virtual machines.
1417
1418 New shared folders are added to the collection using
1419 <link to="#createSharedFolder"/>. Existing shared folders can be
1420 removed using <link to="#removeSharedFolder"/>.
1421
1422 <note>
1423 In the current version of the product, global shared folders are not
1424 implemented and therefore this collection is always empty.
1425 </note>
1426 </desc>
1427 </attribute>
1428
1429 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1430 <desc>
1431 Associated performance collector object.
1432 </desc>
1433 </attribute>
1434
1435 <method name="createMachine">
1436 <desc>
1437 Creates a new virtual machine.
1438
1439 The new machine is created unregistered, with the initial configuration
1440 set according to the specified guest OS type. A typical sequence of
1441 actions to create a new virtual machine is as follows:
1442
1443 <ol>
1444 <li>
1445 Call this method to have a new machine created. The returned machine
1446 object will be "mutable" allowing to change any machine property.
1447 </li>
1448
1449 <li>
1450 Configure the machine using the appropriate attributes and methods.
1451 </li>
1452
1453 <li>
1454 Call <link to="IMachine::saveSettings()" /> to write the settings
1455 to the machine's XML settings file. The configuration of the newly
1456 created machine will not be saved to disk until this method is
1457 called.
1458 </li>
1459
1460 <li>
1461 Call <link to="#registerMachine()" /> to add the machine to the list
1462 of machines known to VirtualBox.
1463 </li>
1464 </ol>
1465
1466 You should specify valid name for the newly created machine when calling
1467 this method. See the <link to="IMachine::name"/> attribute description
1468 for more details about the machine name.
1469
1470 The specified guest OS type identifier must match an ID of one of known
1471 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1472 array.
1473
1474 Every machine has a <i>settings file</i> that is used to store
1475 the machine configuration. This file is stored in a directory called the
1476 <i>machine settings subfolder</i>. Both the settings subfolder and file
1477 will have a name that corresponds to the name of the virtual machine.
1478 You can specify where to create the machine setting subfolder using the
1479 @a baseFolder argument. The base folder can be absolute (full path) or
1480 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1481 directory</link>.
1482
1483 If @a baseFolder is a null or empty string (which is recommended), the
1484 <link to="ISystemProperties::defaultMachineFolder">default machine
1485 settings folder</link> will be used as a base folder for the created
1486 machine. Otherwise the given base folder will be used. In either case,
1487 the full path to the resulting settings file has the following
1488 structure:
1489 <pre>
1490 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1491 </pre>
1492
1493 Note that if the resulting settings file already exists, this method
1494 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1495
1496 Optionally, you may specify an UUID of to assign to the created machine.
1497 However, this is not recommended and you should normally pass an empty
1498 (null) UUID to this method so that a new UUID will be automatically
1499 generated for every created machine.
1500
1501 <note>
1502 There is no way to change the name of the settings file or
1503 subfolder of the created machine directly.
1504 </note>
1505
1506 <result name="VBOX_E_OBJECT_NOT_FOUND">
1507 @a osTypeId is invalid.
1508 </result>
1509 <result name="VBOX_E_FILE_ERROR">
1510 Resulting settings file name is invalid or the settings file already
1511 exists or could not be created due to an I/O error.
1512 </result>
1513 <result name="E_INVALIDARG">
1514 @a name is empty or null.
1515 </result>
1516 </desc>
1517
1518 <param name="name" type="wstring" dir="in">
1519 <desc>Machine name.</desc>
1520 </param>
1521 <param name="osTypeId" type="wstring" dir="in">
1522 <desc>Guest OS Type ID.</desc>
1523 </param>
1524 <param name="baseFolder" type="wstring" dir="in">
1525 <desc>Base machine folder (optional).</desc>
1526 </param>
1527 <param name="id" type="uuid" dir="in">
1528 <desc>Machine UUID (optional).</desc>
1529 </param>
1530 <param name="machine" type="IMachine" dir="return">
1531 <desc>Created machine object.</desc>
1532 </param>
1533 </method>
1534
1535 <method name="createLegacyMachine">
1536 <desc>
1537 Creates a new virtual machine in "legacy" mode, using the specified
1538 settings file to store machine settings.
1539
1540 As opposed to machines created by <link to="#createMachine()"/>,
1541 the settings file of the machine created in "legacy" mode is not
1542 automatically renamed when the machine name is changed -- it will always
1543 remain the same as specified in this method call.
1544
1545 The specified settings file name can be absolute (full path) or relative
1546 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1547 directory</link>. If the file name doesn't contain an extension, the
1548 default extension (.xml) will be appended.
1549
1550 Note that the configuration of the newly created machine is not
1551 saved to disk (and therefore no settings file is created)
1552 until <link to="IMachine::saveSettings()"/> is called. If the
1553 specified settings file already exists, this method
1554 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1555
1556 See <link to="#createMachine()"/> for more information.
1557
1558 @deprecated This method may be removed later. Use <link
1559 to="IVirtualBox::createMachine()"/> instead.
1560
1561 <note>
1562 There is no way to change the name of the settings file
1563 of the machine created in "legacy" mode.
1564 </note>
1565
1566 <result name="VBOX_E_OBJECT_NOT_FOUND">
1567 @a osTypeId is invalid.
1568 </result>
1569 <result name="VBOX_E_FILE_ERROR">
1570 @a settingsFile is invalid or the settings file already exists or
1571 could not be created due to an I/O error.
1572 </result>
1573 <result name="E_INVALIDARG">
1574 @a name or @a settingsFile is empty or null.
1575 </result>
1576 </desc>
1577
1578 <param name="name" type="wstring" dir="in">
1579 <desc>Machine name.</desc>
1580 </param>
1581 <param name="osTypeId" type="wstring" dir="in">
1582 <desc>Machine OS Type ID.</desc>
1583 </param>
1584 <param name="settingsFile" type="wstring" dir="in">
1585 <desc>Name of the machine settings file.</desc>
1586 </param>
1587 <param name="id" type="uuid" dir="in">
1588 <desc>Machine UUID (optional).</desc>
1589 </param>
1590 <param name="machine" type="IMachine" dir="return">
1591 <desc>Created machine object.</desc>
1592 </param>
1593 </method>
1594
1595 <method name="openMachine">
1596 <desc>
1597 Opens a virtual machine from the existing settings file.
1598 The opened machine remains unregistered until you call
1599 <link to="#registerMachine()"/>.
1600
1601 The specified settings file name can be absolute
1602 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1603 VirtualBox home directory</link>. This file must exist
1604 and must be a valid machine settings file whose contents
1605 will be used to construct the machine object.
1606
1607 @deprecated Will be removed soon.
1608 <result name="VBOX_E_FILE_ERROR">
1609 Settings file name invalid, not found or sharing violation.
1610 </result>
1611 </desc>
1612 <param name="settingsFile" type="wstring" dir="in">
1613 <desc>
1614 Name of the machine settings file.
1615 </desc>
1616 </param>
1617 <param name="machine" type="IMachine" dir="return">
1618 <desc>Opened machine object.</desc>
1619 </param>
1620 <note>
1621 <link to="IMachine::settingsModified"/> will return
1622 false for the created machine, until any of machine settings
1623 are changed.
1624 </note>
1625 </method>
1626
1627 <method name="registerMachine">
1628 <desc>
1629
1630 Registers the machine previously created using
1631 <link to="#createMachine()"/> or opened using
1632 <link to="#openMachine()"/> within this VirtualBox installation. After
1633 successful method invocation, the
1634 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1635 to all registered callbacks.
1636
1637 <note>
1638 This method implicitly calls <link to="IMachine::saveSettings"/>
1639 to save all current machine settings before registering it.
1640 </note>
1641
1642 <result name="VBOX_E_OBJECT_NOT_FOUND">
1643 No matching virtual machine found.
1644 </result>
1645 <result name="VBOX_E_INVALID_OBJECT_STATE">
1646 Virtual machine was not created within this VirtualBox instance.
1647 </result>
1648
1649 </desc>
1650 <param name="machine" type="IMachine" dir="in"/>
1651 </method>
1652
1653 <method name="getMachine">
1654 <desc>
1655 Attempts to find a virtual machine given its UUID.
1656 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1657 instead.
1658
1659 <result name="VBOX_E_OBJECT_NOT_FOUND">
1660 Could not find registered machine matching @a id.
1661 </result>
1662
1663 </desc>
1664 <param name="id" type="uuid" dir="in"/>
1665 <param name="machine" type="IMachine" dir="return"/>
1666 </method>
1667
1668 <method name="findMachine">
1669 <desc>
1670 Attempts to find a virtual machine given its name.
1671 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1672 instead.
1673
1674 <result name="VBOX_E_OBJECT_NOT_FOUND">
1675 Could not find registered machine matching @a name.
1676 </result>
1677
1678 </desc>
1679 <param name="name" type="wstring" dir="in"/>
1680 <param name="machine" type="IMachine" dir="return"/>
1681 </method>
1682
1683 <method name="unregisterMachine">
1684 <desc>
1685
1686 Unregisters the machine previously registered using
1687 <link to="#registerMachine"/>. After successful method invocation, the
1688 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1689 to all registered callbacks.
1690
1691 <note>
1692 The specified machine must not be in the Saved state, have an open
1693 (or a spawning) direct session associated with it, have snapshots or
1694 have hard disks attached.
1695 </note>
1696
1697 <note>
1698 This method implicitly calls <link to="IMachine::saveSettings"/> to
1699 save all current machine settings before unregistering it.
1700 </note>
1701
1702 <note>
1703 If the given machine is inaccessible (see
1704 <link to="IMachine::accessible"/>), it will be unregistered and
1705 fully uninitialized right afterwards. As a result, the returned
1706 machine object will be unusable and an attempt to call
1707 <b>any</b> method will return the "Object not ready" error.
1708 </note>
1709
1710 <result name="VBOX_E_OBJECT_NOT_FOUND">
1711 Could not find registered machine matching @a id.
1712 </result>
1713 <result name="VBOX_E_INVALID_VM_STATE">
1714 Machine is in Saved state.
1715 </result>
1716 <result name="VBOX_E_INVALID_OBJECT_STATE">
1717 Machine has snapshot or open session or hard disk attached.
1718 </result>
1719
1720 </desc>
1721 <param name="id" type="uuid" dir="in">
1722 <desc>UUID of the machine to unregister.</desc>
1723 </param>
1724 <param name="machine" type="IMachine" dir="return">
1725 <desc>Unregistered machine object.</desc>
1726 </param>
1727 </method>
1728
1729 <method name="openAppliance">
1730 <desc>
1731 Attempts to open the given appliance, which must be in Open Virtual Machine Format (OVF).
1732
1733 As prescribed by the OVF standard, VirtualBox supports OVF in two formats:
1734
1735 <ol>
1736 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
1737 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
1738 this descriptor file references other files, as OVF appliances distributed as a set of
1739 files most likely do, those files must be in the same directory as the descriptor file.</li>
1740
1741 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
1742 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
1743 files and optionally other files.</li>
1744 </ol>
1745
1746 In both cases, VirtualBox will open the OVF descriptor file, parse its contents and create a
1747 new instance of IAppliance representing the OVF file.
1748
1749 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
1750 returned IAppliance object can then be used to retrieve information about the appliance and
1751 import it into VirtualBox. The mere fact that this method returns successfully does not mean
1752 that VirtualBox supports all features requested by the appliance; see the documentation for
1753 <link to="IAppliance" /> for details.
1754
1755 </desc>
1756 <param name="file" type="wstring" dir="in">
1757 <desc>
1758 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
1759 on whether the appliance is distributed as a set of files or as a single file, respectively).
1760 </desc>
1761 </param>
1762 <param name="machine" type="IAppliance" dir="return">
1763 <desc>New appliance.</desc>
1764 </param>
1765 </method>
1766
1767 <method name="createHardDisk2">
1768 <desc>
1769 Creates a new base hard disk object that will use the given storage
1770 format and location for hard disk data.
1771
1772 Note that the actual storage unit is not created by this method. In
1773 order to do it, and before you are able to attach the created hard disk
1774 to virtual machines, you must call one of the following methods to
1775 allocate a format-specific storage unit at the specified location:
1776 <ul>
1777 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1778 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1779 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1780 </ul>
1781
1782 Some hard disk attributes, such as <link to="IHardDisk2::id"/>, may
1783 remain uninitialized until the hard disk storage unit is successfully
1784 created by one of the above methods.
1785
1786 After the storage unit is successfully created, the hard disk gets
1787 remembered by this VirtualBox installation and will be accessible
1788 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1789 methods. Remembered root (base) hard disks are also returned as part of
1790 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1791
1792 The list of all storage formats supported by this VirtualBox
1793 installation can be obtained using
1794 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1795 attribute is empty or <tt>null</tt> then the default storage format
1796 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1797 be used for creating a storage unit of the hard disk.
1798
1799 Note that the format of the location string is storage format specific.
1800 See <link to="IMedium::location"/>, IHardDisk2 and
1801 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1802
1803 <result name="VBOX_E_OBJECT_NOT_FOUND">
1804 @a format identifier is invalid. See
1805 <link to="ISystemProperties::hardDiskFormats"/>.
1806 </result>
1807 <result name="VBOX_E_FILE_ERROR">
1808 @a location is a not valid file name (for file-based formats only).
1809 </result>
1810 <result name="E_INVALIDARG">
1811 @a format is a null or empty string.
1812 </result>
1813 </desc>
1814 <param name="format" type="wstring" dir="in">
1815 <desc>
1816 Identifier of the storage format to use for the new hard disk.
1817 </desc>
1818 </param>
1819 <param name="location" type="wstring" dir="in">
1820 <desc>
1821 Location of the storage unit for the new hard disk.
1822 </desc>
1823 </param>
1824 <param name="hardDisk" type="IHardDisk2" dir="return">
1825 <desc>Created hard disk object.</desc>
1826 </param>
1827 </method>
1828
1829 <method name="openHardDisk2">
1830 <desc>
1831 Opens a hard disk from an existing location.
1832
1833 After the hard disk is successfully opened by this method, it gets
1834 remembered by (known to) this VirtualBox installation and will be
1835 accessible through <link to="#getHardDisk2()"/> and
1836 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1837 are also returned as part of the <link to="#hardDisks2"/> array and can
1838 be attached to virtual machines. See IHardDisk2 for more details.
1839
1840 If a differencing hard disk is to be opened by this method, the
1841 operation will succeed only if its parent hard disk and all ancestors,
1842 if any, are already known to this VirtualBox installation (for example,
1843 were opened by this method before).
1844
1845 This method tries to guess the storage format of the specified hard disk
1846 by reading hard disk data at the specified location.
1847
1848 Note that the format of the location string is storage format specific.
1849 See <link to="IMedium::location"/>, IHardDisk2 and
1850 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1851
1852
1853 <result name="VBOX_E_FILE_ERROR">
1854 Invalid hard disk storage file location.
1855 </result>
1856 <result name="VBOX_E_IPRT_ERROR">
1857 Could not get hard disk storage format.
1858 </result>
1859 <result name="E_INVALIDARG">
1860 Invalid hard disk storage format.
1861 </result>
1862
1863 </desc>
1864 <param name="location" type="wstring" dir="in">
1865 <desc>
1866 Location of the storage unit that contains hard disk data in one of
1867 the supported storage formats.
1868 </desc>
1869 </param>
1870 <param name="hardDisk" type="IHardDisk2" dir="return">
1871 <desc>Opened hard disk object.</desc>
1872 </param>
1873 </method>
1874
1875 <method name="getHardDisk2" const="yes">
1876 <desc>
1877 Returns a hard disk with the given UUID.
1878
1879 The hard disk with the given UUID must be known to this VirtualBox
1880 installation, i.e. it must be previously created by
1881 <link to="#createHardDisk2()"/> or opened by <link
1882 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1883
1884 <result name="VBOX_E_OBJECT_NOT_FOUND">
1885 No hard disk object matching @a id found.
1886 </result>
1887
1888 </desc>
1889 <param name="id" type="uuid" dir="in">
1890 <desc>UUID of the hard disk to look for.</desc>
1891 </param>
1892 <param name="hardDisk" type="IHardDisk2" dir="return">
1893 <desc>Found hard disk object.</desc>
1894 </param>
1895 </method>
1896
1897 <method name="findHardDisk2">
1898 <desc>
1899 Returns a hard disk that uses the given location to store hard
1900 disk data.
1901
1902 The given hard disk must be known to this VirtualBox installation, i.e.
1903 it must be previously created by
1904 <link to="#createHardDisk2()"/> or opened by <link
1905 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1906
1907 The search is done by comparing the value of the @a location argument to
1908 the <link to="IHardDisk2::location"/> attribute of each known hard
1909 disk.
1910
1911 For locations represented by file names in the host's file system, the
1912 requested location can be a path relative to the
1913 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1914 only a file name without any path is given, the
1915 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1916 folder</link> will be prepended to the file name before searching. Note
1917 that on case sensitive file systems, a case sensitive comparison is
1918 performed, otherwise the case of symbols in the file path is ignored.
1919
1920 <result name="VBOX_E_OBJECT_NOT_FOUND">
1921 No hard disk object matching @a location found.
1922 </result>
1923
1924 </desc>
1925 <param name="location" type="wstring" dir="in">
1926 <desc>Location string to search for.</desc>
1927 </param>
1928 <param name="hardDisk" type="IHardDisk2" dir="return">
1929 <desc>Found hard disk object.</desc>
1930 </param>
1931 </method>
1932
1933 <method name="openDVDImage">
1934 <desc>
1935 Opens a CD/DVD image contained in the specified file of the supported
1936 format and assigns it the given UUID.
1937
1938 After the image is successfully opened by this method, it gets
1939 remembered by (known to) this VirtualBox installation and will be
1940 accessible through <link to="#getDVDImage()"/> and
1941 <link to="#findDVDImage()"/> methods. Remembered images are also
1942 returned as part of the <link to="#DVDImages"/> array and can be mounted
1943 to virtual machines. See IMedium for more details.
1944
1945 See <link to="IMedium::location"/> to get more details about the format
1946 of the location string.
1947
1948 <note>
1949 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1950 </note>
1951
1952 <result name="VBOX_E_INVALID_OBJECT_STATE">
1953 CD/DVD image already exists in the media registry.
1954 </result>
1955
1956 </desc>
1957 <param name="location" type="wstring" dir="in">
1958 <desc>
1959 Full path to the file that contains a valid CD/DVD image.
1960 </desc>
1961 </param>
1962 <param name="id" type="uuid" dir="in">
1963 <desc>
1964 UUID to assign to the given image within this VirtualBox installation.
1965 If an empty (null) UUID is specified, the system will randomly
1966 generate a new UUID.
1967 </desc>
1968 </param>
1969 <param name="image" type="IDVDImage2" dir="return">
1970 <desc>Opened CD/DVD image object.</desc>
1971 </param>
1972 </method>
1973
1974 <method name="getDVDImage">
1975 <desc>
1976 Returns a CD/DVD image with the given UUID.
1977
1978 The image with the given UUID must be known to this VirtualBox
1979 installation, i.e. it must be previously opened by <link
1980 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1981
1982 <result name="VBOX_E_OBJECT_NOT_FOUND">
1983 No matching DVD image found in the media registry.
1984 </result>
1985
1986 </desc>
1987 <param name="id" type="uuid" dir="in">
1988 <desc>UUID of the image to look for.</desc>
1989 </param>
1990 <param name="image" type="IDVDImage2" dir="return">
1991 <desc>Found CD/DVD image object.</desc>
1992 </param>
1993 </method>
1994
1995 <method name="findDVDImage">
1996 <desc>
1997 Returns a CD/DVD image with the given image location.
1998
1999 The image with the given UUID must be known to this VirtualBox
2000 installation, i.e. it must be previously opened by <link
2001 to="#openDVDImage()"/>, or mounted to some known virtual machine.
2002
2003 The search is done by comparing the value of the @a location argument to
2004 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2005
2006 The requested location can be a path relative to the
2007 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2008 only a file name without any path is given, the
2009 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2010 folder</link> will be prepended to the file name before searching. Note
2011 that on case sensitive file systems, a case sensitive comparison is
2012 performed, otherwise the case in the file path is ignored.
2013
2014 <result name="VBOX_E_FILE_ERROR">
2015 Invalid image file location.
2016 </result>
2017 <result name="VBOX_E_OBJECT_NOT_FOUND">
2018 No matching DVD image found in the media registry.
2019 </result>
2020
2021 </desc>
2022 <param name="location" type="wstring" dir="in">
2023 <desc>CD/DVD image file path to look for.</desc>
2024 </param>
2025 <param name="image" type="IDVDImage2" dir="return">
2026 <desc>Found CD/DVD image object.</desc>
2027 </param>
2028 </method>
2029
2030 <method name="openFloppyImage">
2031 <desc>
2032 Opens a floppy image contained in the specified file of the supported
2033 format and assigns it the given UUID.
2034
2035 After the image is successfully opened by this method, it gets
2036 remembered by (known to) this VirtualBox installation and will be
2037 accessible through <link to="#getFloppyImage()"/> and
2038 <link to="#findFloppyImage()"/> methods. Remembered images are also
2039 returned as part of the <link to="#floppyImages"/> array and can be
2040 mounted to virtual machines. See IMedium for more details.
2041
2042 See <link to="IMedium::location"/> to get more details about the format
2043 of the location string.
2044
2045 <result name="VBOX_E_FILE_ERROR">
2046 Floppy image specified by @a location not accessible.
2047 </result>
2048 <result name="VBOX_E_INVALID_OBJECT_STATE">
2049 Floppy image already exists in the media registry.
2050 </result>
2051
2052 <note>
2053 Currently, only raw floppy images are supported by VirtualBox.
2054 </note>
2055 </desc>
2056 <param name="location" type="wstring" dir="in">
2057 <desc>
2058 Full path to the file that contains a valid floppy image.
2059 </desc>
2060 </param>
2061 <param name="id" type="uuid" dir="in">
2062 <desc>
2063 UUID to assign to the given image file within this VirtualBox
2064 installation. If an empty (null) UUID is specified, the system will
2065 randomly generate a new UUID.
2066 </desc>
2067 </param>
2068 <param name="image" type="IFloppyImage2" dir="return">
2069 <desc>Opened floppy image object.</desc>
2070 </param>
2071 </method>
2072
2073 <method name="getFloppyImage">
2074 <desc>
2075 Returns a floppy image with the given UUID.
2076
2077 The image with the given UUID must be known to this VirtualBox
2078 installation, i.e. it must be previously opened by <link
2079 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2080
2081 <result name="VBOX_E_OBJECT_NOT_FOUND">
2082 No matching floppy image found in the media registry.
2083 </result>
2084
2085 </desc>
2086 <param name="id" type="uuid" dir="in">
2087 <desc>UUID of the image to look for.</desc>
2088 </param>
2089 <param name="image" type="IFloppyImage2" dir="return">
2090 <desc>Found floppy image object.</desc>
2091 </param>
2092 </method>
2093
2094 <method name="findFloppyImage">
2095 <desc>
2096 Returns a floppy image with the given image location.
2097
2098 The image with the given UUID must be known to this VirtualBox
2099 installation, i.e. it must be previously opened by <link
2100 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2101
2102 The search is done by comparing the value of the @a location argument to
2103 the <link to="IMedium::location"/> attribute of each known floppy image.
2104
2105 The requested location can be a path relative to the
2106 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2107 only a file name without any path is given, the
2108 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2109 folder</link> will be prepended to the file name before searching. Note
2110 that on case sensitive file systems, a case sensitive comparison is
2111 performed, otherwise the case of symbols in the file path is ignored.
2112
2113 <result name="VBOX_E_FILE_ERROR">
2114 Invalid image file location.
2115 </result>
2116 <result name="VBOX_E_OBJECT_NOT_FOUND">
2117 No matching floppy image found in the media registry.
2118 </result>
2119
2120 </desc>
2121 <param name="location" type="wstring" dir="in">
2122 <desc>Floppy image file path to look for.</desc>
2123 </param>
2124 <param name="image" type="IFloppyImage2" dir="return">
2125 <desc>Found floppy image object.</desc>
2126 </param>
2127 </method>
2128
2129 <method name="getGuestOSType">
2130 <desc>
2131 Returns an object describing the specified guest OS type.
2132
2133 The requested guest OS type is specified using a string which is a
2134 mnemonic identifier of the guest operating system, such as
2135 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2136 particular virtual machine can be read or set using the
2137 <link to="IMachine::OSTypeId"/> attribute.
2138
2139 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2140 available guest OS type objects. Each object has an
2141 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2142 the guest OS this object describes.
2143
2144 <result name="E_INVALIDARG">
2145 @a id is not a valid Guest OS type.
2146 </result>
2147
2148 </desc>
2149 <param name="id" type="wstring" dir="in">
2150 <desc>Guest OS type ID string.</desc>
2151 </param>
2152 <param name="type" type="IGuestOSType" dir="return">
2153 <desc>Guest OS type object.</desc>
2154 </param>
2155 </method>
2156
2157 <method name="createSharedFolder">
2158 <desc>
2159 Creates a new global shared folder by associating the given logical
2160 name with the given host path, adds it to the collection of shared
2161 folders and starts sharing it. Refer to the description of
2162 <link to="ISharedFolder"/> to read more about logical names.
2163 <note>
2164 In the current implementation, this operation is not
2165 implemented.
2166 </note>
2167 </desc>
2168 <param name="name" type="wstring" dir="in">
2169 <desc>Unique logical name of the shared folder.</desc>
2170 </param>
2171 <param name="hostPath" type="wstring" dir="in">
2172 <desc>Full path to the shared folder in the host file system.</desc>
2173 </param>
2174 <param name="writable" type="boolean" dir="in">
2175 <desc>Whether the share is writable or readonly</desc>
2176 </param>
2177 </method>
2178
2179 <method name="removeSharedFolder">
2180 <desc>
2181 Removes the global shared folder with the given name previously
2182 created by <link to="#createSharedFolder"/> from the collection of
2183 shared folders and stops sharing it.
2184 <note>
2185 In the current implementation, this operation is not
2186 implemented.
2187 </note>
2188 </desc>
2189 <param name="name" type="wstring" dir="in">
2190 <desc>Logical name of the shared folder to remove.</desc>
2191 </param>
2192 </method>
2193
2194 <method name="getNextExtraDataKey">
2195 <desc>
2196 Returns the global extra data key name following the supplied key.
2197
2198 An error is returned if the supplied @a key does not exist. @c NULL is
2199 returned in @a nextKey if the supplied key is the last key. When
2200 supplying @c NULL for the @a key, the first key item is returned in @a
2201 nextKey (if there is any). @a nextValue is an optional parameter and
2202 if supplied, the next key's value is returned in it.
2203
2204 <result name="VBOX_E_OBJECT_NOT_FOUND">
2205 Extra data @a key not found.
2206 </result>
2207
2208 </desc>
2209 <param name="key" type="wstring" dir="in">
2210 <desc>Name of the data key to follow.</desc>
2211 </param>
2212 <param name="nextKey" type="wstring" dir="out">
2213 <desc>Name of the next data key.</desc>
2214 </param>
2215 <param name="nextValue" type="wstring" dir="out">
2216 <desc>Value of the next data key.</desc>
2217 </param>
2218 </method>
2219
2220 <method name="getExtraData">
2221 <desc>
2222 Returns associated global extra data.
2223
2224 If the requested data @a key does not exist, this function will
2225 succeed and return @c NULL in the @a value argument.
2226
2227 <result name="VBOX_E_FILE_ERROR">
2228 Settings file not accessible.
2229 </result>
2230 <result name="VBOX_E_XML_ERROR">
2231 Could not parse the settings file.
2232 </result>
2233
2234 </desc>
2235 <param name="key" type="wstring" dir="in">
2236 <desc>Name of the data key to get.</desc>
2237 </param>
2238 <param name="value" type="wstring" dir="return">
2239 <desc>Value of the requested data key.</desc>
2240 </param>
2241 </method>
2242
2243 <method name="setExtraData">
2244 <desc>
2245 Sets associated global extra data.
2246
2247 If you pass @c NULL as a key @a value, the given @a key will be
2248 deleted.
2249
2250 <note>
2251 Before performing the actual data change, this method will ask all
2252 registered callbacks using the
2253 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
2254 notification for a permission. If one of the callbacks refuses the
2255 new value, the change will not be performed.
2256 </note>
2257 <note>
2258 On success, the
2259 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
2260 is called to inform all registered callbacks about a successful data
2261 change.
2262 </note>
2263
2264 <result name="VBOX_E_FILE_ERROR">
2265 Settings file not accessible.
2266 </result>
2267 <result name="VBOX_E_XML_ERROR">
2268 Could not parse the settings file.
2269 </result>
2270 <result name="E_ACCESSDENIED">
2271 Modification request refused.
2272 </result>
2273
2274 </desc>
2275 <param name="key" type="wstring" dir="in">
2276 <desc>Name of the data key to set.</desc>
2277 </param>
2278 <param name="value" type="wstring" dir="in">
2279 <desc>Value to assign to the key.</desc>
2280 </param>
2281 </method>
2282
2283 <method name="openSession">
2284 <desc>
2285 Opens a new direct session with the given virtual machine.
2286
2287 A direct session acts as a local lock on the given VM.
2288 There can be only one direct session open at a time for every
2289 virtual machine, protecting the VM from being manipulated by
2290 conflicting actions from different processes. Only after a
2291 direct session has been opened, one can change all VM settings
2292 and execute the VM in the process space of the session object.
2293
2294 Sessions therefore can be compared to mutex semaphores that
2295 lock a given VM for modification and execution.
2296 See <link to="ISession">ISession</link> for details.
2297
2298 <note>Unless you are writing a new VM frontend, you will not
2299 want to execute a VM in the current process. To spawn a new
2300 process that executes a VM, use
2301 <link to="IVirtualBox::openRemoteSession" />
2302 instead.</note>
2303
2304 Upon successful return, the session object can be used to
2305 get access to the machine and to the VM console.
2306
2307 In VirtualBox terminology, the machine becomes "mutable" after
2308 a session has been opened. Note that the "mutable" machine
2309 object, on which you may invoke IMachine methods to change its
2310 settings, will be a different object from the immutable IMachine
2311 objects returned by various IVirtualBox methods. To obtain a
2312 mutable IMachine object (upon which you can invoke settings methods),
2313 use the <link to="ISession::machine" /> attribute.
2314
2315 One must always call <link to="ISession::close" /> to release the
2316 lock on the machine, or the machine's state will eventually be
2317 set to "Aborted".
2318
2319 In other words, to change settings on a machine, the following
2320 sequence is typically performed:
2321
2322 <ol>
2323 <li>Call this method (openSession) to have a machine locked for
2324 the current session.</li>
2325
2326 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2327
2328 <li>Change the settings of the machine.</li>
2329
2330 <li>Call <link to="IMachine::saveSettings" />.</li>
2331
2332 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2333 </ol>
2334
2335 <result name="E_UNEXPECTED">
2336 Virtual machine not registered.
2337 </result>
2338 <result name="E_ACCESSDENIED">
2339 Process not started by OpenRemoteSession.
2340 </result>
2341 <result name="VBOX_E_OBJECT_NOT_FOUND">
2342 No matching virtual machine found.
2343 </result>
2344 <result name="VBOX_E_INVALID_OBJECT_STATE">
2345 Session already open or being opened.
2346 </result>
2347 <result name="VBOX_E_VM_ERROR">
2348 Failed to assign machine to session.
2349 </result>
2350
2351 </desc>
2352 <param name="session" type="ISession" dir="in">
2353 <desc>
2354 Session object that will represent the opened session after
2355 successful method invocation. This object must not represent
2356 the already open session.
2357 <note>
2358 This session will be automatically closed if the
2359 VirtualBox server is terminated for some reason.
2360 </note>
2361 </desc>
2362 </param>
2363 <param name="machineId" type="uuid" dir="in">
2364 <desc>ID of the virtual machine to open a session with.</desc>
2365 </param>
2366 </method>
2367
2368 <method name="openRemoteSession">
2369 <desc>
2370 Spawns a new process that executes a virtual machine (called a
2371 "remote session").
2372
2373 Opening a remote session causes the VirtualBox server to start a new
2374 process that opens a direct session with the given VM. As a result, the
2375 VM is locked by that direct session in the new process, preventing
2376 conflicting changes from other processes. Since sessions act as locks
2377 that such prevent conflicting changes, one cannot open a remote session
2378 for a VM that already has another open session (direct or remote), or
2379 is currently in the process of opening one (see <link
2380 to="IMachine::sessionState"/>).
2381
2382 While the remote session still provides some level of control over the
2383 VM execution to the caller (using the <link to="IConsole" /> interface),
2384 not all VM settings are available for modification within the remote
2385 session context.
2386
2387 This operation can take some time (a new VM is started in a new process,
2388 for which memory and other resources need to be set up). Because of this,
2389 an <link to="IProgress" /> is returned to allow the caller to wait for this
2390 asynchronous operation to be completed. Until then, the remote session
2391 object remains in the closed state, and accessing the machine or its
2392 console through it is invalid. It is recommended to use
2393 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2394 completion.
2395
2396 As with all <link to="ISession" /> objects, it is recommended to call
2397 <link to="ISession::close" /> on the local session object once openRemoteSession()
2398 has been called. However, the session's state (see <link to="ISession::state" />)
2399 will not return to "Closed" until the remote session has also closed (i.e.
2400 until the VM is no longer running). In that case, however, the state of
2401 the session will automatically change back to "Closed".
2402
2403 Currently supported session types (values of the @a type
2404 argument) are:
2405 <ul>
2406 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2407 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2408 </ul>
2409
2410 The @a environment argument is a string containing definitions of
2411 environment variables in the following format:
2412 @code
2413 NAME[=VALUE]\n
2414 NAME[=VALUE]\n
2415 ...
2416 @endcode
2417 where <tt>\\n</tt> is the new line character. These environment
2418 variables will be appended to the environment of the VirtualBox server
2419 process. If an environment variable exists both in the server process
2420 and in this list, the value from this list takes precedence over the
2421 server's variable. If the value of the environment variable is
2422 omitted, this variable will be removed from the resulting environment.
2423 If the environment string is @c null, the server environment is
2424 inherited by the started process as is.
2425
2426 <see>openExistingSession</see>
2427
2428 <result name="E_UNEXPECTED">
2429 Virtual machine not registered.
2430 </result>
2431 <result name="E_INVALIDARG">
2432 Invalid session type @a type.
2433 </result>
2434 <result name="VBOX_E_OBJECT_NOT_FOUND">
2435 No machine matching @a machineId found.
2436 </result>
2437 <result name="VBOX_E_INVALID_OBJECT_STATE">
2438 Session already open or being opened.
2439 </result>
2440 <result name="VBOX_E_IPRT_ERROR">
2441 Launching process for machine failed.
2442 </result>
2443 <result name="VBOX_E_VM_ERROR">
2444 Failed to assign machine to session.
2445 </result>
2446
2447 </desc>
2448 <param name="session" type="ISession" dir="in">
2449 <desc>
2450 Session object that will represent the opened remote session
2451 after successful method invocation (this object must not
2452 represent an already open session).
2453 </desc>
2454 </param>
2455 <param name="machineId" type="uuid" dir="in">
2456 <desc>ID of the virtual machine to open a session with.</desc>
2457 </param>
2458 <param name="type" type="wstring" dir="in">
2459 <desc>
2460 Type of the remote session (case sensitive).
2461 </desc>
2462 </param>
2463 <param name="environment" type="wstring" dir="in">
2464 <desc>
2465 Environment to pass to the opened session (may be @c null).
2466 </desc>
2467 </param>
2468 <param name="progress" type="IProgress" dir="return">
2469 <desc>Progress object to track the operation completion.</desc>
2470 </param>
2471 </method>
2472
2473 <method name="openExistingSession">
2474 <desc>
2475 Opens a new remote session with the virtual machine for
2476 which a direct session is already open.
2477
2478 The remote session provides some level of control over the VM
2479 execution (using the IConsole interface) to the caller; however,
2480 within the remote session context, not all VM settings are available
2481 for modification.
2482
2483 As opposed to <link to="#openRemoteSession()"/>, the number of
2484 remote sessions opened this way is not limited by the API
2485
2486 <note>
2487 It is an error to open a remote session with the machine that
2488 doesn't have an open direct session.
2489 </note>
2490
2491 <result name="E_UNEXPECTED">
2492 Virtual machine not registered.
2493 </result>
2494 <result name="VBOX_E_OBJECT_NOT_FOUND">
2495 No machine matching @a machineId found.
2496 </result>
2497 <result name="VBOX_E_INVALID_OBJECT_STATE">
2498 Session already open or being opened.
2499 </result>
2500 <result name="VBOX_E_INVALID_SESSION_STATE">
2501 Direct session state not Open.
2502 </result>
2503 <result name="VBOX_E_VM_ERROR">
2504 Failed to get console object from direct session or assign
2505 machine to session.
2506 </result>
2507
2508 <see>openRemoteSession</see>
2509 </desc>
2510 <param name="session" type="ISession" dir="in">
2511 <desc>
2512 Session object that will represent the open remote session
2513 after successful method invocation. This object must not
2514 represent an already open session.
2515 <note>
2516 This session will be automatically closed when the peer
2517 (direct) session dies or gets closed.
2518 </note>
2519 </desc>
2520 </param>
2521 <param name="machineId" type="uuid" dir="in">
2522 <desc>ID of the virtual machine to open a session with.</desc>
2523 </param>
2524 </method>
2525
2526 <method name="registerCallback">
2527 <desc>
2528 Registers a new global VirtualBox callback. The methods of the given
2529 callback object will be called by VirtualBox when an appropriate
2530 event occurs.
2531
2532 <result name="E_INVALIDARG">
2533 Registering a @c NULL @a callback is pretty pointless, ain't it?
2534 <!-- See if someone is actually reading this and objects :-) -->
2535 </result>
2536
2537 </desc>
2538 <param name="callback" type="IVirtualBoxCallback" dir="in">
2539 <desc>Callback object to register.</desc>
2540 </param>
2541 </method>
2542
2543 <method name="unregisterCallback">
2544 <desc>
2545 Unregisters the previously registered global VirtualBox callback.
2546
2547 <result name="E_INVALIDARG">
2548 Specified @a callback not registered.
2549 </result>
2550
2551 </desc>
2552 <param name="callback" type="IVirtualBoxCallback" dir="in">
2553 <desc>Callback object to unregister.</desc>
2554 </param>
2555 </method>
2556
2557 <method name="waitForPropertyChange">
2558 <desc>
2559 Blocks the caller until any of the properties represented by the @a
2560 what argument changes the value or until the given timeout interval
2561 expires.
2562
2563 The @a what argument is a comma separated list of property masks that
2564 describe properties the caller is interested in. The property mask is
2565 a string in the following format:
2566
2567 <pre>
2568 [[group.]subgroup.]name
2569 </pre>
2570
2571 where @c name is the property name and @c group, @c subgroup are zero
2572 or more property group specifiers. Each element (group or name) in
2573 the property mask may be either a Latin string or an asterisk symbol
2574 (@c "*") which is used to match any string for the given element. A
2575 property mask that doesn't contain asterisk symbols represents a
2576 single fully qualified property name.
2577
2578 Groups in the fully qualified property name go from more generic (the
2579 left-most part) to more specific (the right-most part). The first
2580 element is usually a name of the object the property belongs to. The
2581 second element may be either a property name, or a child object name,
2582 or an index if the preceding element names an object which is one of
2583 many objects of the same type. This way, property names form a
2584 hierarchy of properties. Here are some examples of property names:
2585
2586 <table>
2587 <tr>
2588 <td><tt>VirtualBox.version</tt></td>
2589 <td><link to="IVirtualBox::version"/> property</td>
2590 </tr>
2591 <tr>
2592 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2593 <td><link to="IMachine::name"/> property of the machine with the
2594 given UUID</td>
2595 </tr>
2596 </table>
2597
2598 Most property names directly correspond to the properties of objects
2599 (components) provided by the VirtualBox library and may be used to
2600 track changes to these properties. However, there may be
2601 pseudo-property names that don't correspond to any existing object's
2602 property directly, as well as there may be object properties that
2603 don't have a corresponding property name that is understood by this
2604 method, and therefore changes to such properties cannot be
2605 tracked. See individual object's property descriptions to get a
2606 fully qualified property name that can be used with this method (if
2607 any).
2608
2609 There is a special property mask @c "*" (i.e. a string consisting of a
2610 single asterisk symbol) that can be used to match all properties.
2611 Below are more examples of property masks:
2612
2613 <table>
2614 <tr>
2615 <td><tt>VirtualBox.*</tt></td>
2616 <td>Track all properties of the VirtualBox object</td>
2617 </tr>
2618 <tr>
2619 <td><tt>Machine.*.name</tt></td>
2620 <td>Track changes to the <link to="IMachine::name"/> property of
2621 all registered virtual machines</td>
2622 </tr>
2623 </table>
2624
2625 <note>
2626 This function is not implemented in the current version of the
2627 product.
2628 </note>
2629 </desc>
2630 <param name="what" type="wstring" dir="in">
2631 <desc>Comma separated list of property masks.</desc>
2632 </param>
2633 <param name="timeout" type="unsigned long" dir="in">
2634 <desc>
2635 Wait timeout in milliseconds.
2636 Specify -1 for an indefinite wait.
2637 </desc>
2638 </param>
2639 <param name="changed" type="wstring" dir="out">
2640 <desc>
2641 Comma separated list of properties that have been changed and caused
2642 this method to return to the caller.
2643 </desc>
2644 </param>
2645 <param name="values" type="wstring" dir="out">
2646 <desc>Reserved, not currently used.</desc>
2647 </param>
2648 </method>
2649
2650 <method name="saveSettings">
2651 <desc>
2652 Saves the global settings to the global settings file
2653 (<link to="#settingsFilePath"/>).
2654
2655 This method is only useful for explicitly saving the global settings
2656 file after it has been auto-converted from the old format to the most
2657 recent format (see <link to="#settingsFileVersion"/> for details).
2658 Normally, the global settings file is implicitly saved when a global
2659 setting is changed.
2660
2661 <result name="VBOX_E_FILE_ERROR">
2662 Settings file not accessible.
2663 </result>
2664 <result name="VBOX_E_XML_ERROR">
2665 Could not parse the settings file.
2666 </result>
2667
2668 </desc>
2669 </method>
2670
2671 <method name="saveSettingsWithBackup">
2672 <desc>
2673 Creates a backup copy of the global settings file
2674 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2675 calls <link to="#saveSettings()"/>.
2676
2677 Note that the backup copy is created <b>only</b> if the settings file
2678 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2679 details). Otherwise, this call is fully equivalent to
2680 <link to="#saveSettings()"/> and no backup copying is done.
2681
2682 The backup copy is created in the same directory where the original
2683 settings file is located. It is given the following file name:
2684 <pre>
2685 original.xml.x.y-platform.bak
2686 </pre>
2687 where <tt>original.xml</tt> is the original settings file name
2688 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2689 format of the settings file (before auto-conversion).
2690
2691 If the given backup file already exists, this method will try to add the
2692 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2693 0 to 9) and copy it again until it succeeds. If all suffixes are
2694 occupied, or if any other copy error occurs, this method will return a
2695 failure.
2696
2697 If the copy operation succeeds, the @a bakFileName return argument will
2698 receive a full path to the created backup file (for informational
2699 purposes). Note that this will happen even if the subsequent
2700 <link to="#saveSettings()"/> call performed by this method after the
2701 copy operation, fails.
2702
2703 <note>
2704 The VirtualBox API never calls this method. It is intended purely for
2705 the purposes of creating backup copies of the settings files by
2706 front-ends before saving the results of the automatically performed
2707 settings conversion to disk.
2708 </note>
2709
2710 <see>settingsFileVersion</see>
2711
2712 <result name="VBOX_E_FILE_ERROR">
2713 Settings file not accessible.
2714 </result>
2715 <result name="VBOX_E_XML_ERROR">
2716 Could not parse the settings file.
2717 </result>
2718 <result name="VBOX_E_IPRT_ERROR">
2719 Could not copy the settings file.
2720 </result>
2721
2722 </desc>
2723 <param name="bakFileName" type="wstring" dir="return">
2724 <desc>Full path to the created backup copy.</desc>
2725 </param>
2726 </method>
2727
2728 </interface>
2729
2730 <!--
2731 // IAppliance
2732 /////////////////////////////////////////////////////////////////////////
2733 -->
2734
2735 <enum
2736 name="CIMOSType"
2737 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2738 >
2739 <desc>
2740 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2741 </desc>
2742
2743 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2744 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2745 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2746 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2747 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2748 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2749 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2750 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2751 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2752 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2753 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2754 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2755 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2756 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2757 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2758 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2759 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2760 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2761 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2762 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2763 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2764 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2765 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2766 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2767 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2768 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2769 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2770 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2771 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2772 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2773 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2774 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2775 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2776 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2777 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2778 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2779 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2780 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2781 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2782 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2783 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2784 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2785 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2786 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2787 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2788 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2789 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2790 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2791 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2792 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2793 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2794 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2795 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2796 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2797 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2798 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2799 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2800 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2801 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2802 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2803 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2804 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2805 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2806 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2807 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2808 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2809 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2810 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2811 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2812 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2813 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2814 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2815 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2816 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2817 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2818 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2819 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2820 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2821 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2822 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2823 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2824 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2825 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2826 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2827 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2828 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2829 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2830 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2831 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2832 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2833 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2834 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2835 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2836 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2837 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2838 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2839 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2840 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2841 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
2842 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
2843 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
2844 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
2845 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
2846 </enum>
2847
2848 <enum
2849 name="OVFResourceType"
2850 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
2851 >
2852 <desc>
2853 OVF resource type.
2854 </desc>
2855
2856 <const name="Other" value="1" />
2857 <const name="ComputerSystem" value="2" />
2858 <const name="Processor" value="3" />
2859 <const name="Memory" value="4" />
2860 <const name="IdeController" value="5" />
2861 <const name="ParallelScsiHba" value="6" />
2862 <const name="FcHba" value="7" />
2863 <const name="iScsiHba" value="8" />
2864 <const name="IbHca" value="9" />
2865 <const name="EthernetAdapter" value="10" />
2866 <const name="OtherNetworkAdapter" value="11" />
2867 <const name="IoSlot" value="12" />
2868 <const name="IoDevice" value="13" />
2869 <const name="FloppyDrive" value="14" />
2870 <const name="CdDrive" value="15" />
2871 <const name="DvdDrive" value="16" />
2872 <const name="HardDisk" value="17" />
2873 </enum>
2874
2875 <interface
2876 name="IAppliance" extends="$unknown"
2877 uuid="f3aa3a74-7b66-425b-9d3d-973924ddf163"
2878 wsmap="managed"
2879 >
2880 <desc>
2881 Represents an appliance in OVF format. An instance of this is returned by
2882 <link to="IVirtualBox::openAppliance" />.
2883
2884 Opening an appliance is a two-step process with VirtualBox: first
2885 <link to="IVirtualBox::openAppliance" /> is called, which succeeds if the
2886 appliance file is syntactically valid, irrespective of whether VirtualBox
2887 can handle the appliance.
2888
2889 Once that method has returned an IAppliance instance, one can inspect the
2890 member data of that instance to determine whether VirtualBox can handle
2891 the requirements of that appliance and create local virtual machines
2892 accordingly.
2893 </desc>
2894
2895 <attribute name="path" type="wstring" readonly="yes">
2896 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2897 the <tt>.ova</tt> file passed to <link to="IVirtualBox::openAppliance" />.</desc>
2898 </attribute>
2899
2900 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2901 <desc></desc>
2902 </attribute>
2903
2904 <method name="getDisks">
2905 <desc>
2906 Returns disk information from the appliance specification in a string
2907 array. Each array item represents one piece of disk information, with the
2908 information fields separated by tab (\t) characters.
2909
2910 The caller should be prepared for additional fields being appended to
2911 this string in future versions of VirtualBox and therefore check for
2912 the number of tabs in the strings returned.
2913
2914 In the current version, the following eight fields are returned per string
2915 in the array:
2916
2917 <ol>
2918 <li>Disk ID (unique string identifier given to disk)</li>
2919 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2920 <li>Populated size (optional unsigned integer indicating the current size of the
2921 disk; can be approximate; -1 if unspecified)</li>
2922 <li>Format (string identifying the disk format, typically
2923 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2924 <li>Reference (where to find the disk image, typically a file name; if empty,
2925 then the disk should be created on import)</li>
2926 <li>Image size (optional unsigned integer indicating the size of the image,
2927 which need not necessarily be the same as the values specified above, since
2928 the image may be compressed or sparse; -1 if not specified)</li>
2929 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2930 presently unsupported and always -1)</li>
2931 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2932 </ol>
2933
2934 </desc>
2935
2936 <param name="aDisks" type="wstring" dir="out" safearray="yes">
2937 <desc>Array of strings to receive disk information.</desc>
2938 </param>
2939
2940 <param name="cDisks" type="unsigned long" dir="return">
2941 <desc>Count of array items returned in aDisks.</desc>
2942 </param>
2943 </method>
2944
2945 <method name="importAppliance">
2946 </method>
2947
2948 </interface>
2949
2950 <enum
2951 name="VirtualSystemDescriptionType"
2952 uuid="36209b5a-8f96-44de-a0af-1bb037cef324"
2953 >
2954 <desc>
2955 </desc>
2956
2957 <const name="Name" value="1" />
2958 <const name="OS" value="2" />
2959 <const name="CPU" value="3" />
2960 <const name="Memory" value="4" />
2961 <const name="HarddiskControllerIDE" value="5" />
2962 <const name="HarddiskControllerSATA" value="6" />
2963 <const name="HarddiskControllerSCSI" value="7" />
2964 <const name="Harddisk" value="8" />
2965 <const name="NetworkAdapter" value="9" />
2966
2967 </enum>
2968
2969 <interface
2970 name="IVirtualSystemDescription" extends="$unknown"
2971 uuid="c76de96b-b316-4a42-9afb-18ce08cce0c9"
2972 wsmap="managed"
2973 >
2974
2975 <method name="getDescription">
2976 <desc></desc>
2977
2978 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2979 <desc></desc>
2980 </param>
2981
2982 <param name="aRefs" type="unsigned long" dir="out" safearray="yes">
2983 <desc></desc>
2984 </param>
2985
2986 <param name="aOrigValues" type="wstring" dir="out" safearray="yes">
2987 <desc></desc>
2988 </param>
2989
2990 <param name="aAutoValues" type="wstring" dir="out" safearray="yes">
2991 <desc></desc>
2992 </param>
2993
2994 <param name="aConfiguration" type="wstring" dir="out" safearray="yes">
2995 <desc></desc>
2996 </param>
2997
2998 </method>
2999
3000 <method name="SetFinalValues">
3001 <desc></desc>
3002
3003 <param name="aFinaleValues" type="wstring" dir="in" safearray="yes">
3004 <desc></desc>
3005 </param>
3006
3007 </method>
3008
3009 </interface>
3010
3011
3012 <!--
3013 // IMachine
3014 /////////////////////////////////////////////////////////////////////////
3015 -->
3016
3017 <enumerator
3018 name="IMachineEnumerator" type="IMachine"
3019 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
3020 />
3021
3022 <collection
3023 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
3024 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
3025 readonly="yes"
3026 />
3027
3028 <interface
3029 name="IInternalMachineControl" extends="$unknown"
3030 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
3031 internal="yes"
3032 wsmap="suppress"
3033 >
3034 <method name="updateState">
3035 <desc>
3036 Updates the VM state.
3037 <note>
3038 This operation will also update the settings file with
3039 the correct information about the saved state file
3040 and delete this file from disk when appropriate.
3041 </note>
3042 </desc>
3043 <param name="state" type="MachineState" dir="in"/>
3044 </method>
3045
3046 <method name="getIPCId">
3047 <param name="id" type="wstring" dir="return"/>
3048 </method>
3049
3050 <method name="runUSBDeviceFilters">
3051 <desc>
3052 Asks the server to run USB devices filters of the associated
3053 machine against the given USB device and tell if there is
3054 a match.
3055 <note>
3056 Intended to be used only for remote USB devices. Local
3057 ones don't require to call this method (this is done
3058 implicitly by the Host and USBProxyService).
3059 </note>
3060 </desc>
3061 <param name="device" type="IUSBDevice" dir="in"/>
3062 <param name="matched" type="boolean" dir="out"/>
3063 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3064 </method>
3065
3066 <method name="captureUSBDevice">
3067 <desc>
3068 Requests a capture of the given host USB device.
3069 When the request is completed, the VM process will
3070 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3071 notification.
3072 </desc>
3073 <param name="id" type="uuid" dir="in"/>
3074 </method>
3075
3076 <method name="detachUSBDevice">
3077 <desc>
3078 Notification that a VM is going to detach (done = false) or has
3079 already detached (done = true) the given USB device.
3080 When the done = true request is completed, the VM process will
3081 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3082 notification.
3083 <note>
3084 In the done = true case, the server must run its own filters
3085 and filters of all VMs but this one on the detached device
3086 as if it were just attached to the host computer.
3087 </note>
3088 </desc>
3089 <param name="id" type="uuid" dir="in"/>
3090 <param name="done" type="boolean" dir="in"/>
3091 </method>
3092
3093 <method name="autoCaptureUSBDevices">
3094 <desc>
3095 Requests a capture all matching USB devices attached to the host.
3096 When the request is completed, the VM process will
3097 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3098 notification per every captured device.
3099 </desc>
3100 </method>
3101
3102 <method name="detachAllUSBDevices">
3103 <desc>
3104 Notification that a VM that is being powered down. The done
3105 parameter indicates whether which stage of the power down
3106 we're at. When done = false the VM is announcing its
3107 intentions, while when done = true the VM is reporting
3108 what it has done.
3109 <note>
3110 In the done = true case, the server must run its own filters
3111 and filters of all VMs but this one on all detach devices as
3112 if they were just attached to the host computer.
3113 </note>
3114 </desc>
3115 <param name="done" type="boolean" dir="in"/>
3116 </method>
3117
3118 <method name="onSessionEnd">
3119 <desc>
3120 Triggered by the given session object when the session is about
3121 to close normally.
3122 </desc>
3123 <param name="session" type="ISession" dir="in">
3124 <desc>Session that is being closed</desc>
3125 </param>
3126 <param name="progress" type="IProgress" dir="return">
3127 <desc>
3128 Used to wait until the corresponding machine is actually
3129 dissociated from the given session on the server.
3130 Returned only when this session is a direct one.
3131 </desc>
3132 </param>
3133 </method>
3134
3135 <method name="beginSavingState">
3136 <desc>
3137 Called by the VM process to inform the server it wants to
3138 save the current state and stop the VM execution.
3139 </desc>
3140 <param name="progress" type="IProgress" dir="in">
3141 <desc>
3142 Progress object created by the VM process to wait until
3143 the state is saved.
3144 </desc>
3145 </param>
3146 <param name="stateFilePath" type="wstring" dir="out">
3147 <desc>
3148 File path the VM process must save the execution state to.
3149 </desc>
3150 </param>
3151 </method>
3152
3153 <method name="endSavingState">
3154 <desc>
3155 Called by the VM process to inform the server that saving
3156 the state previously requested by #beginSavingState is either
3157 successfully finished or there was a failure.
3158
3159 <result name="VBOX_E_FILE_ERROR">
3160 Settings file not accessible.
3161 </result>
3162 <result name="VBOX_E_XML_ERROR">
3163 Could not parse the settings file.
3164 </result>
3165
3166 </desc>
3167
3168 <param name="success" type="boolean" dir="in">
3169 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3170 otherwise.
3171 </desc>
3172 </param>
3173 </method>
3174
3175 <method name="adoptSavedState">
3176 <desc>
3177 Gets called by IConsole::adoptSavedState.
3178 <result name="VBOX_E_FILE_ERROR">
3179 Invalid saved state file path.
3180 </result>
3181 </desc>
3182 <param name="savedStateFile" type="wstring" dir="in">
3183 <desc>Path to the saved state file to adopt.</desc>
3184 </param>
3185 </method>
3186
3187 <method name="beginTakingSnapshot">
3188 <desc>
3189 Called by the VM process to inform the server it wants to
3190 take a snapshot.
3191
3192 <result name="VBOX_E_FILE_ERROR">
3193 Settings file not accessible.
3194 </result>
3195 <result name="VBOX_E_XML_ERROR">
3196 Could not parse the settings file.
3197 </result>
3198 </desc>
3199 <param name="initiator" type="IConsole" dir="in">
3200 <desc>The console object that initiated this call.</desc>
3201 </param>
3202 <param name="name" type="wstring" dir="in">
3203 <desc>Snapshot name.</desc>
3204 </param>
3205 <param name="description" type="wstring" dir="in">
3206 <desc>Snapshot description.</desc>
3207 </param>
3208 <param name="progress" type="IProgress" dir="in">
3209 <desc>
3210 Progress object created by the VM process to wait until
3211 the state is saved (only for online snapshots).
3212 </desc>
3213 </param>
3214 <param name="stateFilePath" type="wstring" dir="out">
3215 <desc>
3216 File path the VM process must save the execution state to.
3217 </desc>
3218 </param>
3219 <param name="serverProgress" type="IProgress" dir="out">
3220 <desc>
3221 Progress object created by the server process to wait until
3222 the snapshot is taken (VDI diff creation, etc.).
3223 </desc>
3224 </param>
3225 </method>
3226
3227 <method name="endTakingSnapshot">
3228 <desc>
3229 Called by the VM process to inform the server that the snapshot
3230 previously requested by #beginTakingSnapshot is either
3231 successfully taken or there was a failure.
3232 </desc>
3233
3234 <param name="success" type="boolean" dir="in">
3235 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3236 </param>
3237 </method>
3238
3239 <method name="discardSnapshot">
3240 <desc>
3241 Gets called by IConsole::discardSnapshot.
3242 <result name="VBOX_E_INVALID_OBJECT_STATE">
3243 Snapshot has more than one child snapshot.
3244 </result>
3245 </desc>
3246 <param name="initiator" type="IConsole" dir="in">
3247 <desc>The console object that initiated this call.</desc>
3248 </param>
3249 <param name="id" type="uuid" dir="in">
3250 <desc>UUID of the snapshot to discard.</desc>
3251 </param>
3252 <param name="machineState" type="MachineState" dir="out">
3253 <desc>New machine state after this operation is started.</desc>
3254 </param>
3255 <param name="progress" type="IProgress" dir="return">
3256 <desc>Progress object to track the operation completion.</desc>
3257 </param>
3258 </method>
3259
3260 <method name="discardCurrentState">
3261 <desc>
3262 Gets called by IConsole::discardCurrentState.
3263 <result name="VBOX_E_INVALID_OBJECT_STATE">
3264 Virtual machine does not have any snapshot.
3265 </result>
3266 </desc>
3267 <param name="initiator" type="IConsole" dir="in">
3268 <desc>The console object that initiated this call.</desc>
3269 </param>
3270 <param name="machineState" type="MachineState" dir="out">
3271 <desc>New machine state after this operation is started.</desc>
3272 </param>
3273 <param name="progress" type="IProgress" dir="return">
3274 <desc>Progress object to track the operation completion.</desc>
3275 </param>
3276 </method>
3277
3278 <method name="discardCurrentSnapshotAndState">
3279 <desc>
3280 Gets called by IConsole::discardCurrentSnapshotAndState.
3281 <result name="VBOX_E_INVALID_OBJECT_STATE">
3282 Virtual machine does not have any snapshot.
3283 </result>
3284 </desc>
3285 <param name="initiator" type="IConsole" dir="in">
3286 <desc>The console object that initiated this call.</desc>
3287 </param>
3288 <param name="machineState" type="MachineState" dir="out">
3289 <desc>New machine state after this operation is started.</desc>
3290 </param>
3291 <param name="progress" type="IProgress" dir="return">
3292 <desc>Progress object to track the operation completion.</desc>
3293 </param>
3294 </method>
3295
3296 <method name="pullGuestProperties">
3297 <desc>
3298 Get the list of the guest properties matching a set of patterns along
3299 with their values, time stamps and flags and give responsibility for
3300 managing properties to the console.
3301 </desc>
3302 <param name="name" type="wstring" dir="out" safearray="yes">
3303 <desc>
3304 The names of the properties returned.
3305 </desc>
3306 </param>
3307 <param name="value" type="wstring" dir="out" safearray="yes">
3308 <desc>
3309 The values of the properties returned. The array entries match the
3310 corresponding entries in the @a name array.
3311 </desc>
3312 </param>
3313 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3314 <desc>
3315 The time stamps of the properties returned. The array entries match
3316 the corresponding entries in the @a name array.
3317 </desc>
3318 </param>
3319 <param name="flags" type="wstring" dir="out" safearray="yes">
3320 <desc>
3321 The flags of the properties returned. The array entries match the
3322 corresponding entries in the @a name array.
3323 </desc>
3324 </param>
3325 </method>
3326
3327 <method name="pushGuestProperties">
3328 <desc>
3329 Set the list of the guest properties matching a set of patterns along
3330 with their values, time stamps and flags and return responsibility for
3331 managing properties to IMachine.
3332 </desc>
3333 <param name="name" type="wstring" dir="in" safearray="yes">
3334 <desc>
3335 The names of the properties.
3336 </desc>
3337 </param>
3338 <param name="value" type="wstring" dir="in" safearray="yes">
3339 <desc>
3340 The values of the properties. The array entries match the
3341 corresponding entries in the @a name array.
3342 </desc>
3343 </param>
3344 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3345 <desc>
3346 The time stamps of the properties. The array entries match
3347 the corresponding entries in the @a name array.
3348 </desc>
3349 </param>
3350 <param name="flags" type="wstring" dir="in" safearray="yes">
3351 <desc>
3352 The flags of the properties. The array entries match the
3353 corresponding entries in the @a name array.
3354 </desc>
3355 </param>
3356 </method>
3357 <method name="pushGuestProperty">
3358 <desc>
3359 Update a single guest property in IMachine.
3360 </desc>
3361 <param name="name" type="wstring" dir="in">
3362 <desc>
3363 The name of the property to be updated.
3364 </desc>
3365 </param>
3366 <param name="value" type="wstring" dir="in">
3367 <desc>
3368 The value of the property.
3369 </desc>
3370 </param>
3371 <param name="timestamp" type="unsigned long long" dir="in">
3372 <desc>
3373 The timestamp of the property.
3374 </desc>
3375 </param>
3376 <param name="flags" type="wstring" dir="in">
3377 <desc>
3378 The flags of the property.
3379 </desc>
3380 </param>
3381 </method>
3382 </interface>
3383
3384 <interface
3385 name="IBIOSSettings" extends="$unknown"
3386 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3387 wsmap="managed"
3388 >
3389 <desc>
3390 The IBIOSSettings interface represents BIOS settings of the virtual
3391 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3392 </desc>
3393 <attribute name="logoFadeIn" type="boolean">
3394 <desc>Fade in flag for BIOS logo animation.</desc>
3395 </attribute>
3396
3397 <attribute name="logoFadeOut" type="boolean">
3398 <desc>Fade out flag for BIOS logo animation.</desc>
3399 </attribute>
3400
3401 <attribute name="logoDisplayTime" type="unsigned long">
3402 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3403 </attribute>
3404
3405 <attribute name="logoImagePath" type="wstring">
3406 <desc>Local file system path for external BIOS image.</desc>
3407 </attribute>
3408
3409 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3410 <desc>Mode of the BIOS boot device menu.</desc>
3411 </attribute>
3412
3413 <attribute name="ACPIEnabled" type="boolean">
3414 <desc>ACPI support flag.</desc>
3415 </attribute>
3416
3417 <attribute name="IOAPICEnabled" type="boolean">
3418 <desc>
3419 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3420 and support IRQs above 15.
3421 </desc>
3422 </attribute>
3423
3424 <attribute name="timeOffset" type="long long">
3425 <desc>
3426 Offset in milliseconds from the host system time. This allows for
3427 guests running with a different system date/time than the host.
3428 It is equivalent to setting the system date/time in the BIOS except
3429 it is not an absolute value but a relative one. Guest Additions
3430 time synchronization honors this offset.
3431 </desc>
3432 </attribute>
3433
3434 <attribute name="PXEDebugEnabled" type="boolean">
3435 <desc>
3436 PXE debug logging flag. If set, VirtualBox will write extensive
3437 PXE trace information to the release log.
3438 </desc>
3439 </attribute>
3440
3441 <attribute name="IDEControllerType" type="IDEControllerType">
3442 <desc>
3443 Type of the virtual IDE controller. Depending on this value,
3444 VirtualBox will provide different virtual IDE hardware
3445 devices to the guest.
3446 </desc>
3447 </attribute>
3448
3449 </interface>
3450
3451 <interface
3452 name="IMachine" extends="$unknown"
3453 uuid="ea6fb7ea-1993-4642-b113-f29eb39e0df0"
3454 wsmap="managed"
3455 >
3456 <desc>
3457 The IMachine interface represents a virtual machine, or guest, created
3458 in VirtualBox.
3459
3460 This interface is used in two contexts. First of all, a collection of
3461 objects implementing this interface is stored in the
3462 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
3463 machines that are currently registered with this VirtualBox
3464 installation. Also, once a session has been opened for the given virtual
3465 machine (e.g. the virtual machine is running), the machine object
3466 associated with the open session can be queried from the session object;
3467 see <link to="ISession"/> for details.
3468
3469 The main role of this interface is to expose the settings of the virtual
3470 machine and provide methods to change various aspects of the virtual
3471 machine's configuration. For machine objects stored in the
3472 <link to="IVirtualBox::machines2"/> collection, all attributes are
3473 read-only unless explicitly stated otherwise in individual attribute
3474 and method descriptions. In order to change a machine setting, a session
3475 for this machine must be opened using one of
3476 <link to="IVirtualBox::openSession"/>,
3477 <link to="IVirtualBox::openRemoteSession"/> or
3478 <link to="IVirtualBox::openExistingSession"/> methods. After the
3479 session has been successfully opened, a mutable machine object needs to
3480 be queried from the session object and then the desired settings changes
3481 can be applied to the returned object using IMachine attributes and
3482 methods. See the ISession interface description for more information
3483 about sessions.
3484
3485 Note that the IMachine interface does not provide methods to control
3486 virtual machine execution (such as start the machine, or power it
3487 down) -- these methods are grouped in a separate IConsole
3488 interface. Refer to the IConsole interface description to get more
3489 information about this topic.
3490
3491 <see>ISession, IConsole</see>
3492 </desc>
3493
3494 <attribute name="parent" type="IVirtualBox" readonly="yes">
3495 <desc>Associated parent object.</desc>
3496 </attribute>
3497
3498 <attribute name="accessible" type="boolean" readonly="yes">
3499 <desc>
3500 Whether this virtual machine is currently accessible or not.
3501
3502 The machine is considered to be inaccessible when:
3503 <ul>
3504 <li>It is a registered virtual machine, and
3505 </li>
3506 <li>Its settings file is inaccessible (for example, it is
3507 located on a network share that is not accessible during
3508 VirtualBox startup, or becomes inaccessible later, or if
3509 the settings file can be read but is invalid).
3510 </li>
3511 </ul>
3512
3513 Otherwise, the value of this property is always <tt>true</tt>.
3514
3515 Every time this property is read, the accessibility state of
3516 this machine is re-evaluated. If the returned value is |false|,
3517 the <link to="#accessError"/> property may be used to get the
3518 detailed error information describing the reason of
3519 inaccessibility.
3520
3521 When the machine is inaccessible, only the following properties
3522 can be used on it:
3523 <ul>
3524 <li><link to="#parent"/></li>
3525 <li><link to="#id"/></li>
3526 <li><link to="#settingsFilePath"/></li>
3527 <li><link to="#accessible"/></li>
3528 <li><link to="#accessError"/></li>
3529 </ul>
3530
3531 An attempt to access any other property or method will return
3532 an error.
3533
3534 The only possible action you can perform on an inaccessible
3535 machine is to unregister it using the
3536 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3537 for the accessibility state once more by querying this
3538 property).
3539
3540 <note>
3541 In the current implementation, once this property returns
3542 <tt>true</tt>, the machine will never become inaccessible
3543 later, even if its settings file cannot be successfully
3544 read/written any more (at least, until the VirtualBox
3545 server is restarted). This limitation may be removed in
3546 future releases.
3547 </note>
3548 </desc>
3549 </attribute>
3550
3551 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3552 <desc>
3553 Error information describing the reason of machine
3554 inaccessibility.
3555
3556 Reading this property is only valid after the last call to
3557 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3558 machine is currently unaccessible). Otherwise, a null
3559 IVirtualBoxErrorInfo object will be returned.
3560 </desc>
3561 </attribute>
3562
3563 <attribute name="name" type="wstring">
3564 <desc>
3565 Name of the virtual machine.
3566
3567 Besides being used for human-readable identification purposes
3568 everywhere in VirtualBox, the virtual machine name is also used
3569 as a name of the machine's settings file and as a name of the
3570 subdirectory this settings file resides in. Thus, every time you
3571 change the value of this property, the settings file will be
3572 renamed once you call <link to="#saveSettings()"/> to confirm the
3573 change. The containing subdirectory will be also renamed, but
3574 only if it has exactly the same name as the settings file
3575 itself prior to changing this property (for backward compatibility
3576 with previous API releases). The above implies the following
3577 limitations:
3578 <ul>
3579 <li>The machine name cannot be empty.</li>
3580 <li>The machine name can contain only characters that are valid
3581 file name characters according to the rules of the file
3582 system used to store VirtualBox configuration.</li>
3583 <li>You cannot have two or more machines with the same name
3584 if they use the same subdirectory for storing the machine
3585 settings files.</li>
3586 <li>You cannot change the name of the machine if it is running,
3587 or if any file in the directory containing the settings file
3588 is being used by another running machine or by any other
3589 process in the host operating system at a time when
3590 <link to="#saveSettings()"/> is called.
3591 </li>
3592 </ul>
3593 If any of the above limitations are hit, <link to="#saveSettings()"/>
3594 will return an appropriate error message explaining the exact
3595 reason and the changes you made to this machine will not be
3596 saved.
3597 <note>
3598 For "legacy" machines created using the
3599 <link to="IVirtualBox::createLegacyMachine()"/> call,
3600 the above naming limitations do not apply because the
3601 machine name does not affect the settings file name.
3602 The settings file name remains the same as it was specified
3603 during machine creation and never changes.
3604 </note>
3605 </desc>
3606 </attribute>
3607
3608 <attribute name="description" type="wstring">
3609 <desc>
3610 Description of the virtual machine.
3611
3612 The description attribute can contain any text and is
3613 typically used to describe the hardware and software
3614 configuration of the virtual machine in detail (i.e. network
3615 settings, versions of the installed software and so on).
3616 </desc>
3617 </attribute>
3618
3619 <attribute name="id" type="uuid" readonly="yes">
3620 <desc>UUID of the virtual machine.</desc>
3621 </attribute>
3622
3623 <attribute name="OSTypeId" type="wstring">
3624 <desc>
3625 User-defined identifier of the Guest OS type.
3626 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3627 an IGuestOSType object representing details about the given
3628 Guest OS type.
3629 <note>
3630 This value may differ from the value returned by
3631 <link to="IGuest::OSTypeId"/> if Guest Additions are
3632 installed to the guest OS.
3633 </note>
3634 </desc>
3635 </attribute>
3636
3637 <attribute name="HardwareVersion" type="wstring">
3638 <desc>Hardware version identifier. Internal use only for now.</desc>
3639 </attribute>
3640
3641 <attribute name="CPUCount" type="unsigned long">
3642 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
3643 </attribute>
3644
3645 <attribute name="memorySize" type="unsigned long">
3646 <desc>System memory size in megabytes.</desc>
3647 </attribute>
3648
3649 <attribute name="memoryBalloonSize" type="unsigned long">
3650 <desc>Initial memory balloon size in megabytes.</desc>
3651 </attribute>
3652
3653 <attribute name="statisticsUpdateInterval" type="unsigned long">
3654 <desc>Initial interval to update guest statistics in seconds.</desc>
3655 </attribute>
3656
3657 <attribute name="VRAMSize" type="unsigned long">
3658 <desc>Video memory size in megabytes.</desc>
3659 </attribute>
3660
3661 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3662 <desc>
3663 This setting determines whether VirtualBox allows guests to make use
3664 of the 3D graphics support available on the host. Currently limited
3665 to OpenGL only. </desc>
3666 </attribute>
3667
3668 <attribute name="monitorCount" type="unsigned long">
3669 <desc>
3670 Number of virtual monitors.
3671 <note>
3672 Only effective on Windows XP and later guests with
3673 Guest Additions installed.
3674 </note>
3675 </desc>
3676 </attribute>
3677
3678 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3679 <desc>Object containing all BIOS settings.</desc>
3680 </attribute>
3681
3682 <attribute name="HWVirtExEnabled" type="TSBool">
3683 <desc>
3684 This setting determines whether VirtualBox will try to make use of
3685 the host CPU's hardware virtualization extensions such as Intel VT-x
3686 and AMD-V. Note that in case such extensions are not available,
3687 they will not be used.
3688 </desc>
3689 </attribute>
3690
3691 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3692 <desc>
3693 This setting determines whether VirtualBox will try to make use of
3694 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3695 such extensions are not available, they will not be used.
3696 </desc>
3697 </attribute>
3698
3699 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3700 <desc>
3701 This setting determines whether VirtualBox will try to make use of
3702 the VPID extension of Intel VT-x. Note that in case such extensions are
3703 not available, they will not be used.
3704 </desc>
3705 </attribute>
3706
3707 <attribute name="PAEEnabled" type="boolean" default="false">
3708 <desc>
3709 This setting determines whether VirtualBox will expose the Physical Address
3710 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3711 is not available, it will not be reported.
3712 </desc>
3713 </attribute>
3714
3715 <attribute name="snapshotFolder" type="wstring">
3716 <desc>
3717 Full path to the directory used to store snapshot data
3718 (differencing hard disks and saved state files) of this machine.
3719
3720 The initial value of this property is
3721 <tt>&lt;</tt><link to="#settingsFilePath">
3722 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3723 <link to="#id">machine_uuid</link>
3724 <tt>&gt;</tt>.
3725
3726 Currently, it is an error to try to change this property on
3727 a machine that has snapshots (because this would require to
3728 move possibly large files to a different location).
3729 A separate method will be available for this purpose later.
3730
3731 <note>
3732 Setting this property to <tt>null</tt> will restore the
3733 initial value.
3734 </note>
3735 <note>
3736 When setting this property, the specified path can be
3737 absolute (full path) or relative to the directory where the
3738 <link to="#settingsFilePath">machine settings file</link>
3739 is located. When reading this property, a full path is
3740 always returned.
3741 </note>
3742 <note>
3743 The specified path may not exist, it will be created
3744 when necessary.
3745 </note>
3746 </desc>
3747 </attribute>
3748
3749 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3750 <desc>VRDP server object.</desc>
3751 </attribute>
3752
3753 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3754 <desc>Array of hard disks attached to this machine.</desc>
3755 </attribute>
3756
3757 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3758 <desc>Associated DVD drive object.</desc>
3759 </attribute>
3760
3761 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3762 <desc>Associated floppy drive object.</desc>
3763 </attribute>
3764
3765 <attribute name="USBController" type="IUSBController" readonly="yes">
3766 <desc>
3767 Associated USB controller object.
3768
3769 <note>
3770 This method may set a @ref com_warnings "warning result code".
3771 </note>
3772 <note>
3773 If USB functionality is not available in the given edition of
3774 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3775 </note>
3776 </desc>
3777 </attribute>
3778
3779 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3780 <desc>Associated audio adapter, always present.</desc>
3781 </attribute>
3782
3783 <attribute name="SATAController" type="ISATAController" readonly="yes">
3784 <desc>
3785 Associated SATA controller object.
3786 </desc>
3787 </attribute>
3788
3789 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3790 <desc>
3791 Full name of the file containing machine settings data.
3792 </desc>
3793 </attribute>
3794
3795 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3796 <desc>
3797 Current version of the format of the settings file of this machine
3798 (<link to="#settingsFilePath"/>).
3799
3800 The version string has the following format:
3801 <pre>
3802 x.y-platform
3803 </pre>
3804 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3805 versions, and <tt>platform</tt> is the platform identifier.
3806
3807 The current version usually matches the value of the
3808 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3809 settings file was created by an older version of VirtualBox and there
3810 was a change of the settings file format since then.
3811
3812 Note that VirtualBox automatically converts settings files from older
3813 versions to the most recent version when reading them (usually at
3814 VirtualBox startup) but it doesn't save the changes back until
3815 you call a method that implicitly saves settings (such as
3816 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3817 explicitly. Therefore, if the value of this attribute differs from the
3818 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3819 means that the settings file was converted but the result of the
3820 conversion is not yet saved to disk.
3821
3822 The above feature may be used by interactive front-ends to inform users
3823 about the settings file format change and offer them to explicitly save
3824 all converted settings files (the global and VM-specific ones),
3825 optionally create backup copies of the old settings files before saving,
3826 etc.
3827
3828 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3829 </desc>
3830 </attribute>
3831
3832 <attribute name="settingsModified" type="boolean" readonly="yes">
3833 <desc>
3834 Whether the settings of this machine have been modified
3835 (but neither yet saved nor discarded).
3836 <note>
3837 Reading this property is only valid on instances returned
3838 by <link to="ISession::machine"/> and on new machines
3839 created by <link to="IVirtualBox::createMachine"/> or opened
3840 by <link to="IVirtualBox::openMachine"/> but not
3841 yet registered, or on unregistered machines after calling
3842 <link to="IVirtualBox::unregisterMachine"/>. For all other
3843 cases, the settings can never be modified.
3844 </note>
3845 <note>
3846 For newly created unregistered machines, the value of this
3847 property is always TRUE until <link to="#saveSettings()"/>
3848 is called (no matter if any machine settings have been
3849 changed after the creation or not). For opened machines
3850 the value is set to FALSE (and then follows to normal rules).
3851 </note>
3852 </desc>
3853 </attribute>
3854
3855 <attribute name="sessionState" type="SessionState" readonly="yes">
3856 <desc>Current session state for this machine.</desc>
3857 </attribute>
3858
3859 <attribute name="sessionType" type="wstring" readonly="yes">
3860 <desc>
3861 Type of the session. If <link to="#sessionState"/> is
3862 SessionSpawning or SessionOpen, this attribute contains the
3863 same value as passed to the
3864 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3865 type parameter. If the session was opened directly using
3866 <link to="IVirtualBox::openSession()"/>, or if
3867 <link to="#sessionState"/> is SessionClosed, the value of this
3868 attribute is @c null.
3869 </desc>
3870 </attribute>
3871
3872 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3873 <desc>
3874 Identifier of the session process. This attribute contains the
3875 platform-dependent identifier of the process that has opened a
3876 direct session for this machine using the
3877 <link to="IVirtualBox::openSession()"/> call. The returned value
3878 is only valid if <link to="#sessionState"/> is SessionOpen or
3879 SessionClosing (i.e. a session is currently open or being
3880 closed) by the time this property is read.
3881 </desc>
3882 </attribute>
3883
3884 <attribute name="state" type="MachineState" readonly="yes">
3885 <desc>Current execution state of this machine.</desc>
3886 </attribute>
3887
3888 <attribute name="lastStateChange" type="long long" readonly="yes">
3889 <desc>
3890 Time stamp of the last execution state change,
3891 in milliseconds since 1970-01-01 UTC.
3892 </desc>
3893 </attribute>
3894
3895 <attribute name="stateFilePath" type="wstring" readonly="yes">
3896 <desc>
3897 Full path to the file that stores the execution state of
3898 the machine when it is in the <link to="MachineState_Saved"/> state.
3899 <note>
3900 When the machine is not in the Saved state, this attribute
3901 <tt>null</tt>.
3902 </note>
3903 </desc>
3904 </attribute>
3905
3906 <attribute name="logFolder" type="wstring" readonly="yes">
3907 <desc>
3908 Full path to the folder that stores a set of rotated log files
3909 recorded during machine execution. The most recent log file is
3910 named <tt>VBox.log</tt>, the previous log file is
3911 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3912 in the current version).
3913 </desc>
3914 </attribute>
3915
3916 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3917 <desc>
3918 Current snapshot of this machine.
3919 <note>
3920 A <tt>null</tt> object is returned if the machine doesn't
3921 have snapshots.
3922 </note>
3923 <see><link to="ISnapshot"/></see>
3924 </desc>
3925 </attribute>
3926
3927 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3928 <desc>
3929 Number of snapshots taken on this machine. Zero means the
3930 machine doesn't have any snapshots.
3931 </desc>
3932 </attribute>
3933
3934 <attribute name="currentStateModified" type="boolean" readonly="yes">
3935 <desc>
3936 Returns <tt>true</tt> if the current state of the machine is not
3937 identical to the state stored in the current snapshot.
3938
3939 The current state is identical to the current snapshot right
3940 after one of the following calls are made:
3941 <ul>
3942 <li><link to="IConsole::discardCurrentState"/> or
3943 <link to="IConsole::discardCurrentSnapshotAndState"/>
3944 </li>
3945 <li><link to="IConsole::takeSnapshot"/> (issued on a
3946 powered off or saved machine, for which
3947 <link to="#settingsModified"/> returns <tt>false</tt>)
3948 </li>
3949 <li><link to="IMachine::setCurrentSnapshot"/>
3950 </li>
3951 </ul>
3952
3953 The current state remains identical until one of the following
3954 happens:
3955 <ul>
3956 <li>settings of the machine are changed</li>
3957 <li>the saved state is discarded</li>
3958 <li>the current snapshot is discarded</li>
3959 <li>an attempt to execute the machine is made</li>
3960 </ul>
3961
3962 <note>
3963 For machines that don't have snapshots, this property is
3964 always <tt>false</tt>.
3965 </note>
3966 </desc>
3967 </attribute>
3968
3969 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3970 <desc>
3971 Collection of shared folders for this machine (permanent shared
3972 folders). These folders are shared automatically at machine startup
3973 and available only to the guest OS installed within this machine.
3974
3975 New shared folders are added to the collection using
3976 <link to="#createSharedFolder"/>. Existing shared folders can be
3977 removed using <link to="#removeSharedFolder"/>.
3978 </desc>
3979 </attribute>
3980
3981 <attribute name="clipboardMode" type="ClipboardMode">
3982 <desc>
3983 Synchronization mode between the host OS clipboard
3984 and the guest OS clipboard.
3985 </desc>
3986 </attribute>
3987
3988 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3989 <desc>
3990 A comma-separated list of simple glob patterns. Changes to guest
3991 properties whose name matches one of the patterns will generate an
3992 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3993 </desc>
3994 </attribute>
3995
3996 <method name="setBootOrder">
3997 <desc>
3998 Puts the given device to the specified position in
3999 the boot order.
4000
4001 To indicate that no device is associated with the given position,
4002 <link to="DeviceType_Null"/> should be used.
4003
4004 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4005
4006 <result name="E_INVALIDARG">
4007 Boot @a position out of range.
4008 </result>
4009 <result name="E_NOTIMPL">
4010 Booting from USB @a device currently not supported.
4011 </result>
4012
4013 </desc>
4014 <param name="position" type="unsigned long" dir="in">
4015 <desc>
4016 Position in the boot order (<tt>1</tt> to the total number of
4017 devices the machine can boot from, as returned by
4018 <link to="ISystemProperties::maxBootPosition"/>).
4019 </desc>
4020 </param>
4021 <param name="device" type="DeviceType" dir="in">
4022 <desc>
4023 The type of the device used to boot at the given position.
4024 </desc>
4025 </param>
4026 </method>
4027
4028 <method name="getBootOrder" const="yes">
4029 <desc>
4030 Returns the device type that occupies the specified
4031 position in the boot order.
4032
4033 @todo [remove?]
4034 If the machine can have more than one device of the returned type
4035 (such as hard disks), then a separate method should be used to
4036 retrieve the individual device that occupies the given position.
4037
4038 If here are no devices at the given position, then
4039 <link to="DeviceType_Null"/> is returned.
4040
4041 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4042
4043 <result name="E_INVALIDARG">
4044 Boot @a position out of range.
4045 </result>
4046
4047 </desc>
4048 <param name="position" type="unsigned long" dir="in">
4049 <desc>
4050 Position in the boot order (<tt>1</tt> to the total number of
4051 devices the machine can boot from, as returned by
4052 <link to="ISystemProperties::maxBootPosition"/>).
4053 </desc>
4054 </param>
4055 <param name="device" type="DeviceType" dir="return">
4056 <desc>
4057 Device at the given position.
4058 </desc>
4059 </param>
4060 </method>
4061
4062 <method name="attachHardDisk2">
4063 <desc>
4064 Attaches a virtual hard disk identified by the given UUID @a id
4065 to a device slot of the specified bus.
4066
4067 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
4068 specify the primary or secondary IDE controller, respectively. The
4069 SATA bus supports 30 channels, so this parameter can be a number
4070 ranging from @c 0 to @c 29.
4071
4072 For the primary controller of the IDE bus, the @a device number can be
4073 either @c 0 or @c 1, to specify the master or the slave device,
4074 respectively. For the secondary IDE controller, the device number is
4075 always @c 1 because the master device is reserved for the CD-ROM drive.
4076
4077 For the SATA bus, the @a device parameter is currently unused and
4078 must be @c 0.
4079
4080 The specified device slot must not have another disk attached to it, or
4081 this method will fail.
4082
4083 See <link to="IHardDisk2"/> for more detailed information about
4084 attaching hard disks.
4085
4086 <note>
4087 You cannot attach a hard disk to a running machine. Also, you cannot
4088 attach a hard disk to a newly created machine until this machine's
4089 settings are saved to disk using <link to="#saveSettings()"/>.
4090 </note>
4091 <note>
4092 If the hard disk is being attached indirectly, a new differencing hard
4093 disk will implicitly be created for it and attached instead. If the
4094 changes made to the machine settings (including this indirect
4095 attachment) are later cancelled using <link to="#discardSettings()"/>,
4096 this implicitly created differencing hard disk will implicitly
4097 be deleted.
4098 </note>
4099
4100 <result name="E_INVALIDARG">
4101 SATA device, SATA channel, IDE channel or IDE slot out of range.
4102 </result>
4103 <result name="VBOX_E_INVALID_OBJECT_STATE">
4104 Attempt to attach hard disk to an unregistered virtual machine.
4105 </result>
4106 <result name="VBOX_E_INVALID_VM_STATE">
4107 Invalid machine state.
4108 </result>
4109 <result name="VBOX_E_OBJECT_IN_USE">
4110 Hard disk already attached to this or another virtual machine.
4111 </result>
4112
4113 </desc>
4114 <param name="id" type="uuid" dir="in">
4115 <desc>UUID of the hard disk to attach.</desc>
4116 </param>
4117 <param name="bus" type="StorageBus" dir="in">
4118 <desc>Type of the storage bus to use (IDE or SATA).</desc>
4119 </param>
4120 <param name="channel" type="long" dir="in">
4121 <desc>Channel to attach the hard disk to.</desc>
4122 </param>
4123 <param name="device" type="long" dir="in">
4124 <desc>
4125 Device slot in the given channel to attach the hard disk to.
4126 </desc>
4127 </param>
4128 </method>
4129
4130 <method name="getHardDisk2" const="yes">
4131 <desc>
4132 Returns the virtual hard disk attached to a device slot of the specified
4133 bus.
4134
4135 Note that if the hard disk was indirectly attached by
4136 <link to="#attachHardDisk2()"/> to the given device slot then this
4137 method will return not the same object as passed to the
4138 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
4139 more detailed information about attaching hard disks.
4140
4141 <result name="VBOX_E_OBJECT_NOT_FOUND">
4142 No hard disk attached to given slot/bus.
4143 </result>
4144
4145 </desc>
4146 <param name="bus" type="StorageBus" dir="in">
4147 <desc>Type of the storage bus to query (IDE or SATA).</desc>
4148 </param>
4149 <param name="channel" type="long" dir="in">
4150 <desc>Channel to query.</desc>
4151 </param>
4152 <param name="device" type="long" dir="in">
4153 <desc>Device slot in the given channel to query.</desc>
4154 </param>
4155 <param name="hardDisk" type="IHardDisk2" dir="return">
4156 <desc>Attached hard disk object.</desc>
4157 </param>
4158 </method>
4159
4160 <method name="detachHardDisk2">
4161 <desc>
4162 Detaches the virtual hard disk attached to a device slot of the
4163 specified bus.
4164
4165 Detaching the hard disk from the virtual machine is deferred. This means
4166 that the hard disk remains associated with the machine when this method
4167 returns and gets actually de-associated only after a successful
4168 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
4169 for more detailed information about attaching hard disks.
4170
4171 <note>
4172 You cannot detach the hard disk from a running machine.
4173 </note>
4174 <note>
4175 Detaching differencing hard disks implicitly created by <link
4176 to="#attachHardDisk2()"/> for the indirect attachment using this
4177 method will <b>not</b> implicitly delete them. The
4178 <link to="IHardDisk2::deleteStorage()"/> operation should be
4179 explicitly performed by the caller after the hard disk is successfully
4180 detached and the settings are saved with
4181 <link to="#saveSettings()"/>, if it is the desired action.
4182 </note>
4183
4184 <result name="VBOX_E_INVALID_VM_STATE">
4185 Attempt to detach hard disk from a running virtual machine.
4186 </result>
4187 <result name="VBOX_E_OBJECT_NOT_FOUND">
4188 No hard disk attached to given slot/bus.
4189 </result>
4190 <result name="VBOX_E_NOT_SUPPORTED">
4191 Hard disk format does not support storage deletion.
4192 </result>
4193
4194 </desc>
4195 <param name="bus" type="StorageBus" dir="in">
4196 <desc>Bus to detach the hard disk from.</desc>
4197 </param>
4198 <param name="channel" type="long" dir="in">
4199 <desc>Channel number to detach the hard disk from.</desc>
4200 </param>
4201 <param name="device" type="long" dir="in">
4202 <desc>Device slot number to detach the hard disk from.</desc>
4203 </param>
4204 </method>
4205
4206 <method name="getNetworkAdapter" const="yes">
4207 <desc>
4208 Returns the network adapter associated with the given slot.
4209 Slots are numbered sequentially, starting with zero. The total
4210 number of adapters per machine is defined by the
4211 <link to="ISystemProperties::networkAdapterCount"/> property,
4212 so the maximum slot number is one less than that property's value.
4213
4214 <result name="E_INVALIDARG">
4215 Invalid @a slot number.
4216 </result>
4217
4218 </desc>
4219 <param name="slot" type="unsigned long" dir="in"/>
4220 <param name="adapter" type="INetworkAdapter" dir="return"/>
4221 </method>
4222
4223 <method name="getSerialPort" const="yes">
4224 <desc>
4225 Returns the serial port associated with the given slot.
4226 Slots are numbered sequentially, starting with zero. The total
4227 number of serial ports per machine is defined by the
4228 <link to="ISystemProperties::serialPortCount"/> property,
4229 so the maximum slot number is one less than that property's value.
4230
4231 <result name="E_INVALIDARG">
4232 Invalid @a slot number.
4233 </result>
4234
4235 </desc>
4236 <param name="slot" type="unsigned long" dir="in"/>
4237 <param name="port" type="ISerialPort" dir="return"/>
4238 </method>
4239
4240 <method name="getParallelPort" const="yes">
4241 <desc>
4242 Returns the parallel port associated with the given slot.
4243 Slots are numbered sequentially, starting with zero. The total
4244 number of parallel ports per machine is defined by the
4245 <link to="ISystemProperties::parallelPortCount"/> property,
4246 so the maximum slot number is one less than that property's value.
4247
4248 <result name="E_INVALIDARG">
4249 Invalid @a slot number.
4250 </result>
4251
4252 </desc>
4253 <param name="slot" type="unsigned long" dir="in"/>
4254 <param name="port" type="IParallelPort" dir="return"/>
4255 </method>
4256
4257 <method name="getNextExtraDataKey">
4258 <desc>
4259 Returns the machine-specific extra data key name following the
4260 supplied key.
4261
4262 An error is returned if the supplied @a key does not exist. @c NULL is
4263 returned in @a nextKey if the supplied key is the last key. When
4264 supplying @c NULL for the @a key, the first key item is returned in @a
4265 nextKey (if there is any). @a nextValue is an optional parameter and
4266 if supplied, the next key's value is returned in it.
4267
4268 <result name="VBOX_E_OBJECT_NOT_FOUND">
4269 Extra data @a key not found.
4270 </result>
4271
4272 </desc>
4273 <param name="key" type="wstring" dir="in">
4274 <desc>Name of the data key to follow.</desc>
4275 </param>
4276 <param name="nextKey" type="wstring" dir="out">
4277 <desc>Name of the next data key.</desc>
4278 </param>
4279 <param name="nextValue" type="wstring" dir="out">
4280 <desc>Value of the next data key.</desc>
4281 </param>
4282 </method>
4283
4284 <method name="getExtraData">
4285 <desc>
4286 Returns associated machine-specific extra data.
4287
4288 If the requested data @a key does not exist, this function will
4289 succeed and return @c NULL in the @a value argument.
4290
4291 <result name="VBOX_E_FILE_ERROR">
4292 Settings file not accessible.
4293 </result>
4294 <result name="VBOX_E_XML_ERROR">
4295 Could not parse the settings file.
4296 </result>
4297
4298 </desc>
4299 <param name="key" type="wstring" dir="in">
4300 <desc>Name of the data key to get.</desc>
4301 </param>
4302 <param name="value" type="wstring" dir="return">
4303 <desc>Value of the requested data key.</desc>
4304 </param>
4305 </method>
4306
4307 <method name="setExtraData">
4308 <desc>
4309 Sets associated machine-specific extra data.
4310
4311 If you pass @c NULL as a key @a value, the given @a key will be
4312 deleted.
4313
4314 <note>
4315 Before performing the actual data change, this method will ask all
4316 registered callbacks using the
4317 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
4318 notification for a permission. If one of the callbacks refuses the
4319 new value, the change will not be performed.
4320 </note>
4321 <note>
4322 On success, the
4323 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
4324 is called to inform all registered callbacks about a successful data
4325 change.
4326 </note>
4327 <note>
4328 This method can be called outside the machine session and therefore
4329 it's a caller's responsibility to handle possible race conditions
4330 when several clients change the same key at the same time.
4331 </note>
4332
4333 <result name="VBOX_E_FILE_ERROR">
4334 Settings file not accessible.
4335 </result>
4336 <result name="VBOX_E_XML_ERROR">
4337 Could not parse the settings file.
4338 </result>
4339
4340 </desc>
4341 <param name="key" type="wstring" dir="in">
4342 <desc>Name of the data key to set.</desc>
4343 </param>
4344 <param name="value" type="wstring" dir="in">
4345 <desc>Value to assign to the key.</desc>
4346 </param>
4347 </method>
4348
4349 <method name="saveSettings">
4350 <desc>
4351 Saves any changes to machine settings made since the session
4352 has been opened or a new machine has been created, or since the
4353 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
4354 For registered machines, new settings become visible to all
4355 other VirtualBox clients after successful invocation of this
4356 method.
4357 <note>
4358 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
4359 notification event after the configuration has been successfully
4360 saved (only for registered machines).
4361 </note>
4362 <note>
4363 Calling this method is only valid on instances returned
4364 by <link to="ISession::machine"/> and on new machines
4365 created by <link to="IVirtualBox::createMachine"/> but not
4366 yet registered, or on unregistered machines after calling
4367 <link to="IVirtualBox::unregisterMachine"/>.
4368 </note>
4369
4370 <result name="VBOX_E_FILE_ERROR">
4371 Settings file not accessible.
4372 </result>
4373 <result name="VBOX_E_XML_ERROR">
4374 Could not parse the settings file.
4375 </result>
4376 <result name="E_ACCESSDENIED">
4377 Modification request refused.
4378 </result>
4379
4380 </desc>
4381 </method>
4382
4383 <method name="saveSettingsWithBackup">
4384 <desc>
4385 Creates a backup copy of the machine settings file (<link
4386 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4387 <link to="#saveSettings()"/>.
4388
4389 Note that the backup copy is created <b>only</b> if the settings file
4390 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4391 details). Otherwise, this call is fully equivalent to
4392 <link to="#saveSettings()"/> and no backup copying is done.
4393
4394 The backup copy is created in the same directory where the original
4395 settings file is located. It is given the following file name:
4396 <pre>
4397 original.xml.x.y-platform.bak
4398 </pre>
4399 where <tt>original.xml</tt> is the original settings file name
4400 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4401 format of the settings file (before auto-conversion).
4402
4403 If the given backup file already exists, this method will try to add the
4404 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4405 0 to 9) and copy it again until it succeeds. If all suffixes are
4406 occupied, or if any other copy error occurs, this method will return a
4407 failure.
4408
4409 If the copy operation succeeds, the @a bakFileName return argument will
4410 receive a full path to the created backup file (for informational
4411 purposes). Note that this will happen even if the subsequent
4412 <link to="#saveSettings()"/> call performed by this method after the
4413 copy operation, fails.
4414
4415 <note>
4416 The VirtualBox API never calls this method. It is intended purely for
4417 the purposes of creating backup copies of the settings files by
4418 front-ends before saving the results of the automatically performed
4419 settings conversion to disk.
4420 </note>
4421
4422 <see>settingsFileVersion</see>
4423
4424 <result name="VBOX_E_FILE_ERROR">
4425 Settings file not accessible.
4426 </result>
4427 <result name="VBOX_E_XML_ERROR">
4428 Could not parse the settings file.
4429 </result>
4430 <result name="VBOX_E_INVALID_VM_STATE">
4431 Virtual machine is not mutable.
4432 </result>
4433 <result name="E_ACCESSDENIED">
4434 Modification request refused.
4435 </result>
4436
4437 </desc>
4438 <param name="bakFileName" type="wstring" dir="return">
4439 <desc>Full path to the created backup copy.</desc>
4440 </param>
4441 </method>
4442
4443 <method name="discardSettings">
4444 <desc>
4445 Discards any changes to the machine settings made since the session
4446 has been opened or since the last call to <link to="#saveSettings()"/>
4447 or <link to="#discardSettings"/>.
4448 <note>
4449 Calling this method is only valid on instances returned
4450 by <link to="ISession::machine"/> and on new machines
4451 created by <link to="IVirtualBox::createMachine"/> or
4452 opened by <link to="IVirtualBox::openMachine"/> but not
4453 yet registered, or on unregistered machines after calling
4454 <link to="IVirtualBox::unregisterMachine"/>.
4455 </note>
4456
4457 <result name="VBOX_E_INVALID_VM_STATE">
4458 Virtual machine is not mutable.
4459 </result>
4460
4461 </desc>
4462 </method>
4463
4464 <method name="deleteSettings">
4465 <desc>
4466 Deletes the settings file of this machine from disk.
4467 The machine must not be registered in order for this operation
4468 to succeed.
4469 <note>
4470 <link to="#settingsModified"/> will return TRUE after this
4471 method successfully returns.
4472 </note>
4473 <note>
4474 Calling this method is only valid on instances returned
4475 by <link to="ISession::machine"/> and on new machines
4476 created by <link to="IVirtualBox::createMachine"/> or
4477 opened by <link to="IVirtualBox::openMachine"/> but not
4478 yet registered, or on unregistered machines after calling
4479 <link to="IVirtualBox::unregisterMachine"/>.
4480 </note>
4481 <note>
4482 The deleted machine settings file can be restored (saved again)
4483 by calling <link to="#saveSettings()"/>.
4484 </note>
4485
4486 <result name="VBOX_E_INVALID_VM_STATE">
4487 Cannot delete settings of a registered machine or
4488 machine not mutable.
4489 </result>
4490 <result name="VBOX_E_IPRT_ERROR">
4491 Could not delete the settings file.
4492 </result>
4493
4494 </desc>
4495 </method>
4496
4497 <method name="getSnapshot">
4498 <desc>
4499 Returns a snapshot of this machine with the given UUID.
4500 A <tt>null</tt> UUID can be used to obtain the first snapshot
4501 taken on this machine. This is useful if you want to traverse
4502 the whole tree of snapshots starting from the root.
4503
4504 <result name="VBOX_E_OBJECT_NOT_FOUND">
4505 Virtual machine has no snapshots or snapshot not found.
4506 </result>
4507
4508 </desc>
4509 <param name="id" type="uuid" dir="in">
4510 <desc>UUID of the snapshot to get</desc>
4511 </param>
4512 <param name="snapshot" type="ISnapshot" dir="return">
4513 <desc>Snapshot object with the given UUID.</desc>
4514 </param>
4515 </method>
4516
4517 <method name="findSnapshot">
4518 <desc>
4519 Returns a snapshot of this machine with the given name.
4520
4521 <result name="VBOX_E_OBJECT_NOT_FOUND">
4522 Virtual machine has no snapshots or snapshot not found.
4523 </result>
4524
4525 </desc>
4526 <param name="name" type="wstring" dir="in">
4527 <desc>Name of the snapshot to find</desc>
4528 </param>
4529 <param name="snapshot" type="ISnapshot" dir="return">
4530 <desc>Snapshot object with the given name.</desc>
4531 </param>
4532 </method>
4533
4534 <method name="setCurrentSnapshot">
4535 <desc>
4536 Sets the current snapshot of this machine.
4537 <note>
4538 In the current implementation, this operation is not
4539 implemented.
4540 </note>
4541 </desc>
4542 <param name="id" type="uuid" dir="in">
4543 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4544 </param>
4545 </method>
4546
4547 <method name="createSharedFolder">
4548 <desc>
4549 Creates a new permanent shared folder by associating the given logical
4550 name with the given host path, adds it to the collection of shared
4551 folders and starts sharing it. Refer to the description of
4552 <link to="ISharedFolder"/> to read more about logical names.
4553
4554 <result name="VBOX_E_OBJECT_IN_USE">
4555 Shared folder already exists.
4556 </result>
4557 <result name="VBOX_E_FILE_ERROR">
4558 Shared folder @a hostPath not accessible.
4559 </result>
4560
4561 </desc>
4562 <param name="name" type="wstring" dir="in">
4563 <desc>Unique logical name of the shared folder.</desc>
4564 </param>
4565 <param name="hostPath" type="wstring" dir="in">
4566 <desc>Full path to the shared folder in the host file system.</desc>
4567 </param>
4568 <param name="writable" type="boolean" dir="in">
4569 <desc>Whether the share is writable or readonly</desc>
4570 </param>
4571 </method>
4572
4573 <method name="removeSharedFolder">
4574 <desc>
4575 Removes the permanent shared folder with the given name previously
4576 created by <link to="#createSharedFolder"/> from the collection of
4577 shared folders and stops sharing it.
4578
4579 <result name="VBOX_E_INVALID_VM_STATE">
4580 Virtual machine is not mutable.
4581 </result>
4582 <result name="VBOX_E_OBJECT_NOT_FOUND">
4583 Shared folder @a name does not exist.
4584 </result>
4585
4586 </desc>
4587 <param name="name" type="wstring" dir="in">
4588 <desc>Logical name of the shared folder to remove.</desc>
4589 </param>
4590 </method>
4591
4592 <method name="canShowConsoleWindow">
4593 <desc>
4594 Returns @c true if the VM console process can activate the
4595 console window and bring it to foreground on the desktop of
4596 the host PC.
4597 <note>
4598 This method will fail if a session for this machine is not
4599 currently open.
4600 </note>
4601
4602 <result name="VBOX_E_INVALID_VM_STATE">
4603 Machine session is not open.
4604 </result>
4605
4606 </desc>
4607 <param name="canShow" type="boolean" dir="return">
4608 <desc>
4609 @c true if the console window can be shown and @c
4610 false otherwise.
4611 </desc>
4612 </param>
4613 </method>
4614
4615 <method name="showConsoleWindow">
4616 <desc>
4617 Activates the console window and brings it to foreground on
4618 the desktop of the host PC. Many modern window managers on
4619 many platforms implement some sort of focus stealing
4620 prevention logic, so that it may be impossible to activate
4621 a window without the help of the currently active
4622 application. In this case, this method will return a non-zero
4623 identifier that represents the top-level window of the VM
4624 console process. The caller, if it represents a currently
4625 active process, is responsible to use this identifier (in a
4626 platform-dependent manner) to perform actual window
4627 activation.
4628 <note>
4629 This method will fail if a session for this machine is not
4630 currently open.
4631 </note>
4632
4633 <result name="VBOX_E_INVALID_VM_STATE">
4634 Machine session is not open.
4635 </result>
4636
4637 </desc>
4638 <param name="winId" type="unsigned long long" dir="return">
4639 <desc>
4640 Platform-dependent identifier of the top-level VM console
4641 window, or zero if this method has performed all actions
4642 necessary to implement the <i>show window</i> semantics for
4643 the given platform and/or VirtualBox front-end.
4644 </desc>
4645 </param>
4646 </method>
4647
4648 <method name="getGuestProperty">
4649 <desc>
4650 Reads an entry from the machine's guest property store.
4651
4652 <result name="VBOX_E_INVALID_VM_STATE">
4653 Machine session is not open.
4654 </result>
4655
4656 </desc>
4657 <param name="name" type="wstring" dir="in">
4658 <desc>
4659 The name of the property to read.
4660 </desc>
4661 </param>
4662 <param name="value" type="wstring" dir="out">
4663 <desc>
4664 The value of the property. If the property does not exist then this
4665 will be empty.
4666 </desc>
4667 </param>
4668 <param name="timestamp" type="unsigned long long" dir="out">
4669 <desc>
4670 The time at which the property was last modified, as seen by the
4671 server process.
4672 </desc>
4673 </param>
4674 <param name="flags" type="wstring" dir="out">
4675 <desc>
4676 Additional property parameters, passed as a comma-separated list of
4677 "name=value" type entries.
4678 </desc>
4679 </param>
4680 </method>
4681
4682 <method name="getGuestPropertyValue">
4683 <desc>
4684 Reads a value from the machine's guest property store.
4685
4686 <result name="VBOX_E_INVALID_VM_STATE">
4687 Machine session is not open.
4688 </result>
4689
4690 </desc>
4691 <param name="property" type="wstring" dir="in">
4692 <desc>
4693 The name of the property to read.
4694 </desc>
4695 </param>
4696 <param name="value" type="wstring" dir="return">
4697 <desc>
4698 The value of the property. If the property does not exist then this
4699 will be empty.
4700 </desc>
4701 </param>
4702 </method>
4703
4704 <method name="getGuestPropertyTimestamp">
4705 <desc>
4706 Reads a property timestamp from the machine's guest property store.
4707
4708 <result name="VBOX_E_INVALID_VM_STATE">
4709 Machine session is not open.
4710 </result>
4711
4712 </desc>
4713 <param name="property" type="wstring" dir="in">
4714 <desc>
4715 The name of the property to read.
4716 </desc>
4717 </param>
4718 <param name="value" type="unsigned long long" dir="return">
4719 <desc>
4720 The timestamp. If the property does not exist then this will be
4721 empty.
4722 </desc>
4723 </param>
4724 </method>
4725
4726 <method name="setGuestProperty">
4727 <desc>
4728 Sets, changes or deletes an entry in the machine's guest property
4729 store.
4730
4731 <result name="E_ACCESSDENIED">
4732 Property cannot be changed.
4733 </result>
4734 <result name="E_INVALIDARG">
4735 Invalid @a flags.
4736 </result>
4737 <result name="VBOX_E_INVALID_VM_STATE">
4738 Virtual machine is not mutable or session not open.
4739 </result>
4740 <result name="VBOX_E_INVALID_OBJECT_STATE">
4741 Cannot set transient property when machine not running.
4742 </result>
4743
4744 </desc>
4745 <param name="property" type="wstring" dir="in">
4746 <desc>
4747 The name of the property to set, change or delete.
4748 </desc>
4749 </param>
4750 <param name="value" type="wstring" dir="in">
4751 <desc>
4752 The new value of the property to set, change or delete. If the
4753 property does not yet exist and value is non-empty, it will be
4754 created. If the value is empty, the key will be deleted if it
4755 exists.
4756 </desc>
4757 </param>
4758 <param name="flags" type="wstring" dir="in">
4759 <desc>
4760 Additional property parameters, passed as a comma-separated list of
4761 "name=value" type entries.
4762 </desc>
4763 </param>
4764 </method>
4765
4766 <method name="setGuestPropertyValue">
4767 <desc>
4768 Sets, changes or deletes a value in the machine's guest property
4769 store. The flags field will be left unchanged or created empty for a
4770 new property.
4771
4772 <result name="E_ACCESSDENIED">
4773 Property cannot be changed.
4774 </result>
4775 <result name="VBOX_E_INVALID_VM_STATE">
4776 Virtual machine is not mutable or session not open.
4777 </result>
4778 <result name="VBOX_E_INVALID_OBJECT_STATE">
4779 Cannot set transient property when machine not running.
4780 </result>
4781 </desc>
4782
4783 <param name="property" type="wstring" dir="in">
4784 <desc>
4785 The name of the property to set, change or delete.
4786 </desc>
4787 </param>
4788 <param name="value" type="wstring" dir="in">
4789 <desc>
4790 The new value of the property to set, change or delete. If the
4791 property does not yet exist and value is non-empty, it will be
4792 created. If value is empty, the property will be deleted if it
4793 exists.
4794 </desc>
4795 </param>
4796 </method>
4797
4798 <method name="enumerateGuestProperties">
4799 <desc>
4800 Return a list of the guest properties matching a set of patterns along
4801 with their values, time stamps and flags.
4802 </desc>
4803 <param name="patterns" type="wstring" dir="in">
4804 <desc>
4805 The patterns to match the properties against, separated by '|'
4806 characters. If this is empty or NULL, all properties will match.
4807 </desc>
4808 </param>
4809 <param name="name" type="wstring" dir="out" safearray="yes">
4810 <desc>
4811 The names of the properties returned.
4812 </desc>
4813 </param>
4814 <param name="value" type="wstring" dir="out" safearray="yes">
4815 <desc>
4816 The values of the properties returned. The array entries match the
4817 corresponding entries in the @a name array.
4818 </desc>
4819 </param>
4820 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4821 <desc>
4822 The time stamps of the properties returned. The array entries match
4823 the corresponding entries in the @a name array.
4824 </desc>
4825 </param>
4826 <param name="flags" type="wstring" dir="out" safearray="yes">
4827 <desc>
4828 The flags of the properties returned. The array entries match the
4829 corresponding entries in the @a name array.
4830 </desc>
4831 </param>
4832 </method>
4833</interface>
4834
4835 <!--
4836 // IConsole
4837 /////////////////////////////////////////////////////////////////////////
4838 -->
4839
4840 <interface
4841 name="IConsoleCallback" extends="$unknown"
4842 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
4843 wsmap="suppress"
4844 >
4845
4846 <method name="onMousePointerShapeChange">
4847 <desc>
4848 Notification when the guest mouse pointer shape has
4849 changed. The new shape data is given.
4850 </desc>
4851 <param name="visible" type="boolean" dir="in">
4852 <desc>
4853 Flag whether the pointer is visible.
4854 </desc>
4855 </param>
4856 <param name="alpha" type="boolean" dir="in">
4857 <desc>
4858 Flag whether the pointer has an alpha channel.
4859 </desc>
4860 </param>
4861 <param name="xHot" type="unsigned long" dir="in">
4862 <desc>
4863 The pointer hot spot x coordinate.
4864 </desc>
4865 </param>
4866 <param name="yHot" type="unsigned long" dir="in">
4867 <desc>
4868 The pointer hot spot y coordinate.
4869 </desc>
4870 </param>
4871 <param name="width" type="unsigned long" dir="in">
4872 <desc>
4873 Width of the pointer shape in pixels.
4874 </desc>
4875 </param>
4876 <param name="height" type="unsigned long" dir="in">
4877 <desc>
4878 Height of the pointer shape in pixels.
4879 </desc>
4880 </param>
4881 <param name="shape" type="octet" mod="ptr" dir="in">
4882 <desc>
4883 Address of the shape buffer.
4884
4885 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
4886 followed by a 32-bpp XOR (color) mask.
4887
4888 For pointers without alpha channel the XOR mask pixels are 32
4889 bit values: (lsb)BGR0(msb). For pointers with alpha channel
4890 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
4891
4892 An AND mask is used for pointers with alpha channel, so if the
4893 callback does not support alpha, the pointer could be
4894 displayed as a normal color pointer.
4895
4896 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
4897 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
4898 height</tt>. The padding bits at the end of each scanline are
4899 undefined.
4900
4901 The XOR mask follows the AND mask on the next 4-byte aligned
4902 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
4903 Bytes in the gap between the AND and the XOR mask are undefined.
4904 The XOR mask scanlines have no gap between them and the size of
4905 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
4906
4907 <note>
4908 If @a shape is 0, only the pointer visibility is changed.
4909 </note>
4910 </desc>
4911 </param>
4912 </method>
4913
4914 <method name="onMouseCapabilityChange">
4915 <desc>
4916 Notification when the mouse capabilities reported by the
4917 guest have changed. The new capabilities are passed.
4918 </desc>
4919 <param name="supportsAbsolute" type="boolean" dir="in"/>
4920 <param name="needsHostCursor" type="boolean" dir="in"/>
4921 </method>
4922
4923 <method name="onKeyboardLedsChange">
4924 <desc>
4925 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
4926 to alter the state of the keyboard LEDs.
4927 </desc>
4928 <param name="numLock" type="boolean" dir="in"/>
4929 <param name="capsLock" type="boolean" dir="in"/>
4930 <param name="scrollLock" type="boolean" dir="in"/>
4931 </method>
4932
4933 <method name="onStateChange">
4934 <desc>
4935 Notification when the execution state of the machine has changed.
4936 The new state will be given.
4937 </desc>
4938 <param name="state" type="MachineState" dir="in"/>
4939 </method>
4940
4941 <method name="onAdditionsStateChange">
4942 <desc>
4943 Notification when a Guest Additions property changes.
4944 Interested callees should query IGuest attributes to
4945 find out what has changed.
4946 </desc>
4947 </method>
4948
4949 <method name="onDVDDriveChange">
4950 <desc>
4951 Notification when a property of the
4952 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
4953 Interested callees should use IDVDDrive methods to find out what has
4954 changed.
4955 </desc>
4956 </method>
4957
4958 <method name="onFloppyDriveChange">
4959 <desc>
4960 Notification when a property of the
4961 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
4962 Interested callees should use IFloppyDrive methods to find out what
4963 has changed.
4964 </desc>
4965 </method>
4966
4967 <method name="onNetworkAdapterChange">
4968 <desc>
4969 Notification when a property of one of the
4970 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
4971 changes. Interested callees should use INetworkAdapter methods and
4972 attributes to find out what has changed.
4973 </desc>
4974 <param name="networkAdapter" type="INetworkAdapter" dir="in">
4975 <desc>Network adapter that is subject to change.</desc>
4976 </param>
4977 </method>
4978
4979 <method name="onSerialPortChange">
4980 <desc>
4981 Notification when a property of one of the
4982 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
4983 Interested callees should use ISerialPort methods and attributes
4984 to find out what has changed.
4985 </desc>
4986 <param name="serialPort" type="ISerialPort" dir="in">
4987 <desc>Serial port that is subject to change.</desc>
4988 </param>
4989 </method>
4990
4991 <method name="onParallelPortChange">
4992 <desc>
4993 Notification when a property of one of the
4994 virtual <link to="IMachine::getParallelPort">parallel ports</link>
4995 changes. Interested callees should use ISerialPort methods and
4996 attributes to find out what has changed.
4997 </desc>
4998 <param name="parallelPort" type="IParallelPort" dir="in">
4999 <desc>Parallel port that is subject to change.</desc>
5000 </param>
5001 </method>
5002
5003 <method name="onVRDPServerChange">
5004 <desc>
5005 Notification when a property of the
5006 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5007 Interested callees should use IVRDPServer methods and attributes to
5008 find out what has changed.
5009 </desc>
5010 </method>
5011
5012 <method name="onUSBControllerChange">
5013 <desc>
5014 Notification when a property of the virtual
5015 <link to="IMachine::USBController">USB controller</link> changes.
5016 Interested callees should use IUSBController methods and attributes to
5017 find out what has changed.
5018 </desc>
5019 </method>
5020
5021 <method name="onUSBDeviceStateChange">
5022 <desc>
5023 Notification when a USB device is attached to or detached from
5024 the virtual USB controller.
5025
5026 This notification is sent as a result of the indirect
5027 request to attach the device because it matches one of the
5028 machine USB filters, or as a result of the direct request
5029 issued by <link to="IConsole::attachUSBDevice"/> or
5030 <link to="IConsole::detachUSBDevice"/>.
5031
5032 This notification is sent in case of both a succeeded and a
5033 failed request completion. When the request succeeds, the @a
5034 error parameter is @c null, and the given device has been
5035 already added to (when @a attached is @c true) or removed from
5036 (when @a attached is @c false) the collection represented by
5037 <link to="IConsole::USBDevices"/>. On failure, the collection
5038 doesn't change and the @a error parameter represents the error
5039 message describing the failure.
5040
5041 </desc>
5042 <param name="device" type="IUSBDevice" dir="in">
5043 <desc>Device that is subject to state change.</desc>
5044 </param>
5045 <param name="attached" type="boolean" dir="in">
5046 <desc>
5047 <tt>true</tt> if the device was attached
5048 and <tt>false</tt> otherwise.
5049 </desc>
5050 </param>
5051 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5052 <desc>
5053 <tt>null</tt> on success or an error message object on
5054 failure.
5055 </desc>
5056 </param>
5057 </method>
5058
5059 <method name="onSharedFolderChange">
5060 <desc>
5061 Notification when a shared folder is added or removed.
5062 The @a scope argument defines one of three scopes:
5063 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5064 (<link to="Scope_Global">Global</link>),
5065 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5066 the machine (<link to="Scope_Machine">Machine</link>) or <link
5067 to="IConsole::sharedFolders">transient shared folders</link> of the
5068 machine (<link to="Scope_Session">Session</link>). Interested callees
5069 should use query the corresponding collections to find out what has
5070 changed.
5071 </desc>
5072 <param name="scope" type="Scope" dir="in">
5073 <desc>Scope of the notification.</desc>
5074 </param>
5075 </method>
5076
5077 <method name="onRuntimeError">
5078 <desc>
5079 Notification when an error happens during the virtual
5080 machine execution.
5081
5082 There are three kinds of runtime errors:
5083 <ul>
5084 <li><i>fatal</i></li>
5085 <li><i>non-fatal with retry</i></li>
5086 <li><i>non-fatal warnings</i></li>
5087 </ul>
5088
5089 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5090 to <tt>true</tt>. In case of fatal errors, the virtual machine
5091 execution is always paused before calling this notification, and
5092 the notification handler is supposed either to immediately save
5093 the virtual machine state using <link to="IConsole::saveState()"/>
5094 or power it off using <link to="IConsole::powerDown()"/>.
5095 Resuming the execution can lead to unpredictable results.
5096
5097 <b>Non-fatal</b> errors and warnings are indicated by the
5098 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5099 is in the Paused state by the time the error notification is
5100 received, it means that the user can <i>try to resume</i> the machine
5101 execution after attempting to solve the problem that caused the
5102 error. In this case, the notification handler is supposed
5103 to show an appropriate message to the user (depending on the
5104 value of the @a id parameter) that offers several actions such
5105 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5106 wants to retry, the notification handler should continue
5107 the machine execution using the <link to="IConsole::resume()"/>
5108 call. If the machine execution is not Paused during this
5109 notification, then it means this notification is a <i>warning</i>
5110 (for example, about a fatal condition that can happen very soon);
5111 no immediate action is required from the user, the machine
5112 continues its normal execution.
5113
5114 Note that in either case the notification handler
5115 <b>must not</b> perform any action directly on a thread
5116 where this notification is called. Everything it is allowed to
5117 do is to post a message to another thread that will then talk
5118 to the user and take the corresponding action.
5119
5120 Currently, the following error identifiers are known:
5121 <ul>
5122 <li><tt>"HostMemoryLow"</tt></li>
5123 <li><tt>"HostAudioNotResponding"</tt></li>
5124 <li><tt>"VDIStorageFull"</tt></li>
5125 </ul>
5126
5127 <note>
5128 This notification is not designed to be implemented by
5129 more than one callback at a time. If you have multiple
5130 IConsoleCallback instances registered on the given
5131 IConsole object, make sure you simply do nothing but
5132 return @c S_OK from all but one of them that does actual
5133 user notification and performs necessary actions.
5134 </note>
5135
5136 </desc>
5137 <param name="fatal" type="boolean" dir="in">
5138 <desc>Whether the error is fatal or not</desc>
5139 </param>
5140 <param name="id" type="wstring" dir="in">
5141 <desc>Error identifier</desc>
5142 </param>
5143 <param name="message" type="wstring" dir="in">
5144 <desc>Optional error message</desc>
5145 </param>
5146 </method>
5147
5148 <method name="onCanShowWindow">
5149 <desc>
5150 Notification when a call to
5151 <link to="IMachine::canShowConsoleWindow()"/> is made by a
5152 front-end to check if a subsequent call to
5153 <link to="IMachine::showConsoleWindow()"/> can succeed.
5154
5155 The callee should give an answer appropriate to the current
5156 machine state in the @a canShow argument. This answer must
5157 remain valid at least until the next
5158 <link to="IConsole::state">machine state</link> change.
5159
5160 <note>
5161 This notification is not designed to be implemented by
5162 more than one callback at a time. If you have multiple
5163 IConsoleCallback instances registered on the given
5164 IConsole object, make sure you simply do nothing but
5165 return @c true and @c S_OK from all but one of them that
5166 actually manages console window activation.
5167 </note>
5168 </desc>
5169 <param name="canShow" type="boolean" dir="return">
5170 <desc>
5171 @c true if the console window can be shown and @c
5172 false otherwise.
5173 </desc>
5174 </param>
5175 </method>
5176
5177 <method name="onShowWindow">
5178 <desc>
5179 Notification when a call to
5180 <link to="IMachine::showConsoleWindow()"/>
5181 requests the console window to be activated and brought to
5182 foreground on the desktop of the host PC.
5183
5184 This notification should cause the VM console process to
5185 perform the requested action as described above. If it is
5186 impossible to do it at a time of this notification, this
5187 method should return a failure.
5188
5189 Note that many modern window managers on many platforms
5190 implement some sort of focus stealing prevention logic, so
5191 that it may be impossible to activate a window without the
5192 help of the currently active application (which is supposedly
5193 an initiator of this notification). In this case, this method
5194 must return a non-zero identifier that represents the
5195 top-level window of the VM console process. The caller, if it
5196 represents a currently active process, is responsible to use
5197 this identifier (in a platform-dependent manner) to perform
5198 actual window activation.
5199
5200 This method must set @a winId to zero if it has performed all
5201 actions necessary to complete the request and the console
5202 window is now active and in foreground, to indicate that no
5203 further action is required on the caller's side.
5204
5205 <note>
5206 This notification is not designed to be implemented by
5207 more than one callback at a time. If you have multiple
5208 IConsoleCallback instances registered on the given
5209 IConsole object, make sure you simply do nothing but
5210 return @c S_OK from all but one of them that actually
5211 manages console window activation.
5212 </note>
5213 </desc>
5214 <param name="winId" type="unsigned long long" dir="return">
5215 <desc>
5216 Platform-dependent identifier of the top-level VM console
5217 window, or zero if this method has performed all actions
5218 necessary to implement the <i>show window</i> semantics for
5219 the given platform and/or this VirtualBox front-end.
5220 </desc>
5221 </param>
5222 </method>
5223
5224 </interface>
5225
5226 <interface
5227 name="IRemoteDisplayInfo" extends="$unknown"
5228 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5229 wsmap="struct"
5230 >
5231 <desc>
5232 Contains information about the remote display (VRDP) capabilities and status.
5233 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5234 </desc>
5235
5236 <attribute name="active" type="boolean" readonly="yes">
5237 <desc>
5238 Whether the remote display connection is active.
5239 </desc>
5240 </attribute>
5241
5242 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5243 <desc>
5244 How many times a client connected.
5245 </desc>
5246 </attribute>
5247
5248 <attribute name="beginTime" type="long long" readonly="yes">
5249 <desc>
5250 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5251 </desc>
5252 </attribute>
5253
5254 <attribute name="endTime" type="long long" readonly="yes">
5255 <desc>
5256 When the last connection was terminated or the current time, if
5257 connection is still active, in milliseconds since 1970-01-01 UTC.
5258 </desc>
5259 </attribute>
5260
5261 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5262 <desc>
5263 How many bytes were sent in last or current, if still active, connection.
5264 </desc>
5265 </attribute>
5266
5267 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5268 <desc>
5269 How many bytes were sent in all connections.
5270 </desc>
5271 </attribute>
5272
5273 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5274 <desc>
5275 How many bytes were received in last or current, if still active, connection.
5276 </desc>
5277 </attribute>
5278
5279 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5280 <desc>
5281 How many bytes were received in all connections.
5282 </desc>
5283 </attribute>
5284
5285 <attribute name="user" type="wstring" readonly="yes">
5286 <desc>
5287 Login user name supplied by the client.
5288 </desc>
5289 </attribute>
5290
5291 <attribute name="domain" type="wstring" readonly="yes">
5292 <desc>
5293 Login domain name supplied by the client.
5294 </desc>
5295 </attribute>
5296
5297 <attribute name="clientName" type="wstring" readonly="yes">
5298 <desc>
5299 The client name supplied by the client.
5300 </desc>
5301 </attribute>
5302
5303 <attribute name="clientIP" type="wstring" readonly="yes">
5304 <desc>
5305 The IP address of the client.
5306 </desc>
5307 </attribute>
5308
5309 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5310 <desc>
5311 The client software version number.
5312 </desc>
5313 </attribute>
5314
5315 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5316 <desc>
5317 Public key exchange method used when connection was established.
5318 Values: 0 - RDP4 public key exchange scheme.
5319 1 - X509 certificates were sent to client.
5320 </desc>
5321 </attribute>
5322
5323 </interface>
5324
5325 <interface
5326 name="IConsole" extends="$unknown"
5327 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
5328 wsmap="managed"
5329 >
5330 <desc>
5331 The IConsole interface represents an interface to control virtual
5332 machine execution.
5333
5334 The console object that implements the IConsole interface is obtained
5335 from a session object after the session for the given machine has been
5336 opened using one of <link to="IVirtualBox::openSession"/>,
5337 <link to="IVirtualBox::openRemoteSession"/> or
5338 <link to="IVirtualBox::openExistingSession"/> methods.
5339
5340 Methods of the IConsole interface allow the caller to query the current
5341 virtual machine execution state, pause the machine or power it down, save
5342 the machine state or take a snapshot, attach and detach removable media
5343 and so on.
5344
5345 <see>ISession</see>
5346 </desc>
5347
5348 <attribute name="machine" type="IMachine" readonly="yes">
5349 <desc>
5350 Machine object this console is sessioned with.
5351 <note>
5352 This is a convenience property, it has the same value as
5353 <link to="ISession::machine"/> of the corresponding session
5354 object.
5355 </note>
5356 </desc>
5357 </attribute>
5358
5359 <attribute name="state" type="MachineState" readonly="yes">
5360 <desc>
5361 Current execution state of the machine.
5362 <note>
5363 This property always returns the same value as the corresponding
5364 property of the IMachine object this console is sessioned with.
5365 For the process that owns (executes) the VM, this is the
5366 preferable way of querying the VM state, because no IPC
5367 calls are made.
5368 </note>
5369 </desc>
5370 </attribute>
5371
5372 <attribute name="guest" type="IGuest" readonly="yes">
5373 <desc>Guest object.</desc>
5374 </attribute>
5375
5376 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5377 <desc>
5378 Virtual keyboard object.
5379 <note>
5380 If the machine is not running, any attempt to use
5381 the returned object will result in an error.
5382 </note>
5383 </desc>
5384 </attribute>
5385
5386 <attribute name="mouse" type="IMouse" readonly="yes">
5387 <desc>
5388 Virtual mouse object.
5389 <note>
5390 If the machine is not running, any attempt to use
5391 the returned object will result in an error.
5392 </note>
5393 </desc>
5394 </attribute>
5395
5396 <attribute name="display" type="IDisplay" readonly="yes">
5397 <desc>Virtual display object.
5398 <note>
5399 If the machine is not running, any attempt to use
5400 the returned object will result in an error.
5401 </note>
5402 </desc>
5403 </attribute>
5404
5405 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5406 <desc>Debugging interface.</desc>
5407 </attribute>
5408
5409 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
5410 <desc>
5411 Collection of USB devices currently attached to the virtual
5412 USB controller.
5413 <note>
5414 The collection is empty if the machine is not running.
5415 </note>
5416 </desc>
5417 </attribute>
5418
5419 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5420 <desc>
5421 List of USB devices currently attached to the remote VRDP client.
5422 Once a new device is physically attached to the remote host computer,
5423 it appears in this list and remains there until detached.
5424 </desc>
5425 </attribute>
5426
5427 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
5428 <desc>
5429 Collection of shared folders for the current session. These folders
5430 are called transient shared folders because they are available to the
5431 guest OS running inside the associated virtual machine only for the
5432 duration of the session (as opposed to
5433 <link to="IMachine::sharedFolders"/> which represent permanent shared
5434 folders). When the session is closed (e.g. the machine is powered down),
5435 these folders are automatically discarded.
5436
5437 New shared folders are added to the collection using
5438 <link to="#createSharedFolder"/>. Existing shared folders can be
5439 removed using <link to="#removeSharedFolder"/>.
5440 </desc>
5441 </attribute>
5442
5443 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5444 <desc>
5445 Interface that provides information on Remote Display (VRDP) connection.
5446 </desc>
5447 </attribute>
5448
5449 <method name="powerUp">
5450 <desc>
5451 Starts the virtual machine execution using the current machine
5452 state (that is, its current execution state, current settings and
5453 current hard disks).
5454
5455 If the machine is powered off or aborted, the execution will
5456 start from the beginning (as if the real hardware were just
5457 powered on).
5458
5459 If the machine is in the <link to="MachineState_Saved"/> state,
5460 it will continue its execution the point where the state has
5461 been saved.
5462
5463 <note>
5464 Unless you are trying to write a new VirtualBox front-end that
5465 performs direct machine execution (like the VirtualBox or VBoxSDL
5466 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5467 session opened by <link to="IVirtualBox::openSession"/> and use this
5468 session only to change virtual machine settings. If you simply want to
5469 start virtual machine execution using one of the existing front-ends
5470 (for example the VirtualBox GUI or headless server), simply use
5471 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5472 power up the machine automatically for you.
5473 </note>
5474
5475 <see>#saveState</see>
5476 <result name="VBOX_E_INVALID_VM_STATE">
5477 Virtual machine already running.
5478 </result>
5479 <result name="VBOX_E_HOST_ERROR">
5480 Host interface does not exist or name not set.
5481 </result>
5482 <result name="VBOX_E_FILE_ERROR">
5483 Invalid saved state file.
5484 </result>
5485 </desc>
5486 <param name="progress" type="IProgress" dir="return">
5487 <desc>Progress object to track the operation completion.</desc>
5488 </param>
5489 </method>
5490
5491 <method name="powerUpPaused">
5492 <desc>
5493 Identical to powerUp except that the VM will enter the
5494 <link to="MachineState_Paused"/> state, instead of
5495 <link to="MachineState_Running"/>.
5496
5497 <see>#powerUp</see>
5498 <result name="VBOX_E_INVALID_VM_STATE">
5499 Virtual machine already running.
5500 </result>
5501 <result name="VBOX_E_HOST_ERROR">
5502 Host interface does not exist or name not set.
5503 </result>
5504 <result name="VBOX_E_FILE_ERROR">
5505 Invalid saved state file.
5506 </result>
5507 </desc>
5508 <param name="progress" type="IProgress" dir="return">
5509 <desc>Progress object to track the operation completion.</desc>
5510 </param>
5511 </method>
5512
5513 <method name="powerDown">
5514 <desc>
5515 Stops the virtual machine execution.
5516 After this operation completes, the machine will go to the
5517 PoweredOff state.
5518
5519 @deprecated This method will be removed in VirtualBox 2.1 where the
5520 powerDownAsync() method will take its name. Do not use this method in
5521 the code.
5522 <result name="VBOX_E_INVALID_VM_STATE">
5523 Virtual machine must be Running, Paused or Stuck to be powered down.
5524 </result>
5525 <result name="VBOX_E_VM_ERROR">
5526 Unable to power off or destroy virtual machine.
5527 </result>
5528 </desc>
5529 </method>
5530
5531 <method name="powerDownAsync">
5532 <desc>
5533 Initiates the power down procedure to stop the virtual machine
5534 execution.
5535
5536 The completion of the power down procedure is tracked using the returned
5537 IProgress object. After the operation is complete, the machine will go
5538 to the PoweredOff state.
5539
5540 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5541 where the original powerDown() method will be removed. You will need to
5542 rename "powerDownAsync" to "powerDown" in your sources to make them
5543 build with version 2.1.
5544 <result name="VBOX_E_INVALID_VM_STATE">
5545 Virtual machine must be Running, Paused or Stuck to be powered down.
5546 </result>
5547 </desc>
5548 <param name="progress" type="IProgress" dir="return">
5549 <desc>Progress object to track the operation completion.</desc>
5550 </param>
5551 </method>
5552
5553 <method name="reset">
5554 <desc>Resets the virtual machine.
5555 <result name="VBOX_E_INVALID_VM_STATE">
5556 Virtual machine not in Running state.
5557 </result>
5558 <result name="VBOX_E_VM_ERROR">
5559 Virtual machine error in reset operation.
5560 </result>
5561 </desc>
5562 </method>
5563
5564 <method name="pause">
5565 <desc>Pauses the virtual machine execution.
5566 <result name="VBOX_E_INVALID_VM_STATE">
5567 Virtual machine not in Running state.
5568 </result>
5569 <result name="VBOX_E_VM_ERROR">
5570 Virtual machine error in suspend operation.
5571 </result>
5572 </desc>
5573 </method>
5574
5575 <method name="resume">
5576 <desc>Resumes the virtual machine execution.
5577 <result name="VBOX_E_INVALID_VM_STATE">
5578 Virtual machine not in Paused state.
5579 </result>
5580 <result name="VBOX_E_VM_ERROR">
5581 Virtual machine error in resume operation.
5582 </result>
5583 </desc>
5584 </method>
5585
5586 <method name="powerButton">
5587 <desc>Sends the ACPI power button event to the guest.
5588 <result name="VBOX_E_INVALID_VM_STATE">
5589 Virtual machine not in Running state.
5590 </result>
5591 <result name="VBOX_E_PDM_ERROR">
5592 Controlled power off failed.
5593 </result>
5594 </desc>
5595 </method>
5596
5597 <method name="sleepButton">
5598 <desc>Sends the ACPI sleep button event to the guest.
5599 <result name="VBOX_E_INVALID_VM_STATE">
5600 Virtual machine not in Running state.
5601 </result>
5602 <result name="VBOX_E_PDM_ERROR">
5603 Sending sleep button event failed.
5604 </result>
5605 </desc>
5606 </method>
5607
5608 <method name="getPowerButtonHandled">
5609 <desc>Checks if the last power button event was handled by guest.
5610 <result name="VBOX_E_PDM_ERROR">
5611 Checking if the event was handled by the guest OS failed.
5612 </result>
5613 </desc>
5614 <param name="handled" type="boolean" dir="return"/>
5615 </method>
5616
5617 <method name="getGuestEnteredACPIMode">
5618 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5619 G1 (sleeping). If this method returns false, the guest will
5620 most likely not respond to external ACPI events.
5621 <result name="VBOX_E_INVALID_VM_STATE">
5622 Virtual machine not in Running state.
5623 </result>
5624 </desc>
5625 <param name="entered" type="boolean" dir="return"/>
5626 </method>
5627
5628 <method name="saveState">
5629 <desc>
5630 Saves the current execution state of a running virtual machine
5631 and stops its execution.
5632
5633 After this operation completes, the machine will go to the
5634 Saved state. Next time it is powered up, this state will
5635 be restored and the machine will continue its execution from
5636 the place where it was saved.
5637
5638 This operation differs from taking a snapshot to the effect
5639 that it doesn't create new differencing hard disks. Also, once
5640 the machine is powered up from the state saved using this method,
5641 the saved state is deleted, so it will be impossible to return
5642 to this state later.
5643
5644 <note>
5645 On success, this method implicitly calls
5646 <link to="IMachine::saveSettings()"/> to save all current machine
5647 settings (including runtime changes to the DVD drive, etc.).
5648 Together with the impossibility to change any VM settings when it is
5649 in the Saved state, this guarantees adequate hardware
5650 configuration of the machine when it is restored from the saved
5651 state file.
5652 </note>
5653
5654 <note>
5655 The machine must be in the Running or Paused state, otherwise
5656 the operation will fail.
5657 </note>
5658 <result name="VBOX_E_INVALID_VM_STATE">
5659 Virtual machine state neither Running nor Paused.
5660 </result>
5661 <result name="VBOX_E_FILE_ERROR">
5662 Failed to create directory for saved state file.
5663 </result>
5664
5665 <see><link to="#takeSnapshot"/></see>
5666 </desc>
5667 <param name="progress" type="IProgress" dir="return">
5668 <desc>Progress object to track the operation completion.</desc>
5669 </param>
5670 </method>
5671
5672 <method name="adoptSavedState">
5673 <desc>
5674 Associates the given saved state file to the virtual machine.
5675
5676 On success, the machine will go to the Saved state. Next time it is
5677 powered up, it will be restored from the adopted saved state and
5678 continue execution from the place where the saved state file was
5679 created.
5680
5681 The specified saved state file path may be absolute or relative to the
5682 folder the VM normally saves the state to (usually,
5683 <link to="IMachine::snapshotFolder"/>).
5684
5685 <note>
5686 It's a caller's responsibility to make sure the given saved state
5687 file is compatible with the settings of this virtual machine that
5688 represent its virtual hardware (memory size, hard disk configuration
5689 etc.). If there is a mismatch, the behavior of the virtual machine
5690 is undefined.
5691 </note>
5692 <result name="VBOX_E_INVALID_VM_STATE">
5693 Virtual machine state neither PoweredOff nor Aborted.
5694 </result>
5695 </desc>
5696 <param name="savedStateFile" type="wstring" dir="in">
5697 <desc>Path to the saved state file to adopt.</desc>
5698 </param>
5699 </method>
5700
5701 <method name="discardSavedState">
5702 <desc>
5703 Discards (deletes) the saved state of the virtual machine
5704 previously created by <link to="#saveState"/>. Next time the
5705 machine is powered up, a clean boot will occur.
5706 <note>
5707 This operation is equivalent to resetting or powering off
5708 the machine without doing a proper shutdown in the guest OS.
5709 </note>
5710 <result name="VBOX_E_INVALID_VM_STATE">
5711 Virtual machine not in state Saved.
5712 </result>
5713 </desc>
5714 </method>
5715
5716 <method name="getDeviceActivity">
5717 <desc>
5718 Gets the current activity type of a given device or device group.
5719 <result name="E_INVALIDARG">
5720 Invalid device type.
5721 </result>
5722 </desc>
5723 <param name="type" type="DeviceType" dir="in"/>
5724 <param name="activity" type="DeviceActivity" dir="return"/>
5725 </method>
5726
5727 <method name="attachUSBDevice">
5728 <desc>
5729 Attaches a host USB device with the given UUID to the
5730 USB controller of the virtual machine.
5731
5732 The device needs to be in one of the following states:
5733 <link to="USBDeviceState_Busy"/>,
5734 <link to="USBDeviceState_Available"/> or
5735 <link to="USBDeviceState_Held"/>,
5736 otherwise an error is immediately returned.
5737
5738 When the device state is
5739 <link to="USBDeviceState_Busy">Busy</link>, an error may also
5740 be returned if the host computer refuses to release it for some reason.
5741
5742 <see>IUSBController::deviceFilters, USBDeviceState</see>
5743 <result name="VBOX_E_INVALID_VM_STATE">
5744 Virtual machine state neither Running nor Paused.
5745 </result>
5746 <result name="VBOX_E_PDM_ERROR">
5747 Virtual machine does not have a USB controller.
5748 </result>
5749 </desc>
5750 <param name="id" type="uuid" dir="in">
5751 <desc>UUID of the host USB device to attach.</desc>
5752 </param>
5753 </method>
5754
5755 <method name="detachUSBDevice">
5756 <desc>
5757 Detaches an USB device with the given UUID from the USB controller
5758 of the virtual machine.
5759
5760 After this method succeeds, the VirtualBox server re-initiates
5761 all USB filters as if the device were just physically attached
5762 to the host, but filters of this machine are ignored to avoid
5763 a possible automatic re-attachment.
5764
5765 <see>IUSBController::deviceFilters, USBDeviceState</see>
5766
5767 <result name="VBOX_E_PDM_ERROR">
5768 Virtual machine does not have a USB controller.
5769 </result>
5770 <result name="E_INVALIDARG">
5771 USB device not attached to this virtual machine.
5772 </result>
5773 </desc>
5774 <param name="id" type="uuid" dir="in">
5775 <desc>UUID of the USB device to detach.</desc>
5776 </param>
5777 <param name="device" type="IUSBDevice" dir="return">
5778 <desc>Detached USB device.</desc>
5779 </param>
5780 </method>
5781
5782 <method name="createSharedFolder">
5783 <desc>
5784 Creates a transient new shared folder by associating the given logical
5785 name with the given host path, adds it to the collection of shared
5786 folders and starts sharing it. Refer to the description of
5787 <link to="ISharedFolder"/> to read more about logical names.
5788
5789 <result name="VBOX_E_INVALID_VM_STATE">
5790 Virtual machine in Saved state or currently changing state.
5791 </result>
5792 <result name="VBOX_E_FILE_ERROR">
5793 Shared folder already exists or not accessible.
5794 </result>
5795 </desc>
5796 <param name="name" type="wstring" dir="in">
5797 <desc>Unique logical name of the shared folder.</desc>
5798 </param>
5799 <param name="hostPath" type="wstring" dir="in">
5800 <desc>Full path to the shared folder in the host file system.</desc>
5801 </param>
5802 <param name="writable" type="boolean" dir="in">
5803 <desc>Whether the share is writable or readonly</desc>
5804 </param>
5805 </method>
5806
5807 <method name="removeSharedFolder">
5808 <desc>
5809 Removes a transient shared folder with the given name previously
5810 created by <link to="#createSharedFolder"/> from the collection of
5811 shared folders and stops sharing it.
5812 <result name="VBOX_E_INVALID_VM_STATE">
5813 Virtual machine in Saved state or currently changing state.
5814 </result>
5815 <result name="VBOX_E_FILE_ERROR">
5816 Shared folder does not exists.
5817 </result>
5818 </desc>
5819 <param name="name" type="wstring" dir="in">
5820 <desc>Logical name of the shared folder to remove.</desc>
5821 </param>
5822 </method>
5823
5824 <method name="takeSnapshot">
5825 <desc>
5826 Saves the current execution state and all settings of the
5827 machine and creates differencing images for all
5828 normal (non-independent) hard disks.
5829
5830 This method can be called for a PoweredOff, Saved, Running or
5831 Paused virtual machine. When the machine is PoweredOff, an
5832 offline <link to="ISnapshot">snapshot</link> is created,
5833 in all other cases -- an online snapshot.
5834
5835 The taken snapshot is always based on the
5836 <link to="IMachine::currentSnapshot">current
5837 snapshot</link> of the associated virtual machine and becomes
5838 a new current snapshot.
5839
5840 <note>
5841 This method implicitly calls <link to="IMachine::saveSettings()"/> to
5842 save all current machine settings before taking an offline snapshot.
5843 </note>
5844
5845 <see>ISnapshot, <link to="#saveState"/></see>
5846 <result name="VBOX_E_INVALID_VM_STATE">
5847 Virtual machine currently changing state.
5848 </result>
5849 </desc>
5850 <param name="name" type="wstring" dir="in">
5851 <desc>Short name for the snapshot.</desc>
5852 </param>
5853 <param name="description" type="wstring" dir="in">
5854 <desc>Optional description of the snapshot.</desc>
5855 </param>
5856 <param name="progress" type="IProgress" dir="return">
5857 <desc>Progress object to track the operation completion.</desc>
5858 </param>
5859 </method>
5860
5861 <method name="discardSnapshot">
5862 <desc>
5863
5864 Starts discarding the specified snapshot. The execution state
5865 and settings of the associated machine stored in the snapshot
5866 will be deleted. The contents of all differencing hard disks of
5867 this snapshot will be merged with the contents of their
5868 dependent child hard disks to keep the, disks valid (in other
5869 words, all changes represented by hard disks being discarded
5870 will be propagated to their child hard disks). After that, this
5871 snapshot's differencing hard disks will be deleted. The parent
5872 of this snapshot will become a new parent for all its child
5873 snapshots.
5874
5875 If the discarded snapshot is the current one, its parent
5876 snapshot will become a new current snapshot. The current machine
5877 state is not directly affected in this case, except that
5878 currently attached differencing hard disks based on hard disks
5879 of the discarded snapshot will be also merged as described
5880 above.
5881
5882 If the discarded snapshot is the first one (the root snapshot)
5883 and it has exactly one child snapshot, this child snapshot will
5884 become the first snapshot after discarding. If there are no
5885 children at all (i.e. the first snapshot is the only snapshot of
5886 the machine), both the current and the first snapshot of the
5887 machine will be set to null. In all other cases, the first
5888 snapshot cannot be discarded.
5889
5890 You cannot discard the snapshot if it
5891 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
5892 hard disks that have differencing hard disks based on them. Snapshots of
5893 such kind can be discarded only when every normal hard disk has either
5894 no children at all or exactly one child. In the former case, the normal
5895 hard disk simply becomes unused (i.e. not attached to any VM). In the
5896 latter case, it receives all the changes stored in the child hard disk,
5897 and then it replaces the child hard disk in the configuration of the
5898 corresponding snapshot or machine.
5899
5900 Also, you cannot discard the snapshot if it stores hard disks
5901 (of any type) having differencing child hard disks that belong
5902 to other machines. Such snapshots can be only discarded after
5903 you discard all snapshots of other machines containing "foreign"
5904 child disks, or detach these "foreign" child disks from machines
5905 they are attached to.
5906
5907 One particular example of the snapshot storing normal hard disks
5908 is the first snapshot of a virtual machine that had normal hard
5909 disks attached when taking the snapshot. Be careful when
5910 discarding such snapshots because this implicitly commits
5911 changes (made since the snapshot being discarded has been taken)
5912 to normal hard disks (as described above), which may be not what
5913 you want.
5914
5915 The virtual machine is put to
5916 the <link to="MachineState_Discarding">Discarding</link> state until
5917 the discard operation is completed.
5918
5919 <note>
5920 The machine must not be running, otherwise the operation
5921 will fail.
5922 </note>
5923
5924 <note>
5925 Child hard disks of all normal hard disks of the discarded snapshot
5926 must be accessible (see <link to="IMedium::state"/>) for this
5927 operation to succeed. In particular, this means that all virtual
5928 machines, whose hard disks are directly or indirectly based on the
5929 hard disks of discarded snapshot, must be powered off.
5930 </note>
5931 <note>
5932 Merging hard disk contents can be very time and disk space
5933 consuming, if these disks are big in size and have many
5934 children. However, if the snapshot being discarded is the last
5935 (head) snapshot on the branch, the operation will be rather
5936 quick.
5937 </note>
5938 <note>
5939 Note that discarding the current snapshot
5940 will implicitly call <link to="IMachine::saveSettings()"/> to
5941 make all current machine settings permanent.
5942 </note>
5943 <result name="VBOX_E_INVALID_VM_STATE">
5944 Virtual machine is running.
5945 </result>
5946 </desc>
5947 <param name="id" type="uuid" dir="in">
5948 <desc>UUID of the snapshot to discard.</desc>
5949 </param>
5950 <param name="progress" type="IProgress" dir="return">
5951 <desc>Progress object to track the operation completion.</desc>
5952 </param>
5953 </method>
5954
5955 <method name="discardCurrentState">
5956 <desc>
5957 This operation is similar to <link to="#discardSnapshot()"/> but
5958 affects the current machine state. This means that the state stored in
5959 the current snapshot will become a new current state, and all current
5960 settings of the machine and changes stored in differencing hard disks
5961 will be lost.
5962
5963 After this operation is successfully completed, new empty differencing
5964 hard disks are created for all normal hard disks of the machine.
5965
5966 If the current snapshot of the machine is an online snapshot, the
5967 machine will go to the <link to="MachineState_Saved"> saved
5968 state</link>, so that the next time it is powered on, the execution
5969 state will be restored from the current snapshot.
5970
5971 <note>
5972 The machine must not be running, otherwise the operation will fail.
5973 </note>
5974
5975 <note>
5976 If the machine state is <link to="MachineState_Saved">Saved</link>
5977 prior to this operation, the saved state file will be implicitly
5978 discarded (as if <link to="IConsole::discardSavedState()"/> were
5979 called).
5980 </note>
5981
5982 <result name="VBOX_E_INVALID_VM_STATE">
5983 Virtual machine is running.
5984 </result>
5985 </desc>
5986 <param name="progress" type="IProgress" dir="return">
5987 <desc>Progress object to track the operation completion.</desc>
5988 </param>
5989 </method>
5990
5991 <method name="discardCurrentSnapshotAndState">
5992 <desc>
5993
5994 This method is equivalent to
5995 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
5996 (currentSnapshot.id(), progress) followed by
5997 <link to="#discardCurrentState()"/>.
5998
5999 As a result, the machine will be fully restored from the
6000 snapshot preceding the current snapshot, while both the current
6001 snapshot and the current machine state will be discarded.
6002
6003 If the current snapshot is the first snapshot of the machine (i.e. it
6004 has the only snapshot), the current machine state will be
6005 discarded <b>before</b> discarding the snapshot. In other words, the
6006 machine will be restored from its last snapshot, before discarding
6007 it. This differs from performing a single
6008 <link to="#discardSnapshot()"/> call (note that no
6009 <link to="#discardCurrentState()"/> will be possible after it)
6010 to the effect that the latter will preserve the current state instead of
6011 discarding it.
6012
6013 Unless explicitly mentioned otherwise, all remarks and
6014 limitations of the above two methods also apply to this method.
6015
6016 <note>
6017 The machine must not be running, otherwise the operation
6018 will fail.
6019 </note>
6020
6021 <note>
6022 If the machine state is <link to="MachineState_Saved">Saved</link>
6023 prior to this operation, the saved state file will be implicitly
6024 discarded (as if <link to="#discardSavedState()"/> were
6025 called).
6026 </note>
6027
6028 <note>
6029 This method is more efficient than calling both of the above
6030 methods separately: it requires less IPC calls and provides
6031 a single progress object.
6032 </note>
6033
6034 <result name="VBOX_E_INVALID_VM_STATE">
6035 Virtual machine is running.
6036 </result>
6037 </desc>
6038 <param name="progress" type="IProgress" dir="return">
6039 <desc>Progress object to track the operation completion.</desc>
6040 </param>
6041 </method>
6042
6043 <method name="registerCallback">
6044 <desc>
6045 Registers a new console callback on this instance. The methods of the
6046 callback interface will be called by this instance when the appropriate
6047 event occurs.
6048 </desc>
6049 <param name="callback" type="IConsoleCallback" dir="in"/>
6050 </method>
6051
6052 <method name="unregisterCallback">
6053 <desc>
6054 Unregisters the console callback previously registered using
6055 <link to="#registerCallback"/>.
6056 <result name="E_INVALIDARG">
6057 Given @a callback handler is not registered.
6058 </result>
6059 </desc>
6060 <param name="callback" type="IConsoleCallback" dir="in"/>
6061 </method>
6062 </interface>
6063
6064 <!--
6065 // IHost
6066 /////////////////////////////////////////////////////////////////////////
6067 -->
6068
6069 <interface
6070 name="IHostDVDDrive" extends="$unknown"
6071 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6072 wsmap="managed"
6073 >
6074 <desc>
6075 The IHostDVDDrive interface represents the physical CD/DVD drive
6076 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6077 </desc>
6078
6079 <attribute name="name" type="wstring" readonly="yes">
6080 <desc>
6081 Returns the platform-specific device identifier.
6082 On DOS-like platforms, it is a drive name (e.g. R:).
6083 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6084 </desc>
6085 </attribute>
6086 <attribute name="description" type="wstring" readonly="yes">
6087 <desc>
6088 Returns a human readable description for the drive. This
6089 description usually contains the product and vendor name. A
6090 @c null string is returned if the description is not available.
6091 </desc>
6092 </attribute>
6093 <attribute name="udi" type="wstring" readonly="yes">
6094 <desc>
6095 Returns the unique device identifier for the drive. This
6096 attribute is reserved for future use instead of
6097 <link to="#name"/>. Currently it is not used and may return
6098 @c null on some platforms.
6099 </desc>
6100 </attribute>
6101
6102 </interface>
6103
6104 <enumerator
6105 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
6106 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
6107 />
6108
6109 <collection
6110 name="IHostDVDDriveCollection" type="IHostDVDDrive"
6111 enumerator="IHostDVDDriveEnumerator"
6112 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
6113 readonly="yes"
6114 >
6115 <method name="findByName">
6116 <desc>
6117 Searches this collection for a host drive with the given name.
6118 <note>
6119 The method returns an error if the given name does not
6120 correspond to any host drive in the collection.
6121 </note>
6122 </desc>
6123 <param name="name" type="wstring" dir="in">
6124 <desc>Name of the host drive to search for</desc>
6125 </param>
6126 <param name="drive" type="IHostDVDDrive" dir="return">
6127 <desc>Found host drive object</desc>
6128 </param>
6129 </method>
6130 </collection>
6131
6132 <interface
6133 name="IHostFloppyDrive" extends="$unknown"
6134 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
6135 wsmap="managed"
6136 >
6137 <desc>
6138 The IHostFloppyDrive interface represents the physical floppy drive
6139 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6140 </desc>
6141 <attribute name="name" type="wstring" readonly="yes">
6142 <desc>
6143 Returns the platform-specific device identifier.
6144 On DOS-like platforms, it is a drive name (e.g. A:).
6145 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6146 </desc>
6147 </attribute>
6148 <attribute name="description" type="wstring" readonly="yes">
6149 <desc>
6150 Returns a human readable description for the drive. This
6151 description usually contains the product and vendor name. A
6152 @c null string is returned if the description is not available.
6153 </desc>
6154 </attribute>
6155 <attribute name="udi" type="wstring" readonly="yes">
6156 <desc>
6157 Returns the unique device identifier for the drive. This
6158 attribute is reserved for future use instead of
6159 <link to="#name"/>. Currently it is not used and may return
6160 @c null on some platforms.
6161 </desc>
6162 </attribute>
6163 </interface>
6164
6165 <enumerator
6166 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
6167 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
6168 />
6169
6170 <collection
6171 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
6172 enumerator="IHostFloppyDriveEnumerator"
6173 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
6174 readonly="yes"
6175 >
6176 <method name="findByName">
6177 <desc>
6178 Searches this collection for a host drive with the given name.
6179 <note>
6180 The method returns an error if the given name does not
6181 correspond to any host drive in the collection.
6182 </note>
6183 </desc>
6184 <param name="name" type="wstring" dir="in">
6185 <desc>Name of the host drive to search for</desc>
6186 </param>
6187 <param name="drive" type="IHostFloppyDrive" dir="return">
6188 <desc>Found host drive object</desc>
6189 </param>
6190 </method>
6191 </collection>
6192
6193 <enum
6194 name="HostNetworkInterfaceType"
6195 uuid="763754FA-3246-4539-9590-9E603EDBF706"
6196 >
6197 <desc>
6198 Type of encapsulation. Ethernet encapsulation includes both wired and
6199 wireless Ethernet connections.
6200 <see>IHostNetworkInterface</see>
6201 </desc>
6202
6203 <const name="Unknown" value="0">
6204 <desc>
6205 The type of interface cannot be determined.
6206 </desc>
6207 </const>
6208 <const name="Ethernet" value="1">
6209 <desc>
6210 Ethernet frame encapsulation.
6211 </desc>
6212 </const>
6213 <const name="PPP" value="2">
6214 <desc>
6215 Point-to-point protocol encapsulation.
6216 </desc>
6217 </const>
6218 <const name="SLIP" value="3">
6219 <desc>
6220 Serial line IP encapsulation.
6221 </desc>
6222 </const>
6223 </enum>
6224
6225 <enum
6226 name="HostNetworkInterfaceStatus"
6227 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6228 >
6229 <desc>
6230 Current status of the interface.
6231 <see>IHostNetworkInterface</see>
6232 </desc>
6233
6234 <const name="Unknown" value="0">
6235 <desc>
6236 The state of interface cannot be determined.
6237 </desc>
6238 </const>
6239 <const name="Up" value="1">
6240 <desc>
6241 The interface is fully operational.
6242 </desc>
6243 </const>
6244 <const name="Down" value="2">
6245 <desc>
6246 The interface is not functioning.
6247 </desc>
6248 </const>
6249 </enum>
6250
6251 <interface
6252 name="IHostNetworkInterface" extends="$unknown"
6253 uuid="832720ac-2df6-41d4-a867-a0b40df14c7f"
6254 wsmap="managed"
6255 >
6256 <desc>
6257 Reprents one of host's network interfaces. IP V6 address and network
6258 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6259 separated by colons.
6260 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6261 </desc>
6262 <attribute name="name" type="wstring" readonly="yes">
6263 <desc>Returns the host network interface name.</desc>
6264 </attribute>
6265
6266 <attribute name="id" type="uuid" readonly="yes">
6267 <desc>Returns the interface UUID.</desc>
6268 </attribute>
6269
6270 <attribute name="IPAddress" type="unsigned long" readonly="yes">
6271 <desc>Returns the IP V4 address of the interface.</desc>
6272 </attribute>
6273
6274 <attribute name="networkMask" type="unsigned long" readonly="yes">
6275 <desc>Returns the network mask of the interface.</desc>
6276 </attribute>
6277
6278 <attribute name="IPV6Address" type="wstring" readonly="yes">
6279 <desc>Returns the IP V6 address of the interface.</desc>
6280 </attribute>
6281
6282 <attribute name="IPV6NetworkMask" type="wstring" readonly="yes">
6283 <desc>Returns the IP V6 network mask of the interface.</desc>
6284 </attribute>
6285
6286 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6287 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6288 </attribute>
6289
6290 <attribute name="type" type="HostNetworkInterfaceType" readonly="yes">
6291 <desc>Type of protocol encapsulation used.</desc>
6292 </attribute>
6293
6294 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6295 <desc>Status of the interface.</desc>
6296 </attribute>
6297 </interface>
6298
6299 <interface
6300 name="IHost" extends="$unknown"
6301 uuid="7c172c42-b209-4bdc-9ddf-a84f222bd59a"
6302 wsmap="managed"
6303 >
6304 <desc>
6305 The IHost interface represents the physical machine that this VirtualBox
6306 installation runs on.
6307
6308 An object implementing this interface is returned by the
6309 <link to="IVirtualBox::host" /> attribute. This interface contains
6310 read-only information about the host's physical hardware (such as what
6311 processors and disks are available, what the host operating system is,
6312 and so on) and also allows for manipulating some of the host's hardware,
6313 such as global USB device filters and host interface networking.
6314
6315 </desc>
6316 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
6317 <desc>List of DVD drives available on the host.</desc>
6318 </attribute>
6319
6320 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
6321 <desc>List of floppy drives available on the host.</desc>
6322 </attribute>
6323
6324 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
6325 <desc>
6326 List of USB devices currently attached to the host.
6327 Once a new device is physically attached to the host computer,
6328 it appears in this list and remains there until detached.
6329
6330 <note>
6331 This method may set a @ref com_warnings "warning result code".
6332 </note>
6333 <note>
6334 If USB functionality is not available in the given edition of
6335 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6336 </note>
6337 </desc>
6338 </attribute>
6339
6340 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
6341 <desc>
6342 List of USB device filters in action.
6343 When a new device is physically attached to the host computer,
6344 filters from this list are applied to it (in order they are stored
6345 in the list). The first matched filter will determine the
6346 <link to="IHostUSBDeviceFilter::action">action</link>
6347 performed on the device.
6348
6349 Unless the device is ignored by these filters, filters of all
6350 currently running virtual machines
6351 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6352
6353 <note>
6354 This method may set a @ref com_warnings "warning result code".
6355 </note>
6356 <note>
6357 If USB functionality is not available in the given edition of
6358 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6359 </note>
6360
6361 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6362 </desc>
6363 </attribute>
6364
6365 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6366 <desc>List of host network interfaces currently defined on the host.</desc>
6367 </attribute>
6368
6369 <attribute name="processorCount" type="unsigned long" readonly="yes">
6370 <desc>Number of (logical) CPUs installed in the host system.</desc>
6371 </attribute>
6372
6373 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6374 <desc>Number of (logical) CPUs online in the host system.</desc>
6375 </attribute>
6376
6377 <method name="getProcessorSpeed">
6378 <desc>Query the (approximate) maximum speed of a specified host CPU in
6379 Megahertz.
6380 </desc>
6381 <param name="cpuId" type="unsigned long" dir="in">
6382 <desc>
6383 Identifier of the CPU.
6384 </desc>
6385 </param>
6386 <param name="speed" type="unsigned long" dir="return">
6387 <desc>
6388 Speed value. 0 is returned if value is not known or @a cpuId is
6389 invalid.
6390 </desc>
6391 </param>
6392 </method>
6393
6394 <method name="getProcessorFeature">
6395 <desc>Query whether a CPU feature is supported or not.</desc>
6396 <param name="feature" type="ProcessorFeature" dir="in">
6397 <desc>
6398 CPU Feature identifier.
6399 </desc>
6400 </param>
6401 <param name="supported" type="boolean" dir="return">
6402 <desc>
6403 Feature is supported or not.
6404 </desc>
6405 </param>
6406 </method>
6407
6408 <method name="getProcessorDescription">
6409 <desc>Query the model string of a specified host CPU.
6410 <note>
6411 This function is not implemented in the current version of the
6412 product.
6413 </note>
6414 </desc>
6415 <param name="cpuId" type="unsigned long" dir="in">
6416 <desc>
6417 Identifier of the CPU.
6418 </desc>
6419 </param>
6420 <param name="description" type="wstring" dir="return">
6421 <desc>
6422 Model string. A NULL string is returned if value is not known or
6423 @a cpuId is invalid.
6424 </desc>
6425 </param>
6426 </method>
6427
6428 <attribute name="memorySize" type="unsigned long" readonly="yes">
6429 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6430 </attribute>
6431
6432 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6433 <desc>Available system memory in the host system.</desc>
6434 </attribute>
6435
6436 <attribute name="operatingSystem" type="wstring" readonly="yes">
6437 <desc>Name of the host system's operating system.</desc>
6438 </attribute>
6439
6440 <attribute name="OSVersion" type="wstring" readonly="yes">
6441 <desc>Host operating system's version string.</desc>
6442 </attribute>
6443
6444 <attribute name="UTCTime" type="long long" readonly="yes">
6445 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6446 </attribute>
6447
6448<if target="midl">
6449 <method name="createHostNetworkInterface">
6450 <desc>
6451 Creates a new adapter for Host Interface Networking.
6452 <result name="E_INVALIDARG">
6453 Host network interface @a name already exists.
6454 </result>
6455 </desc>
6456 <param name="name" type="wstring" dir="in">
6457 <desc>
6458 Adapter name.
6459 </desc>
6460 </param>
6461 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6462 <desc>
6463 Created host interface object.
6464 </desc>
6465 </param>
6466 <param name="progress" type="IProgress" dir="return">
6467 <desc>
6468 Progress object to track the operation completion.
6469 </desc>
6470 </param>
6471 </method>
6472 <method name="removeHostNetworkInterface">
6473 <desc>
6474 Removes the given host network interface.
6475 <result name="VBOX_E_OBJECT_NOT_FOUND">
6476 No host network interface matching @a id found.
6477 </result>
6478 </desc>
6479 <param name="id" type="uuid" dir="in">
6480 <desc>
6481 Adapter GUID.
6482 </desc>
6483 </param>
6484 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6485 <desc>
6486 Removed host interface object.
6487 </desc>
6488 </param>
6489 <param name="progress" type="IProgress" dir="return">
6490 <desc>
6491 Progress object to track the operation completion.
6492 </desc>
6493 </param>
6494 </method>
6495</if>
6496
6497 <method name="createUSBDeviceFilter">
6498 <desc>
6499 Creates a new USB device filter. All attributes except
6500 the filter name are set to <tt>null</tt> (any match),
6501 <i>active</i> is <tt>false</tt> (the filter is not active).
6502
6503 The created filter can be added to the list of filters using
6504 <link to="#insertUSBDeviceFilter()"/>.
6505
6506 <see>#USBDeviceFilters</see>
6507 </desc>
6508 <param name="name" type="wstring" dir="in">
6509 <desc>
6510 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6511 for more info.
6512 </desc>
6513 </param>
6514 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6515 <desc>Created filter object.</desc>
6516 </param>
6517 </method>
6518
6519 <method name="insertUSBDeviceFilter">
6520 <desc>
6521 Inserts the given USB device to the specified position
6522 in the list of filters.
6523
6524 Positions are numbered starting from <tt>0</tt>. If the specified
6525 position is equal to or greater than the number of elements in
6526 the list, the filter is added at the end of the collection.
6527
6528 <note>
6529 Duplicates are not allowed, so an attempt to insert a
6530 filter that is already in the list, will return an
6531 error.
6532 </note>
6533 <note>
6534 This method may set a @ref com_warnings "warning result code".
6535 </note>
6536 <note>
6537 If USB functionality is not available in the given edition of
6538 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6539 </note>
6540
6541 <see>#USBDeviceFilters</see>
6542
6543 <result name="VBOX_E_INVALID_OBJECT_STATE">
6544 USB device filter is not created within this VirtualBox instance.
6545 </result>
6546 <result name="E_INVALIDARG">
6547 USB device filter already in list.
6548 </result>
6549
6550 </desc>
6551 <param name="position" type="unsigned long" dir="in">
6552 <desc>Position to insert the filter to.</desc>
6553 </param>
6554 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6555 <desc>USB device filter to insert.</desc>
6556 </param>
6557 </method>
6558
6559 <method name="removeUSBDeviceFilter">
6560 <desc>
6561 Removes a USB device filter from the specified position in the
6562 list of filters.
6563
6564 Positions are numbered starting from <tt>0</tt>. Specifying a
6565 position equal to or greater than the number of elements in
6566 the list will produce an error.
6567
6568 <note>
6569 This method may set a @ref com_warnings "warning result code".
6570 </note>
6571 <note>
6572 If USB functionality is not available in the given edition of
6573 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6574 </note>
6575
6576 <see>#USBDeviceFilters</see>
6577
6578 <result name="E_INVALIDARG">
6579 USB device filter list empty or invalid @a position.
6580 </result>
6581
6582 </desc>
6583 <param name="position" type="unsigned long" dir="in">
6584 <desc>Position to remove the filter from.</desc>
6585 </param>
6586 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6587 <desc>Removed USB device filter.</desc>
6588 </param>
6589 </method>
6590
6591 <method name="findHostNetworkInterfaceByName">
6592 <desc>
6593 Searches through all host network interfaces for an interface with
6594 the given name.
6595 <note>
6596 The method returns an error if the given name does not
6597 correspond to any host network interface.
6598 </note>
6599 </desc>
6600 <param name="name" type="wstring" dir="in">
6601 <desc>Name of the host network interface to search for.</desc>
6602 </param>
6603 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6604 <desc>Found host network interface object.</desc>
6605 </param>
6606 </method>
6607 <method name="findHostNetworkInterfaceById">
6608 <desc>
6609 Searches through all host network interfaces for an interface with
6610 the given GUID.
6611 <note>
6612 The method returns an error if the given GUID does not
6613 correspond to any host network interface.
6614 </note>
6615 </desc>
6616 <param name="id" type="uuid" dir="in">
6617 <desc>GUID of the host network interface to search for.</desc>
6618 </param>
6619 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6620 <desc>Found host network interface object.</desc>
6621 </param>
6622 </method>
6623 </interface>
6624
6625 <!--
6626 // ISystemProperties
6627 /////////////////////////////////////////////////////////////////////////
6628 -->
6629
6630 <interface
6631 name="ISystemProperties"
6632 extends="$unknown"
6633 uuid="604afeba-5963-4d12-a577-902ffb96352a"
6634 wsmap="managed"
6635 >
6636 <desc>
6637 The ISystemProperties interface represents global properties of the given
6638 VirtualBox installation.
6639
6640 These properties define limits and default values for various attributes
6641 and parameters. Most of the properties are read-only, but some can be
6642 changed by a user.
6643 </desc>
6644
6645 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
6646 <desc>Minimum guest system memory in Megabytes.</desc>
6647 </attribute>
6648
6649 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
6650 <desc>Maximum guest system memory in Megabytes.</desc>
6651 </attribute>
6652
6653 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
6654 <desc>Minimum guest video memory in Megabytes.</desc>
6655 </attribute>
6656
6657 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
6658 <desc>Maximum guest video memory in Megabytes.</desc>
6659 </attribute>
6660
6661 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
6662 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
6663 </attribute>
6664
6665 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
6666 <desc>
6667 Number of network adapters associated with every
6668 <link to="IMachine"/> instance.
6669 </desc>
6670 </attribute>
6671
6672 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
6673 <desc>
6674 Number of serial ports associated with every
6675 <link to="IMachine"/> instance.
6676 </desc>
6677 </attribute>
6678
6679 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
6680 <desc>
6681 Number of parallel ports associated with every
6682 <link to="IMachine"/> instance.
6683 </desc>
6684 </attribute>
6685
6686 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
6687 <desc>
6688 Maximum device position in the boot order. This value corresponds
6689 to the total number of devices a machine can boot from, to make it
6690 possible to include all possible devices to the boot list.
6691 <see><link to="IMachine::setBootOrder()"/></see>
6692 </desc>
6693 </attribute>
6694
6695 <attribute name="defaultMachineFolder" type="wstring">
6696 <desc>
6697 Full path to the default directory used to create new or open
6698 existing machines when a settings file name contains no
6699 path.
6700
6701 The initial value of this property is
6702 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
6703 VirtualBox_home</link><tt>&gt;/Machines</tt>.
6704
6705 <note>
6706 Setting this property to <tt>null</tt> will restore the
6707 initial value.
6708 </note>
6709 <note>
6710 When settings this property, the specified path can be
6711 absolute (full path) or relative
6712 to the <link to="IVirtualBox::homeFolder">
6713 VirtualBox home directory</link>.
6714 When reading this property, a full path is
6715 always returned.
6716 </note>
6717 <note>
6718 The specified path may not exist, it will be created
6719 when necessary.
6720 </note>
6721
6722 <see>
6723 <link to="IVirtualBox::createMachine()"/>,
6724 <link to="IVirtualBox::openMachine()"/>
6725 </see>
6726 </desc>
6727 </attribute>
6728
6729 <attribute name="defaultHardDiskFolder" type="wstring">
6730 <desc>
6731 Full path to the default directory used to create new or open existing
6732 virtual disks.
6733
6734 This path is used when the storage unit of a hard disk is a regular file
6735 in the host's file system and only a file name that contains no path is
6736 given.
6737
6738 The initial value of this property is
6739 <tt>&lt;</tt>
6740 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
6741 <tt>&gt;/HardDisks</tt>.
6742
6743 <note>
6744 Setting this property to <tt>null</tt> will restore the
6745 initial value.
6746 </note>
6747 <note>
6748 When settings this property, the specified path can be relative
6749 to the
6750 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
6751 absolute. When reading this property, a full path is
6752 always returned.
6753 </note>
6754 <note>
6755 The specified path may not exist, it will be created
6756 when necessary.
6757 </note>
6758
6759 <see>
6760 IHardDisk2,
6761 <link to="IVirtualBox::createHardDisk2()"/>,
6762 <link to="IVirtualBox::openHardDisk2()"/>,
6763 <link to="IMedium::location"/>
6764 </see>
6765 </desc>
6766 </attribute>
6767
6768 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
6769 <desc>
6770 List of all hard disk storage formats supported by this VirtualBox
6771 installation.
6772
6773 Keep in mind that the hard disk format identifier
6774 (<link to="IHardDiskFormat::id"/>) used in other API calls like
6775 <link to="IVirtualBox::createHardDisk2()"/> to refer to a particular
6776 hard disk format is a case-insensitive string. This means that, for
6777 example, all of the following strings:
6778 <pre>
6779 "VDI"
6780 "vdi"
6781 "VdI"</pre>
6782 refer to the same hard disk format.
6783
6784 Note that the virtual hard disk framework is backend-based, therefore
6785 the list of supported formats depends on what backends are currently
6786 installed.
6787
6788 <see>
6789 <link to="IHardDiskFormat"/>,
6790 </see>
6791 </desc>
6792 </attribute>
6793
6794 <attribute name="defaultHardDiskFormat" type="wstring">
6795 <desc>
6796 Identifier of the default hard disk format used by VirtualBox.
6797
6798 The hard disk format set by this attribute is used by VirtualBox
6799 when the hard disk format was not specified explicitly. One example is
6800 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
6801 format argument. A more complex example is implicit creation of
6802 differencing hard disks when taking a snapshot of a virtual machine:
6803 this operation will try to use a format of the parent hard disk first
6804 and if this format does not support differencing hard disks the default
6805 format specified by this argument will be used.
6806
6807 The list of supported hard disk formats may be obtained by the
6808 <link to="#hardDiskFormats"/> call. Note that the default hard disk
6809 format must have a capability to create differencing hard disks;
6810 otherwise opeartions that create hard disks implicitly may fail
6811 unexpectedly.
6812
6813 The initial value of this property is <tt>VDI</tt> in the current
6814 version of the VirtualBox product, but may change in the future.
6815
6816 <note>
6817 Setting this property to <tt>null</tt> will restore the
6818 initial value.
6819 </note>
6820
6821 <see>
6822 <link to="#hardDiskFormats"/>,
6823 <link to="IHardDiskFormat::id"/>,
6824 <link to="IVirtualBox::createHardDisk2()"/>
6825 </see>
6826 </desc>
6827 </attribute>
6828
6829 <attribute name="remoteDisplayAuthLibrary" type="wstring">
6830 <desc>
6831 Library that provides authentication for VRDP clients. The library
6832 is used if a virtual machine's authentication type is set to "external"
6833 in the VM RemoteDisplay configuration.
6834
6835 The system library extension (".DLL" or ".so") must be omitted.
6836 A full path can be specified; if not, then the library must reside on the
6837 system's default library path.
6838
6839 The default value of this property is <tt>VRDPAuth</tt>. There is a library
6840 of that name in one of the default VirtualBox library directories.
6841
6842 For details about VirtualBox authentication libraries and how to implement
6843 them, please refer to the VirtualBox manual.
6844
6845 <note>
6846 Setting this property to <tt>null</tt> will restore the
6847 initial value.
6848 </note>
6849 </desc>
6850 </attribute>
6851
6852 <attribute name="webServiceAuthLibrary" type="wstring">
6853 <desc>
6854 Library that provides authentication for webservice clients. The library
6855 is used if a virtual machine's authentication type is set to "external"
6856 in the VM RemoteDisplay configuration and will be called from
6857 within the <link to="IWebsessionManager::logon" /> implementation.
6858
6859 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
6860 there is no per-VM setting for this, as the webservice is a global
6861 resource (if it is running). Only for this setting (for the webservice),
6862 setting this value to a literal "null" string disables authentication,
6863 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
6864 no matter what user name and password are supplied.
6865
6866 The initial value of this property is <tt>VRDPAuth</tt>,
6867 meaning that the webservice will use the same authentication
6868 library that is used by default for VBoxVRDP (again, see
6869 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
6870 The format and calling convention of authentication libraries
6871 is the same for the webservice as it is for VBoxVRDP.
6872
6873 </desc>
6874 </attribute>
6875
6876 <attribute name="HWVirtExEnabled" type="boolean">
6877 <desc>
6878 This specifies the default value for hardware virtualization
6879 extensions. If enabled, virtual machines will make use of
6880 hardware virtualization extensions such as Intel VT-x and
6881 AMD-V by default. This value can be overridden by each VM
6882 using their <link to="IMachine::HWVirtExEnabled" /> property.
6883 </desc>
6884 </attribute>
6885
6886 <attribute name="LogHistoryCount" type="unsigned long">
6887 <desc>
6888 This value specifies how many old release log files are kept.
6889 </desc>
6890 </attribute>
6891 </interface>
6892
6893 <!--
6894 // IGuest
6895 /////////////////////////////////////////////////////////////////////////
6896 -->
6897
6898 <interface
6899 name="IGuestOSType" extends="$unknown"
6900 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
6901 wsmap="struct"
6902 >
6903 <desc>
6904 </desc>
6905
6906 <attribute name="familyId" type="wstring" readonly="yes">
6907 <desc>Guest OS family identifier string.</desc>
6908 </attribute>
6909
6910 <attribute name="familyDescription" type="wstring" readonly="yes">
6911 <desc>Human readable description of the guest OS family.</desc>
6912 </attribute>
6913
6914 <attribute name="id" type="wstring" readonly="yes">
6915 <desc>Guest OS identifier string.</desc>
6916 </attribute>
6917
6918 <attribute name="description" type="wstring" readonly="yes">
6919 <desc>Human readable description of the guest OS.</desc>
6920 </attribute>
6921
6922 <attribute name="is64Bit" type="boolean" readonly="yes">
6923 <desc>Returns @c true if the given OS is 64-bit</desc>
6924 </attribute>
6925
6926 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
6927 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
6928 </attribute>
6929
6930 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
6931 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
6932 </attribute>
6933
6934 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
6935 <desc>Recommended RAM size in Megabytes.</desc>
6936 </attribute>
6937
6938 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
6939 <desc>Recommended video RAM size in Megabytes.</desc>
6940 </attribute>
6941
6942 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
6943 <desc>Recommended hard disk size in Megabytes.</desc>
6944 </attribute>
6945
6946 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
6947 <desc>Returns recommended network adapter for this OS type.</desc>
6948 </attribute>
6949 </interface>
6950
6951
6952 <enumerator
6953 name="IGuestOSTypeEnumerator" type="IGuestOSType"
6954 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
6955 />
6956
6957 <collection
6958 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
6959 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
6960 readonly="yes"
6961 />
6962
6963 <interface
6964 name="IGuest" extends="$unknown"
6965 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
6966
6967 wsmap="suppress"
6968 >
6969 <desc>
6970 The IGuest interface represents information about the operating system
6971 running inside the virtual machine. Used in
6972 <link to="IConsole::guest"/>.
6973
6974 IGuest provides information about the guest operating system, whether
6975 Guest Additions are installed and other OS-specific virtual machine
6976 properties.
6977 </desc>
6978
6979 <attribute name="OSTypeId" type="wstring" readonly="yes">
6980 <desc>
6981 Identifier of the Guest OS type as reported by the Guest
6982 Additions.
6983 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
6984 an IGuestOSType object representing details about the given
6985 Guest OS type.
6986 <note>
6987 If Guest Additions are not installed, this value will be
6988 the same as <link to="IMachine::OSTypeId"/>.
6989 </note>
6990 </desc>
6991 </attribute>
6992
6993 <attribute name="additionsActive" type="boolean" readonly="yes">
6994 <desc>
6995 Flag whether the Guest Additions are installed and active
6996 in which case their version will be returned by the
6997 <link to="#additionsVersion"/> property.
6998 </desc>
6999 </attribute>
7000
7001 <attribute name="additionsVersion" type="wstring" readonly="yes">
7002 <desc>
7003 Version of the Guest Additions (3 decimal numbers separated
7004 by dots) or empty when the Additions are not installed. The
7005 Additions may also report a version but yet not be active as
7006 the version might be refused by VirtualBox (incompatible) or
7007 other failures occurred.
7008 </desc>
7009 </attribute>
7010
7011 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7012 <desc>
7013 Flag whether seamless guest display rendering (seamless desktop
7014 integration) is supported.
7015 </desc>
7016 </attribute>
7017
7018 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7019 <desc>
7020 Flag whether the guest is in graphics mode. If it is not, then
7021 seamless rendering will not work, resize hints are not immediately
7022 acted on and guest display resizes are probably not initiated by
7023 the guest additions.
7024 </desc>
7025 </attribute>
7026
7027 <attribute name="memoryBalloonSize" type="unsigned long">
7028 <desc>Guest system memory balloon size in megabytes.</desc>
7029 </attribute>
7030
7031 <attribute name="statisticsUpdateInterval" type="unsigned long">
7032 <desc>Interval to update guest statistics in seconds.</desc>
7033 </attribute>
7034
7035 <method name="setCredentials">
7036 <desc>
7037 Store login credentials that can be queried by guest operating
7038 systems with Additions installed. The credentials are transient
7039 to the session and the guest may also choose to erase them. Note
7040 that the caller cannot determine whether the guest operating system
7041 has queried or made use of the credentials.
7042
7043 <result name="VBOX_E_VM_ERROR">
7044 VMM device is not available.
7045 </result>
7046
7047 </desc>
7048 <param name="userName" type="wstring" dir="in">
7049 <desc>User name string, can be empty</desc>
7050 </param>
7051 <param name="password" type="wstring" dir="in">
7052 <desc>Password string, can be empty</desc>
7053 </param>
7054 <param name="domain" type="wstring" dir="in">
7055 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7056 </param>
7057 <param name="allowInteractiveLogon" type="boolean" dir="in">
7058 <desc>
7059 Flag whether the guest should alternatively allow the user to
7060 interactively specify different credentials. This flag might
7061 not be supported by all versions of the Additions.
7062 </desc>
7063 </param>
7064 </method>
7065
7066 <method name="getStatistic">
7067 <desc>
7068 Query specified guest statistics as reported by the VirtualBox Additions.
7069 </desc>
7070 <param name="cpuId" type="unsigned long" dir="in">
7071 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7072 </param>
7073 <param name="statistic" type="GuestStatisticType" dir="in">
7074 <desc>Statistic type.</desc>
7075 </param>
7076 <param name="statVal" type="unsigned long" dir="out">
7077 <desc>Statistics value</desc>
7078 </param>
7079 </method>
7080
7081 </interface>
7082
7083
7084 <!--
7085 // IProgress
7086 /////////////////////////////////////////////////////////////////////////
7087 -->
7088
7089 <enumerator
7090 name="IProgressEnumerator" type="IProgress"
7091 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
7092 />
7093
7094 <collection
7095 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
7096 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
7097 readonly="yes"
7098 />
7099
7100 <interface
7101 name="IProgress" extends="$unknown"
7102 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
7103 wsmap="managed"
7104 >
7105 <desc>
7106 The IProgress interface represents a task progress object that allows
7107 to wait for the completion of some asynchronous task.
7108
7109 The task consists of one or more operations that run sequentially,
7110 one after one. There is an individual percent of completion of the
7111 current operation and the percent of completion of the task as a
7112 whole. Similarly, you can wait for the completion of a particular
7113 operation or for the completion of the whole task.
7114
7115 Every operation is identified by a number (starting from 0)
7116 and has a separate description.
7117 </desc>
7118
7119 <attribute name="id" type="uuid" readonly="yes">
7120 <desc>ID of the task.</desc>
7121 </attribute>
7122
7123 <attribute name="description" type="wstring" readonly="yes">
7124 <desc>Description of the task.</desc>
7125 </attribute>
7126
7127 <attribute name="initiator" type="$unknown" readonly="yes">
7128 <desc>Initiator of the task.</desc>
7129 </attribute>
7130
7131 <attribute name="cancelable" type="boolean" readonly="yes">
7132 <desc>Whether the task can be interrupted.</desc>
7133 </attribute>
7134
7135 <attribute name="percent" type="long" readonly="yes">
7136 <desc>
7137 Current task progress value in percent.
7138 This value depends on how many operations are already complete.
7139 </desc>
7140 </attribute>
7141
7142 <attribute name="completed" type="boolean" readonly="yes">
7143 <desc>Whether the task has been completed.</desc>
7144 </attribute>
7145
7146 <attribute name="canceled" type="boolean" readonly="yes">
7147 <desc>Whether the task has been canceled.</desc>
7148 </attribute>
7149
7150 <attribute name="resultCode" type="result" readonly="yes">
7151 <desc>
7152 Result code of the progress task.
7153 Valid only if <link to="#completed"/> is true.
7154 </desc>
7155 </attribute>
7156
7157 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7158 <desc>
7159 Extended information about the unsuccessful result of the
7160 progress operation. May be NULL when no extended information
7161 is available.
7162 Valid only if <link to="#completed"/> is true and
7163 <link to="#resultCode"/> indicates a failure.
7164 </desc>
7165 </attribute>
7166
7167 <attribute name="operationCount" type="unsigned long" readonly="yes">
7168 <desc>
7169 Number of operations this task is divided into.
7170 Every task consists of at least one operation.
7171 </desc>
7172 </attribute>
7173
7174 <attribute name="operation" type="unsigned long" readonly="yes">
7175 <desc>Number of the operation being currently executed.</desc>
7176 </attribute>
7177
7178 <attribute name="operationDescription" type="wstring" readonly="yes">
7179 <desc>
7180 Description of the operation being currently executed.
7181 </desc>
7182 </attribute>
7183
7184 <attribute name="operationPercent" type="long" readonly="yes">
7185 <desc>Current operation progress value in percent.</desc>
7186 </attribute>
7187
7188 <method name="waitForCompletion">
7189 <desc>
7190 Waits until the task is done (including all operations) with a
7191 given timeout.
7192
7193 <result name="VBOX_E_IPRT_ERROR">
7194 Failed to wait for task completion.
7195 </result>
7196
7197 </desc>
7198 <param name="timeout" type="long" dir="in">
7199 <desc>
7200 Timeout value in milliseconds.
7201 Specify -1 for an indefinite wait.
7202 </desc>
7203 </param>
7204 </method>
7205
7206 <method name="waitForOperationCompletion">
7207 <desc>
7208 Waits until the given operation is done with a given timeout.
7209
7210 <result name="VBOX_E_IPRT_ERROR">
7211 Failed to wait for operation completion.
7212 </result>
7213
7214 </desc>
7215 <param name="operation" type="unsigned long" dir="in">
7216 <desc>
7217 Number of the operation to wait for.
7218 Must be less than <link to="#operationCount"/>.
7219 </desc>
7220 </param>
7221 <param name="timeout" type="long" dir="in">
7222 <desc>
7223 Timeout value in milliseconds.
7224 Specify -1 for an indefinite wait.
7225 </desc>
7226 </param>
7227 </method>
7228
7229 <method name="cancel">
7230 <desc>
7231 Cancels the task.
7232 <note>
7233 If <link to="#cancelable"/> is <tt>false</tt>, then
7234 this method will fail.
7235 </note>
7236
7237 <result name="VBOX_E_INVALID_OBJECT_STATE">
7238 Operation cannot be canceled.
7239 </result>
7240
7241 </desc>
7242 </method>
7243
7244 </interface>
7245
7246
7247 <!--
7248 // ISnapshot
7249 /////////////////////////////////////////////////////////////////////////
7250 -->
7251
7252 <enumerator
7253 name="ISnapshotEnumerator" type="ISnapshot"
7254 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
7255 />
7256
7257 <collection
7258 name="ISnapshotCollection" type="ISnapshot"
7259 enumerator="ISnapshotEnumerator"
7260 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
7261 readonly="yes"
7262 />
7263
7264 <interface
7265 name="ISnapshot" extends="$unknown"
7266 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
7267 wsmap="managed"
7268 >
7269 <desc>
7270 The ISnapshot interface represents a snapshot of the virtual
7271 machine.
7272
7273 The <i>snapshot</i> stores all the information about a virtual
7274 machine necessary to bring it to exactly the same state as it was at
7275 the time of taking the snapshot. The snapshot includes:
7276
7277 <ul>
7278 <li>all settings of the virtual machine (i.e. its hardware
7279 configuration: RAM size, attached hard disks, etc.)
7280 </li>
7281 <li>the execution state of the virtual machine (memory contents,
7282 CPU state, etc.).
7283 </li>
7284 </ul>
7285
7286 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7287 or <i>online</i> (taken when the VM is running). The execution
7288 state of the offline snapshot is called a <i>zero execution state</i>
7289 (it doesn't actually contain any information about memory contents
7290 or the CPU state, assuming that all hardware is just powered off).
7291
7292 <h3>Snapshot branches</h3>
7293
7294 Snapshots can be chained. Chained snapshots form a branch where
7295 every next snapshot is based on the previous one. This chaining is
7296 mostly related to hard disk branching (see <link to="IHardDisk2"/>
7297 description). This means that every time a new snapshot is created,
7298 a new differencing hard disk is implicitly created for all normal
7299 hard disks attached to the given virtual machine. This allows to
7300 fully restore hard disk contents when the machine is later reverted
7301 to a particular snapshot.
7302
7303 In the current implementation, multiple snapshot branches within one
7304 virtual machine are not allowed. Every machine has a single branch,
7305 and <link to="IConsole::takeSnapshot()"/> operation adds a new
7306 snapshot to the top of that branch.
7307
7308 Existing snapshots can be discarded using
7309 <link to="IConsole::discardSnapshot()"/>.
7310
7311 <h3>Current snapshot</h3>
7312
7313 Every virtual machine has a current snapshot, identified by
7314 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
7315 a base for the <i>current machine state</i> (see below), to the effect
7316 that all normal hard disks of the machine and its execution
7317 state are based on this snapshot.
7318
7319 In the current implementation, the current snapshot is always the
7320 last taken snapshot (i.e. the head snapshot on the branch) and it
7321 cannot be changed.
7322
7323 The current snapshot is <tt>null</tt> if the machine doesn't have
7324 snapshots at all; in this case the current machine state is just
7325 current settings of this machine plus its current execution state.
7326
7327 <h3>Current machine state</h3>
7328
7329 The current machine state is what represented by IMachine instances got
7330 directly from IVirtualBox
7331 using <link
7332 to="IVirtualBox::getMachine()">getMachine()</link>, <link
7333 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
7334 to instances returned by <link to="ISnapshot::machine"/>). This state
7335 is always used when the machine is <link to="IConsole::powerUp"> powered
7336 on</link>.
7337
7338 The current machine state also includes the current execution state.
7339 If the machine is being currently executed
7340 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
7341 and above), its execution state is just what's happening now.
7342 If it is powered off (<link to="MachineState_PoweredOff"/> or
7343 <link to="MachineState_Aborted"/>), it has a zero execution state.
7344 If the machine is saved (<link to="MachineState_Saved"/>), its
7345 execution state is what saved in the execution state file
7346 (<link to="IMachine::stateFilePath"/>).
7347
7348 If the machine is in the saved state, then, next time it is powered
7349 on, its execution state will be fully restored from the saved state
7350 file and the execution will continue from the point where the state
7351 was saved.
7352
7353 Similarly to snapshots, the current machine state can be discarded
7354 using <link to="IConsole::discardCurrentState()"/>.
7355
7356 <h3>Taking and discarding snapshots</h3>
7357
7358 The table below briefly explains the meaning of every snapshot
7359 operation:
7360
7361 <table>
7362 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7363
7364 <tr><td><link to="IConsole::takeSnapshot()"/></td>
7365
7366 <td>Save the current state of the virtual machine, including all
7367 settings, contents of normal hard disks and the current modifications
7368 to immutable hard disks (for online snapshots)</td>
7369
7370 <td>The current state is not changed (the machine will continue
7371 execution if it is being executed when the snapshot is
7372 taken)</td></tr>
7373
7374 <tr><td><link to="IConsole::discardSnapshot()"/></td>
7375
7376 <td>Forget the state of the virtual machine stored in the snapshot:
7377 dismiss all saved settings and delete the saved execution state (for
7378 online snapshots)</td>
7379
7380 <td>Other snapshots (including child snapshots, if any) and the
7381 current state are not directly affected</td></tr>
7382
7383 <tr><td><link to="IConsole::discardCurrentState()"/></td>
7384
7385 <td>Restore the current state of the virtual machine from the state
7386 stored in the current snapshot, including all settings and hard disk
7387 contents</td>
7388
7389 <td>The current state of the machine existed prior to this operation
7390 is lost</td></tr>
7391
7392 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
7393
7394 <td>Completely revert the virtual machine to the state it was in
7395 before the current snapshot has been taken</td>
7396
7397 <td>The current state, as well as the current snapshot, are
7398 lost</td></tr>
7399
7400 </table>
7401
7402 </desc>
7403
7404 <attribute name="id" type="uuid" readonly="yes">
7405 <desc>UUID of the snapshot.</desc>
7406 </attribute>
7407
7408 <attribute name="name" type="wstring">
7409 <desc>Short name of the snapshot.</desc>
7410 </attribute>
7411
7412 <attribute name="description" type="wstring">
7413 <desc>Optional description of the snapshot.</desc>
7414 </attribute>
7415
7416 <attribute name="timeStamp" type="long long" readonly="yes">
7417 <desc>
7418 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7419 </desc>
7420 </attribute>
7421
7422 <attribute name="online" type="boolean" readonly="yes">
7423 <desc>
7424 <tt>true</tt> if this snapshot is an online snapshot and
7425 <tt>false</tt> otherwise.
7426
7427 <note>
7428 When this attribute is <tt>true</tt>, the
7429 <link to="IMachine::stateFilePath"/> attribute of the
7430 <link to="#machine"/> object associated with this snapshot
7431 will point to the saved state file. Otherwise, it will be
7432 <tt>null</tt>.
7433 </note>
7434 </desc>
7435 </attribute>
7436
7437 <attribute name="machine" type="IMachine" readonly="yes">
7438 <desc>
7439 Virtual machine this snapshot is taken on. This object
7440 stores all settings the machine had when taking this snapshot.
7441 <note>
7442 The returned machine object is immutable, i.e. no
7443 any settings can be changed.
7444 </note>
7445 </desc>
7446 </attribute>
7447
7448 <attribute name="parent" type="ISnapshot" readonly="yes">
7449 <desc>
7450 Parent snapshot (a snapshot this one is based on).
7451 <note>
7452 It's not an error to read this attribute on a snapshot
7453 that doesn't have a parent -- a null object will be
7454 returned to indicate this.
7455 </note>
7456 </desc>
7457 </attribute>
7458
7459 <attribute name="children" type="ISnapshotCollection" readonly="yes">
7460 <desc>
7461 Child snapshots (all snapshots having this one as a parent).
7462 <note>
7463 In the current implementation, there can be only one
7464 child snapshot, or no children at all, meaning this is the
7465 last (head) snapshot.
7466 </note>
7467 </desc>
7468 </attribute>
7469
7470 </interface>
7471
7472
7473 <!--
7474 // IMedia
7475 /////////////////////////////////////////////////////////////////////////
7476 -->
7477
7478 <enum
7479 name="MediaState"
7480 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
7481 >
7482 <desc>
7483 Virtual media state.
7484 <see>IMedia</see>
7485 </desc>
7486
7487 <const name="NotCreated" value="0">
7488 <desc>
7489 Associated media storage does not exist (either was not created yet or
7490 was deleted).
7491 </desc>
7492 </const>
7493 <const name="Created" value="1">
7494 <desc>
7495 Associated storage exists and accessible.
7496 </desc>
7497 </const>
7498 <const name="LockedRead" value="2">
7499 <desc>
7500 Media is locked for reading, no data modification is possible.
7501 </desc>
7502 </const>
7503 <const name="LockedWrite" value="3">
7504 <desc>
7505 Media is locked for writing, no concurrent data reading or modification
7506 is possible.
7507 </desc>
7508 </const>
7509 <const name="Inaccessible" value="4">
7510 <desc>
7511 Associated media storage is not accessible.
7512 </desc>
7513 </const>
7514 <const name="Creating" value="5">
7515 <desc>
7516 Associated media storage is being created.
7517 </desc>
7518 </const>
7519 <const name="Deleting" value="6">
7520 <desc>
7521 Associated media storage is being deleted.
7522 </desc>
7523 </const>
7524 </enum>
7525
7526 <interface
7527 name="IMedium" extends="$unknown"
7528 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
7529 wsmap="managed"
7530 >
7531 <desc>
7532 The IMedium interface is a common interface for all objects representing
7533 virtual media such as hard disks, DVD images.
7534
7535 Each medium is associated with a storage unit (such as a file on the host
7536 computer or a network resource) that holds actual data. The location of
7537 the storage unit is represented by the #location attribute. The value of
7538 this attribute is media type dependent.
7539
7540 The exact media type may be determined by querying the appropriate
7541 interface such as:
7542 <ul>
7543 <li>IHardDisk2 (virtual hard disks)</li>
7544 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
7545 <li>IFloppyImage2 (raw floppy image files)</li>
7546 </ul>
7547
7548 Existing media are opened using the following methods, depending on the
7549 media type:
7550 <ul>
7551 <li><link to="IVirtualBox::openHardDisk2()"/></li>
7552 <li><link to="IVirtualBox::openDVDImage()"/></li>
7553 <li><link to="IVirtualBox::openFloppyImage()"/></li>
7554 </ul>
7555
7556 New hard disk media are created using the
7557 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
7558 images are created outside VirtualBox, usually by storing a copy
7559 of the real medium of the corresponding type in a regular file.
7560
7561 <h3>Known Media</h3>
7562
7563 When an existing medium gets opened for the first time, it gets
7564 automatically remembered by the given VirtualBox installation or, in other
7565 words, becomes a <i>known medium</i>. Known media are stored in the media
7566 registry transparently maintained by VirtualBox and stored in settings
7567 files so that this registry is preserved when VirtualBox is not running.
7568
7569 Newly created virtual hard disks get remembered only when the associated
7570 storage unit is actually created (see IHardDisk2 for more details).
7571
7572 All known media can be enumerated using
7573 <link to="IVirtualBox::hardDisks2"/>,
7574 <link to="IVirtualBox::DVDImages"/> and
7575 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
7576 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
7577 and similar methods or by location using
7578 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
7579
7580 Only known media can be attached to virtual machines.
7581
7582 Removing known media from the media registry is performed when the given
7583 medium is closed using the <link to="#close()"/> method or when its
7584 associated storage unit is deleted (only for hard disks).
7585
7586 <h3>Accessibility Checks</h3>
7587
7588 The given medium (with the created storage unit) is considered to be
7589 <i>accessible</i> when its storage unit can be successfully read from.
7590 Accessible media are indicated by the <link to="MediaState_Created"/>
7591 value of the <link to="#state"/> attribute. When the storage unit cannot
7592 be read (for example, because it is located on a disconnected network
7593 resource, or was accidentally deleted outside VirtualBox), the medium is
7594 considered to be <i>inaccessible</i> which is indicated by the
7595 <link to="MediaState_Inaccessible"/> state. The details about the reason
7596 of being inaccessible can be obtained using the
7597 <link to="#lastAccessError"/> attribute.
7598
7599 A new accessibility check is performed each time the <link to="#state"/>
7600 attribute is read. Please note that this check may take long time (several
7601 seconds or even minutes, depending on the storage unit location and
7602 format), and will block the calling thread until finished. For this
7603 reason, it is recommended to never read this attribute on the main UI
7604 thread to avoid making the UI unresponsive.
7605
7606 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
7607 created for the first time), all known media are in the
7608 <link to="MediaState_Inaccessible"/> state but the value of the <link
7609 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
7610 accessibility check is made on startup. This is done to make the
7611 VirtualBox object ready for serving requests as
7612 fast as possible and let the end-user application decide if it needs to
7613 check media accessibility right away or not.
7614 </desc>
7615
7616 <attribute name="id" type="uuid" readonly="yes">
7617 <desc>
7618 UUID of the medium. For a newly created medium, this value is a randomly
7619 generated UUID.
7620
7621 <note>
7622 For media in one of MediaState_NotCreated, MediaState_Creating or
7623 MediaState_Deleting states, the value of this property is undefined
7624 and will most likely be an empty UUID.
7625 </note>
7626 </desc>
7627 </attribute>
7628
7629 <attribute name="description" type="wstring">
7630 <desc>
7631 Optional description of the medium. For newly created media, the value
7632 of this attribute value is <tt>null</tt>.
7633
7634 Media types that don't support this attribute will return E_NOTIMPL in
7635 attempt to get or set this attribute's value.
7636
7637 <note>
7638 For some storage types, reading this attribute may return an outdated
7639 (last known) value when <link to="#state"/> is <link
7640 to="MediaState_Inaccessible"/> or <link
7641 to="MediaState_LockedWrite"/> because the value of this attribute is
7642 stored within the storage unit itself. Also note that changing the
7643 attribute value is not possible in such case, as well as when the
7644 medium is the <link to="MediaState_LockedRead"/> state.
7645 </note>
7646 </desc>
7647 </attribute>
7648
7649 <attribute name="state" type="MediaState" readonly="yes">
7650 <desc>
7651 Current media state. Inspect <link to="MediaState"/> values for details.
7652
7653 Reading this attribute may take long time because a new accessibility
7654 check of the storage unit is performed every time the attribute is read.
7655 This check may cause a significant delay if the storage unit of the
7656 given medium is, for example, a file located on a network share which is
7657 not currently accessible due to connectivity problems -- the call will
7658 not return until a timeout interval defined by the host OS for this
7659 operation expires.
7660
7661 If the last known state of the medium is <link to="MediaState_Created"/>
7662 and the accessibility check fails then the state would be set to
7663 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
7664 may be used to get more details about the failure. If the state of the
7665 medium is <link to="MediaState_LockedRead"/> or
7666 <link to="MediaState_LockedWrite"/> then it remains the same, and a
7667 non-null value of <link to="#lastAccessError"/> will indicate a failed
7668 accessibility check in this case.
7669
7670 Note that not all media states are applicable to certain media types.
7671 For example, states <link to="MediaState_NotCreated"/>,
7672 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
7673 <link to="MediaState_Deleting"/> are meaningless for IDVDImage2 and
7674 IFloppyImage2 media.
7675 </desc>
7676 </attribute>
7677
7678 <attribute name="location" type="wstring">
7679 <desc>
7680 Location of the storage unit holding media data.
7681
7682 The format of the location string is media type specific. For media
7683 types that use regular files in a host's file system, the location
7684 string is just a full file name.
7685
7686 Some media types may support changing the storage unit location by
7687 simply changing the value of this property. If this operation is not
7688 supported, the implementation will return E_NOTIMPL in attempt to set
7689 this attribute's value.
7690
7691 When setting a value of the location attribute which is a regular file
7692 in the host's file system, the given file name may be either relative to
7693 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
7694 absolute. Note that if the given location specification does not contain
7695 the file extension part then a proper default extension will be
7696 automatically appended by the implementation depending on the media type.
7697 </desc>
7698 </attribute>
7699
7700 <attribute name="name" type="wstring" readonly="yes">
7701 <desc>
7702 Name of the storage unit holding media data.
7703
7704 The returned string is a short version of the <link to="#location"/>
7705 attribute that is suitable for representing the medium in situations
7706 where the full location specification is too long (such as lists
7707 and comboboxes in GUI frontends). This string is also used by frontends
7708 to sort the media list alphabetically when needed.
7709
7710 For example, for locations that are regular files in the host's file
7711 system, the value of this attribute is just a file name (+ extension),
7712 without the path specification.
7713
7714 Note that as opposed to the <link to="#location"/> attribute, the name
7715 attribute will not necessary be unique for a list of media of the
7716 given type and format.
7717 </desc>
7718 </attribute>
7719
7720 <attribute name="size" type="unsigned long long" readonly="yes">
7721 <desc>
7722 Physical size of the storage unit used to hold media data (in bytes).
7723
7724 <note>
7725 For media whose <link to="#state"/> is <link
7726 to="MediaState_Inaccessible"/>, the value of this property is the
7727 last known size. For <link to="MediaState_NotCreated"/> media,
7728 the returned value is zero.
7729 </note>
7730 </desc>
7731 </attribute>
7732
7733 <attribute name="lastAccessError" type="wstring" readonly="yes">
7734 <desc>
7735 Text message that represents the result of the last accessibility
7736 check.
7737
7738 Accessibility checks are performed each time the <link to="#state"/>
7739 attribute is read. A @c null string is returned if the last
7740 accessibility check was successful. A non-null string indicates a
7741 failure and should normally describe a reason of the failure (for
7742 example, a file read error).
7743 </desc>
7744 </attribute>
7745
7746 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
7747 <desc>
7748 Array of UUIDs of all machines this medium is attached to.
7749
7750 A <tt>null</tt> array is returned if this medium is not attached to any
7751 machine or to any machine's snapshot.
7752
7753 <note>
7754 The returned array will include a machine even if this medium is not
7755 attached to that machine in the current state but attached to it in
7756 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
7757 details.
7758 </note>
7759 </desc>
7760 </attribute>
7761
7762 <method name="getSnapshotIds">
7763 <desc>
7764 Returns an array of UUIDs of all snapshots of the given machine where
7765 this medium is attached to it.
7766
7767 If the medium is attached to the machine in the current state, then the
7768 first element in the array will always be the ID of the queried machine
7769 (i.e. the value equal to the @c machineId argument), followed by
7770 snapshot IDs (if any).
7771
7772 If the medium is not attached to the machine in the current state, then
7773 the array will contain only snapshot IDs.
7774
7775 The returned array may be <tt>null</tt> if this medium is not attached
7776 to the given machine at all, neither in the current state nor in one of
7777 snapshots.
7778 </desc>
7779 <param name="machineId" type="uuid" dir="in">
7780 <desc>
7781 UUID of the machine to query.
7782 </desc>
7783 </param>
7784 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
7785 <desc>
7786 Array of snapshot UUIDs of the given machine using this medium.
7787 </desc>
7788 </param>
7789 </method>
7790
7791 <method name="lockRead">
7792 <desc>
7793 Locks this medium for reading.
7794
7795 The read lock is shared: many clients can simultaneously lock the
7796 same media for reading unless it is already locked for writing (see
7797 <link to="#lockWrite()"/>) in which case an error is returned.
7798
7799 When the medium is locked for reading, it cannot be modified
7800 from within VirtualBox. This means that any method that changes
7801 the properties of this medium or contents of the storage unit
7802 will return an error (unless explicitly stated otherwise) and
7803 that an attempt to start a virtual machine that wants to modify
7804 the medium will also fail.
7805
7806 When the virtual machine is started up, it locks for reading all
7807 media it uses in read-only mode. If some media cannot be locked
7808 for reading, the startup procedure will fail.
7809
7810 The medium locked for reading must be unlocked using the <link
7811 to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/>
7812 can be nested and must be followed by the same number of paired
7813 <link to="#unlockRead()"/> calls.
7814
7815 This method sets the media state to <link
7816 to="MediaState_LockedRead"/> on success. The state prior to
7817 this call must be <link to="MediaState_Created"/>, <link
7818 to="MediaState_Inaccessible"/> or <link
7819 to="MediaState_LockedRead"/>. As you can see, inaccessible
7820 media can be locked too. This is not an error; this method
7821 performs a logical lock that prevents modifications of this
7822 media through the VirtualBox API, not a physical lock of the
7823 underlying storage unit.
7824
7825 This method returns the current state of the medium
7826 <b>before</b> the operation.
7827
7828 <result name="VBOX_E_INVALID_OBJECT_STATE">
7829 Invalid media state (e.g. not created, locked, inaccessible,
7830 creating, deleting).
7831 </result>
7832
7833 </desc>
7834 <param name="state" type="MediaState" dir="return">
7835 <desc>
7836 State of the medium after the operation.
7837 </desc>
7838 </param>
7839 </method>
7840
7841 <method name="unlockRead">
7842 <desc>
7843 Cancels the read lock previously set by <link to="#lockRead()"/>.
7844
7845 Either on success or on failure, this method returns the current state
7846 of the medium <b>after</b> the operation.
7847
7848 See <link to="#lockRead()"/> for more details.
7849
7850 <result name="VBOX_E_INVALID_OBJECT_STATE">
7851 Medium not locked for reading.
7852 </result>
7853
7854 </desc>
7855 <param name="state" type="MediaState" dir="return">
7856 <desc>
7857 State of the medium after the operation.
7858 </desc>
7859 </param>
7860 </method>
7861
7862 <method name="lockWrite">
7863 <desc>
7864 Locks this medium for writing.
7865
7866 The write lock, as opposed to <link to="#lockRead()"/>, is
7867 exclusive: there may be only one client that holds a write lock
7868 and there may be no read locks while the write lock is held.
7869
7870 When the medium is locked for writing, it cannot be modified
7871 from within VirtualBox and it is not guaranteed that the values
7872 of its properties are up-to-date. Any method that changes the
7873 properties of this medium or contents of the storage unit will
7874 return an error ((unless explicitly stated otherwise) and an
7875 attempt to start a virtual machine that wants to modify or to
7876 read the medium will also fail.
7877
7878 When the virtual machine is started up, it locks for writing all
7879 media it uses to write data to. If some media cannot be locked
7880 for writing, the startup procedure will fail.
7881
7882 The medium locked for writing must be unlocked using the <link
7883 to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
7884 can <b>not</b> be nested and must be followed by a paired <link
7885 to="#unlockWrite()"/> call.
7886
7887 This method sets the media state to <link
7888 to="MediaState_LockedWrite"/> on success. The state prior to
7889 this call must be <link to="MediaState_Created"/> or <link
7890 to="MediaState_Inaccessible"/>. As you can see, inaccessible
7891 media can be locked too. This is not an error; this method
7892 performs a logical lock that prevents modifications of this
7893 media through the VirtualBox API, not a physical lock of the
7894 underlying storage unit.
7895
7896 Either on success or on failure, this method returns the current
7897 state of the medium <b>before</b> the operation.
7898
7899 <result name="VBOX_E_INVALID_OBJECT_STATE">
7900 Invalid media state (e.g. not created, locked, inaccessible,
7901 creating, deleting).
7902 </result>
7903
7904 </desc>
7905 <param name="state" type="MediaState" dir="return">
7906 <desc>
7907 State of the medium after the operation.
7908 </desc>
7909 </param>
7910 </method>
7911
7912 <method name="unlockWrite">
7913 <desc>
7914 Cancels the write lock previously set by <link to="#lockWrite()"/>.
7915
7916 Either on success or on failure, this method returns the current
7917 state of the medium <b>after</b> the operation.
7918
7919 See <link to="#lockWrite()"/> for more details.
7920
7921 <result name="VBOX_E_INVALID_OBJECT_STATE">
7922 Medium not locked for writing.
7923 </result>
7924
7925 </desc>
7926 <param name="state" type="MediaState" dir="return">
7927 <desc>
7928 State of the medium after the operation.
7929 </desc>
7930 </param>
7931 </method>
7932
7933 <method name="close">
7934 <desc>
7935 Closes this medium.
7936
7937 The hard disk must not be attached to any known virtual machine
7938 and must not have any known child hard disks, otherwise the
7939 operation will fail.
7940
7941 When the hard disk is successfully closed, it gets removed from
7942 the list of remembered hard disks, but its storage unit is not
7943 deleted. In particular, this means that this hard disk can be
7944 later opened again using the <link
7945 to="IVirtualBox::openHardDisk2"/> call.
7946
7947 Note that after this method successfully returns, the given hard
7948 disk object becomes uninitialized. This means that any attempt
7949 to call any of its methods or attributes will fail with the
7950 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
7951
7952 <result name="VBOX_E_INVALID_OBJECT_STATE">
7953 Invalid media state (other than not created, created or
7954 inaccessible).
7955 </result>
7956 <result name="VBOX_E_OBJECT_IN_USE">
7957 Medium attached to virtual machine.
7958 </result>
7959 <result name="VBOX_E_FILE_ERROR">
7960 Settings file not accessible.
7961 </result>
7962 <result name="VBOX_E_XML_ERROR">
7963 Could not parse the settings file.
7964 </result>
7965
7966 </desc>
7967 </method>
7968
7969 </interface>
7970
7971
7972 <!--
7973 // IHardDisk2
7974 /////////////////////////////////////////////////////////////////////////
7975 -->
7976
7977 <enum
7978 name="HardDiskType"
7979 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
7980 >
7981 <desc>
7982 Virtual hard disk type.
7983 <see>IHardDisk</see>
7984 </desc>
7985
7986 <const name="Normal" value="0">
7987 <desc>
7988 Normal hard disk (attached directly or indirectly, preserved
7989 when taking snapshots).
7990 </desc>
7991 </const>
7992 <const name="Immutable" value="1">
7993 <desc>
7994 Immutable hard disk (attached indirectly, changes are wiped out
7995 after powering off the virtual machine).
7996 </desc>
7997 </const>
7998 <const name="Writethrough" value="2">
7999 <desc>
8000 Write through hard disk (attached directly, ignored when
8001 taking snapshots).
8002 </desc>
8003 </const>
8004 </enum>
8005
8006 <interface
8007 name="IHardDisk2Attachment" extends="$unknown"
8008 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
8009 wsmap="struct"
8010 >
8011 <desc>
8012 The IHardDisk2Attachment interface represents a hard disk attachment of a
8013 virtual machine.
8014
8015 Every hard disk attachment specifies a slot of the virtual hard disk
8016 controller and a virtual hard disk attached to this slot.
8017
8018 The array of hard disk attachments is returned by
8019 <link to="IMachine::hardDisk2Attachments"/>.
8020
8021 <note>
8022 With the COM API, this is an interface like all the others. With the
8023 webservice, this is mapped to a structure, so querying the attribute
8024 will not return an object, but a complete structure.
8025 </note>
8026 </desc>
8027 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
8028 <desc>Hard disk object associated with this attachment.</desc>
8029 </attribute>
8030
8031 <attribute name="bus" type="StorageBus" readonly="yes">
8032 <desc>Interface bus of this attachment.</desc>
8033 </attribute>
8034
8035 <attribute name="channel" type="long" readonly="yes">
8036 <desc>Channel number of this attachment.</desc>
8037 </attribute>
8038
8039 <attribute name="device" type="long" readonly="yes">
8040 <desc>Device slot number of this attachment.</desc>
8041 </attribute>
8042
8043 </interface>
8044
8045 <interface
8046 name="IHardDisk2" extends="IMedium"
8047 uuid="ed6e2525-c2fd-42a4-917a-7a9045ac9e15"
8048 wsmap="managed"
8049 >
8050 <desc>
8051 The IHardDisk2 interface represents a virtual hard disk drive
8052 used by a virtual machine.
8053
8054 Virtual hard disk objects virtualize the hard disk hardware and look like
8055 regular hard disks for the guest OS running inside the virtual machine.
8056
8057 <h3>Hard Disk Types</h3>
8058
8059 There are three types of hard disks:
8060 <link to="HardDiskType_Normal">Normal</link>,
8061 <link to="HardDiskType_Immutable">Immutable</link> and
8062 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8063 hard disk defines how the hard disk is attached to a virtual machine and
8064 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8065 machine with the attached hard disk is taken. The type of the hard disk is
8066 defined by the <link to="#type"/> attribute.
8067
8068 All hard disks can be also divided in two big groups: <i>base</i> hard
8069 disks and <i>differencing</i> hard disks. A base hard disk contains all
8070 sectors of the hard disk data in its storage unit and therefore can be
8071 used independently. On the contrary, a differencing hard disk contains
8072 only some part of the hard disk data (a subset of sectors) and needs
8073 another hard disk to get access to the missing sectors of data. This
8074 another hard disk is called a <i>parent</i> hard disk and defines a hard
8075 disk to which this differencing hard disk is known to be <i>linked to</i>.
8076 The parent hard disk may be itself a differencing hard disk. This
8077 way, differencing hard disks form a linked hard disk chain. This chain
8078 always ends with the base hard disk which is sometimes referred to as the
8079 root hard disk of this chain. Note that several differencing hard disks
8080 may be linked to the same parent hard disk. This way, all known hard disks
8081 form a hard disk tree which is based on their parent-child relationship.
8082
8083 Differencing hard disks can be distinguished from base hard disks by
8084 querying the <link to="#parent"/> attribute: base hard disks do not have
8085 parents they would depend on, so the value of this attribute is always
8086 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8087 the hard disk tree (from the child hard disk to its parent). It is also
8088 possible to walk down the tree using the <link to="#children"/>
8089 attribute.
8090
8091 Note that the type of all differencing hard disks is
8092 <link to="HardDiskType_Normal">Normal</link>; all other values are
8093 meaningless for them. Base hard disks may be of any type.
8094
8095 <h3>Creating Hard Disks</h3>
8096
8097 New base hard disks are created using
8098 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
8099 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
8100 disks are usually implicitly created by VirtualBox when needed but may
8101 also be created explicitly using <link to="#createDiffStorage()"/>.
8102
8103 After the hard disk is successfully created (including the storage unit)
8104 or opened, it becomes a known hard disk (remembered in the internal media
8105 registry). Known hard disks can be attached to a virtual machine, accessed
8106 through <link to="IVirtualBox::getHardDisk2()"/> and
8107 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
8108 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
8109
8110 The following methods, besides <link to="IMedium::close()"/>,
8111 automatically remove the hard disk from the media registry:
8112 <ul>
8113 <li><link to="#deleteStorage()"/></li>
8114 <li><link to="#mergeTo()"/></li>
8115 </ul>
8116
8117 If the storage unit of the hard disk is a regular file in the host's
8118 file system then the rules stated in the description of the
8119 <link to="IMedium::location"/> attribute apply when setting its value. In
8120 addition, a plain file name without any path may be given, in which case
8121 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8122 folder</link> will be prepended to it.
8123
8124 <h4>Automatic composition of the file name part</h4>
8125
8126 Another extension to the <link to="IMedium::location"/> attribute is that
8127 there is a possibility to cause VirtualBox to compose a unique value for
8128 the file name part of the location using the UUID of the hard disk. This
8129 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8130 e.g. before the storage unit is created, and works as follows. You set the
8131 value of the <link to="IMedium::location"/> attribute to a location
8132 specification which only contains the path specification but not the file
8133 name part and ends with either a forward slash or a backslash character.
8134 In response, VirtualBox will generate a new UUID for the hard disk and
8135 compose the file name using the following pattern:
8136 <pre>
8137 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8138 </pre>
8139 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8140 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8141 is the default extension for the storage format of this hard disk. After
8142 that, you may call any of the methods that create a new hard disk storage
8143 unit and they will use the generated UUID and file name.
8144
8145 <h3>Attaching Hard Disks</h3>
8146
8147 Hard disks are attached to virtual machines using the
8148 <link to="IMachine::attachHardDisk2()"/> method and detached using the
8149 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
8150 <link to="#type"/>, hard disks are attached either
8151 <i>directly</i> or <i>indirectly</i>.
8152
8153 When a hard disk is being attached directly, it is associated with the
8154 virtual machine and used for hard disk operations when the machine is
8155 running. When a hard disk is being attached indirectly, a new differencing
8156 hard disk linked to it is implicitly created and this differencing hard
8157 disk is associated with the machine and used for hard disk operations.
8158 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
8159 a direct attachment then the same hard disk will be returned in response
8160 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
8161 an indirect attachment is performed then
8162 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
8163 differencing hard disk, not the original one passed to <link
8164 to="IMachine::attachHardDisk2()"/>. The following table shows the
8165 dependency of the attachment type on the hard disk type:
8166
8167 <table>
8168 <tr>
8169 <th>Hard Disk Type</th>
8170 <th>Direct or Indirect?</th>
8171 </tr>
8172 <tr>
8173 <td>Normal (Base)</td>
8174 <td>
8175 Normal base hard disks that do not have children (i.e. differencing
8176 hard disks linked to them) and that are not already attached to
8177 virtual machines in snapshots are attached <b>directly</b>.
8178 Otherwise, they are attached <b>indirectly</b> because having
8179 dependent children or being part of the snapshot makes it impossible
8180 to modify hard disk contents without breaking the integrity of the
8181 dependent party. The <link to="#readOnly"/> attribute allows to
8182 quickly determine the kind of the attachment for the given hard
8183 disk. Note that if a normal base hard disk is to be indirectly
8184 attached to a virtual machine with snapshots then a special
8185 procedure called <i>smart attachment</i> is performed (see below).
8186 </td>
8187 </tr>
8188 <tr>
8189 <td>Normal (Differencing)</td>
8190 <td>
8191 Differencing hard disks are like normal base hard disks: attached
8192 <b>directly</b> if they do not have children and are not attached to
8193 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8194 that the smart attachment procedure is never performed for
8195 differencing hard disks.
8196 </td>
8197 </tr>
8198 <tr>
8199 <td>Immutable</td>
8200 <td>
8201 Immutable hard disks are always attached <b>indirectly</b> because
8202 they are designed to be non-writable. If an immutable hard disk is
8203 attached to a virtual machine with snapshots then a special
8204 procedure called smart attachment is performed (see below).
8205 </td>
8206 </tr>
8207 <tr>
8208 <td>Writethrough</td>
8209 <td>
8210 Writethrough hard disks are always attached <b>directly</b>, also as
8211 designed. This also means that writethrough hard disks cannot have
8212 other hard disks linked to them at all.
8213 </td>
8214 </tr>
8215 </table>
8216
8217 Note that the same hard disk, regardless of its type, may be attached to
8218 more than one virtual machine at a time. In this case, the machine that is
8219 started first gains exclusive access to the hard disk and attempts to
8220 start other machines having this hard disk attached will fail until the
8221 first machine is powered down.
8222
8223 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8224 that the given hard disk remains associated with the given machine after a
8225 successful <link to="IMachine::detachHardDisk2()"/> call until
8226 <link to="IMachine::saveSettings()"/> is called to save all changes to
8227 machine settings to disk. This deferring is necessary to guarantee that
8228 the hard disk configuration may be restored at any time by a call to
8229 <link to="IMachine::discardSettings()"/> before the settings
8230 are saved (committed).
8231
8232 Note that if <link to="IMachine::discardSettings()"/> is called after
8233 indirectly attaching some hard disks to the machine but before a call to
8234 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
8235 all differencing hard disks implicitly created by
8236 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
8237 Such implicitly created hard disks will also be immediately deleted when
8238 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
8239 call if it is made before <link to="IMachine::saveSettings()"/>. This
8240 implicit deletion is safe because newly created differencing hard
8241 disks do not contain any user data.
8242
8243 However, keep in mind that detaching differencing hard disks that were
8244 implicitly created by <link to="IMachine::attachHardDisk2()"/>
8245 before the last <link to="IMachine::saveSettings()"/> call will
8246 <b>not</b> implicitly delete them as they may already contain some data
8247 (for example, as a result of virtual machine execution). If these hard
8248 disks are no more necessary, the caller can always delete them explicitly
8249 using <link to="#deleteStorage()"/> after they are actually de-associated
8250 from this machine by the <link to="IMachine::saveSettings()"/> call.
8251
8252 <h3>Smart Attachment</h3>
8253
8254 When normal base or immutable hard disks are indirectly attached to a
8255 virtual machine then some additional steps are performed to make sure the
8256 virtual machine will have the most recent "view" of the hard disk being
8257 attached. These steps include walking through the machine's snapshots
8258 starting from the current one and going through ancestors up to the first
8259 snapshot. Hard disks attached to the virtual machine in all
8260 of the encountered snapshots are checked whether they are descendants of
8261 the given normal base or immutable hard disk. The first found child (which
8262 is the differencing hard disk) will be used instead of the normal base or
8263 immutable hard disk as a parent for creating a new differencing hard disk
8264 that will be actually attached to the machine. And only if no descendants
8265 are found or if the virtual machine does not have any snapshots then the
8266 normal base or immutable hard disk will be used itself as a parent for
8267 this differencing hard disk.
8268
8269 It is easier to explain what smart attachment does using the
8270 following example:
8271 <pre>
8272BEFORE attaching B.vdi: AFTER attaching B.vdi:
8273
8274Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8275 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8276 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8277 Snapshot 4 (none) Snapshot 4 (none)
8278 CurState (none) CurState (D3->D2.vdi)
8279
8280 NOT
8281 ...
8282 CurState (D3->B.vdi)
8283 </pre>
8284 The first column is the virtual machine configuration before the base hard
8285 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8286 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8287 mean that the hard disk that is actually attached to the machine is a
8288 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8289 another hard disk, <tt>B.vdi</tt>.
8290
8291 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8292 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8293 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8294 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8295 it cannot be attached directly and needs an indirect attachment (i.e.
8296 implicit creation of a new differencing hard disk). Due to the smart
8297 attachment procedure, the new differencing hard disk
8298 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8299 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8300 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8301 machine.
8302
8303 Note that if there is more than one descendant hard disk of the given base
8304 hard disk found in a snapshot, and there is an exact device, channel and
8305 bus match, then this exact match will be used. Otherwise, the youngest
8306 descendant will be picked up.
8307
8308 There is one more important aspect of the smart attachment procedure which
8309 is not related to snapshots at all. Before walking through the snapshots
8310 as described above, the backup copy of the current list of hard disk
8311 attachment is searched for descendants. This backup copy is created when
8312 the hard disk configuration is changed for the first time after the last
8313 <link to="IMachine::saveSettings()"/> call and used by
8314 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
8315 changes. When such a descendant is found in this backup copy, it will be
8316 simply re-attached back, without creating a new differencing hard disk for
8317 it. This optimization is necessary to make it possible to re-attach the
8318 base or immutable hard disk to a different bus, channel or device slot
8319 without losing the contents of the differencing hard disk actually
8320 attached to the machine in place of it.
8321 </desc>
8322
8323 <attribute name="format" type="wstring" readonly="yes">
8324 <desc>
8325 Storage format of this hard disk.
8326
8327 The value of this attribute is a string that specifies a backend used to
8328 store hard disk data. The storage format is defined when you create a
8329 new hard disk or automatically detected when you open an existing hard
8330 disk medium, and cannot be changed later.
8331
8332 The list of all storage formats supported by this VirtualBox
8333 installation can be obtained using
8334 <link to="ISystemProperties::hardDiskFormats"/>.
8335 </desc>
8336 </attribute>
8337
8338 <attribute name="type" type="HardDiskType">
8339 <desc>
8340 Type (role) of this hard disk.
8341
8342 The following constraints apply when changing the value of this
8343 attribute:
8344 <ul>
8345 <li>If a hard disk is attached to a virtual machine (either in the
8346 current state or in one of the snapshots), its type cannot be
8347 changed.
8348 </li>
8349 <li>As long as the hard disk has children, its type cannot be set
8350 to <link to="HardDiskType_Writethrough"/>.
8351 </li>
8352 <li>The type of all differencing hard disks is
8353 <link to="HardDiskType_Normal"/> and cannot be changed.
8354 </li>
8355 </ul>
8356
8357 The type of a newly created or opened hard disk is set to
8358 <link to="HardDiskType_Normal"/>.
8359 </desc>
8360 </attribute>
8361
8362 <attribute name="parent" type="IHardDisk2" readonly="yes">
8363 <desc>
8364 Parent of this hard disk (a hard disk this hard disk is directly based
8365 on).
8366
8367 Only differencing hard disks have parents. For base (non-differencing)
8368 hard disks, <tt>null</tt> is returned.
8369 </desc>
8370 </attribute>
8371
8372 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
8373 <desc>
8374 Children of this hard disk (all differencing hard disks directly based
8375 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8376 does not have any children.
8377 </desc>
8378 </attribute>
8379
8380 <attribute name="root" type="IHardDisk2" readonly="yes">
8381 <desc>
8382 Root hard disk of this hard disk.
8383
8384 If this is a differencing hard disk, its root hard disk is the base hard
8385 disk the given hard disk branch starts from. For all other types of hard
8386 disks, this property returns the hard disk object itself (i.e. the same
8387 object this property is read on).
8388 </desc>
8389 </attribute>
8390
8391 <attribute name="readOnly" type="boolean" readonly="yes">
8392 <desc>
8393 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8394 otherwise.
8395
8396 A hard disk is considered to be read-only when its contents cannot be
8397 modified without breaking the integrity of other parties that depend on
8398 this hard disk such as its child hard disks or snapshots of virtual
8399 machines where this hard disk is attached to these machines. If there
8400 are no children and no such snapshots then there is no dependency and
8401 the hard disk is not read-only.
8402
8403 The value of this attribute can be used to determine the kind of the
8404 attachment that will take place when attaching this hard disk to a
8405 virtual machine. If the value is <tt>false</tt> then the hard disk will
8406 be attached directly. If the value is <tt>true</tt> then the hard disk
8407 will be attached indirectly by creating a new differencing child hard
8408 disk for that. See the interface description for more information.
8409
8410 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8411 disks are always read-only while all
8412 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8413 always not.
8414
8415 <note>
8416 The read-only condition represented by this attribute is related to
8417 the hard disk type and usage, not to the current
8418 <link to="IMedium::state">media state</link> and not to the read-only
8419 state of the storage unit.
8420 </note>
8421 </desc>
8422 </attribute>
8423
8424 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8425 <desc>
8426 Logical size of this hard disk (in megabytes), as reported to the
8427 guest OS running inside the virtual machine this disk is
8428 attached to. The logical size is defined when the hard disk is created
8429 and cannot be changed later.
8430
8431 <note>
8432 Reading this property on a differencing hard disk will return the size
8433 of its <link to="#root"/> hard disk.
8434 </note>
8435 <note>
8436 For hard disks whose state is <link to="#state"/> is <link
8437 to="MediaState_Inaccessible"/>, the value of this property is the
8438 last known logical size. For <link to="MediaState_NotCreated"/> hard
8439 disks, the returned value is zero.
8440 </note>
8441 </desc>
8442 </attribute>
8443
8444 <!-- storage methods -->
8445
8446 <method name="getProperty">
8447 <desc>
8448 Returns the value of the custom hard disk property with the given name.
8449
8450 The list of all properties supported by the given hard disk format can
8451 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8452
8453 Note that if this method returns a <tt>null</tt> @a value, the requested
8454 property is supported but currently not assigned any value.
8455
8456 <result name="VBOX_E_OBJECT_NOT_FOUND">
8457 Requested property does not exist (not supported by the format).
8458 </result>
8459 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8460 </desc>
8461 <param name="name" type="wstring" dir="in">
8462 <desc>Name of the property to get.</desc>
8463 </param>
8464 <param name="value" type="wstring" dir="return">
8465 <desc>Current property value.</desc>
8466 </param>
8467 </method>
8468
8469 <method name="setProperty">
8470 <desc>
8471 Sets the value of the custom hard disk property with the given name.
8472
8473 The list of all properties supported by the given hard disk format can
8474 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8475
8476 Note that setting the property value to <tt>null</tt> is equivalent to
8477 deleting the existing value. A default value (if it is defined for this
8478 property) will be used by the format backend in this case.
8479
8480 <result name="VBOX_E_OBJECT_NOT_FOUND">
8481 Requested property does not exist (not supported by the format).
8482 </result>
8483 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8484 </desc>
8485 <param name="name" type="wstring" dir="in">
8486 <desc>Name of the property to set.</desc>
8487 </param>
8488 <param name="value" type="wstring" dir="in">
8489 <desc>Property value to set.</desc>
8490 </param>
8491 </method>
8492
8493 <method name="getProperties">
8494 <desc>
8495 Returns values for a group of properties in one call.
8496
8497 The names of the properties to get are specified using the @a names
8498 argument which is a list of comma-separated property names or
8499 <tt>null</tt> if all properties are to be returned. Note that currently
8500 the value of this argument is ignored and the method always returns all
8501 existing properties.
8502
8503 The list of all properties supported by the given hard disk format can
8504 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8505
8506 The method returns two arrays, the array of property names corresponding
8507 to the @a names argument and the current values of these properties.
8508 Both arrays have the same number of elements with each elemend at the
8509 given index in the first array corresponds to an element at the same
8510 index in the second array.
8511
8512 Note that for properties that do not have assigned values,
8513 <tt>null</tt> is returned at the appropriate index in the @a
8514 returnValues array.
8515
8516 </desc>
8517 <param name="names" type="wstring" dir="in">
8518 <desc>
8519 Names of properties to get.
8520 </desc>
8521 </param>
8522 <param name="returnNames" type="wstring" safearray="yes" dir="out">
8523 <desc>Names of returned properties.</desc>
8524 </param>
8525 <param name="returnValues" type="wstring" safearray="yes" dir="return">
8526 <desc>Values of returned properties.</desc>
8527 </param>
8528 </method>
8529
8530 <method name="setProperties">
8531 <desc>
8532 Sets values for a group of properties in one call.
8533
8534 The names of the properties to set are passed in the @a names
8535 array along with the new values for them in the @a values array. Both
8536 arrays have the same number of elements with each elemend at the given
8537 index in the first array corresponding to an element at the same index
8538 in the second array.
8539
8540 If there is at least one property name in @a names that is not valid,
8541 the method will fail before changing the values of any other properties
8542 from the @a names array.
8543
8544 Using this method over <link to="#setProperty()"/> is preferred if you
8545 need to set several properties at once since it will result into less
8546 IPC calls.
8547
8548 The list of all properties supported by the given hard disk format can
8549 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8550
8551 Note that setting the property value to <tt>null</tt> is equivalent to
8552 deleting the existing value. A default value (if it is defined for this
8553 property) will be used by the format backend in this case.
8554 </desc>
8555 <param name="names" type="wstring" safearray="yes" dir="in">
8556 <desc>Names of properties to set.</desc>
8557 </param>
8558 <param name="values" type="wstring" safearray="yes" dir="in">
8559 <desc>Values of properties to set.</desc>
8560 </param>
8561 </method>
8562
8563 <!-- storage methods -->
8564
8565 <method name="createDynamicStorage">
8566 <desc>
8567 Starts creating a dynamically expanding hard disk storage unit in the
8568 background. The previous storage unit created for this object, if
8569 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
8570 the operation will fail.
8571
8572 Before the operation starts, the hard disk is placed in
8573 <link to="MediaState_Creating"/> state. If the create operation
8574 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
8575 state.
8576
8577 After the returned progress object reports that the operation has
8578 successfully completed, the media state will be set to <link
8579 to="MediaState_Created"/>, the hard disk will be remembered by this
8580 VirtualBox installation and may be attached to virtual machines.
8581
8582 <result name="VBOX_E_NOT_SUPPORTED">
8583 Dynamic storage creation operation is not supported. See <link
8584 to="IHardDiskFormat::capabilities"/>.
8585 </result>
8586 </desc>
8587 <param name="logicalSize" type="unsigned long long" dir="in">
8588 <desc>Maximum logical size of the hard disk in megabytes.</desc>
8589 </param>
8590 <param name="progress" type="IProgress" dir="return">
8591 <desc>Progress object to track the operation completion.</desc>
8592 </param>
8593 </method>
8594
8595 <method name="createFixedStorage">
8596 <desc>
8597 Starts creating a fixed-size hard disk storage unit in the background.
8598 The previous storage unit created for this object, if
8599 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
8600 the operation will fail.
8601
8602 Before the operation starts, the hard disk is placed to
8603 <link to="MediaState_Creating"/> state. If the create operation
8604 fails, the media will placed back to <link to="MediaState_NotCreated"/>
8605 state.
8606
8607 After the returned progress object reports that the operation is
8608 successfully complete, the media state will be set to <link
8609 to="MediaState_Created"/>, the hard disk will be remembered by this
8610 VirtualBox installation and may be attached to virtual machines.
8611
8612 <result name="VBOX_E_NOT_SUPPORTED">
8613 Fixed storage creation operation is not supported. See
8614 <link to="IHardDiskFormat::capabilities"/>.
8615 </result>
8616 </desc>
8617 <param name="logicalSize" type="unsigned long long" dir="in">
8618 <desc>Logical size of the hard disk in megabytes.</desc>
8619 </param>
8620 <param name="progress" type="IProgress" dir="return">
8621 <desc>Progress object to track the operation completion.</desc>
8622 </param>
8623 </method>
8624
8625 <method name="deleteStorage">
8626 <desc>
8627 Starts deleting the storage unit of this hard disk.
8628
8629 The hard disk must not be attached to any known virtual machine and must
8630 not have any known child hard disks, otherwise the operation will fail.
8631 It will also fail if there is no storage unit to delete or if deletion
8632 is already in progress, or if the hard disk is being in use (locked for
8633 read or for write) or inaccessible. Therefore, the only valid state for
8634 this operation to succeed is <link to="MediaState_Created"/>.
8635
8636 Before the operation starts, the hard disk is placed to
8637 <link to="MediaState_Deleting"/> state and gets removed from the list
8638 of remembered hard disks (media registry). If the delete operation
8639 fails, the media will be remembered again and placed back to
8640 <link to="MediaState_Created"/> state.
8641
8642 After the returned progress object reports that the operation is
8643 complete, the media state will be set to
8644 <link to="MediaState_NotCreated"/> and you will be able to use one of
8645 the storage creation methods to create it again.
8646
8647 <see>#close()</see>
8648
8649 <result name="VBOX_E_OBJECT_IN_USE">
8650 Hard disk is attached to a virtual machine.
8651 </result>
8652 <result name="VBOX_E_NOT_SUPPORTED">
8653 Storage deletion is not allowed because neither of storage creation
8654 operations are supported. See
8655 <link to="IHardDiskFormat::capabilities"/>.
8656 </result>
8657
8658 <note>
8659 If the deletion operation fails, it is not guaranteed that the storage
8660 unit still exists. You may check the <link to="IMedium::state"/> value
8661 to answer this question.
8662 </note>
8663 </desc>
8664 <param name="progress" type="IProgress" dir="return">
8665 <desc>Progress object to track the operation completion.</desc>
8666 </param>
8667 </method>
8668
8669 <!-- diff methods -->
8670
8671 <method name="createDiffStorage">
8672 <desc>
8673 Starts creating an empty differencing storage unit based on this hard
8674 disk in the format and at the location defined by the @a target
8675 argument.
8676
8677 The target hard disk must be in <link to="MediaState_NotCreated"/>
8678 state (i.e. must not have an existing storage unit). Upon successful
8679 completion, this operation will set the type of the target hard disk to
8680 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
8681 represent the differencing hard disk data in the given format (according
8682 to the storage format of the target object).
8683
8684 After the returned progress object reports that the operation is
8685 successfully complete, the target hard disk gets remembered by this
8686 VirtualBox installation and may be attached to virtual machines.
8687
8688 <note>
8689 The hard disk will be set to <link to="MediaState_LockedRead"/>
8690 state for the duration of this operation.
8691 </note>
8692 <result name="VBOX_E_OBJECT_IN_USE">
8693 Hard disk not in NotCreated state.
8694 </result>
8695 </desc>
8696 <param name="target" type="IHardDisk2" dir="in">
8697 <desc>Target hard disk.</desc>
8698 </param>
8699 <param name="progress" type="IProgress" dir="return">
8700 <desc>Progress object to track the operation completion.</desc>
8701 </param>
8702 </method>
8703
8704 <method name="mergeTo">
8705 <desc>
8706 Starts merging the contents of this hard disk and all intermediate
8707 differencing hard disks in the chain to the given target hard disk.
8708
8709 The target hard disk must be either a descendant of this hard disk or
8710 its ancestor (otherwise this method will immediately return a failure).
8711 It follows that there are two logical directions of the merge operation:
8712 from ancestor to descendant (<i>forward merge</i>) and from descendant to
8713 ancestor (<i>backward merge</i>). Let us consider the following hard disk
8714 chain:
8715
8716 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
8717
8718 Here, calling this method on the <tt>Base</tt> hard disk object with
8719 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
8720 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
8721 merge. Note that in both cases the contents of the resulting hard disk
8722 will be the same, the only difference is the hard disk object that takes
8723 the result of the merge operation. In case of the forward merge in the
8724 above example, the result will be written to <tt>Diff_2</tt>; in case of
8725 the backward merge, the result will be written to <tt>Base</tt>. In
8726 other words, the result of the operation is always stored in the target
8727 hard disk.
8728
8729 Upon successful operation completion, the storage units of all hard
8730 disks in the chain between this (source) hard disk and the target hard
8731 disk, including the source hard disk itself, will be automatically
8732 deleted and the relevant hard disk objects (including this hard disk)
8733 will become uninitialized. This means that any attempt to call any of
8734 their methods or attributes will fail with the
8735 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
8736 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
8737 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
8738 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
8739 disk itself since it will no longer be based on any other hard disk.
8740
8741 Considering the above, all of the following conditions must be met in
8742 order for the merge operation to succeed:
8743 <ul>
8744 <li>
8745 Neither this (source) hard disk nor any intermediate
8746 differencing hard disk in the chain between it and the target
8747 hard disk is attached to any virtual machine.
8748 </li>
8749 <li>
8750 Neither the source hard disk nor the target hard disk is an
8751 <link to="HardDiskType_Immutable"/> hard disk.
8752 </li>
8753 <li>
8754 The part of the hard disk tree from the source hard disk to the
8755 target hard disk is a linear chain, i.e. all hard disks in this
8756 chain have exactly one child which is the next hard disk in this
8757 chain. The only exception from this rule is the target hard disk in
8758 the forward merge operation; it is allowed to have any number of
8759 child hard disks because the merge operation will hot change its
8760 logical contents (as it is seen by the guest OS or by children).
8761 </li>
8762 <li>
8763 None of the involved hard disks are in
8764 <link to="MediaState_LockedRead"/> or
8765 <link to="MediaState_LockedWrite"/> state.
8766 </li>
8767 </ul>
8768
8769 <note>
8770 This (source) hard disk and all intermediates will be placed to <link
8771 to="MediaState_Deleting"/> state and the target hard disk will be
8772 placed to <link to="MediaState_LockedWrite"/> state and for the
8773 duration of this operation.
8774 </note>
8775 </desc>
8776 <param name="targetId" type="uuid" dir="in">
8777 <desc>UUID of the target ancestor or descendant hard disk.</desc>
8778 </param>
8779 <param name="progress" type="IProgress" dir="return">
8780 <desc>Progress object to track the operation completion.</desc>
8781 </param>
8782 </method>
8783
8784 <!-- clone methods -->
8785
8786 <method name="cloneTo">
8787 <desc>
8788 Starts creating a clone of this hard disk in the format and at the
8789 location defined by the @a target argument.
8790
8791 The target hard disk must be in <link to="MediaState_NotCreated"/>
8792 state (i.e. must not have an existing storage unit). Upon successful
8793 completion, the cloned hard disk will contain exactly the same sector
8794 data as the hard disk being cloned, except that a new UUID for the clone
8795 will be randomly generated.
8796
8797 After the returned progress object reports that the operation is
8798 successfully complete, the target hard disk gets remembered by this
8799 VirtualBox installation and may be attached to virtual machines.
8800
8801 <note>
8802 If the cloned hard disk is a differencing hard disk, it will inherit
8803 parent dependency of the original hard disk.
8804 </note>
8805 <note>
8806 This hard disk will be placed to <link to="MediaState_LockedRead"/>
8807 state for the duration of this operation.
8808 </note>
8809 </desc>
8810 <param name="target" type="IHardDisk2" dir="in">
8811 <desc>Target hard disk.</desc>
8812 </param>
8813 <param name="progress" type="IProgress" dir="return">
8814 <desc>Progress object to track the operation completion.</desc>
8815 </param>
8816 </method>
8817
8818 <method name="flattenTo">
8819 <desc>
8820 Starts creating a deep (independent) clone of this hard disk in the
8821 format and at the location defined by the @a target argument.
8822
8823 This operation is similar to <link to="#cloneTo()"/> except that when
8824 applied to a differencing hard disk, it will also copy missing hard disk
8825 data from all parent hard disks it is linked to. This will make the
8826 created clone an independent base hard disk that contains all hard disk
8827 data and does not need any other hard disks to operate.
8828
8829 After the returned progress object reports that the operation is
8830 successfully complete, the target hard disk gets remembered by this
8831 VirtualBox installation and may be attached to virtual machines.
8832
8833 <note>
8834 For base hard disks, this operation is identical to
8835 <link to="#cloneTo()"/>.
8836 </note>
8837 <note>
8838 This hard disk and all its parent hard disks will be placed to <link
8839 to="MediaState_LockedRead"/> state for the duration of this
8840 operation.
8841 </note>
8842 </desc>
8843 <param name="target" type="IHardDisk2" dir="in">
8844 <desc>Target hard disk.</desc>
8845 </param>
8846 <param name="progress" type="IProgress" dir="return">
8847 <desc>Progress object to track the operation completion.</desc>
8848 </param>
8849 </method>
8850
8851 <method name="compact">
8852 <desc>
8853 Starts compacting of this hard disk. This means that the disk is
8854 transformed into a possibly more compact storage representation.
8855 This potentially creates temporary images, which can require a
8856 substantial amount of additional disk space.
8857
8858 After the returned progress object reports that the operation is
8859 successfully complete, the media state will be set back to the
8860 current state.
8861
8862 <note>
8863 This hard disk and all its parent hard disks will be placed to <link
8864 to="MediaState_LockedRead"/> state for the duration of this
8865 operation.
8866 </note>
8867 </desc>
8868 <param name="progress" type="IProgress" dir="return">
8869 <desc>Progress object to track the operation completion.</desc>
8870 </param>
8871 </method>
8872
8873 </interface>
8874
8875
8876 <!--
8877 // IHardDiskFormat
8878 /////////////////////////////////////////////////////////////////////////
8879 -->
8880
8881 <enum
8882 name="DataType"
8883 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
8884 >
8885 <const name="Int32" value="0"/>
8886 <const name="Int8" value="1"/>
8887 <const name="String" value="2"/>
8888 </enum>
8889
8890 <enum
8891 name="DataFlags"
8892 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
8893 >
8894 <const name="None" value="0x00"/>
8895 <const name="Mandatory" value="0x01"/>
8896 <const name="Expert" value="0x02"/>
8897 <const name="Array" value="0x04"/>
8898 <const name="FlagMask" value="0x07"/>
8899 </enum>
8900
8901 <enum
8902 name="HardDiskFormatCapabilities"
8903 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
8904 >
8905 <desc>
8906 Hard disk format capability flags.
8907 </desc>
8908
8909 <const name="Uuid" value="0x01">
8910 <desc>
8911 Supports UUIDs as expected by VirtualBox code.
8912 </desc>
8913 </const>
8914
8915 <const name="CreateFixed" value="0x02">
8916 <desc>
8917 Supports creating fixed size images, allocating all space instantly.
8918 </desc>
8919 </const>
8920
8921 <const name="CreateDynamic" value="0x04">
8922 <desc>
8923 Supports creating dynamically growing images, allocating space on
8924 demand.
8925 </desc>
8926 </const>
8927
8928 <const name="CreateSplit2G" value="0x08">
8929 <desc>
8930 Supports creating images split in chunks of a bit less than 2 GBytes.
8931 </desc>
8932 </const>
8933
8934 <const name="Differencing" value="0x10">
8935 <desc>
8936 Supports being used as a format for differencing hard disks (see <link
8937 to="IHardDisk2::createDiffStorage"/>).
8938 </desc>
8939 </const>
8940
8941 <const name="Asynchronous" value="0x20">
8942 <desc>
8943 Supports asynchronous I/O operations for at least some configurations.
8944 </desc>
8945 </const>
8946
8947 <const name="File" value="0x40">
8948 <desc>
8949 The format backend operates on files (the <link to="IMedium::location"/>
8950 attribute of the hard disk specifies a file used to store hard disk
8951 data; for a list of supported file extensions see
8952 <link to="IHardDiskFormat::fileExtensions"/>).
8953 </desc>
8954 </const>
8955
8956 <const name="Properties" value="0x80">
8957 <desc>
8958 The format backend uses the property interface to configure the storage
8959 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
8960 method is used to get access to properties supported by the given hard
8961 disk format).
8962 </desc>
8963 </const>
8964
8965 <const name="CapabilityMask" value="0xFF"/>
8966 </enum>
8967
8968 <interface
8969 name="IHardDiskFormat" extends="$unknown"
8970 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
8971 wsmap="managed"
8972 >
8973 <desc>
8974 The IHardDiskFormat interface represents a virtual hard disk format.
8975
8976 Each hard disk format has an associated backend which is used to handle
8977 hard disks stored in this format. This interface provides information
8978 about the properties of the associated backend.
8979
8980 Each hard disk format is identified by a string represented by the
8981 <link to="#id"/> attribute. This string is used in calls like
8982 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
8983 format.
8984
8985 The list of all supported hard disk formats can be obtained using
8986 <link to="ISystemProperties::hardDiskFormats"/>.
8987
8988 <see>IHardDisk2</see>
8989 </desc>
8990
8991 <attribute name="id" type="wstring" readonly="yes">
8992 <desc>
8993 Identifier of this format.
8994
8995 The format identifier is a non-null non-empty ASCII string. Note that
8996 this string is case-insensitive. This means that, for example, all of
8997 the following strings:
8998 <pre>
8999 "VDI"
9000 "vdi"
9001 "VdI"</pre>
9002 refer to the same hard disk format.
9003
9004 This string is used in methods of other interfaces where it is necessary
9005 to specify a hard disk format, such as
9006 <link to="IVirtualBox::createHardDisk2()"/>.
9007 </desc>
9008 </attribute>
9009
9010 <attribute name="name" type="wstring" readonly="yes">
9011 <desc>
9012 Human readable description of this format.
9013
9014 Mainly for use in file open dialogs.
9015 </desc>
9016 </attribute>
9017
9018 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9019 <desc>
9020 Array of strings containing the supported file extensions.
9021
9022 The first extension in the array is the extension preferred by the
9023 backend. It is recommended to use this extension when specifying a
9024 location of the storage unit for a new hard disk.
9025
9026 Note that some backends do not work on files, so this array may be
9027 empty.
9028
9029 <see>IHardDiskFormat::capabilities</see>
9030 </desc>
9031 </attribute>
9032
9033 <attribute name="capabilities" type="unsigned long" readonly="yes">
9034 <desc>
9035 Capabilities of the format as a set of bit flags.
9036
9037 For the meaning of individual capability flags see
9038 <link to="HardDiskFormatCapabilities"/>.
9039 </desc>
9040 </attribute>
9041
9042 <method name="describeProperties">
9043 <desc>
9044 Returns several arrays describing the properties supported by this
9045 format.
9046
9047 An element with the given index in each array describes one
9048 property. Thus, the number of elements in each returned array is the
9049 same and corresponds to the number of supported properties.
9050
9051 The returned arrays are filled in only if the
9052 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9053 All arguments must be non-NULL.
9054
9055 <see>DataType</see>
9056 <see>DataFlags</see>
9057 </desc>
9058
9059 <param name="names" type="wstring" safearray="yes" dir="out">
9060 <desc>Array of property names.</desc>
9061 </param>
9062 <param name="description" type="wstring" safearray="yes" dir="out">
9063 <desc>Array of property descriptions.</desc>
9064 </param>
9065 <param name="types" type="DataType" safearray="yes" dir="out">
9066 <desc>Array of property types.</desc>
9067 </param>
9068 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9069 <desc>Array of property flags.</desc>
9070 </param>
9071 <param name="defaults" type="wstring" safearray="yes" dir="out">
9072 <desc>Array of default property values.</desc>
9073 </param>
9074 </method>
9075
9076 </interface>
9077
9078
9079 <!--
9080 // IFloppyImage2
9081 /////////////////////////////////////////////////////////////////////////
9082 -->
9083
9084 <interface
9085 name="IFloppyImage2" extends="IMedium"
9086 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
9087 wsmap="managed"
9088 >
9089 <desc>
9090 The IFloppyImage2 interface represents a medium containing the image
9091 of a floppy disk.
9092 </desc>
9093
9094 </interface>
9095
9096
9097 <!--
9098 // IDVDImage2
9099 /////////////////////////////////////////////////////////////////////////
9100 -->
9101
9102 <interface
9103 name="IDVDImage2" extends="IMedium"
9104 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
9105 wsmap="managed"
9106 >
9107 <desc>
9108 The IDVDImage2 interface represents a medium containing the image
9109 of a CD or DVD disk in the ISO format.
9110 </desc>
9111
9112 </interface>
9113
9114
9115 <!--
9116 // IDVDDrive
9117 /////////////////////////////////////////////////////////////////////////
9118 -->
9119
9120 <interface
9121 name="IDVDDrive" extends="$unknown"
9122 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9123 wsmap="managed"
9124 >
9125 <desc>
9126 The IDVDDrive interface represents the virtual CD/DVD drive of the
9127 virtual machine. An object of this type is returned by
9128 <link to="IMachine::DVDDrive"/>.
9129 </desc>
9130
9131 <attribute name="state" type="DriveState" readonly="yes">
9132 <desc>Current drive state.</desc>
9133 </attribute>
9134
9135 <attribute name="passthrough" type="boolean">
9136 <desc>
9137 When a host drive is mounted and passthrough is enabled
9138 the guest OS will be able to directly send SCSI commands to
9139 the host drive. This enables the guest OS to use CD/DVD writers
9140 but is potentially dangerous.
9141 </desc>
9142 </attribute>
9143
9144 <method name="mountImage">
9145 <desc>Mounts a CD/DVD image with the specified UUID.
9146
9147 <result name="VBOX_E_FILE_ERROR">
9148 Invalid image file location.
9149 </result>
9150 <result name="VBOX_E_OBJECT_NOT_FOUND">
9151 Could not find a CD/DVD image matching @a imageID.
9152 </result>
9153 <result name="VBOX_E_INVALID_OBJECT_STATE">
9154 Invalid media state.
9155 </result>
9156
9157 </desc>
9158 <param name="imageId" type="uuid" dir="in"/>
9159 </method>
9160
9161 <method name="captureHostDrive">
9162 <desc>Captures the specified host CD/DVD drive.</desc>
9163 <param name="drive" type="IHostDVDDrive" dir="in"/>
9164 </method>
9165
9166 <method name="unmount">
9167 <desc>Unmounts the currently mounted image or host drive.</desc>
9168 </method>
9169
9170 <method name="getImage">
9171 <desc>Returns the currently mounted CD/DVD image.</desc>
9172 <param name="image" type="IDVDImage2" dir="return"/>
9173 </method>
9174
9175 <method name="getHostDrive">
9176 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9177 <param name="drive" type="IHostDVDDrive" dir="return"/>
9178 </method>
9179
9180 </interface>
9181
9182
9183 <!--
9184 // IFloppyDrive
9185 /////////////////////////////////////////////////////////////////////////
9186 -->
9187
9188 <interface
9189 name="IFloppyDrive" extends="$unknown"
9190 uuid="159412cd-bab8-452e-8097-218a020825a6"
9191 wsmap="managed"
9192 >
9193 <desc>
9194 The IFloppyDrive interface represents the virtual floppy drive of the
9195 virtual machine. An object of this type is returned by
9196 <link to="IMachine::floppyDrive" />.
9197 </desc>
9198
9199 <attribute name="enabled" type="boolean">
9200 <desc>
9201 Flag whether the floppy drive is enabled. If it is disabled,
9202 the floppy drive will not be reported to the guest OS.
9203 </desc>
9204 </attribute>
9205
9206 <attribute name="state" type="DriveState" readonly="yes">
9207 <desc>Current drive state.</desc>
9208 </attribute>
9209
9210 <method name="mountImage">
9211 <desc>Mounts a floppy image with the specified UUID.
9212
9213 <result name="VBOX_E_FILE_ERROR">
9214 Invalid image file location.
9215 </result>
9216 <result name="VBOX_E_OBJECT_NOT_FOUND">
9217 Could not find a floppy image matching @a imageID.
9218 </result>
9219 <result name="VBOX_E_INVALID_OBJECT_STATE">
9220 Invalid media state.
9221 </result>
9222
9223 </desc>
9224 <param name="imageId" type="uuid" dir="in"/>
9225 </method>
9226
9227 <method name="captureHostDrive">
9228 <desc>Captures the specified host floppy drive.</desc>
9229 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9230 </method>
9231
9232 <method name="unmount">
9233 <desc>Unmounts the currently mounted image or host drive.</desc>
9234 </method>
9235
9236 <method name="getImage">
9237 <desc>Returns the currently mounted floppy image.</desc>
9238 <param name="image" type="IFloppyImage2" dir="return"/>
9239 </method>
9240
9241 <method name="getHostDrive">
9242 <desc>Returns the currently mounted host floppy drive.</desc>
9243 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9244 </method>
9245
9246 </interface>
9247
9248
9249 <!--
9250 // IKeyboard
9251 /////////////////////////////////////////////////////////////////////////
9252 -->
9253
9254 <interface
9255 name="IKeyboard" extends="$unknown"
9256 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9257 wsmap="managed"
9258 >
9259 <desc>
9260 The IKeyboard interface represents the virtual machine's keyboard. Used
9261 in <link to="IConsole::keyboard"/>.
9262
9263 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9264 to the virtual machine.
9265
9266 </desc>
9267 <method name="putScancode">
9268 <desc>Sends a scancode to the keyboard.
9269
9270 <result name="VBOX_E_IPRT_ERROR">
9271 Could not send scan code to virtual keyboard.
9272 </result>
9273
9274 </desc>
9275 <param name="scancode" type="long" dir="in"/>
9276 </method>
9277
9278 <method name="putScancodes">
9279 <desc>Sends an array of scancodes to the keyboard.
9280
9281 <result name="VBOX_E_IPRT_ERROR">
9282 Could not send all scan codes to virtual keyboard.
9283 </result>
9284
9285 </desc>
9286 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9287 <param name="codesStored" type="unsigned long" dir="return"/>
9288 </method>
9289
9290 <method name="putCAD">
9291 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9292 function is nothing special, it is just a convenience function
9293 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9294
9295 <result name="VBOX_E_IPRT_ERROR">
9296 Could not send all scan codes to virtual keyboard.
9297 </result>
9298
9299 </desc>
9300 </method>
9301
9302 </interface>
9303
9304
9305 <!--
9306 // IMouse
9307 /////////////////////////////////////////////////////////////////////////
9308 -->
9309
9310 <enum
9311 name="MouseButtonState"
9312 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9313 >
9314 <desc>
9315 Mouse button state.
9316 </desc>
9317
9318 <const name="LeftButton" value="0x01"/>
9319 <const name="RightButton" value="0x02"/>
9320 <const name="MiddleButton" value="0x04"/>
9321 <const name="WheelUp" value="0x08"/>
9322 <const name="WheelDown" value="0x10"/>
9323 <const name="MouseStateMask" value="0x1F"/>
9324 </enum>
9325
9326 <interface
9327 name="IMouse" extends="$unknown"
9328 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9329 wsmap="managed"
9330 >
9331 <desc>
9332 The IMouse interface represents the virtual machine's mouse. Used in
9333 <link to="IConsole::mouse"/>.
9334
9335 Through this interface, the virtual machine's virtual mouse can be
9336 controlled.
9337 </desc>
9338
9339 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9340 <desc>
9341 Whether the guest OS supports absolute mouse pointer positioning
9342 or not.
9343 <note>
9344 VirtualBox Guest Tools need to be installed to the guest OS
9345 in order to enable absolute mouse positioning support.
9346 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9347 callback to be instantly informed about changes of this attribute
9348 during virtual machine execution.
9349 </note>
9350 <see><link to="#putMouseEventAbsolute"/></see>
9351 </desc>
9352 </attribute>
9353
9354 <method name="putMouseEvent">
9355 <desc>
9356 Initiates a mouse event using relative pointer movements
9357 along x and y axis.
9358
9359 <result name="E_ACCESSDENIED">
9360 Console not powered up.
9361 </result>
9362 <result name="VBOX_E_IPRT_ERROR">
9363 Could not send mouse event to virtual mouse.
9364 </result>
9365
9366 </desc>
9367
9368 <param name="dx" type="long" dir="in">
9369 <desc>
9370 Amount of pixels the mouse should move to the right.
9371 Negative values move the mouse to the left.
9372 </desc>
9373 </param>
9374 <param name="dy" type="long" dir="in">
9375 <desc>
9376 Amount of pixels the mouse should move downwards.
9377 Negative values move the mouse upwards.
9378 </desc>
9379 </param>
9380 <param name="dz" type="long" dir="in">
9381 <desc>
9382 Amount of mouse wheel moves.
9383 Positive values describe clockwise wheel rotations,
9384 negative values describe counterclockwise rotations.
9385 </desc>
9386 </param>
9387 <param name="buttonState" type="long" dir="in">
9388 <desc>
9389 The current state of mouse buttons. Every bit represents
9390 a mouse button as follows:
9391 <table>
9392 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9393 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9394 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9395 </table>
9396 A value of <tt>1</tt> means the corresponding button is pressed.
9397 otherwise it is released.
9398 </desc>
9399 </param>
9400 </method>
9401
9402 <method name="putMouseEventAbsolute">
9403 <desc>
9404 Positions the mouse pointer using absolute x and y coordinates.
9405 These coordinates are expressed in pixels and
9406 start from <tt>[1,1]</tt> which corresponds to the top left
9407 corner of the virtual display.
9408
9409 <result name="E_ACCESSDENIED">
9410 Console not powered up.
9411 </result>
9412 <result name="VBOX_E_IPRT_ERROR">
9413 Could not send mouse event to virtual mouse.
9414 </result>
9415
9416 <note>
9417 This method will have effect only if absolute mouse
9418 positioning is supported by the guest OS.
9419 </note>
9420
9421 <see><link to="#absoluteSupported"/></see>
9422 </desc>
9423
9424 <param name="x" type="long" dir="in">
9425 <desc>
9426 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
9427 </desc>
9428 </param>
9429 <param name="y" type="long" dir="in">
9430 <desc>
9431 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
9432 </desc>
9433 </param>
9434 <param name="dz" type="long" dir="in">
9435 <desc>
9436 Amount of mouse wheel moves.
9437 Positive values describe clockwise wheel rotations,
9438 negative values describe counterclockwise rotations.
9439 </desc>
9440 </param>
9441 <param name="buttonState" type="long" dir="in">
9442 <desc>
9443 The current state of mouse buttons. Every bit represents
9444 a mouse button as follows:
9445 <table>
9446 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9447 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9448 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9449 </table>
9450 A value of <tt>1</tt> means the corresponding button is pressed.
9451 otherwise it is released.
9452 </desc>
9453 </param>
9454 </method>
9455
9456 </interface>
9457
9458 <!--
9459 // IDisplay
9460 /////////////////////////////////////////////////////////////////////////
9461 -->
9462
9463 <enum
9464 name="FramebufferAccelerationOperation"
9465 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9466 >
9467 <desc>
9468 Frame buffer acceleration operation.
9469 </desc>
9470
9471 <const name="SolidFillAcceleration" value="1"/>
9472 <const name="ScreenCopyAcceleration" value="2"/>
9473 </enum>
9474
9475 <enum
9476 name="FramebufferPixelFormat"
9477 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
9478 >
9479 <desc>
9480 Format of the video memory buffer. Constants represented by this enum can
9481 be used to test for particular values of <link
9482 to="IFramebuffer::pixelFormat"/>. See also <link
9483 to="IFramebuffer::requestResize()"/>.
9484
9485 See also www.fourcc.org for more information about FOURCC pixel formats.
9486 </desc>
9487
9488 <const name="Opaque" value="0xFFFFFFFF">
9489 <desc>
9490 Unknown buffer format (the user may not assume any particular format of
9491 the buffer).
9492 </desc>
9493 </const>
9494 <const name="FOURCC_RGB" value="0x32424752">
9495 <desc>
9496 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9497 bit layout).
9498 </desc>
9499 </const>
9500 </enum>
9501
9502 <interface
9503 name="IFramebuffer" extends="$unknown"
9504 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9505 wsmap="suppress"
9506 >
9507 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9508 <desc>Address of the start byte of the frame buffer.</desc>
9509 </attribute>
9510
9511 <attribute name="width" type="unsigned long" readonly="yes">
9512 <desc>Frame buffer width, in pixels.</desc>
9513 </attribute>
9514
9515 <attribute name="height" type="unsigned long" readonly="yes">
9516 <desc>Frame buffer height, in pixels.</desc>
9517 </attribute>
9518
9519 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9520 <desc>
9521 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9522 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9523 are: 8, 15, 16, 24 and 32.
9524 </desc>
9525 </attribute>
9526
9527 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9528 <desc>
9529 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9530 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9531 size of the scan line must be aligned to 32 bits.
9532 </desc>
9533 </attribute>
9534
9535 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
9536 <desc>
9537 Frame buffer pixel format. It's either one of the values defined by <link
9538 to="FramebufferPixelFormat"/> or a raw FOURCC code.
9539 <note>
9540 This attribute must never return <link
9541 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
9542 <link to="#address"/> points to must be always known.
9543 </note>
9544 </desc>
9545 </attribute>
9546
9547 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
9548 <desc>
9549 Defines whether this frame buffer uses the virtual video card's memory
9550 buffer (guest VRAM) directly or not. See <link
9551 to="IFramebuffer::requestResize()"/> for more information.
9552 </desc>
9553 </attribute>
9554
9555 <attribute name="heightReduction" type="unsigned long" readonly="yes">
9556 <desc>
9557 Hint from the frame buffer about how much of the standard
9558 screen height it wants to use for itself. This information is
9559 exposed to the guest through the VESA BIOS and VMMDev interface
9560 so that it can use it for determining its video mode table. It
9561 is not guaranteed that the guest respects the value.
9562 </desc>
9563 </attribute>
9564
9565 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
9566 <desc>
9567 An alpha-blended overlay which is superposed over the frame buffer.
9568 The initial purpose is to allow the display of icons providing
9569 information about the VM state, including disk activity, in front
9570 ends which do not have other means of doing that. The overlay is
9571 designed to controlled exclusively by IDisplay. It has no locking
9572 of its own, and any changes made to it are not guaranteed to be
9573 visible until the affected portion of IFramebuffer is updated. The
9574 overlay can be created lazily the first time it is requested. This
9575 attribute can also return NULL to signal that the overlay is not
9576 implemented.
9577 </desc>
9578 </attribute>
9579
9580 <attribute name="winId" type="unsigned long long" readonly="yes">
9581 <desc>
9582 Platform-dependent identifier of the window where context of this
9583 frame buffer is drawn, or zero if there's no such window.
9584 </desc>
9585 </attribute>
9586
9587 <method name="lock">
9588 <desc>
9589 Locks the frame buffer.
9590 Gets called by the IDisplay object where this frame buffer is
9591 bound to.
9592 </desc>
9593 </method>
9594
9595 <method name="unlock">
9596 <desc>
9597 Unlocks the frame buffer.
9598 Gets called by the IDisplay object where this frame buffer is
9599 bound to.
9600 </desc>
9601 </method>
9602
9603 <method name="notifyUpdate">
9604 <desc>
9605 Informs about an update.
9606 Gets called by the display object where this buffer is
9607 registered.
9608 </desc>
9609 <param name="x" type="unsigned long" dir="in"/>
9610 <param name="y" type="unsigned long" dir="in"/>
9611 <param name="width" type="unsigned long" dir="in"/>
9612 <param name="height" type="unsigned long" dir="in"/>
9613 <param name="finished" type="boolean" dir="return"/>
9614 </method>
9615
9616 <method name="requestResize">
9617 <desc>
9618 Requests a size and pixel format change.
9619
9620 There are two modes of working with the video buffer of the virtual
9621 machine. The <i>indirect</i> mode implies that the IFramebuffer
9622 implementation allocates a memory buffer for the requested display mode
9623 and provides it to the virtual machine. In <i>direct</i> mode, the
9624 IFramebuffer implementation uses the memory buffer allocated and owned
9625 by the virtual machine. This buffer represents the video memory of the
9626 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
9627 usually faster because the implementation gets a raw pointer to the
9628 guest VRAM buffer which it can directly use for visualizing the contents
9629 of the virtual display, as opposed to the indirect mode where the
9630 contents of guest VRAM are copied to the memory buffer provided by
9631 the implementation every time a display update occurs.
9632
9633 It is important to note that the direct mode is really fast only when
9634 the implementation uses the given guest VRAM buffer directly, for
9635 example, by blitting it to the window representing the virtual machine's
9636 display, which saves at least one copy operation comparing to the
9637 indirect mode. However, using the guest VRAM buffer directly is not
9638 always possible: the format and the color depth of this buffer may be
9639 not supported by the target window, or it may be unknown (opaque) as in
9640 case of text or non-linear multi-plane VGA video modes. In this case,
9641 the indirect mode (that is always available) should be used as a
9642 fallback: when the guest VRAM contents are copied to the
9643 implementation-provided memory buffer, color and format conversion is
9644 done automatically by the underlying code.
9645
9646 The @a pixelFormat parameter defines whether the direct mode is
9647 available or not. If @a pixelFormat is <link
9648 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
9649 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
9650 bytesPerLine parameters must be ignored and the implementation must use
9651 the indirect mode (where it provides its own buffer in one of the
9652 supported formats). In all other cases, @a pixelFormat together with @a
9653 bitsPerPixel and @a bytesPerLine define the format of the video memory
9654 buffer pointed to by the @a VRAM parameter and the implementation is
9655 free to choose which mode to use. To indicate that this frame buffer uses
9656 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
9657 attribute must return <tt>true</tt> and <link to="#address"/> must
9658 return exactly the same address that is passed in the @a VRAM parameter
9659 of this method; otherwise it is assumed that the indirect strategy is
9660 chosen.
9661
9662 The @a width and @a height parameters represent the size of the
9663 requested display mode in both modes. In case of indirect mode, the
9664 provided memory buffer should be big enough to store data of the given
9665 display mode. In case of direct mode, it is guaranteed that the given @a
9666 VRAM buffer contains enough space to represent the display mode of the
9667 given size. Note that this frame buffer's <link to="#width"/> and <link
9668 to="#height"/> attributes must return exactly the same values as
9669 passed to this method after the resize is completed (see below).
9670
9671 The @a finished output parameter determines if the implementation has
9672 finished resizing the frame buffer or not. If, for some reason, the
9673 resize cannot be finished immediately during this call, @a finished
9674 must be set to @c false, and the implementation must call
9675 <link to="IDisplay::resizeCompleted()"/> after it has returned from
9676 this method as soon as possible. If @a finished is @c false, the
9677 machine will not call any frame buffer methods until
9678 <link to="IDisplay::resizeCompleted()"/> is called.
9679
9680 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
9681 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
9682 this frame buffer must return exactly the same values as specified in the
9683 parameters of this method, after the resize is completed. If the
9684 indirect mode is chosen, these attributes must return values describing
9685 the format of the implementation's own memory buffer <link
9686 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
9687 value must always correlate with <link to="#pixelFormat"/>. Note that
9688 the <link to="#pixelFormat"/> attribute must never return <link
9689 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
9690
9691 <note>
9692 This method is called by the IDisplay object under the
9693 <link to="#lock()"/> provided by this IFramebuffer
9694 implementation. If this method returns @c false in @a finished, then
9695 this lock is not released until
9696 <link to="IDisplay::resizeCompleted()"/> is called.
9697 </note>
9698 </desc>
9699 <param name="screenId" type="unsigned long" dir="in">
9700 <desc>
9701 Logical screen number. Must be used in the corresponding call to
9702 <link to="IDisplay::resizeCompleted()"/> if this call is made.
9703 </desc>
9704 </param>
9705 <param name="pixelFormat" type="unsigned long" dir="in">
9706 <desc>
9707 Pixel format of the memory buffer pointed to by @a VRAM.
9708 See also <link to="FramebufferPixelFormat"/>.
9709 </desc>
9710 </param>
9711 <param name="VRAM" type="octet" mod="ptr" dir="in">
9712 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
9713 </param>
9714 <param name="bitsPerPixel" type="unsigned long" dir="in">
9715 <desc>Color depth, bits per pixel.</desc>
9716 </param>
9717 <param name="bytesPerLine" type="unsigned long" dir="in">
9718 <desc>Size of one scan line, in bytes.</desc>
9719 </param>
9720 <param name="width" type="unsigned long" dir="in">
9721 <desc>Width of the guest display, in pixels.</desc>
9722 </param>
9723 <param name="height" type="unsigned long" dir="in">
9724 <desc>Height of the guest display, in pixels.</desc>
9725 </param>
9726 <param name="finished" type="boolean" dir="return">
9727 <desc>
9728 Can the VM start using the new frame buffer immediately
9729 after this method returns or it should wait for
9730 <link to="IDisplay::resizeCompleted()"/>.
9731 </desc>
9732 </param>
9733 </method>
9734
9735 <method name="operationSupported">
9736 <desc>
9737 Returns whether the given acceleration operation is supported
9738 by the IFramebuffer implementation. If not, the display object
9739 will not attempt to call the corresponding IFramebuffer entry
9740 point. Even if an operation is indicated as supported, the
9741 IFramebuffer implementation always has the option to return non
9742 supported from the corresponding acceleration method in which
9743 case the operation will be performed by the display engine. This
9744 allows for reduced IFramebuffer implementation complexity where
9745 only common cases are handled.
9746 </desc>
9747 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
9748 <param name="supported" type="boolean" dir="return"/>
9749 </method>
9750
9751 <method name="videoModeSupported">
9752 <desc>
9753 Returns whether the frame buffer implementation is willing to
9754 support a given video mode. In case it is not able to render
9755 the video mode (or for some reason not willing), it should
9756 return false. Usually this method is called when the guest
9757 asks the VMM device whether a given video mode is supported
9758 so the information returned is directly exposed to the guest.
9759 It is important that this method returns very quickly.
9760 </desc>
9761 <param name="width" type="unsigned long" dir="in"/>
9762 <param name="height" type="unsigned long" dir="in"/>
9763 <param name="bpp" type="unsigned long" dir="in"/>
9764 <param name="supported" type="boolean" dir="return"/>
9765 </method>
9766
9767 <method name="solidFill">
9768 <desc>
9769 Fills the specified rectangle on screen with a solid color.
9770 </desc>
9771 <param name="x" type="unsigned long" dir="in"/>
9772 <param name="y" type="unsigned long" dir="in"/>
9773 <param name="width" type="unsigned long" dir="in"/>
9774 <param name="height" type="unsigned long" dir="in"/>
9775 <param name="color" type="unsigned long" dir="in"/>
9776 <param name="handled" type="boolean" dir="return"/>
9777 </method>
9778
9779 <method name="copyScreenBits">
9780 <desc>
9781 Copies specified rectangle on the screen.
9782 </desc>
9783 <param name="xDst" type="unsigned long" dir="in"/>
9784 <param name="yDst" type="unsigned long" dir="in"/>
9785 <param name="xSrc" type="unsigned long" dir="in"/>
9786 <param name="ySrc" type="unsigned long" dir="in"/>
9787 <param name="width" type="unsigned long" dir="in"/>
9788 <param name="height" type="unsigned long" dir="in"/>
9789 <param name="handled" type="boolean" dir="return"/>
9790 </method>
9791
9792 <method name="getVisibleRegion">
9793 <desc>
9794 Returns the visible region of this frame buffer.
9795
9796 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
9797 @a count parameter is ignored and the number of elements necessary to
9798 describe the current visible region is returned in @a countCopied.
9799
9800 If @a rectangles is not <tt>NULL</tt> but @a count is less
9801 than the required number of elements to store region data, the method
9802 will report a failure. If @a count is equal or greater than the
9803 required number of elements, then the actual number of elements copied
9804 to the provided array will be returned in @a countCopied.
9805
9806 <note>
9807 The address of the provided array must be in the process space of
9808 this IFramebuffer object.
9809 </note>
9810 <note>
9811 Method not yet implemented.
9812 </note>
9813 </desc>
9814 <param name="rectangles" type="octet" mod="ptr" dir="in">
9815 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
9816 </param>
9817 <param name="count" type="unsigned long" dir="in">
9818 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9819 </param>
9820 <param name="countCopied" type="unsigned long" dir="return">
9821 <desc>Number of elements copied to the @a rectangles array.</desc>
9822 </param>
9823 </method>
9824
9825 <method name="setVisibleRegion">
9826 <desc>
9827 Suggests a new visible region to this frame buffer. This region
9828 represents the area of the VM display which is a union of regions of
9829 all top-level windows of the guest operating system running inside the
9830 VM (if the Guest Additions for this system support this
9831 functionality). This information may be used by the frontends to
9832 implement the seamless desktop integration feature.
9833
9834 <note>
9835 The address of the provided array must be in the process space of
9836 this IFramebuffer object.
9837 </note>
9838 <note>
9839 The IFramebuffer implementation must make a copy of the provided
9840 array of rectangles.
9841 </note>
9842 <note>
9843 Method not yet implemented.
9844 </note>
9845 </desc>
9846 <param name="rectangles" type="octet" mod="ptr" dir="in">
9847 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
9848 </param>
9849 <param name="count" type="unsigned long" dir="in">
9850 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9851 </param>
9852 </method>
9853
9854 </interface>
9855
9856 <interface
9857 name="IFramebufferOverlay" extends="IFramebuffer"
9858 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
9859 wsmap="suppress"
9860 >
9861 <desc>
9862 The IFramebufferOverlay interface represents an alpha blended overlay
9863 for displaying status icons above an IFramebuffer. It is always created
9864 not visible, so that it must be explicitly shown. It only covers a
9865 portion of the IFramebuffer, determined by its width, height and
9866 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
9867 that order) format, and may be written to directly. Do re-read the
9868 width though, after setting it, as it may be adjusted (increased) to
9869 make it more suitable for the front end.
9870 </desc>
9871 <attribute name="x" type="unsigned long" readonly="yes">
9872 <desc>X position of the overlay, relative to the frame buffer.</desc>
9873 </attribute>
9874
9875 <attribute name="y" type="unsigned long" readonly="yes">
9876 <desc>Y position of the overlay, relative to the frame buffer.</desc>
9877 </attribute>
9878
9879 <attribute name="visible" type="boolean" readonly="no">
9880 <desc>
9881 Whether the overlay is currently visible.
9882 </desc>
9883 </attribute>
9884
9885 <attribute name="alpha" type="unsigned long" readonly="no">
9886 <desc>
9887 The global alpha value for the overlay. This may or may not be
9888 supported by a given front end.
9889 </desc>
9890 </attribute>
9891
9892 <method name="move">
9893 <desc>
9894 Changes the overlay's position relative to the IFramebuffer.
9895 </desc>
9896 <param name="x" type="unsigned long" dir="in"/>
9897 <param name="y" type="unsigned long" dir="in"/>
9898 </method>
9899
9900 </interface>
9901
9902 <interface
9903 name="IDisplay" extends="$unknown"
9904 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
9905 wsmap="suppress"
9906 >
9907 <desc>
9908 The IDisplay interface represents the virtual machine's display.
9909
9910 The object implementing this interface is contained in each
9911 <link to="IConsole::display"/> attribute and represents the visual
9912 output of the virtual machine.
9913
9914 The virtual display supports pluggable output targets represented by the
9915 IFramebuffer interface. Examples of the output target are a window on
9916 the host computer or an RDP session's display on a remote computer.
9917 </desc>
9918 <attribute name="width" type="unsigned long" readonly="yes">
9919 <desc>Current display width.</desc>
9920 </attribute>
9921
9922 <attribute name="height" type="unsigned long" readonly="yes">
9923 <desc>Current display height.</desc>
9924 </attribute>
9925
9926 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9927 <desc>
9928 Current guest display color depth. Note that this may differ
9929 from <link to="IFramebuffer::bitsPerPixel"/>.
9930 </desc>
9931 </attribute>
9932
9933 <method name="setupInternalFramebuffer">
9934 <desc>
9935 Prepares an internally managed frame buffer.
9936 </desc>
9937 <param name="depth" type="unsigned long" dir="in"/>
9938 </method>
9939
9940 <method name="lockFramebuffer">
9941 <desc>
9942 Requests access to the internal frame buffer.
9943
9944 <result name="VBOX_E_NOT_SUPPORTED">
9945 Attempt to lock a non-internal frame buffer.
9946 </result>
9947
9948 </desc>
9949 <param name="address" type="octet" mod="ptr" dir="return"/>
9950 </method>
9951
9952 <method name="unlockFramebuffer">
9953 <desc>
9954 Releases access to the internal frame buffer.
9955
9956 <result name="VBOX_E_NOT_SUPPORTED">
9957 Attempt to unlock a non-internal frame buffer.
9958 </result>
9959
9960 </desc>
9961 </method>
9962
9963 <method name="registerExternalFramebuffer">
9964 <desc>
9965 Registers an external frame buffer.
9966 </desc>
9967 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9968 </method>
9969
9970 <method name="setFramebuffer">
9971 <desc>
9972 Sets the framebuffer for given screen.
9973 </desc>
9974 <param name="screenId" type="unsigned long" dir="in"/>
9975 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9976 </method>
9977
9978 <method name="getFramebuffer">
9979 <desc>
9980 Queries the framebuffer for given screen.
9981 </desc>
9982 <param name="screenId" type="unsigned long" dir="in"/>
9983 <param name="framebuffer" type="IFramebuffer" dir="out"/>
9984 <param name="xOrigin" type="long" dir="out"/>
9985 <param name="yOrigin" type="long" dir="out"/>
9986 </method>
9987
9988 <method name="setVideoModeHint">
9989 <desc>
9990 Asks VirtualBox to request the given video mode from
9991 the guest. This is just a hint and it cannot be guaranteed
9992 that the requested resolution will be used. Guest Additions
9993 are required for the request to be seen by guests. The caller
9994 should issue the request and wait for a resolution change and
9995 after a timeout retry.
9996
9997 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
9998 parameters means that the corresponding values should be taken from the
9999 current video mode (i.e. left unchanged).
10000
10001 If the guest OS supports multi-monitor configuration then the @a display
10002 parameter specifies the number of the guest display to send the hint to:
10003 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10004 so on. If the multi-monitor configuration is not supported, @a display
10005 must be <tt>0</tt>.
10006
10007 <result name="E_INVALIDARG">
10008 The @a display is not associated with any monitor.
10009 </result>
10010
10011 </desc>
10012 <param name="width" type="unsigned long" dir="in"/>
10013 <param name="height" type="unsigned long" dir="in"/>
10014 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10015 <param name="display" type="unsigned long" dir="in"/>
10016 </method>
10017
10018 <method name="setSeamlessMode">
10019 <desc>
10020 Enables or disables seamless guest display rendering (seamless desktop
10021 integration) mode.
10022 <note>
10023 Calling this method has no effect if <link
10024 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10025 </note>
10026 </desc>
10027 <param name="enabled" type="boolean" dir="in"/>
10028 </method>
10029
10030 <method name="takeScreenShot">
10031 <desc>
10032 Takes a screen shot of the requested size and copies it to the
10033 32-bpp buffer allocated by the caller.
10034
10035 <result name="E_NOTIMPL">
10036 Feature not implemented.
10037 </result>
10038 <result name="VBOX_E_IPRT_ERROR">
10039 Could not take a screenshot.
10040 </result>
10041
10042 </desc>
10043 <param name="address" type="octet" mod="ptr" dir="in"/>
10044 <param name="width" type="unsigned long" dir="in"/>
10045 <param name="height" type="unsigned long" dir="in"/>
10046 </method>
10047
10048 <method name="drawToScreen">
10049 <desc>
10050 Draws a 32-bpp image of the specified size from the given buffer
10051 to the given point on the VM display.
10052
10053 <result name="E_NOTIMPL">
10054 Feature not implemented.
10055 </result>
10056 <result name="VBOX_E_IPRT_ERROR">
10057 Could not draw to screen.
10058 </result>
10059
10060 </desc>
10061 <param name="address" type="octet" mod="ptr" dir="in"/>
10062 <param name="x" type="unsigned long" dir="in"/>
10063 <param name="y" type="unsigned long" dir="in"/>
10064 <param name="width" type="unsigned long" dir="in"/>
10065 <param name="height" type="unsigned long" dir="in"/>
10066 </method>
10067
10068 <method name="invalidateAndUpdate">
10069 <desc>
10070 Does a full invalidation of the VM display and instructs the VM
10071 to update it.
10072
10073 <result name="VBOX_E_IPRT_ERROR">
10074 Could not invalidate and update screen.
10075 </result>
10076
10077 </desc>
10078 </method>
10079
10080 <method name="resizeCompleted">
10081 <desc>
10082 Signals that a framebuffer has completed the resize operation.
10083
10084 <result name="VBOX_E_NOT_SUPPORTED">
10085 Operation only valid for external frame buffers.
10086 </result>
10087
10088 </desc>
10089 <param name="screenId" type="unsigned long" dir="in"/>
10090 </method>
10091
10092 <method name="updateCompleted">
10093 <desc>
10094 Signals that a framebuffer has completed the update operation.
10095
10096 <result name="VBOX_E_NOT_SUPPORTED">
10097 Operation only valid for external frame buffers.
10098 </result>
10099
10100 </desc>
10101 </method>
10102
10103 </interface>
10104
10105 <!--
10106 // INetworkAdapter
10107 /////////////////////////////////////////////////////////////////////////
10108 -->
10109
10110 <enum
10111 name="NetworkAttachmentType"
10112 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
10113 >
10114 <desc>
10115 Network attachment type.
10116 </desc>
10117
10118 <const name="Null" value="0">
10119 <desc>Null value, also means "not attached".</desc>
10120 </const>
10121 <const name="NAT" value="1"/>
10122 <const name="HostInterface" value="2"/>
10123 <const name="Internal" value="3"/>
10124 </enum>
10125
10126 <enum
10127 name="NetworkAdapterType"
10128 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10129 >
10130 <desc>
10131 Network adapter type.
10132 </desc>
10133
10134 <const name="Null" value="0">
10135 <desc>Null value (never used by the API).</desc>
10136 </const>
10137 <const name="Am79C970A" value="1"/>
10138 <const name="Am79C973" value="2"/>
10139 <const name="I82540EM" value="3"/>
10140 <const name="I82543GC" value="4"/>
10141 </enum>
10142
10143 <interface
10144 name="INetworkAdapter" extends="$unknown"
10145 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
10146 wsmap="managed"
10147 >
10148 <attribute name="adapterType" type="NetworkAdapterType">
10149 <desc>
10150 Type of the virtual network adapter. Depending on this value,
10151 VirtualBox will provide a different virtual network hardware
10152 to the guest.
10153 </desc>
10154 </attribute>
10155
10156 <attribute name="slot" type="unsigned long" readonly="yes">
10157 <desc>
10158 Slot number this adapter is plugged into. Corresponds to
10159 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10160 to obtain this instance.
10161 </desc>
10162 </attribute>
10163
10164 <attribute name="enabled" type="boolean">
10165 <desc>
10166 Flag whether the network adapter is present in the
10167 guest system. If disabled, the virtual guest hardware will
10168 not contain this network adapter. Can only be changed when
10169 the VM is not running.
10170 </desc>
10171 </attribute>
10172
10173 <attribute name="MACAddress" type="wstring">
10174 <desc>
10175 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10176 it to NULL, VirtualBox will generate a unique MAC address.
10177 </desc>
10178 </attribute>
10179
10180 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10181
10182 <attribute name="hostInterface" type="wstring">
10183 <desc>
10184 Name of the host network interface the VM is attached to.
10185 </desc>
10186 </attribute>
10187
10188 <attribute name="internalNetwork" type="wstring">
10189 <desc>
10190 Name of the internal network the VM is attached to.
10191 </desc>
10192 </attribute>
10193
10194 <attribute name="NATNetwork" type="wstring">
10195 <desc>
10196 Name of the NAT network the VM is attached to.
10197 </desc>
10198 </attribute>
10199
10200 <attribute name="cableConnected" type="boolean">
10201 <desc>
10202 Flag whether the adapter reports the cable as connected or not.
10203 It can be used to report offline situations to a VM.
10204 </desc>
10205 </attribute>
10206
10207 <attribute name="lineSpeed" type="unsigned long">
10208 <desc>
10209 Line speed reported by custom drivers, in units of 1 kbps.
10210 </desc>
10211 </attribute>
10212
10213 <attribute name="traceEnabled" type="boolean">
10214 <desc>
10215 Flag whether network traffic from/to the network card should be traced.
10216 Can only be toggled when the VM is turned off.
10217 </desc>
10218 </attribute>
10219
10220 <attribute name="traceFile" type="wstring">
10221 <desc>
10222 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10223 will be used.
10224 </desc>
10225 </attribute>
10226
10227 <method name="attachToNAT">
10228 <desc>
10229 Attach the network adapter to the Network Address Translation (NAT) interface.
10230 </desc>
10231 </method>
10232
10233 <method name="attachToHostInterface">
10234 <desc>
10235 Attach the network adapter to a host interface.
10236 </desc>
10237 </method>
10238
10239 <method name="attachToInternalNetwork">
10240 <desc>
10241 Attach the network adapter to an internal network.
10242 </desc>
10243 </method>
10244
10245 <method name="detach">
10246 <desc>
10247 Detach the network adapter
10248 </desc>
10249 </method>
10250 </interface>
10251
10252
10253 <!--
10254 // ISerialPort
10255 /////////////////////////////////////////////////////////////////////////
10256 -->
10257
10258 <enum
10259 name="PortMode"
10260 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
10261 >
10262 <desc>
10263 The PortMode enumeration represents possible communication modes for
10264 the virtual serial port device.
10265 </desc>
10266
10267 <const name="Disconnected" value="0">
10268 <desc>Virtual device is not attached to any real host device.</desc>
10269 </const>
10270 <const name="HostPipe" value="1">
10271 <desc>Virtual device is attached to a host pipe.</desc>
10272 </const>
10273 <const name="HostDevice" value="2">
10274 <desc>Virtual device is attached to a host device.</desc>
10275 </const>
10276 </enum>
10277
10278 <interface
10279 name="ISerialPort" extends="$unknown"
10280 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10281 wsmap="managed"
10282 >
10283
10284 <desc>
10285 The ISerialPort interface represents the virtual serial port device.
10286
10287 The virtual serial port device acts like an ordinary serial port
10288 inside the virtual machine. This device communicates to the real
10289 serial port hardware in one of two modes: host pipe or host device.
10290
10291 In host pipe mode, the #path attribute specifies the path to the pipe on
10292 the host computer that represents a serial port. The #server attribute
10293 determines if this pipe is created by the virtual machine process at
10294 machine startup or it must already exist before starting machine
10295 execution.
10296
10297 In host device mode, the #path attribute specifies the name of the
10298 serial port device on the host computer.
10299
10300 There is also a third communication mode: the disconnected mode. In this
10301 mode, the guest OS running inside the virtual machine will be able to
10302 detect the serial port, but all port write operations will be discarded
10303 and all port read operations will return no data.
10304
10305 <see>IMachine::getSerialPort</see>
10306 </desc>
10307
10308 <attribute name="slot" type="unsigned long" readonly="yes">
10309 <desc>
10310 Slot number this serial port is plugged into. Corresponds to
10311 the value you pass to <link to="IMachine::getSerialPort"/>
10312 to obtain this instance.
10313 </desc>
10314 </attribute>
10315
10316 <attribute name="enabled" type="boolean">
10317 <desc>
10318 Flag whether the serial port is enabled. If disabled,
10319 the serial port will not be reported to the guest OS.
10320 </desc>
10321 </attribute>
10322
10323 <attribute name="IOBase" type="unsigned long">
10324 <desc>Base I/O address of the serial port.</desc>
10325 </attribute>
10326
10327 <attribute name="IRQ" type="unsigned long">
10328 <desc>IRQ number of the serial port.</desc>
10329 </attribute>
10330
10331 <attribute name="hostMode" type="PortMode">
10332 <desc>
10333 How is this port connected to the host.
10334 <note>
10335 Changing this attribute may fail if the conditions for
10336 <link to="#path"/> are not met.
10337 </note>
10338 </desc>
10339 </attribute>
10340
10341 <attribute name="server" type="boolean">
10342 <desc>
10343 Flag whether this serial port acts as a server (creates a new pipe on
10344 the host) or as a client (uses the existing pipe). This attribute is
10345 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10346 </desc>
10347 </attribute>
10348
10349 <attribute name="path" type="wstring">
10350 <desc>
10351 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
10352 PortMode_HostPipe, or the host serial device name when
10353 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
10354 cases, setting a @c null or an empty string as the attribute's value
10355 will result into an error. Otherwise, the value of this property is
10356 ignored.
10357 </desc>
10358 </attribute>
10359
10360 </interface>
10361
10362 <!--
10363 // IParallelPort
10364 /////////////////////////////////////////////////////////////////////////
10365 -->
10366
10367 <interface
10368 name="IParallelPort" extends="$unknown"
10369 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10370 wsmap="managed"
10371 >
10372
10373 <desc>
10374 The IParallelPort interface represents the virtual parallel port device.
10375
10376 The virtual parallel port device acts like an ordinary parallel port
10377 inside the virtual machine. This device communicates to the real
10378 parallel port hardware using the name of the parallel device on the host
10379 computer specified in the #path attribute.
10380
10381 Each virtual parallel port device is assigned a base I/O address and an
10382 IRQ number that will be reported to the guest operating system and used
10383 to operate the given parallel port from within the virtual machine.
10384
10385 <see>IMachine::getParallelPort</see>
10386 </desc>
10387
10388 <attribute name="slot" type="unsigned long" readonly="yes">
10389 <desc>
10390 Slot number this parallel port is plugged into. Corresponds to
10391 the value you pass to <link to="IMachine::getParallelPort"/>
10392 to obtain this instance.
10393 </desc>
10394 </attribute>
10395
10396 <attribute name="enabled" type="boolean">
10397 <desc>
10398 Flag whether the parallel port is enabled. If disabled,
10399 the parallel port will not be reported to the guest OS.
10400 </desc>
10401 </attribute>
10402
10403 <attribute name="IOBase" type="unsigned long">
10404 <desc>Base I/O address of the parallel port.</desc>
10405 </attribute>
10406
10407 <attribute name="IRQ" type="unsigned long">
10408 <desc>IRQ number of the parallel port.</desc>
10409 </attribute>
10410
10411 <attribute name="path" type="wstring">
10412 <desc>
10413 Host parallel device name. If this parallel port is enabled, setting a
10414 @c null or an empty string as this attribute's value will result into
10415 an error.
10416 </desc>
10417 </attribute>
10418
10419 </interface>
10420
10421
10422 <!--
10423 // IMachineDebugger
10424 /////////////////////////////////////////////////////////////////////////
10425 -->
10426
10427 <interface
10428 name="IMachineDebugger" extends="$unknown"
10429 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
10430 wsmap="suppress"
10431 >
10432 <method name="resetStats">
10433 <desc>
10434 Reset VM statistics.
10435 </desc>
10436 <param name="pattern" type="wstring" dir="in">
10437 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10438 </param>
10439 </method>
10440
10441 <method name="dumpStats">
10442 <desc>
10443 Dumps VM statistics.
10444 </desc>
10445 <param name="pattern" type="wstring" dir="in">
10446 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10447 </param>
10448 </method>
10449
10450 <method name="getStats">
10451 <desc>
10452 Get the VM statistics in a XMLish format.
10453 </desc>
10454 <param name="pattern" type="wstring" dir="in">
10455 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10456 </param>
10457 <param name="withDescriptions" type="boolean" dir="in">
10458 <desc>Whether to include the descriptions.</desc>
10459 </param>
10460 <param name="stats" type="wstring" dir="out">
10461 <desc>The XML document containing the statistics.</desc>
10462 </param>
10463 </method>
10464
10465 <method name="injectNMI">
10466 <desc>
10467 Inject an NMI into a running VT-x/AMD-V VM.
10468 </desc>
10469 </method>
10470
10471 <attribute name="singlestep" type="boolean">
10472 <desc>Switch for enabling singlestepping.</desc>
10473 </attribute>
10474
10475 <attribute name="recompileUser" type="boolean">
10476 <desc>Switch for forcing code recompilation for user mode code.</desc>
10477 </attribute>
10478
10479 <attribute name="recompileSupervisor" type="boolean">
10480 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10481 </attribute>
10482
10483 <attribute name="PATMEnabled" type="boolean">
10484 <desc>Switch for enabling and disabling the PATM component.</desc>
10485 </attribute>
10486
10487 <attribute name="CSAMEnabled" type="boolean">
10488 <desc>Switch for enabling and disabling the CSAM component.</desc>
10489 </attribute>
10490
10491 <attribute name="logEnabled" type="boolean">
10492 <desc>Switch for enabling and disabling logging.</desc>
10493 </attribute>
10494
10495 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10496 <desc>
10497 Flag indicating whether the VM is currently making use of CPU hardware
10498 virtualization extensions.
10499 </desc>
10500 </attribute>
10501
10502 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10503 <desc>
10504 Flag indicating whether the VM is currently making use of the nested paging
10505 CPU hardware virtualization extension.
10506 </desc>
10507 </attribute>
10508
10509 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10510 <desc>
10511 Flag indicating whether the VM is currently making use of the VPID
10512 VT-x extension.
10513 </desc>
10514 </attribute>
10515
10516 <attribute name="PAEEnabled" type="boolean" readonly="yes">
10517 <desc>
10518 Flag indicating whether the VM is currently making use of the Physical
10519 Address Extension CPU feature.
10520 </desc>
10521 </attribute>
10522
10523 <attribute name="virtualTimeRate" type="unsigned long">
10524 <desc>
10525 The rate at which the virtual time runs expressed as a percentage.
10526 The accepted range is 2% to 20000%.
10527 </desc>
10528 </attribute>
10529
10530 <!-- @todo method for setting log flags, groups and destination! -->
10531
10532 <attribute name="VM" type="unsigned long long" readonly="yes">
10533 <desc>
10534 Gets the VM handle. This is only for internal use while
10535 we carve the details of this interface.
10536 </desc>
10537 </attribute>
10538
10539 </interface>
10540
10541 <!--
10542 // IUSBController
10543 /////////////////////////////////////////////////////////////////////////
10544 -->
10545
10546 <interface
10547 name="IUSBController" extends="$unknown"
10548 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
10549 wsmap="managed"
10550 >
10551 <attribute name="enabled" type="boolean">
10552 <desc>
10553 Flag whether the USB controller is present in the
10554 guest system. If disabled, the virtual guest hardware will
10555 not contain any USB controller. Can only be changed when
10556 the VM is powered off.
10557 </desc>
10558 </attribute>
10559
10560 <attribute name="enabledEhci" type="boolean">
10561 <desc>
10562 Flag whether the USB EHCI controller is present in the
10563 guest system. If disabled, the virtual guest hardware will
10564 not contain a USB EHCI controller. Can only be changed when
10565 the VM is powered off.
10566 </desc>
10567 </attribute>
10568
10569 <attribute name="USBStandard" type="unsigned short" readonly="yes">
10570 <desc>
10571 USB standard version which the controller implements.
10572 This is a BCD which means that the major version is in the
10573 high byte and minor version is in the low byte.
10574 </desc>
10575 </attribute>
10576
10577 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
10578 <desc>
10579 List of USB device filters associated with the machine.
10580
10581 If the machine is currently running, these filters are activated
10582 every time a new (supported) USB device is attached to the host
10583 computer that was not ignored by global filters
10584 (<link to="IHost::USBDeviceFilters"/>).
10585
10586 These filters are also activated when the machine is powered up.
10587 They are run against a list of all currently available USB
10588 devices (in states
10589 <link to="USBDeviceState_Available"/>,
10590 <link to="USBDeviceState_Busy"/>,
10591 <link to="USBDeviceState_Held"/>) that were not previously
10592 ignored by global filters.
10593
10594 If at least one filter matches the USB device in question, this
10595 device is automatically captured (attached to) the virtual USB
10596 controller of this machine.
10597
10598 <see>IUSBDeviceFilter, ::IUSBController</see>
10599 </desc>
10600 </attribute>
10601
10602 <method name="createDeviceFilter">
10603 <desc>
10604 Creates a new USB device filter. All attributes except
10605 the filter name are set to <tt>null</tt> (any match),
10606 <i>active</i> is <tt>false</tt> (the filter is not active).
10607
10608 The created filter can then be added to the list of filters using
10609 <link to="#insertDeviceFilter()"/>.
10610
10611 <result name="VBOX_E_INVALID_VM_STATE">
10612 The virtual machine is not mutable.
10613 </result>
10614
10615 <see>#deviceFilters</see>
10616 </desc>
10617 <param name="name" type="wstring" dir="in">
10618 <desc>
10619 Filter name. See <link to="IUSBDeviceFilter::name"/>
10620 for more info.
10621 </desc>
10622 </param>
10623 <param name="filter" type="IUSBDeviceFilter" dir="return">
10624 <desc>Created filter object.</desc>
10625 </param>
10626 </method>
10627
10628 <method name="insertDeviceFilter">
10629 <desc>
10630 Inserts the given USB device to the specified position
10631 in the list of filters.
10632
10633 Positions are numbered starting from <tt>0</tt>. If the specified
10634 position is equal to or greater than the number of elements in
10635 the list, the filter is added to the end of the collection.
10636
10637 <note>
10638 Duplicates are not allowed, so an attempt to insert a
10639 filter that is already in the collection, will return an
10640 error.
10641 </note>
10642
10643 <result name="VBOX_E_INVALID_VM_STATE">
10644 Virtual machine is not mutable.
10645 </result>
10646 <result name="E_INVALIDARG">
10647 USB device filter not created within this VirtualBox instance.
10648 </result>
10649 <result name="VBOX_E_INVALID_OBJECT_STATE">
10650 USB device filter already in list.
10651 </result>
10652
10653 <see>#deviceFilters</see>
10654 </desc>
10655 <param name="position" type="unsigned long" dir="in">
10656 <desc>Position to insert the filter to.</desc>
10657 </param>
10658 <param name="filter" type="IUSBDeviceFilter" dir="in">
10659 <desc>USB device filter to insert.</desc>
10660 </param>
10661 </method>
10662
10663 <method name="removeDeviceFilter">
10664 <desc>
10665 Removes a USB device filter from the specified position in the
10666 list of filters.
10667
10668 Positions are numbered starting from <tt>0</tt>. Specifying a
10669 position equal to or greater than the number of elements in
10670 the list will produce an error.
10671
10672 <see>#deviceFilters</see>
10673
10674 <result name="VBOX_E_INVALID_VM_STATE">
10675 Virtual machine is not mutable.
10676 </result>
10677 <result name="E_INVALIDARG">
10678 USB device filter list empty or invalid @a position.
10679 </result>
10680
10681 </desc>
10682 <param name="position" type="unsigned long" dir="in">
10683 <desc>Position to remove the filter from.</desc>
10684 </param>
10685 <param name="filter" type="IUSBDeviceFilter" dir="return">
10686 <desc>Removed USB device filter.</desc>
10687 </param>
10688 </method>
10689
10690 </interface>
10691
10692
10693 <!--
10694 // IUSBDevice
10695 /////////////////////////////////////////////////////////////////////////
10696 -->
10697
10698 <enumerator
10699 name="IUSBDeviceEnumerator" type="IUSBDevice"
10700 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
10701 />
10702
10703 <collection
10704 name="IUSBDeviceCollection" type="IUSBDevice"
10705 enumerator="IUSBDeviceEnumerator"
10706 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
10707 readonly="yes"
10708 >
10709 <method name="findById">
10710 <desc>
10711 Searches this collection for a USB device with the given UUID.
10712 <note>
10713 The method returns an error if the given UUID does not
10714 correspond to any USB device in the collection.
10715 </note>
10716 <see>IUSBDevice::id</see>
10717 </desc>
10718 <param name="id" type="uuid" dir="in">
10719 <desc>UUID of the USB device to search for.</desc>
10720 </param>
10721 <param name="device" type="IUSBDevice" dir="return">
10722 <desc>Found USB device object.</desc>
10723 </param>
10724 </method>
10725
10726 <method name="findByAddress">
10727 <desc>
10728 Searches this collection for a USB device with the given
10729 host address.
10730 <note>
10731 The method returns an error if the given address does not
10732 correspond to any USB device in the collection.
10733 </note>
10734 <see>IUSBDevice::address</see>
10735 </desc>
10736 <param name="name" type="wstring" dir="in">
10737 <desc>
10738 Address of the USB device (as assigned by the host) to
10739 search for.
10740 </desc>
10741 </param>
10742 <param name="device" type="IUSBDevice" dir="return">
10743 <desc>Found USB device object.</desc>
10744 </param>
10745 </method>
10746
10747 </collection>
10748
10749 <interface
10750 name="IUSBDevice" extends="$unknown"
10751 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
10752 wsmap="managed"
10753 >
10754 <desc>
10755 The IUSBDevice interface represents a virtual USB device attached to the
10756 virtual machine.
10757
10758 A collection of objects implementing this interface is stored in the
10759 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
10760 attached to a running virtual machine's USB controller.
10761 </desc>
10762
10763 <attribute name="id" type="uuid" readonly="yes">
10764 <desc>
10765 Unique USB device ID. This ID is built from #vendorId,
10766 #productId, #revision and #serialNumber.
10767 </desc>
10768 </attribute>
10769
10770 <attribute name="vendorId" type="unsigned short" readonly="yes">
10771 <desc>Vendor ID.</desc>
10772 </attribute>
10773
10774 <attribute name="productId" type="unsigned short" readonly="yes">
10775 <desc>Product ID.</desc>
10776 </attribute>
10777
10778 <attribute name="revision" type="unsigned short" readonly="yes">
10779 <desc>
10780 Product revision number. This is a packed BCD represented as
10781 unsigned short. The high byte is the integer part and the low
10782 byte is the decimal.
10783 </desc>
10784 </attribute>
10785
10786 <attribute name="manufacturer" type="wstring" readonly="yes">
10787 <desc>Manufacturer string.</desc>
10788 </attribute>
10789
10790 <attribute name="product" type="wstring" readonly="yes">
10791 <desc>Product string.</desc>
10792 </attribute>
10793
10794 <attribute name="serialNumber" type="wstring" readonly="yes">
10795 <desc>Serial number string.</desc>
10796 </attribute>
10797
10798 <attribute name="address" type="wstring" readonly="yes">
10799 <desc>Host specific address of the device.</desc>
10800 </attribute>
10801
10802 <attribute name="port" type="unsigned short" readonly="yes">
10803 <desc>
10804 Host USB port number the device is physically
10805 connected to.
10806 </desc>
10807 </attribute>
10808
10809 <attribute name="version" type="unsigned short" readonly="yes">
10810 <desc>
10811 The major USB version of the device - 1 or 2.
10812 </desc>
10813 </attribute>
10814
10815 <attribute name="portVersion" type="unsigned short" readonly="yes">
10816 <desc>
10817 The major USB version of the host USB port the device is
10818 physically connected to - 1 or 2. For devices not connected to
10819 anything this will have the same value as the version attribute.
10820 </desc>
10821 </attribute>
10822
10823 <attribute name="remote" type="boolean" readonly="yes">
10824 <desc>
10825 Whether the device is physically connected to a remote VRDP
10826 client or to a local host machine.
10827 </desc>
10828 </attribute>
10829
10830 </interface>
10831
10832
10833 <!--
10834 // IUSBDeviceFilter
10835 /////////////////////////////////////////////////////////////////////////
10836 -->
10837
10838 <enumerator
10839 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
10840 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
10841 />
10842
10843 <collection
10844 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
10845 enumerator="IUSBDeviceFilterEnumerator"
10846 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
10847 readonly="yes"
10848 />
10849
10850 <interface
10851 name="IUSBDeviceFilter" extends="$unknown"
10852 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
10853 wsmap="managed"
10854 >
10855 <desc>
10856 The IUSBDeviceFilter interface represents an USB device filter used
10857 to perform actions on a group of USB devices.
10858
10859 This type of filters is used by running virtual machines to
10860 automatically capture selected USB devices once they are physically
10861 attached to the host computer.
10862
10863 A USB device is matched to the given device filter if and only if all
10864 attributes of the device match the corresponding attributes of the
10865 filter (that is, attributes are joined together using the logical AND
10866 operation). On the other hand, all together, filters in the list of
10867 filters carry the semantics of the logical OR operation. So if it is
10868 desirable to create a match like "this vendor id OR this product id",
10869 one needs to create two filters and specify "any match" (see below)
10870 for unused attributes.
10871
10872 All filter attributes used for matching are strings. Each string
10873 is an expression representing a set of values of the corresponding
10874 device attribute, that will match the given filter. Currently, the
10875 following filtering expressions are supported:
10876
10877 <ul>
10878 <li><i>Interval filters</i>. Used to specify valid intervals for
10879 integer device attributes (Vendor ID, Product ID and Revision).
10880 The format of the string is:
10881
10882 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
10883
10884 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
10885 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
10886 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
10887 is omitted before a dash (<tt>-</tt>), the minimum possible integer
10888 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
10889 possible integer is assumed.
10890 </li>
10891 <li><i>Boolean filters</i>. Used to specify acceptable values for
10892 boolean device attributes. The format of the string is:
10893
10894 <tt>true|false|yes|no|0|1</tt>
10895
10896 </li>
10897 <li><i>Exact match</i>. Used to specify a single value for the given
10898 device attribute. Any string that doesn't start with <tt>int:</tt>
10899 represents the exact match. String device attributes are compared to
10900 this string including case of symbols. Integer attributes are first
10901 converted to a string (see individual filter attributes) and then
10902 compared ignoring case.
10903
10904 </li>
10905 <li><i>Any match</i>. Any value of the corresponding device attribute
10906 will match the given filter. An empty or <tt>null</tt> string is
10907 used to construct this type of filtering expressions.
10908
10909 </li>
10910 </ul>
10911
10912 <note>
10913 On the Windows host platform, interval filters are not currently
10914 available. Also all string filter attributes
10915 (<link to="#manufacturer"/>, <link to="#product"/>,
10916 <link to="#serialNumber"/>) are ignored, so they behave as
10917 <i>any match</i> no matter what string expression is specified.
10918 </note>
10919
10920 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
10921 </desc>
10922
10923 <attribute name="name" type="wstring">
10924 <desc>
10925 Visible name for this filter.
10926 This name is used to visually distinguish one filter from another,
10927 so it can neither be <tt>null</tt> nor an empty string.
10928 </desc>
10929 </attribute>
10930
10931 <attribute name="active" type="boolean">
10932 <desc>Whether this filter active or has been temporarily disabled.</desc>
10933 </attribute>
10934
10935 <attribute name="vendorId" type="wstring">
10936 <desc>
10937 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
10938 The string representation for the <i>exact matching</i>
10939 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10940 (including leading zeroes).
10941 </desc>
10942 </attribute>
10943
10944 <attribute name="productId" type="wstring">
10945 <desc>
10946 <link to="IUSBDevice::productId">Product ID</link> filter.
10947 The string representation for the <i>exact matching</i>
10948 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10949 (including leading zeroes).
10950 </desc>
10951 </attribute>
10952
10953 <attribute name="revision" type="wstring">
10954 <desc>
10955 <link to="IUSBDevice::productId">Product revision number</link>
10956 filter. The string representation for the <i>exact matching</i>
10957 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
10958 of the integer part of the revision, and <tt>F</tt> is the
10959 decimal digit of its fractional part (including leading and
10960 trailing zeros).
10961 Note that for interval filters, it's best to use the hexadecimal
10962 form, because the revision is stored as a 16 bit packed BCD value;
10963 so the expression <tt>int:0x0100-0x0199</tt> will match any
10964 revision from <tt>1.0</tt> to <tt>1.99</tt>.
10965 </desc>
10966 </attribute>
10967
10968 <attribute name="manufacturer" type="wstring">
10969 <desc>
10970 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
10971 </desc>
10972 </attribute>
10973
10974 <attribute name="product" type="wstring">
10975 <desc>
10976 <link to="IUSBDevice::product">Product</link> filter.
10977 </desc>
10978 </attribute>
10979
10980 <attribute name="serialNumber" type="wstring">
10981 <desc>
10982 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
10983 </desc>
10984 </attribute>
10985
10986 <attribute name="port" type="wstring">
10987 <desc>
10988 <link to="IUSBDevice::port">Host USB port</link> filter.
10989 </desc>
10990 </attribute>
10991
10992 <attribute name="remote" type="wstring">
10993 <desc>
10994 <link to="IUSBDevice::remote">Remote state</link> filter.
10995 <note>
10996 This filter makes sense only for machine USB filters,
10997 i.e. it is ignored by IHostUSBDeviceFilter objects.
10998 </note>
10999 </desc>
11000 </attribute>
11001
11002 <attribute name="maskedInterfaces" type="unsigned long">
11003 <desc>
11004 This is an advanced option for hiding one or more USB interfaces
11005 from the guest. The value is a bit mask where the bits that are set
11006 means the corresponding USB interface should be hidden, masked off
11007 if you like.
11008 This feature only works on Linux hosts.
11009 </desc>
11010 </attribute>
11011
11012 </interface>
11013
11014
11015 <!--
11016 // IHostUSBDevice
11017 /////////////////////////////////////////////////////////////////////////
11018 -->
11019
11020 <enum
11021 name="USBDeviceState"
11022 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11023 >
11024 <desc>
11025 USB device state. This enumeration represents all possible states
11026 of the USB device physically attached to the host computer regarding
11027 its state on the host computer and availability to guest computers
11028 (all currently running virtual machines).
11029
11030 Once a supported USB device is attached to the host, global USB
11031 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11032 either ignore the device, or put it to USBDeviceState_Held state, or do
11033 nothing. Unless the device is ignored by global filters, filters of all
11034 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11035 activated that can put it to USBDeviceState_Captured state.
11036
11037 If the device was ignored by global filters, or didn't match
11038 any filters at all (including guest ones), it is handled by the host
11039 in a normal way. In this case, the device state is determined by
11040 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11041 or USBDeviceState_Available, depending on the current device usage.
11042
11043 Besides auto-capturing based on filters, the device can be manually
11044 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
11045 state is USBDeviceState_Busy, USBDeviceState_Available or
11046 USBDeviceState_Held.
11047
11048 <note>
11049 Due to differences in USB stack implementations in Linux and Win32,
11050 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11051 only to the Linux version of the product. This also means that (<link
11052 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if the
11053 device state is USBDeviceState_Held.
11054 </note>
11055
11056 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11057 </desc>
11058
11059 <const name="NotSupported" value="0">
11060 <desc>
11061 Not supported by the VirtualBox server, not available to guests.
11062 </desc>
11063 </const>
11064 <const name="Unavailable" value="1">
11065 <desc>
11066 Being used by the host computer exclusively,
11067 not available to guests.
11068 </desc>
11069 </const>
11070 <const name="Busy" value="2">
11071 <desc>
11072 Being used by the host computer, potentially available to guests.
11073 </desc>
11074 </const>
11075 <const name="Available" value="3">
11076 <desc>
11077 Not used by the host computer, available to guests (the host computer
11078 can also start using the device at any time).
11079 </desc>
11080 </const>
11081 <const name="Held" value="4">
11082 <desc>
11083 Held by the VirtualBox server (ignored by the host computer),
11084 available to guests.
11085 </desc>
11086 </const>
11087 <const name="Captured" value="5">
11088 <desc>
11089 Captured by one of the guest computers, not available
11090 to anybody else.
11091 </desc>
11092 </const>
11093 </enum>
11094
11095 <enumerator
11096 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
11097 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
11098 />
11099
11100 <collection
11101 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
11102 enumerator="IHostUSBDeviceEnumerator"
11103 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
11104 readonly="yes"
11105 >
11106 <method name="findById">
11107 <desc>
11108 Searches this collection for a USB device with the given UUID.
11109 <note>
11110 The method returns an error if the given UUID does not
11111 correspond to any USB device in the collection.
11112 </note>
11113 <see>IHostUSBDevice::id</see>
11114 </desc>
11115 <param name="id" type="uuid" dir="in">
11116 <desc>UUID of the USB device to search for.</desc>
11117 </param>
11118 <param name="device" type="IHostUSBDevice" dir="return">
11119 <desc>Found USB device object.</desc>
11120 </param>
11121 </method>
11122
11123 <method name="findByAddress">
11124 <desc>
11125 Searches this collection for a USB device with the given
11126 host address.
11127 <note>
11128 The method returns an error if the given address does not
11129 correspond to any USB device in the collection.
11130 </note>
11131 <see>IHostUSBDevice::address</see>
11132 </desc>
11133 <param name="name" type="wstring" dir="in">
11134 <desc>
11135 Address of the USB device (as assigned by the host) to
11136 search for.
11137 </desc>
11138 </param>
11139 <param name="device" type="IHostUSBDevice" dir="return">
11140 <desc>Found USB device object.</desc>
11141 </param>
11142 </method>
11143
11144 </collection>
11145
11146 <interface
11147 name="IHostUSBDevice" extends="IUSBDevice"
11148 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11149 wsmap="managed"
11150 >
11151 <desc>
11152 The IHostUSBDevice interface represents a physical USB device attached
11153 to the host computer.
11154
11155 Besides properties inherited from IUSBDevice, this interface adds the
11156 <link to="#state"/> property that holds the current state of the USB
11157 device.
11158
11159 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11160 </desc>
11161
11162 <attribute name="state" type="USBDeviceState" readonly="yes">
11163 <desc>
11164 Current state of the device.
11165 </desc>
11166 </attribute>
11167
11168 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11169
11170 </interface>
11171
11172
11173 <!--
11174 // IHostUSBDeviceFilter
11175 /////////////////////////////////////////////////////////////////////////
11176 -->
11177
11178 <enum
11179 name="USBDeviceFilterAction"
11180 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11181 >
11182 <desc>
11183 Actions for host USB device filters.
11184 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11185 </desc>
11186
11187 <const name="Null" value="0">
11188 <desc>Null value (never used by the API).</desc>
11189 </const>
11190 <const name="Ignore" value="1">
11191 <desc>Ignore the matched USB device.</desc>
11192 </const>
11193 <const name="Hold" value="2">
11194 <desc>Hold the matched USB device.</desc>
11195 </const>
11196 </enum>
11197
11198 <enumerator
11199 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
11200 uuid="ff735211-903e-4642-9c37-189eb44579fe"
11201 />
11202
11203 <collection
11204 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
11205 enumerator="IHostUSBDeviceFilterEnumerator"
11206 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
11207 readonly="yes"
11208 />
11209
11210 <interface
11211 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11212 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11213 wsmap="managed"
11214 >
11215 <desc>
11216 The IHostUSBDeviceFilter interface represents a global filter for a
11217 physical USB device used by the host computer. Used indirectly in
11218 <link to="IHost::USBDeviceFilters"/>.
11219
11220 Using filters of this type, the host computer determines the initial
11221 state of the USB device after it is physically attached to the
11222 host's USB controller.
11223
11224 <note>
11225 The <link to="#remote"/> attribute is ignored by this type of
11226 filters, because it makes sense only for
11227 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11228 </note>
11229
11230 <see>IHost::USBDeviceFilters</see>
11231 </desc>
11232
11233 <attribute name="action" type="USBDeviceFilterAction">
11234 <desc>
11235 Action performed by the host when an attached USB device
11236 matches this filter.
11237 </desc>
11238 </attribute>
11239
11240 </interface>
11241
11242 <!--
11243 // IAudioAdapter
11244 /////////////////////////////////////////////////////////////////////////
11245 -->
11246
11247 <enum
11248 name="AudioDriverType"
11249 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11250 >
11251 <desc>
11252 Host audio driver type.
11253 </desc>
11254
11255 <const name="Null" value="0">
11256 <desc>Null value, also means "dummy audio driver".</desc>
11257 </const>
11258 <const name="WinMM" value="1"/>
11259 <const name="OSS" value="2"/>
11260 <const name="ALSA" value="3"/>
11261 <const name="DirectSound" value="4"/>
11262 <const name="CoreAudio" value="5"/>
11263 <const name="MMPM" value="6"/>
11264 <const name="Pulse" value="7"/>
11265 <const name="SolAudio" value="8"/>
11266 </enum>
11267
11268 <enum
11269 name="AudioControllerType"
11270 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11271 >
11272 <desc>
11273 Virtual audio controller type.
11274 </desc>
11275
11276 <const name="AC97" value="0"/>
11277 <const name="SB16" value="1"/>
11278 </enum>
11279
11280 <interface
11281 name="IAudioAdapter" extends="$unknown"
11282 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11283 wsmap="managed"
11284 >
11285 <desc>
11286 The IAudioAdapter interface represents the virtual audio adapter of
11287 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11288 </desc>
11289 <attribute name="enabled" type="boolean">
11290 <desc>
11291 Flag whether the audio adapter is present in the
11292 guest system. If disabled, the virtual guest hardware will
11293 not contain any audio adapter. Can only be changed when
11294 the VM is not running.
11295 </desc>
11296 </attribute>
11297 <attribute name="audioController" type="AudioControllerType">
11298 <desc>
11299 The audio hardware we emulate.
11300 </desc>
11301 </attribute>
11302 <attribute name="audioDriver" type="AudioDriverType">
11303 <desc>
11304 Audio driver the adapter is connected to. This setting
11305 can only be changed when the VM is not running.
11306 </desc>
11307 </attribute>
11308 </interface>
11309
11310 <!--
11311 // IVRDPServer
11312 /////////////////////////////////////////////////////////////////////////
11313 -->
11314
11315 <enum
11316 name="VRDPAuthType"
11317 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11318 >
11319 <desc>
11320 VRDP authentication type.
11321 </desc>
11322
11323 <const name="Null" value="0">
11324 <desc>Null value, also means "no authentication".</desc>
11325 </const>
11326 <const name="External" value="1"/>
11327 <const name="Guest" value="2"/>
11328 </enum>
11329
11330 <interface
11331 name="IVRDPServer" extends="$unknown"
11332 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11333 wsmap="managed"
11334 >
11335 <attribute name="enabled" type="boolean">
11336 <desc>VRDP server status.</desc>
11337 </attribute>
11338
11339 <attribute name="port" type="unsigned long">
11340 <desc>
11341 VRDP server port number.
11342 <note>
11343 Setting the value of this property to <tt>0</tt> will reset the port
11344 number to the default value which is
11345 currently <tt>3389</tt>. Reading this property will always return a
11346 real port number, even after it has been set to <tt>0</tt> (in which
11347 case the default port is returned).
11348 </note>
11349 </desc>
11350 </attribute>
11351
11352 <attribute name="netAddress" type="wstring">
11353 <desc>VRDP server address.</desc>
11354 </attribute>
11355
11356 <attribute name="authType" type="VRDPAuthType">
11357 <desc>VRDP authentication method.</desc>
11358 </attribute>
11359
11360 <attribute name="authTimeout" type="unsigned long">
11361 <desc>Timeout for guest authentication. Milliseconds.</desc>
11362 </attribute>
11363
11364 <attribute name="allowMultiConnection" type="boolean">
11365 <desc>
11366 Flag whether multiple simultaneous connections to the VM are permitted.
11367 Note that this will be replaced by a more powerful mechanism in the future.
11368 </desc>
11369 </attribute>
11370
11371 <attribute name="reuseSingleConnection" type="boolean">
11372 <desc>
11373 Flag whether the existing connection must be dropped and a new connection
11374 must be established by the VRDP server, when a new client connects in single
11375 connection mode.
11376 </desc>
11377 </attribute>
11378
11379 </interface>
11380
11381
11382 <!--
11383 // ISharedFolder
11384 /////////////////////////////////////////////////////////////////////////
11385 -->
11386
11387 <enumerator
11388 name="ISharedFolderEnumerator" type="ISharedFolder"
11389 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
11390 />
11391
11392 <collection
11393 name="ISharedFolderCollection" type="ISharedFolder"
11394 enumerator="ISharedFolderEnumerator"
11395 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
11396 readonly="yes">
11397
11398 <method name="findByName">
11399 <desc>
11400 Searches this collection for a shared folder with the given logical
11401 name.
11402 <note>
11403 The method returns an error if the given name does not correspond to
11404 any shared folder in the collection.
11405 </note>
11406 </desc>
11407 <param name="name" type="wstring" dir="in">
11408 <desc>Logical name of the shared folder to search for</desc>
11409 </param>
11410 <param name="sharedFolder" type="ISharedFolder" dir="return">
11411 <desc>Found shared folder object</desc>
11412 </param>
11413 </method>
11414
11415 </collection>
11416
11417 <interface
11418 name="ISharedFolder" extends="$unknown"
11419 uuid="ef41869b-ef31-4b30-8e8f-95af35c0e378"
11420 wsmap="struct"
11421 >
11422 <desc>
11423 The ISharedFolder interface represents a folder in the host computer's
11424 file system accessible from the guest OS running inside a virtual
11425 machine using an associated logical name.
11426
11427 There are three types of shared folders:
11428 <ul>
11429 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11430 folders available to all virtual machines.</li>
11431 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11432 VM-specific shared folders available to the given virtual machine at
11433 startup.</li>
11434 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11435 VM-specific shared folders created in the session context (for
11436 example, when the virtual machine is running) and automatically
11437 discarded when the session is closed (the VM is powered off).</li>
11438 </ul>
11439
11440 Logical names of shared folders must be unique within the given scope
11441 (global, permanent or transient). However, they do not need to be unique
11442 across scopes. In this case, the definition of the shared folder in a
11443 more specific scope takes precedence over definitions in all other
11444 scopes. The order of precedence is (more specific to more general):
11445 <ol>
11446 <li>Transient definitions</li>
11447 <li>Permanent definitions</li>
11448 <li>Global definitions</li>
11449 </ol>
11450
11451 For example, if MyMachine has a shared folder named
11452 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11453 transient shared folder named <tt>C_DRIVE</tt> (that points
11454 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11455 of <tt>C_DRIVE</tt> in the guest OS so
11456 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11457 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11458 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11459 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11460 to <tt>C:\\</tt> if it still exists.
11461
11462 Note that permanent and transient shared folders of different machines
11463 are in different name spaces, so they don't overlap and don't need to
11464 have unique logical names.
11465
11466 <note>
11467 Global shared folders are not implemented in the current version of the
11468 product.
11469 </note>
11470 </desc>
11471
11472 <attribute name="name" type="wstring" readonly="yes">
11473 <desc>Logical name of the shared folder.</desc>
11474 </attribute>
11475
11476 <attribute name="hostPath" type="wstring" readonly="yes">
11477 <desc>Full path to the shared folder in the host file system.</desc>
11478 </attribute>
11479
11480 <attribute name="accessible" type="boolean" readonly="yes">
11481 <desc>
11482 Whether the folder defined by the host path is currently
11483 accessible or not.
11484 For example, the folder can be unaccessible if it is placed
11485 on the network share that is not available by the time
11486 this property is read.
11487 </desc>
11488 </attribute>
11489
11490 <attribute name="writable" type="boolean" readonly="yes">
11491 <desc>
11492 Whether the folder defined by the host path is writable or
11493 not.
11494 </desc>
11495 </attribute>
11496
11497 <attribute name="lastAccessError" type="wstring" readonly="yes">
11498 <desc>
11499 Text message that represents the result of the last accessibility
11500 check.
11501
11502 Accessibility checks are performed each time the <link to="#accessible"/>
11503 attribute is read. A @c null string is returned if the last
11504 accessibility check was successful. A non-null string indicates a
11505 failure and should normally describe a reason of the failure (for
11506 example, a file read error).
11507 </desc>
11508 </attribute>
11509
11510 </interface>
11511
11512 <!--
11513 // ISession
11514 /////////////////////////////////////////////////////////////////////////
11515 -->
11516
11517 <interface
11518 name="IInternalSessionControl" extends="$unknown"
11519 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11520 internal="yes"
11521 wsmap="suppress"
11522 >
11523 <method name="getPID">
11524 <desc>PID of the process that has created this Session object.
11525 </desc>
11526 <param name="pid" type="unsigned long" dir="return"/>
11527 </method>
11528
11529 <method name="getRemoteConsole">
11530 <desc>
11531 Returns the console object suitable for remote control.
11532
11533 <result name="VBOX_E_INVALID_VM_STATE">
11534 Session state prevents operation.
11535 </result>
11536 <result name="VBOX_E_INVALID_OBJECT_STATE">
11537 Session type prevents operation.
11538 </result>
11539
11540 </desc>
11541 <param name="console" type="IConsole" dir="return"/>
11542 </method>
11543
11544 <method name="assignMachine">
11545 <desc>
11546 Assigns the machine object associated with this direct-type
11547 session or informs the session that it will be a remote one
11548 (if @a machine == NULL).
11549
11550 <result name="VBOX_E_INVALID_VM_STATE">
11551 Session state prevents operation.
11552 </result>
11553 <result name="VBOX_E_INVALID_OBJECT_STATE">
11554 Session type prevents operation.
11555 </result>
11556
11557 </desc>
11558 <param name="machine" type="IMachine" dir="in"/>
11559 </method>
11560
11561 <method name="assignRemoteMachine">
11562 <desc>
11563 Assigns the machine and the (remote) console object associated with
11564 this remote-type session.
11565
11566 <result name="VBOX_E_INVALID_VM_STATE">
11567 Session state prevents operation.
11568 </result>
11569
11570 </desc>
11571 <param name="machine" type="IMachine" dir="in"/>
11572 <param name="console" type="IConsole" dir="in"/>
11573 </method>
11574
11575 <method name="updateMachineState">
11576 <desc>
11577 Updates the machine state in the VM process.
11578 Must be called only in certain cases
11579 (see the method implementation).
11580
11581 <result name="VBOX_E_INVALID_VM_STATE">
11582 Session state prevents operation.
11583 </result>
11584 <result name="VBOX_E_INVALID_OBJECT_STATE">
11585 Session type prevents operation.
11586 </result>
11587
11588 </desc>
11589 <param name="aMachineState" type="MachineState" dir="in"/>
11590 </method>
11591
11592 <method name="uninitialize">
11593 <desc>
11594 Uninitializes (closes) this session. Used by VirtualBox to close
11595 the corresponding remote session when the direct session dies
11596 or gets closed.
11597
11598 <result name="VBOX_E_INVALID_VM_STATE">
11599 Session state prevents operation.
11600 </result>
11601
11602 </desc>
11603 </method>
11604
11605 <method name="onDVDDriveChange">
11606 <desc>
11607 Triggered when settings of the DVD drive object of the
11608 associated virtual machine have changed.
11609
11610 <result name="VBOX_E_INVALID_VM_STATE">
11611 Session state prevents operation.
11612 </result>
11613 <result name="VBOX_E_INVALID_OBJECT_STATE">
11614 Session type prevents operation.
11615 </result>
11616
11617 </desc>
11618 </method>
11619
11620 <method name="onFloppyDriveChange">
11621 <desc>
11622 Triggered when settings of the floppy drive object of the
11623 associated virtual machine have changed.
11624
11625 <result name="VBOX_E_INVALID_VM_STATE">
11626 Session state prevents operation.
11627 </result>
11628 <result name="VBOX_E_INVALID_OBJECT_STATE">
11629 Session type prevents operation.
11630 </result>
11631
11632 </desc>
11633 </method>
11634
11635 <method name="onNetworkAdapterChange">
11636 <desc>
11637 Triggered when settings of a network adapter of the
11638 associated virtual machine have changed.
11639
11640 <result name="VBOX_E_INVALID_VM_STATE">
11641 Session state prevents operation.
11642 </result>
11643 <result name="VBOX_E_INVALID_OBJECT_STATE">
11644 Session type prevents operation.
11645 </result>
11646
11647 </desc>
11648 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11649 </method>
11650
11651 <method name="onSerialPortChange">
11652 <desc>
11653 Triggered when settings of a serial port of the
11654 associated virtual machine have changed.
11655
11656 <result name="VBOX_E_INVALID_VM_STATE">
11657 Session state prevents operation.
11658 </result>
11659 <result name="VBOX_E_INVALID_OBJECT_STATE">
11660 Session type prevents operation.
11661 </result>
11662
11663 </desc>
11664 <param name="serialPort" type="ISerialPort" dir="in"/>
11665 </method>
11666
11667 <method name="onParallelPortChange">
11668 <desc>
11669 Triggered when settings of a parallel port of the
11670 associated virtual machine have changed.
11671
11672 <result name="VBOX_E_INVALID_VM_STATE">
11673 Session state prevents operation.
11674 </result>
11675 <result name="VBOX_E_INVALID_OBJECT_STATE">
11676 Session type prevents operation.
11677 </result>
11678
11679 </desc>
11680 <param name="parallelPort" type="IParallelPort" dir="in"/>
11681 </method>
11682
11683 <method name="onVRDPServerChange">
11684 <desc>
11685 Triggered when settings of the VRDP server object of the
11686 associated virtual machine have changed.
11687
11688 <result name="VBOX_E_INVALID_VM_STATE">
11689 Session state prevents operation.
11690 </result>
11691 <result name="VBOX_E_INVALID_OBJECT_STATE">
11692 Session type prevents operation.
11693 </result>
11694
11695 </desc>
11696 </method>
11697
11698 <method name="onUSBControllerChange">
11699 <desc>
11700 Triggered when settings of the USB controller object of the
11701 associated virtual machine have changed.
11702
11703 <result name="VBOX_E_INVALID_VM_STATE">
11704 Session state prevents operation.
11705 </result>
11706 <result name="VBOX_E_INVALID_OBJECT_STATE">
11707 Session type prevents operation.
11708 </result>
11709
11710 </desc>
11711 </method>
11712
11713 <method name="onSharedFolderChange">
11714 <desc>
11715 Triggered when a permanent (global or machine) shared folder has been
11716 created or removed.
11717 <note>
11718 We don't pass shared folder parameters in this notification because
11719 the order in which parallel notifications are delivered is not defined,
11720 therefore it could happen that these parameters were outdated by the
11721 time of processing this notification.
11722 </note>
11723
11724 <result name="VBOX_E_INVALID_VM_STATE">
11725 Session state prevents operation.
11726 </result>
11727 <result name="VBOX_E_INVALID_OBJECT_STATE">
11728 Session type prevents operation.
11729 </result>
11730
11731 </desc>
11732 <param name="global" type="boolean" dir="in"/>
11733 </method>
11734
11735 <method name="onUSBDeviceAttach">
11736 <desc>
11737 Triggered when a request to capture a USB device (as a result
11738 of matched USB filters or direct call to
11739 <link to="IConsole::attachUSBDevice"/>) has completed.
11740 A @c null @a error object means success, otherwise it
11741 describes a failure.
11742
11743 <result name="VBOX_E_INVALID_VM_STATE">
11744 Session state prevents operation.
11745 </result>
11746 <result name="VBOX_E_INVALID_OBJECT_STATE">
11747 Session type prevents operation.
11748 </result>
11749
11750 </desc>
11751 <param name="device" type="IUSBDevice" dir="in"/>
11752 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11753 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
11754 </method>
11755
11756 <method name="onUSBDeviceDetach">
11757 <desc>
11758 Triggered when a request to release the USB device (as a result
11759 of machine termination or direct call to
11760 <link to="IConsole::detachUSBDevice"/>) has completed.
11761 A @c null @a error object means success, otherwise it
11762
11763 <result name="VBOX_E_INVALID_VM_STATE">
11764 Session state prevents operation.
11765 </result>
11766 <result name="VBOX_E_INVALID_OBJECT_STATE">
11767 Session type prevents operation.
11768 </result>
11769
11770 </desc>
11771 <param name="id" type="uuid" dir="in"/>
11772 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11773 </method>
11774
11775 <method name="onShowWindow">
11776 <desc>
11777 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
11778 <link to="IMachine::showConsoleWindow()"/> in order to notify
11779 console callbacks
11780 <link to="IConsoleCallback::onCanShowWindow()"/>
11781 and <link to="IConsoleCallback::onShowWindow()"/>.
11782
11783 <result name="VBOX_E_INVALID_OBJECT_STATE">
11784 Session type prevents operation.
11785 </result>
11786
11787 </desc>
11788 <param name="check" type="boolean" dir="in"/>
11789 <param name="canShow" type="boolean" dir="out"/>
11790 <param name="winId" type="unsigned long long" dir="out"/>
11791 </method>
11792
11793 <method name="accessGuestProperty">
11794 <desc>
11795 Called by <link to="IMachine::getGuestProperty()"/> and by
11796 <link to="IMachine::setGuestProperty()"/> in order to read and
11797 modify guest properties.
11798
11799 <result name="VBOX_E_INVALID_VM_STATE">
11800 Machine session is not open.
11801 </result>
11802 <result name="VBOX_E_INVALID_OBJECT_STATE">
11803 Session type is not direct.
11804 </result>
11805
11806 </desc>
11807 <param name="name" type="wstring" dir="in"/>
11808 <param name="value" type="wstring" dir="in"/>
11809 <param name="flags" type="wstring" dir="in"/>
11810 <param name="isSetter" type="boolean" dir="in"/>
11811 <param name="retValue" type="wstring" dir="out"/>
11812 <param name="retTimestamp" type="unsigned long long" dir="out"/>
11813 <param name="retFlags" type="wstring" dir="out"/>
11814 </method>
11815
11816 <method name="enumerateGuestProperties">
11817 <desc>
11818 Return a list of the guest properties matching a set of patterns along
11819 with their values, time stamps and flags.
11820
11821 <result name="VBOX_E_INVALID_VM_STATE">
11822 Machine session is not open.
11823 </result>
11824 <result name="VBOX_E_INVALID_OBJECT_STATE">
11825 Session type is not direct.
11826 </result>
11827
11828 </desc>
11829 <param name="patterns" type="wstring" dir="in">
11830 <desc>
11831 The patterns to match the properties against as a comma-separated
11832 string. If this is empty, all properties currently set will be
11833 returned.
11834 </desc>
11835 </param>
11836 <param name="key" type="wstring" dir="out" safearray="yes">
11837 <desc>
11838 The key names of the properties returned.
11839 </desc>
11840 </param>
11841 <param name="value" type="wstring" dir="out" safearray="yes">
11842 <desc>
11843 The values of the properties returned. The array entries match the
11844 corresponding entries in the @a key array.
11845 </desc>
11846 </param>
11847 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
11848 <desc>
11849 The time stamps of the properties returned. The array entries match
11850 the corresponding entries in the @a key array.
11851 </desc>
11852 </param>
11853 <param name="flags" type="wstring" dir="out" safearray="yes">
11854 <desc>
11855 The flags of the properties returned. The array entries match the
11856 corresponding entries in the @a key array.
11857 </desc>
11858 </param>
11859 </method>
11860
11861 </interface>
11862
11863 <interface
11864 name="ISession" extends="$dispatched"
11865 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
11866 wsmap="managed"
11867 >
11868 <desc>
11869 The ISession interface represents a serialization primitive for virtual
11870 machines.
11871
11872 With VirtualBox, every time one wishes to manipulate a virtual machine
11873 (e.g. change its settings or start execution), a session object is
11874 required. Such an object must be passed to one of the session methods
11875 that open the given session, which then initiates the machine manipulation.
11876
11877 A session serves several purposes: it identifies to the inter-process VirtualBox
11878 code which process is currently working with the virtual machine, and it ensures
11879 that there are no incompatible requests from several processes for the
11880 same virtual machine. Session objects can therefore be thought of as mutex
11881 semaphores that lock virtual machines to prevent conflicting accesses from
11882 several processes.
11883
11884 How sessions objects are used depends on whether you use the Main API
11885 via COM or via the webservice:
11886
11887 <ul>
11888 <li>When using the COM API directly, an object of the Session class from the
11889 VirtualBox type library needs to be created. In regular COM C++ client code,
11890 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
11891 This object will then act as a local session object in further calls to open
11892 a session.
11893 </li>
11894
11895 <li>In the webservice, the session manager (IWebsessionManager) instead creates
11896 one session object automatically when <link to="IWebsessionManager::logon" />
11897 is called. A managed object reference to that session object can be retrieved by
11898 calling <link to="IWebsessionManager::getSessionObject" />. This session object
11899 reference can then be used to open sessions.
11900 </li>
11901 </ul>
11902
11903 Sessions are mainly used in two variations:
11904
11905 <ul>
11906 <li>
11907 To start a virtual machine in a separate process, one would call
11908 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
11909 object as its first parameter. This session then identifies the caller
11910 and lets him control the started machine (for example, pause machine
11911 execution or power it down) as well as be notified about machine
11912 execution state changes.
11913 </li>
11914
11915 <li>To alter machine settings, or to start machine execution within the
11916 current process, one needs to open a direct session for the machine first by
11917 calling <link to="IVirtualBox::openSession"/>. While a direct session
11918 is open within one process, no any other process may open another direct
11919 session for the same machine. This prevents the machine from being changed
11920 by other processes while it is running or while the machine is being configured.
11921 </li>
11922 </ul>
11923
11924 One also can attach to an existing direct session already opened by
11925 another process (for example, in order to send a control request to the
11926 virtual machine such as the pause or the reset request). This is done by
11927 calling <link to="IVirtualBox::openExistingSession"/>.
11928
11929 <note>
11930 Unless you are trying to write a new VirtualBox front-end that
11931 performs direct machine execution (like the VirtualBox or VBoxSDL
11932 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
11933 session opened by <link to="IVirtualBox::openSession"/> and use this
11934 session only to change virtual machine settings. If you simply want to
11935 start virtual machine execution using one of the existing front-ends
11936 (for example the VirtualBox GUI or headless server), simply use
11937 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
11938 will power up the machine automatically for you.
11939 </note>
11940 </desc>
11941
11942 <attribute name="state" type="SessionState" readonly="yes">
11943 <desc>Current state of this session.</desc>
11944 </attribute>
11945
11946 <attribute name="type" type="SessionType" readonly="yes">
11947 <desc>
11948 Type of this session. The value of this attribute is valid only
11949 if the session is currently open (i.e. its #state is
11950 SessionType_SessionOpen), otherwise an error will be returned.
11951 </desc>
11952 </attribute>
11953
11954 <attribute name="machine" type="IMachine" readonly="yes">
11955 <desc>Machine object associated with this session.</desc>
11956 </attribute>
11957
11958 <attribute name="console" type="IConsole" readonly="yes">
11959 <desc>Console object associated with this session.</desc>
11960 </attribute>
11961
11962 <method name="close">
11963 <desc>
11964 Closes a session that was previously opened.
11965
11966 It is recommended that every time an "open session" method (such as
11967 <link to="IVirtualBox::openRemoteSession" /> or
11968 <link to="IVirtualBox::openSession" />) has been called to
11969 manipulate a virtual machine, the caller invoke
11970 ISession::close() when it's done doing so. Since sessions are
11971 serialization primitives much like ordinary mutexes, they are
11972 best used the same way: for each "open" call, there should be
11973 a matching "close" call, even when errors occur.
11974
11975 Otherwise, if a direct session for a machine opened with
11976 <link to="IVirtualBox::openSession()"/> is not explicitly closed
11977 when the application terminates, the state of the machine will
11978 be set to <link to="MachineState_Aborted" /> on the server.
11979
11980 Generally, it is recommended to close all open sessions explicitly
11981 before terminating the application (regardless of the reason for
11982 the termination).
11983
11984 <note>
11985 Do not expect the session state (<link to="ISession::state" />
11986 to return to "Closed" immediately after you invoke
11987 ISession::close(), particularly if you have started a remote
11988 session to execute the VM in a new process. The session state will
11989 automatically return to "Closed" once the VM is no longer executing,
11990 which can of course take a very long time.
11991 </note>
11992
11993 <result name="E_UNEXPECTED">
11994 Session is not open.
11995 </result>
11996
11997 </desc>
11998 </method>
11999
12000 </interface>
12001
12002 <!--
12003 // ISATAController
12004 /////////////////////////////////////////////////////////////////////////
12005 -->
12006
12007 <interface
12008 name="ISATAController" extends="$unknown"
12009 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
12010 wsmap="managed"
12011 >
12012 <attribute name="enabled" type="boolean">
12013 <desc>
12014 Flag whether the SATA controller is present in the
12015 guest system. If disabled, the virtual guest hardware will
12016 not contain any SATA controller. Can only be changed when
12017 the VM is powered off.
12018 </desc>
12019 </attribute>
12020
12021 <attribute name="portCount" type="unsigned long">
12022 <desc>
12023 The number of usable ports on the SATA controller.
12024 It ranges from 1 to 30.
12025 </desc>
12026 </attribute>
12027
12028 <method name="GetIDEEmulationPort">
12029 <desc>
12030 Gets the corresponding port number which is emulated as an IDE device.
12031
12032 <result name="E_INVALIDARG">
12033 The @a devicePosition is not in the range 0 to 3.
12034 </result>
12035
12036 </desc>
12037 <param name="devicePosition" type="long" dir="in"/>
12038 <param name="portNumber" type="long" dir="return"/>
12039 </method>
12040
12041 <method name="SetIDEEmulationPort">
12042 <desc>
12043 Sets the port number which is emulated as an IDE device.
12044
12045 <result name="E_INVALIDARG">
12046 The @a devicePosition is not in the range 0 to 3 or the
12047 @a portNumber is not in the range 0 to 29.
12048 </result>
12049
12050 </desc>
12051 <param name="devicePosition" type="long" dir="in"/>
12052 <param name="portNumber" type="long" dir="in"/>
12053 </method>
12054
12055 </interface>
12056
12057<if target="wsdl">
12058
12059 <!--
12060 // IManagedObjectRef
12061 /////////////////////////////////////////////////////////////////////////
12062 -->
12063
12064 <interface
12065 name="IManagedObjectRef" extends="$unknown"
12066 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12067 internal="yes"
12068 wsmap="managed"
12069 wscpp="hardcoded"
12070 >
12071 <desc>
12072 Managed object reference.
12073
12074 Only within the webservice, a managed object reference (which is really
12075 an opaque number) allows a webservice client to address an object
12076 that lives in the address space of the webservice server.
12077
12078 Behind each managed object reference, there is a COM object that lives
12079 in the webservice server's address space. The COM object is not freed
12080 until the managed object reference is released, either by an explicit
12081 call to <link to="IManagedObjectRef::release" /> or by logging off from
12082 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12083 all objects created during the webservice session.
12084
12085 Whenever a method call of the VirtualBox API returns a COM object, the
12086 webservice representation of that method will instead return a
12087 managed object reference, which can then be used to invoke methods
12088 on that object.
12089 </desc>
12090
12091 <method name="getInterfaceName">
12092 <desc>
12093 Returns the name of the interface that this managed object represents,
12094 for example, "IMachine", as a string.
12095 </desc>
12096 <param name="return" type="wstring" dir="return"/>
12097 </method>
12098
12099 <method name="release">
12100 <desc>
12101 Releases this managed object reference and frees the resources that
12102 were allocated for it in the webservice server process. After calling
12103 this method, the identifier of the reference can no longer be used.
12104 </desc>
12105 </method>
12106
12107 </interface>
12108
12109 <!--
12110 // IWebsessionManager
12111 /////////////////////////////////////////////////////////////////////////
12112 -->
12113
12114 <interface
12115 name="IWebsessionManager" extends="$unknown"
12116 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12117 internal="yes"
12118 wsmap="global"
12119 wscpp="hardcoded"
12120 >
12121 <desc>
12122 Websession manager. This provides essential services
12123 to webservice clients.
12124 </desc>
12125 <method name="logon">
12126 <desc>
12127 Logs a new client onto the webservice and returns a managed object reference to
12128 the IVirtualBox instance, which the client can then use as a basis to further
12129 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12130 interface, in one way or the other.
12131 </desc>
12132 <param name="username" type="wstring" dir="in"/>
12133 <param name="password" type="wstring" dir="in"/>
12134 <param name="return" type="IVirtualBox" dir="return"/>
12135 </method>
12136
12137 <method name="getSessionObject">
12138 <desc>
12139 Returns a managed object reference to the internal ISession object that was created
12140 for this web service session when the client logged on.
12141
12142 <see>ISession</see>
12143 </desc>
12144 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12145 <param name="return" type="ISession" dir="return"/>
12146 </method>
12147
12148 <method name="logoff">
12149 <desc>
12150 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12151 and destroys all resources associated with the session (most importantly, all
12152 managed objects created in the server while the session was active).
12153 </desc>
12154 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12155 </method>
12156
12157 </interface>
12158
12159</if>
12160
12161 <!--
12162 // IPerformanceCollector & friends
12163 /////////////////////////////////////////////////////////////////////////
12164 -->
12165
12166 <interface
12167 name="IPerformanceMetric" extends="$unknown"
12168 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12169 >
12170 <desc>
12171 The IPerformanceMetric interface represents parameters of the given
12172 performance metric.
12173 </desc>
12174
12175 <attribute name="metricName" type="wstring" readonly="yes">
12176 <desc>
12177 Name of the metric.
12178 </desc>
12179 </attribute>
12180
12181 <attribute name="object" type="$unknown" readonly="yes">
12182 <desc>
12183 Object this metric belongs to.
12184 </desc>
12185 </attribute>
12186
12187 <attribute name="description" type="wstring" readonly="yes">
12188 <desc>
12189 Textual description of the metric.
12190 </desc>
12191 </attribute>
12192
12193 <attribute name="period" type="unsigned long" readonly="yes">
12194 <desc>
12195 Time interval between samples, measured in seconds.
12196 </desc>
12197 </attribute>
12198
12199 <attribute name="count" type="unsigned long" readonly="yes">
12200 <desc>
12201 Number of recent samples retained by the performance collector for this
12202 metric.
12203
12204 When the collected sample count exceeds this number, older samples
12205 are discarded.
12206 </desc>
12207 </attribute>
12208
12209 <attribute name="unit" type="wstring" readonly="yes">
12210 <desc>
12211 Unit of measurement.
12212 </desc>
12213 </attribute>
12214
12215 <attribute name="minimumValue" type="long" readonly="yes">
12216 <desc>
12217 Minimum possible value of this metric.
12218 </desc>
12219 </attribute>
12220
12221 <attribute name="maximumValue" type="long" readonly="yes">
12222 <desc>
12223 Maximum possible value of this metric.
12224 </desc>
12225 </attribute>
12226 </interface>
12227
12228 <interface
12229 name="IPerformanceCollector" extends="$unknown"
12230 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12231 wsmap="managed"
12232 >
12233 <desc>
12234 The IPerformanceCollector interface represents a service that collects and
12235 stores performance metrics data.
12236
12237 Performance metrics are associated with objects like IHost and
12238 IMachine. Each object has a distinct set of performance metrics.
12239 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12240
12241 Metric data are collected at the specified intervals and are retained
12242 internally. The interval and the number of samples retained can be set
12243 with <link to="IPerformanceCollector::setupMetrics" />.
12244
12245 Metrics are organized hierarchically, each level separated by slash (/).
12246 General scheme for metric name is
12247 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12248 metric name stands for: CPU category, Load metric, User submetric, average
12249 aggregate. An aggregate function is computed over all retained data. Valid
12250 aggregate functions are:
12251
12252 <ul>
12253 <li>avg -- average</li>
12254 <li>min -- minimum</li>
12255 <li>max -- maximum</li>
12256 </ul>
12257
12258 "Category/Metric" together form base metric name. A base metric is the
12259 smallest unit for which a sampling interval and the number of retained
12260 samples can be set. Only base metrics can be enabled and disabled. All
12261 sub-metrics are collected when their base metric is collected.
12262 Collected values for any set of sub-metrics can be queried with
12263 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
12264 metric parameters, querying metric data, enabling or disabling metrics
12265 wildcards can be used in metric names to specify a subset of metrics. For
12266 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12267 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12268 values without aggregates <tt>*:</tt> can be used.
12269
12270 The valid names for base metrics are:
12271
12272 <ul>
12273 <li>CPU/Load</li>
12274 <li>CPU/MHz</li>
12275 <li>RAM/Usage</li>
12276 </ul>
12277
12278 The general sequence for collecting and retrieving the metrics is:
12279 <ul>
12280 <li>
12281 Obtain an instance of IPerformanceCollector with
12282 <link to="IVirtualBox::performanceCollector" />
12283 </li>
12284 <li>
12285 Allocate and populate an array with references to objects the metrics
12286 will be collected for. Use references to IHost and IMachine objects.
12287 </li>
12288 <li>
12289 Allocate and populate an array with base metric names the data will be
12290 collected for.
12291 </li>
12292 <li>
12293 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12294 metric data will be collected and stored.
12295 </li>
12296 <li>
12297 Wait for the data to get collected.
12298 </li>
12299 <li>
12300 Allocate and populate an array with references to objects the metric
12301 values will be queried for. You can re-use the object array used for
12302 setting base metrics.
12303 </li>
12304 <li>
12305 Allocate and populate an array with metric names the data will be
12306 collected for. Note that metric names differ from base metric names.
12307 </li>
12308 <li>
12309 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12310 have been collected so far are returned. Note that the values are still
12311 retained internally and data collection continues.
12312 </li>
12313 </ul>
12314
12315 For an example of usage refer to the following files in VirtualBox SDK:
12316 <ul>
12317 <li>
12318 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12319 </li>
12320 <li>
12321 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12322 </li>
12323 </ul>
12324 </desc>
12325
12326 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12327 <desc>
12328 Array of unique names of metrics.
12329
12330 This array represents all metrics supported by the performance
12331 collector. Individual objects do not necessarily support all of them.
12332 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12333 list of supported metrics for a particular object.
12334 </desc>
12335 </attribute>
12336
12337 <method name="getMetrics">
12338 <desc>
12339 Returns parameters of specified metrics for a set of objects.
12340 <note>
12341 @c Null metrics array means all metrics. @c Null object array means
12342 all existing objects.
12343 </note>
12344 </desc>
12345 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12346 <desc>
12347 Metric name filter. Currently, only a comma-separated list of metrics
12348 is supported.
12349 </desc>
12350 </param>
12351 <param name="objects" type="$unknown" dir="in" safearray="yes">
12352 <desc>
12353 Set of objects to return metric parameters for.
12354 </desc>
12355 </param>
12356 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12357 <desc>
12358 Array of returned metric parameters.
12359 </desc>
12360 </param>
12361 </method>
12362
12363 <method name="setupMetrics">
12364 <desc>
12365 Sets parameters of specified base metrics for a set of objects. Returns
12366 an array of <link to="IPerformanceMetric" /> describing the metrics have
12367 been affected.
12368 <note>
12369 @c Null or empty metric name array means all metrics. @c Null or empty
12370 object array means all existing objects. If metric name array contains
12371 a single element and object array contains many, the single metric
12372 name array element is applied to each object array element to form
12373 metric/object pairs.
12374 </note>
12375 </desc>
12376 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12377 <desc>
12378 Metric name filter. Comma-separated list of metrics with wildcard
12379 support.
12380 </desc>
12381 </param>
12382 <param name="objects" type="$unknown" dir="in" safearray="yes">
12383 <desc>
12384 Set of objects to setup metric parameters for.
12385 </desc>
12386 </param>
12387 <param name="period" type="unsigned long" dir="in">
12388 <desc>
12389 Time interval in seconds between two consecutive samples of performance
12390 data.
12391 </desc>
12392 </param>
12393 <param name="count" type="unsigned long" dir="in">
12394 <desc>
12395 Number of samples to retain in performance data history. Older samples
12396 get discarded.
12397 </desc>
12398 </param>
12399 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12400 <desc>
12401 Array of metrics that have been modified by the call to this method.
12402 </desc>
12403 </param>
12404 </method>
12405
12406 <method name="enableMetrics">
12407 <desc>
12408 Turns on collecting specified base metrics. Returns an array of
12409 <link to="IPerformanceMetric" /> describing the metrics have been
12410 affected.
12411 <note>
12412 @c Null or empty metric name array means all metrics. @c Null or empty
12413 object array means all existing objects. If metric name array contains
12414 a single element and object array contains many, the single metric
12415 name array element is applied to each object array element to form
12416 metric/object pairs.
12417 </note>
12418 </desc>
12419 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12420 <desc>
12421 Metric name filter. Comma-separated list of metrics with wildcard
12422 support.
12423 </desc>
12424 </param>
12425 <param name="objects" type="$unknown" dir="in" safearray="yes">
12426 <desc>
12427 Set of objects to enable metrics for.
12428 </desc>
12429 </param>
12430 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12431 <desc>
12432 Array of metrics that have been modified by the call to this method.
12433 </desc>
12434 </param>
12435 </method>
12436
12437 <method name="disableMetrics">
12438 <desc>
12439 Turns off collecting specified base metrics. Returns an array of
12440 <link to="IPerformanceMetric" /> describing the metrics have been
12441 affected.
12442 <note>
12443 @c Null or empty metric name array means all metrics. @c Null or empty
12444 object array means all existing objects. If metric name array contains
12445 a single element and object array contains many, the single metric
12446 name array element is applied to each object array element to form
12447 metric/object pairs.
12448 </note>
12449 </desc>
12450 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12451 <desc>
12452 Metric name filter. Comma-separated list of metrics with wildcard
12453 support.
12454 </desc>
12455 </param>
12456 <param name="objects" type="$unknown" dir="in" safearray="yes">
12457 <desc>
12458 Set of objects to disable metrics for.
12459 </desc>
12460 </param>
12461 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12462 <desc>
12463 Array of metrics that have been modified by the call to this method.
12464 </desc>
12465 </param>
12466 </method>
12467
12468 <method name="queryMetricsData">
12469 <desc>
12470 Queries collected metrics data for a set of objects.
12471
12472 The data itself and related metric information are returned in seven
12473 parallel and one flattened array of arrays. Elements of
12474 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
12475 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
12476 the same index describe one set of values corresponding to a single
12477 metric.
12478
12479 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
12480 start and length of a sub-array is indicated by
12481 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
12482 value for metric <tt>metricNames[i]</tt> is at
12483 <tt>returnData[returnIndices[i]]</tt>.
12484
12485 <note>
12486 @c Null or empty metric name array means all metrics. @c Null or empty
12487 object array means all existing objects. If metric name array contains
12488 a single element and object array contains many, the single metric
12489 name array element is applied to each object array element to form
12490 metric/object pairs.
12491 </note>
12492 <note>
12493 Data collection continues behind the scenes after call to @c
12494 queryMetricsData. The return data can be seen as the snapshot of
12495 the current state at the time of @c queryMetricsData call. The
12496 internally kept metric values are not cleared by the call. This makes
12497 possible querying different subsets of metrics or aggregates with
12498 subsequent calls. If periodic querying is needed it is highly
12499 suggested to query the values with @c interval*count period to avoid
12500 confusion. This way a completely new set of data values will be
12501 provided by each query.
12502 </note>
12503 </desc>
12504 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12505 <desc>
12506 Metric name filter. Comma-separated list of metrics with wildcard
12507 support.
12508 </desc>
12509 </param>
12510 <param name="objects" type="$unknown" dir="in" safearray="yes">
12511 <desc>
12512 Set of objects to query metrics for.
12513 </desc>
12514 </param>
12515 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
12516 <desc>
12517 Names of metrics returned in @c returnData.
12518 </desc>
12519 </param>
12520 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
12521 <desc>
12522 Objects associated with metrics returned in @c returnData.
12523 </desc>
12524 </param>
12525 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
12526 <desc>
12527 Units of measurement for each returned metric.
12528 </desc>
12529 </param>
12530 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
12531 <desc>
12532 Divisor that should be applied to return values in order to get
12533 floating point values. For example:
12534 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
12535 will retrieve the floating point value of i-th sample of the first
12536 metric.
12537 </desc>
12538 </param>
12539 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
12540 <desc>
12541 Sequence numbers of the first elements of value sequences of particular metrics
12542 returned in @c returnData. For aggregate metrics it is the sequence number of
12543 the sample the aggregate started calculation from.
12544 </desc>
12545 </param>
12546 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
12547 <desc>
12548 Indices of the first elements of value sequences of particular metrics
12549 returned in @c returnData.
12550 </desc>
12551 </param>
12552 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
12553 <desc>
12554 Lengths of value sequences of particular metrics.
12555 </desc>
12556 </param>
12557 <param name="returnData" type="long" dir="return" safearray="yes">
12558 <desc>
12559 Flattened array of all metric data containing sequences of values for
12560 each metric.
12561 </desc>
12562 </param>
12563 </method>
12564
12565 </interface>
12566
12567 <module name="VBoxSVC" context="LocalServer">
12568 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
12569 namespace="virtualbox.org">
12570 <interface name="IVirtualBox" default="yes"/>
12571 </class>
12572 </module>
12573
12574 <module name="VBoxC" context="InprocServer" threadingModel="Free">
12575 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
12576 namespace="virtualbox.org">
12577 <interface name="ISession" default="yes"/>
12578 </class>
12579 </module>
12580
12581</library>
12582
12583</idl>
12584
12585<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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