VirtualBox

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

Last change on this file since 22305 was 22305, checked in by vboxsync, 15 years ago

Main: generic callback wrappers mechanism

  • Property svn:eol-style set to native
File size: 482.0 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
130
131#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
132# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
133 NS_IMPL_THREADSAFE_ADDREF(_class) \
134 NS_IMPL_THREADSAFE_RELEASE(_class) \
135 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
136 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
137#endif
138
139#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
140# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
141 NS_IMPL_THREADSAFE_ADDREF(_class) \
142 NS_IMPL_THREADSAFE_RELEASE(_class) \
143 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
144 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
145#endif
146
147#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
148# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
149 NS_IMPL_THREADSAFE_ADDREF(_class) \
150 NS_IMPL_THREADSAFE_RELEASE(_class) \
151 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
152 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
157 NS_INTERFACE_MAP_BEGIN(_class) \
158 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
160 NS_IMPL_QUERY_CLASSINFO(_class) \
161 NS_INTERFACE_MAP_END
162#endif
163
164#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
165# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
166 _i2, _ic2) \
167 NS_INTERFACE_MAP_BEGIN(_class) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
169 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
170 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
171 NS_IMPL_QUERY_CLASSINFO(_class) \
172 NS_INTERFACE_MAP_END
173#endif
174
175#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
176# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
177 _i2, _ic2, _i3, _ic3) \
178 NS_INTERFACE_MAP_BEGIN(_class) \
179 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
180 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
181 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
182 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
183 NS_IMPL_QUERY_CLASSINFO(_class) \
184 NS_INTERFACE_MAP_END
185#endif
186
187#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
188#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
189#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
190
191#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
192# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
193 NS_IMPL_THREADSAFE_ADDREF(_class) \
194 NS_IMPL_THREADSAFE_RELEASE(_class) \
195 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
196 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
197#endif
198
199#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
200# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
201 _i2, _ic2) \
202 NS_IMPL_THREADSAFE_ADDREF(_class) \
203 NS_IMPL_THREADSAFE_RELEASE(_class) \
204 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
205 _i2, _ic2) \
206 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
207#endif
208
209#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
210# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2, _i3, _ic3) \
212 NS_IMPL_THREADSAFE_ADDREF(_class) \
213 NS_IMPL_THREADSAFE_RELEASE(_class) \
214 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
215 _i2, _ic2, _i3, _ic3) \
216 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
217#endif
218
219 </cpp>
220</if>
221
222<library
223 name="VirtualBox"
224 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
225 version="1.3"
226 desc="VirtualBox Type Library"
227 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
228 supportsErrorInfo="yes"
229>
230
231
232 <!--
233 // COM result codes for VirtualBox
234 /////////////////////////////////////////////////////////////////////////
235 -->
236
237 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
238 <desc>
239 This section describes all VirtualBox-specific COM result codes that may
240 be returned by methods of VirtualBox COM interfaces in addition to
241 standard COM result codes.
242
243 Note that along with the result code, every VirtualBox method returns
244 extended error information through the IVirtualBoxErrorInfo interface on
245 failure. This interface is a preferred way to present the error to the end
246 user because it contains a human readable description of the error. Raw
247 result codes, both standard and described in this section, are intended to
248 be used by programs to analyze the reason of a failure and select an
249 appropriate course of action without involving the end user (for example,
250 retry the operation later or make a different call).
251
252 The standard COM result codes that may originate from our methods include:
253
254 <table>
255 <tr><td>E_INVALIDARG</td>
256 <td>
257 Returned when the value of the method's argument is not within the range
258 of valid values. This should not be confused with situations when the
259 value is within the range but simply doesn't suit the current object
260 state and there is a possibility that it will be accepted later (in such
261 cases VirtualBox-specific codes are returned, for example,
262 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
263 </td>
264 </tr>
265 <tr><td>E_POINTER</td>
266 <td>
267 Returned if a memory pointer for the output argument is invalid (for
268 example, @c null). Note that when pointers representing input
269 arguments (such as strings) are invalid, E_INVALIDARG is returned.
270 </td>
271 </tr>
272 <tr><td>E_ACCESSDENIED</td>
273 <td>
274 Returned when the called object is not ready. Since the lifetime of a
275 public COM object cannot be fully controlled by the implementation,
276 VirtualBox maintains the readiness state for all objects it creates and
277 returns this code in response to any method call on the object that was
278 deactivated by VirtualBox and is not functioning any more.
279 </td>
280 </tr>
281 <tr><td>E_OUTOFMEMORY</td>
282 <td>
283 Returned when a memory allocation operation fails.
284 </td>
285 </tr>
286 </table>
287 </desc>
288 </descGroup>
289
290 <!--
291 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
292 everything in <result>/<desc> after (and including) the first dot, so express
293 the matter of the error code in the first sentence and keep it short.
294 -->
295
296 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
297 <desc>
298 Object corresponding to the supplied arguments does not exist.
299 </desc>
300 </result>
301
302 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
303 <desc>
304 Current virtual machine state prevents the operation.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
309 <desc>
310 Virtual machine error occurred attempting the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
315 <desc>
316 File not accessible or erroneous file contents.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
321 <desc>
322 Runtime subsystem error.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
327 <desc>
328 Pluggable Device Manager error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
333 <desc>
334 Current object state prohibits operation.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
339 <desc>
340 Host operating system related error.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
345 <desc>
346 Requested operation is not supported.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
351 <desc>
352 Invalid XML found.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
357 <desc>
358 Current session state prohibits operation.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
363 <desc>
364 Object being in use prohibits operation.
365 </desc>
366 </result>
367
368 <!--
369 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
370 everything in <result>/<desc> after (and including) the first dot, so express
371 the matter of the error code in the first sentence and keep it short.
372 -->
373
374 <descGroup/>
375
376 <!--
377 // all common enums
378 /////////////////////////////////////////////////////////////////////////
379 -->
380
381 <enum name="SettingsVersion"
382 uuid="6e151282-c338-428a-989d-5f2402d87e6f"
383 >
384 <desc>Settings version of VirtualBox settings files. This is written to
385 the "version" attribute of the root "VirtualBox" element in the settings
386 file XML and indicates which VirtualBox version wrote the file.
387 </desc>
388
389 <const name="Null" value="0">
390 <desc>Null value, indicates invalid version.</desc>
391 </const>
392 <const name="v1_0" value="1">
393 <desc>Legacy settings version, not currently supported.</desc>
394 </const>
395 <const name="v1_1" value="2">
396 <desc>Legacy settings version, not currently supported.</desc>
397 </const>
398 <const name="v1_2" value="3">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_3pre" value="4">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_3" value="5">
405 <desc>Legacy settings version, not currently supported.</desc>
406 </const>
407 <const name="v1_4" value="6">
408 <desc>Legacy settings version, not currently supported.</desc>
409 </const>
410 <const name="v1_5" value="7">
411 <desc>Legacy settings version, not currently supported.</desc>
412 <!-- 2008-09-04: 2.0.0 released
413 2008-11-20: settings version 1.5 introduced
414 2008-12-17: 2.1.0 released
415 -->
416 </const>
417 <const name="v1_6" value="8">
418 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
419 <!-- 2008-12-17: 2.1.0 released
420 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
421 2009-04-08: 2.2.0 released
422 -->
423 </const>
424 <const name="v1_7" value="9">
425 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
426 <!-- 2008-12-17: 2.1.0 released
427 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
428 2009-04-08: 2.2.0 released
429 VirtualBox.xml additions: NetserviceRegistry with DHCPServers
430 Machine changes: HardDiskAttachments is now StorageControllers
431 -->
432 </const>
433 <const name="v1_8" value="10">
434 <desc>Settings version "1.8", written by VirtualBox 3.1.x.</desc>
435 <!-- Machine additions: Display/@accelerate2DVideo
436 -->
437 </const>
438 </enum>
439
440 <enum
441 name="AccessMode"
442 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
443 >
444 <desc>
445 Access mode for opening files.
446 </desc>
447
448 <const name="ReadOnly" value="1"/>
449 <const name="ReadWrite" value="2"/>
450 </enum>
451
452 <enum
453 name="MachineState"
454 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
455 >
456 <desc>
457 Virtual machine execution state.
458
459 This enumeration represents possible values of the <link
460 to="IMachine::state"/> attribute.
461
462 Below is the basic virtual machine state diagram. It shows how the state
463 changes during virtual machine execution. The text in square braces shows
464 a method of the IConsole interface that performs the given state
465 transition.
466
467 <pre>
468 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
469 V |
470 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
471 | | | | V |
472 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
473 | | ^ | ^ |
474 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
475 | ^ | | | |
476 | | +-----------------------------------------+-|-------------------+ +
477 | | | | |
478 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
479 | | | |
480 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
481 | | |
482 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
483 </pre>
484
485 Note that states to the right from PoweredOff, Aborted and Saved in the
486 above diagram are called <i>online VM states</i>. These states
487 represent the virtual machine which is being executed in a dedicated
488 process (usually with a GUI window attached to it where you can see the
489 activity of the virtual machine and interact with it). There are two
490 special pseudo-states, FirstOnline and LastOnline, that can be used in
491 relational expressions to detect if the given machine state is online or
492 not:
493
494 <pre>
495 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
496 machine.GetState() &lt;= MachineState_LastOnline)
497 {
498 ...the machine is being executed...
499 }
500 </pre>
501
502 When the virtual machine is in one of the online VM states (that is, being
503 executed), only a few machine settings can be modified. Methods working
504 with such settings contain an explicit note about that. An attempt to
505 change any oter setting or perform a modifying operation during this time
506 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
507
508 All online states except Running, Paused and Stuck are transitional: they
509 represent temporary conditions of the virtual machine that will last as
510 long as the operation that initiated such a condition.
511
512 The Stuck state is a special case. It means that execution of the machine
513 has reached the "Guru Meditation" condition. This condition indicates an
514 internal VMM (virtual machine manager) failure which may happen as a
515 result of either an unhandled low-level virtual hardware exception or one
516 of the recompiler exceptions (such as the <i>too-many-traps</i>
517 condition).
518
519 Note also that any online VM state may transit to the Aborted state. This
520 happens if the process that is executing the virtual machine terminates
521 unexpectedly (for example, crashes). Other than that, the Aborted state is
522 equivalent to PoweredOff.
523
524 There are also a few additional state diagrams that do not deal with
525 virtual machine execution and therefore are shown separately. The states
526 shown on these diagrams are called <i>offline VM states</i> (this includes
527 PoweredOff, Aborted and Saved too).
528
529 The first diagram shows what happens when a lengthy setup operation is
530 being executed (such as <link to="IMachine::attachHardDisk"/>).
531
532 <pre>
533 +----------------------------------(same state as before the call)------+
534 | |
535 +-&gt; PoweredOff --+ |
536 | | |
537 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
538 | |
539 +-&gt; Saved -------+
540 </pre>
541
542 The next two diagrams demonstrate the process of taking a snapshot of a
543 powered off virtual machine and performing one of the "discard..."
544 operations, respectively.
545
546 <pre>
547 +----------------------------------(same state as before the call)------+
548 | |
549 +-&gt; PoweredOff --+ |
550 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
551 +-&gt; Aborted -----+
552
553 +-&gt; PoweredOff --+
554 | |
555 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
556 | | [discardCurrentState()] |
557 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
558 | |
559 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
560 </pre>
561
562 Note that the Saving state is present in both the offline state group and
563 online state group. Currently, the only way to determine what group is
564 assumed in a particular case is to remember the previous machine state: if
565 it was Running or Paused, then Saving is an online state, otherwise it is
566 an offline state. This inconsistency may be removed in one of the future
567 versions of VirtualBox by adding a new state.
568
569 <note internal="yes">
570 For whoever decides to touch this enum: In order to keep the
571 comparisons involving FirstOnline and LastOnline pseudo-states valid,
572 the numeric values of these states must be correspondingly updated if
573 needed: for any online VM state, the condition
574 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
575 @c true. The same relates to transient states for which
576 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
577 @c true.
578 </note>
579 </desc>
580
581 <const name="Null" value="0">
582 <desc>Null value (never used by the API).</desc>
583 </const>
584 <const name="PoweredOff" value="1">
585 <desc>
586 The machine is not running and has no saved execution state; it has
587 either never been started or been shut down successfully.
588 </desc>
589 </const>
590 <const name="Saved" value="2">
591 <desc>
592 The machine is not currently running, but the execution state of the machine
593 has been saved to an external file when it was running, from where
594 it can be resumed.
595 </desc>
596 </const>
597 <const name="Aborted" value="3">
598 <desc>
599 The process running the machine has terminated abnormally. This may
600 indicate a crash of the VM process in host execution context, or
601 the VM process has been terminated externally.
602 </desc>
603 </const>
604 <const name="Running" value="4">
605 <desc>
606 The machine is currently being executed.
607 <note internal="yes">
608 For whoever decides to touch this enum: In order to keep the
609 comparisons in the old source code valid, this state must immediately
610 precede the Paused state.
611 </note>
612 </desc>
613 </const>
614 <const name="Paused" value="5">
615 <desc>
616 Execution of the machine has been paused.
617 <note internal="yes">
618 For whoever decides to touch this enum: In order to keep the
619 comparisons in the old source code valid, this state must immediately
620 follow the Running state.
621 </note>
622 </desc>
623 </const>
624 <const name="Stuck" value="6">
625 <desc>
626 Execution of the machine has reached the "Guru Meditation"
627 condition. This indicates a severe error in the hypervisor itself.
628 </desc>
629 </const>
630 <const name="Starting" value="7">
631 <desc>
632 Machine is being started after powering it on from a
633 zero execution state.
634 </desc>
635 </const>
636 <const name="Stopping" value="8">
637 <desc>
638 Machine is being normally stopped powering it off, or after the guest OS
639 has initiated a shutdown sequence.
640 </desc>
641 </const>
642 <const name="Saving" value="9">
643 <desc>
644 Machine is saving its execution state to a file, or an online
645 snapshot of the machine is being taken.
646 </desc>
647 </const>
648 <const name="Restoring" value="10">
649 <desc>
650 Execution state of the machine is being restored from a file
651 after powering it on from the saved execution state.
652 </desc>
653 </const>
654 <const name="Discarding" value="11">
655 <desc>
656 Snapshot of the machine is being discarded.
657 </desc>
658 </const>
659 <const name="SettingUp" value="12">
660 <desc>
661 Lengthy setup operation is in progress.
662 </desc>
663 </const>
664
665 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
666 <desc>
667 Pseudo-state: first online state (for use in relational expressions).
668 </desc>
669 </const>
670 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
671 <desc>
672 Pseudo-state: last online state (for use in relational expressions).
673 </desc>
674 </const>
675
676 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
677 <desc>
678 Pseudo-state: first transient state (for use in relational expressions).
679 </desc>
680 </const>
681 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
682 <desc>
683 Pseudo-state: last transient state (for use in relational expressions).
684 </desc>
685 </const>
686
687 </enum>
688
689 <enum
690 name="SessionState"
691 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
692 >
693 <desc>
694 Session state. This enumeration represents possible values of
695 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
696 attributes. See individual enumerator descriptions for the meaning for
697 every value.
698 </desc>
699
700 <const name="Null" value="0">
701 <desc>Null value (never used by the API).</desc>
702 </const>
703 <const name="Closed" value="1">
704 <desc>
705 The machine has no open sessions (<link to="IMachine::sessionState"/>);
706 the session is closed (<link to="ISession::state"/>)
707 </desc>
708 </const>
709 <const name="Open" value="2">
710 <desc>
711 The machine has an open direct session (<link to="IMachine::sessionState"/>);
712 the session is open (<link to="ISession::state"/>)
713 </desc>
714 </const>
715 <const name="Spawning" value="3">
716 <desc>
717 A new (direct) session is being opened for the machine
718 as a result of <link to="IVirtualBox::openRemoteSession"/>
719 call (<link to="IMachine::sessionState"/>);
720 the session is currently being opened
721 as a result of <link to="IVirtualBox::openRemoteSession"/>
722 call (<link to="ISession::state"/>)
723 </desc>
724 </const>
725 <const name="Closing" value="4">
726 <desc>
727 The direct session is being closed (<link to="IMachine::sessionState"/>);
728 the session is being closed (<link to="ISession::state"/>)
729 </desc>
730 </const>
731 </enum>
732
733 <enum
734 name="SessionType"
735 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
736 >
737 <desc>
738 Session type. This enumeration represents possible values of the
739 <link to="ISession::type"/> attribute.
740 </desc>
741
742 <const name="Null" value="0">
743 <desc>Null value (never used by the API).</desc>
744 </const>
745 <const name="Direct" value="1">
746 <desc>
747 Direct session
748 (opened by <link to="IVirtualBox::openSession"/>)
749 </desc>
750 </const>
751 <const name="Remote" value="2">
752 <desc>
753 Remote session
754 (opened by <link to="IVirtualBox::openRemoteSession"/>)
755 </desc>
756 </const>
757 <const name="Existing" value="3">
758 <desc>
759 Existing session
760 (opened by <link to="IVirtualBox::openExistingSession"/>)
761 </desc>
762 </const>
763 </enum>
764
765 <enum
766 name="DeviceType"
767 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
768 >
769 <desc>
770 Device type.
771 </desc>
772 <const name="Null" value="0">
773 <desc>
774 Null value, may also mean "no device" (not allowed for
775 <link to="IConsole::getDeviceActivity"/>).
776 </desc>
777 </const>
778 <const name="Floppy" value="1">
779 <desc>Floppy device.</desc>
780 </const>
781 <const name="DVD" value="2">
782 <desc>CD/DVD-ROM device.</desc>
783 </const>
784 <const name="HardDisk" value="3">
785 <desc>Hard disk device.</desc>
786 </const>
787 <const name="Network" value="4">
788 <desc>Network device.</desc>
789 </const>
790 <const name="USB" value="5">
791 <desc>USB device.</desc>
792 </const>
793 <const name="SharedFolder" value="6">
794 <desc>Shared folder device.</desc>
795 </const>
796 </enum>
797
798 <enum
799 name="DeviceActivity"
800 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
801 >
802 <desc>
803 Device activity for <link to="IConsole::getDeviceActivity"/>.
804 </desc>
805
806 <const name="Null" value="0"/>
807 <const name="Idle" value="1"/>
808 <const name="Reading" value="2"/>
809 <const name="Writing" value="3"/>
810 </enum>
811
812 <enum
813 name="ClipboardMode"
814 uuid="33364716-4008-4701-8f14-be0fa3d62950"
815 >
816 <desc>
817 Host-Guest clipboard interchange mode.
818 </desc>
819
820 <const name="Disabled" value="0"/>
821 <const name="HostToGuest" value="1"/>
822 <const name="GuestToHost" value="2"/>
823 <const name="Bidirectional" value="3"/>
824 </enum>
825
826 <enum
827 name="Scope"
828 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
829 >
830 <desc>
831 Scope of the operation.
832
833 A generic enumeration used in various methods to define the action or
834 argument scope.
835 </desc>
836
837 <const name="Global" value="0"/>
838 <const name="Machine" value="1"/>
839 <const name="Session" value="2"/>
840 </enum>
841
842 <enum
843 name="GuestStatisticType"
844 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
845 >
846 <desc>
847 Statistics type for <link to="IGuest::getStatistic"/>.
848 </desc>
849
850 <const name="CPULoad_Idle" value="0">
851 <desc>
852 Idle CPU load (0-100%) for last interval.
853 </desc>
854 </const>
855 <const name="CPULoad_Kernel" value="1">
856 <desc>
857 Kernel CPU load (0-100%) for last interval.
858 </desc>
859 </const>
860 <const name="CPULoad_User" value="2">
861 <desc>
862 User CPU load (0-100%) for last interval.
863 </desc>
864 </const>
865 <const name="Threads" value="3">
866 <desc>
867 Total number of threads in the system.
868 </desc>
869 </const>
870 <const name="Processes" value="4">
871 <desc>
872 Total number of processes in the system.
873 </desc>
874 </const>
875 <const name="Handles" value="5">
876 <desc>
877 Total number of handles in the system.
878 </desc>
879 </const>
880 <const name="MemoryLoad" value="6">
881 <desc>
882 Memory load (0-100%).
883 </desc>
884 </const>
885 <const name="PhysMemTotal" value="7">
886 <desc>
887 Total physical memory in megabytes.
888 </desc>
889 </const>
890 <const name="PhysMemAvailable" value="8">
891 <desc>
892 Free physical memory in megabytes.
893 </desc>
894 </const>
895 <const name="PhysMemBalloon" value="9">
896 <desc>
897 Ballooned physical memory in megabytes.
898 </desc>
899 </const>
900 <const name="MemCommitTotal" value="10">
901 <desc>
902 Total amount of memory in the committed state in megabytes.
903 </desc>
904 </const>
905 <const name="MemKernelTotal" value="11">
906 <desc>
907 Total amount of memory used by the guest OS's kernel in megabytes.
908 </desc>
909 </const>
910 <const name="MemKernelPaged" value="12">
911 <desc>
912 Total amount of paged memory used by the guest OS's kernel in megabytes.
913 </desc>
914 </const>
915 <const name="MemKernelNonpaged" value="13">
916 <desc>
917 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
918 </desc>
919 </const>
920 <const name="MemSystemCache" value="14">
921 <desc>
922 Total amount of memory used by the guest OS's system cache in megabytes.
923 </desc>
924 </const>
925 <const name="PageFileSize" value="15">
926 <desc>
927 Pagefile size in megabytes.
928 </desc>
929 </const>
930 <const name="SampleNumber" value="16">
931 <desc>
932 Statistics sample number
933 </desc>
934 </const>
935 <const name="MaxVal" value="17"/>
936 </enum>
937
938 <enum
939 name="BIOSBootMenuMode"
940 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
941 >
942 <desc>
943 BIOS boot menu mode.
944 </desc>
945
946 <const name="Disabled" value="0"/>
947 <const name="MenuOnly" value="1"/>
948 <const name="MessageAndMenu" value="2"/>
949 </enum>
950
951 <enum
952 name="DriveState"
953 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
954 >
955 <const name="Null" value="0">
956 <desc>Null value (never used by the API).</desc>
957 </const>
958 <const name="NotMounted" value="1"/>
959 <const name="ImageMounted" value="2"/>
960 <const name="HostDriveCaptured" value="3"/>
961 </enum>
962
963 <enum
964 name="ProcessorFeature"
965 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
966 >
967 <desc>
968 CPU features.
969 </desc>
970
971 <const name="HWVirtEx" value="0"/>
972 <const name="PAE" value="1"/>
973 <const name="LongMode" value="2"/>
974 </enum>
975
976
977 <!--
978 // IVirtualBoxErrorInfo
979 /////////////////////////////////////////////////////////////////////////
980 -->
981
982 <interface
983 name="IVirtualBoxErrorInfo" extends="$errorinfo"
984 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
985 supportsErrorInfo="no"
986 wsmap="managed"
987 >
988 <desc>
989 The IVirtualBoxErrorInfo interface represents extended error information.
990
991 Extended error information can be set by VirtualBox components after
992 unsuccessful or partially successful method invocation. This information
993 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
994 and then shown to the client in addition to the plain 32-bit result code.
995
996 In MS COM, this interface extends the IErrorInfo interface,
997 in XPCOM, it extends the nsIException interface. In both cases,
998 it provides a set of common attributes to retrieve error
999 information.
1000
1001 Sometimes invocation of some component's method may involve methods of
1002 other components that may also fail (independently of this method's
1003 failure), or a series of non-fatal errors may precede a fatal error that
1004 causes method failure. In cases like that, it may be desirable to preserve
1005 information about all errors happened during method invocation and deliver
1006 it to the caller. The <link to="#next"/> attribute is intended
1007 specifically for this purpose and allows to represent a chain of errors
1008 through a single IVirtualBoxErrorInfo object set after method invocation.
1009
1010 Note that errors are stored to a chain in the reverse order, i.e. the
1011 initial error object you query right after method invocation is the last
1012 error set by the callee, the object it points to in the @a next attribute
1013 is the previous error and so on, up to the first error (which is the last
1014 in the chain).
1015 </desc>
1016
1017 <attribute name="resultCode" type="long" readonly="yes">
1018 <desc>
1019 Result code of the error.
1020 Usually, it will be the same as the result code returned
1021 by the method that provided this error information, but not
1022 always. For example, on Win32, CoCreateInstance() will most
1023 likely return E_NOINTERFACE upon unsuccessful component
1024 instantiation attempt, but not the value the component factory
1025 returned. Value is typed 'long', not 'result',
1026 to make interface usable from scripting languages.
1027 <note>
1028 In MS COM, there is no equivalent.
1029 In XPCOM, it is the same as nsIException::result.
1030 </note>
1031 </desc>
1032 </attribute>
1033
1034 <attribute name="interfaceID" type="wstring" readonly="yes">
1035 <desc>
1036 UUID of the interface that defined the error.
1037 <note>
1038 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1039 data type.
1040 In XPCOM, there is no equivalent.
1041 </note>
1042 </desc>
1043 </attribute>
1044
1045 <attribute name="component" type="wstring" readonly="yes">
1046 <desc>
1047 Name of the component that generated the error.
1048 <note>
1049 In MS COM, it is the same as IErrorInfo::GetSource.
1050 In XPCOM, there is no equivalent.
1051 </note>
1052 </desc>
1053 </attribute>
1054
1055 <attribute name="text" type="wstring" readonly="yes">
1056 <desc>
1057 Text description of the error.
1058 <note>
1059 In MS COM, it is the same as IErrorInfo::GetDescription.
1060 In XPCOM, it is the same as nsIException::message.
1061 </note>
1062 </desc>
1063 </attribute>
1064
1065 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1066 <desc>
1067 Next error object if there is any, or @c null otherwise.
1068 <note>
1069 In MS COM, there is no equivalent.
1070 In XPCOM, it is the same as nsIException::inner.
1071 </note>
1072 </desc>
1073 </attribute>
1074
1075 </interface>
1076
1077 <interface
1078 name="ILocalOwner" extends="$dispatched"
1079 uuid="308ff42a-dc45-49d4-a950-b1eee5e00bb5" wsmap="suppress"
1080 >
1081 <desc>
1082 The ILocalOwner interface allows to provide custom implementation
1083 of VirtualBox interfaces, not being fully remote-aware classes by themselved.
1084 Most importnat usecase for this interface is callbacks implementation.
1085 </desc>
1086 <method name="setLocalObject">
1087 <desc>
1088 Set local object.
1089 </desc>
1090 <param name="object" type="$unknown" dir="in">
1091 <desc>Local object, to forward requests to.
1092 If null, clears currently set local object(s).</desc>
1093 </param>
1094 </method>
1095 </interface>
1096
1097 <!--
1098 // IVirtualBox
1099 /////////////////////////////////////////////////////////////////////////
1100 -->
1101
1102 <interface
1103 name="IVirtualBoxCallback" extends="$unknown"
1104 uuid="2990059f-5bc8-4635-8415-658917cd3186"
1105 wsmap="suppress"
1106 >
1107
1108 <method name="onMachineStateChange">
1109 <desc>
1110 The execution state of the given machine has changed.
1111 <see>IMachine::state</see>
1112 </desc>
1113 <param name="machineId" type="wstring" dir="in">
1114 <desc>ID of the machine this event relates to.</desc>
1115 </param>
1116 <param name="state" type="MachineState" dir="in">
1117 <desc>New execution state.</desc>
1118 </param>
1119 </method>
1120
1121 <method name="onMachineDataChange">
1122 <desc>
1123 Any of the settings of the given machine has changed.
1124 </desc>
1125 <param name="machineId" type="wstring" dir="in">
1126 <desc>ID of the machine this event relates to.</desc>
1127 </param>
1128 </method>
1129
1130 <method name="onExtraDataCanChange">
1131 <desc>
1132 Notification when someone tries to change extra data for
1133 either the given machine or (if @c null) global extra data.
1134 This gives the chance to veto against changes.
1135 </desc>
1136 <param name="machineId" type="wstring" dir="in">
1137 <desc>
1138 ID of the machine this event relates to
1139 (@c null ID for global extra data change requests).
1140 </desc>
1141 </param>
1142 <param name="key" type="wstring" dir="in">
1143 <desc>
1144 Extra data key for the attempted write.
1145 </desc>
1146 </param>
1147 <param name="value" type="wstring" dir="in">
1148 <desc>
1149 Extra data value for the given key.
1150 </desc>
1151 </param>
1152 <param name="error" type="wstring" dir="out">
1153 <desc>
1154 Optional error message describing the reason of the
1155 veto (ignored if this notification returns @c true).
1156 </desc>
1157 </param>
1158 <param name="allowChange" type="boolean" dir="return">
1159 <desc>
1160 Flag to indicate whether the callee agrees (@c true)
1161 or vetoes against the change (@c false).
1162 </desc>
1163 </param>
1164 </method>
1165
1166 <method name="onExtraDataChange">
1167 <desc>
1168 Notification when machine specific or global extra data
1169 has changed.
1170 </desc>
1171 <param name="machineId" type="wstring" dir="in">
1172 <desc>
1173 ID of the machine this event relates to.
1174 Null for global extra data changes.
1175 </desc>
1176 </param>
1177 <param name="key" type="wstring" dir="in">
1178 <desc>
1179 Extra data key that has changed.
1180 </desc>
1181 </param>
1182 <param name="value" type="wstring" dir="in">
1183 <desc>
1184 Extra data value for the given key.
1185 </desc>
1186 </param>
1187 </method>
1188
1189 <method name="onMediaRegistered">
1190 <desc>
1191 The given media was registered or unregistered
1192 within this VirtualBox installation.
1193
1194 The @a mediaType parameter describes what type of
1195 media the specified @a mediaId refers to. Possible
1196 values are:
1197
1198 <ul>
1199 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1200 that, if registered, can be obtained using the
1201 <link to="IVirtualBox::getHardDisk"/> call.</li>
1202 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1203 that, if registered, can be obtained using the
1204 <link to="IVirtualBox::getDVDImage"/> call.</li>
1205 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1206 that, if registered, can be obtained using the
1207 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1208 </ul>
1209
1210 Note that if this is a deregistration notification,
1211 there is no way to access the object representing the
1212 unregistered media. It is supposed that the
1213 application will do required cleanup based on the
1214 @a mediaId value.
1215 </desc>
1216 <param name="mediaId" type="wstring" dir="in">
1217 <desc>ID of the media this event relates to.</desc>
1218 </param>
1219 <param name="mediaType" type="DeviceType" dir="in">
1220 <desc>Type of the media this event relates to.</desc>
1221 </param>
1222 <param name="registered" type="boolean" dir="in">
1223 <desc>
1224 If @c true, the media was registered, otherwise it was
1225 unregistered.
1226 </desc>
1227 </param>
1228 </method>
1229
1230 <method name="onMachineRegistered">
1231 <desc>
1232 The given machine was registered or unregistered
1233 within this VirtualBox installation.
1234 </desc>
1235 <param name="machineId" type="wstring" dir="in">
1236 <desc>ID of the machine this event relates to.</desc>
1237 </param>
1238 <param name="registered" type="boolean" dir="in">
1239 <desc>
1240 If @c true, the machine was registered, otherwise it was
1241 unregistered.
1242 </desc>
1243 </param>
1244 </method>
1245
1246 <method name="onSessionStateChange">
1247 <desc>
1248 The state of the session for the given machine was changed.
1249 <see>IMachine::sessionState</see>
1250 </desc>
1251 <param name="machineId" type="wstring" dir="in">
1252 <desc>ID of the machine this event relates to.</desc>
1253 </param>
1254 <param name="state" type="SessionState" dir="in">
1255 <desc>New session state.</desc>
1256 </param>
1257 </method>
1258
1259 <method name="onSnapshotTaken">
1260 <desc>
1261 A new snapshot of the machine has been taken.
1262 <see>ISnapshot</see>
1263 </desc>
1264 <param name="machineId" type="wstring" dir="in">
1265 <desc>ID of the machine this event relates to.</desc>
1266 </param>
1267 <param name="snapshotId" type="wstring" dir="in">
1268 <desc>ID of the new snapshot.</desc>
1269 </param>
1270 </method>
1271
1272 <method name="onSnapshotDiscarded">
1273 <desc>
1274 Snapshot of the given machine has been discarded.
1275
1276 <note>
1277 This notification is delivered <b>after</b> the snapshot
1278 object has been uninitialized on the server (so that any
1279 attempt to call its methods will return an error).
1280 </note>
1281
1282 <see>ISnapshot</see>
1283 </desc>
1284 <param name="machineId" type="wstring" dir="in">
1285 <desc>ID of the machine this event relates to.</desc>
1286 </param>
1287 <param name="snapshotId" type="wstring" dir="in">
1288 <desc>
1289 ID of the discarded snapshot. @c null means the current machine
1290 state has been discarded (restored from the current snapshot).
1291 </desc>
1292 </param>
1293 </method>
1294
1295 <method name="onSnapshotChange">
1296 <desc>
1297 Snapshot properties (name and/or description) have been changed.
1298 <see>ISnapshot</see>
1299 </desc>
1300 <param name="machineId" type="wstring" dir="in">
1301 <desc>ID of the machine this event relates to.</desc>
1302 </param>
1303 <param name="snapshotId" type="wstring" dir="in">
1304 <desc>ID of the changed snapshot.</desc>
1305 </param>
1306 </method>
1307
1308 <method name="onGuestPropertyChange">
1309 <desc>
1310 Notification when a guest property has changed.
1311 </desc>
1312 <param name="machineId" type="wstring" dir="in">
1313 <desc>
1314 ID of the machine this event relates to.
1315 </desc>
1316 </param>
1317 <param name="name" type="wstring" dir="in">
1318 <desc>
1319 The name of the property that has changed.
1320 </desc>
1321 </param>
1322 <param name="value" type="wstring" dir="in">
1323 <desc>
1324 The new property value.
1325 </desc>
1326 </param>
1327 <param name="flags" type="wstring" dir="in">
1328 <desc>
1329 The new property flags.
1330 </desc>
1331 </param>
1332 </method>
1333
1334 </interface>
1335
1336 <interface
1337 name="IDHCPServer" extends="$unknown"
1338 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1339 wsmap="managed"
1340 >
1341 <desc>
1342 The IDHCPServer interface represents the vbox dhcp server configuration.
1343
1344 To enumerate all the dhcp servers on the host, use the
1345 <link to="IVirtualBox::DHCPServers"/> attribute.
1346 </desc>
1347
1348 <attribute name="enabled" type="boolean">
1349 <desc>
1350 specifies if the dhcp server is enabled
1351 </desc>
1352 </attribute>
1353
1354 <attribute name="IPAddress" type="wstring" readonly="yes">
1355 <desc>
1356 specifies server IP
1357 </desc>
1358 </attribute>
1359
1360 <attribute name="networkMask" type="wstring" readonly="yes">
1361 <desc>
1362 specifies server network mask
1363 </desc>
1364 </attribute>
1365
1366 <attribute name="networkName" type="wstring" readonly="yes">
1367 <desc>
1368 specifies internal network name the server is used for
1369 </desc>
1370 </attribute>
1371
1372 <attribute name="lowerIP" type="wstring" readonly="yes">
1373 <desc>
1374 specifies from IP adrres in server address range
1375 </desc>
1376 </attribute>
1377
1378 <attribute name="upperIP" type="wstring" readonly="yes">
1379 <desc>
1380 specifies to IP adrres in server address range
1381 </desc>
1382 </attribute>
1383
1384 <method name="setConfiguration">
1385 <desc>
1386 configures the server
1387 <result name="E_INVALIDARG">
1388 invalid configuration supplied
1389 </result>
1390 </desc>
1391 <param name="IPAddress" type="wstring" dir="in">
1392 <desc>
1393 server IP address
1394 </desc>
1395 </param>
1396 <param name="networkMask" type="wstring" dir="in">
1397 <desc>
1398 server network mask
1399 </desc>
1400 </param>
1401 <param name="FromIPAddress" type="wstring" dir="in">
1402 <desc>
1403 server From IP address for address range
1404 </desc>
1405 </param>
1406 <param name="ToIPAddress" type="wstring" dir="in">
1407 <desc>
1408 server To IP address for address range
1409 </desc>
1410 </param>
1411 </method>
1412
1413 <method name="start">
1414 <desc>
1415 Starts DHCP server process.
1416 <result name="E_FAIL">
1417 Failed to start the process.
1418 </result>
1419 </desc>
1420 <param name="networkName" type="wstring" dir="in">
1421 <desc>
1422 Name of internal network DHCP server should attach to.
1423 </desc>
1424 </param>
1425 <param name="trunkName" type="wstring" dir="in">
1426 <desc>
1427 Name of internal network trunk.
1428 </desc>
1429 </param>
1430 <param name="trunkType" type="wstring" dir="in">
1431 <desc>
1432 Type of internal network trunk.
1433 </desc>
1434 </param>
1435 </method>
1436
1437 <method name="stop">
1438 <desc>
1439 Stops DHCP server process.
1440 <result name="E_FAIL">
1441 Failed to stop the process.
1442 </result>
1443 </desc>
1444 </method>
1445 </interface>
1446
1447 <interface
1448 name="IVirtualBox" extends="$dispatched"
1449 uuid="3f4ab53a-199b-4526-a91a-93ff62e456b8"
1450 wsmap="managed"
1451 >
1452 <desc>
1453 The IVirtualBox interface represents the main interface exposed by the
1454 product that provides virtual machine management.
1455
1456 An instance of IVirtualBox is required for the product to do anything
1457 useful. Even though the interface does not expose this, internally,
1458 IVirtualBox is implemented as a singleton and actually lives in the
1459 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1460 IVirtualBox can track the state of all virtual machines on a particular
1461 host, regardless of which frontend started them.
1462
1463 To enumerate all the virtual machines on the host, use the
1464 <link to="IVirtualBox::machines"/> attribute.
1465 </desc>
1466
1467 <attribute name="version" type="wstring" readonly="yes">
1468 <desc>
1469 A string representing the version number of the product. The
1470 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1471 last number represents the build number and will frequently change.
1472 </desc>
1473 </attribute>
1474
1475 <attribute name="revision" type="unsigned long" readonly="yes">
1476 <desc>
1477 The internal build revision number of the product.
1478 </desc>
1479 </attribute>
1480
1481 <attribute name="packageType" type="wstring" readonly="yes">
1482 <desc>
1483 A string representing the package type of this product. The
1484 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1485 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1486 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1487 this.
1488 </desc>
1489 </attribute>
1490
1491 <attribute name="homeFolder" type="wstring" readonly="yes">
1492 <desc>
1493 Full path to the directory where the global settings file,
1494 <tt>VirtualBox.xml</tt>, is stored.
1495
1496 In this version of VirtualBox, the value of this property is
1497 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1498 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1499 as determined by the host OS), and cannot be changed.
1500
1501 This path is also used as the base to resolve relative paths in
1502 places where relative paths are allowed (unless otherwise
1503 expressly indicated).
1504 </desc>
1505 </attribute>
1506
1507 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1508 <desc>
1509 Full name of the global settings file.
1510 The value of this property corresponds to the value of
1511 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1512 </desc>
1513 </attribute>
1514
1515 <attribute name="host" type="IHost" readonly="yes">
1516 <desc>Associated host object.</desc>
1517 </attribute>
1518
1519 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1520 <desc>Associated system information object.</desc>
1521 </attribute>
1522
1523 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1524 <desc>
1525 Array of machine objects registered within this VirtualBox instance.
1526 </desc>
1527 </attribute>
1528
1529 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1530 <desc>
1531 Array of hard disk objects known to this VirtualBox installation.
1532
1533 This array contains only base (root) hard disks. All differencing
1534 hard disks of the given base hard disk can be enumerated using
1535 <link to="IHardDisk::children"/>.
1536 </desc>
1537 </attribute>
1538
1539 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1540 <desc>
1541 Array of CD/DVD image objects registered with this VirtualBox instance.
1542 </desc>
1543 </attribute>
1544
1545 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1546 <desc>
1547 Array of floppy image objects registered with this VirtualBox instance.
1548 </desc>
1549 </attribute>
1550
1551 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1552
1553 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1554
1555 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1556 <desc>
1557 Collection of global shared folders. Global shared folders are
1558 available to all virtual machines.
1559
1560 New shared folders are added to the collection using
1561 <link to="#createSharedFolder"/>. Existing shared folders can be
1562 removed using <link to="#removeSharedFolder"/>.
1563
1564 <note>
1565 In the current version of the product, global shared folders are not
1566 implemented and therefore this collection is always empty.
1567 </note>
1568 </desc>
1569 </attribute>
1570
1571 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1572 <desc>
1573 Associated performance collector object.
1574 </desc>
1575 </attribute>
1576
1577 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1578 <desc>
1579 dhcp server settings.
1580 </desc>
1581 </attribute>
1582
1583 <method name="createMachine">
1584 <desc>
1585 Creates a new virtual machine.
1586
1587 The new machine is created unregistered, with the initial configuration
1588 set according to the specified guest OS type. A typical sequence of
1589 actions to create a new virtual machine is as follows:
1590
1591 <ol>
1592 <li>
1593 Call this method to have a new machine created. The returned machine
1594 object will be "mutable" allowing to change any machine property.
1595 </li>
1596
1597 <li>
1598 Configure the machine using the appropriate attributes and methods.
1599 </li>
1600
1601 <li>
1602 Call <link to="IMachine::saveSettings" /> to write the settings
1603 to the machine's XML settings file. The configuration of the newly
1604 created machine will not be saved to disk until this method is
1605 called.
1606 </li>
1607
1608 <li>
1609 Call <link to="#registerMachine" /> to add the machine to the list
1610 of machines known to VirtualBox.
1611 </li>
1612 </ol>
1613
1614 You should specify valid name for the newly created machine when calling
1615 this method. See the <link to="IMachine::name"/> attribute description
1616 for more details about the machine name.
1617
1618 The specified guest OS type identifier must match an ID of one of known
1619 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1620 array.
1621
1622 Every machine has a <i>settings file</i> that is used to store
1623 the machine configuration. This file is stored in a directory called the
1624 <i>machine settings subfolder</i>. Both the settings subfolder and file
1625 will have a name that corresponds to the name of the virtual machine.
1626 You can specify where to create the machine setting subfolder using the
1627 @a baseFolder argument. The base folder can be absolute (full path) or
1628 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1629 directory</link>.
1630
1631 If @a baseFolder is a @c null or empty string (which is recommended), the
1632 <link to="ISystemProperties::defaultMachineFolder">default machine
1633 settings folder</link> will be used as a base folder for the created
1634 machine. Otherwise the given base folder will be used. In either case,
1635 the full path to the resulting settings file has the following
1636 structure:
1637 <pre>
1638 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1639 </pre>
1640
1641 Note that if the resulting settings file already exists, this method
1642 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1643
1644 Optionally, you may specify an UUID of to assign to the created machine.
1645 However, this is not recommended and you should normally pass an empty
1646 (@c null) UUID to this method so that a new UUID will be automatically
1647 generated for every created machine. You can use UUID
1648 00000000-0000-0000-0000-000000000000 as @c null value.
1649
1650 <note>
1651 There is no way to change the name of the settings file or
1652 subfolder of the created machine directly.
1653 </note>
1654
1655 <result name="VBOX_E_OBJECT_NOT_FOUND">
1656 @a osTypeId is invalid.
1657 </result>
1658 <result name="VBOX_E_FILE_ERROR">
1659 Resulting settings file name is invalid or the settings file already
1660 exists or could not be created due to an I/O error.
1661 </result>
1662 <result name="E_INVALIDARG">
1663 @a name is empty or @c null.
1664 </result>
1665 </desc>
1666
1667 <param name="name" type="wstring" dir="in">
1668 <desc>Machine name.</desc>
1669 </param>
1670 <param name="osTypeId" type="wstring" dir="in">
1671 <desc>Guest OS Type ID.</desc>
1672 </param>
1673 <param name="baseFolder" type="wstring" dir="in">
1674 <desc>Base machine folder (optional).</desc>
1675 </param>
1676 <param name="id" type="wstring" dir="in">
1677 <desc>Machine UUID (optional).</desc>
1678 </param>
1679 <param name="machine" type="IMachine" dir="return">
1680 <desc>Created machine object.</desc>
1681 </param>
1682 </method>
1683
1684 <method name="createLegacyMachine">
1685 <desc>
1686 Creates a new virtual machine in "legacy" mode, using the specified
1687 settings file to store machine settings.
1688
1689 As opposed to machines created by <link to="#createMachine"/>,
1690 the settings file of the machine created in "legacy" mode is not
1691 automatically renamed when the machine name is changed -- it will always
1692 remain the same as specified in this method call.
1693
1694 The specified settings file name can be absolute (full path) or relative
1695 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1696 directory</link>. If the file name doesn't contain an extension, the
1697 default extension (.xml) will be appended.
1698
1699 Note that the configuration of the newly created machine is not
1700 saved to disk (and therefore no settings file is created)
1701 until <link to="IMachine::saveSettings"/> is called. If the
1702 specified settings file already exists, this method
1703 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1704
1705 See <link to="#createMachine"/> for more information.
1706
1707 @deprecated This method may be removed later. Use <link
1708 to="IVirtualBox::createMachine"/> instead.
1709
1710 <note>
1711 There is no way to change the name of the settings file
1712 of the machine created in "legacy" mode.
1713 </note>
1714
1715 <result name="VBOX_E_OBJECT_NOT_FOUND">
1716 @a osTypeId is invalid.
1717 </result>
1718 <result name="VBOX_E_FILE_ERROR">
1719 @a settingsFile is invalid or the settings file already exists or
1720 could not be created due to an I/O error.
1721 </result>
1722 <result name="E_INVALIDARG">
1723 @a name or @a settingsFile is empty or @c null.
1724 </result>
1725 </desc>
1726
1727 <param name="name" type="wstring" dir="in">
1728 <desc>Machine name.</desc>
1729 </param>
1730 <param name="osTypeId" type="wstring" dir="in">
1731 <desc>Machine OS Type ID.</desc>
1732 </param>
1733 <param name="settingsFile" type="wstring" dir="in">
1734 <desc>Name of the machine settings file.</desc>
1735 </param>
1736 <param name="id" type="wstring" dir="in">
1737 <desc>Machine UUID (optional).</desc>
1738 </param>
1739 <param name="machine" type="IMachine" dir="return">
1740 <desc>Created machine object.</desc>
1741 </param>
1742 </method>
1743
1744 <method name="openMachine">
1745 <desc>
1746 Opens a virtual machine from the existing settings file.
1747 The opened machine remains unregistered until you call
1748 <link to="#registerMachine"/>.
1749
1750 The specified settings file name can be absolute
1751 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1752 VirtualBox home directory</link>. This file must exist
1753 and must be a valid machine settings file whose contents
1754 will be used to construct the machine object.
1755
1756 @deprecated Will be removed soon.
1757 <result name="VBOX_E_FILE_ERROR">
1758 Settings file name invalid, not found or sharing violation.
1759 </result>
1760 </desc>
1761 <param name="settingsFile" type="wstring" dir="in">
1762 <desc>
1763 Name of the machine settings file.
1764 </desc>
1765 </param>
1766 <param name="machine" type="IMachine" dir="return">
1767 <desc>Opened machine object.</desc>
1768 </param>
1769 <note>
1770 <link to="IMachine::settingsModified"/> will return
1771 @c false for the created machine, until any of machine settings
1772 are changed.
1773 </note>
1774 </method>
1775
1776 <method name="registerMachine">
1777 <desc>
1778
1779 Registers the machine previously created using
1780 <link to="#createMachine"/> or opened using
1781 <link to="#openMachine"/> within this VirtualBox installation. After
1782 successful method invocation, the
1783 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1784 to all registered callbacks.
1785
1786 <note>
1787 This method implicitly calls <link to="IMachine::saveSettings"/>
1788 to save all current machine settings before registering it.
1789 </note>
1790
1791 <result name="VBOX_E_OBJECT_NOT_FOUND">
1792 No matching virtual machine found.
1793 </result>
1794 <result name="VBOX_E_INVALID_OBJECT_STATE">
1795 Virtual machine was not created within this VirtualBox instance.
1796 </result>
1797
1798 </desc>
1799 <param name="machine" type="IMachine" dir="in"/>
1800 </method>
1801
1802 <method name="getMachine">
1803 <desc>
1804 Attempts to find a virtual machine given its UUID.
1805 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1806 instead.
1807
1808 <result name="VBOX_E_OBJECT_NOT_FOUND">
1809 Could not find registered machine matching @a id.
1810 </result>
1811
1812 </desc>
1813 <param name="id" type="wstring" dir="in"/>
1814 <param name="machine" type="IMachine" dir="return"/>
1815 </method>
1816
1817 <method name="findMachine">
1818 <desc>
1819 Attempts to find a virtual machine given its name.
1820 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1821 instead.
1822
1823 <result name="VBOX_E_OBJECT_NOT_FOUND">
1824 Could not find registered machine matching @a name.
1825 </result>
1826
1827 </desc>
1828 <param name="name" type="wstring" dir="in"/>
1829 <param name="machine" type="IMachine" dir="return"/>
1830 </method>
1831
1832 <method name="unregisterMachine">
1833 <desc>
1834
1835 Unregisters the machine previously registered using
1836 <link to="#registerMachine"/>. After successful method invocation, the
1837 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1838 to all registered callbacks.
1839
1840 <note>
1841 The specified machine must not be in the Saved state, have an open
1842 (or a spawning) direct session associated with it, have snapshots or
1843 have hard disks attached.
1844 </note>
1845
1846 <note>
1847 This method implicitly calls <link to="IMachine::saveSettings"/> to
1848 save all current machine settings before unregistering it.
1849 </note>
1850
1851 <note>
1852 If the given machine is inaccessible (see
1853 <link to="IMachine::accessible"/>), it will be unregistered and
1854 fully uninitialized right afterwards. As a result, the returned
1855 machine object will be unusable and an attempt to call
1856 <b>any</b> method will return the "Object not ready" error.
1857 </note>
1858
1859 <result name="VBOX_E_OBJECT_NOT_FOUND">
1860 Could not find registered machine matching @a id.
1861 </result>
1862 <result name="VBOX_E_INVALID_VM_STATE">
1863 Machine is in Saved state.
1864 </result>
1865 <result name="VBOX_E_INVALID_OBJECT_STATE">
1866 Machine has snapshot or open session or hard disk attached.
1867 </result>
1868
1869 </desc>
1870 <param name="id" type="wstring" dir="in">
1871 <desc>UUID of the machine to unregister.</desc>
1872 </param>
1873 <param name="machine" type="IMachine" dir="return">
1874 <desc>Unregistered machine object.</desc>
1875 </param>
1876 </method>
1877
1878 <method name="createAppliance">
1879 <desc>
1880 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1881 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1882 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1883 </desc>
1884 <param name="appliance" type="IAppliance" dir="return">
1885 <desc>New appliance.</desc>
1886 </param>
1887 </method>
1888
1889 <method name="createHardDisk">
1890 <desc>
1891 Creates a new base hard disk object that will use the given storage
1892 format and location for hard disk data.
1893
1894 Note that the actual storage unit is not created by this method. In
1895 order to do it, and before you are able to attach the created hard disk
1896 to virtual machines, you must call one of the following methods to
1897 allocate a format-specific storage unit at the specified location:
1898 <ul>
1899 <li><link to="IHardDisk::createBaseStorage"/></li>
1900 <li><link to="IHardDisk::createDiffStorage"/></li>
1901 </ul>
1902
1903 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1904 remain uninitialized until the hard disk storage unit is successfully
1905 created by one of the above methods.
1906
1907 After the storage unit is successfully created, the hard disk gets
1908 remembered by this VirtualBox installation and will be accessible
1909 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1910 methods. Remembered root (base) hard disks are also returned as part of
1911 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1912
1913 The list of all storage formats supported by this VirtualBox
1914 installation can be obtained using
1915 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1916 attribute is empty or @c null then the default storage format
1917 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1918 be used for creating a storage unit of the hard disk.
1919
1920 Note that the format of the location string is storage format specific.
1921 See <link to="IMedium::location"/>, IHardDisk and
1922 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1923
1924 <result name="VBOX_E_OBJECT_NOT_FOUND">
1925 @a format identifier is invalid. See
1926 <link to="ISystemProperties::hardDiskFormats"/>.
1927 </result>
1928 <result name="VBOX_E_FILE_ERROR">
1929 @a location is a not valid file name (for file-based formats only).
1930 </result>
1931 </desc>
1932 <param name="format" type="wstring" dir="in">
1933 <desc>
1934 Identifier of the storage format to use for the new hard disk.
1935 </desc>
1936 </param>
1937 <param name="location" type="wstring" dir="in">
1938 <desc>
1939 Location of the storage unit for the new hard disk.
1940 </desc>
1941 </param>
1942 <param name="hardDisk" type="IHardDisk" dir="return">
1943 <desc>Created hard disk object.</desc>
1944 </param>
1945 </method>
1946
1947 <method name="openHardDisk">
1948 <desc>
1949 Opens a hard disk from an existing location, optionally replacing
1950 the image UUID and/or parent UUID.
1951
1952 After the hard disk is successfully opened by this method, it gets
1953 remembered by (known to) this VirtualBox installation and will be
1954 accessible through <link to="#getHardDisk"/> and
1955 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1956 are also returned as part of the <link to="#hardDisks"/> array and can
1957 be attached to virtual machines. See IHardDisk for more details.
1958
1959 If a differencing hard disk is to be opened by this method, the
1960 operation will succeed only if its parent hard disk and all ancestors,
1961 if any, are already known to this VirtualBox installation (for example,
1962 were opened by this method before).
1963
1964 This method tries to guess the storage format of the specified hard disk
1965 by reading hard disk data at the specified location.
1966
1967 If @a write is ReadWrite (which it should be), the image is opened for
1968 read/write access and must have according permissions, as VirtualBox
1969 may actually write status information into the disk's metadata sections.
1970
1971 Note that write access is required for all typical image usage in VirtualBox,
1972 since VirtualBox may need to write metadata such as a UUID into the image.
1973 The only exception is opening a source image temporarily for copying and
1974 cloning when the image will quickly be closed again.
1975
1976 Note that the format of the location string is storage format specific.
1977 See <link to="IMedium::location"/>, IHardDisk and
1978 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1979
1980 <result name="VBOX_E_FILE_ERROR">
1981 Invalid hard disk storage file location or could not find the hard
1982 disk at the specified location.
1983 </result>
1984 <result name="VBOX_E_IPRT_ERROR">
1985 Could not get hard disk storage format.
1986 </result>
1987 <result name="E_INVALIDARG">
1988 Invalid hard disk storage format.
1989 </result>
1990
1991 </desc>
1992 <param name="location" type="wstring" dir="in">
1993 <desc>
1994 Location of the storage unit that contains hard disk data in one of
1995 the supported storage formats.
1996 </desc>
1997 </param>
1998 <param name="accessMode" type="AccessMode" dir="in">
1999 <desc>
2000 Determines whether to open the image in read/write or read-only mode.
2001 </desc>
2002 </param>
2003 <param name="setImageId" type="boolean" dir="in">
2004 <desc>
2005 Select whether a new image UUID is set or not.
2006 </desc>
2007 </param>
2008 <param name="imageId" type="wstring" dir="in">
2009 <desc>
2010 New UUID for the image. If an empty string is passed, then a new
2011 UUID is automatically created. Specifying a zero UUIDs is not valid.
2012 </desc>
2013 </param>
2014 <param name="setParentId" type="boolean" dir="in">
2015 <desc>
2016 Select whether a new parent UUID is set or not.
2017 </desc>
2018 </param>
2019 <param name="parentId" type="wstring" dir="in">
2020 <desc>
2021 New parent UUID for the image. If an empty string is passed, then a
2022 new UUID is automatically created, provided @a setParentId is
2023 @c true. A zero UUID is valid.
2024 </desc>
2025 </param>
2026 <param name="hardDisk" type="IHardDisk" dir="return">
2027 <desc>Opened hard disk object.</desc>
2028 </param>
2029 </method>
2030
2031 <method name="getHardDisk" const="yes">
2032 <desc>
2033 Returns a hard disk with the given UUID.
2034
2035 The hard disk with the given UUID must be known to this VirtualBox
2036 installation, i.e. it must be previously created by
2037 <link to="#createHardDisk"/> or opened by <link
2038 to="#openHardDisk"/>, or attached to some known virtual machine.
2039
2040 <result name="VBOX_E_OBJECT_NOT_FOUND">
2041 No hard disk object matching @a id found.
2042 </result>
2043
2044 </desc>
2045 <param name="id" type="wstring" dir="in">
2046 <desc>UUID of the hard disk to look for.</desc>
2047 </param>
2048 <param name="hardDisk" type="IHardDisk" dir="return">
2049 <desc>Found hard disk object.</desc>
2050 </param>
2051 </method>
2052
2053 <method name="findHardDisk">
2054 <desc>
2055 Returns a hard disk that uses the given location to store hard
2056 disk data.
2057
2058 The given hard disk must be known to this VirtualBox installation, i.e.
2059 it must be previously created by
2060 <link to="#createHardDisk"/> or opened by <link
2061 to="#openHardDisk"/>, or attached to some known virtual machine.
2062
2063 The search is done by comparing the value of the @a location argument to
2064 the <link to="IHardDisk::location"/> attribute of each known hard
2065 disk.
2066
2067 For locations represented by file names in the host's file system, the
2068 requested location can be a path relative to the
2069 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2070 only a file name without any path is given, the
2071 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2072 folder</link> will be prepended to the file name before searching. Note
2073 that on case sensitive file systems, a case sensitive comparison is
2074 performed, otherwise the case of symbols in the file path is ignored.
2075
2076 <result name="VBOX_E_OBJECT_NOT_FOUND">
2077 No hard disk object matching @a location found.
2078 </result>
2079
2080 </desc>
2081 <param name="location" type="wstring" dir="in">
2082 <desc>Location string to search for.</desc>
2083 </param>
2084 <param name="hardDisk" type="IHardDisk" dir="return">
2085 <desc>Found hard disk object.</desc>
2086 </param>
2087 </method>
2088
2089 <method name="openDVDImage">
2090 <desc>
2091 Opens a CD/DVD image contained in the specified file of the supported
2092 format and assigns it the given UUID.
2093
2094 After the image is successfully opened by this method, it gets
2095 remembered by (known to) this VirtualBox installation and will be
2096 accessible through <link to="#getDVDImage"/> and
2097 <link to="#findDVDImage"/> methods. Remembered images are also
2098 returned as part of the <link to="#DVDImages"/> array and can be mounted
2099 to virtual machines. See IMedium for more details.
2100
2101 See <link to="IMedium::location"/> to get more details about the format
2102 of the location string.
2103
2104 <note>
2105 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2106 </note>
2107
2108 <result name="VBOX_E_FILE_ERROR">
2109 Invalid CD/DVD image file location or could not find the CD/DVD
2110 image at the specified location.
2111 </result>
2112 <result name="VBOX_E_INVALID_OBJECT_STATE">
2113 CD/DVD image already exists in the media registry.
2114 </result>
2115
2116 </desc>
2117 <param name="location" type="wstring" dir="in">
2118 <desc>
2119 Full path to the file that contains a valid CD/DVD image.
2120 </desc>
2121 </param>
2122 <param name="id" type="wstring" dir="in">
2123 <desc>
2124 UUID to assign to the given image within this VirtualBox installation.
2125 If an empty (@c null) UUID is specified, the system will randomly
2126 generate a new UUID.
2127 </desc>
2128 </param>
2129 <param name="image" type="IDVDImage" dir="return">
2130 <desc>Opened CD/DVD image object.</desc>
2131 </param>
2132 </method>
2133
2134 <method name="getDVDImage">
2135 <desc>
2136 Returns a CD/DVD image with the given UUID.
2137
2138 The image with the given UUID must be known to this VirtualBox
2139 installation, i.e. it must be previously opened by <link
2140 to="#openDVDImage"/>, or mounted to some known virtual machine.
2141
2142 <result name="VBOX_E_OBJECT_NOT_FOUND">
2143 No matching DVD image found in the media registry.
2144 </result>
2145
2146 </desc>
2147 <param name="id" type="wstring" dir="in">
2148 <desc>UUID of the image to look for.</desc>
2149 </param>
2150 <param name="image" type="IDVDImage" dir="return">
2151 <desc>Found CD/DVD image object.</desc>
2152 </param>
2153 </method>
2154
2155 <method name="findDVDImage">
2156 <desc>
2157 Returns a CD/DVD image with the given image location.
2158
2159 The image with the given UUID must be known to this VirtualBox
2160 installation, i.e. it must be previously opened by <link
2161 to="#openDVDImage"/>, or mounted to some known virtual machine.
2162
2163 The search is done by comparing the value of the @a location argument to
2164 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2165
2166 The requested location can be a path relative to the
2167 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2168 only a file name without any path is given, the
2169 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2170 folder</link> will be prepended to the file name before searching. Note
2171 that on case sensitive file systems, a case sensitive comparison is
2172 performed, otherwise the case in the file path is ignored.
2173
2174 <result name="VBOX_E_FILE_ERROR">
2175 Invalid image file location.
2176 </result>
2177 <result name="VBOX_E_OBJECT_NOT_FOUND">
2178 No matching DVD image found in the media registry.
2179 </result>
2180
2181 </desc>
2182 <param name="location" type="wstring" dir="in">
2183 <desc>CD/DVD image file path to look for.</desc>
2184 </param>
2185 <param name="image" type="IDVDImage" dir="return">
2186 <desc>Found CD/DVD image object.</desc>
2187 </param>
2188 </method>
2189
2190 <method name="openFloppyImage">
2191 <desc>
2192 Opens a floppy image contained in the specified file of the supported
2193 format and assigns it the given UUID.
2194
2195 After the image is successfully opened by this method, it gets
2196 remembered by (known to) this VirtualBox installation and will be
2197 accessible through <link to="#getFloppyImage"/> and
2198 <link to="#findFloppyImage"/> methods. Remembered images are also
2199 returned as part of the <link to="#floppyImages"/> array and can be
2200 mounted to virtual machines. See IMedium for more details.
2201
2202 See <link to="IMedium::location"/> to get more details about the format
2203 of the location string.
2204
2205 <result name="VBOX_E_FILE_ERROR">
2206 Invalid floppy image file location or could not find the floppy
2207 image at the specified location.
2208 </result>
2209 <result name="VBOX_E_INVALID_OBJECT_STATE">
2210 Floppy image already exists in the media registry.
2211 </result>
2212
2213 <note>
2214 Currently, only raw floppy images are supported by VirtualBox.
2215 </note>
2216 </desc>
2217 <param name="location" type="wstring" dir="in">
2218 <desc>
2219 Full path to the file that contains a valid floppy image.
2220 </desc>
2221 </param>
2222 <param name="id" type="wstring" dir="in">
2223 <desc>
2224 UUID to assign to the given image file within this VirtualBox
2225 installation. If an empty (@c null) UUID is specified, the system will
2226 randomly generate a new UUID.
2227 </desc>
2228 </param>
2229 <param name="image" type="IFloppyImage" dir="return">
2230 <desc>Opened floppy image object.</desc>
2231 </param>
2232 </method>
2233
2234 <method name="getFloppyImage">
2235 <desc>
2236 Returns a floppy image with the given UUID.
2237
2238 The image with the given UUID must be known to this VirtualBox
2239 installation, i.e. it must be previously opened by <link
2240 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2241
2242 <result name="VBOX_E_OBJECT_NOT_FOUND">
2243 No matching floppy image found in the media registry.
2244 </result>
2245
2246 </desc>
2247 <param name="id" type="wstring" dir="in">
2248 <desc>UUID of the image to look for.</desc>
2249 </param>
2250 <param name="image" type="IFloppyImage" dir="return">
2251 <desc>Found floppy image object.</desc>
2252 </param>
2253 </method>
2254
2255 <method name="findFloppyImage">
2256 <desc>
2257 Returns a floppy image with the given image location.
2258
2259 The image with the given UUID must be known to this VirtualBox
2260 installation, i.e. it must be previously opened by <link
2261 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2262
2263 The search is done by comparing the value of the @a location argument to
2264 the <link to="IMedium::location"/> attribute of each known floppy image.
2265
2266 The requested location can be a path relative to the
2267 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2268 only a file name without any path is given, the
2269 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2270 folder</link> will be prepended to the file name before searching. Note
2271 that on case sensitive file systems, a case sensitive comparison is
2272 performed, otherwise the case of symbols in the file path is ignored.
2273
2274 <result name="VBOX_E_FILE_ERROR">
2275 Invalid image file location.
2276 </result>
2277 <result name="VBOX_E_OBJECT_NOT_FOUND">
2278 No matching floppy image found in the media registry.
2279 </result>
2280
2281 </desc>
2282 <param name="location" type="wstring" dir="in">
2283 <desc>Floppy image file path to look for.</desc>
2284 </param>
2285 <param name="image" type="IFloppyImage" dir="return">
2286 <desc>Found floppy image object.</desc>
2287 </param>
2288 </method>
2289
2290 <method name="getGuestOSType">
2291 <desc>
2292 Returns an object describing the specified guest OS type.
2293
2294 The requested guest OS type is specified using a string which is a
2295 mnemonic identifier of the guest operating system, such as
2296 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2297 particular virtual machine can be read or set using the
2298 <link to="IMachine::OSTypeId"/> attribute.
2299
2300 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2301 available guest OS type objects. Each object has an
2302 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2303 the guest OS this object describes.
2304
2305 <result name="E_INVALIDARG">
2306 @a id is not a valid Guest OS type.
2307 </result>
2308
2309 </desc>
2310 <param name="id" type="wstring" dir="in">
2311 <desc>Guest OS type ID string.</desc>
2312 </param>
2313 <param name="type" type="IGuestOSType" dir="return">
2314 <desc>Guest OS type object.</desc>
2315 </param>
2316 </method>
2317
2318 <method name="createSharedFolder">
2319 <desc>
2320 Creates a new global shared folder by associating the given logical
2321 name with the given host path, adds it to the collection of shared
2322 folders and starts sharing it. Refer to the description of
2323 <link to="ISharedFolder"/> to read more about logical names.
2324 <note>
2325 In the current implementation, this operation is not
2326 implemented.
2327 </note>
2328 </desc>
2329 <param name="name" type="wstring" dir="in">
2330 <desc>Unique logical name of the shared folder.</desc>
2331 </param>
2332 <param name="hostPath" type="wstring" dir="in">
2333 <desc>Full path to the shared folder in the host file system.</desc>
2334 </param>
2335 <param name="writable" type="boolean" dir="in">
2336 <desc>Whether the share is writable or readonly</desc>
2337 </param>
2338 </method>
2339
2340 <method name="removeSharedFolder">
2341 <desc>
2342 Removes the global shared folder with the given name previously
2343 created by <link to="#createSharedFolder"/> from the collection of
2344 shared folders and stops sharing it.
2345 <note>
2346 In the current implementation, this operation is not
2347 implemented.
2348 </note>
2349 </desc>
2350 <param name="name" type="wstring" dir="in">
2351 <desc>Logical name of the shared folder to remove.</desc>
2352 </param>
2353 </method>
2354
2355 <method name="getExtraDataKeys">
2356 <desc>
2357 Returns an array representing the global extra data keys which currently
2358 have values defined.
2359 </desc>
2360 <param name="value" type="wstring" dir="return" safearray="yes">
2361 <desc>Array of extra data keys.</desc>
2362 </param>
2363 </method>
2364
2365 <method name="getExtraData">
2366 <desc>
2367 Returns associated global extra data.
2368
2369 If the requested data @a key does not exist, this function will
2370 succeed and return an empty string in the @a value argument.
2371
2372 <result name="VBOX_E_FILE_ERROR">
2373 Settings file not accessible.
2374 </result>
2375 <result name="VBOX_E_XML_ERROR">
2376 Could not parse the settings file.
2377 </result>
2378
2379 </desc>
2380 <param name="key" type="wstring" dir="in">
2381 <desc>Name of the data key to get.</desc>
2382 </param>
2383 <param name="value" type="wstring" dir="return">
2384 <desc>Value of the requested data key.</desc>
2385 </param>
2386 </method>
2387
2388 <method name="setExtraData">
2389 <desc>
2390 Sets associated global extra data.
2391
2392 If you pass @c null or empty string as a key @a value, the given @a key
2393 will be deleted.
2394
2395 <note>
2396 Before performing the actual data change, this method will ask all
2397 registered callbacks using the
2398 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2399 notification for a permission. If one of the callbacks refuses the
2400 new value, the change will not be performed.
2401 </note>
2402 <note>
2403 On success, the
2404 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2405 is called to inform all registered callbacks about a successful data
2406 change.
2407 </note>
2408
2409 <result name="VBOX_E_FILE_ERROR">
2410 Settings file not accessible.
2411 </result>
2412 <result name="VBOX_E_XML_ERROR">
2413 Could not parse the settings file.
2414 </result>
2415 <result name="E_ACCESSDENIED">
2416 Modification request refused.
2417 </result>
2418
2419 </desc>
2420 <param name="key" type="wstring" dir="in">
2421 <desc>Name of the data key to set.</desc>
2422 </param>
2423 <param name="value" type="wstring" dir="in">
2424 <desc>Value to assign to the key.</desc>
2425 </param>
2426 </method>
2427
2428 <method name="openSession">
2429 <desc>
2430 Opens a new direct session with the given virtual machine.
2431
2432 A direct session acts as a local lock on the given VM.
2433 There can be only one direct session open at a time for every
2434 virtual machine, protecting the VM from being manipulated by
2435 conflicting actions from different processes. Only after a
2436 direct session has been opened, one can change all VM settings
2437 and execute the VM in the process space of the session object.
2438
2439 Sessions therefore can be compared to mutex semaphores that
2440 lock a given VM for modification and execution.
2441 See <link to="ISession">ISession</link> for details.
2442
2443 <note>Unless you are writing a new VM frontend, you will not
2444 want to execute a VM in the current process. To spawn a new
2445 process that executes a VM, use
2446 <link to="IVirtualBox::openRemoteSession" />
2447 instead.</note>
2448
2449 Upon successful return, the session object can be used to
2450 get access to the machine and to the VM console.
2451
2452 In VirtualBox terminology, the machine becomes "mutable" after
2453 a session has been opened. Note that the "mutable" machine
2454 object, on which you may invoke IMachine methods to change its
2455 settings, will be a different object from the immutable IMachine
2456 objects returned by various IVirtualBox methods. To obtain a
2457 mutable IMachine object (upon which you can invoke settings methods),
2458 use the <link to="ISession::machine" /> attribute.
2459
2460 One must always call <link to="ISession::close" /> to release the
2461 lock on the machine, or the machine's state will eventually be
2462 set to "Aborted".
2463
2464 In other words, to change settings on a machine, the following
2465 sequence is typically performed:
2466
2467 <ol>
2468 <li>Call this method (openSession) to have a machine locked for
2469 the current session.</li>
2470
2471 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2472
2473 <li>Change the settings of the machine.</li>
2474
2475 <li>Call <link to="IMachine::saveSettings" />.</li>
2476
2477 <li>Close the session by calling <link to="ISession::close"/>.</li>
2478 </ol>
2479
2480 <result name="E_UNEXPECTED">
2481 Virtual machine not registered.
2482 </result>
2483 <result name="E_ACCESSDENIED">
2484 Process not started by OpenRemoteSession.
2485 </result>
2486 <result name="VBOX_E_OBJECT_NOT_FOUND">
2487 No matching virtual machine found.
2488 </result>
2489 <result name="VBOX_E_INVALID_OBJECT_STATE">
2490 Session already open or being opened.
2491 </result>
2492 <result name="VBOX_E_VM_ERROR">
2493 Failed to assign machine to session.
2494 </result>
2495
2496 </desc>
2497 <param name="session" type="ISession" dir="in">
2498 <desc>
2499 Session object that will represent the opened session after
2500 successful method invocation. This object must not represent
2501 the already open session.
2502 <note>
2503 This session will be automatically closed if the
2504 VirtualBox server is terminated for some reason.
2505 </note>
2506 </desc>
2507 </param>
2508 <param name="machineId" type="wstring" dir="in">
2509 <desc>ID of the virtual machine to open a session with.</desc>
2510 </param>
2511 </method>
2512
2513 <method name="openRemoteSession">
2514 <desc>
2515 Spawns a new process that executes a virtual machine (called a
2516 "remote session").
2517
2518 Opening a remote session causes the VirtualBox server to start a new
2519 process that opens a direct session with the given VM. As a result, the
2520 VM is locked by that direct session in the new process, preventing
2521 conflicting changes from other processes. Since sessions act as locks
2522 that prevent conflicting changes, one cannot open a remote session
2523 for a VM that already has another open session (direct or remote), or
2524 is currently in the process of opening one (see <link
2525 to="IMachine::sessionState"/>).
2526
2527 While the remote session still provides some level of control over the
2528 VM execution to the caller (using the <link to="IConsole" /> interface),
2529 not all VM settings are available for modification within the remote
2530 session context.
2531
2532 This operation can take some time (a new VM is started in a new process,
2533 for which memory and other resources need to be set up). Because of this,
2534 an <link to="IProgress" /> is returned to allow the caller to wait for this
2535 asynchronous operation to be completed. Until then, the remote session
2536 object remains in the closed state, and accessing the machine or its
2537 console through it is invalid. It is recommended to use
2538 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2539 completion.
2540
2541 As with all <link to="ISession" /> objects, it is recommended to call
2542 <link to="ISession::close" /> on the local session object once openRemoteSession()
2543 has been called. However, the session's state (see <link to="ISession::state" />)
2544 will not return to "Closed" until the remote session has also closed (i.e.
2545 until the VM is no longer running). In that case, however, the state of
2546 the session will automatically change back to "Closed".
2547
2548 Currently supported session types (values of the @a type
2549 argument) are:
2550 <ul>
2551 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2552 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2553 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2554 </ul>
2555
2556 The @a environment argument is a string containing definitions of
2557 environment variables in the following format:
2558 @code
2559 NAME[=VALUE]\n
2560 NAME[=VALUE]\n
2561 ...
2562 @endcode
2563 where <tt>\\n</tt> is the new line character. These environment
2564 variables will be appended to the environment of the VirtualBox server
2565 process. If an environment variable exists both in the server process
2566 and in this list, the value from this list takes precedence over the
2567 server's variable. If the value of the environment variable is
2568 omitted, this variable will be removed from the resulting environment.
2569 If the environment string is @c null or empty, the server environment
2570 is inherited by the started process as is.
2571
2572 <see>openExistingSession</see>
2573
2574 <result name="E_UNEXPECTED">
2575 Virtual machine not registered.
2576 </result>
2577 <result name="E_INVALIDARG">
2578 Invalid session type @a type.
2579 </result>
2580 <result name="VBOX_E_OBJECT_NOT_FOUND">
2581 No machine matching @a machineId found.
2582 </result>
2583 <result name="VBOX_E_INVALID_OBJECT_STATE">
2584 Session already open or being opened.
2585 </result>
2586 <result name="VBOX_E_IPRT_ERROR">
2587 Launching process for machine failed.
2588 </result>
2589 <result name="VBOX_E_VM_ERROR">
2590 Failed to assign machine to session.
2591 </result>
2592
2593 </desc>
2594 <param name="session" type="ISession" dir="in">
2595 <desc>
2596 Session object that will represent the opened remote session
2597 after successful method invocation (this object must not
2598 represent an already open session).
2599 </desc>
2600 </param>
2601 <param name="machineId" type="wstring" dir="in">
2602 <desc>ID of the virtual machine to open a session with.</desc>
2603 </param>
2604 <param name="type" type="wstring" dir="in">
2605 <desc>
2606 Type of the remote session (case sensitive).
2607 </desc>
2608 </param>
2609 <param name="environment" type="wstring" dir="in">
2610 <desc>
2611 Environment to pass to the opened session.
2612 </desc>
2613 </param>
2614 <param name="progress" type="IProgress" dir="return">
2615 <desc>Progress object to track the operation completion.</desc>
2616 </param>
2617 </method>
2618
2619 <method name="openExistingSession">
2620 <desc>
2621 Opens a new remote session with the virtual machine for
2622 which a direct session is already open.
2623
2624 The remote session provides some level of control over the VM
2625 execution (using the IConsole interface) to the caller; however,
2626 within the remote session context, not all VM settings are available
2627 for modification.
2628
2629 As opposed to <link to="#openRemoteSession"/>, the number of
2630 remote sessions opened this way is not limited by the API
2631
2632 <note>
2633 It is an error to open a remote session with the machine that
2634 doesn't have an open direct session.
2635 </note>
2636
2637 <result name="E_UNEXPECTED">
2638 Virtual machine not registered.
2639 </result>
2640 <result name="VBOX_E_OBJECT_NOT_FOUND">
2641 No machine matching @a machineId found.
2642 </result>
2643 <result name="VBOX_E_INVALID_OBJECT_STATE">
2644 Session already open or being opened.
2645 </result>
2646 <result name="VBOX_E_INVALID_SESSION_STATE">
2647 Direct session state not Open.
2648 </result>
2649 <result name="VBOX_E_VM_ERROR">
2650 Failed to get console object from direct session or assign
2651 machine to session.
2652 </result>
2653
2654 <see>openRemoteSession</see>
2655 </desc>
2656 <param name="session" type="ISession" dir="in">
2657 <desc>
2658 Session object that will represent the open remote session
2659 after successful method invocation. This object must not
2660 represent an already open session.
2661 <note>
2662 This session will be automatically closed when the peer
2663 (direct) session dies or gets closed.
2664 </note>
2665 </desc>
2666 </param>
2667 <param name="machineId" type="wstring" dir="in">
2668 <desc>ID of the virtual machine to open a session with.</desc>
2669 </param>
2670 </method>
2671
2672 <method name="registerCallback">
2673 <desc>
2674 Registers a new global VirtualBox callback. The methods of the given
2675 callback object will be called by VirtualBox when an appropriate
2676 event occurs.
2677
2678 <result name="E_INVALIDARG">
2679 A @c null callback cannot be registered.
2680 </result>
2681
2682 </desc>
2683 <param name="callback" type="IVirtualBoxCallback" dir="in">
2684 <desc>Callback object to register.</desc>
2685 </param>
2686 </method>
2687
2688 <method name="unregisterCallback">
2689 <desc>
2690 Unregisters the previously registered global VirtualBox callback.
2691
2692 <result name="E_INVALIDARG">
2693 Specified @a callback not registered.
2694 </result>
2695
2696 </desc>
2697 <param name="callback" type="IVirtualBoxCallback" dir="in">
2698 <desc>Callback object to unregister.</desc>
2699 </param>
2700 </method>
2701
2702 <method name="waitForPropertyChange">
2703 <desc>
2704 Blocks the caller until any of the properties represented by the
2705 @a what argument changes the value or until the given timeout interval
2706 expires.
2707
2708 The @a what argument is a comma separated list of property masks that
2709 describe properties the caller is interested in. The property mask is
2710 a string in the following format:
2711
2712 <pre>
2713 [[group.]subgroup.]name
2714 </pre>
2715
2716 where @c name is the property name and @c group, @c subgroup are zero
2717 or more property group specifiers. Each element (group or name) in
2718 the property mask may be either a Latin string or an asterisk symbol
2719 (@c "*") which is used to match any string for the given element. A
2720 property mask that doesn't contain asterisk symbols represents a
2721 single fully qualified property name.
2722
2723 Groups in the fully qualified property name go from more generic (the
2724 left-most part) to more specific (the right-most part). The first
2725 element is usually a name of the object the property belongs to. The
2726 second element may be either a property name, or a child object name,
2727 or an index if the preceding element names an object which is one of
2728 many objects of the same type. This way, property names form a
2729 hierarchy of properties. Here are some examples of property names:
2730
2731 <table>
2732 <tr>
2733 <td><tt>VirtualBox.version</tt></td>
2734 <td><link to="IVirtualBox::version"/> property</td>
2735 </tr>
2736 <tr>
2737 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2738 <td><link to="IMachine::name"/> property of the machine with the
2739 given UUID</td>
2740 </tr>
2741 </table>
2742
2743 Most property names directly correspond to the properties of objects
2744 (components) provided by the VirtualBox library and may be used to
2745 track changes to these properties. However, there may be
2746 pseudo-property names that don't correspond to any existing object's
2747 property directly, as well as there may be object properties that
2748 don't have a corresponding property name that is understood by this
2749 method, and therefore changes to such properties cannot be
2750 tracked. See individual object's property descriptions to get a
2751 fully qualified property name that can be used with this method (if
2752 any).
2753
2754 There is a special property mask @c "*" (i.e. a string consisting of a
2755 single asterisk symbol) that can be used to match all properties.
2756 Below are more examples of property masks:
2757
2758 <table>
2759 <tr>
2760 <td><tt>VirtualBox.*</tt></td>
2761 <td>Track all properties of the VirtualBox object</td>
2762 </tr>
2763 <tr>
2764 <td><tt>Machine.*.name</tt></td>
2765 <td>Track changes to the <link to="IMachine::name"/> property of
2766 all registered virtual machines</td>
2767 </tr>
2768 </table>
2769
2770 <note>
2771 This function is not implemented in the current version of the
2772 product.
2773 </note>
2774 </desc>
2775 <param name="what" type="wstring" dir="in">
2776 <desc>Comma separated list of property masks.</desc>
2777 </param>
2778 <param name="timeout" type="unsigned long" dir="in">
2779 <desc>
2780 Wait timeout in milliseconds.
2781 Specify -1 for an indefinite wait.
2782 </desc>
2783 </param>
2784 <param name="changed" type="wstring" dir="out">
2785 <desc>
2786 Comma separated list of properties that have been changed and caused
2787 this method to return to the caller.
2788 </desc>
2789 </param>
2790 <param name="values" type="wstring" dir="out">
2791 <desc>Reserved, not currently used.</desc>
2792 </param>
2793 </method>
2794
2795 <!--method name="createDHCPServerForInterface">
2796 <desc>
2797 Creates a dhcp server settings to be used for the given interface
2798 <result name="E_INVALIDARG">
2799 Host network interface @a name already exists.
2800 </result>
2801 </desc>
2802 <param name="interface" type="IHostNetworkInterface" dir="in">
2803 <desc>Network Interface</desc>
2804 </param>
2805 <param name="server" type="IDHCPServer" dir="out">
2806 <desc>Dhcp server settings</desc>
2807 </param>
2808 </method-->
2809
2810 <method name="createDHCPServer">
2811 <desc>
2812 Creates a dhcp server settings to be used for the given internal network name
2813 <result name="E_INVALIDARG">
2814 Host network interface @a name already exists.
2815 </result>
2816 </desc>
2817 <param name="name" type="wstring" dir="in">
2818 <desc>server name</desc>
2819 </param>
2820 <param name="server" type="IDHCPServer" dir="return">
2821 <desc>Dhcp server settings</desc>
2822 </param>
2823 </method>
2824
2825 <method name="findDHCPServerByNetworkName">
2826 <desc>
2827 Searches a dhcp server settings to be used for the given internal network name
2828 <result name="E_INVALIDARG">
2829 Host network interface @a name already exists.
2830 </result>
2831
2832 </desc>
2833 <param name="name" type="wstring" dir="in">
2834 <desc>server name</desc>
2835 </param>
2836 <param name="server" type="IDHCPServer" dir="return">
2837 <desc>Dhcp server settings</desc>
2838 </param>
2839 </method>
2840
2841 <!--method name="findDHCPServerForInterface">
2842 <desc>
2843 Searches a dhcp server settings to be used for the given interface
2844 <result name="E_INVALIDARG">
2845 Host network interface @a name already exists.
2846 </result>
2847 </desc>
2848 <param name="interface" type="IHostNetworkInterface" dir="in">
2849 <desc>Network Interface</desc>
2850 </param>
2851 <param name="server" type="IDHCPServer" dir="out">
2852 <desc>Dhcp server settings</desc>
2853 </param>
2854 </method-->
2855
2856 <method name="removeDHCPServer">
2857 <desc>
2858 Removes the dhcp server settings
2859 <result name="E_INVALIDARG">
2860 Host network interface @a name already exists.
2861 </result>
2862 </desc>
2863 <param name="server" type="IDHCPServer" dir="in">
2864 <desc>Dhcp server settings to be removed</desc>
2865 </param>
2866 </method>
2867
2868 </interface>
2869
2870 <!--
2871 // IVFSExplorer
2872 /////////////////////////////////////////////////////////////////////////
2873 -->
2874
2875 <enum
2876 name="VFSType"
2877 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2878 >
2879 <desc>
2880 Virtual file systems supported by VFSExplorer.
2881 </desc>
2882
2883 <const name="File" value="1" />
2884 <const name="Cloud" value="2" />
2885 <const name="S3" value="3" />
2886 <const name="WebDav" value="4" />
2887 </enum>
2888
2889 <enum
2890 name="VFSFileType"
2891 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2892 >
2893 <desc>
2894 File types known by VFSExplorer.
2895 </desc>
2896
2897 <const name="Unknown" value="1" />
2898 <const name="Fifo" value="2" />
2899 <const name="DevChar" value="3" />
2900 <const name="Directory" value="4" />
2901 <const name="DevBlock" value="5" />
2902 <const name="File" value="6" />
2903 <const name="SymLink" value="7" />
2904 <const name="Socket" value="8" />
2905 <const name="WhiteOut" value="9" />
2906 </enum>
2907
2908 <interface
2909 name="IVFSExplorer" extends="$unknown"
2910 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2911 wsmap="managed"
2912 >
2913 <desc>
2914 The VFSExplorer interface unifies access to different file system
2915 types. This includes local file systems as well remote file systems like
2916 S3. For a list of supported types see <link to="VFSType" />.
2917 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2918 </desc>
2919
2920 <attribute name="path" type="wstring" readonly="yes">
2921 <desc>Returns the current path in the virtual file system.</desc>
2922 </attribute>
2923
2924 <attribute name="type" type="VFSType" readonly="yes">
2925 <desc>Returns the file system type which is currently in use.</desc>
2926 </attribute>
2927
2928 <method name="update">
2929 <desc>Updates the internal list of files/directories from the
2930 current directory level. Use <link to="#entryList" /> to get the full list
2931 after a call to this method.</desc>
2932
2933 <param name="aProgress" type="IProgress" dir="return">
2934 <desc>Progress object to track the operation completion.</desc>
2935 </param>
2936 </method>
2937
2938 <method name="cd">
2939 <desc>Change the current directory level.</desc>
2940
2941 <param name="aDir" type="wstring" dir="in">
2942 <desc>The name of the directory to go in.</desc>
2943 </param>
2944
2945 <param name="aProgress" type="IProgress" dir="return">
2946 <desc>Progress object to track the operation completion.</desc>
2947 </param>
2948 </method>
2949
2950 <method name="cdUp">
2951 <desc>Go one directory upwards from the current directory level.</desc>
2952
2953 <param name="aProgress" type="IProgress" dir="return">
2954 <desc>Progress object to track the operation completion.</desc>
2955 </param>
2956 </method>
2957
2958 <method name="entryList">
2959 <desc>Returns a list of files/directories after a call to <link
2960 to="#update" />. The user is responsible for keeping this internal
2961 list up do date.</desc>
2962
2963 <param name="aNames" type="wstring" safearray="yes" dir="out">
2964 <desc>The list of names for the entries.</desc>
2965 </param>
2966
2967 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2968 <desc>The list of types for the entries.</desc>
2969 </param>
2970 </method>
2971
2972 <method name="exists">
2973 <desc>Checks if the given file list exists in the current directory
2974 level.</desc>
2975
2976 <param name="aNames" type="wstring" safearray="yes" dir="in">
2977 <desc>The names to check.</desc>
2978 </param>
2979
2980 <param name="aExists" type="wstring" safearray="yes" dir="return">
2981 <desc>The names which exist.</desc>
2982 </param>
2983 </method>
2984
2985 <method name="remove">
2986 <desc>Deletes the given files in the current directory level.</desc>
2987
2988 <param name="aNames" type="wstring" safearray="yes" dir="in">
2989 <desc>The names to remove.</desc>
2990 </param>
2991
2992 <param name="aProgress" type="IProgress" dir="return">
2993 <desc>Progress object to track the operation completion.</desc>
2994 </param>
2995 </method>
2996
2997 </interface>
2998
2999 <!--
3000 // IAppliance
3001 /////////////////////////////////////////////////////////////////////////
3002 -->
3003
3004 <interface
3005 name="IAppliance" extends="$unknown"
3006 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3007 wsmap="managed"
3008 >
3009 <desc>
3010 Represents a platform-independent appliance in OVF format. An instance of this is returned
3011 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3012 appliances with VirtualBox.
3013
3014 The OVF standard suggests two different physical file formats:
3015
3016 <ol>
3017 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3018 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3019 this descriptor file references other files, as OVF appliances distributed as a set of
3020 files most likely do, those files must be in the same directory as the descriptor file.</li>
3021
3022 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3023 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3024 files and optionally other files.
3025
3026 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3027 be added with a later version.</li>
3028 </ol>
3029
3030 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3031 <link to="IMachine" /> involves the following sequence of API calls:
3032
3033 <ol>
3034 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3035 </li>
3036
3037 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3038 would like to import. So long as this file is syntactically valid, this will succeed
3039 and return an instance of IAppliance that contains the parsed data from the OVF file.
3040 </li>
3041
3042 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3043 contents of the IAppliance attributes accordingly. These can be inspected by a
3044 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3045 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3046 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3047 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3048 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3049 The GUI can then give the user the option to confirm and/or change these suggestions.
3050 </li>
3051
3052 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3053 virtual system to override the suggestions made by the interpret() routine.
3054 </li>
3055
3056 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3057 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3058 virtual system descriptions.
3059 </li>
3060 </ol>
3061
3062 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3063
3064 <ol>
3065 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3066 an empty IAppliance object.
3067 </li>
3068
3069 <li>For each machine you would like to export, call <link to="IMachine::export" />
3070 with the IAppliance object you just created. This creates an instance of
3071 <link to="IVirtualSystemDescription" /> inside the appliance.
3072 </li>
3073
3074 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3075 virtual system to override the suggestions made by the export() routine.
3076 </li>
3077
3078 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3079 file written.</li>
3080 </ol>
3081
3082 </desc>
3083
3084 <attribute name="path" type="wstring" readonly="yes">
3085 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3086 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3087 <link to="#write" /> (for export).
3088 This attribute is empty until one of these methods has been called.
3089 </desc>
3090 </attribute>
3091
3092 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3093 <desc>
3094 Array of virtual disk definitions. One such description exists for each
3095 disk definition in the OVF; each string array item represents one such piece of
3096 disk information, with the information fields separated by tab (\\t) characters.
3097
3098 The caller should be prepared for additional fields being appended to
3099 this string in future versions of VirtualBox and therefore check for
3100 the number of tabs in the strings returned.
3101
3102 In the current version, the following eight fields are returned per string
3103 in the array:
3104
3105 <ol>
3106 <li>Disk ID (unique string identifier given to disk)</li>
3107
3108 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3109
3110 <li>Populated size (optional unsigned integer indicating the current size of the
3111 disk; can be approximate; -1 if unspecified)</li>
3112
3113 <li>Format (string identifying the disk format, typically
3114 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3115
3116 <li>Reference (where to find the disk image, typically a file name; if empty,
3117 then the disk should be created on import)</li>
3118
3119 <li>Image size (optional unsigned integer indicating the size of the image,
3120 which need not necessarily be the same as the values specified above, since
3121 the image may be compressed or sparse; -1 if not specified)</li>
3122
3123 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3124 presently unsupported and always -1)</li>
3125
3126 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3127 </ol>
3128 </desc>
3129 </attribute>
3130
3131 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3132 <desc> Array of virtual system descriptions. One such description is created
3133 for each virtual system found in the OVF.
3134 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3135 (for export) has been called.
3136 </desc>
3137 </attribute>
3138
3139 <method name="read">
3140 <desc>
3141 Reads an OVF file into the appliance object.
3142
3143 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3144 mere fact that this method returns successfully does not mean that VirtualBox supports all
3145 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3146 </desc>
3147 <param name="file" type="wstring" dir="in">
3148 <desc>
3149 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3150 on whether the appliance is distributed as a set of files or as a single file, respectively).
3151 </desc>
3152 </param>
3153 <param name="aProgress" type="IProgress" dir="return">
3154 <desc></desc>
3155 </param>
3156 </method>
3157
3158 <method name="interpret">
3159 <desc>
3160 Interprets the OVF data that was read when the appliance was constructed. After
3161 calling this method, one can inspect the
3162 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3163 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3164 the appliance.
3165
3166 Calling this method is the second step of importing an appliance into VirtualBox;
3167 see <link to="IAppliance" /> for an overview.
3168
3169 After calling this method, one should call <link to="#getWarnings" /> to find out
3170 if problems were encountered during the processing which might later lead to
3171 errors.
3172 </desc>
3173 </method>
3174
3175 <method name="importMachines">
3176 <desc>
3177 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3178 and other interfaces that match the information contained in the appliance as
3179 closely as possible, as represented by the import instructions in the
3180 <link to="#virtualSystemDescriptions" /> array.
3181
3182 Calling this method is the final step of importing an appliance into VirtualBox;
3183 see <link to="IAppliance" /> for an overview.
3184
3185 Since importing the appliance will most probably involve copying and converting
3186 disk images, which can take a long time, this method operates asynchronously and
3187 returns an IProgress object to allow the caller to monitor the progress.
3188 </desc>
3189
3190 <param name="aProgress" type="IProgress" dir="return">
3191 <desc></desc>
3192 </param>
3193 </method>
3194
3195 <method name="createVFSExplorer">
3196 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3197
3198 <param name="aUri" type="wstring" dir="in">
3199 <desc>The URI describing the file system to use.</desc>
3200 </param>
3201
3202 <param name="aExplorer" type="IVFSExplorer" dir="return">
3203 <desc></desc>
3204 </param>
3205 </method>
3206
3207 <method name="write">
3208 <desc>
3209 Writes the contents of the appliance exports into a new OVF file.
3210
3211 Calling this method is the final step of exporting an appliance from VirtualBox;
3212 see <link to="IAppliance" /> for an overview.
3213
3214 Since exporting the appliance will most probably involve copying and converting
3215 disk images, which can take a long time, this method operates asynchronously and
3216 returns an IProgress object to allow the caller to monitor the progress.
3217 </desc>
3218 <param name="format" type="wstring" dir="in">
3219 <desc>
3220 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3221 future versions of VirtualBox may support additional formats.
3222 </desc>
3223 </param>
3224 <param name="path" type="wstring" dir="in">
3225 <desc>
3226 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3227 on whether the appliance is distributed as a set of files or as a single file, respectively).
3228 </desc>
3229 </param>
3230 <param name="aProgress" type="IProgress" dir="return">
3231 <desc>Progress object to track the operation completion.</desc>
3232 </param>
3233 </method>
3234
3235 <method name="getWarnings">
3236 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3237
3238 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3239 <desc></desc>
3240 </param>
3241 </method>
3242
3243 </interface>
3244
3245 <enum
3246 name="VirtualSystemDescriptionType"
3247 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3248 >
3249 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3250 a configuration value.</desc>
3251
3252 <const name="Ignore" value="1" />
3253 <const name="OS" value="2" />
3254 <const name="Name" value="3" />
3255 <const name="Product" value="4" />
3256 <const name="Vendor" value="5" />
3257 <const name="Version" value="6" />
3258 <const name="ProductUrl" value="7" />
3259 <const name="VendorUrl" value="8" />
3260 <const name="Description" value="9" />
3261 <const name="License" value="10" />
3262 <const name="Miscellaneous" value="11" />
3263 <const name="CPU" value="12" />
3264 <const name="Memory" value="13" />
3265 <const name="HardDiskControllerIDE" value="14" />
3266 <const name="HardDiskControllerSATA" value="15" />
3267 <const name="HardDiskControllerSCSI" value="16" />
3268 <const name="HardDiskImage" value="17" />
3269 <const name="Floppy" value="18" />
3270 <const name="CDROM" value="19" />
3271 <const name="NetworkAdapter" value="20" />
3272 <const name="USBController" value="21" />
3273 <const name="SoundCard" value="22" />
3274
3275 </enum>
3276
3277 <enum
3278 name="VirtualSystemDescriptionValueType"
3279 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3280 >
3281 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3282 type to fetch.</desc>
3283
3284 <const name="Reference" value="1" />
3285 <const name="Original" value="2" />
3286 <const name="Auto" value="3" />
3287 <const name="ExtraConfig" value="4" />
3288
3289 </enum>
3290
3291 <interface
3292 name="IVirtualSystemDescription" extends="$unknown"
3293 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3294 wsmap="managed"
3295 >
3296
3297 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3298 After <link to="IAppliance::interpret" /> has been called, that array contains
3299 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3300 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3301 into VirtualBox.
3302 </desc>
3303
3304 <attribute name="count" type="unsigned long" readonly="yes">
3305 <desc>Return the number of virtual system description entries.</desc>
3306 </attribute>
3307
3308 <method name="getDescription">
3309 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3310 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3311
3312 The list below identifies the value sets that are possible depending on the
3313 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3314 the array item with the same index in aOvfValues[] will contain the original value as contained
3315 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3316 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3317 the aExtraConfigValues[] array item may also be used.
3318
3319 <ul>
3320 <li>
3321 "OS": the guest operating system type. There must be exactly one such array item on import. The
3322 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3323 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3324 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3325 </li>
3326 <li>
3327 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3328 if none is present on import, then an automatic name will be created from the operating system
3329 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3330 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3331 <link to="IMachine" /> name that does not exist yet.
3332 </li>
3333 <li>
3334 "Description": an arbitrary description.
3335 </li>
3336 <li>
3337 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3338 code to display such a license for agreement; the Main API does not enforce any such policy.
3339 </li>
3340 <li>
3341 Miscellaneous: reserved for future use.
3342 </li>
3343 <li>
3344 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3345 </li>
3346 <li>
3347 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3348 is present on import, then VirtualBox will set a meaningful default based on the operating system
3349 type.
3350 </li>
3351 <li>
3352 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3353 has no value in aOvfValues[] or aVBoxValues[].
3354 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3355 type can use to specify which hard disk controller a virtual disk should be connected to.
3356 </li>
3357 <li>
3358 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3359 has no value in aOvfValues[] or aVBoxValues[].
3360 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3361 </li>
3362 <li>
3363 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3364 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3365 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3366 </li>
3367 <li>
3368 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3369 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3370
3371 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3372 a path since the image file should be in the same location as the OVF file itself), whereas the
3373 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3374 hard disk image. This means that on import the image will be copied and converted from the
3375 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3376 On import, the target image will also be registered with VirtualBox.
3377
3378 The matching item in the aExtraConfigValues[] array must contain a string of the following
3379 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3380 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3381 the image to. That number must be the index of an array item with one of the hard disk controller
3382 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3383 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3384 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3385 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3386 SCSI conrollers, the channel can range from 0-29.
3387 </li>
3388 <li>
3389 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3390 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3391 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3392 </li>
3393 <li>
3394 "USBController": a USB controller. There can be at most one such item. If and only if such an
3395 item ispresent, USB support will be enabled for the new virtual machine.
3396 </li>
3397 <li>
3398 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3399 present, sound support will be enabled for the new virtual machine. Note that the virtual
3400 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3401 may be different from the virtual soundcard expected by the appliance.
3402 </li>
3403 </ul>
3404
3405 </desc>
3406
3407 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3408 <desc></desc>
3409 </param>
3410
3411 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3412 <desc></desc>
3413 </param>
3414
3415 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3416 <desc></desc>
3417 </param>
3418
3419 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3420 <desc></desc>
3421 </param>
3422
3423 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3424 <desc></desc>
3425 </param>
3426
3427 </method>
3428
3429 <method name="getDescriptionByType">
3430 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3431 should be returned.</desc>
3432
3433 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3434 <desc></desc>
3435 </param>
3436
3437 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3438 <desc></desc>
3439 </param>
3440
3441 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3442 <desc></desc>
3443 </param>
3444
3445 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3446 <desc></desc>
3447 </param>
3448
3449 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3450 <desc></desc>
3451 </param>
3452
3453 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3454 <desc></desc>
3455 </param>
3456
3457 </method>
3458
3459 <method name="getValuesByType">
3460 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3461 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3462 values.</desc>
3463
3464 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3465 <desc></desc>
3466 </param>
3467
3468 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3469 <desc></desc>
3470 </param>
3471
3472 <param name="aValues" type="wstring" dir="return" safearray="yes">
3473 <desc></desc>
3474 </param>
3475
3476 </method>
3477
3478 <method name="setFinalValues">
3479 <desc>
3480 This method allows the appliance's user to change the configuration for the virtual
3481 system descriptions. For each array item returned from <link to="#getDescription" />,
3482 you must pass in one boolean value and one configuration value.
3483
3484 Each item in the boolean array determines whether the particular configuration item
3485 should be enabled.
3486 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3487 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3488 and SoundCard.
3489
3490 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3491 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3492 the configuration remains unchanged. Please see the documentation for getDescription()
3493 for valid configuration values for the individual array item types. If the
3494 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3495 </desc>
3496
3497 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3498 <desc></desc>
3499 </param>
3500
3501 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3502 <desc></desc>
3503 </param>
3504
3505 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3506 <desc></desc>
3507 </param>
3508 </method>
3509
3510 <method name="addDescription">
3511 <desc>
3512 This method adds an additional description entry to the stack of already
3513 available descriptions for this virtual system. This is handy for writing
3514 values which aren't directly supported by VirtualBox. One example would
3515 be the License type of <link to="VirtualSystemDescriptionType" />.
3516 </desc>
3517
3518 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3519 <desc></desc>
3520 </param>
3521
3522 <param name="aVBoxValue" type="wstring" dir="in">
3523 <desc></desc>
3524 </param>
3525
3526 <param name="aExtraConfigValue" type="wstring" dir="in">
3527 <desc></desc>
3528 </param>
3529 </method>
3530 </interface>
3531
3532
3533 <!--
3534 // IMachine
3535 /////////////////////////////////////////////////////////////////////////
3536 -->
3537
3538 <interface
3539 name="IInternalMachineControl" extends="$unknown"
3540 uuid="ce8087d7-de92-4bbb-8140-a22fb07f37ba"
3541 internal="yes"
3542 wsmap="suppress"
3543 >
3544 <method name="setRemoveSavedState">
3545 <desc>
3546 Updates the flag whether saved state is removed on a machine state
3547 change from Saved to PoweredOff.
3548 </desc>
3549 <param name="aRemove" type="boolean" dir="in"/>
3550 </method>
3551
3552 <method name="updateState">
3553 <desc>
3554 Updates the VM state.
3555 <note>
3556 This operation will also update the settings file with
3557 the correct information about the saved state file
3558 and delete this file from disk when appropriate.
3559 </note>
3560 </desc>
3561 <param name="state" type="MachineState" dir="in"/>
3562 </method>
3563
3564 <method name="getIPCId">
3565 <param name="id" type="wstring" dir="return"/>
3566 </method>
3567
3568 <method name="runUSBDeviceFilters">
3569 <desc>
3570 Asks the server to run USB devices filters of the associated
3571 machine against the given USB device and tell if there is
3572 a match.
3573 <note>
3574 Intended to be used only for remote USB devices. Local
3575 ones don't require to call this method (this is done
3576 implicitly by the Host and USBProxyService).
3577 </note>
3578 </desc>
3579 <param name="device" type="IUSBDevice" dir="in"/>
3580 <param name="matched" type="boolean" dir="out"/>
3581 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3582 </method>
3583
3584 <method name="captureUSBDevice">
3585 <desc>
3586 Requests a capture of the given host USB device.
3587 When the request is completed, the VM process will
3588 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3589 notification.
3590 </desc>
3591 <param name="id" type="wstring" dir="in"/>
3592 </method>
3593
3594 <method name="detachUSBDevice">
3595 <desc>
3596 Notification that a VM is going to detach (@a done = @c false) or has
3597 already detached (@a done = @c true) the given USB device.
3598 When the @a done = @c true request is completed, the VM process will
3599 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3600 notification.
3601 <note>
3602 In the @a done = @c true case, the server must run its own filters
3603 and filters of all VMs but this one on the detached device
3604 as if it were just attached to the host computer.
3605 </note>
3606 </desc>
3607 <param name="id" type="wstring" dir="in"/>
3608 <param name="done" type="boolean" dir="in"/>
3609 </method>
3610
3611 <method name="autoCaptureUSBDevices">
3612 <desc>
3613 Requests a capture all matching USB devices attached to the host.
3614 When the request is completed, the VM process will
3615 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3616 notification per every captured device.
3617 </desc>
3618 </method>
3619
3620 <method name="detachAllUSBDevices">
3621 <desc>
3622 Notification that a VM that is being powered down. The done
3623 parameter indicates whether which stage of the power down
3624 we're at. When @a done = @c false the VM is announcing its
3625 intentions, while when @a done = @c true the VM is reporting
3626 what it has done.
3627 <note>
3628 In the @a done = @c true case, the server must run its own filters
3629 and filters of all VMs but this one on all detach devices as
3630 if they were just attached to the host computer.
3631 </note>
3632 </desc>
3633 <param name="done" type="boolean" dir="in"/>
3634 </method>
3635
3636 <method name="onSessionEnd">
3637 <desc>
3638 Triggered by the given session object when the session is about
3639 to close normally.
3640 </desc>
3641 <param name="session" type="ISession" dir="in">
3642 <desc>Session that is being closed</desc>
3643 </param>
3644 <param name="progress" type="IProgress" dir="return">
3645 <desc>
3646 Used to wait until the corresponding machine is actually
3647 dissociated from the given session on the server.
3648 Returned only when this session is a direct one.
3649 </desc>
3650 </param>
3651 </method>
3652
3653 <method name="beginSavingState">
3654 <desc>
3655 Called by the VM process to inform the server it wants to
3656 save the current state and stop the VM execution.
3657 </desc>
3658 <param name="progress" type="IProgress" dir="in">
3659 <desc>
3660 Progress object created by the VM process to wait until
3661 the state is saved.
3662 </desc>
3663 </param>
3664 <param name="stateFilePath" type="wstring" dir="out">
3665 <desc>
3666 File path the VM process must save the execution state to.
3667 </desc>
3668 </param>
3669 </method>
3670
3671 <method name="endSavingState">
3672 <desc>
3673 Called by the VM process to inform the server that saving
3674 the state previously requested by #beginSavingState is either
3675 successfully finished or there was a failure.
3676
3677 <result name="VBOX_E_FILE_ERROR">
3678 Settings file not accessible.
3679 </result>
3680 <result name="VBOX_E_XML_ERROR">
3681 Could not parse the settings file.
3682 </result>
3683
3684 </desc>
3685
3686 <param name="success" type="boolean" dir="in">
3687 <desc>@c true to indicate success and @c false otherwise.
3688 </desc>
3689 </param>
3690 </method>
3691
3692 <method name="adoptSavedState">
3693 <desc>
3694 Gets called by IConsole::adoptSavedState.
3695 <result name="VBOX_E_FILE_ERROR">
3696 Invalid saved state file path.
3697 </result>
3698 </desc>
3699 <param name="savedStateFile" type="wstring" dir="in">
3700 <desc>Path to the saved state file to adopt.</desc>
3701 </param>
3702 </method>
3703
3704 <method name="beginTakingSnapshot">
3705 <desc>
3706 Called by the VM process to inform the server it wants to
3707 take a snapshot.
3708
3709 <result name="VBOX_E_FILE_ERROR">
3710 Settings file not accessible.
3711 </result>
3712 <result name="VBOX_E_XML_ERROR">
3713 Could not parse the settings file.
3714 </result>
3715 </desc>
3716 <param name="initiator" type="IConsole" dir="in">
3717 <desc>The console object that initiated this call.</desc>
3718 </param>
3719 <param name="name" type="wstring" dir="in">
3720 <desc>Snapshot name.</desc>
3721 </param>
3722 <param name="description" type="wstring" dir="in">
3723 <desc>Snapshot description.</desc>
3724 </param>
3725 <param name="progress" type="IProgress" dir="in">
3726 <desc>
3727 Progress object created by the VM process to wait until
3728 the state is saved (only for online snapshots).
3729 </desc>
3730 </param>
3731 <param name="stateFilePath" type="wstring" dir="out">
3732 <desc>
3733 File path the VM process must save the execution state to.
3734 </desc>
3735 </param>
3736 <param name="serverProgress" type="IProgress" dir="out">
3737 <desc>
3738 Progress object created by the server process to wait until
3739 the snapshot is taken (VDI diff creation, etc.).
3740 </desc>
3741 </param>
3742 </method>
3743
3744 <method name="endTakingSnapshot">
3745 <desc>
3746 Called by the VM process to inform the server that the snapshot
3747 previously requested by #beginTakingSnapshot is either
3748 successfully taken or there was a failure.
3749 </desc>
3750
3751 <param name="success" type="boolean" dir="in">
3752 <desc>@c true to indicate success and @c false otherwise</desc>
3753 </param>
3754 </method>
3755
3756 <method name="discardSnapshot">
3757 <desc>
3758 Gets called by IConsole::discardSnapshot.
3759 <result name="VBOX_E_INVALID_OBJECT_STATE">
3760 Snapshot has more than one child snapshot.
3761 </result>
3762 </desc>
3763 <param name="initiator" type="IConsole" dir="in">
3764 <desc>The console object that initiated this call.</desc>
3765 </param>
3766 <param name="id" type="wstring" dir="in">
3767 <desc>UUID of the snapshot to discard.</desc>
3768 </param>
3769 <param name="machineState" type="MachineState" dir="out">
3770 <desc>New machine state after this operation is started.</desc>
3771 </param>
3772 <param name="progress" type="IProgress" dir="return">
3773 <desc>Progress object to track the operation completion.</desc>
3774 </param>
3775 </method>
3776
3777 <method name="discardCurrentState">
3778 <desc>
3779 Gets called by IConsole::discardCurrentState.
3780 <result name="VBOX_E_INVALID_OBJECT_STATE">
3781 Virtual machine does not have any snapshot.
3782 </result>
3783 </desc>
3784 <param name="initiator" type="IConsole" dir="in">
3785 <desc>The console object that initiated this call.</desc>
3786 </param>
3787 <param name="machineState" type="MachineState" dir="out">
3788 <desc>New machine state after this operation is started.</desc>
3789 </param>
3790 <param name="progress" type="IProgress" dir="return">
3791 <desc>Progress object to track the operation completion.</desc>
3792 </param>
3793 </method>
3794
3795 <method name="discardCurrentSnapshotAndState">
3796 <desc>
3797 Gets called by IConsole::discardCurrentSnapshotAndState.
3798 <result name="VBOX_E_INVALID_OBJECT_STATE">
3799 Virtual machine does not have any snapshot.
3800 </result>
3801 </desc>
3802 <param name="initiator" type="IConsole" dir="in">
3803 <desc>The console object that initiated this call.</desc>
3804 </param>
3805 <param name="machineState" type="MachineState" dir="out">
3806 <desc>New machine state after this operation is started.</desc>
3807 </param>
3808 <param name="progress" type="IProgress" dir="return">
3809 <desc>Progress object to track the operation completion.</desc>
3810 </param>
3811 </method>
3812
3813 <method name="pullGuestProperties">
3814 <desc>
3815 Get the list of the guest properties matching a set of patterns along
3816 with their values, time stamps and flags and give responsibility for
3817 managing properties to the console.
3818 </desc>
3819 <param name="name" type="wstring" dir="out" safearray="yes">
3820 <desc>
3821 The names of the properties returned.
3822 </desc>
3823 </param>
3824 <param name="value" type="wstring" dir="out" safearray="yes">
3825 <desc>
3826 The values of the properties returned. The array entries match the
3827 corresponding entries in the @a name array.
3828 </desc>
3829 </param>
3830 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3831 <desc>
3832 The time stamps of the properties returned. The array entries match
3833 the corresponding entries in the @a name array.
3834 </desc>
3835 </param>
3836 <param name="flags" type="wstring" dir="out" safearray="yes">
3837 <desc>
3838 The flags of the properties returned. The array entries match the
3839 corresponding entries in the @a name array.
3840 </desc>
3841 </param>
3842 </method>
3843
3844 <method name="pushGuestProperties">
3845 <desc>
3846 Set the list of the guest properties matching a set of patterns along
3847 with their values, time stamps and flags and return responsibility for
3848 managing properties to IMachine.
3849 </desc>
3850 <param name="name" type="wstring" dir="in" safearray="yes">
3851 <desc>
3852 The names of the properties.
3853 </desc>
3854 </param>
3855 <param name="value" type="wstring" dir="in" safearray="yes">
3856 <desc>
3857 The values of the properties. The array entries match the
3858 corresponding entries in the @a name array.
3859 </desc>
3860 </param>
3861 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3862 <desc>
3863 The time stamps of the properties. The array entries match
3864 the corresponding entries in the @a name array.
3865 </desc>
3866 </param>
3867 <param name="flags" type="wstring" dir="in" safearray="yes">
3868 <desc>
3869 The flags of the properties. The array entries match the
3870 corresponding entries in the @a name array.
3871 </desc>
3872 </param>
3873 </method>
3874 <method name="pushGuestProperty">
3875 <desc>
3876 Update a single guest property in IMachine.
3877 </desc>
3878 <param name="name" type="wstring" dir="in">
3879 <desc>
3880 The name of the property to be updated.
3881 </desc>
3882 </param>
3883 <param name="value" type="wstring" dir="in">
3884 <desc>
3885 The value of the property.
3886 </desc>
3887 </param>
3888 <param name="timestamp" type="unsigned long long" dir="in">
3889 <desc>
3890 The timestamp of the property.
3891 </desc>
3892 </param>
3893 <param name="flags" type="wstring" dir="in">
3894 <desc>
3895 The flags of the property.
3896 </desc>
3897 </param>
3898 </method>
3899
3900 <method name="lockMedia">
3901 <desc>
3902 Locks all media attached to the machine for writing and parents of
3903 attahced different hard disks (if any) for reading. This operation is
3904 atomic so that if it fails no media is actually locked.
3905
3906 This method is intended to be called when the machine is in Starting or
3907 Restoring state. The locked media will be automatically unlocked when
3908 the machine is powered off or crashed.
3909 </desc>
3910 </method>
3911 </interface>
3912
3913 <interface
3914 name="IBIOSSettings" extends="$unknown"
3915 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3916 wsmap="managed"
3917 >
3918 <desc>
3919 The IBIOSSettings interface represents BIOS settings of the virtual
3920 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3921 </desc>
3922 <attribute name="logoFadeIn" type="boolean">
3923 <desc>Fade in flag for BIOS logo animation.</desc>
3924 </attribute>
3925
3926 <attribute name="logoFadeOut" type="boolean">
3927 <desc>Fade out flag for BIOS logo animation.</desc>
3928 </attribute>
3929
3930 <attribute name="logoDisplayTime" type="unsigned long">
3931 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3932 </attribute>
3933
3934 <attribute name="logoImagePath" type="wstring">
3935 <desc>Local file system path for external BIOS image.</desc>
3936 </attribute>
3937
3938 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3939 <desc>Mode of the BIOS boot device menu.</desc>
3940 </attribute>
3941
3942 <attribute name="ACPIEnabled" type="boolean">
3943 <desc>ACPI support flag.</desc>
3944 </attribute>
3945
3946 <attribute name="IOAPICEnabled" type="boolean">
3947 <desc>
3948 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3949 and support IRQs above 15.
3950 </desc>
3951 </attribute>
3952
3953 <attribute name="timeOffset" type="long long">
3954 <desc>
3955 Offset in milliseconds from the host system time. This allows for
3956 guests running with a different system date/time than the host.
3957 It is equivalent to setting the system date/time in the BIOS except
3958 it is not an absolute value but a relative one. Guest Additions
3959 time synchronization honors this offset.
3960 </desc>
3961 </attribute>
3962
3963 <attribute name="PXEDebugEnabled" type="boolean">
3964 <desc>
3965 PXE debug logging flag. If set, VirtualBox will write extensive
3966 PXE trace information to the release log.
3967 </desc>
3968 </attribute>
3969
3970 </interface>
3971
3972 <interface
3973 name="IMachine" extends="$unknown"
3974 uuid="5293aa45-5ab5-4f70-852e-bb43f5a46491"
3975 wsmap="managed"
3976 >
3977 <desc>
3978 The IMachine interface represents a virtual machine, or guest, created
3979 in VirtualBox.
3980
3981 This interface is used in two contexts. First of all, a collection of
3982 objects implementing this interface is stored in the
3983 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3984 machines that are currently registered with this VirtualBox
3985 installation. Also, once a session has been opened for the given virtual
3986 machine (e.g. the virtual machine is running), the machine object
3987 associated with the open session can be queried from the session object;
3988 see <link to="ISession"/> for details.
3989
3990 The main role of this interface is to expose the settings of the virtual
3991 machine and provide methods to change various aspects of the virtual
3992 machine's configuration. For machine objects stored in the
3993 <link to="IVirtualBox::machines"/> collection, all attributes are
3994 read-only unless explicitly stated otherwise in individual attribute
3995 and method descriptions. In order to change a machine setting, a session
3996 for this machine must be opened using one of
3997 <link to="IVirtualBox::openSession"/>,
3998 <link to="IVirtualBox::openRemoteSession"/> or
3999 <link to="IVirtualBox::openExistingSession"/> methods. After the
4000 session has been successfully opened, a mutable machine object needs to
4001 be queried from the session object and then the desired settings changes
4002 can be applied to the returned object using IMachine attributes and
4003 methods. See the <link to="ISession"/> interface description for more
4004 information about sessions.
4005
4006 Note that IMachine does not provide methods to control virtual machine
4007 execution (such as start the machine, or power it down) -- these methods
4008 are grouped in a separate interface called <link to="IConsole" />.
4009
4010 <see>ISession, IConsole</see>
4011 </desc>
4012
4013 <attribute name="parent" type="IVirtualBox" readonly="yes">
4014 <desc>Associated parent object.</desc>
4015 </attribute>
4016
4017 <attribute name="accessible" type="boolean" readonly="yes">
4018 <desc>
4019 Whether this virtual machine is currently accessible or not.
4020
4021 A machine is always deemed accessible unless it is registered <i>and</i>
4022 its settings file cannot be read or parsed (either because the file itself
4023 is unavailable or has invalid XML contents).
4024
4025 Every time this property is read, the accessibility state of
4026 this machine is re-evaluated. If the returned value is @c false,
4027 the <link to="#accessError"/> property may be used to get the
4028 detailed error information describing the reason of
4029 inaccessibility, including XML error messages.
4030
4031 When the machine is inaccessible, only the following properties
4032 can be used on it:
4033 <ul>
4034 <li><link to="#parent"/></li>
4035 <li><link to="#id"/></li>
4036 <li><link to="#settingsFilePath"/></li>
4037 <li><link to="#accessible"/></li>
4038 <li><link to="#accessError"/></li>
4039 </ul>
4040
4041 An attempt to access any other property or method will return
4042 an error.
4043
4044 The only possible action you can perform on an inaccessible
4045 machine is to unregister it using the
4046 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4047 for the accessibility state once more by querying this
4048 property).
4049
4050 <note>
4051 In the current implementation, once this property returns
4052 @c true, the machine will never become inaccessible
4053 later, even if its settings file cannot be successfully
4054 read/written any more (at least, until the VirtualBox
4055 server is restarted). This limitation may be removed in
4056 future releases.
4057 </note>
4058 </desc>
4059 </attribute>
4060
4061 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4062 <desc>
4063 Error information describing the reason of machine
4064 inaccessibility.
4065
4066 Reading this property is only valid after the last call to
4067 <link to="#accessible"/> returned @c false (i.e. the
4068 machine is currently unaccessible). Otherwise, a @c null
4069 IVirtualBoxErrorInfo object will be returned.
4070 </desc>
4071 </attribute>
4072
4073 <attribute name="name" type="wstring">
4074 <desc>
4075 Name of the virtual machine.
4076
4077 Besides being used for human-readable identification purposes
4078 everywhere in VirtualBox, the virtual machine name is also used
4079 as a name of the machine's settings file and as a name of the
4080 subdirectory this settings file resides in. Thus, every time you
4081 change the value of this property, the settings file will be
4082 renamed once you call <link to="#saveSettings"/> to confirm the
4083 change. The containing subdirectory will be also renamed, but
4084 only if it has exactly the same name as the settings file
4085 itself prior to changing this property (for backward compatibility
4086 with previous API releases). The above implies the following
4087 limitations:
4088 <ul>
4089 <li>The machine name cannot be empty.</li>
4090 <li>The machine name can contain only characters that are valid
4091 file name characters according to the rules of the file
4092 system used to store VirtualBox configuration.</li>
4093 <li>You cannot have two or more machines with the same name
4094 if they use the same subdirectory for storing the machine
4095 settings files.</li>
4096 <li>You cannot change the name of the machine if it is running,
4097 or if any file in the directory containing the settings file
4098 is being used by another running machine or by any other
4099 process in the host operating system at a time when
4100 <link to="#saveSettings"/> is called.
4101 </li>
4102 </ul>
4103 If any of the above limitations are hit, <link to="#saveSettings"/>
4104 will return an appropriate error message explaining the exact
4105 reason and the changes you made to this machine will not be
4106 saved.
4107 <note>
4108 For "legacy" machines created using the
4109 <link to="IVirtualBox::createLegacyMachine"/> call,
4110 the above naming limitations do not apply because the
4111 machine name does not affect the settings file name.
4112 The settings file name remains the same as it was specified
4113 during machine creation and never changes.
4114 </note>
4115 </desc>
4116 </attribute>
4117
4118 <attribute name="description" type="wstring">
4119 <desc>
4120 Description of the virtual machine.
4121
4122 The description attribute can contain any text and is
4123 typically used to describe the hardware and software
4124 configuration of the virtual machine in detail (i.e. network
4125 settings, versions of the installed software and so on).
4126 </desc>
4127 </attribute>
4128
4129 <attribute name="id" type="wstring" readonly="yes">
4130 <desc>UUID of the virtual machine.</desc>
4131 </attribute>
4132
4133 <attribute name="OSTypeId" type="wstring">
4134 <desc>
4135 User-defined identifier of the Guest OS type.
4136 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4137 an IGuestOSType object representing details about the given
4138 Guest OS type.
4139 <note>
4140 This value may differ from the value returned by
4141 <link to="IGuest::OSTypeId"/> if Guest Additions are
4142 installed to the guest OS.
4143 </note>
4144 </desc>
4145 </attribute>
4146
4147 <attribute name="HardwareVersion" type="wstring">
4148 <desc>Hardware version identifier. Internal use only for now.</desc>
4149 </attribute>
4150
4151 <attribute name="CPUCount" type="unsigned long">
4152 <desc>Number of virtual CPUs in the VM.</desc>
4153 </attribute>
4154
4155 <attribute name="memorySize" type="unsigned long">
4156 <desc>System memory size in megabytes.</desc>
4157 </attribute>
4158
4159 <attribute name="memoryBalloonSize" type="unsigned long">
4160 <desc>Initial memory balloon size in megabytes.</desc>
4161 </attribute>
4162
4163 <attribute name="statisticsUpdateInterval" type="unsigned long">
4164 <desc>Initial interval to update guest statistics in seconds.</desc>
4165 </attribute>
4166
4167 <attribute name="VRAMSize" type="unsigned long">
4168 <desc>Video memory size in megabytes.</desc>
4169 </attribute>
4170
4171 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4172 <desc>
4173 This setting determines whether VirtualBox allows this machine to make
4174 use of the 3D graphics support available on the host.</desc>
4175 </attribute>
4176
4177 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4178 <desc>
4179 This setting determines whether VirtualBox allows this machine to make
4180 use of the 2D video acceleration support available on the host.</desc>
4181 </attribute>
4182
4183 <attribute name="monitorCount" type="unsigned long">
4184 <desc>
4185 Number of virtual monitors.
4186 <note>
4187 Only effective on Windows XP and later guests with
4188 Guest Additions installed.
4189 </note>
4190 </desc>
4191 </attribute>
4192
4193 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4194 <desc>Object containing all BIOS settings.</desc>
4195 </attribute>
4196
4197 <attribute name="HWVirtExEnabled" type="boolean">
4198 <desc>
4199 This setting determines whether VirtualBox will try to make use of
4200 the host CPU's hardware virtualization extensions such as Intel VT-x
4201 and AMD-V. Note that in case such extensions are not available,
4202 they will not be used.
4203 </desc>
4204 </attribute>
4205
4206 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4207 <desc>
4208 This setting determines whether VirtualBox will try to make use of
4209 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4210 such extensions are not available, they will not be used.
4211 </desc>
4212 </attribute>
4213
4214 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4215 <desc>
4216 This setting determines whether VirtualBox will try to make use of
4217 the VPID extension of Intel VT-x. Note that in case such extensions are
4218 not available, they will not be used.
4219 </desc>
4220 </attribute>
4221
4222 <attribute name="PAEEnabled" type="boolean" default="false">
4223 <desc>
4224 This setting determines whether VirtualBox will expose the Physical Address
4225 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4226 is not available, it will not be reported.
4227 </desc>
4228 </attribute>
4229
4230 <attribute name="snapshotFolder" type="wstring">
4231 <desc>
4232 Full path to the directory used to store snapshot data
4233 (differencing hard disks and saved state files) of this machine.
4234
4235 The initial value of this property is
4236 <tt>&lt;</tt><link to="#settingsFilePath">
4237 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4238 <link to="#id">machine_uuid</link>
4239 <tt>&gt;</tt>.
4240
4241 Currently, it is an error to try to change this property on
4242 a machine that has snapshots (because this would require to
4243 move possibly large files to a different location).
4244 A separate method will be available for this purpose later.
4245
4246 <note>
4247 Setting this property to @c null or to an empty string will restore
4248 the initial value.
4249 </note>
4250 <note>
4251 When setting this property, the specified path can be
4252 absolute (full path) or relative to the directory where the
4253 <link to="#settingsFilePath">machine settings file</link>
4254 is located. When reading this property, a full path is
4255 always returned.
4256 </note>
4257 <note>
4258 The specified path may not exist, it will be created
4259 when necessary.
4260 </note>
4261 </desc>
4262 </attribute>
4263
4264 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4265 <desc>VRDP server object.</desc>
4266 </attribute>
4267
4268 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4269 <desc>Array of hard disks attached to this machine.</desc>
4270 </attribute>
4271
4272 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4273 <desc>Associated DVD drive object.</desc>
4274 </attribute>
4275
4276 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4277 <desc>Associated floppy drive object.</desc>
4278 </attribute>
4279
4280 <attribute name="USBController" type="IUSBController" readonly="yes">
4281 <desc>
4282 Associated USB controller object.
4283
4284 <note>
4285 If USB functionality is not available in the given edition of
4286 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4287 </note>
4288 </desc>
4289 </attribute>
4290
4291 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4292 <desc>Associated audio adapter, always present.</desc>
4293 </attribute>
4294
4295 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4296 <desc>Array of storage controllers attached to this machine.</desc>
4297 </attribute>
4298
4299 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4300 <desc>
4301 Full name of the file containing machine settings data.
4302 </desc>
4303 </attribute>
4304
4305 <attribute name="settingsModified" type="boolean" readonly="yes">
4306 <desc>
4307 Whether the settings of this machine have been modified
4308 (but neither yet saved nor discarded).
4309 <note>
4310 Reading this property is only valid on instances returned
4311 by <link to="ISession::machine"/> and on new machines
4312 created by <link to="IVirtualBox::createMachine"/> or opened
4313 by <link to="IVirtualBox::openMachine"/> but not
4314 yet registered, or on unregistered machines after calling
4315 <link to="IVirtualBox::unregisterMachine"/>. For all other
4316 cases, the settings can never be modified.
4317 </note>
4318 <note>
4319 For newly created unregistered machines, the value of this
4320 property is always @c true until <link to="#saveSettings"/>
4321 is called (no matter if any machine settings have been
4322 changed after the creation or not). For opened machines
4323 the value is set to @c false (and then follows to normal rules).
4324 </note>
4325 </desc>
4326 </attribute>
4327
4328 <attribute name="sessionState" type="SessionState" readonly="yes">
4329 <desc>Current session state for this machine.</desc>
4330 </attribute>
4331
4332 <attribute name="sessionType" type="wstring" readonly="yes">
4333 <desc>
4334 Type of the session. If <link to="#sessionState"/> is
4335 SessionSpawning or SessionOpen, this attribute contains the
4336 same value as passed to the
4337 <link to="IVirtualBox::openRemoteSession"/> method in the
4338 @a type parameter. If the session was opened directly using
4339 <link to="IVirtualBox::openSession"/>, or if
4340 <link to="#sessionState"/> is SessionClosed, the value of this
4341 attribute is an empty string.
4342 </desc>
4343 </attribute>
4344
4345 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4346 <desc>
4347 Identifier of the session process. This attribute contains the
4348 platform-dependent identifier of the process that has opened a
4349 direct session for this machine using the
4350 <link to="IVirtualBox::openSession"/> call. The returned value
4351 is only valid if <link to="#sessionState"/> is SessionOpen or
4352 SessionClosing (i.e. a session is currently open or being
4353 closed) by the time this property is read.
4354 </desc>
4355 </attribute>
4356
4357 <attribute name="state" type="MachineState" readonly="yes">
4358 <desc>Current execution state of this machine.</desc>
4359 </attribute>
4360
4361 <attribute name="lastStateChange" type="long long" readonly="yes">
4362 <desc>
4363 Time stamp of the last execution state change,
4364 in milliseconds since 1970-01-01 UTC.
4365 </desc>
4366 </attribute>
4367
4368 <attribute name="stateFilePath" type="wstring" readonly="yes">
4369 <desc>
4370 Full path to the file that stores the execution state of
4371 the machine when it is in the <link to="MachineState_Saved"/> state.
4372 <note>
4373 When the machine is not in the Saved state, this attribute is
4374 an empty string.
4375 </note>
4376 </desc>
4377 </attribute>
4378
4379 <attribute name="logFolder" type="wstring" readonly="yes">
4380 <desc>
4381 Full path to the folder that stores a set of rotated log files
4382 recorded during machine execution. The most recent log file is
4383 named <tt>VBox.log</tt>, the previous log file is
4384 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4385 in the current version).
4386 </desc>
4387 </attribute>
4388
4389 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4390 <desc>
4391 Current snapshot of this machine. This is @c null if the machine
4392 currently has no snapshots. Otherwise, this is always the last snapshot
4393 in the current implementation; see <link to="ISnapshot"/> for details.
4394 </desc>
4395 </attribute>
4396
4397 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4398 <desc>
4399 Number of snapshots taken on this machine. Zero means the
4400 machine doesn't have any snapshots.
4401 </desc>
4402 </attribute>
4403
4404 <attribute name="currentStateModified" type="boolean" readonly="yes">
4405 <desc>
4406 Returns @c true if the current state of the machine is not
4407 identical to the state stored in the current snapshot.
4408
4409 The current state is identical to the current snapshot right
4410 after one of the following calls are made:
4411 <ul>
4412 <li><link to="IConsole::discardCurrentState"/> or
4413 <link to="IConsole::discardCurrentSnapshotAndState"/>
4414 </li>
4415 <li><link to="IConsole::takeSnapshot"/> (issued on a
4416 powered off or saved machine, for which
4417 <link to="#settingsModified"/> returns @c false)
4418 </li>
4419 <li><link to="IMachine::setCurrentSnapshot"/>
4420 </li>
4421 </ul>
4422
4423 The current state remains identical until one of the following
4424 happens:
4425 <ul>
4426 <li>settings of the machine are changed</li>
4427 <li>the saved state is discarded</li>
4428 <li>the current snapshot is discarded</li>
4429 <li>an attempt to execute the machine is made</li>
4430 </ul>
4431
4432 <note>
4433 For machines that don't have snapshots, this property is
4434 always @c false.
4435 </note>
4436 </desc>
4437 </attribute>
4438
4439 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4440 <desc>
4441 Collection of shared folders for this machine (permanent shared
4442 folders). These folders are shared automatically at machine startup
4443 and available only to the guest OS installed within this machine.
4444
4445 New shared folders are added to the collection using
4446 <link to="#createSharedFolder"/>. Existing shared folders can be
4447 removed using <link to="#removeSharedFolder"/>.
4448 </desc>
4449 </attribute>
4450
4451 <attribute name="clipboardMode" type="ClipboardMode">
4452 <desc>
4453 Synchronization mode between the host OS clipboard
4454 and the guest OS clipboard.
4455 </desc>
4456 </attribute>
4457
4458 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4459 <desc>
4460 A comma-separated list of simple glob patterns. Changes to guest
4461 properties whose name matches one of the patterns will generate an
4462 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4463 </desc>
4464 </attribute>
4465
4466 <method name="setBootOrder">
4467 <desc>
4468 Puts the given device to the specified position in
4469 the boot order.
4470
4471 To indicate that no device is associated with the given position,
4472 <link to="DeviceType_Null"/> should be used.
4473
4474 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4475
4476 <result name="E_INVALIDARG">
4477 Boot @a position out of range.
4478 </result>
4479 <result name="E_NOTIMPL">
4480 Booting from USB @a device currently not supported.
4481 </result>
4482
4483 </desc>
4484 <param name="position" type="unsigned long" dir="in">
4485 <desc>
4486 Position in the boot order (@c 1 to the total number of
4487 devices the machine can boot from, as returned by
4488 <link to="ISystemProperties::maxBootPosition"/>).
4489 </desc>
4490 </param>
4491 <param name="device" type="DeviceType" dir="in">
4492 <desc>
4493 The type of the device used to boot at the given position.
4494 </desc>
4495 </param>
4496 </method>
4497
4498 <method name="getBootOrder" const="yes">
4499 <desc>
4500 Returns the device type that occupies the specified
4501 position in the boot order.
4502
4503 @todo [remove?]
4504 If the machine can have more than one device of the returned type
4505 (such as hard disks), then a separate method should be used to
4506 retrieve the individual device that occupies the given position.
4507
4508 If here are no devices at the given position, then
4509 <link to="DeviceType_Null"/> is returned.
4510
4511 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4512
4513 <result name="E_INVALIDARG">
4514 Boot @a position out of range.
4515 </result>
4516
4517 </desc>
4518 <param name="position" type="unsigned long" dir="in">
4519 <desc>
4520 Position in the boot order (@c 1 to the total number of
4521 devices the machine can boot from, as returned by
4522 <link to="ISystemProperties::maxBootPosition"/>).
4523 </desc>
4524 </param>
4525 <param name="device" type="DeviceType" dir="return">
4526 <desc>
4527 Device at the given position.
4528 </desc>
4529 </param>
4530 </method>
4531
4532 <method name="attachHardDisk">
4533 <desc>
4534 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4535 by the given UUID @a id) to the given hard disk controller
4536 (<link to="IStorageController" />, identified by @a name),
4537 at the indicated port and device.
4538
4539 For the IDE bus, the @a controllerPort parameter can be either
4540 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4541 respectively. For the primary controller of the IDE bus,
4542 @a device can be either @c 0 or @c 1, to specify the master or the
4543 slave device, respectively. For the secondary IDE controller, the
4544 device number must be @c 1 because VirtualBox reserves the
4545 secondary master for the CD-ROM drive.
4546
4547 For an SATA controller, @a controllerPort must be a number ranging
4548 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4549 be a number ranging from @c 0 to @c 15.
4550
4551 For both SCSI and SATA, the @a device parameter is unused and must
4552 be @c 0.
4553
4554 The specified device slot must not have another disk attached to it, or
4555 this method will fail.
4556
4557 See <link to="IHardDisk"/> for more detailed information about
4558 attaching hard disks.
4559
4560 <note>
4561 You cannot attach a hard disk to a running machine. Also, you cannot
4562 attach a hard disk to a newly created machine until this machine's
4563 settings are saved to disk using <link to="#saveSettings"/>.
4564 </note>
4565 <note>
4566 If the hard disk is being attached indirectly, a new differencing hard
4567 disk will implicitly be created for it and attached instead. If the
4568 changes made to the machine settings (including this indirect
4569 attachment) are later cancelled using <link to="#discardSettings"/>,
4570 this implicitly created differencing hard disk will implicitly
4571 be deleted.
4572 </note>
4573
4574 <result name="E_INVALIDARG">
4575 SATA device, SATA port, IDE port or IDE slot out of range.
4576 </result>
4577 <result name="VBOX_E_INVALID_OBJECT_STATE">
4578 Attempt to attach hard disk to an unregistered virtual machine.
4579 </result>
4580 <result name="VBOX_E_INVALID_VM_STATE">
4581 Invalid machine state.
4582 </result>
4583 <result name="VBOX_E_OBJECT_IN_USE">
4584 Hard disk already attached to this or another virtual machine.
4585 </result>
4586
4587 </desc>
4588 <param name="id" type="wstring" dir="in">
4589 <desc>UUID of the hard disk to attach.</desc>
4590 </param>
4591 <param name="name" type="wstring" dir="in">
4592 <desc>Name of the storage controller to attach the hard disk to.</desc>
4593 </param>
4594 <param name="controllerPort" type="long" dir="in">
4595 <desc>Port to attach the hard disk to.</desc>
4596 </param>
4597 <param name="device" type="long" dir="in">
4598 <desc>
4599 Device slot in the given port to attach the hard disk to.
4600 </desc>
4601 </param>
4602 </method>
4603
4604 <method name="getHardDisk" const="yes">
4605 <desc>
4606 Returns the virtual hard disk attached to a device slot of the specified
4607 bus.
4608
4609 Note that if the hard disk was indirectly attached by
4610 <link to="#attachHardDisk"/> to the given device slot then this
4611 method will return not the same object as passed to the
4612 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4613 more detailed information about attaching hard disks.
4614
4615 <result name="VBOX_E_OBJECT_NOT_FOUND">
4616 No hard disk attached to given slot/bus.
4617 </result>
4618
4619 </desc>
4620 <param name="name" type="wstring" dir="in">
4621 <desc>Name of the storage controller the hard disk is attached to.</desc>
4622 </param>
4623 <param name="controllerPort" type="long" dir="in">
4624 <desc>Port to query.</desc>
4625 </param>
4626 <param name="device" type="long" dir="in">
4627 <desc>Device slot in the given port to query.</desc>
4628 </param>
4629 <param name="hardDisk" type="IHardDisk" dir="return">
4630 <desc>Attached hard disk object.</desc>
4631 </param>
4632 </method>
4633
4634 <method name="detachHardDisk">
4635 <desc>
4636 Detaches the virtual hard disk attached to a device slot of the
4637 specified bus.
4638
4639 Detaching the hard disk from the virtual machine is deferred. This means
4640 that the hard disk remains associated with the machine when this method
4641 returns and gets actually de-associated only after a successful
4642 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4643 for more detailed information about attaching hard disks.
4644
4645 <note>
4646 You cannot detach the hard disk from a running machine.
4647 </note>
4648 <note>
4649 Detaching differencing hard disks implicitly created by <link
4650 to="#attachHardDisk"/> for the indirect attachment using this
4651 method will <b>not</b> implicitly delete them. The
4652 <link to="IHardDisk::deleteStorage"/> operation should be
4653 explicitly performed by the caller after the hard disk is successfully
4654 detached and the settings are saved with
4655 <link to="#saveSettings"/>, if it is the desired action.
4656 </note>
4657
4658 <result name="VBOX_E_INVALID_VM_STATE">
4659 Attempt to detach hard disk from a running virtual machine.
4660 </result>
4661 <result name="VBOX_E_OBJECT_NOT_FOUND">
4662 No hard disk attached to given slot/bus.
4663 </result>
4664 <result name="VBOX_E_NOT_SUPPORTED">
4665 Hard disk format does not support storage deletion.
4666 </result>
4667
4668 </desc>
4669 <param name="name" type="wstring" dir="in">
4670 <desc>name of the storage controller to detach the hard disk from.</desc>
4671 </param>
4672 <param name="controllerPort" type="long" dir="in">
4673 <desc>Port number to detach the hard disk from.</desc>
4674 </param>
4675 <param name="device" type="long" dir="in">
4676 <desc>Device slot number to detach the hard disk from.</desc>
4677 </param>
4678 </method>
4679
4680 <method name="getHardDiskAttachmentsOfController" const="yes">
4681 <desc>
4682 Returns an array of hard disk attachments which are attached to the
4683 the controller with the given name.
4684
4685 <result name="VBOX_E_OBJECT_NOT_FOUND">
4686 A storage controller with given name doesn't exist.
4687 </result>
4688 </desc>
4689 <param name="name" type="wstring" dir="in"/>
4690 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4691 </method>
4692
4693 <method name="getNetworkAdapter" const="yes">
4694 <desc>
4695 Returns the network adapter associated with the given slot.
4696 Slots are numbered sequentially, starting with zero. The total
4697 number of adapters per machine is defined by the
4698 <link to="ISystemProperties::networkAdapterCount"/> property,
4699 so the maximum slot number is one less than that property's value.
4700
4701 <result name="E_INVALIDARG">
4702 Invalid @a slot number.
4703 </result>
4704
4705 </desc>
4706 <param name="slot" type="unsigned long" dir="in"/>
4707 <param name="adapter" type="INetworkAdapter" dir="return"/>
4708 </method>
4709
4710 <method name="addStorageController">
4711 <desc>
4712 Adds a new storage controller (SCSI or SATA controller) to the
4713 machine and returns it as an instance of
4714 <link to="IStorageController" />.
4715
4716 @a name identifies the controller for subsequent calls such as
4717 <link to="#getStorageControllerByName" /> or
4718 <link to="#removeStorageController" /> or
4719 <link to="#attachHardDisk" />.
4720
4721 After the controller has been added, you can set its exact
4722 type by setting the <link to="IStorageController::controllerType" />.
4723
4724 <result name="VBOX_E_OBJECT_IN_USE">
4725 A storage controller with given name exists already.
4726 </result>
4727 <result name="E_INVALIDARG">
4728 Invalid @a controllerType.
4729 </result>
4730 </desc>
4731 <param name="name" type="wstring" dir="in"/>
4732 <param name="connectionType" type="StorageBus" dir="in"/>
4733 <param name="controller" type="IStorageController" dir="return"/>
4734 </method>
4735
4736 <method name="getStorageControllerByName" const="yes">
4737 <desc>
4738 Returns a storage controller with the given name.
4739
4740 <result name="VBOX_E_OBJECT_NOT_FOUND">
4741 A storage controller with given name doesn't exist.
4742 </result>
4743 </desc>
4744 <param name="name" type="wstring" dir="in"/>
4745 <param name="storageController" type="IStorageController" dir="return"/>
4746 </method>
4747
4748 <method name="removeStorageController">
4749 <desc>
4750 Removes a storage controller from the machine.
4751
4752 <result name="VBOX_E_OBJECT_NOT_FOUND">
4753 A storage controller with given name doesn't exist.
4754 </result>
4755 </desc>
4756 <param name="name" type="wstring" dir="in"/>
4757 </method>
4758
4759 <method name="getSerialPort" const="yes">
4760 <desc>
4761 Returns the serial port associated with the given slot.
4762 Slots are numbered sequentially, starting with zero. The total
4763 number of serial ports per machine is defined by the
4764 <link to="ISystemProperties::serialPortCount"/> property,
4765 so the maximum slot number is one less than that property's value.
4766
4767 <result name="E_INVALIDARG">
4768 Invalid @a slot number.
4769 </result>
4770
4771 </desc>
4772 <param name="slot" type="unsigned long" dir="in"/>
4773 <param name="port" type="ISerialPort" dir="return"/>
4774 </method>
4775
4776 <method name="getParallelPort" const="yes">
4777 <desc>
4778 Returns the parallel port associated with the given slot.
4779 Slots are numbered sequentially, starting with zero. The total
4780 number of parallel ports per machine is defined by the
4781 <link to="ISystemProperties::parallelPortCount"/> property,
4782 so the maximum slot number is one less than that property's value.
4783
4784 <result name="E_INVALIDARG">
4785 Invalid @a slot number.
4786 </result>
4787
4788 </desc>
4789 <param name="slot" type="unsigned long" dir="in"/>
4790 <param name="port" type="IParallelPort" dir="return"/>
4791 </method>
4792
4793 <method name="getExtraDataKeys">
4794 <desc>
4795 Returns an array representing the machine-specific extra data keys
4796 which currently have values defined.
4797 </desc>
4798 <param name="value" type="wstring" dir="return" safearray="yes">
4799 <desc>Array of extra data keys.</desc>
4800 </param>
4801 </method>
4802
4803 <method name="getExtraData">
4804 <desc>
4805 Returns associated machine-specific extra data.
4806
4807 If the requested data @a key does not exist, this function will
4808 succeed and return an empty string in the @a value argument.
4809
4810 <result name="VBOX_E_FILE_ERROR">
4811 Settings file not accessible.
4812 </result>
4813 <result name="VBOX_E_XML_ERROR">
4814 Could not parse the settings file.
4815 </result>
4816
4817 </desc>
4818 <param name="key" type="wstring" dir="in">
4819 <desc>Name of the data key to get.</desc>
4820 </param>
4821 <param name="value" type="wstring" dir="return">
4822 <desc>Value of the requested data key.</desc>
4823 </param>
4824 </method>
4825
4826 <method name="setExtraData">
4827 <desc>
4828 Sets associated machine-specific extra data.
4829
4830 If you pass @c null or an empty string as a key @a value, the given
4831 @a key will be deleted.
4832
4833 <note>
4834 Before performing the actual data change, this method will ask all
4835 registered callbacks using the
4836 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4837 notification for a permission. If one of the callbacks refuses the
4838 new value, the change will not be performed.
4839 </note>
4840 <note>
4841 On success, the
4842 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4843 is called to inform all registered callbacks about a successful data
4844 change.
4845 </note>
4846 <note>
4847 This method can be called outside the machine session and therefore
4848 it's a caller's responsibility to handle possible race conditions
4849 when several clients change the same key at the same time.
4850 </note>
4851
4852 <result name="VBOX_E_FILE_ERROR">
4853 Settings file not accessible.
4854 </result>
4855 <result name="VBOX_E_XML_ERROR">
4856 Could not parse the settings file.
4857 </result>
4858
4859 </desc>
4860 <param name="key" type="wstring" dir="in">
4861 <desc>Name of the data key to set.</desc>
4862 </param>
4863 <param name="value" type="wstring" dir="in">
4864 <desc>Value to assign to the key.</desc>
4865 </param>
4866 </method>
4867
4868 <method name="saveSettings">
4869 <desc>
4870 Saves any changes to machine settings made since the session
4871 has been opened or a new machine has been created, or since the
4872 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4873 For registered machines, new settings become visible to all
4874 other VirtualBox clients after successful invocation of this
4875 method.
4876 <note>
4877 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4878 notification event after the configuration has been successfully
4879 saved (only for registered machines).
4880 </note>
4881 <note>
4882 Calling this method is only valid on instances returned
4883 by <link to="ISession::machine"/> and on new machines
4884 created by <link to="IVirtualBox::createMachine"/> but not
4885 yet registered, or on unregistered machines after calling
4886 <link to="IVirtualBox::unregisterMachine"/>.
4887 </note>
4888
4889 <result name="VBOX_E_FILE_ERROR">
4890 Settings file not accessible.
4891 </result>
4892 <result name="VBOX_E_XML_ERROR">
4893 Could not parse the settings file.
4894 </result>
4895 <result name="E_ACCESSDENIED">
4896 Modification request refused.
4897 </result>
4898
4899 </desc>
4900 </method>
4901
4902 <method name="discardSettings">
4903 <desc>
4904 Discards any changes to the machine settings made since the session
4905 has been opened or since the last call to <link to="#saveSettings"/>
4906 or <link to="#discardSettings"/>.
4907 <note>
4908 Calling this method is only valid on instances returned
4909 by <link to="ISession::machine"/> and on new machines
4910 created by <link to="IVirtualBox::createMachine"/> or
4911 opened by <link to="IVirtualBox::openMachine"/> but not
4912 yet registered, or on unregistered machines after calling
4913 <link to="IVirtualBox::unregisterMachine"/>.
4914 </note>
4915
4916 <result name="VBOX_E_INVALID_VM_STATE">
4917 Virtual machine is not mutable.
4918 </result>
4919
4920 </desc>
4921 </method>
4922
4923 <method name="deleteSettings">
4924 <desc>
4925 Deletes the settings file of this machine from disk.
4926 The machine must not be registered in order for this operation
4927 to succeed.
4928 <note>
4929 <link to="#settingsModified"/> will return @c true after this
4930 method successfully returns.
4931 </note>
4932 <note>
4933 Calling this method is only valid on instances returned
4934 by <link to="ISession::machine"/> and on new machines
4935 created by <link to="IVirtualBox::createMachine"/> or
4936 opened by <link to="IVirtualBox::openMachine"/> but not
4937 yet registered, or on unregistered machines after calling
4938 <link to="IVirtualBox::unregisterMachine"/>.
4939 </note>
4940 <note>
4941 The deleted machine settings file can be restored (saved again)
4942 by calling <link to="#saveSettings"/>.
4943 </note>
4944
4945 <result name="VBOX_E_INVALID_VM_STATE">
4946 Cannot delete settings of a registered machine or
4947 machine not mutable.
4948 </result>
4949 <result name="VBOX_E_IPRT_ERROR">
4950 Could not delete the settings file.
4951 </result>
4952
4953 </desc>
4954 </method>
4955
4956 <method name="export">
4957 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
4958 steps required to export VirtualBox machines to OVF.
4959 </desc>
4960
4961 <param name="aAppliance" type="IAppliance" dir="in">
4962 <desc>Appliance to export this machine to.</desc>
4963 </param>
4964 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
4965 <desc>VirtualSystemDescription object which is created for this machine.</desc>
4966 </param>
4967 </method >
4968
4969 <method name="getSnapshot">
4970 <desc>
4971 Returns a snapshot of this machine with the given UUID.
4972 A @c null UUID can be used to obtain the first snapshot
4973 taken on this machine. This is useful if you want to traverse
4974 the whole tree of snapshots starting from the root.
4975
4976 <result name="VBOX_E_OBJECT_NOT_FOUND">
4977 Virtual machine has no snapshots or snapshot not found.
4978 </result>
4979
4980 </desc>
4981 <param name="id" type="wstring" dir="in">
4982 <desc>UUID of the snapshot to get</desc>
4983 </param>
4984 <param name="snapshot" type="ISnapshot" dir="return">
4985 <desc>Snapshot object with the given UUID.</desc>
4986 </param>
4987 </method>
4988
4989 <method name="findSnapshot">
4990 <desc>
4991 Returns a snapshot of this machine with the given name.
4992
4993 <result name="VBOX_E_OBJECT_NOT_FOUND">
4994 Virtual machine has no snapshots or snapshot not found.
4995 </result>
4996
4997 </desc>
4998 <param name="name" type="wstring" dir="in">
4999 <desc>Name of the snapshot to find</desc>
5000 </param>
5001 <param name="snapshot" type="ISnapshot" dir="return">
5002 <desc>Snapshot object with the given name.</desc>
5003 </param>
5004 </method>
5005
5006 <method name="setCurrentSnapshot">
5007 <desc>
5008 Sets the current snapshot of this machine.
5009 <note>
5010 In the current implementation, this operation is not
5011 implemented.
5012 </note>
5013 </desc>
5014 <param name="id" type="wstring" dir="in">
5015 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5016 </param>
5017 </method>
5018
5019 <method name="createSharedFolder">
5020 <desc>
5021 Creates a new permanent shared folder by associating the given logical
5022 name with the given host path, adds it to the collection of shared
5023 folders and starts sharing it. Refer to the description of
5024 <link to="ISharedFolder"/> to read more about logical names.
5025
5026 <result name="VBOX_E_OBJECT_IN_USE">
5027 Shared folder already exists.
5028 </result>
5029 <result name="VBOX_E_FILE_ERROR">
5030 Shared folder @a hostPath not accessible.
5031 </result>
5032
5033 </desc>
5034 <param name="name" type="wstring" dir="in">
5035 <desc>Unique logical name of the shared folder.</desc>
5036 </param>
5037 <param name="hostPath" type="wstring" dir="in">
5038 <desc>Full path to the shared folder in the host file system.</desc>
5039 </param>
5040 <param name="writable" type="boolean" dir="in">
5041 <desc>Whether the share is writable or readonly</desc>
5042 </param>
5043 </method>
5044
5045 <method name="removeSharedFolder">
5046 <desc>
5047 Removes the permanent shared folder with the given name previously
5048 created by <link to="#createSharedFolder"/> from the collection of
5049 shared folders and stops sharing it.
5050
5051 <result name="VBOX_E_INVALID_VM_STATE">
5052 Virtual machine is not mutable.
5053 </result>
5054 <result name="VBOX_E_OBJECT_NOT_FOUND">
5055 Shared folder @a name does not exist.
5056 </result>
5057
5058 </desc>
5059 <param name="name" type="wstring" dir="in">
5060 <desc>Logical name of the shared folder to remove.</desc>
5061 </param>
5062 </method>
5063
5064 <method name="canShowConsoleWindow">
5065 <desc>
5066 Returns @c true if the VM console process can activate the
5067 console window and bring it to foreground on the desktop of
5068 the host PC.
5069 <note>
5070 This method will fail if a session for this machine is not
5071 currently open.
5072 </note>
5073
5074 <result name="VBOX_E_INVALID_VM_STATE">
5075 Machine session is not open.
5076 </result>
5077
5078 </desc>
5079 <param name="canShow" type="boolean" dir="return">
5080 <desc>
5081 @c true if the console window can be shown and @c false otherwise.
5082 </desc>
5083 </param>
5084 </method>
5085
5086 <method name="showConsoleWindow">
5087 <desc>
5088 Activates the console window and brings it to foreground on
5089 the desktop of the host PC. Many modern window managers on
5090 many platforms implement some sort of focus stealing
5091 prevention logic, so that it may be impossible to activate
5092 a window without the help of the currently active
5093 application. In this case, this method will return a non-zero
5094 identifier that represents the top-level window of the VM
5095 console process. The caller, if it represents a currently
5096 active process, is responsible to use this identifier (in a
5097 platform-dependent manner) to perform actual window
5098 activation.
5099 <note>
5100 This method will fail if a session for this machine is not
5101 currently open.
5102 </note>
5103
5104 <result name="VBOX_E_INVALID_VM_STATE">
5105 Machine session is not open.
5106 </result>
5107
5108 </desc>
5109 <param name="winId" type="unsigned long long" dir="return">
5110 <desc>
5111 Platform-dependent identifier of the top-level VM console
5112 window, or zero if this method has performed all actions
5113 necessary to implement the <i>show window</i> semantics for
5114 the given platform and/or VirtualBox front-end.
5115 </desc>
5116 </param>
5117 </method>
5118
5119 <method name="getGuestProperty">
5120 <desc>
5121 Reads an entry from the machine's guest property store.
5122
5123 <result name="VBOX_E_INVALID_VM_STATE">
5124 Machine session is not open.
5125 </result>
5126
5127 </desc>
5128 <param name="name" type="wstring" dir="in">
5129 <desc>
5130 The name of the property to read.
5131 </desc>
5132 </param>
5133 <param name="value" type="wstring" dir="out">
5134 <desc>
5135 The value of the property. If the property does not exist then this
5136 will be empty.
5137 </desc>
5138 </param>
5139 <param name="timestamp" type="unsigned long long" dir="out">
5140 <desc>
5141 The time at which the property was last modified, as seen by the
5142 server process.
5143 </desc>
5144 </param>
5145 <param name="flags" type="wstring" dir="out">
5146 <desc>
5147 Additional property parameters, passed as a comma-separated list of
5148 "name=value" type entries.
5149 </desc>
5150 </param>
5151 </method>
5152
5153 <method name="getGuestPropertyValue">
5154 <desc>
5155 Reads a value from the machine's guest property store.
5156
5157 <result name="VBOX_E_INVALID_VM_STATE">
5158 Machine session is not open.
5159 </result>
5160
5161 </desc>
5162 <param name="property" type="wstring" dir="in">
5163 <desc>
5164 The name of the property to read.
5165 </desc>
5166 </param>
5167 <param name="value" type="wstring" dir="return">
5168 <desc>
5169 The value of the property. If the property does not exist then this
5170 will be empty.
5171 </desc>
5172 </param>
5173 </method>
5174
5175 <method name="getGuestPropertyTimestamp">
5176 <desc>
5177 Reads a property timestamp from the machine's guest property store.
5178
5179 <result name="VBOX_E_INVALID_VM_STATE">
5180 Machine session is not open.
5181 </result>
5182
5183 </desc>
5184 <param name="property" type="wstring" dir="in">
5185 <desc>
5186 The name of the property to read.
5187 </desc>
5188 </param>
5189 <param name="value" type="unsigned long long" dir="return">
5190 <desc>
5191 The timestamp. If the property does not exist then this will be
5192 empty.
5193 </desc>
5194 </param>
5195 </method>
5196
5197 <method name="setGuestProperty">
5198 <desc>
5199 Sets, changes or deletes an entry in the machine's guest property
5200 store.
5201
5202 <result name="E_ACCESSDENIED">
5203 Property cannot be changed.
5204 </result>
5205 <result name="E_INVALIDARG">
5206 Invalid @a flags.
5207 </result>
5208 <result name="VBOX_E_INVALID_VM_STATE">
5209 Virtual machine is not mutable or session not open.
5210 </result>
5211 <result name="VBOX_E_INVALID_OBJECT_STATE">
5212 Cannot set transient property when machine not running.
5213 </result>
5214
5215 </desc>
5216 <param name="property" type="wstring" dir="in">
5217 <desc>
5218 The name of the property to set, change or delete.
5219 </desc>
5220 </param>
5221 <param name="value" type="wstring" dir="in">
5222 <desc>
5223 The new value of the property to set, change or delete. If the
5224 property does not yet exist and value is non-empty, it will be
5225 created. If the value is @c null or empty, the property will be
5226 deleted if it exists.
5227 </desc>
5228 </param>
5229 <param name="flags" type="wstring" dir="in">
5230 <desc>
5231 Additional property parameters, passed as a comma-separated list of
5232 "name=value" type entries.
5233 </desc>
5234 </param>
5235 </method>
5236
5237 <method name="setGuestPropertyValue">
5238 <desc>
5239 Sets, changes or deletes a value in the machine's guest property
5240 store. The flags field will be left unchanged or created empty for a
5241 new property.
5242
5243 <result name="E_ACCESSDENIED">
5244 Property cannot be changed.
5245 </result>
5246 <result name="VBOX_E_INVALID_VM_STATE">
5247 Virtual machine is not mutable or session not open.
5248 </result>
5249 <result name="VBOX_E_INVALID_OBJECT_STATE">
5250 Cannot set transient property when machine not running.
5251 </result>
5252 </desc>
5253
5254 <param name="property" type="wstring" dir="in">
5255 <desc>
5256 The name of the property to set, change or delete.
5257 </desc>
5258 </param>
5259 <param name="value" type="wstring" dir="in">
5260 <desc>
5261 The new value of the property to set, change or delete. If the
5262 property does not yet exist and value is non-empty, it will be
5263 created. If the value is @c null or empty, the property will be
5264 deleted if it exists.
5265 </desc>
5266 </param>
5267 </method>
5268
5269 <method name="enumerateGuestProperties">
5270 <desc>
5271 Return a list of the guest properties matching a set of patterns along
5272 with their values, time stamps and flags.
5273 </desc>
5274 <param name="patterns" type="wstring" dir="in">
5275 <desc>
5276 The patterns to match the properties against, separated by '|'
5277 characters. If this is empty or @c null, all properties will match.
5278 </desc>
5279 </param>
5280 <param name="name" type="wstring" dir="out" safearray="yes">
5281 <desc>
5282 The names of the properties returned.
5283 </desc>
5284 </param>
5285 <param name="value" type="wstring" dir="out" safearray="yes">
5286 <desc>
5287 The values of the properties returned. The array entries match the
5288 corresponding entries in the @a name array.
5289 </desc>
5290 </param>
5291 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5292 <desc>
5293 The time stamps of the properties returned. The array entries match
5294 the corresponding entries in the @a name array.
5295 </desc>
5296 </param>
5297 <param name="flags" type="wstring" dir="out" safearray="yes">
5298 <desc>
5299 The flags of the properties returned. The array entries match the
5300 corresponding entries in the @a name array.
5301 </desc>
5302 </param>
5303 </method>
5304</interface>
5305
5306 <!--
5307 // IConsole
5308 /////////////////////////////////////////////////////////////////////////
5309 -->
5310
5311 <interface
5312 name="IConsoleCallback" extends="$unknown"
5313 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5314 wsmap="suppress"
5315 >
5316
5317 <desc>
5318 This interface is used by a client of the Main API that need to
5319 be notified of events. For example, a graphical user interface
5320 can use this to learn about machine state changes so they can
5321 update the list of virtual machines without having to rely
5322 on polling.
5323
5324 Whenever relevant events occur in VirtualBox, the callbacks in
5325 objects of this interface are called. In order for this to be
5326 useful, a client needs to create its own subclass that implements
5327 this interface in which the methods for the relevant callbacks
5328 are overridden. An instance of this subclass interface can then
5329 be passed to <link to="IConsole::registerCallback" />.
5330 </desc>
5331
5332 <method name="onMousePointerShapeChange">
5333 <desc>
5334 Notification when the guest mouse pointer shape has
5335 changed. The new shape data is given.
5336 </desc>
5337 <param name="visible" type="boolean" dir="in">
5338 <desc>
5339 Flag whether the pointer is visible.
5340 </desc>
5341 </param>
5342 <param name="alpha" type="boolean" dir="in">
5343 <desc>
5344 Flag whether the pointer has an alpha channel.
5345 </desc>
5346 </param>
5347 <param name="xHot" type="unsigned long" dir="in">
5348 <desc>
5349 The pointer hot spot x coordinate.
5350 </desc>
5351 </param>
5352 <param name="yHot" type="unsigned long" dir="in">
5353 <desc>
5354 The pointer hot spot y coordinate.
5355 </desc>
5356 </param>
5357 <param name="width" type="unsigned long" dir="in">
5358 <desc>
5359 Width of the pointer shape in pixels.
5360 </desc>
5361 </param>
5362 <param name="height" type="unsigned long" dir="in">
5363 <desc>
5364 Height of the pointer shape in pixels.
5365 </desc>
5366 </param>
5367 <param name="shape" type="octet" mod="ptr" dir="in">
5368 <desc>
5369 Address of the shape buffer.
5370
5371 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5372 followed by a 32-bpp XOR (color) mask.
5373
5374 For pointers without alpha channel the XOR mask pixels are 32
5375 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5376 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5377
5378 An AND mask is used for pointers with alpha channel, so if the
5379 callback does not support alpha, the pointer could be
5380 displayed as a normal color pointer.
5381
5382 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5383 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5384 height</tt>. The padding bits at the end of each scanline are
5385 undefined.
5386
5387 The XOR mask follows the AND mask on the next 4-byte aligned
5388 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5389 Bytes in the gap between the AND and the XOR mask are undefined.
5390 The XOR mask scanlines have no gap between them and the size of
5391 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5392
5393 <note>
5394 If @a shape is 0, only the pointer visibility is changed.
5395 </note>
5396 </desc>
5397 </param>
5398 </method>
5399
5400 <method name="onMouseCapabilityChange">
5401 <desc>
5402 Notification when the mouse capabilities reported by the
5403 guest have changed. The new capabilities are passed.
5404 </desc>
5405 <param name="supportsAbsolute" type="boolean" dir="in"/>
5406 <param name="needsHostCursor" type="boolean" dir="in"/>
5407 </method>
5408
5409 <method name="onKeyboardLedsChange">
5410 <desc>
5411 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5412 to alter the state of the keyboard LEDs.
5413 </desc>
5414 <param name="numLock" type="boolean" dir="in"/>
5415 <param name="capsLock" type="boolean" dir="in"/>
5416 <param name="scrollLock" type="boolean" dir="in"/>
5417 </method>
5418
5419 <method name="onStateChange">
5420 <desc>
5421 Notification when the execution state of the machine has changed.
5422 The new state will be given.
5423 </desc>
5424 <param name="state" type="MachineState" dir="in"/>
5425 </method>
5426
5427 <method name="onAdditionsStateChange">
5428 <desc>
5429 Notification when a Guest Additions property changes.
5430 Interested callees should query IGuest attributes to
5431 find out what has changed.
5432 </desc>
5433 </method>
5434
5435 <method name="onDVDDriveChange">
5436 <desc>
5437 Notification when a property of the
5438 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5439 Interested callees should use IDVDDrive methods to find out what has
5440 changed.
5441 </desc>
5442 </method>
5443
5444 <method name="onFloppyDriveChange">
5445 <desc>
5446 Notification when a property of the
5447 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5448 Interested callees should use IFloppyDrive methods to find out what
5449 has changed.
5450 </desc>
5451 </method>
5452
5453 <method name="onNetworkAdapterChange">
5454 <desc>
5455 Notification when a property of one of the
5456 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5457 changes. Interested callees should use INetworkAdapter methods and
5458 attributes to find out what has changed.
5459 </desc>
5460 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5461 <desc>Network adapter that is subject to change.</desc>
5462 </param>
5463 </method>
5464
5465 <method name="onSerialPortChange">
5466 <desc>
5467 Notification when a property of one of the
5468 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5469 Interested callees should use ISerialPort methods and attributes
5470 to find out what has changed.
5471 </desc>
5472 <param name="serialPort" type="ISerialPort" dir="in">
5473 <desc>Serial port that is subject to change.</desc>
5474 </param>
5475 </method>
5476
5477 <method name="onParallelPortChange">
5478 <desc>
5479 Notification when a property of one of the
5480 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5481 changes. Interested callees should use ISerialPort methods and
5482 attributes to find out what has changed.
5483 </desc>
5484 <param name="parallelPort" type="IParallelPort" dir="in">
5485 <desc>Parallel port that is subject to change.</desc>
5486 </param>
5487 </method>
5488
5489 <method name="onStorageControllerChange">
5490 <desc>
5491 Notification when a property of one of the
5492 virtual <link to="IMachine::storageControllers">storage controllers</link>
5493 changes. Interested callees should query the corresponding collections
5494 to find out what has changed.
5495 </desc>
5496 </method>
5497
5498 <method name="onVRDPServerChange">
5499 <desc>
5500 Notification when a property of the
5501 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5502 Interested callees should use IVRDPServer methods and attributes to
5503 find out what has changed.
5504 </desc>
5505 </method>
5506
5507 <method name="onUSBControllerChange">
5508 <desc>
5509 Notification when a property of the virtual
5510 <link to="IMachine::USBController">USB controller</link> changes.
5511 Interested callees should use IUSBController methods and attributes to
5512 find out what has changed.
5513 </desc>
5514 </method>
5515
5516 <method name="onUSBDeviceStateChange">
5517 <desc>
5518 Notification when a USB device is attached to or detached from
5519 the virtual USB controller.
5520
5521 This notification is sent as a result of the indirect
5522 request to attach the device because it matches one of the
5523 machine USB filters, or as a result of the direct request
5524 issued by <link to="IConsole::attachUSBDevice"/> or
5525 <link to="IConsole::detachUSBDevice"/>.
5526
5527 This notification is sent in case of both a succeeded and a
5528 failed request completion. When the request succeeds, the
5529 @a error parameter is @c null, and the given device has been
5530 already added to (when @a attached is @c true) or removed from
5531 (when @a attached is @c false) the collection represented by
5532 <link to="IConsole::USBDevices"/>. On failure, the collection
5533 doesn't change and the @a error parameter represents the error
5534 message describing the failure.
5535
5536 </desc>
5537 <param name="device" type="IUSBDevice" dir="in">
5538 <desc>Device that is subject to state change.</desc>
5539 </param>
5540 <param name="attached" type="boolean" dir="in">
5541 <desc>
5542 @c true if the device was attached and @c false otherwise.
5543 </desc>
5544 </param>
5545 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5546 <desc>
5547 @c null on success or an error message object on failure.
5548 </desc>
5549 </param>
5550 </method>
5551
5552 <method name="onSharedFolderChange">
5553 <desc>
5554 Notification when a shared folder is added or removed.
5555 The @a scope argument defines one of three scopes:
5556 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5557 (<link to="Scope_Global">Global</link>),
5558 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5559 the machine (<link to="Scope_Machine">Machine</link>) or <link
5560 to="IConsole::sharedFolders">transient shared folders</link> of the
5561 machine (<link to="Scope_Session">Session</link>). Interested callees
5562 should use query the corresponding collections to find out what has
5563 changed.
5564 </desc>
5565 <param name="scope" type="Scope" dir="in">
5566 <desc>Scope of the notification.</desc>
5567 </param>
5568 </method>
5569
5570 <method name="onRuntimeError">
5571 <desc>
5572 Notification when an error happens during the virtual
5573 machine execution.
5574
5575 There are three kinds of runtime errors:
5576 <ul>
5577 <li><i>fatal</i></li>
5578 <li><i>non-fatal with retry</i></li>
5579 <li><i>non-fatal warnings</i></li>
5580 </ul>
5581
5582 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5583 to @c true. In case of fatal errors, the virtual machine
5584 execution is always paused before calling this notification, and
5585 the notification handler is supposed either to immediately save
5586 the virtual machine state using <link to="IConsole::saveState"/>
5587 or power it off using <link to="IConsole::powerDown"/>.
5588 Resuming the execution can lead to unpredictable results.
5589
5590 <b>Non-fatal</b> errors and warnings are indicated by the
5591 @a fatal parameter set to @c false. If the virtual machine
5592 is in the Paused state by the time the error notification is
5593 received, it means that the user can <i>try to resume</i> the machine
5594 execution after attempting to solve the problem that caused the
5595 error. In this case, the notification handler is supposed
5596 to show an appropriate message to the user (depending on the
5597 value of the @a id parameter) that offers several actions such
5598 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5599 wants to retry, the notification handler should continue
5600 the machine execution using the <link to="IConsole::resume"/>
5601 call. If the machine execution is not Paused during this
5602 notification, then it means this notification is a <i>warning</i>
5603 (for example, about a fatal condition that can happen very soon);
5604 no immediate action is required from the user, the machine
5605 continues its normal execution.
5606
5607 Note that in either case the notification handler
5608 <b>must not</b> perform any action directly on a thread
5609 where this notification is called. Everything it is allowed to
5610 do is to post a message to another thread that will then talk
5611 to the user and take the corresponding action.
5612
5613 Currently, the following error identifiers are known:
5614 <ul>
5615 <li><tt>"HostMemoryLow"</tt></li>
5616 <li><tt>"HostAudioNotResponding"</tt></li>
5617 <li><tt>"VDIStorageFull"</tt></li>
5618 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5619 </ul>
5620
5621 <note>
5622 This notification is not designed to be implemented by
5623 more than one callback at a time. If you have multiple
5624 IConsoleCallback instances registered on the given
5625 IConsole object, make sure you simply do nothing but
5626 return @c S_OK from all but one of them that does actual
5627 user notification and performs necessary actions.
5628 </note>
5629
5630 </desc>
5631 <param name="fatal" type="boolean" dir="in">
5632 <desc>Whether the error is fatal or not</desc>
5633 </param>
5634 <param name="id" type="wstring" dir="in">
5635 <desc>Error identifier</desc>
5636 </param>
5637 <param name="message" type="wstring" dir="in">
5638 <desc>Optional error message</desc>
5639 </param>
5640 </method>
5641
5642 <method name="onCanShowWindow">
5643 <desc>
5644 Notification when a call to
5645 <link to="IMachine::canShowConsoleWindow"/> is made by a
5646 front-end to check if a subsequent call to
5647 <link to="IMachine::showConsoleWindow"/> can succeed.
5648
5649 The callee should give an answer appropriate to the current
5650 machine state in the @a canShow argument. This answer must
5651 remain valid at least until the next
5652 <link to="IConsole::state">machine state</link> change.
5653
5654 <note>
5655 This notification is not designed to be implemented by
5656 more than one callback at a time. If you have multiple
5657 IConsoleCallback instances registered on the given
5658 IConsole object, make sure you simply do nothing but
5659 return @c true and @c S_OK from all but one of them that
5660 actually manages console window activation.
5661 </note>
5662 </desc>
5663 <param name="canShow" type="boolean" dir="return">
5664 <desc>
5665 @c true if the console window can be shown and @c false otherwise.
5666 </desc>
5667 </param>
5668 </method>
5669
5670 <method name="onShowWindow">
5671 <desc>
5672 Notification when a call to
5673 <link to="IMachine::showConsoleWindow"/>
5674 requests the console window to be activated and brought to
5675 foreground on the desktop of the host PC.
5676
5677 This notification should cause the VM console process to
5678 perform the requested action as described above. If it is
5679 impossible to do it at a time of this notification, this
5680 method should return a failure.
5681
5682 Note that many modern window managers on many platforms
5683 implement some sort of focus stealing prevention logic, so
5684 that it may be impossible to activate a window without the
5685 help of the currently active application (which is supposedly
5686 an initiator of this notification). In this case, this method
5687 must return a non-zero identifier that represents the
5688 top-level window of the VM console process. The caller, if it
5689 represents a currently active process, is responsible to use
5690 this identifier (in a platform-dependent manner) to perform
5691 actual window activation.
5692
5693 This method must set @a winId to zero if it has performed all
5694 actions necessary to complete the request and the console
5695 window is now active and in foreground, to indicate that no
5696 further action is required on the caller's side.
5697
5698 <note>
5699 This notification is not designed to be implemented by
5700 more than one callback at a time. If you have multiple
5701 IConsoleCallback instances registered on the given
5702 IConsole object, make sure you simply do nothing but
5703 return @c S_OK from all but one of them that actually
5704 manages console window activation.
5705 </note>
5706 </desc>
5707 <param name="winId" type="unsigned long long" dir="return">
5708 <desc>
5709 Platform-dependent identifier of the top-level VM console
5710 window, or zero if this method has performed all actions
5711 necessary to implement the <i>show window</i> semantics for
5712 the given platform and/or this VirtualBox front-end.
5713 </desc>
5714 </param>
5715 </method>
5716
5717 </interface>
5718
5719 <interface
5720 name="IRemoteDisplayInfo" extends="$unknown"
5721 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5722 wsmap="struct"
5723 >
5724 <desc>
5725 Contains information about the remote display (VRDP) capabilities and status.
5726 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5727 </desc>
5728
5729 <attribute name="active" type="boolean" readonly="yes">
5730 <desc>
5731 Whether the remote display connection is active.
5732 </desc>
5733 </attribute>
5734
5735 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5736 <desc>
5737 How many times a client connected.
5738 </desc>
5739 </attribute>
5740
5741 <attribute name="beginTime" type="long long" readonly="yes">
5742 <desc>
5743 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5744 </desc>
5745 </attribute>
5746
5747 <attribute name="endTime" type="long long" readonly="yes">
5748 <desc>
5749 When the last connection was terminated or the current time, if
5750 connection is still active, in milliseconds since 1970-01-01 UTC.
5751 </desc>
5752 </attribute>
5753
5754 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5755 <desc>
5756 How many bytes were sent in last or current, if still active, connection.
5757 </desc>
5758 </attribute>
5759
5760 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5761 <desc>
5762 How many bytes were sent in all connections.
5763 </desc>
5764 </attribute>
5765
5766 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5767 <desc>
5768 How many bytes were received in last or current, if still active, connection.
5769 </desc>
5770 </attribute>
5771
5772 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5773 <desc>
5774 How many bytes were received in all connections.
5775 </desc>
5776 </attribute>
5777
5778 <attribute name="user" type="wstring" readonly="yes">
5779 <desc>
5780 Login user name supplied by the client.
5781 </desc>
5782 </attribute>
5783
5784 <attribute name="domain" type="wstring" readonly="yes">
5785 <desc>
5786 Login domain name supplied by the client.
5787 </desc>
5788 </attribute>
5789
5790 <attribute name="clientName" type="wstring" readonly="yes">
5791 <desc>
5792 The client name supplied by the client.
5793 </desc>
5794 </attribute>
5795
5796 <attribute name="clientIP" type="wstring" readonly="yes">
5797 <desc>
5798 The IP address of the client.
5799 </desc>
5800 </attribute>
5801
5802 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5803 <desc>
5804 The client software version number.
5805 </desc>
5806 </attribute>
5807
5808 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5809 <desc>
5810 Public key exchange method used when connection was established.
5811 Values: 0 - RDP4 public key exchange scheme.
5812 1 - X509 certificates were sent to client.
5813 </desc>
5814 </attribute>
5815
5816 </interface>
5817
5818 <interface
5819 name="IConsole" extends="$unknown"
5820 uuid="0a51994b-cbc6-4686-94eb-d4e4023280e2"
5821 wsmap="managed"
5822 >
5823 <desc>
5824 The IConsole interface represents an interface to control virtual
5825 machine execution.
5826
5827 The console object that implements the IConsole interface is obtained
5828 from a session object after the session for the given machine has been
5829 opened using one of <link to="IVirtualBox::openSession"/>,
5830 <link to="IVirtualBox::openRemoteSession"/> or
5831 <link to="IVirtualBox::openExistingSession"/> methods.
5832
5833 Methods of the IConsole interface allow the caller to query the current
5834 virtual machine execution state, pause the machine or power it down, save
5835 the machine state or take a snapshot, attach and detach removable media
5836 and so on.
5837
5838 <see>ISession</see>
5839 </desc>
5840
5841 <attribute name="machine" type="IMachine" readonly="yes">
5842 <desc>
5843 Machine object this console is sessioned with.
5844 <note>
5845 This is a convenience property, it has the same value as
5846 <link to="ISession::machine"/> of the corresponding session
5847 object.
5848 </note>
5849 </desc>
5850 </attribute>
5851
5852 <attribute name="state" type="MachineState" readonly="yes">
5853 <desc>
5854 Current execution state of the machine.
5855 <note>
5856 This property always returns the same value as the corresponding
5857 property of the IMachine object this console is sessioned with.
5858 For the process that owns (executes) the VM, this is the
5859 preferable way of querying the VM state, because no IPC
5860 calls are made.
5861 </note>
5862 </desc>
5863 </attribute>
5864
5865 <attribute name="guest" type="IGuest" readonly="yes">
5866 <desc>Guest object.</desc>
5867 </attribute>
5868
5869 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5870 <desc>
5871 Virtual keyboard object.
5872 <note>
5873 If the machine is not running, any attempt to use
5874 the returned object will result in an error.
5875 </note>
5876 </desc>
5877 </attribute>
5878
5879 <attribute name="mouse" type="IMouse" readonly="yes">
5880 <desc>
5881 Virtual mouse object.
5882 <note>
5883 If the machine is not running, any attempt to use
5884 the returned object will result in an error.
5885 </note>
5886 </desc>
5887 </attribute>
5888
5889 <attribute name="display" type="IDisplay" readonly="yes">
5890 <desc>Virtual display object.
5891 <note>
5892 If the machine is not running, any attempt to use
5893 the returned object will result in an error.
5894 </note>
5895 </desc>
5896 </attribute>
5897
5898 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5899 <desc>Debugging interface.</desc>
5900 </attribute>
5901
5902 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5903 <desc>
5904 Collection of USB devices currently attached to the virtual
5905 USB controller.
5906 <note>
5907 The collection is empty if the machine is not running.
5908 </note>
5909 </desc>
5910 </attribute>
5911
5912 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5913 <desc>
5914 List of USB devices currently attached to the remote VRDP client.
5915 Once a new device is physically attached to the remote host computer,
5916 it appears in this list and remains there until detached.
5917 </desc>
5918 </attribute>
5919
5920 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5921 <desc>
5922 Collection of shared folders for the current session. These folders
5923 are called transient shared folders because they are available to the
5924 guest OS running inside the associated virtual machine only for the
5925 duration of the session (as opposed to
5926 <link to="IMachine::sharedFolders"/> which represent permanent shared
5927 folders). When the session is closed (e.g. the machine is powered down),
5928 these folders are automatically discarded.
5929
5930 New shared folders are added to the collection using
5931 <link to="#createSharedFolder"/>. Existing shared folders can be
5932 removed using <link to="#removeSharedFolder"/>.
5933 </desc>
5934 </attribute>
5935
5936 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5937 <desc>
5938 Interface that provides information on Remote Display (VRDP) connection.
5939 </desc>
5940 </attribute>
5941
5942 <method name="powerUp">
5943 <desc>
5944 Starts the virtual machine execution using the current machine
5945 state (that is, its current execution state, current settings and
5946 current hard disks).
5947
5948 If the machine is powered off or aborted, the execution will
5949 start from the beginning (as if the real hardware were just
5950 powered on).
5951
5952 If the machine is in the <link to="MachineState_Saved"/> state,
5953 it will continue its execution the point where the state has
5954 been saved.
5955
5956 <note>
5957 Unless you are trying to write a new VirtualBox front-end that
5958 performs direct machine execution (like the VirtualBox or VBoxSDL
5959 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5960 session opened by <link to="IVirtualBox::openSession"/> and use this
5961 session only to change virtual machine settings. If you simply want to
5962 start virtual machine execution using one of the existing front-ends
5963 (for example the VirtualBox GUI or headless server), simply use
5964 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5965 power up the machine automatically for you.
5966 </note>
5967
5968 <see>#saveState</see>
5969 <result name="VBOX_E_INVALID_VM_STATE">
5970 Virtual machine already running.
5971 </result>
5972 <result name="VBOX_E_HOST_ERROR">
5973 Host interface does not exist or name not set.
5974 </result>
5975 <result name="VBOX_E_FILE_ERROR">
5976 Invalid saved state file.
5977 </result>
5978 </desc>
5979 <param name="progress" type="IProgress" dir="return">
5980 <desc>Progress object to track the operation completion.</desc>
5981 </param>
5982 </method>
5983
5984 <method name="powerUpPaused">
5985 <desc>
5986 Identical to powerUp except that the VM will enter the
5987 <link to="MachineState_Paused"/> state, instead of
5988 <link to="MachineState_Running"/>.
5989
5990 <see>#powerUp</see>
5991 <result name="VBOX_E_INVALID_VM_STATE">
5992 Virtual machine already running.
5993 </result>
5994 <result name="VBOX_E_HOST_ERROR">
5995 Host interface does not exist or name not set.
5996 </result>
5997 <result name="VBOX_E_FILE_ERROR">
5998 Invalid saved state file.
5999 </result>
6000 </desc>
6001 <param name="progress" type="IProgress" dir="return">
6002 <desc>Progress object to track the operation completion.</desc>
6003 </param>
6004 </method>
6005
6006 <method name="powerDown">
6007 <desc>
6008 Initiates the power down procedure to stop the virtual machine
6009 execution.
6010
6011 The completion of the power down procedure is tracked using the returned
6012 IProgress object. After the operation is complete, the machine will go
6013 to the PoweredOff state.
6014 <result name="VBOX_E_INVALID_VM_STATE">
6015 Virtual machine must be Running, Paused or Stuck to be powered down.
6016 </result>
6017 </desc>
6018 <param name="progress" type="IProgress" dir="return">
6019 <desc>Progress object to track the operation completion.</desc>
6020 </param>
6021 </method>
6022
6023 <method name="reset">
6024 <desc>Resets the virtual machine.
6025 <result name="VBOX_E_INVALID_VM_STATE">
6026 Virtual machine not in Running state.
6027 </result>
6028 <result name="VBOX_E_VM_ERROR">
6029 Virtual machine error in reset operation.
6030 </result>
6031 </desc>
6032 </method>
6033
6034 <method name="pause">
6035 <desc>Pauses the virtual machine execution.
6036 <result name="VBOX_E_INVALID_VM_STATE">
6037 Virtual machine not in Running state.
6038 </result>
6039 <result name="VBOX_E_VM_ERROR">
6040 Virtual machine error in suspend operation.
6041 </result>
6042 </desc>
6043 </method>
6044
6045 <method name="resume">
6046 <desc>Resumes the virtual machine execution.
6047 <result name="VBOX_E_INVALID_VM_STATE">
6048 Virtual machine not in Paused state.
6049 </result>
6050 <result name="VBOX_E_VM_ERROR">
6051 Virtual machine error in resume operation.
6052 </result>
6053 </desc>
6054 </method>
6055
6056 <method name="powerButton">
6057 <desc>Sends the ACPI power button event to the guest.
6058 <result name="VBOX_E_INVALID_VM_STATE">
6059 Virtual machine not in Running state.
6060 </result>
6061 <result name="VBOX_E_PDM_ERROR">
6062 Controlled power off failed.
6063 </result>
6064 </desc>
6065 </method>
6066
6067 <method name="sleepButton">
6068 <desc>Sends the ACPI sleep button event to the guest.
6069 <result name="VBOX_E_INVALID_VM_STATE">
6070 Virtual machine not in Running state.
6071 </result>
6072 <result name="VBOX_E_PDM_ERROR">
6073 Sending sleep button event failed.
6074 </result>
6075 </desc>
6076 </method>
6077
6078 <method name="getPowerButtonHandled">
6079 <desc>Checks if the last power button event was handled by guest.
6080 <result name="VBOX_E_PDM_ERROR">
6081 Checking if the event was handled by the guest OS failed.
6082 </result>
6083 </desc>
6084 <param name="handled" type="boolean" dir="return"/>
6085 </method>
6086
6087 <method name="getGuestEnteredACPIMode">
6088 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6089 G1 (sleeping). If this method returns @c false, the guest will
6090 most likely not respond to external ACPI events.
6091 <result name="VBOX_E_INVALID_VM_STATE">
6092 Virtual machine not in Running state.
6093 </result>
6094 </desc>
6095 <param name="entered" type="boolean" dir="return"/>
6096 </method>
6097
6098 <method name="saveState">
6099 <desc>
6100 Saves the current execution state of a running virtual machine
6101 and stops its execution.
6102
6103 After this operation completes, the machine will go to the
6104 Saved state. Next time it is powered up, this state will
6105 be restored and the machine will continue its execution from
6106 the place where it was saved.
6107
6108 This operation differs from taking a snapshot to the effect
6109 that it doesn't create new differencing hard disks. Also, once
6110 the machine is powered up from the state saved using this method,
6111 the saved state is deleted, so it will be impossible to return
6112 to this state later.
6113
6114 <note>
6115 On success, this method implicitly calls
6116 <link to="IMachine::saveSettings"/> to save all current machine
6117 settings (including runtime changes to the DVD drive, etc.).
6118 Together with the impossibility to change any VM settings when it is
6119 in the Saved state, this guarantees adequate hardware
6120 configuration of the machine when it is restored from the saved
6121 state file.
6122 </note>
6123
6124 <note>
6125 The machine must be in the Running or Paused state, otherwise
6126 the operation will fail.
6127 </note>
6128 <result name="VBOX_E_INVALID_VM_STATE">
6129 Virtual machine state neither Running nor Paused.
6130 </result>
6131 <result name="VBOX_E_FILE_ERROR">
6132 Failed to create directory for saved state file.
6133 </result>
6134
6135 <see><link to="#takeSnapshot"/></see>
6136 </desc>
6137 <param name="progress" type="IProgress" dir="return">
6138 <desc>Progress object to track the operation completion.</desc>
6139 </param>
6140 </method>
6141
6142 <method name="adoptSavedState">
6143 <desc>
6144 Associates the given saved state file to the virtual machine.
6145
6146 On success, the machine will go to the Saved state. Next time it is
6147 powered up, it will be restored from the adopted saved state and
6148 continue execution from the place where the saved state file was
6149 created.
6150
6151 The specified saved state file path may be absolute or relative to the
6152 folder the VM normally saves the state to (usually,
6153 <link to="IMachine::snapshotFolder"/>).
6154
6155 <note>
6156 It's a caller's responsibility to make sure the given saved state
6157 file is compatible with the settings of this virtual machine that
6158 represent its virtual hardware (memory size, hard disk configuration
6159 etc.). If there is a mismatch, the behavior of the virtual machine
6160 is undefined.
6161 </note>
6162 <result name="VBOX_E_INVALID_VM_STATE">
6163 Virtual machine state neither PoweredOff nor Aborted.
6164 </result>
6165 </desc>
6166 <param name="savedStateFile" type="wstring" dir="in">
6167 <desc>Path to the saved state file to adopt.</desc>
6168 </param>
6169 </method>
6170
6171 <method name="forgetSavedState">
6172 <desc>
6173 Forgets the saved state of the virtual machine previously created
6174 by <link to="#saveState"/>. Next time the machine is powered up, a
6175 clean boot will occur. If @a remove is @c true the saved state file
6176 is deleted.
6177 <note>
6178 This operation is equivalent to resetting or powering off
6179 the machine without doing a proper shutdown in the guest OS.
6180 </note>
6181 <result name="VBOX_E_INVALID_VM_STATE">
6182 Virtual machine not in state Saved.
6183 </result>
6184 </desc>
6185 <param name="remove" type="boolean" dir="in">
6186 <desc>If @c true remove the saved state file.</desc>
6187 </param>
6188 </method>
6189
6190 <method name="getDeviceActivity">
6191 <desc>
6192 Gets the current activity type of a given device or device group.
6193 <result name="E_INVALIDARG">
6194 Invalid device type.
6195 </result>
6196 </desc>
6197 <param name="type" type="DeviceType" dir="in"/>
6198 <param name="activity" type="DeviceActivity" dir="return"/>
6199 </method>
6200
6201 <method name="attachUSBDevice">
6202 <desc>
6203 Attaches a host USB device with the given UUID to the
6204 USB controller of the virtual machine.
6205
6206 The device needs to be in one of the following states:
6207 <link to="USBDeviceState_Busy"/>,
6208 <link to="USBDeviceState_Available"/> or
6209 <link to="USBDeviceState_Held"/>,
6210 otherwise an error is immediately returned.
6211
6212 When the device state is
6213 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6214 be returned if the host computer refuses to release it for some reason.
6215
6216 <see>IUSBController::deviceFilters, USBDeviceState</see>
6217 <result name="VBOX_E_INVALID_VM_STATE">
6218 Virtual machine state neither Running nor Paused.
6219 </result>
6220 <result name="VBOX_E_PDM_ERROR">
6221 Virtual machine does not have a USB controller.
6222 </result>
6223 </desc>
6224 <param name="id" type="wstring" dir="in">
6225 <desc>UUID of the host USB device to attach.</desc>
6226 </param>
6227 </method>
6228
6229 <method name="detachUSBDevice">
6230 <desc>
6231 Detaches an USB device with the given UUID from the USB controller
6232 of the virtual machine.
6233
6234 After this method succeeds, the VirtualBox server re-initiates
6235 all USB filters as if the device were just physically attached
6236 to the host, but filters of this machine are ignored to avoid
6237 a possible automatic re-attachment.
6238
6239 <see>IUSBController::deviceFilters, USBDeviceState</see>
6240
6241 <result name="VBOX_E_PDM_ERROR">
6242 Virtual machine does not have a USB controller.
6243 </result>
6244 <result name="E_INVALIDARG">
6245 USB device not attached to this virtual machine.
6246 </result>
6247 </desc>
6248 <param name="id" type="wstring" dir="in">
6249 <desc>UUID of the USB device to detach.</desc>
6250 </param>
6251 <param name="device" type="IUSBDevice" dir="return">
6252 <desc>Detached USB device.</desc>
6253 </param>
6254 </method>
6255
6256 <method name="findUSBDeviceByAddress">
6257 <desc>
6258 Searches for a USB device with the given host address.
6259
6260 <result name="VBOX_E_OBJECT_NOT_FOUND">
6261 Given @c name does not correspond to any USB device.
6262 </result>
6263
6264 <see>IUSBDevice::address</see>
6265 </desc>
6266 <param name="name" type="wstring" dir="in">
6267 <desc>
6268 Address of the USB device (as assigned by the host) to
6269 search for.
6270 </desc>
6271 </param>
6272 <param name="device" type="IUSBDevice" dir="return">
6273 <desc>Found USB device object.</desc>
6274 </param>
6275 </method>
6276
6277 <method name="findUSBDeviceById">
6278 <desc>
6279 Searches for a USB device with the given UUID.
6280
6281 <result name="VBOX_E_OBJECT_NOT_FOUND">
6282 Given @c id does not correspond to any USB device.
6283 </result>
6284
6285 <see>IUSBDevice::id</see>
6286 </desc>
6287 <param name="id" type="wstring" dir="in">
6288 <desc>UUID of the USB device to search for.</desc>
6289 </param>
6290 <param name="device" type="IUSBDevice" dir="return">
6291 <desc>Found USB device object.</desc>
6292 </param>
6293 </method>
6294
6295 <method name="createSharedFolder">
6296 <desc>
6297 Creates a transient new shared folder by associating the given logical
6298 name with the given host path, adds it to the collection of shared
6299 folders and starts sharing it. Refer to the description of
6300 <link to="ISharedFolder"/> to read more about logical names.
6301
6302 <result name="VBOX_E_INVALID_VM_STATE">
6303 Virtual machine in Saved state or currently changing state.
6304 </result>
6305 <result name="VBOX_E_FILE_ERROR">
6306 Shared folder already exists or not accessible.
6307 </result>
6308 </desc>
6309 <param name="name" type="wstring" dir="in">
6310 <desc>Unique logical name of the shared folder.</desc>
6311 </param>
6312 <param name="hostPath" type="wstring" dir="in">
6313 <desc>Full path to the shared folder in the host file system.</desc>
6314 </param>
6315 <param name="writable" type="boolean" dir="in">
6316 <desc>Whether the share is writable or readonly</desc>
6317 </param>
6318 </method>
6319
6320 <method name="removeSharedFolder">
6321 <desc>
6322 Removes a transient shared folder with the given name previously
6323 created by <link to="#createSharedFolder"/> from the collection of
6324 shared folders and stops sharing it.
6325 <result name="VBOX_E_INVALID_VM_STATE">
6326 Virtual machine in Saved state or currently changing state.
6327 </result>
6328 <result name="VBOX_E_FILE_ERROR">
6329 Shared folder does not exists.
6330 </result>
6331 </desc>
6332 <param name="name" type="wstring" dir="in">
6333 <desc>Logical name of the shared folder to remove.</desc>
6334 </param>
6335 </method>
6336
6337 <method name="takeSnapshot">
6338 <desc>
6339 Saves the current execution state
6340 and all settings of the machine and creates differencing images
6341 for all normal (non-independent) hard disks.
6342 See <link to="ISnapshot" /> for an introduction to snapshots.
6343
6344 This method can be called for a PoweredOff, Saved (see
6345 <link to="#saveState"/>), Running or
6346 Paused virtual machine. When the machine is PoweredOff, an
6347 offline snapshot is created, an online snapshot otherwise.
6348
6349 The taken snapshot is always based on the
6350 <link to="IMachine::currentSnapshot">current snapshot</link>
6351 of the associated virtual machine and becomes a new current snapshot.
6352
6353 <note>
6354 This method implicitly calls <link to="IMachine::saveSettings"/> to
6355 save all current machine settings before taking an offline snapshot.
6356 </note>
6357
6358 <result name="VBOX_E_INVALID_VM_STATE">
6359 Virtual machine currently changing state.
6360 </result>
6361 </desc>
6362 <param name="name" type="wstring" dir="in">
6363 <desc>Short name for the snapshot.</desc>
6364 </param>
6365 <param name="description" type="wstring" dir="in">
6366 <desc>Optional description of the snapshot.</desc>
6367 </param>
6368 <param name="progress" type="IProgress" dir="return">
6369 <desc>Progress object to track the operation completion.</desc>
6370 </param>
6371 </method>
6372
6373 <method name="discardSnapshot">
6374 <desc>
6375 Starts discarding the specified snapshot asynchronously.
6376 See <link to="ISnapshot" /> for an introduction to snapshots.
6377
6378 The execution state
6379 and settings of the associated machine stored in the snapshot
6380 will be deleted. The contents of all differencing hard disks of
6381 this snapshot will be merged with the contents of their
6382 dependent child hard disks to keep the disks valid (in other
6383 words, all changes represented by hard disks being discarded
6384 will be propagated to their child hard disks). After that, this
6385 snapshot's differencing hard disks will be deleted. The parent
6386 of this snapshot will become a new parent for all its child
6387 snapshots.
6388
6389 If the discarded snapshot is the current one, its parent
6390 snapshot will become a new current snapshot. The current machine
6391 state is not directly affected in this case, except that
6392 currently attached differencing hard disks based on hard disks
6393 of the discarded snapshot will be also merged as described
6394 above.
6395
6396 If the discarded snapshot is the first one (the root snapshot)
6397 and it has exactly one child snapshot, this child snapshot will
6398 become the first snapshot after discarding. If there are no
6399 children at all (i.e. the first snapshot is the only snapshot of
6400 the machine), both the current and the first snapshot of the
6401 machine will be set to @c null. In all other cases, the first
6402 snapshot cannot be discarded.
6403
6404 You cannot discard the snapshot if it
6405 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6406 hard disks that have differencing hard disks based on them. Snapshots of
6407 such kind can be discarded only when every normal hard disk has either
6408 no children at all or exactly one child. In the former case, the normal
6409 hard disk simply becomes unused (i.e. not attached to any VM). In the
6410 latter case, it receives all the changes stored in the child hard disk,
6411 and then it replaces the child hard disk in the configuration of the
6412 corresponding snapshot or machine.
6413
6414 Also, you cannot discard the snapshot if it stores hard disks
6415 (of any type) having differencing child hard disks that belong
6416 to other machines. Such snapshots can be only discarded after
6417 you discard all snapshots of other machines containing "foreign"
6418 child disks, or detach these "foreign" child disks from machines
6419 they are attached to.
6420
6421 One particular example of the snapshot storing normal hard disks
6422 is the first snapshot of a virtual machine that had normal hard
6423 disks attached when taking the snapshot. Be careful when
6424 discarding such snapshots because this implicitly commits
6425 changes (made since the snapshot being discarded has been taken)
6426 to normal hard disks (as described above), which may be not what
6427 you want.
6428
6429 The virtual machine is put to
6430 the <link to="MachineState_Discarding">Discarding</link> state until
6431 the discard operation is completed.
6432
6433 <note>
6434 The machine must not be running, otherwise the operation
6435 will fail.
6436 </note>
6437
6438 <note>
6439 Child hard disks of all normal hard disks of the discarded snapshot
6440 must be accessible (see <link to="IMedium::state"/>) for this
6441 operation to succeed. In particular, this means that all virtual
6442 machines, whose hard disks are directly or indirectly based on the
6443 hard disks of discarded snapshot, must be powered off.
6444 </note>
6445 <note>
6446 Merging hard disk contents can be very time and disk space
6447 consuming, if these disks are big in size and have many
6448 children. However, if the snapshot being discarded is the last
6449 (head) snapshot on the branch, the operation will be rather
6450 quick.
6451 </note>
6452 <note>
6453 Note that discarding the current snapshot
6454 will implicitly call <link to="IMachine::saveSettings"/> to
6455 make all current machine settings permanent.
6456 </note>
6457 <result name="VBOX_E_INVALID_VM_STATE">
6458 Virtual machine is running.
6459 </result>
6460 </desc>
6461 <param name="id" type="wstring" dir="in">
6462 <desc>UUID of the snapshot to discard.</desc>
6463 </param>
6464 <param name="progress" type="IProgress" dir="return">
6465 <desc>Progress object to track the operation completion.</desc>
6466 </param>
6467 </method>
6468
6469 <method name="discardCurrentState">
6470 <desc>
6471 Starts resetting the machine's current state to the state contained
6472 in the current snapshot, asynchronously. All current settings of the
6473 machine will be reset and changes stored in differencing hard disks
6474 will be lost.
6475 See <link to="ISnapshot" /> for an introduction to snapshots.
6476
6477 After this operation is successfully completed, new empty differencing
6478 hard disks are created for all normal hard disks of the machine.
6479
6480 If the current snapshot of the machine is an online snapshot, the
6481 machine will go to the <link to="MachineState_Saved"> saved
6482 state</link>, so that the next time it is powered on, the execution
6483 state will be restored from the current snapshot.
6484
6485 <note>
6486 The machine must not be running, otherwise the operation will fail.
6487 </note>
6488
6489 <note>
6490 If the machine state is <link to="MachineState_Saved">Saved</link>
6491 prior to this operation, the saved state file will be implicitly
6492 discarded (as if <link to="IConsole::forgetSavedState"/> were
6493 called).
6494 </note>
6495
6496 <result name="VBOX_E_INVALID_VM_STATE">
6497 Virtual machine is running.
6498 </result>
6499 </desc>
6500 <param name="progress" type="IProgress" dir="return">
6501 <desc>Progress object to track the operation completion.</desc>
6502 </param>
6503 </method>
6504
6505 <method name="discardCurrentSnapshotAndState">
6506 <desc>
6507
6508 This method is equivalent to
6509 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6510 (currentSnapshot.id(), progress) followed by
6511 <link to="IConsole::discardCurrentState"/>.
6512
6513 As a result, the machine will be fully restored from the
6514 snapshot preceding the current snapshot, while both the current
6515 snapshot and the current machine state will be discarded.
6516
6517 If the current snapshot is the first snapshot of the machine (i.e. it
6518 has the only snapshot), the current machine state will be
6519 discarded <b>before</b> discarding the snapshot. In other words, the
6520 machine will be restored from its last snapshot, before discarding
6521 it. This differs from performing a single
6522 <link to="IConsole::discardSnapshot"/> call (note that no
6523 <link to="IConsole::discardCurrentState"/> will be possible after it)
6524 to the effect that the latter will preserve the current state instead of
6525 discarding it.
6526
6527 Unless explicitly mentioned otherwise, all remarks and
6528 limitations of the above two methods also apply to this method.
6529
6530 <note>
6531 The machine must not be running, otherwise the operation
6532 will fail.
6533 </note>
6534
6535 <note>
6536 If the machine state is <link to="MachineState_Saved">Saved</link>
6537 prior to this operation, the saved state file will be implicitly
6538 discarded (as if <link to="#forgetSavedState"/> were
6539 called).
6540 </note>
6541
6542 <note>
6543 This method is more efficient than calling both of the above
6544 methods separately: it requires less IPC calls and provides
6545 a single progress object.
6546 </note>
6547
6548 <result name="VBOX_E_INVALID_VM_STATE">
6549 Virtual machine is running.
6550 </result>
6551 </desc>
6552 <param name="progress" type="IProgress" dir="return">
6553 <desc>Progress object to track the operation completion.</desc>
6554 </param>
6555 </method>
6556
6557 <method name="registerCallback">
6558 <desc>
6559 Registers a new console callback on this instance. The methods of the
6560 callback interface will be called by this instance when the appropriate
6561 event occurs.
6562 </desc>
6563 <param name="callback" type="IConsoleCallback" dir="in"/>
6564 </method>
6565
6566 <method name="unregisterCallback">
6567 <desc>
6568 Unregisters the console callback previously registered using
6569 <link to="#registerCallback"/>.
6570 <result name="E_INVALIDARG">
6571 Given @a callback handler is not registered.
6572 </result>
6573 </desc>
6574 <param name="callback" type="IConsoleCallback" dir="in"/>
6575 </method>
6576 </interface>
6577
6578 <!--
6579 // IHost
6580 /////////////////////////////////////////////////////////////////////////
6581 -->
6582
6583 <interface
6584 name="IHostDVDDrive" extends="$unknown"
6585 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6586 wsmap="managed"
6587 >
6588 <desc>
6589 The IHostDVDDrive interface represents the physical CD/DVD drive
6590 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6591 </desc>
6592
6593 <attribute name="name" type="wstring" readonly="yes">
6594 <desc>
6595 Returns the platform-specific device identifier.
6596 On DOS-like platforms, it is a drive name (e.g. R:).
6597 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6598 </desc>
6599 </attribute>
6600 <attribute name="description" type="wstring" readonly="yes">
6601 <desc>
6602 Returns a human readable description for the drive. This
6603 description usually contains the product and vendor name. An
6604 empty string is returned if the description is not available.
6605 </desc>
6606 </attribute>
6607 <attribute name="udi" type="wstring" readonly="yes">
6608 <desc>
6609 Returns the unique device identifier for the drive. This
6610 attribute is reserved for future use instead of
6611 <link to="#name"/>. Currently it is not used and may return
6612 an empty string on some platforms.
6613 </desc>
6614 </attribute>
6615
6616 </interface>
6617
6618 <interface
6619 name="IHostFloppyDrive" extends="$unknown"
6620 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6621 wsmap="managed"
6622 >
6623 <desc>
6624 The IHostFloppyDrive interface represents the physical floppy drive
6625 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6626 </desc>
6627 <attribute name="name" type="wstring" readonly="yes">
6628 <desc>
6629 Returns the platform-specific device identifier.
6630 On DOS-like platforms, it is a drive name (e.g. A:).
6631 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6632 </desc>
6633 </attribute>
6634 <attribute name="description" type="wstring" readonly="yes">
6635 <desc>
6636 Returns a human readable description for the drive. This
6637 description usually contains the product and vendor name. An
6638 empty string is returned if the description is not available.
6639 </desc>
6640 </attribute>
6641 <attribute name="udi" type="wstring" readonly="yes">
6642 <desc>
6643 Returns the unique device identifier for the drive. This
6644 attribute is reserved for future use instead of
6645 <link to="#name"/>. Currently it is not used and may return
6646 an empty string on some platforms.
6647 </desc>
6648 </attribute>
6649 </interface>
6650
6651 <enum
6652 name="HostNetworkInterfaceMediumType"
6653 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6654 >
6655 <desc>
6656 Type of encapsulation. Ethernet encapsulation includes both wired and
6657 wireless Ethernet connections.
6658 <see>IHostNetworkInterface</see>
6659 </desc>
6660
6661 <const name="Unknown" value="0">
6662 <desc>
6663 The type of interface cannot be determined.
6664 </desc>
6665 </const>
6666 <const name="Ethernet" value="1">
6667 <desc>
6668 Ethernet frame encapsulation.
6669 </desc>
6670 </const>
6671 <const name="PPP" value="2">
6672 <desc>
6673 Point-to-point protocol encapsulation.
6674 </desc>
6675 </const>
6676 <const name="SLIP" value="3">
6677 <desc>
6678 Serial line IP encapsulation.
6679 </desc>
6680 </const>
6681 </enum>
6682
6683 <enum
6684 name="HostNetworkInterfaceStatus"
6685 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6686 >
6687 <desc>
6688 Current status of the interface.
6689 <see>IHostNetworkInterface</see>
6690 </desc>
6691
6692 <const name="Unknown" value="0">
6693 <desc>
6694 The state of interface cannot be determined.
6695 </desc>
6696 </const>
6697 <const name="Up" value="1">
6698 <desc>
6699 The interface is fully operational.
6700 </desc>
6701 </const>
6702 <const name="Down" value="2">
6703 <desc>
6704 The interface is not functioning.
6705 </desc>
6706 </const>
6707 </enum>
6708
6709 <enum
6710 name="HostNetworkInterfaceType"
6711 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6712 >
6713 <desc>
6714 Network interface type.
6715 </desc>
6716 <const name="Bridged" value="1"/>
6717 <const name="HostOnly" value="2"/>
6718 </enum>
6719
6720 <interface
6721 name="IHostNetworkInterface" extends="$unknown"
6722 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6723 wsmap="managed"
6724 >
6725 <desc>
6726 Represents one of host's network interfaces. IP V6 address and network
6727 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6728 separated by colons.
6729 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6730 </desc>
6731 <attribute name="name" type="wstring" readonly="yes">
6732 <desc>Returns the host network interface name.</desc>
6733 </attribute>
6734
6735 <attribute name="id" type="wstring" readonly="yes">
6736 <desc>Returns the interface UUID.</desc>
6737 </attribute>
6738
6739 <attribute name="networkName" type="wstring" readonly="yes">
6740 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6741 </attribute>
6742
6743 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6744 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6745 </attribute>
6746
6747 <attribute name="IPAddress" type="wstring" readonly="yes">
6748 <desc>Returns the IP V4 address of the interface.</desc>
6749 </attribute>
6750
6751 <attribute name="networkMask" type="wstring" readonly="yes">
6752 <desc>Returns the network mask of the interface.</desc>
6753 </attribute>
6754
6755 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6756 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6757 </attribute>
6758
6759 <attribute name="IPV6Address" type="wstring" readonly="yes">
6760 <desc>Returns the IP V6 address of the interface.</desc>
6761 </attribute>
6762
6763 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6764 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6765 </attribute>
6766
6767 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6768 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6769 </attribute>
6770
6771 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6772 <desc>Type of protocol encapsulation used.</desc>
6773 </attribute>
6774
6775 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6776 <desc>Status of the interface.</desc>
6777 </attribute>
6778
6779 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6780 <desc>specifies the host interface type.</desc>
6781 </attribute>
6782
6783 <method name="enableStaticIpConfig">
6784 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6785 <param name="IPAddress" type="wstring" dir="in">
6786 <desc>
6787 IP address.
6788 </desc>
6789 </param>
6790 <param name="networkMask" type="wstring" dir="in">
6791 <desc>
6792 network mask.
6793 </desc>
6794 </param>
6795 </method>
6796
6797 <method name="enableStaticIpConfigV6">
6798 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6799 <param name="IPV6Address" type="wstring" dir="in">
6800 <desc>
6801 IP address.
6802 </desc>
6803 </param>
6804 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6805 <desc>
6806 network mask.
6807 </desc>
6808 </param>
6809 </method>
6810
6811 <method name="enableDynamicIpConfig">
6812 <desc>enables the dynamic IP configuration.</desc>
6813 </method>
6814
6815 <method name="dhcpRediscover">
6816 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6817 </method>
6818
6819 </interface>
6820
6821 <interface
6822 name="IHost" extends="$unknown"
6823 uuid="4129f721-30cc-4f5a-bbed-0614ce4c2cb4"
6824 wsmap="managed"
6825 >
6826 <desc>
6827 The IHost interface represents the physical machine that this VirtualBox
6828 installation runs on.
6829
6830 An object implementing this interface is returned by the
6831 <link to="IVirtualBox::host" /> attribute. This interface contains
6832 read-only information about the host's physical hardware (such as what
6833 processors and disks are available, what the host operating system is,
6834 and so on) and also allows for manipulating some of the host's hardware,
6835 such as global USB device filters and host interface networking.
6836
6837 </desc>
6838 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6839 <desc>List of DVD drives available on the host.</desc>
6840 </attribute>
6841
6842 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6843 <desc>List of floppy drives available on the host.</desc>
6844 </attribute>
6845
6846 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6847 <desc>
6848 List of USB devices currently attached to the host.
6849 Once a new device is physically attached to the host computer,
6850 it appears in this list and remains there until detached.
6851
6852 <note>
6853 If USB functionality is not available in the given edition of
6854 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6855 </note>
6856 </desc>
6857 </attribute>
6858
6859 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6860 <desc>
6861 List of USB device filters in action.
6862 When a new device is physically attached to the host computer,
6863 filters from this list are applied to it (in order they are stored
6864 in the list). The first matched filter will determine the
6865 <link to="IHostUSBDeviceFilter::action">action</link>
6866 performed on the device.
6867
6868 Unless the device is ignored by these filters, filters of all
6869 currently running virtual machines
6870 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6871
6872 <note>
6873 If USB functionality is not available in the given edition of
6874 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6875 </note>
6876
6877 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6878 </desc>
6879 </attribute>
6880
6881 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6882 <desc>List of host network interfaces currently defined on the host.</desc>
6883 </attribute>
6884
6885 <attribute name="processorCount" type="unsigned long" readonly="yes">
6886 <desc>Number of (logical) CPUs installed in the host system.</desc>
6887 </attribute>
6888
6889 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6890 <desc>Number of (logical) CPUs online in the host system.</desc>
6891 </attribute>
6892
6893 <method name="getProcessorSpeed">
6894 <desc>Query the (approximate) maximum speed of a specified host CPU in
6895 Megahertz.
6896 </desc>
6897 <param name="cpuId" type="unsigned long" dir="in">
6898 <desc>
6899 Identifier of the CPU.
6900 </desc>
6901 </param>
6902 <param name="speed" type="unsigned long" dir="return">
6903 <desc>
6904 Speed value. 0 is returned if value is not known or @a cpuId is
6905 invalid.
6906 </desc>
6907 </param>
6908 </method>
6909
6910 <method name="getProcessorFeature">
6911 <desc>Query whether a CPU feature is supported or not.</desc>
6912 <param name="feature" type="ProcessorFeature" dir="in">
6913 <desc>
6914 CPU Feature identifier.
6915 </desc>
6916 </param>
6917 <param name="supported" type="boolean" dir="return">
6918 <desc>
6919 Feature is supported or not.
6920 </desc>
6921 </param>
6922 </method>
6923
6924 <method name="getProcessorDescription">
6925 <desc>Query the model string of a specified host CPU.
6926 </desc>
6927 <param name="cpuId" type="unsigned long" dir="in">
6928 <desc>
6929 Identifier of the CPU.
6930 </desc>
6931 </param>
6932 <param name="description" type="wstring" dir="return">
6933 <desc>
6934 Model string. An empty string is returned if value is not known or
6935 @a cpuId is invalid.
6936 </desc>
6937 </param>
6938 </method>
6939
6940 <attribute name="memorySize" type="unsigned long" readonly="yes">
6941 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6942 </attribute>
6943
6944 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6945 <desc>Available system memory in the host system.</desc>
6946 </attribute>
6947
6948 <attribute name="operatingSystem" type="wstring" readonly="yes">
6949 <desc>Name of the host system's operating system.</desc>
6950 </attribute>
6951
6952 <attribute name="OSVersion" type="wstring" readonly="yes">
6953 <desc>Host operating system's version string.</desc>
6954 </attribute>
6955
6956 <attribute name="UTCTime" type="long long" readonly="yes">
6957 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6958 </attribute>
6959
6960 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
6961 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
6962 </attribute>
6963
6964 <method name="createHostOnlyNetworkInterface">
6965 <desc>
6966 Creates a new adapter for Host Only Networking.
6967 <result name="E_INVALIDARG">
6968 Host network interface @a name already exists.
6969 </result>
6970 </desc>
6971 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6972 <desc>
6973 Created host interface object.
6974 </desc>
6975 </param>
6976 <param name="progress" type="IProgress" dir="return">
6977 <desc>
6978 Progress object to track the operation completion.
6979 </desc>
6980 </param>
6981 </method>
6982
6983 <method name="removeHostOnlyNetworkInterface">
6984 <desc>
6985 Removes the given Host Only Networking interface.
6986 <result name="VBOX_E_OBJECT_NOT_FOUND">
6987 No host network interface matching @a id found.
6988 </result>
6989 </desc>
6990 <param name="id" type="wstring" dir="in">
6991 <desc>
6992 Adapter GUID.
6993 </desc>
6994 </param>
6995 <param name="progress" type="IProgress" dir="return">
6996 <desc>
6997 Progress object to track the operation completion.
6998 </desc>
6999 </param>
7000 </method>
7001
7002 <method name="createUSBDeviceFilter">
7003 <desc>
7004 Creates a new USB device filter. All attributes except
7005 the filter name are set to empty (any match),
7006 <i>active</i> is @c false (the filter is not active).
7007
7008 The created filter can be added to the list of filters using
7009 <link to="#insertUSBDeviceFilter"/>.
7010
7011 <see>#USBDeviceFilters</see>
7012 </desc>
7013 <param name="name" type="wstring" dir="in">
7014 <desc>
7015 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7016 for more info.
7017 </desc>
7018 </param>
7019 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7020 <desc>Created filter object.</desc>
7021 </param>
7022 </method>
7023
7024 <method name="insertUSBDeviceFilter">
7025 <desc>
7026 Inserts the given USB device to the specified position
7027 in the list of filters.
7028
7029 Positions are numbered starting from @c 0. If the specified
7030 position is equal to or greater than the number of elements in
7031 the list, the filter is added at the end of the collection.
7032
7033 <note>
7034 Duplicates are not allowed, so an attempt to insert a
7035 filter already in the list is an error.
7036 </note>
7037 <note>
7038 If USB functionality is not available in the given edition of
7039 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7040 </note>
7041
7042 <see>#USBDeviceFilters</see>
7043
7044 <result name="VBOX_E_INVALID_OBJECT_STATE">
7045 USB device filter is not created within this VirtualBox instance.
7046 </result>
7047 <result name="E_INVALIDARG">
7048 USB device filter already in list.
7049 </result>
7050
7051 </desc>
7052 <param name="position" type="unsigned long" dir="in">
7053 <desc>Position to insert the filter to.</desc>
7054 </param>
7055 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7056 <desc>USB device filter to insert.</desc>
7057 </param>
7058 </method>
7059
7060 <method name="removeUSBDeviceFilter">
7061 <desc>
7062 Removes a USB device filter from the specified position in the
7063 list of filters.
7064
7065 Positions are numbered starting from @c 0. Specifying a
7066 position equal to or greater than the number of elements in
7067 the list will produce an error.
7068
7069 <note>
7070 If USB functionality is not available in the given edition of
7071 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7072 </note>
7073
7074 <see>#USBDeviceFilters</see>
7075
7076 <result name="E_INVALIDARG">
7077 USB device filter list empty or invalid @a position.
7078 </result>
7079
7080 </desc>
7081 <param name="position" type="unsigned long" dir="in">
7082 <desc>Position to remove the filter from.</desc>
7083 </param>
7084 </method>
7085
7086 <method name="findHostDVDDrive">
7087 <desc>
7088 Searches for a host DVD drive with the given @c name.
7089
7090 <result name="VBOX_E_OBJECT_NOT_FOUND">
7091 Given @c name does not correspond to any host drive.
7092 </result>
7093
7094 </desc>
7095 <param name="name" type="wstring" dir="in">
7096 <desc>Name of the host drive to search for</desc>
7097 </param>
7098 <param name="drive" type="IHostDVDDrive" dir="return">
7099 <desc>Found host drive object</desc>
7100 </param>
7101 </method>
7102
7103 <method name="findHostFloppyDrive">
7104 <desc>
7105 Searches for a host floppy drive with the given @c name.
7106
7107 <result name="VBOX_E_OBJECT_NOT_FOUND">
7108 Given @c name does not correspond to any host floppy drive.
7109 </result>
7110
7111 </desc>
7112 <param name="name" type="wstring" dir="in">
7113 <desc>Name of the host floppy drive to search for</desc>
7114 </param>
7115 <param name="drive" type="IHostFloppyDrive" dir="return">
7116 <desc>Found host floppy drive object</desc>
7117 </param>
7118 </method>
7119
7120 <method name="findHostNetworkInterfaceByName">
7121 <desc>
7122 Searches through all host network interfaces for an interface with
7123 the given @c name.
7124 <note>
7125 The method returns an error if the given @c name does not
7126 correspond to any host network interface.
7127 </note>
7128 </desc>
7129 <param name="name" type="wstring" dir="in">
7130 <desc>Name of the host network interface to search for.</desc>
7131 </param>
7132 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7133 <desc>Found host network interface object.</desc>
7134 </param>
7135 </method>
7136 <method name="findHostNetworkInterfaceById">
7137 <desc>
7138 Searches through all host network interfaces for an interface with
7139 the given GUID.
7140 <note>
7141 The method returns an error if the given GUID does not
7142 correspond to any host network interface.
7143 </note>
7144 </desc>
7145 <param name="id" type="wstring" dir="in">
7146 <desc>GUID of the host network interface to search for.</desc>
7147 </param>
7148 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7149 <desc>Found host network interface object.</desc>
7150 </param>
7151 </method>
7152 <method name="findHostNetworkInterfacesOfType">
7153 <desc>
7154 Searches through all host network interfaces and returns a list of interfaces of the specified type
7155 </desc>
7156 <param name="type" type="HostNetworkInterfaceType" dir="in">
7157 <desc>type of the host network interfaces to search for.</desc>
7158 </param>
7159 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7160 <desc>Found host network interface objects.</desc>
7161 </param>
7162 </method>
7163
7164 <method name="findUSBDeviceById">
7165 <desc>
7166 Searches for a USB device with the given UUID.
7167
7168 <result name="VBOX_E_OBJECT_NOT_FOUND">
7169 Given @c id does not correspond to any USB device.
7170 </result>
7171
7172 <see>IHostUSBDevice::id</see>
7173 </desc>
7174 <param name="id" type="wstring" dir="in">
7175 <desc>UUID of the USB device to search for.</desc>
7176 </param>
7177 <param name="device" type="IHostUSBDevice" dir="return">
7178 <desc>Found USB device object.</desc>
7179 </param>
7180 </method>
7181
7182 <method name="findUSBDeviceByAddress">
7183 <desc>
7184 Searches for a USB device with the given host address.
7185
7186 <result name="VBOX_E_OBJECT_NOT_FOUND">
7187 Given @c name does not correspond to any USB device.
7188 </result>
7189
7190 <see>IHostUSBDevice::address</see>
7191 </desc>
7192 <param name="name" type="wstring" dir="in">
7193 <desc>
7194 Address of the USB device (as assigned by the host) to
7195 search for.
7196 </desc>
7197 </param>
7198 <param name="device" type="IHostUSBDevice" dir="return">
7199 <desc>Found USB device object.</desc>
7200 </param>
7201 </method>
7202
7203 </interface>
7204
7205 <!--
7206 // ISystemProperties
7207 /////////////////////////////////////////////////////////////////////////
7208 -->
7209
7210 <interface
7211 name="ISystemProperties"
7212 extends="$unknown"
7213 uuid="9ca0f712-83f3-4631-b143-b75ef6568332"
7214 wsmap="managed"
7215 >
7216 <desc>
7217 The ISystemProperties interface represents global properties of the given
7218 VirtualBox installation.
7219
7220 These properties define limits and default values for various attributes
7221 and parameters. Most of the properties are read-only, but some can be
7222 changed by a user.
7223 </desc>
7224
7225 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7226 <desc>Minimum guest system memory in Megabytes.</desc>
7227 </attribute>
7228
7229 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7230 <desc>Maximum guest system memory in Megabytes.</desc>
7231 </attribute>
7232
7233 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7234 <desc>Minimum guest video memory in Megabytes.</desc>
7235 </attribute>
7236
7237 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7238 <desc>Maximum guest video memory in Megabytes.</desc>
7239 </attribute>
7240
7241 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7242 <desc>Minimum CPU count.</desc>
7243 </attribute>
7244
7245 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7246 <desc>Maximum CPU count.</desc>
7247 </attribute>
7248
7249 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7250 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7251 </attribute>
7252
7253 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7254 <desc>
7255 Number of network adapters associated with every
7256 <link to="IMachine"/> instance.
7257 </desc>
7258 </attribute>
7259
7260 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7261 <desc>
7262 Number of serial ports associated with every
7263 <link to="IMachine"/> instance.
7264 </desc>
7265 </attribute>
7266
7267 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7268 <desc>
7269 Number of parallel ports associated with every
7270 <link to="IMachine"/> instance.
7271 </desc>
7272 </attribute>
7273
7274 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7275 <desc>
7276 Maximum device position in the boot order. This value corresponds
7277 to the total number of devices a machine can boot from, to make it
7278 possible to include all possible devices to the boot list.
7279 <see><link to="IMachine::setBootOrder"/></see>
7280 </desc>
7281 </attribute>
7282
7283 <attribute name="defaultMachineFolder" type="wstring">
7284 <desc>
7285 Full path to the default directory used to create new or open
7286 existing machines when a settings file name contains no
7287 path.
7288
7289 The initial value of this property is
7290 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7291 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7292
7293 <note>
7294 Setting this property to @c null or an empty string will restore the
7295 initial value.
7296 </note>
7297 <note>
7298 When settings this property, the specified path can be
7299 absolute (full path) or relative
7300 to the <link to="IVirtualBox::homeFolder">
7301 VirtualBox home directory</link>.
7302 When reading this property, a full path is
7303 always returned.
7304 </note>
7305 <note>
7306 The specified path may not exist, it will be created
7307 when necessary.
7308 </note>
7309
7310 <see>
7311 <link to="IVirtualBox::createMachine"/>,
7312 <link to="IVirtualBox::openMachine"/>
7313 </see>
7314 </desc>
7315 </attribute>
7316
7317 <attribute name="defaultHardDiskFolder" type="wstring">
7318 <desc>
7319 Full path to the default directory used to create new or open existing
7320 virtual disks.
7321
7322 This path is used when the storage unit of a hard disk is a regular file
7323 in the host's file system and only a file name that contains no path is
7324 given.
7325
7326 The initial value of this property is
7327 <tt>&lt;</tt>
7328 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7329 <tt>&gt;/HardDisks</tt>.
7330
7331 <note>
7332 Setting this property to @c null or empty string will restore the
7333 initial value.
7334 </note>
7335 <note>
7336 When settings this property, the specified path can be relative
7337 to the
7338 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7339 absolute. When reading this property, a full path is
7340 always returned.
7341 </note>
7342 <note>
7343 The specified path may not exist, it will be created
7344 when necessary.
7345 </note>
7346
7347 <see>
7348 IHardDisk,
7349 <link to="IVirtualBox::createHardDisk"/>,
7350 <link to="IVirtualBox::openHardDisk"/>,
7351 <link to="IMedium::location"/>
7352 </see>
7353 </desc>
7354 </attribute>
7355
7356 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7357 <desc>
7358 List of all hard disk storage formats supported by this VirtualBox
7359 installation.
7360
7361 Keep in mind that the hard disk format identifier
7362 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7363 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7364 hard disk format is a case-insensitive string. This means that, for
7365 example, all of the following strings:
7366 <pre>
7367 "VDI"
7368 "vdi"
7369 "VdI"</pre>
7370 refer to the same hard disk format.
7371
7372 Note that the virtual hard disk framework is backend-based, therefore
7373 the list of supported formats depends on what backends are currently
7374 installed.
7375
7376 <see>
7377 <link to="IHardDiskFormat"/>,
7378 </see>
7379 </desc>
7380 </attribute>
7381
7382 <attribute name="defaultHardDiskFormat" type="wstring">
7383 <desc>
7384 Identifier of the default hard disk format used by VirtualBox.
7385
7386 The hard disk format set by this attribute is used by VirtualBox
7387 when the hard disk format was not specified explicitly. One example is
7388 <link to="IVirtualBox::createHardDisk"/> with the empty
7389 format argument. A more complex example is implicit creation of
7390 differencing hard disks when taking a snapshot of a virtual machine:
7391 this operation will try to use a format of the parent hard disk first
7392 and if this format does not support differencing hard disks the default
7393 format specified by this argument will be used.
7394
7395 The list of supported hard disk formats may be obtained by the
7396 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7397 format must have a capability to create differencing hard disks;
7398 otherwise opeartions that create hard disks implicitly may fail
7399 unexpectedly.
7400
7401 The initial value of this property is <tt>"VDI"</tt> in the current
7402 version of the VirtualBox product, but may change in the future.
7403
7404 <note>
7405 Setting this property to @c null or empty string will restore the
7406 initial value.
7407 </note>
7408
7409 <see>
7410 <link to="#hardDiskFormats"/>,
7411 <link to="IHardDiskFormat::id"/>,
7412 <link to="IVirtualBox::createHardDisk"/>
7413 </see>
7414 </desc>
7415 </attribute>
7416
7417 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7418 <desc>
7419 Library that provides authentication for VRDP clients. The library
7420 is used if a virtual machine's authentication type is set to "external"
7421 in the VM RemoteDisplay configuration.
7422
7423 The system library extension (".DLL" or ".so") must be omitted.
7424 A full path can be specified; if not, then the library must reside on the
7425 system's default library path.
7426
7427 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7428 of that name in one of the default VirtualBox library directories.
7429
7430 For details about VirtualBox authentication libraries and how to implement
7431 them, please refer to the VirtualBox manual.
7432
7433 <note>
7434 Setting this property to @c null or empty string will restore the
7435 initial value.
7436 </note>
7437 </desc>
7438 </attribute>
7439
7440 <attribute name="webServiceAuthLibrary" type="wstring">
7441 <desc>
7442 Library that provides authentication for webservice clients. The library
7443 is used if a virtual machine's authentication type is set to "external"
7444 in the VM RemoteDisplay configuration and will be called from
7445 within the <link to="IWebsessionManager::logon" /> implementation.
7446
7447 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7448 there is no per-VM setting for this, as the webservice is a global
7449 resource (if it is running). Only for this setting (for the webservice),
7450 setting this value to a literal <tt>"null"</tt> string disables authentication,
7451 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7452 no matter what user name and password are supplied.
7453
7454 The initial value of this property is <tt>"VRDPAuth"</tt>,
7455 meaning that the webservice will use the same authentication
7456 library that is used by default for VBoxVRDP (again, see
7457 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7458 The format and calling convention of authentication libraries
7459 is the same for the webservice as it is for VBoxVRDP.
7460
7461 <note>
7462 Setting this property to @c null or empty string will restore the
7463 initial value.
7464 </note>
7465 </desc>
7466 </attribute>
7467
7468 <attribute name="LogHistoryCount" type="unsigned long">
7469 <desc>
7470 This value specifies how many old release log files are kept.
7471 </desc>
7472 </attribute>
7473
7474 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7475 <desc>This value hold the default audio driver for the current
7476 system.</desc>
7477 </attribute>
7478 </interface>
7479
7480 <!--
7481 // IGuest
7482 /////////////////////////////////////////////////////////////////////////
7483 -->
7484
7485 <interface
7486 name="IGuestOSType" extends="$unknown"
7487 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7488 wsmap="struct"
7489 >
7490 <desc>
7491 </desc>
7492
7493 <attribute name="familyId" type="wstring" readonly="yes">
7494 <desc>Guest OS family identifier string.</desc>
7495 </attribute>
7496
7497 <attribute name="familyDescription" type="wstring" readonly="yes">
7498 <desc>Human readable description of the guest OS family.</desc>
7499 </attribute>
7500
7501 <attribute name="id" type="wstring" readonly="yes">
7502 <desc>Guest OS identifier string.</desc>
7503 </attribute>
7504
7505 <attribute name="description" type="wstring" readonly="yes">
7506 <desc>Human readable description of the guest OS.</desc>
7507 </attribute>
7508
7509 <attribute name="is64Bit" type="boolean" readonly="yes">
7510 <desc>Returns @c true if the given OS is 64-bit</desc>
7511 </attribute>
7512
7513 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7514 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7515 </attribute>
7516
7517 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7518 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7519 </attribute>
7520
7521 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7522 <desc>Recommended RAM size in Megabytes.</desc>
7523 </attribute>
7524
7525 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7526 <desc>Recommended video RAM size in Megabytes.</desc>
7527 </attribute>
7528
7529 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7530 <desc>Recommended hard disk size in Megabytes.</desc>
7531 </attribute>
7532
7533 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7534 <desc>Returns recommended network adapter for this OS type.</desc>
7535 </attribute>
7536 </interface>
7537
7538 <interface
7539 name="IGuest" extends="$unknown"
7540 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7541 wsmap="managed"
7542 >
7543 <desc>
7544 The IGuest interface represents information about the operating system
7545 running inside the virtual machine. Used in
7546 <link to="IConsole::guest"/>.
7547
7548 IGuest provides information about the guest operating system, whether
7549 Guest Additions are installed and other OS-specific virtual machine
7550 properties.
7551 </desc>
7552
7553 <attribute name="OSTypeId" type="wstring" readonly="yes">
7554 <desc>
7555 Identifier of the Guest OS type as reported by the Guest
7556 Additions.
7557 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7558 an IGuestOSType object representing details about the given
7559 Guest OS type.
7560 <note>
7561 If Guest Additions are not installed, this value will be
7562 the same as <link to="IMachine::OSTypeId"/>.
7563 </note>
7564 </desc>
7565 </attribute>
7566
7567 <attribute name="additionsActive" type="boolean" readonly="yes">
7568 <desc>
7569 Flag whether the Guest Additions are installed and active
7570 in which case their version will be returned by the
7571 <link to="#additionsVersion"/> property.
7572 </desc>
7573 </attribute>
7574
7575 <attribute name="additionsVersion" type="wstring" readonly="yes">
7576 <desc>
7577 Version of the Guest Additions (3 decimal numbers separated
7578 by dots) or empty when the Additions are not installed. The
7579 Additions may also report a version but yet not be active as
7580 the version might be refused by VirtualBox (incompatible) or
7581 other failures occurred.
7582 </desc>
7583 </attribute>
7584
7585 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7586 <desc>
7587 Flag whether seamless guest display rendering (seamless desktop
7588 integration) is supported.
7589 </desc>
7590 </attribute>
7591
7592 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7593 <desc>
7594 Flag whether the guest is in graphics mode. If it is not, then
7595 seamless rendering will not work, resize hints are not immediately
7596 acted on and guest display resizes are probably not initiated by
7597 the guest additions.
7598 </desc>
7599 </attribute>
7600
7601 <attribute name="memoryBalloonSize" type="unsigned long">
7602 <desc>Guest system memory balloon size in megabytes.</desc>
7603 </attribute>
7604
7605 <attribute name="statisticsUpdateInterval" type="unsigned long">
7606 <desc>Interval to update guest statistics in seconds.</desc>
7607 </attribute>
7608
7609 <method name="setCredentials">
7610 <desc>
7611 Store login credentials that can be queried by guest operating
7612 systems with Additions installed. The credentials are transient
7613 to the session and the guest may also choose to erase them. Note
7614 that the caller cannot determine whether the guest operating system
7615 has queried or made use of the credentials.
7616
7617 <result name="VBOX_E_VM_ERROR">
7618 VMM device is not available.
7619 </result>
7620
7621 </desc>
7622 <param name="userName" type="wstring" dir="in">
7623 <desc>User name string, can be empty</desc>
7624 </param>
7625 <param name="password" type="wstring" dir="in">
7626 <desc>Password string, can be empty</desc>
7627 </param>
7628 <param name="domain" type="wstring" dir="in">
7629 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7630 </param>
7631 <param name="allowInteractiveLogon" type="boolean" dir="in">
7632 <desc>
7633 Flag whether the guest should alternatively allow the user to
7634 interactively specify different credentials. This flag might
7635 not be supported by all versions of the Additions.
7636 </desc>
7637 </param>
7638 </method>
7639
7640 <method name="getStatistic">
7641 <desc>
7642 Query specified guest statistics as reported by the VirtualBox Additions.
7643 </desc>
7644 <param name="cpuId" type="unsigned long" dir="in">
7645 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7646 </param>
7647 <param name="statistic" type="GuestStatisticType" dir="in">
7648 <desc>Statistic type.</desc>
7649 </param>
7650 <param name="statVal" type="unsigned long" dir="return">
7651 <desc>Statistics value</desc>
7652 </param>
7653 </method>
7654
7655 </interface>
7656
7657
7658 <!--
7659 // IProgress
7660 /////////////////////////////////////////////////////////////////////////
7661 -->
7662
7663 <interface
7664 name="IProgress" extends="$unknown"
7665 uuid="6fcd0198-7fc5-4c53-8c37-653ac76854b5"
7666 wsmap="managed"
7667 >
7668 <desc>
7669 The IProgress interface is used to track and control
7670 asynchronous tasks within VirtualBox.
7671
7672 An instance of this is returned every time VirtualBox starts
7673 an asynchronous task (in other words, a separate thread) which
7674 continues to run after a method call returns. For example,
7675 <link to="IConsole::saveState" />, which saves the state of
7676 a running virtual machine, can take a long time to complete.
7677 To be able to display a progress bar, a user interface such as
7678 the VirtualBox graphical user interface can use the IProgress
7679 object returned by that method.
7680
7681 Note that IProgress is a "read-only" interface in the sense
7682 that only the VirtualBox internals behind the Main API can
7683 create and manipulate progress objects, whereas client code
7684 can only use the IProgress object to monitor a task's
7685 progress and, if <link to="#cancelable" /> is @c true,
7686 cancel the task by calling <link to="#cancel" />.
7687
7688 A task represented by IProgress consists of either one or
7689 several sub-operations that run sequentially, one by one (see
7690 <link to="#operation" /> and <link to="#operationCount" />).
7691 Every operation is identified by a number (starting from 0)
7692 and has a separate description.
7693
7694 You can find the individual percentage of completion of the current
7695 operation in <link to="#operationPercent" /> and the
7696 percentage of completion of the task as a whole
7697 in <link to="#percent" />.
7698
7699 Similarly, you can wait for the completion of a particular
7700 operation via <link to="#waitForOperationCompletion" /> or
7701 for the completion of the whole task via
7702 <link to="#waitForCompletion" />.
7703 </desc>
7704
7705 <attribute name="id" type="wstring" readonly="yes">
7706 <desc>ID of the task.</desc>
7707 </attribute>
7708
7709 <attribute name="description" type="wstring" readonly="yes">
7710 <desc>Description of the task.</desc>
7711 </attribute>
7712
7713 <attribute name="initiator" type="$unknown" readonly="yes">
7714 <desc>Initiator of the task.</desc>
7715 </attribute>
7716
7717 <attribute name="cancelable" type="boolean" readonly="yes">
7718 <desc>Whether the task can be interrupted.</desc>
7719 </attribute>
7720
7721 <attribute name="percent" type="unsigned long" readonly="yes">
7722 <desc>
7723 Current progress value of the task as a whole, in percent.
7724 This value depends on how many operations are already complete.
7725 Returns 100 if <link to="#completed" /> is @c true.
7726 </desc>
7727 </attribute>
7728
7729 <attribute name="timeRemaining" type="long" readonly="yes">
7730 <desc>
7731 Estimated remaining time until the task completes, in
7732 seconds. Returns 0 once the task has completed; returns -1
7733 if the remaining time cannot be computed, in particular if
7734 the current progress is 0.
7735
7736 Even if a value is returned, the estimate will be unreliable
7737 for low progress values. It will become more reliable as the
7738 task progresses; it is not recommended to display an ETA
7739 before at least 20% of a task have completed.
7740 </desc>
7741 </attribute>
7742
7743 <attribute name="completed" type="boolean" readonly="yes">
7744 <desc>Whether the task has been completed.</desc>
7745 </attribute>
7746
7747 <attribute name="canceled" type="boolean" readonly="yes">
7748 <desc>Whether the task has been canceled.</desc>
7749 </attribute>
7750
7751 <attribute name="resultCode" type="long" readonly="yes">
7752 <desc>
7753 Result code of the progress task.
7754 Valid only if <link to="#completed"/> is @c true.
7755 </desc>
7756 </attribute>
7757
7758 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7759 <desc>
7760 Extended information about the unsuccessful result of the
7761 progress operation. May be @c null if no extended information
7762 is available.
7763 Valid only if <link to="#completed"/> is @c true and
7764 <link to="#resultCode"/> indicates a failure.
7765 </desc>
7766 </attribute>
7767
7768 <attribute name="operationCount" type="unsigned long" readonly="yes">
7769 <desc>
7770 Number of sub-operations this task is divided into.
7771 Every task consists of at least one suboperation.
7772 </desc>
7773 </attribute>
7774
7775 <attribute name="operation" type="unsigned long" readonly="yes">
7776 <desc>Number of the sub-operation being currently executed.</desc>
7777 </attribute>
7778
7779 <attribute name="operationDescription" type="wstring" readonly="yes">
7780 <desc>
7781 Description of the sub-operation being currently executed.
7782 </desc>
7783 </attribute>
7784
7785 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7786 <desc>Progress value of the current sub-operation only, in percent.</desc>
7787 </attribute>
7788
7789 <method name="waitForCompletion">
7790 <desc>
7791 Waits until the task is done (including all sub-operations)
7792 with a given timeout in milliseconds; specify -1 for an indefinite wait.
7793
7794 <result name="VBOX_E_IPRT_ERROR">
7795 Failed to wait for task completion.
7796 </result>
7797 </desc>
7798
7799 <param name="timeout" type="long" dir="in">
7800 <desc>
7801 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7802 </desc>
7803 </param>
7804 </method>
7805
7806 <method name="waitForOperationCompletion">
7807 <desc>
7808 Waits until the given operation is done with a given timeout in
7809 milliseconds; specify -1 for an indefinite wait.
7810
7811 <result name="VBOX_E_IPRT_ERROR">
7812 Failed to wait for operation completion.
7813 </result>
7814
7815 </desc>
7816 <param name="operation" type="unsigned long" dir="in">
7817 <desc>
7818 Number of the operation to wait for.
7819 Must be less than <link to="#operationCount"/>.
7820 </desc>
7821 </param>
7822 <param name="timeout" type="long" dir="in">
7823 <desc>
7824 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7825 </desc>
7826 </param>
7827 </method>
7828
7829 <method name="cancel">
7830 <desc>
7831 Cancels the task.
7832 <note>
7833 If <link to="#cancelable"/> is @c false, then this method will fail.
7834 </note>
7835
7836 <result name="VBOX_E_INVALID_OBJECT_STATE">
7837 Operation cannot be canceled.
7838 </result>
7839
7840 </desc>
7841 </method>
7842
7843 </interface>
7844
7845
7846 <!--
7847 // ISnapshot
7848 /////////////////////////////////////////////////////////////////////////
7849 -->
7850
7851 <interface
7852 name="ISnapshot" extends="$unknown"
7853 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
7854 wsmap="managed"
7855 >
7856 <desc>
7857 The ISnapshot interface represents a snapshot of the virtual
7858 machine.
7859
7860 Together with the differencing hard disks that are created
7861 when a snapshot is taken, a machine can be brought back to
7862 the exact state it was in when the snapshot was taken.
7863
7864 The ISnapshot interface has no methods, only attributes; snapshots
7865 are controlled through methods of the <link to="IConsole" /> interface
7866 which also manage the hard disk images associated with the snapshot.
7867 The following operations exist:
7868
7869 <ul>
7870 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
7871 by creating new, empty differencing images for the machine's
7872 hard disks and saving the VM settings and (if the VM is running)
7873 the current VM state in the snapshot.
7874
7875 The differencing images will then receive all data written to
7876 the machine's hard disks, while their parent (base) images
7877 remain unmodified after the snapshot has been taken (see
7878 <link to="IHardDisk" /> for details about differencing images).
7879 This simplifies restoring a machine to the state of a snapshot:
7880 only the differencing images need to be deleted.
7881
7882 The current machine state is not changed by taking a snapshot.
7883 If the machine is running, it will resume execution after the
7884 snapshot has been taken.
7885 </li>
7886
7887 <li><link to="IConsole::discardCurrentState"/>: this goes back to
7888 a previous snapshot. This resets the machine's state to that of
7889 the previous snapshot by deleting the differencing image of each
7890 of the machine's hard disks and setting the machine's settings
7891 and state to the state that was saved in the snapshot (if any).
7892
7893 This destroys the machine's current state.
7894 </li>
7895
7896 <li><link to="IConsole::discardSnapshot"/>: deletes a snapshot
7897 without affecting the current machine state.
7898
7899 This does not change the machine, but instead frees the resources
7900 allocated when the snapshot was taken: the settings and machine state
7901 is deleted (if any), and the snapshot's differencing image for each
7902 of the machine's hard disks gets merged with its parent image.
7903
7904 Neither the current machine state nor other snapshots are affected
7905 by this operation, except that parent disk images will be modified
7906 to contain the disk data associated with the snapshot being deleted.
7907 </li>
7908
7909 <li><link to="IConsole::discardCurrentSnapshotAndState"/>:
7910 this completely reverts the virtual machine to the state it was in
7911 before the current snapshot has been taken. Effectively, this goes
7912 back to the state before the current snapshot, which might be
7913 an earlier snapshot.
7914
7915 The current state, as well as the current snapshot, are lost.
7916 </li>
7917 </ul>
7918
7919 Each snapshot contains the settings of the virtual machine (hardware
7920 configuration etc.). In addition, if the machine was running when the
7921 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
7922 the current VM state is saved in the snapshot (similarly to what happens
7923 when a VM's state is saved). The snapshot is then said to
7924 be <i>online</i> because when restoring it, the VM will be running.
7925
7926 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
7927 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
7928
7929 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
7930 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
7931 it then contains a so-called "zero execution state", representing a
7932 machine that is powered off.
7933
7934 <h3>Snapshot branches and the "current" snapshot</h3>
7935
7936 Snapshots can be chained, whereby every next snapshot is based on the
7937 previous one. This chaining is related to hard disk branching
7938 (see the <link to="IHardDisk"/> description) in that every time
7939 a new snapshot is created, a new differencing hard disk is implicitly
7940 created for all normal hard disks attached to the machine.
7941
7942 Each virtual machine has a "current snapshot", identified by
7943 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
7944 to the last snapshot in the chain. In a future version of VirtualBox,
7945 it will be possible to reset a machine's current state to that of an
7946 earlier snapshot without discarding the current state so that it will be
7947 possible to create alternative snapshot paths in a snapshot tree.
7948
7949 In the current implementation, multiple snapshot branches within one
7950 virtual machine are not allowed. Every machine has a single branch,
7951 and <link to="IConsole::takeSnapshot"/> operation adds a new
7952 snapshot to the top of that branch.
7953 </desc>
7954
7955 <attribute name="id" type="wstring" readonly="yes">
7956 <desc>UUID of the snapshot.</desc>
7957 </attribute>
7958
7959 <attribute name="name" type="wstring">
7960 <desc>Short name of the snapshot.</desc>
7961 </attribute>
7962
7963 <attribute name="description" type="wstring">
7964 <desc>Optional description of the snapshot.</desc>
7965 </attribute>
7966
7967 <attribute name="timeStamp" type="long long" readonly="yes">
7968 <desc>
7969 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7970 </desc>
7971 </attribute>
7972
7973 <attribute name="online" type="boolean" readonly="yes">
7974 <desc>
7975 @c true if this snapshot is an online snapshot and @c false otherwise.
7976
7977 When this attribute is @c true, the
7978 <link to="IMachine::stateFilePath"/> attribute of the
7979 <link to="#machine"/> object associated with this snapshot
7980 will point to the saved state file. Otherwise, it will be
7981 an empty string.
7982 </desc>
7983 </attribute>
7984
7985 <attribute name="machine" type="IMachine" readonly="yes">
7986 <desc>
7987 Virtual machine this snapshot is taken on. This object
7988 stores all settings the machine had when taking this snapshot.
7989 <note>
7990 The returned machine object is immutable, i.e. no
7991 any settings can be changed.
7992 </note>
7993 </desc>
7994 </attribute>
7995
7996 <attribute name="parent" type="ISnapshot" readonly="yes">
7997 <desc>
7998 Parent snapshot (a snapshot this one is based on), or
7999 @c null if the snapshot has no parent.
8000 </desc>
8001 </attribute>
8002
8003 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8004 <desc>
8005 Child snapshots (all snapshots having this one as a parent).
8006 <note>
8007 In the current implementation, there can be only one
8008 child snapshot, or no children at all, meaning this is the
8009 last (head) snapshot.
8010 </note>
8011 </desc>
8012 </attribute>
8013
8014 </interface>
8015
8016
8017 <!--
8018 // IMedia
8019 /////////////////////////////////////////////////////////////////////////
8020 -->
8021
8022 <enum
8023 name="MediaState"
8024 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8025 >
8026 <desc>
8027 Virtual media state.
8028 <see>IMedia</see>
8029 </desc>
8030
8031 <const name="NotCreated" value="0">
8032 <desc>
8033 Associated media storage does not exist (either was not created yet or
8034 was deleted).
8035 </desc>
8036 </const>
8037 <const name="Created" value="1">
8038 <desc>
8039 Associated storage exists and accessible.
8040 </desc>
8041 </const>
8042 <const name="LockedRead" value="2">
8043 <desc>
8044 Media is locked for reading, no data modification is possible.
8045 </desc>
8046 </const>
8047 <const name="LockedWrite" value="3">
8048 <desc>
8049 Media is locked for writing, no concurrent data reading or modification
8050 is possible.
8051 </desc>
8052 </const>
8053 <const name="Inaccessible" value="4">
8054 <desc>
8055 Associated media storage is not accessible.
8056 </desc>
8057 </const>
8058 <const name="Creating" value="5">
8059 <desc>
8060 Associated media storage is being created.
8061 </desc>
8062 </const>
8063 <const name="Deleting" value="6">
8064 <desc>
8065 Associated media storage is being deleted.
8066 </desc>
8067 </const>
8068 </enum>
8069
8070 <interface
8071 name="IMedium" extends="$unknown"
8072 uuid="f585787c-7728-40f6-853a-13705426e936"
8073 wsmap="managed"
8074 >
8075 <desc>
8076 The IMedium interface is a common interface for all objects representing
8077 virtual media such as hard disks, CD/DVD images and floppy images.
8078
8079 Each medium is associated with a storage unit (such as a file on the host
8080 computer or a network resource) that holds actual data. The location of
8081 the storage unit is represented by the #location attribute. The value of
8082 this attribute is media type dependent.
8083
8084 The exact media type may be determined by querying the appropriate
8085 interface such as:
8086 <ul>
8087 <li><link to="IHardDisk" /> (virtual hard disks)</li>
8088 <li><link to="IDVDImage" /> (standard CD/DVD ISO image files)</li>
8089 <li><link to="IFloppyImage" /> (raw floppy image files)</li>
8090 </ul>
8091
8092 Existing media are opened using the following methods, depending on the
8093 media type:
8094 <ul>
8095 <li><link to="IVirtualBox::openHardDisk"/></li>
8096 <li><link to="IVirtualBox::openDVDImage"/></li>
8097 <li><link to="IVirtualBox::openFloppyImage"/></li>
8098 </ul>
8099
8100 New hard disk media are created using the
8101 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8102 images are created outside VirtualBox, usually by storing a copy
8103 of the real medium of the corresponding type in a regular file.
8104
8105 <h3>Known Media</h3>
8106
8107 When an existing medium gets opened for the first time, it gets
8108 automatically remembered by the given VirtualBox installation or, in other
8109 words, becomes a <i>known medium</i>. Known media are stored in the media
8110 registry transparently maintained by VirtualBox and stored in settings
8111 files so that this registry is preserved when VirtualBox is not running.
8112
8113 Newly created virtual hard disks get remembered only when the associated
8114 storage unit is actually created (see IHardDisk for more details).
8115
8116 All known media can be enumerated using
8117 <link to="IVirtualBox::hardDisks"/>,
8118 <link to="IVirtualBox::DVDImages"/> and
8119 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8120 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8121 and similar methods or by location using
8122 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8123
8124 Only known media can be attached to virtual machines.
8125
8126 Removing known media from the media registry is performed when the given
8127 medium is closed using the <link to="#close"/> method or when its
8128 associated storage unit is deleted (only for hard disks).
8129
8130 <h3>Accessibility Checks</h3>
8131
8132 The given medium (with the created storage unit) is considered to be
8133 <i>accessible</i> when its storage unit can be read.
8134 Accessible media are indicated by the <link to="MediaState_Created"/>
8135 value of the <link to="#state"/> attribute. When the storage unit cannot
8136 be read (for example, because it is located on a disconnected network
8137 resource, or was accidentally deleted outside VirtualBox), the medium is
8138 considered to be <i>inaccessible</i> which is indicated by the
8139 <link to="MediaState_Inaccessible"/> state. The details about the reason
8140 of being inaccessible can be obtained using the
8141 <link to="#lastAccessError"/> attribute.
8142
8143 A new accessibility check is performed each time the <link to="#state"/>
8144 attribute is read. Please note that this check may take long time (several
8145 seconds or even minutes, depending on the storage unit location and
8146 format), and will block the calling thread until finished. For this
8147 reason, it is recommended to never read this attribute on the main UI
8148 thread to avoid making the UI unresponsive.
8149
8150 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8151 created for the first time), all known media are in the
8152 <link to="MediaState_Inaccessible"/> state but the value of the <link
8153 to="#lastAccessError"/> attribute is an empty string because no actual
8154 accessibility check is made on startup. This is done to make the
8155 VirtualBox object ready for serving requests as
8156 fast as possible and let the end-user application decide if it needs to
8157 check media accessibility right away or not.
8158 </desc>
8159
8160 <attribute name="id" type="wstring" readonly="yes">
8161 <desc>
8162 UUID of the medium. For a newly created medium, this value is a randomly
8163 generated UUID.
8164
8165 <note>
8166 For media in one of MediaState_NotCreated, MediaState_Creating or
8167 MediaState_Deleting states, the value of this property is undefined
8168 and will most likely be an empty UUID.
8169 </note>
8170 </desc>
8171 </attribute>
8172
8173 <attribute name="description" type="wstring">
8174 <desc>
8175 Optional description of the medium. For newly created media, the value
8176 of this attribute value is an empty string.
8177
8178 Media types that don't support this attribute will return E_NOTIMPL in
8179 attempt to get or set this attribute's value.
8180
8181 <note>
8182 For some storage types, reading this attribute may return an outdated
8183 (last known) value when <link to="#state"/> is <link
8184 to="MediaState_Inaccessible"/> or <link
8185 to="MediaState_LockedWrite"/> because the value of this attribute is
8186 stored within the storage unit itself. Also note that changing the
8187 attribute value is not possible in such case, as well as when the
8188 medium is the <link to="MediaState_LockedRead"/> state.
8189 </note>
8190 </desc>
8191 </attribute>
8192
8193 <attribute name="state" type="MediaState" readonly="yes">
8194 <desc>
8195 Current media state. Inspect <link to="MediaState"/> values for details.
8196
8197 Reading this attribute may take a long time because an accessibility
8198 check of the storage unit is performed each time the attribute is read.
8199 This check may cause a significant delay if the storage unit of the
8200 given medium is, for example, a file located on a network share which is
8201 not currently accessible due to connectivity problems -- the call will
8202 not return until a timeout interval defined by the host OS for this
8203 operation expires.
8204
8205 If the last known state of the medium is <link to="MediaState_Created"/>
8206 and the accessibility check fails then the state would be set to
8207 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8208 may be used to get more details about the failure. If the state of the
8209 medium is <link to="MediaState_LockedRead"/> or
8210 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8211 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8212 accessibility check in this case.
8213
8214 Note that not all media states are applicable to all media types.
8215 For example, states <link to="MediaState_NotCreated"/>,
8216 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8217 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8218 IFloppyImage media.
8219 </desc>
8220 </attribute>
8221
8222 <attribute name="location" type="wstring">
8223 <desc>
8224 Location of the storage unit holding media data.
8225
8226 The format of the location string is media type specific. For media
8227 types using regular files in a host's file system, the location
8228 string is the full file name.
8229
8230 Some media types may support changing the storage unit location by
8231 simply changing the value of this property. If this operation is not
8232 supported, the implementation will return E_NOTIMPL in attempt to set
8233 this attribute's value.
8234
8235 When setting a value of the location attribute which is a regular file
8236 in the host's file system, the given file name may be either relative to
8237 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8238 absolute. Note that if the given location specification does not contain
8239 the file extension part then a proper default extension will be
8240 automatically appended by the implementation depending on the media type.
8241 </desc>
8242 </attribute>
8243
8244 <attribute name="name" type="wstring" readonly="yes">
8245 <desc>
8246 Name of the storage unit holding media data.
8247
8248 The returned string is a short version of the <link to="#location"/>
8249 attribute that is suitable for representing the medium in situations
8250 where the full location specification is too long (such as lists
8251 and comboboxes in GUI frontends). This string is also used by frontends
8252 to sort the media list alphabetically when needed.
8253
8254 For example, for locations that are regular files in the host's file
8255 system, the value of this attribute is just the file name (+ extension),
8256 without the path specification.
8257
8258 Note that as opposed to the <link to="#location"/> attribute, the name
8259 attribute will not necessary be unique for a list of media of the
8260 given type and format.
8261 </desc>
8262 </attribute>
8263
8264 <attribute name="size" type="unsigned long long" readonly="yes">
8265 <desc>
8266 Physical size of the storage unit used to hold media data (in bytes).
8267
8268 <note>
8269 For media whose <link to="#state"/> is <link
8270 to="MediaState_Inaccessible"/>, the value of this property is the
8271 last known size. For <link to="MediaState_NotCreated"/> media,
8272 the returned value is zero.
8273 </note>
8274 </desc>
8275 </attribute>
8276
8277 <attribute name="lastAccessError" type="wstring" readonly="yes">
8278 <desc>
8279 Text message that represents the result of the last accessibility
8280 check.
8281
8282 Accessibility checks are performed each time the <link to="#state"/>
8283 attribute is read. An empty string is returned if the last
8284 accessibility check was successful. A non-empty string indicates a
8285 failure and should normally describe a reason of the failure (for
8286 example, a file read error).
8287 </desc>
8288 </attribute>
8289
8290 <attribute name="machineIds" type="wstring" safearray="yes" readonly="yes">
8291 <desc>
8292 Array of UUIDs of all machines this medium is attached to.
8293
8294 A @c null array is returned if this medium is not attached to any
8295 machine or to any machine's snapshot.
8296
8297 <note>
8298 The returned array will include a machine even if this medium is not
8299 attached to that machine in the current state but attached to it in
8300 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8301 details.
8302 </note>
8303 </desc>
8304 </attribute>
8305
8306 <method name="getSnapshotIds">
8307 <desc>
8308 Returns an array of UUIDs of all snapshots of the given machine where
8309 this medium is attached to.
8310
8311 If the medium is attached to the machine in the current state, then the
8312 first element in the array will always be the ID of the queried machine
8313 (i.e. the value equal to the @c machineId argument), followed by
8314 snapshot IDs (if any).
8315
8316 If the medium is not attached to the machine in the current state, then
8317 the array will contain only snapshot IDs.
8318
8319 The returned array may be @c null if this medium is not attached
8320 to the given machine at all, neither in the current state nor in one of
8321 the snapshots.
8322 </desc>
8323 <param name="machineId" type="wstring" dir="in">
8324 <desc>
8325 UUID of the machine to query.
8326 </desc>
8327 </param>
8328 <param name="snapshotIds" type="wstring" safearray="yes" dir="return">
8329 <desc>
8330 Array of snapshot UUIDs of the given machine using this medium.
8331 </desc>
8332 </param>
8333 </method>
8334
8335 <method name="lockRead">
8336 <desc>
8337 Locks this medium for reading.
8338
8339 The read lock is shared: many clients can simultaneously lock the
8340 same media for reading unless it is already locked for writing (see
8341 <link to="#lockWrite"/>) in which case an error is returned.
8342
8343 When the medium is locked for reading, it cannot be modified
8344 from within VirtualBox. This means that any method that changes
8345 the properties of this medium or contents of the storage unit
8346 will return an error (unless explicitly stated otherwise) and
8347 that an attempt to start a virtual machine that wants to modify
8348 the medium will also fail.
8349
8350 When the virtual machine is started up, it locks for reading all
8351 media it uses in read-only mode. If some media cannot be locked
8352 for reading, the startup procedure will fail.
8353
8354 The medium locked for reading must be unlocked using the <link
8355 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8356 can be nested and must be followed by the same number of paired
8357 <link to="#unlockRead"/> calls.
8358
8359 This method sets the media state to <link
8360 to="MediaState_LockedRead" /> on success. The state prior to
8361 this call must be <link to="MediaState_Created" />,
8362 <link to="MediaState_Inaccessible" /> or
8363 <link to="MediaState_LockedRead" />.
8364 As you can see, inaccessible media can be locked too. This is
8365 not an error; this method performs a logical lock that prevents
8366 modifications of this media through the VirtualBox API, not a
8367 physical lock of the underlying storage unit.
8368
8369 This method returns the current state of the medium
8370 <b>before</b> the operation.
8371
8372 <result name="VBOX_E_INVALID_OBJECT_STATE">
8373 Invalid media state (e.g. not created, locked, inaccessible,
8374 creating, deleting).
8375 </result>
8376
8377 </desc>
8378 <param name="state" type="MediaState" dir="return">
8379 <desc>
8380 State of the medium after the operation.
8381 </desc>
8382 </param>
8383 </method>
8384
8385 <method name="unlockRead">
8386 <desc>
8387 Cancels the read lock previously set by <link to="#lockRead"/>.
8388
8389 For both, success and failure, this method returns the current state
8390 of the medium <b>after</b> the operation.
8391
8392 See <link to="#lockRead"/> for more details.
8393
8394 <result name="VBOX_E_INVALID_OBJECT_STATE">
8395 Medium not locked for reading.
8396 </result>
8397
8398 </desc>
8399 <param name="state" type="MediaState" dir="return">
8400 <desc>
8401 State of the medium after the operation.
8402 </desc>
8403 </param>
8404 </method>
8405
8406 <method name="lockWrite">
8407 <desc>
8408 Locks this medium for writing.
8409
8410 The write lock, as opposed to <link to="#lockRead"/>, is
8411 exclusive: there may be only one client holding a write lock
8412 and there may be no read locks while the write lock is held.
8413
8414 When the medium is locked for writing, it cannot be modified
8415 from within VirtualBox and it is not guaranteed that the values
8416 of its properties are up-to-date. Any method that changes the
8417 properties of this medium or contents of the storage unit will
8418 return an error (unless explicitly stated otherwise) and an
8419 attempt to start a virtual machine wanting to modify or to
8420 read the medium will fail.
8421
8422 When the virtual machine is started up, it locks for writing all
8423 media it uses to write data to. If any medium could not be locked
8424 for writing, the startup procedure will fail.
8425
8426 The medium locked for writing must be unlocked using the <link
8427 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8428 can <b>not</b> be nested and must be followed by a<link
8429 to="#unlockWrite"/> call before the next lockWrite call.
8430
8431 This method sets the media state to <link to="MediaState_LockedWrite" />
8432 on success. The state prior to this call must be <link to="MediaState_Created"/>
8433 or <link to="MediaState_Inaccessible"/>. As you can see, inaccessible
8434 media can be locked too. This is not an error; this method
8435 performs a logical lock preventing modifications of this
8436 media through the VirtualBox API, not a physical lock of the
8437 underlying storage unit.
8438
8439 For both, success and failure, this method returns the current
8440 state of the medium <b>before</b> the operation.
8441
8442 <result name="VBOX_E_INVALID_OBJECT_STATE">
8443 Invalid media state (e.g. not created, locked, inaccessible,
8444 creating, deleting).
8445 </result>
8446
8447 </desc>
8448 <param name="state" type="MediaState" dir="return">
8449 <desc>
8450 State of the medium after the operation.
8451 </desc>
8452 </param>
8453 </method>
8454
8455 <method name="unlockWrite">
8456 <desc>
8457 Cancels the write lock previously set by <link to="#lockWrite"/>.
8458
8459 For both, success and failure, this method returns the current
8460 state of the medium <b>after</b> the operation.
8461
8462 See <link to="#lockWrite"/> for more details.
8463
8464 <result name="VBOX_E_INVALID_OBJECT_STATE">
8465 Medium not locked for writing.
8466 </result>
8467
8468 </desc>
8469 <param name="state" type="MediaState" dir="return">
8470 <desc>
8471 State of the medium after the operation.
8472 </desc>
8473 </param>
8474 </method>
8475
8476 <method name="close">
8477 <desc>
8478 Closes this medium.
8479
8480 The hard disk must not be attached to any known virtual machine
8481 and must not have any known child hard disks, otherwise the
8482 operation will fail.
8483
8484 When the hard disk is successfully closed, it gets removed from
8485 the list of remembered hard disks, but its storage unit is not
8486 deleted. In particular, this means that this hard disk can be
8487 later opened again using the <link
8488 to="IVirtualBox::openHardDisk"/> call.
8489
8490 Note that after this method successfully returns, the given hard
8491 disk object becomes uninitialized. This means that any attempt
8492 to call any of its methods or attributes will fail with the
8493 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8494
8495 <result name="VBOX_E_INVALID_OBJECT_STATE">
8496 Invalid media state (other than not created, created or
8497 inaccessible).
8498 </result>
8499 <result name="VBOX_E_OBJECT_IN_USE">
8500 Medium attached to virtual machine.
8501 </result>
8502 <result name="VBOX_E_FILE_ERROR">
8503 Settings file not accessible.
8504 </result>
8505 <result name="VBOX_E_XML_ERROR">
8506 Could not parse the settings file.
8507 </result>
8508
8509 </desc>
8510 </method>
8511
8512 </interface>
8513
8514
8515 <!--
8516 // IHardDisk
8517 /////////////////////////////////////////////////////////////////////////
8518 -->
8519
8520 <enum
8521 name="HardDiskType"
8522 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8523 >
8524 <desc>
8525 Virtual hard disk type.
8526 <see>IHardDisk</see>
8527 </desc>
8528
8529 <const name="Normal" value="0">
8530 <desc>
8531 Normal hard disk (attached directly or indirectly, preserved
8532 when taking snapshots).
8533 </desc>
8534 </const>
8535 <const name="Immutable" value="1">
8536 <desc>
8537 Immutable hard disk (attached indirectly, changes are wiped out
8538 after powering off the virtual machine).
8539 </desc>
8540 </const>
8541 <const name="Writethrough" value="2">
8542 <desc>
8543 Write through hard disk (attached directly, ignored when
8544 taking snapshots).
8545 </desc>
8546 </const>
8547 </enum>
8548
8549 <enum
8550 name="HardDiskVariant"
8551 uuid="eb7fc6b3-ae23-4c5d-a1f6-e3522dd1efb0"
8552 >
8553 <desc>
8554 Virtual hard disk image variant. More than one flag may be set.
8555 <see>IHardDisk</see>
8556 </desc>
8557
8558 <const name="Standard" value="0">
8559 <desc>
8560 No particular variant requested, results in using the backend default.
8561 </desc>
8562 </const>
8563 <const name="VmdkSplit2G" value="0x01">
8564 <desc>
8565 VMDK image split in chunks of less than 2GByte.
8566 </desc>
8567 </const>
8568 <const name="VmdkStreamOptimized" value="0x04">
8569 <desc>
8570 VMDK streamOptimized image. Special import/export format which is
8571 read-only/append-only.
8572 </desc>
8573 </const>
8574 <const name="VmdkESX" value="0x08">
8575 <desc>
8576 VMDK format variant used on ESX products.
8577 </desc>
8578 </const>
8579 <const name="Fixed" value="0x10000">
8580 <desc>
8581 Fixed image. Only allowed for base images.
8582 </desc>
8583 </const>
8584 <const name="Diff" value="0x20000">
8585 <desc>
8586 Fixed image. Only allowed for base images.
8587 </desc>
8588 </const>
8589 </enum>
8590
8591 <interface
8592 name="IHardDiskAttachment" extends="$unknown"
8593 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8594 wsmap="struct"
8595 >
8596 <desc>
8597 The IHardDiskAttachment interface represents a hard disk attachment of a
8598 virtual machine.
8599
8600 Every hard disk attachment specifies a slot of the virtual hard disk
8601 controller and a virtual hard disk attached to this slot.
8602
8603 The array of hard disk attachments is returned by
8604 <link to="IMachine::hardDiskAttachments"/>.
8605 </desc>
8606
8607 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8608 <desc>Hard disk object associated with this attachment.</desc>
8609 </attribute>
8610
8611 <attribute name="controller" type="wstring" readonly="yes">
8612 <desc>Interface bus of this attachment.</desc>
8613 </attribute>
8614
8615 <attribute name="port" type="long" readonly="yes">
8616 <desc>Port number of this attachment.</desc>
8617 </attribute>
8618
8619 <attribute name="device" type="long" readonly="yes">
8620 <desc>Device slot number of this attachment.</desc>
8621 </attribute>
8622
8623 </interface>
8624
8625 <interface
8626 name="IHardDisk" extends="IMedium"
8627 uuid="62551115-83b8-4d20-925f-79e9d3c00f96"
8628 wsmap="managed"
8629 >
8630 <desc>
8631 The IHardDisk interface represents a virtual hard disk drive
8632 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8633
8634 <h3>Hard Disk Types</h3>
8635
8636 There are three types of hard disks:
8637 <link to="HardDiskType_Normal">Normal</link>,
8638 <link to="HardDiskType_Immutable">Immutable</link> and
8639 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8640 hard disk defines how the hard disk is attached to a virtual machine and
8641 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8642 machine with the attached hard disk is taken. The type of the hard disk is
8643 defined by the <link to="#type"/> attribute.
8644
8645 All hard disks can be also divided in two groups: <i>base</i> hard
8646 disks and <i>differencing</i> hard disks. A base hard disk contains all
8647 sectors of the hard disk data in its own storage and therefore can be
8648 used independently. On the contrary, a differencing hard disk is a
8649 "delta" to some other disk and contains only those sectors which differ
8650 from that other disk, which is then called a <i>parent</i>. The differencing
8651 hard disk is said to be <i>linked to</i> that parent.
8652 The parent may be itself a differencing image, thus forming a chain of
8653 linked hard disks. The last element in that chain (sometimes referred to as
8654 the root hard disk) must always be a base. Note that several differencing
8655 hard disks may be linked to the same parent hard disk.
8656
8657 Differencing hard disks can be distinguished from base hard disks by
8658 querying the <link to="#parent"/> attribute: base hard disks do not have
8659 parents they would depend on, so the value of this attribute is always
8660 @c null for them. Using this attribute, it is possible to walk up
8661 the hard disk tree (from the child hard disk to its parent). It is also
8662 possible to walk down the tree using the <link to="#children"/>
8663 attribute.
8664
8665 Note that the type of all differencing hard disks is
8666 <link to="HardDiskType_Normal" />; all other values are
8667 meaningless for them. Base hard disks may be of any type.
8668
8669 <h3>Creating Hard Disks</h3>
8670
8671 New base hard disks are created using
8672 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8673 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8674 disks are usually implicitly created by VirtualBox when needed but may
8675 also be created explicitly using <link to="#createDiffStorage"/>.
8676
8677 After the hard disk is successfully created (including the storage unit)
8678 or opened, it becomes a known hard disk (remembered in the internal media
8679 registry). Known hard disks can be attached to a virtual machine, accessed
8680 through <link to="IVirtualBox::getHardDisk"/> and
8681 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8682 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8683
8684 The following methods, besides <link to="IMedium::close"/>,
8685 automatically remove the hard disk from the media registry:
8686 <ul>
8687 <li><link to="#deleteStorage"/></li>
8688 <li><link to="#mergeTo"/></li>
8689 </ul>
8690
8691 If the storage unit of the hard disk is a regular file in the host's
8692 file system then the rules stated in the description of the
8693 <link to="IMedium::location"/> attribute apply when setting its value. In
8694 addition, a plain file name without any path may be given, in which case
8695 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8696 folder</link> will be prepended to it.
8697
8698 <h4>Automatic composition of the file name part</h4>
8699
8700 Another extension to the <link to="IMedium::location"/> attribute is that
8701 there is a possibility to cause VirtualBox to compose a unique value for
8702 the file name part of the location using the UUID of the hard disk. This
8703 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8704 e.g. before the storage unit is created, and works as follows. You set the
8705 value of the <link to="IMedium::location"/> attribute to a location
8706 specification which only contains the path specification but not the file
8707 name part and ends with either a forward slash or a backslash character.
8708 In response, VirtualBox will generate a new UUID for the hard disk and
8709 compose the file name using the following pattern:
8710 <pre>
8711 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8712 </pre>
8713 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8714 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8715 is the default extension for the storage format of this hard disk. After
8716 that, you may call any of the methods that create a new hard disk storage
8717 unit and they will use the generated UUID and file name.
8718
8719 <h3>Attaching Hard Disks</h3>
8720
8721 Hard disks are attached to virtual machines using the
8722 <link to="IMachine::attachHardDisk"/> method and detached using the
8723 <link to="IMachine::detachHardDisk"/> method. Depending on their
8724 <link to="#type"/>, hard disks are attached either
8725 <i>directly</i> or <i>indirectly</i>.
8726
8727 When a hard disk is being attached directly, it is associated with the
8728 virtual machine and used for hard disk operations when the machine is
8729 running. When a hard disk is being attached indirectly, a new differencing
8730 hard disk linked to it is implicitly created and this differencing hard
8731 disk is associated with the machine and used for hard disk operations.
8732 This also means that if <link to="IMachine::attachHardDisk"/> performs
8733 a direct attachment then the same hard disk will be returned in response
8734 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8735 an indirect attachment is performed then
8736 <link to="IMachine::getHardDisk"/> will return the implicitly created
8737 differencing hard disk, not the original one passed to <link
8738 to="IMachine::attachHardDisk"/>. The following table shows the
8739 dependency of the attachment type on the hard disk type:
8740
8741 <table>
8742 <tr>
8743 <th>Hard Disk Type</th>
8744 <th>Direct or Indirect?</th>
8745 </tr>
8746 <tr>
8747 <td>Normal (Base)</td>
8748 <td>
8749 Normal base hard disks that do not have children (i.e. differencing
8750 hard disks linked to them) and that are not already attached to
8751 virtual machines in snapshots are attached <b>directly</b>.
8752 Otherwise, they are attached <b>indirectly</b> because having
8753 dependent children or being part of the snapshot makes it impossible
8754 to modify hard disk contents without breaking the integrity of the
8755 dependent party. The <link to="#readOnly"/> attribute allows to
8756 quickly determine the kind of the attachment for the given hard
8757 disk. Note that if a normal base hard disk is to be indirectly
8758 attached to a virtual machine with snapshots then a special
8759 procedure called <i>smart attachment</i> is performed (see below).
8760 </td>
8761 </tr>
8762 <tr>
8763 <td>Normal (Differencing)</td>
8764 <td>
8765 Differencing hard disks are like normal base hard disks: attached
8766 <b>directly</b> if they do not have children and are not attached to
8767 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8768 that the smart attachment procedure is never performed for
8769 differencing hard disks.
8770 </td>
8771 </tr>
8772 <tr>
8773 <td>Immutable</td>
8774 <td>
8775 Immutable hard disks are always attached <b>indirectly</b> because
8776 they are designed to be non-writable. If an immutable hard disk is
8777 attached to a virtual machine with snapshots then a special
8778 procedure called smart attachment is performed (see below).
8779 </td>
8780 </tr>
8781 <tr>
8782 <td>Writethrough</td>
8783 <td>
8784 Writethrough hard disks are always attached <b>directly</b>, also as
8785 designed. This also means that writethrough hard disks cannot have
8786 other hard disks linked to them at all.
8787 </td>
8788 </tr>
8789 </table>
8790
8791 Note that the same hard disk, regardless of its type, may be attached to
8792 more than one virtual machine at a time. In this case, the machine that is
8793 started first gains exclusive access to the hard disk and attempts to
8794 start other machines having this hard disk attached will fail until the
8795 first machine is powered down.
8796
8797 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8798 that the given hard disk remains associated with the given machine after a
8799 successful <link to="IMachine::detachHardDisk"/> call until
8800 <link to="IMachine::saveSettings"/> is called to save all changes to
8801 machine settings to disk. This deferring is necessary to guarantee that
8802 the hard disk configuration may be restored at any time by a call to
8803 <link to="IMachine::discardSettings"/> before the settings
8804 are saved (committed).
8805
8806 Note that if <link to="IMachine::discardSettings"/> is called after
8807 indirectly attaching some hard disks to the machine but before a call to
8808 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8809 all differencing hard disks implicitly created by
8810 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
8811 Such implicitly created hard disks will also be immediately deleted when
8812 detached explicitly using the <link to="IMachine::detachHardDisk"/>
8813 call if it is made before <link to="IMachine::saveSettings"/>. This
8814 implicit deletion is safe because newly created differencing hard
8815 disks do not contain any user data.
8816
8817 However, keep in mind that detaching differencing hard disks that were
8818 implicitly created by <link to="IMachine::attachHardDisk"/>
8819 before the last <link to="IMachine::saveSettings"/> call will
8820 <b>not</b> implicitly delete them as they may already contain some data
8821 (for example, as a result of virtual machine execution). If these hard
8822 disks are no more necessary, the caller can always delete them explicitly
8823 using <link to="#deleteStorage"/> after they are actually de-associated
8824 from this machine by the <link to="IMachine::saveSettings"/> call.
8825
8826 <h3>Smart Attachment</h3>
8827
8828 When normal base or immutable hard disks are indirectly attached to a
8829 virtual machine then some additional steps are performed to make sure the
8830 virtual machine will have the most recent "view" of the hard disk being
8831 attached. These steps include walking through the machine's snapshots
8832 starting from the current one and going through ancestors up to the first
8833 snapshot. Hard disks attached to the virtual machine in all
8834 of the encountered snapshots are checked whether they are descendants of
8835 the given normal base or immutable hard disk. The first found child (which
8836 is the differencing hard disk) will be used instead of the normal base or
8837 immutable hard disk as a parent for creating a new differencing hard disk
8838 that will be actually attached to the machine. And only if no descendants
8839 are found or if the virtual machine does not have any snapshots then the
8840 normal base or immutable hard disk will be used itself as a parent for
8841 this differencing hard disk.
8842
8843 It is easier to explain what smart attachment does using the
8844 following example:
8845 <pre>
8846BEFORE attaching B.vdi: AFTER attaching B.vdi:
8847
8848Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8849 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8850 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8851 Snapshot 4 (none) Snapshot 4 (none)
8852 CurState (none) CurState (D3->D2.vdi)
8853
8854 NOT
8855 ...
8856 CurState (D3->B.vdi)
8857 </pre>
8858 The first column is the virtual machine configuration before the base hard
8859 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8860 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8861 mean that the hard disk that is actually attached to the machine is a
8862 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8863 another hard disk, <tt>B.vdi</tt>.
8864
8865 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8866 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8867 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8868 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8869 it cannot be attached directly and needs an indirect attachment (i.e.
8870 implicit creation of a new differencing hard disk). Due to the smart
8871 attachment procedure, the new differencing hard disk
8872 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8873 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8874 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8875 machine.
8876
8877 Note that if there is more than one descendant hard disk of the given base
8878 hard disk found in a snapshot, and there is an exact device, channel and
8879 bus match, then this exact match will be used. Otherwise, the youngest
8880 descendant will be picked up.
8881
8882 There is one more important aspect of the smart attachment procedure which
8883 is not related to snapshots at all. Before walking through the snapshots
8884 as described above, the backup copy of the current list of hard disk
8885 attachment is searched for descendants. This backup copy is created when
8886 the hard disk configuration is changed for the first time after the last
8887 <link to="IMachine::saveSettings"/> call and used by
8888 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8889 changes. When such a descendant is found in this backup copy, it will be
8890 simply re-attached back, without creating a new differencing hard disk for
8891 it. This optimization is necessary to make it possible to re-attach the
8892 base or immutable hard disk to a different bus, channel or device slot
8893 without losing the contents of the differencing hard disk actually
8894 attached to the machine in place of it.
8895 </desc>
8896
8897 <attribute name="format" type="wstring" readonly="yes">
8898 <desc>
8899 Storage format of this hard disk.
8900
8901 The value of this attribute is a string that specifies a backend used to
8902 store hard disk data. The storage format is defined when you create a
8903 new hard disk or automatically detected when you open an existing hard
8904 disk medium, and cannot be changed later.
8905
8906 The list of all storage formats supported by this VirtualBox
8907 installation can be obtained using
8908 <link to="ISystemProperties::hardDiskFormats"/>.
8909 </desc>
8910 </attribute>
8911
8912 <attribute name="type" type="HardDiskType">
8913 <desc>
8914 Type (role) of this hard disk.
8915
8916 The following constraints apply when changing the value of this
8917 attribute:
8918 <ul>
8919 <li>If a hard disk is attached to a virtual machine (either in the
8920 current state or in one of the snapshots), its type cannot be
8921 changed.
8922 </li>
8923 <li>As long as the hard disk has children, its type cannot be set
8924 to <link to="HardDiskType_Writethrough"/>.
8925 </li>
8926 <li>The type of all differencing hard disks is
8927 <link to="HardDiskType_Normal"/> and cannot be changed.
8928 </li>
8929 </ul>
8930
8931 The type of a newly created or opened hard disk is set to
8932 <link to="HardDiskType_Normal"/>.
8933 </desc>
8934 </attribute>
8935
8936 <attribute name="parent" type="IHardDisk" readonly="yes">
8937 <desc>
8938 Parent of this hard disk (a hard disk this hard disk is directly based
8939 on).
8940
8941 Only differencing hard disks have parents. For base (non-differencing)
8942 hard disks, @c null is returned.
8943 </desc>
8944 </attribute>
8945
8946 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
8947 <desc>
8948 Children of this hard disk (all differencing hard disks directly based
8949 on this hard disk). A @c null array is returned if this hard disk
8950 does not have any children.
8951 </desc>
8952 </attribute>
8953
8954 <attribute name="root" type="IHardDisk" readonly="yes">
8955 <desc>
8956 Root hard disk of this hard disk.
8957
8958 If this is a differencing hard disk, its root hard disk is the base hard
8959 disk the given hard disk branch starts from. For all other types of hard
8960 disks, this property returns the hard disk object itself (i.e. the same
8961 object this property is read on).
8962 </desc>
8963 </attribute>
8964
8965 <attribute name="readOnly" type="boolean" readonly="yes">
8966 <desc>
8967 Returns @c true if this hard disk is read-only and @c false otherwise.
8968
8969 A hard disk is considered to be read-only when its contents cannot be
8970 modified without breaking the integrity of other parties that depend on
8971 this hard disk such as its child hard disks or snapshots of virtual
8972 machines where this hard disk is attached to these machines. If there
8973 are no children and no such snapshots then there is no dependency and
8974 the hard disk is not read-only.
8975
8976 The value of this attribute can be used to determine the kind of the
8977 attachment that will take place when attaching this hard disk to a
8978 virtual machine. If the value is @c false then the hard disk will
8979 be attached directly. If the value is @c true then the hard disk
8980 will be attached indirectly by creating a new differencing child hard
8981 disk for that. See the interface description for more information.
8982
8983 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8984 disks are always read-only while all
8985 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8986 always not.
8987
8988 <note>
8989 The read-only condition represented by this attribute is related to
8990 the hard disk type and usage, not to the current
8991 <link to="IMedium::state">media state</link> and not to the read-only
8992 state of the storage unit.
8993 </note>
8994 </desc>
8995 </attribute>
8996
8997 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8998 <desc>
8999 Logical size of this hard disk (in megabytes), as reported to the
9000 guest OS running inside the virtual machine this disk is
9001 attached to. The logical size is defined when the hard disk is created
9002 and cannot be changed later.
9003
9004 <note>
9005 Reading this property on a differencing hard disk will return the size
9006 of its <link to="#root"/> hard disk.
9007 </note>
9008 <note>
9009 For hard disks whose state is <link to="#state"/> is <link
9010 to="MediaState_Inaccessible"/>, the value of this property is the
9011 last known logical size. For <link to="MediaState_NotCreated"/> hard
9012 disks, the returned value is zero.
9013 </note>
9014 </desc>
9015 </attribute>
9016
9017 <attribute name="autoReset" type="boolean">
9018 <desc>
9019 Whether this differencing hard disk will be automatically reset each
9020 time a virtual machine it is attached to is powered up.
9021
9022 See <link to="#reset()"/> for more information about resetting
9023 differencing hard disks.
9024
9025 <note>
9026 Reading this property on a base (non-differencing) hard disk will
9027 always @c false. Changing the value of this property in this
9028 case is not supported.
9029 </note>
9030
9031 <result name="VBOX_E_NOT_SUPPORTED">
9032 This is not a differencing hard disk (when changing the attribute
9033 value).
9034 </result>
9035 </desc>
9036 </attribute>
9037
9038 <!-- storage methods -->
9039
9040 <method name="getProperty">
9041 <desc>
9042 Returns the value of the custom hard disk property with the given name.
9043
9044 The list of all properties supported by the given hard disk format can
9045 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9046
9047 Note that if this method returns an empty string in @a value, the
9048 requested property is supported but currently not assigned any value.
9049
9050 <result name="VBOX_E_OBJECT_NOT_FOUND">
9051 Requested property does not exist (not supported by the format).
9052 </result>
9053 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9054 </desc>
9055 <param name="name" type="wstring" dir="in">
9056 <desc>Name of the property to get.</desc>
9057 </param>
9058 <param name="value" type="wstring" dir="return">
9059 <desc>Current property value.</desc>
9060 </param>
9061 </method>
9062
9063 <method name="setProperty">
9064 <desc>
9065 Sets the value of the custom hard disk property with the given name.
9066
9067 The list of all properties supported by the given hard disk format can
9068 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9069
9070 Note that setting the property value to @c null or an empty string is
9071 equivalent to deleting the existing value. A default value (if it is
9072 defined for this property) will be used by the format backend in this
9073 case.
9074
9075 <result name="VBOX_E_OBJECT_NOT_FOUND">
9076 Requested property does not exist (not supported by the format).
9077 </result>
9078 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9079 </desc>
9080 <param name="name" type="wstring" dir="in">
9081 <desc>Name of the property to set.</desc>
9082 </param>
9083 <param name="value" type="wstring" dir="in">
9084 <desc>Property value to set.</desc>
9085 </param>
9086 </method>
9087
9088 <method name="getProperties">
9089 <desc>
9090 Returns values for a group of properties in one call.
9091
9092 The names of the properties to get are specified using the @a names
9093 argument which is a list of comma-separated property names or
9094 an empty string if all properties are to be returned. Note that currently
9095 the value of this argument is ignored and the method always returns all
9096 existing properties.
9097
9098 The list of all properties supported by the given hard disk format can
9099 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9100
9101 The method returns two arrays, the array of property names corresponding
9102 to the @a names argument and the current values of these properties.
9103 Both arrays have the same number of elements with each elemend at the
9104 given index in the first array corresponds to an element at the same
9105 index in the second array.
9106
9107 Note that for properties that do not have assigned values,
9108 an empty string is returned at the appropriate index in the
9109 @a returnValues array.
9110
9111 </desc>
9112 <param name="names" type="wstring" dir="in">
9113 <desc>
9114 Names of properties to get.
9115 </desc>
9116 </param>
9117 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9118 <desc>Names of returned properties.</desc>
9119 </param>
9120 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9121 <desc>Values of returned properties.</desc>
9122 </param>
9123 </method>
9124
9125 <method name="setProperties">
9126 <desc>
9127 Sets values for a group of properties in one call.
9128
9129 The names of the properties to set are passed in the @a names
9130 array along with the new values for them in the @a values array. Both
9131 arrays have the same number of elements with each elemend at the given
9132 index in the first array corresponding to an element at the same index
9133 in the second array.
9134
9135 If there is at least one property name in @a names that is not valid,
9136 the method will fail before changing the values of any other properties
9137 from the @a names array.
9138
9139 Using this method over <link to="#setProperty"/> is preferred if you
9140 need to set several properties at once since it will result into less
9141 IPC calls.
9142
9143 The list of all properties supported by the given hard disk format can
9144 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9145
9146 Note that setting the property value to @c null or an empty string is
9147 equivalent to deleting the existing value. A default value (if it is
9148 defined for this property) will be used by the format backend in this
9149 case.
9150 </desc>
9151 <param name="names" type="wstring" safearray="yes" dir="in">
9152 <desc>Names of properties to set.</desc>
9153 </param>
9154 <param name="values" type="wstring" safearray="yes" dir="in">
9155 <desc>Values of properties to set.</desc>
9156 </param>
9157 </method>
9158
9159 <!-- storage methods -->
9160
9161 <method name="createBaseStorage">
9162 <desc>
9163 Starts creating a hard disk storage unit (fixed/dynamic, according
9164 to the variant flags) in in the background. The previous storage unit
9165 created for this object, if any, must first be deleted using
9166 <link to="#deleteStorage"/>, otherwise the operation will fail.
9167
9168 Before the operation starts, the hard disk is placed in
9169 <link to="MediaState_Creating"/> state. If the create operation
9170 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9171 state.
9172
9173 After the returned progress object reports that the operation has
9174 successfully completed, the media state will be set to <link
9175 to="MediaState_Created"/>, the hard disk will be remembered by this
9176 VirtualBox installation and may be attached to virtual machines.
9177
9178 <result name="VBOX_E_NOT_SUPPORTED">
9179 The variant of storage creation operation is not supported. See <link
9180 to="IHardDiskFormat::capabilities"/>.
9181 </result>
9182 </desc>
9183 <param name="logicalSize" type="unsigned long long" dir="in">
9184 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9185 </param>
9186 <param name="variant" type="HardDiskVariant" dir="in">
9187 <desc>Exact image variant which should be created.</desc>
9188 </param>
9189 <param name="progress" type="IProgress" dir="return">
9190 <desc>Progress object to track the operation completion.</desc>
9191 </param>
9192 </method>
9193
9194 <method name="deleteStorage">
9195 <desc>
9196 Starts deleting the storage unit of this hard disk.
9197
9198 The hard disk must not be attached to any known virtual machine and must
9199 not have any known child hard disks, otherwise the operation will fail.
9200 It will also fail if there is no storage unit to delete or if deletion
9201 is already in progress, or if the hard disk is being in use (locked for
9202 read or for write) or inaccessible. Therefore, the only valid state for
9203 this operation to succeed is <link to="MediaState_Created"/>.
9204
9205 Before the operation starts, the hard disk is placed to
9206 <link to="MediaState_Deleting"/> state and gets removed from the list
9207 of remembered hard disks (media registry). If the delete operation
9208 fails, the media will be remembered again and placed back to
9209 <link to="MediaState_Created"/> state.
9210
9211 After the returned progress object reports that the operation is
9212 complete, the media state will be set to
9213 <link to="MediaState_NotCreated"/> and you will be able to use one of
9214 the storage creation methods to create it again.
9215
9216 <see>#close()</see>
9217
9218 <result name="VBOX_E_OBJECT_IN_USE">
9219 Hard disk is attached to a virtual machine.
9220 </result>
9221 <result name="VBOX_E_NOT_SUPPORTED">
9222 Storage deletion is not allowed because neither of storage creation
9223 operations are supported. See
9224 <link to="IHardDiskFormat::capabilities"/>.
9225 </result>
9226
9227 <note>
9228 If the deletion operation fails, it is not guaranteed that the storage
9229 unit still exists. You may check the <link to="IMedium::state"/> value
9230 to answer this question.
9231 </note>
9232 </desc>
9233 <param name="progress" type="IProgress" dir="return">
9234 <desc>Progress object to track the operation completion.</desc>
9235 </param>
9236 </method>
9237
9238 <!-- diff methods -->
9239
9240 <method name="createDiffStorage">
9241 <desc>
9242 Starts creating an empty differencing storage unit based on this hard
9243 disk in the format and at the location defined by the @a target
9244 argument.
9245
9246 The target hard disk must be in <link to="MediaState_NotCreated"/>
9247 state (i.e. must not have an existing storage unit). Upon successful
9248 completion, this operation will set the type of the target hard disk to
9249 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9250 represent the differencing hard disk data in the given format (according
9251 to the storage format of the target object).
9252
9253 After the returned progress object reports that the operation is
9254 successfully complete, the target hard disk gets remembered by this
9255 VirtualBox installation and may be attached to virtual machines.
9256
9257 <note>
9258 The hard disk will be set to <link to="MediaState_LockedRead"/>
9259 state for the duration of this operation.
9260 </note>
9261 <result name="VBOX_E_OBJECT_IN_USE">
9262 Hard disk not in @c NotCreated state.
9263 </result>
9264 </desc>
9265 <param name="target" type="IHardDisk" dir="in">
9266 <desc>Target hard disk.</desc>
9267 </param>
9268 <param name="variant" type="HardDiskVariant" dir="in">
9269 <desc>Exact image variant which should be created.</desc>
9270 </param>
9271 <param name="progress" type="IProgress" dir="return">
9272 <desc>Progress object to track the operation completion.</desc>
9273 </param>
9274 </method>
9275
9276 <method name="mergeTo">
9277 <desc>
9278 Starts merging the contents of this hard disk and all intermediate
9279 differencing hard disks in the chain to the given target hard disk.
9280
9281 The target hard disk must be either a descendant of this hard disk or
9282 its ancestor (otherwise this method will immediately return a failure).
9283 It follows that there are two logical directions of the merge operation:
9284 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9285 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9286 chain:
9287
9288 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9289
9290 Here, calling this method on the <tt>Base</tt> hard disk object with
9291 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9292 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9293 merge. Note that in both cases the contents of the resulting hard disk
9294 will be the same, the only difference is the hard disk object that takes
9295 the result of the merge operation. In case of the forward merge in the
9296 above example, the result will be written to <tt>Diff_2</tt>; in case of
9297 the backward merge, the result will be written to <tt>Base</tt>. In
9298 other words, the result of the operation is always stored in the target
9299 hard disk.
9300
9301 Upon successful operation completion, the storage units of all hard
9302 disks in the chain between this (source) hard disk and the target hard
9303 disk, including the source hard disk itself, will be automatically
9304 deleted and the relevant hard disk objects (including this hard disk)
9305 will become uninitialized. This means that any attempt to call any of
9306 their methods or attributes will fail with the
9307 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9308 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9309 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9310 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9311 disk itself since it will no longer be based on any other hard disk.
9312
9313 Considering the above, all of the following conditions must be met in
9314 order for the merge operation to succeed:
9315 <ul>
9316 <li>
9317 Neither this (source) hard disk nor any intermediate
9318 differencing hard disk in the chain between it and the target
9319 hard disk is attached to any virtual machine.
9320 </li>
9321 <li>
9322 Neither the source hard disk nor the target hard disk is an
9323 <link to="HardDiskType_Immutable"/> hard disk.
9324 </li>
9325 <li>
9326 The part of the hard disk tree from the source hard disk to the
9327 target hard disk is a linear chain, i.e. all hard disks in this
9328 chain have exactly one child which is the next hard disk in this
9329 chain. The only exception from this rule is the target hard disk in
9330 the forward merge operation; it is allowed to have any number of
9331 child hard disks because the merge operation will hot change its
9332 logical contents (as it is seen by the guest OS or by children).
9333 </li>
9334 <li>
9335 None of the involved hard disks are in
9336 <link to="MediaState_LockedRead"/> or
9337 <link to="MediaState_LockedWrite"/> state.
9338 </li>
9339 </ul>
9340
9341 <note>
9342 This (source) hard disk and all intermediates will be placed to <link
9343 to="MediaState_Deleting"/> state and the target hard disk will be
9344 placed to <link to="MediaState_LockedWrite"/> state and for the
9345 duration of this operation.
9346 </note>
9347 </desc>
9348 <param name="targetId" type="wstring" dir="in">
9349 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9350 </param>
9351 <param name="progress" type="IProgress" dir="return">
9352 <desc>Progress object to track the operation completion.</desc>
9353 </param>
9354 </method>
9355
9356 <!-- clone method -->
9357
9358 <method name="cloneTo">
9359 <desc>
9360 Starts creating a clone of this hard disk in the format and at the
9361 location defined by the @a target argument.
9362
9363 The target hard disk must be either in <link to="MediaState_NotCreated"/>
9364 state (i.e. must not have an existing storage unit) or in
9365 <link to="MediaState_Created"/> state (i.e. created and not locked, and
9366 big enough to hold the data or else the copy will be partial). Upon
9367 successful completion, the cloned hard disk will contain exactly the
9368 same sector data as the hard disk being cloned, except that in the
9369 first case a new UUID for the clone will be randomly generated, and in
9370 the second case the UUID will remain unchanged.
9371
9372 The @a parent argument defines which hard disk will be the parent
9373 of the clone. Passing a @c null reference indicates that the clone will
9374 be a base image, i.e. completely independent. It is possible to specify
9375 an arbitrary hard disk for this parameter, including the parent of the
9376 hard disk which is being cloned. Even cloning to a child of the source
9377 hard disk is possible. Note that when cloning to an existing image, the
9378 @a parent irgument is ignored.
9379
9380 After the returned progress object reports that the operation is
9381 successfully complete, the target hard disk gets remembered by this
9382 VirtualBox installation and may be attached to virtual machines.
9383
9384 <note>
9385 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9386 state for the duration of this operation.
9387 </note>
9388 <result name="E_NOTIMPL">
9389 The specified cloning variant is not supported at the moment.
9390 </result>
9391 </desc>
9392 <param name="target" type="IHardDisk" dir="in">
9393 <desc>Target hard disk.</desc>
9394 </param>
9395 <param name="variant" type="HardDiskVariant" dir="in">
9396 <desc>Exact image variant which should be created.</desc>
9397 </param>
9398 <param name="parent" type="IHardDisk" dir="in">
9399 <desc>Parent of the cloned hard disk.</desc>
9400 </param>
9401 <param name="progress" type="IProgress" dir="return">
9402 <desc>Progress object to track the operation completion.</desc>
9403 </param>
9404 </method>
9405
9406 <!-- other methods -->
9407
9408 <method name="compact">
9409 <desc>
9410 Starts compacting of this hard disk. This means that the disk is
9411 transformed into a possibly more compact storage representation.
9412 This potentially creates temporary images, which can require a
9413 substantial amount of additional disk space.
9414
9415 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9416 state and all its parent hard disks (if any) will be placed to
9417 <link to="MediaState_LockedRead"/> state for the duration of this
9418 operation.
9419
9420 Please note that the results can be either returned straight away,
9421 or later as the result of the background operation via the object
9422 returned via the @a progress parameter.
9423
9424 <result name="VBOX_E_NOT_SUPPORTED">
9425 Hard disk format does not support compacting (but potentially
9426 needs it).
9427 </result>
9428 </desc>
9429 <param name="progress" type="IProgress" dir="return">
9430 <desc>Progress object to track the operation completion.</desc>
9431 </param>
9432 </method>
9433
9434 <method name="reset">
9435 <desc>
9436 Starts erasing the contents of this differencing hard disk.
9437
9438 This operation will reset the differencing hard disk to its initial
9439 state when it does not contain any sector data and any read operation is
9440 redirected to its parent hard disk.
9441
9442 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9443 for the duration of this operation.
9444
9445 <result name="VBOX_E_NOT_SUPPORTED">
9446 This is not a differencing hard disk.
9447 </result>
9448 <result name="VBOX_E_INVALID_OBJECT_STATE">
9449 Hard disk is not in <link to="MediaState_Created"/> or
9450 <link to="MediaState_Inaccessible"/> state.
9451 </result>
9452 </desc>
9453 <param name="progress" type="IProgress" dir="return">
9454 <desc>Progress object to track the operation completion.</desc>
9455 </param>
9456 </method>
9457
9458 </interface>
9459
9460
9461 <!--
9462 // IHardDiskFormat
9463 /////////////////////////////////////////////////////////////////////////
9464 -->
9465
9466 <enum
9467 name="DataType"
9468 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9469 >
9470 <const name="Int32" value="0"/>
9471 <const name="Int8" value="1"/>
9472 <const name="String" value="2"/>
9473 </enum>
9474
9475 <enum
9476 name="DataFlags"
9477 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9478 >
9479 <const name="None" value="0x00"/>
9480 <const name="Mandatory" value="0x01"/>
9481 <const name="Expert" value="0x02"/>
9482 <const name="Array" value="0x04"/>
9483 <const name="FlagMask" value="0x07"/>
9484 </enum>
9485
9486 <enum
9487 name="HardDiskFormatCapabilities"
9488 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9489 >
9490 <desc>
9491 Hard disk format capability flags.
9492 </desc>
9493
9494 <const name="Uuid" value="0x01">
9495 <desc>
9496 Supports UUIDs as expected by VirtualBox code.
9497 </desc>
9498 </const>
9499
9500 <const name="CreateFixed" value="0x02">
9501 <desc>
9502 Supports creating fixed size images, allocating all space instantly.
9503 </desc>
9504 </const>
9505
9506 <const name="CreateDynamic" value="0x04">
9507 <desc>
9508 Supports creating dynamically growing images, allocating space on
9509 demand.
9510 </desc>
9511 </const>
9512
9513 <const name="CreateSplit2G" value="0x08">
9514 <desc>
9515 Supports creating images split in chunks of a bit less than 2 GBytes.
9516 </desc>
9517 </const>
9518
9519 <const name="Differencing" value="0x10">
9520 <desc>
9521 Supports being used as a format for differencing hard disks (see <link
9522 to="IHardDisk::createDiffStorage"/>).
9523 </desc>
9524 </const>
9525
9526 <const name="Asynchronous" value="0x20">
9527 <desc>
9528 Supports asynchronous I/O operations for at least some configurations.
9529 </desc>
9530 </const>
9531
9532 <const name="File" value="0x40">
9533 <desc>
9534 The format backend operates on files (the <link to="IMedium::location"/>
9535 attribute of the hard disk specifies a file used to store hard disk
9536 data; for a list of supported file extensions see
9537 <link to="IHardDiskFormat::fileExtensions"/>).
9538 </desc>
9539 </const>
9540
9541 <const name="Properties" value="0x80">
9542 <desc>
9543 The format backend uses the property interface to configure the storage
9544 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9545 method is used to get access to properties supported by the given hard
9546 disk format).
9547 </desc>
9548 </const>
9549
9550 <const name="CapabilityMask" value="0xFF"/>
9551 </enum>
9552
9553 <interface
9554 name="IHardDiskFormat" extends="$unknown"
9555 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9556 wsmap="managed"
9557 >
9558 <desc>
9559 The IHardDiskFormat interface represents a virtual hard disk format.
9560
9561 Each hard disk format has an associated backend which is used to handle
9562 hard disks stored in this format. This interface provides information
9563 about the properties of the associated backend.
9564
9565 Each hard disk format is identified by a string represented by the
9566 <link to="#id"/> attribute. This string is used in calls like
9567 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9568 format.
9569
9570 The list of all supported hard disk formats can be obtained using
9571 <link to="ISystemProperties::hardDiskFormats"/>.
9572
9573 <see>IHardDisk</see>
9574 </desc>
9575
9576 <attribute name="id" type="wstring" readonly="yes">
9577 <desc>
9578 Identifier of this format.
9579
9580 The format identifier is a non-@c null non-empty ASCII string. Note that
9581 this string is case-insensitive. This means that, for example, all of
9582 the following strings:
9583 <pre>
9584 "VDI"
9585 "vdi"
9586 "VdI"</pre>
9587 refer to the same hard disk format.
9588
9589 This string is used in methods of other interfaces where it is necessary
9590 to specify a hard disk format, such as
9591 <link to="IVirtualBox::createHardDisk"/>.
9592 </desc>
9593 </attribute>
9594
9595 <attribute name="name" type="wstring" readonly="yes">
9596 <desc>
9597 Human readable description of this format.
9598
9599 Mainly for use in file open dialogs.
9600 </desc>
9601 </attribute>
9602
9603 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9604 <desc>
9605 Array of strings containing the supported file extensions.
9606
9607 The first extension in the array is the extension preferred by the
9608 backend. It is recommended to use this extension when specifying a
9609 location of the storage unit for a new hard disk.
9610
9611 Note that some backends do not work on files, so this array may be
9612 empty.
9613
9614 <see>IHardDiskFormat::capabilities</see>
9615 </desc>
9616 </attribute>
9617
9618 <attribute name="capabilities" type="unsigned long" readonly="yes">
9619 <desc>
9620 Capabilities of the format as a set of bit flags.
9621
9622 For the meaning of individual capability flags see
9623 <link to="HardDiskFormatCapabilities"/>.
9624 </desc>
9625 </attribute>
9626
9627 <method name="describeProperties">
9628 <desc>
9629 Returns several arrays describing the properties supported by this
9630 format.
9631
9632 An element with the given index in each array describes one
9633 property. Thus, the number of elements in each returned array is the
9634 same and corresponds to the number of supported properties.
9635
9636 The returned arrays are filled in only if the
9637 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9638 All arguments must be non-@c null.
9639
9640 <see>DataType</see>
9641 <see>DataFlags</see>
9642 </desc>
9643
9644 <param name="names" type="wstring" safearray="yes" dir="out">
9645 <desc>Array of property names.</desc>
9646 </param>
9647 <param name="description" type="wstring" safearray="yes" dir="out">
9648 <desc>Array of property descriptions.</desc>
9649 </param>
9650 <param name="types" type="DataType" safearray="yes" dir="out">
9651 <desc>Array of property types.</desc>
9652 </param>
9653 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9654 <desc>Array of property flags.</desc>
9655 </param>
9656 <param name="defaults" type="wstring" safearray="yes" dir="out">
9657 <desc>Array of default property values.</desc>
9658 </param>
9659 </method>
9660
9661 </interface>
9662
9663
9664 <!--
9665 // IFloppyImage
9666 /////////////////////////////////////////////////////////////////////////
9667 -->
9668
9669 <interface
9670 name="IFloppyImage" extends="IMedium"
9671 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9672 wsmap="managed"
9673 >
9674 <desc>
9675 The IFloppyImage interface represents a medium containing the image
9676 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9677 </desc>
9678
9679 </interface>
9680
9681
9682 <!--
9683 // IDVDImage
9684 /////////////////////////////////////////////////////////////////////////
9685 -->
9686
9687 <interface
9688 name="IDVDImage" extends="IMedium"
9689 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9690 wsmap="managed"
9691 >
9692 <desc>
9693 The IDVDImage interface represents a medium containing the image
9694 of a CD or DVD disk in the ISO format.
9695
9696 This is a subclass of <link to="IMedium" />; see remarks there.
9697 </desc>
9698
9699 </interface>
9700
9701
9702 <!--
9703 // IDVDDrive
9704 /////////////////////////////////////////////////////////////////////////
9705 -->
9706
9707 <interface
9708 name="IDVDDrive" extends="$unknown"
9709 uuid="156944d1-4c6d-4812-8f12-ab3890767ab4"
9710 wsmap="managed"
9711 >
9712 <desc>
9713 The IDVDDrive interface represents the virtual CD/DVD drive of the
9714 virtual machine. An object of this type is returned by
9715 <link to="IMachine::DVDDrive"/>.
9716 </desc>
9717
9718 <attribute name="state" type="DriveState" readonly="yes">
9719 <desc>Current drive state.</desc>
9720 </attribute>
9721
9722 <attribute name="passthrough" type="boolean">
9723 <desc>
9724 When a host drive is mounted and passthrough is enabled
9725 the guest OS will be able to directly send SCSI commands to
9726 the host drive. This enables the guest OS to use CD/DVD writers
9727 but is potentially dangerous.
9728 </desc>
9729 </attribute>
9730
9731 <method name="mountImage">
9732 <desc>Mounts a CD/DVD image with the specified UUID.
9733
9734 <result name="VBOX_E_FILE_ERROR">
9735 Invalid image file location.
9736 </result>
9737 <result name="VBOX_E_OBJECT_NOT_FOUND">
9738 Could not find a CD/DVD image matching @a imageId.
9739 </result>
9740 <result name="VBOX_E_INVALID_OBJECT_STATE">
9741 Invalid media state.
9742 </result>
9743
9744 </desc>
9745 <param name="imageId" type="wstring" dir="in"/>
9746 </method>
9747
9748 <method name="captureHostDrive">
9749 <desc>Captures the specified host CD/DVD drive.</desc>
9750 <param name="drive" type="IHostDVDDrive" dir="in"/>
9751 </method>
9752
9753 <method name="unmount">
9754 <desc>Unmounts the currently mounted image or host drive.</desc>
9755 </method>
9756
9757 <method name="getImage">
9758 <desc>Returns the currently mounted CD/DVD image.</desc>
9759 <param name="image" type="IDVDImage" dir="return"/>
9760 </method>
9761
9762 <method name="getHostDrive">
9763 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9764 <param name="drive" type="IHostDVDDrive" dir="return"/>
9765 </method>
9766
9767 </interface>
9768
9769
9770 <!--
9771 // IFloppyDrive
9772 /////////////////////////////////////////////////////////////////////////
9773 -->
9774
9775 <interface
9776 name="IFloppyDrive" extends="$unknown"
9777 uuid="a8676d38-5cf0-4b53-85b1-aa693611ab86"
9778 wsmap="managed"
9779 >
9780 <desc>
9781 The IFloppyDrive interface represents the virtual floppy drive of the
9782 virtual machine. An object of this type is returned by
9783 <link to="IMachine::floppyDrive" />.
9784 </desc>
9785
9786 <attribute name="enabled" type="boolean">
9787 <desc>
9788 Flag whether the floppy drive is enabled. If it is disabled,
9789 the floppy drive will not be reported to the guest OS.
9790 </desc>
9791 </attribute>
9792
9793 <attribute name="state" type="DriveState" readonly="yes">
9794 <desc>Current drive state.</desc>
9795 </attribute>
9796
9797 <method name="mountImage">
9798 <desc>Mounts a floppy image with the specified UUID.
9799
9800 <result name="VBOX_E_FILE_ERROR">
9801 Invalid image file location.
9802 </result>
9803 <result name="VBOX_E_OBJECT_NOT_FOUND">
9804 Could not find a floppy image matching @a imageID.
9805 </result>
9806 <result name="VBOX_E_INVALID_OBJECT_STATE">
9807 Invalid media state.
9808 </result>
9809
9810 </desc>
9811 <param name="imageId" type="wstring" dir="in"/>
9812 </method>
9813
9814 <method name="captureHostDrive">
9815 <desc>Captures the specified host floppy drive.</desc>
9816 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9817 </method>
9818
9819 <method name="unmount">
9820 <desc>Unmounts the currently mounted image or host drive.</desc>
9821 </method>
9822
9823 <method name="getImage">
9824 <desc>Returns the currently mounted floppy image.</desc>
9825 <param name="image" type="IFloppyImage" dir="return"/>
9826 </method>
9827
9828 <method name="getHostDrive">
9829 <desc>Returns the currently mounted host floppy drive.</desc>
9830 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9831 </method>
9832
9833 </interface>
9834
9835
9836 <!--
9837 // IKeyboard
9838 /////////////////////////////////////////////////////////////////////////
9839 -->
9840
9841 <interface
9842 name="IKeyboard" extends="$unknown"
9843 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9844 wsmap="managed"
9845 >
9846 <desc>
9847 The IKeyboard interface represents the virtual machine's keyboard. Used
9848 in <link to="IConsole::keyboard"/>.
9849
9850 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9851 to the virtual machine.
9852
9853 </desc>
9854 <method name="putScancode">
9855 <desc>Sends a scancode to the keyboard.
9856
9857 <result name="VBOX_E_IPRT_ERROR">
9858 Could not send scan code to virtual keyboard.
9859 </result>
9860
9861 </desc>
9862 <param name="scancode" type="long" dir="in"/>
9863 </method>
9864
9865 <method name="putScancodes">
9866 <desc>Sends an array of scancodes to the keyboard.
9867
9868 <result name="VBOX_E_IPRT_ERROR">
9869 Could not send all scan codes to virtual keyboard.
9870 </result>
9871
9872 </desc>
9873 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9874 <param name="codesStored" type="unsigned long" dir="return"/>
9875 </method>
9876
9877 <method name="putCAD">
9878 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9879 function is nothing special, it is just a convenience function
9880 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9881
9882 <result name="VBOX_E_IPRT_ERROR">
9883 Could not send all scan codes to virtual keyboard.
9884 </result>
9885
9886 </desc>
9887 </method>
9888
9889 </interface>
9890
9891
9892 <!--
9893 // IMouse
9894 /////////////////////////////////////////////////////////////////////////
9895 -->
9896
9897 <enum
9898 name="MouseButtonState"
9899 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9900 >
9901 <desc>
9902 Mouse button state.
9903 </desc>
9904
9905 <const name="LeftButton" value="0x01"/>
9906 <const name="RightButton" value="0x02"/>
9907 <const name="MiddleButton" value="0x04"/>
9908 <const name="WheelUp" value="0x08"/>
9909 <const name="WheelDown" value="0x10"/>
9910 <const name="MouseStateMask" value="0x1F"/>
9911 </enum>
9912
9913 <interface
9914 name="IMouse" extends="$unknown"
9915 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9916 wsmap="managed"
9917 >
9918 <desc>
9919 The IMouse interface represents the virtual machine's mouse. Used in
9920 <link to="IConsole::mouse"/>.
9921
9922 Through this interface, the virtual machine's virtual mouse can be
9923 controlled.
9924 </desc>
9925
9926 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9927 <desc>
9928 Whether the guest OS supports absolute mouse pointer positioning
9929 or not.
9930 <note>
9931 VirtualBox Guest Tools need to be installed to the guest OS
9932 in order to enable absolute mouse positioning support.
9933 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9934 callback to be instantly informed about changes of this attribute
9935 during virtual machine execution.
9936 </note>
9937 <see><link to="#putMouseEventAbsolute"/></see>
9938 </desc>
9939 </attribute>
9940
9941 <method name="putMouseEvent">
9942 <desc>
9943 Initiates a mouse event using relative pointer movements
9944 along x and y axis.
9945
9946 <result name="E_ACCESSDENIED">
9947 Console not powered up.
9948 </result>
9949 <result name="VBOX_E_IPRT_ERROR">
9950 Could not send mouse event to virtual mouse.
9951 </result>
9952
9953 </desc>
9954
9955 <param name="dx" type="long" dir="in">
9956 <desc>
9957 Amount of pixels the mouse should move to the right.
9958 Negative values move the mouse to the left.
9959 </desc>
9960 </param>
9961 <param name="dy" type="long" dir="in">
9962 <desc>
9963 Amount of pixels the mouse should move downwards.
9964 Negative values move the mouse upwards.
9965 </desc>
9966 </param>
9967 <param name="dz" type="long" dir="in">
9968 <desc>
9969 Amount of mouse wheel moves.
9970 Positive values describe clockwise wheel rotations,
9971 negative values describe counterclockwise rotations.
9972 </desc>
9973 </param>
9974 <param name="buttonState" type="long" dir="in">
9975 <desc>
9976 The current state of mouse buttons. Every bit represents
9977 a mouse button as follows:
9978 <table>
9979 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9980 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9981 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9982 </table>
9983 A value of <tt>1</tt> means the corresponding button is pressed.
9984 otherwise it is released.
9985 </desc>
9986 </param>
9987 </method>
9988
9989 <method name="putMouseEventAbsolute">
9990 <desc>
9991 Positions the mouse pointer using absolute x and y coordinates.
9992 These coordinates are expressed in pixels and
9993 start from <tt>[1,1]</tt> which corresponds to the top left
9994 corner of the virtual display.
9995
9996 <result name="E_ACCESSDENIED">
9997 Console not powered up.
9998 </result>
9999 <result name="VBOX_E_IPRT_ERROR">
10000 Could not send mouse event to virtual mouse.
10001 </result>
10002
10003 <note>
10004 This method will have effect only if absolute mouse
10005 positioning is supported by the guest OS.
10006 </note>
10007
10008 <see><link to="#absoluteSupported"/></see>
10009 </desc>
10010
10011 <param name="x" type="long" dir="in">
10012 <desc>
10013 X coordinate of the pointer in pixels, starting from @c 1.
10014 </desc>
10015 </param>
10016 <param name="y" type="long" dir="in">
10017 <desc>
10018 Y coordinate of the pointer in pixels, starting from @c 1.
10019 </desc>
10020 </param>
10021 <param name="dz" type="long" dir="in">
10022 <desc>
10023 Amount of mouse wheel moves.
10024 Positive values describe clockwise wheel rotations,
10025 negative values describe counterclockwise rotations.
10026 </desc>
10027 </param>
10028 <param name="buttonState" type="long" dir="in">
10029 <desc>
10030 The current state of mouse buttons. Every bit represents
10031 a mouse button as follows:
10032 <table>
10033 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10034 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10035 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10036 </table>
10037 A value of @c 1 means the corresponding button is pressed.
10038 otherwise it is released.
10039 </desc>
10040 </param>
10041 </method>
10042
10043 </interface>
10044
10045 <!--
10046 // IDisplay
10047 /////////////////////////////////////////////////////////////////////////
10048 -->
10049
10050 <enum
10051 name="FramebufferPixelFormat"
10052 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10053 >
10054 <desc>
10055 Format of the video memory buffer. Constants represented by this enum can
10056 be used to test for particular values of <link
10057 to="IFramebuffer::pixelFormat"/>. See also <link
10058 to="IFramebuffer::requestResize"/>.
10059
10060 See also www.fourcc.org for more information about FOURCC pixel formats.
10061 </desc>
10062
10063 <const name="Opaque" value="0">
10064 <desc>
10065 Unknown buffer format (the user may not assume any particular format of
10066 the buffer).
10067 </desc>
10068 </const>
10069 <const name="FOURCC_RGB" value="0x32424752">
10070 <desc>
10071 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10072 bit layout).
10073 </desc>
10074 </const>
10075 </enum>
10076
10077 <interface
10078 name="IFramebuffer" extends="$unknown"
10079 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10080 wsmap="suppress"
10081 >
10082 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10083 <desc>Address of the start byte of the frame buffer.</desc>
10084 </attribute>
10085
10086 <attribute name="width" type="unsigned long" readonly="yes">
10087 <desc>Frame buffer width, in pixels.</desc>
10088 </attribute>
10089
10090 <attribute name="height" type="unsigned long" readonly="yes">
10091 <desc>Frame buffer height, in pixels.</desc>
10092 </attribute>
10093
10094 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10095 <desc>
10096 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10097 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10098 are: 8, 15, 16, 24 and 32.
10099 </desc>
10100 </attribute>
10101
10102 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10103 <desc>
10104 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10105 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10106 size of the scan line must be aligned to 32 bits.
10107 </desc>
10108 </attribute>
10109
10110 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10111 <desc>
10112 Frame buffer pixel format. It's either one of the values defined by <link
10113 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10114 <note>
10115 This attribute must never return <link
10116 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10117 <link to="#address"/> points to must be always known.
10118 </note>
10119 </desc>
10120 </attribute>
10121
10122 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10123 <desc>
10124 Defines whether this frame buffer uses the virtual video card's memory
10125 buffer (guest VRAM) directly or not. See <link
10126 to="IFramebuffer::requestResize"/> for more information.
10127 </desc>
10128 </attribute>
10129
10130 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10131 <desc>
10132 Hint from the frame buffer about how much of the standard
10133 screen height it wants to use for itself. This information is
10134 exposed to the guest through the VESA BIOS and VMMDev interface
10135 so that it can use it for determining its video mode table. It
10136 is not guaranteed that the guest respects the value.
10137 </desc>
10138 </attribute>
10139
10140 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10141 <desc>
10142 An alpha-blended overlay which is superposed over the frame buffer.
10143 The initial purpose is to allow the display of icons providing
10144 information about the VM state, including disk activity, in front
10145 ends which do not have other means of doing that. The overlay is
10146 designed to controlled exclusively by IDisplay. It has no locking
10147 of its own, and any changes made to it are not guaranteed to be
10148 visible until the affected portion of IFramebuffer is updated. The
10149 overlay can be created lazily the first time it is requested. This
10150 attribute can also return @c null to signal that the overlay is not
10151 implemented.
10152 </desc>
10153 </attribute>
10154
10155 <attribute name="winId" type="unsigned long long" readonly="yes">
10156 <desc>
10157 Platform-dependent identifier of the window where context of this
10158 frame buffer is drawn, or zero if there's no such window.
10159 </desc>
10160 </attribute>
10161
10162 <method name="lock">
10163 <desc>
10164 Locks the frame buffer.
10165 Gets called by the IDisplay object where this frame buffer is
10166 bound to.
10167 </desc>
10168 </method>
10169
10170 <method name="unlock">
10171 <desc>
10172 Unlocks the frame buffer.
10173 Gets called by the IDisplay object where this frame buffer is
10174 bound to.
10175 </desc>
10176 </method>
10177
10178 <method name="notifyUpdate">
10179 <desc>
10180 Informs about an update.
10181 Gets called by the display object where this buffer is
10182 registered.
10183 </desc>
10184 <param name="x" type="unsigned long" dir="in"/>
10185 <param name="y" type="unsigned long" dir="in"/>
10186 <param name="width" type="unsigned long" dir="in"/>
10187 <param name="height" type="unsigned long" dir="in"/>
10188 </method>
10189
10190 <method name="requestResize">
10191 <desc>
10192 Requests a size and pixel format change.
10193
10194 There are two modes of working with the video buffer of the virtual
10195 machine. The <i>indirect</i> mode implies that the IFramebuffer
10196 implementation allocates a memory buffer for the requested display mode
10197 and provides it to the virtual machine. In <i>direct</i> mode, the
10198 IFramebuffer implementation uses the memory buffer allocated and owned
10199 by the virtual machine. This buffer represents the video memory of the
10200 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10201 usually faster because the implementation gets a raw pointer to the
10202 guest VRAM buffer which it can directly use for visualizing the contents
10203 of the virtual display, as opposed to the indirect mode where the
10204 contents of guest VRAM are copied to the memory buffer provided by
10205 the implementation every time a display update occurs.
10206
10207 It is important to note that the direct mode is really fast only when
10208 the implementation uses the given guest VRAM buffer directly, for
10209 example, by blitting it to the window representing the virtual machine's
10210 display, which saves at least one copy operation comparing to the
10211 indirect mode. However, using the guest VRAM buffer directly is not
10212 always possible: the format and the color depth of this buffer may be
10213 not supported by the target window, or it may be unknown (opaque) as in
10214 case of text or non-linear multi-plane VGA video modes. In this case,
10215 the indirect mode (that is always available) should be used as a
10216 fallback: when the guest VRAM contents are copied to the
10217 implementation-provided memory buffer, color and format conversion is
10218 done automatically by the underlying code.
10219
10220 The @a pixelFormat parameter defines whether the direct mode is
10221 available or not. If @a pixelFormat is <link
10222 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10223 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10224 @a bytesPerLine parameters must be ignored and the implementation must use
10225 the indirect mode (where it provides its own buffer in one of the
10226 supported formats). In all other cases, @a pixelFormat together with
10227 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10228 buffer pointed to by the @a VRAM parameter and the implementation is
10229 free to choose which mode to use. To indicate that this frame buffer uses
10230 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10231 attribute must return @c true and <link to="#address"/> must
10232 return exactly the same address that is passed in the @a VRAM parameter
10233 of this method; otherwise it is assumed that the indirect strategy is
10234 chosen.
10235
10236 The @a width and @a height parameters represent the size of the
10237 requested display mode in both modes. In case of indirect mode, the
10238 provided memory buffer should be big enough to store data of the given
10239 display mode. In case of direct mode, it is guaranteed that the given
10240 @a VRAM buffer contains enough space to represent the display mode of the
10241 given size. Note that this frame buffer's <link to="#width"/> and <link
10242 to="#height"/> attributes must return exactly the same values as
10243 passed to this method after the resize is completed (see below).
10244
10245 The @a finished output parameter determines if the implementation has
10246 finished resizing the frame buffer or not. If, for some reason, the
10247 resize cannot be finished immediately during this call, @a finished
10248 must be set to @c false, and the implementation must call
10249 <link to="IDisplay::resizeCompleted"/> after it has returned from
10250 this method as soon as possible. If @a finished is @c false, the
10251 machine will not call any frame buffer methods until
10252 <link to="IDisplay::resizeCompleted"/> is called.
10253
10254 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10255 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10256 this frame buffer must return exactly the same values as specified in the
10257 parameters of this method, after the resize is completed. If the
10258 indirect mode is chosen, these attributes must return values describing
10259 the format of the implementation's own memory buffer <link
10260 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10261 value must always correlate with <link to="#pixelFormat"/>. Note that
10262 the <link to="#pixelFormat"/> attribute must never return <link
10263 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10264
10265 <note>
10266 This method is called by the IDisplay object under the
10267 <link to="#lock"/> provided by this IFramebuffer
10268 implementation. If this method returns @c false in @a finished, then
10269 this lock is not released until
10270 <link to="IDisplay::resizeCompleted"/> is called.
10271 </note>
10272 </desc>
10273 <param name="screenId" type="unsigned long" dir="in">
10274 <desc>
10275 Logical screen number. Must be used in the corresponding call to
10276 <link to="IDisplay::resizeCompleted"/> if this call is made.
10277 </desc>
10278 </param>
10279 <param name="pixelFormat" type="unsigned long" dir="in">
10280 <desc>
10281 Pixel format of the memory buffer pointed to by @a VRAM.
10282 See also <link to="FramebufferPixelFormat"/>.
10283 </desc>
10284 </param>
10285 <param name="VRAM" type="octet" mod="ptr" dir="in">
10286 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10287 </param>
10288 <param name="bitsPerPixel" type="unsigned long" dir="in">
10289 <desc>Color depth, bits per pixel.</desc>
10290 </param>
10291 <param name="bytesPerLine" type="unsigned long" dir="in">
10292 <desc>Size of one scan line, in bytes.</desc>
10293 </param>
10294 <param name="width" type="unsigned long" dir="in">
10295 <desc>Width of the guest display, in pixels.</desc>
10296 </param>
10297 <param name="height" type="unsigned long" dir="in">
10298 <desc>Height of the guest display, in pixels.</desc>
10299 </param>
10300 <param name="finished" type="boolean" dir="return">
10301 <desc>
10302 Can the VM start using the new frame buffer immediately
10303 after this method returns or it should wait for
10304 <link to="IDisplay::resizeCompleted"/>.
10305 </desc>
10306 </param>
10307 </method>
10308
10309 <method name="videoModeSupported">
10310 <desc>
10311 Returns whether the frame buffer implementation is willing to
10312 support a given video mode. In case it is not able to render
10313 the video mode (or for some reason not willing), it should
10314 return @c false. Usually this method is called when the guest
10315 asks the VMM device whether a given video mode is supported
10316 so the information returned is directly exposed to the guest.
10317 It is important that this method returns very quickly.
10318 </desc>
10319 <param name="width" type="unsigned long" dir="in"/>
10320 <param name="height" type="unsigned long" dir="in"/>
10321 <param name="bpp" type="unsigned long" dir="in"/>
10322 <param name="supported" type="boolean" dir="return"/>
10323 </method>
10324
10325 <method name="getVisibleRegion">
10326 <desc>
10327 Returns the visible region of this frame buffer.
10328
10329 If the @a rectangles parameter is @c null then the value of the
10330 @a count parameter is ignored and the number of elements necessary to
10331 describe the current visible region is returned in @a countCopied.
10332
10333 If @a rectangles is not @c null but @a count is less
10334 than the required number of elements to store region data, the method
10335 will report a failure. If @a count is equal or greater than the
10336 required number of elements, then the actual number of elements copied
10337 to the provided array will be returned in @a countCopied.
10338
10339 <note>
10340 The address of the provided array must be in the process space of
10341 this IFramebuffer object.
10342 </note>
10343 <note>
10344 Method not yet implemented.
10345 </note>
10346 </desc>
10347 <param name="rectangles" type="octet" mod="ptr" dir="in">
10348 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10349 </param>
10350 <param name="count" type="unsigned long" dir="in">
10351 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10352 </param>
10353 <param name="countCopied" type="unsigned long" dir="return">
10354 <desc>Number of elements copied to the @a rectangles array.</desc>
10355 </param>
10356 </method>
10357
10358 <method name="setVisibleRegion">
10359 <desc>
10360 Suggests a new visible region to this frame buffer. This region
10361 represents the area of the VM display which is a union of regions of
10362 all top-level windows of the guest operating system running inside the
10363 VM (if the Guest Additions for this system support this
10364 functionality). This information may be used by the frontends to
10365 implement the seamless desktop integration feature.
10366
10367 <note>
10368 The address of the provided array must be in the process space of
10369 this IFramebuffer object.
10370 </note>
10371 <note>
10372 The IFramebuffer implementation must make a copy of the provided
10373 array of rectangles.
10374 </note>
10375 <note>
10376 Method not yet implemented.
10377 </note>
10378 </desc>
10379 <param name="rectangles" type="octet" mod="ptr" dir="in">
10380 <desc>Pointer to the @c RTRECT array.</desc>
10381 </param>
10382 <param name="count" type="unsigned long" dir="in">
10383 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10384 </param>
10385 </method>
10386
10387 <method name="processVHWACommand">
10388 <desc>
10389 Posts a Video HW Acceleration Command to the frame buffer for processing.
10390 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10391 are posted from quest to the host to be processed by the host hardware.
10392
10393 <note>
10394 The address of the provided command must be in the process space of
10395 this IFramebuffer object.
10396 </note>
10397 </desc>
10398
10399 <param name="command" type="octet" mod="ptr" dir="in">
10400 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10401 </param>
10402 </method>
10403
10404 </interface>
10405
10406 <interface
10407 name="IFramebufferOverlay" extends="IFramebuffer"
10408 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10409 wsmap="suppress"
10410 >
10411 <desc>
10412 The IFramebufferOverlay interface represents an alpha blended overlay
10413 for displaying status icons above an IFramebuffer. It is always created
10414 not visible, so that it must be explicitly shown. It only covers a
10415 portion of the IFramebuffer, determined by its width, height and
10416 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10417 that order) format, and may be written to directly. Do re-read the
10418 width though, after setting it, as it may be adjusted (increased) to
10419 make it more suitable for the front end.
10420 </desc>
10421 <attribute name="x" type="unsigned long" readonly="yes">
10422 <desc>X position of the overlay, relative to the frame buffer.</desc>
10423 </attribute>
10424
10425 <attribute name="y" type="unsigned long" readonly="yes">
10426 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10427 </attribute>
10428
10429 <attribute name="visible" type="boolean" readonly="no">
10430 <desc>
10431 Whether the overlay is currently visible.
10432 </desc>
10433 </attribute>
10434
10435 <attribute name="alpha" type="unsigned long" readonly="no">
10436 <desc>
10437 The global alpha value for the overlay. This may or may not be
10438 supported by a given front end.
10439 </desc>
10440 </attribute>
10441
10442 <method name="move">
10443 <desc>
10444 Changes the overlay's position relative to the IFramebuffer.
10445 </desc>
10446 <param name="x" type="unsigned long" dir="in"/>
10447 <param name="y" type="unsigned long" dir="in"/>
10448 </method>
10449
10450 </interface>
10451
10452 <interface
10453 name="IDisplay" extends="$unknown"
10454 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10455 wsmap="managed"
10456 >
10457 <desc>
10458 The IDisplay interface represents the virtual machine's display.
10459
10460 The object implementing this interface is contained in each
10461 <link to="IConsole::display"/> attribute and represents the visual
10462 output of the virtual machine.
10463
10464 The virtual display supports pluggable output targets represented by the
10465 IFramebuffer interface. Examples of the output target are a window on
10466 the host computer or an RDP session's display on a remote computer.
10467 </desc>
10468 <attribute name="width" type="unsigned long" readonly="yes">
10469 <desc>Current display width.</desc>
10470 </attribute>
10471
10472 <attribute name="height" type="unsigned long" readonly="yes">
10473 <desc>Current display height.</desc>
10474 </attribute>
10475
10476 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10477 <desc>
10478 Current guest display color depth. Note that this may differ
10479 from <link to="IFramebuffer::bitsPerPixel"/>.
10480 </desc>
10481 </attribute>
10482
10483 <method name="setFramebuffer">
10484 <desc>
10485 Sets the framebuffer for given screen.
10486 </desc>
10487 <param name="screenId" type="unsigned long" dir="in"/>
10488 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10489 </method>
10490
10491 <method name="getFramebuffer">
10492 <desc>
10493 Queries the framebuffer for given screen.
10494 </desc>
10495 <param name="screenId" type="unsigned long" dir="in"/>
10496 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10497 <param name="xOrigin" type="long" dir="out"/>
10498 <param name="yOrigin" type="long" dir="out"/>
10499 </method>
10500
10501 <method name="setVideoModeHint">
10502 <desc>
10503 Asks VirtualBox to request the given video mode from
10504 the guest. This is just a hint and it cannot be guaranteed
10505 that the requested resolution will be used. Guest Additions
10506 are required for the request to be seen by guests. The caller
10507 should issue the request and wait for a resolution change and
10508 after a timeout retry.
10509
10510 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10511 parameters means that the corresponding values should be taken from the
10512 current video mode (i.e. left unchanged).
10513
10514 If the guest OS supports multi-monitor configuration then the @a display
10515 parameter specifies the number of the guest display to send the hint to:
10516 @c 0 is the primary display, @c 1 is the first secondary and
10517 so on. If the multi-monitor configuration is not supported, @a display
10518 must be @c 0.
10519
10520 <result name="E_INVALIDARG">
10521 The @a display is not associated with any monitor.
10522 </result>
10523
10524 </desc>
10525 <param name="width" type="unsigned long" dir="in"/>
10526 <param name="height" type="unsigned long" dir="in"/>
10527 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10528 <param name="display" type="unsigned long" dir="in"/>
10529 </method>
10530
10531 <method name="setSeamlessMode">
10532 <desc>
10533 Enables or disables seamless guest display rendering (seamless desktop
10534 integration) mode.
10535 <note>
10536 Calling this method has no effect if <link
10537 to="IGuest::supportsSeamless"/> returns @c false.
10538 </note>
10539 </desc>
10540 <param name="enabled" type="boolean" dir="in"/>
10541 </method>
10542
10543 <method name="takeScreenShot">
10544 <desc>
10545 Takes a screen shot of the requested size and copies it to the
10546 32-bpp buffer allocated by the caller and pointed to by @a address.
10547
10548 <note>This API can be used only by the COM/XPCOM C++ API as it
10549 requires pointer support. Use <link to="#takeScreenShotSlow" />
10550 with other language bindings.
10551 </note>
10552
10553 <result name="E_NOTIMPL">
10554 Feature not implemented.
10555 </result>
10556 <result name="VBOX_E_IPRT_ERROR">
10557 Could not take a screenshot.
10558 </result>
10559
10560 </desc>
10561 <param name="address" type="octet" mod="ptr" dir="in"/>
10562 <param name="width" type="unsigned long" dir="in"/>
10563 <param name="height" type="unsigned long" dir="in"/>
10564 </method>
10565
10566 <method name="takeScreenShotSlow">
10567 <desc>
10568 Takes a guest screen shot of the requested size and returns it as
10569 an array of bytes in uncompressed 32-bit ARGB format.
10570 This API is slow, but could be the only option to get guest screenshot
10571 for scriptable languages not allowed to manipulate with addresses
10572 directly.
10573
10574 <result name="E_NOTIMPL">
10575 Feature not implemented.
10576 </result>
10577 <result name="VBOX_E_IPRT_ERROR">
10578 Could not take a screenshot.
10579 </result>
10580 </desc>
10581 <param name="width" type="unsigned long" dir="in">
10582 <desc>
10583 Desired image width.
10584 </desc>
10585 </param>
10586 <param name="height" type="unsigned long" dir="in">
10587 <desc>
10588 Desired image height.
10589 </desc>
10590 </param>
10591 <param name="screenData" type="octet" dir="return" safearray="yes">
10592 <desc>
10593 Array with resulting screen data.
10594 </desc>
10595 </param>
10596 </method>
10597
10598 <method name="drawToScreen">
10599 <desc>
10600 Draws a 32-bpp image of the specified size from the given buffer
10601 to the given point on the VM display.
10602
10603 <result name="E_NOTIMPL">
10604 Feature not implemented.
10605 </result>
10606 <result name="VBOX_E_IPRT_ERROR">
10607 Could not draw to screen.
10608 </result>
10609
10610 </desc>
10611 <param name="address" type="octet" mod="ptr" dir="in"/>
10612 <param name="x" type="unsigned long" dir="in"/>
10613 <param name="y" type="unsigned long" dir="in"/>
10614 <param name="width" type="unsigned long" dir="in"/>
10615 <param name="height" type="unsigned long" dir="in"/>
10616 </method>
10617
10618 <method name="invalidateAndUpdate">
10619 <desc>
10620 Does a full invalidation of the VM display and instructs the VM
10621 to update it.
10622
10623 <result name="VBOX_E_IPRT_ERROR">
10624 Could not invalidate and update screen.
10625 </result>
10626
10627 </desc>
10628 </method>
10629
10630 <method name="resizeCompleted">
10631 <desc>
10632 Signals that a framebuffer has completed the resize operation.
10633
10634 <result name="VBOX_E_NOT_SUPPORTED">
10635 Operation only valid for external frame buffers.
10636 </result>
10637
10638 </desc>
10639 <param name="screenId" type="unsigned long" dir="in"/>
10640 </method>
10641
10642 <method name="updateCompleted">
10643 <desc>
10644 Signals that a framebuffer has completed the update operation.
10645
10646 <result name="VBOX_E_NOT_SUPPORTED">
10647 Operation only valid for external frame buffers.
10648 </result>
10649
10650 </desc>
10651 </method>
10652
10653 <method name="completeVHWACommand">
10654 <desc>
10655 Signals that the Video HW Acceleration command has completed.
10656 </desc>
10657
10658 <param name="command" type="octet" mod="ptr" dir="in">
10659 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10660 </param>
10661 </method>
10662
10663 </interface>
10664
10665 <!--
10666 // INetworkAdapter
10667 /////////////////////////////////////////////////////////////////////////
10668 -->
10669
10670 <enum
10671 name="NetworkAttachmentType"
10672 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10673 >
10674 <desc>
10675 Network attachment type.
10676 </desc>
10677
10678 <const name="Null" value="0">
10679 <desc>Null value, also means "not attached".</desc>
10680 </const>
10681 <const name="NAT" value="1"/>
10682 <const name="Bridged" value="2"/>
10683 <const name="Internal" value="3"/>
10684 <const name="HostOnly" value="4"/>
10685 </enum>
10686
10687 <enum
10688 name="NetworkAdapterType"
10689 uuid="50c3dfd8-07ac-4a31-baac-519c828fbf97"
10690 >
10691 <desc>
10692 Network adapter type.
10693 </desc>
10694
10695 <const name="Null" value="0">
10696 <desc>Null value (never used by the API).</desc>
10697 </const>
10698 <const name="Am79C970A" value="1">
10699 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10700 </const>
10701 <const name="Am79C973" value="2">
10702 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10703 </const>
10704 <const name="I82540EM" value="3">
10705 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10706 </const>
10707 <const name="I82543GC" value="4">
10708 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10709 </const>
10710 <const name="I82545EM" value="5">
10711 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10712 </const>
10713 </enum>
10714
10715 <interface
10716 name="INetworkAdapter" extends="$unknown"
10717 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10718 wsmap="managed"
10719 >
10720 <desc>
10721 Represents a virtual network adapter that is attached to a virtual machine.
10722 Each virtual machine has a fixed number of network adapter slots with one
10723 instance of this attached to each of them. Call
10724 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10725 is attached to a given slot in a given machine.
10726
10727 Each network adapter can be in one of five attachment modes, which are
10728 represented by the <link to="NetworkAttachmentType" /> enumeration;
10729 see the <link to="#attachmentType" /> attribute.
10730 </desc>
10731
10732 <attribute name="adapterType" type="NetworkAdapterType">
10733 <desc>
10734 Type of the virtual network adapter. Depending on this value,
10735 VirtualBox will provide a different virtual network hardware
10736 to the guest.
10737 </desc>
10738 </attribute>
10739
10740 <attribute name="slot" type="unsigned long" readonly="yes">
10741 <desc>
10742 Slot number this adapter is plugged into. Corresponds to
10743 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10744 to obtain this instance.
10745 </desc>
10746 </attribute>
10747
10748 <attribute name="enabled" type="boolean">
10749 <desc>
10750 Flag whether the network adapter is present in the
10751 guest system. If disabled, the virtual guest hardware will
10752 not contain this network adapter. Can only be changed when
10753 the VM is not running.
10754 </desc>
10755 </attribute>
10756
10757 <attribute name="MACAddress" type="wstring">
10758 <desc>
10759 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10760 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10761 </desc>
10762 </attribute>
10763
10764 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10765
10766 <attribute name="hostInterface" type="wstring">
10767 <desc>
10768 Name of the host network interface the VM is attached to.
10769 </desc>
10770 </attribute>
10771
10772 <attribute name="internalNetwork" type="wstring">
10773 <desc>
10774 Name of the internal network the VM is attached to.
10775 </desc>
10776 </attribute>
10777
10778 <attribute name="NATNetwork" type="wstring">
10779 <desc>
10780 Name of the NAT network the VM is attached to.
10781 </desc>
10782 </attribute>
10783
10784 <attribute name="cableConnected" type="boolean">
10785 <desc>
10786 Flag whether the adapter reports the cable as connected or not.
10787 It can be used to report offline situations to a VM.
10788 </desc>
10789 </attribute>
10790
10791 <attribute name="lineSpeed" type="unsigned long">
10792 <desc>
10793 Line speed reported by custom drivers, in units of 1 kbps.
10794 </desc>
10795 </attribute>
10796
10797 <attribute name="traceEnabled" type="boolean">
10798 <desc>
10799 Flag whether network traffic from/to the network card should be traced.
10800 Can only be toggled when the VM is turned off.
10801 </desc>
10802 </attribute>
10803
10804 <attribute name="traceFile" type="wstring">
10805 <desc>
10806 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10807 will be used.
10808 </desc>
10809 </attribute>
10810
10811 <method name="attachToNAT">
10812 <desc>
10813 Attach the network adapter to the Network Address Translation (NAT) interface.
10814 </desc>
10815 </method>
10816
10817 <method name="attachToBridgedInterface">
10818 <desc>
10819 Attach the network adapter to a bridged host interface.
10820 </desc>
10821 </method>
10822
10823 <method name="attachToInternalNetwork">
10824 <desc>
10825 Attach the network adapter to an internal network.
10826 </desc>
10827 </method>
10828
10829 <method name="attachToHostOnlyInterface">
10830 <desc>
10831 Attach the network adapter to the host-only network.
10832 </desc>
10833 </method>
10834
10835 <method name="detach">
10836 <desc>
10837 Detach the network adapter
10838 </desc>
10839 </method>
10840 </interface>
10841
10842
10843 <!--
10844 // ISerialPort
10845 /////////////////////////////////////////////////////////////////////////
10846 -->
10847
10848 <enum
10849 name="PortMode"
10850 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
10851 >
10852 <desc>
10853 The PortMode enumeration represents possible communication modes for
10854 the virtual serial port device.
10855 </desc>
10856
10857 <const name="Disconnected" value="0">
10858 <desc>Virtual device is not attached to any real host device.</desc>
10859 </const>
10860 <const name="HostPipe" value="1">
10861 <desc>Virtual device is attached to a host pipe.</desc>
10862 </const>
10863 <const name="HostDevice" value="2">
10864 <desc>Virtual device is attached to a host device.</desc>
10865 </const>
10866 <const name="RawFile" value="3">
10867 <desc>Virtual device is attached to a raw file.</desc>
10868 </const>
10869 </enum>
10870
10871 <interface
10872 name="ISerialPort" extends="$unknown"
10873 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10874 wsmap="managed"
10875 >
10876
10877 <desc>
10878 The ISerialPort interface represents the virtual serial port device.
10879
10880 The virtual serial port device acts like an ordinary serial port
10881 inside the virtual machine. This device communicates to the real
10882 serial port hardware in one of two modes: host pipe or host device.
10883
10884 In host pipe mode, the #path attribute specifies the path to the pipe on
10885 the host computer that represents a serial port. The #server attribute
10886 determines if this pipe is created by the virtual machine process at
10887 machine startup or it must already exist before starting machine
10888 execution.
10889
10890 In host device mode, the #path attribute specifies the name of the
10891 serial port device on the host computer.
10892
10893 There is also a third communication mode: the disconnected mode. In this
10894 mode, the guest OS running inside the virtual machine will be able to
10895 detect the serial port, but all port write operations will be discarded
10896 and all port read operations will return no data.
10897
10898 <see>IMachine::getSerialPort</see>
10899 </desc>
10900
10901 <attribute name="slot" type="unsigned long" readonly="yes">
10902 <desc>
10903 Slot number this serial port is plugged into. Corresponds to
10904 the value you pass to <link to="IMachine::getSerialPort"/>
10905 to obtain this instance.
10906 </desc>
10907 </attribute>
10908
10909 <attribute name="enabled" type="boolean">
10910 <desc>
10911 Flag whether the serial port is enabled. If disabled,
10912 the serial port will not be reported to the guest OS.
10913 </desc>
10914 </attribute>
10915
10916 <attribute name="IOBase" type="unsigned long">
10917 <desc>Base I/O address of the serial port.</desc>
10918 </attribute>
10919
10920 <attribute name="IRQ" type="unsigned long">
10921 <desc>IRQ number of the serial port.</desc>
10922 </attribute>
10923
10924 <attribute name="hostMode" type="PortMode">
10925 <desc>
10926 How is this port connected to the host.
10927 <note>
10928 Changing this attribute may fail if the conditions for
10929 <link to="#path"/> are not met.
10930 </note>
10931 </desc>
10932 </attribute>
10933
10934 <attribute name="server" type="boolean">
10935 <desc>
10936 Flag whether this serial port acts as a server (creates a new pipe on
10937 the host) or as a client (uses the existing pipe). This attribute is
10938 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10939 </desc>
10940 </attribute>
10941
10942 <attribute name="path" type="wstring">
10943 <desc>
10944 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
10945 PortMode_HostPipe, or the host serial device name when
10946 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
10947 cases, setting a @c null or empty string as the attribute's value
10948 is an error. Otherwise, the value of this property is ignored.
10949 </desc>
10950 </attribute>
10951
10952 </interface>
10953
10954 <!--
10955 // IParallelPort
10956 /////////////////////////////////////////////////////////////////////////
10957 -->
10958
10959 <interface
10960 name="IParallelPort" extends="$unknown"
10961 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10962 wsmap="managed"
10963 >
10964
10965 <desc>
10966 The IParallelPort interface represents the virtual parallel port device.
10967
10968 The virtual parallel port device acts like an ordinary parallel port
10969 inside the virtual machine. This device communicates to the real
10970 parallel port hardware using the name of the parallel device on the host
10971 computer specified in the #path attribute.
10972
10973 Each virtual parallel port device is assigned a base I/O address and an
10974 IRQ number that will be reported to the guest operating system and used
10975 to operate the given parallel port from within the virtual machine.
10976
10977 <see>IMachine::getParallelPort</see>
10978 </desc>
10979
10980 <attribute name="slot" type="unsigned long" readonly="yes">
10981 <desc>
10982 Slot number this parallel port is plugged into. Corresponds to
10983 the value you pass to <link to="IMachine::getParallelPort"/>
10984 to obtain this instance.
10985 </desc>
10986 </attribute>
10987
10988 <attribute name="enabled" type="boolean">
10989 <desc>
10990 Flag whether the parallel port is enabled. If disabled,
10991 the parallel port will not be reported to the guest OS.
10992 </desc>
10993 </attribute>
10994
10995 <attribute name="IOBase" type="unsigned long">
10996 <desc>Base I/O address of the parallel port.</desc>
10997 </attribute>
10998
10999 <attribute name="IRQ" type="unsigned long">
11000 <desc>IRQ number of the parallel port.</desc>
11001 </attribute>
11002
11003 <attribute name="path" type="wstring">
11004 <desc>
11005 Host parallel device name. If this parallel port is enabled, setting a
11006 @c null or an empty string as this attribute's value will result into
11007 an error.
11008 </desc>
11009 </attribute>
11010
11011 </interface>
11012
11013
11014 <!--
11015 // IMachineDebugger
11016 /////////////////////////////////////////////////////////////////////////
11017 -->
11018
11019 <interface
11020 name="IMachineDebugger" extends="$unknown"
11021 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11022 wsmap="suppress"
11023 >
11024 <method name="resetStats">
11025 <desc>
11026 Reset VM statistics.
11027 </desc>
11028 <param name="pattern" type="wstring" dir="in">
11029 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11030 </param>
11031 </method>
11032
11033 <method name="dumpStats">
11034 <desc>
11035 Dumps VM statistics.
11036 </desc>
11037 <param name="pattern" type="wstring" dir="in">
11038 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11039 </param>
11040 </method>
11041
11042 <method name="getStats">
11043 <desc>
11044 Get the VM statistics in a XMLish format.
11045 </desc>
11046 <param name="pattern" type="wstring" dir="in">
11047 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11048 </param>
11049 <param name="withDescriptions" type="boolean" dir="in">
11050 <desc>Whether to include the descriptions.</desc>
11051 </param>
11052 <param name="stats" type="wstring" dir="out">
11053 <desc>The XML document containing the statistics.</desc>
11054 </param>
11055 </method>
11056
11057 <method name="injectNMI">
11058 <desc>
11059 Inject an NMI into a running VT-x/AMD-V VM.
11060 </desc>
11061 </method>
11062
11063 <attribute name="singlestep" type="boolean">
11064 <desc>Switch for enabling singlestepping.</desc>
11065 </attribute>
11066
11067 <attribute name="recompileUser" type="boolean">
11068 <desc>Switch for forcing code recompilation for user mode code.</desc>
11069 </attribute>
11070
11071 <attribute name="recompileSupervisor" type="boolean">
11072 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11073 </attribute>
11074
11075 <attribute name="PATMEnabled" type="boolean">
11076 <desc>Switch for enabling and disabling the PATM component.</desc>
11077 </attribute>
11078
11079 <attribute name="CSAMEnabled" type="boolean">
11080 <desc>Switch for enabling and disabling the CSAM component.</desc>
11081 </attribute>
11082
11083 <attribute name="logEnabled" type="boolean">
11084 <desc>Switch for enabling and disabling logging.</desc>
11085 </attribute>
11086
11087 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11088 <desc>
11089 Flag indicating whether the VM is currently making use of CPU hardware
11090 virtualization extensions.
11091 </desc>
11092 </attribute>
11093
11094 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11095 <desc>
11096 Flag indicating whether the VM is currently making use of the nested paging
11097 CPU hardware virtualization extension.
11098 </desc>
11099 </attribute>
11100
11101 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11102 <desc>
11103 Flag indicating whether the VM is currently making use of the VPID
11104 VT-x extension.
11105 </desc>
11106 </attribute>
11107
11108 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11109 <desc>
11110 Flag indicating whether the VM is currently making use of the Physical
11111 Address Extension CPU feature.
11112 </desc>
11113 </attribute>
11114
11115 <attribute name="virtualTimeRate" type="unsigned long">
11116 <desc>
11117 The rate at which the virtual time runs expressed as a percentage.
11118 The accepted range is 2% to 20000%.
11119 </desc>
11120 </attribute>
11121
11122 <!-- @todo method for setting log flags, groups and destination! -->
11123
11124 <attribute name="VM" type="unsigned long long" readonly="yes">
11125 <desc>
11126 Gets the VM handle. This is only for internal use while
11127 we carve the details of this interface.
11128 </desc>
11129 </attribute>
11130
11131 </interface>
11132
11133 <!--
11134 // IUSBController
11135 /////////////////////////////////////////////////////////////////////////
11136 -->
11137
11138 <interface
11139 name="IUSBController" extends="$unknown"
11140 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11141 wsmap="managed"
11142 >
11143 <attribute name="enabled" type="boolean">
11144 <desc>
11145 Flag whether the USB controller is present in the
11146 guest system. If disabled, the virtual guest hardware will
11147 not contain any USB controller. Can only be changed when
11148 the VM is powered off.
11149 </desc>
11150 </attribute>
11151
11152 <attribute name="enabledEhci" type="boolean">
11153 <desc>
11154 Flag whether the USB EHCI controller is present in the
11155 guest system. If disabled, the virtual guest hardware will
11156 not contain a USB EHCI controller. Can only be changed when
11157 the VM is powered off.
11158 </desc>
11159 </attribute>
11160
11161 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11162 <desc>
11163 USB standard version which the controller implements.
11164 This is a BCD which means that the major version is in the
11165 high byte and minor version is in the low byte.
11166 </desc>
11167 </attribute>
11168
11169 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11170 <desc>
11171 List of USB device filters associated with the machine.
11172
11173 If the machine is currently running, these filters are activated
11174 every time a new (supported) USB device is attached to the host
11175 computer that was not ignored by global filters
11176 (<link to="IHost::USBDeviceFilters"/>).
11177
11178 These filters are also activated when the machine is powered up.
11179 They are run against a list of all currently available USB
11180 devices (in states
11181 <link to="USBDeviceState_Available"/>,
11182 <link to="USBDeviceState_Busy"/>,
11183 <link to="USBDeviceState_Held"/>) that were not previously
11184 ignored by global filters.
11185
11186 If at least one filter matches the USB device in question, this
11187 device is automatically captured (attached to) the virtual USB
11188 controller of this machine.
11189
11190 <see>IUSBDeviceFilter, ::IUSBController</see>
11191 </desc>
11192 </attribute>
11193
11194 <method name="createDeviceFilter">
11195 <desc>
11196 Creates a new USB device filter. All attributes except
11197 the filter name are set to empty (any match),
11198 <i>active</i> is @c false (the filter is not active).
11199
11200 The created filter can then be added to the list of filters using
11201 <link to="#insertDeviceFilter"/>.
11202
11203 <result name="VBOX_E_INVALID_VM_STATE">
11204 The virtual machine is not mutable.
11205 </result>
11206
11207 <see>#deviceFilters</see>
11208 </desc>
11209 <param name="name" type="wstring" dir="in">
11210 <desc>
11211 Filter name. See <link to="IUSBDeviceFilter::name"/>
11212 for more info.
11213 </desc>
11214 </param>
11215 <param name="filter" type="IUSBDeviceFilter" dir="return">
11216 <desc>Created filter object.</desc>
11217 </param>
11218 </method>
11219
11220 <method name="insertDeviceFilter">
11221 <desc>
11222 Inserts the given USB device to the specified position
11223 in the list of filters.
11224
11225 Positions are numbered starting from <tt>0</tt>. If the specified
11226 position is equal to or greater than the number of elements in
11227 the list, the filter is added to the end of the collection.
11228
11229 <note>
11230 Duplicates are not allowed, so an attempt to insert a
11231 filter that is already in the collection, will return an
11232 error.
11233 </note>
11234
11235 <result name="VBOX_E_INVALID_VM_STATE">
11236 Virtual machine is not mutable.
11237 </result>
11238 <result name="E_INVALIDARG">
11239 USB device filter not created within this VirtualBox instance.
11240 </result>
11241 <result name="VBOX_E_INVALID_OBJECT_STATE">
11242 USB device filter already in list.
11243 </result>
11244
11245 <see>#deviceFilters</see>
11246 </desc>
11247 <param name="position" type="unsigned long" dir="in">
11248 <desc>Position to insert the filter to.</desc>
11249 </param>
11250 <param name="filter" type="IUSBDeviceFilter" dir="in">
11251 <desc>USB device filter to insert.</desc>
11252 </param>
11253 </method>
11254
11255 <method name="removeDeviceFilter">
11256 <desc>
11257 Removes a USB device filter from the specified position in the
11258 list of filters.
11259
11260 Positions are numbered starting from <tt>0</tt>. Specifying a
11261 position equal to or greater than the number of elements in
11262 the list will produce an error.
11263
11264 <see>#deviceFilters</see>
11265
11266 <result name="VBOX_E_INVALID_VM_STATE">
11267 Virtual machine is not mutable.
11268 </result>
11269 <result name="E_INVALIDARG">
11270 USB device filter list empty or invalid @a position.
11271 </result>
11272
11273 </desc>
11274 <param name="position" type="unsigned long" dir="in">
11275 <desc>Position to remove the filter from.</desc>
11276 </param>
11277 <param name="filter" type="IUSBDeviceFilter" dir="return">
11278 <desc>Removed USB device filter.</desc>
11279 </param>
11280 </method>
11281
11282 </interface>
11283
11284
11285 <!--
11286 // IUSBDevice
11287 /////////////////////////////////////////////////////////////////////////
11288 -->
11289
11290 <interface
11291 name="IUSBDevice" extends="$unknown"
11292 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11293 wsmap="managed"
11294 >
11295 <desc>
11296 The IUSBDevice interface represents a virtual USB device attached to the
11297 virtual machine.
11298
11299 A collection of objects implementing this interface is stored in the
11300 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11301 attached to a running virtual machine's USB controller.
11302 </desc>
11303
11304 <attribute name="id" type="wstring" readonly="yes">
11305 <desc>
11306 Unique USB device ID. This ID is built from #vendorId,
11307 #productId, #revision and #serialNumber.
11308 </desc>
11309 </attribute>
11310
11311 <attribute name="vendorId" type="unsigned short" readonly="yes">
11312 <desc>Vendor ID.</desc>
11313 </attribute>
11314
11315 <attribute name="productId" type="unsigned short" readonly="yes">
11316 <desc>Product ID.</desc>
11317 </attribute>
11318
11319 <attribute name="revision" type="unsigned short" readonly="yes">
11320 <desc>
11321 Product revision number. This is a packed BCD represented as
11322 unsigned short. The high byte is the integer part and the low
11323 byte is the decimal.
11324 </desc>
11325 </attribute>
11326
11327 <attribute name="manufacturer" type="wstring" readonly="yes">
11328 <desc>Manufacturer string.</desc>
11329 </attribute>
11330
11331 <attribute name="product" type="wstring" readonly="yes">
11332 <desc>Product string.</desc>
11333 </attribute>
11334
11335 <attribute name="serialNumber" type="wstring" readonly="yes">
11336 <desc>Serial number string.</desc>
11337 </attribute>
11338
11339 <attribute name="address" type="wstring" readonly="yes">
11340 <desc>Host specific address of the device.</desc>
11341 </attribute>
11342
11343 <attribute name="port" type="unsigned short" readonly="yes">
11344 <desc>
11345 Host USB port number the device is physically
11346 connected to.
11347 </desc>
11348 </attribute>
11349
11350 <attribute name="version" type="unsigned short" readonly="yes">
11351 <desc>
11352 The major USB version of the device - 1 or 2.
11353 </desc>
11354 </attribute>
11355
11356 <attribute name="portVersion" type="unsigned short" readonly="yes">
11357 <desc>
11358 The major USB version of the host USB port the device is
11359 physically connected to - 1 or 2. For devices not connected to
11360 anything this will have the same value as the version attribute.
11361 </desc>
11362 </attribute>
11363
11364 <attribute name="remote" type="boolean" readonly="yes">
11365 <desc>
11366 Whether the device is physically connected to a remote VRDP
11367 client or to a local host machine.
11368 </desc>
11369 </attribute>
11370
11371 </interface>
11372
11373
11374 <!--
11375 // IUSBDeviceFilter
11376 /////////////////////////////////////////////////////////////////////////
11377 -->
11378
11379 <interface
11380 name="IUSBDeviceFilter" extends="$unknown"
11381 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11382 wsmap="managed"
11383 >
11384 <desc>
11385 The IUSBDeviceFilter interface represents an USB device filter used
11386 to perform actions on a group of USB devices.
11387
11388 This type of filters is used by running virtual machines to
11389 automatically capture selected USB devices once they are physically
11390 attached to the host computer.
11391
11392 A USB device is matched to the given device filter if and only if all
11393 attributes of the device match the corresponding attributes of the
11394 filter (that is, attributes are joined together using the logical AND
11395 operation). On the other hand, all together, filters in the list of
11396 filters carry the semantics of the logical OR operation. So if it is
11397 desirable to create a match like "this vendor id OR this product id",
11398 one needs to create two filters and specify "any match" (see below)
11399 for unused attributes.
11400
11401 All filter attributes used for matching are strings. Each string
11402 is an expression representing a set of values of the corresponding
11403 device attribute, that will match the given filter. Currently, the
11404 following filtering expressions are supported:
11405
11406 <ul>
11407 <li><i>Interval filters</i>. Used to specify valid intervals for
11408 integer device attributes (Vendor ID, Product ID and Revision).
11409 The format of the string is:
11410
11411 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11412
11413 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11414 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11415 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11416 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11417 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11418 possible integer is assumed.
11419 </li>
11420 <li><i>Boolean filters</i>. Used to specify acceptable values for
11421 boolean device attributes. The format of the string is:
11422
11423 <tt>true|false|yes|no|0|1</tt>
11424
11425 </li>
11426 <li><i>Exact match</i>. Used to specify a single value for the given
11427 device attribute. Any string that doesn't start with <tt>int:</tt>
11428 represents the exact match. String device attributes are compared to
11429 this string including case of symbols. Integer attributes are first
11430 converted to a string (see individual filter attributes) and then
11431 compared ignoring case.
11432
11433 </li>
11434 <li><i>Any match</i>. Any value of the corresponding device attribute
11435 will match the given filter. An empty or @c null string is
11436 used to construct this type of filtering expressions.
11437
11438 </li>
11439 </ul>
11440
11441 <note>
11442 On the Windows host platform, interval filters are not currently
11443 available. Also all string filter attributes
11444 (<link to="#manufacturer"/>, <link to="#product"/>,
11445 <link to="#serialNumber"/>) are ignored, so they behave as
11446 <i>any match</i> no matter what string expression is specified.
11447 </note>
11448
11449 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11450 </desc>
11451
11452 <attribute name="name" type="wstring">
11453 <desc>
11454 Visible name for this filter.
11455 This name is used to visually distinguish one filter from another,
11456 so it can neither be @c null nor an empty string.
11457 </desc>
11458 </attribute>
11459
11460 <attribute name="active" type="boolean">
11461 <desc>Whether this filter active or has been temporarily disabled.</desc>
11462 </attribute>
11463
11464 <attribute name="vendorId" type="wstring">
11465 <desc>
11466 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11467 The string representation for the <i>exact matching</i>
11468 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11469 (including leading zeroes).
11470 </desc>
11471 </attribute>
11472
11473 <attribute name="productId" type="wstring">
11474 <desc>
11475 <link to="IUSBDevice::productId">Product ID</link> filter.
11476 The string representation for the <i>exact matching</i>
11477 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11478 (including leading zeroes).
11479 </desc>
11480 </attribute>
11481
11482 <attribute name="revision" type="wstring">
11483 <desc>
11484 <link to="IUSBDevice::productId">Product revision number</link>
11485 filter. The string representation for the <i>exact matching</i>
11486 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11487 of the integer part of the revision, and <tt>F</tt> is the
11488 decimal digit of its fractional part (including leading and
11489 trailing zeros).
11490 Note that for interval filters, it's best to use the hexadecimal
11491 form, because the revision is stored as a 16 bit packed BCD value;
11492 so the expression <tt>int:0x0100-0x0199</tt> will match any
11493 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11494 </desc>
11495 </attribute>
11496
11497 <attribute name="manufacturer" type="wstring">
11498 <desc>
11499 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11500 </desc>
11501 </attribute>
11502
11503 <attribute name="product" type="wstring">
11504 <desc>
11505 <link to="IUSBDevice::product">Product</link> filter.
11506 </desc>
11507 </attribute>
11508
11509 <attribute name="serialNumber" type="wstring">
11510 <desc>
11511 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11512 </desc>
11513 </attribute>
11514
11515 <attribute name="port" type="wstring">
11516 <desc>
11517 <link to="IUSBDevice::port">Host USB port</link> filter.
11518 </desc>
11519 </attribute>
11520
11521 <attribute name="remote" type="wstring">
11522 <desc>
11523 <link to="IUSBDevice::remote">Remote state</link> filter.
11524 <note>
11525 This filter makes sense only for machine USB filters,
11526 i.e. it is ignored by IHostUSBDeviceFilter objects.
11527 </note>
11528 </desc>
11529 </attribute>
11530
11531 <attribute name="maskedInterfaces" type="unsigned long">
11532 <desc>
11533 This is an advanced option for hiding one or more USB interfaces
11534 from the guest. The value is a bit mask where the bits that are set
11535 means the corresponding USB interface should be hidden, masked off
11536 if you like.
11537 This feature only works on Linux hosts.
11538 </desc>
11539 </attribute>
11540
11541 </interface>
11542
11543
11544 <!--
11545 // IHostUSBDevice
11546 /////////////////////////////////////////////////////////////////////////
11547 -->
11548
11549 <enum
11550 name="USBDeviceState"
11551 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11552 >
11553 <desc>
11554 USB device state. This enumeration represents all possible states
11555 of the USB device physically attached to the host computer regarding
11556 its state on the host computer and availability to guest computers
11557 (all currently running virtual machines).
11558
11559 Once a supported USB device is attached to the host, global USB
11560 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11561 either ignore the device, or put it to USBDeviceState_Held state, or do
11562 nothing. Unless the device is ignored by global filters, filters of all
11563 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11564 activated that can put it to USBDeviceState_Captured state.
11565
11566 If the device was ignored by global filters, or didn't match
11567 any filters at all (including guest ones), it is handled by the host
11568 in a normal way. In this case, the device state is determined by
11569 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11570 or USBDeviceState_Available, depending on the current device usage.
11571
11572 Besides auto-capturing based on filters, the device can be manually
11573 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11574 state is USBDeviceState_Busy, USBDeviceState_Available or
11575 USBDeviceState_Held.
11576
11577 <note>
11578 Due to differences in USB stack implementations in Linux and Win32,
11579 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11580 only to the Linux version of the product. This also means that (<link
11581 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11582 device state is USBDeviceState_Held.
11583 </note>
11584
11585 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11586 </desc>
11587
11588 <const name="NotSupported" value="0">
11589 <desc>
11590 Not supported by the VirtualBox server, not available to guests.
11591 </desc>
11592 </const>
11593 <const name="Unavailable" value="1">
11594 <desc>
11595 Being used by the host computer exclusively,
11596 not available to guests.
11597 </desc>
11598 </const>
11599 <const name="Busy" value="2">
11600 <desc>
11601 Being used by the host computer, potentially available to guests.
11602 </desc>
11603 </const>
11604 <const name="Available" value="3">
11605 <desc>
11606 Not used by the host computer, available to guests (the host computer
11607 can also start using the device at any time).
11608 </desc>
11609 </const>
11610 <const name="Held" value="4">
11611 <desc>
11612 Held by the VirtualBox server (ignored by the host computer),
11613 available to guests.
11614 </desc>
11615 </const>
11616 <const name="Captured" value="5">
11617 <desc>
11618 Captured by one of the guest computers, not available
11619 to anybody else.
11620 </desc>
11621 </const>
11622 </enum>
11623
11624 <interface
11625 name="IHostUSBDevice" extends="IUSBDevice"
11626 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11627 wsmap="managed"
11628 >
11629 <desc>
11630 The IHostUSBDevice interface represents a physical USB device attached
11631 to the host computer.
11632
11633 Besides properties inherited from IUSBDevice, this interface adds the
11634 <link to="#state"/> property that holds the current state of the USB
11635 device.
11636
11637 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11638 </desc>
11639
11640 <attribute name="state" type="USBDeviceState" readonly="yes">
11641 <desc>
11642 Current state of the device.
11643 </desc>
11644 </attribute>
11645
11646 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11647
11648 </interface>
11649
11650
11651 <!--
11652 // IHostUSBDeviceFilter
11653 /////////////////////////////////////////////////////////////////////////
11654 -->
11655
11656 <enum
11657 name="USBDeviceFilterAction"
11658 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11659 >
11660 <desc>
11661 Actions for host USB device filters.
11662 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11663 </desc>
11664
11665 <const name="Null" value="0">
11666 <desc>Null value (never used by the API).</desc>
11667 </const>
11668 <const name="Ignore" value="1">
11669 <desc>Ignore the matched USB device.</desc>
11670 </const>
11671 <const name="Hold" value="2">
11672 <desc>Hold the matched USB device.</desc>
11673 </const>
11674 </enum>
11675
11676 <interface
11677 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11678 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11679 wsmap="managed"
11680 >
11681 <desc>
11682 The IHostUSBDeviceFilter interface represents a global filter for a
11683 physical USB device used by the host computer. Used indirectly in
11684 <link to="IHost::USBDeviceFilters"/>.
11685
11686 Using filters of this type, the host computer determines the initial
11687 state of the USB device after it is physically attached to the
11688 host's USB controller.
11689
11690 <note>
11691 The <link to="#remote"/> attribute is ignored by this type of
11692 filters, because it makes sense only for
11693 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11694 </note>
11695
11696 <see>IHost::USBDeviceFilters</see>
11697 </desc>
11698
11699 <attribute name="action" type="USBDeviceFilterAction">
11700 <desc>
11701 Action performed by the host when an attached USB device
11702 matches this filter.
11703 </desc>
11704 </attribute>
11705
11706 </interface>
11707
11708 <!--
11709 // IAudioAdapter
11710 /////////////////////////////////////////////////////////////////////////
11711 -->
11712
11713 <enum
11714 name="AudioDriverType"
11715 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11716 >
11717 <desc>
11718 Host audio driver type.
11719 </desc>
11720
11721 <const name="Null" value="0">
11722 <desc>Null value, also means "dummy audio driver".</desc>
11723 </const>
11724 <const name="WinMM" value="1">
11725 <desc>Windows multimedia (Windows hosts only).</desc>
11726 </const>
11727 <const name="OSS" value="2">
11728 <desc>Open Sound System (Linux hosts only).</desc>
11729 </const>
11730 <const name="ALSA" value="3">
11731 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11732 </const>
11733 <const name="DirectSound" value="4">
11734 <desc>DirectSound (Windows hosts only).</desc>
11735 </const>
11736 <const name="CoreAudio" value="5">
11737 <desc>CoreAudio (Mac hosts only).</desc>
11738 </const>
11739 <const name="MMPM" value="6">
11740 <desc>Reserved for historical reasons.</desc>
11741 </const>
11742 <const name="Pulse" value="7">
11743 <desc>PulseAudio (Linux hosts only).</desc>
11744 </const>
11745 <const name="SolAudio" value="8">
11746 <desc>Solaris audio (Solaris hosts only).</desc>
11747 </const>
11748 </enum>
11749
11750 <enum
11751 name="AudioControllerType"
11752 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11753 >
11754 <desc>
11755 Virtual audio controller type.
11756 </desc>
11757
11758 <const name="AC97" value="0"/>
11759 <const name="SB16" value="1"/>
11760 </enum>
11761
11762 <interface
11763 name="IAudioAdapter" extends="$unknown"
11764 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11765 wsmap="managed"
11766 >
11767 <desc>
11768 The IAudioAdapter interface represents the virtual audio adapter of
11769 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11770 </desc>
11771 <attribute name="enabled" type="boolean">
11772 <desc>
11773 Flag whether the audio adapter is present in the
11774 guest system. If disabled, the virtual guest hardware will
11775 not contain any audio adapter. Can only be changed when
11776 the VM is not running.
11777 </desc>
11778 </attribute>
11779 <attribute name="audioController" type="AudioControllerType">
11780 <desc>
11781 The audio hardware we emulate.
11782 </desc>
11783 </attribute>
11784 <attribute name="audioDriver" type="AudioDriverType">
11785 <desc>
11786 Audio driver the adapter is connected to. This setting
11787 can only be changed when the VM is not running.
11788 </desc>
11789 </attribute>
11790 </interface>
11791
11792 <!--
11793 // IVRDPServer
11794 /////////////////////////////////////////////////////////////////////////
11795 -->
11796
11797 <enum
11798 name="VRDPAuthType"
11799 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11800 >
11801 <desc>
11802 VRDP authentication type.
11803 </desc>
11804
11805 <const name="Null" value="0">
11806 <desc>Null value, also means "no authentication".</desc>
11807 </const>
11808 <const name="External" value="1"/>
11809 <const name="Guest" value="2"/>
11810 </enum>
11811
11812 <interface
11813 name="IVRDPServer" extends="$unknown"
11814 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11815 wsmap="managed"
11816 >
11817 <attribute name="enabled" type="boolean">
11818 <desc>VRDP server status.</desc>
11819 </attribute>
11820
11821 <attribute name="port" type="unsigned long">
11822 <desc>
11823 VRDP server port number.
11824 <note>
11825 Setting the value of this property to <tt>0</tt> will reset the port
11826 number to the default value which is
11827 currently <tt>3389</tt>. Reading this property will always return a
11828 real port number, even after it has been set to <tt>0</tt> (in which
11829 case the default port is returned).
11830 </note>
11831 </desc>
11832 </attribute>
11833
11834 <attribute name="netAddress" type="wstring">
11835 <desc>VRDP server address.</desc>
11836 </attribute>
11837
11838 <attribute name="authType" type="VRDPAuthType">
11839 <desc>VRDP authentication method.</desc>
11840 </attribute>
11841
11842 <attribute name="authTimeout" type="unsigned long">
11843 <desc>Timeout for guest authentication. Milliseconds.</desc>
11844 </attribute>
11845
11846 <attribute name="allowMultiConnection" type="boolean">
11847 <desc>
11848 Flag whether multiple simultaneous connections to the VM are permitted.
11849 Note that this will be replaced by a more powerful mechanism in the future.
11850 </desc>
11851 </attribute>
11852
11853 <attribute name="reuseSingleConnection" type="boolean">
11854 <desc>
11855 Flag whether the existing connection must be dropped and a new connection
11856 must be established by the VRDP server, when a new client connects in single
11857 connection mode.
11858 </desc>
11859 </attribute>
11860
11861 </interface>
11862
11863
11864 <!--
11865 // ISharedFolder
11866 /////////////////////////////////////////////////////////////////////////
11867 -->
11868
11869 <interface
11870 name="ISharedFolder" extends="$unknown"
11871 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11872 wsmap="struct"
11873 >
11874 <desc>
11875 The ISharedFolder interface represents a folder in the host computer's
11876 file system accessible from the guest OS running inside a virtual
11877 machine using an associated logical name.
11878
11879 There are three types of shared folders:
11880 <ul>
11881 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11882 folders available to all virtual machines.</li>
11883 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11884 VM-specific shared folders available to the given virtual machine at
11885 startup.</li>
11886 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11887 VM-specific shared folders created in the session context (for
11888 example, when the virtual machine is running) and automatically
11889 discarded when the session is closed (the VM is powered off).</li>
11890 </ul>
11891
11892 Logical names of shared folders must be unique within the given scope
11893 (global, permanent or transient). However, they do not need to be unique
11894 across scopes. In this case, the definition of the shared folder in a
11895 more specific scope takes precedence over definitions in all other
11896 scopes. The order of precedence is (more specific to more general):
11897 <ol>
11898 <li>Transient definitions</li>
11899 <li>Permanent definitions</li>
11900 <li>Global definitions</li>
11901 </ol>
11902
11903 For example, if MyMachine has a shared folder named
11904 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11905 transient shared folder named <tt>C_DRIVE</tt> (that points
11906 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11907 of <tt>C_DRIVE</tt> in the guest OS so
11908 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11909 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11910 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11911 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11912 to <tt>C:\\</tt> if it still exists.
11913
11914 Note that permanent and transient shared folders of different machines
11915 are in different name spaces, so they don't overlap and don't need to
11916 have unique logical names.
11917
11918 <note>
11919 Global shared folders are not implemented in the current version of the
11920 product.
11921 </note>
11922 </desc>
11923
11924 <attribute name="name" type="wstring" readonly="yes">
11925 <desc>Logical name of the shared folder.</desc>
11926 </attribute>
11927
11928 <attribute name="hostPath" type="wstring" readonly="yes">
11929 <desc>Full path to the shared folder in the host file system.</desc>
11930 </attribute>
11931
11932 <attribute name="accessible" type="boolean" readonly="yes">
11933 <desc>
11934 Whether the folder defined by the host path is currently
11935 accessible or not.
11936 For example, the folder can be unaccessible if it is placed
11937 on the network share that is not available by the time
11938 this property is read.
11939 </desc>
11940 </attribute>
11941
11942 <attribute name="writable" type="boolean" readonly="yes">
11943 <desc>
11944 Whether the folder defined by the host path is writable or
11945 not.
11946 </desc>
11947 </attribute>
11948
11949 <attribute name="lastAccessError" type="wstring" readonly="yes">
11950 <desc>
11951 Text message that represents the result of the last accessibility
11952 check.
11953
11954 Accessibility checks are performed each time the <link to="#accessible"/>
11955 attribute is read. An empty string is returned if the last
11956 accessibility check was successful. A non-empty string indicates a
11957 failure and should normally describe a reason of the failure (for
11958 example, a file read error).
11959 </desc>
11960 </attribute>
11961
11962 </interface>
11963
11964 <!--
11965 // ISession
11966 /////////////////////////////////////////////////////////////////////////
11967 -->
11968
11969 <interface
11970 name="IInternalSessionControl" extends="$unknown"
11971 uuid="e28e19fb-23c2-4d1a-b6bf-ce147fa37b24"
11972 internal="yes"
11973 wsmap="suppress"
11974 >
11975 <method name="getPID">
11976 <desc>PID of the process that has created this Session object.
11977 </desc>
11978 <param name="pid" type="unsigned long" dir="return"/>
11979 </method>
11980
11981 <method name="getRemoteConsole">
11982 <desc>
11983 Returns the console object suitable for remote control.
11984
11985 <result name="VBOX_E_INVALID_VM_STATE">
11986 Session state prevents operation.
11987 </result>
11988 <result name="VBOX_E_INVALID_OBJECT_STATE">
11989 Session type prevents operation.
11990 </result>
11991
11992 </desc>
11993 <param name="console" type="IConsole" dir="return"/>
11994 </method>
11995
11996 <method name="assignMachine">
11997 <desc>
11998 Assigns the machine object associated with this direct-type
11999 session or informs the session that it will be a remote one
12000 (if @a machine == @c null).
12001
12002 <result name="VBOX_E_INVALID_VM_STATE">
12003 Session state prevents operation.
12004 </result>
12005 <result name="VBOX_E_INVALID_OBJECT_STATE">
12006 Session type prevents operation.
12007 </result>
12008
12009 </desc>
12010 <param name="machine" type="IMachine" dir="in"/>
12011 </method>
12012
12013 <method name="assignRemoteMachine">
12014 <desc>
12015 Assigns the machine and the (remote) console object associated with
12016 this remote-type session.
12017
12018 <result name="VBOX_E_INVALID_VM_STATE">
12019 Session state prevents operation.
12020 </result>
12021
12022 </desc>
12023 <param name="machine" type="IMachine" dir="in"/>
12024 <param name="console" type="IConsole" dir="in"/>
12025 </method>
12026
12027 <method name="updateMachineState">
12028 <desc>
12029 Updates the machine state in the VM process.
12030 Must be called only in certain cases
12031 (see the method implementation).
12032
12033 <result name="VBOX_E_INVALID_VM_STATE">
12034 Session state prevents operation.
12035 </result>
12036 <result name="VBOX_E_INVALID_OBJECT_STATE">
12037 Session type prevents operation.
12038 </result>
12039
12040 </desc>
12041 <param name="aMachineState" type="MachineState" dir="in"/>
12042 </method>
12043
12044 <method name="uninitialize">
12045 <desc>
12046 Uninitializes (closes) this session. Used by VirtualBox to close
12047 the corresponding remote session when the direct session dies
12048 or gets closed.
12049
12050 <result name="VBOX_E_INVALID_VM_STATE">
12051 Session state prevents operation.
12052 </result>
12053
12054 </desc>
12055 </method>
12056
12057 <method name="onDVDDriveChange">
12058 <desc>
12059 Triggered when settings of the DVD drive object of the
12060 associated virtual machine have changed.
12061
12062 <result name="VBOX_E_INVALID_VM_STATE">
12063 Session state prevents operation.
12064 </result>
12065 <result name="VBOX_E_INVALID_OBJECT_STATE">
12066 Session type prevents operation.
12067 </result>
12068
12069 </desc>
12070 </method>
12071
12072 <method name="onFloppyDriveChange">
12073 <desc>
12074 Triggered when settings of the floppy drive object of the
12075 associated virtual machine have changed.
12076
12077 <result name="VBOX_E_INVALID_VM_STATE">
12078 Session state prevents operation.
12079 </result>
12080 <result name="VBOX_E_INVALID_OBJECT_STATE">
12081 Session type prevents operation.
12082 </result>
12083
12084 </desc>
12085 </method>
12086
12087 <method name="onNetworkAdapterChange">
12088 <desc>
12089 Triggered when settings of a network adapter of the
12090 associated virtual machine have changed.
12091
12092 <result name="VBOX_E_INVALID_VM_STATE">
12093 Session state prevents operation.
12094 </result>
12095 <result name="VBOX_E_INVALID_OBJECT_STATE">
12096 Session type prevents operation.
12097 </result>
12098
12099 </desc>
12100 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12101 <param name="changeAdapter" type="boolean" dir="in"/>
12102 </method>
12103
12104 <method name="onSerialPortChange">
12105 <desc>
12106 Triggered when settings of a serial port of the
12107 associated virtual machine have changed.
12108
12109 <result name="VBOX_E_INVALID_VM_STATE">
12110 Session state prevents operation.
12111 </result>
12112 <result name="VBOX_E_INVALID_OBJECT_STATE">
12113 Session type prevents operation.
12114 </result>
12115
12116 </desc>
12117 <param name="serialPort" type="ISerialPort" dir="in"/>
12118 </method>
12119
12120 <method name="onParallelPortChange">
12121 <desc>
12122 Triggered when settings of a parallel port of the
12123 associated virtual machine have changed.
12124
12125 <result name="VBOX_E_INVALID_VM_STATE">
12126 Session state prevents operation.
12127 </result>
12128 <result name="VBOX_E_INVALID_OBJECT_STATE">
12129 Session type prevents operation.
12130 </result>
12131
12132 </desc>
12133 <param name="parallelPort" type="IParallelPort" dir="in"/>
12134 </method>
12135
12136 <method name="onStorageControllerChange">
12137 <desc>
12138 Triggered when settings of a storage controller of the
12139 associated virtual machine have changed.
12140
12141 <result name="VBOX_E_INVALID_VM_STATE">
12142 Session state prevents operation.
12143 </result>
12144 <result name="VBOX_E_INVALID_OBJECT_STATE">
12145 Session type prevents operation.
12146 </result>
12147
12148 </desc>
12149 </method>
12150
12151 <method name="onVRDPServerChange">
12152 <desc>
12153 Triggered when settings of the VRDP server object of the
12154 associated virtual machine have changed.
12155
12156 <result name="VBOX_E_INVALID_VM_STATE">
12157 Session state prevents operation.
12158 </result>
12159 <result name="VBOX_E_INVALID_OBJECT_STATE">
12160 Session type prevents operation.
12161 </result>
12162
12163 </desc>
12164 </method>
12165
12166 <method name="onUSBControllerChange">
12167 <desc>
12168 Triggered when settings of the USB controller object of the
12169 associated virtual machine have changed.
12170
12171 <result name="VBOX_E_INVALID_VM_STATE">
12172 Session state prevents operation.
12173 </result>
12174 <result name="VBOX_E_INVALID_OBJECT_STATE">
12175 Session type prevents operation.
12176 </result>
12177
12178 </desc>
12179 </method>
12180
12181 <method name="onSharedFolderChange">
12182 <desc>
12183 Triggered when a permanent (global or machine) shared folder has been
12184 created or removed.
12185 <note>
12186 We don't pass shared folder parameters in this notification because
12187 the order in which parallel notifications are delivered is not defined,
12188 therefore it could happen that these parameters were outdated by the
12189 time of processing this notification.
12190 </note>
12191
12192 <result name="VBOX_E_INVALID_VM_STATE">
12193 Session state prevents operation.
12194 </result>
12195 <result name="VBOX_E_INVALID_OBJECT_STATE">
12196 Session type prevents operation.
12197 </result>
12198
12199 </desc>
12200 <param name="global" type="boolean" dir="in"/>
12201 </method>
12202
12203 <method name="onUSBDeviceAttach">
12204 <desc>
12205 Triggered when a request to capture a USB device (as a result
12206 of matched USB filters or direct call to
12207 <link to="IConsole::attachUSBDevice"/>) has completed.
12208 A @c null @a error object means success, otherwise it
12209 describes a failure.
12210
12211 <result name="VBOX_E_INVALID_VM_STATE">
12212 Session state prevents operation.
12213 </result>
12214 <result name="VBOX_E_INVALID_OBJECT_STATE">
12215 Session type prevents operation.
12216 </result>
12217
12218 </desc>
12219 <param name="device" type="IUSBDevice" dir="in"/>
12220 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12221 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12222 </method>
12223
12224 <method name="onUSBDeviceDetach">
12225 <desc>
12226 Triggered when a request to release the USB device (as a result
12227 of machine termination or direct call to
12228 <link to="IConsole::detachUSBDevice"/>) has completed.
12229 A @c null @a error object means success, otherwise it
12230 describes a failure.
12231
12232 <result name="VBOX_E_INVALID_VM_STATE">
12233 Session state prevents operation.
12234 </result>
12235 <result name="VBOX_E_INVALID_OBJECT_STATE">
12236 Session type prevents operation.
12237 </result>
12238
12239 </desc>
12240 <param name="id" type="wstring" dir="in"/>
12241 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12242 </method>
12243
12244 <method name="onShowWindow">
12245 <desc>
12246 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12247 <link to="IMachine::showConsoleWindow"/> in order to notify
12248 console callbacks
12249 <link to="IConsoleCallback::onCanShowWindow"/>
12250 and <link to="IConsoleCallback::onShowWindow"/>.
12251
12252 <result name="VBOX_E_INVALID_OBJECT_STATE">
12253 Session type prevents operation.
12254 </result>
12255
12256 </desc>
12257 <param name="check" type="boolean" dir="in"/>
12258 <param name="canShow" type="boolean" dir="out"/>
12259 <param name="winId" type="unsigned long long" dir="out"/>
12260 </method>
12261
12262 <method name="accessGuestProperty">
12263 <desc>
12264 Called by <link to="IMachine::getGuestProperty"/> and by
12265 <link to="IMachine::setGuestProperty"/> in order to read and
12266 modify guest properties.
12267
12268 <result name="VBOX_E_INVALID_VM_STATE">
12269 Machine session is not open.
12270 </result>
12271 <result name="VBOX_E_INVALID_OBJECT_STATE">
12272 Session type is not direct.
12273 </result>
12274
12275 </desc>
12276 <param name="name" type="wstring" dir="in"/>
12277 <param name="value" type="wstring" dir="in"/>
12278 <param name="flags" type="wstring" dir="in"/>
12279 <param name="isSetter" type="boolean" dir="in"/>
12280 <param name="retValue" type="wstring" dir="out"/>
12281 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12282 <param name="retFlags" type="wstring" dir="out"/>
12283 </method>
12284
12285 <method name="enumerateGuestProperties">
12286 <desc>
12287 Return a list of the guest properties matching a set of patterns along
12288 with their values, time stamps and flags.
12289
12290 <result name="VBOX_E_INVALID_VM_STATE">
12291 Machine session is not open.
12292 </result>
12293 <result name="VBOX_E_INVALID_OBJECT_STATE">
12294 Session type is not direct.
12295 </result>
12296
12297 </desc>
12298 <param name="patterns" type="wstring" dir="in">
12299 <desc>
12300 The patterns to match the properties against as a comma-separated
12301 string. If this is empty, all properties currently set will be
12302 returned.
12303 </desc>
12304 </param>
12305 <param name="key" type="wstring" dir="out" safearray="yes">
12306 <desc>
12307 The key names of the properties returned.
12308 </desc>
12309 </param>
12310 <param name="value" type="wstring" dir="out" safearray="yes">
12311 <desc>
12312 The values of the properties returned. The array entries match the
12313 corresponding entries in the @a key array.
12314 </desc>
12315 </param>
12316 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12317 <desc>
12318 The time stamps of the properties returned. The array entries match
12319 the corresponding entries in the @a key array.
12320 </desc>
12321 </param>
12322 <param name="flags" type="wstring" dir="out" safearray="yes">
12323 <desc>
12324 The flags of the properties returned. The array entries match the
12325 corresponding entries in the @a key array.
12326 </desc>
12327 </param>
12328 </method>
12329
12330 </interface>
12331
12332 <interface
12333 name="ISession" extends="$dispatched"
12334 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12335 wsmap="managed"
12336 >
12337 <desc>
12338 The ISession interface represents a serialization primitive for virtual
12339 machines.
12340
12341 With VirtualBox, every time one wishes to manipulate a virtual machine
12342 (e.g. change its settings or start execution), a session object is
12343 required. Such an object must be passed to one of the session methods
12344 that open the given session, which then initiates the machine manipulation.
12345
12346 A session serves several purposes: it identifies to the inter-process VirtualBox
12347 code which process is currently working with the virtual machine, and it ensures
12348 that there are no incompatible requests from several processes for the
12349 same virtual machine. Session objects can therefore be thought of as mutex
12350 semaphores that lock virtual machines to prevent conflicting accesses from
12351 several processes.
12352
12353 How sessions objects are used depends on whether you use the Main API
12354 via COM or via the webservice:
12355
12356 <ul>
12357 <li>When using the COM API directly, an object of the Session class from the
12358 VirtualBox type library needs to be created. In regular COM C++ client code,
12359 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12360 This object will then act as a local session object in further calls to open
12361 a session.
12362 </li>
12363
12364 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12365 one session object automatically when <link to="IWebsessionManager::logon" />
12366 is called. A managed object reference to that session object can be retrieved by
12367 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12368 reference can then be used to open sessions.
12369 </li>
12370 </ul>
12371
12372 Sessions are mainly used in two variations:
12373
12374 <ul>
12375 <li>
12376 To start a virtual machine in a separate process, one would call
12377 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12378 object as its first parameter. This session then identifies the caller
12379 and lets him control the started machine (for example, pause machine
12380 execution or power it down) as well as be notified about machine
12381 execution state changes.
12382 </li>
12383
12384 <li>To alter machine settings, or to start machine execution within the
12385 current process, one needs to open a direct session for the machine first by
12386 calling <link to="IVirtualBox::openSession"/>. While a direct session
12387 is open within one process, no any other process may open another direct
12388 session for the same machine. This prevents the machine from being changed
12389 by other processes while it is running or while the machine is being configured.
12390 </li>
12391 </ul>
12392
12393 One also can attach to an existing direct session already opened by
12394 another process (for example, in order to send a control request to the
12395 virtual machine such as the pause or the reset request). This is done by
12396 calling <link to="IVirtualBox::openExistingSession"/>.
12397
12398 <note>
12399 Unless you are trying to write a new VirtualBox front-end that
12400 performs direct machine execution (like the VirtualBox or VBoxSDL
12401 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12402 session opened by <link to="IVirtualBox::openSession"/> and use this
12403 session only to change virtual machine settings. If you simply want to
12404 start virtual machine execution using one of the existing front-ends
12405 (for example the VirtualBox GUI or headless server), simply use
12406 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12407 will power up the machine automatically for you.
12408 </note>
12409 </desc>
12410
12411 <attribute name="state" type="SessionState" readonly="yes">
12412 <desc>Current state of this session.</desc>
12413 </attribute>
12414
12415 <attribute name="type" type="SessionType" readonly="yes">
12416 <desc>
12417 Type of this session. The value of this attribute is valid only
12418 if the session is currently open (i.e. its #state is
12419 SessionType_SessionOpen), otherwise an error will be returned.
12420 </desc>
12421 </attribute>
12422
12423 <attribute name="machine" type="IMachine" readonly="yes">
12424 <desc>Machine object associated with this session.</desc>
12425 </attribute>
12426
12427 <attribute name="console" type="IConsole" readonly="yes">
12428 <desc>Console object associated with this session.</desc>
12429 </attribute>
12430
12431 <method name="close">
12432 <desc>
12433 Closes a session that was previously opened.
12434
12435 It is recommended that every time an "open session" method (such as
12436 <link to="IVirtualBox::openRemoteSession" /> or
12437 <link to="IVirtualBox::openSession" />) has been called to
12438 manipulate a virtual machine, the caller invoke
12439 ISession::close() when it's done doing so. Since sessions are
12440 serialization primitives much like ordinary mutexes, they are
12441 best used the same way: for each "open" call, there should be
12442 a matching "close" call, even when errors occur.
12443
12444 Otherwise, if a direct session for a machine opened with
12445 <link to="IVirtualBox::openSession"/> is not explicitly closed
12446 when the application terminates, the state of the machine will
12447 be set to <link to="MachineState_Aborted" /> on the server.
12448
12449 Generally, it is recommended to close all open sessions explicitly
12450 before terminating the application (regardless of the reason for
12451 the termination).
12452
12453 <note>
12454 Do not expect the session state (<link to="ISession::state" />
12455 to return to "Closed" immediately after you invoke
12456 ISession::close(), particularly if you have started a remote
12457 session to execute the VM in a new process. The session state will
12458 automatically return to "Closed" once the VM is no longer executing,
12459 which can of course take a very long time.
12460 </note>
12461
12462 <result name="E_UNEXPECTED">
12463 Session is not open.
12464 </result>
12465
12466 </desc>
12467 </method>
12468
12469 </interface>
12470
12471 <!--
12472 // IStorageController
12473 /////////////////////////////////////////////////////////////////////////
12474 -->
12475
12476 <enum
12477 name="StorageBus"
12478 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12479 >
12480 <desc>
12481 The connection type of the storage controller.
12482 </desc>
12483 <const name="Null" value="0">
12484 <desc>@c null value. Never used by the API.</desc>
12485 </const>
12486 <const name="IDE" value="1"/>
12487 <const name="SATA" value="2"/>
12488 <const name="SCSI" value="3"/>
12489 </enum>
12490
12491 <enum
12492 name="StorageControllerType"
12493 uuid="685387db-a837-4320-a258-08f46a22f62a"
12494 >
12495 <desc>
12496 Storage controller type.
12497 </desc>
12498
12499 <const name="Null" value="0">
12500 <desc>@c null value. Never used by the API.</desc>
12501 </const>
12502 <const name="LsiLogic" value="1"/>
12503 <const name="BusLogic" value="2"/>
12504 <const name="IntelAhci" value="3"/>
12505 <const name="PIIX3" value="4"/>
12506 <const name="PIIX4" value="5"/>
12507 <const name="ICH6" value="6"/>
12508 </enum>
12509
12510 <interface
12511 name="IStorageController" extends="$unknown"
12512 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12513 wsmap="managed"
12514 >
12515 <desc>
12516 Represents a storage controller that is attached to a virtual machine
12517 (<link to="IMachine" />). Just as hard disks are attached to storage
12518 controllers in a real computer, virtual hard disks (represented by
12519 <link to="IHardDisk" />) are attached to virtual storage controllers,
12520 represented by this interface.
12521
12522 VirtualBox supports three types of virtual storage controller hardware:
12523 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12524 these three is used, certain sub-types are available and can be
12525 selected in <link to="#controllerType" />.
12526 </desc>
12527
12528 <attribute name="name" type="wstring" readonly="yes">
12529 <desc>
12530 Name of the storage controller, as originally specified with
12531 <link to="IMachine::addStorageController" />. This then uniquely
12532 identifies this controller with other method calls such as
12533 <link to="IMachine::attachHardDisk" />.
12534 </desc>
12535 </attribute>
12536
12537 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12538 <desc>
12539 Maximum number of devices which can be attached to one port.
12540 </desc>
12541 </attribute>
12542
12543 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12544 <desc>
12545 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12546 </desc>
12547 </attribute>
12548
12549 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12550 <desc>
12551 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12552 </desc>
12553 </attribute>
12554
12555 <attribute name="instance" type="unsigned long">
12556 <desc>
12557 The instance number of the device in the running VM.
12558 </desc>
12559 </attribute>
12560
12561 <attribute name="portCount" type="unsigned long">
12562 <desc>
12563 The number of currently usable ports on the controller.
12564 The minimum and maximum number of ports for one controller are
12565 stored in <link to="IStorageController::minPortCount"/>
12566 and <link to="IStorageController::maxPortCount"/>.
12567 </desc>
12568 </attribute>
12569
12570 <attribute name="bus" type="StorageBus" readonly="yes">
12571 <desc>
12572 The connection type of the storage controller.
12573 </desc>
12574 </attribute>
12575
12576 <attribute name="controllerType" type="StorageControllerType">
12577 <desc>
12578 Type of the virtual storage controller. Depending on this value,
12579 VirtualBox will provide a different virtual storage controller hardware
12580 to the guest.
12581
12582 For SCSI controllers, the default type is LsiLogic.
12583 </desc>
12584 </attribute>
12585
12586 <method name="GetIDEEmulationPort">
12587 <desc>
12588 Gets the corresponding port number which is emulated as an IDE device.
12589
12590 <result name="E_INVALIDARG">
12591 The @a devicePosition is not in the range 0 to 3.
12592 </result>
12593 <result name="E_NOTIMPL">
12594 The storage controller type is not SATAIntelAhci.
12595 </result>
12596
12597 </desc>
12598 <param name="devicePosition" type="long" dir="in"/>
12599 <param name="portNumber" type="long" dir="return"/>
12600 </method>
12601
12602 <method name="SetIDEEmulationPort">
12603 <desc>
12604 Sets the port number which is emulated as an IDE device.
12605
12606 <result name="E_INVALIDARG">
12607 The @a devicePosition is not in the range 0 to 3 or the
12608 @a portNumber is not in the range 0 to 29.
12609 </result>
12610 <result name="E_NOTIMPL">
12611 The storage controller type is not SATAIntelAhci.
12612 </result>
12613
12614 </desc>
12615 <param name="devicePosition" type="long" dir="in"/>
12616 <param name="portNumber" type="long" dir="in"/>
12617 </method>
12618
12619 </interface>
12620
12621<if target="wsdl">
12622
12623 <!--
12624 // IManagedObjectRef
12625 /////////////////////////////////////////////////////////////////////////
12626 -->
12627
12628 <interface
12629 name="IManagedObjectRef" extends="$unknown"
12630 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12631 internal="yes"
12632 wsmap="managed"
12633 wscpp="hardcoded"
12634 >
12635 <desc>
12636 Managed object reference.
12637
12638 Only within the webservice, a managed object reference (which is really
12639 an opaque number) allows a webservice client to address an object
12640 that lives in the address space of the webservice server.
12641
12642 Behind each managed object reference, there is a COM object that lives
12643 in the webservice server's address space. The COM object is not freed
12644 until the managed object reference is released, either by an explicit
12645 call to <link to="IManagedObjectRef::release" /> or by logging off from
12646 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12647 all objects created during the webservice session.
12648
12649 Whenever a method call of the VirtualBox API returns a COM object, the
12650 webservice representation of that method will instead return a
12651 managed object reference, which can then be used to invoke methods
12652 on that object.
12653 </desc>
12654
12655 <method name="getInterfaceName">
12656 <desc>
12657 Returns the name of the interface that this managed object represents,
12658 for example, "IMachine", as a string.
12659 </desc>
12660 <param name="return" type="wstring" dir="return"/>
12661 </method>
12662
12663 <method name="release">
12664 <desc>
12665 Releases this managed object reference and frees the resources that
12666 were allocated for it in the webservice server process. After calling
12667 this method, the identifier of the reference can no longer be used.
12668 </desc>
12669 </method>
12670
12671 </interface>
12672
12673 <!--
12674 // IWebsessionManager
12675 /////////////////////////////////////////////////////////////////////////
12676 -->
12677
12678 <interface
12679 name="IWebsessionManager" extends="$unknown"
12680 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12681 internal="yes"
12682 wsmap="global"
12683 wscpp="hardcoded"
12684 >
12685 <desc>
12686 Websession manager. This provides essential services
12687 to webservice clients.
12688 </desc>
12689 <method name="logon">
12690 <desc>
12691 Logs a new client onto the webservice and returns a managed object reference to
12692 the IVirtualBox instance, which the client can then use as a basis to further
12693 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12694 interface, in one way or the other.
12695 </desc>
12696 <param name="username" type="wstring" dir="in"/>
12697 <param name="password" type="wstring" dir="in"/>
12698 <param name="return" type="IVirtualBox" dir="return"/>
12699 </method>
12700
12701 <method name="getSessionObject">
12702 <desc>
12703 Returns a managed object reference to the internal ISession object that was created
12704 for this web service session when the client logged on.
12705
12706 <see>ISession</see>
12707 </desc>
12708 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12709 <param name="return" type="ISession" dir="return"/>
12710 </method>
12711
12712 <method name="logoff">
12713 <desc>
12714 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12715 and destroys all resources associated with the session (most importantly, all
12716 managed objects created in the server while the session was active).
12717 </desc>
12718 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12719 </method>
12720
12721 </interface>
12722
12723</if>
12724
12725 <!--
12726 // IPerformanceCollector & friends
12727 /////////////////////////////////////////////////////////////////////////
12728 -->
12729
12730 <interface
12731 name="IPerformanceMetric" extends="$unknown"
12732 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12733 >
12734 <desc>
12735 The IPerformanceMetric interface represents parameters of the given
12736 performance metric.
12737 </desc>
12738
12739 <attribute name="metricName" type="wstring" readonly="yes">
12740 <desc>
12741 Name of the metric.
12742 </desc>
12743 </attribute>
12744
12745 <attribute name="object" type="$unknown" readonly="yes">
12746 <desc>
12747 Object this metric belongs to.
12748 </desc>
12749 </attribute>
12750
12751 <attribute name="description" type="wstring" readonly="yes">
12752 <desc>
12753 Textual description of the metric.
12754 </desc>
12755 </attribute>
12756
12757 <attribute name="period" type="unsigned long" readonly="yes">
12758 <desc>
12759 Time interval between samples, measured in seconds.
12760 </desc>
12761 </attribute>
12762
12763 <attribute name="count" type="unsigned long" readonly="yes">
12764 <desc>
12765 Number of recent samples retained by the performance collector for this
12766 metric.
12767
12768 When the collected sample count exceeds this number, older samples
12769 are discarded.
12770 </desc>
12771 </attribute>
12772
12773 <attribute name="unit" type="wstring" readonly="yes">
12774 <desc>
12775 Unit of measurement.
12776 </desc>
12777 </attribute>
12778
12779 <attribute name="minimumValue" type="long" readonly="yes">
12780 <desc>
12781 Minimum possible value of this metric.
12782 </desc>
12783 </attribute>
12784
12785 <attribute name="maximumValue" type="long" readonly="yes">
12786 <desc>
12787 Maximum possible value of this metric.
12788 </desc>
12789 </attribute>
12790 </interface>
12791
12792 <interface
12793 name="IPerformanceCollector" extends="$unknown"
12794 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12795 wsmap="managed"
12796 >
12797 <desc>
12798 The IPerformanceCollector interface represents a service that collects and
12799 stores performance metrics data.
12800
12801 Performance metrics are associated with objects of interfaces like IHost and
12802 IMachine. Each object has a distinct set of performance metrics.
12803 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12804
12805 Metric data is collected at the specified intervals and is retained
12806 internally. The interval and the number of retained samples can be set
12807 with <link to="IPerformanceCollector::setupMetrics" />.
12808
12809 Metrics are organized hierarchically, with each level separated by a
12810 slash (/) character. Generally, the scheme for metric names is like this:
12811
12812 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12813
12814 "Category/Metric" together form the base metric name. A base metric is the
12815 smallest unit for which a sampling interval and the number of retained
12816 samples can be set. Only base metrics can be enabled and disabled. All
12817 sub-metrics are collected when their base metric is collected.
12818 Collected values for any set of sub-metrics can be queried with
12819 <link to="IPerformanceCollector::queryMetricsData" />.
12820
12821 For example "CPU/Load/User:avg"
12822 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12823 "average" aggregate. An aggregate function is computed over all retained
12824 data. Valid aggregate functions are:
12825
12826 <ul>
12827 <li>avg -- average</li>
12828 <li>min -- minimum</li>
12829 <li>max -- maximum</li>
12830 </ul>
12831
12832 When setting up
12833 metric parameters, querying metric data, enabling or disabling metrics
12834 wildcards can be used in metric names to specify a subset of metrics. For
12835 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12836 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12837 values without aggregates <tt>*:</tt> can be used.
12838
12839 The valid names for base metrics are:
12840
12841 <ul>
12842 <li>CPU/Load</li>
12843 <li>CPU/MHz</li>
12844 <li>RAM/Usage</li>
12845 </ul>
12846
12847 The general sequence for collecting and retrieving the metrics is:
12848 <ul>
12849 <li>
12850 Obtain an instance of IPerformanceCollector with
12851 <link to="IVirtualBox::performanceCollector" />
12852 </li>
12853 <li>
12854 Allocate and populate an array with references to objects the metrics
12855 will be collected for. Use references to IHost and IMachine objects.
12856 </li>
12857 <li>
12858 Allocate and populate an array with base metric names the data will be
12859 collected for.
12860 </li>
12861 <li>
12862 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12863 metric data will be collected and stored.
12864 </li>
12865 <li>
12866 Wait for the data to get collected.
12867 </li>
12868 <li>
12869 Allocate and populate an array with references to objects the metric
12870 values will be queried for. You can re-use the object array used for
12871 setting base metrics.
12872 </li>
12873 <li>
12874 Allocate and populate an array with metric names the data will be
12875 collected for. Note that metric names differ from base metric names.
12876 </li>
12877 <li>
12878 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12879 have been collected so far are returned. Note that the values are still
12880 retained internally and data collection continues.
12881 </li>
12882 </ul>
12883
12884 For an example of usage refer to the following files in VirtualBox SDK:
12885 <ul>
12886 <li>
12887 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12888 </li>
12889 <li>
12890 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12891 </li>
12892 </ul>
12893 </desc>
12894
12895 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12896 <desc>
12897 Array of unique names of metrics.
12898
12899 This array represents all metrics supported by the performance
12900 collector. Individual objects do not necessarily support all of them.
12901 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12902 list of supported metrics for a particular object.
12903 </desc>
12904 </attribute>
12905
12906 <method name="getMetrics">
12907 <desc>
12908 Returns parameters of specified metrics for a set of objects.
12909 <note>
12910 @c Null metrics array means all metrics. @c Null object array means
12911 all existing objects.
12912 </note>
12913 </desc>
12914 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12915 <desc>
12916 Metric name filter. Currently, only a comma-separated list of metrics
12917 is supported.
12918 </desc>
12919 </param>
12920 <param name="objects" type="$unknown" dir="in" safearray="yes">
12921 <desc>
12922 Set of objects to return metric parameters for.
12923 </desc>
12924 </param>
12925 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12926 <desc>
12927 Array of returned metric parameters.
12928 </desc>
12929 </param>
12930 </method>
12931
12932 <method name="setupMetrics">
12933 <desc>
12934 Sets parameters of specified base metrics for a set of objects. Returns
12935 an array of <link to="IPerformanceMetric" /> describing the metrics have
12936 been affected.
12937 <note>
12938 @c Null or empty metric name array means all metrics. @c Null or empty
12939 object array means all existing objects. If metric name array contains
12940 a single element and object array contains many, the single metric
12941 name array element is applied to each object array element to form
12942 metric/object pairs.
12943 </note>
12944 </desc>
12945 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12946 <desc>
12947 Metric name filter. Comma-separated list of metrics with wildcard
12948 support.
12949 </desc>
12950 </param>
12951 <param name="objects" type="$unknown" dir="in" safearray="yes">
12952 <desc>
12953 Set of objects to setup metric parameters for.
12954 </desc>
12955 </param>
12956 <param name="period" type="unsigned long" dir="in">
12957 <desc>
12958 Time interval in seconds between two consecutive samples of performance
12959 data.
12960 </desc>
12961 </param>
12962 <param name="count" type="unsigned long" dir="in">
12963 <desc>
12964 Number of samples to retain in performance data history. Older samples
12965 get discarded.
12966 </desc>
12967 </param>
12968 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12969 <desc>
12970 Array of metrics that have been modified by the call to this method.
12971 </desc>
12972 </param>
12973 </method>
12974
12975 <method name="enableMetrics">
12976 <desc>
12977 Turns on collecting specified base metrics. Returns an array of
12978 <link to="IPerformanceMetric" /> describing the metrics have been
12979 affected.
12980 <note>
12981 @c Null or empty metric name array means all metrics. @c Null or empty
12982 object array means all existing objects. If metric name array contains
12983 a single element and object array contains many, the single metric
12984 name array element is applied to each object array element to form
12985 metric/object pairs.
12986 </note>
12987 </desc>
12988 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12989 <desc>
12990 Metric name filter. Comma-separated list of metrics with wildcard
12991 support.
12992 </desc>
12993 </param>
12994 <param name="objects" type="$unknown" dir="in" safearray="yes">
12995 <desc>
12996 Set of objects to enable metrics for.
12997 </desc>
12998 </param>
12999 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13000 <desc>
13001 Array of metrics that have been modified by the call to this method.
13002 </desc>
13003 </param>
13004 </method>
13005
13006 <method name="disableMetrics">
13007 <desc>
13008 Turns off collecting specified base metrics. Returns an array of
13009 <link to="IPerformanceMetric" /> describing the metrics have been
13010 affected.
13011 <note>
13012 @c Null or empty metric name array means all metrics. @c Null or empty
13013 object array means all existing objects. If metric name array contains
13014 a single element and object array contains many, the single metric
13015 name array element is applied to each object array element to form
13016 metric/object pairs.
13017 </note>
13018 </desc>
13019 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13020 <desc>
13021 Metric name filter. Comma-separated list of metrics with wildcard
13022 support.
13023 </desc>
13024 </param>
13025 <param name="objects" type="$unknown" dir="in" safearray="yes">
13026 <desc>
13027 Set of objects to disable metrics for.
13028 </desc>
13029 </param>
13030 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13031 <desc>
13032 Array of metrics that have been modified by the call to this method.
13033 </desc>
13034 </param>
13035 </method>
13036
13037 <method name="queryMetricsData">
13038 <desc>
13039 Queries collected metrics data for a set of objects.
13040
13041 The data itself and related metric information are returned in seven
13042 parallel and one flattened array of arrays. Elements of
13043 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13044 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13045 the same index describe one set of values corresponding to a single
13046 metric.
13047
13048 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13049 start and length of a sub-array is indicated by
13050 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13051 value for metric <tt>metricNames[i]</tt> is at
13052 <tt>returnData[returnIndices[i]]</tt>.
13053
13054 <note>
13055 @c Null or empty metric name array means all metrics. @c Null or empty
13056 object array means all existing objects. If metric name array contains
13057 a single element and object array contains many, the single metric
13058 name array element is applied to each object array element to form
13059 metric/object pairs.
13060 </note>
13061 <note>
13062 Data collection continues behind the scenes after call to
13063 @c queryMetricsData. The return data can be seen as the snapshot of
13064 the current state at the time of @c queryMetricsData call. The
13065 internally kept metric values are not cleared by the call. This makes
13066 possible querying different subsets of metrics or aggregates with
13067 subsequent calls. If periodic querying is needed it is highly
13068 suggested to query the values with @c interval*count period to avoid
13069 confusion. This way a completely new set of data values will be
13070 provided by each query.
13071 </note>
13072 </desc>
13073 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13074 <desc>
13075 Metric name filter. Comma-separated list of metrics with wildcard
13076 support.
13077 </desc>
13078 </param>
13079 <param name="objects" type="$unknown" dir="in" safearray="yes">
13080 <desc>
13081 Set of objects to query metrics for.
13082 </desc>
13083 </param>
13084 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13085 <desc>
13086 Names of metrics returned in @c returnData.
13087 </desc>
13088 </param>
13089 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13090 <desc>
13091 Objects associated with metrics returned in @c returnData.
13092 </desc>
13093 </param>
13094 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13095 <desc>
13096 Units of measurement for each returned metric.
13097 </desc>
13098 </param>
13099 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13100 <desc>
13101 Divisor that should be applied to return values in order to get
13102 floating point values. For example:
13103 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13104 will retrieve the floating point value of i-th sample of the first
13105 metric.
13106 </desc>
13107 </param>
13108 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13109 <desc>
13110 Sequence numbers of the first elements of value sequences of particular metrics
13111 returned in @c returnData. For aggregate metrics it is the sequence number of
13112 the sample the aggregate started calculation from.
13113 </desc>
13114 </param>
13115 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13116 <desc>
13117 Indices of the first elements of value sequences of particular metrics
13118 returned in @c returnData.
13119 </desc>
13120 </param>
13121 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13122 <desc>
13123 Lengths of value sequences of particular metrics.
13124 </desc>
13125 </param>
13126 <param name="returnData" type="long" dir="return" safearray="yes">
13127 <desc>
13128 Flattened array of all metric data containing sequences of values for
13129 each metric.
13130 </desc>
13131 </param>
13132 </method>
13133
13134 </interface>
13135
13136 <module name="VBoxSVC" context="LocalServer">
13137 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13138 namespace="virtualbox.org">
13139 <interface name="IVirtualBox" default="yes"/>
13140 </class>
13141 </module>
13142
13143 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13144 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13145 namespace="virtualbox.org">
13146 <interface name="ISession" default="yes"/>
13147 </class>
13148 <class name="VirtualBoxCallback" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13149 namespace="virtualbox.org">
13150 <interface name="IVirtualBoxCallback" default="yes"/>
13151 <interface name="ILocalOwner"/>
13152 </class>
13153 </module>
13154
13155</library>
13156
13157</idl>
13158
13159<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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