VirtualBox

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

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

#3987: Virtio PCI + Net skeleton.

  • Property svn:eol-style set to native
File size: 482.8 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 register local objects
1083 (created without COM calls, but with new()).
1084 Once registered, calls to methods of such objects can be made
1085 from remote COM processes.
1086 The main usecase is the event callback implementation where
1087 API clients provide callback objects.
1088 </desc>
1089 <method name="setLocalObject">
1090 <desc>
1091 Set local object.
1092 </desc>
1093 <param name="object" type="$unknown" dir="in">
1094 <desc>Local object to forward requests to.
1095 If null, clears currently set local object.</desc>
1096 </param>
1097 </method>
1098 </interface>
1099
1100 <!--
1101 // IVirtualBox
1102 /////////////////////////////////////////////////////////////////////////
1103 -->
1104
1105 <interface
1106 name="IVirtualBoxCallback" extends="$unknown"
1107 uuid="2990059f-5bc8-4635-8415-658917cd3186"
1108 wsmap="suppress"
1109 >
1110
1111 <method name="onMachineStateChange">
1112 <desc>
1113 The execution state of the given machine has changed.
1114 <see>IMachine::state</see>
1115 </desc>
1116 <param name="machineId" type="wstring" dir="in">
1117 <desc>ID of the machine this event relates to.</desc>
1118 </param>
1119 <param name="state" type="MachineState" dir="in">
1120 <desc>New execution state.</desc>
1121 </param>
1122 </method>
1123
1124 <method name="onMachineDataChange">
1125 <desc>
1126 Any of the settings of the given machine has changed.
1127 </desc>
1128 <param name="machineId" type="wstring" dir="in">
1129 <desc>ID of the machine this event relates to.</desc>
1130 </param>
1131 </method>
1132
1133 <method name="onExtraDataCanChange">
1134 <desc>
1135 Notification when someone tries to change extra data for
1136 either the given machine or (if @c null) global extra data.
1137 This gives the chance to veto against changes.
1138 </desc>
1139 <param name="machineId" type="wstring" dir="in">
1140 <desc>
1141 ID of the machine this event relates to
1142 (@c null ID for global extra data change requests).
1143 </desc>
1144 </param>
1145 <param name="key" type="wstring" dir="in">
1146 <desc>
1147 Extra data key for the attempted write.
1148 </desc>
1149 </param>
1150 <param name="value" type="wstring" dir="in">
1151 <desc>
1152 Extra data value for the given key.
1153 </desc>
1154 </param>
1155 <param name="error" type="wstring" dir="out">
1156 <desc>
1157 Optional error message describing the reason of the
1158 veto (ignored if this notification returns @c true).
1159 </desc>
1160 </param>
1161 <param name="allowChange" type="boolean" dir="return">
1162 <desc>
1163 Flag to indicate whether the callee agrees (@c true)
1164 or vetoes against the change (@c false).
1165 </desc>
1166 </param>
1167 </method>
1168
1169 <method name="onExtraDataChange">
1170 <desc>
1171 Notification when machine specific or global extra data
1172 has changed.
1173 </desc>
1174 <param name="machineId" type="wstring" dir="in">
1175 <desc>
1176 ID of the machine this event relates to.
1177 Null for global extra data changes.
1178 </desc>
1179 </param>
1180 <param name="key" type="wstring" dir="in">
1181 <desc>
1182 Extra data key that has changed.
1183 </desc>
1184 </param>
1185 <param name="value" type="wstring" dir="in">
1186 <desc>
1187 Extra data value for the given key.
1188 </desc>
1189 </param>
1190 </method>
1191
1192 <method name="onMediaRegistered">
1193 <desc>
1194 The given media was registered or unregistered
1195 within this VirtualBox installation.
1196
1197 The @a mediaType parameter describes what type of
1198 media the specified @a mediaId refers to. Possible
1199 values are:
1200
1201 <ul>
1202 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1203 that, if registered, can be obtained using the
1204 <link to="IVirtualBox::getHardDisk"/> call.</li>
1205 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1206 that, if registered, can be obtained using the
1207 <link to="IVirtualBox::getDVDImage"/> call.</li>
1208 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1209 that, if registered, can be obtained using the
1210 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1211 </ul>
1212
1213 Note that if this is a deregistration notification,
1214 there is no way to access the object representing the
1215 unregistered media. It is supposed that the
1216 application will do required cleanup based on the
1217 @a mediaId value.
1218 </desc>
1219 <param name="mediaId" type="wstring" dir="in">
1220 <desc>ID of the media this event relates to.</desc>
1221 </param>
1222 <param name="mediaType" type="DeviceType" dir="in">
1223 <desc>Type of the media this event relates to.</desc>
1224 </param>
1225 <param name="registered" type="boolean" dir="in">
1226 <desc>
1227 If @c true, the media was registered, otherwise it was
1228 unregistered.
1229 </desc>
1230 </param>
1231 </method>
1232
1233 <method name="onMachineRegistered">
1234 <desc>
1235 The given machine was registered or unregistered
1236 within this VirtualBox installation.
1237 </desc>
1238 <param name="machineId" type="wstring" dir="in">
1239 <desc>ID of the machine this event relates to.</desc>
1240 </param>
1241 <param name="registered" type="boolean" dir="in">
1242 <desc>
1243 If @c true, the machine was registered, otherwise it was
1244 unregistered.
1245 </desc>
1246 </param>
1247 </method>
1248
1249 <method name="onSessionStateChange">
1250 <desc>
1251 The state of the session for the given machine was changed.
1252 <see>IMachine::sessionState</see>
1253 </desc>
1254 <param name="machineId" type="wstring" dir="in">
1255 <desc>ID of the machine this event relates to.</desc>
1256 </param>
1257 <param name="state" type="SessionState" dir="in">
1258 <desc>New session state.</desc>
1259 </param>
1260 </method>
1261
1262 <method name="onSnapshotTaken">
1263 <desc>
1264 A new snapshot of the machine has been taken.
1265 <see>ISnapshot</see>
1266 </desc>
1267 <param name="machineId" type="wstring" dir="in">
1268 <desc>ID of the machine this event relates to.</desc>
1269 </param>
1270 <param name="snapshotId" type="wstring" dir="in">
1271 <desc>ID of the new snapshot.</desc>
1272 </param>
1273 </method>
1274
1275 <method name="onSnapshotDiscarded">
1276 <desc>
1277 Snapshot of the given machine has been discarded.
1278
1279 <note>
1280 This notification is delivered <b>after</b> the snapshot
1281 object has been uninitialized on the server (so that any
1282 attempt to call its methods will return an error).
1283 </note>
1284
1285 <see>ISnapshot</see>
1286 </desc>
1287 <param name="machineId" type="wstring" dir="in">
1288 <desc>ID of the machine this event relates to.</desc>
1289 </param>
1290 <param name="snapshotId" type="wstring" dir="in">
1291 <desc>
1292 ID of the discarded snapshot. @c null means the current machine
1293 state has been discarded (restored from the current snapshot).
1294 </desc>
1295 </param>
1296 </method>
1297
1298 <method name="onSnapshotChange">
1299 <desc>
1300 Snapshot properties (name and/or description) have been changed.
1301 <see>ISnapshot</see>
1302 </desc>
1303 <param name="machineId" type="wstring" dir="in">
1304 <desc>ID of the machine this event relates to.</desc>
1305 </param>
1306 <param name="snapshotId" type="wstring" dir="in">
1307 <desc>ID of the changed snapshot.</desc>
1308 </param>
1309 </method>
1310
1311 <method name="onGuestPropertyChange">
1312 <desc>
1313 Notification when a guest property has changed.
1314 </desc>
1315 <param name="machineId" type="wstring" dir="in">
1316 <desc>
1317 ID of the machine this event relates to.
1318 </desc>
1319 </param>
1320 <param name="name" type="wstring" dir="in">
1321 <desc>
1322 The name of the property that has changed.
1323 </desc>
1324 </param>
1325 <param name="value" type="wstring" dir="in">
1326 <desc>
1327 The new property value.
1328 </desc>
1329 </param>
1330 <param name="flags" type="wstring" dir="in">
1331 <desc>
1332 The new property flags.
1333 </desc>
1334 </param>
1335 </method>
1336
1337 </interface>
1338
1339 <interface
1340 name="IDHCPServer" extends="$unknown"
1341 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1342 wsmap="managed"
1343 >
1344 <desc>
1345 The IDHCPServer interface represents the vbox dhcp server configuration.
1346
1347 To enumerate all the dhcp servers on the host, use the
1348 <link to="IVirtualBox::DHCPServers"/> attribute.
1349 </desc>
1350
1351 <attribute name="enabled" type="boolean">
1352 <desc>
1353 specifies if the dhcp server is enabled
1354 </desc>
1355 </attribute>
1356
1357 <attribute name="IPAddress" type="wstring" readonly="yes">
1358 <desc>
1359 specifies server IP
1360 </desc>
1361 </attribute>
1362
1363 <attribute name="networkMask" type="wstring" readonly="yes">
1364 <desc>
1365 specifies server network mask
1366 </desc>
1367 </attribute>
1368
1369 <attribute name="networkName" type="wstring" readonly="yes">
1370 <desc>
1371 specifies internal network name the server is used for
1372 </desc>
1373 </attribute>
1374
1375 <attribute name="lowerIP" type="wstring" readonly="yes">
1376 <desc>
1377 specifies from IP adrres in server address range
1378 </desc>
1379 </attribute>
1380
1381 <attribute name="upperIP" type="wstring" readonly="yes">
1382 <desc>
1383 specifies to IP adrres in server address range
1384 </desc>
1385 </attribute>
1386
1387 <method name="setConfiguration">
1388 <desc>
1389 configures the server
1390 <result name="E_INVALIDARG">
1391 invalid configuration supplied
1392 </result>
1393 </desc>
1394 <param name="IPAddress" type="wstring" dir="in">
1395 <desc>
1396 server IP address
1397 </desc>
1398 </param>
1399 <param name="networkMask" type="wstring" dir="in">
1400 <desc>
1401 server network mask
1402 </desc>
1403 </param>
1404 <param name="FromIPAddress" type="wstring" dir="in">
1405 <desc>
1406 server From IP address for address range
1407 </desc>
1408 </param>
1409 <param name="ToIPAddress" type="wstring" dir="in">
1410 <desc>
1411 server To IP address for address range
1412 </desc>
1413 </param>
1414 </method>
1415
1416 <method name="start">
1417 <desc>
1418 Starts DHCP server process.
1419 <result name="E_FAIL">
1420 Failed to start the process.
1421 </result>
1422 </desc>
1423 <param name="networkName" type="wstring" dir="in">
1424 <desc>
1425 Name of internal network DHCP server should attach to.
1426 </desc>
1427 </param>
1428 <param name="trunkName" type="wstring" dir="in">
1429 <desc>
1430 Name of internal network trunk.
1431 </desc>
1432 </param>
1433 <param name="trunkType" type="wstring" dir="in">
1434 <desc>
1435 Type of internal network trunk.
1436 </desc>
1437 </param>
1438 </method>
1439
1440 <method name="stop">
1441 <desc>
1442 Stops DHCP server process.
1443 <result name="E_FAIL">
1444 Failed to stop the process.
1445 </result>
1446 </desc>
1447 </method>
1448 </interface>
1449
1450 <interface
1451 name="IVirtualBox" extends="$dispatched"
1452 uuid="3f4ab53a-199b-4526-a91a-93ff62e456b8"
1453 wsmap="managed"
1454 >
1455 <desc>
1456 The IVirtualBox interface represents the main interface exposed by the
1457 product that provides virtual machine management.
1458
1459 An instance of IVirtualBox is required for the product to do anything
1460 useful. Even though the interface does not expose this, internally,
1461 IVirtualBox is implemented as a singleton and actually lives in the
1462 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1463 IVirtualBox can track the state of all virtual machines on a particular
1464 host, regardless of which frontend started them.
1465
1466 To enumerate all the virtual machines on the host, use the
1467 <link to="IVirtualBox::machines"/> attribute.
1468 </desc>
1469
1470 <attribute name="version" type="wstring" readonly="yes">
1471 <desc>
1472 A string representing the version number of the product. The
1473 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1474 last number represents the build number and will frequently change.
1475 </desc>
1476 </attribute>
1477
1478 <attribute name="revision" type="unsigned long" readonly="yes">
1479 <desc>
1480 The internal build revision number of the product.
1481 </desc>
1482 </attribute>
1483
1484 <attribute name="packageType" type="wstring" readonly="yes">
1485 <desc>
1486 A string representing the package type of this product. The
1487 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1488 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1489 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1490 this.
1491 </desc>
1492 </attribute>
1493
1494 <attribute name="homeFolder" type="wstring" readonly="yes">
1495 <desc>
1496 Full path to the directory where the global settings file,
1497 <tt>VirtualBox.xml</tt>, is stored.
1498
1499 In this version of VirtualBox, the value of this property is
1500 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1501 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1502 as determined by the host OS), and cannot be changed.
1503
1504 This path is also used as the base to resolve relative paths in
1505 places where relative paths are allowed (unless otherwise
1506 expressly indicated).
1507 </desc>
1508 </attribute>
1509
1510 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1511 <desc>
1512 Full name of the global settings file.
1513 The value of this property corresponds to the value of
1514 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1515 </desc>
1516 </attribute>
1517
1518 <attribute name="host" type="IHost" readonly="yes">
1519 <desc>Associated host object.</desc>
1520 </attribute>
1521
1522 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1523 <desc>Associated system information object.</desc>
1524 </attribute>
1525
1526 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1527 <desc>
1528 Array of machine objects registered within this VirtualBox instance.
1529 </desc>
1530 </attribute>
1531
1532 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1533 <desc>
1534 Array of hard disk objects known to this VirtualBox installation.
1535
1536 This array contains only base (root) hard disks. All differencing
1537 hard disks of the given base hard disk can be enumerated using
1538 <link to="IHardDisk::children"/>.
1539 </desc>
1540 </attribute>
1541
1542 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1543 <desc>
1544 Array of CD/DVD image objects registered with this VirtualBox instance.
1545 </desc>
1546 </attribute>
1547
1548 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1549 <desc>
1550 Array of floppy image objects registered with this VirtualBox instance.
1551 </desc>
1552 </attribute>
1553
1554 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1555
1556 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1557
1558 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1559 <desc>
1560 Collection of global shared folders. Global shared folders are
1561 available to all virtual machines.
1562
1563 New shared folders are added to the collection using
1564 <link to="#createSharedFolder"/>. Existing shared folders can be
1565 removed using <link to="#removeSharedFolder"/>.
1566
1567 <note>
1568 In the current version of the product, global shared folders are not
1569 implemented and therefore this collection is always empty.
1570 </note>
1571 </desc>
1572 </attribute>
1573
1574 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1575 <desc>
1576 Associated performance collector object.
1577 </desc>
1578 </attribute>
1579
1580 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1581 <desc>
1582 dhcp server settings.
1583 </desc>
1584 </attribute>
1585
1586 <method name="createMachine">
1587 <desc>
1588 Creates a new virtual machine.
1589
1590 The new machine is created unregistered, with the initial configuration
1591 set according to the specified guest OS type. A typical sequence of
1592 actions to create a new virtual machine is as follows:
1593
1594 <ol>
1595 <li>
1596 Call this method to have a new machine created. The returned machine
1597 object will be "mutable" allowing to change any machine property.
1598 </li>
1599
1600 <li>
1601 Configure the machine using the appropriate attributes and methods.
1602 </li>
1603
1604 <li>
1605 Call <link to="IMachine::saveSettings" /> to write the settings
1606 to the machine's XML settings file. The configuration of the newly
1607 created machine will not be saved to disk until this method is
1608 called.
1609 </li>
1610
1611 <li>
1612 Call <link to="#registerMachine" /> to add the machine to the list
1613 of machines known to VirtualBox.
1614 </li>
1615 </ol>
1616
1617 You should specify valid name for the newly created machine when calling
1618 this method. See the <link to="IMachine::name"/> attribute description
1619 for more details about the machine name.
1620
1621 The specified guest OS type identifier must match an ID of one of known
1622 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1623 array.
1624
1625 Every machine has a <i>settings file</i> that is used to store
1626 the machine configuration. This file is stored in a directory called the
1627 <i>machine settings subfolder</i>. Both the settings subfolder and file
1628 will have a name that corresponds to the name of the virtual machine.
1629 You can specify where to create the machine setting subfolder using the
1630 @a baseFolder argument. The base folder can be absolute (full path) or
1631 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1632 directory</link>.
1633
1634 If @a baseFolder is a @c null or empty string (which is recommended), the
1635 <link to="ISystemProperties::defaultMachineFolder">default machine
1636 settings folder</link> will be used as a base folder for the created
1637 machine. Otherwise the given base folder will be used. In either case,
1638 the full path to the resulting settings file has the following
1639 structure:
1640 <pre>
1641 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1642 </pre>
1643
1644 Note that if the resulting settings file already exists, this method
1645 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1646
1647 Optionally, you may specify an UUID of to assign to the created machine.
1648 However, this is not recommended and you should normally pass an empty
1649 (@c null) UUID to this method so that a new UUID will be automatically
1650 generated for every created machine. You can use UUID
1651 00000000-0000-0000-0000-000000000000 as @c null value.
1652
1653 <note>
1654 There is no way to change the name of the settings file or
1655 subfolder of the created machine directly.
1656 </note>
1657
1658 <result name="VBOX_E_OBJECT_NOT_FOUND">
1659 @a osTypeId is invalid.
1660 </result>
1661 <result name="VBOX_E_FILE_ERROR">
1662 Resulting settings file name is invalid or the settings file already
1663 exists or could not be created due to an I/O error.
1664 </result>
1665 <result name="E_INVALIDARG">
1666 @a name is empty or @c null.
1667 </result>
1668 </desc>
1669
1670 <param name="name" type="wstring" dir="in">
1671 <desc>Machine name.</desc>
1672 </param>
1673 <param name="osTypeId" type="wstring" dir="in">
1674 <desc>Guest OS Type ID.</desc>
1675 </param>
1676 <param name="baseFolder" type="wstring" dir="in">
1677 <desc>Base machine folder (optional).</desc>
1678 </param>
1679 <param name="id" type="wstring" dir="in">
1680 <desc>Machine UUID (optional).</desc>
1681 </param>
1682 <param name="machine" type="IMachine" dir="return">
1683 <desc>Created machine object.</desc>
1684 </param>
1685 </method>
1686
1687 <method name="createLegacyMachine">
1688 <desc>
1689 Creates a new virtual machine in "legacy" mode, using the specified
1690 settings file to store machine settings.
1691
1692 As opposed to machines created by <link to="#createMachine"/>,
1693 the settings file of the machine created in "legacy" mode is not
1694 automatically renamed when the machine name is changed -- it will always
1695 remain the same as specified in this method call.
1696
1697 The specified settings file name can be absolute (full path) or relative
1698 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1699 directory</link>. If the file name doesn't contain an extension, the
1700 default extension (.xml) will be appended.
1701
1702 Note that the configuration of the newly created machine is not
1703 saved to disk (and therefore no settings file is created)
1704 until <link to="IMachine::saveSettings"/> is called. If the
1705 specified settings file already exists, this method
1706 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1707
1708 See <link to="#createMachine"/> for more information.
1709
1710 @deprecated This method may be removed later. Use <link
1711 to="IVirtualBox::createMachine"/> instead.
1712
1713 <note>
1714 There is no way to change the name of the settings file
1715 of the machine created in "legacy" mode.
1716 </note>
1717
1718 <result name="VBOX_E_OBJECT_NOT_FOUND">
1719 @a osTypeId is invalid.
1720 </result>
1721 <result name="VBOX_E_FILE_ERROR">
1722 @a settingsFile is invalid or the settings file already exists or
1723 could not be created due to an I/O error.
1724 </result>
1725 <result name="E_INVALIDARG">
1726 @a name or @a settingsFile is empty or @c null.
1727 </result>
1728 </desc>
1729
1730 <param name="name" type="wstring" dir="in">
1731 <desc>Machine name.</desc>
1732 </param>
1733 <param name="osTypeId" type="wstring" dir="in">
1734 <desc>Machine OS Type ID.</desc>
1735 </param>
1736 <param name="settingsFile" type="wstring" dir="in">
1737 <desc>Name of the machine settings file.</desc>
1738 </param>
1739 <param name="id" type="wstring" dir="in">
1740 <desc>Machine UUID (optional).</desc>
1741 </param>
1742 <param name="machine" type="IMachine" dir="return">
1743 <desc>Created machine object.</desc>
1744 </param>
1745 </method>
1746
1747 <method name="openMachine">
1748 <desc>
1749 Opens a virtual machine from the existing settings file.
1750 The opened machine remains unregistered until you call
1751 <link to="#registerMachine"/>.
1752
1753 The specified settings file name can be absolute
1754 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1755 VirtualBox home directory</link>. This file must exist
1756 and must be a valid machine settings file whose contents
1757 will be used to construct the machine object.
1758
1759 @deprecated Will be removed soon.
1760 <result name="VBOX_E_FILE_ERROR">
1761 Settings file name invalid, not found or sharing violation.
1762 </result>
1763 </desc>
1764 <param name="settingsFile" type="wstring" dir="in">
1765 <desc>
1766 Name of the machine settings file.
1767 </desc>
1768 </param>
1769 <param name="machine" type="IMachine" dir="return">
1770 <desc>Opened machine object.</desc>
1771 </param>
1772 <note>
1773 <link to="IMachine::settingsModified"/> will return
1774 @c false for the created machine, until any of machine settings
1775 are changed.
1776 </note>
1777 </method>
1778
1779 <method name="registerMachine">
1780 <desc>
1781
1782 Registers the machine previously created using
1783 <link to="#createMachine"/> or opened using
1784 <link to="#openMachine"/> within this VirtualBox installation. After
1785 successful method invocation, the
1786 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1787 to all registered callbacks.
1788
1789 <note>
1790 This method implicitly calls <link to="IMachine::saveSettings"/>
1791 to save all current machine settings before registering it.
1792 </note>
1793
1794 <result name="VBOX_E_OBJECT_NOT_FOUND">
1795 No matching virtual machine found.
1796 </result>
1797 <result name="VBOX_E_INVALID_OBJECT_STATE">
1798 Virtual machine was not created within this VirtualBox instance.
1799 </result>
1800
1801 </desc>
1802 <param name="machine" type="IMachine" dir="in"/>
1803 </method>
1804
1805 <method name="getMachine">
1806 <desc>
1807 Attempts to find a virtual machine given its UUID.
1808 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1809 instead.
1810
1811 <result name="VBOX_E_OBJECT_NOT_FOUND">
1812 Could not find registered machine matching @a id.
1813 </result>
1814
1815 </desc>
1816 <param name="id" type="wstring" dir="in"/>
1817 <param name="machine" type="IMachine" dir="return"/>
1818 </method>
1819
1820 <method name="findMachine">
1821 <desc>
1822 Attempts to find a virtual machine given its name.
1823 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1824 instead.
1825
1826 <result name="VBOX_E_OBJECT_NOT_FOUND">
1827 Could not find registered machine matching @a name.
1828 </result>
1829
1830 </desc>
1831 <param name="name" type="wstring" dir="in"/>
1832 <param name="machine" type="IMachine" dir="return"/>
1833 </method>
1834
1835 <method name="unregisterMachine">
1836 <desc>
1837
1838 Unregisters the machine previously registered using
1839 <link to="#registerMachine"/>. After successful method invocation, the
1840 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1841 to all registered callbacks.
1842
1843 <note>
1844 The specified machine must not be in the Saved state, have an open
1845 (or a spawning) direct session associated with it, have snapshots or
1846 have hard disks attached.
1847 </note>
1848
1849 <note>
1850 This method implicitly calls <link to="IMachine::saveSettings"/> to
1851 save all current machine settings before unregistering it.
1852 </note>
1853
1854 <note>
1855 If the given machine is inaccessible (see
1856 <link to="IMachine::accessible"/>), it will be unregistered and
1857 fully uninitialized right afterwards. As a result, the returned
1858 machine object will be unusable and an attempt to call
1859 <b>any</b> method will return the "Object not ready" error.
1860 </note>
1861
1862 <result name="VBOX_E_OBJECT_NOT_FOUND">
1863 Could not find registered machine matching @a id.
1864 </result>
1865 <result name="VBOX_E_INVALID_VM_STATE">
1866 Machine is in Saved state.
1867 </result>
1868 <result name="VBOX_E_INVALID_OBJECT_STATE">
1869 Machine has snapshot or open session or hard disk attached.
1870 </result>
1871
1872 </desc>
1873 <param name="id" type="wstring" dir="in">
1874 <desc>UUID of the machine to unregister.</desc>
1875 </param>
1876 <param name="machine" type="IMachine" dir="return">
1877 <desc>Unregistered machine object.</desc>
1878 </param>
1879 </method>
1880
1881 <method name="createAppliance">
1882 <desc>
1883 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1884 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1885 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1886 </desc>
1887 <param name="appliance" type="IAppliance" dir="return">
1888 <desc>New appliance.</desc>
1889 </param>
1890 </method>
1891
1892 <method name="createHardDisk">
1893 <desc>
1894 Creates a new base hard disk object that will use the given storage
1895 format and location for hard disk data.
1896
1897 Note that the actual storage unit is not created by this method. In
1898 order to do it, and before you are able to attach the created hard disk
1899 to virtual machines, you must call one of the following methods to
1900 allocate a format-specific storage unit at the specified location:
1901 <ul>
1902 <li><link to="IHardDisk::createBaseStorage"/></li>
1903 <li><link to="IHardDisk::createDiffStorage"/></li>
1904 </ul>
1905
1906 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1907 remain uninitialized until the hard disk storage unit is successfully
1908 created by one of the above methods.
1909
1910 After the storage unit is successfully created, the hard disk gets
1911 remembered by this VirtualBox installation and will be accessible
1912 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1913 methods. Remembered root (base) hard disks are also returned as part of
1914 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1915
1916 The list of all storage formats supported by this VirtualBox
1917 installation can be obtained using
1918 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1919 attribute is empty or @c null then the default storage format
1920 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1921 be used for creating a storage unit of the hard disk.
1922
1923 Note that the format of the location string is storage format specific.
1924 See <link to="IMedium::location"/>, IHardDisk and
1925 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1926
1927 <result name="VBOX_E_OBJECT_NOT_FOUND">
1928 @a format identifier is invalid. See
1929 <link to="ISystemProperties::hardDiskFormats"/>.
1930 </result>
1931 <result name="VBOX_E_FILE_ERROR">
1932 @a location is a not valid file name (for file-based formats only).
1933 </result>
1934 </desc>
1935 <param name="format" type="wstring" dir="in">
1936 <desc>
1937 Identifier of the storage format to use for the new hard disk.
1938 </desc>
1939 </param>
1940 <param name="location" type="wstring" dir="in">
1941 <desc>
1942 Location of the storage unit for the new hard disk.
1943 </desc>
1944 </param>
1945 <param name="hardDisk" type="IHardDisk" dir="return">
1946 <desc>Created hard disk object.</desc>
1947 </param>
1948 </method>
1949
1950 <method name="openHardDisk">
1951 <desc>
1952 Opens a hard disk from an existing location, optionally replacing
1953 the image UUID and/or parent UUID.
1954
1955 After the hard disk is successfully opened by this method, it gets
1956 remembered by (known to) this VirtualBox installation and will be
1957 accessible through <link to="#getHardDisk"/> and
1958 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1959 are also returned as part of the <link to="#hardDisks"/> array and can
1960 be attached to virtual machines. See IHardDisk for more details.
1961
1962 If a differencing hard disk is to be opened by this method, the
1963 operation will succeed only if its parent hard disk and all ancestors,
1964 if any, are already known to this VirtualBox installation (for example,
1965 were opened by this method before).
1966
1967 This method tries to guess the storage format of the specified hard disk
1968 by reading hard disk data at the specified location.
1969
1970 If @a write is ReadWrite (which it should be), the image is opened for
1971 read/write access and must have according permissions, as VirtualBox
1972 may actually write status information into the disk's metadata sections.
1973
1974 Note that write access is required for all typical image usage in VirtualBox,
1975 since VirtualBox may need to write metadata such as a UUID into the image.
1976 The only exception is opening a source image temporarily for copying and
1977 cloning when the image will quickly be closed again.
1978
1979 Note that the format of the location string is storage format specific.
1980 See <link to="IMedium::location"/>, IHardDisk and
1981 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1982
1983 <result name="VBOX_E_FILE_ERROR">
1984 Invalid hard disk storage file location or could not find the hard
1985 disk at the specified location.
1986 </result>
1987 <result name="VBOX_E_IPRT_ERROR">
1988 Could not get hard disk storage format.
1989 </result>
1990 <result name="E_INVALIDARG">
1991 Invalid hard disk storage format.
1992 </result>
1993
1994 </desc>
1995 <param name="location" type="wstring" dir="in">
1996 <desc>
1997 Location of the storage unit that contains hard disk data in one of
1998 the supported storage formats.
1999 </desc>
2000 </param>
2001 <param name="accessMode" type="AccessMode" dir="in">
2002 <desc>
2003 Determines whether to open the image in read/write or read-only mode.
2004 </desc>
2005 </param>
2006 <param name="setImageId" type="boolean" dir="in">
2007 <desc>
2008 Select whether a new image UUID is set or not.
2009 </desc>
2010 </param>
2011 <param name="imageId" type="wstring" dir="in">
2012 <desc>
2013 New UUID for the image. If an empty string is passed, then a new
2014 UUID is automatically created. Specifying a zero UUIDs is not valid.
2015 </desc>
2016 </param>
2017 <param name="setParentId" type="boolean" dir="in">
2018 <desc>
2019 Select whether a new parent UUID is set or not.
2020 </desc>
2021 </param>
2022 <param name="parentId" type="wstring" dir="in">
2023 <desc>
2024 New parent UUID for the image. If an empty string is passed, then a
2025 new UUID is automatically created, provided @a setParentId is
2026 @c true. A zero UUID is valid.
2027 </desc>
2028 </param>
2029 <param name="hardDisk" type="IHardDisk" dir="return">
2030 <desc>Opened hard disk object.</desc>
2031 </param>
2032 </method>
2033
2034 <method name="getHardDisk" const="yes">
2035 <desc>
2036 Returns a hard disk with the given UUID.
2037
2038 The hard disk with the given UUID must be known to this VirtualBox
2039 installation, i.e. it must be previously created by
2040 <link to="#createHardDisk"/> or opened by <link
2041 to="#openHardDisk"/>, or attached to some known virtual machine.
2042
2043 <result name="VBOX_E_OBJECT_NOT_FOUND">
2044 No hard disk object matching @a id found.
2045 </result>
2046
2047 </desc>
2048 <param name="id" type="wstring" dir="in">
2049 <desc>UUID of the hard disk to look for.</desc>
2050 </param>
2051 <param name="hardDisk" type="IHardDisk" dir="return">
2052 <desc>Found hard disk object.</desc>
2053 </param>
2054 </method>
2055
2056 <method name="findHardDisk">
2057 <desc>
2058 Returns a hard disk that uses the given location to store hard
2059 disk data.
2060
2061 The given hard disk must be known to this VirtualBox installation, i.e.
2062 it must be previously created by
2063 <link to="#createHardDisk"/> or opened by <link
2064 to="#openHardDisk"/>, or attached to some known virtual machine.
2065
2066 The search is done by comparing the value of the @a location argument to
2067 the <link to="IHardDisk::location"/> attribute of each known hard
2068 disk.
2069
2070 For locations represented by file names in the host's file system, the
2071 requested location can be a path relative to the
2072 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2073 only a file name without any path is given, the
2074 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2075 folder</link> will be prepended to the file name before searching. Note
2076 that on case sensitive file systems, a case sensitive comparison is
2077 performed, otherwise the case of symbols in the file path is ignored.
2078
2079 <result name="VBOX_E_OBJECT_NOT_FOUND">
2080 No hard disk object matching @a location found.
2081 </result>
2082
2083 </desc>
2084 <param name="location" type="wstring" dir="in">
2085 <desc>Location string to search for.</desc>
2086 </param>
2087 <param name="hardDisk" type="IHardDisk" dir="return">
2088 <desc>Found hard disk object.</desc>
2089 </param>
2090 </method>
2091
2092 <method name="openDVDImage">
2093 <desc>
2094 Opens a CD/DVD image contained in the specified file of the supported
2095 format and assigns it the given UUID.
2096
2097 After the image is successfully opened by this method, it gets
2098 remembered by (known to) this VirtualBox installation and will be
2099 accessible through <link to="#getDVDImage"/> and
2100 <link to="#findDVDImage"/> methods. Remembered images are also
2101 returned as part of the <link to="#DVDImages"/> array and can be mounted
2102 to virtual machines. See IMedium for more details.
2103
2104 See <link to="IMedium::location"/> to get more details about the format
2105 of the location string.
2106
2107 <note>
2108 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2109 </note>
2110
2111 <result name="VBOX_E_FILE_ERROR">
2112 Invalid CD/DVD image file location or could not find the CD/DVD
2113 image at the specified location.
2114 </result>
2115 <result name="VBOX_E_INVALID_OBJECT_STATE">
2116 CD/DVD image already exists in the media registry.
2117 </result>
2118
2119 </desc>
2120 <param name="location" type="wstring" dir="in">
2121 <desc>
2122 Full path to the file that contains a valid CD/DVD image.
2123 </desc>
2124 </param>
2125 <param name="id" type="wstring" dir="in">
2126 <desc>
2127 UUID to assign to the given image within this VirtualBox installation.
2128 If an empty (@c null) UUID is specified, the system will randomly
2129 generate a new UUID.
2130 </desc>
2131 </param>
2132 <param name="image" type="IDVDImage" dir="return">
2133 <desc>Opened CD/DVD image object.</desc>
2134 </param>
2135 </method>
2136
2137 <method name="getDVDImage">
2138 <desc>
2139 Returns a CD/DVD image with the given UUID.
2140
2141 The image with the given UUID must be known to this VirtualBox
2142 installation, i.e. it must be previously opened by <link
2143 to="#openDVDImage"/>, or mounted to some known virtual machine.
2144
2145 <result name="VBOX_E_OBJECT_NOT_FOUND">
2146 No matching DVD image found in the media registry.
2147 </result>
2148
2149 </desc>
2150 <param name="id" type="wstring" dir="in">
2151 <desc>UUID of the image to look for.</desc>
2152 </param>
2153 <param name="image" type="IDVDImage" dir="return">
2154 <desc>Found CD/DVD image object.</desc>
2155 </param>
2156 </method>
2157
2158 <method name="findDVDImage">
2159 <desc>
2160 Returns a CD/DVD image with the given image location.
2161
2162 The image with the given UUID must be known to this VirtualBox
2163 installation, i.e. it must be previously opened by <link
2164 to="#openDVDImage"/>, or mounted to some known virtual machine.
2165
2166 The search is done by comparing the value of the @a location argument to
2167 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2168
2169 The requested location can be a path relative to the
2170 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2171 only a file name without any path is given, the
2172 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2173 folder</link> will be prepended to the file name before searching. Note
2174 that on case sensitive file systems, a case sensitive comparison is
2175 performed, otherwise the case in the file path is ignored.
2176
2177 <result name="VBOX_E_FILE_ERROR">
2178 Invalid image file location.
2179 </result>
2180 <result name="VBOX_E_OBJECT_NOT_FOUND">
2181 No matching DVD image found in the media registry.
2182 </result>
2183
2184 </desc>
2185 <param name="location" type="wstring" dir="in">
2186 <desc>CD/DVD image file path to look for.</desc>
2187 </param>
2188 <param name="image" type="IDVDImage" dir="return">
2189 <desc>Found CD/DVD image object.</desc>
2190 </param>
2191 </method>
2192
2193 <method name="openFloppyImage">
2194 <desc>
2195 Opens a floppy image contained in the specified file of the supported
2196 format and assigns it the given UUID.
2197
2198 After the image is successfully opened by this method, it gets
2199 remembered by (known to) this VirtualBox installation and will be
2200 accessible through <link to="#getFloppyImage"/> and
2201 <link to="#findFloppyImage"/> methods. Remembered images are also
2202 returned as part of the <link to="#floppyImages"/> array and can be
2203 mounted to virtual machines. See IMedium for more details.
2204
2205 See <link to="IMedium::location"/> to get more details about the format
2206 of the location string.
2207
2208 <result name="VBOX_E_FILE_ERROR">
2209 Invalid floppy image file location or could not find the floppy
2210 image at the specified location.
2211 </result>
2212 <result name="VBOX_E_INVALID_OBJECT_STATE">
2213 Floppy image already exists in the media registry.
2214 </result>
2215
2216 <note>
2217 Currently, only raw floppy images are supported by VirtualBox.
2218 </note>
2219 </desc>
2220 <param name="location" type="wstring" dir="in">
2221 <desc>
2222 Full path to the file that contains a valid floppy image.
2223 </desc>
2224 </param>
2225 <param name="id" type="wstring" dir="in">
2226 <desc>
2227 UUID to assign to the given image file within this VirtualBox
2228 installation. If an empty (@c null) UUID is specified, the system will
2229 randomly generate a new UUID.
2230 </desc>
2231 </param>
2232 <param name="image" type="IFloppyImage" dir="return">
2233 <desc>Opened floppy image object.</desc>
2234 </param>
2235 </method>
2236
2237 <method name="getFloppyImage">
2238 <desc>
2239 Returns a floppy image with the given UUID.
2240
2241 The image with the given UUID must be known to this VirtualBox
2242 installation, i.e. it must be previously opened by <link
2243 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2244
2245 <result name="VBOX_E_OBJECT_NOT_FOUND">
2246 No matching floppy image found in the media registry.
2247 </result>
2248
2249 </desc>
2250 <param name="id" type="wstring" dir="in">
2251 <desc>UUID of the image to look for.</desc>
2252 </param>
2253 <param name="image" type="IFloppyImage" dir="return">
2254 <desc>Found floppy image object.</desc>
2255 </param>
2256 </method>
2257
2258 <method name="findFloppyImage">
2259 <desc>
2260 Returns a floppy image with the given image location.
2261
2262 The image with the given UUID must be known to this VirtualBox
2263 installation, i.e. it must be previously opened by <link
2264 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2265
2266 The search is done by comparing the value of the @a location argument to
2267 the <link to="IMedium::location"/> attribute of each known floppy image.
2268
2269 The requested location can be a path relative to the
2270 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2271 only a file name without any path is given, the
2272 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2273 folder</link> will be prepended to the file name before searching. Note
2274 that on case sensitive file systems, a case sensitive comparison is
2275 performed, otherwise the case of symbols in the file path is ignored.
2276
2277 <result name="VBOX_E_FILE_ERROR">
2278 Invalid image file location.
2279 </result>
2280 <result name="VBOX_E_OBJECT_NOT_FOUND">
2281 No matching floppy image found in the media registry.
2282 </result>
2283
2284 </desc>
2285 <param name="location" type="wstring" dir="in">
2286 <desc>Floppy image file path to look for.</desc>
2287 </param>
2288 <param name="image" type="IFloppyImage" dir="return">
2289 <desc>Found floppy image object.</desc>
2290 </param>
2291 </method>
2292
2293 <method name="getGuestOSType">
2294 <desc>
2295 Returns an object describing the specified guest OS type.
2296
2297 The requested guest OS type is specified using a string which is a
2298 mnemonic identifier of the guest operating system, such as
2299 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2300 particular virtual machine can be read or set using the
2301 <link to="IMachine::OSTypeId"/> attribute.
2302
2303 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2304 available guest OS type objects. Each object has an
2305 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2306 the guest OS this object describes.
2307
2308 <result name="E_INVALIDARG">
2309 @a id is not a valid Guest OS type.
2310 </result>
2311
2312 </desc>
2313 <param name="id" type="wstring" dir="in">
2314 <desc>Guest OS type ID string.</desc>
2315 </param>
2316 <param name="type" type="IGuestOSType" dir="return">
2317 <desc>Guest OS type object.</desc>
2318 </param>
2319 </method>
2320
2321 <method name="createSharedFolder">
2322 <desc>
2323 Creates a new global shared folder by associating the given logical
2324 name with the given host path, adds it to the collection of shared
2325 folders and starts sharing it. Refer to the description of
2326 <link to="ISharedFolder"/> to read more about logical names.
2327 <note>
2328 In the current implementation, this operation is not
2329 implemented.
2330 </note>
2331 </desc>
2332 <param name="name" type="wstring" dir="in">
2333 <desc>Unique logical name of the shared folder.</desc>
2334 </param>
2335 <param name="hostPath" type="wstring" dir="in">
2336 <desc>Full path to the shared folder in the host file system.</desc>
2337 </param>
2338 <param name="writable" type="boolean" dir="in">
2339 <desc>Whether the share is writable or readonly</desc>
2340 </param>
2341 </method>
2342
2343 <method name="removeSharedFolder">
2344 <desc>
2345 Removes the global shared folder with the given name previously
2346 created by <link to="#createSharedFolder"/> from the collection of
2347 shared folders and stops sharing it.
2348 <note>
2349 In the current implementation, this operation is not
2350 implemented.
2351 </note>
2352 </desc>
2353 <param name="name" type="wstring" dir="in">
2354 <desc>Logical name of the shared folder to remove.</desc>
2355 </param>
2356 </method>
2357
2358 <method name="getExtraDataKeys">
2359 <desc>
2360 Returns an array representing the global extra data keys which currently
2361 have values defined.
2362 </desc>
2363 <param name="value" type="wstring" dir="return" safearray="yes">
2364 <desc>Array of extra data keys.</desc>
2365 </param>
2366 </method>
2367
2368 <method name="getExtraData">
2369 <desc>
2370 Returns associated global extra data.
2371
2372 If the requested data @a key does not exist, this function will
2373 succeed and return an empty string in the @a value argument.
2374
2375 <result name="VBOX_E_FILE_ERROR">
2376 Settings file not accessible.
2377 </result>
2378 <result name="VBOX_E_XML_ERROR">
2379 Could not parse the settings file.
2380 </result>
2381
2382 </desc>
2383 <param name="key" type="wstring" dir="in">
2384 <desc>Name of the data key to get.</desc>
2385 </param>
2386 <param name="value" type="wstring" dir="return">
2387 <desc>Value of the requested data key.</desc>
2388 </param>
2389 </method>
2390
2391 <method name="setExtraData">
2392 <desc>
2393 Sets associated global extra data.
2394
2395 If you pass @c null or empty string as a key @a value, the given @a key
2396 will be deleted.
2397
2398 <note>
2399 Before performing the actual data change, this method will ask all
2400 registered callbacks using the
2401 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2402 notification for a permission. If one of the callbacks refuses the
2403 new value, the change will not be performed.
2404 </note>
2405 <note>
2406 On success, the
2407 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2408 is called to inform all registered callbacks about a successful data
2409 change.
2410 </note>
2411
2412 <result name="VBOX_E_FILE_ERROR">
2413 Settings file not accessible.
2414 </result>
2415 <result name="VBOX_E_XML_ERROR">
2416 Could not parse the settings file.
2417 </result>
2418 <result name="E_ACCESSDENIED">
2419 Modification request refused.
2420 </result>
2421
2422 </desc>
2423 <param name="key" type="wstring" dir="in">
2424 <desc>Name of the data key to set.</desc>
2425 </param>
2426 <param name="value" type="wstring" dir="in">
2427 <desc>Value to assign to the key.</desc>
2428 </param>
2429 </method>
2430
2431 <method name="openSession">
2432 <desc>
2433 Opens a new direct session with the given virtual machine.
2434
2435 A direct session acts as a local lock on the given VM.
2436 There can be only one direct session open at a time for every
2437 virtual machine, protecting the VM from being manipulated by
2438 conflicting actions from different processes. Only after a
2439 direct session has been opened, one can change all VM settings
2440 and execute the VM in the process space of the session object.
2441
2442 Sessions therefore can be compared to mutex semaphores that
2443 lock a given VM for modification and execution.
2444 See <link to="ISession">ISession</link> for details.
2445
2446 <note>Unless you are writing a new VM frontend, you will not
2447 want to execute a VM in the current process. To spawn a new
2448 process that executes a VM, use
2449 <link to="IVirtualBox::openRemoteSession" />
2450 instead.</note>
2451
2452 Upon successful return, the session object can be used to
2453 get access to the machine and to the VM console.
2454
2455 In VirtualBox terminology, the machine becomes "mutable" after
2456 a session has been opened. Note that the "mutable" machine
2457 object, on which you may invoke IMachine methods to change its
2458 settings, will be a different object from the immutable IMachine
2459 objects returned by various IVirtualBox methods. To obtain a
2460 mutable IMachine object (upon which you can invoke settings methods),
2461 use the <link to="ISession::machine" /> attribute.
2462
2463 One must always call <link to="ISession::close" /> to release the
2464 lock on the machine, or the machine's state will eventually be
2465 set to "Aborted".
2466
2467 In other words, to change settings on a machine, the following
2468 sequence is typically performed:
2469
2470 <ol>
2471 <li>Call this method (openSession) to have a machine locked for
2472 the current session.</li>
2473
2474 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2475
2476 <li>Change the settings of the machine.</li>
2477
2478 <li>Call <link to="IMachine::saveSettings" />.</li>
2479
2480 <li>Close the session by calling <link to="ISession::close"/>.</li>
2481 </ol>
2482
2483 <result name="E_UNEXPECTED">
2484 Virtual machine not registered.
2485 </result>
2486 <result name="E_ACCESSDENIED">
2487 Process not started by OpenRemoteSession.
2488 </result>
2489 <result name="VBOX_E_OBJECT_NOT_FOUND">
2490 No matching virtual machine found.
2491 </result>
2492 <result name="VBOX_E_INVALID_OBJECT_STATE">
2493 Session already open or being opened.
2494 </result>
2495 <result name="VBOX_E_VM_ERROR">
2496 Failed to assign machine to session.
2497 </result>
2498
2499 </desc>
2500 <param name="session" type="ISession" dir="in">
2501 <desc>
2502 Session object that will represent the opened session after
2503 successful method invocation. This object must not represent
2504 the already open session.
2505 <note>
2506 This session will be automatically closed if the
2507 VirtualBox server is terminated for some reason.
2508 </note>
2509 </desc>
2510 </param>
2511 <param name="machineId" type="wstring" dir="in">
2512 <desc>ID of the virtual machine to open a session with.</desc>
2513 </param>
2514 </method>
2515
2516 <method name="openRemoteSession">
2517 <desc>
2518 Spawns a new process that executes a virtual machine (called a
2519 "remote session").
2520
2521 Opening a remote session causes the VirtualBox server to start a new
2522 process that opens a direct session with the given VM. As a result, the
2523 VM is locked by that direct session in the new process, preventing
2524 conflicting changes from other processes. Since sessions act as locks
2525 that prevent conflicting changes, one cannot open a remote session
2526 for a VM that already has another open session (direct or remote), or
2527 is currently in the process of opening one (see <link
2528 to="IMachine::sessionState"/>).
2529
2530 While the remote session still provides some level of control over the
2531 VM execution to the caller (using the <link to="IConsole" /> interface),
2532 not all VM settings are available for modification within the remote
2533 session context.
2534
2535 This operation can take some time (a new VM is started in a new process,
2536 for which memory and other resources need to be set up). Because of this,
2537 an <link to="IProgress" /> is returned to allow the caller to wait for this
2538 asynchronous operation to be completed. Until then, the remote session
2539 object remains in the closed state, and accessing the machine or its
2540 console through it is invalid. It is recommended to use
2541 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2542 completion.
2543
2544 As with all <link to="ISession" /> objects, it is recommended to call
2545 <link to="ISession::close" /> on the local session object once openRemoteSession()
2546 has been called. However, the session's state (see <link to="ISession::state" />)
2547 will not return to "Closed" until the remote session has also closed (i.e.
2548 until the VM is no longer running). In that case, however, the state of
2549 the session will automatically change back to "Closed".
2550
2551 Currently supported session types (values of the @a type
2552 argument) are:
2553 <ul>
2554 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2555 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2556 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2557 </ul>
2558
2559 The @a environment argument is a string containing definitions of
2560 environment variables in the following format:
2561 @code
2562 NAME[=VALUE]\n
2563 NAME[=VALUE]\n
2564 ...
2565 @endcode
2566 where <tt>\\n</tt> is the new line character. These environment
2567 variables will be appended to the environment of the VirtualBox server
2568 process. If an environment variable exists both in the server process
2569 and in this list, the value from this list takes precedence over the
2570 server's variable. If the value of the environment variable is
2571 omitted, this variable will be removed from the resulting environment.
2572 If the environment string is @c null or empty, the server environment
2573 is inherited by the started process as is.
2574
2575 <see>openExistingSession</see>
2576
2577 <result name="E_UNEXPECTED">
2578 Virtual machine not registered.
2579 </result>
2580 <result name="E_INVALIDARG">
2581 Invalid session type @a type.
2582 </result>
2583 <result name="VBOX_E_OBJECT_NOT_FOUND">
2584 No machine matching @a machineId found.
2585 </result>
2586 <result name="VBOX_E_INVALID_OBJECT_STATE">
2587 Session already open or being opened.
2588 </result>
2589 <result name="VBOX_E_IPRT_ERROR">
2590 Launching process for machine failed.
2591 </result>
2592 <result name="VBOX_E_VM_ERROR">
2593 Failed to assign machine to session.
2594 </result>
2595
2596 </desc>
2597 <param name="session" type="ISession" dir="in">
2598 <desc>
2599 Session object that will represent the opened remote session
2600 after successful method invocation (this object must not
2601 represent an already open session).
2602 </desc>
2603 </param>
2604 <param name="machineId" type="wstring" dir="in">
2605 <desc>ID of the virtual machine to open a session with.</desc>
2606 </param>
2607 <param name="type" type="wstring" dir="in">
2608 <desc>
2609 Type of the remote session (case sensitive).
2610 </desc>
2611 </param>
2612 <param name="environment" type="wstring" dir="in">
2613 <desc>
2614 Environment to pass to the opened session.
2615 </desc>
2616 </param>
2617 <param name="progress" type="IProgress" dir="return">
2618 <desc>Progress object to track the operation completion.</desc>
2619 </param>
2620 </method>
2621
2622 <method name="openExistingSession">
2623 <desc>
2624 Opens a new remote session with the virtual machine for
2625 which a direct session is already open.
2626
2627 The remote session provides some level of control over the VM
2628 execution (using the IConsole interface) to the caller; however,
2629 within the remote session context, not all VM settings are available
2630 for modification.
2631
2632 As opposed to <link to="#openRemoteSession"/>, the number of
2633 remote sessions opened this way is not limited by the API
2634
2635 <note>
2636 It is an error to open a remote session with the machine that
2637 doesn't have an open direct session.
2638 </note>
2639
2640 <result name="E_UNEXPECTED">
2641 Virtual machine not registered.
2642 </result>
2643 <result name="VBOX_E_OBJECT_NOT_FOUND">
2644 No machine matching @a machineId found.
2645 </result>
2646 <result name="VBOX_E_INVALID_OBJECT_STATE">
2647 Session already open or being opened.
2648 </result>
2649 <result name="VBOX_E_INVALID_SESSION_STATE">
2650 Direct session state not Open.
2651 </result>
2652 <result name="VBOX_E_VM_ERROR">
2653 Failed to get console object from direct session or assign
2654 machine to session.
2655 </result>
2656
2657 <see>openRemoteSession</see>
2658 </desc>
2659 <param name="session" type="ISession" dir="in">
2660 <desc>
2661 Session object that will represent the open remote session
2662 after successful method invocation. This object must not
2663 represent an already open session.
2664 <note>
2665 This session will be automatically closed when the peer
2666 (direct) session dies or gets closed.
2667 </note>
2668 </desc>
2669 </param>
2670 <param name="machineId" type="wstring" dir="in">
2671 <desc>ID of the virtual machine to open a session with.</desc>
2672 </param>
2673 </method>
2674
2675 <method name="registerCallback">
2676 <desc>
2677 Registers a new global VirtualBox callback. The methods of the given
2678 callback object will be called by VirtualBox when an appropriate
2679 event occurs.
2680
2681 <result name="E_INVALIDARG">
2682 A @c null callback cannot be registered.
2683 </result>
2684
2685 </desc>
2686 <param name="callback" type="IVirtualBoxCallback" dir="in">
2687 <desc>Callback object to register.</desc>
2688 </param>
2689 </method>
2690
2691 <method name="unregisterCallback">
2692 <desc>
2693 Unregisters the previously registered global VirtualBox callback.
2694
2695 <result name="E_INVALIDARG">
2696 Specified @a callback not registered.
2697 </result>
2698
2699 </desc>
2700 <param name="callback" type="IVirtualBoxCallback" dir="in">
2701 <desc>Callback object to unregister.</desc>
2702 </param>
2703 </method>
2704
2705 <method name="waitForPropertyChange">
2706 <desc>
2707 Blocks the caller until any of the properties represented by the
2708 @a what argument changes the value or until the given timeout interval
2709 expires.
2710
2711 The @a what argument is a comma separated list of property masks that
2712 describe properties the caller is interested in. The property mask is
2713 a string in the following format:
2714
2715 <pre>
2716 [[group.]subgroup.]name
2717 </pre>
2718
2719 where @c name is the property name and @c group, @c subgroup are zero
2720 or more property group specifiers. Each element (group or name) in
2721 the property mask may be either a Latin string or an asterisk symbol
2722 (@c "*") which is used to match any string for the given element. A
2723 property mask that doesn't contain asterisk symbols represents a
2724 single fully qualified property name.
2725
2726 Groups in the fully qualified property name go from more generic (the
2727 left-most part) to more specific (the right-most part). The first
2728 element is usually a name of the object the property belongs to. The
2729 second element may be either a property name, or a child object name,
2730 or an index if the preceding element names an object which is one of
2731 many objects of the same type. This way, property names form a
2732 hierarchy of properties. Here are some examples of property names:
2733
2734 <table>
2735 <tr>
2736 <td><tt>VirtualBox.version</tt></td>
2737 <td><link to="IVirtualBox::version"/> property</td>
2738 </tr>
2739 <tr>
2740 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2741 <td><link to="IMachine::name"/> property of the machine with the
2742 given UUID</td>
2743 </tr>
2744 </table>
2745
2746 Most property names directly correspond to the properties of objects
2747 (components) provided by the VirtualBox library and may be used to
2748 track changes to these properties. However, there may be
2749 pseudo-property names that don't correspond to any existing object's
2750 property directly, as well as there may be object properties that
2751 don't have a corresponding property name that is understood by this
2752 method, and therefore changes to such properties cannot be
2753 tracked. See individual object's property descriptions to get a
2754 fully qualified property name that can be used with this method (if
2755 any).
2756
2757 There is a special property mask @c "*" (i.e. a string consisting of a
2758 single asterisk symbol) that can be used to match all properties.
2759 Below are more examples of property masks:
2760
2761 <table>
2762 <tr>
2763 <td><tt>VirtualBox.*</tt></td>
2764 <td>Track all properties of the VirtualBox object</td>
2765 </tr>
2766 <tr>
2767 <td><tt>Machine.*.name</tt></td>
2768 <td>Track changes to the <link to="IMachine::name"/> property of
2769 all registered virtual machines</td>
2770 </tr>
2771 </table>
2772
2773 <note>
2774 This function is not implemented in the current version of the
2775 product.
2776 </note>
2777 </desc>
2778 <param name="what" type="wstring" dir="in">
2779 <desc>Comma separated list of property masks.</desc>
2780 </param>
2781 <param name="timeout" type="unsigned long" dir="in">
2782 <desc>
2783 Wait timeout in milliseconds.
2784 Specify -1 for an indefinite wait.
2785 </desc>
2786 </param>
2787 <param name="changed" type="wstring" dir="out">
2788 <desc>
2789 Comma separated list of properties that have been changed and caused
2790 this method to return to the caller.
2791 </desc>
2792 </param>
2793 <param name="values" type="wstring" dir="out">
2794 <desc>Reserved, not currently used.</desc>
2795 </param>
2796 </method>
2797
2798 <!--method name="createDHCPServerForInterface">
2799 <desc>
2800 Creates a dhcp server settings to be used for the given interface
2801 <result name="E_INVALIDARG">
2802 Host network interface @a name already exists.
2803 </result>
2804 </desc>
2805 <param name="interface" type="IHostNetworkInterface" dir="in">
2806 <desc>Network Interface</desc>
2807 </param>
2808 <param name="server" type="IDHCPServer" dir="out">
2809 <desc>Dhcp server settings</desc>
2810 </param>
2811 </method-->
2812
2813 <method name="createDHCPServer">
2814 <desc>
2815 Creates a dhcp server settings to be used for the given internal network name
2816 <result name="E_INVALIDARG">
2817 Host network interface @a name already exists.
2818 </result>
2819 </desc>
2820 <param name="name" type="wstring" dir="in">
2821 <desc>server name</desc>
2822 </param>
2823 <param name="server" type="IDHCPServer" dir="return">
2824 <desc>Dhcp server settings</desc>
2825 </param>
2826 </method>
2827
2828 <method name="findDHCPServerByNetworkName">
2829 <desc>
2830 Searches a dhcp server settings to be used for the given internal network name
2831 <result name="E_INVALIDARG">
2832 Host network interface @a name already exists.
2833 </result>
2834
2835 </desc>
2836 <param name="name" type="wstring" dir="in">
2837 <desc>server name</desc>
2838 </param>
2839 <param name="server" type="IDHCPServer" dir="return">
2840 <desc>Dhcp server settings</desc>
2841 </param>
2842 </method>
2843
2844 <!--method name="findDHCPServerForInterface">
2845 <desc>
2846 Searches a dhcp server settings to be used for the given interface
2847 <result name="E_INVALIDARG">
2848 Host network interface @a name already exists.
2849 </result>
2850 </desc>
2851 <param name="interface" type="IHostNetworkInterface" dir="in">
2852 <desc>Network Interface</desc>
2853 </param>
2854 <param name="server" type="IDHCPServer" dir="out">
2855 <desc>Dhcp server settings</desc>
2856 </param>
2857 </method-->
2858
2859 <method name="removeDHCPServer">
2860 <desc>
2861 Removes the dhcp server settings
2862 <result name="E_INVALIDARG">
2863 Host network interface @a name already exists.
2864 </result>
2865 </desc>
2866 <param name="server" type="IDHCPServer" dir="in">
2867 <desc>Dhcp server settings to be removed</desc>
2868 </param>
2869 </method>
2870
2871 </interface>
2872
2873 <!--
2874 // IVFSExplorer
2875 /////////////////////////////////////////////////////////////////////////
2876 -->
2877
2878 <enum
2879 name="VFSType"
2880 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2881 >
2882 <desc>
2883 Virtual file systems supported by VFSExplorer.
2884 </desc>
2885
2886 <const name="File" value="1" />
2887 <const name="Cloud" value="2" />
2888 <const name="S3" value="3" />
2889 <const name="WebDav" value="4" />
2890 </enum>
2891
2892 <enum
2893 name="VFSFileType"
2894 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2895 >
2896 <desc>
2897 File types known by VFSExplorer.
2898 </desc>
2899
2900 <const name="Unknown" value="1" />
2901 <const name="Fifo" value="2" />
2902 <const name="DevChar" value="3" />
2903 <const name="Directory" value="4" />
2904 <const name="DevBlock" value="5" />
2905 <const name="File" value="6" />
2906 <const name="SymLink" value="7" />
2907 <const name="Socket" value="8" />
2908 <const name="WhiteOut" value="9" />
2909 </enum>
2910
2911 <interface
2912 name="IVFSExplorer" extends="$unknown"
2913 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2914 wsmap="managed"
2915 >
2916 <desc>
2917 The VFSExplorer interface unifies access to different file system
2918 types. This includes local file systems as well remote file systems like
2919 S3. For a list of supported types see <link to="VFSType" />.
2920 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2921 </desc>
2922
2923 <attribute name="path" type="wstring" readonly="yes">
2924 <desc>Returns the current path in the virtual file system.</desc>
2925 </attribute>
2926
2927 <attribute name="type" type="VFSType" readonly="yes">
2928 <desc>Returns the file system type which is currently in use.</desc>
2929 </attribute>
2930
2931 <method name="update">
2932 <desc>Updates the internal list of files/directories from the
2933 current directory level. Use <link to="#entryList" /> to get the full list
2934 after a call to this method.</desc>
2935
2936 <param name="aProgress" type="IProgress" dir="return">
2937 <desc>Progress object to track the operation completion.</desc>
2938 </param>
2939 </method>
2940
2941 <method name="cd">
2942 <desc>Change the current directory level.</desc>
2943
2944 <param name="aDir" type="wstring" dir="in">
2945 <desc>The name of the directory to go in.</desc>
2946 </param>
2947
2948 <param name="aProgress" type="IProgress" dir="return">
2949 <desc>Progress object to track the operation completion.</desc>
2950 </param>
2951 </method>
2952
2953 <method name="cdUp">
2954 <desc>Go one directory upwards from the current directory level.</desc>
2955
2956 <param name="aProgress" type="IProgress" dir="return">
2957 <desc>Progress object to track the operation completion.</desc>
2958 </param>
2959 </method>
2960
2961 <method name="entryList">
2962 <desc>Returns a list of files/directories after a call to <link
2963 to="#update" />. The user is responsible for keeping this internal
2964 list up do date.</desc>
2965
2966 <param name="aNames" type="wstring" safearray="yes" dir="out">
2967 <desc>The list of names for the entries.</desc>
2968 </param>
2969
2970 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2971 <desc>The list of types for the entries.</desc>
2972 </param>
2973 </method>
2974
2975 <method name="exists">
2976 <desc>Checks if the given file list exists in the current directory
2977 level.</desc>
2978
2979 <param name="aNames" type="wstring" safearray="yes" dir="in">
2980 <desc>The names to check.</desc>
2981 </param>
2982
2983 <param name="aExists" type="wstring" safearray="yes" dir="return">
2984 <desc>The names which exist.</desc>
2985 </param>
2986 </method>
2987
2988 <method name="remove">
2989 <desc>Deletes the given files in the current directory level.</desc>
2990
2991 <param name="aNames" type="wstring" safearray="yes" dir="in">
2992 <desc>The names to remove.</desc>
2993 </param>
2994
2995 <param name="aProgress" type="IProgress" dir="return">
2996 <desc>Progress object to track the operation completion.</desc>
2997 </param>
2998 </method>
2999
3000 </interface>
3001
3002 <!--
3003 // IAppliance
3004 /////////////////////////////////////////////////////////////////////////
3005 -->
3006
3007 <interface
3008 name="IAppliance" extends="$unknown"
3009 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3010 wsmap="managed"
3011 >
3012 <desc>
3013 Represents a platform-independent appliance in OVF format. An instance of this is returned
3014 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3015 appliances with VirtualBox.
3016
3017 The OVF standard suggests two different physical file formats:
3018
3019 <ol>
3020 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3021 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3022 this descriptor file references other files, as OVF appliances distributed as a set of
3023 files most likely do, those files must be in the same directory as the descriptor file.</li>
3024
3025 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3026 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3027 files and optionally other files.
3028
3029 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3030 be added with a later version.</li>
3031 </ol>
3032
3033 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3034 <link to="IMachine" /> involves the following sequence of API calls:
3035
3036 <ol>
3037 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3038 </li>
3039
3040 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3041 would like to import. So long as this file is syntactically valid, this will succeed
3042 and return an instance of IAppliance that contains the parsed data from the OVF file.
3043 </li>
3044
3045 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3046 contents of the IAppliance attributes accordingly. These can be inspected by a
3047 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3048 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3049 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3050 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3051 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3052 The GUI can then give the user the option to confirm and/or change these suggestions.
3053 </li>
3054
3055 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3056 virtual system to override the suggestions made by the interpret() routine.
3057 </li>
3058
3059 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3060 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3061 virtual system descriptions.
3062 </li>
3063 </ol>
3064
3065 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3066
3067 <ol>
3068 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3069 an empty IAppliance object.
3070 </li>
3071
3072 <li>For each machine you would like to export, call <link to="IMachine::export" />
3073 with the IAppliance object you just created. This creates an instance of
3074 <link to="IVirtualSystemDescription" /> inside the appliance.
3075 </li>
3076
3077 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3078 virtual system to override the suggestions made by the export() routine.
3079 </li>
3080
3081 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3082 file written.</li>
3083 </ol>
3084
3085 </desc>
3086
3087 <attribute name="path" type="wstring" readonly="yes">
3088 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3089 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3090 <link to="#write" /> (for export).
3091 This attribute is empty until one of these methods has been called.
3092 </desc>
3093 </attribute>
3094
3095 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3096 <desc>
3097 Array of virtual disk definitions. One such description exists for each
3098 disk definition in the OVF; each string array item represents one such piece of
3099 disk information, with the information fields separated by tab (\\t) characters.
3100
3101 The caller should be prepared for additional fields being appended to
3102 this string in future versions of VirtualBox and therefore check for
3103 the number of tabs in the strings returned.
3104
3105 In the current version, the following eight fields are returned per string
3106 in the array:
3107
3108 <ol>
3109 <li>Disk ID (unique string identifier given to disk)</li>
3110
3111 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3112
3113 <li>Populated size (optional unsigned integer indicating the current size of the
3114 disk; can be approximate; -1 if unspecified)</li>
3115
3116 <li>Format (string identifying the disk format, typically
3117 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3118
3119 <li>Reference (where to find the disk image, typically a file name; if empty,
3120 then the disk should be created on import)</li>
3121
3122 <li>Image size (optional unsigned integer indicating the size of the image,
3123 which need not necessarily be the same as the values specified above, since
3124 the image may be compressed or sparse; -1 if not specified)</li>
3125
3126 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3127 presently unsupported and always -1)</li>
3128
3129 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3130 </ol>
3131 </desc>
3132 </attribute>
3133
3134 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3135 <desc> Array of virtual system descriptions. One such description is created
3136 for each virtual system found in the OVF.
3137 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3138 (for export) has been called.
3139 </desc>
3140 </attribute>
3141
3142 <method name="read">
3143 <desc>
3144 Reads an OVF file into the appliance object.
3145
3146 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3147 mere fact that this method returns successfully does not mean that VirtualBox supports all
3148 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3149 </desc>
3150 <param name="file" type="wstring" dir="in">
3151 <desc>
3152 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3153 on whether the appliance is distributed as a set of files or as a single file, respectively).
3154 </desc>
3155 </param>
3156 <param name="aProgress" type="IProgress" dir="return">
3157 <desc></desc>
3158 </param>
3159 </method>
3160
3161 <method name="interpret">
3162 <desc>
3163 Interprets the OVF data that was read when the appliance was constructed. After
3164 calling this method, one can inspect the
3165 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3166 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3167 the appliance.
3168
3169 Calling this method is the second step of importing an appliance into VirtualBox;
3170 see <link to="IAppliance" /> for an overview.
3171
3172 After calling this method, one should call <link to="#getWarnings" /> to find out
3173 if problems were encountered during the processing which might later lead to
3174 errors.
3175 </desc>
3176 </method>
3177
3178 <method name="importMachines">
3179 <desc>
3180 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3181 and other interfaces that match the information contained in the appliance as
3182 closely as possible, as represented by the import instructions in the
3183 <link to="#virtualSystemDescriptions" /> array.
3184
3185 Calling this method is the final step of importing an appliance into VirtualBox;
3186 see <link to="IAppliance" /> for an overview.
3187
3188 Since importing the appliance will most probably involve copying and converting
3189 disk images, which can take a long time, this method operates asynchronously and
3190 returns an IProgress object to allow the caller to monitor the progress.
3191 </desc>
3192
3193 <param name="aProgress" type="IProgress" dir="return">
3194 <desc></desc>
3195 </param>
3196 </method>
3197
3198 <method name="createVFSExplorer">
3199 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3200
3201 <param name="aUri" type="wstring" dir="in">
3202 <desc>The URI describing the file system to use.</desc>
3203 </param>
3204
3205 <param name="aExplorer" type="IVFSExplorer" dir="return">
3206 <desc></desc>
3207 </param>
3208 </method>
3209
3210 <method name="write">
3211 <desc>
3212 Writes the contents of the appliance exports into a new OVF file.
3213
3214 Calling this method is the final step of exporting an appliance from VirtualBox;
3215 see <link to="IAppliance" /> for an overview.
3216
3217 Since exporting the appliance will most probably involve copying and converting
3218 disk images, which can take a long time, this method operates asynchronously and
3219 returns an IProgress object to allow the caller to monitor the progress.
3220 </desc>
3221 <param name="format" type="wstring" dir="in">
3222 <desc>
3223 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3224 future versions of VirtualBox may support additional formats.
3225 </desc>
3226 </param>
3227 <param name="path" type="wstring" dir="in">
3228 <desc>
3229 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3230 on whether the appliance is distributed as a set of files or as a single file, respectively).
3231 </desc>
3232 </param>
3233 <param name="aProgress" type="IProgress" dir="return">
3234 <desc>Progress object to track the operation completion.</desc>
3235 </param>
3236 </method>
3237
3238 <method name="getWarnings">
3239 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3240
3241 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3242 <desc></desc>
3243 </param>
3244 </method>
3245
3246 </interface>
3247
3248 <enum
3249 name="VirtualSystemDescriptionType"
3250 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3251 >
3252 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3253 a configuration value.</desc>
3254
3255 <const name="Ignore" value="1" />
3256 <const name="OS" value="2" />
3257 <const name="Name" value="3" />
3258 <const name="Product" value="4" />
3259 <const name="Vendor" value="5" />
3260 <const name="Version" value="6" />
3261 <const name="ProductUrl" value="7" />
3262 <const name="VendorUrl" value="8" />
3263 <const name="Description" value="9" />
3264 <const name="License" value="10" />
3265 <const name="Miscellaneous" value="11" />
3266 <const name="CPU" value="12" />
3267 <const name="Memory" value="13" />
3268 <const name="HardDiskControllerIDE" value="14" />
3269 <const name="HardDiskControllerSATA" value="15" />
3270 <const name="HardDiskControllerSCSI" value="16" />
3271 <const name="HardDiskImage" value="17" />
3272 <const name="Floppy" value="18" />
3273 <const name="CDROM" value="19" />
3274 <const name="NetworkAdapter" value="20" />
3275 <const name="USBController" value="21" />
3276 <const name="SoundCard" value="22" />
3277
3278 </enum>
3279
3280 <enum
3281 name="VirtualSystemDescriptionValueType"
3282 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3283 >
3284 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3285 type to fetch.</desc>
3286
3287 <const name="Reference" value="1" />
3288 <const name="Original" value="2" />
3289 <const name="Auto" value="3" />
3290 <const name="ExtraConfig" value="4" />
3291
3292 </enum>
3293
3294 <interface
3295 name="IVirtualSystemDescription" extends="$unknown"
3296 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3297 wsmap="managed"
3298 >
3299
3300 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3301 After <link to="IAppliance::interpret" /> has been called, that array contains
3302 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3303 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3304 into VirtualBox.
3305 </desc>
3306
3307 <attribute name="count" type="unsigned long" readonly="yes">
3308 <desc>Return the number of virtual system description entries.</desc>
3309 </attribute>
3310
3311 <method name="getDescription">
3312 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3313 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3314
3315 The list below identifies the value sets that are possible depending on the
3316 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3317 the array item with the same index in aOvfValues[] will contain the original value as contained
3318 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3319 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3320 the aExtraConfigValues[] array item may also be used.
3321
3322 <ul>
3323 <li>
3324 "OS": the guest operating system type. There must be exactly one such array item on import. The
3325 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3326 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3327 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3328 </li>
3329 <li>
3330 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3331 if none is present on import, then an automatic name will be created from the operating system
3332 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3333 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3334 <link to="IMachine" /> name that does not exist yet.
3335 </li>
3336 <li>
3337 "Description": an arbitrary description.
3338 </li>
3339 <li>
3340 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3341 code to display such a license for agreement; the Main API does not enforce any such policy.
3342 </li>
3343 <li>
3344 Miscellaneous: reserved for future use.
3345 </li>
3346 <li>
3347 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3348 </li>
3349 <li>
3350 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3351 is present on import, then VirtualBox will set a meaningful default based on the operating system
3352 type.
3353 </li>
3354 <li>
3355 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3356 has no value in aOvfValues[] or aVBoxValues[].
3357 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3358 type can use to specify which hard disk controller a virtual disk should be connected to.
3359 </li>
3360 <li>
3361 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3362 has no value in aOvfValues[] or aVBoxValues[].
3363 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3364 </li>
3365 <li>
3366 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3367 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3368 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3369 </li>
3370 <li>
3371 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3372 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3373
3374 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3375 a path since the image file should be in the same location as the OVF file itself), whereas the
3376 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3377 hard disk image. This means that on import the image will be copied and converted from the
3378 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3379 On import, the target image will also be registered with VirtualBox.
3380
3381 The matching item in the aExtraConfigValues[] array must contain a string of the following
3382 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3383 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3384 the image to. That number must be the index of an array item with one of the hard disk controller
3385 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3386 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3387 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3388 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3389 SCSI conrollers, the channel can range from 0-29.
3390 </li>
3391 <li>
3392 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3393 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3394 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3395 </li>
3396 <li>
3397 "USBController": a USB controller. There can be at most one such item. If and only if such an
3398 item ispresent, USB support will be enabled for the new virtual machine.
3399 </li>
3400 <li>
3401 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3402 present, sound support will be enabled for the new virtual machine. Note that the virtual
3403 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3404 may be different from the virtual soundcard expected by the appliance.
3405 </li>
3406 </ul>
3407
3408 </desc>
3409
3410 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3411 <desc></desc>
3412 </param>
3413
3414 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3415 <desc></desc>
3416 </param>
3417
3418 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3419 <desc></desc>
3420 </param>
3421
3422 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3423 <desc></desc>
3424 </param>
3425
3426 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3427 <desc></desc>
3428 </param>
3429
3430 </method>
3431
3432 <method name="getDescriptionByType">
3433 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3434 should be returned.</desc>
3435
3436 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3437 <desc></desc>
3438 </param>
3439
3440 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3441 <desc></desc>
3442 </param>
3443
3444 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3445 <desc></desc>
3446 </param>
3447
3448 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3449 <desc></desc>
3450 </param>
3451
3452 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3453 <desc></desc>
3454 </param>
3455
3456 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3457 <desc></desc>
3458 </param>
3459
3460 </method>
3461
3462 <method name="getValuesByType">
3463 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3464 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3465 values.</desc>
3466
3467 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3468 <desc></desc>
3469 </param>
3470
3471 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3472 <desc></desc>
3473 </param>
3474
3475 <param name="aValues" type="wstring" dir="return" safearray="yes">
3476 <desc></desc>
3477 </param>
3478
3479 </method>
3480
3481 <method name="setFinalValues">
3482 <desc>
3483 This method allows the appliance's user to change the configuration for the virtual
3484 system descriptions. For each array item returned from <link to="#getDescription" />,
3485 you must pass in one boolean value and one configuration value.
3486
3487 Each item in the boolean array determines whether the particular configuration item
3488 should be enabled.
3489 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3490 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3491 and SoundCard.
3492
3493 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3494 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3495 the configuration remains unchanged. Please see the documentation for getDescription()
3496 for valid configuration values for the individual array item types. If the
3497 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3498 </desc>
3499
3500 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3501 <desc></desc>
3502 </param>
3503
3504 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3505 <desc></desc>
3506 </param>
3507
3508 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3509 <desc></desc>
3510 </param>
3511 </method>
3512
3513 <method name="addDescription">
3514 <desc>
3515 This method adds an additional description entry to the stack of already
3516 available descriptions for this virtual system. This is handy for writing
3517 values which aren't directly supported by VirtualBox. One example would
3518 be the License type of <link to="VirtualSystemDescriptionType" />.
3519 </desc>
3520
3521 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3522 <desc></desc>
3523 </param>
3524
3525 <param name="aVBoxValue" type="wstring" dir="in">
3526 <desc></desc>
3527 </param>
3528
3529 <param name="aExtraConfigValue" type="wstring" dir="in">
3530 <desc></desc>
3531 </param>
3532 </method>
3533 </interface>
3534
3535
3536 <!--
3537 // IMachine
3538 /////////////////////////////////////////////////////////////////////////
3539 -->
3540
3541 <interface
3542 name="IInternalMachineControl" extends="$unknown"
3543 uuid="ce8087d7-de92-4bbb-8140-a22fb07f37ba"
3544 internal="yes"
3545 wsmap="suppress"
3546 >
3547 <method name="setRemoveSavedState">
3548 <desc>
3549 Updates the flag whether saved state is removed on a machine state
3550 change from Saved to PoweredOff.
3551 </desc>
3552 <param name="aRemove" type="boolean" dir="in"/>
3553 </method>
3554
3555 <method name="updateState">
3556 <desc>
3557 Updates the VM state.
3558 <note>
3559 This operation will also update the settings file with
3560 the correct information about the saved state file
3561 and delete this file from disk when appropriate.
3562 </note>
3563 </desc>
3564 <param name="state" type="MachineState" dir="in"/>
3565 </method>
3566
3567 <method name="getIPCId">
3568 <param name="id" type="wstring" dir="return"/>
3569 </method>
3570
3571 <method name="runUSBDeviceFilters">
3572 <desc>
3573 Asks the server to run USB devices filters of the associated
3574 machine against the given USB device and tell if there is
3575 a match.
3576 <note>
3577 Intended to be used only for remote USB devices. Local
3578 ones don't require to call this method (this is done
3579 implicitly by the Host and USBProxyService).
3580 </note>
3581 </desc>
3582 <param name="device" type="IUSBDevice" dir="in"/>
3583 <param name="matched" type="boolean" dir="out"/>
3584 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3585 </method>
3586
3587 <method name="captureUSBDevice">
3588 <desc>
3589 Requests a capture of the given host USB device.
3590 When the request is completed, the VM process will
3591 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3592 notification.
3593 </desc>
3594 <param name="id" type="wstring" dir="in"/>
3595 </method>
3596
3597 <method name="detachUSBDevice">
3598 <desc>
3599 Notification that a VM is going to detach (@a done = @c false) or has
3600 already detached (@a done = @c true) the given USB device.
3601 When the @a done = @c true request is completed, the VM process will
3602 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3603 notification.
3604 <note>
3605 In the @a done = @c true case, the server must run its own filters
3606 and filters of all VMs but this one on the detached device
3607 as if it were just attached to the host computer.
3608 </note>
3609 </desc>
3610 <param name="id" type="wstring" dir="in"/>
3611 <param name="done" type="boolean" dir="in"/>
3612 </method>
3613
3614 <method name="autoCaptureUSBDevices">
3615 <desc>
3616 Requests a capture all matching USB devices attached to the host.
3617 When the request is completed, the VM process will
3618 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3619 notification per every captured device.
3620 </desc>
3621 </method>
3622
3623 <method name="detachAllUSBDevices">
3624 <desc>
3625 Notification that a VM that is being powered down. The done
3626 parameter indicates whether which stage of the power down
3627 we're at. When @a done = @c false the VM is announcing its
3628 intentions, while when @a done = @c true the VM is reporting
3629 what it has done.
3630 <note>
3631 In the @a done = @c true case, the server must run its own filters
3632 and filters of all VMs but this one on all detach devices as
3633 if they were just attached to the host computer.
3634 </note>
3635 </desc>
3636 <param name="done" type="boolean" dir="in"/>
3637 </method>
3638
3639 <method name="onSessionEnd">
3640 <desc>
3641 Triggered by the given session object when the session is about
3642 to close normally.
3643 </desc>
3644 <param name="session" type="ISession" dir="in">
3645 <desc>Session that is being closed</desc>
3646 </param>
3647 <param name="progress" type="IProgress" dir="return">
3648 <desc>
3649 Used to wait until the corresponding machine is actually
3650 dissociated from the given session on the server.
3651 Returned only when this session is a direct one.
3652 </desc>
3653 </param>
3654 </method>
3655
3656 <method name="beginSavingState">
3657 <desc>
3658 Called by the VM process to inform the server it wants to
3659 save the current state and stop the VM execution.
3660 </desc>
3661 <param name="progress" type="IProgress" dir="in">
3662 <desc>
3663 Progress object created by the VM process to wait until
3664 the state is saved.
3665 </desc>
3666 </param>
3667 <param name="stateFilePath" type="wstring" dir="out">
3668 <desc>
3669 File path the VM process must save the execution state to.
3670 </desc>
3671 </param>
3672 </method>
3673
3674 <method name="endSavingState">
3675 <desc>
3676 Called by the VM process to inform the server that saving
3677 the state previously requested by #beginSavingState is either
3678 successfully finished or there was a failure.
3679
3680 <result name="VBOX_E_FILE_ERROR">
3681 Settings file not accessible.
3682 </result>
3683 <result name="VBOX_E_XML_ERROR">
3684 Could not parse the settings file.
3685 </result>
3686
3687 </desc>
3688
3689 <param name="success" type="boolean" dir="in">
3690 <desc>@c true to indicate success and @c false otherwise.
3691 </desc>
3692 </param>
3693 </method>
3694
3695 <method name="adoptSavedState">
3696 <desc>
3697 Gets called by IConsole::adoptSavedState.
3698 <result name="VBOX_E_FILE_ERROR">
3699 Invalid saved state file path.
3700 </result>
3701 </desc>
3702 <param name="savedStateFile" type="wstring" dir="in">
3703 <desc>Path to the saved state file to adopt.</desc>
3704 </param>
3705 </method>
3706
3707 <method name="beginTakingSnapshot">
3708 <desc>
3709 Called by the VM process to inform the server it wants to
3710 take a snapshot.
3711
3712 <result name="VBOX_E_FILE_ERROR">
3713 Settings file not accessible.
3714 </result>
3715 <result name="VBOX_E_XML_ERROR">
3716 Could not parse the settings file.
3717 </result>
3718 </desc>
3719 <param name="initiator" type="IConsole" dir="in">
3720 <desc>The console object that initiated this call.</desc>
3721 </param>
3722 <param name="name" type="wstring" dir="in">
3723 <desc>Snapshot name.</desc>
3724 </param>
3725 <param name="description" type="wstring" dir="in">
3726 <desc>Snapshot description.</desc>
3727 </param>
3728 <param name="progress" type="IProgress" dir="in">
3729 <desc>
3730 Progress object created by the VM process to wait until
3731 the state is saved (only for online snapshots).
3732 </desc>
3733 </param>
3734 <param name="stateFilePath" type="wstring" dir="out">
3735 <desc>
3736 File path the VM process must save the execution state to.
3737 </desc>
3738 </param>
3739 <param name="serverProgress" type="IProgress" dir="out">
3740 <desc>
3741 Progress object created by the server process to wait until
3742 the snapshot is taken (VDI diff creation, etc.).
3743 </desc>
3744 </param>
3745 </method>
3746
3747 <method name="endTakingSnapshot">
3748 <desc>
3749 Called by the VM process to inform the server that the snapshot
3750 previously requested by #beginTakingSnapshot is either
3751 successfully taken or there was a failure.
3752 </desc>
3753
3754 <param name="success" type="boolean" dir="in">
3755 <desc>@c true to indicate success and @c false otherwise</desc>
3756 </param>
3757 </method>
3758
3759 <method name="discardSnapshot">
3760 <desc>
3761 Gets called by IConsole::discardSnapshot.
3762 <result name="VBOX_E_INVALID_OBJECT_STATE">
3763 Snapshot has more than one child snapshot.
3764 </result>
3765 </desc>
3766 <param name="initiator" type="IConsole" dir="in">
3767 <desc>The console object that initiated this call.</desc>
3768 </param>
3769 <param name="id" type="wstring" dir="in">
3770 <desc>UUID of the snapshot to discard.</desc>
3771 </param>
3772 <param name="machineState" type="MachineState" dir="out">
3773 <desc>New machine state after this operation is started.</desc>
3774 </param>
3775 <param name="progress" type="IProgress" dir="return">
3776 <desc>Progress object to track the operation completion.</desc>
3777 </param>
3778 </method>
3779
3780 <method name="discardCurrentState">
3781 <desc>
3782 Gets called by IConsole::discardCurrentState.
3783 <result name="VBOX_E_INVALID_OBJECT_STATE">
3784 Virtual machine does not have any snapshot.
3785 </result>
3786 </desc>
3787 <param name="initiator" type="IConsole" dir="in">
3788 <desc>The console object that initiated this call.</desc>
3789 </param>
3790 <param name="machineState" type="MachineState" dir="out">
3791 <desc>New machine state after this operation is started.</desc>
3792 </param>
3793 <param name="progress" type="IProgress" dir="return">
3794 <desc>Progress object to track the operation completion.</desc>
3795 </param>
3796 </method>
3797
3798 <method name="discardCurrentSnapshotAndState">
3799 <desc>
3800 Gets called by IConsole::discardCurrentSnapshotAndState.
3801 <result name="VBOX_E_INVALID_OBJECT_STATE">
3802 Virtual machine does not have any snapshot.
3803 </result>
3804 </desc>
3805 <param name="initiator" type="IConsole" dir="in">
3806 <desc>The console object that initiated this call.</desc>
3807 </param>
3808 <param name="machineState" type="MachineState" dir="out">
3809 <desc>New machine state after this operation is started.</desc>
3810 </param>
3811 <param name="progress" type="IProgress" dir="return">
3812 <desc>Progress object to track the operation completion.</desc>
3813 </param>
3814 </method>
3815
3816 <method name="pullGuestProperties">
3817 <desc>
3818 Get the list of the guest properties matching a set of patterns along
3819 with their values, time stamps and flags and give responsibility for
3820 managing properties to the console.
3821 </desc>
3822 <param name="name" type="wstring" dir="out" safearray="yes">
3823 <desc>
3824 The names of the properties returned.
3825 </desc>
3826 </param>
3827 <param name="value" type="wstring" dir="out" safearray="yes">
3828 <desc>
3829 The values of the properties returned. The array entries match the
3830 corresponding entries in the @a name array.
3831 </desc>
3832 </param>
3833 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3834 <desc>
3835 The time stamps of the properties returned. The array entries match
3836 the corresponding entries in the @a name array.
3837 </desc>
3838 </param>
3839 <param name="flags" type="wstring" dir="out" safearray="yes">
3840 <desc>
3841 The flags of the properties returned. The array entries match the
3842 corresponding entries in the @a name array.
3843 </desc>
3844 </param>
3845 </method>
3846
3847 <method name="pushGuestProperties">
3848 <desc>
3849 Set the list of the guest properties matching a set of patterns along
3850 with their values, time stamps and flags and return responsibility for
3851 managing properties to IMachine.
3852 </desc>
3853 <param name="name" type="wstring" dir="in" safearray="yes">
3854 <desc>
3855 The names of the properties.
3856 </desc>
3857 </param>
3858 <param name="value" type="wstring" dir="in" safearray="yes">
3859 <desc>
3860 The values of the properties. The array entries match the
3861 corresponding entries in the @a name array.
3862 </desc>
3863 </param>
3864 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3865 <desc>
3866 The time stamps of the properties. The array entries match
3867 the corresponding entries in the @a name array.
3868 </desc>
3869 </param>
3870 <param name="flags" type="wstring" dir="in" safearray="yes">
3871 <desc>
3872 The flags of the properties. The array entries match the
3873 corresponding entries in the @a name array.
3874 </desc>
3875 </param>
3876 </method>
3877 <method name="pushGuestProperty">
3878 <desc>
3879 Update a single guest property in IMachine.
3880 </desc>
3881 <param name="name" type="wstring" dir="in">
3882 <desc>
3883 The name of the property to be updated.
3884 </desc>
3885 </param>
3886 <param name="value" type="wstring" dir="in">
3887 <desc>
3888 The value of the property.
3889 </desc>
3890 </param>
3891 <param name="timestamp" type="unsigned long long" dir="in">
3892 <desc>
3893 The timestamp of the property.
3894 </desc>
3895 </param>
3896 <param name="flags" type="wstring" dir="in">
3897 <desc>
3898 The flags of the property.
3899 </desc>
3900 </param>
3901 </method>
3902
3903 <method name="lockMedia">
3904 <desc>
3905 Locks all media attached to the machine for writing and parents of
3906 attahced different hard disks (if any) for reading. This operation is
3907 atomic so that if it fails no media is actually locked.
3908
3909 This method is intended to be called when the machine is in Starting or
3910 Restoring state. The locked media will be automatically unlocked when
3911 the machine is powered off or crashed.
3912 </desc>
3913 </method>
3914 </interface>
3915
3916 <interface
3917 name="IBIOSSettings" extends="$unknown"
3918 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3919 wsmap="managed"
3920 >
3921 <desc>
3922 The IBIOSSettings interface represents BIOS settings of the virtual
3923 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3924 </desc>
3925 <attribute name="logoFadeIn" type="boolean">
3926 <desc>Fade in flag for BIOS logo animation.</desc>
3927 </attribute>
3928
3929 <attribute name="logoFadeOut" type="boolean">
3930 <desc>Fade out flag for BIOS logo animation.</desc>
3931 </attribute>
3932
3933 <attribute name="logoDisplayTime" type="unsigned long">
3934 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3935 </attribute>
3936
3937 <attribute name="logoImagePath" type="wstring">
3938 <desc>Local file system path for external BIOS image.</desc>
3939 </attribute>
3940
3941 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3942 <desc>Mode of the BIOS boot device menu.</desc>
3943 </attribute>
3944
3945 <attribute name="ACPIEnabled" type="boolean">
3946 <desc>ACPI support flag.</desc>
3947 </attribute>
3948
3949 <attribute name="IOAPICEnabled" type="boolean">
3950 <desc>
3951 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3952 and support IRQs above 15.
3953 </desc>
3954 </attribute>
3955
3956 <attribute name="timeOffset" type="long long">
3957 <desc>
3958 Offset in milliseconds from the host system time. This allows for
3959 guests running with a different system date/time than the host.
3960 It is equivalent to setting the system date/time in the BIOS except
3961 it is not an absolute value but a relative one. Guest Additions
3962 time synchronization honors this offset.
3963 </desc>
3964 </attribute>
3965
3966 <attribute name="PXEDebugEnabled" type="boolean">
3967 <desc>
3968 PXE debug logging flag. If set, VirtualBox will write extensive
3969 PXE trace information to the release log.
3970 </desc>
3971 </attribute>
3972
3973 </interface>
3974
3975 <interface
3976 name="IMachine" extends="$unknown"
3977 uuid="5293aa45-5ab5-4f70-852e-bb43f5a46491"
3978 wsmap="managed"
3979 >
3980 <desc>
3981 The IMachine interface represents a virtual machine, or guest, created
3982 in VirtualBox.
3983
3984 This interface is used in two contexts. First of all, a collection of
3985 objects implementing this interface is stored in the
3986 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3987 machines that are currently registered with this VirtualBox
3988 installation. Also, once a session has been opened for the given virtual
3989 machine (e.g. the virtual machine is running), the machine object
3990 associated with the open session can be queried from the session object;
3991 see <link to="ISession"/> for details.
3992
3993 The main role of this interface is to expose the settings of the virtual
3994 machine and provide methods to change various aspects of the virtual
3995 machine's configuration. For machine objects stored in the
3996 <link to="IVirtualBox::machines"/> collection, all attributes are
3997 read-only unless explicitly stated otherwise in individual attribute
3998 and method descriptions. In order to change a machine setting, a session
3999 for this machine must be opened using one of
4000 <link to="IVirtualBox::openSession"/>,
4001 <link to="IVirtualBox::openRemoteSession"/> or
4002 <link to="IVirtualBox::openExistingSession"/> methods. After the
4003 session has been successfully opened, a mutable machine object needs to
4004 be queried from the session object and then the desired settings changes
4005 can be applied to the returned object using IMachine attributes and
4006 methods. See the <link to="ISession"/> interface description for more
4007 information about sessions.
4008
4009 Note that IMachine does not provide methods to control virtual machine
4010 execution (such as start the machine, or power it down) -- these methods
4011 are grouped in a separate interface called <link to="IConsole" />.
4012
4013 <see>ISession, IConsole</see>
4014 </desc>
4015
4016 <attribute name="parent" type="IVirtualBox" readonly="yes">
4017 <desc>Associated parent object.</desc>
4018 </attribute>
4019
4020 <attribute name="accessible" type="boolean" readonly="yes">
4021 <desc>
4022 Whether this virtual machine is currently accessible or not.
4023
4024 A machine is always deemed accessible unless it is registered <i>and</i>
4025 its settings file cannot be read or parsed (either because the file itself
4026 is unavailable or has invalid XML contents).
4027
4028 Every time this property is read, the accessibility state of
4029 this machine is re-evaluated. If the returned value is @c false,
4030 the <link to="#accessError"/> property may be used to get the
4031 detailed error information describing the reason of
4032 inaccessibility, including XML error messages.
4033
4034 When the machine is inaccessible, only the following properties
4035 can be used on it:
4036 <ul>
4037 <li><link to="#parent"/></li>
4038 <li><link to="#id"/></li>
4039 <li><link to="#settingsFilePath"/></li>
4040 <li><link to="#accessible"/></li>
4041 <li><link to="#accessError"/></li>
4042 </ul>
4043
4044 An attempt to access any other property or method will return
4045 an error.
4046
4047 The only possible action you can perform on an inaccessible
4048 machine is to unregister it using the
4049 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4050 for the accessibility state once more by querying this
4051 property).
4052
4053 <note>
4054 In the current implementation, once this property returns
4055 @c true, the machine will never become inaccessible
4056 later, even if its settings file cannot be successfully
4057 read/written any more (at least, until the VirtualBox
4058 server is restarted). This limitation may be removed in
4059 future releases.
4060 </note>
4061 </desc>
4062 </attribute>
4063
4064 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4065 <desc>
4066 Error information describing the reason of machine
4067 inaccessibility.
4068
4069 Reading this property is only valid after the last call to
4070 <link to="#accessible"/> returned @c false (i.e. the
4071 machine is currently unaccessible). Otherwise, a @c null
4072 IVirtualBoxErrorInfo object will be returned.
4073 </desc>
4074 </attribute>
4075
4076 <attribute name="name" type="wstring">
4077 <desc>
4078 Name of the virtual machine.
4079
4080 Besides being used for human-readable identification purposes
4081 everywhere in VirtualBox, the virtual machine name is also used
4082 as a name of the machine's settings file and as a name of the
4083 subdirectory this settings file resides in. Thus, every time you
4084 change the value of this property, the settings file will be
4085 renamed once you call <link to="#saveSettings"/> to confirm the
4086 change. The containing subdirectory will be also renamed, but
4087 only if it has exactly the same name as the settings file
4088 itself prior to changing this property (for backward compatibility
4089 with previous API releases). The above implies the following
4090 limitations:
4091 <ul>
4092 <li>The machine name cannot be empty.</li>
4093 <li>The machine name can contain only characters that are valid
4094 file name characters according to the rules of the file
4095 system used to store VirtualBox configuration.</li>
4096 <li>You cannot have two or more machines with the same name
4097 if they use the same subdirectory for storing the machine
4098 settings files.</li>
4099 <li>You cannot change the name of the machine if it is running,
4100 or if any file in the directory containing the settings file
4101 is being used by another running machine or by any other
4102 process in the host operating system at a time when
4103 <link to="#saveSettings"/> is called.
4104 </li>
4105 </ul>
4106 If any of the above limitations are hit, <link to="#saveSettings"/>
4107 will return an appropriate error message explaining the exact
4108 reason and the changes you made to this machine will not be
4109 saved.
4110 <note>
4111 For "legacy" machines created using the
4112 <link to="IVirtualBox::createLegacyMachine"/> call,
4113 the above naming limitations do not apply because the
4114 machine name does not affect the settings file name.
4115 The settings file name remains the same as it was specified
4116 during machine creation and never changes.
4117 </note>
4118 </desc>
4119 </attribute>
4120
4121 <attribute name="description" type="wstring">
4122 <desc>
4123 Description of the virtual machine.
4124
4125 The description attribute can contain any text and is
4126 typically used to describe the hardware and software
4127 configuration of the virtual machine in detail (i.e. network
4128 settings, versions of the installed software and so on).
4129 </desc>
4130 </attribute>
4131
4132 <attribute name="id" type="wstring" readonly="yes">
4133 <desc>UUID of the virtual machine.</desc>
4134 </attribute>
4135
4136 <attribute name="OSTypeId" type="wstring">
4137 <desc>
4138 User-defined identifier of the Guest OS type.
4139 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4140 an IGuestOSType object representing details about the given
4141 Guest OS type.
4142 <note>
4143 This value may differ from the value returned by
4144 <link to="IGuest::OSTypeId"/> if Guest Additions are
4145 installed to the guest OS.
4146 </note>
4147 </desc>
4148 </attribute>
4149
4150 <attribute name="HardwareVersion" type="wstring">
4151 <desc>Hardware version identifier. Internal use only for now.</desc>
4152 </attribute>
4153
4154 <attribute name="CPUCount" type="unsigned long">
4155 <desc>Number of virtual CPUs in the VM.</desc>
4156 </attribute>
4157
4158 <attribute name="memorySize" type="unsigned long">
4159 <desc>System memory size in megabytes.</desc>
4160 </attribute>
4161
4162 <attribute name="memoryBalloonSize" type="unsigned long">
4163 <desc>Initial memory balloon size in megabytes.</desc>
4164 </attribute>
4165
4166 <attribute name="statisticsUpdateInterval" type="unsigned long">
4167 <desc>Initial interval to update guest statistics in seconds.</desc>
4168 </attribute>
4169
4170 <attribute name="VRAMSize" type="unsigned long">
4171 <desc>Video memory size in megabytes.</desc>
4172 </attribute>
4173
4174 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4175 <desc>
4176 This setting determines whether VirtualBox allows this machine to make
4177 use of the 3D graphics support available on the host.</desc>
4178 </attribute>
4179
4180 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4181 <desc>
4182 This setting determines whether VirtualBox allows this machine to make
4183 use of the 2D video acceleration support available on the host.</desc>
4184 </attribute>
4185
4186 <attribute name="monitorCount" type="unsigned long">
4187 <desc>
4188 Number of virtual monitors.
4189 <note>
4190 Only effective on Windows XP and later guests with
4191 Guest Additions installed.
4192 </note>
4193 </desc>
4194 </attribute>
4195
4196 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4197 <desc>Object containing all BIOS settings.</desc>
4198 </attribute>
4199
4200 <attribute name="HWVirtExEnabled" type="boolean">
4201 <desc>
4202 This setting determines whether VirtualBox will try to make use of
4203 the host CPU's hardware virtualization extensions such as Intel VT-x
4204 and AMD-V. Note that in case such extensions are not available,
4205 they will not be used.
4206 </desc>
4207 </attribute>
4208
4209 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4210 <desc>
4211 This setting determines whether VirtualBox will try to make use of
4212 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4213 such extensions are not available, they will not be used.
4214 </desc>
4215 </attribute>
4216
4217 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4218 <desc>
4219 This setting determines whether VirtualBox will try to make use of
4220 the VPID extension of Intel VT-x. Note that in case such extensions are
4221 not available, they will not be used.
4222 </desc>
4223 </attribute>
4224
4225 <attribute name="PAEEnabled" type="boolean" default="false">
4226 <desc>
4227 This setting determines whether VirtualBox will expose the Physical Address
4228 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4229 is not available, it will not be reported.
4230 </desc>
4231 </attribute>
4232
4233 <attribute name="snapshotFolder" type="wstring">
4234 <desc>
4235 Full path to the directory used to store snapshot data
4236 (differencing hard disks and saved state files) of this machine.
4237
4238 The initial value of this property is
4239 <tt>&lt;</tt><link to="#settingsFilePath">
4240 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4241 <link to="#id">machine_uuid</link>
4242 <tt>&gt;</tt>.
4243
4244 Currently, it is an error to try to change this property on
4245 a machine that has snapshots (because this would require to
4246 move possibly large files to a different location).
4247 A separate method will be available for this purpose later.
4248
4249 <note>
4250 Setting this property to @c null or to an empty string will restore
4251 the initial value.
4252 </note>
4253 <note>
4254 When setting this property, the specified path can be
4255 absolute (full path) or relative to the directory where the
4256 <link to="#settingsFilePath">machine settings file</link>
4257 is located. When reading this property, a full path is
4258 always returned.
4259 </note>
4260 <note>
4261 The specified path may not exist, it will be created
4262 when necessary.
4263 </note>
4264 </desc>
4265 </attribute>
4266
4267 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4268 <desc>VRDP server object.</desc>
4269 </attribute>
4270
4271 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4272 <desc>Array of hard disks attached to this machine.</desc>
4273 </attribute>
4274
4275 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4276 <desc>Associated DVD drive object.</desc>
4277 </attribute>
4278
4279 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4280 <desc>Associated floppy drive object.</desc>
4281 </attribute>
4282
4283 <attribute name="USBController" type="IUSBController" readonly="yes">
4284 <desc>
4285 Associated USB controller object.
4286
4287 <note>
4288 If USB functionality is not available in the given edition of
4289 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4290 </note>
4291 </desc>
4292 </attribute>
4293
4294 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4295 <desc>Associated audio adapter, always present.</desc>
4296 </attribute>
4297
4298 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4299 <desc>Array of storage controllers attached to this machine.</desc>
4300 </attribute>
4301
4302 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4303 <desc>
4304 Full name of the file containing machine settings data.
4305 </desc>
4306 </attribute>
4307
4308 <attribute name="settingsModified" type="boolean" readonly="yes">
4309 <desc>
4310 Whether the settings of this machine have been modified
4311 (but neither yet saved nor discarded).
4312 <note>
4313 Reading this property is only valid on instances returned
4314 by <link to="ISession::machine"/> and on new machines
4315 created by <link to="IVirtualBox::createMachine"/> or opened
4316 by <link to="IVirtualBox::openMachine"/> but not
4317 yet registered, or on unregistered machines after calling
4318 <link to="IVirtualBox::unregisterMachine"/>. For all other
4319 cases, the settings can never be modified.
4320 </note>
4321 <note>
4322 For newly created unregistered machines, the value of this
4323 property is always @c true until <link to="#saveSettings"/>
4324 is called (no matter if any machine settings have been
4325 changed after the creation or not). For opened machines
4326 the value is set to @c false (and then follows to normal rules).
4327 </note>
4328 </desc>
4329 </attribute>
4330
4331 <attribute name="sessionState" type="SessionState" readonly="yes">
4332 <desc>Current session state for this machine.</desc>
4333 </attribute>
4334
4335 <attribute name="sessionType" type="wstring" readonly="yes">
4336 <desc>
4337 Type of the session. If <link to="#sessionState"/> is
4338 SessionSpawning or SessionOpen, this attribute contains the
4339 same value as passed to the
4340 <link to="IVirtualBox::openRemoteSession"/> method in the
4341 @a type parameter. If the session was opened directly using
4342 <link to="IVirtualBox::openSession"/>, or if
4343 <link to="#sessionState"/> is SessionClosed, the value of this
4344 attribute is an empty string.
4345 </desc>
4346 </attribute>
4347
4348 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4349 <desc>
4350 Identifier of the session process. This attribute contains the
4351 platform-dependent identifier of the process that has opened a
4352 direct session for this machine using the
4353 <link to="IVirtualBox::openSession"/> call. The returned value
4354 is only valid if <link to="#sessionState"/> is SessionOpen or
4355 SessionClosing (i.e. a session is currently open or being
4356 closed) by the time this property is read.
4357 </desc>
4358 </attribute>
4359
4360 <attribute name="state" type="MachineState" readonly="yes">
4361 <desc>Current execution state of this machine.</desc>
4362 </attribute>
4363
4364 <attribute name="lastStateChange" type="long long" readonly="yes">
4365 <desc>
4366 Time stamp of the last execution state change,
4367 in milliseconds since 1970-01-01 UTC.
4368 </desc>
4369 </attribute>
4370
4371 <attribute name="stateFilePath" type="wstring" readonly="yes">
4372 <desc>
4373 Full path to the file that stores the execution state of
4374 the machine when it is in the <link to="MachineState_Saved"/> state.
4375 <note>
4376 When the machine is not in the Saved state, this attribute is
4377 an empty string.
4378 </note>
4379 </desc>
4380 </attribute>
4381
4382 <attribute name="logFolder" type="wstring" readonly="yes">
4383 <desc>
4384 Full path to the folder that stores a set of rotated log files
4385 recorded during machine execution. The most recent log file is
4386 named <tt>VBox.log</tt>, the previous log file is
4387 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4388 in the current version).
4389 </desc>
4390 </attribute>
4391
4392 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4393 <desc>
4394 Current snapshot of this machine. This is @c null if the machine
4395 currently has no snapshots. Otherwise, this is always the last snapshot
4396 in the current implementation; see <link to="ISnapshot"/> for details.
4397 </desc>
4398 </attribute>
4399
4400 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4401 <desc>
4402 Number of snapshots taken on this machine. Zero means the
4403 machine doesn't have any snapshots.
4404 </desc>
4405 </attribute>
4406
4407 <attribute name="currentStateModified" type="boolean" readonly="yes">
4408 <desc>
4409 Returns @c true if the current state of the machine is not
4410 identical to the state stored in the current snapshot.
4411
4412 The current state is identical to the current snapshot right
4413 after one of the following calls are made:
4414 <ul>
4415 <li><link to="IConsole::discardCurrentState"/> or
4416 <link to="IConsole::discardCurrentSnapshotAndState"/>
4417 </li>
4418 <li><link to="IConsole::takeSnapshot"/> (issued on a
4419 powered off or saved machine, for which
4420 <link to="#settingsModified"/> returns @c false)
4421 </li>
4422 <li><link to="IMachine::setCurrentSnapshot"/>
4423 </li>
4424 </ul>
4425
4426 The current state remains identical until one of the following
4427 happens:
4428 <ul>
4429 <li>settings of the machine are changed</li>
4430 <li>the saved state is discarded</li>
4431 <li>the current snapshot is discarded</li>
4432 <li>an attempt to execute the machine is made</li>
4433 </ul>
4434
4435 <note>
4436 For machines that don't have snapshots, this property is
4437 always @c false.
4438 </note>
4439 </desc>
4440 </attribute>
4441
4442 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4443 <desc>
4444 Collection of shared folders for this machine (permanent shared
4445 folders). These folders are shared automatically at machine startup
4446 and available only to the guest OS installed within this machine.
4447
4448 New shared folders are added to the collection using
4449 <link to="#createSharedFolder"/>. Existing shared folders can be
4450 removed using <link to="#removeSharedFolder"/>.
4451 </desc>
4452 </attribute>
4453
4454 <attribute name="clipboardMode" type="ClipboardMode">
4455 <desc>
4456 Synchronization mode between the host OS clipboard
4457 and the guest OS clipboard.
4458 </desc>
4459 </attribute>
4460
4461 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4462 <desc>
4463 A comma-separated list of simple glob patterns. Changes to guest
4464 properties whose name matches one of the patterns will generate an
4465 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4466 </desc>
4467 </attribute>
4468
4469 <method name="setBootOrder">
4470 <desc>
4471 Puts the given device to the specified position in
4472 the boot order.
4473
4474 To indicate that no device is associated with the given position,
4475 <link to="DeviceType_Null"/> should be used.
4476
4477 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4478
4479 <result name="E_INVALIDARG">
4480 Boot @a position out of range.
4481 </result>
4482 <result name="E_NOTIMPL">
4483 Booting from USB @a device currently not supported.
4484 </result>
4485
4486 </desc>
4487 <param name="position" type="unsigned long" dir="in">
4488 <desc>
4489 Position in the boot order (@c 1 to the total number of
4490 devices the machine can boot from, as returned by
4491 <link to="ISystemProperties::maxBootPosition"/>).
4492 </desc>
4493 </param>
4494 <param name="device" type="DeviceType" dir="in">
4495 <desc>
4496 The type of the device used to boot at the given position.
4497 </desc>
4498 </param>
4499 </method>
4500
4501 <method name="getBootOrder" const="yes">
4502 <desc>
4503 Returns the device type that occupies the specified
4504 position in the boot order.
4505
4506 @todo [remove?]
4507 If the machine can have more than one device of the returned type
4508 (such as hard disks), then a separate method should be used to
4509 retrieve the individual device that occupies the given position.
4510
4511 If here are no devices at the given position, then
4512 <link to="DeviceType_Null"/> is returned.
4513
4514 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4515
4516 <result name="E_INVALIDARG">
4517 Boot @a position out of range.
4518 </result>
4519
4520 </desc>
4521 <param name="position" type="unsigned long" dir="in">
4522 <desc>
4523 Position in the boot order (@c 1 to the total number of
4524 devices the machine can boot from, as returned by
4525 <link to="ISystemProperties::maxBootPosition"/>).
4526 </desc>
4527 </param>
4528 <param name="device" type="DeviceType" dir="return">
4529 <desc>
4530 Device at the given position.
4531 </desc>
4532 </param>
4533 </method>
4534
4535 <method name="attachHardDisk">
4536 <desc>
4537 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4538 by the given UUID @a id) to the given hard disk controller
4539 (<link to="IStorageController" />, identified by @a name),
4540 at the indicated port and device.
4541
4542 For the IDE bus, the @a controllerPort parameter can be either
4543 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4544 respectively. For the primary controller of the IDE bus,
4545 @a device can be either @c 0 or @c 1, to specify the master or the
4546 slave device, respectively. For the secondary IDE controller, the
4547 device number must be @c 1 because VirtualBox reserves the
4548 secondary master for the CD-ROM drive.
4549
4550 For an SATA controller, @a controllerPort must be a number ranging
4551 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4552 be a number ranging from @c 0 to @c 15.
4553
4554 For both SCSI and SATA, the @a device parameter is unused and must
4555 be @c 0.
4556
4557 The specified device slot must not have another disk attached to it, or
4558 this method will fail.
4559
4560 See <link to="IHardDisk"/> for more detailed information about
4561 attaching hard disks.
4562
4563 <note>
4564 You cannot attach a hard disk to a running machine. Also, you cannot
4565 attach a hard disk to a newly created machine until this machine's
4566 settings are saved to disk using <link to="#saveSettings"/>.
4567 </note>
4568 <note>
4569 If the hard disk is being attached indirectly, a new differencing hard
4570 disk will implicitly be created for it and attached instead. If the
4571 changes made to the machine settings (including this indirect
4572 attachment) are later cancelled using <link to="#discardSettings"/>,
4573 this implicitly created differencing hard disk will implicitly
4574 be deleted.
4575 </note>
4576
4577 <result name="E_INVALIDARG">
4578 SATA device, SATA port, IDE port or IDE slot out of range.
4579 </result>
4580 <result name="VBOX_E_INVALID_OBJECT_STATE">
4581 Attempt to attach hard disk to an unregistered virtual machine.
4582 </result>
4583 <result name="VBOX_E_INVALID_VM_STATE">
4584 Invalid machine state.
4585 </result>
4586 <result name="VBOX_E_OBJECT_IN_USE">
4587 Hard disk already attached to this or another virtual machine.
4588 </result>
4589
4590 </desc>
4591 <param name="id" type="wstring" dir="in">
4592 <desc>UUID of the hard disk to attach.</desc>
4593 </param>
4594 <param name="name" type="wstring" dir="in">
4595 <desc>Name of the storage controller to attach the hard disk to.</desc>
4596 </param>
4597 <param name="controllerPort" type="long" dir="in">
4598 <desc>Port to attach the hard disk to.</desc>
4599 </param>
4600 <param name="device" type="long" dir="in">
4601 <desc>
4602 Device slot in the given port to attach the hard disk to.
4603 </desc>
4604 </param>
4605 </method>
4606
4607 <method name="getHardDisk" const="yes">
4608 <desc>
4609 Returns the virtual hard disk attached to a device slot of the specified
4610 bus.
4611
4612 Note that if the hard disk was indirectly attached by
4613 <link to="#attachHardDisk"/> to the given device slot then this
4614 method will return not the same object as passed to the
4615 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4616 more detailed information about attaching hard disks.
4617
4618 <result name="VBOX_E_OBJECT_NOT_FOUND">
4619 No hard disk attached to given slot/bus.
4620 </result>
4621
4622 </desc>
4623 <param name="name" type="wstring" dir="in">
4624 <desc>Name of the storage controller the hard disk is attached to.</desc>
4625 </param>
4626 <param name="controllerPort" type="long" dir="in">
4627 <desc>Port to query.</desc>
4628 </param>
4629 <param name="device" type="long" dir="in">
4630 <desc>Device slot in the given port to query.</desc>
4631 </param>
4632 <param name="hardDisk" type="IHardDisk" dir="return">
4633 <desc>Attached hard disk object.</desc>
4634 </param>
4635 </method>
4636
4637 <method name="detachHardDisk">
4638 <desc>
4639 Detaches the virtual hard disk attached to a device slot of the
4640 specified bus.
4641
4642 Detaching the hard disk from the virtual machine is deferred. This means
4643 that the hard disk remains associated with the machine when this method
4644 returns and gets actually de-associated only after a successful
4645 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4646 for more detailed information about attaching hard disks.
4647
4648 <note>
4649 You cannot detach the hard disk from a running machine.
4650 </note>
4651 <note>
4652 Detaching differencing hard disks implicitly created by <link
4653 to="#attachHardDisk"/> for the indirect attachment using this
4654 method will <b>not</b> implicitly delete them. The
4655 <link to="IHardDisk::deleteStorage"/> operation should be
4656 explicitly performed by the caller after the hard disk is successfully
4657 detached and the settings are saved with
4658 <link to="#saveSettings"/>, if it is the desired action.
4659 </note>
4660
4661 <result name="VBOX_E_INVALID_VM_STATE">
4662 Attempt to detach hard disk from a running virtual machine.
4663 </result>
4664 <result name="VBOX_E_OBJECT_NOT_FOUND">
4665 No hard disk attached to given slot/bus.
4666 </result>
4667 <result name="VBOX_E_NOT_SUPPORTED">
4668 Hard disk format does not support storage deletion.
4669 </result>
4670
4671 </desc>
4672 <param name="name" type="wstring" dir="in">
4673 <desc>name of the storage controller to detach the hard disk from.</desc>
4674 </param>
4675 <param name="controllerPort" type="long" dir="in">
4676 <desc>Port number to detach the hard disk from.</desc>
4677 </param>
4678 <param name="device" type="long" dir="in">
4679 <desc>Device slot number to detach the hard disk from.</desc>
4680 </param>
4681 </method>
4682
4683 <method name="getHardDiskAttachmentsOfController" const="yes">
4684 <desc>
4685 Returns an array of hard disk attachments which are attached to the
4686 the controller with the given name.
4687
4688 <result name="VBOX_E_OBJECT_NOT_FOUND">
4689 A storage controller with given name doesn't exist.
4690 </result>
4691 </desc>
4692 <param name="name" type="wstring" dir="in"/>
4693 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4694 </method>
4695
4696 <method name="getNetworkAdapter" const="yes">
4697 <desc>
4698 Returns the network adapter associated with the given slot.
4699 Slots are numbered sequentially, starting with zero. The total
4700 number of adapters per machine is defined by the
4701 <link to="ISystemProperties::networkAdapterCount"/> property,
4702 so the maximum slot number is one less than that property's value.
4703
4704 <result name="E_INVALIDARG">
4705 Invalid @a slot number.
4706 </result>
4707
4708 </desc>
4709 <param name="slot" type="unsigned long" dir="in"/>
4710 <param name="adapter" type="INetworkAdapter" dir="return"/>
4711 </method>
4712
4713 <method name="addStorageController">
4714 <desc>
4715 Adds a new storage controller (SCSI or SATA controller) to the
4716 machine and returns it as an instance of
4717 <link to="IStorageController" />.
4718
4719 @a name identifies the controller for subsequent calls such as
4720 <link to="#getStorageControllerByName" /> or
4721 <link to="#removeStorageController" /> or
4722 <link to="#attachHardDisk" />.
4723
4724 After the controller has been added, you can set its exact
4725 type by setting the <link to="IStorageController::controllerType" />.
4726
4727 <result name="VBOX_E_OBJECT_IN_USE">
4728 A storage controller with given name exists already.
4729 </result>
4730 <result name="E_INVALIDARG">
4731 Invalid @a controllerType.
4732 </result>
4733 </desc>
4734 <param name="name" type="wstring" dir="in"/>
4735 <param name="connectionType" type="StorageBus" dir="in"/>
4736 <param name="controller" type="IStorageController" dir="return"/>
4737 </method>
4738
4739 <method name="getStorageControllerByName" const="yes">
4740 <desc>
4741 Returns a storage controller with the given name.
4742
4743 <result name="VBOX_E_OBJECT_NOT_FOUND">
4744 A storage controller with given name doesn't exist.
4745 </result>
4746 </desc>
4747 <param name="name" type="wstring" dir="in"/>
4748 <param name="storageController" type="IStorageController" dir="return"/>
4749 </method>
4750
4751 <method name="removeStorageController">
4752 <desc>
4753 Removes a storage controller from the machine.
4754
4755 <result name="VBOX_E_OBJECT_NOT_FOUND">
4756 A storage controller with given name doesn't exist.
4757 </result>
4758 </desc>
4759 <param name="name" type="wstring" dir="in"/>
4760 </method>
4761
4762 <method name="getSerialPort" const="yes">
4763 <desc>
4764 Returns the serial port associated with the given slot.
4765 Slots are numbered sequentially, starting with zero. The total
4766 number of serial ports per machine is defined by the
4767 <link to="ISystemProperties::serialPortCount"/> property,
4768 so the maximum slot number is one less than that property's value.
4769
4770 <result name="E_INVALIDARG">
4771 Invalid @a slot number.
4772 </result>
4773
4774 </desc>
4775 <param name="slot" type="unsigned long" dir="in"/>
4776 <param name="port" type="ISerialPort" dir="return"/>
4777 </method>
4778
4779 <method name="getParallelPort" const="yes">
4780 <desc>
4781 Returns the parallel port associated with the given slot.
4782 Slots are numbered sequentially, starting with zero. The total
4783 number of parallel ports per machine is defined by the
4784 <link to="ISystemProperties::parallelPortCount"/> property,
4785 so the maximum slot number is one less than that property's value.
4786
4787 <result name="E_INVALIDARG">
4788 Invalid @a slot number.
4789 </result>
4790
4791 </desc>
4792 <param name="slot" type="unsigned long" dir="in"/>
4793 <param name="port" type="IParallelPort" dir="return"/>
4794 </method>
4795
4796 <method name="getExtraDataKeys">
4797 <desc>
4798 Returns an array representing the machine-specific extra data keys
4799 which currently have values defined.
4800 </desc>
4801 <param name="value" type="wstring" dir="return" safearray="yes">
4802 <desc>Array of extra data keys.</desc>
4803 </param>
4804 </method>
4805
4806 <method name="getExtraData">
4807 <desc>
4808 Returns associated machine-specific extra data.
4809
4810 If the requested data @a key does not exist, this function will
4811 succeed and return an empty string in the @a value argument.
4812
4813 <result name="VBOX_E_FILE_ERROR">
4814 Settings file not accessible.
4815 </result>
4816 <result name="VBOX_E_XML_ERROR">
4817 Could not parse the settings file.
4818 </result>
4819
4820 </desc>
4821 <param name="key" type="wstring" dir="in">
4822 <desc>Name of the data key to get.</desc>
4823 </param>
4824 <param name="value" type="wstring" dir="return">
4825 <desc>Value of the requested data key.</desc>
4826 </param>
4827 </method>
4828
4829 <method name="setExtraData">
4830 <desc>
4831 Sets associated machine-specific extra data.
4832
4833 If you pass @c null or an empty string as a key @a value, the given
4834 @a key will be deleted.
4835
4836 <note>
4837 Before performing the actual data change, this method will ask all
4838 registered callbacks using the
4839 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4840 notification for a permission. If one of the callbacks refuses the
4841 new value, the change will not be performed.
4842 </note>
4843 <note>
4844 On success, the
4845 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4846 is called to inform all registered callbacks about a successful data
4847 change.
4848 </note>
4849 <note>
4850 This method can be called outside the machine session and therefore
4851 it's a caller's responsibility to handle possible race conditions
4852 when several clients change the same key at the same time.
4853 </note>
4854
4855 <result name="VBOX_E_FILE_ERROR">
4856 Settings file not accessible.
4857 </result>
4858 <result name="VBOX_E_XML_ERROR">
4859 Could not parse the settings file.
4860 </result>
4861
4862 </desc>
4863 <param name="key" type="wstring" dir="in">
4864 <desc>Name of the data key to set.</desc>
4865 </param>
4866 <param name="value" type="wstring" dir="in">
4867 <desc>Value to assign to the key.</desc>
4868 </param>
4869 </method>
4870
4871 <method name="saveSettings">
4872 <desc>
4873 Saves any changes to machine settings made since the session
4874 has been opened or a new machine has been created, or since the
4875 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4876 For registered machines, new settings become visible to all
4877 other VirtualBox clients after successful invocation of this
4878 method.
4879 <note>
4880 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4881 notification event after the configuration has been successfully
4882 saved (only for registered machines).
4883 </note>
4884 <note>
4885 Calling this method is only valid on instances returned
4886 by <link to="ISession::machine"/> and on new machines
4887 created by <link to="IVirtualBox::createMachine"/> but not
4888 yet registered, or on unregistered machines after calling
4889 <link to="IVirtualBox::unregisterMachine"/>.
4890 </note>
4891
4892 <result name="VBOX_E_FILE_ERROR">
4893 Settings file not accessible.
4894 </result>
4895 <result name="VBOX_E_XML_ERROR">
4896 Could not parse the settings file.
4897 </result>
4898 <result name="E_ACCESSDENIED">
4899 Modification request refused.
4900 </result>
4901
4902 </desc>
4903 </method>
4904
4905 <method name="discardSettings">
4906 <desc>
4907 Discards any changes to the machine settings made since the session
4908 has been opened or since the last call to <link to="#saveSettings"/>
4909 or <link to="#discardSettings"/>.
4910 <note>
4911 Calling this method is only valid on instances returned
4912 by <link to="ISession::machine"/> and on new machines
4913 created by <link to="IVirtualBox::createMachine"/> or
4914 opened by <link to="IVirtualBox::openMachine"/> but not
4915 yet registered, or on unregistered machines after calling
4916 <link to="IVirtualBox::unregisterMachine"/>.
4917 </note>
4918
4919 <result name="VBOX_E_INVALID_VM_STATE">
4920 Virtual machine is not mutable.
4921 </result>
4922
4923 </desc>
4924 </method>
4925
4926 <method name="deleteSettings">
4927 <desc>
4928 Deletes the settings file of this machine from disk.
4929 The machine must not be registered in order for this operation
4930 to succeed.
4931 <note>
4932 <link to="#settingsModified"/> will return @c true after this
4933 method successfully returns.
4934 </note>
4935 <note>
4936 Calling this method is only valid on instances returned
4937 by <link to="ISession::machine"/> and on new machines
4938 created by <link to="IVirtualBox::createMachine"/> or
4939 opened by <link to="IVirtualBox::openMachine"/> but not
4940 yet registered, or on unregistered machines after calling
4941 <link to="IVirtualBox::unregisterMachine"/>.
4942 </note>
4943 <note>
4944 The deleted machine settings file can be restored (saved again)
4945 by calling <link to="#saveSettings"/>.
4946 </note>
4947
4948 <result name="VBOX_E_INVALID_VM_STATE">
4949 Cannot delete settings of a registered machine or
4950 machine not mutable.
4951 </result>
4952 <result name="VBOX_E_IPRT_ERROR">
4953 Could not delete the settings file.
4954 </result>
4955
4956 </desc>
4957 </method>
4958
4959 <method name="export">
4960 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
4961 steps required to export VirtualBox machines to OVF.
4962 </desc>
4963
4964 <param name="aAppliance" type="IAppliance" dir="in">
4965 <desc>Appliance to export this machine to.</desc>
4966 </param>
4967 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
4968 <desc>VirtualSystemDescription object which is created for this machine.</desc>
4969 </param>
4970 </method >
4971
4972 <method name="getSnapshot">
4973 <desc>
4974 Returns a snapshot of this machine with the given UUID.
4975 A @c null UUID can be used to obtain the first snapshot
4976 taken on this machine. This is useful if you want to traverse
4977 the whole tree of snapshots starting from the root.
4978
4979 <result name="VBOX_E_OBJECT_NOT_FOUND">
4980 Virtual machine has no snapshots or snapshot not found.
4981 </result>
4982
4983 </desc>
4984 <param name="id" type="wstring" dir="in">
4985 <desc>UUID of the snapshot to get</desc>
4986 </param>
4987 <param name="snapshot" type="ISnapshot" dir="return">
4988 <desc>Snapshot object with the given UUID.</desc>
4989 </param>
4990 </method>
4991
4992 <method name="findSnapshot">
4993 <desc>
4994 Returns a snapshot of this machine with the given name.
4995
4996 <result name="VBOX_E_OBJECT_NOT_FOUND">
4997 Virtual machine has no snapshots or snapshot not found.
4998 </result>
4999
5000 </desc>
5001 <param name="name" type="wstring" dir="in">
5002 <desc>Name of the snapshot to find</desc>
5003 </param>
5004 <param name="snapshot" type="ISnapshot" dir="return">
5005 <desc>Snapshot object with the given name.</desc>
5006 </param>
5007 </method>
5008
5009 <method name="setCurrentSnapshot">
5010 <desc>
5011 Sets the current snapshot of this machine.
5012 <note>
5013 In the current implementation, this operation is not
5014 implemented.
5015 </note>
5016 </desc>
5017 <param name="id" type="wstring" dir="in">
5018 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5019 </param>
5020 </method>
5021
5022 <method name="createSharedFolder">
5023 <desc>
5024 Creates a new permanent shared folder by associating the given logical
5025 name with the given host path, adds it to the collection of shared
5026 folders and starts sharing it. Refer to the description of
5027 <link to="ISharedFolder"/> to read more about logical names.
5028
5029 <result name="VBOX_E_OBJECT_IN_USE">
5030 Shared folder already exists.
5031 </result>
5032 <result name="VBOX_E_FILE_ERROR">
5033 Shared folder @a hostPath not accessible.
5034 </result>
5035
5036 </desc>
5037 <param name="name" type="wstring" dir="in">
5038 <desc>Unique logical name of the shared folder.</desc>
5039 </param>
5040 <param name="hostPath" type="wstring" dir="in">
5041 <desc>Full path to the shared folder in the host file system.</desc>
5042 </param>
5043 <param name="writable" type="boolean" dir="in">
5044 <desc>Whether the share is writable or readonly</desc>
5045 </param>
5046 </method>
5047
5048 <method name="removeSharedFolder">
5049 <desc>
5050 Removes the permanent shared folder with the given name previously
5051 created by <link to="#createSharedFolder"/> from the collection of
5052 shared folders and stops sharing it.
5053
5054 <result name="VBOX_E_INVALID_VM_STATE">
5055 Virtual machine is not mutable.
5056 </result>
5057 <result name="VBOX_E_OBJECT_NOT_FOUND">
5058 Shared folder @a name does not exist.
5059 </result>
5060
5061 </desc>
5062 <param name="name" type="wstring" dir="in">
5063 <desc>Logical name of the shared folder to remove.</desc>
5064 </param>
5065 </method>
5066
5067 <method name="canShowConsoleWindow">
5068 <desc>
5069 Returns @c true if the VM console process can activate the
5070 console window and bring it to foreground on the desktop of
5071 the host PC.
5072 <note>
5073 This method will fail if a session for this machine is not
5074 currently open.
5075 </note>
5076
5077 <result name="VBOX_E_INVALID_VM_STATE">
5078 Machine session is not open.
5079 </result>
5080
5081 </desc>
5082 <param name="canShow" type="boolean" dir="return">
5083 <desc>
5084 @c true if the console window can be shown and @c false otherwise.
5085 </desc>
5086 </param>
5087 </method>
5088
5089 <method name="showConsoleWindow">
5090 <desc>
5091 Activates the console window and brings it to foreground on
5092 the desktop of the host PC. Many modern window managers on
5093 many platforms implement some sort of focus stealing
5094 prevention logic, so that it may be impossible to activate
5095 a window without the help of the currently active
5096 application. In this case, this method will return a non-zero
5097 identifier that represents the top-level window of the VM
5098 console process. The caller, if it represents a currently
5099 active process, is responsible to use this identifier (in a
5100 platform-dependent manner) to perform actual window
5101 activation.
5102 <note>
5103 This method will fail if a session for this machine is not
5104 currently open.
5105 </note>
5106
5107 <result name="VBOX_E_INVALID_VM_STATE">
5108 Machine session is not open.
5109 </result>
5110
5111 </desc>
5112 <param name="winId" type="unsigned long long" dir="return">
5113 <desc>
5114 Platform-dependent identifier of the top-level VM console
5115 window, or zero if this method has performed all actions
5116 necessary to implement the <i>show window</i> semantics for
5117 the given platform and/or VirtualBox front-end.
5118 </desc>
5119 </param>
5120 </method>
5121
5122 <method name="getGuestProperty">
5123 <desc>
5124 Reads an entry from the machine's guest property store.
5125
5126 <result name="VBOX_E_INVALID_VM_STATE">
5127 Machine session is not open.
5128 </result>
5129
5130 </desc>
5131 <param name="name" type="wstring" dir="in">
5132 <desc>
5133 The name of the property to read.
5134 </desc>
5135 </param>
5136 <param name="value" type="wstring" dir="out">
5137 <desc>
5138 The value of the property. If the property does not exist then this
5139 will be empty.
5140 </desc>
5141 </param>
5142 <param name="timestamp" type="unsigned long long" dir="out">
5143 <desc>
5144 The time at which the property was last modified, as seen by the
5145 server process.
5146 </desc>
5147 </param>
5148 <param name="flags" type="wstring" dir="out">
5149 <desc>
5150 Additional property parameters, passed as a comma-separated list of
5151 "name=value" type entries.
5152 </desc>
5153 </param>
5154 </method>
5155
5156 <method name="getGuestPropertyValue">
5157 <desc>
5158 Reads a value from the machine's guest property store.
5159
5160 <result name="VBOX_E_INVALID_VM_STATE">
5161 Machine session is not open.
5162 </result>
5163
5164 </desc>
5165 <param name="property" type="wstring" dir="in">
5166 <desc>
5167 The name of the property to read.
5168 </desc>
5169 </param>
5170 <param name="value" type="wstring" dir="return">
5171 <desc>
5172 The value of the property. If the property does not exist then this
5173 will be empty.
5174 </desc>
5175 </param>
5176 </method>
5177
5178 <method name="getGuestPropertyTimestamp">
5179 <desc>
5180 Reads a property timestamp from the machine's guest property store.
5181
5182 <result name="VBOX_E_INVALID_VM_STATE">
5183 Machine session is not open.
5184 </result>
5185
5186 </desc>
5187 <param name="property" type="wstring" dir="in">
5188 <desc>
5189 The name of the property to read.
5190 </desc>
5191 </param>
5192 <param name="value" type="unsigned long long" dir="return">
5193 <desc>
5194 The timestamp. If the property does not exist then this will be
5195 empty.
5196 </desc>
5197 </param>
5198 </method>
5199
5200 <method name="setGuestProperty">
5201 <desc>
5202 Sets, changes or deletes an entry in the machine's guest property
5203 store.
5204
5205 <result name="E_ACCESSDENIED">
5206 Property cannot be changed.
5207 </result>
5208 <result name="E_INVALIDARG">
5209 Invalid @a flags.
5210 </result>
5211 <result name="VBOX_E_INVALID_VM_STATE">
5212 Virtual machine is not mutable or session not open.
5213 </result>
5214 <result name="VBOX_E_INVALID_OBJECT_STATE">
5215 Cannot set transient property when machine not running.
5216 </result>
5217
5218 </desc>
5219 <param name="property" type="wstring" dir="in">
5220 <desc>
5221 The name of the property to set, change or delete.
5222 </desc>
5223 </param>
5224 <param name="value" type="wstring" dir="in">
5225 <desc>
5226 The new value of the property to set, change or delete. If the
5227 property does not yet exist and value is non-empty, it will be
5228 created. If the value is @c null or empty, the property will be
5229 deleted if it exists.
5230 </desc>
5231 </param>
5232 <param name="flags" type="wstring" dir="in">
5233 <desc>
5234 Additional property parameters, passed as a comma-separated list of
5235 "name=value" type entries.
5236 </desc>
5237 </param>
5238 </method>
5239
5240 <method name="setGuestPropertyValue">
5241 <desc>
5242 Sets, changes or deletes a value in the machine's guest property
5243 store. The flags field will be left unchanged or created empty for a
5244 new property.
5245
5246 <result name="E_ACCESSDENIED">
5247 Property cannot be changed.
5248 </result>
5249 <result name="VBOX_E_INVALID_VM_STATE">
5250 Virtual machine is not mutable or session not open.
5251 </result>
5252 <result name="VBOX_E_INVALID_OBJECT_STATE">
5253 Cannot set transient property when machine not running.
5254 </result>
5255 </desc>
5256
5257 <param name="property" type="wstring" dir="in">
5258 <desc>
5259 The name of the property to set, change or delete.
5260 </desc>
5261 </param>
5262 <param name="value" type="wstring" dir="in">
5263 <desc>
5264 The new value of the property to set, change or delete. If the
5265 property does not yet exist and value is non-empty, it will be
5266 created. If the value is @c null or empty, the property will be
5267 deleted if it exists.
5268 </desc>
5269 </param>
5270 </method>
5271
5272 <method name="enumerateGuestProperties">
5273 <desc>
5274 Return a list of the guest properties matching a set of patterns along
5275 with their values, time stamps and flags.
5276 </desc>
5277 <param name="patterns" type="wstring" dir="in">
5278 <desc>
5279 The patterns to match the properties against, separated by '|'
5280 characters. If this is empty or @c null, all properties will match.
5281 </desc>
5282 </param>
5283 <param name="name" type="wstring" dir="out" safearray="yes">
5284 <desc>
5285 The names of the properties returned.
5286 </desc>
5287 </param>
5288 <param name="value" type="wstring" dir="out" safearray="yes">
5289 <desc>
5290 The values of the properties returned. The array entries match the
5291 corresponding entries in the @a name array.
5292 </desc>
5293 </param>
5294 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5295 <desc>
5296 The time stamps of the properties returned. The array entries match
5297 the corresponding entries in the @a name array.
5298 </desc>
5299 </param>
5300 <param name="flags" type="wstring" dir="out" safearray="yes">
5301 <desc>
5302 The flags of the properties returned. The array entries match the
5303 corresponding entries in the @a name array.
5304 </desc>
5305 </param>
5306 </method>
5307</interface>
5308
5309 <!--
5310 // IConsole
5311 /////////////////////////////////////////////////////////////////////////
5312 -->
5313
5314 <interface
5315 name="IConsoleCallback" extends="$unknown"
5316 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5317 wsmap="suppress"
5318 >
5319
5320 <desc>
5321 This interface is used by a client of the Main API that need to
5322 be notified of events. For example, a graphical user interface
5323 can use this to learn about machine state changes so they can
5324 update the list of virtual machines without having to rely
5325 on polling.
5326
5327 Whenever relevant events occur in VirtualBox, the callbacks in
5328 objects of this interface are called. In order for this to be
5329 useful, a client needs to create its own subclass that implements
5330 this interface in which the methods for the relevant callbacks
5331 are overridden. An instance of this subclass interface can then
5332 be passed to <link to="IConsole::registerCallback" />.
5333 </desc>
5334
5335 <method name="onMousePointerShapeChange">
5336 <desc>
5337 Notification when the guest mouse pointer shape has
5338 changed. The new shape data is given.
5339 </desc>
5340 <param name="visible" type="boolean" dir="in">
5341 <desc>
5342 Flag whether the pointer is visible.
5343 </desc>
5344 </param>
5345 <param name="alpha" type="boolean" dir="in">
5346 <desc>
5347 Flag whether the pointer has an alpha channel.
5348 </desc>
5349 </param>
5350 <param name="xHot" type="unsigned long" dir="in">
5351 <desc>
5352 The pointer hot spot x coordinate.
5353 </desc>
5354 </param>
5355 <param name="yHot" type="unsigned long" dir="in">
5356 <desc>
5357 The pointer hot spot y coordinate.
5358 </desc>
5359 </param>
5360 <param name="width" type="unsigned long" dir="in">
5361 <desc>
5362 Width of the pointer shape in pixels.
5363 </desc>
5364 </param>
5365 <param name="height" type="unsigned long" dir="in">
5366 <desc>
5367 Height of the pointer shape in pixels.
5368 </desc>
5369 </param>
5370 <param name="shape" type="octet" mod="ptr" dir="in">
5371 <desc>
5372 Address of the shape buffer.
5373
5374 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5375 followed by a 32-bpp XOR (color) mask.
5376
5377 For pointers without alpha channel the XOR mask pixels are 32
5378 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5379 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5380
5381 An AND mask is used for pointers with alpha channel, so if the
5382 callback does not support alpha, the pointer could be
5383 displayed as a normal color pointer.
5384
5385 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5386 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5387 height</tt>. The padding bits at the end of each scanline are
5388 undefined.
5389
5390 The XOR mask follows the AND mask on the next 4-byte aligned
5391 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5392 Bytes in the gap between the AND and the XOR mask are undefined.
5393 The XOR mask scanlines have no gap between them and the size of
5394 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5395
5396 <note>
5397 If @a shape is 0, only the pointer visibility is changed.
5398 </note>
5399 </desc>
5400 </param>
5401 </method>
5402
5403 <method name="onMouseCapabilityChange">
5404 <desc>
5405 Notification when the mouse capabilities reported by the
5406 guest have changed. The new capabilities are passed.
5407 </desc>
5408 <param name="supportsAbsolute" type="boolean" dir="in"/>
5409 <param name="needsHostCursor" type="boolean" dir="in"/>
5410 </method>
5411
5412 <method name="onKeyboardLedsChange">
5413 <desc>
5414 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5415 to alter the state of the keyboard LEDs.
5416 </desc>
5417 <param name="numLock" type="boolean" dir="in"/>
5418 <param name="capsLock" type="boolean" dir="in"/>
5419 <param name="scrollLock" type="boolean" dir="in"/>
5420 </method>
5421
5422 <method name="onStateChange">
5423 <desc>
5424 Notification when the execution state of the machine has changed.
5425 The new state will be given.
5426 </desc>
5427 <param name="state" type="MachineState" dir="in"/>
5428 </method>
5429
5430 <method name="onAdditionsStateChange">
5431 <desc>
5432 Notification when a Guest Additions property changes.
5433 Interested callees should query IGuest attributes to
5434 find out what has changed.
5435 </desc>
5436 </method>
5437
5438 <method name="onDVDDriveChange">
5439 <desc>
5440 Notification when a property of the
5441 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5442 Interested callees should use IDVDDrive methods to find out what has
5443 changed.
5444 </desc>
5445 </method>
5446
5447 <method name="onFloppyDriveChange">
5448 <desc>
5449 Notification when a property of the
5450 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5451 Interested callees should use IFloppyDrive methods to find out what
5452 has changed.
5453 </desc>
5454 </method>
5455
5456 <method name="onNetworkAdapterChange">
5457 <desc>
5458 Notification when a property of one of the
5459 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5460 changes. Interested callees should use INetworkAdapter methods and
5461 attributes to find out what has changed.
5462 </desc>
5463 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5464 <desc>Network adapter that is subject to change.</desc>
5465 </param>
5466 </method>
5467
5468 <method name="onSerialPortChange">
5469 <desc>
5470 Notification when a property of one of the
5471 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5472 Interested callees should use ISerialPort methods and attributes
5473 to find out what has changed.
5474 </desc>
5475 <param name="serialPort" type="ISerialPort" dir="in">
5476 <desc>Serial port that is subject to change.</desc>
5477 </param>
5478 </method>
5479
5480 <method name="onParallelPortChange">
5481 <desc>
5482 Notification when a property of one of the
5483 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5484 changes. Interested callees should use ISerialPort methods and
5485 attributes to find out what has changed.
5486 </desc>
5487 <param name="parallelPort" type="IParallelPort" dir="in">
5488 <desc>Parallel port that is subject to change.</desc>
5489 </param>
5490 </method>
5491
5492 <method name="onStorageControllerChange">
5493 <desc>
5494 Notification when a property of one of the
5495 virtual <link to="IMachine::storageControllers">storage controllers</link>
5496 changes. Interested callees should query the corresponding collections
5497 to find out what has changed.
5498 </desc>
5499 </method>
5500
5501 <method name="onVRDPServerChange">
5502 <desc>
5503 Notification when a property of the
5504 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5505 Interested callees should use IVRDPServer methods and attributes to
5506 find out what has changed.
5507 </desc>
5508 </method>
5509
5510 <method name="onUSBControllerChange">
5511 <desc>
5512 Notification when a property of the virtual
5513 <link to="IMachine::USBController">USB controller</link> changes.
5514 Interested callees should use IUSBController methods and attributes to
5515 find out what has changed.
5516 </desc>
5517 </method>
5518
5519 <method name="onUSBDeviceStateChange">
5520 <desc>
5521 Notification when a USB device is attached to or detached from
5522 the virtual USB controller.
5523
5524 This notification is sent as a result of the indirect
5525 request to attach the device because it matches one of the
5526 machine USB filters, or as a result of the direct request
5527 issued by <link to="IConsole::attachUSBDevice"/> or
5528 <link to="IConsole::detachUSBDevice"/>.
5529
5530 This notification is sent in case of both a succeeded and a
5531 failed request completion. When the request succeeds, the
5532 @a error parameter is @c null, and the given device has been
5533 already added to (when @a attached is @c true) or removed from
5534 (when @a attached is @c false) the collection represented by
5535 <link to="IConsole::USBDevices"/>. On failure, the collection
5536 doesn't change and the @a error parameter represents the error
5537 message describing the failure.
5538
5539 </desc>
5540 <param name="device" type="IUSBDevice" dir="in">
5541 <desc>Device that is subject to state change.</desc>
5542 </param>
5543 <param name="attached" type="boolean" dir="in">
5544 <desc>
5545 @c true if the device was attached and @c false otherwise.
5546 </desc>
5547 </param>
5548 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5549 <desc>
5550 @c null on success or an error message object on failure.
5551 </desc>
5552 </param>
5553 </method>
5554
5555 <method name="onSharedFolderChange">
5556 <desc>
5557 Notification when a shared folder is added or removed.
5558 The @a scope argument defines one of three scopes:
5559 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5560 (<link to="Scope_Global">Global</link>),
5561 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5562 the machine (<link to="Scope_Machine">Machine</link>) or <link
5563 to="IConsole::sharedFolders">transient shared folders</link> of the
5564 machine (<link to="Scope_Session">Session</link>). Interested callees
5565 should use query the corresponding collections to find out what has
5566 changed.
5567 </desc>
5568 <param name="scope" type="Scope" dir="in">
5569 <desc>Scope of the notification.</desc>
5570 </param>
5571 </method>
5572
5573 <method name="onRuntimeError">
5574 <desc>
5575 Notification when an error happens during the virtual
5576 machine execution.
5577
5578 There are three kinds of runtime errors:
5579 <ul>
5580 <li><i>fatal</i></li>
5581 <li><i>non-fatal with retry</i></li>
5582 <li><i>non-fatal warnings</i></li>
5583 </ul>
5584
5585 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5586 to @c true. In case of fatal errors, the virtual machine
5587 execution is always paused before calling this notification, and
5588 the notification handler is supposed either to immediately save
5589 the virtual machine state using <link to="IConsole::saveState"/>
5590 or power it off using <link to="IConsole::powerDown"/>.
5591 Resuming the execution can lead to unpredictable results.
5592
5593 <b>Non-fatal</b> errors and warnings are indicated by the
5594 @a fatal parameter set to @c false. If the virtual machine
5595 is in the Paused state by the time the error notification is
5596 received, it means that the user can <i>try to resume</i> the machine
5597 execution after attempting to solve the problem that caused the
5598 error. In this case, the notification handler is supposed
5599 to show an appropriate message to the user (depending on the
5600 value of the @a id parameter) that offers several actions such
5601 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5602 wants to retry, the notification handler should continue
5603 the machine execution using the <link to="IConsole::resume"/>
5604 call. If the machine execution is not Paused during this
5605 notification, then it means this notification is a <i>warning</i>
5606 (for example, about a fatal condition that can happen very soon);
5607 no immediate action is required from the user, the machine
5608 continues its normal execution.
5609
5610 Note that in either case the notification handler
5611 <b>must not</b> perform any action directly on a thread
5612 where this notification is called. Everything it is allowed to
5613 do is to post a message to another thread that will then talk
5614 to the user and take the corresponding action.
5615
5616 Currently, the following error identifiers are known:
5617 <ul>
5618 <li><tt>"HostMemoryLow"</tt></li>
5619 <li><tt>"HostAudioNotResponding"</tt></li>
5620 <li><tt>"VDIStorageFull"</tt></li>
5621 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5622 </ul>
5623
5624 <note>
5625 This notification is not designed to be implemented by
5626 more than one callback at a time. If you have multiple
5627 IConsoleCallback instances registered on the given
5628 IConsole object, make sure you simply do nothing but
5629 return @c S_OK from all but one of them that does actual
5630 user notification and performs necessary actions.
5631 </note>
5632
5633 </desc>
5634 <param name="fatal" type="boolean" dir="in">
5635 <desc>Whether the error is fatal or not</desc>
5636 </param>
5637 <param name="id" type="wstring" dir="in">
5638 <desc>Error identifier</desc>
5639 </param>
5640 <param name="message" type="wstring" dir="in">
5641 <desc>Optional error message</desc>
5642 </param>
5643 </method>
5644
5645 <method name="onCanShowWindow">
5646 <desc>
5647 Notification when a call to
5648 <link to="IMachine::canShowConsoleWindow"/> is made by a
5649 front-end to check if a subsequent call to
5650 <link to="IMachine::showConsoleWindow"/> can succeed.
5651
5652 The callee should give an answer appropriate to the current
5653 machine state in the @a canShow argument. This answer must
5654 remain valid at least until the next
5655 <link to="IConsole::state">machine state</link> change.
5656
5657 <note>
5658 This notification is not designed to be implemented by
5659 more than one callback at a time. If you have multiple
5660 IConsoleCallback instances registered on the given
5661 IConsole object, make sure you simply do nothing but
5662 return @c true and @c S_OK from all but one of them that
5663 actually manages console window activation.
5664 </note>
5665 </desc>
5666 <param name="canShow" type="boolean" dir="return">
5667 <desc>
5668 @c true if the console window can be shown and @c false otherwise.
5669 </desc>
5670 </param>
5671 </method>
5672
5673 <method name="onShowWindow">
5674 <desc>
5675 Notification when a call to
5676 <link to="IMachine::showConsoleWindow"/>
5677 requests the console window to be activated and brought to
5678 foreground on the desktop of the host PC.
5679
5680 This notification should cause the VM console process to
5681 perform the requested action as described above. If it is
5682 impossible to do it at a time of this notification, this
5683 method should return a failure.
5684
5685 Note that many modern window managers on many platforms
5686 implement some sort of focus stealing prevention logic, so
5687 that it may be impossible to activate a window without the
5688 help of the currently active application (which is supposedly
5689 an initiator of this notification). In this case, this method
5690 must return a non-zero identifier that represents the
5691 top-level window of the VM console process. The caller, if it
5692 represents a currently active process, is responsible to use
5693 this identifier (in a platform-dependent manner) to perform
5694 actual window activation.
5695
5696 This method must set @a winId to zero if it has performed all
5697 actions necessary to complete the request and the console
5698 window is now active and in foreground, to indicate that no
5699 further action is required on the caller's side.
5700
5701 <note>
5702 This notification is not designed to be implemented by
5703 more than one callback at a time. If you have multiple
5704 IConsoleCallback instances registered on the given
5705 IConsole object, make sure you simply do nothing but
5706 return @c S_OK from all but one of them that actually
5707 manages console window activation.
5708 </note>
5709 </desc>
5710 <param name="winId" type="unsigned long long" dir="return">
5711 <desc>
5712 Platform-dependent identifier of the top-level VM console
5713 window, or zero if this method has performed all actions
5714 necessary to implement the <i>show window</i> semantics for
5715 the given platform and/or this VirtualBox front-end.
5716 </desc>
5717 </param>
5718 </method>
5719
5720 </interface>
5721
5722 <interface
5723 name="IRemoteDisplayInfo" extends="$unknown"
5724 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5725 wsmap="struct"
5726 >
5727 <desc>
5728 Contains information about the remote display (VRDP) capabilities and status.
5729 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5730 </desc>
5731
5732 <attribute name="active" type="boolean" readonly="yes">
5733 <desc>
5734 Whether the remote display connection is active.
5735 </desc>
5736 </attribute>
5737
5738 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5739 <desc>
5740 How many times a client connected.
5741 </desc>
5742 </attribute>
5743
5744 <attribute name="beginTime" type="long long" readonly="yes">
5745 <desc>
5746 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5747 </desc>
5748 </attribute>
5749
5750 <attribute name="endTime" type="long long" readonly="yes">
5751 <desc>
5752 When the last connection was terminated or the current time, if
5753 connection is still active, in milliseconds since 1970-01-01 UTC.
5754 </desc>
5755 </attribute>
5756
5757 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5758 <desc>
5759 How many bytes were sent in last or current, if still active, connection.
5760 </desc>
5761 </attribute>
5762
5763 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5764 <desc>
5765 How many bytes were sent in all connections.
5766 </desc>
5767 </attribute>
5768
5769 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5770 <desc>
5771 How many bytes were received in last or current, if still active, connection.
5772 </desc>
5773 </attribute>
5774
5775 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5776 <desc>
5777 How many bytes were received in all connections.
5778 </desc>
5779 </attribute>
5780
5781 <attribute name="user" type="wstring" readonly="yes">
5782 <desc>
5783 Login user name supplied by the client.
5784 </desc>
5785 </attribute>
5786
5787 <attribute name="domain" type="wstring" readonly="yes">
5788 <desc>
5789 Login domain name supplied by the client.
5790 </desc>
5791 </attribute>
5792
5793 <attribute name="clientName" type="wstring" readonly="yes">
5794 <desc>
5795 The client name supplied by the client.
5796 </desc>
5797 </attribute>
5798
5799 <attribute name="clientIP" type="wstring" readonly="yes">
5800 <desc>
5801 The IP address of the client.
5802 </desc>
5803 </attribute>
5804
5805 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5806 <desc>
5807 The client software version number.
5808 </desc>
5809 </attribute>
5810
5811 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5812 <desc>
5813 Public key exchange method used when connection was established.
5814 Values: 0 - RDP4 public key exchange scheme.
5815 1 - X509 certificates were sent to client.
5816 </desc>
5817 </attribute>
5818
5819 </interface>
5820
5821 <interface
5822 name="IConsole" extends="$unknown"
5823 uuid="0a51994b-cbc6-4686-94eb-d4e4023280e2"
5824 wsmap="managed"
5825 >
5826 <desc>
5827 The IConsole interface represents an interface to control virtual
5828 machine execution.
5829
5830 The console object that implements the IConsole interface is obtained
5831 from a session object after the session for the given machine has been
5832 opened using one of <link to="IVirtualBox::openSession"/>,
5833 <link to="IVirtualBox::openRemoteSession"/> or
5834 <link to="IVirtualBox::openExistingSession"/> methods.
5835
5836 Methods of the IConsole interface allow the caller to query the current
5837 virtual machine execution state, pause the machine or power it down, save
5838 the machine state or take a snapshot, attach and detach removable media
5839 and so on.
5840
5841 <see>ISession</see>
5842 </desc>
5843
5844 <attribute name="machine" type="IMachine" readonly="yes">
5845 <desc>
5846 Machine object this console is sessioned with.
5847 <note>
5848 This is a convenience property, it has the same value as
5849 <link to="ISession::machine"/> of the corresponding session
5850 object.
5851 </note>
5852 </desc>
5853 </attribute>
5854
5855 <attribute name="state" type="MachineState" readonly="yes">
5856 <desc>
5857 Current execution state of the machine.
5858 <note>
5859 This property always returns the same value as the corresponding
5860 property of the IMachine object this console is sessioned with.
5861 For the process that owns (executes) the VM, this is the
5862 preferable way of querying the VM state, because no IPC
5863 calls are made.
5864 </note>
5865 </desc>
5866 </attribute>
5867
5868 <attribute name="guest" type="IGuest" readonly="yes">
5869 <desc>Guest object.</desc>
5870 </attribute>
5871
5872 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5873 <desc>
5874 Virtual keyboard object.
5875 <note>
5876 If the machine is not running, any attempt to use
5877 the returned object will result in an error.
5878 </note>
5879 </desc>
5880 </attribute>
5881
5882 <attribute name="mouse" type="IMouse" readonly="yes">
5883 <desc>
5884 Virtual mouse object.
5885 <note>
5886 If the machine is not running, any attempt to use
5887 the returned object will result in an error.
5888 </note>
5889 </desc>
5890 </attribute>
5891
5892 <attribute name="display" type="IDisplay" readonly="yes">
5893 <desc>Virtual display object.
5894 <note>
5895 If the machine is not running, any attempt to use
5896 the returned object will result in an error.
5897 </note>
5898 </desc>
5899 </attribute>
5900
5901 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5902 <desc>Debugging interface.</desc>
5903 </attribute>
5904
5905 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5906 <desc>
5907 Collection of USB devices currently attached to the virtual
5908 USB controller.
5909 <note>
5910 The collection is empty if the machine is not running.
5911 </note>
5912 </desc>
5913 </attribute>
5914
5915 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5916 <desc>
5917 List of USB devices currently attached to the remote VRDP client.
5918 Once a new device is physically attached to the remote host computer,
5919 it appears in this list and remains there until detached.
5920 </desc>
5921 </attribute>
5922
5923 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5924 <desc>
5925 Collection of shared folders for the current session. These folders
5926 are called transient shared folders because they are available to the
5927 guest OS running inside the associated virtual machine only for the
5928 duration of the session (as opposed to
5929 <link to="IMachine::sharedFolders"/> which represent permanent shared
5930 folders). When the session is closed (e.g. the machine is powered down),
5931 these folders are automatically discarded.
5932
5933 New shared folders are added to the collection using
5934 <link to="#createSharedFolder"/>. Existing shared folders can be
5935 removed using <link to="#removeSharedFolder"/>.
5936 </desc>
5937 </attribute>
5938
5939 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5940 <desc>
5941 Interface that provides information on Remote Display (VRDP) connection.
5942 </desc>
5943 </attribute>
5944
5945 <method name="powerUp">
5946 <desc>
5947 Starts the virtual machine execution using the current machine
5948 state (that is, its current execution state, current settings and
5949 current hard disks).
5950
5951 If the machine is powered off or aborted, the execution will
5952 start from the beginning (as if the real hardware were just
5953 powered on).
5954
5955 If the machine is in the <link to="MachineState_Saved"/> state,
5956 it will continue its execution the point where the state has
5957 been saved.
5958
5959 <note>
5960 Unless you are trying to write a new VirtualBox front-end that
5961 performs direct machine execution (like the VirtualBox or VBoxSDL
5962 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5963 session opened by <link to="IVirtualBox::openSession"/> and use this
5964 session only to change virtual machine settings. If you simply want to
5965 start virtual machine execution using one of the existing front-ends
5966 (for example the VirtualBox GUI or headless server), simply use
5967 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5968 power up the machine automatically for you.
5969 </note>
5970
5971 <see>#saveState</see>
5972 <result name="VBOX_E_INVALID_VM_STATE">
5973 Virtual machine already running.
5974 </result>
5975 <result name="VBOX_E_HOST_ERROR">
5976 Host interface does not exist or name not set.
5977 </result>
5978 <result name="VBOX_E_FILE_ERROR">
5979 Invalid saved state file.
5980 </result>
5981 </desc>
5982 <param name="progress" type="IProgress" dir="return">
5983 <desc>Progress object to track the operation completion.</desc>
5984 </param>
5985 </method>
5986
5987 <method name="powerUpPaused">
5988 <desc>
5989 Identical to powerUp except that the VM will enter the
5990 <link to="MachineState_Paused"/> state, instead of
5991 <link to="MachineState_Running"/>.
5992
5993 <see>#powerUp</see>
5994 <result name="VBOX_E_INVALID_VM_STATE">
5995 Virtual machine already running.
5996 </result>
5997 <result name="VBOX_E_HOST_ERROR">
5998 Host interface does not exist or name not set.
5999 </result>
6000 <result name="VBOX_E_FILE_ERROR">
6001 Invalid saved state file.
6002 </result>
6003 </desc>
6004 <param name="progress" type="IProgress" dir="return">
6005 <desc>Progress object to track the operation completion.</desc>
6006 </param>
6007 </method>
6008
6009 <method name="powerDown">
6010 <desc>
6011 Initiates the power down procedure to stop the virtual machine
6012 execution.
6013
6014 The completion of the power down procedure is tracked using the returned
6015 IProgress object. After the operation is complete, the machine will go
6016 to the PoweredOff state.
6017 <result name="VBOX_E_INVALID_VM_STATE">
6018 Virtual machine must be Running, Paused or Stuck to be powered down.
6019 </result>
6020 </desc>
6021 <param name="progress" type="IProgress" dir="return">
6022 <desc>Progress object to track the operation completion.</desc>
6023 </param>
6024 </method>
6025
6026 <method name="reset">
6027 <desc>Resets the virtual machine.
6028 <result name="VBOX_E_INVALID_VM_STATE">
6029 Virtual machine not in Running state.
6030 </result>
6031 <result name="VBOX_E_VM_ERROR">
6032 Virtual machine error in reset operation.
6033 </result>
6034 </desc>
6035 </method>
6036
6037 <method name="pause">
6038 <desc>Pauses the virtual machine execution.
6039 <result name="VBOX_E_INVALID_VM_STATE">
6040 Virtual machine not in Running state.
6041 </result>
6042 <result name="VBOX_E_VM_ERROR">
6043 Virtual machine error in suspend operation.
6044 </result>
6045 </desc>
6046 </method>
6047
6048 <method name="resume">
6049 <desc>Resumes the virtual machine execution.
6050 <result name="VBOX_E_INVALID_VM_STATE">
6051 Virtual machine not in Paused state.
6052 </result>
6053 <result name="VBOX_E_VM_ERROR">
6054 Virtual machine error in resume operation.
6055 </result>
6056 </desc>
6057 </method>
6058
6059 <method name="powerButton">
6060 <desc>Sends the ACPI power button event to the guest.
6061 <result name="VBOX_E_INVALID_VM_STATE">
6062 Virtual machine not in Running state.
6063 </result>
6064 <result name="VBOX_E_PDM_ERROR">
6065 Controlled power off failed.
6066 </result>
6067 </desc>
6068 </method>
6069
6070 <method name="sleepButton">
6071 <desc>Sends the ACPI sleep button event to the guest.
6072 <result name="VBOX_E_INVALID_VM_STATE">
6073 Virtual machine not in Running state.
6074 </result>
6075 <result name="VBOX_E_PDM_ERROR">
6076 Sending sleep button event failed.
6077 </result>
6078 </desc>
6079 </method>
6080
6081 <method name="getPowerButtonHandled">
6082 <desc>Checks if the last power button event was handled by guest.
6083 <result name="VBOX_E_PDM_ERROR">
6084 Checking if the event was handled by the guest OS failed.
6085 </result>
6086 </desc>
6087 <param name="handled" type="boolean" dir="return"/>
6088 </method>
6089
6090 <method name="getGuestEnteredACPIMode">
6091 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6092 G1 (sleeping). If this method returns @c false, the guest will
6093 most likely not respond to external ACPI events.
6094 <result name="VBOX_E_INVALID_VM_STATE">
6095 Virtual machine not in Running state.
6096 </result>
6097 </desc>
6098 <param name="entered" type="boolean" dir="return"/>
6099 </method>
6100
6101 <method name="saveState">
6102 <desc>
6103 Saves the current execution state of a running virtual machine
6104 and stops its execution.
6105
6106 After this operation completes, the machine will go to the
6107 Saved state. Next time it is powered up, this state will
6108 be restored and the machine will continue its execution from
6109 the place where it was saved.
6110
6111 This operation differs from taking a snapshot to the effect
6112 that it doesn't create new differencing hard disks. Also, once
6113 the machine is powered up from the state saved using this method,
6114 the saved state is deleted, so it will be impossible to return
6115 to this state later.
6116
6117 <note>
6118 On success, this method implicitly calls
6119 <link to="IMachine::saveSettings"/> to save all current machine
6120 settings (including runtime changes to the DVD drive, etc.).
6121 Together with the impossibility to change any VM settings when it is
6122 in the Saved state, this guarantees adequate hardware
6123 configuration of the machine when it is restored from the saved
6124 state file.
6125 </note>
6126
6127 <note>
6128 The machine must be in the Running or Paused state, otherwise
6129 the operation will fail.
6130 </note>
6131 <result name="VBOX_E_INVALID_VM_STATE">
6132 Virtual machine state neither Running nor Paused.
6133 </result>
6134 <result name="VBOX_E_FILE_ERROR">
6135 Failed to create directory for saved state file.
6136 </result>
6137
6138 <see><link to="#takeSnapshot"/></see>
6139 </desc>
6140 <param name="progress" type="IProgress" dir="return">
6141 <desc>Progress object to track the operation completion.</desc>
6142 </param>
6143 </method>
6144
6145 <method name="adoptSavedState">
6146 <desc>
6147 Associates the given saved state file to the virtual machine.
6148
6149 On success, the machine will go to the Saved state. Next time it is
6150 powered up, it will be restored from the adopted saved state and
6151 continue execution from the place where the saved state file was
6152 created.
6153
6154 The specified saved state file path may be absolute or relative to the
6155 folder the VM normally saves the state to (usually,
6156 <link to="IMachine::snapshotFolder"/>).
6157
6158 <note>
6159 It's a caller's responsibility to make sure the given saved state
6160 file is compatible with the settings of this virtual machine that
6161 represent its virtual hardware (memory size, hard disk configuration
6162 etc.). If there is a mismatch, the behavior of the virtual machine
6163 is undefined.
6164 </note>
6165 <result name="VBOX_E_INVALID_VM_STATE">
6166 Virtual machine state neither PoweredOff nor Aborted.
6167 </result>
6168 </desc>
6169 <param name="savedStateFile" type="wstring" dir="in">
6170 <desc>Path to the saved state file to adopt.</desc>
6171 </param>
6172 </method>
6173
6174 <method name="forgetSavedState">
6175 <desc>
6176 Forgets the saved state of the virtual machine previously created
6177 by <link to="#saveState"/>. Next time the machine is powered up, a
6178 clean boot will occur. If @a remove is @c true the saved state file
6179 is deleted.
6180 <note>
6181 This operation is equivalent to resetting or powering off
6182 the machine without doing a proper shutdown in the guest OS.
6183 </note>
6184 <result name="VBOX_E_INVALID_VM_STATE">
6185 Virtual machine not in state Saved.
6186 </result>
6187 </desc>
6188 <param name="remove" type="boolean" dir="in">
6189 <desc>If @c true remove the saved state file.</desc>
6190 </param>
6191 </method>
6192
6193 <method name="getDeviceActivity">
6194 <desc>
6195 Gets the current activity type of a given device or device group.
6196 <result name="E_INVALIDARG">
6197 Invalid device type.
6198 </result>
6199 </desc>
6200 <param name="type" type="DeviceType" dir="in"/>
6201 <param name="activity" type="DeviceActivity" dir="return"/>
6202 </method>
6203
6204 <method name="attachUSBDevice">
6205 <desc>
6206 Attaches a host USB device with the given UUID to the
6207 USB controller of the virtual machine.
6208
6209 The device needs to be in one of the following states:
6210 <link to="USBDeviceState_Busy"/>,
6211 <link to="USBDeviceState_Available"/> or
6212 <link to="USBDeviceState_Held"/>,
6213 otherwise an error is immediately returned.
6214
6215 When the device state is
6216 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6217 be returned if the host computer refuses to release it for some reason.
6218
6219 <see>IUSBController::deviceFilters, USBDeviceState</see>
6220 <result name="VBOX_E_INVALID_VM_STATE">
6221 Virtual machine state neither Running nor Paused.
6222 </result>
6223 <result name="VBOX_E_PDM_ERROR">
6224 Virtual machine does not have a USB controller.
6225 </result>
6226 </desc>
6227 <param name="id" type="wstring" dir="in">
6228 <desc>UUID of the host USB device to attach.</desc>
6229 </param>
6230 </method>
6231
6232 <method name="detachUSBDevice">
6233 <desc>
6234 Detaches an USB device with the given UUID from the USB controller
6235 of the virtual machine.
6236
6237 After this method succeeds, the VirtualBox server re-initiates
6238 all USB filters as if the device were just physically attached
6239 to the host, but filters of this machine are ignored to avoid
6240 a possible automatic re-attachment.
6241
6242 <see>IUSBController::deviceFilters, USBDeviceState</see>
6243
6244 <result name="VBOX_E_PDM_ERROR">
6245 Virtual machine does not have a USB controller.
6246 </result>
6247 <result name="E_INVALIDARG">
6248 USB device not attached to this virtual machine.
6249 </result>
6250 </desc>
6251 <param name="id" type="wstring" dir="in">
6252 <desc>UUID of the USB device to detach.</desc>
6253 </param>
6254 <param name="device" type="IUSBDevice" dir="return">
6255 <desc>Detached USB device.</desc>
6256 </param>
6257 </method>
6258
6259 <method name="findUSBDeviceByAddress">
6260 <desc>
6261 Searches for a USB device with the given host address.
6262
6263 <result name="VBOX_E_OBJECT_NOT_FOUND">
6264 Given @c name does not correspond to any USB device.
6265 </result>
6266
6267 <see>IUSBDevice::address</see>
6268 </desc>
6269 <param name="name" type="wstring" dir="in">
6270 <desc>
6271 Address of the USB device (as assigned by the host) to
6272 search for.
6273 </desc>
6274 </param>
6275 <param name="device" type="IUSBDevice" dir="return">
6276 <desc>Found USB device object.</desc>
6277 </param>
6278 </method>
6279
6280 <method name="findUSBDeviceById">
6281 <desc>
6282 Searches for a USB device with the given UUID.
6283
6284 <result name="VBOX_E_OBJECT_NOT_FOUND">
6285 Given @c id does not correspond to any USB device.
6286 </result>
6287
6288 <see>IUSBDevice::id</see>
6289 </desc>
6290 <param name="id" type="wstring" dir="in">
6291 <desc>UUID of the USB device to search for.</desc>
6292 </param>
6293 <param name="device" type="IUSBDevice" dir="return">
6294 <desc>Found USB device object.</desc>
6295 </param>
6296 </method>
6297
6298 <method name="createSharedFolder">
6299 <desc>
6300 Creates a transient new shared folder by associating the given logical
6301 name with the given host path, adds it to the collection of shared
6302 folders and starts sharing it. Refer to the description of
6303 <link to="ISharedFolder"/> to read more about logical names.
6304
6305 <result name="VBOX_E_INVALID_VM_STATE">
6306 Virtual machine in Saved state or currently changing state.
6307 </result>
6308 <result name="VBOX_E_FILE_ERROR">
6309 Shared folder already exists or not accessible.
6310 </result>
6311 </desc>
6312 <param name="name" type="wstring" dir="in">
6313 <desc>Unique logical name of the shared folder.</desc>
6314 </param>
6315 <param name="hostPath" type="wstring" dir="in">
6316 <desc>Full path to the shared folder in the host file system.</desc>
6317 </param>
6318 <param name="writable" type="boolean" dir="in">
6319 <desc>Whether the share is writable or readonly</desc>
6320 </param>
6321 </method>
6322
6323 <method name="removeSharedFolder">
6324 <desc>
6325 Removes a transient shared folder with the given name previously
6326 created by <link to="#createSharedFolder"/> from the collection of
6327 shared folders and stops sharing it.
6328 <result name="VBOX_E_INVALID_VM_STATE">
6329 Virtual machine in Saved state or currently changing state.
6330 </result>
6331 <result name="VBOX_E_FILE_ERROR">
6332 Shared folder does not exists.
6333 </result>
6334 </desc>
6335 <param name="name" type="wstring" dir="in">
6336 <desc>Logical name of the shared folder to remove.</desc>
6337 </param>
6338 </method>
6339
6340 <method name="takeSnapshot">
6341 <desc>
6342 Saves the current execution state
6343 and all settings of the machine and creates differencing images
6344 for all normal (non-independent) hard disks.
6345 See <link to="ISnapshot" /> for an introduction to snapshots.
6346
6347 This method can be called for a PoweredOff, Saved (see
6348 <link to="#saveState"/>), Running or
6349 Paused virtual machine. When the machine is PoweredOff, an
6350 offline snapshot is created, an online snapshot otherwise.
6351
6352 The taken snapshot is always based on the
6353 <link to="IMachine::currentSnapshot">current snapshot</link>
6354 of the associated virtual machine and becomes a new current snapshot.
6355
6356 <note>
6357 This method implicitly calls <link to="IMachine::saveSettings"/> to
6358 save all current machine settings before taking an offline snapshot.
6359 </note>
6360
6361 <result name="VBOX_E_INVALID_VM_STATE">
6362 Virtual machine currently changing state.
6363 </result>
6364 </desc>
6365 <param name="name" type="wstring" dir="in">
6366 <desc>Short name for the snapshot.</desc>
6367 </param>
6368 <param name="description" type="wstring" dir="in">
6369 <desc>Optional description of the snapshot.</desc>
6370 </param>
6371 <param name="progress" type="IProgress" dir="return">
6372 <desc>Progress object to track the operation completion.</desc>
6373 </param>
6374 </method>
6375
6376 <method name="discardSnapshot">
6377 <desc>
6378 Starts discarding the specified snapshot asynchronously.
6379 See <link to="ISnapshot" /> for an introduction to snapshots.
6380
6381 The execution state
6382 and settings of the associated machine stored in the snapshot
6383 will be deleted. The contents of all differencing hard disks of
6384 this snapshot will be merged with the contents of their
6385 dependent child hard disks to keep the disks valid (in other
6386 words, all changes represented by hard disks being discarded
6387 will be propagated to their child hard disks). After that, this
6388 snapshot's differencing hard disks will be deleted. The parent
6389 of this snapshot will become a new parent for all its child
6390 snapshots.
6391
6392 If the discarded snapshot is the current one, its parent
6393 snapshot will become a new current snapshot. The current machine
6394 state is not directly affected in this case, except that
6395 currently attached differencing hard disks based on hard disks
6396 of the discarded snapshot will be also merged as described
6397 above.
6398
6399 If the discarded snapshot is the first one (the root snapshot)
6400 and it has exactly one child snapshot, this child snapshot will
6401 become the first snapshot after discarding. If there are no
6402 children at all (i.e. the first snapshot is the only snapshot of
6403 the machine), both the current and the first snapshot of the
6404 machine will be set to @c null. In all other cases, the first
6405 snapshot cannot be discarded.
6406
6407 You cannot discard the snapshot if it
6408 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6409 hard disks that have differencing hard disks based on them. Snapshots of
6410 such kind can be discarded only when every normal hard disk has either
6411 no children at all or exactly one child. In the former case, the normal
6412 hard disk simply becomes unused (i.e. not attached to any VM). In the
6413 latter case, it receives all the changes stored in the child hard disk,
6414 and then it replaces the child hard disk in the configuration of the
6415 corresponding snapshot or machine.
6416
6417 Also, you cannot discard the snapshot if it stores hard disks
6418 (of any type) having differencing child hard disks that belong
6419 to other machines. Such snapshots can be only discarded after
6420 you discard all snapshots of other machines containing "foreign"
6421 child disks, or detach these "foreign" child disks from machines
6422 they are attached to.
6423
6424 One particular example of the snapshot storing normal hard disks
6425 is the first snapshot of a virtual machine that had normal hard
6426 disks attached when taking the snapshot. Be careful when
6427 discarding such snapshots because this implicitly commits
6428 changes (made since the snapshot being discarded has been taken)
6429 to normal hard disks (as described above), which may be not what
6430 you want.
6431
6432 The virtual machine is put to
6433 the <link to="MachineState_Discarding">Discarding</link> state until
6434 the discard operation is completed.
6435
6436 <note>
6437 The machine must not be running, otherwise the operation
6438 will fail.
6439 </note>
6440
6441 <note>
6442 Child hard disks of all normal hard disks of the discarded snapshot
6443 must be accessible (see <link to="IMedium::state"/>) for this
6444 operation to succeed. In particular, this means that all virtual
6445 machines, whose hard disks are directly or indirectly based on the
6446 hard disks of discarded snapshot, must be powered off.
6447 </note>
6448 <note>
6449 Merging hard disk contents can be very time and disk space
6450 consuming, if these disks are big in size and have many
6451 children. However, if the snapshot being discarded is the last
6452 (head) snapshot on the branch, the operation will be rather
6453 quick.
6454 </note>
6455 <note>
6456 Note that discarding the current snapshot
6457 will implicitly call <link to="IMachine::saveSettings"/> to
6458 make all current machine settings permanent.
6459 </note>
6460 <result name="VBOX_E_INVALID_VM_STATE">
6461 Virtual machine is running.
6462 </result>
6463 </desc>
6464 <param name="id" type="wstring" dir="in">
6465 <desc>UUID of the snapshot to discard.</desc>
6466 </param>
6467 <param name="progress" type="IProgress" dir="return">
6468 <desc>Progress object to track the operation completion.</desc>
6469 </param>
6470 </method>
6471
6472 <method name="discardCurrentState">
6473 <desc>
6474 Starts resetting the machine's current state to the state contained
6475 in the current snapshot, asynchronously. All current settings of the
6476 machine will be reset and changes stored in differencing hard disks
6477 will be lost.
6478 See <link to="ISnapshot" /> for an introduction to snapshots.
6479
6480 After this operation is successfully completed, new empty differencing
6481 hard disks are created for all normal hard disks of the machine.
6482
6483 If the current snapshot of the machine is an online snapshot, the
6484 machine will go to the <link to="MachineState_Saved"> saved
6485 state</link>, so that the next time it is powered on, the execution
6486 state will be restored from the current snapshot.
6487
6488 <note>
6489 The machine must not be running, otherwise the operation will fail.
6490 </note>
6491
6492 <note>
6493 If the machine state is <link to="MachineState_Saved">Saved</link>
6494 prior to this operation, the saved state file will be implicitly
6495 discarded (as if <link to="IConsole::forgetSavedState"/> were
6496 called).
6497 </note>
6498
6499 <result name="VBOX_E_INVALID_VM_STATE">
6500 Virtual machine is running.
6501 </result>
6502 </desc>
6503 <param name="progress" type="IProgress" dir="return">
6504 <desc>Progress object to track the operation completion.</desc>
6505 </param>
6506 </method>
6507
6508 <method name="discardCurrentSnapshotAndState">
6509 <desc>
6510
6511 This method is equivalent to
6512 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6513 (currentSnapshot.id(), progress) followed by
6514 <link to="IConsole::discardCurrentState"/>.
6515
6516 As a result, the machine will be fully restored from the
6517 snapshot preceding the current snapshot, while both the current
6518 snapshot and the current machine state will be discarded.
6519
6520 If the current snapshot is the first snapshot of the machine (i.e. it
6521 has the only snapshot), the current machine state will be
6522 discarded <b>before</b> discarding the snapshot. In other words, the
6523 machine will be restored from its last snapshot, before discarding
6524 it. This differs from performing a single
6525 <link to="IConsole::discardSnapshot"/> call (note that no
6526 <link to="IConsole::discardCurrentState"/> will be possible after it)
6527 to the effect that the latter will preserve the current state instead of
6528 discarding it.
6529
6530 Unless explicitly mentioned otherwise, all remarks and
6531 limitations of the above two methods also apply to this method.
6532
6533 <note>
6534 The machine must not be running, otherwise the operation
6535 will fail.
6536 </note>
6537
6538 <note>
6539 If the machine state is <link to="MachineState_Saved">Saved</link>
6540 prior to this operation, the saved state file will be implicitly
6541 discarded (as if <link to="#forgetSavedState"/> were
6542 called).
6543 </note>
6544
6545 <note>
6546 This method is more efficient than calling both of the above
6547 methods separately: it requires less IPC calls and provides
6548 a single progress object.
6549 </note>
6550
6551 <result name="VBOX_E_INVALID_VM_STATE">
6552 Virtual machine is running.
6553 </result>
6554 </desc>
6555 <param name="progress" type="IProgress" dir="return">
6556 <desc>Progress object to track the operation completion.</desc>
6557 </param>
6558 </method>
6559
6560 <method name="registerCallback">
6561 <desc>
6562 Registers a new console callback on this instance. The methods of the
6563 callback interface will be called by this instance when the appropriate
6564 event occurs.
6565 </desc>
6566 <param name="callback" type="IConsoleCallback" dir="in"/>
6567 </method>
6568
6569 <method name="unregisterCallback">
6570 <desc>
6571 Unregisters the console callback previously registered using
6572 <link to="#registerCallback"/>.
6573 <result name="E_INVALIDARG">
6574 Given @a callback handler is not registered.
6575 </result>
6576 </desc>
6577 <param name="callback" type="IConsoleCallback" dir="in"/>
6578 </method>
6579 </interface>
6580
6581 <!--
6582 // IHost
6583 /////////////////////////////////////////////////////////////////////////
6584 -->
6585
6586 <interface
6587 name="IHostDVDDrive" extends="$unknown"
6588 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6589 wsmap="managed"
6590 >
6591 <desc>
6592 The IHostDVDDrive interface represents the physical CD/DVD drive
6593 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6594 </desc>
6595
6596 <attribute name="name" type="wstring" readonly="yes">
6597 <desc>
6598 Returns the platform-specific device identifier.
6599 On DOS-like platforms, it is a drive name (e.g. R:).
6600 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6601 </desc>
6602 </attribute>
6603 <attribute name="description" type="wstring" readonly="yes">
6604 <desc>
6605 Returns a human readable description for the drive. This
6606 description usually contains the product and vendor name. An
6607 empty string is returned if the description is not available.
6608 </desc>
6609 </attribute>
6610 <attribute name="udi" type="wstring" readonly="yes">
6611 <desc>
6612 Returns the unique device identifier for the drive. This
6613 attribute is reserved for future use instead of
6614 <link to="#name"/>. Currently it is not used and may return
6615 an empty string on some platforms.
6616 </desc>
6617 </attribute>
6618
6619 </interface>
6620
6621 <interface
6622 name="IHostFloppyDrive" extends="$unknown"
6623 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6624 wsmap="managed"
6625 >
6626 <desc>
6627 The IHostFloppyDrive interface represents the physical floppy drive
6628 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6629 </desc>
6630 <attribute name="name" type="wstring" readonly="yes">
6631 <desc>
6632 Returns the platform-specific device identifier.
6633 On DOS-like platforms, it is a drive name (e.g. A:).
6634 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6635 </desc>
6636 </attribute>
6637 <attribute name="description" type="wstring" readonly="yes">
6638 <desc>
6639 Returns a human readable description for the drive. This
6640 description usually contains the product and vendor name. An
6641 empty string is returned if the description is not available.
6642 </desc>
6643 </attribute>
6644 <attribute name="udi" type="wstring" readonly="yes">
6645 <desc>
6646 Returns the unique device identifier for the drive. This
6647 attribute is reserved for future use instead of
6648 <link to="#name"/>. Currently it is not used and may return
6649 an empty string on some platforms.
6650 </desc>
6651 </attribute>
6652 </interface>
6653
6654 <enum
6655 name="HostNetworkInterfaceMediumType"
6656 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6657 >
6658 <desc>
6659 Type of encapsulation. Ethernet encapsulation includes both wired and
6660 wireless Ethernet connections.
6661 <see>IHostNetworkInterface</see>
6662 </desc>
6663
6664 <const name="Unknown" value="0">
6665 <desc>
6666 The type of interface cannot be determined.
6667 </desc>
6668 </const>
6669 <const name="Ethernet" value="1">
6670 <desc>
6671 Ethernet frame encapsulation.
6672 </desc>
6673 </const>
6674 <const name="PPP" value="2">
6675 <desc>
6676 Point-to-point protocol encapsulation.
6677 </desc>
6678 </const>
6679 <const name="SLIP" value="3">
6680 <desc>
6681 Serial line IP encapsulation.
6682 </desc>
6683 </const>
6684 </enum>
6685
6686 <enum
6687 name="HostNetworkInterfaceStatus"
6688 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6689 >
6690 <desc>
6691 Current status of the interface.
6692 <see>IHostNetworkInterface</see>
6693 </desc>
6694
6695 <const name="Unknown" value="0">
6696 <desc>
6697 The state of interface cannot be determined.
6698 </desc>
6699 </const>
6700 <const name="Up" value="1">
6701 <desc>
6702 The interface is fully operational.
6703 </desc>
6704 </const>
6705 <const name="Down" value="2">
6706 <desc>
6707 The interface is not functioning.
6708 </desc>
6709 </const>
6710 </enum>
6711
6712 <enum
6713 name="HostNetworkInterfaceType"
6714 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6715 >
6716 <desc>
6717 Network interface type.
6718 </desc>
6719 <const name="Bridged" value="1"/>
6720 <const name="HostOnly" value="2"/>
6721 </enum>
6722
6723 <interface
6724 name="IHostNetworkInterface" extends="$unknown"
6725 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6726 wsmap="managed"
6727 >
6728 <desc>
6729 Represents one of host's network interfaces. IP V6 address and network
6730 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6731 separated by colons.
6732 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6733 </desc>
6734 <attribute name="name" type="wstring" readonly="yes">
6735 <desc>Returns the host network interface name.</desc>
6736 </attribute>
6737
6738 <attribute name="id" type="wstring" readonly="yes">
6739 <desc>Returns the interface UUID.</desc>
6740 </attribute>
6741
6742 <attribute name="networkName" type="wstring" readonly="yes">
6743 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6744 </attribute>
6745
6746 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6747 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6748 </attribute>
6749
6750 <attribute name="IPAddress" type="wstring" readonly="yes">
6751 <desc>Returns the IP V4 address of the interface.</desc>
6752 </attribute>
6753
6754 <attribute name="networkMask" type="wstring" readonly="yes">
6755 <desc>Returns the network mask of the interface.</desc>
6756 </attribute>
6757
6758 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6759 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6760 </attribute>
6761
6762 <attribute name="IPV6Address" type="wstring" readonly="yes">
6763 <desc>Returns the IP V6 address of the interface.</desc>
6764 </attribute>
6765
6766 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6767 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6768 </attribute>
6769
6770 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6771 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6772 </attribute>
6773
6774 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6775 <desc>Type of protocol encapsulation used.</desc>
6776 </attribute>
6777
6778 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6779 <desc>Status of the interface.</desc>
6780 </attribute>
6781
6782 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6783 <desc>specifies the host interface type.</desc>
6784 </attribute>
6785
6786 <method name="enableStaticIpConfig">
6787 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6788 <param name="IPAddress" type="wstring" dir="in">
6789 <desc>
6790 IP address.
6791 </desc>
6792 </param>
6793 <param name="networkMask" type="wstring" dir="in">
6794 <desc>
6795 network mask.
6796 </desc>
6797 </param>
6798 </method>
6799
6800 <method name="enableStaticIpConfigV6">
6801 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6802 <param name="IPV6Address" type="wstring" dir="in">
6803 <desc>
6804 IP address.
6805 </desc>
6806 </param>
6807 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6808 <desc>
6809 network mask.
6810 </desc>
6811 </param>
6812 </method>
6813
6814 <method name="enableDynamicIpConfig">
6815 <desc>enables the dynamic IP configuration.</desc>
6816 </method>
6817
6818 <method name="dhcpRediscover">
6819 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6820 </method>
6821
6822 </interface>
6823
6824 <interface
6825 name="IHost" extends="$unknown"
6826 uuid="4129f721-30cc-4f5a-bbed-0614ce4c2cb4"
6827 wsmap="managed"
6828 >
6829 <desc>
6830 The IHost interface represents the physical machine that this VirtualBox
6831 installation runs on.
6832
6833 An object implementing this interface is returned by the
6834 <link to="IVirtualBox::host" /> attribute. This interface contains
6835 read-only information about the host's physical hardware (such as what
6836 processors and disks are available, what the host operating system is,
6837 and so on) and also allows for manipulating some of the host's hardware,
6838 such as global USB device filters and host interface networking.
6839
6840 </desc>
6841 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6842 <desc>List of DVD drives available on the host.</desc>
6843 </attribute>
6844
6845 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6846 <desc>List of floppy drives available on the host.</desc>
6847 </attribute>
6848
6849 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6850 <desc>
6851 List of USB devices currently attached to the host.
6852 Once a new device is physically attached to the host computer,
6853 it appears in this list and remains there until detached.
6854
6855 <note>
6856 If USB functionality is not available in the given edition of
6857 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6858 </note>
6859 </desc>
6860 </attribute>
6861
6862 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6863 <desc>
6864 List of USB device filters in action.
6865 When a new device is physically attached to the host computer,
6866 filters from this list are applied to it (in order they are stored
6867 in the list). The first matched filter will determine the
6868 <link to="IHostUSBDeviceFilter::action">action</link>
6869 performed on the device.
6870
6871 Unless the device is ignored by these filters, filters of all
6872 currently running virtual machines
6873 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6874
6875 <note>
6876 If USB functionality is not available in the given edition of
6877 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6878 </note>
6879
6880 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6881 </desc>
6882 </attribute>
6883
6884 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6885 <desc>List of host network interfaces currently defined on the host.</desc>
6886 </attribute>
6887
6888 <attribute name="processorCount" type="unsigned long" readonly="yes">
6889 <desc>Number of (logical) CPUs installed in the host system.</desc>
6890 </attribute>
6891
6892 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6893 <desc>Number of (logical) CPUs online in the host system.</desc>
6894 </attribute>
6895
6896 <method name="getProcessorSpeed">
6897 <desc>Query the (approximate) maximum speed of a specified host CPU in
6898 Megahertz.
6899 </desc>
6900 <param name="cpuId" type="unsigned long" dir="in">
6901 <desc>
6902 Identifier of the CPU.
6903 </desc>
6904 </param>
6905 <param name="speed" type="unsigned long" dir="return">
6906 <desc>
6907 Speed value. 0 is returned if value is not known or @a cpuId is
6908 invalid.
6909 </desc>
6910 </param>
6911 </method>
6912
6913 <method name="getProcessorFeature">
6914 <desc>Query whether a CPU feature is supported or not.</desc>
6915 <param name="feature" type="ProcessorFeature" dir="in">
6916 <desc>
6917 CPU Feature identifier.
6918 </desc>
6919 </param>
6920 <param name="supported" type="boolean" dir="return">
6921 <desc>
6922 Feature is supported or not.
6923 </desc>
6924 </param>
6925 </method>
6926
6927 <method name="getProcessorDescription">
6928 <desc>Query the model string of a specified host CPU.
6929 </desc>
6930 <param name="cpuId" type="unsigned long" dir="in">
6931 <desc>
6932 Identifier of the CPU.
6933 </desc>
6934 </param>
6935 <param name="description" type="wstring" dir="return">
6936 <desc>
6937 Model string. An empty string is returned if value is not known or
6938 @a cpuId is invalid.
6939 </desc>
6940 </param>
6941 </method>
6942
6943 <attribute name="memorySize" type="unsigned long" readonly="yes">
6944 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6945 </attribute>
6946
6947 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6948 <desc>Available system memory in the host system.</desc>
6949 </attribute>
6950
6951 <attribute name="operatingSystem" type="wstring" readonly="yes">
6952 <desc>Name of the host system's operating system.</desc>
6953 </attribute>
6954
6955 <attribute name="OSVersion" type="wstring" readonly="yes">
6956 <desc>Host operating system's version string.</desc>
6957 </attribute>
6958
6959 <attribute name="UTCTime" type="long long" readonly="yes">
6960 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6961 </attribute>
6962
6963 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
6964 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
6965 </attribute>
6966
6967 <method name="createHostOnlyNetworkInterface">
6968 <desc>
6969 Creates a new adapter for Host Only Networking.
6970 <result name="E_INVALIDARG">
6971 Host network interface @a name already exists.
6972 </result>
6973 </desc>
6974 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6975 <desc>
6976 Created host interface object.
6977 </desc>
6978 </param>
6979 <param name="progress" type="IProgress" dir="return">
6980 <desc>
6981 Progress object to track the operation completion.
6982 </desc>
6983 </param>
6984 </method>
6985
6986 <method name="removeHostOnlyNetworkInterface">
6987 <desc>
6988 Removes the given Host Only Networking interface.
6989 <result name="VBOX_E_OBJECT_NOT_FOUND">
6990 No host network interface matching @a id found.
6991 </result>
6992 </desc>
6993 <param name="id" type="wstring" dir="in">
6994 <desc>
6995 Adapter GUID.
6996 </desc>
6997 </param>
6998 <param name="progress" type="IProgress" dir="return">
6999 <desc>
7000 Progress object to track the operation completion.
7001 </desc>
7002 </param>
7003 </method>
7004
7005 <method name="createUSBDeviceFilter">
7006 <desc>
7007 Creates a new USB device filter. All attributes except
7008 the filter name are set to empty (any match),
7009 <i>active</i> is @c false (the filter is not active).
7010
7011 The created filter can be added to the list of filters using
7012 <link to="#insertUSBDeviceFilter"/>.
7013
7014 <see>#USBDeviceFilters</see>
7015 </desc>
7016 <param name="name" type="wstring" dir="in">
7017 <desc>
7018 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7019 for more info.
7020 </desc>
7021 </param>
7022 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7023 <desc>Created filter object.</desc>
7024 </param>
7025 </method>
7026
7027 <method name="insertUSBDeviceFilter">
7028 <desc>
7029 Inserts the given USB device to the specified position
7030 in the list of filters.
7031
7032 Positions are numbered starting from @c 0. If the specified
7033 position is equal to or greater than the number of elements in
7034 the list, the filter is added at the end of the collection.
7035
7036 <note>
7037 Duplicates are not allowed, so an attempt to insert a
7038 filter already in the list is an error.
7039 </note>
7040 <note>
7041 If USB functionality is not available in the given edition of
7042 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7043 </note>
7044
7045 <see>#USBDeviceFilters</see>
7046
7047 <result name="VBOX_E_INVALID_OBJECT_STATE">
7048 USB device filter is not created within this VirtualBox instance.
7049 </result>
7050 <result name="E_INVALIDARG">
7051 USB device filter already in list.
7052 </result>
7053
7054 </desc>
7055 <param name="position" type="unsigned long" dir="in">
7056 <desc>Position to insert the filter to.</desc>
7057 </param>
7058 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7059 <desc>USB device filter to insert.</desc>
7060 </param>
7061 </method>
7062
7063 <method name="removeUSBDeviceFilter">
7064 <desc>
7065 Removes a USB device filter from the specified position in the
7066 list of filters.
7067
7068 Positions are numbered starting from @c 0. Specifying a
7069 position equal to or greater than the number of elements in
7070 the list will produce an error.
7071
7072 <note>
7073 If USB functionality is not available in the given edition of
7074 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7075 </note>
7076
7077 <see>#USBDeviceFilters</see>
7078
7079 <result name="E_INVALIDARG">
7080 USB device filter list empty or invalid @a position.
7081 </result>
7082
7083 </desc>
7084 <param name="position" type="unsigned long" dir="in">
7085 <desc>Position to remove the filter from.</desc>
7086 </param>
7087 </method>
7088
7089 <method name="findHostDVDDrive">
7090 <desc>
7091 Searches for a host DVD drive with the given @c name.
7092
7093 <result name="VBOX_E_OBJECT_NOT_FOUND">
7094 Given @c name does not correspond to any host drive.
7095 </result>
7096
7097 </desc>
7098 <param name="name" type="wstring" dir="in">
7099 <desc>Name of the host drive to search for</desc>
7100 </param>
7101 <param name="drive" type="IHostDVDDrive" dir="return">
7102 <desc>Found host drive object</desc>
7103 </param>
7104 </method>
7105
7106 <method name="findHostFloppyDrive">
7107 <desc>
7108 Searches for a host floppy drive with the given @c name.
7109
7110 <result name="VBOX_E_OBJECT_NOT_FOUND">
7111 Given @c name does not correspond to any host floppy drive.
7112 </result>
7113
7114 </desc>
7115 <param name="name" type="wstring" dir="in">
7116 <desc>Name of the host floppy drive to search for</desc>
7117 </param>
7118 <param name="drive" type="IHostFloppyDrive" dir="return">
7119 <desc>Found host floppy drive object</desc>
7120 </param>
7121 </method>
7122
7123 <method name="findHostNetworkInterfaceByName">
7124 <desc>
7125 Searches through all host network interfaces for an interface with
7126 the given @c name.
7127 <note>
7128 The method returns an error if the given @c name does not
7129 correspond to any host network interface.
7130 </note>
7131 </desc>
7132 <param name="name" type="wstring" dir="in">
7133 <desc>Name of the host network interface to search for.</desc>
7134 </param>
7135 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7136 <desc>Found host network interface object.</desc>
7137 </param>
7138 </method>
7139 <method name="findHostNetworkInterfaceById">
7140 <desc>
7141 Searches through all host network interfaces for an interface with
7142 the given GUID.
7143 <note>
7144 The method returns an error if the given GUID does not
7145 correspond to any host network interface.
7146 </note>
7147 </desc>
7148 <param name="id" type="wstring" dir="in">
7149 <desc>GUID of the host network interface to search for.</desc>
7150 </param>
7151 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7152 <desc>Found host network interface object.</desc>
7153 </param>
7154 </method>
7155 <method name="findHostNetworkInterfacesOfType">
7156 <desc>
7157 Searches through all host network interfaces and returns a list of interfaces of the specified type
7158 </desc>
7159 <param name="type" type="HostNetworkInterfaceType" dir="in">
7160 <desc>type of the host network interfaces to search for.</desc>
7161 </param>
7162 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7163 <desc>Found host network interface objects.</desc>
7164 </param>
7165 </method>
7166
7167 <method name="findUSBDeviceById">
7168 <desc>
7169 Searches for a USB device with the given UUID.
7170
7171 <result name="VBOX_E_OBJECT_NOT_FOUND">
7172 Given @c id does not correspond to any USB device.
7173 </result>
7174
7175 <see>IHostUSBDevice::id</see>
7176 </desc>
7177 <param name="id" type="wstring" dir="in">
7178 <desc>UUID of the USB device to search for.</desc>
7179 </param>
7180 <param name="device" type="IHostUSBDevice" dir="return">
7181 <desc>Found USB device object.</desc>
7182 </param>
7183 </method>
7184
7185 <method name="findUSBDeviceByAddress">
7186 <desc>
7187 Searches for a USB device with the given host address.
7188
7189 <result name="VBOX_E_OBJECT_NOT_FOUND">
7190 Given @c name does not correspond to any USB device.
7191 </result>
7192
7193 <see>IHostUSBDevice::address</see>
7194 </desc>
7195 <param name="name" type="wstring" dir="in">
7196 <desc>
7197 Address of the USB device (as assigned by the host) to
7198 search for.
7199 </desc>
7200 </param>
7201 <param name="device" type="IHostUSBDevice" dir="return">
7202 <desc>Found USB device object.</desc>
7203 </param>
7204 </method>
7205
7206 </interface>
7207
7208 <!--
7209 // ISystemProperties
7210 /////////////////////////////////////////////////////////////////////////
7211 -->
7212
7213 <interface
7214 name="ISystemProperties"
7215 extends="$unknown"
7216 uuid="9ca0f712-83f3-4631-b143-b75ef6568332"
7217 wsmap="managed"
7218 >
7219 <desc>
7220 The ISystemProperties interface represents global properties of the given
7221 VirtualBox installation.
7222
7223 These properties define limits and default values for various attributes
7224 and parameters. Most of the properties are read-only, but some can be
7225 changed by a user.
7226 </desc>
7227
7228 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7229 <desc>Minimum guest system memory in Megabytes.</desc>
7230 </attribute>
7231
7232 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7233 <desc>Maximum guest system memory in Megabytes.</desc>
7234 </attribute>
7235
7236 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7237 <desc>Minimum guest video memory in Megabytes.</desc>
7238 </attribute>
7239
7240 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7241 <desc>Maximum guest video memory in Megabytes.</desc>
7242 </attribute>
7243
7244 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7245 <desc>Minimum CPU count.</desc>
7246 </attribute>
7247
7248 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7249 <desc>Maximum CPU count.</desc>
7250 </attribute>
7251
7252 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7253 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7254 </attribute>
7255
7256 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7257 <desc>
7258 Number of network adapters associated with every
7259 <link to="IMachine"/> instance.
7260 </desc>
7261 </attribute>
7262
7263 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7264 <desc>
7265 Number of serial ports associated with every
7266 <link to="IMachine"/> instance.
7267 </desc>
7268 </attribute>
7269
7270 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7271 <desc>
7272 Number of parallel ports associated with every
7273 <link to="IMachine"/> instance.
7274 </desc>
7275 </attribute>
7276
7277 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7278 <desc>
7279 Maximum device position in the boot order. This value corresponds
7280 to the total number of devices a machine can boot from, to make it
7281 possible to include all possible devices to the boot list.
7282 <see><link to="IMachine::setBootOrder"/></see>
7283 </desc>
7284 </attribute>
7285
7286 <attribute name="defaultMachineFolder" type="wstring">
7287 <desc>
7288 Full path to the default directory used to create new or open
7289 existing machines when a settings file name contains no
7290 path.
7291
7292 The initial value of this property is
7293 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7294 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7295
7296 <note>
7297 Setting this property to @c null or an empty string will restore the
7298 initial value.
7299 </note>
7300 <note>
7301 When settings this property, the specified path can be
7302 absolute (full path) or relative
7303 to the <link to="IVirtualBox::homeFolder">
7304 VirtualBox home directory</link>.
7305 When reading this property, a full path is
7306 always returned.
7307 </note>
7308 <note>
7309 The specified path may not exist, it will be created
7310 when necessary.
7311 </note>
7312
7313 <see>
7314 <link to="IVirtualBox::createMachine"/>,
7315 <link to="IVirtualBox::openMachine"/>
7316 </see>
7317 </desc>
7318 </attribute>
7319
7320 <attribute name="defaultHardDiskFolder" type="wstring">
7321 <desc>
7322 Full path to the default directory used to create new or open existing
7323 virtual disks.
7324
7325 This path is used when the storage unit of a hard disk is a regular file
7326 in the host's file system and only a file name that contains no path is
7327 given.
7328
7329 The initial value of this property is
7330 <tt>&lt;</tt>
7331 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7332 <tt>&gt;/HardDisks</tt>.
7333
7334 <note>
7335 Setting this property to @c null or empty string will restore the
7336 initial value.
7337 </note>
7338 <note>
7339 When settings this property, the specified path can be relative
7340 to the
7341 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7342 absolute. When reading this property, a full path is
7343 always returned.
7344 </note>
7345 <note>
7346 The specified path may not exist, it will be created
7347 when necessary.
7348 </note>
7349
7350 <see>
7351 IHardDisk,
7352 <link to="IVirtualBox::createHardDisk"/>,
7353 <link to="IVirtualBox::openHardDisk"/>,
7354 <link to="IMedium::location"/>
7355 </see>
7356 </desc>
7357 </attribute>
7358
7359 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7360 <desc>
7361 List of all hard disk storage formats supported by this VirtualBox
7362 installation.
7363
7364 Keep in mind that the hard disk format identifier
7365 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7366 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7367 hard disk format is a case-insensitive string. This means that, for
7368 example, all of the following strings:
7369 <pre>
7370 "VDI"
7371 "vdi"
7372 "VdI"</pre>
7373 refer to the same hard disk format.
7374
7375 Note that the virtual hard disk framework is backend-based, therefore
7376 the list of supported formats depends on what backends are currently
7377 installed.
7378
7379 <see>
7380 <link to="IHardDiskFormat"/>,
7381 </see>
7382 </desc>
7383 </attribute>
7384
7385 <attribute name="defaultHardDiskFormat" type="wstring">
7386 <desc>
7387 Identifier of the default hard disk format used by VirtualBox.
7388
7389 The hard disk format set by this attribute is used by VirtualBox
7390 when the hard disk format was not specified explicitly. One example is
7391 <link to="IVirtualBox::createHardDisk"/> with the empty
7392 format argument. A more complex example is implicit creation of
7393 differencing hard disks when taking a snapshot of a virtual machine:
7394 this operation will try to use a format of the parent hard disk first
7395 and if this format does not support differencing hard disks the default
7396 format specified by this argument will be used.
7397
7398 The list of supported hard disk formats may be obtained by the
7399 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7400 format must have a capability to create differencing hard disks;
7401 otherwise opeartions that create hard disks implicitly may fail
7402 unexpectedly.
7403
7404 The initial value of this property is <tt>"VDI"</tt> in the current
7405 version of the VirtualBox product, but may change in the future.
7406
7407 <note>
7408 Setting this property to @c null or empty string will restore the
7409 initial value.
7410 </note>
7411
7412 <see>
7413 <link to="#hardDiskFormats"/>,
7414 <link to="IHardDiskFormat::id"/>,
7415 <link to="IVirtualBox::createHardDisk"/>
7416 </see>
7417 </desc>
7418 </attribute>
7419
7420 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7421 <desc>
7422 Library that provides authentication for VRDP clients. The library
7423 is used if a virtual machine's authentication type is set to "external"
7424 in the VM RemoteDisplay configuration.
7425
7426 The system library extension (".DLL" or ".so") must be omitted.
7427 A full path can be specified; if not, then the library must reside on the
7428 system's default library path.
7429
7430 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7431 of that name in one of the default VirtualBox library directories.
7432
7433 For details about VirtualBox authentication libraries and how to implement
7434 them, please refer to the VirtualBox manual.
7435
7436 <note>
7437 Setting this property to @c null or empty string will restore the
7438 initial value.
7439 </note>
7440 </desc>
7441 </attribute>
7442
7443 <attribute name="webServiceAuthLibrary" type="wstring">
7444 <desc>
7445 Library that provides authentication for webservice clients. The library
7446 is used if a virtual machine's authentication type is set to "external"
7447 in the VM RemoteDisplay configuration and will be called from
7448 within the <link to="IWebsessionManager::logon" /> implementation.
7449
7450 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7451 there is no per-VM setting for this, as the webservice is a global
7452 resource (if it is running). Only for this setting (for the webservice),
7453 setting this value to a literal <tt>"null"</tt> string disables authentication,
7454 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7455 no matter what user name and password are supplied.
7456
7457 The initial value of this property is <tt>"VRDPAuth"</tt>,
7458 meaning that the webservice will use the same authentication
7459 library that is used by default for VBoxVRDP (again, see
7460 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7461 The format and calling convention of authentication libraries
7462 is the same for the webservice as it is for VBoxVRDP.
7463
7464 <note>
7465 Setting this property to @c null or empty string will restore the
7466 initial value.
7467 </note>
7468 </desc>
7469 </attribute>
7470
7471 <attribute name="LogHistoryCount" type="unsigned long">
7472 <desc>
7473 This value specifies how many old release log files are kept.
7474 </desc>
7475 </attribute>
7476
7477 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7478 <desc>This value hold the default audio driver for the current
7479 system.</desc>
7480 </attribute>
7481 </interface>
7482
7483 <!--
7484 // IGuest
7485 /////////////////////////////////////////////////////////////////////////
7486 -->
7487
7488 <interface
7489 name="IGuestOSType" extends="$unknown"
7490 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7491 wsmap="struct"
7492 >
7493 <desc>
7494 </desc>
7495
7496 <attribute name="familyId" type="wstring" readonly="yes">
7497 <desc>Guest OS family identifier string.</desc>
7498 </attribute>
7499
7500 <attribute name="familyDescription" type="wstring" readonly="yes">
7501 <desc>Human readable description of the guest OS family.</desc>
7502 </attribute>
7503
7504 <attribute name="id" type="wstring" readonly="yes">
7505 <desc>Guest OS identifier string.</desc>
7506 </attribute>
7507
7508 <attribute name="description" type="wstring" readonly="yes">
7509 <desc>Human readable description of the guest OS.</desc>
7510 </attribute>
7511
7512 <attribute name="is64Bit" type="boolean" readonly="yes">
7513 <desc>Returns @c true if the given OS is 64-bit</desc>
7514 </attribute>
7515
7516 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7517 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7518 </attribute>
7519
7520 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7521 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7522 </attribute>
7523
7524 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7525 <desc>Recommended RAM size in Megabytes.</desc>
7526 </attribute>
7527
7528 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7529 <desc>Recommended video RAM size in Megabytes.</desc>
7530 </attribute>
7531
7532 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7533 <desc>Recommended hard disk size in Megabytes.</desc>
7534 </attribute>
7535
7536 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7537 <desc>Returns recommended network adapter for this OS type.</desc>
7538 </attribute>
7539 </interface>
7540
7541 <interface
7542 name="IGuest" extends="$unknown"
7543 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7544 wsmap="managed"
7545 >
7546 <desc>
7547 The IGuest interface represents information about the operating system
7548 running inside the virtual machine. Used in
7549 <link to="IConsole::guest"/>.
7550
7551 IGuest provides information about the guest operating system, whether
7552 Guest Additions are installed and other OS-specific virtual machine
7553 properties.
7554 </desc>
7555
7556 <attribute name="OSTypeId" type="wstring" readonly="yes">
7557 <desc>
7558 Identifier of the Guest OS type as reported by the Guest
7559 Additions.
7560 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7561 an IGuestOSType object representing details about the given
7562 Guest OS type.
7563 <note>
7564 If Guest Additions are not installed, this value will be
7565 the same as <link to="IMachine::OSTypeId"/>.
7566 </note>
7567 </desc>
7568 </attribute>
7569
7570 <attribute name="additionsActive" type="boolean" readonly="yes">
7571 <desc>
7572 Flag whether the Guest Additions are installed and active
7573 in which case their version will be returned by the
7574 <link to="#additionsVersion"/> property.
7575 </desc>
7576 </attribute>
7577
7578 <attribute name="additionsVersion" type="wstring" readonly="yes">
7579 <desc>
7580 Version of the Guest Additions (3 decimal numbers separated
7581 by dots) or empty when the Additions are not installed. The
7582 Additions may also report a version but yet not be active as
7583 the version might be refused by VirtualBox (incompatible) or
7584 other failures occurred.
7585 </desc>
7586 </attribute>
7587
7588 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7589 <desc>
7590 Flag whether seamless guest display rendering (seamless desktop
7591 integration) is supported.
7592 </desc>
7593 </attribute>
7594
7595 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7596 <desc>
7597 Flag whether the guest is in graphics mode. If it is not, then
7598 seamless rendering will not work, resize hints are not immediately
7599 acted on and guest display resizes are probably not initiated by
7600 the guest additions.
7601 </desc>
7602 </attribute>
7603
7604 <attribute name="memoryBalloonSize" type="unsigned long">
7605 <desc>Guest system memory balloon size in megabytes.</desc>
7606 </attribute>
7607
7608 <attribute name="statisticsUpdateInterval" type="unsigned long">
7609 <desc>Interval to update guest statistics in seconds.</desc>
7610 </attribute>
7611
7612 <method name="setCredentials">
7613 <desc>
7614 Store login credentials that can be queried by guest operating
7615 systems with Additions installed. The credentials are transient
7616 to the session and the guest may also choose to erase them. Note
7617 that the caller cannot determine whether the guest operating system
7618 has queried or made use of the credentials.
7619
7620 <result name="VBOX_E_VM_ERROR">
7621 VMM device is not available.
7622 </result>
7623
7624 </desc>
7625 <param name="userName" type="wstring" dir="in">
7626 <desc>User name string, can be empty</desc>
7627 </param>
7628 <param name="password" type="wstring" dir="in">
7629 <desc>Password string, can be empty</desc>
7630 </param>
7631 <param name="domain" type="wstring" dir="in">
7632 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7633 </param>
7634 <param name="allowInteractiveLogon" type="boolean" dir="in">
7635 <desc>
7636 Flag whether the guest should alternatively allow the user to
7637 interactively specify different credentials. This flag might
7638 not be supported by all versions of the Additions.
7639 </desc>
7640 </param>
7641 </method>
7642
7643 <method name="getStatistic">
7644 <desc>
7645 Query specified guest statistics as reported by the VirtualBox Additions.
7646 </desc>
7647 <param name="cpuId" type="unsigned long" dir="in">
7648 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7649 </param>
7650 <param name="statistic" type="GuestStatisticType" dir="in">
7651 <desc>Statistic type.</desc>
7652 </param>
7653 <param name="statVal" type="unsigned long" dir="return">
7654 <desc>Statistics value</desc>
7655 </param>
7656 </method>
7657
7658 </interface>
7659
7660
7661 <!--
7662 // IProgress
7663 /////////////////////////////////////////////////////////////////////////
7664 -->
7665
7666 <interface
7667 name="IProgress" extends="$unknown"
7668 uuid="6fcd0198-7fc5-4c53-8c37-653ac76854b5"
7669 wsmap="managed"
7670 >
7671 <desc>
7672 The IProgress interface is used to track and control
7673 asynchronous tasks within VirtualBox.
7674
7675 An instance of this is returned every time VirtualBox starts
7676 an asynchronous task (in other words, a separate thread) which
7677 continues to run after a method call returns. For example,
7678 <link to="IConsole::saveState" />, which saves the state of
7679 a running virtual machine, can take a long time to complete.
7680 To be able to display a progress bar, a user interface such as
7681 the VirtualBox graphical user interface can use the IProgress
7682 object returned by that method.
7683
7684 Note that IProgress is a "read-only" interface in the sense
7685 that only the VirtualBox internals behind the Main API can
7686 create and manipulate progress objects, whereas client code
7687 can only use the IProgress object to monitor a task's
7688 progress and, if <link to="#cancelable" /> is @c true,
7689 cancel the task by calling <link to="#cancel" />.
7690
7691 A task represented by IProgress consists of either one or
7692 several sub-operations that run sequentially, one by one (see
7693 <link to="#operation" /> and <link to="#operationCount" />).
7694 Every operation is identified by a number (starting from 0)
7695 and has a separate description.
7696
7697 You can find the individual percentage of completion of the current
7698 operation in <link to="#operationPercent" /> and the
7699 percentage of completion of the task as a whole
7700 in <link to="#percent" />.
7701
7702 Similarly, you can wait for the completion of a particular
7703 operation via <link to="#waitForOperationCompletion" /> or
7704 for the completion of the whole task via
7705 <link to="#waitForCompletion" />.
7706 </desc>
7707
7708 <attribute name="id" type="wstring" readonly="yes">
7709 <desc>ID of the task.</desc>
7710 </attribute>
7711
7712 <attribute name="description" type="wstring" readonly="yes">
7713 <desc>Description of the task.</desc>
7714 </attribute>
7715
7716 <attribute name="initiator" type="$unknown" readonly="yes">
7717 <desc>Initiator of the task.</desc>
7718 </attribute>
7719
7720 <attribute name="cancelable" type="boolean" readonly="yes">
7721 <desc>Whether the task can be interrupted.</desc>
7722 </attribute>
7723
7724 <attribute name="percent" type="unsigned long" readonly="yes">
7725 <desc>
7726 Current progress value of the task as a whole, in percent.
7727 This value depends on how many operations are already complete.
7728 Returns 100 if <link to="#completed" /> is @c true.
7729 </desc>
7730 </attribute>
7731
7732 <attribute name="timeRemaining" type="long" readonly="yes">
7733 <desc>
7734 Estimated remaining time until the task completes, in
7735 seconds. Returns 0 once the task has completed; returns -1
7736 if the remaining time cannot be computed, in particular if
7737 the current progress is 0.
7738
7739 Even if a value is returned, the estimate will be unreliable
7740 for low progress values. It will become more reliable as the
7741 task progresses; it is not recommended to display an ETA
7742 before at least 20% of a task have completed.
7743 </desc>
7744 </attribute>
7745
7746 <attribute name="completed" type="boolean" readonly="yes">
7747 <desc>Whether the task has been completed.</desc>
7748 </attribute>
7749
7750 <attribute name="canceled" type="boolean" readonly="yes">
7751 <desc>Whether the task has been canceled.</desc>
7752 </attribute>
7753
7754 <attribute name="resultCode" type="long" readonly="yes">
7755 <desc>
7756 Result code of the progress task.
7757 Valid only if <link to="#completed"/> is @c true.
7758 </desc>
7759 </attribute>
7760
7761 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7762 <desc>
7763 Extended information about the unsuccessful result of the
7764 progress operation. May be @c null if no extended information
7765 is available.
7766 Valid only if <link to="#completed"/> is @c true and
7767 <link to="#resultCode"/> indicates a failure.
7768 </desc>
7769 </attribute>
7770
7771 <attribute name="operationCount" type="unsigned long" readonly="yes">
7772 <desc>
7773 Number of sub-operations this task is divided into.
7774 Every task consists of at least one suboperation.
7775 </desc>
7776 </attribute>
7777
7778 <attribute name="operation" type="unsigned long" readonly="yes">
7779 <desc>Number of the sub-operation being currently executed.</desc>
7780 </attribute>
7781
7782 <attribute name="operationDescription" type="wstring" readonly="yes">
7783 <desc>
7784 Description of the sub-operation being currently executed.
7785 </desc>
7786 </attribute>
7787
7788 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7789 <desc>Progress value of the current sub-operation only, in percent.</desc>
7790 </attribute>
7791
7792 <method name="waitForCompletion">
7793 <desc>
7794 Waits until the task is done (including all sub-operations)
7795 with a given timeout in milliseconds; specify -1 for an indefinite wait.
7796
7797 <result name="VBOX_E_IPRT_ERROR">
7798 Failed to wait for task completion.
7799 </result>
7800 </desc>
7801
7802 <param name="timeout" type="long" dir="in">
7803 <desc>
7804 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7805 </desc>
7806 </param>
7807 </method>
7808
7809 <method name="waitForOperationCompletion">
7810 <desc>
7811 Waits until the given operation is done with a given timeout in
7812 milliseconds; specify -1 for an indefinite wait.
7813
7814 <result name="VBOX_E_IPRT_ERROR">
7815 Failed to wait for operation completion.
7816 </result>
7817
7818 </desc>
7819 <param name="operation" type="unsigned long" dir="in">
7820 <desc>
7821 Number of the operation to wait for.
7822 Must be less than <link to="#operationCount"/>.
7823 </desc>
7824 </param>
7825 <param name="timeout" type="long" dir="in">
7826 <desc>
7827 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7828 </desc>
7829 </param>
7830 </method>
7831
7832 <method name="cancel">
7833 <desc>
7834 Cancels the task.
7835 <note>
7836 If <link to="#cancelable"/> is @c false, then this method will fail.
7837 </note>
7838
7839 <result name="VBOX_E_INVALID_OBJECT_STATE">
7840 Operation cannot be canceled.
7841 </result>
7842
7843 </desc>
7844 </method>
7845
7846 </interface>
7847
7848
7849 <!--
7850 // ISnapshot
7851 /////////////////////////////////////////////////////////////////////////
7852 -->
7853
7854 <interface
7855 name="ISnapshot" extends="$unknown"
7856 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
7857 wsmap="managed"
7858 >
7859 <desc>
7860 The ISnapshot interface represents a snapshot of the virtual
7861 machine.
7862
7863 Together with the differencing hard disks that are created
7864 when a snapshot is taken, a machine can be brought back to
7865 the exact state it was in when the snapshot was taken.
7866
7867 The ISnapshot interface has no methods, only attributes; snapshots
7868 are controlled through methods of the <link to="IConsole" /> interface
7869 which also manage the hard disk images associated with the snapshot.
7870 The following operations exist:
7871
7872 <ul>
7873 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
7874 by creating new, empty differencing images for the machine's
7875 hard disks and saving the VM settings and (if the VM is running)
7876 the current VM state in the snapshot.
7877
7878 The differencing images will then receive all data written to
7879 the machine's hard disks, while their parent (base) images
7880 remain unmodified after the snapshot has been taken (see
7881 <link to="IHardDisk" /> for details about differencing images).
7882 This simplifies restoring a machine to the state of a snapshot:
7883 only the differencing images need to be deleted.
7884
7885 The current machine state is not changed by taking a snapshot.
7886 If the machine is running, it will resume execution after the
7887 snapshot has been taken.
7888 </li>
7889
7890 <li><link to="IConsole::discardCurrentState"/>: this goes back to
7891 a previous snapshot. This resets the machine's state to that of
7892 the previous snapshot by deleting the differencing image of each
7893 of the machine's hard disks and setting the machine's settings
7894 and state to the state that was saved in the snapshot (if any).
7895
7896 This destroys the machine's current state.
7897 </li>
7898
7899 <li><link to="IConsole::discardSnapshot"/>: deletes a snapshot
7900 without affecting the current machine state.
7901
7902 This does not change the machine, but instead frees the resources
7903 allocated when the snapshot was taken: the settings and machine state
7904 is deleted (if any), and the snapshot's differencing image for each
7905 of the machine's hard disks gets merged with its parent image.
7906
7907 Neither the current machine state nor other snapshots are affected
7908 by this operation, except that parent disk images will be modified
7909 to contain the disk data associated with the snapshot being deleted.
7910 </li>
7911
7912 <li><link to="IConsole::discardCurrentSnapshotAndState"/>:
7913 this completely reverts the virtual machine to the state it was in
7914 before the current snapshot has been taken. Effectively, this goes
7915 back to the state before the current snapshot, which might be
7916 an earlier snapshot.
7917
7918 The current state, as well as the current snapshot, are lost.
7919 </li>
7920 </ul>
7921
7922 Each snapshot contains the settings of the virtual machine (hardware
7923 configuration etc.). In addition, if the machine was running when the
7924 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
7925 the current VM state is saved in the snapshot (similarly to what happens
7926 when a VM's state is saved). The snapshot is then said to
7927 be <i>online</i> because when restoring it, the VM will be running.
7928
7929 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
7930 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
7931
7932 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
7933 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
7934 it then contains a so-called "zero execution state", representing a
7935 machine that is powered off.
7936
7937 <h3>Snapshot branches and the "current" snapshot</h3>
7938
7939 Snapshots can be chained, whereby every next snapshot is based on the
7940 previous one. This chaining is related to hard disk branching
7941 (see the <link to="IHardDisk"/> description) in that every time
7942 a new snapshot is created, a new differencing hard disk is implicitly
7943 created for all normal hard disks attached to the machine.
7944
7945 Each virtual machine has a "current snapshot", identified by
7946 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
7947 to the last snapshot in the chain. In a future version of VirtualBox,
7948 it will be possible to reset a machine's current state to that of an
7949 earlier snapshot without discarding the current state so that it will be
7950 possible to create alternative snapshot paths in a snapshot tree.
7951
7952 In the current implementation, multiple snapshot branches within one
7953 virtual machine are not allowed. Every machine has a single branch,
7954 and <link to="IConsole::takeSnapshot"/> operation adds a new
7955 snapshot to the top of that branch.
7956 </desc>
7957
7958 <attribute name="id" type="wstring" readonly="yes">
7959 <desc>UUID of the snapshot.</desc>
7960 </attribute>
7961
7962 <attribute name="name" type="wstring">
7963 <desc>Short name of the snapshot.</desc>
7964 </attribute>
7965
7966 <attribute name="description" type="wstring">
7967 <desc>Optional description of the snapshot.</desc>
7968 </attribute>
7969
7970 <attribute name="timeStamp" type="long long" readonly="yes">
7971 <desc>
7972 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7973 </desc>
7974 </attribute>
7975
7976 <attribute name="online" type="boolean" readonly="yes">
7977 <desc>
7978 @c true if this snapshot is an online snapshot and @c false otherwise.
7979
7980 When this attribute is @c true, the
7981 <link to="IMachine::stateFilePath"/> attribute of the
7982 <link to="#machine"/> object associated with this snapshot
7983 will point to the saved state file. Otherwise, it will be
7984 an empty string.
7985 </desc>
7986 </attribute>
7987
7988 <attribute name="machine" type="IMachine" readonly="yes">
7989 <desc>
7990 Virtual machine this snapshot is taken on. This object
7991 stores all settings the machine had when taking this snapshot.
7992 <note>
7993 The returned machine object is immutable, i.e. no
7994 any settings can be changed.
7995 </note>
7996 </desc>
7997 </attribute>
7998
7999 <attribute name="parent" type="ISnapshot" readonly="yes">
8000 <desc>
8001 Parent snapshot (a snapshot this one is based on), or
8002 @c null if the snapshot has no parent.
8003 </desc>
8004 </attribute>
8005
8006 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8007 <desc>
8008 Child snapshots (all snapshots having this one as a parent).
8009 <note>
8010 In the current implementation, there can be only one
8011 child snapshot, or no children at all, meaning this is the
8012 last (head) snapshot.
8013 </note>
8014 </desc>
8015 </attribute>
8016
8017 </interface>
8018
8019
8020 <!--
8021 // IMedia
8022 /////////////////////////////////////////////////////////////////////////
8023 -->
8024
8025 <enum
8026 name="MediaState"
8027 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8028 >
8029 <desc>
8030 Virtual media state.
8031 <see>IMedia</see>
8032 </desc>
8033
8034 <const name="NotCreated" value="0">
8035 <desc>
8036 Associated media storage does not exist (either was not created yet or
8037 was deleted).
8038 </desc>
8039 </const>
8040 <const name="Created" value="1">
8041 <desc>
8042 Associated storage exists and accessible.
8043 </desc>
8044 </const>
8045 <const name="LockedRead" value="2">
8046 <desc>
8047 Media is locked for reading, no data modification is possible.
8048 </desc>
8049 </const>
8050 <const name="LockedWrite" value="3">
8051 <desc>
8052 Media is locked for writing, no concurrent data reading or modification
8053 is possible.
8054 </desc>
8055 </const>
8056 <const name="Inaccessible" value="4">
8057 <desc>
8058 Associated media storage is not accessible.
8059 </desc>
8060 </const>
8061 <const name="Creating" value="5">
8062 <desc>
8063 Associated media storage is being created.
8064 </desc>
8065 </const>
8066 <const name="Deleting" value="6">
8067 <desc>
8068 Associated media storage is being deleted.
8069 </desc>
8070 </const>
8071 </enum>
8072
8073 <interface
8074 name="IMedium" extends="$unknown"
8075 uuid="f585787c-7728-40f6-853a-13705426e936"
8076 wsmap="managed"
8077 >
8078 <desc>
8079 The IMedium interface is a common interface for all objects representing
8080 virtual media such as hard disks, CD/DVD images and floppy images.
8081
8082 Each medium is associated with a storage unit (such as a file on the host
8083 computer or a network resource) that holds actual data. The location of
8084 the storage unit is represented by the #location attribute. The value of
8085 this attribute is media type dependent.
8086
8087 The exact media type may be determined by querying the appropriate
8088 interface such as:
8089 <ul>
8090 <li><link to="IHardDisk" /> (virtual hard disks)</li>
8091 <li><link to="IDVDImage" /> (standard CD/DVD ISO image files)</li>
8092 <li><link to="IFloppyImage" /> (raw floppy image files)</li>
8093 </ul>
8094
8095 Existing media are opened using the following methods, depending on the
8096 media type:
8097 <ul>
8098 <li><link to="IVirtualBox::openHardDisk"/></li>
8099 <li><link to="IVirtualBox::openDVDImage"/></li>
8100 <li><link to="IVirtualBox::openFloppyImage"/></li>
8101 </ul>
8102
8103 New hard disk media are created using the
8104 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8105 images are created outside VirtualBox, usually by storing a copy
8106 of the real medium of the corresponding type in a regular file.
8107
8108 <h3>Known Media</h3>
8109
8110 When an existing medium gets opened for the first time, it gets
8111 automatically remembered by the given VirtualBox installation or, in other
8112 words, becomes a <i>known medium</i>. Known media are stored in the media
8113 registry transparently maintained by VirtualBox and stored in settings
8114 files so that this registry is preserved when VirtualBox is not running.
8115
8116 Newly created virtual hard disks get remembered only when the associated
8117 storage unit is actually created (see IHardDisk for more details).
8118
8119 All known media can be enumerated using
8120 <link to="IVirtualBox::hardDisks"/>,
8121 <link to="IVirtualBox::DVDImages"/> and
8122 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8123 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8124 and similar methods or by location using
8125 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8126
8127 Only known media can be attached to virtual machines.
8128
8129 Removing known media from the media registry is performed when the given
8130 medium is closed using the <link to="#close"/> method or when its
8131 associated storage unit is deleted (only for hard disks).
8132
8133 <h3>Accessibility Checks</h3>
8134
8135 The given medium (with the created storage unit) is considered to be
8136 <i>accessible</i> when its storage unit can be read.
8137 Accessible media are indicated by the <link to="MediaState_Created"/>
8138 value of the <link to="#state"/> attribute. When the storage unit cannot
8139 be read (for example, because it is located on a disconnected network
8140 resource, or was accidentally deleted outside VirtualBox), the medium is
8141 considered to be <i>inaccessible</i> which is indicated by the
8142 <link to="MediaState_Inaccessible"/> state. The details about the reason
8143 of being inaccessible can be obtained using the
8144 <link to="#lastAccessError"/> attribute.
8145
8146 A new accessibility check is performed each time the <link to="#state"/>
8147 attribute is read. Please note that this check may take long time (several
8148 seconds or even minutes, depending on the storage unit location and
8149 format), and will block the calling thread until finished. For this
8150 reason, it is recommended to never read this attribute on the main UI
8151 thread to avoid making the UI unresponsive.
8152
8153 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8154 created for the first time), all known media are in the
8155 <link to="MediaState_Inaccessible"/> state but the value of the <link
8156 to="#lastAccessError"/> attribute is an empty string because no actual
8157 accessibility check is made on startup. This is done to make the
8158 VirtualBox object ready for serving requests as
8159 fast as possible and let the end-user application decide if it needs to
8160 check media accessibility right away or not.
8161 </desc>
8162
8163 <attribute name="id" type="wstring" readonly="yes">
8164 <desc>
8165 UUID of the medium. For a newly created medium, this value is a randomly
8166 generated UUID.
8167
8168 <note>
8169 For media in one of MediaState_NotCreated, MediaState_Creating or
8170 MediaState_Deleting states, the value of this property is undefined
8171 and will most likely be an empty UUID.
8172 </note>
8173 </desc>
8174 </attribute>
8175
8176 <attribute name="description" type="wstring">
8177 <desc>
8178 Optional description of the medium. For newly created media, the value
8179 of this attribute value is an empty string.
8180
8181 Media types that don't support this attribute will return E_NOTIMPL in
8182 attempt to get or set this attribute's value.
8183
8184 <note>
8185 For some storage types, reading this attribute may return an outdated
8186 (last known) value when <link to="#state"/> is <link
8187 to="MediaState_Inaccessible"/> or <link
8188 to="MediaState_LockedWrite"/> because the value of this attribute is
8189 stored within the storage unit itself. Also note that changing the
8190 attribute value is not possible in such case, as well as when the
8191 medium is the <link to="MediaState_LockedRead"/> state.
8192 </note>
8193 </desc>
8194 </attribute>
8195
8196 <attribute name="state" type="MediaState" readonly="yes">
8197 <desc>
8198 Current media state. Inspect <link to="MediaState"/> values for details.
8199
8200 Reading this attribute may take a long time because an accessibility
8201 check of the storage unit is performed each time the attribute is read.
8202 This check may cause a significant delay if the storage unit of the
8203 given medium is, for example, a file located on a network share which is
8204 not currently accessible due to connectivity problems -- the call will
8205 not return until a timeout interval defined by the host OS for this
8206 operation expires.
8207
8208 If the last known state of the medium is <link to="MediaState_Created"/>
8209 and the accessibility check fails then the state would be set to
8210 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8211 may be used to get more details about the failure. If the state of the
8212 medium is <link to="MediaState_LockedRead"/> or
8213 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8214 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8215 accessibility check in this case.
8216
8217 Note that not all media states are applicable to all media types.
8218 For example, states <link to="MediaState_NotCreated"/>,
8219 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8220 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8221 IFloppyImage media.
8222 </desc>
8223 </attribute>
8224
8225 <attribute name="location" type="wstring">
8226 <desc>
8227 Location of the storage unit holding media data.
8228
8229 The format of the location string is media type specific. For media
8230 types using regular files in a host's file system, the location
8231 string is the full file name.
8232
8233 Some media types may support changing the storage unit location by
8234 simply changing the value of this property. If this operation is not
8235 supported, the implementation will return E_NOTIMPL in attempt to set
8236 this attribute's value.
8237
8238 When setting a value of the location attribute which is a regular file
8239 in the host's file system, the given file name may be either relative to
8240 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8241 absolute. Note that if the given location specification does not contain
8242 the file extension part then a proper default extension will be
8243 automatically appended by the implementation depending on the media type.
8244 </desc>
8245 </attribute>
8246
8247 <attribute name="name" type="wstring" readonly="yes">
8248 <desc>
8249 Name of the storage unit holding media data.
8250
8251 The returned string is a short version of the <link to="#location"/>
8252 attribute that is suitable for representing the medium in situations
8253 where the full location specification is too long (such as lists
8254 and comboboxes in GUI frontends). This string is also used by frontends
8255 to sort the media list alphabetically when needed.
8256
8257 For example, for locations that are regular files in the host's file
8258 system, the value of this attribute is just the file name (+ extension),
8259 without the path specification.
8260
8261 Note that as opposed to the <link to="#location"/> attribute, the name
8262 attribute will not necessary be unique for a list of media of the
8263 given type and format.
8264 </desc>
8265 </attribute>
8266
8267 <attribute name="size" type="unsigned long long" readonly="yes">
8268 <desc>
8269 Physical size of the storage unit used to hold media data (in bytes).
8270
8271 <note>
8272 For media whose <link to="#state"/> is <link
8273 to="MediaState_Inaccessible"/>, the value of this property is the
8274 last known size. For <link to="MediaState_NotCreated"/> media,
8275 the returned value is zero.
8276 </note>
8277 </desc>
8278 </attribute>
8279
8280 <attribute name="lastAccessError" type="wstring" readonly="yes">
8281 <desc>
8282 Text message that represents the result of the last accessibility
8283 check.
8284
8285 Accessibility checks are performed each time the <link to="#state"/>
8286 attribute is read. An empty string is returned if the last
8287 accessibility check was successful. A non-empty string indicates a
8288 failure and should normally describe a reason of the failure (for
8289 example, a file read error).
8290 </desc>
8291 </attribute>
8292
8293 <attribute name="machineIds" type="wstring" safearray="yes" readonly="yes">
8294 <desc>
8295 Array of UUIDs of all machines this medium is attached to.
8296
8297 A @c null array is returned if this medium is not attached to any
8298 machine or to any machine's snapshot.
8299
8300 <note>
8301 The returned array will include a machine even if this medium is not
8302 attached to that machine in the current state but attached to it in
8303 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8304 details.
8305 </note>
8306 </desc>
8307 </attribute>
8308
8309 <method name="getSnapshotIds">
8310 <desc>
8311 Returns an array of UUIDs of all snapshots of the given machine where
8312 this medium is attached to.
8313
8314 If the medium is attached to the machine in the current state, then the
8315 first element in the array will always be the ID of the queried machine
8316 (i.e. the value equal to the @c machineId argument), followed by
8317 snapshot IDs (if any).
8318
8319 If the medium is not attached to the machine in the current state, then
8320 the array will contain only snapshot IDs.
8321
8322 The returned array may be @c null if this medium is not attached
8323 to the given machine at all, neither in the current state nor in one of
8324 the snapshots.
8325 </desc>
8326 <param name="machineId" type="wstring" dir="in">
8327 <desc>
8328 UUID of the machine to query.
8329 </desc>
8330 </param>
8331 <param name="snapshotIds" type="wstring" safearray="yes" dir="return">
8332 <desc>
8333 Array of snapshot UUIDs of the given machine using this medium.
8334 </desc>
8335 </param>
8336 </method>
8337
8338 <method name="lockRead">
8339 <desc>
8340 Locks this medium for reading.
8341
8342 The read lock is shared: many clients can simultaneously lock the
8343 same media for reading unless it is already locked for writing (see
8344 <link to="#lockWrite"/>) in which case an error is returned.
8345
8346 When the medium is locked for reading, it cannot be modified
8347 from within VirtualBox. This means that any method that changes
8348 the properties of this medium or contents of the storage unit
8349 will return an error (unless explicitly stated otherwise) and
8350 that an attempt to start a virtual machine that wants to modify
8351 the medium will also fail.
8352
8353 When the virtual machine is started up, it locks for reading all
8354 media it uses in read-only mode. If some media cannot be locked
8355 for reading, the startup procedure will fail.
8356
8357 The medium locked for reading must be unlocked using the <link
8358 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8359 can be nested and must be followed by the same number of paired
8360 <link to="#unlockRead"/> calls.
8361
8362 This method sets the media state to <link
8363 to="MediaState_LockedRead" /> on success. The state prior to
8364 this call must be <link to="MediaState_Created" />,
8365 <link to="MediaState_Inaccessible" /> or
8366 <link to="MediaState_LockedRead" />.
8367 As you can see, inaccessible media can be locked too. This is
8368 not an error; this method performs a logical lock that prevents
8369 modifications of this media through the VirtualBox API, not a
8370 physical lock of the underlying storage unit.
8371
8372 This method returns the current state of the medium
8373 <b>before</b> the operation.
8374
8375 <result name="VBOX_E_INVALID_OBJECT_STATE">
8376 Invalid media state (e.g. not created, locked, inaccessible,
8377 creating, deleting).
8378 </result>
8379
8380 </desc>
8381 <param name="state" type="MediaState" dir="return">
8382 <desc>
8383 State of the medium after the operation.
8384 </desc>
8385 </param>
8386 </method>
8387
8388 <method name="unlockRead">
8389 <desc>
8390 Cancels the read lock previously set by <link to="#lockRead"/>.
8391
8392 For both, success and failure, this method returns the current state
8393 of the medium <b>after</b> the operation.
8394
8395 See <link to="#lockRead"/> for more details.
8396
8397 <result name="VBOX_E_INVALID_OBJECT_STATE">
8398 Medium not locked for reading.
8399 </result>
8400
8401 </desc>
8402 <param name="state" type="MediaState" dir="return">
8403 <desc>
8404 State of the medium after the operation.
8405 </desc>
8406 </param>
8407 </method>
8408
8409 <method name="lockWrite">
8410 <desc>
8411 Locks this medium for writing.
8412
8413 The write lock, as opposed to <link to="#lockRead"/>, is
8414 exclusive: there may be only one client holding a write lock
8415 and there may be no read locks while the write lock is held.
8416
8417 When the medium is locked for writing, it cannot be modified
8418 from within VirtualBox and it is not guaranteed that the values
8419 of its properties are up-to-date. Any method that changes the
8420 properties of this medium or contents of the storage unit will
8421 return an error (unless explicitly stated otherwise) and an
8422 attempt to start a virtual machine wanting to modify or to
8423 read the medium will fail.
8424
8425 When the virtual machine is started up, it locks for writing all
8426 media it uses to write data to. If any medium could not be locked
8427 for writing, the startup procedure will fail.
8428
8429 The medium locked for writing must be unlocked using the <link
8430 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8431 can <b>not</b> be nested and must be followed by a<link
8432 to="#unlockWrite"/> call before the next lockWrite call.
8433
8434 This method sets the media state to <link to="MediaState_LockedWrite" />
8435 on success. The state prior to this call must be <link to="MediaState_Created"/>
8436 or <link to="MediaState_Inaccessible"/>. As you can see, inaccessible
8437 media can be locked too. This is not an error; this method
8438 performs a logical lock preventing modifications of this
8439 media through the VirtualBox API, not a physical lock of the
8440 underlying storage unit.
8441
8442 For both, success and failure, this method returns the current
8443 state of the medium <b>before</b> the operation.
8444
8445 <result name="VBOX_E_INVALID_OBJECT_STATE">
8446 Invalid media state (e.g. not created, locked, inaccessible,
8447 creating, deleting).
8448 </result>
8449
8450 </desc>
8451 <param name="state" type="MediaState" dir="return">
8452 <desc>
8453 State of the medium after the operation.
8454 </desc>
8455 </param>
8456 </method>
8457
8458 <method name="unlockWrite">
8459 <desc>
8460 Cancels the write lock previously set by <link to="#lockWrite"/>.
8461
8462 For both, success and failure, this method returns the current
8463 state of the medium <b>after</b> the operation.
8464
8465 See <link to="#lockWrite"/> for more details.
8466
8467 <result name="VBOX_E_INVALID_OBJECT_STATE">
8468 Medium not locked for writing.
8469 </result>
8470
8471 </desc>
8472 <param name="state" type="MediaState" dir="return">
8473 <desc>
8474 State of the medium after the operation.
8475 </desc>
8476 </param>
8477 </method>
8478
8479 <method name="close">
8480 <desc>
8481 Closes this medium.
8482
8483 The hard disk must not be attached to any known virtual machine
8484 and must not have any known child hard disks, otherwise the
8485 operation will fail.
8486
8487 When the hard disk is successfully closed, it gets removed from
8488 the list of remembered hard disks, but its storage unit is not
8489 deleted. In particular, this means that this hard disk can be
8490 later opened again using the <link
8491 to="IVirtualBox::openHardDisk"/> call.
8492
8493 Note that after this method successfully returns, the given hard
8494 disk object becomes uninitialized. This means that any attempt
8495 to call any of its methods or attributes will fail with the
8496 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8497
8498 <result name="VBOX_E_INVALID_OBJECT_STATE">
8499 Invalid media state (other than not created, created or
8500 inaccessible).
8501 </result>
8502 <result name="VBOX_E_OBJECT_IN_USE">
8503 Medium attached to virtual machine.
8504 </result>
8505 <result name="VBOX_E_FILE_ERROR">
8506 Settings file not accessible.
8507 </result>
8508 <result name="VBOX_E_XML_ERROR">
8509 Could not parse the settings file.
8510 </result>
8511
8512 </desc>
8513 </method>
8514
8515 </interface>
8516
8517
8518 <!--
8519 // IHardDisk
8520 /////////////////////////////////////////////////////////////////////////
8521 -->
8522
8523 <enum
8524 name="HardDiskType"
8525 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8526 >
8527 <desc>
8528 Virtual hard disk type.
8529 <see>IHardDisk</see>
8530 </desc>
8531
8532 <const name="Normal" value="0">
8533 <desc>
8534 Normal hard disk (attached directly or indirectly, preserved
8535 when taking snapshots).
8536 </desc>
8537 </const>
8538 <const name="Immutable" value="1">
8539 <desc>
8540 Immutable hard disk (attached indirectly, changes are wiped out
8541 after powering off the virtual machine).
8542 </desc>
8543 </const>
8544 <const name="Writethrough" value="2">
8545 <desc>
8546 Write through hard disk (attached directly, ignored when
8547 taking snapshots).
8548 </desc>
8549 </const>
8550 </enum>
8551
8552 <enum
8553 name="HardDiskVariant"
8554 uuid="eb7fc6b3-ae23-4c5d-a1f6-e3522dd1efb0"
8555 >
8556 <desc>
8557 Virtual hard disk image variant. More than one flag may be set.
8558 <see>IHardDisk</see>
8559 </desc>
8560
8561 <const name="Standard" value="0">
8562 <desc>
8563 No particular variant requested, results in using the backend default.
8564 </desc>
8565 </const>
8566 <const name="VmdkSplit2G" value="0x01">
8567 <desc>
8568 VMDK image split in chunks of less than 2GByte.
8569 </desc>
8570 </const>
8571 <const name="VmdkStreamOptimized" value="0x04">
8572 <desc>
8573 VMDK streamOptimized image. Special import/export format which is
8574 read-only/append-only.
8575 </desc>
8576 </const>
8577 <const name="VmdkESX" value="0x08">
8578 <desc>
8579 VMDK format variant used on ESX products.
8580 </desc>
8581 </const>
8582 <const name="Fixed" value="0x10000">
8583 <desc>
8584 Fixed image. Only allowed for base images.
8585 </desc>
8586 </const>
8587 <const name="Diff" value="0x20000">
8588 <desc>
8589 Fixed image. Only allowed for base images.
8590 </desc>
8591 </const>
8592 </enum>
8593
8594 <interface
8595 name="IHardDiskAttachment" extends="$unknown"
8596 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8597 wsmap="struct"
8598 >
8599 <desc>
8600 The IHardDiskAttachment interface represents a hard disk attachment of a
8601 virtual machine.
8602
8603 Every hard disk attachment specifies a slot of the virtual hard disk
8604 controller and a virtual hard disk attached to this slot.
8605
8606 The array of hard disk attachments is returned by
8607 <link to="IMachine::hardDiskAttachments"/>.
8608 </desc>
8609
8610 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8611 <desc>Hard disk object associated with this attachment.</desc>
8612 </attribute>
8613
8614 <attribute name="controller" type="wstring" readonly="yes">
8615 <desc>Interface bus of this attachment.</desc>
8616 </attribute>
8617
8618 <attribute name="port" type="long" readonly="yes">
8619 <desc>Port number of this attachment.</desc>
8620 </attribute>
8621
8622 <attribute name="device" type="long" readonly="yes">
8623 <desc>Device slot number of this attachment.</desc>
8624 </attribute>
8625
8626 </interface>
8627
8628 <interface
8629 name="IHardDisk" extends="IMedium"
8630 uuid="62551115-83b8-4d20-925f-79e9d3c00f96"
8631 wsmap="managed"
8632 >
8633 <desc>
8634 The IHardDisk interface represents a virtual hard disk drive
8635 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8636
8637 <h3>Hard Disk Types</h3>
8638
8639 There are three types of hard disks:
8640 <link to="HardDiskType_Normal">Normal</link>,
8641 <link to="HardDiskType_Immutable">Immutable</link> and
8642 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8643 hard disk defines how the hard disk is attached to a virtual machine and
8644 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8645 machine with the attached hard disk is taken. The type of the hard disk is
8646 defined by the <link to="#type"/> attribute.
8647
8648 All hard disks can be also divided in two groups: <i>base</i> hard
8649 disks and <i>differencing</i> hard disks. A base hard disk contains all
8650 sectors of the hard disk data in its own storage and therefore can be
8651 used independently. On the contrary, a differencing hard disk is a
8652 "delta" to some other disk and contains only those sectors which differ
8653 from that other disk, which is then called a <i>parent</i>. The differencing
8654 hard disk is said to be <i>linked to</i> that parent.
8655 The parent may be itself a differencing image, thus forming a chain of
8656 linked hard disks. The last element in that chain (sometimes referred to as
8657 the root hard disk) must always be a base. Note that several differencing
8658 hard disks may be linked to the same parent hard disk.
8659
8660 Differencing hard disks can be distinguished from base hard disks by
8661 querying the <link to="#parent"/> attribute: base hard disks do not have
8662 parents they would depend on, so the value of this attribute is always
8663 @c null for them. Using this attribute, it is possible to walk up
8664 the hard disk tree (from the child hard disk to its parent). It is also
8665 possible to walk down the tree using the <link to="#children"/>
8666 attribute.
8667
8668 Note that the type of all differencing hard disks is
8669 <link to="HardDiskType_Normal" />; all other values are
8670 meaningless for them. Base hard disks may be of any type.
8671
8672 <h3>Creating Hard Disks</h3>
8673
8674 New base hard disks are created using
8675 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8676 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8677 disks are usually implicitly created by VirtualBox when needed but may
8678 also be created explicitly using <link to="#createDiffStorage"/>.
8679
8680 After the hard disk is successfully created (including the storage unit)
8681 or opened, it becomes a known hard disk (remembered in the internal media
8682 registry). Known hard disks can be attached to a virtual machine, accessed
8683 through <link to="IVirtualBox::getHardDisk"/> and
8684 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8685 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8686
8687 The following methods, besides <link to="IMedium::close"/>,
8688 automatically remove the hard disk from the media registry:
8689 <ul>
8690 <li><link to="#deleteStorage"/></li>
8691 <li><link to="#mergeTo"/></li>
8692 </ul>
8693
8694 If the storage unit of the hard disk is a regular file in the host's
8695 file system then the rules stated in the description of the
8696 <link to="IMedium::location"/> attribute apply when setting its value. In
8697 addition, a plain file name without any path may be given, in which case
8698 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8699 folder</link> will be prepended to it.
8700
8701 <h4>Automatic composition of the file name part</h4>
8702
8703 Another extension to the <link to="IMedium::location"/> attribute is that
8704 there is a possibility to cause VirtualBox to compose a unique value for
8705 the file name part of the location using the UUID of the hard disk. This
8706 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8707 e.g. before the storage unit is created, and works as follows. You set the
8708 value of the <link to="IMedium::location"/> attribute to a location
8709 specification which only contains the path specification but not the file
8710 name part and ends with either a forward slash or a backslash character.
8711 In response, VirtualBox will generate a new UUID for the hard disk and
8712 compose the file name using the following pattern:
8713 <pre>
8714 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8715 </pre>
8716 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8717 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8718 is the default extension for the storage format of this hard disk. After
8719 that, you may call any of the methods that create a new hard disk storage
8720 unit and they will use the generated UUID and file name.
8721
8722 <h3>Attaching Hard Disks</h3>
8723
8724 Hard disks are attached to virtual machines using the
8725 <link to="IMachine::attachHardDisk"/> method and detached using the
8726 <link to="IMachine::detachHardDisk"/> method. Depending on their
8727 <link to="#type"/>, hard disks are attached either
8728 <i>directly</i> or <i>indirectly</i>.
8729
8730 When a hard disk is being attached directly, it is associated with the
8731 virtual machine and used for hard disk operations when the machine is
8732 running. When a hard disk is being attached indirectly, a new differencing
8733 hard disk linked to it is implicitly created and this differencing hard
8734 disk is associated with the machine and used for hard disk operations.
8735 This also means that if <link to="IMachine::attachHardDisk"/> performs
8736 a direct attachment then the same hard disk will be returned in response
8737 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8738 an indirect attachment is performed then
8739 <link to="IMachine::getHardDisk"/> will return the implicitly created
8740 differencing hard disk, not the original one passed to <link
8741 to="IMachine::attachHardDisk"/>. The following table shows the
8742 dependency of the attachment type on the hard disk type:
8743
8744 <table>
8745 <tr>
8746 <th>Hard Disk Type</th>
8747 <th>Direct or Indirect?</th>
8748 </tr>
8749 <tr>
8750 <td>Normal (Base)</td>
8751 <td>
8752 Normal base hard disks that do not have children (i.e. differencing
8753 hard disks linked to them) and that are not already attached to
8754 virtual machines in snapshots are attached <b>directly</b>.
8755 Otherwise, they are attached <b>indirectly</b> because having
8756 dependent children or being part of the snapshot makes it impossible
8757 to modify hard disk contents without breaking the integrity of the
8758 dependent party. The <link to="#readOnly"/> attribute allows to
8759 quickly determine the kind of the attachment for the given hard
8760 disk. Note that if a normal base hard disk is to be indirectly
8761 attached to a virtual machine with snapshots then a special
8762 procedure called <i>smart attachment</i> is performed (see below).
8763 </td>
8764 </tr>
8765 <tr>
8766 <td>Normal (Differencing)</td>
8767 <td>
8768 Differencing hard disks are like normal base hard disks: attached
8769 <b>directly</b> if they do not have children and are not attached to
8770 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8771 that the smart attachment procedure is never performed for
8772 differencing hard disks.
8773 </td>
8774 </tr>
8775 <tr>
8776 <td>Immutable</td>
8777 <td>
8778 Immutable hard disks are always attached <b>indirectly</b> because
8779 they are designed to be non-writable. If an immutable hard disk is
8780 attached to a virtual machine with snapshots then a special
8781 procedure called smart attachment is performed (see below).
8782 </td>
8783 </tr>
8784 <tr>
8785 <td>Writethrough</td>
8786 <td>
8787 Writethrough hard disks are always attached <b>directly</b>, also as
8788 designed. This also means that writethrough hard disks cannot have
8789 other hard disks linked to them at all.
8790 </td>
8791 </tr>
8792 </table>
8793
8794 Note that the same hard disk, regardless of its type, may be attached to
8795 more than one virtual machine at a time. In this case, the machine that is
8796 started first gains exclusive access to the hard disk and attempts to
8797 start other machines having this hard disk attached will fail until the
8798 first machine is powered down.
8799
8800 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8801 that the given hard disk remains associated with the given machine after a
8802 successful <link to="IMachine::detachHardDisk"/> call until
8803 <link to="IMachine::saveSettings"/> is called to save all changes to
8804 machine settings to disk. This deferring is necessary to guarantee that
8805 the hard disk configuration may be restored at any time by a call to
8806 <link to="IMachine::discardSettings"/> before the settings
8807 are saved (committed).
8808
8809 Note that if <link to="IMachine::discardSettings"/> is called after
8810 indirectly attaching some hard disks to the machine but before a call to
8811 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8812 all differencing hard disks implicitly created by
8813 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
8814 Such implicitly created hard disks will also be immediately deleted when
8815 detached explicitly using the <link to="IMachine::detachHardDisk"/>
8816 call if it is made before <link to="IMachine::saveSettings"/>. This
8817 implicit deletion is safe because newly created differencing hard
8818 disks do not contain any user data.
8819
8820 However, keep in mind that detaching differencing hard disks that were
8821 implicitly created by <link to="IMachine::attachHardDisk"/>
8822 before the last <link to="IMachine::saveSettings"/> call will
8823 <b>not</b> implicitly delete them as they may already contain some data
8824 (for example, as a result of virtual machine execution). If these hard
8825 disks are no more necessary, the caller can always delete them explicitly
8826 using <link to="#deleteStorage"/> after they are actually de-associated
8827 from this machine by the <link to="IMachine::saveSettings"/> call.
8828
8829 <h3>Smart Attachment</h3>
8830
8831 When normal base or immutable hard disks are indirectly attached to a
8832 virtual machine then some additional steps are performed to make sure the
8833 virtual machine will have the most recent "view" of the hard disk being
8834 attached. These steps include walking through the machine's snapshots
8835 starting from the current one and going through ancestors up to the first
8836 snapshot. Hard disks attached to the virtual machine in all
8837 of the encountered snapshots are checked whether they are descendants of
8838 the given normal base or immutable hard disk. The first found child (which
8839 is the differencing hard disk) will be used instead of the normal base or
8840 immutable hard disk as a parent for creating a new differencing hard disk
8841 that will be actually attached to the machine. And only if no descendants
8842 are found or if the virtual machine does not have any snapshots then the
8843 normal base or immutable hard disk will be used itself as a parent for
8844 this differencing hard disk.
8845
8846 It is easier to explain what smart attachment does using the
8847 following example:
8848 <pre>
8849BEFORE attaching B.vdi: AFTER attaching B.vdi:
8850
8851Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8852 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8853 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8854 Snapshot 4 (none) Snapshot 4 (none)
8855 CurState (none) CurState (D3->D2.vdi)
8856
8857 NOT
8858 ...
8859 CurState (D3->B.vdi)
8860 </pre>
8861 The first column is the virtual machine configuration before the base hard
8862 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8863 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8864 mean that the hard disk that is actually attached to the machine is a
8865 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8866 another hard disk, <tt>B.vdi</tt>.
8867
8868 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8869 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8870 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8871 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8872 it cannot be attached directly and needs an indirect attachment (i.e.
8873 implicit creation of a new differencing hard disk). Due to the smart
8874 attachment procedure, the new differencing hard disk
8875 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8876 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8877 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8878 machine.
8879
8880 Note that if there is more than one descendant hard disk of the given base
8881 hard disk found in a snapshot, and there is an exact device, channel and
8882 bus match, then this exact match will be used. Otherwise, the youngest
8883 descendant will be picked up.
8884
8885 There is one more important aspect of the smart attachment procedure which
8886 is not related to snapshots at all. Before walking through the snapshots
8887 as described above, the backup copy of the current list of hard disk
8888 attachment is searched for descendants. This backup copy is created when
8889 the hard disk configuration is changed for the first time after the last
8890 <link to="IMachine::saveSettings"/> call and used by
8891 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8892 changes. When such a descendant is found in this backup copy, it will be
8893 simply re-attached back, without creating a new differencing hard disk for
8894 it. This optimization is necessary to make it possible to re-attach the
8895 base or immutable hard disk to a different bus, channel or device slot
8896 without losing the contents of the differencing hard disk actually
8897 attached to the machine in place of it.
8898 </desc>
8899
8900 <attribute name="format" type="wstring" readonly="yes">
8901 <desc>
8902 Storage format of this hard disk.
8903
8904 The value of this attribute is a string that specifies a backend used to
8905 store hard disk data. The storage format is defined when you create a
8906 new hard disk or automatically detected when you open an existing hard
8907 disk medium, and cannot be changed later.
8908
8909 The list of all storage formats supported by this VirtualBox
8910 installation can be obtained using
8911 <link to="ISystemProperties::hardDiskFormats"/>.
8912 </desc>
8913 </attribute>
8914
8915 <attribute name="type" type="HardDiskType">
8916 <desc>
8917 Type (role) of this hard disk.
8918
8919 The following constraints apply when changing the value of this
8920 attribute:
8921 <ul>
8922 <li>If a hard disk is attached to a virtual machine (either in the
8923 current state or in one of the snapshots), its type cannot be
8924 changed.
8925 </li>
8926 <li>As long as the hard disk has children, its type cannot be set
8927 to <link to="HardDiskType_Writethrough"/>.
8928 </li>
8929 <li>The type of all differencing hard disks is
8930 <link to="HardDiskType_Normal"/> and cannot be changed.
8931 </li>
8932 </ul>
8933
8934 The type of a newly created or opened hard disk is set to
8935 <link to="HardDiskType_Normal"/>.
8936 </desc>
8937 </attribute>
8938
8939 <attribute name="parent" type="IHardDisk" readonly="yes">
8940 <desc>
8941 Parent of this hard disk (a hard disk this hard disk is directly based
8942 on).
8943
8944 Only differencing hard disks have parents. For base (non-differencing)
8945 hard disks, @c null is returned.
8946 </desc>
8947 </attribute>
8948
8949 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
8950 <desc>
8951 Children of this hard disk (all differencing hard disks directly based
8952 on this hard disk). A @c null array is returned if this hard disk
8953 does not have any children.
8954 </desc>
8955 </attribute>
8956
8957 <attribute name="root" type="IHardDisk" readonly="yes">
8958 <desc>
8959 Root hard disk of this hard disk.
8960
8961 If this is a differencing hard disk, its root hard disk is the base hard
8962 disk the given hard disk branch starts from. For all other types of hard
8963 disks, this property returns the hard disk object itself (i.e. the same
8964 object this property is read on).
8965 </desc>
8966 </attribute>
8967
8968 <attribute name="readOnly" type="boolean" readonly="yes">
8969 <desc>
8970 Returns @c true if this hard disk is read-only and @c false otherwise.
8971
8972 A hard disk is considered to be read-only when its contents cannot be
8973 modified without breaking the integrity of other parties that depend on
8974 this hard disk such as its child hard disks or snapshots of virtual
8975 machines where this hard disk is attached to these machines. If there
8976 are no children and no such snapshots then there is no dependency and
8977 the hard disk is not read-only.
8978
8979 The value of this attribute can be used to determine the kind of the
8980 attachment that will take place when attaching this hard disk to a
8981 virtual machine. If the value is @c false then the hard disk will
8982 be attached directly. If the value is @c true then the hard disk
8983 will be attached indirectly by creating a new differencing child hard
8984 disk for that. See the interface description for more information.
8985
8986 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8987 disks are always read-only while all
8988 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8989 always not.
8990
8991 <note>
8992 The read-only condition represented by this attribute is related to
8993 the hard disk type and usage, not to the current
8994 <link to="IMedium::state">media state</link> and not to the read-only
8995 state of the storage unit.
8996 </note>
8997 </desc>
8998 </attribute>
8999
9000 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9001 <desc>
9002 Logical size of this hard disk (in megabytes), as reported to the
9003 guest OS running inside the virtual machine this disk is
9004 attached to. The logical size is defined when the hard disk is created
9005 and cannot be changed later.
9006
9007 <note>
9008 Reading this property on a differencing hard disk will return the size
9009 of its <link to="#root"/> hard disk.
9010 </note>
9011 <note>
9012 For hard disks whose state is <link to="#state"/> is <link
9013 to="MediaState_Inaccessible"/>, the value of this property is the
9014 last known logical size. For <link to="MediaState_NotCreated"/> hard
9015 disks, the returned value is zero.
9016 </note>
9017 </desc>
9018 </attribute>
9019
9020 <attribute name="autoReset" type="boolean">
9021 <desc>
9022 Whether this differencing hard disk will be automatically reset each
9023 time a virtual machine it is attached to is powered up.
9024
9025 See <link to="#reset()"/> for more information about resetting
9026 differencing hard disks.
9027
9028 <note>
9029 Reading this property on a base (non-differencing) hard disk will
9030 always @c false. Changing the value of this property in this
9031 case is not supported.
9032 </note>
9033
9034 <result name="VBOX_E_NOT_SUPPORTED">
9035 This is not a differencing hard disk (when changing the attribute
9036 value).
9037 </result>
9038 </desc>
9039 </attribute>
9040
9041 <!-- storage methods -->
9042
9043 <method name="getProperty">
9044 <desc>
9045 Returns the value of the custom hard disk property with the given name.
9046
9047 The list of all properties supported by the given hard disk format can
9048 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9049
9050 Note that if this method returns an empty string in @a value, the
9051 requested property is supported but currently not assigned any value.
9052
9053 <result name="VBOX_E_OBJECT_NOT_FOUND">
9054 Requested property does not exist (not supported by the format).
9055 </result>
9056 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9057 </desc>
9058 <param name="name" type="wstring" dir="in">
9059 <desc>Name of the property to get.</desc>
9060 </param>
9061 <param name="value" type="wstring" dir="return">
9062 <desc>Current property value.</desc>
9063 </param>
9064 </method>
9065
9066 <method name="setProperty">
9067 <desc>
9068 Sets the value of the custom hard disk property with the given name.
9069
9070 The list of all properties supported by the given hard disk format can
9071 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9072
9073 Note that setting the property value to @c null or an empty string is
9074 equivalent to deleting the existing value. A default value (if it is
9075 defined for this property) will be used by the format backend in this
9076 case.
9077
9078 <result name="VBOX_E_OBJECT_NOT_FOUND">
9079 Requested property does not exist (not supported by the format).
9080 </result>
9081 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9082 </desc>
9083 <param name="name" type="wstring" dir="in">
9084 <desc>Name of the property to set.</desc>
9085 </param>
9086 <param name="value" type="wstring" dir="in">
9087 <desc>Property value to set.</desc>
9088 </param>
9089 </method>
9090
9091 <method name="getProperties">
9092 <desc>
9093 Returns values for a group of properties in one call.
9094
9095 The names of the properties to get are specified using the @a names
9096 argument which is a list of comma-separated property names or
9097 an empty string if all properties are to be returned. Note that currently
9098 the value of this argument is ignored and the method always returns all
9099 existing properties.
9100
9101 The list of all properties supported by the given hard disk format can
9102 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9103
9104 The method returns two arrays, the array of property names corresponding
9105 to the @a names argument and the current values of these properties.
9106 Both arrays have the same number of elements with each elemend at the
9107 given index in the first array corresponds to an element at the same
9108 index in the second array.
9109
9110 Note that for properties that do not have assigned values,
9111 an empty string is returned at the appropriate index in the
9112 @a returnValues array.
9113
9114 </desc>
9115 <param name="names" type="wstring" dir="in">
9116 <desc>
9117 Names of properties to get.
9118 </desc>
9119 </param>
9120 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9121 <desc>Names of returned properties.</desc>
9122 </param>
9123 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9124 <desc>Values of returned properties.</desc>
9125 </param>
9126 </method>
9127
9128 <method name="setProperties">
9129 <desc>
9130 Sets values for a group of properties in one call.
9131
9132 The names of the properties to set are passed in the @a names
9133 array along with the new values for them in the @a values array. Both
9134 arrays have the same number of elements with each elemend at the given
9135 index in the first array corresponding to an element at the same index
9136 in the second array.
9137
9138 If there is at least one property name in @a names that is not valid,
9139 the method will fail before changing the values of any other properties
9140 from the @a names array.
9141
9142 Using this method over <link to="#setProperty"/> is preferred if you
9143 need to set several properties at once since it will result into less
9144 IPC calls.
9145
9146 The list of all properties supported by the given hard disk format can
9147 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9148
9149 Note that setting the property value to @c null or an empty string is
9150 equivalent to deleting the existing value. A default value (if it is
9151 defined for this property) will be used by the format backend in this
9152 case.
9153 </desc>
9154 <param name="names" type="wstring" safearray="yes" dir="in">
9155 <desc>Names of properties to set.</desc>
9156 </param>
9157 <param name="values" type="wstring" safearray="yes" dir="in">
9158 <desc>Values of properties to set.</desc>
9159 </param>
9160 </method>
9161
9162 <!-- storage methods -->
9163
9164 <method name="createBaseStorage">
9165 <desc>
9166 Starts creating a hard disk storage unit (fixed/dynamic, according
9167 to the variant flags) in in the background. The previous storage unit
9168 created for this object, if any, must first be deleted using
9169 <link to="#deleteStorage"/>, otherwise the operation will fail.
9170
9171 Before the operation starts, the hard disk is placed in
9172 <link to="MediaState_Creating"/> state. If the create operation
9173 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9174 state.
9175
9176 After the returned progress object reports that the operation has
9177 successfully completed, the media state will be set to <link
9178 to="MediaState_Created"/>, the hard disk will be remembered by this
9179 VirtualBox installation and may be attached to virtual machines.
9180
9181 <result name="VBOX_E_NOT_SUPPORTED">
9182 The variant of storage creation operation is not supported. See <link
9183 to="IHardDiskFormat::capabilities"/>.
9184 </result>
9185 </desc>
9186 <param name="logicalSize" type="unsigned long long" dir="in">
9187 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9188 </param>
9189 <param name="variant" type="HardDiskVariant" dir="in">
9190 <desc>Exact image variant which should be created.</desc>
9191 </param>
9192 <param name="progress" type="IProgress" dir="return">
9193 <desc>Progress object to track the operation completion.</desc>
9194 </param>
9195 </method>
9196
9197 <method name="deleteStorage">
9198 <desc>
9199 Starts deleting the storage unit of this hard disk.
9200
9201 The hard disk must not be attached to any known virtual machine and must
9202 not have any known child hard disks, otherwise the operation will fail.
9203 It will also fail if there is no storage unit to delete or if deletion
9204 is already in progress, or if the hard disk is being in use (locked for
9205 read or for write) or inaccessible. Therefore, the only valid state for
9206 this operation to succeed is <link to="MediaState_Created"/>.
9207
9208 Before the operation starts, the hard disk is placed to
9209 <link to="MediaState_Deleting"/> state and gets removed from the list
9210 of remembered hard disks (media registry). If the delete operation
9211 fails, the media will be remembered again and placed back to
9212 <link to="MediaState_Created"/> state.
9213
9214 After the returned progress object reports that the operation is
9215 complete, the media state will be set to
9216 <link to="MediaState_NotCreated"/> and you will be able to use one of
9217 the storage creation methods to create it again.
9218
9219 <see>#close()</see>
9220
9221 <result name="VBOX_E_OBJECT_IN_USE">
9222 Hard disk is attached to a virtual machine.
9223 </result>
9224 <result name="VBOX_E_NOT_SUPPORTED">
9225 Storage deletion is not allowed because neither of storage creation
9226 operations are supported. See
9227 <link to="IHardDiskFormat::capabilities"/>.
9228 </result>
9229
9230 <note>
9231 If the deletion operation fails, it is not guaranteed that the storage
9232 unit still exists. You may check the <link to="IMedium::state"/> value
9233 to answer this question.
9234 </note>
9235 </desc>
9236 <param name="progress" type="IProgress" dir="return">
9237 <desc>Progress object to track the operation completion.</desc>
9238 </param>
9239 </method>
9240
9241 <!-- diff methods -->
9242
9243 <method name="createDiffStorage">
9244 <desc>
9245 Starts creating an empty differencing storage unit based on this hard
9246 disk in the format and at the location defined by the @a target
9247 argument.
9248
9249 The target hard disk must be in <link to="MediaState_NotCreated"/>
9250 state (i.e. must not have an existing storage unit). Upon successful
9251 completion, this operation will set the type of the target hard disk to
9252 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9253 represent the differencing hard disk data in the given format (according
9254 to the storage format of the target object).
9255
9256 After the returned progress object reports that the operation is
9257 successfully complete, the target hard disk gets remembered by this
9258 VirtualBox installation and may be attached to virtual machines.
9259
9260 <note>
9261 The hard disk will be set to <link to="MediaState_LockedRead"/>
9262 state for the duration of this operation.
9263 </note>
9264 <result name="VBOX_E_OBJECT_IN_USE">
9265 Hard disk not in @c NotCreated state.
9266 </result>
9267 </desc>
9268 <param name="target" type="IHardDisk" dir="in">
9269 <desc>Target hard disk.</desc>
9270 </param>
9271 <param name="variant" type="HardDiskVariant" dir="in">
9272 <desc>Exact image variant which should be created.</desc>
9273 </param>
9274 <param name="progress" type="IProgress" dir="return">
9275 <desc>Progress object to track the operation completion.</desc>
9276 </param>
9277 </method>
9278
9279 <method name="mergeTo">
9280 <desc>
9281 Starts merging the contents of this hard disk and all intermediate
9282 differencing hard disks in the chain to the given target hard disk.
9283
9284 The target hard disk must be either a descendant of this hard disk or
9285 its ancestor (otherwise this method will immediately return a failure).
9286 It follows that there are two logical directions of the merge operation:
9287 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9288 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9289 chain:
9290
9291 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9292
9293 Here, calling this method on the <tt>Base</tt> hard disk object with
9294 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9295 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9296 merge. Note that in both cases the contents of the resulting hard disk
9297 will be the same, the only difference is the hard disk object that takes
9298 the result of the merge operation. In case of the forward merge in the
9299 above example, the result will be written to <tt>Diff_2</tt>; in case of
9300 the backward merge, the result will be written to <tt>Base</tt>. In
9301 other words, the result of the operation is always stored in the target
9302 hard disk.
9303
9304 Upon successful operation completion, the storage units of all hard
9305 disks in the chain between this (source) hard disk and the target hard
9306 disk, including the source hard disk itself, will be automatically
9307 deleted and the relevant hard disk objects (including this hard disk)
9308 will become uninitialized. This means that any attempt to call any of
9309 their methods or attributes will fail with the
9310 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9311 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9312 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9313 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9314 disk itself since it will no longer be based on any other hard disk.
9315
9316 Considering the above, all of the following conditions must be met in
9317 order for the merge operation to succeed:
9318 <ul>
9319 <li>
9320 Neither this (source) hard disk nor any intermediate
9321 differencing hard disk in the chain between it and the target
9322 hard disk is attached to any virtual machine.
9323 </li>
9324 <li>
9325 Neither the source hard disk nor the target hard disk is an
9326 <link to="HardDiskType_Immutable"/> hard disk.
9327 </li>
9328 <li>
9329 The part of the hard disk tree from the source hard disk to the
9330 target hard disk is a linear chain, i.e. all hard disks in this
9331 chain have exactly one child which is the next hard disk in this
9332 chain. The only exception from this rule is the target hard disk in
9333 the forward merge operation; it is allowed to have any number of
9334 child hard disks because the merge operation will hot change its
9335 logical contents (as it is seen by the guest OS or by children).
9336 </li>
9337 <li>
9338 None of the involved hard disks are in
9339 <link to="MediaState_LockedRead"/> or
9340 <link to="MediaState_LockedWrite"/> state.
9341 </li>
9342 </ul>
9343
9344 <note>
9345 This (source) hard disk and all intermediates will be placed to <link
9346 to="MediaState_Deleting"/> state and the target hard disk will be
9347 placed to <link to="MediaState_LockedWrite"/> state and for the
9348 duration of this operation.
9349 </note>
9350 </desc>
9351 <param name="targetId" type="wstring" dir="in">
9352 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9353 </param>
9354 <param name="progress" type="IProgress" dir="return">
9355 <desc>Progress object to track the operation completion.</desc>
9356 </param>
9357 </method>
9358
9359 <!-- clone method -->
9360
9361 <method name="cloneTo">
9362 <desc>
9363 Starts creating a clone of this hard disk in the format and at the
9364 location defined by the @a target argument.
9365
9366 The target hard disk must be either in <link to="MediaState_NotCreated"/>
9367 state (i.e. must not have an existing storage unit) or in
9368 <link to="MediaState_Created"/> state (i.e. created and not locked, and
9369 big enough to hold the data or else the copy will be partial). Upon
9370 successful completion, the cloned hard disk will contain exactly the
9371 same sector data as the hard disk being cloned, except that in the
9372 first case a new UUID for the clone will be randomly generated, and in
9373 the second case the UUID will remain unchanged.
9374
9375 The @a parent argument defines which hard disk will be the parent
9376 of the clone. Passing a @c null reference indicates that the clone will
9377 be a base image, i.e. completely independent. It is possible to specify
9378 an arbitrary hard disk for this parameter, including the parent of the
9379 hard disk which is being cloned. Even cloning to a child of the source
9380 hard disk is possible. Note that when cloning to an existing image, the
9381 @a parent irgument is ignored.
9382
9383 After the returned progress object reports that the operation is
9384 successfully complete, the target hard disk gets remembered by this
9385 VirtualBox installation and may be attached to virtual machines.
9386
9387 <note>
9388 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9389 state for the duration of this operation.
9390 </note>
9391 <result name="E_NOTIMPL">
9392 The specified cloning variant is not supported at the moment.
9393 </result>
9394 </desc>
9395 <param name="target" type="IHardDisk" dir="in">
9396 <desc>Target hard disk.</desc>
9397 </param>
9398 <param name="variant" type="HardDiskVariant" dir="in">
9399 <desc>Exact image variant which should be created.</desc>
9400 </param>
9401 <param name="parent" type="IHardDisk" dir="in">
9402 <desc>Parent of the cloned hard disk.</desc>
9403 </param>
9404 <param name="progress" type="IProgress" dir="return">
9405 <desc>Progress object to track the operation completion.</desc>
9406 </param>
9407 </method>
9408
9409 <!-- other methods -->
9410
9411 <method name="compact">
9412 <desc>
9413 Starts compacting of this hard disk. This means that the disk is
9414 transformed into a possibly more compact storage representation.
9415 This potentially creates temporary images, which can require a
9416 substantial amount of additional disk space.
9417
9418 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9419 state and all its parent hard disks (if any) will be placed to
9420 <link to="MediaState_LockedRead"/> state for the duration of this
9421 operation.
9422
9423 Please note that the results can be either returned straight away,
9424 or later as the result of the background operation via the object
9425 returned via the @a progress parameter.
9426
9427 <result name="VBOX_E_NOT_SUPPORTED">
9428 Hard disk format does not support compacting (but potentially
9429 needs it).
9430 </result>
9431 </desc>
9432 <param name="progress" type="IProgress" dir="return">
9433 <desc>Progress object to track the operation completion.</desc>
9434 </param>
9435 </method>
9436
9437 <method name="reset">
9438 <desc>
9439 Starts erasing the contents of this differencing hard disk.
9440
9441 This operation will reset the differencing hard disk to its initial
9442 state when it does not contain any sector data and any read operation is
9443 redirected to its parent hard disk.
9444
9445 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9446 for the duration of this operation.
9447
9448 <result name="VBOX_E_NOT_SUPPORTED">
9449 This is not a differencing hard disk.
9450 </result>
9451 <result name="VBOX_E_INVALID_OBJECT_STATE">
9452 Hard disk is not in <link to="MediaState_Created"/> or
9453 <link to="MediaState_Inaccessible"/> state.
9454 </result>
9455 </desc>
9456 <param name="progress" type="IProgress" dir="return">
9457 <desc>Progress object to track the operation completion.</desc>
9458 </param>
9459 </method>
9460
9461 </interface>
9462
9463
9464 <!--
9465 // IHardDiskFormat
9466 /////////////////////////////////////////////////////////////////////////
9467 -->
9468
9469 <enum
9470 name="DataType"
9471 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9472 >
9473 <const name="Int32" value="0"/>
9474 <const name="Int8" value="1"/>
9475 <const name="String" value="2"/>
9476 </enum>
9477
9478 <enum
9479 name="DataFlags"
9480 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9481 >
9482 <const name="None" value="0x00"/>
9483 <const name="Mandatory" value="0x01"/>
9484 <const name="Expert" value="0x02"/>
9485 <const name="Array" value="0x04"/>
9486 <const name="FlagMask" value="0x07"/>
9487 </enum>
9488
9489 <enum
9490 name="HardDiskFormatCapabilities"
9491 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9492 >
9493 <desc>
9494 Hard disk format capability flags.
9495 </desc>
9496
9497 <const name="Uuid" value="0x01">
9498 <desc>
9499 Supports UUIDs as expected by VirtualBox code.
9500 </desc>
9501 </const>
9502
9503 <const name="CreateFixed" value="0x02">
9504 <desc>
9505 Supports creating fixed size images, allocating all space instantly.
9506 </desc>
9507 </const>
9508
9509 <const name="CreateDynamic" value="0x04">
9510 <desc>
9511 Supports creating dynamically growing images, allocating space on
9512 demand.
9513 </desc>
9514 </const>
9515
9516 <const name="CreateSplit2G" value="0x08">
9517 <desc>
9518 Supports creating images split in chunks of a bit less than 2 GBytes.
9519 </desc>
9520 </const>
9521
9522 <const name="Differencing" value="0x10">
9523 <desc>
9524 Supports being used as a format for differencing hard disks (see <link
9525 to="IHardDisk::createDiffStorage"/>).
9526 </desc>
9527 </const>
9528
9529 <const name="Asynchronous" value="0x20">
9530 <desc>
9531 Supports asynchronous I/O operations for at least some configurations.
9532 </desc>
9533 </const>
9534
9535 <const name="File" value="0x40">
9536 <desc>
9537 The format backend operates on files (the <link to="IMedium::location"/>
9538 attribute of the hard disk specifies a file used to store hard disk
9539 data; for a list of supported file extensions see
9540 <link to="IHardDiskFormat::fileExtensions"/>).
9541 </desc>
9542 </const>
9543
9544 <const name="Properties" value="0x80">
9545 <desc>
9546 The format backend uses the property interface to configure the storage
9547 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9548 method is used to get access to properties supported by the given hard
9549 disk format).
9550 </desc>
9551 </const>
9552
9553 <const name="CapabilityMask" value="0xFF"/>
9554 </enum>
9555
9556 <interface
9557 name="IHardDiskFormat" extends="$unknown"
9558 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9559 wsmap="managed"
9560 >
9561 <desc>
9562 The IHardDiskFormat interface represents a virtual hard disk format.
9563
9564 Each hard disk format has an associated backend which is used to handle
9565 hard disks stored in this format. This interface provides information
9566 about the properties of the associated backend.
9567
9568 Each hard disk format is identified by a string represented by the
9569 <link to="#id"/> attribute. This string is used in calls like
9570 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9571 format.
9572
9573 The list of all supported hard disk formats can be obtained using
9574 <link to="ISystemProperties::hardDiskFormats"/>.
9575
9576 <see>IHardDisk</see>
9577 </desc>
9578
9579 <attribute name="id" type="wstring" readonly="yes">
9580 <desc>
9581 Identifier of this format.
9582
9583 The format identifier is a non-@c null non-empty ASCII string. Note that
9584 this string is case-insensitive. This means that, for example, all of
9585 the following strings:
9586 <pre>
9587 "VDI"
9588 "vdi"
9589 "VdI"</pre>
9590 refer to the same hard disk format.
9591
9592 This string is used in methods of other interfaces where it is necessary
9593 to specify a hard disk format, such as
9594 <link to="IVirtualBox::createHardDisk"/>.
9595 </desc>
9596 </attribute>
9597
9598 <attribute name="name" type="wstring" readonly="yes">
9599 <desc>
9600 Human readable description of this format.
9601
9602 Mainly for use in file open dialogs.
9603 </desc>
9604 </attribute>
9605
9606 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9607 <desc>
9608 Array of strings containing the supported file extensions.
9609
9610 The first extension in the array is the extension preferred by the
9611 backend. It is recommended to use this extension when specifying a
9612 location of the storage unit for a new hard disk.
9613
9614 Note that some backends do not work on files, so this array may be
9615 empty.
9616
9617 <see>IHardDiskFormat::capabilities</see>
9618 </desc>
9619 </attribute>
9620
9621 <attribute name="capabilities" type="unsigned long" readonly="yes">
9622 <desc>
9623 Capabilities of the format as a set of bit flags.
9624
9625 For the meaning of individual capability flags see
9626 <link to="HardDiskFormatCapabilities"/>.
9627 </desc>
9628 </attribute>
9629
9630 <method name="describeProperties">
9631 <desc>
9632 Returns several arrays describing the properties supported by this
9633 format.
9634
9635 An element with the given index in each array describes one
9636 property. Thus, the number of elements in each returned array is the
9637 same and corresponds to the number of supported properties.
9638
9639 The returned arrays are filled in only if the
9640 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9641 All arguments must be non-@c null.
9642
9643 <see>DataType</see>
9644 <see>DataFlags</see>
9645 </desc>
9646
9647 <param name="names" type="wstring" safearray="yes" dir="out">
9648 <desc>Array of property names.</desc>
9649 </param>
9650 <param name="description" type="wstring" safearray="yes" dir="out">
9651 <desc>Array of property descriptions.</desc>
9652 </param>
9653 <param name="types" type="DataType" safearray="yes" dir="out">
9654 <desc>Array of property types.</desc>
9655 </param>
9656 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9657 <desc>Array of property flags.</desc>
9658 </param>
9659 <param name="defaults" type="wstring" safearray="yes" dir="out">
9660 <desc>Array of default property values.</desc>
9661 </param>
9662 </method>
9663
9664 </interface>
9665
9666
9667 <!--
9668 // IFloppyImage
9669 /////////////////////////////////////////////////////////////////////////
9670 -->
9671
9672 <interface
9673 name="IFloppyImage" extends="IMedium"
9674 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9675 wsmap="managed"
9676 >
9677 <desc>
9678 The IFloppyImage interface represents a medium containing the image
9679 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9680 </desc>
9681
9682 </interface>
9683
9684
9685 <!--
9686 // IDVDImage
9687 /////////////////////////////////////////////////////////////////////////
9688 -->
9689
9690 <interface
9691 name="IDVDImage" extends="IMedium"
9692 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9693 wsmap="managed"
9694 >
9695 <desc>
9696 The IDVDImage interface represents a medium containing the image
9697 of a CD or DVD disk in the ISO format.
9698
9699 This is a subclass of <link to="IMedium" />; see remarks there.
9700 </desc>
9701
9702 </interface>
9703
9704
9705 <!--
9706 // IDVDDrive
9707 /////////////////////////////////////////////////////////////////////////
9708 -->
9709
9710 <interface
9711 name="IDVDDrive" extends="$unknown"
9712 uuid="156944d1-4c6d-4812-8f12-ab3890767ab4"
9713 wsmap="managed"
9714 >
9715 <desc>
9716 The IDVDDrive interface represents the virtual CD/DVD drive of the
9717 virtual machine. An object of this type is returned by
9718 <link to="IMachine::DVDDrive"/>.
9719 </desc>
9720
9721 <attribute name="state" type="DriveState" readonly="yes">
9722 <desc>Current drive state.</desc>
9723 </attribute>
9724
9725 <attribute name="passthrough" type="boolean">
9726 <desc>
9727 When a host drive is mounted and passthrough is enabled
9728 the guest OS will be able to directly send SCSI commands to
9729 the host drive. This enables the guest OS to use CD/DVD writers
9730 but is potentially dangerous.
9731 </desc>
9732 </attribute>
9733
9734 <method name="mountImage">
9735 <desc>Mounts a CD/DVD image with the specified UUID.
9736
9737 <result name="VBOX_E_FILE_ERROR">
9738 Invalid image file location.
9739 </result>
9740 <result name="VBOX_E_OBJECT_NOT_FOUND">
9741 Could not find a CD/DVD image matching @a imageId.
9742 </result>
9743 <result name="VBOX_E_INVALID_OBJECT_STATE">
9744 Invalid media state.
9745 </result>
9746
9747 </desc>
9748 <param name="imageId" type="wstring" dir="in"/>
9749 </method>
9750
9751 <method name="captureHostDrive">
9752 <desc>Captures the specified host CD/DVD drive.</desc>
9753 <param name="drive" type="IHostDVDDrive" dir="in"/>
9754 </method>
9755
9756 <method name="unmount">
9757 <desc>Unmounts the currently mounted image or host drive.</desc>
9758 </method>
9759
9760 <method name="getImage">
9761 <desc>Returns the currently mounted CD/DVD image.</desc>
9762 <param name="image" type="IDVDImage" dir="return"/>
9763 </method>
9764
9765 <method name="getHostDrive">
9766 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9767 <param name="drive" type="IHostDVDDrive" dir="return"/>
9768 </method>
9769
9770 </interface>
9771
9772
9773 <!--
9774 // IFloppyDrive
9775 /////////////////////////////////////////////////////////////////////////
9776 -->
9777
9778 <interface
9779 name="IFloppyDrive" extends="$unknown"
9780 uuid="a8676d38-5cf0-4b53-85b1-aa693611ab86"
9781 wsmap="managed"
9782 >
9783 <desc>
9784 The IFloppyDrive interface represents the virtual floppy drive of the
9785 virtual machine. An object of this type is returned by
9786 <link to="IMachine::floppyDrive" />.
9787 </desc>
9788
9789 <attribute name="enabled" type="boolean">
9790 <desc>
9791 Flag whether the floppy drive is enabled. If it is disabled,
9792 the floppy drive will not be reported to the guest OS.
9793 </desc>
9794 </attribute>
9795
9796 <attribute name="state" type="DriveState" readonly="yes">
9797 <desc>Current drive state.</desc>
9798 </attribute>
9799
9800 <method name="mountImage">
9801 <desc>Mounts a floppy image with the specified UUID.
9802
9803 <result name="VBOX_E_FILE_ERROR">
9804 Invalid image file location.
9805 </result>
9806 <result name="VBOX_E_OBJECT_NOT_FOUND">
9807 Could not find a floppy image matching @a imageID.
9808 </result>
9809 <result name="VBOX_E_INVALID_OBJECT_STATE">
9810 Invalid media state.
9811 </result>
9812
9813 </desc>
9814 <param name="imageId" type="wstring" dir="in"/>
9815 </method>
9816
9817 <method name="captureHostDrive">
9818 <desc>Captures the specified host floppy drive.</desc>
9819 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9820 </method>
9821
9822 <method name="unmount">
9823 <desc>Unmounts the currently mounted image or host drive.</desc>
9824 </method>
9825
9826 <method name="getImage">
9827 <desc>Returns the currently mounted floppy image.</desc>
9828 <param name="image" type="IFloppyImage" dir="return"/>
9829 </method>
9830
9831 <method name="getHostDrive">
9832 <desc>Returns the currently mounted host floppy drive.</desc>
9833 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9834 </method>
9835
9836 </interface>
9837
9838
9839 <!--
9840 // IKeyboard
9841 /////////////////////////////////////////////////////////////////////////
9842 -->
9843
9844 <interface
9845 name="IKeyboard" extends="$unknown"
9846 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9847 wsmap="managed"
9848 >
9849 <desc>
9850 The IKeyboard interface represents the virtual machine's keyboard. Used
9851 in <link to="IConsole::keyboard"/>.
9852
9853 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9854 to the virtual machine.
9855
9856 </desc>
9857 <method name="putScancode">
9858 <desc>Sends a scancode to the keyboard.
9859
9860 <result name="VBOX_E_IPRT_ERROR">
9861 Could not send scan code to virtual keyboard.
9862 </result>
9863
9864 </desc>
9865 <param name="scancode" type="long" dir="in"/>
9866 </method>
9867
9868 <method name="putScancodes">
9869 <desc>Sends an array of scancodes to the keyboard.
9870
9871 <result name="VBOX_E_IPRT_ERROR">
9872 Could not send all scan codes to virtual keyboard.
9873 </result>
9874
9875 </desc>
9876 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9877 <param name="codesStored" type="unsigned long" dir="return"/>
9878 </method>
9879
9880 <method name="putCAD">
9881 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9882 function is nothing special, it is just a convenience function
9883 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9884
9885 <result name="VBOX_E_IPRT_ERROR">
9886 Could not send all scan codes to virtual keyboard.
9887 </result>
9888
9889 </desc>
9890 </method>
9891
9892 </interface>
9893
9894
9895 <!--
9896 // IMouse
9897 /////////////////////////////////////////////////////////////////////////
9898 -->
9899
9900 <enum
9901 name="MouseButtonState"
9902 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9903 >
9904 <desc>
9905 Mouse button state.
9906 </desc>
9907
9908 <const name="LeftButton" value="0x01"/>
9909 <const name="RightButton" value="0x02"/>
9910 <const name="MiddleButton" value="0x04"/>
9911 <const name="WheelUp" value="0x08"/>
9912 <const name="WheelDown" value="0x10"/>
9913 <const name="XButton1" value="0x20"/>
9914 <const name="XButton2" value="0x40"/>
9915 <const name="MouseStateMask" value="0x7F"/>
9916 </enum>
9917
9918 <interface
9919 name="IMouse" extends="$unknown"
9920 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9921 wsmap="managed"
9922 >
9923 <desc>
9924 The IMouse interface represents the virtual machine's mouse. Used in
9925 <link to="IConsole::mouse"/>.
9926
9927 Through this interface, the virtual machine's virtual mouse can be
9928 controlled.
9929 </desc>
9930
9931 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9932 <desc>
9933 Whether the guest OS supports absolute mouse pointer positioning
9934 or not.
9935 <note>
9936 VirtualBox Guest Tools need to be installed to the guest OS
9937 in order to enable absolute mouse positioning support.
9938 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9939 callback to be instantly informed about changes of this attribute
9940 during virtual machine execution.
9941 </note>
9942 <see><link to="#putMouseEventAbsolute"/></see>
9943 </desc>
9944 </attribute>
9945
9946 <method name="putMouseEvent">
9947 <desc>
9948 Initiates a mouse event using relative pointer movements
9949 along x and y axis.
9950
9951 <result name="E_ACCESSDENIED">
9952 Console not powered up.
9953 </result>
9954 <result name="VBOX_E_IPRT_ERROR">
9955 Could not send mouse event to virtual mouse.
9956 </result>
9957
9958 </desc>
9959
9960 <param name="dx" type="long" dir="in">
9961 <desc>
9962 Amount of pixels the mouse should move to the right.
9963 Negative values move the mouse to the left.
9964 </desc>
9965 </param>
9966 <param name="dy" type="long" dir="in">
9967 <desc>
9968 Amount of pixels the mouse should move downwards.
9969 Negative values move the mouse upwards.
9970 </desc>
9971 </param>
9972 <param name="dz" type="long" dir="in">
9973 <desc>
9974 Amount of mouse wheel moves.
9975 Positive values describe clockwise wheel rotations,
9976 negative values describe counterclockwise rotations.
9977 </desc>
9978 </param>
9979 <param name="dw" type="long" dir="in">
9980 <desc>
9981 Amount of horizontal mouse wheel moves.
9982 Positive values describe a movement to the left,
9983 negative values describe a movement to the right.
9984 </desc>
9985 </param>
9986 <param name="buttonState" type="long" dir="in">
9987 <desc>
9988 The current state of mouse buttons. Every bit represents
9989 a mouse button as follows:
9990 <table>
9991 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9992 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9993 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9994 </table>
9995 A value of <tt>1</tt> means the corresponding button is pressed.
9996 otherwise it is released.
9997 </desc>
9998 </param>
9999 </method>
10000
10001 <method name="putMouseEventAbsolute">
10002 <desc>
10003 Positions the mouse pointer using absolute x and y coordinates.
10004 These coordinates are expressed in pixels and
10005 start from <tt>[1,1]</tt> which corresponds to the top left
10006 corner of the virtual display.
10007
10008 <result name="E_ACCESSDENIED">
10009 Console not powered up.
10010 </result>
10011 <result name="VBOX_E_IPRT_ERROR">
10012 Could not send mouse event to virtual mouse.
10013 </result>
10014
10015 <note>
10016 This method will have effect only if absolute mouse
10017 positioning is supported by the guest OS.
10018 </note>
10019
10020 <see><link to="#absoluteSupported"/></see>
10021 </desc>
10022
10023 <param name="x" type="long" dir="in">
10024 <desc>
10025 X coordinate of the pointer in pixels, starting from @c 1.
10026 </desc>
10027 </param>
10028 <param name="y" type="long" dir="in">
10029 <desc>
10030 Y coordinate of the pointer in pixels, starting from @c 1.
10031 </desc>
10032 </param>
10033 <param name="dz" type="long" dir="in">
10034 <desc>
10035 Amount of mouse wheel moves.
10036 Positive values describe clockwise wheel rotations,
10037 negative values describe counterclockwise rotations.
10038 </desc>
10039 </param>
10040 <param name="dw" type="long" dir="in">
10041 <desc>
10042 Amount of horizontal mouse wheel moves.
10043 Positive values describe a movement to the left,
10044 negative values describe a movement to the right.
10045 </desc>
10046 </param>
10047 <param name="buttonState" type="long" dir="in">
10048 <desc>
10049 The current state of mouse buttons. Every bit represents
10050 a mouse button as follows:
10051 <table>
10052 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10053 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10054 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10055 </table>
10056 A value of @c 1 means the corresponding button is pressed.
10057 otherwise it is released.
10058 </desc>
10059 </param>
10060 </method>
10061
10062 </interface>
10063
10064 <!--
10065 // IDisplay
10066 /////////////////////////////////////////////////////////////////////////
10067 -->
10068
10069 <enum
10070 name="FramebufferPixelFormat"
10071 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10072 >
10073 <desc>
10074 Format of the video memory buffer. Constants represented by this enum can
10075 be used to test for particular values of <link
10076 to="IFramebuffer::pixelFormat"/>. See also <link
10077 to="IFramebuffer::requestResize"/>.
10078
10079 See also www.fourcc.org for more information about FOURCC pixel formats.
10080 </desc>
10081
10082 <const name="Opaque" value="0">
10083 <desc>
10084 Unknown buffer format (the user may not assume any particular format of
10085 the buffer).
10086 </desc>
10087 </const>
10088 <const name="FOURCC_RGB" value="0x32424752">
10089 <desc>
10090 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10091 bit layout).
10092 </desc>
10093 </const>
10094 </enum>
10095
10096 <interface
10097 name="IFramebuffer" extends="$unknown"
10098 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10099 wsmap="suppress"
10100 >
10101 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10102 <desc>Address of the start byte of the frame buffer.</desc>
10103 </attribute>
10104
10105 <attribute name="width" type="unsigned long" readonly="yes">
10106 <desc>Frame buffer width, in pixels.</desc>
10107 </attribute>
10108
10109 <attribute name="height" type="unsigned long" readonly="yes">
10110 <desc>Frame buffer height, in pixels.</desc>
10111 </attribute>
10112
10113 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10114 <desc>
10115 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10116 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10117 are: 8, 15, 16, 24 and 32.
10118 </desc>
10119 </attribute>
10120
10121 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10122 <desc>
10123 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10124 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10125 size of the scan line must be aligned to 32 bits.
10126 </desc>
10127 </attribute>
10128
10129 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10130 <desc>
10131 Frame buffer pixel format. It's either one of the values defined by <link
10132 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10133 <note>
10134 This attribute must never return <link
10135 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10136 <link to="#address"/> points to must be always known.
10137 </note>
10138 </desc>
10139 </attribute>
10140
10141 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10142 <desc>
10143 Defines whether this frame buffer uses the virtual video card's memory
10144 buffer (guest VRAM) directly or not. See <link
10145 to="IFramebuffer::requestResize"/> for more information.
10146 </desc>
10147 </attribute>
10148
10149 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10150 <desc>
10151 Hint from the frame buffer about how much of the standard
10152 screen height it wants to use for itself. This information is
10153 exposed to the guest through the VESA BIOS and VMMDev interface
10154 so that it can use it for determining its video mode table. It
10155 is not guaranteed that the guest respects the value.
10156 </desc>
10157 </attribute>
10158
10159 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10160 <desc>
10161 An alpha-blended overlay which is superposed over the frame buffer.
10162 The initial purpose is to allow the display of icons providing
10163 information about the VM state, including disk activity, in front
10164 ends which do not have other means of doing that. The overlay is
10165 designed to controlled exclusively by IDisplay. It has no locking
10166 of its own, and any changes made to it are not guaranteed to be
10167 visible until the affected portion of IFramebuffer is updated. The
10168 overlay can be created lazily the first time it is requested. This
10169 attribute can also return @c null to signal that the overlay is not
10170 implemented.
10171 </desc>
10172 </attribute>
10173
10174 <attribute name="winId" type="unsigned long long" readonly="yes">
10175 <desc>
10176 Platform-dependent identifier of the window where context of this
10177 frame buffer is drawn, or zero if there's no such window.
10178 </desc>
10179 </attribute>
10180
10181 <method name="lock">
10182 <desc>
10183 Locks the frame buffer.
10184 Gets called by the IDisplay object where this frame buffer is
10185 bound to.
10186 </desc>
10187 </method>
10188
10189 <method name="unlock">
10190 <desc>
10191 Unlocks the frame buffer.
10192 Gets called by the IDisplay object where this frame buffer is
10193 bound to.
10194 </desc>
10195 </method>
10196
10197 <method name="notifyUpdate">
10198 <desc>
10199 Informs about an update.
10200 Gets called by the display object where this buffer is
10201 registered.
10202 </desc>
10203 <param name="x" type="unsigned long" dir="in"/>
10204 <param name="y" type="unsigned long" dir="in"/>
10205 <param name="width" type="unsigned long" dir="in"/>
10206 <param name="height" type="unsigned long" dir="in"/>
10207 </method>
10208
10209 <method name="requestResize">
10210 <desc>
10211 Requests a size and pixel format change.
10212
10213 There are two modes of working with the video buffer of the virtual
10214 machine. The <i>indirect</i> mode implies that the IFramebuffer
10215 implementation allocates a memory buffer for the requested display mode
10216 and provides it to the virtual machine. In <i>direct</i> mode, the
10217 IFramebuffer implementation uses the memory buffer allocated and owned
10218 by the virtual machine. This buffer represents the video memory of the
10219 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10220 usually faster because the implementation gets a raw pointer to the
10221 guest VRAM buffer which it can directly use for visualizing the contents
10222 of the virtual display, as opposed to the indirect mode where the
10223 contents of guest VRAM are copied to the memory buffer provided by
10224 the implementation every time a display update occurs.
10225
10226 It is important to note that the direct mode is really fast only when
10227 the implementation uses the given guest VRAM buffer directly, for
10228 example, by blitting it to the window representing the virtual machine's
10229 display, which saves at least one copy operation comparing to the
10230 indirect mode. However, using the guest VRAM buffer directly is not
10231 always possible: the format and the color depth of this buffer may be
10232 not supported by the target window, or it may be unknown (opaque) as in
10233 case of text or non-linear multi-plane VGA video modes. In this case,
10234 the indirect mode (that is always available) should be used as a
10235 fallback: when the guest VRAM contents are copied to the
10236 implementation-provided memory buffer, color and format conversion is
10237 done automatically by the underlying code.
10238
10239 The @a pixelFormat parameter defines whether the direct mode is
10240 available or not. If @a pixelFormat is <link
10241 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10242 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10243 @a bytesPerLine parameters must be ignored and the implementation must use
10244 the indirect mode (where it provides its own buffer in one of the
10245 supported formats). In all other cases, @a pixelFormat together with
10246 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10247 buffer pointed to by the @a VRAM parameter and the implementation is
10248 free to choose which mode to use. To indicate that this frame buffer uses
10249 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10250 attribute must return @c true and <link to="#address"/> must
10251 return exactly the same address that is passed in the @a VRAM parameter
10252 of this method; otherwise it is assumed that the indirect strategy is
10253 chosen.
10254
10255 The @a width and @a height parameters represent the size of the
10256 requested display mode in both modes. In case of indirect mode, the
10257 provided memory buffer should be big enough to store data of the given
10258 display mode. In case of direct mode, it is guaranteed that the given
10259 @a VRAM buffer contains enough space to represent the display mode of the
10260 given size. Note that this frame buffer's <link to="#width"/> and <link
10261 to="#height"/> attributes must return exactly the same values as
10262 passed to this method after the resize is completed (see below).
10263
10264 The @a finished output parameter determines if the implementation has
10265 finished resizing the frame buffer or not. If, for some reason, the
10266 resize cannot be finished immediately during this call, @a finished
10267 must be set to @c false, and the implementation must call
10268 <link to="IDisplay::resizeCompleted"/> after it has returned from
10269 this method as soon as possible. If @a finished is @c false, the
10270 machine will not call any frame buffer methods until
10271 <link to="IDisplay::resizeCompleted"/> is called.
10272
10273 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10274 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10275 this frame buffer must return exactly the same values as specified in the
10276 parameters of this method, after the resize is completed. If the
10277 indirect mode is chosen, these attributes must return values describing
10278 the format of the implementation's own memory buffer <link
10279 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10280 value must always correlate with <link to="#pixelFormat"/>. Note that
10281 the <link to="#pixelFormat"/> attribute must never return <link
10282 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10283
10284 <note>
10285 This method is called by the IDisplay object under the
10286 <link to="#lock"/> provided by this IFramebuffer
10287 implementation. If this method returns @c false in @a finished, then
10288 this lock is not released until
10289 <link to="IDisplay::resizeCompleted"/> is called.
10290 </note>
10291 </desc>
10292 <param name="screenId" type="unsigned long" dir="in">
10293 <desc>
10294 Logical screen number. Must be used in the corresponding call to
10295 <link to="IDisplay::resizeCompleted"/> if this call is made.
10296 </desc>
10297 </param>
10298 <param name="pixelFormat" type="unsigned long" dir="in">
10299 <desc>
10300 Pixel format of the memory buffer pointed to by @a VRAM.
10301 See also <link to="FramebufferPixelFormat"/>.
10302 </desc>
10303 </param>
10304 <param name="VRAM" type="octet" mod="ptr" dir="in">
10305 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10306 </param>
10307 <param name="bitsPerPixel" type="unsigned long" dir="in">
10308 <desc>Color depth, bits per pixel.</desc>
10309 </param>
10310 <param name="bytesPerLine" type="unsigned long" dir="in">
10311 <desc>Size of one scan line, in bytes.</desc>
10312 </param>
10313 <param name="width" type="unsigned long" dir="in">
10314 <desc>Width of the guest display, in pixels.</desc>
10315 </param>
10316 <param name="height" type="unsigned long" dir="in">
10317 <desc>Height of the guest display, in pixels.</desc>
10318 </param>
10319 <param name="finished" type="boolean" dir="return">
10320 <desc>
10321 Can the VM start using the new frame buffer immediately
10322 after this method returns or it should wait for
10323 <link to="IDisplay::resizeCompleted"/>.
10324 </desc>
10325 </param>
10326 </method>
10327
10328 <method name="videoModeSupported">
10329 <desc>
10330 Returns whether the frame buffer implementation is willing to
10331 support a given video mode. In case it is not able to render
10332 the video mode (or for some reason not willing), it should
10333 return @c false. Usually this method is called when the guest
10334 asks the VMM device whether a given video mode is supported
10335 so the information returned is directly exposed to the guest.
10336 It is important that this method returns very quickly.
10337 </desc>
10338 <param name="width" type="unsigned long" dir="in"/>
10339 <param name="height" type="unsigned long" dir="in"/>
10340 <param name="bpp" type="unsigned long" dir="in"/>
10341 <param name="supported" type="boolean" dir="return"/>
10342 </method>
10343
10344 <method name="getVisibleRegion">
10345 <desc>
10346 Returns the visible region of this frame buffer.
10347
10348 If the @a rectangles parameter is @c null then the value of the
10349 @a count parameter is ignored and the number of elements necessary to
10350 describe the current visible region is returned in @a countCopied.
10351
10352 If @a rectangles is not @c null but @a count is less
10353 than the required number of elements to store region data, the method
10354 will report a failure. If @a count is equal or greater than the
10355 required number of elements, then the actual number of elements copied
10356 to the provided array will be returned in @a countCopied.
10357
10358 <note>
10359 The address of the provided array must be in the process space of
10360 this IFramebuffer object.
10361 </note>
10362 <note>
10363 Method not yet implemented.
10364 </note>
10365 </desc>
10366 <param name="rectangles" type="octet" mod="ptr" dir="in">
10367 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10368 </param>
10369 <param name="count" type="unsigned long" dir="in">
10370 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10371 </param>
10372 <param name="countCopied" type="unsigned long" dir="return">
10373 <desc>Number of elements copied to the @a rectangles array.</desc>
10374 </param>
10375 </method>
10376
10377 <method name="setVisibleRegion">
10378 <desc>
10379 Suggests a new visible region to this frame buffer. This region
10380 represents the area of the VM display which is a union of regions of
10381 all top-level windows of the guest operating system running inside the
10382 VM (if the Guest Additions for this system support this
10383 functionality). This information may be used by the frontends to
10384 implement the seamless desktop integration feature.
10385
10386 <note>
10387 The address of the provided array must be in the process space of
10388 this IFramebuffer object.
10389 </note>
10390 <note>
10391 The IFramebuffer implementation must make a copy of the provided
10392 array of rectangles.
10393 </note>
10394 <note>
10395 Method not yet implemented.
10396 </note>
10397 </desc>
10398 <param name="rectangles" type="octet" mod="ptr" dir="in">
10399 <desc>Pointer to the @c RTRECT array.</desc>
10400 </param>
10401 <param name="count" type="unsigned long" dir="in">
10402 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10403 </param>
10404 </method>
10405
10406 <method name="processVHWACommand">
10407 <desc>
10408 Posts a Video HW Acceleration Command to the frame buffer for processing.
10409 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10410 are posted from quest to the host to be processed by the host hardware.
10411
10412 <note>
10413 The address of the provided command must be in the process space of
10414 this IFramebuffer object.
10415 </note>
10416 </desc>
10417
10418 <param name="command" type="octet" mod="ptr" dir="in">
10419 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10420 </param>
10421 </method>
10422
10423 </interface>
10424
10425 <interface
10426 name="IFramebufferOverlay" extends="IFramebuffer"
10427 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10428 wsmap="suppress"
10429 >
10430 <desc>
10431 The IFramebufferOverlay interface represents an alpha blended overlay
10432 for displaying status icons above an IFramebuffer. It is always created
10433 not visible, so that it must be explicitly shown. It only covers a
10434 portion of the IFramebuffer, determined by its width, height and
10435 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10436 that order) format, and may be written to directly. Do re-read the
10437 width though, after setting it, as it may be adjusted (increased) to
10438 make it more suitable for the front end.
10439 </desc>
10440 <attribute name="x" type="unsigned long" readonly="yes">
10441 <desc>X position of the overlay, relative to the frame buffer.</desc>
10442 </attribute>
10443
10444 <attribute name="y" type="unsigned long" readonly="yes">
10445 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10446 </attribute>
10447
10448 <attribute name="visible" type="boolean" readonly="no">
10449 <desc>
10450 Whether the overlay is currently visible.
10451 </desc>
10452 </attribute>
10453
10454 <attribute name="alpha" type="unsigned long" readonly="no">
10455 <desc>
10456 The global alpha value for the overlay. This may or may not be
10457 supported by a given front end.
10458 </desc>
10459 </attribute>
10460
10461 <method name="move">
10462 <desc>
10463 Changes the overlay's position relative to the IFramebuffer.
10464 </desc>
10465 <param name="x" type="unsigned long" dir="in"/>
10466 <param name="y" type="unsigned long" dir="in"/>
10467 </method>
10468
10469 </interface>
10470
10471 <interface
10472 name="IDisplay" extends="$unknown"
10473 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10474 wsmap="managed"
10475 >
10476 <desc>
10477 The IDisplay interface represents the virtual machine's display.
10478
10479 The object implementing this interface is contained in each
10480 <link to="IConsole::display"/> attribute and represents the visual
10481 output of the virtual machine.
10482
10483 The virtual display supports pluggable output targets represented by the
10484 IFramebuffer interface. Examples of the output target are a window on
10485 the host computer or an RDP session's display on a remote computer.
10486 </desc>
10487 <attribute name="width" type="unsigned long" readonly="yes">
10488 <desc>Current display width.</desc>
10489 </attribute>
10490
10491 <attribute name="height" type="unsigned long" readonly="yes">
10492 <desc>Current display height.</desc>
10493 </attribute>
10494
10495 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10496 <desc>
10497 Current guest display color depth. Note that this may differ
10498 from <link to="IFramebuffer::bitsPerPixel"/>.
10499 </desc>
10500 </attribute>
10501
10502 <method name="setFramebuffer">
10503 <desc>
10504 Sets the framebuffer for given screen.
10505 </desc>
10506 <param name="screenId" type="unsigned long" dir="in"/>
10507 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10508 </method>
10509
10510 <method name="getFramebuffer">
10511 <desc>
10512 Queries the framebuffer for given screen.
10513 </desc>
10514 <param name="screenId" type="unsigned long" dir="in"/>
10515 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10516 <param name="xOrigin" type="long" dir="out"/>
10517 <param name="yOrigin" type="long" dir="out"/>
10518 </method>
10519
10520 <method name="setVideoModeHint">
10521 <desc>
10522 Asks VirtualBox to request the given video mode from
10523 the guest. This is just a hint and it cannot be guaranteed
10524 that the requested resolution will be used. Guest Additions
10525 are required for the request to be seen by guests. The caller
10526 should issue the request and wait for a resolution change and
10527 after a timeout retry.
10528
10529 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10530 parameters means that the corresponding values should be taken from the
10531 current video mode (i.e. left unchanged).
10532
10533 If the guest OS supports multi-monitor configuration then the @a display
10534 parameter specifies the number of the guest display to send the hint to:
10535 @c 0 is the primary display, @c 1 is the first secondary and
10536 so on. If the multi-monitor configuration is not supported, @a display
10537 must be @c 0.
10538
10539 <result name="E_INVALIDARG">
10540 The @a display is not associated with any monitor.
10541 </result>
10542
10543 </desc>
10544 <param name="width" type="unsigned long" dir="in"/>
10545 <param name="height" type="unsigned long" dir="in"/>
10546 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10547 <param name="display" type="unsigned long" dir="in"/>
10548 </method>
10549
10550 <method name="setSeamlessMode">
10551 <desc>
10552 Enables or disables seamless guest display rendering (seamless desktop
10553 integration) mode.
10554 <note>
10555 Calling this method has no effect if <link
10556 to="IGuest::supportsSeamless"/> returns @c false.
10557 </note>
10558 </desc>
10559 <param name="enabled" type="boolean" dir="in"/>
10560 </method>
10561
10562 <method name="takeScreenShot">
10563 <desc>
10564 Takes a screen shot of the requested size and copies it to the
10565 32-bpp buffer allocated by the caller and pointed to by @a address.
10566
10567 <note>This API can be used only by the COM/XPCOM C++ API as it
10568 requires pointer support. Use <link to="#takeScreenShotSlow" />
10569 with other language bindings.
10570 </note>
10571
10572 <result name="E_NOTIMPL">
10573 Feature not implemented.
10574 </result>
10575 <result name="VBOX_E_IPRT_ERROR">
10576 Could not take a screenshot.
10577 </result>
10578
10579 </desc>
10580 <param name="address" type="octet" mod="ptr" dir="in"/>
10581 <param name="width" type="unsigned long" dir="in"/>
10582 <param name="height" type="unsigned long" dir="in"/>
10583 </method>
10584
10585 <method name="takeScreenShotSlow">
10586 <desc>
10587 Takes a guest screen shot of the requested size and returns it as
10588 an array of bytes in uncompressed 32-bit ARGB format.
10589 This API is slow, but could be the only option to get guest screenshot
10590 for scriptable languages not allowed to manipulate with addresses
10591 directly.
10592
10593 <result name="E_NOTIMPL">
10594 Feature not implemented.
10595 </result>
10596 <result name="VBOX_E_IPRT_ERROR">
10597 Could not take a screenshot.
10598 </result>
10599 </desc>
10600 <param name="width" type="unsigned long" dir="in">
10601 <desc>
10602 Desired image width.
10603 </desc>
10604 </param>
10605 <param name="height" type="unsigned long" dir="in">
10606 <desc>
10607 Desired image height.
10608 </desc>
10609 </param>
10610 <param name="screenData" type="octet" dir="return" safearray="yes">
10611 <desc>
10612 Array with resulting screen data.
10613 </desc>
10614 </param>
10615 </method>
10616
10617 <method name="drawToScreen">
10618 <desc>
10619 Draws a 32-bpp image of the specified size from the given buffer
10620 to the given point on the VM display.
10621
10622 <result name="E_NOTIMPL">
10623 Feature not implemented.
10624 </result>
10625 <result name="VBOX_E_IPRT_ERROR">
10626 Could not draw to screen.
10627 </result>
10628
10629 </desc>
10630 <param name="address" type="octet" mod="ptr" dir="in"/>
10631 <param name="x" type="unsigned long" dir="in"/>
10632 <param name="y" type="unsigned long" dir="in"/>
10633 <param name="width" type="unsigned long" dir="in"/>
10634 <param name="height" type="unsigned long" dir="in"/>
10635 </method>
10636
10637 <method name="invalidateAndUpdate">
10638 <desc>
10639 Does a full invalidation of the VM display and instructs the VM
10640 to update it.
10641
10642 <result name="VBOX_E_IPRT_ERROR">
10643 Could not invalidate and update screen.
10644 </result>
10645
10646 </desc>
10647 </method>
10648
10649 <method name="resizeCompleted">
10650 <desc>
10651 Signals that a framebuffer has completed the resize operation.
10652
10653 <result name="VBOX_E_NOT_SUPPORTED">
10654 Operation only valid for external frame buffers.
10655 </result>
10656
10657 </desc>
10658 <param name="screenId" type="unsigned long" dir="in"/>
10659 </method>
10660
10661 <method name="updateCompleted">
10662 <desc>
10663 Signals that a framebuffer has completed the update operation.
10664
10665 <result name="VBOX_E_NOT_SUPPORTED">
10666 Operation only valid for external frame buffers.
10667 </result>
10668
10669 </desc>
10670 </method>
10671
10672 <method name="completeVHWACommand">
10673 <desc>
10674 Signals that the Video HW Acceleration command has completed.
10675 </desc>
10676
10677 <param name="command" type="octet" mod="ptr" dir="in">
10678 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10679 </param>
10680 </method>
10681
10682 </interface>
10683
10684 <!--
10685 // INetworkAdapter
10686 /////////////////////////////////////////////////////////////////////////
10687 -->
10688
10689 <enum
10690 name="NetworkAttachmentType"
10691 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10692 >
10693 <desc>
10694 Network attachment type.
10695 </desc>
10696
10697 <const name="Null" value="0">
10698 <desc>Null value, also means "not attached".</desc>
10699 </const>
10700 <const name="NAT" value="1"/>
10701 <const name="Bridged" value="2"/>
10702 <const name="Internal" value="3"/>
10703 <const name="HostOnly" value="4"/>
10704 </enum>
10705
10706 <enum
10707 name="NetworkAdapterType"
10708 uuid="50c3dfd8-07ac-4a31-baac-519c828fbf97"
10709 >
10710 <desc>
10711 Network adapter type.
10712 </desc>
10713
10714 <const name="Null" value="0">
10715 <desc>Null value (never used by the API).</desc>
10716 </const>
10717 <const name="Am79C970A" value="1">
10718 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10719 </const>
10720 <const name="Am79C973" value="2">
10721 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10722 </const>
10723 <const name="I82540EM" value="3">
10724 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10725 </const>
10726 <const name="I82543GC" value="4">
10727 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10728 </const>
10729 <const name="I82545EM" value="5">
10730 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10731 </const>
10732 <const name="Virtio" value="6">
10733 <desc>Virtio network device.</desc>
10734 </const>
10735 </enum>
10736
10737 <interface
10738 name="INetworkAdapter" extends="$unknown"
10739 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10740 wsmap="managed"
10741 >
10742 <desc>
10743 Represents a virtual network adapter that is attached to a virtual machine.
10744 Each virtual machine has a fixed number of network adapter slots with one
10745 instance of this attached to each of them. Call
10746 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10747 is attached to a given slot in a given machine.
10748
10749 Each network adapter can be in one of five attachment modes, which are
10750 represented by the <link to="NetworkAttachmentType" /> enumeration;
10751 see the <link to="#attachmentType" /> attribute.
10752 </desc>
10753
10754 <attribute name="adapterType" type="NetworkAdapterType">
10755 <desc>
10756 Type of the virtual network adapter. Depending on this value,
10757 VirtualBox will provide a different virtual network hardware
10758 to the guest.
10759 </desc>
10760 </attribute>
10761
10762 <attribute name="slot" type="unsigned long" readonly="yes">
10763 <desc>
10764 Slot number this adapter is plugged into. Corresponds to
10765 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10766 to obtain this instance.
10767 </desc>
10768 </attribute>
10769
10770 <attribute name="enabled" type="boolean">
10771 <desc>
10772 Flag whether the network adapter is present in the
10773 guest system. If disabled, the virtual guest hardware will
10774 not contain this network adapter. Can only be changed when
10775 the VM is not running.
10776 </desc>
10777 </attribute>
10778
10779 <attribute name="MACAddress" type="wstring">
10780 <desc>
10781 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10782 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10783 </desc>
10784 </attribute>
10785
10786 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10787
10788 <attribute name="hostInterface" type="wstring">
10789 <desc>
10790 Name of the host network interface the VM is attached to.
10791 </desc>
10792 </attribute>
10793
10794 <attribute name="internalNetwork" type="wstring">
10795 <desc>
10796 Name of the internal network the VM is attached to.
10797 </desc>
10798 </attribute>
10799
10800 <attribute name="NATNetwork" type="wstring">
10801 <desc>
10802 Name of the NAT network the VM is attached to.
10803 </desc>
10804 </attribute>
10805
10806 <attribute name="cableConnected" type="boolean">
10807 <desc>
10808 Flag whether the adapter reports the cable as connected or not.
10809 It can be used to report offline situations to a VM.
10810 </desc>
10811 </attribute>
10812
10813 <attribute name="lineSpeed" type="unsigned long">
10814 <desc>
10815 Line speed reported by custom drivers, in units of 1 kbps.
10816 </desc>
10817 </attribute>
10818
10819 <attribute name="traceEnabled" type="boolean">
10820 <desc>
10821 Flag whether network traffic from/to the network card should be traced.
10822 Can only be toggled when the VM is turned off.
10823 </desc>
10824 </attribute>
10825
10826 <attribute name="traceFile" type="wstring">
10827 <desc>
10828 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10829 will be used.
10830 </desc>
10831 </attribute>
10832
10833 <method name="attachToNAT">
10834 <desc>
10835 Attach the network adapter to the Network Address Translation (NAT) interface.
10836 </desc>
10837 </method>
10838
10839 <method name="attachToBridgedInterface">
10840 <desc>
10841 Attach the network adapter to a bridged host interface.
10842 </desc>
10843 </method>
10844
10845 <method name="attachToInternalNetwork">
10846 <desc>
10847 Attach the network adapter to an internal network.
10848 </desc>
10849 </method>
10850
10851 <method name="attachToHostOnlyInterface">
10852 <desc>
10853 Attach the network adapter to the host-only network.
10854 </desc>
10855 </method>
10856
10857 <method name="detach">
10858 <desc>
10859 Detach the network adapter
10860 </desc>
10861 </method>
10862 </interface>
10863
10864
10865 <!--
10866 // ISerialPort
10867 /////////////////////////////////////////////////////////////////////////
10868 -->
10869
10870 <enum
10871 name="PortMode"
10872 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
10873 >
10874 <desc>
10875 The PortMode enumeration represents possible communication modes for
10876 the virtual serial port device.
10877 </desc>
10878
10879 <const name="Disconnected" value="0">
10880 <desc>Virtual device is not attached to any real host device.</desc>
10881 </const>
10882 <const name="HostPipe" value="1">
10883 <desc>Virtual device is attached to a host pipe.</desc>
10884 </const>
10885 <const name="HostDevice" value="2">
10886 <desc>Virtual device is attached to a host device.</desc>
10887 </const>
10888 <const name="RawFile" value="3">
10889 <desc>Virtual device is attached to a raw file.</desc>
10890 </const>
10891 </enum>
10892
10893 <interface
10894 name="ISerialPort" extends="$unknown"
10895 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10896 wsmap="managed"
10897 >
10898
10899 <desc>
10900 The ISerialPort interface represents the virtual serial port device.
10901
10902 The virtual serial port device acts like an ordinary serial port
10903 inside the virtual machine. This device communicates to the real
10904 serial port hardware in one of two modes: host pipe or host device.
10905
10906 In host pipe mode, the #path attribute specifies the path to the pipe on
10907 the host computer that represents a serial port. The #server attribute
10908 determines if this pipe is created by the virtual machine process at
10909 machine startup or it must already exist before starting machine
10910 execution.
10911
10912 In host device mode, the #path attribute specifies the name of the
10913 serial port device on the host computer.
10914
10915 There is also a third communication mode: the disconnected mode. In this
10916 mode, the guest OS running inside the virtual machine will be able to
10917 detect the serial port, but all port write operations will be discarded
10918 and all port read operations will return no data.
10919
10920 <see>IMachine::getSerialPort</see>
10921 </desc>
10922
10923 <attribute name="slot" type="unsigned long" readonly="yes">
10924 <desc>
10925 Slot number this serial port is plugged into. Corresponds to
10926 the value you pass to <link to="IMachine::getSerialPort"/>
10927 to obtain this instance.
10928 </desc>
10929 </attribute>
10930
10931 <attribute name="enabled" type="boolean">
10932 <desc>
10933 Flag whether the serial port is enabled. If disabled,
10934 the serial port will not be reported to the guest OS.
10935 </desc>
10936 </attribute>
10937
10938 <attribute name="IOBase" type="unsigned long">
10939 <desc>Base I/O address of the serial port.</desc>
10940 </attribute>
10941
10942 <attribute name="IRQ" type="unsigned long">
10943 <desc>IRQ number of the serial port.</desc>
10944 </attribute>
10945
10946 <attribute name="hostMode" type="PortMode">
10947 <desc>
10948 How is this port connected to the host.
10949 <note>
10950 Changing this attribute may fail if the conditions for
10951 <link to="#path"/> are not met.
10952 </note>
10953 </desc>
10954 </attribute>
10955
10956 <attribute name="server" type="boolean">
10957 <desc>
10958 Flag whether this serial port acts as a server (creates a new pipe on
10959 the host) or as a client (uses the existing pipe). This attribute is
10960 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10961 </desc>
10962 </attribute>
10963
10964 <attribute name="path" type="wstring">
10965 <desc>
10966 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
10967 PortMode_HostPipe, or the host serial device name when
10968 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
10969 cases, setting a @c null or empty string as the attribute's value
10970 is an error. Otherwise, the value of this property is ignored.
10971 </desc>
10972 </attribute>
10973
10974 </interface>
10975
10976 <!--
10977 // IParallelPort
10978 /////////////////////////////////////////////////////////////////////////
10979 -->
10980
10981 <interface
10982 name="IParallelPort" extends="$unknown"
10983 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10984 wsmap="managed"
10985 >
10986
10987 <desc>
10988 The IParallelPort interface represents the virtual parallel port device.
10989
10990 The virtual parallel port device acts like an ordinary parallel port
10991 inside the virtual machine. This device communicates to the real
10992 parallel port hardware using the name of the parallel device on the host
10993 computer specified in the #path attribute.
10994
10995 Each virtual parallel port device is assigned a base I/O address and an
10996 IRQ number that will be reported to the guest operating system and used
10997 to operate the given parallel port from within the virtual machine.
10998
10999 <see>IMachine::getParallelPort</see>
11000 </desc>
11001
11002 <attribute name="slot" type="unsigned long" readonly="yes">
11003 <desc>
11004 Slot number this parallel port is plugged into. Corresponds to
11005 the value you pass to <link to="IMachine::getParallelPort"/>
11006 to obtain this instance.
11007 </desc>
11008 </attribute>
11009
11010 <attribute name="enabled" type="boolean">
11011 <desc>
11012 Flag whether the parallel port is enabled. If disabled,
11013 the parallel port will not be reported to the guest OS.
11014 </desc>
11015 </attribute>
11016
11017 <attribute name="IOBase" type="unsigned long">
11018 <desc>Base I/O address of the parallel port.</desc>
11019 </attribute>
11020
11021 <attribute name="IRQ" type="unsigned long">
11022 <desc>IRQ number of the parallel port.</desc>
11023 </attribute>
11024
11025 <attribute name="path" type="wstring">
11026 <desc>
11027 Host parallel device name. If this parallel port is enabled, setting a
11028 @c null or an empty string as this attribute's value will result into
11029 an error.
11030 </desc>
11031 </attribute>
11032
11033 </interface>
11034
11035
11036 <!--
11037 // IMachineDebugger
11038 /////////////////////////////////////////////////////////////////////////
11039 -->
11040
11041 <interface
11042 name="IMachineDebugger" extends="$unknown"
11043 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11044 wsmap="suppress"
11045 >
11046 <method name="resetStats">
11047 <desc>
11048 Reset VM statistics.
11049 </desc>
11050 <param name="pattern" type="wstring" dir="in">
11051 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11052 </param>
11053 </method>
11054
11055 <method name="dumpStats">
11056 <desc>
11057 Dumps VM statistics.
11058 </desc>
11059 <param name="pattern" type="wstring" dir="in">
11060 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11061 </param>
11062 </method>
11063
11064 <method name="getStats">
11065 <desc>
11066 Get the VM statistics in a XMLish format.
11067 </desc>
11068 <param name="pattern" type="wstring" dir="in">
11069 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11070 </param>
11071 <param name="withDescriptions" type="boolean" dir="in">
11072 <desc>Whether to include the descriptions.</desc>
11073 </param>
11074 <param name="stats" type="wstring" dir="out">
11075 <desc>The XML document containing the statistics.</desc>
11076 </param>
11077 </method>
11078
11079 <method name="injectNMI">
11080 <desc>
11081 Inject an NMI into a running VT-x/AMD-V VM.
11082 </desc>
11083 </method>
11084
11085 <attribute name="singlestep" type="boolean">
11086 <desc>Switch for enabling singlestepping.</desc>
11087 </attribute>
11088
11089 <attribute name="recompileUser" type="boolean">
11090 <desc>Switch for forcing code recompilation for user mode code.</desc>
11091 </attribute>
11092
11093 <attribute name="recompileSupervisor" type="boolean">
11094 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11095 </attribute>
11096
11097 <attribute name="PATMEnabled" type="boolean">
11098 <desc>Switch for enabling and disabling the PATM component.</desc>
11099 </attribute>
11100
11101 <attribute name="CSAMEnabled" type="boolean">
11102 <desc>Switch for enabling and disabling the CSAM component.</desc>
11103 </attribute>
11104
11105 <attribute name="logEnabled" type="boolean">
11106 <desc>Switch for enabling and disabling logging.</desc>
11107 </attribute>
11108
11109 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11110 <desc>
11111 Flag indicating whether the VM is currently making use of CPU hardware
11112 virtualization extensions.
11113 </desc>
11114 </attribute>
11115
11116 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11117 <desc>
11118 Flag indicating whether the VM is currently making use of the nested paging
11119 CPU hardware virtualization extension.
11120 </desc>
11121 </attribute>
11122
11123 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11124 <desc>
11125 Flag indicating whether the VM is currently making use of the VPID
11126 VT-x extension.
11127 </desc>
11128 </attribute>
11129
11130 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11131 <desc>
11132 Flag indicating whether the VM is currently making use of the Physical
11133 Address Extension CPU feature.
11134 </desc>
11135 </attribute>
11136
11137 <attribute name="virtualTimeRate" type="unsigned long">
11138 <desc>
11139 The rate at which the virtual time runs expressed as a percentage.
11140 The accepted range is 2% to 20000%.
11141 </desc>
11142 </attribute>
11143
11144 <!-- @todo method for setting log flags, groups and destination! -->
11145
11146 <attribute name="VM" type="unsigned long long" readonly="yes">
11147 <desc>
11148 Gets the VM handle. This is only for internal use while
11149 we carve the details of this interface.
11150 </desc>
11151 </attribute>
11152
11153 </interface>
11154
11155 <!--
11156 // IUSBController
11157 /////////////////////////////////////////////////////////////////////////
11158 -->
11159
11160 <interface
11161 name="IUSBController" extends="$unknown"
11162 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11163 wsmap="managed"
11164 >
11165 <attribute name="enabled" type="boolean">
11166 <desc>
11167 Flag whether the USB controller is present in the
11168 guest system. If disabled, the virtual guest hardware will
11169 not contain any USB controller. Can only be changed when
11170 the VM is powered off.
11171 </desc>
11172 </attribute>
11173
11174 <attribute name="enabledEhci" type="boolean">
11175 <desc>
11176 Flag whether the USB EHCI controller is present in the
11177 guest system. If disabled, the virtual guest hardware will
11178 not contain a USB EHCI controller. Can only be changed when
11179 the VM is powered off.
11180 </desc>
11181 </attribute>
11182
11183 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11184 <desc>
11185 USB standard version which the controller implements.
11186 This is a BCD which means that the major version is in the
11187 high byte and minor version is in the low byte.
11188 </desc>
11189 </attribute>
11190
11191 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11192 <desc>
11193 List of USB device filters associated with the machine.
11194
11195 If the machine is currently running, these filters are activated
11196 every time a new (supported) USB device is attached to the host
11197 computer that was not ignored by global filters
11198 (<link to="IHost::USBDeviceFilters"/>).
11199
11200 These filters are also activated when the machine is powered up.
11201 They are run against a list of all currently available USB
11202 devices (in states
11203 <link to="USBDeviceState_Available"/>,
11204 <link to="USBDeviceState_Busy"/>,
11205 <link to="USBDeviceState_Held"/>) that were not previously
11206 ignored by global filters.
11207
11208 If at least one filter matches the USB device in question, this
11209 device is automatically captured (attached to) the virtual USB
11210 controller of this machine.
11211
11212 <see>IUSBDeviceFilter, ::IUSBController</see>
11213 </desc>
11214 </attribute>
11215
11216 <method name="createDeviceFilter">
11217 <desc>
11218 Creates a new USB device filter. All attributes except
11219 the filter name are set to empty (any match),
11220 <i>active</i> is @c false (the filter is not active).
11221
11222 The created filter can then be added to the list of filters using
11223 <link to="#insertDeviceFilter"/>.
11224
11225 <result name="VBOX_E_INVALID_VM_STATE">
11226 The virtual machine is not mutable.
11227 </result>
11228
11229 <see>#deviceFilters</see>
11230 </desc>
11231 <param name="name" type="wstring" dir="in">
11232 <desc>
11233 Filter name. See <link to="IUSBDeviceFilter::name"/>
11234 for more info.
11235 </desc>
11236 </param>
11237 <param name="filter" type="IUSBDeviceFilter" dir="return">
11238 <desc>Created filter object.</desc>
11239 </param>
11240 </method>
11241
11242 <method name="insertDeviceFilter">
11243 <desc>
11244 Inserts the given USB device to the specified position
11245 in the list of filters.
11246
11247 Positions are numbered starting from <tt>0</tt>. If the specified
11248 position is equal to or greater than the number of elements in
11249 the list, the filter is added to the end of the collection.
11250
11251 <note>
11252 Duplicates are not allowed, so an attempt to insert a
11253 filter that is already in the collection, will return an
11254 error.
11255 </note>
11256
11257 <result name="VBOX_E_INVALID_VM_STATE">
11258 Virtual machine is not mutable.
11259 </result>
11260 <result name="E_INVALIDARG">
11261 USB device filter not created within this VirtualBox instance.
11262 </result>
11263 <result name="VBOX_E_INVALID_OBJECT_STATE">
11264 USB device filter already in list.
11265 </result>
11266
11267 <see>#deviceFilters</see>
11268 </desc>
11269 <param name="position" type="unsigned long" dir="in">
11270 <desc>Position to insert the filter to.</desc>
11271 </param>
11272 <param name="filter" type="IUSBDeviceFilter" dir="in">
11273 <desc>USB device filter to insert.</desc>
11274 </param>
11275 </method>
11276
11277 <method name="removeDeviceFilter">
11278 <desc>
11279 Removes a USB device filter from the specified position in the
11280 list of filters.
11281
11282 Positions are numbered starting from <tt>0</tt>. Specifying a
11283 position equal to or greater than the number of elements in
11284 the list will produce an error.
11285
11286 <see>#deviceFilters</see>
11287
11288 <result name="VBOX_E_INVALID_VM_STATE">
11289 Virtual machine is not mutable.
11290 </result>
11291 <result name="E_INVALIDARG">
11292 USB device filter list empty or invalid @a position.
11293 </result>
11294
11295 </desc>
11296 <param name="position" type="unsigned long" dir="in">
11297 <desc>Position to remove the filter from.</desc>
11298 </param>
11299 <param name="filter" type="IUSBDeviceFilter" dir="return">
11300 <desc>Removed USB device filter.</desc>
11301 </param>
11302 </method>
11303
11304 </interface>
11305
11306
11307 <!--
11308 // IUSBDevice
11309 /////////////////////////////////////////////////////////////////////////
11310 -->
11311
11312 <interface
11313 name="IUSBDevice" extends="$unknown"
11314 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11315 wsmap="managed"
11316 >
11317 <desc>
11318 The IUSBDevice interface represents a virtual USB device attached to the
11319 virtual machine.
11320
11321 A collection of objects implementing this interface is stored in the
11322 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11323 attached to a running virtual machine's USB controller.
11324 </desc>
11325
11326 <attribute name="id" type="wstring" readonly="yes">
11327 <desc>
11328 Unique USB device ID. This ID is built from #vendorId,
11329 #productId, #revision and #serialNumber.
11330 </desc>
11331 </attribute>
11332
11333 <attribute name="vendorId" type="unsigned short" readonly="yes">
11334 <desc>Vendor ID.</desc>
11335 </attribute>
11336
11337 <attribute name="productId" type="unsigned short" readonly="yes">
11338 <desc>Product ID.</desc>
11339 </attribute>
11340
11341 <attribute name="revision" type="unsigned short" readonly="yes">
11342 <desc>
11343 Product revision number. This is a packed BCD represented as
11344 unsigned short. The high byte is the integer part and the low
11345 byte is the decimal.
11346 </desc>
11347 </attribute>
11348
11349 <attribute name="manufacturer" type="wstring" readonly="yes">
11350 <desc>Manufacturer string.</desc>
11351 </attribute>
11352
11353 <attribute name="product" type="wstring" readonly="yes">
11354 <desc>Product string.</desc>
11355 </attribute>
11356
11357 <attribute name="serialNumber" type="wstring" readonly="yes">
11358 <desc>Serial number string.</desc>
11359 </attribute>
11360
11361 <attribute name="address" type="wstring" readonly="yes">
11362 <desc>Host specific address of the device.</desc>
11363 </attribute>
11364
11365 <attribute name="port" type="unsigned short" readonly="yes">
11366 <desc>
11367 Host USB port number the device is physically
11368 connected to.
11369 </desc>
11370 </attribute>
11371
11372 <attribute name="version" type="unsigned short" readonly="yes">
11373 <desc>
11374 The major USB version of the device - 1 or 2.
11375 </desc>
11376 </attribute>
11377
11378 <attribute name="portVersion" type="unsigned short" readonly="yes">
11379 <desc>
11380 The major USB version of the host USB port the device is
11381 physically connected to - 1 or 2. For devices not connected to
11382 anything this will have the same value as the version attribute.
11383 </desc>
11384 </attribute>
11385
11386 <attribute name="remote" type="boolean" readonly="yes">
11387 <desc>
11388 Whether the device is physically connected to a remote VRDP
11389 client or to a local host machine.
11390 </desc>
11391 </attribute>
11392
11393 </interface>
11394
11395
11396 <!--
11397 // IUSBDeviceFilter
11398 /////////////////////////////////////////////////////////////////////////
11399 -->
11400
11401 <interface
11402 name="IUSBDeviceFilter" extends="$unknown"
11403 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11404 wsmap="managed"
11405 >
11406 <desc>
11407 The IUSBDeviceFilter interface represents an USB device filter used
11408 to perform actions on a group of USB devices.
11409
11410 This type of filters is used by running virtual machines to
11411 automatically capture selected USB devices once they are physically
11412 attached to the host computer.
11413
11414 A USB device is matched to the given device filter if and only if all
11415 attributes of the device match the corresponding attributes of the
11416 filter (that is, attributes are joined together using the logical AND
11417 operation). On the other hand, all together, filters in the list of
11418 filters carry the semantics of the logical OR operation. So if it is
11419 desirable to create a match like "this vendor id OR this product id",
11420 one needs to create two filters and specify "any match" (see below)
11421 for unused attributes.
11422
11423 All filter attributes used for matching are strings. Each string
11424 is an expression representing a set of values of the corresponding
11425 device attribute, that will match the given filter. Currently, the
11426 following filtering expressions are supported:
11427
11428 <ul>
11429 <li><i>Interval filters</i>. Used to specify valid intervals for
11430 integer device attributes (Vendor ID, Product ID and Revision).
11431 The format of the string is:
11432
11433 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11434
11435 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11436 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11437 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11438 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11439 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11440 possible integer is assumed.
11441 </li>
11442 <li><i>Boolean filters</i>. Used to specify acceptable values for
11443 boolean device attributes. The format of the string is:
11444
11445 <tt>true|false|yes|no|0|1</tt>
11446
11447 </li>
11448 <li><i>Exact match</i>. Used to specify a single value for the given
11449 device attribute. Any string that doesn't start with <tt>int:</tt>
11450 represents the exact match. String device attributes are compared to
11451 this string including case of symbols. Integer attributes are first
11452 converted to a string (see individual filter attributes) and then
11453 compared ignoring case.
11454
11455 </li>
11456 <li><i>Any match</i>. Any value of the corresponding device attribute
11457 will match the given filter. An empty or @c null string is
11458 used to construct this type of filtering expressions.
11459
11460 </li>
11461 </ul>
11462
11463 <note>
11464 On the Windows host platform, interval filters are not currently
11465 available. Also all string filter attributes
11466 (<link to="#manufacturer"/>, <link to="#product"/>,
11467 <link to="#serialNumber"/>) are ignored, so they behave as
11468 <i>any match</i> no matter what string expression is specified.
11469 </note>
11470
11471 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11472 </desc>
11473
11474 <attribute name="name" type="wstring">
11475 <desc>
11476 Visible name for this filter.
11477 This name is used to visually distinguish one filter from another,
11478 so it can neither be @c null nor an empty string.
11479 </desc>
11480 </attribute>
11481
11482 <attribute name="active" type="boolean">
11483 <desc>Whether this filter active or has been temporarily disabled.</desc>
11484 </attribute>
11485
11486 <attribute name="vendorId" type="wstring">
11487 <desc>
11488 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11489 The string representation for the <i>exact matching</i>
11490 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11491 (including leading zeroes).
11492 </desc>
11493 </attribute>
11494
11495 <attribute name="productId" type="wstring">
11496 <desc>
11497 <link to="IUSBDevice::productId">Product ID</link> filter.
11498 The string representation for the <i>exact matching</i>
11499 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11500 (including leading zeroes).
11501 </desc>
11502 </attribute>
11503
11504 <attribute name="revision" type="wstring">
11505 <desc>
11506 <link to="IUSBDevice::productId">Product revision number</link>
11507 filter. The string representation for the <i>exact matching</i>
11508 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11509 of the integer part of the revision, and <tt>F</tt> is the
11510 decimal digit of its fractional part (including leading and
11511 trailing zeros).
11512 Note that for interval filters, it's best to use the hexadecimal
11513 form, because the revision is stored as a 16 bit packed BCD value;
11514 so the expression <tt>int:0x0100-0x0199</tt> will match any
11515 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11516 </desc>
11517 </attribute>
11518
11519 <attribute name="manufacturer" type="wstring">
11520 <desc>
11521 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11522 </desc>
11523 </attribute>
11524
11525 <attribute name="product" type="wstring">
11526 <desc>
11527 <link to="IUSBDevice::product">Product</link> filter.
11528 </desc>
11529 </attribute>
11530
11531 <attribute name="serialNumber" type="wstring">
11532 <desc>
11533 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11534 </desc>
11535 </attribute>
11536
11537 <attribute name="port" type="wstring">
11538 <desc>
11539 <link to="IUSBDevice::port">Host USB port</link> filter.
11540 </desc>
11541 </attribute>
11542
11543 <attribute name="remote" type="wstring">
11544 <desc>
11545 <link to="IUSBDevice::remote">Remote state</link> filter.
11546 <note>
11547 This filter makes sense only for machine USB filters,
11548 i.e. it is ignored by IHostUSBDeviceFilter objects.
11549 </note>
11550 </desc>
11551 </attribute>
11552
11553 <attribute name="maskedInterfaces" type="unsigned long">
11554 <desc>
11555 This is an advanced option for hiding one or more USB interfaces
11556 from the guest. The value is a bit mask where the bits that are set
11557 means the corresponding USB interface should be hidden, masked off
11558 if you like.
11559 This feature only works on Linux hosts.
11560 </desc>
11561 </attribute>
11562
11563 </interface>
11564
11565
11566 <!--
11567 // IHostUSBDevice
11568 /////////////////////////////////////////////////////////////////////////
11569 -->
11570
11571 <enum
11572 name="USBDeviceState"
11573 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11574 >
11575 <desc>
11576 USB device state. This enumeration represents all possible states
11577 of the USB device physically attached to the host computer regarding
11578 its state on the host computer and availability to guest computers
11579 (all currently running virtual machines).
11580
11581 Once a supported USB device is attached to the host, global USB
11582 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11583 either ignore the device, or put it to USBDeviceState_Held state, or do
11584 nothing. Unless the device is ignored by global filters, filters of all
11585 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11586 activated that can put it to USBDeviceState_Captured state.
11587
11588 If the device was ignored by global filters, or didn't match
11589 any filters at all (including guest ones), it is handled by the host
11590 in a normal way. In this case, the device state is determined by
11591 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11592 or USBDeviceState_Available, depending on the current device usage.
11593
11594 Besides auto-capturing based on filters, the device can be manually
11595 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11596 state is USBDeviceState_Busy, USBDeviceState_Available or
11597 USBDeviceState_Held.
11598
11599 <note>
11600 Due to differences in USB stack implementations in Linux and Win32,
11601 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11602 only to the Linux version of the product. This also means that (<link
11603 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11604 device state is USBDeviceState_Held.
11605 </note>
11606
11607 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11608 </desc>
11609
11610 <const name="NotSupported" value="0">
11611 <desc>
11612 Not supported by the VirtualBox server, not available to guests.
11613 </desc>
11614 </const>
11615 <const name="Unavailable" value="1">
11616 <desc>
11617 Being used by the host computer exclusively,
11618 not available to guests.
11619 </desc>
11620 </const>
11621 <const name="Busy" value="2">
11622 <desc>
11623 Being used by the host computer, potentially available to guests.
11624 </desc>
11625 </const>
11626 <const name="Available" value="3">
11627 <desc>
11628 Not used by the host computer, available to guests (the host computer
11629 can also start using the device at any time).
11630 </desc>
11631 </const>
11632 <const name="Held" value="4">
11633 <desc>
11634 Held by the VirtualBox server (ignored by the host computer),
11635 available to guests.
11636 </desc>
11637 </const>
11638 <const name="Captured" value="5">
11639 <desc>
11640 Captured by one of the guest computers, not available
11641 to anybody else.
11642 </desc>
11643 </const>
11644 </enum>
11645
11646 <interface
11647 name="IHostUSBDevice" extends="IUSBDevice"
11648 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11649 wsmap="managed"
11650 >
11651 <desc>
11652 The IHostUSBDevice interface represents a physical USB device attached
11653 to the host computer.
11654
11655 Besides properties inherited from IUSBDevice, this interface adds the
11656 <link to="#state"/> property that holds the current state of the USB
11657 device.
11658
11659 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11660 </desc>
11661
11662 <attribute name="state" type="USBDeviceState" readonly="yes">
11663 <desc>
11664 Current state of the device.
11665 </desc>
11666 </attribute>
11667
11668 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11669
11670 </interface>
11671
11672
11673 <!--
11674 // IHostUSBDeviceFilter
11675 /////////////////////////////////////////////////////////////////////////
11676 -->
11677
11678 <enum
11679 name="USBDeviceFilterAction"
11680 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11681 >
11682 <desc>
11683 Actions for host USB device filters.
11684 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11685 </desc>
11686
11687 <const name="Null" value="0">
11688 <desc>Null value (never used by the API).</desc>
11689 </const>
11690 <const name="Ignore" value="1">
11691 <desc>Ignore the matched USB device.</desc>
11692 </const>
11693 <const name="Hold" value="2">
11694 <desc>Hold the matched USB device.</desc>
11695 </const>
11696 </enum>
11697
11698 <interface
11699 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11700 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11701 wsmap="managed"
11702 >
11703 <desc>
11704 The IHostUSBDeviceFilter interface represents a global filter for a
11705 physical USB device used by the host computer. Used indirectly in
11706 <link to="IHost::USBDeviceFilters"/>.
11707
11708 Using filters of this type, the host computer determines the initial
11709 state of the USB device after it is physically attached to the
11710 host's USB controller.
11711
11712 <note>
11713 The <link to="#remote"/> attribute is ignored by this type of
11714 filters, because it makes sense only for
11715 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11716 </note>
11717
11718 <see>IHost::USBDeviceFilters</see>
11719 </desc>
11720
11721 <attribute name="action" type="USBDeviceFilterAction">
11722 <desc>
11723 Action performed by the host when an attached USB device
11724 matches this filter.
11725 </desc>
11726 </attribute>
11727
11728 </interface>
11729
11730 <!--
11731 // IAudioAdapter
11732 /////////////////////////////////////////////////////////////////////////
11733 -->
11734
11735 <enum
11736 name="AudioDriverType"
11737 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11738 >
11739 <desc>
11740 Host audio driver type.
11741 </desc>
11742
11743 <const name="Null" value="0">
11744 <desc>Null value, also means "dummy audio driver".</desc>
11745 </const>
11746 <const name="WinMM" value="1">
11747 <desc>Windows multimedia (Windows hosts only).</desc>
11748 </const>
11749 <const name="OSS" value="2">
11750 <desc>Open Sound System (Linux hosts only).</desc>
11751 </const>
11752 <const name="ALSA" value="3">
11753 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11754 </const>
11755 <const name="DirectSound" value="4">
11756 <desc>DirectSound (Windows hosts only).</desc>
11757 </const>
11758 <const name="CoreAudio" value="5">
11759 <desc>CoreAudio (Mac hosts only).</desc>
11760 </const>
11761 <const name="MMPM" value="6">
11762 <desc>Reserved for historical reasons.</desc>
11763 </const>
11764 <const name="Pulse" value="7">
11765 <desc>PulseAudio (Linux hosts only).</desc>
11766 </const>
11767 <const name="SolAudio" value="8">
11768 <desc>Solaris audio (Solaris hosts only).</desc>
11769 </const>
11770 </enum>
11771
11772 <enum
11773 name="AudioControllerType"
11774 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11775 >
11776 <desc>
11777 Virtual audio controller type.
11778 </desc>
11779
11780 <const name="AC97" value="0"/>
11781 <const name="SB16" value="1"/>
11782 </enum>
11783
11784 <interface
11785 name="IAudioAdapter" extends="$unknown"
11786 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11787 wsmap="managed"
11788 >
11789 <desc>
11790 The IAudioAdapter interface represents the virtual audio adapter of
11791 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11792 </desc>
11793 <attribute name="enabled" type="boolean">
11794 <desc>
11795 Flag whether the audio adapter is present in the
11796 guest system. If disabled, the virtual guest hardware will
11797 not contain any audio adapter. Can only be changed when
11798 the VM is not running.
11799 </desc>
11800 </attribute>
11801 <attribute name="audioController" type="AudioControllerType">
11802 <desc>
11803 The audio hardware we emulate.
11804 </desc>
11805 </attribute>
11806 <attribute name="audioDriver" type="AudioDriverType">
11807 <desc>
11808 Audio driver the adapter is connected to. This setting
11809 can only be changed when the VM is not running.
11810 </desc>
11811 </attribute>
11812 </interface>
11813
11814 <!--
11815 // IVRDPServer
11816 /////////////////////////////////////////////////////////////////////////
11817 -->
11818
11819 <enum
11820 name="VRDPAuthType"
11821 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11822 >
11823 <desc>
11824 VRDP authentication type.
11825 </desc>
11826
11827 <const name="Null" value="0">
11828 <desc>Null value, also means "no authentication".</desc>
11829 </const>
11830 <const name="External" value="1"/>
11831 <const name="Guest" value="2"/>
11832 </enum>
11833
11834 <interface
11835 name="IVRDPServer" extends="$unknown"
11836 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11837 wsmap="managed"
11838 >
11839 <attribute name="enabled" type="boolean">
11840 <desc>VRDP server status.</desc>
11841 </attribute>
11842
11843 <attribute name="port" type="unsigned long">
11844 <desc>
11845 VRDP server port number.
11846 <note>
11847 Setting the value of this property to <tt>0</tt> will reset the port
11848 number to the default value which is
11849 currently <tt>3389</tt>. Reading this property will always return a
11850 real port number, even after it has been set to <tt>0</tt> (in which
11851 case the default port is returned).
11852 </note>
11853 </desc>
11854 </attribute>
11855
11856 <attribute name="netAddress" type="wstring">
11857 <desc>VRDP server address.</desc>
11858 </attribute>
11859
11860 <attribute name="authType" type="VRDPAuthType">
11861 <desc>VRDP authentication method.</desc>
11862 </attribute>
11863
11864 <attribute name="authTimeout" type="unsigned long">
11865 <desc>Timeout for guest authentication. Milliseconds.</desc>
11866 </attribute>
11867
11868 <attribute name="allowMultiConnection" type="boolean">
11869 <desc>
11870 Flag whether multiple simultaneous connections to the VM are permitted.
11871 Note that this will be replaced by a more powerful mechanism in the future.
11872 </desc>
11873 </attribute>
11874
11875 <attribute name="reuseSingleConnection" type="boolean">
11876 <desc>
11877 Flag whether the existing connection must be dropped and a new connection
11878 must be established by the VRDP server, when a new client connects in single
11879 connection mode.
11880 </desc>
11881 </attribute>
11882
11883 </interface>
11884
11885
11886 <!--
11887 // ISharedFolder
11888 /////////////////////////////////////////////////////////////////////////
11889 -->
11890
11891 <interface
11892 name="ISharedFolder" extends="$unknown"
11893 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11894 wsmap="struct"
11895 >
11896 <desc>
11897 The ISharedFolder interface represents a folder in the host computer's
11898 file system accessible from the guest OS running inside a virtual
11899 machine using an associated logical name.
11900
11901 There are three types of shared folders:
11902 <ul>
11903 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11904 folders available to all virtual machines.</li>
11905 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11906 VM-specific shared folders available to the given virtual machine at
11907 startup.</li>
11908 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11909 VM-specific shared folders created in the session context (for
11910 example, when the virtual machine is running) and automatically
11911 discarded when the session is closed (the VM is powered off).</li>
11912 </ul>
11913
11914 Logical names of shared folders must be unique within the given scope
11915 (global, permanent or transient). However, they do not need to be unique
11916 across scopes. In this case, the definition of the shared folder in a
11917 more specific scope takes precedence over definitions in all other
11918 scopes. The order of precedence is (more specific to more general):
11919 <ol>
11920 <li>Transient definitions</li>
11921 <li>Permanent definitions</li>
11922 <li>Global definitions</li>
11923 </ol>
11924
11925 For example, if MyMachine has a shared folder named
11926 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11927 transient shared folder named <tt>C_DRIVE</tt> (that points
11928 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11929 of <tt>C_DRIVE</tt> in the guest OS so
11930 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11931 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11932 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11933 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11934 to <tt>C:\\</tt> if it still exists.
11935
11936 Note that permanent and transient shared folders of different machines
11937 are in different name spaces, so they don't overlap and don't need to
11938 have unique logical names.
11939
11940 <note>
11941 Global shared folders are not implemented in the current version of the
11942 product.
11943 </note>
11944 </desc>
11945
11946 <attribute name="name" type="wstring" readonly="yes">
11947 <desc>Logical name of the shared folder.</desc>
11948 </attribute>
11949
11950 <attribute name="hostPath" type="wstring" readonly="yes">
11951 <desc>Full path to the shared folder in the host file system.</desc>
11952 </attribute>
11953
11954 <attribute name="accessible" type="boolean" readonly="yes">
11955 <desc>
11956 Whether the folder defined by the host path is currently
11957 accessible or not.
11958 For example, the folder can be unaccessible if it is placed
11959 on the network share that is not available by the time
11960 this property is read.
11961 </desc>
11962 </attribute>
11963
11964 <attribute name="writable" type="boolean" readonly="yes">
11965 <desc>
11966 Whether the folder defined by the host path is writable or
11967 not.
11968 </desc>
11969 </attribute>
11970
11971 <attribute name="lastAccessError" type="wstring" readonly="yes">
11972 <desc>
11973 Text message that represents the result of the last accessibility
11974 check.
11975
11976 Accessibility checks are performed each time the <link to="#accessible"/>
11977 attribute is read. An empty string is returned if the last
11978 accessibility check was successful. A non-empty string indicates a
11979 failure and should normally describe a reason of the failure (for
11980 example, a file read error).
11981 </desc>
11982 </attribute>
11983
11984 </interface>
11985
11986 <!--
11987 // ISession
11988 /////////////////////////////////////////////////////////////////////////
11989 -->
11990
11991 <interface
11992 name="IInternalSessionControl" extends="$unknown"
11993 uuid="e28e19fb-23c2-4d1a-b6bf-ce147fa37b24"
11994 internal="yes"
11995 wsmap="suppress"
11996 >
11997 <method name="getPID">
11998 <desc>PID of the process that has created this Session object.
11999 </desc>
12000 <param name="pid" type="unsigned long" dir="return"/>
12001 </method>
12002
12003 <method name="getRemoteConsole">
12004 <desc>
12005 Returns the console object suitable for remote control.
12006
12007 <result name="VBOX_E_INVALID_VM_STATE">
12008 Session state prevents operation.
12009 </result>
12010 <result name="VBOX_E_INVALID_OBJECT_STATE">
12011 Session type prevents operation.
12012 </result>
12013
12014 </desc>
12015 <param name="console" type="IConsole" dir="return"/>
12016 </method>
12017
12018 <method name="assignMachine">
12019 <desc>
12020 Assigns the machine object associated with this direct-type
12021 session or informs the session that it will be a remote one
12022 (if @a machine == @c null).
12023
12024 <result name="VBOX_E_INVALID_VM_STATE">
12025 Session state prevents operation.
12026 </result>
12027 <result name="VBOX_E_INVALID_OBJECT_STATE">
12028 Session type prevents operation.
12029 </result>
12030
12031 </desc>
12032 <param name="machine" type="IMachine" dir="in"/>
12033 </method>
12034
12035 <method name="assignRemoteMachine">
12036 <desc>
12037 Assigns the machine and the (remote) console object associated with
12038 this remote-type session.
12039
12040 <result name="VBOX_E_INVALID_VM_STATE">
12041 Session state prevents operation.
12042 </result>
12043
12044 </desc>
12045 <param name="machine" type="IMachine" dir="in"/>
12046 <param name="console" type="IConsole" dir="in"/>
12047 </method>
12048
12049 <method name="updateMachineState">
12050 <desc>
12051 Updates the machine state in the VM process.
12052 Must be called only in certain cases
12053 (see the method implementation).
12054
12055 <result name="VBOX_E_INVALID_VM_STATE">
12056 Session state prevents operation.
12057 </result>
12058 <result name="VBOX_E_INVALID_OBJECT_STATE">
12059 Session type prevents operation.
12060 </result>
12061
12062 </desc>
12063 <param name="aMachineState" type="MachineState" dir="in"/>
12064 </method>
12065
12066 <method name="uninitialize">
12067 <desc>
12068 Uninitializes (closes) this session. Used by VirtualBox to close
12069 the corresponding remote session when the direct session dies
12070 or gets closed.
12071
12072 <result name="VBOX_E_INVALID_VM_STATE">
12073 Session state prevents operation.
12074 </result>
12075
12076 </desc>
12077 </method>
12078
12079 <method name="onDVDDriveChange">
12080 <desc>
12081 Triggered when settings of the DVD drive object of the
12082 associated virtual machine have changed.
12083
12084 <result name="VBOX_E_INVALID_VM_STATE">
12085 Session state prevents operation.
12086 </result>
12087 <result name="VBOX_E_INVALID_OBJECT_STATE">
12088 Session type prevents operation.
12089 </result>
12090
12091 </desc>
12092 </method>
12093
12094 <method name="onFloppyDriveChange">
12095 <desc>
12096 Triggered when settings of the floppy drive object of the
12097 associated virtual machine have changed.
12098
12099 <result name="VBOX_E_INVALID_VM_STATE">
12100 Session state prevents operation.
12101 </result>
12102 <result name="VBOX_E_INVALID_OBJECT_STATE">
12103 Session type prevents operation.
12104 </result>
12105
12106 </desc>
12107 </method>
12108
12109 <method name="onNetworkAdapterChange">
12110 <desc>
12111 Triggered when settings of a network adapter of the
12112 associated virtual machine have changed.
12113
12114 <result name="VBOX_E_INVALID_VM_STATE">
12115 Session state prevents operation.
12116 </result>
12117 <result name="VBOX_E_INVALID_OBJECT_STATE">
12118 Session type prevents operation.
12119 </result>
12120
12121 </desc>
12122 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12123 <param name="changeAdapter" type="boolean" dir="in"/>
12124 </method>
12125
12126 <method name="onSerialPortChange">
12127 <desc>
12128 Triggered when settings of a serial port of the
12129 associated virtual machine have changed.
12130
12131 <result name="VBOX_E_INVALID_VM_STATE">
12132 Session state prevents operation.
12133 </result>
12134 <result name="VBOX_E_INVALID_OBJECT_STATE">
12135 Session type prevents operation.
12136 </result>
12137
12138 </desc>
12139 <param name="serialPort" type="ISerialPort" dir="in"/>
12140 </method>
12141
12142 <method name="onParallelPortChange">
12143 <desc>
12144 Triggered when settings of a parallel port of the
12145 associated virtual machine have changed.
12146
12147 <result name="VBOX_E_INVALID_VM_STATE">
12148 Session state prevents operation.
12149 </result>
12150 <result name="VBOX_E_INVALID_OBJECT_STATE">
12151 Session type prevents operation.
12152 </result>
12153
12154 </desc>
12155 <param name="parallelPort" type="IParallelPort" dir="in"/>
12156 </method>
12157
12158 <method name="onStorageControllerChange">
12159 <desc>
12160 Triggered when settings of a storage controller of the
12161 associated virtual machine have changed.
12162
12163 <result name="VBOX_E_INVALID_VM_STATE">
12164 Session state prevents operation.
12165 </result>
12166 <result name="VBOX_E_INVALID_OBJECT_STATE">
12167 Session type prevents operation.
12168 </result>
12169
12170 </desc>
12171 </method>
12172
12173 <method name="onVRDPServerChange">
12174 <desc>
12175 Triggered when settings of the VRDP server object of the
12176 associated virtual machine have changed.
12177
12178 <result name="VBOX_E_INVALID_VM_STATE">
12179 Session state prevents operation.
12180 </result>
12181 <result name="VBOX_E_INVALID_OBJECT_STATE">
12182 Session type prevents operation.
12183 </result>
12184
12185 </desc>
12186 </method>
12187
12188 <method name="onUSBControllerChange">
12189 <desc>
12190 Triggered when settings of the USB controller object of the
12191 associated virtual machine have changed.
12192
12193 <result name="VBOX_E_INVALID_VM_STATE">
12194 Session state prevents operation.
12195 </result>
12196 <result name="VBOX_E_INVALID_OBJECT_STATE">
12197 Session type prevents operation.
12198 </result>
12199
12200 </desc>
12201 </method>
12202
12203 <method name="onSharedFolderChange">
12204 <desc>
12205 Triggered when a permanent (global or machine) shared folder has been
12206 created or removed.
12207 <note>
12208 We don't pass shared folder parameters in this notification because
12209 the order in which parallel notifications are delivered is not defined,
12210 therefore it could happen that these parameters were outdated by the
12211 time of processing this notification.
12212 </note>
12213
12214 <result name="VBOX_E_INVALID_VM_STATE">
12215 Session state prevents operation.
12216 </result>
12217 <result name="VBOX_E_INVALID_OBJECT_STATE">
12218 Session type prevents operation.
12219 </result>
12220
12221 </desc>
12222 <param name="global" type="boolean" dir="in"/>
12223 </method>
12224
12225 <method name="onUSBDeviceAttach">
12226 <desc>
12227 Triggered when a request to capture a USB device (as a result
12228 of matched USB filters or direct call to
12229 <link to="IConsole::attachUSBDevice"/>) has completed.
12230 A @c null @a error object means success, otherwise it
12231 describes a failure.
12232
12233 <result name="VBOX_E_INVALID_VM_STATE">
12234 Session state prevents operation.
12235 </result>
12236 <result name="VBOX_E_INVALID_OBJECT_STATE">
12237 Session type prevents operation.
12238 </result>
12239
12240 </desc>
12241 <param name="device" type="IUSBDevice" dir="in"/>
12242 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12243 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12244 </method>
12245
12246 <method name="onUSBDeviceDetach">
12247 <desc>
12248 Triggered when a request to release the USB device (as a result
12249 of machine termination or direct call to
12250 <link to="IConsole::detachUSBDevice"/>) has completed.
12251 A @c null @a error object means success, otherwise it
12252 describes a failure.
12253
12254 <result name="VBOX_E_INVALID_VM_STATE">
12255 Session state prevents operation.
12256 </result>
12257 <result name="VBOX_E_INVALID_OBJECT_STATE">
12258 Session type prevents operation.
12259 </result>
12260
12261 </desc>
12262 <param name="id" type="wstring" dir="in"/>
12263 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12264 </method>
12265
12266 <method name="onShowWindow">
12267 <desc>
12268 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12269 <link to="IMachine::showConsoleWindow"/> in order to notify
12270 console callbacks
12271 <link to="IConsoleCallback::onCanShowWindow"/>
12272 and <link to="IConsoleCallback::onShowWindow"/>.
12273
12274 <result name="VBOX_E_INVALID_OBJECT_STATE">
12275 Session type prevents operation.
12276 </result>
12277
12278 </desc>
12279 <param name="check" type="boolean" dir="in"/>
12280 <param name="canShow" type="boolean" dir="out"/>
12281 <param name="winId" type="unsigned long long" dir="out"/>
12282 </method>
12283
12284 <method name="accessGuestProperty">
12285 <desc>
12286 Called by <link to="IMachine::getGuestProperty"/> and by
12287 <link to="IMachine::setGuestProperty"/> in order to read and
12288 modify guest properties.
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="name" type="wstring" dir="in"/>
12299 <param name="value" type="wstring" dir="in"/>
12300 <param name="flags" type="wstring" dir="in"/>
12301 <param name="isSetter" type="boolean" dir="in"/>
12302 <param name="retValue" type="wstring" dir="out"/>
12303 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12304 <param name="retFlags" type="wstring" dir="out"/>
12305 </method>
12306
12307 <method name="enumerateGuestProperties">
12308 <desc>
12309 Return a list of the guest properties matching a set of patterns along
12310 with their values, time stamps and flags.
12311
12312 <result name="VBOX_E_INVALID_VM_STATE">
12313 Machine session is not open.
12314 </result>
12315 <result name="VBOX_E_INVALID_OBJECT_STATE">
12316 Session type is not direct.
12317 </result>
12318
12319 </desc>
12320 <param name="patterns" type="wstring" dir="in">
12321 <desc>
12322 The patterns to match the properties against as a comma-separated
12323 string. If this is empty, all properties currently set will be
12324 returned.
12325 </desc>
12326 </param>
12327 <param name="key" type="wstring" dir="out" safearray="yes">
12328 <desc>
12329 The key names of the properties returned.
12330 </desc>
12331 </param>
12332 <param name="value" type="wstring" dir="out" safearray="yes">
12333 <desc>
12334 The values of the properties returned. The array entries match the
12335 corresponding entries in the @a key array.
12336 </desc>
12337 </param>
12338 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12339 <desc>
12340 The time stamps of the properties returned. The array entries match
12341 the corresponding entries in the @a key array.
12342 </desc>
12343 </param>
12344 <param name="flags" type="wstring" dir="out" safearray="yes">
12345 <desc>
12346 The flags of the properties returned. The array entries match the
12347 corresponding entries in the @a key array.
12348 </desc>
12349 </param>
12350 </method>
12351
12352 </interface>
12353
12354 <interface
12355 name="ISession" extends="$dispatched"
12356 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12357 wsmap="managed"
12358 >
12359 <desc>
12360 The ISession interface represents a serialization primitive for virtual
12361 machines.
12362
12363 With VirtualBox, every time one wishes to manipulate a virtual machine
12364 (e.g. change its settings or start execution), a session object is
12365 required. Such an object must be passed to one of the session methods
12366 that open the given session, which then initiates the machine manipulation.
12367
12368 A session serves several purposes: it identifies to the inter-process VirtualBox
12369 code which process is currently working with the virtual machine, and it ensures
12370 that there are no incompatible requests from several processes for the
12371 same virtual machine. Session objects can therefore be thought of as mutex
12372 semaphores that lock virtual machines to prevent conflicting accesses from
12373 several processes.
12374
12375 How sessions objects are used depends on whether you use the Main API
12376 via COM or via the webservice:
12377
12378 <ul>
12379 <li>When using the COM API directly, an object of the Session class from the
12380 VirtualBox type library needs to be created. In regular COM C++ client code,
12381 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12382 This object will then act as a local session object in further calls to open
12383 a session.
12384 </li>
12385
12386 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12387 one session object automatically when <link to="IWebsessionManager::logon" />
12388 is called. A managed object reference to that session object can be retrieved by
12389 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12390 reference can then be used to open sessions.
12391 </li>
12392 </ul>
12393
12394 Sessions are mainly used in two variations:
12395
12396 <ul>
12397 <li>
12398 To start a virtual machine in a separate process, one would call
12399 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12400 object as its first parameter. This session then identifies the caller
12401 and lets him control the started machine (for example, pause machine
12402 execution or power it down) as well as be notified about machine
12403 execution state changes.
12404 </li>
12405
12406 <li>To alter machine settings, or to start machine execution within the
12407 current process, one needs to open a direct session for the machine first by
12408 calling <link to="IVirtualBox::openSession"/>. While a direct session
12409 is open within one process, no any other process may open another direct
12410 session for the same machine. This prevents the machine from being changed
12411 by other processes while it is running or while the machine is being configured.
12412 </li>
12413 </ul>
12414
12415 One also can attach to an existing direct session already opened by
12416 another process (for example, in order to send a control request to the
12417 virtual machine such as the pause or the reset request). This is done by
12418 calling <link to="IVirtualBox::openExistingSession"/>.
12419
12420 <note>
12421 Unless you are trying to write a new VirtualBox front-end that
12422 performs direct machine execution (like the VirtualBox or VBoxSDL
12423 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12424 session opened by <link to="IVirtualBox::openSession"/> and use this
12425 session only to change virtual machine settings. If you simply want to
12426 start virtual machine execution using one of the existing front-ends
12427 (for example the VirtualBox GUI or headless server), simply use
12428 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12429 will power up the machine automatically for you.
12430 </note>
12431 </desc>
12432
12433 <attribute name="state" type="SessionState" readonly="yes">
12434 <desc>Current state of this session.</desc>
12435 </attribute>
12436
12437 <attribute name="type" type="SessionType" readonly="yes">
12438 <desc>
12439 Type of this session. The value of this attribute is valid only
12440 if the session is currently open (i.e. its #state is
12441 SessionType_SessionOpen), otherwise an error will be returned.
12442 </desc>
12443 </attribute>
12444
12445 <attribute name="machine" type="IMachine" readonly="yes">
12446 <desc>Machine object associated with this session.</desc>
12447 </attribute>
12448
12449 <attribute name="console" type="IConsole" readonly="yes">
12450 <desc>Console object associated with this session.</desc>
12451 </attribute>
12452
12453 <method name="close">
12454 <desc>
12455 Closes a session that was previously opened.
12456
12457 It is recommended that every time an "open session" method (such as
12458 <link to="IVirtualBox::openRemoteSession" /> or
12459 <link to="IVirtualBox::openSession" />) has been called to
12460 manipulate a virtual machine, the caller invoke
12461 ISession::close() when it's done doing so. Since sessions are
12462 serialization primitives much like ordinary mutexes, they are
12463 best used the same way: for each "open" call, there should be
12464 a matching "close" call, even when errors occur.
12465
12466 Otherwise, if a direct session for a machine opened with
12467 <link to="IVirtualBox::openSession"/> is not explicitly closed
12468 when the application terminates, the state of the machine will
12469 be set to <link to="MachineState_Aborted" /> on the server.
12470
12471 Generally, it is recommended to close all open sessions explicitly
12472 before terminating the application (regardless of the reason for
12473 the termination).
12474
12475 <note>
12476 Do not expect the session state (<link to="ISession::state" />
12477 to return to "Closed" immediately after you invoke
12478 ISession::close(), particularly if you have started a remote
12479 session to execute the VM in a new process. The session state will
12480 automatically return to "Closed" once the VM is no longer executing,
12481 which can of course take a very long time.
12482 </note>
12483
12484 <result name="E_UNEXPECTED">
12485 Session is not open.
12486 </result>
12487
12488 </desc>
12489 </method>
12490
12491 </interface>
12492
12493 <!--
12494 // IStorageController
12495 /////////////////////////////////////////////////////////////////////////
12496 -->
12497
12498 <enum
12499 name="StorageBus"
12500 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12501 >
12502 <desc>
12503 The connection type of the storage controller.
12504 </desc>
12505 <const name="Null" value="0">
12506 <desc>@c null value. Never used by the API.</desc>
12507 </const>
12508 <const name="IDE" value="1"/>
12509 <const name="SATA" value="2"/>
12510 <const name="SCSI" value="3"/>
12511 </enum>
12512
12513 <enum
12514 name="StorageControllerType"
12515 uuid="685387db-a837-4320-a258-08f46a22f62a"
12516 >
12517 <desc>
12518 Storage controller type.
12519 </desc>
12520
12521 <const name="Null" value="0">
12522 <desc>@c null value. Never used by the API.</desc>
12523 </const>
12524 <const name="LsiLogic" value="1"/>
12525 <const name="BusLogic" value="2"/>
12526 <const name="IntelAhci" value="3"/>
12527 <const name="PIIX3" value="4"/>
12528 <const name="PIIX4" value="5"/>
12529 <const name="ICH6" value="6"/>
12530 </enum>
12531
12532 <interface
12533 name="IStorageController" extends="$unknown"
12534 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12535 wsmap="managed"
12536 >
12537 <desc>
12538 Represents a storage controller that is attached to a virtual machine
12539 (<link to="IMachine" />). Just as hard disks are attached to storage
12540 controllers in a real computer, virtual hard disks (represented by
12541 <link to="IHardDisk" />) are attached to virtual storage controllers,
12542 represented by this interface.
12543
12544 VirtualBox supports three types of virtual storage controller hardware:
12545 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12546 these three is used, certain sub-types are available and can be
12547 selected in <link to="#controllerType" />.
12548 </desc>
12549
12550 <attribute name="name" type="wstring" readonly="yes">
12551 <desc>
12552 Name of the storage controller, as originally specified with
12553 <link to="IMachine::addStorageController" />. This then uniquely
12554 identifies this controller with other method calls such as
12555 <link to="IMachine::attachHardDisk" />.
12556 </desc>
12557 </attribute>
12558
12559 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12560 <desc>
12561 Maximum number of devices which can be attached to one port.
12562 </desc>
12563 </attribute>
12564
12565 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12566 <desc>
12567 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12568 </desc>
12569 </attribute>
12570
12571 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12572 <desc>
12573 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12574 </desc>
12575 </attribute>
12576
12577 <attribute name="instance" type="unsigned long">
12578 <desc>
12579 The instance number of the device in the running VM.
12580 </desc>
12581 </attribute>
12582
12583 <attribute name="portCount" type="unsigned long">
12584 <desc>
12585 The number of currently usable ports on the controller.
12586 The minimum and maximum number of ports for one controller are
12587 stored in <link to="IStorageController::minPortCount"/>
12588 and <link to="IStorageController::maxPortCount"/>.
12589 </desc>
12590 </attribute>
12591
12592 <attribute name="bus" type="StorageBus" readonly="yes">
12593 <desc>
12594 The connection type of the storage controller.
12595 </desc>
12596 </attribute>
12597
12598 <attribute name="controllerType" type="StorageControllerType">
12599 <desc>
12600 Type of the virtual storage controller. Depending on this value,
12601 VirtualBox will provide a different virtual storage controller hardware
12602 to the guest.
12603
12604 For SCSI controllers, the default type is LsiLogic.
12605 </desc>
12606 </attribute>
12607
12608 <method name="GetIDEEmulationPort">
12609 <desc>
12610 Gets the corresponding port number which is emulated as an IDE device.
12611
12612 <result name="E_INVALIDARG">
12613 The @a devicePosition is not in the range 0 to 3.
12614 </result>
12615 <result name="E_NOTIMPL">
12616 The storage controller type is not SATAIntelAhci.
12617 </result>
12618
12619 </desc>
12620 <param name="devicePosition" type="long" dir="in"/>
12621 <param name="portNumber" type="long" dir="return"/>
12622 </method>
12623
12624 <method name="SetIDEEmulationPort">
12625 <desc>
12626 Sets the port number which is emulated as an IDE device.
12627
12628 <result name="E_INVALIDARG">
12629 The @a devicePosition is not in the range 0 to 3 or the
12630 @a portNumber is not in the range 0 to 29.
12631 </result>
12632 <result name="E_NOTIMPL">
12633 The storage controller type is not SATAIntelAhci.
12634 </result>
12635
12636 </desc>
12637 <param name="devicePosition" type="long" dir="in"/>
12638 <param name="portNumber" type="long" dir="in"/>
12639 </method>
12640
12641 </interface>
12642
12643<if target="wsdl">
12644
12645 <!--
12646 // IManagedObjectRef
12647 /////////////////////////////////////////////////////////////////////////
12648 -->
12649
12650 <interface
12651 name="IManagedObjectRef" extends="$unknown"
12652 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12653 internal="yes"
12654 wsmap="managed"
12655 wscpp="hardcoded"
12656 >
12657 <desc>
12658 Managed object reference.
12659
12660 Only within the webservice, a managed object reference (which is really
12661 an opaque number) allows a webservice client to address an object
12662 that lives in the address space of the webservice server.
12663
12664 Behind each managed object reference, there is a COM object that lives
12665 in the webservice server's address space. The COM object is not freed
12666 until the managed object reference is released, either by an explicit
12667 call to <link to="IManagedObjectRef::release" /> or by logging off from
12668 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12669 all objects created during the webservice session.
12670
12671 Whenever a method call of the VirtualBox API returns a COM object, the
12672 webservice representation of that method will instead return a
12673 managed object reference, which can then be used to invoke methods
12674 on that object.
12675 </desc>
12676
12677 <method name="getInterfaceName">
12678 <desc>
12679 Returns the name of the interface that this managed object represents,
12680 for example, "IMachine", as a string.
12681 </desc>
12682 <param name="return" type="wstring" dir="return"/>
12683 </method>
12684
12685 <method name="release">
12686 <desc>
12687 Releases this managed object reference and frees the resources that
12688 were allocated for it in the webservice server process. After calling
12689 this method, the identifier of the reference can no longer be used.
12690 </desc>
12691 </method>
12692
12693 </interface>
12694
12695 <!--
12696 // IWebsessionManager
12697 /////////////////////////////////////////////////////////////////////////
12698 -->
12699
12700 <interface
12701 name="IWebsessionManager" extends="$unknown"
12702 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12703 internal="yes"
12704 wsmap="global"
12705 wscpp="hardcoded"
12706 >
12707 <desc>
12708 Websession manager. This provides essential services
12709 to webservice clients.
12710 </desc>
12711 <method name="logon">
12712 <desc>
12713 Logs a new client onto the webservice and returns a managed object reference to
12714 the IVirtualBox instance, which the client can then use as a basis to further
12715 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12716 interface, in one way or the other.
12717 </desc>
12718 <param name="username" type="wstring" dir="in"/>
12719 <param name="password" type="wstring" dir="in"/>
12720 <param name="return" type="IVirtualBox" dir="return"/>
12721 </method>
12722
12723 <method name="getSessionObject">
12724 <desc>
12725 Returns a managed object reference to the internal ISession object that was created
12726 for this web service session when the client logged on.
12727
12728 <see>ISession</see>
12729 </desc>
12730 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12731 <param name="return" type="ISession" dir="return"/>
12732 </method>
12733
12734 <method name="logoff">
12735 <desc>
12736 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12737 and destroys all resources associated with the session (most importantly, all
12738 managed objects created in the server while the session was active).
12739 </desc>
12740 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12741 </method>
12742
12743 </interface>
12744
12745</if>
12746
12747 <!--
12748 // IPerformanceCollector & friends
12749 /////////////////////////////////////////////////////////////////////////
12750 -->
12751
12752 <interface
12753 name="IPerformanceMetric" extends="$unknown"
12754 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12755 >
12756 <desc>
12757 The IPerformanceMetric interface represents parameters of the given
12758 performance metric.
12759 </desc>
12760
12761 <attribute name="metricName" type="wstring" readonly="yes">
12762 <desc>
12763 Name of the metric.
12764 </desc>
12765 </attribute>
12766
12767 <attribute name="object" type="$unknown" readonly="yes">
12768 <desc>
12769 Object this metric belongs to.
12770 </desc>
12771 </attribute>
12772
12773 <attribute name="description" type="wstring" readonly="yes">
12774 <desc>
12775 Textual description of the metric.
12776 </desc>
12777 </attribute>
12778
12779 <attribute name="period" type="unsigned long" readonly="yes">
12780 <desc>
12781 Time interval between samples, measured in seconds.
12782 </desc>
12783 </attribute>
12784
12785 <attribute name="count" type="unsigned long" readonly="yes">
12786 <desc>
12787 Number of recent samples retained by the performance collector for this
12788 metric.
12789
12790 When the collected sample count exceeds this number, older samples
12791 are discarded.
12792 </desc>
12793 </attribute>
12794
12795 <attribute name="unit" type="wstring" readonly="yes">
12796 <desc>
12797 Unit of measurement.
12798 </desc>
12799 </attribute>
12800
12801 <attribute name="minimumValue" type="long" readonly="yes">
12802 <desc>
12803 Minimum possible value of this metric.
12804 </desc>
12805 </attribute>
12806
12807 <attribute name="maximumValue" type="long" readonly="yes">
12808 <desc>
12809 Maximum possible value of this metric.
12810 </desc>
12811 </attribute>
12812 </interface>
12813
12814 <interface
12815 name="IPerformanceCollector" extends="$unknown"
12816 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12817 wsmap="managed"
12818 >
12819 <desc>
12820 The IPerformanceCollector interface represents a service that collects and
12821 stores performance metrics data.
12822
12823 Performance metrics are associated with objects of interfaces like IHost and
12824 IMachine. Each object has a distinct set of performance metrics.
12825 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12826
12827 Metric data is collected at the specified intervals and is retained
12828 internally. The interval and the number of retained samples can be set
12829 with <link to="IPerformanceCollector::setupMetrics" />.
12830
12831 Metrics are organized hierarchically, with each level separated by a
12832 slash (/) character. Generally, the scheme for metric names is like this:
12833
12834 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12835
12836 "Category/Metric" together form the base metric name. A base metric is the
12837 smallest unit for which a sampling interval and the number of retained
12838 samples can be set. Only base metrics can be enabled and disabled. All
12839 sub-metrics are collected when their base metric is collected.
12840 Collected values for any set of sub-metrics can be queried with
12841 <link to="IPerformanceCollector::queryMetricsData" />.
12842
12843 For example "CPU/Load/User:avg"
12844 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12845 "average" aggregate. An aggregate function is computed over all retained
12846 data. Valid aggregate functions are:
12847
12848 <ul>
12849 <li>avg -- average</li>
12850 <li>min -- minimum</li>
12851 <li>max -- maximum</li>
12852 </ul>
12853
12854 When setting up
12855 metric parameters, querying metric data, enabling or disabling metrics
12856 wildcards can be used in metric names to specify a subset of metrics. For
12857 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12858 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12859 values without aggregates <tt>*:</tt> can be used.
12860
12861 The valid names for base metrics are:
12862
12863 <ul>
12864 <li>CPU/Load</li>
12865 <li>CPU/MHz</li>
12866 <li>RAM/Usage</li>
12867 </ul>
12868
12869 The general sequence for collecting and retrieving the metrics is:
12870 <ul>
12871 <li>
12872 Obtain an instance of IPerformanceCollector with
12873 <link to="IVirtualBox::performanceCollector" />
12874 </li>
12875 <li>
12876 Allocate and populate an array with references to objects the metrics
12877 will be collected for. Use references to IHost and IMachine objects.
12878 </li>
12879 <li>
12880 Allocate and populate an array with base metric names the data will be
12881 collected for.
12882 </li>
12883 <li>
12884 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12885 metric data will be collected and stored.
12886 </li>
12887 <li>
12888 Wait for the data to get collected.
12889 </li>
12890 <li>
12891 Allocate and populate an array with references to objects the metric
12892 values will be queried for. You can re-use the object array used for
12893 setting base metrics.
12894 </li>
12895 <li>
12896 Allocate and populate an array with metric names the data will be
12897 collected for. Note that metric names differ from base metric names.
12898 </li>
12899 <li>
12900 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12901 have been collected so far are returned. Note that the values are still
12902 retained internally and data collection continues.
12903 </li>
12904 </ul>
12905
12906 For an example of usage refer to the following files in VirtualBox SDK:
12907 <ul>
12908 <li>
12909 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12910 </li>
12911 <li>
12912 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12913 </li>
12914 </ul>
12915 </desc>
12916
12917 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12918 <desc>
12919 Array of unique names of metrics.
12920
12921 This array represents all metrics supported by the performance
12922 collector. Individual objects do not necessarily support all of them.
12923 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12924 list of supported metrics for a particular object.
12925 </desc>
12926 </attribute>
12927
12928 <method name="getMetrics">
12929 <desc>
12930 Returns parameters of specified metrics for a set of objects.
12931 <note>
12932 @c Null metrics array means all metrics. @c Null object array means
12933 all existing objects.
12934 </note>
12935 </desc>
12936 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12937 <desc>
12938 Metric name filter. Currently, only a comma-separated list of metrics
12939 is supported.
12940 </desc>
12941 </param>
12942 <param name="objects" type="$unknown" dir="in" safearray="yes">
12943 <desc>
12944 Set of objects to return metric parameters for.
12945 </desc>
12946 </param>
12947 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12948 <desc>
12949 Array of returned metric parameters.
12950 </desc>
12951 </param>
12952 </method>
12953
12954 <method name="setupMetrics">
12955 <desc>
12956 Sets parameters of specified base metrics for a set of objects. Returns
12957 an array of <link to="IPerformanceMetric" /> describing the metrics have
12958 been affected.
12959 <note>
12960 @c Null or empty metric name array means all metrics. @c Null or empty
12961 object array means all existing objects. If metric name array contains
12962 a single element and object array contains many, the single metric
12963 name array element is applied to each object array element to form
12964 metric/object pairs.
12965 </note>
12966 </desc>
12967 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12968 <desc>
12969 Metric name filter. Comma-separated list of metrics with wildcard
12970 support.
12971 </desc>
12972 </param>
12973 <param name="objects" type="$unknown" dir="in" safearray="yes">
12974 <desc>
12975 Set of objects to setup metric parameters for.
12976 </desc>
12977 </param>
12978 <param name="period" type="unsigned long" dir="in">
12979 <desc>
12980 Time interval in seconds between two consecutive samples of performance
12981 data.
12982 </desc>
12983 </param>
12984 <param name="count" type="unsigned long" dir="in">
12985 <desc>
12986 Number of samples to retain in performance data history. Older samples
12987 get discarded.
12988 </desc>
12989 </param>
12990 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12991 <desc>
12992 Array of metrics that have been modified by the call to this method.
12993 </desc>
12994 </param>
12995 </method>
12996
12997 <method name="enableMetrics">
12998 <desc>
12999 Turns on collecting specified base metrics. Returns an array of
13000 <link to="IPerformanceMetric" /> describing the metrics have been
13001 affected.
13002 <note>
13003 @c Null or empty metric name array means all metrics. @c Null or empty
13004 object array means all existing objects. If metric name array contains
13005 a single element and object array contains many, the single metric
13006 name array element is applied to each object array element to form
13007 metric/object pairs.
13008 </note>
13009 </desc>
13010 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13011 <desc>
13012 Metric name filter. Comma-separated list of metrics with wildcard
13013 support.
13014 </desc>
13015 </param>
13016 <param name="objects" type="$unknown" dir="in" safearray="yes">
13017 <desc>
13018 Set of objects to enable metrics for.
13019 </desc>
13020 </param>
13021 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13022 <desc>
13023 Array of metrics that have been modified by the call to this method.
13024 </desc>
13025 </param>
13026 </method>
13027
13028 <method name="disableMetrics">
13029 <desc>
13030 Turns off collecting specified base metrics. Returns an array of
13031 <link to="IPerformanceMetric" /> describing the metrics have been
13032 affected.
13033 <note>
13034 @c Null or empty metric name array means all metrics. @c Null or empty
13035 object array means all existing objects. If metric name array contains
13036 a single element and object array contains many, the single metric
13037 name array element is applied to each object array element to form
13038 metric/object pairs.
13039 </note>
13040 </desc>
13041 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13042 <desc>
13043 Metric name filter. Comma-separated list of metrics with wildcard
13044 support.
13045 </desc>
13046 </param>
13047 <param name="objects" type="$unknown" dir="in" safearray="yes">
13048 <desc>
13049 Set of objects to disable metrics for.
13050 </desc>
13051 </param>
13052 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13053 <desc>
13054 Array of metrics that have been modified by the call to this method.
13055 </desc>
13056 </param>
13057 </method>
13058
13059 <method name="queryMetricsData">
13060 <desc>
13061 Queries collected metrics data for a set of objects.
13062
13063 The data itself and related metric information are returned in seven
13064 parallel and one flattened array of arrays. Elements of
13065 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13066 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13067 the same index describe one set of values corresponding to a single
13068 metric.
13069
13070 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13071 start and length of a sub-array is indicated by
13072 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13073 value for metric <tt>metricNames[i]</tt> is at
13074 <tt>returnData[returnIndices[i]]</tt>.
13075
13076 <note>
13077 @c Null or empty metric name array means all metrics. @c Null or empty
13078 object array means all existing objects. If metric name array contains
13079 a single element and object array contains many, the single metric
13080 name array element is applied to each object array element to form
13081 metric/object pairs.
13082 </note>
13083 <note>
13084 Data collection continues behind the scenes after call to
13085 @c queryMetricsData. The return data can be seen as the snapshot of
13086 the current state at the time of @c queryMetricsData call. The
13087 internally kept metric values are not cleared by the call. This makes
13088 possible querying different subsets of metrics or aggregates with
13089 subsequent calls. If periodic querying is needed it is highly
13090 suggested to query the values with @c interval*count period to avoid
13091 confusion. This way a completely new set of data values will be
13092 provided by each query.
13093 </note>
13094 </desc>
13095 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13096 <desc>
13097 Metric name filter. Comma-separated list of metrics with wildcard
13098 support.
13099 </desc>
13100 </param>
13101 <param name="objects" type="$unknown" dir="in" safearray="yes">
13102 <desc>
13103 Set of objects to query metrics for.
13104 </desc>
13105 </param>
13106 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13107 <desc>
13108 Names of metrics returned in @c returnData.
13109 </desc>
13110 </param>
13111 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13112 <desc>
13113 Objects associated with metrics returned in @c returnData.
13114 </desc>
13115 </param>
13116 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13117 <desc>
13118 Units of measurement for each returned metric.
13119 </desc>
13120 </param>
13121 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13122 <desc>
13123 Divisor that should be applied to return values in order to get
13124 floating point values. For example:
13125 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13126 will retrieve the floating point value of i-th sample of the first
13127 metric.
13128 </desc>
13129 </param>
13130 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13131 <desc>
13132 Sequence numbers of the first elements of value sequences of particular metrics
13133 returned in @c returnData. For aggregate metrics it is the sequence number of
13134 the sample the aggregate started calculation from.
13135 </desc>
13136 </param>
13137 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13138 <desc>
13139 Indices of the first elements of value sequences of particular metrics
13140 returned in @c returnData.
13141 </desc>
13142 </param>
13143 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13144 <desc>
13145 Lengths of value sequences of particular metrics.
13146 </desc>
13147 </param>
13148 <param name="returnData" type="long" dir="return" safearray="yes">
13149 <desc>
13150 Flattened array of all metric data containing sequences of values for
13151 each metric.
13152 </desc>
13153 </param>
13154 </method>
13155
13156 </interface>
13157
13158 <module name="VBoxSVC" context="LocalServer">
13159 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13160 namespace="virtualbox.org">
13161 <interface name="IVirtualBox" default="yes"/>
13162 </class>
13163 </module>
13164
13165 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13166 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13167 namespace="virtualbox.org">
13168 <interface name="ISession" default="yes"/>
13169 </class>
13170 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13171 namespace="virtualbox.org">
13172 <interface name="ILocalOwner" default="yes"/>
13173 <interface name="IVirtualBoxCallback"/>
13174 <interface name="IConsoleCallback"/>
13175 </class>
13176 </module>
13177
13178</library>
13179
13180</idl>
13181
13182<!-- 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