VirtualBox

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

Last change on this file since 31595 was 31595, checked in by vboxsync, 14 years ago

Main: remove deprecated VirtualBox::createLegacyMachine() and corresponding VBoxManage --settingsfile option; new API docs for IMachine::attachDevice() (not yet implemented)

  • Property svn:eol-style set to native
File size: 555.9 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4
5 Copyright (C) 2006-2010 Oracle Corporation
6
7 This file is part of VirtualBox Open Source Edition (OSE), as
8 available from http://www.virtualbox.org. This file is free software;
9 you can redistribute it and/or modify it under the terms of the GNU
10 General Public License (GPL) as published by the Free Software
11 Foundation, in version 2 as it comes in the "COPYING" file of the
12 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14-->
15
16<!--
17 This is the master declaration for VirtualBox's Main API,
18 represented by COM/XPCOM and web service interfaces.
19
20 From this document, the build system generates several files
21 via XSLT that are then used during the build process.
22
23 Below is the list of XSL templates that operate on this file and
24 output files they generate. These XSL templates must be updated
25 whenever the schema of this file changes:
26
27 1. src/VBox/Main/idl/midl.xsl =>
28 out/<platform>/bin/sdk/idl/VirtualBox.idl
29 (MS COM interface definition file for Main API)
30
31 2. src/VBox/Main/idl/xpidl.xsl =>
32 out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
33 (XPCOM interface definition file for Main API)
34
35 3. src/VBox/Main/idl/doxygen.xsl =>
36 out/<platform>/obj/src/VBox/Main/VirtualBox.idl
37 (pseudo-IDL for Doxygen to generate the official Main API
38 documentation)
39
40 4. src/VBox/Main/webservice/*.xsl =>
41 a bunch of WSDL and C++ files
42 (VirtualBox web service sources and SOAP mappers;
43 see src/VBox/Main/webservice/Makefile.kmk for details)
44
45 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
46 out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
47 (smart Qt-based C++ wrapper classes for COM interfaces
48 of the Main API)
49
50 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
51 out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
52 (Main API TypeLib block for the WiX installer)
53
54 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
55 out/<platform>/obj/Runtime/errmsgvboxcomdata.h
56 (<result> extraction for the %Rhrc format specifier)
57-->
58
59<idl>
60
61<desc>
62 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
63 describes the so-called <i>VirtualBox Main API</i> which comprises all public
64 COM interfaces and components provided by the VirtualBox server and by the
65 VirtualBox client library.
66
67 VirtualBox employs a client-server design, meaning that whenever any part of
68 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
69 interface or any virtual machine --, a dedicated server process named
70 VBoxSVC runs in the background. This allows multiple processes working with
71 VirtualBox to cooperate without conflicts. These processes communicate to each
72 other using inter-process communication facilities provided by the COM
73 implementation of the host computer.
74
75 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
76 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
77 implementation, is used.
78
79 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
80 the VBoxManage command-line interface and the VBoxVRDP server) are technically
81 front-ends to the Main API and only use the interfaces that are documented
82 in this Main API documentation. This ensures that, with any given release
83 version of VirtualBox, all capabilities of the product that could be useful
84 to an external client program are always exposed by way of this API.
85
86 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
87 contains two public component classes:
88 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
89 implement IVirtualBox and ISession interfaces respectively. These two classes
90 are of supreme importance and will be needed in order for any front-end
91 program to do anything useful. It is recommended to read the documentation of
92 the mentioned interfaces first.
93
94 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
95 there can be only one object of this class on the local machine at any given
96 time. This object is a parent of many other objects in the VirtualBox COM
97 library and lives in the VBoxSVC process. In fact, when you create an instance
98 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
99 process is already running, starts it if not, and returns you a reference to
100 the <tt>VirtualBox</tt> object created in this process. When the last reference
101 to this object is released, the VBoxSVC process ends (with a 5 second delay to
102 protect from too frequent restarts).
103
104 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
105 as many <tt>Session</tt> objects as you need but all of them will live in a
106 process which issues the object instantiation call. <tt>Session</tt> objects
107 represent virtual machine sessions which are used to configure virtual
108 machines and control their execution.
109</desc>
110
111<if target="midl">
112 <cpp line="enum {"/>
113 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
114 <cpp line=" kTypeLibraryMinorVersion = 0"/>
115 <cpp line="};"/>
116</if>
117
118<if target="xpidl">
119 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
120 <cpp>
121/* currently, nsISupportsImpl.h lacks the below-like macros */
122
123#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
124#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
125#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
126#define NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI NS_IMPL_QUERY_INTERFACE4_CI
127
128
129#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
130# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
131 NS_IMPL_THREADSAFE_ADDREF(_class) \
132 NS_IMPL_THREADSAFE_RELEASE(_class) \
133 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
134 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
135#endif
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
142 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
150 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
151#endif
152
153#ifndef NS_IMPL_THREADSAFE_ISUPPORTS4_CI
154# define NS_IMPL_THREADSAFE_ISUPPORTS4_CI(_class, _i1, _i2, _i3, _i4) \
155 NS_IMPL_THREADSAFE_ADDREF(_class) \
156 NS_IMPL_THREADSAFE_RELEASE(_class) \
157 NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \
158 NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4)
159#endif
160
161#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
162# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
163 NS_INTERFACE_MAP_BEGIN(_class) \
164 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
165 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
166 NS_IMPL_QUERY_CLASSINFO(_class) \
167 NS_INTERFACE_MAP_END
168#endif
169
170#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
171# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
172 _i2, _ic2) \
173 NS_INTERFACE_MAP_BEGIN(_class) \
174 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
175 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
176 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
177 NS_IMPL_QUERY_CLASSINFO(_class) \
178 NS_INTERFACE_MAP_END
179#endif
180
181#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
182# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2, _i3, _ic3) \
184 NS_INTERFACE_MAP_BEGIN(_class) \
185 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
186 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
187 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
188 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
189 NS_IMPL_QUERY_CLASSINFO(_class) \
190 NS_INTERFACE_MAP_END
191#endif
192
193#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
194#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
195#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
196
197#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
198# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
199 NS_IMPL_THREADSAFE_ADDREF(_class) \
200 NS_IMPL_THREADSAFE_RELEASE(_class) \
201 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
202 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
203#endif
204
205#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
206# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
207 _i2, _ic2) \
208 NS_IMPL_THREADSAFE_ADDREF(_class) \
209 NS_IMPL_THREADSAFE_RELEASE(_class) \
210 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2) \
212 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
213#endif
214
215#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
216# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
217 _i2, _ic2, _i3, _ic3) \
218 NS_IMPL_THREADSAFE_ADDREF(_class) \
219 NS_IMPL_THREADSAFE_RELEASE(_class) \
220 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
221 _i2, _ic2, _i3, _ic3) \
222 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
223#endif
224
225 </cpp>
226</if>
227
228<library
229 name="VirtualBox"
230 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
231 version="1.3"
232 desc="VirtualBox Type Library"
233 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
234 supportsErrorInfo="yes"
235>
236
237
238 <!--
239 // COM result codes for VirtualBox
240 /////////////////////////////////////////////////////////////////////////
241 -->
242
243 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
244 <desc>
245 This section describes all VirtualBox-specific COM result codes that may
246 be returned by methods of VirtualBox COM interfaces in addition to
247 standard COM result codes.
248
249 Note that along with the result code, every VirtualBox method returns
250 extended error information through the IVirtualBoxErrorInfo interface on
251 failure. This interface is a preferred way to present the error to the end
252 user because it contains a human readable description of the error. Raw
253 result codes, both standard and described in this section, are intended to
254 be used by programs to analyze the reason of a failure and select an
255 appropriate course of action without involving the end user (for example,
256 retry the operation later or make a different call).
257
258 The standard COM result codes that may originate from our methods include:
259
260 <table>
261 <tr><td>E_INVALIDARG</td>
262 <td>
263 Returned when the value of the method's argument is not within the range
264 of valid values. This should not be confused with situations when the
265 value is within the range but simply doesn't suit the current object
266 state and there is a possibility that it will be accepted later (in such
267 cases VirtualBox-specific codes are returned, for example,
268 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
269 </td>
270 </tr>
271 <tr><td>E_POINTER</td>
272 <td>
273 Returned if a memory pointer for the output argument is invalid (for
274 example, @c null). Note that when pointers representing input
275 arguments (such as strings) are invalid, E_INVALIDARG is returned.
276 </td>
277 </tr>
278 <tr><td>E_ACCESSDENIED</td>
279 <td>
280 Returned when the called object is not ready. Since the lifetime of a
281 public COM object cannot be fully controlled by the implementation,
282 VirtualBox maintains the readiness state for all objects it creates and
283 returns this code in response to any method call on the object that was
284 deactivated by VirtualBox and is not functioning any more.
285 </td>
286 </tr>
287 <tr><td>E_OUTOFMEMORY</td>
288 <td>
289 Returned when a memory allocation operation fails.
290 </td>
291 </tr>
292 </table>
293 </desc>
294 </descGroup>
295
296 <!--
297 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
298 everything in <result>/<desc> after (and including) the first dot, so express
299 the matter of the error code in the first sentence and keep it short.
300 -->
301
302 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
303 <desc>
304 Object corresponding to the supplied arguments does not exist.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
309 <desc>
310 Current virtual machine state prevents the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
315 <desc>
316 Virtual machine error occurred attempting the operation.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
321 <desc>
322 File not accessible or erroneous file contents.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
327 <desc>
328 Runtime subsystem error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
333 <desc>
334 Pluggable Device Manager error.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
339 <desc>
340 Current object state prohibits operation.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
345 <desc>
346 Host operating system related error.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
351 <desc>
352 Requested operation is not supported.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
357 <desc>
358 Invalid XML found.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
363 <desc>
364 Current session state prohibits operation.
365 </desc>
366 </result>
367
368 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
369 <desc>
370 Object being in use prohibits operation.
371 </desc>
372 </result>
373
374 <!--
375 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
376 everything in <result>/<desc> after (and including) the first dot, so express
377 the matter of the error code in the first sentence and keep it short.
378 -->
379
380 <descGroup/>
381
382 <!--
383 // all common enums
384 /////////////////////////////////////////////////////////////////////////
385 -->
386
387 <enum name="SettingsVersion"
388 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
389 >
390 <desc>Settings version of VirtualBox settings files. This is written to
391 the "version" attribute of the root "VirtualBox" element in the settings
392 file XML and indicates which VirtualBox version wrote the file.
393 </desc>
394
395 <const name="Null" value="0">
396 <desc>Null value, indicates invalid version.</desc>
397 </const>
398 <const name="v1_0" value="1">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_1" value="2">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_2" value="3">
405 <desc>Legacy settings version, not currently supported.</desc>
406 </const>
407 <const name="v1_3pre" value="4">
408 <desc>Legacy settings version, not currently supported.</desc>
409 </const>
410 <const name="v1_3" value="5">
411 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
412 <!--
413 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
414 -->
415 </const>
416 <const name="v1_4" value="6">
417 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
418 <!--
419 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
420 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
421 -->
422 </const>
423 <const name="v1_5" value="7">
424 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
425 <!-- 2008-09-04: 2.0.0 released
426 2008-11-20: settings version 1.5 introduced
427 2008-12-17: 2.1.0 released
428 Machine changes:
429 guest OS identifiers changed;
430 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
431 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
432 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
433 -->
434 </const>
435 <const name="v1_6" value="8">
436 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
437 <!-- 2008-12-17: 2.1.0 released
438 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
439 2009-04-08: 2.2.0 released
440 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
441 -->
442 </const>
443 <const name="v1_7" value="9">
444 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
445 <!-- 2008-12-17: 2.1.0 released
446 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
447 2009-04-08: 2.2.0 released
448 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
449 Machine changes: HardDiskAttachments is now StorageControllers (done)
450 -->
451 </const>
452 <const name="v1_8" value="10">
453 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
454 <!-- Machine additions: Display/@accelerate2DVideo (done)
455 -->
456 </const>
457 <const name="v1_9" value="11">
458 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
459 <!-- The big storage controller / DVD / Floppy rework (done)
460 -->
461 </const>
462 <const name="v1_10" value="12">
463 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
464 <!-- Machine changes: RTC localOrUTC (done)
465 CPU hot-plug support
466 -->
467 </const>
468 <const name="v1_11" value="13">
469 <desc>Settings version "1.11", written by VirtualBox 3.3.x.</desc>
470 <!-- Machine changes: HD Audio controller, per-machine disk registries
471 -->
472 </const>
473 <const name="Future" value="99999">
474 <desc>Settings version greater than "1.11", written by a future VirtualBox version.</desc>
475 </const>
476 </enum>
477
478 <enum
479 name="AccessMode"
480 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
481 >
482 <desc>
483 Access mode for opening files.
484 </desc>
485
486 <const name="ReadOnly" value="1"/>
487 <const name="ReadWrite" value="2"/>
488 </enum>
489
490 <enum
491 name="MachineState"
492 uuid="e998d075-543a-41fc-8aa9-5ca3e92393fd"
493 >
494 <desc>
495 Virtual machine execution state.
496
497 This enumeration represents possible values of the <link
498 to="IMachine::state"/> attribute.
499
500 Below is the basic virtual machine state diagram. It shows how the state
501 changes during virtual machine execution. The text in square braces shows
502 a method of the IConsole interface that performs the given state
503 transition.
504
505 <pre>
506 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
507 V |
508 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
509 | | | | V |
510 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
511 | | ^ | ^ |
512 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
513 | ^ | | | |
514 | | +-----------------------------------------+-|-------------------+ +
515 | | | | |
516 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
517 | | | |
518 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
519 | | |
520 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
521 </pre>
522
523 Note that states to the right from PoweredOff, Aborted and Saved in the
524 above diagram are called <i>online VM states</i>. These states
525 represent the virtual machine which is being executed in a dedicated
526 process (usually with a GUI window attached to it where you can see the
527 activity of the virtual machine and interact with it). There are two
528 special pseudo-states, FirstOnline and LastOnline, that can be used in
529 relational expressions to detect if the given machine state is online or
530 not:
531
532 <pre>
533 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
534 machine.GetState() &lt;= MachineState_LastOnline)
535 {
536 ...the machine is being executed...
537 }
538 </pre>
539
540 When the virtual machine is in one of the online VM states (that is, being
541 executed), only a few machine settings can be modified. Methods working
542 with such settings contain an explicit note about that. An attempt to
543 change any oter setting or perform a modifying operation during this time
544 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
545
546 All online states except Running, Paused and Stuck are transitional: they
547 represent temporary conditions of the virtual machine that will last as
548 long as the operation that initiated such a condition.
549
550 The Stuck state is a special case. It means that execution of the machine
551 has reached the "Guru Meditation" condition. This condition indicates an
552 internal VMM (virtual machine manager) failure which may happen as a
553 result of either an unhandled low-level virtual hardware exception or one
554 of the recompiler exceptions (such as the <i>too-many-traps</i>
555 condition).
556
557 Note also that any online VM state may transit to the Aborted state. This
558 happens if the process that is executing the virtual machine terminates
559 unexpectedly (for example, crashes). Other than that, the Aborted state is
560 equivalent to PoweredOff.
561
562 There are also a few additional state diagrams that do not deal with
563 virtual machine execution and therefore are shown separately. The states
564 shown on these diagrams are called <i>offline VM states</i> (this includes
565 PoweredOff, Aborted and Saved too).
566
567 The first diagram shows what happens when a lengthy setup operation is
568 being executed (such as <link to="IMachine::attachDevice"/>).
569
570 <pre>
571 +----------------------------------(same state as before the call)------+
572 | |
573 +-&gt; PoweredOff --+ |
574 | | |
575 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
576 | |
577 +-&gt; Saved -------+
578 </pre>
579
580 The next two diagrams demonstrate the process of taking a snapshot of a
581 powered off virtual machine, restoring the state to that as of a snapshot
582 or deleting a snapshot, respectively.
583
584 <pre>
585 +----------------------------------(same state as before the call)------+
586 | |
587 +-&gt; PoweredOff --+ |
588 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
589 +-&gt; Aborted -----+
590
591 +-&gt; PoweredOff --+
592 | |
593 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
594 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
595 +-&gt; Saved -------+ |
596 | |
597 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
598 </pre>
599
600 Note that the Saving state is present in both the offline state group and
601 online state group. Currently, the only way to determine what group is
602 assumed in a particular case is to remember the previous machine state: if
603 it was Running or Paused, then Saving is an online state, otherwise it is
604 an offline state. This inconsistency may be removed in one of the future
605 versions of VirtualBox by adding a new state.
606
607 <note internal="yes">
608 For whoever decides to touch this enum: In order to keep the
609 comparisons involving FirstOnline and LastOnline pseudo-states valid,
610 the numeric values of these states must be correspondingly updated if
611 needed: for any online VM state, the condition
612 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
613 @c true. The same relates to transient states for which
614 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
615 @c true.
616 </note>
617 </desc>
618
619 <const name="Null" value="0">
620 <desc>Null value (never used by the API).</desc>
621 </const>
622 <const name="PoweredOff" value="1">
623 <desc>
624 The machine is not running and has no saved execution state; it has
625 either never been started or been shut down successfully.
626 </desc>
627 </const>
628 <const name="Saved" value="2">
629 <desc>
630 The machine is not currently running, but the execution state of the machine
631 has been saved to an external file when it was running, from where
632 it can be resumed.
633 </desc>
634 </const>
635 <const name="Teleported" value="3">
636 <desc>
637 The machine was teleported to a different host (or process) and then
638 powered off. Take care when powering it on again may corrupt resources
639 it shares with the teleportation target (e.g. disk and network).
640 </desc>
641 </const>
642 <const name="Aborted" value="4">
643 <desc>
644 The process running the machine has terminated abnormally. This may
645 indicate a crash of the VM process in host execution context, or
646 the VM process has been terminated externally.
647 </desc>
648 </const>
649 <const name="Running" value="5">
650 <desc>
651 The machine is currently being executed.
652 <note internal="yes">
653 For whoever decides to touch this enum: In order to keep the
654 comparisons in the old source code valid, this state must immediately
655 precede the Paused state.
656 TODO: Lift this spectacularly wonderful restriction.
657 </note>
658 </desc>
659 </const>
660 <const name="Paused" value="6">
661 <desc>
662 Execution of the machine has been paused.
663 <note internal="yes">
664 For whoever decides to touch this enum: In order to keep the
665 comparisons in the old source code valid, this state must immediately
666 follow the Running state.
667 TODO: Lift this spectacularly wonderful restriction.
668 </note>
669 </desc>
670 </const>
671 <const name="Stuck" value="7">
672 <desc>
673 Execution of the machine has reached the "Guru Meditation"
674 condition. This indicates a severe error in the hypervisor itself.
675 <note internal="yes">
676 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
677 "Guru", perhaps? Or are there some other VMM states that are
678 intended to be lumped in here as well?
679 </note>
680 </desc>
681 </const>
682 <const name="Teleporting" value="8">
683 <desc>
684 The machine is about to be teleported to a different host or process.
685 It is possible to pause a machine in this state, but it will go to the
686 @c TeleportingPausedVM state and it will not be
687 possible to resume it again unless the teleportation fails.
688 </desc>
689 </const>
690 <const name="LiveSnapshotting" value="9">
691 <desc>
692 A live snapshot is being taken. The machine is running normally, but
693 some of the runtime configuration options are inaccessible. Also, if
694 paused while in this state it will transition to
695 @c Saving and it will not be resume the
696 execution until the snapshot operation has completed.
697 </desc>
698 </const>
699 <const name="Starting" value="10">
700 <desc>
701 Machine is being started after powering it on from a
702 zero execution state.
703 </desc>
704 </const>
705 <const name="Stopping" value="11">
706 <desc>
707 Machine is being normally stopped powering it off, or after the guest OS
708 has initiated a shutdown sequence.
709 </desc>
710 </const>
711 <const name="Saving" value="12">
712 <desc>
713 Machine is saving its execution state to a file, or an online
714 snapshot of the machine is being taken.
715 </desc>
716 </const>
717 <const name="Restoring" value="13">
718 <desc>
719 Execution state of the machine is being restored from a file
720 after powering it on from the saved execution state.
721 </desc>
722 </const>
723 <const name="TeleportingPausedVM" value="14">
724 <desc>
725 The machine is being teleported to another host or process, but it is
726 not running. This is the paused variant of the
727 @c state.
728 </desc>
729 </const>
730 <const name="TeleportingIn" value="15">
731 <desc>
732 Teleporting the machine state in from another host or process.
733 </desc>
734 </const>
735 <const name="DeletingSnapshotOnline" value="16">
736 <desc>
737 Like @c DeletingSnapshot, but the merging of media is ongoing in
738 the background while the machine is running.
739 </desc>
740 </const>
741 <const name="DeletingSnapshotPaused" value="17">
742 <desc>
743 Like @c DeletingSnapshotOnline, but the machine was paused when the
744 merging of differencing media was started.
745 </desc>
746 </const>
747 <const name="RestoringSnapshot" value="18">
748 <desc>
749 A machine snapshot is being restored; this typically does not take long.
750 </desc>
751 </const>
752 <const name="DeletingSnapshot" value="19">
753 <desc>
754 A machine snapshot is being deleted; this can take a long time since this
755 may require merging differencing media. This value indicates that the
756 machine is not running while the snapshot is being deleted.
757 </desc>
758 </const>
759 <const name="SettingUp" value="20">
760 <desc>
761 Lengthy setup operation is in progress.
762 </desc>
763 </const>
764
765 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
766 <desc>
767 Pseudo-state: first online state (for use in relational expressions).
768 </desc>
769 </const>
770 <const name="LastOnline" value="17" wsmap="suppress"> <!-- DeletingSnapshotPaused -->
771 <desc>
772 Pseudo-state: last online state (for use in relational expressions).
773 </desc>
774 </const>
775
776 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
777 <desc>
778 Pseudo-state: first transient state (for use in relational expressions).
779 </desc>
780 </const>
781 <const name="LastTransient" value="20" wsmap="suppress"> <!-- SettingUp -->
782 <desc>
783 Pseudo-state: last transient state (for use in relational expressions).
784 </desc>
785 </const>
786
787 </enum>
788
789 <enum
790 name="SessionState"
791 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
792 >
793 <desc>
794 Session state. This enumeration represents possible values of
795 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
796 attributes.
797 </desc>
798
799 <const name="Null" value="0">
800 <desc>Null value (never used by the API).</desc>
801 </const>
802 <const name="Unlocked" value="1">
803 <desc>
804 In <link to="IMachine::sessionState"/>, this means that the machine
805 is not locked for any sessions.
806
807 In <link to="ISession::state"/>, this means that no machine is
808 currently locked for this session.
809 </desc>
810 </const>
811 <const name="Locked" value="2">
812 <desc>
813 In <link to="IMachine::sessionState"/>, this means that the machine
814 is currently locked for a session, whose process identifier can
815 then be found in the <link to="IMachine::sessionPid" /> attribute.
816
817 In <link to="ISession::state"/>, this means that a machine is
818 currently locked for this session, and the mutable machine object
819 can be found in the <link to="ISession::machine"/> attribute
820 (see <link to="IMachine::lockMachine" /> for details).
821 </desc>
822 </const>
823 <const name="Spawning" value="3">
824 <desc>
825 A new process is being spawned for the machine as a result of
826 <link to="IMachine::launchVMProcess"/> call. This state also occurs
827 as a short transient state during an <link to="IMachine::lockMachine"/>
828 call.
829 </desc>
830 </const>
831 <const name="Unlocking" value="4">
832 <desc>
833 The session is being unlocked.
834 </desc>
835 </const>
836 </enum>
837
838 <enum
839 name="CPUPropertyType"
840 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
841 >
842 <desc>
843 Virtual CPU property type. This enumeration represents possible values of the
844 IMachine get- and setCPUProperty methods.
845 </desc>
846 <const name="Null" value="0">
847 <desc>Null value (never used by the API).</desc>
848 </const>
849 <const name="PAE" value="1">
850 <desc>
851 This setting determines whether VirtualBox will expose the Physical Address
852 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
853 is not available, it will not be reported.
854 </desc>
855 </const>
856 <const name="Synthetic" value="2">
857 <desc>
858 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
859 teleporting between host systems that differ significantly.
860 </desc>
861 </const>
862 </enum>
863
864
865 <enum
866 name="HWVirtExPropertyType"
867 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
868 >
869 <desc>
870 Hardware virtualization property type. This enumeration represents possible values
871 for the <link to="IMachine::getHWVirtExProperty"/> and
872 <link to="IMachine::setHWVirtExProperty"/> methods.
873 </desc>
874 <const name="Null" value="0">
875 <desc>Null value (never used by the API).</desc>
876 </const>
877 <const name="Enabled" value="1">
878 <desc>
879 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
880 such extensions are not available, they will not be used.
881 </desc>
882 </const>
883 <const name="Exclusive" value="2">
884 <desc>
885 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
886 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
887 feature of the host. To share these with other hypervisors, you must disable this property.
888 </desc>
889 </const>
890 <const name="VPID" value="3">
891 <desc>
892 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
893 </desc>
894 </const>
895 <const name="NestedPaging" value="4">
896 <desc>
897 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
898 </desc>
899 </const>
900 <const name="LargePages" value="5">
901 <desc>
902 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
903 </desc>
904 </const>
905 </enum>
906
907 <enum
908 name="LockType"
909 uuid="138b53f8-db4b-47c5-b32b-4ef52f769413"
910 >
911 <desc>
912 Used with <link to="IMachine::lockMachine" />.
913 </desc>
914 <const name="Write" value="2">
915 <desc>Lock the machine for writing.</desc>
916 </const>
917 <const name="Shared" value="1">
918 <desc>Request only a shared read lock for remote-controlling the machine.</desc>
919 </const>
920 </enum>
921
922 <enum
923 name="SessionType"
924 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
925 >
926 <desc>
927 Session type. This enumeration represents possible values of the
928 <link to="ISession::type"/> attribute.
929 </desc>
930
931 <const name="Null" value="0">
932 <desc>Null value (never used by the API).</desc>
933 </const>
934 <const name="WriteLock" value="1">
935 <desc>
936 Session has acquired an exclusive write lock on a machine
937 using <link to="IMachine::lockMachine"/>.
938 </desc>
939 </const>
940 <const name="Remote" value="2">
941 <desc>
942 Session has launched a VM process using
943 <link to="IMachine::launchVMProcess"/>
944 </desc>
945 </const>
946 <const name="Shared" value="3">
947 <desc>
948 Session has obtained a link to another session using
949 <link to="IMachine::lockMachine"/>
950 </desc>
951 </const>
952 </enum>
953
954 <enum
955 name="DeviceType"
956 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
957 >
958 <desc>
959 Device type.
960 </desc>
961 <const name="Null" value="0">
962 <desc>
963 Null value, may also mean "no device" (not allowed for
964 <link to="IConsole::getDeviceActivity"/>).
965 </desc>
966 </const>
967 <const name="Floppy" value="1">
968 <desc>Floppy device.</desc>
969 </const>
970 <const name="DVD" value="2">
971 <desc>CD/DVD-ROM device.</desc>
972 </const>
973 <const name="HardDisk" value="3">
974 <desc>Hard disk device.</desc>
975 </const>
976 <const name="Network" value="4">
977 <desc>Network device.</desc>
978 </const>
979 <const name="USB" value="5">
980 <desc>USB device.</desc>
981 </const>
982 <const name="SharedFolder" value="6">
983 <desc>Shared folder device.</desc>
984 </const>
985 </enum>
986
987 <enum
988 name="DeviceActivity"
989 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
990 >
991 <desc>
992 Device activity for <link to="IConsole::getDeviceActivity"/>.
993 </desc>
994
995 <const name="Null" value="0"/>
996 <const name="Idle" value="1"/>
997 <const name="Reading" value="2"/>
998 <const name="Writing" value="3"/>
999 </enum>
1000
1001 <enum
1002 name="ClipboardMode"
1003 uuid="33364716-4008-4701-8f14-be0fa3d62950"
1004 >
1005 <desc>
1006 Host-Guest clipboard interchange mode.
1007 </desc>
1008
1009 <const name="Disabled" value="0"/>
1010 <const name="HostToGuest" value="1"/>
1011 <const name="GuestToHost" value="2"/>
1012 <const name="Bidirectional" value="3"/>
1013 </enum>
1014
1015 <enum
1016 name="Scope"
1017 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
1018 >
1019 <desc>
1020 Scope of the operation.
1021
1022 A generic enumeration used in various methods to define the action or
1023 argument scope.
1024 </desc>
1025
1026 <const name="Global" value="0"/>
1027 <const name="Machine" value="1"/>
1028 <const name="Session" value="2"/>
1029 </enum>
1030
1031 <enum
1032 name="BIOSBootMenuMode"
1033 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1034 >
1035 <desc>
1036 BIOS boot menu mode.
1037 </desc>
1038
1039 <const name="Disabled" value="0"/>
1040 <const name="MenuOnly" value="1"/>
1041 <const name="MessageAndMenu" value="2"/>
1042 </enum>
1043
1044 <enum
1045 name="ProcessorFeature"
1046 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1047 >
1048 <desc>
1049 CPU features.
1050 </desc>
1051
1052 <const name="HWVirtEx" value="0"/>
1053 <const name="PAE" value="1"/>
1054 <const name="LongMode" value="2"/>
1055 <const name="NestedPaging" value="3"/>
1056 </enum>
1057
1058 <enum
1059 name="FirmwareType"
1060 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1061 >
1062 <desc>
1063 Firmware type.
1064 </desc>
1065 <const name="BIOS" value="1">
1066 <desc>BIOS Firmware.</desc>
1067 </const>
1068 <const name="EFI" value="2">
1069 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1070 </const>
1071 <const name="EFI32" value="3">
1072 <desc>Efi firmware, 32-bit.</desc>
1073 </const>
1074 <const name="EFI64" value="4">
1075 <desc>Efi firmware, 64-bit.</desc>
1076 </const>
1077 <const name="EFIDUAL" value="5">
1078 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1079 </const>
1080 </enum>
1081
1082 <enum
1083 name="PointingHidType"
1084 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1085 >
1086 <desc>
1087 Type of pointing device used in a virtual machine.
1088 </desc>
1089 <const name="None" value="1">
1090 <desc>No mouse.</desc>
1091 </const>
1092 <const name="PS2Mouse" value="2">
1093 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1094 </const>
1095 <const name="USBMouse" value="3">
1096 <desc>USB mouse (relative pointer).</desc>
1097 </const>
1098 <const name="USBTablet" value="4">
1099 <desc>USB tablet (absolute pointer).</desc>
1100 </const>
1101 <const name="ComboMouse" value="5">
1102 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1103 Using of such device can have negative performance implications. </desc>
1104 </const>
1105 </enum>
1106
1107 <enum
1108 name="KeyboardHidType"
1109 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1110 >
1111 <desc>
1112 Type of keyboard device used in a virtual machine.
1113 </desc>
1114 <const name="None" value="1">
1115 <desc>No keyboard.</desc>
1116 </const>
1117 <const name="PS2Keyboard" value="2">
1118 <desc>PS/2 keyboard.</desc>
1119 </const>
1120 <const name="USBKeyboard" value="3">
1121 <desc>USB keyboard.</desc>
1122 </const>
1123 <const name="ComboKeyboard" value="4">
1124 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1125 Using of such device can have negative performance implications. </desc>
1126 </const>
1127 </enum>
1128
1129 <!--
1130 // IVirtualBoxErrorInfo
1131 /////////////////////////////////////////////////////////////////////////
1132 -->
1133
1134 <interface
1135 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1136 uuid="e053d3c0-f493-491b-a735-3a9f0b1feed4"
1137 supportsErrorInfo="no"
1138 wsmap="managed"
1139 >
1140 <desc>
1141 The IVirtualBoxErrorInfo interface represents extended error information.
1142
1143 Extended error information can be set by VirtualBox components after
1144 unsuccessful or partially successful method invocation. This information
1145 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1146 and then shown to the client in addition to the plain 32-bit result code.
1147
1148 In MS COM, this interface extends the IErrorInfo interface,
1149 in XPCOM, it extends the nsIException interface. In both cases,
1150 it provides a set of common attributes to retrieve error
1151 information.
1152
1153 Sometimes invocation of some component's method may involve methods of
1154 other components that may also fail (independently of this method's
1155 failure), or a series of non-fatal errors may precede a fatal error that
1156 causes method failure. In cases like that, it may be desirable to preserve
1157 information about all errors happened during method invocation and deliver
1158 it to the caller. The <link to="#next"/> attribute is intended
1159 specifically for this purpose and allows to represent a chain of errors
1160 through a single IVirtualBoxErrorInfo object set after method invocation.
1161
1162 Note that errors are stored to a chain in the reverse order, i.e. the
1163 initial error object you query right after method invocation is the last
1164 error set by the callee, the object it points to in the @a next attribute
1165 is the previous error and so on, up to the first error (which is the last
1166 in the chain).
1167 </desc>
1168
1169 <attribute name="resultCode" type="long" readonly="yes">
1170 <desc>
1171 Result code of the error.
1172 Usually, it will be the same as the result code returned
1173 by the method that provided this error information, but not
1174 always. For example, on Win32, CoCreateInstance() will most
1175 likely return E_NOINTERFACE upon unsuccessful component
1176 instantiation attempt, but not the value the component factory
1177 returned. Value is typed 'long', not 'result',
1178 to make interface usable from scripting languages.
1179 <note>
1180 In MS COM, there is no equivalent.
1181 In XPCOM, it is the same as nsIException::result.
1182 </note>
1183 </desc>
1184 </attribute>
1185
1186 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1187 <desc>
1188 UUID of the interface that defined the error.
1189 <note>
1190 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1191 data type.
1192 In XPCOM, there is no equivalent.
1193 </note>
1194 </desc>
1195 </attribute>
1196
1197 <attribute name="component" type="wstring" readonly="yes">
1198 <desc>
1199 Name of the component that generated the error.
1200 <note>
1201 In MS COM, it is the same as IErrorInfo::GetSource.
1202 In XPCOM, there is no equivalent.
1203 </note>
1204 </desc>
1205 </attribute>
1206
1207 <attribute name="text" type="wstring" readonly="yes">
1208 <desc>
1209 Text description of the error.
1210 <note>
1211 In MS COM, it is the same as IErrorInfo::GetDescription.
1212 In XPCOM, it is the same as nsIException::message.
1213 </note>
1214 </desc>
1215 </attribute>
1216
1217 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1218 <desc>
1219 Next error object if there is any, or @c null otherwise.
1220 <note>
1221 In MS COM, there is no equivalent.
1222 In XPCOM, it is the same as nsIException::inner.
1223 </note>
1224 </desc>
1225 </attribute>
1226
1227 </interface>
1228
1229 <!--
1230 // IVirtualBox
1231 /////////////////////////////////////////////////////////////////////////
1232 -->
1233
1234 <interface
1235 name="IDHCPServer" extends="$unknown"
1236 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1237 wsmap="managed"
1238 >
1239 <desc>
1240 The IDHCPServer interface represents the vbox dhcp server configuration.
1241
1242 To enumerate all the dhcp servers on the host, use the
1243 <link to="IVirtualBox::DHCPServers"/> attribute.
1244 </desc>
1245
1246 <attribute name="enabled" type="boolean">
1247 <desc>
1248 specifies if the dhcp server is enabled
1249 </desc>
1250 </attribute>
1251
1252 <attribute name="IPAddress" type="wstring" readonly="yes">
1253 <desc>
1254 specifies server IP
1255 </desc>
1256 </attribute>
1257
1258 <attribute name="networkMask" type="wstring" readonly="yes">
1259 <desc>
1260 specifies server network mask
1261 </desc>
1262 </attribute>
1263
1264 <attribute name="networkName" type="wstring" readonly="yes">
1265 <desc>
1266 specifies internal network name the server is used for
1267 </desc>
1268 </attribute>
1269
1270 <attribute name="lowerIP" type="wstring" readonly="yes">
1271 <desc>
1272 specifies from IP adrres in server address range
1273 </desc>
1274 </attribute>
1275
1276 <attribute name="upperIP" type="wstring" readonly="yes">
1277 <desc>
1278 specifies to IP adrres in server address range
1279 </desc>
1280 </attribute>
1281
1282 <method name="setConfiguration">
1283 <desc>
1284 configures the server
1285 <result name="E_INVALIDARG">
1286 invalid configuration supplied
1287 </result>
1288 </desc>
1289 <param name="IPAddress" type="wstring" dir="in">
1290 <desc>
1291 server IP address
1292 </desc>
1293 </param>
1294 <param name="networkMask" type="wstring" dir="in">
1295 <desc>
1296 server network mask
1297 </desc>
1298 </param>
1299 <param name="FromIPAddress" type="wstring" dir="in">
1300 <desc>
1301 server From IP address for address range
1302 </desc>
1303 </param>
1304 <param name="ToIPAddress" type="wstring" dir="in">
1305 <desc>
1306 server To IP address for address range
1307 </desc>
1308 </param>
1309 </method>
1310
1311 <method name="start">
1312 <desc>
1313 Starts DHCP server process.
1314 <result name="E_FAIL">
1315 Failed to start the process.
1316 </result>
1317 </desc>
1318 <param name="networkName" type="wstring" dir="in">
1319 <desc>
1320 Name of internal network DHCP server should attach to.
1321 </desc>
1322 </param>
1323 <param name="trunkName" type="wstring" dir="in">
1324 <desc>
1325 Name of internal network trunk.
1326 </desc>
1327 </param>
1328 <param name="trunkType" type="wstring" dir="in">
1329 <desc>
1330 Type of internal network trunk.
1331 </desc>
1332 </param>
1333 </method>
1334
1335 <method name="stop">
1336 <desc>
1337 Stops DHCP server process.
1338 <result name="E_FAIL">
1339 Failed to stop the process.
1340 </result>
1341 </desc>
1342 </method>
1343 </interface>
1344
1345 <interface
1346 name="IVirtualBox" extends="$unknown"
1347 uuid="ec6cc7e7-06a2-4c5d-8993-1e3619c53817"
1348 wsmap="managed"
1349 >
1350 <desc>
1351 The IVirtualBox interface represents the main interface exposed by the
1352 product that provides virtual machine management.
1353
1354 An instance of IVirtualBox is required for the product to do anything
1355 useful. Even though the interface does not expose this, internally,
1356 IVirtualBox is implemented as a singleton and actually lives in the
1357 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1358 IVirtualBox can track the state of all virtual machines on a particular
1359 host, regardless of which frontend started them.
1360
1361 To enumerate all the virtual machines on the host, use the
1362 <link to="IVirtualBox::machines"/> attribute.
1363 </desc>
1364
1365 <attribute name="version" type="wstring" readonly="yes">
1366 <desc>
1367 A string representing the version number of the product. The
1368 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1369 last number represents the build number and will frequently change.
1370 </desc>
1371 </attribute>
1372
1373 <attribute name="revision" type="unsigned long" readonly="yes">
1374 <desc>
1375 The internal build revision number of the product.
1376 </desc>
1377 </attribute>
1378
1379 <attribute name="packageType" type="wstring" readonly="yes">
1380 <desc>
1381 A string representing the package type of this product. The
1382 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1383 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1384 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1385 this.
1386 </desc>
1387 </attribute>
1388
1389 <attribute name="homeFolder" type="wstring" readonly="yes">
1390 <desc>
1391 Full path to the directory where the global settings file,
1392 <tt>VirtualBox.xml</tt>, is stored.
1393
1394 In this version of VirtualBox, the value of this property is
1395 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1396 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1397 as determined by the host OS), and cannot be changed.
1398
1399 This path is also used as the base to resolve relative paths in
1400 places where relative paths are allowed (unless otherwise
1401 expressly indicated).
1402 </desc>
1403 </attribute>
1404
1405 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1406 <desc>
1407 Full name of the global settings file.
1408 The value of this property corresponds to the value of
1409 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1410 </desc>
1411 </attribute>
1412
1413 <attribute name="host" type="IHost" readonly="yes">
1414 <desc>Associated host object.</desc>
1415 </attribute>
1416
1417 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1418 <desc>Associated system information object.</desc>
1419 </attribute>
1420
1421 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1422 <desc>
1423 Array of machine objects registered within this VirtualBox instance.
1424 </desc>
1425 </attribute>
1426
1427 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1428 <desc>
1429 Array of medium objects known to this VirtualBox installation.
1430
1431 This array contains only base media. All differencing
1432 media of the given base medium can be enumerated using
1433 <link to="IMedium::children"/>.
1434 </desc>
1435 </attribute>
1436
1437 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1438 <desc>
1439 Array of CD/DVD image objects registered with this VirtualBox instance.
1440 </desc>
1441 </attribute>
1442
1443 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1444 <desc>
1445 Array of floppy image objects registered with this VirtualBox instance.
1446 </desc>
1447 </attribute>
1448
1449 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1450
1451 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1452
1453 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1454 <desc>
1455 Collection of global shared folders. Global shared folders are
1456 available to all virtual machines.
1457
1458 New shared folders are added to the collection using
1459 <link to="#createSharedFolder"/>. Existing shared folders can be
1460 removed using <link to="#removeSharedFolder"/>.
1461
1462 <note>
1463 In the current version of the product, global shared folders are not
1464 implemented and therefore this collection is always empty.
1465 </note>
1466 </desc>
1467 </attribute>
1468
1469 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1470 <desc>
1471 Associated performance collector object.
1472 </desc>
1473 </attribute>
1474
1475 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1476 <desc>
1477 dhcp server settings.
1478 </desc>
1479 </attribute>
1480
1481 <attribute name="eventSource" type="IEventSource" readonly="yes">
1482 <desc>
1483 Event source for VirtualBox events.
1484 </desc>
1485 </attribute>
1486
1487
1488 <method name="createMachine">
1489 <desc>
1490 Creates a new virtual machine.
1491
1492 The new machine is created unregistered, with the initial configuration
1493 set according to the specified guest OS type. A typical sequence of
1494 actions to create a new virtual machine is as follows:
1495
1496 <ol>
1497 <li>
1498 Call this method to have a new machine created. The returned machine
1499 object will be "mutable" allowing to change any machine property.
1500 </li>
1501
1502 <li>
1503 Configure the machine using the appropriate attributes and methods.
1504 </li>
1505
1506 <li>
1507 Call <link to="IMachine::saveSettings" /> to write the settings
1508 to the machine's XML settings file. The configuration of the newly
1509 created machine will not be saved to disk until this method is
1510 called.
1511 </li>
1512
1513 <li>
1514 Call <link to="#registerMachine" /> to add the machine to the list
1515 of machines known to VirtualBox.
1516 </li>
1517 </ol>
1518
1519 You should specify valid name for the newly created machine when calling
1520 this method. See the <link to="IMachine::name"/> attribute description
1521 for more details about the machine name.
1522
1523 The specified guest OS type identifier must match an ID of one of known
1524 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1525 array.
1526
1527 Every machine has a <i>settings file</i> that is used to store
1528 the machine configuration. This file is stored in a directory called the
1529 <i>machine settings subfolder</i>. Both the settings subfolder and file
1530 will have a name that corresponds to the name of the virtual machine.
1531 You can specify where to create the machine setting subfolder using the
1532 @a baseFolder argument. The base folder can be absolute (full path) or
1533 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1534 directory</link>.
1535
1536 If @a baseFolder is a @c null or empty string (which is recommended), the
1537 <link to="ISystemProperties::defaultMachineFolder">default machine
1538 settings folder</link> will be used as a base folder for the created
1539 machine. Otherwise the given base folder will be used. In either case,
1540 the full path to the resulting settings file has the following
1541 structure:
1542 <pre>
1543 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1544 </pre>
1545
1546 Note that if the resulting settings file already exists, this method
1547 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1548
1549 Optionally, you may specify an UUID of to assign to the created machine.
1550 However, this is not recommended and you should normally pass an empty
1551 (@c null) UUID to this method so that a new UUID will be automatically
1552 generated for every created machine. You can use UUID
1553 00000000-0000-0000-0000-000000000000 as @c null value.
1554
1555 <note>
1556 There is no way to change the name of the settings file or
1557 subfolder of the created machine directly.
1558 </note>
1559
1560 <result name="VBOX_E_OBJECT_NOT_FOUND">
1561 @a osTypeId is invalid.
1562 </result>
1563 <result name="VBOX_E_FILE_ERROR">
1564 Resulting settings file name is invalid or the settings file already
1565 exists or could not be created due to an I/O error.
1566 </result>
1567 <result name="E_INVALIDARG">
1568 @a name is empty or @c null.
1569 </result>
1570 </desc>
1571
1572 <param name="name" type="wstring" dir="in">
1573 <desc>Machine name.</desc>
1574 </param>
1575 <param name="osTypeId" type="wstring" dir="in">
1576 <desc>Guest OS Type ID.</desc>
1577 </param>
1578 <param name="baseFolder" type="wstring" dir="in">
1579 <desc>Base machine folder (optional).</desc>
1580 </param>
1581 <param name="id" type="uuid" mod="string" dir="in">
1582 <desc>Machine UUID (optional).</desc>
1583 </param>
1584 <param name="override" type="boolean" dir="in">
1585 <desc>Create the VM even if there are conflicting files.</desc>
1586 </param>
1587 <param name="machine" type="IMachine" dir="return">
1588 <desc>Created machine object.</desc>
1589 </param>
1590 </method>
1591
1592 <method name="openMachine">
1593 <desc>
1594 Opens a virtual machine from the existing settings file.
1595 The opened machine remains unregistered until you call
1596 <link to="#registerMachine"/>.
1597
1598 The specified settings file name can be absolute
1599 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1600 VirtualBox home directory</link>. This file must exist
1601 and must be a valid machine settings file whose contents
1602 will be used to construct the machine object.
1603
1604 <result name="VBOX_E_FILE_ERROR">
1605 Settings file name invalid, not found or sharing violation.
1606 </result>
1607 </desc>
1608 <param name="settingsFile" type="wstring" dir="in">
1609 <desc>
1610 Name of the machine settings file.
1611 </desc>
1612 </param>
1613 <param name="machine" type="IMachine" dir="return">
1614 <desc>Opened machine object.</desc>
1615 </param>
1616 <note>
1617 <link to="IMachine::settingsModified"/> will return
1618 @c false for the created machine, until any of machine settings
1619 are changed.
1620 </note>
1621 </method>
1622
1623 <method name="registerMachine">
1624 <desc>
1625
1626 Registers the machine previously created using
1627 <link to="#createMachine"/> or opened using
1628 <link to="#openMachine"/> within this VirtualBox installation. After
1629 successful method invocation, the
1630 <link to="IMachineRegisteredEvent"/> event is fired.
1631
1632 <note>
1633 This method implicitly calls <link to="IMachine::saveSettings"/>
1634 to save all current machine settings before registering it.
1635 </note>
1636
1637 <result name="VBOX_E_OBJECT_NOT_FOUND">
1638 No matching virtual machine found.
1639 </result>
1640 <result name="VBOX_E_INVALID_OBJECT_STATE">
1641 Virtual machine was not created within this VirtualBox instance.
1642 </result>
1643
1644 </desc>
1645 <param name="machine" type="IMachine" dir="in"/>
1646 </method>
1647
1648 <method name="getMachine">
1649 <desc>
1650 Attempts to find a virtual machine given its UUID.
1651 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1652 instead.
1653
1654 <result name="VBOX_E_OBJECT_NOT_FOUND">
1655 Could not find registered machine matching @a id.
1656 </result>
1657
1658 </desc>
1659 <param name="id" type="uuid" mod="string" dir="in"/>
1660 <param name="machine" type="IMachine" dir="return"/>
1661 </method>
1662
1663 <method name="findMachine">
1664 <desc>
1665 Attempts to find a virtual machine given its name.
1666 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1667 instead.
1668
1669 <result name="VBOX_E_OBJECT_NOT_FOUND">
1670 Could not find registered machine matching @a name.
1671 </result>
1672
1673 </desc>
1674 <param name="name" type="wstring" dir="in"/>
1675 <param name="machine" type="IMachine" dir="return"/>
1676 </method>
1677
1678 <method name="createAppliance">
1679 <desc>
1680 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1681 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1682 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1683 </desc>
1684 <param name="appliance" type="IAppliance" dir="return">
1685 <desc>New appliance.</desc>
1686 </param>
1687 </method>
1688
1689 <method name="createHardDisk">
1690 <desc>
1691 Creates a new base medium object that will use the given storage
1692 format and location for medium data.
1693
1694 Note that the actual storage unit is not created by this method. In
1695 order to do it, and before you are able to attach the created medium
1696 to virtual machines, you must call one of the following methods to
1697 allocate a format-specific storage unit at the specified location:
1698 <ul>
1699 <li><link to="IMedium::createBaseStorage"/></li>
1700 <li><link to="IMedium::createDiffStorage"/></li>
1701 </ul>
1702
1703 Some medium attributes, such as <link to="IMedium::id"/>, may
1704 remain uninitialized until the medium storage unit is successfully
1705 created by one of the above methods.
1706
1707 After the storage unit is successfully created, the medium gets
1708 remembered by this VirtualBox installation and will be accessible
1709 through the <link to="#findMedium"/> method. Remembered base medium
1710 are also returned as part of the <link to="#hardDisks"/> array.
1711 See <link to="IMedium" /> for more details.
1712
1713 The list of all storage formats supported by this VirtualBox
1714 installation can be obtained using
1715 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1716 attribute is empty or @c null then the default storage format
1717 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1718 be used for creating a storage unit of the medium.
1719
1720 Note that the format of the location string is storage format specific.
1721 See <link to="IMedium::location"/>, IMedium and
1722 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1723
1724 <result name="VBOX_E_OBJECT_NOT_FOUND">
1725 @a format identifier is invalid. See
1726 <link to="ISystemProperties::mediumFormats"/>.
1727 </result>
1728 <result name="VBOX_E_FILE_ERROR">
1729 @a location is a not valid file name (for file-based formats only).
1730 </result>
1731 </desc>
1732 <param name="format" type="wstring" dir="in">
1733 <desc>
1734 Identifier of the storage format to use for the new medium.
1735 </desc>
1736 </param>
1737 <param name="location" type="wstring" dir="in">
1738 <desc>
1739 Location of the storage unit for the new medium.
1740 </desc>
1741 </param>
1742 <param name="medium" type="IMedium" dir="return">
1743 <desc>Created medium object.</desc>
1744 </param>
1745 </method>
1746
1747 <method name="openMedium">
1748 <desc>
1749 Opens a medium from an existing storage location.
1750
1751 Once a medium has been opened, VirtualBox saves the medium in a media
1752 registry. Prior to VirtualBox 3.3, this registry had to be the global
1753 media registry in the VirtualBox.xml file, which was shared between
1754 all machines and made transporting machines from one host to another
1755 difficult. Now you can optionally specify an <link to="IMachine" />
1756 instance, in which case the medium will be remembered in that machine's
1757 registry. This is the recommended procedure for machines created with
1758 VirtualBox 3.3 or later. <i>(not yet implemented)</i>
1759
1760 Depending on the given device type, the file at the storage location
1761 must be in one of the media formats understood by VirtualBox:
1762
1763 <ul>
1764 <li>With a "HardDisk" device type, the file must be a hard disk image
1765 in one of the formats supported by VirtualBox (see
1766 <link to="ISystemProperties::mediumFormats" />).
1767 After this method succeeds, if the medium is a base medium, it
1768 will be added to the <link to="#hardDisks"/> array attribute. </li>
1769 <li>With a "DVD" device type, the file must be an ISO 9960 CD/DVD image.
1770 After this method succeeds, the medium will be added to the
1771 <link to="#DVDImages"/> array attribute.</li>
1772 <li>With a "Floppy" device type, the file must be an RAW floppy image.
1773 After this method succeeds, the medium will be added to the
1774 <link to="#floppyImages"/> array attribute.</li>
1775 </ul>
1776
1777 After having been opened, the medium can be found by the <link to="#findMedium"/>
1778 method and can be attached to virtual machines. See <link to="IMedium" /> for more details.
1779
1780 The UUID of the newly opened medium will either be retrieved from the
1781 storage location, if the format supports it (e.g. for hard disk images),
1782 or a new UUID will be randomly generated (e.g. for ISO and RAW files).
1783 If for some reason you need to change the medium's UUID, use
1784 <link to="IMedium::setIDs" />.
1785
1786 If a differencing hard disk medium is to be opened by this method, the
1787 operation will succeed only if its parent medium and all ancestors,
1788 if any, are already known to this VirtualBox installation (for example,
1789 were opened by this method before).
1790
1791 This method attempts to guess the storage format of the specified medium
1792 by reading medium data at the specified location.
1793
1794 If @a accessMode is ReadWrite (which it should be for hard disks and floppies),
1795 the image is opened for read/write access and must have according permissions,
1796 as VirtualBox may actually write status information into the disk's metadata
1797 sections.
1798
1799 Note that write access is required for all typical hard disk usage in VirtualBox,
1800 since VirtualBox may need to write metadata such as a UUID into the image.
1801 The only exception is opening a source image temporarily for copying and
1802 cloning (see <link to="IMedium::cloneTo" /> when the image will be closed
1803 again soon.
1804
1805 The format of the location string is storage format specific. See
1806 <link to="IMedium::location"/>, IMedium and
1807 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1808
1809 <result name="VBOX_E_FILE_ERROR">
1810 Invalid medium storage file location or could not find the medium
1811 at the specified location.
1812 </result>
1813 <result name="VBOX_E_IPRT_ERROR">
1814 Could not get medium storage format.
1815 </result>
1816 <result name="E_INVALIDARG">
1817 Invalid medium storage format.
1818 </result>
1819 <result name="VBOX_E_INVALID_OBJECT_STATE">
1820 Medium has already been added to a media registry.
1821 </result>
1822 </desc>
1823 <param name="location" type="wstring" dir="in">
1824 <desc>
1825 Location of the storage unit that contains medium data in one of
1826 the supported storage formats.
1827 </desc>
1828 </param>
1829 <param name="deviceType" type="DeviceType" dir="in">
1830 <desc>
1831 Must be one of "HardDisk", "DVD" or "Floppy".
1832 </desc>
1833 </param>
1834 <param name="accessMode" type="AccessMode" dir="in">
1835 <desc>Whether to open the image in read/write or read-only mode. For
1836 a "DVD" device type, this is ignored and read-only mode is always assumed.</desc>
1837 </param>
1838 <param name="medium" type="IMedium" dir="return">
1839 <desc>Opened medium object.</desc>
1840 </param>
1841 </method>
1842
1843 <method name="findMedium">
1844 <desc>
1845 Returns a medium of the given type that uses the given location or
1846 UUID to store medium data.
1847
1848 The given medium must be known to this VirtualBox installation, i.e.
1849 it must be previously created by <link to="#createHardDisk"/> or opened
1850 by <link to="#openMedium"/>.
1851
1852 The search is done by comparing the value of the @a location argument to
1853 the <link to="IMedium::location"/> and <link to="IMedium::id" />
1854 attributes of each known medium.
1855
1856 For locations represented by file names in the host's file system, the
1857 requested location can be a path relative to the
1858 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1859 only a file name without any path is given, the
1860 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
1861 folder</link> will be prepended to the file name before searching. Note
1862 that on case sensitive file systems, a case sensitive comparison is
1863 performed, otherwise the case of symbols in the file path is ignored.
1864
1865 <result name="VBOX_E_OBJECT_NOT_FOUND">
1866 No medium object matching @a location found.
1867 </result>
1868 </desc>
1869 <param name="location" type="wstring" dir="in">
1870 <desc>What to search for. This can either be the UUID or the location string of an open medium.</desc>
1871 </param>
1872 <param name="type" type="DeviceType" dir="in">
1873 <desc>Device type (must be HardDisk, DVD or Floppy)</desc>
1874 </param>
1875 <param name="medium" type="IMedium" dir="return">
1876 <desc>Medium object, if found.</desc>
1877 </param>
1878 </method>
1879
1880 <method name="getGuestOSType">
1881 <desc>
1882 Returns an object describing the specified guest OS type.
1883
1884 The requested guest OS type is specified using a string which is a
1885 mnemonic identifier of the guest operating system, such as
1886 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1887 particular virtual machine can be read or set using the
1888 <link to="IMachine::OSTypeId"/> attribute.
1889
1890 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1891 available guest OS type objects. Each object has an
1892 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1893 the guest OS this object describes.
1894
1895 <result name="E_INVALIDARG">
1896 @a id is not a valid Guest OS type.
1897 </result>
1898
1899 </desc>
1900 <param name="id" type="uuid" mod="string" dir="in">
1901 <desc>Guest OS type ID string.</desc>
1902 </param>
1903 <param name="type" type="IGuestOSType" dir="return">
1904 <desc>Guest OS type object.</desc>
1905 </param>
1906 </method>
1907
1908 <method name="createSharedFolder">
1909 <desc>
1910 Creates a new global shared folder by associating the given logical
1911 name with the given host path, adds it to the collection of shared
1912 folders and starts sharing it. Refer to the description of
1913 <link to="ISharedFolder"/> to read more about logical names.
1914 <note>
1915 In the current implementation, this operation is not
1916 implemented.
1917 </note>
1918 </desc>
1919 <param name="name" type="wstring" dir="in">
1920 <desc>Unique logical name of the shared folder.</desc>
1921 </param>
1922 <param name="hostPath" type="wstring" dir="in">
1923 <desc>Full path to the shared folder in the host file system.</desc>
1924 </param>
1925 <param name="writable" type="boolean" dir="in">
1926 <desc>Whether the share is writable or readonly</desc>
1927 </param>
1928 <param name="automount" type="boolean" dir="in">
1929 <desc>Whether the share gets automatically mounted by the guest
1930 or not.</desc>
1931 </param>
1932 </method>
1933
1934 <method name="removeSharedFolder">
1935 <desc>
1936 Removes the global shared folder with the given name previously
1937 created by <link to="#createSharedFolder"/> from the collection of
1938 shared folders and stops sharing it.
1939 <note>
1940 In the current implementation, this operation is not
1941 implemented.
1942 </note>
1943 </desc>
1944 <param name="name" type="wstring" dir="in">
1945 <desc>Logical name of the shared folder to remove.</desc>
1946 </param>
1947 </method>
1948
1949 <method name="getExtraDataKeys">
1950 <desc>
1951 Returns an array representing the global extra data keys which currently
1952 have values defined.
1953 </desc>
1954 <param name="value" type="wstring" dir="return" safearray="yes">
1955 <desc>Array of extra data keys.</desc>
1956 </param>
1957 </method>
1958
1959 <method name="getExtraData">
1960 <desc>
1961 Returns associated global extra data.
1962
1963 If the requested data @a key does not exist, this function will
1964 succeed and return an empty string in the @a value argument.
1965
1966 <result name="VBOX_E_FILE_ERROR">
1967 Settings file not accessible.
1968 </result>
1969 <result name="VBOX_E_XML_ERROR">
1970 Could not parse the settings file.
1971 </result>
1972
1973 </desc>
1974 <param name="key" type="wstring" dir="in">
1975 <desc>Name of the data key to get.</desc>
1976 </param>
1977 <param name="value" type="wstring" dir="return">
1978 <desc>Value of the requested data key.</desc>
1979 </param>
1980 </method>
1981
1982 <method name="setExtraData">
1983 <desc>
1984 Sets associated global extra data.
1985
1986 If you pass @c null or empty string as a key @a value, the given @a key
1987 will be deleted.
1988
1989 <note>
1990 Before performing the actual data change, this method will ask all
1991 registered event listener using the
1992 <link to="IExtraDataCanChangeEvent"/>
1993 notification for a permission. If one of the listeners refuses the
1994 new value, the change will not be performed.
1995 </note>
1996 <note>
1997 On success, the
1998 <link to="IExtraDataChangedEvent"/> notification
1999 is called to inform all registered listeners about a successful data
2000 change.
2001 </note>
2002
2003 <result name="VBOX_E_FILE_ERROR">
2004 Settings file not accessible.
2005 </result>
2006 <result name="VBOX_E_XML_ERROR">
2007 Could not parse the settings file.
2008 </result>
2009 <result name="E_ACCESSDENIED">
2010 Modification request refused.
2011 </result>
2012
2013 </desc>
2014 <param name="key" type="wstring" dir="in">
2015 <desc>Name of the data key to set.</desc>
2016 </param>
2017 <param name="value" type="wstring" dir="in">
2018 <desc>Value to assign to the key.</desc>
2019 </param>
2020 </method>
2021
2022 <method name="waitForPropertyChange">
2023 <desc>
2024 Blocks the caller until any of the properties represented by the
2025 @a what argument changes the value or until the given timeout interval
2026 expires.
2027
2028 The @a what argument is a comma separated list of property masks that
2029 describe properties the caller is interested in. The property mask is
2030 a string in the following format:
2031
2032 <pre>
2033 [[group.]subgroup.]name
2034 </pre>
2035
2036 where @c name is the property name and @c group, @c subgroup are zero
2037 or more property group specifiers. Each element (group or name) in
2038 the property mask may be either a Latin string or an asterisk symbol
2039 (@c "*") which is used to match any string for the given element. A
2040 property mask that doesn't contain asterisk symbols represents a
2041 single fully qualified property name.
2042
2043 Groups in the fully qualified property name go from more generic (the
2044 left-most part) to more specific (the right-most part). The first
2045 element is usually a name of the object the property belongs to. The
2046 second element may be either a property name, or a child object name,
2047 or an index if the preceding element names an object which is one of
2048 many objects of the same type. This way, property names form a
2049 hierarchy of properties. Here are some examples of property names:
2050
2051 <table>
2052 <tr>
2053 <td><tt>VirtualBox.version</tt></td>
2054 <td><link to="IVirtualBox::version"/> property</td>
2055 </tr>
2056 <tr>
2057 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2058 <td><link to="IMachine::name"/> property of the machine with the
2059 given UUID</td>
2060 </tr>
2061 </table>
2062
2063 Most property names directly correspond to the properties of objects
2064 (components) provided by the VirtualBox library and may be used to
2065 track changes to these properties. However, there may be
2066 pseudo-property names that don't correspond to any existing object's
2067 property directly, as well as there may be object properties that
2068 don't have a corresponding property name that is understood by this
2069 method, and therefore changes to such properties cannot be
2070 tracked. See individual object's property descriptions to get a
2071 fully qualified property name that can be used with this method (if
2072 any).
2073
2074 There is a special property mask @c "*" (i.e. a string consisting of a
2075 single asterisk symbol) that can be used to match all properties.
2076 Below are more examples of property masks:
2077
2078 <table>
2079 <tr>
2080 <td><tt>VirtualBox.*</tt></td>
2081 <td>Track all properties of the VirtualBox object</td>
2082 </tr>
2083 <tr>
2084 <td><tt>Machine.*.name</tt></td>
2085 <td>Track changes to the <link to="IMachine::name"/> property of
2086 all registered virtual machines</td>
2087 </tr>
2088 </table>
2089
2090 <note>
2091 This function is not implemented in the current version of the
2092 product.
2093 </note>
2094 </desc>
2095 <param name="what" type="wstring" dir="in">
2096 <desc>Comma separated list of property masks.</desc>
2097 </param>
2098 <param name="timeout" type="unsigned long" dir="in">
2099 <desc>
2100 Wait timeout in milliseconds.
2101 Specify -1 for an indefinite wait.
2102 </desc>
2103 </param>
2104 <param name="changed" type="wstring" dir="out">
2105 <desc>
2106 Comma separated list of properties that have been changed and caused
2107 this method to return to the caller.
2108 </desc>
2109 </param>
2110 <param name="values" type="wstring" dir="out">
2111 <desc>Reserved, not currently used.</desc>
2112 </param>
2113 </method>
2114
2115 <!--method name="createDHCPServerForInterface">
2116 <desc>
2117 Creates a dhcp server settings to be used for the given interface
2118 <result name="E_INVALIDARG">
2119 Host network interface @a name already exists.
2120 </result>
2121 </desc>
2122 <param name="interface" type="IHostNetworkInterface" dir="in">
2123 <desc>Network Interface</desc>
2124 </param>
2125 <param name="server" type="IDHCPServer" dir="out">
2126 <desc>Dhcp server settings</desc>
2127 </param>
2128 </method-->
2129
2130 <method name="createDHCPServer">
2131 <desc>
2132 Creates a dhcp server settings to be used for the given internal network name
2133 <result name="E_INVALIDARG">
2134 Host network interface @a name already exists.
2135 </result>
2136 </desc>
2137 <param name="name" type="wstring" dir="in">
2138 <desc>server name</desc>
2139 </param>
2140 <param name="server" type="IDHCPServer" dir="return">
2141 <desc>Dhcp server settings</desc>
2142 </param>
2143 </method>
2144
2145 <method name="findDHCPServerByNetworkName">
2146 <desc>
2147 Searches a dhcp server settings to be used for the given internal network name
2148 <result name="E_INVALIDARG">
2149 Host network interface @a name already exists.
2150 </result>
2151
2152 </desc>
2153 <param name="name" type="wstring" dir="in">
2154 <desc>server name</desc>
2155 </param>
2156 <param name="server" type="IDHCPServer" dir="return">
2157 <desc>Dhcp server settings</desc>
2158 </param>
2159 </method>
2160
2161 <!--method name="findDHCPServerForInterface">
2162 <desc>
2163 Searches a dhcp server settings to be used for the given interface
2164 <result name="E_INVALIDARG">
2165 Host network interface @a name already exists.
2166 </result>
2167 </desc>
2168 <param name="interface" type="IHostNetworkInterface" dir="in">
2169 <desc>Network Interface</desc>
2170 </param>
2171 <param name="server" type="IDHCPServer" dir="out">
2172 <desc>Dhcp server settings</desc>
2173 </param>
2174 </method-->
2175
2176 <method name="removeDHCPServer">
2177 <desc>
2178 Removes the dhcp server settings
2179 <result name="E_INVALIDARG">
2180 Host network interface @a name already exists.
2181 </result>
2182 </desc>
2183 <param name="server" type="IDHCPServer" dir="in">
2184 <desc>Dhcp server settings to be removed</desc>
2185 </param>
2186 </method>
2187
2188
2189 <method name="checkFirmwarePresent">
2190 <desc>
2191 Check if this VirtualBox installation has a firmware
2192 of the given type available, either system-wide or per-user.
2193 Optionally, this may return a hint where this firmware can be
2194 downloaded from.
2195 </desc>
2196 <param name="firmwareType" type="FirmwareType" dir="in">
2197 <desc>
2198 Type of firmware to check.
2199 </desc>
2200 </param>
2201 <param name="version" type="wstring" dir="in">
2202 <desc>Expected version number, usually empty string (presently ignored).</desc>
2203 </param>
2204
2205 <param name="url" type="wstring" dir="out">
2206 <desc>
2207 Suggested URL to download this firmware from.
2208 </desc>
2209 </param>
2210
2211 <param name="file" type="wstring" dir="out">
2212 <desc>
2213 Filename of firmware, only valid if result == TRUE.
2214 </desc>
2215 </param>
2216
2217 <param name="result" type="boolean" dir="return">
2218 <desc>If firmware of this type and version is available.</desc>
2219 </param>
2220 </method>
2221
2222 </interface>
2223
2224 <!--
2225 // IVFSExplorer
2226 /////////////////////////////////////////////////////////////////////////
2227 -->
2228
2229 <enum
2230 name="VFSType"
2231 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2232 >
2233 <desc>
2234 Virtual file systems supported by VFSExplorer.
2235 </desc>
2236
2237 <const name="File" value="1" />
2238 <const name="Cloud" value="2" />
2239 <const name="S3" value="3" />
2240 <const name="WebDav" value="4" />
2241 </enum>
2242
2243 <enum
2244 name="VFSFileType"
2245 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2246 >
2247 <desc>
2248 File types known by VFSExplorer.
2249 </desc>
2250
2251 <const name="Unknown" value="1" />
2252 <const name="Fifo" value="2" />
2253 <const name="DevChar" value="3" />
2254 <const name="Directory" value="4" />
2255 <const name="DevBlock" value="5" />
2256 <const name="File" value="6" />
2257 <const name="SymLink" value="7" />
2258 <const name="Socket" value="8" />
2259 <const name="WhiteOut" value="9" />
2260 </enum>
2261
2262 <interface
2263 name="IVFSExplorer" extends="$unknown"
2264 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2265 wsmap="managed"
2266 >
2267 <desc>
2268 The VFSExplorer interface unifies access to different file system
2269 types. This includes local file systems as well remote file systems like
2270 S3. For a list of supported types see <link to="VFSType" />.
2271 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2272 </desc>
2273
2274 <attribute name="path" type="wstring" readonly="yes">
2275 <desc>Returns the current path in the virtual file system.</desc>
2276 </attribute>
2277
2278 <attribute name="type" type="VFSType" readonly="yes">
2279 <desc>Returns the file system type which is currently in use.</desc>
2280 </attribute>
2281
2282 <method name="update">
2283 <desc>Updates the internal list of files/directories from the
2284 current directory level. Use <link to="#entryList" /> to get the full list
2285 after a call to this method.</desc>
2286
2287 <param name="aProgress" type="IProgress" dir="return">
2288 <desc>Progress object to track the operation completion.</desc>
2289 </param>
2290 </method>
2291
2292 <method name="cd">
2293 <desc>Change the current directory level.</desc>
2294
2295 <param name="aDir" type="wstring" dir="in">
2296 <desc>The name of the directory to go in.</desc>
2297 </param>
2298
2299 <param name="aProgress" type="IProgress" dir="return">
2300 <desc>Progress object to track the operation completion.</desc>
2301 </param>
2302 </method>
2303
2304 <method name="cdUp">
2305 <desc>Go one directory upwards from the current directory level.</desc>
2306
2307 <param name="aProgress" type="IProgress" dir="return">
2308 <desc>Progress object to track the operation completion.</desc>
2309 </param>
2310 </method>
2311
2312 <method name="entryList">
2313 <desc>Returns a list of files/directories after a call to <link
2314 to="#update" />. The user is responsible for keeping this internal
2315 list up do date.</desc>
2316
2317 <param name="aNames" type="wstring" safearray="yes" dir="out">
2318 <desc>The list of names for the entries.</desc>
2319 </param>
2320
2321 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2322 <desc>The list of types for the entries.</desc>
2323 </param>
2324 </method>
2325
2326 <method name="exists">
2327 <desc>Checks if the given file list exists in the current directory
2328 level.</desc>
2329
2330 <param name="aNames" type="wstring" safearray="yes" dir="in">
2331 <desc>The names to check.</desc>
2332 </param>
2333
2334 <param name="aExists" type="wstring" safearray="yes" dir="return">
2335 <desc>The names which exist.</desc>
2336 </param>
2337 </method>
2338
2339 <method name="remove">
2340 <desc>Deletes the given files in the current directory level.</desc>
2341
2342 <param name="aNames" type="wstring" safearray="yes" dir="in">
2343 <desc>The names to remove.</desc>
2344 </param>
2345
2346 <param name="aProgress" type="IProgress" dir="return">
2347 <desc>Progress object to track the operation completion.</desc>
2348 </param>
2349 </method>
2350
2351 </interface>
2352
2353 <!--
2354 // IAppliance
2355 /////////////////////////////////////////////////////////////////////////
2356 -->
2357
2358 <interface
2359 name="IAppliance" extends="$unknown"
2360 uuid="fb61a4fc-57e7-48d6-859b-71f37d484cf2"
2361 wsmap="managed"
2362 >
2363 <desc>
2364 Represents a platform-independent appliance in OVF format. An instance of this is returned
2365 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2366 virtual machines within an appliance with VirtualBox.
2367
2368 The OVF standard suggests two different physical file formats:
2369
2370 <ol>
2371 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
2372 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
2373 this descriptor file references other files such as disk images, as OVF appliances typically
2374 do, those additional files must be in the same directory as the descriptor file.</li>
2375
2376 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
2377 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2378 files and optionally other files.
2379
2380 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2381 be added with a later version.</li>
2382 </ol>
2383
2384 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2385 <link to="IMachine" /> involves the following sequence of API calls:
2386
2387 <ol>
2388 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2389 </li>
2390
2391 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2392 would like to import. So long as this file is syntactically valid, this will succeed
2393 and fill the appliance object with the parsed data from the OVF file.
2394 </li>
2395
2396 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2397 contents of the IAppliance attributes accordingly. These can be inspected by a
2398 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2399 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2400 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2401 systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
2402 by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
2403 The GUI can then give the user the option to confirm and/or change these suggestions.
2404 </li>
2405
2406 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2407 virtual system (machine) to override the suggestions made by the interpret() routine.
2408 </li>
2409
2410 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2411 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2412 virtual system descriptions. After this call suceeded, the UUIDs of the machines created
2413 can be found in the <link to="#machines" /> array attribute.
2414 </li>
2415 </ol>
2416
2417 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2418
2419 <ol>
2420 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2421 an empty IAppliance object.
2422 </li>
2423
2424 <li>For each machine you would like to export, call <link to="IMachine::export" />
2425 with the IAppliance object you just created. Each such call creates one instance of
2426 <link to="IVirtualSystemDescription" /> inside the appliance.
2427 </li>
2428
2429 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2430 virtual system (machine) to override the suggestions made by the export() routine.
2431 </li>
2432
2433 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2434 file written.</li>
2435 </ol>
2436
2437 </desc>
2438
2439 <attribute name="path" type="wstring" readonly="yes">
2440 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2441 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2442 <link to="#write" /> (for export).
2443 This attribute is empty until one of these methods has been called.
2444 </desc>
2445 </attribute>
2446
2447 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2448 <desc>
2449 Array of virtual disk definitions. One such description exists for each
2450 disk definition in the OVF; each string array item represents one such piece of
2451 disk information, with the information fields separated by tab (\t) characters.
2452
2453 The caller should be prepared for additional fields being appended to
2454 this string in future versions of VirtualBox and therefore check for
2455 the number of tabs in the strings returned.
2456
2457 In the current version, the following eight fields are returned per string
2458 in the array:
2459
2460 <ol>
2461 <li>Disk ID (unique string identifier given to disk)</li>
2462
2463 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2464
2465 <li>Populated size (optional unsigned integer indicating the current size of the
2466 disk; can be approximate; -1 if unspecified)</li>
2467
2468 <li>Format (string identifying the disk format, typically
2469 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2470
2471 <li>Reference (where to find the disk image, typically a file name; if empty,
2472 then the disk should be created on import)</li>
2473
2474 <li>Image size (optional unsigned integer indicating the size of the image,
2475 which need not necessarily be the same as the values specified above, since
2476 the image may be compressed or sparse; -1 if not specified)</li>
2477
2478 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2479 presently unsupported and always -1)</li>
2480
2481 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2482 </ol>
2483 </desc>
2484 </attribute>
2485
2486 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2487 <desc> Array of virtual system descriptions. One such description is created
2488 for each virtual system (machine) found in the OVF.
2489 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2490 (for export) has been called.
2491 </desc>
2492 </attribute>
2493
2494 <attribute name="machines" type="wstring" readonly="yes" safearray="yes">
2495 <desc>
2496 Contains the UUIDs of the machines created from the information in this appliances. This is only
2497 relevant for the import case, and will only contain data after a call to <link to="#importMachines" />
2498 succeeded.
2499 </desc>
2500 </attribute>
2501
2502 <method name="read">
2503 <desc>
2504 Reads an OVF file into the appliance object.
2505
2506 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2507 mere fact that this method returns successfully does not mean that VirtualBox supports all
2508 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2509 </desc>
2510 <param name="file" type="wstring" dir="in">
2511 <desc>
2512 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2513 on whether the appliance is distributed as a set of files or as a single file, respectively).
2514 </desc>
2515 </param>
2516 <param name="aProgress" type="IProgress" dir="return">
2517 <desc>Progress object to track the operation completion.</desc>
2518 </param>
2519 </method>
2520
2521 <method name="interpret">
2522 <desc>
2523 Interprets the OVF data that was read when the appliance was constructed. After
2524 calling this method, one can inspect the
2525 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2526 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2527 the appliance.
2528
2529 Calling this method is the second step of importing an appliance into VirtualBox;
2530 see <link to="IAppliance" /> for an overview.
2531
2532 After calling this method, one should call <link to="#getWarnings" /> to find out
2533 if problems were encountered during the processing which might later lead to
2534 errors.
2535 </desc>
2536 </method>
2537
2538 <method name="importMachines">
2539 <desc>
2540 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2541 and other interfaces that match the information contained in the appliance as
2542 closely as possible, as represented by the import instructions in the
2543 <link to="#virtualSystemDescriptions" /> array.
2544
2545 Calling this method is the final step of importing an appliance into VirtualBox;
2546 see <link to="IAppliance" /> for an overview.
2547
2548 Since importing the appliance will most probably involve copying and converting
2549 disk images, which can take a long time, this method operates asynchronously and
2550 returns an IProgress object to allow the caller to monitor the progress.
2551
2552 After the import succeeded, the UUIDs of the IMachine instances created can be
2553 retrieved from the <link to="#machines" /> array attribute.
2554 </desc>
2555
2556 <param name="aProgress" type="IProgress" dir="return">
2557 <desc>Progress object to track the operation completion.</desc>
2558 </param>
2559 </method>
2560
2561 <method name="createVFSExplorer">
2562 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
2563
2564 <param name="aUri" type="wstring" dir="in">
2565 <desc>The URI describing the file system to use.</desc>
2566 </param>
2567
2568 <param name="aExplorer" type="IVFSExplorer" dir="return">
2569 <desc></desc>
2570 </param>
2571 </method>
2572
2573 <method name="write">
2574 <desc>
2575 Writes the contents of the appliance exports into a new OVF file.
2576
2577 Calling this method is the final step of exporting an appliance from VirtualBox;
2578 see <link to="IAppliance" /> for an overview.
2579
2580 Since exporting the appliance will most probably involve copying and converting
2581 disk images, which can take a long time, this method operates asynchronously and
2582 returns an IProgress object to allow the caller to monitor the progress.
2583 </desc>
2584 <param name="format" type="wstring" dir="in">
2585 <desc>
2586 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
2587 future versions of VirtualBox may support additional formats.
2588 </desc>
2589 </param>
2590 <param name="path" type="wstring" dir="in">
2591 <desc>
2592 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2593 on whether the appliance is distributed as a set of files or as a single file, respectively).
2594 </desc>
2595 </param>
2596 <param name="aProgress" type="IProgress" dir="return">
2597 <desc>Progress object to track the operation completion.</desc>
2598 </param>
2599 </method>
2600
2601 <method name="getWarnings">
2602 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
2603
2604 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
2605 <desc></desc>
2606 </param>
2607 </method>
2608
2609 </interface>
2610
2611 <enum
2612 name="VirtualSystemDescriptionType"
2613 uuid="c0f8f135-3a1d-417d-afa6-b38b95a91f90"
2614 >
2615 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2616 a configuration value.</desc>
2617
2618 <const name="Ignore" value="1" />
2619 <const name="OS" value="2" />
2620 <const name="Name" value="3" />
2621 <const name="Product" value="4" />
2622 <const name="Vendor" value="5" />
2623 <const name="Version" value="6" />
2624 <const name="ProductUrl" value="7" />
2625 <const name="VendorUrl" value="8" />
2626 <const name="Description" value="9" />
2627 <const name="License" value="10" />
2628 <const name="Miscellaneous" value="11" />
2629 <const name="CPU" value="12" />
2630 <const name="Memory" value="13" />
2631 <const name="HardDiskControllerIDE" value="14" />
2632 <const name="HardDiskControllerSATA" value="15" />
2633 <const name="HardDiskControllerSCSI" value="16" />
2634 <const name="HardDiskControllerSAS" value="17" />
2635 <const name="HardDiskImage" value="18" />
2636 <const name="Floppy" value="19" />
2637 <const name="CDROM" value="20" />
2638 <const name="NetworkAdapter" value="21" />
2639 <const name="USBController" value="22" />
2640 <const name="SoundCard" value="23" />
2641
2642 </enum>
2643
2644 <enum
2645 name="VirtualSystemDescriptionValueType"
2646 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
2647 >
2648 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
2649 type to fetch.</desc>
2650
2651 <const name="Reference" value="1" />
2652 <const name="Original" value="2" />
2653 <const name="Auto" value="3" />
2654 <const name="ExtraConfig" value="4" />
2655
2656 </enum>
2657
2658 <interface
2659 name="IVirtualSystemDescription" extends="$unknown"
2660 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
2661 wsmap="managed"
2662 >
2663
2664 <desc>Represents one virtual system (machine) in an appliance. This interface is used in
2665 the <link to="IAppliance::virtualSystemDescriptions" /> array. After
2666 <link to="IAppliance::interpret" /> has been called, that array contains information
2667 about how the virtual systems described in the OVF should best be imported into
2668 VirtualBox virtual machines. See <link to="IAppliance" /> for the steps required to
2669 import an OVF into VirtualBox.
2670 </desc>
2671
2672 <attribute name="count" type="unsigned long" readonly="yes">
2673 <desc>Return the number of virtual system description entries.</desc>
2674 </attribute>
2675
2676 <method name="getDescription">
2677 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
2678 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
2679
2680 The list below identifies the value sets that are possible depending on the
2681 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
2682 the array item with the same index in @a aOvfValues[] will contain the original value as contained
2683 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
2684 will contain a suggested value to be used for VirtualBox. Depending on the description type,
2685 the @a aExtraConfigValues[] array item may also be used.
2686
2687 <ul>
2688 <li>
2689 "OS": the guest operating system type. There must be exactly one such array item on import. The
2690 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
2691 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
2692 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
2693 </li>
2694 <li>
2695 "Name": the name to give to the new virtual machine. There can be at most one such array item;
2696 if none is present on import, then an automatic name will be created from the operating system
2697 type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
2698 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
2699 <link to="IMachine" /> name that does not exist yet.
2700 </li>
2701 <li>
2702 "Description": an arbitrary description.
2703 </li>
2704 <li>
2705 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
2706 code to display such a license for agreement; the Main API does not enforce any such policy.
2707 </li>
2708 <li>
2709 Miscellaneous: reserved for future use.
2710 </li>
2711 <li>
2712 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
2713 </li>
2714 <li>
2715 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
2716 is present on import, then VirtualBox will set a meaningful default based on the operating system
2717 type.
2718 </li>
2719 <li>
2720 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
2721 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
2722 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
2723 writes into the OVF.
2724 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
2725 type can use to specify which hard disk controller a virtual disk should be connected to.
2726 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
2727 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
2728 its virtual machines supports four channels (primary master, primary slave, secondary master,
2729 secondary slave) and thus maps to two IDE controllers in the OVF sense.
2730 </li>
2731 <li>
2732 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
2733 has no value in @a aOvfValues[] or @a aVBoxValues[].
2734 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2735 </li>
2736 <li>
2737 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
2738 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
2739 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
2740 whereas VirtualBox considers it a class of storage controllers of its own; see
2741 <link to="StorageControllerType" />).
2742 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2743 </li>
2744 <li>
2745 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
2746 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
2747
2748 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
2749 a path since the image file should be in the same location as the OVF file itself), whereas the
2750 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
2751 hard disk image. This means that on import the image will be copied and converted from the
2752 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
2753 On import, the target image will also be registered with VirtualBox.
2754
2755 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
2756 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
2757 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
2758 the image to. That number must be the index of an array item with one of the hard disk controller
2759 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
2760 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
2761 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
2762 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
2763 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
2764 </li>
2765 <li>
2766 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
2767 attachment information as with "HardDiskImage" items.
2768 </li>
2769 <li>
2770 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
2771 attachment information as with "HardDiskImage" items.
2772 </li>
2773 <li>
2774 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
2775 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
2776 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
2777 </li>
2778 <li>
2779 "USBController": a USB controller. There can be at most one such item. If and only if such an
2780 item ispresent, USB support will be enabled for the new virtual machine.
2781 </li>
2782 <li>
2783 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
2784 present, sound support will be enabled for the new virtual machine. Note that the virtual
2785 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
2786 may be different from the virtual soundcard expected by the appliance.
2787 </li>
2788 </ul>
2789
2790 </desc>
2791
2792 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2793 <desc></desc>
2794 </param>
2795
2796 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2797 <desc></desc>
2798 </param>
2799
2800 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2801 <desc></desc>
2802 </param>
2803
2804 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2805 <desc></desc>
2806 </param>
2807
2808 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2809 <desc></desc>
2810 </param>
2811
2812 </method>
2813
2814 <method name="getDescriptionByType">
2815 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
2816 should be returned.</desc>
2817
2818 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2819 <desc></desc>
2820 </param>
2821
2822 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2823 <desc></desc>
2824 </param>
2825
2826 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2827 <desc></desc>
2828 </param>
2829
2830 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2831 <desc></desc>
2832 </param>
2833
2834 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2835 <desc></desc>
2836 </param>
2837
2838 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2839 <desc></desc>
2840 </param>
2841
2842 </method>
2843
2844 <method name="getValuesByType">
2845 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
2846 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
2847 values.</desc>
2848
2849 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2850 <desc></desc>
2851 </param>
2852
2853 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
2854 <desc></desc>
2855 </param>
2856
2857 <param name="aValues" type="wstring" dir="return" safearray="yes">
2858 <desc></desc>
2859 </param>
2860
2861 </method>
2862
2863 <method name="setFinalValues">
2864 <desc>
2865 This method allows the appliance's user to change the configuration for the virtual
2866 system descriptions. For each array item returned from <link to="#getDescription" />,
2867 you must pass in one boolean value and one configuration value.
2868
2869 Each item in the boolean array determines whether the particular configuration item
2870 should be enabled.
2871 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
2872 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
2873 and SoundCard.
2874
2875 For the "vbox" and "extra configuration" values, if you pass in the same arrays
2876 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
2877 the configuration remains unchanged. Please see the documentation for getDescription()
2878 for valid configuration values for the individual array item types. If the
2879 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
2880 </desc>
2881
2882 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
2883 <desc></desc>
2884 </param>
2885
2886 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
2887 <desc></desc>
2888 </param>
2889
2890 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
2891 <desc></desc>
2892 </param>
2893 </method>
2894
2895 <method name="addDescription">
2896 <desc>
2897 This method adds an additional description entry to the stack of already
2898 available descriptions for this virtual system. This is handy for writing
2899 values which aren't directly supported by VirtualBox. One example would
2900 be the License type of <link to="VirtualSystemDescriptionType" />.
2901 </desc>
2902
2903 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2904 <desc></desc>
2905 </param>
2906
2907 <param name="aVBoxValue" type="wstring" dir="in">
2908 <desc></desc>
2909 </param>
2910
2911 <param name="aExtraConfigValue" type="wstring" dir="in">
2912 <desc></desc>
2913 </param>
2914 </method>
2915 </interface>
2916
2917
2918 <!--
2919 // IMachine
2920 /////////////////////////////////////////////////////////////////////////
2921 -->
2922
2923 <interface
2924 name="IInternalMachineControl" extends="$unknown"
2925 uuid="e2da8b1a-2ad1-490e-b29e-c33a144791b6"
2926 internal="yes"
2927 wsmap="suppress"
2928 >
2929 <method name="setRemoveSavedStateFile">
2930 <desc>
2931 Updates the flag whether the saved state file is removed on a
2932 machine state change from Saved to PoweredOff.
2933 </desc>
2934 <param name="aRemove" type="boolean" dir="in"/>
2935 </method>
2936
2937 <method name="updateState">
2938 <desc>
2939 Updates the VM state.
2940 <note>
2941 This operation will also update the settings file with the correct
2942 information about the saved state file and delete this file from disk
2943 when appropriate.
2944 </note>
2945 </desc>
2946 <param name="state" type="MachineState" dir="in"/>
2947 </method>
2948
2949 <method name="getIPCId">
2950 <param name="id" type="wstring" dir="return"/>
2951 </method>
2952
2953 <method name="beginPowerUp">
2954 <desc>
2955 Tells VBoxSVC that <link to="IConsole::powerUp"/> is under ways and
2956 gives it the progress object that should be part of any pending
2957 <link to="IMachine::launchVMProcess"/> operations. The progress
2958 object may be called back to reflect an early cancelation, so some care
2959 have to be taken with respect to any cancelation callbacks. The console
2960 object will call <link to="IInternalMachineControl::endPowerUp"/>
2961 to signal the completion of the progress object.
2962 </desc>
2963 <param name="aProgress" type="IProgress" dir="in" />
2964 </method>
2965
2966 <method name="endPowerUp">
2967 <desc>
2968 Tells VBoxSVC that <link to="IConsole::powerUp"/> has completed.
2969 This method may query status information from the progress object it
2970 received in <link to="IInternalMachineControl::beginPowerUp"/> and copy
2971 it over to any in-progress <link to="IMachine::launchVMProcess"/>
2972 call in order to complete that progress object.
2973 </desc>
2974 <param name="result" type="long" dir="in"/>
2975 </method>
2976
2977 <method name="runUSBDeviceFilters">
2978 <desc>
2979 Asks the server to run USB devices filters of the associated
2980 machine against the given USB device and tell if there is
2981 a match.
2982 <note>
2983 Intended to be used only for remote USB devices. Local
2984 ones don't require to call this method (this is done
2985 implicitly by the Host and USBProxyService).
2986 </note>
2987 </desc>
2988 <param name="device" type="IUSBDevice" dir="in"/>
2989 <param name="matched" type="boolean" dir="out"/>
2990 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2991 </method>
2992
2993 <method name="captureUSBDevice">
2994 <desc>
2995 Requests a capture of the given host USB device.
2996 When the request is completed, the VM process will
2997 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2998 notification.
2999 </desc>
3000 <param name="id" type="uuid" mod="string" dir="in"/>
3001 </method>
3002
3003 <method name="detachUSBDevice">
3004 <desc>
3005 Notification that a VM is going to detach (@a done = @c false) or has
3006 already detached (@a done = @c true) the given USB device.
3007 When the @a done = @c true request is completed, the VM process will
3008 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3009 notification.
3010 <note>
3011 In the @a done = @c true case, the server must run its own filters
3012 and filters of all VMs but this one on the detached device
3013 as if it were just attached to the host computer.
3014 </note>
3015 </desc>
3016 <param name="id" type="uuid" mod="string" dir="in"/>
3017 <param name="done" type="boolean" dir="in"/>
3018 </method>
3019
3020 <method name="autoCaptureUSBDevices">
3021 <desc>
3022 Requests a capture all matching USB devices attached to the host.
3023 When the request is completed, the VM process will
3024 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3025 notification per every captured device.
3026 </desc>
3027 </method>
3028
3029 <method name="detachAllUSBDevices">
3030 <desc>
3031 Notification that a VM that is being powered down. The done
3032 parameter indicates whether which stage of the power down
3033 we're at. When @a done = @c false the VM is announcing its
3034 intentions, while when @a done = @c true the VM is reporting
3035 what it has done.
3036 <note>
3037 In the @a done = @c true case, the server must run its own filters
3038 and filters of all VMs but this one on all detach devices as
3039 if they were just attached to the host computer.
3040 </note>
3041 </desc>
3042 <param name="done" type="boolean" dir="in"/>
3043 </method>
3044
3045 <method name="onSessionEnd">
3046 <desc>
3047 Triggered by the given session object when the session is about
3048 to close normally.
3049 </desc>
3050 <param name="session" type="ISession" dir="in">
3051 <desc>Session that is being closed</desc>
3052 </param>
3053 <param name="progress" type="IProgress" dir="return">
3054 <desc>
3055 Used to wait until the corresponding machine is actually
3056 dissociated from the given session on the server.
3057 Returned only when this session is a direct one.
3058 </desc>
3059 </param>
3060 </method>
3061
3062 <method name="beginSavingState">
3063 <desc>
3064 Called by the VM process to inform the server it wants to
3065 save the current state and stop the VM execution.
3066 </desc>
3067 <param name="progress" type="IProgress" dir="in">
3068 <desc>
3069 Progress object created by the VM process to wait until
3070 the state is saved.
3071 </desc>
3072 </param>
3073 <param name="stateFilePath" type="wstring" dir="out">
3074 <desc>
3075 File path the VM process must save the execution state to.
3076 </desc>
3077 </param>
3078 </method>
3079
3080 <method name="endSavingState">
3081 <desc>
3082 Called by the VM process to inform the server that saving
3083 the state previously requested by #beginSavingState is either
3084 successfully finished or there was a failure.
3085
3086 <result name="VBOX_E_FILE_ERROR">
3087 Settings file not accessible.
3088 </result>
3089 <result name="VBOX_E_XML_ERROR">
3090 Could not parse the settings file.
3091 </result>
3092
3093 </desc>
3094
3095 <param name="success" type="boolean" dir="in">
3096 <desc>@c true to indicate success and @c false otherwise.
3097 </desc>
3098 </param>
3099 </method>
3100
3101 <method name="adoptSavedState">
3102 <desc>
3103 Gets called by IConsole::adoptSavedState.
3104 <result name="VBOX_E_FILE_ERROR">
3105 Invalid saved state file path.
3106 </result>
3107 </desc>
3108 <param name="savedStateFile" type="wstring" dir="in">
3109 <desc>Path to the saved state file to adopt.</desc>
3110 </param>
3111 </method>
3112
3113 <method name="beginTakingSnapshot">
3114 <desc>
3115 Called from the VM process to request from the server to perform the
3116 server-side actions of creating a snapshot (creating differencing images
3117 and the snapshot object).
3118
3119 <result name="VBOX_E_FILE_ERROR">
3120 Settings file not accessible.
3121 </result>
3122 <result name="VBOX_E_XML_ERROR">
3123 Could not parse the settings file.
3124 </result>
3125 </desc>
3126 <param name="initiator" type="IConsole" dir="in">
3127 <desc>The console object that initiated this call.</desc>
3128 </param>
3129 <param name="name" type="wstring" dir="in">
3130 <desc>Snapshot name.</desc>
3131 </param>
3132 <param name="description" type="wstring" dir="in">
3133 <desc>Snapshot description.</desc>
3134 </param>
3135 <param name="consoleProgress" type="IProgress" dir="in">
3136 <desc>
3137 Progress object created by the VM process tracking the
3138 snapshot's progress. This has the following sub-operations:
3139 <ul>
3140 <li>setting up (weight 1);</li>
3141 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3142 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3143 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3144 <li>finishing up (weight 1)</li>
3145 </ul>
3146 </desc>
3147 </param>
3148 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3149 <desc>
3150 Whether this is an online snapshot (i.e. the machine is running).
3151 </desc>
3152 </param>
3153 <param name="stateFilePath" type="wstring" dir="out">
3154 <desc>
3155 File path the VM process must save the execution state to.
3156 </desc>
3157 </param>
3158 </method>
3159
3160 <method name="endTakingSnapshot">
3161 <desc>
3162 Called by the VM process to inform the server that the snapshot
3163 previously requested by #beginTakingSnapshot is either
3164 successfully taken or there was a failure.
3165 </desc>
3166
3167 <param name="success" type="boolean" dir="in">
3168 <desc>@c true to indicate success and @c false otherwise</desc>
3169 </param>
3170 </method>
3171
3172 <method name="deleteSnapshot">
3173 <desc>
3174 Gets called by IConsole::deleteSnapshot.
3175 <result name="VBOX_E_INVALID_OBJECT_STATE">
3176 Snapshot has more than one child snapshot.
3177 </result>
3178 </desc>
3179 <param name="initiator" type="IConsole" dir="in">
3180 <desc>The console object that initiated this call.</desc>
3181 </param>
3182 <param name="id" type="uuid" mod="string" dir="in">
3183 <desc>UUID of the snapshot to delete.</desc>
3184 </param>
3185 <param name="machineState" type="MachineState" dir="out">
3186 <desc>New machine state after this operation is started.</desc>
3187 </param>
3188 <param name="progress" type="IProgress" dir="return">
3189 <desc>Progress object to track the operation completion.</desc>
3190 </param>
3191 </method>
3192
3193 <method name="finishOnlineMergeMedium">
3194 <desc>
3195 Gets called by IConsole::onlineMergeMedium.
3196 </desc>
3197 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
3198 <desc>The medium attachment which needs to be cleaned up.</desc>
3199 </param>
3200 <param name="source" type="IMedium" dir="in">
3201 <desc>Merge source medium.</desc>
3202 </param>
3203 <param name="target" type="IMedium" dir="in">
3204 <desc>Merge target medium.</desc>
3205 </param>
3206 <param name="mergeForward" type="boolean" dir="in">
3207 <desc>Merge direction.</desc>
3208 </param>
3209 <param name="parentForTarget" type="IMedium" dir="in">
3210 <desc>For forward merges: new parent for target medium.</desc>
3211 </param>
3212 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
3213 <desc>For backward merges: list of media which need their parent UUID
3214 updated.</desc>
3215 </param>
3216 </method>
3217
3218 <method name="restoreSnapshot">
3219 <desc>
3220 Gets called by IConsole::RestoreSnapshot.
3221 </desc>
3222 <param name="initiator" type="IConsole" dir="in">
3223 <desc>The console object that initiated this call.</desc>
3224 </param>
3225 <param name="snapshot" type="ISnapshot" dir="in">
3226 <desc>The snapshot to restore the VM state from.</desc>
3227 </param>
3228 <param name="machineState" type="MachineState" dir="out">
3229 <desc>New machine state after this operation is started.</desc>
3230 </param>
3231 <param name="progress" type="IProgress" dir="return">
3232 <desc>Progress object to track the operation completion.</desc>
3233 </param>
3234 </method>
3235
3236 <method name="pullGuestProperties">
3237 <desc>
3238 Get the list of the guest properties matching a set of patterns along
3239 with their values, time stamps and flags and give responsibility for
3240 managing properties to the console.
3241 </desc>
3242 <param name="name" type="wstring" dir="out" safearray="yes">
3243 <desc>
3244 The names of the properties returned.
3245 </desc>
3246 </param>
3247 <param name="value" type="wstring" dir="out" safearray="yes">
3248 <desc>
3249 The values of the properties returned. The array entries match the
3250 corresponding entries in the @a name array.
3251 </desc>
3252 </param>
3253 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3254 <desc>
3255 The time stamps of the properties returned. The array entries match
3256 the corresponding entries in the @a name array.
3257 </desc>
3258 </param>
3259 <param name="flags" type="wstring" dir="out" safearray="yes">
3260 <desc>
3261 The flags of the properties returned. The array entries match the
3262 corresponding entries in the @a name array.
3263 </desc>
3264 </param>
3265 </method>
3266
3267 <method name="pushGuestProperty">
3268 <desc>
3269 Update a single guest property in IMachine.
3270 </desc>
3271 <param name="name" type="wstring" dir="in">
3272 <desc>
3273 The name of the property to be updated.
3274 </desc>
3275 </param>
3276 <param name="value" type="wstring" dir="in">
3277 <desc>
3278 The value of the property.
3279 </desc>
3280 </param>
3281 <param name="timestamp" type="unsigned long long" dir="in">
3282 <desc>
3283 The timestamp of the property.
3284 </desc>
3285 </param>
3286 <param name="flags" type="wstring" dir="in">
3287 <desc>
3288 The flags of the property.
3289 </desc>
3290 </param>
3291 </method>
3292
3293 <method name="lockMedia">
3294 <desc>
3295 Locks all media attached to the machine for writing and parents of
3296 attached differencing media (if any) for reading. This operation is
3297 atomic so that if it fails no media is actually locked.
3298
3299 This method is intended to be called when the machine is in Starting or
3300 Restoring state. The locked media will be automatically unlocked when
3301 the machine is powered off or crashed.
3302 </desc>
3303 </method>
3304 <method name="unlockMedia">
3305 <desc>
3306 Unlocks all media previously locked using
3307 <link to="IInternalMachineControl::lockMedia"/>.
3308
3309 This method is intended to be used with teleportation so that it is
3310 possible to teleport between processes on the same machine.
3311 </desc>
3312 </method>
3313 </interface>
3314
3315 <interface
3316 name="IBIOSSettings" extends="$unknown"
3317 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3318 wsmap="managed"
3319 >
3320 <desc>
3321 The IBIOSSettings interface represents BIOS settings of the virtual
3322 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3323 </desc>
3324 <attribute name="logoFadeIn" type="boolean">
3325 <desc>Fade in flag for BIOS logo animation.</desc>
3326 </attribute>
3327
3328 <attribute name="logoFadeOut" type="boolean">
3329 <desc>Fade out flag for BIOS logo animation.</desc>
3330 </attribute>
3331
3332 <attribute name="logoDisplayTime" type="unsigned long">
3333 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3334 </attribute>
3335
3336 <attribute name="logoImagePath" type="wstring">
3337 <desc>
3338 Local file system path for external BIOS splash image. Empty string
3339 means the default image is shown on boot.
3340 </desc>
3341 </attribute>
3342
3343 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3344 <desc>Mode of the BIOS boot device menu.</desc>
3345 </attribute>
3346
3347 <attribute name="ACPIEnabled" type="boolean">
3348 <desc>ACPI support flag.</desc>
3349 </attribute>
3350
3351 <attribute name="IOAPICEnabled" type="boolean">
3352 <desc>
3353 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3354 and support IRQs above 15.
3355 </desc>
3356 </attribute>
3357
3358 <attribute name="timeOffset" type="long long">
3359 <desc>
3360 Offset in milliseconds from the host system time. This allows for
3361 guests running with a different system date/time than the host.
3362 It is equivalent to setting the system date/time in the BIOS except
3363 it is not an absolute value but a relative one. Guest Additions
3364 time synchronization honors this offset.
3365 </desc>
3366 </attribute>
3367
3368 <attribute name="PXEDebugEnabled" type="boolean">
3369 <desc>
3370 PXE debug logging flag. If set, VirtualBox will write extensive
3371 PXE trace information to the release log.
3372 </desc>
3373 </attribute>
3374
3375 </interface>
3376
3377 <enum name="CleanupMode"
3378 uuid="67897c50-7cca-47a9-83f6-ce8fd8eb5441">
3379 <desc>Cleanup mode, used with <link to="IMachine::unregister" />.
3380 </desc>
3381 <const name="UnregisterOnly" value="1">
3382 <desc>Unregister only the machine, but neither delete snapshots nor detach media.</desc>
3383 </const>
3384 <const name="DetachAllReturnNone" value="2">
3385 <desc>Delete all snapshots and detach all media but return none; this will keep all media registered.</desc>
3386 </const>
3387 <const name="DetachAllReturnHardDisksOnly" value="3">
3388 <desc>Delete all snapshots, detach all media and return hard disks for closing, but not removeable media.</desc>
3389 </const>
3390 <const name="Full" value="4">
3391 <desc>Delete all snapshots, detach all media and return all media for closing.</desc>
3392 </const>
3393 </enum>
3394
3395 <interface
3396 name="IMachine" extends="$unknown"
3397 uuid="082c38ff-d9b3-4b12-b540-01516a931f17"
3398 wsmap="managed"
3399 >
3400 <desc>
3401 The IMachine interface represents a virtual machine, or guest, created
3402 in VirtualBox.
3403
3404 This interface is used in two contexts. First of all, a collection of
3405 objects implementing this interface is stored in the
3406 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3407 machines that are currently registered with this VirtualBox
3408 installation. Also, once a session has been opened for the given virtual
3409 machine (e.g. the virtual machine is running), the machine object
3410 associated with the open session can be queried from the session object;
3411 see <link to="ISession"/> for details.
3412
3413 The main role of this interface is to expose the settings of the virtual
3414 machine and provide methods to change various aspects of the virtual
3415 machine's configuration. For machine objects stored in the
3416 <link to="IVirtualBox::machines"/> collection, all attributes are
3417 read-only unless explicitly stated otherwise in individual attribute
3418 and method descriptions.
3419
3420 In order to change a machine setting, a session for this machine must be
3421 opened using one of the <link to="IMachine::lockMachine" /> or
3422 <link to="IMachine::launchVMProcess"/> methods. After the
3423 machine has been successfully locked for a session, a mutable machine object
3424 needs to be queried from the session object and then the desired settings
3425 changes can be applied to the returned object using IMachine attributes and
3426 methods. See the <link to="ISession"/> interface description for more
3427 information about sessions.
3428
3429 Note that IMachine does not provide methods to control virtual machine
3430 execution (such as start the machine, or power it down) -- these methods
3431 are grouped in a separate interface called <link to="IConsole" />.
3432
3433 <see>ISession, IConsole</see>
3434 </desc>
3435
3436 <attribute name="parent" type="IVirtualBox" readonly="yes">
3437 <desc>Associated parent object.</desc>
3438 </attribute>
3439
3440 <attribute name="accessible" type="boolean" readonly="yes">
3441 <desc>
3442 Whether this virtual machine is currently accessible or not.
3443
3444 A machine is always deemed accessible unless it is registered <i>and</i>
3445 its settings file cannot be read or parsed (either because the file itself
3446 is unavailable or has invalid XML contents).
3447
3448 Every time this property is read, the accessibility state of
3449 this machine is re-evaluated. If the returned value is @c false,
3450 the <link to="#accessError"/> property may be used to get the
3451 detailed error information describing the reason of
3452 inaccessibility, including XML error messages.
3453
3454 When the machine is inaccessible, only the following properties
3455 can be used on it:
3456 <ul>
3457 <li><link to="#parent"/></li>
3458 <li><link to="#id"/></li>
3459 <li><link to="#settingsFilePath"/></li>
3460 <li><link to="#accessible"/></li>
3461 <li><link to="#accessError"/></li>
3462 </ul>
3463
3464 An attempt to access any other property or method will return
3465 an error.
3466
3467 The only possible action you can perform on an inaccessible
3468 machine is to unregister it using the
3469 <link to="IMachine::unregister"/> call (or, to check
3470 for the accessibility state once more by querying this
3471 property).
3472
3473 <note>
3474 In the current implementation, once this property returns
3475 @c true, the machine will never become inaccessible
3476 later, even if its settings file cannot be successfully
3477 read/written any more (at least, until the VirtualBox
3478 server is restarted). This limitation may be removed in
3479 future releases.
3480 </note>
3481 </desc>
3482 </attribute>
3483
3484 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3485 <desc>
3486 Error information describing the reason of machine
3487 inaccessibility.
3488
3489 Reading this property is only valid after the last call to
3490 <link to="#accessible"/> returned @c false (i.e. the
3491 machine is currently unaccessible). Otherwise, a @c null
3492 IVirtualBoxErrorInfo object will be returned.
3493 </desc>
3494 </attribute>
3495
3496 <attribute name="name" type="wstring">
3497 <desc>
3498 Name of the virtual machine.
3499
3500 Besides being used for human-readable identification purposes
3501 everywhere in VirtualBox, the virtual machine name is also used
3502 as a name of the machine's settings file and as a name of the
3503 subdirectory this settings file resides in. Thus, every time you
3504 change the value of this property, the settings file will be
3505 renamed once you call <link to="#saveSettings"/> to confirm the
3506 change. The containing subdirectory will be also renamed, but
3507 only if it has exactly the same name as the settings file
3508 itself prior to changing this property (for backward compatibility
3509 with previous API releases). The above implies the following
3510 limitations:
3511 <ul>
3512 <li>The machine name cannot be empty.</li>
3513 <li>The machine name can contain only characters that are valid
3514 file name characters according to the rules of the file
3515 system used to store VirtualBox configuration.</li>
3516 <li>You cannot have two or more machines with the same name
3517 if they use the same subdirectory for storing the machine
3518 settings files.</li>
3519 <li>You cannot change the name of the machine if it is running,
3520 or if any file in the directory containing the settings file
3521 is being used by another running machine or by any other
3522 process in the host operating system at a time when
3523 <link to="#saveSettings"/> is called.
3524 </li>
3525 </ul>
3526 If any of the above limitations are hit, <link to="#saveSettings"/>
3527 will return an appropriate error message explaining the exact
3528 reason and the changes you made to this machine will not be
3529 saved.
3530 <note>
3531 For "legacy" machines created using the
3532 <link to="IVirtualBox::createLegacyMachine"/> call,
3533 the above naming limitations do not apply because the
3534 machine name does not affect the settings file name.
3535 The settings file name remains the same as it was specified
3536 during machine creation and never changes.
3537 </note>
3538 </desc>
3539 </attribute>
3540
3541 <attribute name="description" type="wstring">
3542 <desc>
3543 Description of the virtual machine.
3544
3545 The description attribute can contain any text and is
3546 typically used to describe the hardware and software
3547 configuration of the virtual machine in detail (i.e. network
3548 settings, versions of the installed software and so on).
3549 </desc>
3550 </attribute>
3551
3552 <attribute name="id" type="uuid" mod="string" readonly="yes">
3553 <desc>UUID of the virtual machine.</desc>
3554 </attribute>
3555
3556 <attribute name="OSTypeId" type="wstring">
3557 <desc>
3558 User-defined identifier of the Guest OS type.
3559 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3560 an IGuestOSType object representing details about the given
3561 Guest OS type.
3562 <note>
3563 This value may differ from the value returned by
3564 <link to="IGuest::OSTypeId"/> if Guest Additions are
3565 installed to the guest OS.
3566 </note>
3567 </desc>
3568 </attribute>
3569
3570 <attribute name="HardwareVersion" type="wstring">
3571 <desc>Hardware version identifier. Internal use only for now.</desc>
3572 </attribute>
3573
3574 <attribute name="hardwareUUID" type="uuid" mod="string">
3575 <desc>
3576 The UUID presented to the guest via memory tables, hardware and guest
3577 properties. For most VMs this is the same as the @a id, but for VMs
3578 which have been cloned or teleported it may be the same as the source
3579 VM. This latter is because the guest shouldn't notice that it was
3580 cloned or teleported.
3581 </desc>
3582 </attribute>
3583
3584 <attribute name="CPUCount" type="unsigned long">
3585 <desc>Number of virtual CPUs in the VM.</desc>
3586 </attribute>
3587
3588 <attribute name="CPUHotPlugEnabled" type="boolean">
3589 <desc>
3590 This setting determines whether VirtualBox allows CPU
3591 hotplugging for this machine.</desc>
3592 </attribute>
3593
3594 <attribute name="CPUPriority" type="unsigned long">
3595 <desc>
3596 Priority of the virtual CPUs. Means to limit the number of CPU cycles
3597 a guest can use. The unit is percentage of host CPU cycles per second.
3598 The valid range is 1 - 100. 100 (the default) implies no limit.
3599 </desc>
3600 </attribute>
3601
3602 <attribute name="memorySize" type="unsigned long">
3603 <desc>System memory size in megabytes.</desc>
3604 </attribute>
3605
3606 <attribute name="memoryBalloonSize" type="unsigned long">
3607 <desc>Memory balloon size in megabytes.</desc>
3608 </attribute>
3609
3610 <attribute name="PageFusionEnabled" type="boolean">
3611 <desc>
3612 This setting determines whether VirtualBox allows page
3613 fusion for this machine (64 bits host only).
3614 </desc>
3615 </attribute>
3616
3617 <attribute name="VRAMSize" type="unsigned long">
3618 <desc>Video memory size in megabytes.</desc>
3619 </attribute>
3620
3621 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3622 <desc>
3623 This setting determines whether VirtualBox allows this machine to make
3624 use of the 3D graphics support available on the host.</desc>
3625 </attribute>
3626
3627 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
3628 <desc>
3629 This setting determines whether VirtualBox allows this machine to make
3630 use of the 2D video acceleration support available on the host.</desc>
3631 </attribute>
3632
3633 <attribute name="monitorCount" type="unsigned long">
3634 <desc>
3635 Number of virtual monitors.
3636 <note>
3637 Only effective on Windows XP and later guests with
3638 Guest Additions installed.
3639 </note>
3640 </desc>
3641 </attribute>
3642
3643 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3644 <desc>Object containing all BIOS settings.</desc>
3645 </attribute>
3646
3647 <attribute name="firmwareType" type="FirmwareType">
3648 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
3649 bootstrap in this VM.</desc>
3650 </attribute>
3651
3652 <attribute name="pointingHidType" type="PointingHidType">
3653 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
3654 The default is typically "PS2Mouse" but can vary depending on the
3655 requirements of the guest operating system.</desc>
3656 </attribute>
3657
3658 <attribute name="keyboardHidType" type="KeyboardHidType">
3659 <desc>Type of keyboard HID used in this VM.
3660 The default is typically "PS2Keyboard" but can vary depending on the
3661 requirements of the guest operating system.</desc>
3662 </attribute>
3663
3664 <attribute name="hpetEnabled" type="boolean">
3665 <desc>This attribute controls if High Precision Event Timer (HPET) is
3666 enabled in this VM. Use this property if you want to provide guests
3667 with additional time source, or if guest requires HPET to function correctly.
3668 Default is false.</desc>
3669 </attribute>
3670
3671 <attribute name="snapshotFolder" type="wstring">
3672 <desc>
3673 Full path to the directory used to store snapshot data
3674 (differencing media and saved state files) of this machine.
3675
3676 The initial value of this property is
3677 <tt>&lt;</tt><link to="#settingsFilePath">
3678 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3679 <link to="#id">machine_uuid</link>
3680 <tt>&gt;</tt>.
3681
3682 Currently, it is an error to try to change this property on
3683 a machine that has snapshots (because this would require to
3684 move possibly large files to a different location).
3685 A separate method will be available for this purpose later.
3686
3687 <note>
3688 Setting this property to @c null or to an empty string will restore
3689 the initial value.
3690 </note>
3691 <note>
3692 When setting this property, the specified path can be
3693 absolute (full path) or relative to the directory where the
3694 <link to="#settingsFilePath">machine settings file</link>
3695 is located. When reading this property, a full path is
3696 always returned.
3697 </note>
3698 <note>
3699 The specified path may not exist, it will be created
3700 when necessary.
3701 </note>
3702 </desc>
3703 </attribute>
3704
3705 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3706 <desc>VRDP server object.</desc>
3707 </attribute>
3708
3709 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
3710 <desc>Array of media attached to this machine.</desc>
3711 </attribute>
3712
3713 <attribute name="USBController" type="IUSBController" readonly="yes">
3714 <desc>
3715 Associated USB controller object.
3716
3717 <note>
3718 If USB functionality is not available in the given edition of
3719 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3720 </note>
3721 </desc>
3722 </attribute>
3723
3724 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3725 <desc>Associated audio adapter, always present.</desc>
3726 </attribute>
3727
3728 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3729 <desc>Array of storage controllers attached to this machine.</desc>
3730 </attribute>
3731
3732 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3733 <desc>
3734 Full name of the file containing machine settings data.
3735 </desc>
3736 </attribute>
3737
3738 <attribute name="settingsModified" type="boolean" readonly="yes">
3739 <desc>
3740 Whether the settings of this machine have been modified
3741 (but neither yet saved nor discarded).
3742 <note>
3743 Reading this property is only valid on instances returned
3744 by <link to="ISession::machine"/> and on new machines
3745 created by <link to="IVirtualBox::createMachine"/> or opened
3746 by <link to="IVirtualBox::openMachine"/> but not
3747 yet registered, or on unregistered machines after calling
3748 <link to="IMachine::unregister"/>. For all other
3749 cases, the settings can never be modified.
3750 </note>
3751 <note>
3752 For newly created unregistered machines, the value of this
3753 property is always @c true until <link to="#saveSettings"/>
3754 is called (no matter if any machine settings have been
3755 changed after the creation or not). For opened machines
3756 the value is set to @c false (and then follows to normal rules).
3757 </note>
3758 </desc>
3759 </attribute>
3760
3761 <attribute name="sessionState" type="SessionState" readonly="yes">
3762 <desc>Current session state for this machine.</desc>
3763 </attribute>
3764
3765 <attribute name="sessionType" type="wstring" readonly="yes">
3766 <desc>
3767 Type of the session. If <link to="#sessionState"/> is
3768 Spawning or Locked, this attribute contains the
3769 same value as passed to the
3770 <link to="IMachine::launchVMProcess"/> method in the
3771 @a type parameter. If the session was used with
3772 <link to="IMachine::lockMachine" />, or if
3773 <link to="#sessionState"/> is SessionClosed, the value of this
3774 attribute is an empty string.
3775 </desc>
3776 </attribute>
3777
3778 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3779 <desc>
3780 Identifier of the session process. This attribute contains the
3781 platform-dependent identifier of the process whose session was
3782 used with <link to="IMachine::lockMachine" /> call. The returned
3783 value is only valid if <link to="#sessionState"/> is Locked or
3784 Unlocking by the time this property is read.
3785 </desc>
3786 </attribute>
3787
3788 <attribute name="state" type="MachineState" readonly="yes">
3789 <desc>Current execution state of this machine.</desc>
3790 </attribute>
3791
3792 <attribute name="lastStateChange" type="long long" readonly="yes">
3793 <desc>
3794 Time stamp of the last execution state change,
3795 in milliseconds since 1970-01-01 UTC.
3796 </desc>
3797 </attribute>
3798
3799 <attribute name="stateFilePath" type="wstring" readonly="yes">
3800 <desc>
3801 Full path to the file that stores the execution state of
3802 the machine when it is in the <link to="MachineState_Saved"/> state.
3803 <note>
3804 When the machine is not in the Saved state, this attribute is
3805 an empty string.
3806 </note>
3807 </desc>
3808 </attribute>
3809
3810 <attribute name="logFolder" type="wstring" readonly="yes">
3811 <desc>
3812 Full path to the folder that stores a set of rotated log files
3813 recorded during machine execution. The most recent log file is
3814 named <tt>VBox.log</tt>, the previous log file is
3815 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3816 in the current version).
3817 </desc>
3818 </attribute>
3819
3820 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3821 <desc>
3822 Current snapshot of this machine. This is @c null if the machine
3823 currently has no snapshots. If it is not @c null, then it was
3824 set by one of <link to="IConsole::takeSnapshot" />,
3825 <link to="IConsole::deleteSnapshot" />
3826 or <link to="IConsole::restoreSnapshot" />, depending on which
3827 was called last. See <link to="ISnapshot"/> for details.
3828 </desc>
3829 </attribute>
3830
3831 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3832 <desc>
3833 Number of snapshots taken on this machine. Zero means the
3834 machine doesn't have any snapshots.
3835 </desc>
3836 </attribute>
3837
3838 <attribute name="currentStateModified" type="boolean" readonly="yes">
3839 <desc>
3840 Returns @c true if the current state of the machine is not
3841 identical to the state stored in the current snapshot.
3842
3843 The current state is identical to the current snapshot only
3844 directly after one of the following calls are made:
3845
3846 <ul>
3847 <li><link to="IConsole::restoreSnapshot"/>
3848 </li>
3849 <li><link to="IConsole::takeSnapshot"/> (issued on a
3850 "powered off" or "saved" machine, for which
3851 <link to="#settingsModified"/> returns @c false)
3852 </li>
3853 <li><link to="IMachine::setCurrentSnapshot"/>
3854 </li>
3855 </ul>
3856
3857 The current state remains identical until one of the following
3858 happens:
3859 <ul>
3860 <li>settings of the machine are changed</li>
3861 <li>the saved state is deleted</li>
3862 <li>the current snapshot is deleted</li>
3863 <li>an attempt to execute the machine is made</li>
3864 </ul>
3865
3866 <note>
3867 For machines that don't have snapshots, this property is
3868 always @c false.
3869 </note>
3870 </desc>
3871 </attribute>
3872
3873 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
3874 <desc>
3875 Collection of shared folders for this machine (permanent shared
3876 folders). These folders are shared automatically at machine startup
3877 and available only to the guest OS installed within this machine.
3878
3879 New shared folders are added to the collection using
3880 <link to="#createSharedFolder"/>. Existing shared folders can be
3881 removed using <link to="#removeSharedFolder"/>.
3882 </desc>
3883 </attribute>
3884
3885 <attribute name="clipboardMode" type="ClipboardMode">
3886 <desc>
3887 Synchronization mode between the host OS clipboard
3888 and the guest OS clipboard.
3889 </desc>
3890 </attribute>
3891
3892 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3893 <desc>
3894 A comma-separated list of simple glob patterns. Changes to guest
3895 properties whose name matches one of the patterns will generate an
3896 <link to="IGuestPropertyChangedEvent"/> signal.
3897 </desc>
3898 </attribute>
3899
3900 <attribute name="teleporterEnabled" type="boolean">
3901 <desc>
3902 When set to @a true, the virtual machine becomes a target teleporter
3903 the next time it is powered on. This can only set to @a true when the
3904 VM is in the @a PoweredOff or @a Aborted state.
3905
3906 <!-- This property is automatically set to @a false when the VM is powered
3907 on. (bird: This doesn't work yet ) -->
3908 </desc>
3909 </attribute>
3910
3911 <attribute name="teleporterPort" type="unsigned long">
3912 <desc>
3913 The TCP port the target teleporter will listen for incoming
3914 teleportations on.
3915
3916 0 means the port is automatically selected upon power on. The actual
3917 value can be read from this property while the machine is waiting for
3918 incoming teleportations.
3919 </desc>
3920 </attribute>
3921
3922 <attribute name="teleporterAddress" type="wstring">
3923 <desc>
3924 The address the target teleporter will listen on. If set to an empty
3925 string, it will listen on all addresses.
3926 </desc>
3927 </attribute>
3928
3929 <attribute name="teleporterPassword" type="wstring">
3930 <desc>
3931 The password the to check for on the target teleporter. This is just a
3932 very basic measure to prevent simple hacks and operators accidentally
3933 beaming a virtual machine to the wrong place.
3934 </desc>
3935 </attribute>
3936
3937 <attribute name="RTCUseUTC" type="boolean">
3938 <desc>
3939 When set to @a true, the RTC device of the virtual machine will run
3940 in UTC time, otherwise in local time. Especially Unix guests prefer
3941 the time in UTC.
3942 </desc>
3943 </attribute>
3944
3945 <attribute name="ioCacheEnabled" type="boolean">
3946 <desc>
3947 When set to @a true, the builtin I/O cache of the virtual machine
3948 will be enabled.
3949 </desc>
3950 </attribute>
3951
3952 <attribute name="ioCacheSize" type="unsigned long">
3953 <desc>
3954 Maximum size of the I/O cache in MB.
3955 </desc>
3956 </attribute>
3957
3958 <method name="lockMachine">
3959 <desc>
3960 Locks the machine for the given session to enable the caller
3961 to make changes to the machine or start the VM or control
3962 VM execution.
3963
3964 There are two ways to lock a machine for such uses:
3965
3966 <ul>
3967 <li>If you want to make changes to the machine settings,
3968 you must obtain an exclusive write lock on the machine
3969 by setting @a lockType to @c Write.
3970
3971 This will only succeed if no other process has locked
3972 the machine to prevent conflicting changes. Only after
3973 an exclusive write lock has been obtained using this method, one
3974 can change all VM settings or execute the VM in the process
3975 space of the session object. (Note that the latter is only of
3976 interest if you actually want to write a new front-end for
3977 virtual machines; but this API gets called internally by
3978 the existing front-ends such as VBoxHeadless and the VirtualBox
3979 GUI to acquire a write lock on the machine that they are running.)
3980
3981 On success, write-locking the machine for a session creates
3982 a second copy of the IMachine object. It is this second object
3983 upon which changes can be made; in VirtualBox terminology, the
3984 second copy is "mutable". It is only this second, mutable machine
3985 object upon which you can call methods that change the
3986 machine state. After having called this method, you can
3987 obtain this second, mutable machine object using the
3988 <link to="ISession::machine" /> attribute.
3989 </li>
3990 <li>If you only want to check the machine state or control
3991 machine execution without actually changing machine
3992 settings (e.g. to get access to VM statistics or take
3993 a snapshot or save the machine state), then set the
3994 @a lockType argument to @c Shared.
3995
3996 If no other session has obtained a lock, you will obtain an
3997 exclusive write lock as described above. However, if another
3998 session has already obtained such a lock, then a link to that
3999 existing session will be established which allows you
4000 to control that existing session.
4001
4002 To find out which type of lock was obtained, you can
4003 inspect <link to="ISession::type" />, which will have been
4004 set to either @c WriteLock or @c Shared.
4005 </li>
4006 </ul>
4007
4008 In either case, you can get access to the <link to="IConsole" />
4009 object which controls VM execution.
4010
4011 Also in all of the above cases, one must always call
4012 <link to="ISession::unlockMachine" /> to release the lock on the machine, or
4013 the machine's state will eventually be set to "Aborted".
4014
4015 To change settings on a machine, the following sequence is typically
4016 performed:
4017
4018 <ol>
4019 <li>Call this method to obtain an exclusive write lock for the current session.</li>
4020
4021 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4022
4023 <li>Change the settings of the machine by invoking IMachine methods.</li>
4024
4025 <li>Call <link to="IMachine::saveSettings" />.</li>
4026
4027 <li>Release the write lock by calling <link to="ISession::unlockMachine"/>.</li>
4028 </ol>
4029
4030 <result name="E_UNEXPECTED">
4031 Virtual machine not registered.
4032 </result>
4033 <result name="E_ACCESSDENIED">
4034 Process not started by OpenRemoteSession.
4035 </result>
4036 <result name="VBOX_E_INVALID_OBJECT_STATE">
4037 Session already open or being opened.
4038 </result>
4039 <result name="VBOX_E_VM_ERROR">
4040 Failed to assign machine to session.
4041 </result>
4042 </desc>
4043 <param name="session" type="ISession" dir="in">
4044 <desc>
4045 Session object for which the machine will be locked.
4046 </desc>
4047 </param>
4048 <param name="lockType" type="LockType" dir="in">
4049 <desc>
4050 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4051 If set to @c Shared, then either acquire an exclusive write lock or establish
4052 a link to an existing session.
4053 </desc>
4054 </param>
4055 </method>
4056
4057 <method name="launchVMProcess">
4058 <desc>
4059 Spawns a new process that will execute the virtual machine and obtains a shared
4060 lock on the machine for the calling session.
4061
4062 If launching the VM succeeds, the new VM process will create its own session
4063 and write-lock the machine for it, preventing conflicting changes from other
4064 processes. If the machine is already locked (because it is already running or
4065 because another session has a write lock), launching the VM process will therefore
4066 fail. Reversely, future attempts to obtain a write lock will also fail while the
4067 machine is running.
4068
4069 The caller's session object remains separate from the session opened by the new
4070 VM process. It receives its own <link to="IConsole" /> object which can be used
4071 to control machine execution, but it cannot be used to change all VM settings
4072 which would be available after a <link to="#lockMachine" /> call.
4073
4074 The caller must eventually release the session's shared lock by calling
4075 <link to="ISession::unlockMachine" /> on the local session object once this call
4076 has returned. However, the session's state (see <link to="ISession::state" />)
4077 will not return to "Unlocked" until the remote session has also unlocked
4078 the machine (i.e. the machine has stopped running).
4079
4080 Lauching a VM process can take some time (a new VM is started in a new process,
4081 for which memory and other resources need to be set up). Because of this,
4082 an <link to="IProgress" /> object is returned to allow the caller to wait
4083 for this asynchronous operation to be completed. Until then, the caller's
4084 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4085 and <link to="ISession::console" /> attributes cannot be accessed.
4086 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4087 similar calls to wait for completion. Completion is signalled when the VM
4088 is powered on. If launching the VM fails, error messages can be queried
4089 via the progress object, if available.
4090
4091 The progress object will have at least 2 sub-operations. The first
4092 operation covers the period up to the new VM process calls powerUp.
4093 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4094 progress object. Because <link to="IConsole::powerUp"/> may require
4095 some extra sub-operations, the <link to="IProgress::operationCount"/>
4096 may change at the completion of operation.
4097
4098 For details on the teleportation progress operation, see
4099 <link to="IConsole::powerUp"/>.
4100
4101 The @a environment argument is a string containing definitions of
4102 environment variables in the following format:
4103 @code
4104 NAME[=VALUE]\n
4105 NAME[=VALUE]\n
4106 ...
4107 @endcode
4108 where <tt>\\n</tt> is the new line character. These environment
4109 variables will be appended to the environment of the VirtualBox server
4110 process. If an environment variable exists both in the server process
4111 and in this list, the value from this list takes precedence over the
4112 server's variable. If the value of the environment variable is
4113 omitted, this variable will be removed from the resulting environment.
4114 If the environment string is @c null or empty, the server environment
4115 is inherited by the started process as is.
4116
4117 <result name="E_UNEXPECTED">
4118 Virtual machine not registered.
4119 </result>
4120 <result name="E_INVALIDARG">
4121 Invalid session type @a type.
4122 </result>
4123 <result name="VBOX_E_OBJECT_NOT_FOUND">
4124 No machine matching @a machineId found.
4125 </result>
4126 <result name="VBOX_E_INVALID_OBJECT_STATE">
4127 Session already open or being opened.
4128 </result>
4129 <result name="VBOX_E_IPRT_ERROR">
4130 Launching process for machine failed.
4131 </result>
4132 <result name="VBOX_E_VM_ERROR">
4133 Failed to assign machine to session.
4134 </result>
4135 </desc>
4136 <param name="session" type="ISession" dir="in">
4137 <desc>
4138 Client session object to which the VM process will be connected (this
4139 must be in "Unlocked" state).
4140 </desc>
4141 </param>
4142 <param name="type" type="wstring" dir="in">
4143 <desc>
4144 Front-end to use for the new VM process. The following are currently supported:
4145 <ul>
4146 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4147 <li><tt>"vrdp"</tt>: VBoxHeadless (VRDP Server) front-end</li>
4148 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4149 </ul>
4150 </desc>
4151 </param>
4152 <param name="environment" type="wstring" dir="in">
4153 <desc>
4154 Environment to pass to the VM process.
4155 </desc>
4156 </param>
4157 <param name="progress" type="IProgress" dir="return">
4158 <desc>Progress object to track the operation completion.</desc>
4159 </param>
4160 </method>
4161
4162 <method name="setBootOrder">
4163 <desc>
4164 Puts the given device to the specified position in
4165 the boot order.
4166
4167 To indicate that no device is associated with the given position,
4168 <link to="DeviceType_Null"/> should be used.
4169
4170 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4171
4172 <result name="E_INVALIDARG">
4173 Boot @a position out of range.
4174 </result>
4175 <result name="E_NOTIMPL">
4176 Booting from USB @a device currently not supported.
4177 </result>
4178
4179 </desc>
4180 <param name="position" type="unsigned long" dir="in">
4181 <desc>
4182 Position in the boot order (@c 1 to the total number of
4183 devices the machine can boot from, as returned by
4184 <link to="ISystemProperties::maxBootPosition"/>).
4185 </desc>
4186 </param>
4187 <param name="device" type="DeviceType" dir="in">
4188 <desc>
4189 The type of the device used to boot at the given position.
4190 </desc>
4191 </param>
4192 </method>
4193
4194 <method name="getBootOrder" const="yes">
4195 <desc>
4196 Returns the device type that occupies the specified
4197 position in the boot order.
4198
4199 @todo [remove?]
4200 If the machine can have more than one device of the returned type
4201 (such as hard disks), then a separate method should be used to
4202 retrieve the individual device that occupies the given position.
4203
4204 If here are no devices at the given position, then
4205 <link to="DeviceType_Null"/> is returned.
4206
4207 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4208
4209 <result name="E_INVALIDARG">
4210 Boot @a position out of range.
4211 </result>
4212
4213 </desc>
4214 <param name="position" type="unsigned long" dir="in">
4215 <desc>
4216 Position in the boot order (@c 1 to the total number of
4217 devices the machine can boot from, as returned by
4218 <link to="ISystemProperties::maxBootPosition"/>).
4219 </desc>
4220 </param>
4221 <param name="device" type="DeviceType" dir="return">
4222 <desc>
4223 Device at the given position.
4224 </desc>
4225 </param>
4226 </method>
4227
4228 <method name="attachDevice">
4229 <desc>
4230 Attaches a device and optionally mounts a medium to the given storage
4231 controller (<link to="IStorageController" />, identified by @a name),
4232 at the indicated port and device.
4233
4234 This method is intended for managing storage devices in general while a
4235 machine is powered off. It can be used to attach and detach fixed
4236 and removeable media.
4237
4238 Starting with VirtualBox 3.3, media no longer have to be globally
4239 registered before they can be attached to a virtual machine. For
4240 compatibility with machines created by older versions of VirtualBox
4241 and for greater flexibility with managing removable media, media
4242 can still be registered globally. As a result, there are now
4243 several variants of attaching media:
4244
4245 <ul>
4246 <li>To directly attach a medium without first registering it
4247 globally, simply pass the file name of its storage unit in the
4248 @a medium string parameter. This works for all media formats
4249 supported by the <li to="VirtualBox::openMedium" /> method.
4250 The difference is that the medium will not be saved in the
4251 global media registry, but only with the machine settings
4252 XML file. For better portability of the machine as a whole,
4253 it is recommended to place the storage unit in the machine's
4254 folder as well.
4255 </li>
4256
4257 <li>To attach a medium that has been globally registered using
4258 <li to="VirtualBox::openMedium" />, call that method with the
4259 full path of a storage unit. Then, retrieve the UUID of that
4260 medium from its <link to="IMedium::id" /> attribute and pass
4261 that UUID into this method. This way, the medium will be
4262 saved in the global media registry in the VirtualBox.xml
4263 settings file. This is still the recommended way to manage
4264 removable media such as ISO and RAW files if they are to be
4265 used by several virtual machines and the storage unit is not
4266 located in the machine's directory.
4267 </li>
4268
4269 <li>Only for storage devices supporting removable media (such as
4270 DVDs and floppies), you can also specify an empty string to
4271 indicate an empty drive or the UUID of a host DVD or floppy
4272 drive; those UUIDs can be obtained from <link to="IHost::DVDDrives" />
4273 and <link to="IHost::floppyDrives"/>.
4274 For removeable devices, you can also use <link to="IMachine::mountMedium"/>
4275 to change the media while the machine is running.
4276 </li>
4277 </ul>
4278
4279 In a VM's default configuration of virtual machines, the secondary
4280 master of the IDE controller is used for a CD/DVD drive.
4281
4282 After calling this returns successfully, a new instance of
4283 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4284 attachments (see <link to="IMachine::mediumAttachments"/>).
4285
4286 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4287 information about attaching media.
4288
4289 The specified device slot must not have a device attached to it,
4290 or this method will fail.
4291
4292 <note>
4293 You cannot attach a device to a newly created machine until
4294 this machine's settings are saved to disk using
4295 <link to="#saveSettings"/>.
4296 </note>
4297 <note>
4298 If the medium is being attached indirectly, a new differencing medium
4299 will implicitly be created for it and attached instead. If the
4300 changes made to the machine settings (including this indirect
4301 attachment) are later cancelled using <link to="#discardSettings"/>,
4302 this implicitly created differencing medium will implicitly
4303 be deleted.
4304 </note>
4305
4306 <result name="E_INVALIDARG">
4307 SATA device, SATA port, IDE port or IDE slot out of range, or
4308 file or UUID not found.
4309 </result>
4310 <result name="VBOX_E_INVALID_OBJECT_STATE">
4311 Machine must be registered before media can be attached.
4312 </result>
4313 <result name="VBOX_E_INVALID_VM_STATE">
4314 Invalid machine state.
4315 </result>
4316 <result name="VBOX_E_OBJECT_IN_USE">
4317 A medium is already attached to this or another virtual machine.
4318 </result>
4319
4320 </desc>
4321 <param name="name" type="wstring" dir="in">
4322 <desc>Name of the storage controller to attach the device to.</desc>
4323 </param>
4324 <param name="controllerPort" type="long" dir="in">
4325 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4326 the primary controller and 1 specifies the secondary controller.
4327 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4328 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4329 </param>
4330 <param name="device" type="long" dir="in">
4331 <desc>Device slot in the given port to attach the device to. This is only
4332 relevant for IDE controllers, for which 0 specifies the master device and
4333 1 specifies the slave device. For all other controller types, this must
4334 be 0.</desc>
4335 </param>
4336 <param name="type" type="DeviceType" dir="in">
4337 <desc>Device type of the attached device.</desc>
4338 </param>
4339 <param name="medium" type="wstring" dir="in">
4340 <desc>Path of the storage unit or UUID of the medium or the UUID of a
4341 host drive to mount, or an empty string for an empty drive.</desc>
4342 </param>
4343 </method>
4344
4345 <method name="detachDevice">
4346 <desc>
4347 Detaches the device attached to a device slot of the specified bus.
4348
4349 Detaching the device from the virtual machine is deferred. This means
4350 that the medium remains associated with the machine when this method
4351 returns and gets actually de-associated only after a successful
4352 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4353 for more detailed information about attaching media.
4354
4355 <note>
4356 You cannot detach a device from a running machine.
4357 </note>
4358 <note>
4359 Detaching differencing media implicitly created by <link
4360 to="#attachDevice"/> for the indirect attachment using this
4361 method will <b>not</b> implicitly delete them. The
4362 <link to="IMedium::deleteStorage"/> operation should be
4363 explicitly performed by the caller after the medium is successfully
4364 detached and the settings are saved with
4365 <link to="#saveSettings"/>, if it is the desired action.
4366 </note>
4367
4368 <result name="VBOX_E_INVALID_VM_STATE">
4369 Attempt to detach medium from a running virtual machine.
4370 </result>
4371 <result name="VBOX_E_OBJECT_NOT_FOUND">
4372 No medium attached to given slot/bus.
4373 </result>
4374 <result name="VBOX_E_NOT_SUPPORTED">
4375 Medium format does not support storage deletion.
4376 </result>
4377
4378 </desc>
4379 <param name="name" type="wstring" dir="in">
4380 <desc>Name of the storage controller to detach the medium from.</desc>
4381 </param>
4382 <param name="controllerPort" type="long" dir="in">
4383 <desc>Port number to detach the medium from.</desc>
4384 </param>
4385 <param name="device" type="long" dir="in">
4386 <desc>Device slot number to detach the medium from.</desc>
4387 </param>
4388 </method>
4389
4390 <method name="passthroughDevice">
4391 <desc>
4392 Sets the passthrough mode of an existing DVD device. Changing the
4393 setting while the VM is running is forbidden. The setting is only used
4394 if at VM start the device is configured as a host DVD drive, in all
4395 other cases it is ignored. The device must already exist; see
4396 <link to="IMachine::attachDevice"/> for how to attach a new device.
4397
4398 The @a controllerPort and @a device parameters specify the device slot and
4399 have have the same meaning as with <link to="IMachine::attachDevice" />.
4400
4401 <result name="E_INVALIDARG">
4402 SATA device, SATA port, IDE port or IDE slot out of range.
4403 </result>
4404 <result name="VBOX_E_INVALID_OBJECT_STATE">
4405 Attempt to modify an unregistered virtual machine.
4406 </result>
4407 <result name="VBOX_E_INVALID_VM_STATE">
4408 Invalid machine state.
4409 </result>
4410
4411 </desc>
4412 <param name="name" type="wstring" dir="in">
4413 <desc>Name of the storage controller.</desc>
4414 </param>
4415 <param name="controllerPort" type="long" dir="in">
4416 <desc>Storage controller port.</desc>
4417 </param>
4418 <param name="device" type="long" dir="in">
4419 <desc>Device slot in the given port.</desc>
4420 </param>
4421 <param name="passthrough" type="boolean" dir="in">
4422 <desc>New value for the passthrough setting.</desc>
4423 </param>
4424 </method>
4425
4426 <method name="mountMedium">
4427 <desc>
4428 Mounts a medium (<link to="IMedium" />, identified
4429 by the given UUID @a id) to the given storage controller
4430 (<link to="IStorageController" />, identified by @a name),
4431 at the indicated port and device. The device must already exist;
4432 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4433
4434 This method is intended only for managing removable media, where the
4435 device is fixed but media is changeable at runtime (such as DVDs
4436 and floppies). It cannot be used for fixed media such as hard disks.
4437
4438 The @a controllerPort and @a device parameters specify the device slot and
4439 have have the same meaning as with <link to="IMachine::attachDevice" />.
4440
4441 The specified device slot can have a medium mounted, which will be
4442 unmounted first. Specifying a zero UUID (or an empty string) for
4443 @a medium does just an unmount.
4444
4445 See <link to="IMedium"/> for more detailed information about
4446 attaching media.
4447
4448 <result name="E_INVALIDARG">
4449 SATA device, SATA port, IDE port or IDE slot out of range.
4450 </result>
4451 <result name="VBOX_E_INVALID_OBJECT_STATE">
4452 Attempt to attach medium to an unregistered virtual machine.
4453 </result>
4454 <result name="VBOX_E_INVALID_VM_STATE">
4455 Invalid machine state.
4456 </result>
4457 <result name="VBOX_E_OBJECT_IN_USE">
4458 Medium already attached to this or another virtual machine.
4459 </result>
4460
4461 </desc>
4462 <param name="name" type="wstring" dir="in">
4463 <desc>Name of the storage controller to attach the medium to.</desc>
4464 </param>
4465 <param name="controllerPort" type="long" dir="in">
4466 <desc>Port to attach the medium to.</desc>
4467 </param>
4468 <param name="device" type="long" dir="in">
4469 <desc>Device slot in the given port to attach the medium to.</desc>
4470 </param>
4471 <param name="medium" type="uuid" mod="string" dir="in">
4472 <desc>UUID of the medium to attach. A zero UUID means unmount the
4473 currently mounted medium.</desc>
4474 </param>
4475 <param name="force" type="boolean" dir="in">
4476 <desc>Allows to force unmount/mount of a medium which is locked by
4477 theDevice slot in the given port to attach the medium to.</desc>
4478 </param>
4479 </method>
4480
4481 <method name="getMedium" const="yes">
4482 <desc>
4483 Returns the virtual medium attached to a device slot of the specified
4484 bus.
4485
4486 Note that if the medium was indirectly attached by
4487 <link to="#mountMedium"/> to the given device slot then this
4488 method will return not the same object as passed to the
4489 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4490 more detailed information about mounting a medium.
4491
4492 <result name="VBOX_E_OBJECT_NOT_FOUND">
4493 No medium attached to given slot/bus.
4494 </result>
4495
4496 </desc>
4497 <param name="name" type="wstring" dir="in">
4498 <desc>Name of the storage controller the medium is attached to.</desc>
4499 </param>
4500 <param name="controllerPort" type="long" dir="in">
4501 <desc>Port to query.</desc>
4502 </param>
4503 <param name="device" type="long" dir="in">
4504 <desc>Device slot in the given port to query.</desc>
4505 </param>
4506 <param name="medium" type="IMedium" dir="return">
4507 <desc>Attached medium object.</desc>
4508 </param>
4509 </method>
4510
4511 <method name="getMediumAttachmentsOfController" const="yes">
4512 <desc>
4513 Returns an array of medium attachments which are attached to the
4514 the controller with the given name.
4515
4516 <result name="VBOX_E_OBJECT_NOT_FOUND">
4517 A storage controller with given name doesn't exist.
4518 </result>
4519 </desc>
4520 <param name="name" type="wstring" dir="in"/>
4521 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4522 </method>
4523
4524 <method name="getMediumAttachment" const="yes">
4525 <desc>
4526 Returns a medium attachment which corresponds to the controller with
4527 the given name, on the given port and device slot.
4528
4529 <result name="VBOX_E_OBJECT_NOT_FOUND">
4530 No attachment exists for the given controller/port/device combination.
4531 </result>
4532 </desc>
4533 <param name="name" type="wstring" dir="in"/>
4534 <param name="controllerPort" type="long" dir="in"/>
4535 <param name="device" type="long" dir="in"/>
4536 <param name="attachment" type="IMediumAttachment" dir="return"/>
4537 </method>
4538
4539 <method name="getNetworkAdapter" const="yes">
4540 <desc>
4541 Returns the network adapter associated with the given slot.
4542 Slots are numbered sequentially, starting with zero. The total
4543 number of adapters per machine is defined by the
4544 <link to="ISystemProperties::networkAdapterCount"/> property,
4545 so the maximum slot number is one less than that property's value.
4546
4547 <result name="E_INVALIDARG">
4548 Invalid @a slot number.
4549 </result>
4550
4551 </desc>
4552 <param name="slot" type="unsigned long" dir="in"/>
4553 <param name="adapter" type="INetworkAdapter" dir="return"/>
4554 </method>
4555
4556 <method name="addStorageController">
4557 <desc>
4558 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4559 machine and returns it as an instance of
4560 <link to="IStorageController" />.
4561
4562 @a name identifies the controller for subsequent calls such as
4563 <link to="#getStorageControllerByName" />,
4564 <link to="#getStorageControllerByInstance" />,
4565 <link to="#removeStorageController" />,
4566 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4567
4568 After the controller has been added, you can set its exact
4569 type by setting the <link to="IStorageController::controllerType" />.
4570
4571 <result name="VBOX_E_OBJECT_IN_USE">
4572 A storage controller with given name exists already.
4573 </result>
4574 <result name="E_INVALIDARG">
4575 Invalid @a controllerType.
4576 </result>
4577 </desc>
4578 <param name="name" type="wstring" dir="in"/>
4579 <param name="connectionType" type="StorageBus" dir="in"/>
4580 <param name="controller" type="IStorageController" dir="return"/>
4581 </method>
4582
4583 <method name="getStorageControllerByName" const="yes">
4584 <desc>
4585 Returns a storage controller with the given name.
4586
4587 <result name="VBOX_E_OBJECT_NOT_FOUND">
4588 A storage controller with given name doesn't exist.
4589 </result>
4590 </desc>
4591 <param name="name" type="wstring" dir="in"/>
4592 <param name="storageController" type="IStorageController" dir="return"/>
4593 </method>
4594
4595 <method name="getStorageControllerByInstance" const="yes">
4596 <desc>
4597 Returns a storage controller with the given instance number.
4598
4599 <result name="VBOX_E_OBJECT_NOT_FOUND">
4600 A storage controller with given instance number doesn't exist.
4601 </result>
4602 </desc>
4603 <param name="instance" type="unsigned long" dir="in"/>
4604 <param name="storageController" type="IStorageController" dir="return"/>
4605 </method>
4606
4607 <method name="removeStorageController">
4608 <desc>
4609 Removes a storage controller from the machine.
4610
4611 <result name="VBOX_E_OBJECT_NOT_FOUND">
4612 A storage controller with given name doesn't exist.
4613 </result>
4614 </desc>
4615 <param name="name" type="wstring" dir="in"/>
4616 </method>
4617
4618 <method name="getSerialPort" const="yes">
4619 <desc>
4620 Returns the serial port associated with the given slot.
4621 Slots are numbered sequentially, starting with zero. The total
4622 number of serial ports per machine is defined by the
4623 <link to="ISystemProperties::serialPortCount"/> property,
4624 so the maximum slot number is one less than that property's value.
4625
4626 <result name="E_INVALIDARG">
4627 Invalid @a slot number.
4628 </result>
4629
4630 </desc>
4631 <param name="slot" type="unsigned long" dir="in"/>
4632 <param name="port" type="ISerialPort" dir="return"/>
4633 </method>
4634
4635 <method name="getParallelPort" const="yes">
4636 <desc>
4637 Returns the parallel port associated with the given slot.
4638 Slots are numbered sequentially, starting with zero. The total
4639 number of parallel ports per machine is defined by the
4640 <link to="ISystemProperties::parallelPortCount"/> property,
4641 so the maximum slot number is one less than that property's value.
4642
4643 <result name="E_INVALIDARG">
4644 Invalid @a slot number.
4645 </result>
4646
4647 </desc>
4648 <param name="slot" type="unsigned long" dir="in"/>
4649 <param name="port" type="IParallelPort" dir="return"/>
4650 </method>
4651
4652 <method name="getExtraDataKeys">
4653 <desc>
4654 Returns an array representing the machine-specific extra data keys
4655 which currently have values defined.
4656 </desc>
4657 <param name="value" type="wstring" dir="return" safearray="yes">
4658 <desc>Array of extra data keys.</desc>
4659 </param>
4660 </method>
4661
4662 <method name="getExtraData">
4663 <desc>
4664 Returns associated machine-specific extra data.
4665
4666 If the requested data @a key does not exist, this function will
4667 succeed and return an empty string in the @a value argument.
4668
4669 <result name="VBOX_E_FILE_ERROR">
4670 Settings file not accessible.
4671 </result>
4672 <result name="VBOX_E_XML_ERROR">
4673 Could not parse the settings file.
4674 </result>
4675
4676 </desc>
4677 <param name="key" type="wstring" dir="in">
4678 <desc>Name of the data key to get.</desc>
4679 </param>
4680 <param name="value" type="wstring" dir="return">
4681 <desc>Value of the requested data key.</desc>
4682 </param>
4683 </method>
4684
4685 <method name="setExtraData">
4686 <desc>
4687 Sets associated machine-specific extra data.
4688
4689 If you pass @c null or an empty string as a key @a value, the given
4690 @a key will be deleted.
4691
4692 <note>
4693 Before performing the actual data change, this method will ask all
4694 registered listeners using the
4695 <link to="IExtraDataCanChangeEvent"/>
4696 notification for a permission. If one of the listeners refuses the
4697 new value, the change will not be performed.
4698 </note>
4699 <note>
4700 On success, the
4701 <link to="IExtraDataChangedEvent"/> notification
4702 is called to inform all registered listeners about a successful data
4703 change.
4704 </note>
4705 <note>
4706 This method can be called outside the machine session and therefore
4707 it's a caller's responsibility to handle possible race conditions
4708 when several clients change the same key at the same time.
4709 </note>
4710
4711 <result name="VBOX_E_FILE_ERROR">
4712 Settings file not accessible.
4713 </result>
4714 <result name="VBOX_E_XML_ERROR">
4715 Could not parse the settings file.
4716 </result>
4717
4718 </desc>
4719 <param name="key" type="wstring" dir="in">
4720 <desc>Name of the data key to set.</desc>
4721 </param>
4722 <param name="value" type="wstring" dir="in">
4723 <desc>Value to assign to the key.</desc>
4724 </param>
4725 </method>
4726
4727 <method name="getCPUProperty" const="yes">
4728 <desc>
4729 Returns the virtual CPU boolean value of the specified property.
4730
4731 <result name="E_INVALIDARG">
4732 Invalid property.
4733 </result>
4734
4735 </desc>
4736 <param name="property" type="CPUPropertyType" dir="in">
4737 <desc>
4738 Property type to query.
4739 </desc>
4740 </param>
4741 <param name="value" type="boolean" dir="return">
4742 <desc>
4743 Property value.
4744 </desc>
4745 </param>
4746 </method>
4747
4748 <method name="setCPUProperty">
4749 <desc>
4750 Sets the virtual CPU boolean value of the specified property.
4751
4752 <result name="E_INVALIDARG">
4753 Invalid property.
4754 </result>
4755
4756 </desc>
4757 <param name="property" type="CPUPropertyType" dir="in">
4758 <desc>
4759 Property type to query.
4760 </desc>
4761 </param>
4762 <param name="value" type="boolean" dir="in">
4763 <desc>
4764 Property value.
4765 </desc>
4766 </param>
4767 </method>
4768
4769 <method name="getCPUIDLeaf" const="yes">
4770 <desc>
4771 Returns the virtual CPU cpuid information for the specified leaf.
4772
4773 Currently supported index values for cpuid:
4774 Standard CPUID leafs: 0 - 0xA
4775 Extended CPUID leafs: 0x80000000 - 0x8000000A
4776
4777 See the Intel and AMD programmer's manuals for detailed information
4778 about the cpuid instruction and its leafs.
4779 <result name="E_INVALIDARG">
4780 Invalid id.
4781 </result>
4782
4783 </desc>
4784 <param name="id" type="unsigned long" dir="in">
4785 <desc>
4786 CPUID leaf index.
4787 </desc>
4788 </param>
4789 <param name="valEax" type="unsigned long" dir="out">
4790 <desc>
4791 CPUID leaf value for register eax.
4792 </desc>
4793 </param>
4794 <param name="valEbx" type="unsigned long" dir="out">
4795 <desc>
4796 CPUID leaf value for register ebx.
4797 </desc>
4798 </param>
4799 <param name="valEcx" type="unsigned long" dir="out">
4800 <desc>
4801 CPUID leaf value for register ecx.
4802 </desc>
4803 </param>
4804 <param name="valEdx" type="unsigned long" dir="out">
4805 <desc>
4806 CPUID leaf value for register edx.
4807 </desc>
4808 </param>
4809 </method>
4810
4811 <method name="setCPUIDLeaf">
4812 <desc>
4813 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
4814 are not passed unmodified. VirtualBox clears features that it doesn't support.
4815
4816 Currently supported index values for cpuid:
4817 Standard CPUID leafs: 0 - 0xA
4818 Extended CPUID leafs: 0x80000000 - 0x8000000A
4819
4820 See the Intel and AMD programmer's manuals for detailed information
4821 about the cpuid instruction and its leafs.
4822
4823 Do not use this method unless you know exactly what you're doing. Misuse can lead to
4824 random crashes inside VMs.
4825 <result name="E_INVALIDARG">
4826 Invalid id.
4827 </result>
4828
4829 </desc>
4830 <param name="id" type="unsigned long" dir="in">
4831 <desc>
4832 CPUID leaf index.
4833 </desc>
4834 </param>
4835 <param name="valEax" type="unsigned long" dir="in">
4836 <desc>
4837 CPUID leaf value for register eax.
4838 </desc>
4839 </param>
4840 <param name="valEbx" type="unsigned long" dir="in">
4841 <desc>
4842 CPUID leaf value for register ebx.
4843 </desc>
4844 </param>
4845 <param name="valEcx" type="unsigned long" dir="in">
4846 <desc>
4847 CPUID leaf value for register ecx.
4848 </desc>
4849 </param>
4850 <param name="valEdx" type="unsigned long" dir="in">
4851 <desc>
4852 CPUID leaf value for register edx.
4853 </desc>
4854 </param>
4855 </method>
4856
4857 <method name="removeCPUIDLeaf">
4858 <desc>
4859 Removes the virtual CPU cpuid leaf for the specified index
4860
4861 <result name="E_INVALIDARG">
4862 Invalid id.
4863 </result>
4864
4865 </desc>
4866 <param name="id" type="unsigned long" dir="in">
4867 <desc>
4868 CPUID leaf index.
4869 </desc>
4870 </param>
4871 </method>
4872
4873 <method name="removeAllCPUIDLeaves">
4874 <desc>
4875 Removes all the virtual CPU cpuid leaves
4876 </desc>
4877 </method>
4878
4879 <method name="getHWVirtExProperty" const="yes">
4880 <desc>
4881 Returns the value of the specified hardware virtualization boolean property.
4882
4883 <result name="E_INVALIDARG">
4884 Invalid property.
4885 </result>
4886
4887 </desc>
4888 <param name="property" type="HWVirtExPropertyType" dir="in">
4889 <desc>
4890 Property type to query.
4891 </desc>
4892 </param>
4893 <param name="value" type="boolean" dir="return">
4894 <desc>
4895 Property value.
4896 </desc>
4897 </param>
4898 </method>
4899
4900 <method name="setHWVirtExProperty">
4901 <desc>
4902 Sets a new value for the specified hardware virtualization boolean property.
4903
4904 <result name="E_INVALIDARG">
4905 Invalid property.
4906 </result>
4907
4908 </desc>
4909 <param name="property" type="HWVirtExPropertyType" dir="in">
4910 <desc>
4911 Property type to set.
4912 </desc>
4913 </param>
4914 <param name="value" type="boolean" dir="in">
4915 <desc>
4916 New property value.
4917 </desc>
4918 </param>
4919 </method>
4920
4921 <method name="saveSettings">
4922 <desc>
4923 Saves any changes to machine settings made since the session
4924 has been opened or a new machine has been created, or since the
4925 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4926 For registered machines, new settings become visible to all
4927 other VirtualBox clients after successful invocation of this
4928 method.
4929 <note>
4930 The method sends <link to="IMachineDataChangedEvent"/>
4931 notification event after the configuration has been successfully
4932 saved (only for registered machines).
4933 </note>
4934 <note>
4935 Calling this method is only valid on instances returned
4936 by <link to="ISession::machine"/> and on new machines
4937 created by <link to="IVirtualBox::createMachine"/> but not
4938 yet registered, or on unregistered machines after calling
4939 <link to="IMachine::unregister"/>.
4940 </note>
4941
4942 <result name="VBOX_E_FILE_ERROR">
4943 Settings file not accessible.
4944 </result>
4945 <result name="VBOX_E_XML_ERROR">
4946 Could not parse the settings file.
4947 </result>
4948 <result name="E_ACCESSDENIED">
4949 Modification request refused.
4950 </result>
4951
4952 </desc>
4953 </method>
4954
4955 <method name="discardSettings">
4956 <desc>
4957 Discards any changes to the machine settings made since the session
4958 has been opened or since the last call to <link to="#saveSettings"/>
4959 or <link to="#discardSettings"/>.
4960 <note>
4961 Calling this method is only valid on instances returned
4962 by <link to="ISession::machine"/> and on new machines
4963 created by <link to="IVirtualBox::createMachine"/> or
4964 opened by <link to="IVirtualBox::openMachine"/> but not
4965 yet registered, or on unregistered machines after calling
4966 <link to="IMachine::unregister"/>.
4967 </note>
4968
4969 <result name="VBOX_E_INVALID_VM_STATE">
4970 Virtual machine is not mutable.
4971 </result>
4972
4973 </desc>
4974 </method>
4975
4976 <method name="unregister">
4977 <desc>
4978 Unregisters the machine, which must have been previously registered using
4979 <link to="IVirtualBox::registerMachine"/>, and optionally do additional
4980 cleanup before the machine is unregistered.
4981
4982 This method does not delete any files. It only changes the machine configuration and
4983 the list of registered machines in the VirtualBox object. To delete the files which
4984 belonged to the machine, including the XML file of the machine itself, call
4985 <link to="#delete"/>, optionally with the array of IMedium objects which was returned
4986 from this method.
4987
4988 How thoroughly this method cleans up the machine configuration before unregistering
4989 the machine depends on the @a cleanupMode argument.
4990
4991 <ul>
4992 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional
4993 cleanup will be performed. The call will fail if the machine is in "Saved" state
4994 or has any snapshots or any media attached (see <link to="IMediumAttachment" />.
4995 It is the responsibility of the caller to delete all such configuration in this mode.
4996 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API
4997 which it replaces.</li>
4998 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved"
4999 state or if it has snapshots or media attached. All media attached to the current machine
5000 state or in snapshots will be detached. No medium objects will be returned; all of the
5001 machine's media will remain open.</li>
5002 <li>With "DetachAllReturnHardDisksOnly", the call will behave like with "DetachAllReturnNone",
5003 except that all the hard disk medium objects which were detached from the machine will
5004 be returned as an array. This allows for quickly passing them to the <link to="#delete" />
5005 API for closing and deletion.</li>
5006 <li>With "Full", the call will behave like with "DetachAllReturnHardDisksOnly", except
5007 that all media will be returned in the array, including removeable media like DVDs and
5008 floppies. This might be useful if the user wants to inspect in detail which media were
5009 attached to the machine. Be careful when passing the media array to <link to="#delete" />
5010 in that case because users will typically want to preserve ISO and RAW image files.</li>
5011 </ul>
5012
5013 This API does not verify whether the media files returned in the array are still
5014 attached to other machines (i.e. shared between several machines). If such a shared
5015 image is passed to <link to="#delete" /> however, closing the image will fail there
5016 and the image will be silently skipped.
5017
5018 A typical implementation will use "DetachAllReturnHardDisksOnly" and then pass the
5019 resulting IMedia array to <link to="#delete"/>. This way, the machine is completely
5020 deleted with all its saved states and hard disk images, but images for removeable
5021 drives (such as ISO and RAW files) will remain on disk.
5022
5023 The call will fail if the machine is currently locked (see <link to="ISession" />).
5024 It implicitly calls <link to="#saveSettings"/> to save all current machine settings
5025 before unregistering it.
5026
5027 After successful method invocation, the <link to="IMachineRegisteredEvent"/> event
5028 is fired.
5029
5030 <note>
5031 If the given machine is inaccessible (see <link to="#accessible"/>), it
5032 will be unregistered and fully uninitialized right afterwards. As a result,
5033 the returned machine object will be unusable and an attempt to call
5034 <b>any</b> method will return the "Object not ready" error.
5035 </note>
5036
5037 <result name="VBOX_E_INVALID_OBJECT_STATE">
5038 Machine is currently locked for a session.
5039 </result>
5040 </desc>
5041
5042 <param name="cleanupMode" type="CleanupMode" dir="in">
5043 <desc>How to clean up after the machine has been unregistered.</desc>
5044 </param>
5045 <param name="aMedia" type="IMedium" safearray="yes" dir="return">
5046 <desc>List of media detached from the machine, depending on the @a cleanupMode parameter.</desc>
5047 </param>
5048 </method>
5049
5050 <method name="delete">
5051 <desc>
5052 Deletes the files associated with this machine from disk. If medium objects are passed
5053 in with the @a aMedia argument, they are closed and, if closing was succesful, their
5054 storage files are deleted as well. For convenience, this array of media files can be
5055 the same as the one returned from a previous <link to="#unregister" /> call.
5056
5057 This method must only be called on machines which are either write-locked (i.e. on instances
5058 returned by <link to="ISession::machine"/>) or on unregistered machines (i.e. not yet
5059 registered machines created by <link to="IVirtualBox::createMachine"/> or opened by
5060 <link to="IVirtualBox::openMachine"/>, or after having called <link to="#unregister"/>).
5061
5062 The following files will be deleted by this method:
5063 <ul>
5064 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode
5065 argument other than "UnregisterOnly", this will delete all saved state files that
5066 the machine had in use; possibly one if the machine was in "Saved" state and one
5067 for each online snapshot that the machine had.</li>
5068 <li>On each medium object passed in the @a aMedia array, this will call
5069 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the
5070 medium's storage on disk. Since the close() call will fail if the medium is still
5071 in use, e.g. because it is still attached to a second machine; in that case the
5072 storage will not be deleted.</li>
5073 <li>Finally, the machine's own XML file will be deleted.</li>
5074 </ul>
5075
5076 Since deleting large disk image files can be a time-consuming I/O operation, this
5077 method operates asynchronously and returns an IProgress object to allow the caller
5078 to monitor the progress. There will be one sub-operation for each file that is
5079 being deleted (saved state or medium storage file).
5080
5081 <note>
5082 <link to="#settingsModified"/> will return @c true after this
5083 method successfully returns.
5084 </note>
5085
5086 <result name="VBOX_E_INVALID_VM_STATE">
5087 Machine is registered but not write-locked.
5088 </result>
5089 <result name="VBOX_E_IPRT_ERROR">
5090 Could not delete the settings file.
5091 </result>
5092 </desc>
5093 <param name="aMedia" type="IMedium" safearray="yes" dir="in">
5094 <desc>List of media to be closed and whose storage files will be deleted.</desc>
5095 </param>
5096 <param name="aProgress" type="IProgress" dir="return">
5097 <desc>Progress object to track the operation completion.</desc>
5098 </param>
5099 </method>
5100
5101 <method name="export">
5102 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5103 steps required to export VirtualBox machines to OVF.
5104 </desc>
5105
5106 <param name="aAppliance" type="IAppliance" dir="in">
5107 <desc>Appliance to export this machine to.</desc>
5108 </param>
5109 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5110 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5111 </param>
5112 </method >
5113
5114 <method name="getSnapshot">
5115 <desc>
5116 Returns a snapshot of this machine with the given UUID.
5117 A @c null UUID can be used to obtain the first snapshot
5118 taken on this machine. This is useful if you want to traverse
5119 the whole tree of snapshots starting from the root.
5120
5121 <result name="VBOX_E_OBJECT_NOT_FOUND">
5122 Virtual machine has no snapshots or snapshot not found.
5123 </result>
5124
5125 </desc>
5126 <param name="id" type="uuid" mod="string" dir="in">
5127 <desc>UUID of the snapshot to get</desc>
5128 </param>
5129 <param name="snapshot" type="ISnapshot" dir="return">
5130 <desc>Snapshot object with the given UUID.</desc>
5131 </param>
5132 </method>
5133
5134 <method name="findSnapshot">
5135 <desc>
5136 Returns a snapshot of this machine with the given name.
5137
5138 <result name="VBOX_E_OBJECT_NOT_FOUND">
5139 Virtual machine has no snapshots or snapshot not found.
5140 </result>
5141
5142 </desc>
5143 <param name="name" type="wstring" dir="in">
5144 <desc>Name of the snapshot to find</desc>
5145 </param>
5146 <param name="snapshot" type="ISnapshot" dir="return">
5147 <desc>Snapshot object with the given name.</desc>
5148 </param>
5149 </method>
5150
5151 <method name="setCurrentSnapshot">
5152 <desc>
5153 Sets the current snapshot of this machine.
5154 <note>
5155 In the current implementation, this operation is not
5156 implemented.
5157 </note>
5158 </desc>
5159 <param name="id" type="uuid" mod="string" dir="in">
5160 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5161 </param>
5162 </method>
5163
5164 <method name="createSharedFolder">
5165 <desc>
5166 Creates a new permanent shared folder by associating the given logical
5167 name with the given host path, adds it to the collection of shared
5168 folders and starts sharing it. Refer to the description of
5169 <link to="ISharedFolder"/> to read more about logical names.
5170
5171 <result name="VBOX_E_OBJECT_IN_USE">
5172 Shared folder already exists.
5173 </result>
5174 <result name="VBOX_E_FILE_ERROR">
5175 Shared folder @a hostPath not accessible.
5176 </result>
5177
5178 </desc>
5179 <param name="name" type="wstring" dir="in">
5180 <desc>Unique logical name of the shared folder.</desc>
5181 </param>
5182 <param name="hostPath" type="wstring" dir="in">
5183 <desc>Full path to the shared folder in the host file system.</desc>
5184 </param>
5185 <param name="writable" type="boolean" dir="in">
5186 <desc>Whether the share is writable or readonly.</desc>
5187 </param>
5188 <param name="automount" type="boolean" dir="in">
5189 <desc>Whether the share gets automatically mounted by the guest
5190 or not.</desc>
5191 </param>
5192 </method>
5193
5194 <method name="removeSharedFolder">
5195 <desc>
5196 Removes the permanent shared folder with the given name previously
5197 created by <link to="#createSharedFolder"/> from the collection of
5198 shared folders and stops sharing it.
5199
5200 <result name="VBOX_E_INVALID_VM_STATE">
5201 Virtual machine is not mutable.
5202 </result>
5203 <result name="VBOX_E_OBJECT_NOT_FOUND">
5204 Shared folder @a name does not exist.
5205 </result>
5206
5207 </desc>
5208 <param name="name" type="wstring" dir="in">
5209 <desc>Logical name of the shared folder to remove.</desc>
5210 </param>
5211 </method>
5212
5213 <method name="canShowConsoleWindow">
5214 <desc>
5215 Returns @c true if the VM console process can activate the
5216 console window and bring it to foreground on the desktop of
5217 the host PC.
5218 <note>
5219 This method will fail if a session for this machine is not
5220 currently open.
5221 </note>
5222
5223 <result name="VBOX_E_INVALID_VM_STATE">
5224 Machine session is not open.
5225 </result>
5226
5227 </desc>
5228 <param name="canShow" type="boolean" dir="return">
5229 <desc>
5230 @c true if the console window can be shown and @c false otherwise.
5231 </desc>
5232 </param>
5233 </method>
5234
5235 <method name="showConsoleWindow">
5236 <desc>
5237 Activates the console window and brings it to foreground on
5238 the desktop of the host PC. Many modern window managers on
5239 many platforms implement some sort of focus stealing
5240 prevention logic, so that it may be impossible to activate
5241 a window without the help of the currently active
5242 application. In this case, this method will return a non-zero
5243 identifier that represents the top-level window of the VM
5244 console process. The caller, if it represents a currently
5245 active process, is responsible to use this identifier (in a
5246 platform-dependent manner) to perform actual window
5247 activation.
5248 <note>
5249 This method will fail if a session for this machine is not
5250 currently open.
5251 </note>
5252
5253 <result name="VBOX_E_INVALID_VM_STATE">
5254 Machine session is not open.
5255 </result>
5256
5257 </desc>
5258 <param name="winId" type="unsigned long long" dir="return">
5259 <desc>
5260 Platform-dependent identifier of the top-level VM console
5261 window, or zero if this method has performed all actions
5262 necessary to implement the <i>show window</i> semantics for
5263 the given platform and/or VirtualBox front-end.
5264 </desc>
5265 </param>
5266 </method>
5267
5268 <method name="getGuestProperty" const="yes">
5269 <desc>
5270 Reads an entry from the machine's guest property store.
5271
5272 <result name="VBOX_E_INVALID_VM_STATE">
5273 Machine session is not open.
5274 </result>
5275
5276 </desc>
5277 <param name="name" type="wstring" dir="in">
5278 <desc>
5279 The name of the property to read.
5280 </desc>
5281 </param>
5282 <param name="value" type="wstring" dir="out">
5283 <desc>
5284 The value of the property. If the property does not exist then this
5285 will be empty.
5286 </desc>
5287 </param>
5288 <param name="timestamp" type="unsigned long long" dir="out">
5289 <desc>
5290 The time at which the property was last modified, as seen by the
5291 server process.
5292 </desc>
5293 </param>
5294 <param name="flags" type="wstring" dir="out">
5295 <desc>
5296 Additional property parameters, passed as a comma-separated list of
5297 "name=value" type entries.
5298 </desc>
5299 </param>
5300 </method>
5301
5302 <method name="getGuestPropertyValue" const="yes">
5303 <desc>
5304 Reads a value from the machine's guest property store.
5305
5306 <result name="VBOX_E_INVALID_VM_STATE">
5307 Machine session is not open.
5308 </result>
5309
5310 </desc>
5311 <param name="property" type="wstring" dir="in">
5312 <desc>
5313 The name of the property to read.
5314 </desc>
5315 </param>
5316 <param name="value" type="wstring" dir="return">
5317 <desc>
5318 The value of the property. If the property does not exist then this
5319 will be empty.
5320 </desc>
5321 </param>
5322 </method>
5323
5324 <method name="getGuestPropertyTimestamp" const="yes">
5325 <desc>
5326 Reads a property timestamp from the machine's guest property store.
5327
5328 <result name="VBOX_E_INVALID_VM_STATE">
5329 Machine session is not open.
5330 </result>
5331
5332 </desc>
5333 <param name="property" type="wstring" dir="in">
5334 <desc>
5335 The name of the property to read.
5336 </desc>
5337 </param>
5338 <param name="value" type="unsigned long long" dir="return">
5339 <desc>
5340 The timestamp. If the property does not exist then this will be
5341 empty.
5342 </desc>
5343 </param>
5344 </method>
5345
5346 <method name="setGuestProperty">
5347 <desc>
5348 Sets, changes or deletes an entry in the machine's guest property
5349 store.
5350
5351 <result name="E_ACCESSDENIED">
5352 Property cannot be changed.
5353 </result>
5354 <result name="E_INVALIDARG">
5355 Invalid @a flags.
5356 </result>
5357 <result name="VBOX_E_INVALID_VM_STATE">
5358 Virtual machine is not mutable or session not open.
5359 </result>
5360 <result name="VBOX_E_INVALID_OBJECT_STATE">
5361 Cannot set transient property when machine not running.
5362 </result>
5363
5364 </desc>
5365 <param name="property" type="wstring" dir="in">
5366 <desc>
5367 The name of the property to set, change or delete.
5368 </desc>
5369 </param>
5370 <param name="value" type="wstring" dir="in">
5371 <desc>
5372 The new value of the property to set, change or delete. If the
5373 property does not yet exist and value is non-empty, it will be
5374 created. If the value is @c null or empty, the property will be
5375 deleted if it exists.
5376 </desc>
5377 </param>
5378 <param name="flags" type="wstring" dir="in">
5379 <desc>
5380 Additional property parameters, passed as a comma-separated list of
5381 "name=value" type entries.
5382 </desc>
5383 </param>
5384 </method>
5385
5386 <method name="setGuestPropertyValue">
5387 <desc>
5388 Sets, changes or deletes a value in the machine's guest property
5389 store. The flags field will be left unchanged or created empty for a
5390 new property.
5391
5392 <result name="E_ACCESSDENIED">
5393 Property cannot be changed.
5394 </result>
5395 <result name="VBOX_E_INVALID_VM_STATE">
5396 Virtual machine is not mutable or session not open.
5397 </result>
5398 <result name="VBOX_E_INVALID_OBJECT_STATE">
5399 Cannot set transient property when machine not running.
5400 </result>
5401 </desc>
5402
5403 <param name="property" type="wstring" dir="in">
5404 <desc>
5405 The name of the property to set, change or delete.
5406 </desc>
5407 </param>
5408 <param name="value" type="wstring" dir="in">
5409 <desc>
5410 The new value of the property to set, change or delete. If the
5411 property does not yet exist and value is non-empty, it will be
5412 created. If the value is @c null or empty, the property will be
5413 deleted if it exists.
5414 </desc>
5415 </param>
5416 </method>
5417
5418 <method name="enumerateGuestProperties">
5419 <desc>
5420 Return a list of the guest properties matching a set of patterns along
5421 with their values, time stamps and flags.
5422 </desc>
5423 <param name="patterns" type="wstring" dir="in">
5424 <desc>
5425 The patterns to match the properties against, separated by '|'
5426 characters. If this is empty or @c null, all properties will match.
5427 </desc>
5428 </param>
5429 <param name="name" type="wstring" dir="out" safearray="yes">
5430 <desc>
5431 The names of the properties returned.
5432 </desc>
5433 </param>
5434 <param name="value" type="wstring" dir="out" safearray="yes">
5435 <desc>
5436 The values of the properties returned. The array entries match the
5437 corresponding entries in the @a name array.
5438 </desc>
5439 </param>
5440 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5441 <desc>
5442 The time stamps of the properties returned. The array entries match
5443 the corresponding entries in the @a name array.
5444 </desc>
5445 </param>
5446 <param name="flags" type="wstring" dir="out" safearray="yes">
5447 <desc>
5448 The flags of the properties returned. The array entries match the
5449 corresponding entries in the @a name array.
5450 </desc>
5451 </param>
5452 </method>
5453
5454 <method name="querySavedThumbnailSize">
5455 <desc>
5456 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5457 </desc>
5458 <param name="screenId" type="unsigned long" dir="in">
5459 <desc>
5460 Saved guest screen to query info from.
5461 </desc>
5462 </param>
5463 <param name="size" type="unsigned long" dir="out">
5464 <desc>
5465 Size of buffer required to store the bitmap.
5466 </desc>
5467 </param>
5468 <param name="width" type="unsigned long" dir="out">
5469 <desc>
5470 Bitmap width.
5471 </desc>
5472 </param>
5473 <param name="height" type="unsigned long" dir="out">
5474 <desc>
5475 Bitmap height.
5476 </desc>
5477 </param>
5478 </method>
5479
5480 <method name="readSavedThumbnailToArray">
5481 <desc>
5482 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5483 </desc>
5484 <param name="screenId" type="unsigned long" dir="in">
5485 <desc>
5486 Saved guest screen to read from.
5487 </desc>
5488 </param>
5489 <param name="BGR" type="boolean" dir="in">
5490 <desc>
5491 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5492 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5493 </desc>
5494 </param>
5495 <param name="width" type="unsigned long" dir="out">
5496 <desc>
5497 Bitmap width.
5498 </desc>
5499 </param>
5500 <param name="height" type="unsigned long" dir="out">
5501 <desc>
5502 Bitmap height.
5503 </desc>
5504 </param>
5505 <param name="data" type="octet" dir="return" safearray="yes">
5506 <desc>
5507 Array with resulting bitmap data.
5508 </desc>
5509 </param>
5510 </method>
5511
5512 <method name="querySavedScreenshotPNGSize">
5513 <desc>
5514 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5515 </desc>
5516 <param name="screenId" type="unsigned long" dir="in">
5517 <desc>
5518 Saved guest screen to query info from.
5519 </desc>
5520 </param>
5521 <param name="size" type="unsigned long" dir="out">
5522 <desc>
5523 Size of buffer required to store the PNG binary data.
5524 </desc>
5525 </param>
5526 <param name="width" type="unsigned long" dir="out">
5527 <desc>
5528 Image width.
5529 </desc>
5530 </param>
5531 <param name="height" type="unsigned long" dir="out">
5532 <desc>
5533 Image height.
5534 </desc>
5535 </param>
5536 </method>
5537
5538 <method name="readSavedScreenshotPNGToArray">
5539 <desc>
5540 Screenshot in PNG format is retrieved to an array of bytes.
5541 </desc>
5542 <param name="screenId" type="unsigned long" dir="in">
5543 <desc>
5544 Saved guest screen to read from.
5545 </desc>
5546 </param>
5547 <param name="width" type="unsigned long" dir="out">
5548 <desc>
5549 Image width.
5550 </desc>
5551 </param>
5552 <param name="height" type="unsigned long" dir="out">
5553 <desc>
5554 Image height.
5555 </desc>
5556 </param>
5557 <param name="data" type="octet" dir="return" safearray="yes">
5558 <desc>
5559 Array with resulting PNG data.
5560 </desc>
5561 </param>
5562 </method>
5563
5564 <method name="hotPlugCPU">
5565 <desc>
5566 Plugs a CPU into the machine.
5567 </desc>
5568 <param name="cpu" type="unsigned long" dir="in">
5569 <desc>
5570 The CPU id to insert.
5571 </desc>
5572 </param>
5573 </method>
5574
5575 <method name="hotUnplugCPU">
5576 <desc>
5577 Removes a CPU from the machine.
5578 </desc>
5579 <param name="cpu" type="unsigned long" dir="in">
5580 <desc>
5581 The CPU id to remove.
5582 </desc>
5583 </param>
5584 </method>
5585
5586 <method name="getCPUStatus">
5587 <desc>
5588 Returns the current status of the given CPU.
5589 </desc>
5590 <param name="cpu" type="unsigned long" dir="in">
5591 <desc>
5592 The CPU id to check for.
5593 </desc>
5594 </param>
5595 <param name="attached" type="boolean" dir="return">
5596 <desc>
5597 Status of the CPU.
5598 </desc>
5599 </param>
5600 </method>
5601
5602 <method name="queryLogFilename">
5603 <desc>
5604 Queries for the VM log file name of an given index. Returns an empty
5605 string if a log file with that index doesn't exists.
5606 </desc>
5607 <param name="idx" type="unsigned long" dir="in">
5608 <desc>
5609 Which log file name to query. 0=current log file.
5610 </desc>
5611 </param>
5612 <param name="filename" type="wstring" dir="return">
5613 <desc>
5614 On return the full path to the log file or an empty string on error.
5615 </desc>
5616 </param>
5617 </method>
5618
5619 <method name="readLog">
5620 <desc>
5621 Reads the VM log file. The chunk size is limited, so even if you
5622 ask for a big piece there might be less data returned.
5623 </desc>
5624 <param name="idx" type="unsigned long" dir="in">
5625 <desc>
5626 Which log file to read. 0=current log file.
5627 </desc>
5628 </param>
5629 <param name="offset" type="unsigned long long" dir="in">
5630 <desc>
5631 Offset in the log file.
5632 </desc>
5633 </param>
5634 <param name="size" type="unsigned long long" dir="in">
5635 <desc>
5636 Chunk size to read in the log file.
5637 </desc>
5638 </param>
5639 <param name="data" type="octet" dir="return" safearray="yes">
5640 <desc>
5641 Data read from the log file. A data size of 0 means end of file
5642 if the requested chunk size was not 0. This is the unprocessed
5643 file data, i.e. the line ending style depends on the platform of
5644 the system the server is running on.
5645 </desc>
5646 </param>
5647 </method>
5648 </interface>
5649
5650 <!--
5651 // IConsole
5652 /////////////////////////////////////////////////////////////////////////
5653 -->
5654
5655 <interface
5656 name="IRemoteDisplayInfo" extends="$unknown"
5657 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5658 wsmap="struct"
5659 >
5660 <desc>
5661 Contains information about the remote display (VRDP) capabilities and status.
5662 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5663 </desc>
5664
5665 <attribute name="active" type="boolean" readonly="yes">
5666 <desc>
5667 Whether the remote display connection is active.
5668 </desc>
5669 </attribute>
5670
5671 <attribute name="port" type="long" readonly="yes">
5672 <desc>
5673 VRDP server port number. If this property is equal to <tt>0</tt>, then
5674 the VRDP server failed to start, usually because there are no free TCP
5675 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5676 server has not yet been started.
5677 </desc>
5678 </attribute>
5679
5680 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5681 <desc>
5682 How many times a client connected.
5683 </desc>
5684 </attribute>
5685
5686 <attribute name="beginTime" type="long long" readonly="yes">
5687 <desc>
5688 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5689 </desc>
5690 </attribute>
5691
5692 <attribute name="endTime" type="long long" readonly="yes">
5693 <desc>
5694 When the last connection was terminated or the current time, if
5695 connection is still active, in milliseconds since 1970-01-01 UTC.
5696 </desc>
5697 </attribute>
5698
5699 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5700 <desc>
5701 How many bytes were sent in last or current, if still active, connection.
5702 </desc>
5703 </attribute>
5704
5705 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5706 <desc>
5707 How many bytes were sent in all connections.
5708 </desc>
5709 </attribute>
5710
5711 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5712 <desc>
5713 How many bytes were received in last or current, if still active, connection.
5714 </desc>
5715 </attribute>
5716
5717 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5718 <desc>
5719 How many bytes were received in all connections.
5720 </desc>
5721 </attribute>
5722
5723 <attribute name="user" type="wstring" readonly="yes">
5724 <desc>
5725 Login user name supplied by the client.
5726 </desc>
5727 </attribute>
5728
5729 <attribute name="domain" type="wstring" readonly="yes">
5730 <desc>
5731 Login domain name supplied by the client.
5732 </desc>
5733 </attribute>
5734
5735 <attribute name="clientName" type="wstring" readonly="yes">
5736 <desc>
5737 The client name supplied by the client.
5738 </desc>
5739 </attribute>
5740
5741 <attribute name="clientIP" type="wstring" readonly="yes">
5742 <desc>
5743 The IP address of the client.
5744 </desc>
5745 </attribute>
5746
5747 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5748 <desc>
5749 The client software version number.
5750 </desc>
5751 </attribute>
5752
5753 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5754 <desc>
5755 Public key exchange method used when connection was established.
5756 Values: 0 - RDP4 public key exchange scheme.
5757 1 - X509 certificates were sent to client.
5758 </desc>
5759 </attribute>
5760
5761 </interface>
5762
5763 <interface
5764 name="IConsole" extends="$unknown"
5765 uuid="03cb7897-ea17-4e6c-81ae-4bd90be2fde2"
5766 wsmap="managed"
5767 >
5768 <desc>
5769 The IConsole interface represents an interface to control virtual
5770 machine execution.
5771
5772 A console object gets created when a machine has been locked for a
5773 particular session (client process) using <link to="IMachine::lockMachine" />
5774 or <link to="IMachine::launchVMProcess"/>. The console object can
5775 then be found in the session's <link to="ISession::console" /> attribute.
5776
5777 Methods of the IConsole interface allow the caller to query the current
5778 virtual machine execution state, pause the machine or power it down, save
5779 the machine state or take a snapshot, attach and detach removable media
5780 and so on.
5781
5782 <see>ISession</see>
5783 </desc>
5784
5785 <attribute name="machine" type="IMachine" readonly="yes">
5786 <desc>
5787 Machine object this console is sessioned with.
5788 <note>
5789 This is a convenience property, it has the same value as
5790 <link to="ISession::machine"/> of the corresponding session
5791 object.
5792 </note>
5793 </desc>
5794 </attribute>
5795
5796 <attribute name="state" type="MachineState" readonly="yes">
5797 <desc>
5798 Current execution state of the machine.
5799 <note>
5800 This property always returns the same value as the corresponding
5801 property of the IMachine object this console is sessioned with.
5802 For the process that owns (executes) the VM, this is the
5803 preferable way of querying the VM state, because no IPC
5804 calls are made.
5805 </note>
5806 </desc>
5807 </attribute>
5808
5809 <attribute name="guest" type="IGuest" readonly="yes">
5810 <desc>Guest object.</desc>
5811 </attribute>
5812
5813 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5814 <desc>
5815 Virtual keyboard object.
5816 <note>
5817 If the machine is not running, any attempt to use
5818 the returned object will result in an error.
5819 </note>
5820 </desc>
5821 </attribute>
5822
5823 <attribute name="mouse" type="IMouse" readonly="yes">
5824 <desc>
5825 Virtual mouse object.
5826 <note>
5827 If the machine is not running, any attempt to use
5828 the returned object will result in an error.
5829 </note>
5830 </desc>
5831 </attribute>
5832
5833 <attribute name="display" type="IDisplay" readonly="yes">
5834 <desc>Virtual display object.
5835 <note>
5836 If the machine is not running, any attempt to use
5837 the returned object will result in an error.
5838 </note>
5839 </desc>
5840 </attribute>
5841
5842 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5843 <desc>Debugging interface.</desc>
5844 </attribute>
5845
5846 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5847 <desc>
5848 Collection of USB devices currently attached to the virtual
5849 USB controller.
5850 <note>
5851 The collection is empty if the machine is not running.
5852 </note>
5853 </desc>
5854 </attribute>
5855
5856 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5857 <desc>
5858 List of USB devices currently attached to the remote VRDP client.
5859 Once a new device is physically attached to the remote host computer,
5860 it appears in this list and remains there until detached.
5861 </desc>
5862 </attribute>
5863
5864 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5865 <desc>
5866 Collection of shared folders for the current session. These folders
5867 are called transient shared folders because they are available to the
5868 guest OS running inside the associated virtual machine only for the
5869 duration of the session (as opposed to
5870 <link to="IMachine::sharedFolders"/> which represent permanent shared
5871 folders). When the session is closed (e.g. the machine is powered down),
5872 these folders are automatically discarded.
5873
5874 New shared folders are added to the collection using
5875 <link to="#createSharedFolder"/>. Existing shared folders can be
5876 removed using <link to="#removeSharedFolder"/>.
5877 </desc>
5878 </attribute>
5879
5880 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5881 <desc>
5882 Interface that provides information on Remote Display (VRDP) connection.
5883 </desc>
5884 </attribute>
5885
5886 <attribute name="eventSource" type="IEventSource" readonly="yes">
5887 <desc>
5888 Event source for console events.
5889 </desc>
5890 </attribute>
5891
5892 <method name="powerUp">
5893 <desc>
5894 Starts the virtual machine execution using the current machine
5895 state (that is, its current execution state, current settings and
5896 current storage devices).
5897
5898 <note>
5899 This method is only useful for front-ends that want to actually
5900 execute virtual machines in their own process (like the VirtualBox
5901 or VBoxSDL front-ends). Unless you are intending to write such a
5902 front-end, do not call this method. If you simply want to
5903 start virtual machine execution using one of the existing front-ends
5904 (for example the VirtualBox GUI or headless server), use
5905 <link to="IMachine::launchVMProcess"/> instead; these
5906 front-ends will power up the machine automatically for you.
5907 </note>
5908
5909 If the machine is powered off or aborted, the execution will
5910 start from the beginning (as if the real hardware were just
5911 powered on).
5912
5913 If the machine is in the <link to="MachineState_Saved"/> state,
5914 it will continue its execution the point where the state has
5915 been saved.
5916
5917 If the machine <link to="IMachine::teleporterEnabled"/> property is
5918 enabled on the machine being powered up, the machine will wait for an
5919 incoming teleportation in the <link to="MachineState_TeleportingIn"/>
5920 state. The returned progress object will have at least three
5921 operations where the last three are defined as: (1) powering up and
5922 starting TCP server, (2) waiting for incoming teleportations, and
5923 (3) perform teleportation. These operations will be reflected as the
5924 last three operations of the progress objected returned by
5925 <link to="IMachine::launchVMProcess"/> as well.
5926
5927 <see>#saveState</see>
5928
5929 <result name="VBOX_E_INVALID_VM_STATE">
5930 Virtual machine already running.
5931 </result>
5932 <result name="VBOX_E_HOST_ERROR">
5933 Host interface does not exist or name not set.
5934 </result>
5935 <result name="VBOX_E_FILE_ERROR">
5936 Invalid saved state file.
5937 </result>
5938 </desc>
5939 <param name="progress" type="IProgress" dir="return">
5940 <desc>Progress object to track the operation completion.</desc>
5941 </param>
5942 </method>
5943
5944 <method name="powerUpPaused">
5945 <desc>
5946 Identical to powerUp except that the VM will enter the
5947 <link to="MachineState_Paused"/> state, instead of
5948 <link to="MachineState_Running"/>.
5949
5950 <see>#powerUp</see>
5951 <result name="VBOX_E_INVALID_VM_STATE">
5952 Virtual machine already running.
5953 </result>
5954 <result name="VBOX_E_HOST_ERROR">
5955 Host interface does not exist or name not set.
5956 </result>
5957 <result name="VBOX_E_FILE_ERROR">
5958 Invalid saved state file.
5959 </result>
5960 </desc>
5961 <param name="progress" type="IProgress" dir="return">
5962 <desc>Progress object to track the operation completion.</desc>
5963 </param>
5964 </method>
5965
5966 <method name="powerDown">
5967 <desc>
5968 Initiates the power down procedure to stop the virtual machine
5969 execution.
5970
5971 The completion of the power down procedure is tracked using the returned
5972 IProgress object. After the operation is complete, the machine will go
5973 to the PoweredOff state.
5974 <result name="VBOX_E_INVALID_VM_STATE">
5975 Virtual machine must be Running, Paused or Stuck to be powered down.
5976 </result>
5977 </desc>
5978 <param name="progress" type="IProgress" dir="return">
5979 <desc>Progress object to track the operation completion.</desc>
5980 </param>
5981 </method>
5982
5983 <method name="reset">
5984 <desc>Resets the virtual machine.
5985 <result name="VBOX_E_INVALID_VM_STATE">
5986 Virtual machine not in Running state.
5987 </result>
5988 <result name="VBOX_E_VM_ERROR">
5989 Virtual machine error in reset operation.
5990 </result>
5991 </desc>
5992 </method>
5993
5994 <method name="pause">
5995 <desc>Pauses the virtual machine execution.
5996 <result name="VBOX_E_INVALID_VM_STATE">
5997 Virtual machine not in Running state.
5998 </result>
5999 <result name="VBOX_E_VM_ERROR">
6000 Virtual machine error in suspend operation.
6001 </result>
6002 </desc>
6003 </method>
6004
6005 <method name="resume">
6006 <desc>Resumes the virtual machine execution.
6007 <result name="VBOX_E_INVALID_VM_STATE">
6008 Virtual machine not in Paused state.
6009 </result>
6010 <result name="VBOX_E_VM_ERROR">
6011 Virtual machine error in resume operation.
6012 </result>
6013 </desc>
6014 </method>
6015
6016 <method name="powerButton">
6017 <desc>Sends the ACPI power button event to the guest.
6018 <result name="VBOX_E_INVALID_VM_STATE">
6019 Virtual machine not in Running state.
6020 </result>
6021 <result name="VBOX_E_PDM_ERROR">
6022 Controlled power off failed.
6023 </result>
6024 </desc>
6025 </method>
6026
6027 <method name="sleepButton">
6028 <desc>Sends the ACPI sleep button event to the guest.
6029 <result name="VBOX_E_INVALID_VM_STATE">
6030 Virtual machine not in Running state.
6031 </result>
6032 <result name="VBOX_E_PDM_ERROR">
6033 Sending sleep button event failed.
6034 </result>
6035 </desc>
6036 </method>
6037
6038 <method name="getPowerButtonHandled">
6039 <desc>Checks if the last power button event was handled by guest.
6040 <result name="VBOX_E_PDM_ERROR">
6041 Checking if the event was handled by the guest OS failed.
6042 </result>
6043 </desc>
6044 <param name="handled" type="boolean" dir="return"/>
6045 </method>
6046
6047 <method name="getGuestEnteredACPIMode">
6048 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6049 G1 (sleeping). If this method returns @c false, the guest will
6050 most likely not respond to external ACPI events.
6051 <result name="VBOX_E_INVALID_VM_STATE">
6052 Virtual machine not in Running state.
6053 </result>
6054 </desc>
6055 <param name="entered" type="boolean" dir="return"/>
6056 </method>
6057
6058 <method name="saveState">
6059 <desc>
6060 Saves the current execution state of a running virtual machine
6061 and stops its execution.
6062
6063 After this operation completes, the machine will go to the
6064 Saved state. Next time it is powered up, this state will
6065 be restored and the machine will continue its execution from
6066 the place where it was saved.
6067
6068 This operation differs from taking a snapshot to the effect
6069 that it doesn't create new differencing media. Also, once
6070 the machine is powered up from the state saved using this method,
6071 the saved state is deleted, so it will be impossible to return
6072 to this state later.
6073
6074 <note>
6075 On success, this method implicitly calls
6076 <link to="IMachine::saveSettings"/> to save all current machine
6077 settings (including runtime changes to the DVD medium, etc.).
6078 Together with the impossibility to change any VM settings when it is
6079 in the Saved state, this guarantees adequate hardware
6080 configuration of the machine when it is restored from the saved
6081 state file.
6082 </note>
6083
6084 <note>
6085 The machine must be in the Running or Paused state, otherwise
6086 the operation will fail.
6087 </note>
6088 <result name="VBOX_E_INVALID_VM_STATE">
6089 Virtual machine state neither Running nor Paused.
6090 </result>
6091 <result name="VBOX_E_FILE_ERROR">
6092 Failed to create directory for saved state file.
6093 </result>
6094
6095 <see><link to="#takeSnapshot"/></see>
6096 </desc>
6097 <param name="progress" type="IProgress" dir="return">
6098 <desc>Progress object to track the operation completion.</desc>
6099 </param>
6100 </method>
6101
6102 <method name="adoptSavedState">
6103 <desc>
6104 Associates the given saved state file to the virtual machine.
6105
6106 On success, the machine will go to the Saved state. Next time it is
6107 powered up, it will be restored from the adopted saved state and
6108 continue execution from the place where the saved state file was
6109 created.
6110
6111 The specified saved state file path may be absolute or relative to the
6112 folder the VM normally saves the state to (usually,
6113 <link to="IMachine::snapshotFolder"/>).
6114
6115 <note>
6116 It's a caller's responsibility to make sure the given saved state
6117 file is compatible with the settings of this virtual machine that
6118 represent its virtual hardware (memory size, storage disk configuration
6119 etc.). If there is a mismatch, the behavior of the virtual machine
6120 is undefined.
6121 </note>
6122 <result name="VBOX_E_INVALID_VM_STATE">
6123 Virtual machine state neither PoweredOff nor Aborted.
6124 </result>
6125 </desc>
6126 <param name="savedStateFile" type="wstring" dir="in">
6127 <desc>Path to the saved state file to adopt.</desc>
6128 </param>
6129 </method>
6130
6131 <method name="discardSavedState">
6132 <desc>
6133 Forcibly resets the machine to "Powered Off" state if it is
6134 currently in the "Saved" state (previously created by <link to="#saveState"/>).
6135 Next time the machine is powered up, a clean boot will occur.
6136 <note>
6137 This operation is equivalent to resetting or powering off
6138 the machine without doing a proper shutdown of the guest
6139 operating system; as with resetting a running phyiscal
6140 computer, it can can lead to data loss.
6141 </note>
6142 If @a fRemoveFile is @c true, the file in the machine directory
6143 into which the machine state was saved is also deleted. If
6144 this is @c false, then the state can be recovered and later
6145 re-inserted into a machine using <link to="#adoptSavedState" />.
6146 The location of the file can be found in the
6147 <link to="IMachine::stateFilePath" /> attribute.
6148 <result name="VBOX_E_INVALID_VM_STATE">
6149 Virtual machine not in state Saved.
6150 </result>
6151 </desc>
6152 <param name="fRemoveFile" type="boolean" dir="in" >
6153 <desc>Whether to also remove the saved state file.</desc>
6154 </param>
6155 </method>
6156
6157 <method name="getDeviceActivity">
6158 <desc>
6159 Gets the current activity type of a given device or device group.
6160 <result name="E_INVALIDARG">
6161 Invalid device type.
6162 </result>
6163 </desc>
6164 <param name="type" type="DeviceType" dir="in"/>
6165 <param name="activity" type="DeviceActivity" dir="return"/>
6166 </method>
6167
6168 <method name="attachUSBDevice">
6169 <desc>
6170 Attaches a host USB device with the given UUID to the
6171 USB controller of the virtual machine.
6172
6173 The device needs to be in one of the following states:
6174 <link to="USBDeviceState_Busy"/>,
6175 <link to="USBDeviceState_Available"/> or
6176 <link to="USBDeviceState_Held"/>,
6177 otherwise an error is immediately returned.
6178
6179 When the device state is
6180 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6181 be returned if the host computer refuses to release it for some reason.
6182
6183 <see>IUSBController::deviceFilters, USBDeviceState</see>
6184 <result name="VBOX_E_INVALID_VM_STATE">
6185 Virtual machine state neither Running nor Paused.
6186 </result>
6187 <result name="VBOX_E_PDM_ERROR">
6188 Virtual machine does not have a USB controller.
6189 </result>
6190 </desc>
6191 <param name="id" type="uuid" mod="string" dir="in">
6192 <desc>UUID of the host USB device to attach.</desc>
6193 </param>
6194 </method>
6195
6196 <method name="detachUSBDevice">
6197 <desc>
6198 Detaches an USB device with the given UUID from the USB controller
6199 of the virtual machine.
6200
6201 After this method succeeds, the VirtualBox server re-initiates
6202 all USB filters as if the device were just physically attached
6203 to the host, but filters of this machine are ignored to avoid
6204 a possible automatic re-attachment.
6205
6206 <see>IUSBController::deviceFilters, USBDeviceState</see>
6207
6208 <result name="VBOX_E_PDM_ERROR">
6209 Virtual machine does not have a USB controller.
6210 </result>
6211 <result name="E_INVALIDARG">
6212 USB device not attached to this virtual machine.
6213 </result>
6214 </desc>
6215 <param name="id" type="uuid" mod="string" dir="in">
6216 <desc>UUID of the USB device to detach.</desc>
6217 </param>
6218 <param name="device" type="IUSBDevice" dir="return">
6219 <desc>Detached USB device.</desc>
6220 </param>
6221 </method>
6222
6223 <method name="findUSBDeviceByAddress">
6224 <desc>
6225 Searches for a USB device with the given host address.
6226
6227 <result name="VBOX_E_OBJECT_NOT_FOUND">
6228 Given @c name does not correspond to any USB device.
6229 </result>
6230
6231 <see>IUSBDevice::address</see>
6232 </desc>
6233 <param name="name" type="wstring" dir="in">
6234 <desc>
6235 Address of the USB device (as assigned by the host) to
6236 search for.
6237 </desc>
6238 </param>
6239 <param name="device" type="IUSBDevice" dir="return">
6240 <desc>Found USB device object.</desc>
6241 </param>
6242 </method>
6243
6244 <method name="findUSBDeviceById">
6245 <desc>
6246 Searches for a USB device with the given UUID.
6247
6248 <result name="VBOX_E_OBJECT_NOT_FOUND">
6249 Given @c id does not correspond to any USB device.
6250 </result>
6251
6252 <see>IUSBDevice::id</see>
6253 </desc>
6254 <param name="id" type="uuid" mod="string" dir="in">
6255 <desc>UUID of the USB device to search for.</desc>
6256 </param>
6257 <param name="device" type="IUSBDevice" dir="return">
6258 <desc>Found USB device object.</desc>
6259 </param>
6260 </method>
6261
6262 <method name="createSharedFolder">
6263 <desc>
6264 Creates a transient new shared folder by associating the given logical
6265 name with the given host path, adds it to the collection of shared
6266 folders and starts sharing it. Refer to the description of
6267 <link to="ISharedFolder"/> to read more about logical names.
6268
6269 <result name="VBOX_E_INVALID_VM_STATE">
6270 Virtual machine in Saved state or currently changing state.
6271 </result>
6272 <result name="VBOX_E_FILE_ERROR">
6273 Shared folder already exists or not accessible.
6274 </result>
6275 </desc>
6276 <param name="name" type="wstring" dir="in">
6277 <desc>Unique logical name of the shared folder.</desc>
6278 </param>
6279 <param name="hostPath" type="wstring" dir="in">
6280 <desc>Full path to the shared folder in the host file system.</desc>
6281 </param>
6282 <param name="writable" type="boolean" dir="in">
6283 <desc>Whether the share is writable or readonly</desc>
6284 </param>
6285 <param name="automount" type="boolean" dir="in">
6286 <desc>Whether the share gets automatically mounted by the guest
6287 or not.</desc>
6288 </param>
6289 </method>
6290
6291 <method name="removeSharedFolder">
6292 <desc>
6293 Removes a transient shared folder with the given name previously
6294 created by <link to="#createSharedFolder"/> from the collection of
6295 shared folders and stops sharing it.
6296 <result name="VBOX_E_INVALID_VM_STATE">
6297 Virtual machine in Saved state or currently changing state.
6298 </result>
6299 <result name="VBOX_E_FILE_ERROR">
6300 Shared folder does not exists.
6301 </result>
6302 </desc>
6303 <param name="name" type="wstring" dir="in">
6304 <desc>Logical name of the shared folder to remove.</desc>
6305 </param>
6306 </method>
6307
6308 <method name="takeSnapshot">
6309 <desc>
6310 Saves the current execution state
6311 and all settings of the machine and creates differencing images
6312 for all normal (non-independent) media.
6313 See <link to="ISnapshot" /> for an introduction to snapshots.
6314
6315 This method can be called for a PoweredOff, Saved (see
6316 <link to="#saveState"/>), Running or
6317 Paused virtual machine. When the machine is PoweredOff, an
6318 offline snapshot is created. When the machine is Running a live
6319 snapshot is created, and an online snapshot is is created when Paused.
6320
6321 The taken snapshot is always based on the
6322 <link to="IMachine::currentSnapshot">current snapshot</link>
6323 of the associated virtual machine and becomes a new current snapshot.
6324
6325 <note>
6326 This method implicitly calls <link to="IMachine::saveSettings"/> to
6327 save all current machine settings before taking an offline snapshot.
6328 </note>
6329
6330 <result name="VBOX_E_INVALID_VM_STATE">
6331 Virtual machine currently changing state.
6332 </result>
6333 </desc>
6334 <param name="name" type="wstring" dir="in">
6335 <desc>Short name for the snapshot.</desc>
6336 </param>
6337 <param name="description" type="wstring" dir="in">
6338 <desc>Optional description of the snapshot.</desc>
6339 </param>
6340 <param name="progress" type="IProgress" dir="return">
6341 <desc>Progress object to track the operation completion.</desc>
6342 </param>
6343 </method>
6344
6345 <method name="deleteSnapshot">
6346 <desc>
6347 Starts deleting the specified snapshot asynchronously.
6348 See <link to="ISnapshot" /> for an introduction to snapshots.
6349
6350 The execution state and settings of the associated machine stored in
6351 the snapshot will be deleted. The contents of all differencing media of
6352 this snapshot will be merged with the contents of their dependent child
6353 media to keep the medium chain valid (in other words, all changes
6354 represented by media being deleted will be propagated to their child
6355 medium). After that, this snapshot's differencing medium will be
6356 deleted. The parent of this snapshot will become a new parent for all
6357 its child snapshots.
6358
6359 If the deleted snapshot is the current one, its parent snapshot will
6360 become a new current snapshot. The current machine state is not directly
6361 affected in this case, except that currently attached differencing
6362 media based on media of the deleted snapshot will be also merged as
6363 described above.
6364
6365 If the deleted snapshot is the first or current snapshot, then the
6366 respective IMachine attributes will be adjusted. Deleting the current
6367 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6368 to make all current machine settings permanent.
6369
6370 Deleting a snapshot has the following preconditions:
6371
6372 <ul>
6373 <li>Child media of all normal media of the deleted snapshot
6374 must be accessible (see <link to="IMedium::state"/>) for this
6375 operation to succeed. In particular, this means that all virtual
6376 machines, whose media are directly or indirectly based on the
6377 media of deleted snapshot, must be powered off.</li>
6378
6379 <li>You cannot delete the snapshot if a medium attached to it has
6380 more than once child medium (differencing images) because otherwise
6381 merging would be impossible. This might be the case if there is
6382 more than one child snapshot or differencing images were created
6383 for other reason (e.g. implicitly because of multiple machine
6384 attachments).</li>
6385 </ul>
6386
6387
6388 The virtual machine's <link to="IMachine::state">state</link> is
6389 changed to "DeletingSnapshot", "DeletingSnapshotOnline" or
6390 "DeletingSnapshotPaused" while this operation is in progress.
6391
6392 <note>
6393 Merging medium contents can be very time and disk space
6394 consuming, if these media are big in size and have many
6395 children. However, if the snapshot being deleted is the last
6396 (head) snapshot on the branch, the operation will be rather
6397 quick.
6398 </note>
6399 <result name="VBOX_E_INVALID_VM_STATE">
6400 The running virtual machine prevents deleting this snapshot. This
6401 happens only in very specific situations, usually snapshots can be
6402 deleted without trouble while a VM is running. The error message
6403 text explains the reason for the failure.
6404 </result>
6405 </desc>
6406 <param name="id" type="uuid" mod="string" dir="in">
6407 <desc>UUID of the snapshot to delete.</desc>
6408 </param>
6409 <param name="progress" type="IProgress" dir="return">
6410 <desc>Progress object to track the operation completion.</desc>
6411 </param>
6412 </method>
6413
6414 <method name="restoreSnapshot">
6415 <desc>
6416 Starts resetting the machine's current state to the state contained
6417 in the given snapshot, asynchronously. All current settings of the
6418 machine will be reset and changes stored in differencing media
6419 will be lost.
6420 See <link to="ISnapshot" /> for an introduction to snapshots.
6421
6422 After this operation is successfully completed, new empty differencing
6423 media are created for all normal media of the machine.
6424
6425 If the given snapshot is an online snapshot, the machine will go to
6426 the <link to="MachineState_Saved"> saved state</link>, so that the
6427 next time it is powered on, the execution state will be restored
6428 from the state of the snapshot.
6429
6430 <note>
6431 The machine must not be running, otherwise the operation will fail.
6432 </note>
6433
6434 <note>
6435 If the machine state is <link to="MachineState_Saved">Saved</link>
6436 prior to this operation, the saved state file will be implicitly
6437 deleted (as if <link to="IConsole::discardSavedState"/> were
6438 called).
6439 </note>
6440
6441 <result name="VBOX_E_INVALID_VM_STATE">
6442 Virtual machine is running.
6443 </result>
6444 </desc>
6445 <param name="snapshot" type="ISnapshot" dir="in">
6446 <desc>The snapshot to restore the VM state from.</desc>
6447 </param>
6448 <param name="progress" type="IProgress" dir="return">
6449 <desc>Progress object to track the operation completion.</desc>
6450 </param>
6451 </method>
6452
6453 <method name="teleport">
6454 <desc>
6455 Teleport the VM to a different host machine or process.
6456
6457 TODO explain the details.
6458
6459 <result name="VBOX_E_INVALID_VM_STATE">
6460 Virtual machine not running or paused.
6461 </result>
6462 </desc>
6463 <param name="hostname" type="wstring" dir="in">
6464 <desc>The name or IP of the host to teleport to.</desc>
6465 </param>
6466 <param name="tcpport" type="unsigned long" dir="in">
6467 <desc>The TCP port to connect to (1..65535).</desc>
6468 </param>
6469 <param name="password" type="wstring" dir="in">
6470 <desc>The password.</desc>
6471 </param>
6472 <param name="maxDowntime" type="unsigned long" dir="in">
6473 <desc>
6474 The maximum allowed downtime given as milliseconds. 0 is not a valid
6475 value. Recommended value: 250 ms.
6476
6477 The higher the value is, the greater the chance for a successful
6478 teleportation. A small value may easily result in the teleportation
6479 process taking hours and eventually fail.
6480
6481 <note>
6482 The current implementation treats this a guideline, not as an
6483 absolute rule.
6484 </note>
6485 </desc>
6486 </param>
6487 <param name="progress" type="IProgress" dir="return">
6488 <desc>Progress object to track the operation completion.</desc>
6489 </param>
6490 </method>
6491
6492 </interface>
6493
6494 <!--
6495 // IHost
6496 /////////////////////////////////////////////////////////////////////////
6497 -->
6498
6499 <enum
6500 name="HostNetworkInterfaceMediumType"
6501 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6502 >
6503 <desc>
6504 Type of encapsulation. Ethernet encapsulation includes both wired and
6505 wireless Ethernet connections.
6506 <see>IHostNetworkInterface</see>
6507 </desc>
6508
6509 <const name="Unknown" value="0">
6510 <desc>
6511 The type of interface cannot be determined.
6512 </desc>
6513 </const>
6514 <const name="Ethernet" value="1">
6515 <desc>
6516 Ethernet frame encapsulation.
6517 </desc>
6518 </const>
6519 <const name="PPP" value="2">
6520 <desc>
6521 Point-to-point protocol encapsulation.
6522 </desc>
6523 </const>
6524 <const name="SLIP" value="3">
6525 <desc>
6526 Serial line IP encapsulation.
6527 </desc>
6528 </const>
6529 </enum>
6530
6531 <enum
6532 name="HostNetworkInterfaceStatus"
6533 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6534 >
6535 <desc>
6536 Current status of the interface.
6537 <see>IHostNetworkInterface</see>
6538 </desc>
6539
6540 <const name="Unknown" value="0">
6541 <desc>
6542 The state of interface cannot be determined.
6543 </desc>
6544 </const>
6545 <const name="Up" value="1">
6546 <desc>
6547 The interface is fully operational.
6548 </desc>
6549 </const>
6550 <const name="Down" value="2">
6551 <desc>
6552 The interface is not functioning.
6553 </desc>
6554 </const>
6555 </enum>
6556
6557 <enum
6558 name="HostNetworkInterfaceType"
6559 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6560 >
6561 <desc>
6562 Network interface type.
6563 </desc>
6564 <const name="Bridged" value="1"/>
6565 <const name="HostOnly" value="2"/>
6566 </enum>
6567
6568 <interface
6569 name="IHostNetworkInterface" extends="$unknown"
6570 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6571 wsmap="managed"
6572 >
6573 <desc>
6574 Represents one of host's network interfaces. IP V6 address and network
6575 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6576 separated by colons.
6577 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6578 </desc>
6579 <attribute name="name" type="wstring" readonly="yes">
6580 <desc>Returns the host network interface name.</desc>
6581 </attribute>
6582
6583 <attribute name="id" type="uuid" mod="string" readonly="yes">
6584 <desc>Returns the interface UUID.</desc>
6585 </attribute>
6586
6587 <attribute name="networkName" type="wstring" readonly="yes">
6588 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6589 </attribute>
6590
6591 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6592 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6593 </attribute>
6594
6595 <attribute name="IPAddress" type="wstring" readonly="yes">
6596 <desc>Returns the IP V4 address of the interface.</desc>
6597 </attribute>
6598
6599 <attribute name="networkMask" type="wstring" readonly="yes">
6600 <desc>Returns the network mask of the interface.</desc>
6601 </attribute>
6602
6603 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6604 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6605 </attribute>
6606
6607 <attribute name="IPV6Address" type="wstring" readonly="yes">
6608 <desc>Returns the IP V6 address of the interface.</desc>
6609 </attribute>
6610
6611 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6612 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6613 </attribute>
6614
6615 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6616 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6617 </attribute>
6618
6619 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6620 <desc>Type of protocol encapsulation used.</desc>
6621 </attribute>
6622
6623 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6624 <desc>Status of the interface.</desc>
6625 </attribute>
6626
6627 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6628 <desc>specifies the host interface type.</desc>
6629 </attribute>
6630
6631 <method name="enableStaticIpConfig">
6632 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6633 <param name="IPAddress" type="wstring" dir="in">
6634 <desc>
6635 IP address.
6636 </desc>
6637 </param>
6638 <param name="networkMask" type="wstring" dir="in">
6639 <desc>
6640 network mask.
6641 </desc>
6642 </param>
6643 </method>
6644
6645 <method name="enableStaticIpConfigV6">
6646 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6647 <param name="IPV6Address" type="wstring" dir="in">
6648 <desc>
6649 IP address.
6650 </desc>
6651 </param>
6652 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6653 <desc>
6654 network mask.
6655 </desc>
6656 </param>
6657 </method>
6658
6659 <method name="enableDynamicIpConfig">
6660 <desc>enables the dynamic IP configuration.</desc>
6661 </method>
6662
6663 <method name="dhcpRediscover">
6664 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6665 </method>
6666
6667 </interface>
6668
6669 <interface
6670 name="IHost" extends="$unknown"
6671 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6672 wsmap="managed"
6673 >
6674 <desc>
6675 The IHost interface represents the physical machine that this VirtualBox
6676 installation runs on.
6677
6678 An object implementing this interface is returned by the
6679 <link to="IVirtualBox::host" /> attribute. This interface contains
6680 read-only information about the host's physical hardware (such as what
6681 processors and disks are available, what the host operating system is,
6682 and so on) and also allows for manipulating some of the host's hardware,
6683 such as global USB device filters and host interface networking.
6684
6685 </desc>
6686 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6687 <desc>List of DVD drives available on the host.</desc>
6688 </attribute>
6689
6690 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6691 <desc>List of floppy drives available on the host.</desc>
6692 </attribute>
6693
6694 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6695 <desc>
6696 List of USB devices currently attached to the host.
6697 Once a new device is physically attached to the host computer,
6698 it appears in this list and remains there until detached.
6699
6700 <note>
6701 If USB functionality is not available in the given edition of
6702 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6703 </note>
6704 </desc>
6705 </attribute>
6706
6707 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6708 <desc>
6709 List of USB device filters in action.
6710 When a new device is physically attached to the host computer,
6711 filters from this list are applied to it (in order they are stored
6712 in the list). The first matched filter will determine the
6713 <link to="IHostUSBDeviceFilter::action">action</link>
6714 performed on the device.
6715
6716 Unless the device is ignored by these filters, filters of all
6717 currently running virtual machines
6718 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6719
6720 <note>
6721 If USB functionality is not available in the given edition of
6722 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6723 </note>
6724
6725 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6726 </desc>
6727 </attribute>
6728
6729 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6730 <desc>List of host network interfaces currently defined on the host.</desc>
6731 </attribute>
6732
6733 <attribute name="processorCount" type="unsigned long" readonly="yes">
6734 <desc>Number of (logical) CPUs installed in the host system.</desc>
6735 </attribute>
6736
6737 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6738 <desc>Number of (logical) CPUs online in the host system.</desc>
6739 </attribute>
6740
6741 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6742 <desc>Number of physical processor cores installed in the host system.</desc>
6743 </attribute>
6744
6745 <method name="getProcessorSpeed">
6746 <desc>Query the (approximate) maximum speed of a specified host CPU in
6747 Megahertz.
6748 </desc>
6749 <param name="cpuId" type="unsigned long" dir="in">
6750 <desc>
6751 Identifier of the CPU.
6752 </desc>
6753 </param>
6754 <param name="speed" type="unsigned long" dir="return">
6755 <desc>
6756 Speed value. 0 is returned if value is not known or @a cpuId is
6757 invalid.
6758 </desc>
6759 </param>
6760 </method>
6761
6762 <method name="getProcessorFeature">
6763 <desc>Query whether a CPU feature is supported or not.</desc>
6764 <param name="feature" type="ProcessorFeature" dir="in">
6765 <desc>
6766 CPU Feature identifier.
6767 </desc>
6768 </param>
6769 <param name="supported" type="boolean" dir="return">
6770 <desc>
6771 Feature is supported or not.
6772 </desc>
6773 </param>
6774 </method>
6775
6776 <method name="getProcessorDescription">
6777 <desc>Query the model string of a specified host CPU.
6778 </desc>
6779 <param name="cpuId" type="unsigned long" dir="in">
6780 <desc>
6781 Identifier of the CPU.
6782 <note>
6783 The current implementation might not necessarily return the
6784 description for this exact CPU.
6785 </note>
6786 </desc>
6787 </param>
6788 <param name="description" type="wstring" dir="return">
6789 <desc>
6790 Model string. An empty string is returned if value is not known or
6791 @a cpuId is invalid.
6792 </desc>
6793 </param>
6794 </method>
6795
6796 <method name="getProcessorCPUIDLeaf">
6797 <desc>
6798 Returns the CPU cpuid information for the specified leaf.
6799 </desc>
6800 <param name="cpuId" type="unsigned long" dir="in">
6801 <desc>
6802 Identifier of the CPU. The CPU most be online.
6803 <note>
6804 The current implementation might not necessarily return the
6805 description for this exact CPU.
6806 </note>
6807 </desc>
6808 </param>
6809 <param name="leaf" type="unsigned long" dir="in">
6810 <desc>
6811 CPUID leaf index (eax).
6812 </desc>
6813 </param>
6814 <param name="subLeaf" type="unsigned long" dir="in">
6815 <desc>
6816 CPUID leaf sub index (ecx). This currently only applies to cache
6817 information on Intel CPUs. Use 0 if retriving values for
6818 <link to="IMachine::setCPUIDLeaf"/>.
6819 </desc>
6820 </param>
6821 <param name="valEax" type="unsigned long" dir="out">
6822 <desc>
6823 CPUID leaf value for register eax.
6824 </desc>
6825 </param>
6826 <param name="valEbx" type="unsigned long" dir="out">
6827 <desc>
6828 CPUID leaf value for register ebx.
6829 </desc>
6830 </param>
6831 <param name="valEcx" type="unsigned long" dir="out">
6832 <desc>
6833 CPUID leaf value for register ecx.
6834 </desc>
6835 </param>
6836 <param name="valEdx" type="unsigned long" dir="out">
6837 <desc>
6838 CPUID leaf value for register edx.
6839 </desc>
6840 </param>
6841 </method>
6842
6843 <attribute name="memorySize" type="unsigned long" readonly="yes">
6844 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6845 </attribute>
6846
6847 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6848 <desc>Available system memory in the host system.</desc>
6849 </attribute>
6850
6851 <attribute name="operatingSystem" type="wstring" readonly="yes">
6852 <desc>Name of the host system's operating system.</desc>
6853 </attribute>
6854
6855 <attribute name="OSVersion" type="wstring" readonly="yes">
6856 <desc>Host operating system's version string.</desc>
6857 </attribute>
6858
6859 <attribute name="UTCTime" type="long long" readonly="yes">
6860 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6861 </attribute>
6862
6863 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
6864 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
6865 </attribute>
6866
6867 <method name="createHostOnlyNetworkInterface">
6868 <desc>
6869 Creates a new adapter for Host Only Networking.
6870 <result name="E_INVALIDARG">
6871 Host network interface @a name already exists.
6872 </result>
6873 </desc>
6874 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6875 <desc>
6876 Created host interface object.
6877 </desc>
6878 </param>
6879 <param name="progress" type="IProgress" dir="return">
6880 <desc>
6881 Progress object to track the operation completion.
6882 </desc>
6883 </param>
6884 </method>
6885
6886 <method name="removeHostOnlyNetworkInterface">
6887 <desc>
6888 Removes the given Host Only Networking interface.
6889 <result name="VBOX_E_OBJECT_NOT_FOUND">
6890 No host network interface matching @a id found.
6891 </result>
6892 </desc>
6893 <param name="id" type="uuid" mod="string" dir="in">
6894 <desc>
6895 Adapter GUID.
6896 </desc>
6897 </param>
6898 <param name="progress" type="IProgress" dir="return">
6899 <desc>
6900 Progress object to track the operation completion.
6901 </desc>
6902 </param>
6903 </method>
6904
6905 <method name="createUSBDeviceFilter">
6906 <desc>
6907 Creates a new USB device filter. All attributes except
6908 the filter name are set to empty (any match),
6909 <i>active</i> is @c false (the filter is not active).
6910
6911 The created filter can be added to the list of filters using
6912 <link to="#insertUSBDeviceFilter"/>.
6913
6914 <see>#USBDeviceFilters</see>
6915 </desc>
6916 <param name="name" type="wstring" dir="in">
6917 <desc>
6918 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
6919 </desc>
6920 </param>
6921 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6922 <desc>Created filter object.</desc>
6923 </param>
6924 </method>
6925
6926 <method name="insertUSBDeviceFilter">
6927 <desc>
6928 Inserts the given USB device to the specified position
6929 in the list of filters.
6930
6931 Positions are numbered starting from @c 0. If the specified
6932 position is equal to or greater than the number of elements in
6933 the list, the filter is added at the end of the collection.
6934
6935 <note>
6936 Duplicates are not allowed, so an attempt to insert a
6937 filter already in the list is an error.
6938 </note>
6939 <note>
6940 If USB functionality is not available in the given edition of
6941 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6942 </note>
6943
6944 <see>#USBDeviceFilters</see>
6945
6946 <result name="VBOX_E_INVALID_OBJECT_STATE">
6947 USB device filter is not created within this VirtualBox instance.
6948 </result>
6949 <result name="E_INVALIDARG">
6950 USB device filter already in list.
6951 </result>
6952
6953 </desc>
6954 <param name="position" type="unsigned long" dir="in">
6955 <desc>Position to insert the filter to.</desc>
6956 </param>
6957 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6958 <desc>USB device filter to insert.</desc>
6959 </param>
6960 </method>
6961
6962 <method name="removeUSBDeviceFilter">
6963 <desc>
6964 Removes a USB device filter from the specified position in the
6965 list of filters.
6966
6967 Positions are numbered starting from @c 0. Specifying a
6968 position equal to or greater than the number of elements in
6969 the list will produce an error.
6970
6971 <note>
6972 If USB functionality is not available in the given edition of
6973 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6974 </note>
6975
6976 <see>#USBDeviceFilters</see>
6977
6978 <result name="E_INVALIDARG">
6979 USB device filter list empty or invalid @a position.
6980 </result>
6981
6982 </desc>
6983 <param name="position" type="unsigned long" dir="in">
6984 <desc>Position to remove the filter from.</desc>
6985 </param>
6986 </method>
6987
6988 <method name="findHostDVDDrive">
6989 <desc>
6990 Searches for a host DVD drive with the given @c name.
6991
6992 <result name="VBOX_E_OBJECT_NOT_FOUND">
6993 Given @c name does not correspond to any host drive.
6994 </result>
6995
6996 </desc>
6997 <param name="name" type="wstring" dir="in">
6998 <desc>Name of the host drive to search for</desc>
6999 </param>
7000 <param name="drive" type="IMedium" dir="return">
7001 <desc>Found host drive object</desc>
7002 </param>
7003 </method>
7004
7005 <method name="findHostFloppyDrive">
7006 <desc>
7007 Searches for a host floppy drive with the given @c name.
7008
7009 <result name="VBOX_E_OBJECT_NOT_FOUND">
7010 Given @c name does not correspond to any host floppy drive.
7011 </result>
7012
7013 </desc>
7014 <param name="name" type="wstring" dir="in">
7015 <desc>Name of the host floppy drive to search for</desc>
7016 </param>
7017 <param name="drive" type="IMedium" dir="return">
7018 <desc>Found host floppy drive object</desc>
7019 </param>
7020 </method>
7021
7022 <method name="findHostNetworkInterfaceByName">
7023 <desc>
7024 Searches through all host network interfaces for an interface with
7025 the given @c name.
7026 <note>
7027 The method returns an error if the given @c name does not
7028 correspond to any host network interface.
7029 </note>
7030 </desc>
7031 <param name="name" type="wstring" dir="in">
7032 <desc>Name of the host network interface to search for.</desc>
7033 </param>
7034 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7035 <desc>Found host network interface object.</desc>
7036 </param>
7037 </method>
7038 <method name="findHostNetworkInterfaceById">
7039 <desc>
7040 Searches through all host network interfaces for an interface with
7041 the given GUID.
7042 <note>
7043 The method returns an error if the given GUID does not
7044 correspond to any host network interface.
7045 </note>
7046 </desc>
7047 <param name="id" type="uuid" mod="string" dir="in">
7048 <desc>GUID of the host network interface to search for.</desc>
7049 </param>
7050 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7051 <desc>Found host network interface object.</desc>
7052 </param>
7053 </method>
7054 <method name="findHostNetworkInterfacesOfType">
7055 <desc>
7056 Searches through all host network interfaces and returns a list of interfaces of the specified type
7057 </desc>
7058 <param name="type" type="HostNetworkInterfaceType" dir="in">
7059 <desc>type of the host network interfaces to search for.</desc>
7060 </param>
7061 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7062 <desc>Found host network interface objects.</desc>
7063 </param>
7064 </method>
7065
7066 <method name="findUSBDeviceById">
7067 <desc>
7068 Searches for a USB device with the given UUID.
7069
7070 <result name="VBOX_E_OBJECT_NOT_FOUND">
7071 Given @c id does not correspond to any USB device.
7072 </result>
7073
7074 <see>IHostUSBDevice::id</see>
7075 </desc>
7076 <param name="id" type="uuid" mod="string" dir="in">
7077 <desc>UUID of the USB device to search for.</desc>
7078 </param>
7079 <param name="device" type="IHostUSBDevice" dir="return">
7080 <desc>Found USB device object.</desc>
7081 </param>
7082 </method>
7083
7084 <method name="findUSBDeviceByAddress">
7085 <desc>
7086 Searches for a USB device with the given host address.
7087
7088 <result name="VBOX_E_OBJECT_NOT_FOUND">
7089 Given @c name does not correspond to any USB device.
7090 </result>
7091
7092 <see>IHostUSBDevice::address</see>
7093 </desc>
7094 <param name="name" type="wstring" dir="in">
7095 <desc>
7096 Address of the USB device (as assigned by the host) to
7097 search for.
7098 </desc>
7099 </param>
7100 <param name="device" type="IHostUSBDevice" dir="return">
7101 <desc>Found USB device object.</desc>
7102 </param>
7103 </method>
7104
7105 </interface>
7106
7107 <!--
7108 // ISystemProperties
7109 /////////////////////////////////////////////////////////////////////////
7110 -->
7111
7112 <interface
7113 name="ISystemProperties"
7114 extends="$unknown"
7115 uuid="07c3ffd8-8f59-49cc-b608-53a332e85cc3"
7116 wsmap="managed"
7117 >
7118 <desc>
7119 The ISystemProperties interface represents global properties of the given
7120 VirtualBox installation.
7121
7122 These properties define limits and default values for various attributes
7123 and parameters. Most of the properties are read-only, but some can be
7124 changed by a user.
7125 </desc>
7126
7127 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7128 <desc>Minimum guest system memory in Megabytes.</desc>
7129 </attribute>
7130
7131 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7132 <desc>Maximum guest system memory in Megabytes.</desc>
7133 </attribute>
7134
7135 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7136 <desc>Minimum guest video memory in Megabytes.</desc>
7137 </attribute>
7138
7139 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7140 <desc>Maximum guest video memory in Megabytes.</desc>
7141 </attribute>
7142
7143 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7144 <desc>Minimum CPU count.</desc>
7145 </attribute>
7146
7147 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7148 <desc>Maximum CPU count.</desc>
7149 </attribute>
7150
7151 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7152 <desc>Maximum of monitors which could be connected.</desc>
7153 </attribute>
7154
7155 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7156 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7157 </attribute>
7158
7159 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7160 <desc>
7161 Number of network adapters associated with every
7162 <link to="IMachine"/> instance.
7163 </desc>
7164 </attribute>
7165
7166 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7167 <desc>
7168 Number of serial ports associated with every
7169 <link to="IMachine"/> instance.
7170 </desc>
7171 </attribute>
7172
7173 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7174 <desc>
7175 Number of parallel ports associated with every
7176 <link to="IMachine"/> instance.
7177 </desc>
7178 </attribute>
7179
7180 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7181 <desc>
7182 Maximum device position in the boot order. This value corresponds
7183 to the total number of devices a machine can boot from, to make it
7184 possible to include all possible devices to the boot list.
7185 <see><link to="IMachine::setBootOrder"/></see>
7186 </desc>
7187 </attribute>
7188
7189 <attribute name="defaultMachineFolder" type="wstring">
7190 <desc>
7191 Full path to the default directory used to create new or open
7192 existing machines when a settings file name contains no
7193 path.
7194
7195 The initial value of this property is
7196 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7197 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7198
7199 <note>
7200 Setting this property to @c null or an empty string will restore the
7201 initial value.
7202 </note>
7203 <note>
7204 When settings this property, the specified path can be
7205 absolute (full path) or relative
7206 to the <link to="IVirtualBox::homeFolder">
7207 VirtualBox home directory</link>.
7208 When reading this property, a full path is
7209 always returned.
7210 </note>
7211 <note>
7212 The specified path may not exist, it will be created
7213 when necessary.
7214 </note>
7215
7216 <see>
7217 <link to="IVirtualBox::createMachine"/>,
7218 <link to="IVirtualBox::openMachine"/>
7219 </see>
7220 </desc>
7221 </attribute>
7222
7223 <attribute name="defaultHardDiskFolder" type="wstring">
7224 <desc>
7225 Full path to the default directory used to create new or open existing
7226 virtual disks.
7227
7228 This path is used when the storage unit of a hard disk is a regular file
7229 in the host's file system and only a file name that contains no path is
7230 given.
7231
7232 The initial value of this property is
7233 <tt>&lt;</tt>
7234 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7235 <tt>&gt;/HardDisks</tt>.
7236
7237 <note>
7238 Setting this property to @c null or empty string will restore the
7239 initial value.
7240 </note>
7241 <note>
7242 When settings this property, the specified path can be relative
7243 to the
7244 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7245 absolute. When reading this property, a full path is
7246 always returned.
7247 </note>
7248 <note>
7249 The specified path may not exist, it will be created
7250 when necessary.
7251 </note>
7252
7253 <see>
7254 IMedium,
7255 <link to="IVirtualBox::createHardDisk"/>,
7256 <link to="IVirtualBox::openMedium"/>,
7257 <link to="IMedium::location"/>
7258 </see>
7259 </desc>
7260 </attribute>
7261
7262 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7263 <desc>
7264 List of all medium storage formats supported by this VirtualBox
7265 installation.
7266
7267 Keep in mind that the medium format identifier
7268 (<link to="IMediumFormat::id"/>) used in other API calls like
7269 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7270 medium format is a case-insensitive string. This means that, for
7271 example, all of the following strings:
7272 <pre>
7273 "VDI"
7274 "vdi"
7275 "VdI"</pre>
7276 refer to the same medium format.
7277
7278 Note that the virtual medium framework is backend-based, therefore
7279 the list of supported formats depends on what backends are currently
7280 installed.
7281
7282 <see>
7283 <link to="IMediumFormat"/>,
7284 </see>
7285 </desc>
7286 </attribute>
7287
7288 <attribute name="defaultHardDiskFormat" type="wstring">
7289 <desc>
7290 Identifier of the default medium format used by VirtualBox.
7291
7292 The medium format set by this attribute is used by VirtualBox
7293 when the medium format was not specified explicitly. One example is
7294 <link to="IVirtualBox::createHardDisk"/> with the empty
7295 format argument. A more complex example is implicit creation of
7296 differencing media when taking a snapshot of a virtual machine:
7297 this operation will try to use a format of the parent medium first
7298 and if this format does not support differencing media the default
7299 format specified by this argument will be used.
7300
7301 The list of supported medium formats may be obtained by the
7302 <link to="#mediumFormats"/> call. Note that the default medium
7303 format must have a capability to create differencing media;
7304 otherwise operations that create media implicitly may fail
7305 unexpectedly.
7306
7307 The initial value of this property is <tt>"VDI"</tt> in the current
7308 version of the VirtualBox product, but may change in the future.
7309
7310 <note>
7311 Setting this property to @c null or empty string will restore the
7312 initial value.
7313 </note>
7314
7315 <see>
7316 <link to="#mediumFormats"/>,
7317 <link to="IMediumFormat::id"/>,
7318 <link to="IVirtualBox::createHardDisk"/>
7319 </see>
7320 </desc>
7321 </attribute>
7322
7323 <attribute name="freeDiskSpaceWarning" type="unsigned long long">
7324 <desc>Issue a warning if the free disk space is below (or in some disk
7325 intensive operation is expected to go below) the given size in
7326 Megabytes.</desc>
7327 </attribute>
7328
7329 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7330 <desc>Issue a warning if the free disk space is below (or in some disk
7331 intensive operation is expected to go below) the given percentage.</desc>
7332 </attribute>
7333
7334 <attribute name="freeDiskSpaceError" type="unsigned long long">
7335 <desc>Issue an error if the free disk space is below (or in some disk
7336 intensive operation is expected to go below) the given size in
7337 Megabytes.</desc>
7338 </attribute>
7339
7340 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7341 <desc>Issue an error if the free disk space is below (or in some disk
7342 intensive operation is expected to go below) the given percentage.</desc>
7343 </attribute>
7344
7345 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7346 <desc>
7347 Library that provides authentication for VRDP clients. The library
7348 is used if a virtual machine's authentication type is set to "external"
7349 in the VM RemoteDisplay configuration.
7350
7351 The system library extension (".DLL" or ".so") must be omitted.
7352 A full path can be specified; if not, then the library must reside on the
7353 system's default library path.
7354
7355 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7356 of that name in one of the default VirtualBox library directories.
7357
7358 For details about VirtualBox authentication libraries and how to implement
7359 them, please refer to the VirtualBox manual.
7360
7361 <note>
7362 Setting this property to @c null or empty string will restore the
7363 initial value.
7364 </note>
7365 </desc>
7366 </attribute>
7367
7368 <attribute name="webServiceAuthLibrary" type="wstring">
7369 <desc>
7370 Library that provides authentication for webservice clients. The library
7371 is used if a virtual machine's authentication type is set to "external"
7372 in the VM RemoteDisplay configuration and will be called from
7373 within the <link to="IWebsessionManager::logon" /> implementation.
7374
7375 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7376 there is no per-VM setting for this, as the webservice is a global
7377 resource (if it is running). Only for this setting (for the webservice),
7378 setting this value to a literal <tt>"null"</tt> string disables authentication,
7379 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7380 no matter what user name and password are supplied.
7381
7382 The initial value of this property is <tt>"VRDPAuth"</tt>,
7383 meaning that the webservice will use the same authentication
7384 library that is used by default for VBoxVRDP (again, see
7385 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7386 The format and calling convention of authentication libraries
7387 is the same for the webservice as it is for VBoxVRDP.
7388
7389 <note>
7390 Setting this property to @c null or empty string will restore the
7391 initial value.
7392 </note>
7393 </desc>
7394 </attribute>
7395
7396 <attribute name="LogHistoryCount" type="unsigned long">
7397 <desc>
7398 This value specifies how many old release log files are kept.
7399 </desc>
7400 </attribute>
7401
7402 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7403 <desc>This value hold the default audio driver for the current
7404 system.</desc>
7405 </attribute>
7406
7407 <method name="getMaxDevicesPerPortForStorageBus">
7408 <desc>Returns the maximum number of devices which can be attached to a port
7409 for the given storage bus.</desc>
7410
7411 <param name="bus" type="StorageBus" dir="in">
7412 <desc>The storage bus type to get the value for.</desc>
7413 </param>
7414
7415 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7416 <desc>The maximum number of devices which can eb attached to the port for the given
7417 storage bus.</desc>
7418 </param>
7419 </method>
7420
7421 <method name="getMinPortCountForStorageBus">
7422 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7423
7424 <param name="bus" type="StorageBus" dir="in">
7425 <desc>The storage bus type to get the value for.</desc>
7426 </param>
7427
7428 <param name="minPortCount" type="unsigned long" dir="return">
7429 <desc>The minimum number of ports for the given storage bus.</desc>
7430 </param>
7431 </method>
7432
7433 <method name="getMaxPortCountForStorageBus">
7434 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7435
7436 <param name="bus" type="StorageBus" dir="in">
7437 <desc>The storage bus type to get the value for.</desc>
7438 </param>
7439
7440 <param name="maxPortCount" type="unsigned long" dir="return">
7441 <desc>The maximum number of ports for the given storage bus.</desc>
7442 </param>
7443 </method>
7444
7445 <method name="getMaxInstancesOfStorageBus">
7446 <desc>Returns the maximum number of storage bus instances which
7447 can be configured for each VM. This corresponds to the number of
7448 storage controllers one can have.</desc>
7449
7450 <param name="bus" type="StorageBus" dir="in">
7451 <desc>The storage bus type to get the value for.</desc>
7452 </param>
7453
7454 <param name="maxInstances" type="unsigned long" dir="return">
7455 <desc>The maximum number of instances for the given storage bus.</desc>
7456 </param>
7457 </method>
7458
7459 <method name="getDeviceTypesForStorageBus">
7460 <desc>Returns list of all the supported device types
7461 (<link to="DeviceType"/>) for the given type of storage
7462 bus.</desc>
7463
7464 <param name="bus" type="StorageBus" dir="in">
7465 <desc>The storage bus type to get the value for.</desc>
7466 </param>
7467
7468 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7469 <desc>The list of all supported device types for the given storage bus.</desc>
7470 </param>
7471 </method>
7472 </interface>
7473
7474 <!--
7475 // IGuest
7476 /////////////////////////////////////////////////////////////////////////
7477 -->
7478
7479 <interface
7480 name="IGuestOSType" extends="$unknown"
7481 uuid="e3f6727e-a09b-41ea-a824-864a176472f3"
7482 wsmap="struct"
7483 >
7484 <desc>
7485 </desc>
7486
7487 <attribute name="familyId" type="wstring" readonly="yes">
7488 <desc>Guest OS family identifier string.</desc>
7489 </attribute>
7490
7491 <attribute name="familyDescription" type="wstring" readonly="yes">
7492 <desc>Human readable description of the guest OS family.</desc>
7493 </attribute>
7494
7495 <attribute name="id" type="wstring" readonly="yes">
7496 <desc>Guest OS identifier string.</desc>
7497 </attribute>
7498
7499 <attribute name="description" type="wstring" readonly="yes">
7500 <desc>Human readable description of the guest OS.</desc>
7501 </attribute>
7502
7503 <attribute name="is64Bit" type="boolean" readonly="yes">
7504 <desc>Returns @c true if the given OS is 64-bit</desc>
7505 </attribute>
7506
7507 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7508 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7509 </attribute>
7510
7511 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7512 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7513 </attribute>
7514
7515 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7516 <desc>Recommended RAM size in Megabytes.</desc>
7517 </attribute>
7518
7519 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7520 <desc>Recommended video RAM size in Megabytes.</desc>
7521 </attribute>
7522
7523 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7524 <desc>Recommended hard disk size in Megabytes.</desc>
7525 </attribute>
7526
7527 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7528 <desc>Returns recommended network adapter for this OS type.</desc>
7529 </attribute>
7530
7531 <attribute name="recommendedPae" type="boolean" readonly="yes">
7532 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7533 </attribute>
7534
7535 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7536 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7537 </attribute>
7538
7539 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7540 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7541 </attribute>
7542
7543 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7544 <desc>Recommended storage controller type for HD drives.</desc>
7545 </attribute>
7546
7547 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7548 <desc>Recommended storage bus type for HD drives.</desc>
7549 </attribute>
7550
7551 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7552 <desc>Recommended firmware type.</desc>
7553 </attribute>
7554
7555 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7556 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7557 </attribute>
7558
7559 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7560 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7561 </attribute>
7562
7563 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7564 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7565 </attribute>
7566
7567 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7568 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7569 </attribute>
7570
7571 </interface>
7572
7573 <interface
7574 name="IGuest" extends="$unknown"
7575 uuid="d915dff1-ed38-495a-91f1-ab6c53932468"
7576 wsmap="managed"
7577 >
7578 <desc>
7579 The IGuest interface represents information about the operating system
7580 running inside the virtual machine. Used in
7581 <link to="IConsole::guest"/>.
7582
7583 IGuest provides information about the guest operating system, whether
7584 Guest Additions are installed and other OS-specific virtual machine
7585 properties.
7586 </desc>
7587
7588 <attribute name="OSTypeId" type="wstring" readonly="yes">
7589 <desc>
7590 Identifier of the Guest OS type as reported by the Guest
7591 Additions.
7592 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7593 an IGuestOSType object representing details about the given
7594 Guest OS type.
7595 <note>
7596 If Guest Additions are not installed, this value will be
7597 the same as <link to="IMachine::OSTypeId"/>.
7598 </note>
7599 </desc>
7600 </attribute>
7601
7602 <attribute name="additionsActive" type="boolean" readonly="yes">
7603 <desc>
7604 Flag whether the Guest Additions are installed and active
7605 in which case their version will be returned by the
7606 <link to="#additionsVersion"/> property.
7607 </desc>
7608 </attribute>
7609
7610 <attribute name="additionsVersion" type="wstring" readonly="yes">
7611 <desc>
7612 Version of the Guest Additions including the revision (3 decimal numbers
7613 separated by dots + revision number) installed on the guest or empty
7614 when the Additions are not installed.
7615 </desc>
7616 </attribute>
7617
7618 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7619 <desc>
7620 Flag whether seamless guest display rendering (seamless desktop
7621 integration) is supported.
7622 </desc>
7623 </attribute>
7624
7625 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7626 <desc>
7627 Flag whether the guest is in graphics mode. If it is not, then
7628 seamless rendering will not work, resize hints are not immediately
7629 acted on and guest display resizes are probably not initiated by
7630 the guest additions.
7631 </desc>
7632 </attribute>
7633
7634 <attribute name="memoryBalloonSize" type="unsigned long">
7635 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7636 </attribute>
7637
7638 <attribute name="pageFusionEnabled" type="boolean">
7639 <desc>Flag whether page fusion is enabled or not.</desc>
7640 </attribute>
7641
7642 <attribute name="statisticsUpdateInterval" type="unsigned long">
7643 <desc>Interval to update guest statistics in seconds.</desc>
7644 </attribute>
7645
7646 <method name="internalGetStatistics">
7647 <desc>
7648 Internal method; do not use as it might change at any time
7649 </desc>
7650 <param name="cpuUser" type="unsigned long" dir="out">
7651 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
7652 </param>
7653 <param name="cpuKernel" type="unsigned long" dir="out">
7654 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
7655 </param>
7656 <param name="cpuIdle" type="unsigned long" dir="out">
7657 <desc>Percentage of processor time spent idling as seen by the guest</desc>
7658 </param>
7659 <param name="memTotal" type="unsigned long" dir="out">
7660 <desc>Total amount of physical guest RAM</desc>
7661 </param>
7662 <param name="memFree" type="unsigned long" dir="out">
7663 <desc>Free amount of physical guest RAM</desc>
7664 </param>
7665 <param name="memBalloon" type="unsigned long" dir="out">
7666 <desc>Amount of ballooned physical guest RAM</desc>
7667 </param>
7668 <param name="memShared" type="unsigned long" dir="out">
7669 <desc>Amount of shared physical guest RAM</desc>
7670 </param>
7671 <param name="memCache" type="unsigned long" dir="out">
7672 <desc>Total amount of guest (disk) cache memory</desc>
7673 </param>
7674 <param name="pagedTotal" type="unsigned long" dir="out">
7675 <desc>Total amount of space in the page file</desc>
7676 </param>
7677 <param name="memAllocTotal" type="unsigned long" dir="out">
7678 <desc>Total amount of memory allocated by the hypervisor</desc>
7679 </param>
7680 <param name="memFreeTotal" type="unsigned long" dir="out">
7681 <desc>Total amount of free memory available in the hypervisor</desc>
7682 </param>
7683 <param name="memBalloonTotal" type="unsigned long" dir="out">
7684 <desc>Total amount of memory ballooned by the hypervisor</desc>
7685 </param>
7686 <param name="memSharedTotal" type="unsigned long" dir="out">
7687 <desc>Total amount of shared memory in the hypervisor</desc>
7688 </param>
7689 </method>
7690
7691 <method name="setCredentials">
7692 <desc>
7693 Store login credentials that can be queried by guest operating
7694 systems with Additions installed. The credentials are transient
7695 to the session and the guest may also choose to erase them. Note
7696 that the caller cannot determine whether the guest operating system
7697 has queried or made use of the credentials.
7698
7699 <result name="VBOX_E_VM_ERROR">
7700 VMM device is not available.
7701 </result>
7702
7703 </desc>
7704 <param name="userName" type="wstring" dir="in">
7705 <desc>User name string, can be empty</desc>
7706 </param>
7707 <param name="password" type="wstring" dir="in">
7708 <desc>Password string, can be empty</desc>
7709 </param>
7710 <param name="domain" type="wstring" dir="in">
7711 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7712 </param>
7713 <param name="allowInteractiveLogon" type="boolean" dir="in">
7714 <desc>
7715 Flag whether the guest should alternatively allow the user to
7716 interactively specify different credentials. This flag might
7717 not be supported by all versions of the Additions.
7718 </desc>
7719 </param>
7720 </method>
7721
7722 <method name="executeProcess">
7723 <desc>
7724 Executes an existing program inside the guest VM.
7725
7726 <result name="VBOX_E_IPRT_ERROR">
7727 Could not execute process.
7728 </result>
7729
7730 </desc>
7731 <param name="execName" type="wstring" dir="in">
7732 <desc>
7733 Full path name of the command to execute on the guest; the
7734 commands has to exists in the guest VM in order to be executed.
7735 </desc>
7736 </param>
7737 <param name="flags" type="unsigned long" dir="in">
7738 <desc>
7739 Execution flags - currently not supported and therefore
7740 has to be set to 0.
7741 </desc>
7742 </param>
7743 <param name="arguments" type="wstring" safearray="yes" dir="in">
7744 <desc>
7745 Array of arguments passed to the execution command.
7746 </desc>
7747 </param>
7748 <param name="environment" type="wstring" safearray="yes" dir="in">
7749 <desc>
7750 Environment variables that can be set while the command is being
7751 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
7752 variable just set its name ("NAME") without a value.
7753 </desc>
7754 </param>
7755 <param name="userName" type="wstring" dir="in">
7756 <desc>
7757 User name under which the command will be executed; has to exist
7758 and have the appropriate rights to execute programs in the VM.
7759 </desc>
7760 </param>
7761 <param name="password" type="wstring" dir="in">
7762 <desc>
7763 Password of the user account specified.
7764 </desc>
7765 </param>
7766 <param name="timeoutMS" type="unsigned long" dir="in">
7767 <desc>
7768 The maximum timeout value (in msec) to wait for finished program
7769 execution. Pass 0 for an infinite timeout.
7770 </desc>
7771 </param>
7772 <param name="pid" type="unsigned long" dir="out">
7773 <desc>
7774 The PID (process ID) of the started command for later reference.
7775 </desc>
7776 </param>
7777 <param name="progress" type="IProgress" dir="return">
7778 <desc>Progress object to track the operation completion.</desc>
7779 </param>
7780 </method>
7781
7782 <method name="getProcessOutput">
7783 <desc>
7784 Retrieves output of a formerly started process.
7785
7786 <result name="VBOX_E_IPRT_ERROR">
7787 Could not retrieve output.
7788 </result>
7789
7790 </desc>
7791 <param name="pid" type="unsigned long" dir="in">
7792 <desc>
7793 Process id returned by earlier executeProcess() call.
7794 </desc>
7795 </param>
7796 <param name="flags" type="unsigned long" dir="in">
7797 <desc>
7798 Flags describing which output to retrieve.
7799 </desc>
7800 </param>
7801 <param name="timeoutMS" type="unsigned long" dir="in">
7802 <desc>
7803 The maximum timeout value (in msec) to wait for output
7804 data. Pass 0 for an infinite timeout.
7805 </desc>
7806 </param>
7807 <param name="size" type="unsigned long long" dir="in">
7808 <desc>
7809 Size in bytes to read in the buffer.
7810 </desc>
7811 </param>
7812 <param name="data" type="octet" dir="return" safearray="yes">
7813 <desc>
7814 Buffer for retrieving the actual output. A data size of 0 means end of file
7815 if the requested size was not 0. This is the unprocessed
7816 output data, i.e. the line ending style depends on the platform of
7817 the system the server is running on.
7818 </desc>
7819 </param>
7820 </method>
7821
7822 <method name="getProcessStatus">
7823 <desc>
7824 Retrieves status, exit code and the exit reason of a formerly started process.
7825
7826 <result name="VBOX_E_IPRT_ERROR">
7827 Process with specified PID was not found.
7828 </result>
7829
7830 </desc>
7831 <param name="pid" type="unsigned long" dir="in">
7832 <desc>
7833 Process id returned by earlier executeProcess() call.
7834 </desc>
7835 </param>
7836 <param name="exitcode" type="unsigned long" dir="out">
7837 <desc>
7838 The exit code (if available).
7839 </desc>
7840 </param>
7841 <param name="flags" type="unsigned long" dir="out">
7842 <desc>
7843 Additional flags of process status (not used at the moment).
7844 </desc>
7845 </param>
7846 <param name="reason" type="unsigned long" dir="return">
7847 <desc>
7848 The current process status.
7849 </desc>
7850 </param>
7851 </method>
7852
7853 </interface>
7854
7855
7856 <!--
7857 // IProgress
7858 /////////////////////////////////////////////////////////////////////////
7859 -->
7860
7861 <interface
7862 name="IProgress" extends="$unknown"
7863 uuid="856aa038-853f-42e2-acf7-6e7b02dbe294"
7864 wsmap="managed"
7865 >
7866 <desc>
7867 The IProgress interface is used to track and control
7868 asynchronous tasks within VirtualBox.
7869
7870 An instance of this is returned every time VirtualBox starts
7871 an asynchronous task (in other words, a separate thread) which
7872 continues to run after a method call returns. For example,
7873 <link to="IConsole::saveState" />, which saves the state of
7874 a running virtual machine, can take a long time to complete.
7875 To be able to display a progress bar, a user interface such as
7876 the VirtualBox graphical user interface can use the IProgress
7877 object returned by that method.
7878
7879 Note that IProgress is a "read-only" interface in the sense
7880 that only the VirtualBox internals behind the Main API can
7881 create and manipulate progress objects, whereas client code
7882 can only use the IProgress object to monitor a task's
7883 progress and, if <link to="#cancelable" /> is @c true,
7884 cancel the task by calling <link to="#cancel" />.
7885
7886 A task represented by IProgress consists of either one or
7887 several sub-operations that run sequentially, one by one (see
7888 <link to="#operation" /> and <link to="#operationCount" />).
7889 Every operation is identified by a number (starting from 0)
7890 and has a separate description.
7891
7892 You can find the individual percentage of completion of the current
7893 operation in <link to="#operationPercent" /> and the
7894 percentage of completion of the task as a whole
7895 in <link to="#percent" />.
7896
7897 Similarly, you can wait for the completion of a particular
7898 operation via <link to="#waitForOperationCompletion" /> or
7899 for the completion of the whole task via
7900 <link to="#waitForCompletion" />.
7901 </desc>
7902
7903 <attribute name="id" type="uuid" mod="string" readonly="yes">
7904 <desc>ID of the task.</desc>
7905 </attribute>
7906
7907 <attribute name="description" type="wstring" readonly="yes">
7908 <desc>Description of the task.</desc>
7909 </attribute>
7910
7911 <attribute name="initiator" type="$unknown" readonly="yes">
7912 <desc>Initiator of the task.</desc>
7913 </attribute>
7914
7915 <attribute name="cancelable" type="boolean" readonly="yes">
7916 <desc>Whether the task can be interrupted.</desc>
7917 </attribute>
7918
7919 <attribute name="percent" type="unsigned long" readonly="yes">
7920 <desc>
7921 Current progress value of the task as a whole, in percent.
7922 This value depends on how many operations are already complete.
7923 Returns 100 if <link to="#completed" /> is @c true.
7924 </desc>
7925 </attribute>
7926
7927 <attribute name="timeRemaining" type="long" readonly="yes">
7928 <desc>
7929 Estimated remaining time until the task completes, in
7930 seconds. Returns 0 once the task has completed; returns -1
7931 if the remaining time cannot be computed, in particular if
7932 the current progress is 0.
7933
7934 Even if a value is returned, the estimate will be unreliable
7935 for low progress values. It will become more reliable as the
7936 task progresses; it is not recommended to display an ETA
7937 before at least 20% of a task have completed.
7938 </desc>
7939 </attribute>
7940
7941 <attribute name="completed" type="boolean" readonly="yes">
7942 <desc>Whether the task has been completed.</desc>
7943 </attribute>
7944
7945 <attribute name="canceled" type="boolean" readonly="yes">
7946 <desc>Whether the task has been canceled.</desc>
7947 </attribute>
7948
7949 <attribute name="resultCode" type="long" readonly="yes">
7950 <desc>
7951 Result code of the progress task.
7952 Valid only if <link to="#completed"/> is @c true.
7953 </desc>
7954 </attribute>
7955
7956 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7957 <desc>
7958 Extended information about the unsuccessful result of the
7959 progress operation. May be @c null if no extended information
7960 is available.
7961 Valid only if <link to="#completed"/> is @c true and
7962 <link to="#resultCode"/> indicates a failure.
7963 </desc>
7964 </attribute>
7965
7966 <attribute name="operationCount" type="unsigned long" readonly="yes">
7967 <desc>
7968 Number of sub-operations this task is divided into.
7969 Every task consists of at least one suboperation.
7970 </desc>
7971 </attribute>
7972
7973 <attribute name="operation" type="unsigned long" readonly="yes">
7974 <desc>Number of the sub-operation being currently executed.</desc>
7975 </attribute>
7976
7977 <attribute name="operationDescription" type="wstring" readonly="yes">
7978 <desc>
7979 Description of the sub-operation being currently executed.
7980 </desc>
7981 </attribute>
7982
7983 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7984 <desc>Progress value of the current sub-operation only, in percent.</desc>
7985 </attribute>
7986
7987 <attribute name="timeout" type="unsigned long">
7988 <desc>
7989 When non-zero, this specifies the number of milliseconds after which
7990 the operation will automatically be canceled. This can only be set on
7991 cancelable objects.
7992 </desc>
7993 </attribute>
7994
7995 <method name="setCurrentOperationProgress">
7996 <desc>Internal method, not to be called externally.</desc>
7997 <param name="percent" type="unsigned long" dir="in" />
7998 </method>
7999 <method name="setNextOperation">
8000 <desc>Internal method, not to be called externally.</desc>
8001 <param name="nextOperationDescription" type="wstring" dir="in" />
8002 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8003 </method>
8004
8005 <method name="waitForCompletion">
8006 <desc>
8007 Waits until the task is done (including all sub-operations)
8008 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8009
8010 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
8011 thread are not processed while waiting. Neglecting event queues may
8012 have dire consequences (degrade performance, resource hogs,
8013 deadlocks, etc.), this is specially so for the main thread on
8014 platforms using XPCOM. Callers are adviced wait for short periods
8015 and service their event queues between calls, or to create a worker
8016 thread to do the waiting.
8017
8018 <result name="VBOX_E_IPRT_ERROR">
8019 Failed to wait for task completion.
8020 </result>
8021 </desc>
8022
8023 <param name="timeout" type="long" dir="in">
8024 <desc>
8025 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8026 </desc>
8027 </param>
8028 </method>
8029
8030 <method name="waitForOperationCompletion">
8031 <desc>
8032 Waits until the given operation is done with a given timeout in
8033 milliseconds; specify -1 for an indefinite wait.
8034
8035 See <link to="#waitForCompletion"> for event queue considerations.</link>
8036
8037 <result name="VBOX_E_IPRT_ERROR">
8038 Failed to wait for operation completion.
8039 </result>
8040
8041 </desc>
8042 <param name="operation" type="unsigned long" dir="in">
8043 <desc>
8044 Number of the operation to wait for.
8045 Must be less than <link to="#operationCount"/>.
8046 </desc>
8047 </param>
8048 <param name="timeout" type="long" dir="in">
8049 <desc>
8050 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8051 </desc>
8052 </param>
8053 </method>
8054
8055 <method name="cancel">
8056 <desc>
8057 Cancels the task.
8058 <note>
8059 If <link to="#cancelable"/> is @c false, then this method will fail.
8060 </note>
8061
8062 <result name="VBOX_E_INVALID_OBJECT_STATE">
8063 Operation cannot be canceled.
8064 </result>
8065
8066 </desc>
8067 </method>
8068
8069 </interface>
8070
8071 <!--
8072 // ISnapshot
8073 /////////////////////////////////////////////////////////////////////////
8074 -->
8075
8076 <interface
8077 name="ISnapshot" extends="$unknown"
8078 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8079 wsmap="managed"
8080 >
8081 <desc>
8082 The ISnapshot interface represents a snapshot of the virtual
8083 machine.
8084
8085 Together with the differencing media that are created
8086 when a snapshot is taken, a machine can be brought back to
8087 the exact state it was in when the snapshot was taken.
8088
8089 The ISnapshot interface has no methods, only attributes; snapshots
8090 are controlled through methods of the <link to="IConsole" /> interface
8091 which also manage the media associated with the snapshot.
8092 The following operations exist:
8093
8094 <ul>
8095 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8096 by creating new, empty differencing images for the machine's
8097 media and saving the VM settings and (if the VM is running)
8098 the current VM state in the snapshot.
8099
8100 The differencing images will then receive all data written to
8101 the machine's media, while their parent (base) images
8102 remain unmodified after the snapshot has been taken (see
8103 <link to="IMedium" /> for details about differencing images).
8104 This simplifies restoring a machine to the state of a snapshot:
8105 only the differencing images need to be deleted.
8106
8107 The current machine state is not changed by taking a snapshot.
8108 If the machine is running, it will resume execution after the
8109 snapshot has been taken.
8110 </li>
8111
8112 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8113 a previous snapshot. This resets the machine's state to that of
8114 the previous snapshot by deleting the differencing image of each
8115 of the machine's media and setting the machine's settings
8116 and state to the state that was saved in the snapshot (if any).
8117
8118 This destroys the machine's current state.
8119 </li>
8120
8121 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8122 without affecting the current machine state.
8123
8124 This does not change the machine, but instead frees the resources
8125 allocated when the snapshot was taken: the settings and machine state
8126 is deleted (if any), and the snapshot's differencing image for each
8127 of the machine's media gets merged with its parent image.
8128
8129 Neither the current machine state nor other snapshots are affected
8130 by this operation, except that parent media will be modified
8131 to contain the disk data associated with the snapshot being deleted.
8132 </li>
8133 </ul>
8134
8135 Each snapshot contains the settings of the virtual machine (hardware
8136 configuration etc.). In addition, if the machine was running when the
8137 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8138 the current VM state is saved in the snapshot (similarly to what happens
8139 when a VM's state is saved). The snapshot is then said to
8140 be <i>online</i> because when restoring it, the VM will be running.
8141
8142 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8143 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8144
8145 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8146 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8147 it then contains a so-called "zero execution state", representing a
8148 machine that is powered off.
8149
8150 <h3>Snapshot branches and the "current" snapshot</h3>
8151
8152 Snapshots can be chained, whereby every next snapshot is based on the
8153 previous one. This chaining is related to medium branching
8154 (see the <link to="IMedium"/> description) in that every time
8155 a new snapshot is created, a new differencing medium is implicitly
8156 created for all normal media attached to the machine.
8157
8158 Each virtual machine has a "current snapshot", identified by
8159 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8160 to the last snapshot in the chain. In a future version of VirtualBox,
8161 it will be possible to reset a machine's current state to that of an
8162 earlier snapshot without deleting the current state so that it will be
8163 possible to create alternative snapshot paths in a snapshot tree.
8164
8165 In the current implementation, multiple snapshot branches within one
8166 virtual machine are not allowed. Every machine has a single branch,
8167 and <link to="IConsole::takeSnapshot"/> operation adds a new
8168 snapshot to the top of that branch.
8169 </desc>
8170
8171 <attribute name="id" type="uuid" mod="string" readonly="yes">
8172 <desc>UUID of the snapshot.</desc>
8173 </attribute>
8174
8175 <attribute name="name" type="wstring">
8176 <desc>Short name of the snapshot.</desc>
8177 </attribute>
8178
8179 <attribute name="description" type="wstring">
8180 <desc>Optional description of the snapshot.</desc>
8181 </attribute>
8182
8183 <attribute name="timeStamp" type="long long" readonly="yes">
8184 <desc>
8185 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8186 </desc>
8187 </attribute>
8188
8189 <attribute name="online" type="boolean" readonly="yes">
8190 <desc>
8191 @c true if this snapshot is an online snapshot and @c false otherwise.
8192
8193 When this attribute is @c true, the
8194 <link to="IMachine::stateFilePath"/> attribute of the
8195 <link to="#machine"/> object associated with this snapshot
8196 will point to the saved state file. Otherwise, it will be
8197 an empty string.
8198 </desc>
8199 </attribute>
8200
8201 <attribute name="machine" type="IMachine" readonly="yes">
8202 <desc>
8203 Virtual machine this snapshot is taken on. This object
8204 stores all settings the machine had when taking this snapshot.
8205 <note>
8206 The returned machine object is immutable, i.e. no
8207 any settings can be changed.
8208 </note>
8209 </desc>
8210 </attribute>
8211
8212 <attribute name="parent" type="ISnapshot" readonly="yes">
8213 <desc>
8214 Parent snapshot (a snapshot this one is based on), or
8215 @c null if the snapshot has no parent (i.e. is the first snapshot).
8216 </desc>
8217 </attribute>
8218
8219 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8220 <desc>
8221 Child snapshots (all snapshots having this one as a parent).
8222 </desc>
8223 </attribute>
8224
8225 </interface>
8226
8227
8228 <!--
8229 // IMedium
8230 /////////////////////////////////////////////////////////////////////////
8231 -->
8232
8233 <enum
8234 name="MediumState"
8235 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8236 >
8237 <desc>
8238 Virtual medium state.
8239 <see>IMedium</see>
8240 </desc>
8241
8242 <const name="NotCreated" value="0">
8243 <desc>
8244 Associated medium storage does not exist (either was not created yet or
8245 was deleted).
8246 </desc>
8247 </const>
8248 <const name="Created" value="1">
8249 <desc>
8250 Associated storage exists and accessible; this gets set if the
8251 accessibility check performed by <link to="IMedium::refreshState" />
8252 was successful.
8253 </desc>
8254 </const>
8255 <const name="LockedRead" value="2">
8256 <desc>
8257 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8258 no data modification is possible.
8259 </desc>
8260 </const>
8261 <const name="LockedWrite" value="3">
8262 <desc>
8263 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8264 no concurrent data reading or modification is possible.
8265 </desc>
8266 </const>
8267 <const name="Inaccessible" value="4">
8268 <desc>
8269 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8270 not yet been performed, or else, associated medium storage is not
8271 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8272 is empty, in the second case, it describes the error that occured.
8273 </desc>
8274 </const>
8275 <const name="Creating" value="5">
8276 <desc>
8277 Associated medium storage is being created.
8278 </desc>
8279 </const>
8280 <const name="Deleting" value="6">
8281 <desc>
8282 Associated medium storage is being deleted.
8283 </desc>
8284 </const>
8285 </enum>
8286
8287 <enum
8288 name="MediumType"
8289 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
8290 >
8291 <desc>
8292 Virtual medium type.
8293 <see>IMedium</see>
8294 </desc>
8295
8296 <const name="Normal" value="0">
8297 <desc>
8298 Normal medium (attached directly or indirectly, preserved
8299 when taking snapshots).
8300 </desc>
8301 </const>
8302 <const name="Immutable" value="1">
8303 <desc>
8304 Immutable medium (attached indirectly, changes are wiped out
8305 the next time the virtual machine is started).
8306 </desc>
8307 </const>
8308 <const name="Writethrough" value="2">
8309 <desc>
8310 Write through medium (attached directly, ignored when
8311 taking snapshots).
8312 </desc>
8313 </const>
8314 <const name="Shareable" value="3">
8315 <desc>
8316 Allow using this medium concurrently by several machines.
8317 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8318 </desc>
8319 </const>
8320 </enum>
8321
8322 <enum
8323 name="MediumVariant"
8324 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8325 >
8326 <desc>
8327 Virtual medium image variant. More than one flag may be set.
8328 <see>IMedium</see>
8329 </desc>
8330
8331 <const name="Standard" value="0">
8332 <desc>
8333 No particular variant requested, results in using the backend default.
8334 </desc>
8335 </const>
8336 <const name="VmdkSplit2G" value="0x01">
8337 <desc>
8338 VMDK image split in chunks of less than 2GByte.
8339 </desc>
8340 </const>
8341 <const name="VmdkStreamOptimized" value="0x04">
8342 <desc>
8343 VMDK streamOptimized image. Special import/export format which is
8344 read-only/append-only.
8345 </desc>
8346 </const>
8347 <const name="VmdkESX" value="0x08">
8348 <desc>
8349 VMDK format variant used on ESX products.
8350 </desc>
8351 </const>
8352 <const name="Fixed" value="0x10000">
8353 <desc>
8354 Fixed image. Only allowed for base images.
8355 </desc>
8356 </const>
8357 <const name="Diff" value="0x20000">
8358 <desc>
8359 Differencing image. Only allowed for child images.
8360 </desc>
8361 </const>
8362 </enum>
8363
8364 <interface
8365 name="IMediumAttachment" extends="$unknown"
8366 uuid="c29452cc-ca72-404b-9261-cfc514f1e412"
8367 wsmap="struct"
8368 >
8369 <desc>
8370 The IMediumAttachment interface links storage media to virtual machines.
8371 For each medium (<link to="IMedium"/>) which has been attached to a
8372 storage controller (<link to="IStorageController"/>) of a machine
8373 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8374 method, one instance of IMediumAttachment is added to the machine's
8375 <link to="IMachine::mediumAttachments"/> array attribute.
8376
8377 Each medium attachment specifies the storage controller as well as a
8378 port and device number and the IMedium instance representing a virtual
8379 hard disk or floppy or DVD image.
8380
8381 For removeable media (DVDs or floppies), there are two additional
8382 options. For one, the IMedium instance can be @c null to represent
8383 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8384 secondly, the medium can be one of the pseudo-media for host drives
8385 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8386 </desc>
8387
8388 <attribute name="medium" type="IMedium" readonly="yes">
8389 <desc>Medium object associated with this attachment; it
8390 can be @c null for removable devices.</desc>
8391 </attribute>
8392
8393 <attribute name="controller" type="wstring" readonly="yes">
8394 <desc>Name of the storage controller of this attachment; this
8395 refers to one of the controllers in <link to="IMachine::storageControllers" />
8396 by name.</desc>
8397 </attribute>
8398
8399 <attribute name="port" type="long" readonly="yes">
8400 <desc>Port number of this attachment.
8401 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8402 </desc>
8403 </attribute>
8404
8405 <attribute name="device" type="long" readonly="yes">
8406 <desc>Device slot number of this attachment.
8407 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8408 </desc>
8409 </attribute>
8410
8411 <attribute name="type" type="DeviceType" readonly="yes">
8412 <desc>Device type of this attachment.</desc>
8413 </attribute>
8414
8415 <attribute name="passthrough" type="boolean" readonly="yes">
8416 <desc>Pass I/O requests through to a device on the host.</desc>
8417 </attribute>
8418
8419 <attribute name="bandwidthLimit" type="unsigned long">
8420 <desc>
8421 Maximum throughput allowed for this medium attachment, in units of 1 mbps.
8422 A zero value means uncapped/unlimited.
8423 </desc>
8424 </attribute>
8425
8426 </interface>
8427
8428 <interface
8429 name="IMedium" extends="$unknown"
8430 uuid="858ea9d3-9ade-4aa7-91b7-d8a40f8f9b16"
8431 wsmap="managed"
8432 >
8433 <desc>
8434 The IMedium interface represents virtual storage for a machine's
8435 hard disks, CD/DVD or floppy drives. It will typically represent
8436 a disk image on the host, for example a VDI or VMDK file representing
8437 a virtual hard disk, or an ISO or RAW file representing virtual
8438 removable media, but can also point to a network location (e.g.
8439 for iSCSI targets).
8440
8441 Instances of IMedium are connected to virtual machines by way of
8442 medium attachments (see <link to="IMediumAttachment" />), which link
8443 the storage medium to a particular device slot of a storage controller
8444 of the virtual machine.
8445 In the VirtualBox API, virtual storage is therefore always represented
8446 by the following chain of object links:
8447
8448 <ul>
8449 <li><link to="IMachine::storageControllers"/> contains an array of
8450 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8451 these are instances of <link to="IStorageController"/>).</li>
8452 <li><link to="IMachine::mediumAttachments"/> contains an array of
8453 medium attachments (instances of <link to="IMediumAttachment"/>),
8454 each containing a storage controller from the above array, a
8455 port/device specification, and an instance of IMedium representing
8456 the medium storage (image file).
8457
8458 For removable media, the storage medium is optional; a medium
8459 attachment with no medium represents a CD/DVD or floppy drive
8460 with no medium inserted. By contrast, hard disk attachments
8461 will always have an IMedium object attached.</li>
8462 <li>Each IMedium in turn points to a storage unit (such as a file
8463 on the host computer or a network resource) that holds actual
8464 data. This location is represented by the <link to="#location"/>
8465 attribute.</li>
8466 </ul>
8467
8468 Existing media are opened using <link to="IVirtualBox::openMedium"/>;
8469 new hard disk media can be created with the VirtualBox API using the
8470 <link to="IVirtualBox::createHardDisk"/> method.
8471
8472 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8473 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8474 type in a regular file.
8475
8476 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8477 drive; in that case the <link to="#id" /> attribute contains the UUID of
8478 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8479
8480 <h3>Known media</h3>
8481
8482 When an existing medium is opened for the first time, it is automatically
8483 remembered by the given VirtualBox installation or, in other words, becomes
8484 a <i>known medium</i>. Known media are stored in the media
8485 registry transparently maintained by VirtualBox and stored in settings
8486 files so that this registry is preserved when VirtualBox is not running.
8487
8488 Newly created virtual media are remembered only when the associated
8489 storage unit is actually created.
8490
8491 All known media can be enumerated using
8492 <link to="IVirtualBox::hardDisks"/>,
8493 <link to="IVirtualBox::DVDImages"/> and
8494 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8495 quickly found using the <link to="IVirtualBox::findMedium"/> method.
8496
8497 Only known media can be attached to virtual machines.
8498
8499 Removing known media from the media registry is performed when the given
8500 medium is closed using the <link to="#close"/> method or when its
8501 associated storage unit is deleted.
8502
8503 <h3>Accessibility checks</h3>
8504
8505 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8506 method is called explicitly on a medium. This is done to make the VirtualBox object
8507 ready for serving requests as fast as possible and let the end-user
8508 application decide if it needs to check media accessibility right away or not.
8509
8510 As a result, when VirtualBox starts up (e.g. the VirtualBox
8511 object gets created for the first time), all known media are in the
8512 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8513 attribute is an empty string because no actual accessibility check has
8514 been made yet.
8515
8516 After calling <link to="#refreshState" />, a medium is considered
8517 <i>accessible</i> if its storage unit can be read. In that case, the
8518 <link to="#state"/> attribute has a value of "Created". If the storage
8519 unit cannot be read (for example, because it is located on a disconnected
8520 network resource, or was accidentally deleted outside VirtualBox),
8521 the medium is considered <i>inaccessible</i>, which is indicated by the
8522 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8523 obtained by reading the <link to="#lastAccessError"/> attribute.
8524
8525 <h3>Medium types</h3>
8526
8527 There are four types of medium behavior (see <link to="MediumType" />):
8528 "normal", "immutable", "writethrough" and "shareable", represented by the
8529 <link to="#type"/> attribute. The type of the medium defines how the
8530 medium is attached to a virtual machine and what happens when a
8531 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8532 attached medium is taken. At the moment DVD and floppy media are always
8533 of type "writethrough".
8534
8535 All media can be also divided in two groups: <i>base</i> media and
8536 <i>differencing</i> media. A base medium contains all sectors of the
8537 medium data in its own storage and therefore can be used independently.
8538 In contrast, a differencing mediun is a "delta" to some other medium and
8539 contains only those sectors which differ from that other medium, which is
8540 then called a <i>parent</i>. The differencing medium is said to be
8541 <i>linked to</i> that parent. The parent may be itself a differencing
8542 medium, thus forming a chain of linked media. The last element in that
8543 chain must always be a base medium. Note that several differencing
8544 media may be linked to the same parent medium.
8545
8546 Differencing media can be distinguished from base media by querying the
8547 <link to="#parent"/> attribute: base media do not have parents they would
8548 depend on, so the value of this attribute is always @c null for them.
8549 Using this attribute, it is possible to walk up the medium tree (from the
8550 child medium to its parent). It is also possible to walk down the tree
8551 using the <link to="#children"/> attribute.
8552
8553 Note that the type of all differencing media is "normal"; all other
8554 values are meaningless for them. Base media may be of any type.
8555
8556 <h3>Creating hard disks</h3>
8557
8558 New base hard disks are created using
8559 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8560 opened using <link to="IVirtualBox::openMedium"/>. Differencing hard
8561 disks are usually implicitly created by VirtualBox when needed but may
8562 also be created explicitly using <link to="#createDiffStorage"/>.
8563
8564 After the hard disk is successfully created (including the storage unit)
8565 or opened, it becomes a known hard disk (remembered in the internal media
8566 registry). Known hard disks can be attached to a virtual machine, accessed
8567 through <link to="IVirtualBox::findMedium"/> or enumerated using the
8568 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8569
8570 The following methods, besides <link to="IMedium::close"/>,
8571 automatically remove the hard disk from the media registry:
8572 <ul>
8573 <li><link to="#deleteStorage"/></li>
8574 <li><link to="#mergeTo"/></li>
8575 </ul>
8576
8577 If the storage unit of the hard disk is a regular file in the host's
8578 file system then the rules stated in the description of the
8579 <link to="IMedium::location"/> attribute apply when setting its value. In
8580 addition, a plain file name without any path may be given, in which case
8581 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8582 folder</link> will be prepended to it.
8583
8584 <h4>Automatic composition of the file name part</h4>
8585
8586 Another extension to the <link to="IMedium::location"/> attribute is that
8587 there is a possibility to cause VirtualBox to compose a unique value for
8588 the file name part of the location using the UUID of the hard disk. This
8589 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8590 e.g. before the storage unit is created, and works as follows. You set the
8591 value of the <link to="IMedium::location"/> attribute to a location
8592 specification which only contains the path specification but not the file
8593 name part and ends with either a forward slash or a backslash character.
8594 In response, VirtualBox will generate a new UUID for the hard disk and
8595 compose the file name using the following pattern:
8596 <pre>
8597 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8598 </pre>
8599 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8600 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8601 is the default extension for the storage format of this hard disk. After
8602 that, you may call any of the methods that create a new hard disk storage
8603 unit and they will use the generated UUID and file name.
8604
8605 <h3>Attaching Hard Disks</h3>
8606
8607 Hard disks are attached to virtual machines using the
8608 <link to="IMachine::attachDevice"/> method and detached using the
8609 <link to="IMachine::detachDevice"/> method. Depending on their
8610 <link to="#type"/>, hard disks are attached either
8611 <i>directly</i> or <i>indirectly</i>.
8612
8613 When a hard disk is being attached directly, it is associated with the
8614 virtual machine and used for hard disk operations when the machine is
8615 running. When a hard disk is being attached indirectly, a new differencing
8616 hard disk linked to it is implicitly created and this differencing hard
8617 disk is associated with the machine and used for hard disk operations.
8618 This also means that if <link to="IMachine::attachDevice"/> performs
8619 a direct attachment then the same hard disk will be returned in response
8620 to the subsequent <link to="IMachine::getMedium"/> call; however if
8621 an indirect attachment is performed then
8622 <link to="IMachine::getMedium"/> will return the implicitly created
8623 differencing hard disk, not the original one passed to <link
8624 to="IMachine::attachDevice"/>. In detail:
8625
8626 <ul>
8627 <li><b>Normal base</b> hard disks that do not have children (i.e.
8628 differencing hard disks linked to them) and that are not already
8629 attached to virtual machines in snapshots are attached <b>directly</b>.
8630 Otherwise, they are attached <b>indirectly</b> because having
8631 dependent children or being part of the snapshot makes it impossible
8632 to modify hard disk contents without breaking the integrity of the
8633 dependent party. The <link to="#readOnly"/> attribute allows to
8634 quickly determine the kind of the attachment for the given hard
8635 disk. Note that if a normal base hard disk is to be indirectly
8636 attached to a virtual machine with snapshots then a special
8637 procedure called <i>smart attachment</i> is performed (see below).</li>
8638 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8639 they are attached <b>directly</b> if they do not have children and are
8640 not attached to virtual machines in snapshots, and <b>indirectly</b>
8641 otherwise. Note that the smart attachment procedure is never performed
8642 for differencing hard disks.</li>
8643 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8644 they are designed to be non-writable. If an immutable hard disk is
8645 attached to a virtual machine with snapshots then a special
8646 procedure called smart attachment is performed (see below).</li>
8647 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8648 also as designed. This also means that writethrough hard disks cannot
8649 have other hard disks linked to them at all.</li>
8650 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
8651 also as designed. This also means that shareable hard disks cannot
8652 have other hard disks linked to them at all. They behave almost
8653 like writethrough hard disks, except that shareable hard disks can
8654 be attached to several virtual machines which are running, allowing
8655 concurrent accesses. You need special cluster software running in
8656 the virtual machines to make use of such disks.</li>
8657 </ul>
8658
8659 Note that the same hard disk, regardless of its type, may be attached to
8660 more than one virtual machine at a time. In this case, the machine that is
8661 started first gains exclusive access to the hard disk and attempts to
8662 start other machines having this hard disk attached will fail until the
8663 first machine is powered down.
8664
8665 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8666 that the given hard disk remains associated with the given machine after a
8667 successful <link to="IMachine::detachDevice"/> call until
8668 <link to="IMachine::saveSettings"/> is called to save all changes to
8669 machine settings to disk. This deferring is necessary to guarantee that
8670 the hard disk configuration may be restored at any time by a call to
8671 <link to="IMachine::discardSettings"/> before the settings
8672 are saved (committed).
8673
8674 Note that if <link to="IMachine::discardSettings"/> is called after
8675 indirectly attaching some hard disks to the machine but before a call to
8676 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8677 all differencing hard disks implicitly created by
8678 <link to="IMachine::attachDevice"/> for these indirect attachments.
8679 Such implicitly created hard disks will also be immediately deleted when
8680 detached explicitly using the <link to="IMachine::detachDevice"/>
8681 call if it is made before <link to="IMachine::saveSettings"/>. This
8682 implicit deletion is safe because newly created differencing hard
8683 disks do not contain any user data.
8684
8685 However, keep in mind that detaching differencing hard disks that were
8686 implicitly created by <link to="IMachine::attachDevice"/>
8687 before the last <link to="IMachine::saveSettings"/> call will
8688 <b>not</b> implicitly delete them as they may already contain some data
8689 (for example, as a result of virtual machine execution). If these hard
8690 disks are no more necessary, the caller can always delete them explicitly
8691 using <link to="#deleteStorage"/> after they are actually de-associated
8692 from this machine by the <link to="IMachine::saveSettings"/> call.
8693
8694 <h3>Smart Attachment</h3>
8695
8696 When normal base or immutable hard disks are indirectly attached to a
8697 virtual machine then some additional steps are performed to make sure the
8698 virtual machine will have the most recent "view" of the hard disk being
8699 attached. These steps include walking through the machine's snapshots
8700 starting from the current one and going through ancestors up to the first
8701 snapshot. Hard disks attached to the virtual machine in all
8702 of the encountered snapshots are checked whether they are descendants of
8703 the given normal base or immutable hard disk. The first found child (which
8704 is the differencing hard disk) will be used instead of the normal base or
8705 immutable hard disk as a parent for creating a new differencing hard disk
8706 that will be actually attached to the machine. And only if no descendants
8707 are found or if the virtual machine does not have any snapshots then the
8708 normal base or immutable hard disk will be used itself as a parent for
8709 this differencing hard disk.
8710
8711 It is easier to explain what smart attachment does using the
8712 following example:
8713 <pre>
8714BEFORE attaching B.vdi: AFTER attaching B.vdi:
8715
8716Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8717 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8718 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8719 Snapshot 4 (none) Snapshot 4 (none)
8720 CurState (none) CurState (D3->D2.vdi)
8721
8722 NOT
8723 ...
8724 CurState (D3->B.vdi)
8725 </pre>
8726 The first column is the virtual machine configuration before the base hard
8727 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8728 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8729 mean that the hard disk that is actually attached to the machine is a
8730 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8731 another hard disk, <tt>B.vdi</tt>.
8732
8733 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8734 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8735 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8736 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8737 it cannot be attached directly and needs an indirect attachment (i.e.
8738 implicit creation of a new differencing hard disk). Due to the smart
8739 attachment procedure, the new differencing hard disk
8740 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8741 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8742 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8743 machine.
8744
8745 Note that if there is more than one descendant hard disk of the given base
8746 hard disk found in a snapshot, and there is an exact device, channel and
8747 bus match, then this exact match will be used. Otherwise, the youngest
8748 descendant will be picked up.
8749
8750 There is one more important aspect of the smart attachment procedure which
8751 is not related to snapshots at all. Before walking through the snapshots
8752 as described above, the backup copy of the current list of hard disk
8753 attachment is searched for descendants. This backup copy is created when
8754 the hard disk configuration is changed for the first time after the last
8755 <link to="IMachine::saveSettings"/> call and used by
8756 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8757 changes. When such a descendant is found in this backup copy, it will be
8758 simply re-attached back, without creating a new differencing hard disk for
8759 it. This optimization is necessary to make it possible to re-attach the
8760 base or immutable hard disk to a different bus, channel or device slot
8761 without losing the contents of the differencing hard disk actually
8762 attached to the machine in place of it.
8763 </desc>
8764
8765 <attribute name="id" type="uuid" mod="string" readonly="yes">
8766 <desc>
8767 UUID of the medium. For a newly created medium, this value is a randomly
8768 generated UUID.
8769
8770 <note>
8771 For media in one of MediumState_NotCreated, MediumState_Creating or
8772 MediumState_Deleting states, the value of this property is undefined
8773 and will most likely be an empty UUID.
8774 </note>
8775 </desc>
8776 </attribute>
8777
8778 <attribute name="description" type="wstring">
8779 <desc>
8780 Optional description of the medium. For a newly created medium the value
8781 of this attribute is an empty string.
8782
8783 Medium types that don't support this attribute will return E_NOTIMPL in
8784 attempt to get or set this attribute's value.
8785
8786 <note>
8787 For some storage types, reading this attribute may return an outdated
8788 (last known) value when <link to="#state"/> is <link
8789 to="MediumState_Inaccessible"/> or <link
8790 to="MediumState_LockedWrite"/> because the value of this attribute is
8791 stored within the storage unit itself. Also note that changing the
8792 attribute value is not possible in such case, as well as when the
8793 medium is the <link to="MediumState_LockedRead"/> state.
8794 </note>
8795 </desc>
8796 </attribute>
8797
8798 <attribute name="state" type="MediumState" readonly="yes">
8799 <desc>
8800 Returns the current medium state, which is the last state set by
8801 the accessibility check performed by <link to="#refreshState"/>.
8802 If that method has not yet been called on the medium, the state
8803 is "Inaccessible"; as opposed to truly inaccessible media, the
8804 value of <link to="#lastAccessError"/> will be an empty string in
8805 that case.
8806
8807 <note>As of version 3.1, this no longer performs an accessibility check
8808 automatically; call <link to="#refreshState"/> for that.
8809 </note>
8810 </desc>
8811 </attribute>
8812
8813 <attribute name="variant" type="MediumVariant" readonly="yes">
8814 <desc>
8815 Returns the storage format variant information for this medium.
8816 Before <link to="#refreshState"/> is called this method returns
8817 an undefined value.
8818 </desc>
8819 </attribute>
8820
8821 <attribute name="location" type="wstring">
8822 <desc>
8823 Location of the storage unit holding medium data.
8824
8825 The format of the location string is medium type specific. For medium
8826 types using regular files in a host's file system, the location
8827 string is the full file name.
8828
8829 Some medium types may support changing the storage unit location by
8830 simply changing the value of this property. If this operation is not
8831 supported, the implementation will return E_NOTIMPL in attempt to set
8832 this attribute's value.
8833
8834 When setting a value of the location attribute which is a regular file
8835 in the host's file system, the given file name may be either relative to
8836 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8837 absolute. Note that if the given location specification does not contain
8838 the file extension part then a proper default extension will be
8839 automatically appended by the implementation depending on the medium type.
8840 </desc>
8841 </attribute>
8842
8843 <attribute name="name" type="wstring" readonly="yes">
8844 <desc>
8845 Name of the storage unit holding medium data.
8846
8847 The returned string is a short version of the <link to="#location"/>
8848 attribute that is suitable for representing the medium in situations
8849 where the full location specification is too long (such as lists
8850 and comboboxes in GUI frontends). This string is also used by frontends
8851 to sort the media list alphabetically when needed.
8852
8853 For example, for locations that are regular files in the host's file
8854 system, the value of this attribute is just the file name (+ extension),
8855 without the path specification.
8856
8857 Note that as opposed to the <link to="#location"/> attribute, the name
8858 attribute will not necessary be unique for a list of media of the
8859 given type and format.
8860 </desc>
8861 </attribute>
8862
8863 <attribute name="deviceType" type="DeviceType" readonly="yes">
8864 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8865 medium.</desc>
8866 </attribute>
8867
8868 <attribute name="hostDrive" type="boolean" readonly="yes">
8869 <desc>True if this corresponds to a drive on the host.</desc>
8870 </attribute>
8871
8872 <attribute name="size" type="unsigned long long" readonly="yes">
8873 <desc>
8874 Physical size of the storage unit used to hold medium data (in bytes).
8875
8876 <note>
8877 For media whose <link to="#state"/> is <link
8878 to="MediumState_Inaccessible"/>, the value of this property is the
8879 last known size. For <link to="MediumState_NotCreated"/> media,
8880 the returned value is zero.
8881 </note>
8882 </desc>
8883 </attribute>
8884
8885 <attribute name="format" type="wstring" readonly="yes">
8886 <desc>
8887 Storage format of this medium.
8888
8889 The value of this attribute is a string that specifies a backend used
8890 to store medium data. The storage format is defined when you create a
8891 new medium or automatically detected when you open an existing medium,
8892 and cannot be changed later.
8893
8894 The list of all storage formats supported by this VirtualBox
8895 installation can be obtained using
8896 <link to="ISystemProperties::mediumFormats"/>.
8897 </desc>
8898 </attribute>
8899
8900 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
8901 <desc>
8902 Storage medium format object corresponding to this medium.
8903
8904 The value of this attribute is a reference to the medium format object
8905 that specifies the backend properties used to store medium data. The
8906 storage format is defined when you create a new medium or automatically
8907 detected when you open an existing medium, and cannot be changed later.
8908
8909 <note>@c null is returned if there is no associated medium format
8910 object. This can e.g. happen for medium objects representing host
8911 drives and other special medium objects.</note>
8912 </desc>
8913 </attribute>
8914
8915 <attribute name="type" type="MediumType">
8916 <desc>
8917 Type (role) of this medium.
8918
8919 The following constraints apply when changing the value of this
8920 attribute:
8921 <ul>
8922 <li>If a medium 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 medium has children, its type cannot be set
8927 to <link to="MediumType_Writethrough"/>.
8928 </li>
8929 <li>The type of all differencing media is
8930 <link to="MediumType_Normal"/> and cannot be changed.
8931 </li>
8932 </ul>
8933
8934 The type of a newly created or opened medium is set to
8935 <link to="MediumType_Normal"/>, except for DVD and floppy media,
8936 which have a type of <link to="MediumType_Writethrough"/>.
8937 </desc>
8938 </attribute>
8939
8940 <attribute name="parent" type="IMedium" readonly="yes">
8941 <desc>
8942 Parent of this medium (the medium this medium is directly based
8943 on).
8944
8945 Only differencing media have parents. For base (non-differencing)
8946 media, @c null is returned.
8947 </desc>
8948 </attribute>
8949
8950 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8951 <desc>
8952 Children of this medium (all differencing media directly based
8953 on this medium). A @c null array is returned if this medium
8954 does not have any children.
8955 </desc>
8956 </attribute>
8957
8958 <attribute name="base" type="IMedium" readonly="yes">
8959 <desc>
8960 Base medium of this medium.
8961
8962 If this is a differencing medium, its base medium is the medium
8963 the given medium branch starts from. For all other types of media, this
8964 property returns the medium object itself (i.e. the same object this
8965 property is read on).
8966 </desc>
8967 </attribute>
8968
8969 <attribute name="readOnly" type="boolean" readonly="yes">
8970 <desc>
8971 Returns @c true if this medium is read-only and @c false otherwise.
8972
8973 A medium is considered to be read-only when its contents cannot be
8974 modified without breaking the integrity of other parties that depend on
8975 this medium such as its child media or snapshots of virtual machines
8976 where this medium is attached to these machines. If there are no
8977 children and no such snapshots then there is no dependency and the
8978 medium is not read-only.
8979
8980 The value of this attribute can be used to determine the kind of the
8981 attachment that will take place when attaching this medium to a
8982 virtual machine. If the value is @c false then the medium will
8983 be attached directly. If the value is @c true then the medium
8984 will be attached indirectly by creating a new differencing child
8985 medium for that. See the interface description for more information.
8986
8987 Note that all <link to="MediumType_Immutable">Immutable</link> media
8988 are always read-only while all
8989 <link to="MediumType_Writethrough">Writethrough</link> media are
8990 always not.
8991
8992 <note>
8993 The read-only condition represented by this attribute is related to
8994 the medium type and usage, not to the current
8995 <link to="IMedium::state">medium state</link> and not to the read-only
8996 state of the storage unit.
8997 </note>
8998 </desc>
8999 </attribute>
9000
9001 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9002 <desc>
9003 Logical size of this medium (in megabytes), as reported to the
9004 guest OS running inside the virtual machine this medium is
9005 attached to. The logical size is defined when the medium is created
9006 and cannot be changed later.
9007
9008 <note>
9009 Reading this property on a differencing medium will return the size
9010 of its <link to="#base"/> medium.
9011 </note>
9012 <note>
9013 For media whose state is <link to="#state"/> is <link
9014 to="MediumState_Inaccessible"/>, the value of this property is the
9015 last known logical size. For <link to="MediumState_NotCreated"/>
9016 media, the returned value is zero.
9017 </note>
9018 </desc>
9019 </attribute>
9020
9021 <attribute name="autoReset" type="boolean">
9022 <desc>
9023 Whether this differencing medium will be automatically reset each
9024 time a virtual machine it is attached to is powered up. This
9025 attribute is automatically set to @c true for the last
9026 differencing image of an "immutable" medium (see
9027 <link to="MediumType" />).
9028
9029 See <link to="#reset"/> for more information about resetting
9030 differencing media.
9031
9032 <note>
9033 Reading this property on a base (non-differencing) medium will
9034 always @c false. Changing the value of this property in this
9035 case is not supported.
9036 </note>
9037
9038 <result name="VBOX_E_NOT_SUPPORTED">
9039 This is not a differencing medium (when changing the attribute
9040 value).
9041 </result>
9042 </desc>
9043 </attribute>
9044
9045 <attribute name="lastAccessError" type="wstring" readonly="yes">
9046 <desc>
9047 Text message that represents the result of the last accessibility
9048 check performed by <link to="#refreshState"/>.
9049
9050 An empty string is returned if the last accessibility check
9051 was successful or has not yet been called. As a result, if
9052 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9053 then <link to="#refreshState"/> has yet to be called; this is the
9054 default value of media after VirtualBox initialization.
9055 A non-empty string indicates a failure and should normally describe
9056 a reason of the failure (for example, a file read error).
9057 </desc>
9058 </attribute>
9059
9060 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9061 <desc>
9062 Array of UUIDs of all machines this medium is attached to.
9063
9064 A @c null array is returned if this medium is not attached to any
9065 machine or to any machine's snapshot.
9066
9067 <note>
9068 The returned array will include a machine even if this medium is not
9069 attached to that machine in the current state but attached to it in
9070 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9071 details.
9072 </note>
9073 </desc>
9074 </attribute>
9075
9076 <method name="setIDs">
9077 <desc>
9078 Changes the UUID and parent UUID for a hard disk medium.
9079 </desc>
9080 <param name="setImageId" type="boolean" dir="in">
9081 <desc>
9082 Select whether a new image UUID is set or not.
9083 </desc>
9084 </param>
9085 <param name="imageId" type="uuid" mod="string" dir="in">
9086 <desc>
9087 New UUID for the image. If an empty string is passed, then a new
9088 UUID is automatically created, provided that @a setImageId is @c true.
9089 Specifying a zero UUID is not allowed.
9090 </desc>
9091 </param>
9092 <param name="setParentId" type="boolean" dir="in">
9093 <desc>
9094 Select whether a new parent UUID is set or not.
9095 </desc>
9096 </param>
9097 <param name="parentId" type="uuid" mod="string" dir="in">
9098 <desc>
9099 New parent UUID for the image. If an empty string is passed, then a
9100 new UUID is automatically created, provided @a setParentId is
9101 @c true. A zero UUID is valid.
9102 </desc>
9103 </param>
9104 <result name="E_INVALIDARG">
9105 Invalid parameter combination.
9106 </result>
9107 <result name="VBOX_E_NOT_SUPPORTED">
9108 Medium is not a hard disk medium.
9109 </result>
9110 </method>
9111
9112 <method name="refreshState">
9113 <desc>
9114 If the current medium state (see <link to="MediumState"/>) is one of
9115 "Created", "Inaccessible" or "LockedRead", then this performs an
9116 accessibility check on the medium and sets the value of the <link to="#state"/>
9117 attribute accordingly; that value is also returned for convenience.
9118
9119 For all other state values, this does not perform a refresh but returns
9120 the state only.
9121
9122 The refresh, if performed, may take a long time (several seconds or even
9123 minutes, depending on the storage unit location and format) because it performs an
9124 accessibility check of the storage unit. This check may cause a significant
9125 delay if the storage unit of the given medium is, for example, a file located
9126 on a network share which is not currently accessible due to connectivity
9127 problems. In that case, the call will not return until a timeout
9128 interval defined by the host OS for this operation expires. For this reason,
9129 it is recommended to never read this attribute on the main UI thread to avoid
9130 making the UI unresponsive.
9131
9132 If the last known state of the medium is "Created" and the accessibility
9133 check fails, then the state would be set to "Inaccessible", and
9134 <link to="#lastAccessError"/> may be used to get more details about the
9135 failure. If the state of the medium is "LockedRead", then it remains the
9136 same, and a non-empty value of <link to="#lastAccessError"/> will
9137 indicate a failed accessibility check in this case.
9138
9139 Note that not all medium states are applicable to all medium types.
9140 </desc>
9141 <param name="state" type="MediumState" dir="return">
9142 <desc>
9143 New medium state.
9144 </desc>
9145 </param>
9146 </method>
9147
9148 <method name="getSnapshotIds">
9149 <desc>
9150 Returns an array of UUIDs of all snapshots of the given machine where
9151 this medium is attached to.
9152
9153 If the medium is attached to the machine in the current state, then the
9154 first element in the array will always be the ID of the queried machine
9155 (i.e. the value equal to the @c machineId argument), followed by
9156 snapshot IDs (if any).
9157
9158 If the medium is not attached to the machine in the current state, then
9159 the array will contain only snapshot IDs.
9160
9161 The returned array may be @c null if this medium is not attached
9162 to the given machine at all, neither in the current state nor in one of
9163 the snapshots.
9164 </desc>
9165 <param name="machineId" type="uuid" mod="string" dir="in">
9166 <desc>
9167 UUID of the machine to query.
9168 </desc>
9169 </param>
9170 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9171 <desc>
9172 Array of snapshot UUIDs of the given machine using this medium.
9173 </desc>
9174 </param>
9175 </method>
9176
9177 <method name="lockRead">
9178 <desc>
9179 Locks this medium for reading.
9180
9181 A read lock is shared: many clients can simultaneously lock the
9182 same medium for reading unless it is already locked for writing (see
9183 <link to="#lockWrite"/>) in which case an error is returned.
9184
9185 When the medium is locked for reading, it cannot be modified
9186 from within VirtualBox. This means that any method that changes
9187 the properties of this medium or contents of the storage unit
9188 will return an error (unless explicitly stated otherwise). That
9189 includes an attempt to start a virtual machine that wants to
9190 write to the the medium.
9191
9192 When the virtual machine is started up, it locks for reading all
9193 media it uses in read-only mode. If some medium cannot be locked
9194 for reading, the startup procedure will fail.
9195 A medium is typically locked for reading while it is used by a running
9196 virtual machine but has a depending differencing image that receives
9197 the actual write operations. This way one base medium can have
9198 multiple child differencing images which can be written to
9199 simultaneously. Read-only media such as DVD and floppy images are
9200 also locked for reading only (so they can be in use by multiple
9201 machines simultaneously).
9202
9203 A medium is also locked for reading when it is the source of a
9204 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9205
9206 The medium locked for reading must be unlocked using the <link
9207 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9208 can be nested and must be followed by the same number of paired
9209 <link to="#unlockRead"/> calls.
9210
9211 This method sets the medium state (see <link to="#state"/>) to
9212 "LockedRead" on success. The medium's previous state must be
9213 one of "Created", "Inaccessible" or "LockedRead".
9214
9215 Locking an inaccessible medium is not an error; this method performs
9216 a logical lock that prevents modifications of this medium through
9217 the VirtualBox API, not a physical file-system lock of the underlying
9218 storage unit.
9219
9220 This method returns the current state of the medium
9221 <i>before</i> the operation.
9222
9223 <result name="VBOX_E_INVALID_OBJECT_STATE">
9224 Invalid medium state (e.g. not created, locked, inaccessible,
9225 creating, deleting).
9226 </result>
9227
9228 </desc>
9229 <param name="state" type="MediumState" dir="return">
9230 <desc>
9231 State of the medium after the operation.
9232 </desc>
9233 </param>
9234 </method>
9235
9236 <method name="unlockRead">
9237 <desc>
9238 Cancels the read lock previously set by <link to="#lockRead"/>.
9239
9240 For both success and failure, this method returns the current state
9241 of the medium <i>after</i> the operation.
9242
9243 See <link to="#lockRead"/> for more details.
9244
9245 <result name="VBOX_E_INVALID_OBJECT_STATE">
9246 Medium not locked for reading.
9247 </result>
9248
9249 </desc>
9250 <param name="state" type="MediumState" dir="return">
9251 <desc>
9252 State of the medium after the operation.
9253 </desc>
9254 </param>
9255 </method>
9256
9257 <method name="lockWrite">
9258 <desc>
9259 Locks this medium for writing.
9260
9261 A write lock, as opposed to <link to="#lockRead"/>, is
9262 exclusive: there may be only one client holding a write lock,
9263 and there may be no read locks while the write lock is held.
9264 As a result, read-locking fails if a write lock is held, and
9265 write-locking fails if either a read or another write lock is held.
9266
9267 When a medium is locked for writing, it cannot be modified
9268 from within VirtualBox, and it is not guaranteed that the values
9269 of its properties are up-to-date. Any method that changes the
9270 properties of this medium or contents of the storage unit will
9271 return an error (unless explicitly stated otherwise).
9272
9273 When a virtual machine is started up, it locks for writing all
9274 media it uses to write data to. If any medium could not be locked
9275 for writing, the startup procedure will fail. If a medium has
9276 differencing images, then while the machine is running, only
9277 the last ("leaf") differencing image is locked for writing,
9278 whereas its parents are locked for reading only.
9279
9280 A medium is also locked for writing when it is the target of a
9281 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9282
9283 The medium locked for writing must be unlocked using the <link
9284 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9285
9286 This method sets the medium state (see <link to="#state"/>) to
9287 "LockedWrite" on success. The medium's previous state must be
9288 either "Created" or "Inaccessible".
9289
9290 Locking an inaccessible medium is not an error; this method performs
9291 a logical lock that prevents modifications of this medium through
9292 the VirtualBox API, not a physical file-system lock of the underlying
9293 storage unit.
9294
9295 For both, success and failure, this method returns the current
9296 state of the medium <i>before</i> the operation.
9297
9298 <result name="VBOX_E_INVALID_OBJECT_STATE">
9299 Invalid medium state (e.g. not created, locked, inaccessible,
9300 creating, deleting).
9301 </result>
9302
9303 </desc>
9304 <param name="state" type="MediumState" dir="return">
9305 <desc>
9306 State of the medium after the operation.
9307 </desc>
9308 </param>
9309 </method>
9310
9311 <method name="unlockWrite">
9312 <desc>
9313 Cancels the write lock previously set by <link to="#lockWrite"/>.
9314
9315 For both success and failure, this method returns the current
9316 state of the medium <i>after</i> the operation.
9317
9318 See <link to="#lockWrite"/> for more details.
9319
9320 <result name="VBOX_E_INVALID_OBJECT_STATE">
9321 Medium not locked for writing.
9322 </result>
9323
9324 </desc>
9325 <param name="state" type="MediumState" dir="return">
9326 <desc>
9327 State of the medium after the operation.
9328 </desc>
9329 </param>
9330 </method>
9331
9332 <method name="close">
9333 <desc>
9334 Closes this medium.
9335
9336 The medium must not be attached to any known virtual machine
9337 and must not have any known child media, otherwise the
9338 operation will fail.
9339
9340 When the medium is successfully closed, it is removed from
9341 the list of registered media, but its storage unit is not
9342 deleted. In particular, this means that this medium can
9343 later be opened again using the <link to="IVirtualBox::openMedium"/>
9344 call.
9345
9346 Note that after this method successfully returns, the given medium
9347 object becomes uninitialized. This means that any attempt
9348 to call any of its methods or attributes will fail with the
9349 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9350
9351 <result name="VBOX_E_INVALID_OBJECT_STATE">
9352 Invalid medium state (other than not created, created or
9353 inaccessible).
9354 </result>
9355 <result name="VBOX_E_OBJECT_IN_USE">
9356 Medium attached to virtual machine.
9357 </result>
9358 <result name="VBOX_E_FILE_ERROR">
9359 Settings file not accessible.
9360 </result>
9361 <result name="VBOX_E_XML_ERROR">
9362 Could not parse the settings file.
9363 </result>
9364
9365 </desc>
9366 </method>
9367
9368 <!-- storage methods -->
9369
9370 <method name="getProperty">
9371 <desc>
9372 Returns the value of the custom medium property with the given name.
9373
9374 The list of all properties supported by the given medium format can
9375 be obtained with <link to="IMediumFormat::describeProperties"/>.
9376
9377 Note that if this method returns an empty string in @a value, the
9378 requested property is supported but currently not assigned any value.
9379
9380 <result name="VBOX_E_OBJECT_NOT_FOUND">
9381 Requested property does not exist (not supported by the format).
9382 </result>
9383 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9384 </desc>
9385 <param name="name" type="wstring" dir="in">
9386 <desc>Name of the property to get.</desc>
9387 </param>
9388 <param name="value" type="wstring" dir="return">
9389 <desc>Current property value.</desc>
9390 </param>
9391 </method>
9392
9393 <method name="setProperty">
9394 <desc>
9395 Sets the value of the custom medium property with the given name.
9396
9397 The list of all properties supported by the given medium format can
9398 be obtained with <link to="IMediumFormat::describeProperties"/>.
9399
9400 Note that setting the property value to @c null or an empty string is
9401 equivalent to deleting the existing value. A default value (if it is
9402 defined for this property) will be used by the format backend in this
9403 case.
9404
9405 <result name="VBOX_E_OBJECT_NOT_FOUND">
9406 Requested property does not exist (not supported by the format).
9407 </result>
9408 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9409 </desc>
9410 <param name="name" type="wstring" dir="in">
9411 <desc>Name of the property to set.</desc>
9412 </param>
9413 <param name="value" type="wstring" dir="in">
9414 <desc>Property value to set.</desc>
9415 </param>
9416 </method>
9417
9418 <method name="getProperties">
9419 <desc>
9420 Returns values for a group of properties in one call.
9421
9422 The names of the properties to get are specified using the @a names
9423 argument which is a list of comma-separated property names or
9424 an empty string if all properties are to be returned. Note that currently
9425 the value of this argument is ignored and the method always returns all
9426 existing properties.
9427
9428 The list of all properties supported by the given medium format can
9429 be obtained with <link to="IMediumFormat::describeProperties"/>.
9430
9431 The method returns two arrays, the array of property names corresponding
9432 to the @a names argument and the current values of these properties.
9433 Both arrays have the same number of elements with each elemend at the
9434 given index in the first array corresponds to an element at the same
9435 index in the second array.
9436
9437 Note that for properties that do not have assigned values,
9438 an empty string is returned at the appropriate index in the
9439 @a returnValues array.
9440
9441 </desc>
9442 <param name="names" type="wstring" dir="in">
9443 <desc>
9444 Names of properties to get.
9445 </desc>
9446 </param>
9447 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9448 <desc>Names of returned properties.</desc>
9449 </param>
9450 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9451 <desc>Values of returned properties.</desc>
9452 </param>
9453 </method>
9454
9455 <method name="setProperties">
9456 <desc>
9457 Sets values for a group of properties in one call.
9458
9459 The names of the properties to set are passed in the @a names
9460 array along with the new values for them in the @a values array. Both
9461 arrays have the same number of elements with each elemend at the given
9462 index in the first array corresponding to an element at the same index
9463 in the second array.
9464
9465 If there is at least one property name in @a names that is not valid,
9466 the method will fail before changing the values of any other properties
9467 from the @a names array.
9468
9469 Using this method over <link to="#setProperty"/> is preferred if you
9470 need to set several properties at once since it will result into less
9471 IPC calls.
9472
9473 The list of all properties supported by the given medium format can
9474 be obtained with <link to="IMediumFormat::describeProperties"/>.
9475
9476 Note that setting the property value to @c null or an empty string is
9477 equivalent to deleting the existing value. A default value (if it is
9478 defined for this property) will be used by the format backend in this
9479 case.
9480 </desc>
9481 <param name="names" type="wstring" safearray="yes" dir="in">
9482 <desc>Names of properties to set.</desc>
9483 </param>
9484 <param name="values" type="wstring" safearray="yes" dir="in">
9485 <desc>Values of properties to set.</desc>
9486 </param>
9487 </method>
9488
9489 <!-- storage methods -->
9490
9491 <method name="createBaseStorage">
9492 <desc>
9493 Starts creating a hard disk storage unit (fixed/dynamic, according
9494 to the variant flags) in in the background. The previous storage unit
9495 created for this object, if any, must first be deleted using
9496 <link to="#deleteStorage"/>, otherwise the operation will fail.
9497
9498 Before the operation starts, the medium is placed in
9499 <link to="MediumState_Creating"/> state. If the create operation
9500 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9501 state.
9502
9503 After the returned progress object reports that the operation has
9504 successfully completed, the medium state will be set to <link
9505 to="MediumState_Created"/>, the medium will be remembered by this
9506 VirtualBox installation and may be attached to virtual machines.
9507
9508 <result name="VBOX_E_NOT_SUPPORTED">
9509 The variant of storage creation operation is not supported. See <link
9510 to="IMediumFormat::capabilities"/>.
9511 </result>
9512 </desc>
9513 <param name="logicalSize" type="unsigned long long" dir="in">
9514 <desc>Maximum logical size of the medium in megabytes.</desc>
9515 </param>
9516 <param name="variant" type="MediumVariant" dir="in">
9517 <desc>Exact image variant which should be created.</desc>
9518 </param>
9519 <param name="progress" type="IProgress" dir="return">
9520 <desc>Progress object to track the operation completion.</desc>
9521 </param>
9522 </method>
9523
9524 <method name="deleteStorage">
9525 <desc>
9526 Starts deleting the storage unit of this medium.
9527
9528 The medium must not be attached to any known virtual machine and must
9529 not have any known child media, otherwise the operation will fail.
9530 It will also fail if there is no storage unit to delete or if deletion
9531 is already in progress, or if the medium is being in use (locked for
9532 read or for write) or inaccessible. Therefore, the only valid state for
9533 this operation to succeed is <link to="MediumState_Created"/>.
9534
9535 Before the operation starts, the medium is placed in
9536 <link to="MediumState_Deleting"/> state and gets removed from the list
9537 of remembered hard disks (media registry). If the delete operation
9538 fails, the medium will be remembered again and placed back to
9539 <link to="MediumState_Created"/> state.
9540
9541 After the returned progress object reports that the operation is
9542 complete, the medium state will be set to
9543 <link to="MediumState_NotCreated"/> and you will be able to use one of
9544 the storage creation methods to create it again.
9545
9546 <see>#close()</see>
9547
9548 <result name="VBOX_E_OBJECT_IN_USE">
9549 Medium is attached to a virtual machine.
9550 </result>
9551 <result name="VBOX_E_NOT_SUPPORTED">
9552 Storage deletion is not allowed because neither of storage creation
9553 operations are supported. See
9554 <link to="IMediumFormat::capabilities"/>.
9555 </result>
9556
9557 <note>
9558 If the deletion operation fails, it is not guaranteed that the storage
9559 unit still exists. You may check the <link to="IMedium::state"/> value
9560 to answer this question.
9561 </note>
9562 </desc>
9563 <param name="progress" type="IProgress" dir="return">
9564 <desc>Progress object to track the operation completion.</desc>
9565 </param>
9566 </method>
9567
9568 <!-- diff methods -->
9569
9570 <method name="createDiffStorage">
9571 <desc>
9572 Starts creating an empty differencing storage unit based on this
9573 medium in the format and at the location defined by the @a target
9574 argument.
9575
9576 The target medium must be in <link to="MediumState_NotCreated"/>
9577 state (i.e. must not have an existing storage unit). Upon successful
9578 completion, this operation will set the type of the target medium to
9579 <link to="MediumType_Normal"/> and create a storage unit necessary to
9580 represent the differencing medium data in the given format (according
9581 to the storage format of the target object).
9582
9583 After the returned progress object reports that the operation is
9584 successfully complete, the target medium gets remembered by this
9585 VirtualBox installation and may be attached to virtual machines.
9586
9587 <note>
9588 The medium will be set to <link to="MediumState_LockedRead"/>
9589 state for the duration of this operation.
9590 </note>
9591 <result name="VBOX_E_OBJECT_IN_USE">
9592 Medium not in @c NotCreated state.
9593 </result>
9594 </desc>
9595 <param name="target" type="IMedium" dir="in">
9596 <desc>Target medium.</desc>
9597 </param>
9598 <param name="variant" type="MediumVariant" dir="in">
9599 <desc>Exact image variant which should be created.</desc>
9600 </param>
9601 <param name="progress" type="IProgress" dir="return">
9602 <desc>Progress object to track the operation completion.</desc>
9603 </param>
9604 </method>
9605
9606 <method name="mergeTo">
9607 <desc>
9608 Starts merging the contents of this medium and all intermediate
9609 differencing media in the chain to the given target medium.
9610
9611 The target medium must be either a descendant of this medium or
9612 its ancestor (otherwise this method will immediately return a failure).
9613 It follows that there are two logical directions of the merge operation:
9614 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9615 ancestor (<i>backward merge</i>). Let us consider the following medium
9616 chain:
9617
9618 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9619
9620 Here, calling this method on the <tt>Base</tt> medium object with
9621 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9622 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9623 merge. Note that in both cases the contents of the resulting medium
9624 will be the same, the only difference is the medium object that takes
9625 the result of the merge operation. In case of the forward merge in the
9626 above example, the result will be written to <tt>Diff_2</tt>; in case of
9627 the backward merge, the result will be written to <tt>Base</tt>. In
9628 other words, the result of the operation is always stored in the target
9629 medium.
9630
9631 Upon successful operation completion, the storage units of all media in
9632 the chain between this (source) medium and the target medium, including
9633 the source medium itself, will be automatically deleted and the
9634 relevant medium objects (including this medium) will become
9635 uninitialized. This means that any attempt to call any of
9636 their methods or attributes will fail with the
9637 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9638 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9639 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9640 Note that <tt>Diff_2</tt> in this case will become a base medium
9641 itself since it will no longer be based on any other medium.
9642
9643 Considering the above, all of the following conditions must be met in
9644 order for the merge operation to succeed:
9645 <ul>
9646 <li>
9647 Neither this (source) medium nor any intermediate
9648 differencing medium in the chain between it and the target
9649 medium is attached to any virtual machine.
9650 </li>
9651 <li>
9652 Neither the source medium nor the target medium is an
9653 <link to="MediumType_Immutable"/> medium.
9654 </li>
9655 <li>
9656 The part of the medium tree from the source medium to the
9657 target medium is a linear chain, i.e. all medium in this
9658 chain have exactly one child which is the next medium in this
9659 chain. The only exception from this rule is the target medium in
9660 the forward merge operation; it is allowed to have any number of
9661 child media because the merge operation will not change its
9662 logical contents (as it is seen by the guest OS or by children).
9663 </li>
9664 <li>
9665 None of the involved media are in
9666 <link to="MediumState_LockedRead"/> or
9667 <link to="MediumState_LockedWrite"/> state.
9668 </li>
9669 </ul>
9670
9671 <note>
9672 This (source) medium and all intermediates will be placed to <link
9673 to="MediumState_Deleting"/> state and the target medium will be
9674 placed to <link to="MediumState_LockedWrite"/> state and for the
9675 duration of this operation.
9676 </note>
9677 </desc>
9678 <param name="target" type="IMedium" dir="in">
9679 <desc>Target medium.</desc>
9680 </param>
9681 <param name="progress" type="IProgress" dir="return">
9682 <desc>Progress object to track the operation completion.</desc>
9683 </param>
9684 </method>
9685
9686 <!-- clone method -->
9687
9688 <method name="cloneTo">
9689 <desc>
9690 Starts creating a clone of this medium in the format and at the
9691 location defined by the @a target argument.
9692
9693 The target medium must be either in <link to="MediumState_NotCreated"/>
9694 state (i.e. must not have an existing storage unit) or in
9695 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9696 big enough to hold the data or else the copy will be partial). Upon
9697 successful completion, the cloned medium will contain exactly the
9698 same sector data as the medium being cloned, except that in the
9699 first case a new UUID for the clone will be randomly generated, and in
9700 the second case the UUID will remain unchanged.
9701
9702 The @a parent argument defines which medium will be the parent
9703 of the clone. Passing a @c null reference indicates that the clone will
9704 be a base image, i.e. completely independent. It is possible to specify
9705 an arbitrary medium for this parameter, including the parent of the
9706 medium which is being cloned. Even cloning to a child of the source
9707 medium is possible. Note that when cloning to an existing image, the
9708 @a parent irgument is ignored.
9709
9710 After the returned progress object reports that the operation is
9711 successfully complete, the target medium gets remembered by this
9712 VirtualBox installation and may be attached to virtual machines.
9713
9714 <note>
9715 This medium will be placed to <link to="MediumState_LockedRead"/>
9716 state for the duration of this operation.
9717 </note>
9718 <result name="E_NOTIMPL">
9719 The specified cloning variant is not supported at the moment.
9720 </result>
9721 </desc>
9722 <param name="target" type="IMedium" dir="in">
9723 <desc>Target medium.</desc>
9724 </param>
9725 <param name="variant" type="MediumVariant" dir="in">
9726 <desc>Exact image variant which should be created.</desc>
9727 </param>
9728 <param name="parent" type="IMedium" dir="in">
9729 <desc>Parent of the cloned medium.</desc>
9730 </param>
9731 <param name="progress" type="IProgress" dir="return">
9732 <desc>Progress object to track the operation completion.</desc>
9733 </param>
9734 </method>
9735
9736 <!-- other methods -->
9737
9738 <method name="compact">
9739 <desc>
9740 Starts compacting of this medium. This means that the medium is
9741 transformed into a possibly more compact storage representation.
9742 This potentially creates temporary images, which can require a
9743 substantial amount of additional disk space.
9744
9745 This medium will be placed to <link to="MediumState_LockedWrite"/>
9746 state and all its parent media (if any) will be placed to
9747 <link to="MediumState_LockedRead"/> state for the duration of this
9748 operation.
9749
9750 Please note that the results can be either returned straight away,
9751 or later as the result of the background operation via the object
9752 returned via the @a progress parameter.
9753
9754 <result name="VBOX_E_NOT_SUPPORTED">
9755 Medium format does not support compacting (but potentially
9756 needs it).
9757 </result>
9758 </desc>
9759 <param name="progress" type="IProgress" dir="return">
9760 <desc>Progress object to track the operation completion.</desc>
9761 </param>
9762 </method>
9763
9764 <method name="resize">
9765 <desc>
9766 Starts resizing this medium. This means that the nominal size of the
9767 medium is set to the new value. Both increasing and decreasing the
9768 size is possible, and there are no safety checks, since VirtualBox
9769 does not make any assumptions about the medium contents.
9770
9771 Resizing usually needs additional disk space, and possibly also
9772 some temporary disk space. Note that resize does not create a full
9773 temporary copy of the medium, so the additional disk space requirement
9774 is usually much lower than using the clone operation.
9775
9776 This medium will be placed to <link to="MediumState_LockedWrite"/>
9777 state for the duration of this operation.
9778
9779 Please note that the results can be either returned straight away,
9780 or later as the result of the background operation via the object
9781 returned via the @a progress parameter.
9782
9783 <result name="VBOX_E_NOT_SUPPORTED">
9784 Medium format does not support resizing.
9785 </result>
9786 </desc>
9787 <param name="logicalSize" type="unsigned long long" dir="in">
9788 <desc>New nominal capacity of the medium in megabytes.</desc>
9789 </param>
9790 <param name="progress" type="IProgress" dir="return">
9791 <desc>Progress object to track the operation completion.</desc>
9792 </param>
9793 </method>
9794
9795 <method name="reset">
9796 <desc>
9797 Starts erasing the contents of this differencing medium.
9798
9799 This operation will reset the differencing medium to its initial
9800 state when it does not contain any sector data and any read operation is
9801 redirected to its parent medium. This automatically gets called
9802 during VM power-up for every medium whose <link to="#autoReset" />
9803 attribute is @c true.
9804
9805 The medium will be write-locked for the duration of this operation (see
9806 <link to="#lockWrite" />).
9807
9808 <result name="VBOX_E_NOT_SUPPORTED">
9809 This is not a differencing medium.
9810 </result>
9811 <result name="VBOX_E_INVALID_OBJECT_STATE">
9812 Medium is not in <link to="MediumState_Created"/> or
9813 <link to="MediumState_Inaccessible"/> state.
9814 </result>
9815 </desc>
9816 <param name="progress" type="IProgress" dir="return">
9817 <desc>Progress object to track the operation completion.</desc>
9818 </param>
9819 </method>
9820
9821 </interface>
9822
9823
9824 <!--
9825 // IMediumFormat
9826 /////////////////////////////////////////////////////////////////////////
9827 -->
9828
9829 <enum
9830 name="DataType"
9831 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9832 >
9833 <const name="Int32" value="0"/>
9834 <const name="Int8" value="1"/>
9835 <const name="String" value="2"/>
9836 </enum>
9837
9838 <enum
9839 name="DataFlags"
9840 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9841 >
9842 <const name="None" value="0x00"/>
9843 <const name="Mandatory" value="0x01"/>
9844 <const name="Expert" value="0x02"/>
9845 <const name="Array" value="0x04"/>
9846 <const name="FlagMask" value="0x07"/>
9847 </enum>
9848
9849 <enum
9850 name="MediumFormatCapabilities"
9851 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9852 >
9853 <desc>
9854 Medium format capability flags.
9855 </desc>
9856
9857 <const name="Uuid" value="0x01">
9858 <desc>
9859 Supports UUIDs as expected by VirtualBox code.
9860 </desc>
9861 </const>
9862
9863 <const name="CreateFixed" value="0x02">
9864 <desc>
9865 Supports creating fixed size images, allocating all space instantly.
9866 </desc>
9867 </const>
9868
9869 <const name="CreateDynamic" value="0x04">
9870 <desc>
9871 Supports creating dynamically growing images, allocating space on
9872 demand.
9873 </desc>
9874 </const>
9875
9876 <const name="CreateSplit2G" value="0x08">
9877 <desc>
9878 Supports creating images split in chunks of a bit less than 2 GBytes.
9879 </desc>
9880 </const>
9881
9882 <const name="Differencing" value="0x10">
9883 <desc>
9884 Supports being used as a format for differencing media (see <link
9885 to="IMedium::createDiffStorage"/>).
9886 </desc>
9887 </const>
9888
9889 <const name="Asynchronous" value="0x20">
9890 <desc>
9891 Supports asynchronous I/O operations for at least some configurations.
9892 </desc>
9893 </const>
9894
9895 <const name="File" value="0x40">
9896 <desc>
9897 The format backend operates on files (the <link to="IMedium::location"/>
9898 attribute of the medium specifies a file used to store medium
9899 data; for a list of supported file extensions see
9900 <link to="IMediumFormat::fileExtensions"/>).
9901 </desc>
9902 </const>
9903
9904 <const name="Properties" value="0x80">
9905 <desc>
9906 The format backend uses the property interface to configure the storage
9907 location and properties (the <link to="IMediumFormat::describeProperties"/>
9908 method is used to get access to properties supported by the given medium format).
9909 </desc>
9910 </const>
9911
9912 <const name="CapabilityMask" value="0xFF"/>
9913 </enum>
9914
9915 <interface
9916 name="IMediumFormat" extends="$unknown"
9917 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9918 wsmap="managed"
9919 >
9920 <desc>
9921 The IMediumFormat interface represents a medium format.
9922
9923 Each medium format has an associated backend which is used to handle
9924 media stored in this format. This interface provides information
9925 about the properties of the associated backend.
9926
9927 Each medium format is identified by a string represented by the
9928 <link to="#id"/> attribute. This string is used in calls like
9929 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9930 format.
9931
9932 The list of all supported medium formats can be obtained using
9933 <link to="ISystemProperties::mediumFormats"/>.
9934
9935 <see>IMedium</see>
9936 </desc>
9937
9938 <attribute name="id" type="wstring" readonly="yes">
9939 <desc>
9940 Identifier of this format.
9941
9942 The format identifier is a non-@c null non-empty ASCII string. Note that
9943 this string is case-insensitive. This means that, for example, all of
9944 the following strings:
9945 <pre>
9946 "VDI"
9947 "vdi"
9948 "VdI"</pre>
9949 refer to the same medium format.
9950
9951 This string is used in methods of other interfaces where it is necessary
9952 to specify a medium format, such as
9953 <link to="IVirtualBox::createHardDisk"/>.
9954 </desc>
9955 </attribute>
9956
9957 <attribute name="name" type="wstring" readonly="yes">
9958 <desc>
9959 Human readable description of this format.
9960
9961 Mainly for use in file open dialogs.
9962 </desc>
9963 </attribute>
9964
9965 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9966 <desc>
9967 Array of strings containing the supported file extensions.
9968
9969 The first extension in the array is the extension preferred by the
9970 backend. It is recommended to use this extension when specifying a
9971 location of the storage unit for a new medium.
9972
9973 Note that some backends do not work on files, so this array may be
9974 empty.
9975
9976 <see>IMediumFormat::capabilities</see>
9977 </desc>
9978 </attribute>
9979
9980 <attribute name="capabilities" type="unsigned long" readonly="yes">
9981 <desc>
9982 Capabilities of the format as a set of bit flags.
9983
9984 For the meaning of individual capability flags see
9985 <link to="MediumFormatCapabilities"/>.
9986 </desc>
9987 </attribute>
9988
9989 <method name="describeProperties">
9990 <desc>
9991 Returns several arrays describing the properties supported by this
9992 format.
9993
9994 An element with the given index in each array describes one
9995 property. Thus, the number of elements in each returned array is the
9996 same and corresponds to the number of supported properties.
9997
9998 The returned arrays are filled in only if the
9999 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10000 All arguments must be non-@c null.
10001
10002 <see>DataType</see>
10003 <see>DataFlags</see>
10004 </desc>
10005
10006 <param name="names" type="wstring" safearray="yes" dir="out">
10007 <desc>Array of property names.</desc>
10008 </param>
10009 <param name="description" type="wstring" safearray="yes" dir="out">
10010 <desc>Array of property descriptions.</desc>
10011 </param>
10012 <param name="types" type="DataType" safearray="yes" dir="out">
10013 <desc>Array of property types.</desc>
10014 </param>
10015 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10016 <desc>Array of property flags.</desc>
10017 </param>
10018 <param name="defaults" type="wstring" safearray="yes" dir="out">
10019 <desc>Array of default property values.</desc>
10020 </param>
10021 </method>
10022
10023 </interface>
10024
10025
10026 <!--
10027 // IKeyboard
10028 /////////////////////////////////////////////////////////////////////////
10029 -->
10030
10031 <interface
10032 name="IKeyboard" extends="$unknown"
10033 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10034 wsmap="managed"
10035 >
10036 <desc>
10037 The IKeyboard interface represents the virtual machine's keyboard. Used
10038 in <link to="IConsole::keyboard"/>.
10039
10040 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10041 to the virtual machine.
10042
10043 </desc>
10044 <method name="putScancode">
10045 <desc>Sends a scancode to the keyboard.
10046
10047 <result name="VBOX_E_IPRT_ERROR">
10048 Could not send scan code to virtual keyboard.
10049 </result>
10050
10051 </desc>
10052 <param name="scancode" type="long" dir="in"/>
10053 </method>
10054
10055 <method name="putScancodes">
10056 <desc>Sends an array of scancodes to the keyboard.
10057
10058 <result name="VBOX_E_IPRT_ERROR">
10059 Could not send all scan codes to virtual keyboard.
10060 </result>
10061
10062 </desc>
10063 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10064 <param name="codesStored" type="unsigned long" dir="return"/>
10065 </method>
10066
10067 <method name="putCAD">
10068 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10069 function is nothing special, it is just a convenience function
10070 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10071
10072 <result name="VBOX_E_IPRT_ERROR">
10073 Could not send all scan codes to virtual keyboard.
10074 </result>
10075
10076 </desc>
10077 </method>
10078
10079 </interface>
10080
10081
10082 <!--
10083 // IMouse
10084 /////////////////////////////////////////////////////////////////////////
10085 -->
10086
10087 <enum
10088 name="MouseButtonState"
10089 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10090 >
10091 <desc>
10092 Mouse button state.
10093 </desc>
10094
10095 <const name="LeftButton" value="0x01"/>
10096 <const name="RightButton" value="0x02"/>
10097 <const name="MiddleButton" value="0x04"/>
10098 <const name="WheelUp" value="0x08"/>
10099 <const name="WheelDown" value="0x10"/>
10100 <const name="XButton1" value="0x20"/>
10101 <const name="XButton2" value="0x40"/>
10102 <const name="MouseStateMask" value="0x7F"/>
10103 </enum>
10104
10105 <interface
10106 name="IMouse" extends="$unknown"
10107 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10108 wsmap="managed"
10109 >
10110 <desc>
10111 The IMouse interface represents the virtual machine's mouse. Used in
10112 <link to="IConsole::mouse"/>.
10113
10114 Through this interface, the virtual machine's virtual mouse can be
10115 controlled.
10116 </desc>
10117
10118 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10119 <desc>
10120 Whether the guest OS supports absolute mouse pointer positioning
10121 or not.
10122 <note>
10123 You can use the <link to="IMouseCapabilityChangedEvent"/>
10124 event to be instantly informed about changes of this attribute
10125 during virtual machine execution.
10126 </note>
10127 <see><link to="#putMouseEventAbsolute"/></see>
10128 </desc>
10129 </attribute>
10130
10131 <attribute name="relativeSupported" type="boolean" readonly="yes">
10132 <desc>
10133 Whether the guest OS supports relative mouse pointer positioning
10134 or not.
10135 <note>
10136 You can use the <link to="IMouseCapabilityChangedEvent"/>
10137 event to be instantly informed about changes of this attribute
10138 during virtual machine execution.
10139 </note>
10140 <see><link to="#putMouseEvent"/></see>
10141 </desc>
10142 </attribute>
10143
10144 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10145 <desc>
10146 Whether the guest OS can currently switch to drawing it's own mouse
10147 cursor on demand.
10148 <note>
10149 You can use the <link to="IMouseCapabilityChangedEvent"/>
10150 event to be instantly informed about changes of this attribute
10151 during virtual machine execution.
10152 </note>
10153 <see><link to="#putMouseEvent"/></see>
10154 </desc>
10155 </attribute>
10156
10157 <method name="putMouseEvent">
10158 <desc>
10159 Initiates a mouse event using relative pointer movements
10160 along x and y axis.
10161
10162 <result name="E_ACCESSDENIED">
10163 Console not powered up.
10164 </result>
10165 <result name="VBOX_E_IPRT_ERROR">
10166 Could not send mouse event to virtual mouse.
10167 </result>
10168
10169 </desc>
10170
10171 <param name="dx" type="long" dir="in">
10172 <desc>
10173 Amount of pixels the mouse should move to the right.
10174 Negative values move the mouse to the left.
10175 </desc>
10176 </param>
10177 <param name="dy" type="long" dir="in">
10178 <desc>
10179 Amount of pixels the mouse should move downwards.
10180 Negative values move the mouse upwards.
10181 </desc>
10182 </param>
10183 <param name="dz" type="long" dir="in">
10184 <desc>
10185 Amount of mouse wheel moves.
10186 Positive values describe clockwise wheel rotations,
10187 negative values describe counterclockwise rotations.
10188 </desc>
10189 </param>
10190 <param name="dw" type="long" dir="in">
10191 <desc>
10192 Amount of horizontal mouse wheel moves.
10193 Positive values describe a movement to the left,
10194 negative values describe a movement to the right.
10195 </desc>
10196 </param>
10197 <param name="buttonState" type="long" dir="in">
10198 <desc>
10199 The current state of mouse buttons. Every bit represents
10200 a mouse button as follows:
10201 <table>
10202 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10203 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10204 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10205 </table>
10206 A value of <tt>1</tt> means the corresponding button is pressed.
10207 otherwise it is released.
10208 </desc>
10209 </param>
10210 </method>
10211
10212 <method name="putMouseEventAbsolute">
10213 <desc>
10214 Positions the mouse pointer using absolute x and y coordinates.
10215 These coordinates are expressed in pixels and
10216 start from <tt>[1,1]</tt> which corresponds to the top left
10217 corner of the virtual display.
10218
10219 <result name="E_ACCESSDENIED">
10220 Console not powered up.
10221 </result>
10222 <result name="VBOX_E_IPRT_ERROR">
10223 Could not send mouse event to virtual mouse.
10224 </result>
10225
10226 <note>
10227 This method will have effect only if absolute mouse
10228 positioning is supported by the guest OS.
10229 </note>
10230
10231 <see><link to="#absoluteSupported"/></see>
10232 </desc>
10233
10234 <param name="x" type="long" dir="in">
10235 <desc>
10236 X coordinate of the pointer in pixels, starting from @c 1.
10237 </desc>
10238 </param>
10239 <param name="y" type="long" dir="in">
10240 <desc>
10241 Y coordinate of the pointer in pixels, starting from @c 1.
10242 </desc>
10243 </param>
10244 <param name="dz" type="long" dir="in">
10245 <desc>
10246 Amount of mouse wheel moves.
10247 Positive values describe clockwise wheel rotations,
10248 negative values describe counterclockwise rotations.
10249 </desc>
10250 </param>
10251 <param name="dw" type="long" dir="in">
10252 <desc>
10253 Amount of horizontal mouse wheel moves.
10254 Positive values describe a movement to the left,
10255 negative values describe a movement to the right.
10256 </desc>
10257 </param>
10258 <param name="buttonState" type="long" dir="in">
10259 <desc>
10260 The current state of mouse buttons. Every bit represents
10261 a mouse button as follows:
10262 <table>
10263 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10264 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10265 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10266 </table>
10267 A value of @c 1 means the corresponding button is pressed.
10268 otherwise it is released.
10269 </desc>
10270 </param>
10271 </method>
10272
10273 </interface>
10274
10275 <!--
10276 // IDisplay
10277 /////////////////////////////////////////////////////////////////////////
10278 -->
10279
10280 <enum
10281 name="FramebufferPixelFormat"
10282 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10283 >
10284 <desc>
10285 Format of the video memory buffer. Constants represented by this enum can
10286 be used to test for particular values of <link
10287 to="IFramebuffer::pixelFormat"/>. See also <link
10288 to="IFramebuffer::requestResize"/>.
10289
10290 See also www.fourcc.org for more information about FOURCC pixel formats.
10291 </desc>
10292
10293 <const name="Opaque" value="0">
10294 <desc>
10295 Unknown buffer format (the user may not assume any particular format of
10296 the buffer).
10297 </desc>
10298 </const>
10299 <const name="FOURCC_RGB" value="0x32424752">
10300 <desc>
10301 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10302 bit layout).
10303 </desc>
10304 </const>
10305 </enum>
10306
10307 <interface
10308 name="IFramebuffer" extends="$unknown"
10309 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10310 wsmap="suppress"
10311 >
10312 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10313 <desc>Address of the start byte of the frame buffer.</desc>
10314 </attribute>
10315
10316 <attribute name="width" type="unsigned long" readonly="yes">
10317 <desc>Frame buffer width, in pixels.</desc>
10318 </attribute>
10319
10320 <attribute name="height" type="unsigned long" readonly="yes">
10321 <desc>Frame buffer height, in pixels.</desc>
10322 </attribute>
10323
10324 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10325 <desc>
10326 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10327 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10328 are: 8, 15, 16, 24 and 32.
10329 </desc>
10330 </attribute>
10331
10332 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10333 <desc>
10334 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10335 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10336 size of the scan line must be aligned to 32 bits.
10337 </desc>
10338 </attribute>
10339
10340 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10341 <desc>
10342 Frame buffer pixel format. It's either one of the values defined by <link
10343 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10344 <note>
10345 This attribute must never return <link
10346 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10347 <link to="#address"/> points to must be always known.
10348 </note>
10349 </desc>
10350 </attribute>
10351
10352 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10353 <desc>
10354 Defines whether this frame buffer uses the virtual video card's memory
10355 buffer (guest VRAM) directly or not. See <link
10356 to="IFramebuffer::requestResize"/> for more information.
10357 </desc>
10358 </attribute>
10359
10360 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10361 <desc>
10362 Hint from the frame buffer about how much of the standard
10363 screen height it wants to use for itself. This information is
10364 exposed to the guest through the VESA BIOS and VMMDev interface
10365 so that it can use it for determining its video mode table. It
10366 is not guaranteed that the guest respects the value.
10367 </desc>
10368 </attribute>
10369
10370 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10371 <desc>
10372 An alpha-blended overlay which is superposed over the frame buffer.
10373 The initial purpose is to allow the display of icons providing
10374 information about the VM state, including disk activity, in front
10375 ends which do not have other means of doing that. The overlay is
10376 designed to controlled exclusively by IDisplay. It has no locking
10377 of its own, and any changes made to it are not guaranteed to be
10378 visible until the affected portion of IFramebuffer is updated. The
10379 overlay can be created lazily the first time it is requested. This
10380 attribute can also return @c null to signal that the overlay is not
10381 implemented.
10382 </desc>
10383 </attribute>
10384
10385 <attribute name="winId" type="unsigned long long" readonly="yes">
10386 <desc>
10387 Platform-dependent identifier of the window where context of this
10388 frame buffer is drawn, or zero if there's no such window.
10389 </desc>
10390 </attribute>
10391
10392 <method name="lock">
10393 <desc>
10394 Locks the frame buffer.
10395 Gets called by the IDisplay object where this frame buffer is
10396 bound to.
10397 </desc>
10398 </method>
10399
10400 <method name="unlock">
10401 <desc>
10402 Unlocks the frame buffer.
10403 Gets called by the IDisplay object where this frame buffer is
10404 bound to.
10405 </desc>
10406 </method>
10407
10408 <method name="notifyUpdate">
10409 <desc>
10410 Informs about an update.
10411 Gets called by the display object where this buffer is
10412 registered.
10413 </desc>
10414 <param name="x" type="unsigned long" dir="in"/>
10415 <param name="y" type="unsigned long" dir="in"/>
10416 <param name="width" type="unsigned long" dir="in"/>
10417 <param name="height" type="unsigned long" dir="in"/>
10418 </method>
10419
10420 <method name="requestResize">
10421 <desc>
10422 Requests a size and pixel format change.
10423
10424 There are two modes of working with the video buffer of the virtual
10425 machine. The <i>indirect</i> mode implies that the IFramebuffer
10426 implementation allocates a memory buffer for the requested display mode
10427 and provides it to the virtual machine. In <i>direct</i> mode, the
10428 IFramebuffer implementation uses the memory buffer allocated and owned
10429 by the virtual machine. This buffer represents the video memory of the
10430 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10431 usually faster because the implementation gets a raw pointer to the
10432 guest VRAM buffer which it can directly use for visualizing the contents
10433 of the virtual display, as opposed to the indirect mode where the
10434 contents of guest VRAM are copied to the memory buffer provided by
10435 the implementation every time a display update occurs.
10436
10437 It is important to note that the direct mode is really fast only when
10438 the implementation uses the given guest VRAM buffer directly, for
10439 example, by blitting it to the window representing the virtual machine's
10440 display, which saves at least one copy operation comparing to the
10441 indirect mode. However, using the guest VRAM buffer directly is not
10442 always possible: the format and the color depth of this buffer may be
10443 not supported by the target window, or it may be unknown (opaque) as in
10444 case of text or non-linear multi-plane VGA video modes. In this case,
10445 the indirect mode (that is always available) should be used as a
10446 fallback: when the guest VRAM contents are copied to the
10447 implementation-provided memory buffer, color and format conversion is
10448 done automatically by the underlying code.
10449
10450 The @a pixelFormat parameter defines whether the direct mode is
10451 available or not. If @a pixelFormat is <link
10452 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10453 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10454 @a bytesPerLine parameters must be ignored and the implementation must use
10455 the indirect mode (where it provides its own buffer in one of the
10456 supported formats). In all other cases, @a pixelFormat together with
10457 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10458 buffer pointed to by the @a VRAM parameter and the implementation is
10459 free to choose which mode to use. To indicate that this frame buffer uses
10460 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10461 attribute must return @c true and <link to="#address"/> must
10462 return exactly the same address that is passed in the @a VRAM parameter
10463 of this method; otherwise it is assumed that the indirect strategy is
10464 chosen.
10465
10466 The @a width and @a height parameters represent the size of the
10467 requested display mode in both modes. In case of indirect mode, the
10468 provided memory buffer should be big enough to store data of the given
10469 display mode. In case of direct mode, it is guaranteed that the given
10470 @a VRAM buffer contains enough space to represent the display mode of the
10471 given size. Note that this frame buffer's <link to="#width"/> and <link
10472 to="#height"/> attributes must return exactly the same values as
10473 passed to this method after the resize is completed (see below).
10474
10475 The @a finished output parameter determines if the implementation has
10476 finished resizing the frame buffer or not. If, for some reason, the
10477 resize cannot be finished immediately during this call, @a finished
10478 must be set to @c false, and the implementation must call
10479 <link to="IDisplay::resizeCompleted"/> after it has returned from
10480 this method as soon as possible. If @a finished is @c false, the
10481 machine will not call any frame buffer methods until
10482 <link to="IDisplay::resizeCompleted"/> is called.
10483
10484 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10485 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10486 this frame buffer must return exactly the same values as specified in the
10487 parameters of this method, after the resize is completed. If the
10488 indirect mode is chosen, these attributes must return values describing
10489 the format of the implementation's own memory buffer <link
10490 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10491 value must always correlate with <link to="#pixelFormat"/>. Note that
10492 the <link to="#pixelFormat"/> attribute must never return <link
10493 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10494
10495 <note>
10496 This method is called by the IDisplay object under the
10497 <link to="#lock"/> provided by this IFramebuffer
10498 implementation. If this method returns @c false in @a finished, then
10499 this lock is not released until
10500 <link to="IDisplay::resizeCompleted"/> is called.
10501 </note>
10502 </desc>
10503 <param name="screenId" type="unsigned long" dir="in">
10504 <desc>
10505 Logical screen number. Must be used in the corresponding call to
10506 <link to="IDisplay::resizeCompleted"/> if this call is made.
10507 </desc>
10508 </param>
10509 <param name="pixelFormat" type="unsigned long" dir="in">
10510 <desc>
10511 Pixel format of the memory buffer pointed to by @a VRAM.
10512 See also <link to="FramebufferPixelFormat"/>.
10513 </desc>
10514 </param>
10515 <param name="VRAM" type="octet" mod="ptr" dir="in">
10516 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10517 </param>
10518 <param name="bitsPerPixel" type="unsigned long" dir="in">
10519 <desc>Color depth, bits per pixel.</desc>
10520 </param>
10521 <param name="bytesPerLine" type="unsigned long" dir="in">
10522 <desc>Size of one scan line, in bytes.</desc>
10523 </param>
10524 <param name="width" type="unsigned long" dir="in">
10525 <desc>Width of the guest display, in pixels.</desc>
10526 </param>
10527 <param name="height" type="unsigned long" dir="in">
10528 <desc>Height of the guest display, in pixels.</desc>
10529 </param>
10530 <param name="finished" type="boolean" dir="return">
10531 <desc>
10532 Can the VM start using the new frame buffer immediately
10533 after this method returns or it should wait for
10534 <link to="IDisplay::resizeCompleted"/>.
10535 </desc>
10536 </param>
10537 </method>
10538
10539 <method name="videoModeSupported">
10540 <desc>
10541 Returns whether the frame buffer implementation is willing to
10542 support a given video mode. In case it is not able to render
10543 the video mode (or for some reason not willing), it should
10544 return @c false. Usually this method is called when the guest
10545 asks the VMM device whether a given video mode is supported
10546 so the information returned is directly exposed to the guest.
10547 It is important that this method returns very quickly.
10548 </desc>
10549 <param name="width" type="unsigned long" dir="in"/>
10550 <param name="height" type="unsigned long" dir="in"/>
10551 <param name="bpp" type="unsigned long" dir="in"/>
10552 <param name="supported" type="boolean" dir="return"/>
10553 </method>
10554
10555 <method name="getVisibleRegion">
10556 <desc>
10557 Returns the visible region of this frame buffer.
10558
10559 If the @a rectangles parameter is @c null then the value of the
10560 @a count parameter is ignored and the number of elements necessary to
10561 describe the current visible region is returned in @a countCopied.
10562
10563 If @a rectangles is not @c null but @a count is less
10564 than the required number of elements to store region data, the method
10565 will report a failure. If @a count is equal or greater than the
10566 required number of elements, then the actual number of elements copied
10567 to the provided array will be returned in @a countCopied.
10568
10569 <note>
10570 The address of the provided array must be in the process space of
10571 this IFramebuffer object.
10572 </note>
10573 <note>
10574 Method not yet implemented.
10575 </note>
10576 </desc>
10577 <param name="rectangles" type="octet" mod="ptr" dir="in">
10578 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10579 </param>
10580 <param name="count" type="unsigned long" dir="in">
10581 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10582 </param>
10583 <param name="countCopied" type="unsigned long" dir="return">
10584 <desc>Number of elements copied to the @a rectangles array.</desc>
10585 </param>
10586 </method>
10587
10588 <method name="setVisibleRegion">
10589 <desc>
10590 Suggests a new visible region to this frame buffer. This region
10591 represents the area of the VM display which is a union of regions of
10592 all top-level windows of the guest operating system running inside the
10593 VM (if the Guest Additions for this system support this
10594 functionality). This information may be used by the frontends to
10595 implement the seamless desktop integration feature.
10596
10597 <note>
10598 The address of the provided array must be in the process space of
10599 this IFramebuffer object.
10600 </note>
10601 <note>
10602 The IFramebuffer implementation must make a copy of the provided
10603 array of rectangles.
10604 </note>
10605 <note>
10606 Method not yet implemented.
10607 </note>
10608 </desc>
10609 <param name="rectangles" type="octet" mod="ptr" dir="in">
10610 <desc>Pointer to the @c RTRECT array.</desc>
10611 </param>
10612 <param name="count" type="unsigned long" dir="in">
10613 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10614 </param>
10615 </method>
10616
10617 <method name="processVHWACommand">
10618 <desc>
10619 Posts a Video HW Acceleration Command to the frame buffer for processing.
10620 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10621 are posted from quest to the host to be processed by the host hardware.
10622
10623 <note>
10624 The address of the provided command must be in the process space of
10625 this IFramebuffer object.
10626 </note>
10627 </desc>
10628
10629 <param name="command" type="octet" mod="ptr" dir="in">
10630 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10631 </param>
10632 </method>
10633
10634 </interface>
10635
10636 <interface
10637 name="IFramebufferOverlay" extends="IFramebuffer"
10638 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10639 wsmap="suppress"
10640 >
10641 <desc>
10642 The IFramebufferOverlay interface represents an alpha blended overlay
10643 for displaying status icons above an IFramebuffer. It is always created
10644 not visible, so that it must be explicitly shown. It only covers a
10645 portion of the IFramebuffer, determined by its width, height and
10646 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10647 that order) format, and may be written to directly. Do re-read the
10648 width though, after setting it, as it may be adjusted (increased) to
10649 make it more suitable for the front end.
10650 </desc>
10651 <attribute name="x" type="unsigned long" readonly="yes">
10652 <desc>X position of the overlay, relative to the frame buffer.</desc>
10653 </attribute>
10654
10655 <attribute name="y" type="unsigned long" readonly="yes">
10656 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10657 </attribute>
10658
10659 <attribute name="visible" type="boolean" readonly="no">
10660 <desc>
10661 Whether the overlay is currently visible.
10662 </desc>
10663 </attribute>
10664
10665 <attribute name="alpha" type="unsigned long" readonly="no">
10666 <desc>
10667 The global alpha value for the overlay. This may or may not be
10668 supported by a given front end.
10669 </desc>
10670 </attribute>
10671
10672 <method name="move">
10673 <desc>
10674 Changes the overlay's position relative to the IFramebuffer.
10675 </desc>
10676 <param name="x" type="unsigned long" dir="in"/>
10677 <param name="y" type="unsigned long" dir="in"/>
10678 </method>
10679
10680 </interface>
10681
10682 <interface
10683 name="IDisplay" extends="$unknown"
10684 uuid="1fa79e39-0cc9-4ab3-9df3-ed3e96b42496"
10685 wsmap="managed"
10686 >
10687 <desc>
10688 The IDisplay interface represents the virtual machine's display.
10689
10690 The object implementing this interface is contained in each
10691 <link to="IConsole::display"/> attribute and represents the visual
10692 output of the virtual machine.
10693
10694 The virtual display supports pluggable output targets represented by the
10695 IFramebuffer interface. Examples of the output target are a window on
10696 the host computer or an RDP session's display on a remote computer.
10697 </desc>
10698 <method name="getScreenResolution">
10699 <desc>Queries display width, height and color depth for given screen.</desc>
10700 <param name="screenId" type="unsigned long" dir="in"/>
10701 <param name="width" type="unsigned long" dir="out"/>
10702 <param name="height" type="unsigned long" dir="out"/>
10703 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10704 </method>
10705
10706 <method name="setFramebuffer">
10707 <desc>
10708 Sets the framebuffer for given screen.
10709 </desc>
10710 <param name="screenId" type="unsigned long" dir="in"/>
10711 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10712 </method>
10713
10714 <method name="getFramebuffer">
10715 <desc>
10716 Queries the framebuffer for given screen.
10717 </desc>
10718 <param name="screenId" type="unsigned long" dir="in"/>
10719 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10720 <param name="xOrigin" type="long" dir="out"/>
10721 <param name="yOrigin" type="long" dir="out"/>
10722 </method>
10723
10724 <method name="setVideoModeHint">
10725 <desc>
10726 Asks VirtualBox to request the given video mode from
10727 the guest. This is just a hint and it cannot be guaranteed
10728 that the requested resolution will be used. Guest Additions
10729 are required for the request to be seen by guests. The caller
10730 should issue the request and wait for a resolution change and
10731 after a timeout retry.
10732
10733 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10734 parameters means that the corresponding values should be taken from the
10735 current video mode (i.e. left unchanged).
10736
10737 If the guest OS supports multi-monitor configuration then the @a display
10738 parameter specifies the number of the guest display to send the hint to:
10739 @c 0 is the primary display, @c 1 is the first secondary and
10740 so on. If the multi-monitor configuration is not supported, @a display
10741 must be @c 0.
10742
10743 <result name="E_INVALIDARG">
10744 The @a display is not associated with any monitor.
10745 </result>
10746
10747 </desc>
10748 <param name="width" type="unsigned long" dir="in"/>
10749 <param name="height" type="unsigned long" dir="in"/>
10750 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10751 <param name="display" type="unsigned long" dir="in"/>
10752 </method>
10753
10754 <method name="setSeamlessMode">
10755 <desc>
10756 Enables or disables seamless guest display rendering (seamless desktop
10757 integration) mode.
10758 <note>
10759 Calling this method has no effect if <link
10760 to="IGuest::supportsSeamless"/> returns @c false.
10761 </note>
10762 </desc>
10763 <param name="enabled" type="boolean" dir="in"/>
10764 </method>
10765
10766 <method name="takeScreenShot">
10767 <desc>
10768 Takes a screen shot of the requested size and copies it to the
10769 32-bpp buffer allocated by the caller and pointed to by @a address.
10770 A pixel consists of 4 bytes in order: B, G, R, 0.
10771
10772 <note>This API can be used only by the COM/XPCOM C++ API as it
10773 requires pointer support. Use <link to="#takeScreenShotToArray" />
10774 with other language bindings.
10775 </note>
10776
10777 <result name="E_NOTIMPL">
10778 Feature not implemented.
10779 </result>
10780 <result name="VBOX_E_IPRT_ERROR">
10781 Could not take a screenshot.
10782 </result>
10783
10784 </desc>
10785 <param name="screenId" type="unsigned long" dir="in"/>
10786 <param name="address" type="octet" mod="ptr" dir="in"/>
10787 <param name="width" type="unsigned long" dir="in"/>
10788 <param name="height" type="unsigned long" dir="in"/>
10789 </method>
10790
10791 <method name="takeScreenShotToArray">
10792 <desc>
10793 Takes a guest screen shot of the requested size and returns it as
10794 an array of bytes in uncompressed 32-bit RGBA format.
10795 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
10796
10797 This API is slow, but could be the only option to get guest screenshot
10798 for scriptable languages not allowed to manipulate with addresses
10799 directly.
10800
10801 <result name="E_NOTIMPL">
10802 Feature not implemented.
10803 </result>
10804 <result name="VBOX_E_IPRT_ERROR">
10805 Could not take a screenshot.
10806 </result>
10807 </desc>
10808 <param name="screenId" type="unsigned long" dir="in">
10809 <desc>
10810 Monitor to take screenshot from.
10811 </desc>
10812 </param>
10813 <param name="width" type="unsigned long" dir="in">
10814 <desc>
10815 Desired image width.
10816 </desc>
10817 </param>
10818 <param name="height" type="unsigned long" dir="in">
10819 <desc>
10820 Desired image height.
10821 </desc>
10822 </param>
10823 <param name="screenData" type="octet" dir="return" safearray="yes">
10824 <desc>
10825 Array with resulting screen data.
10826 </desc>
10827 </param>
10828 </method>
10829
10830 <method name="drawToScreen">
10831 <desc>
10832 Draws a 32-bpp image of the specified size from the given buffer
10833 to the given point on the VM display.
10834
10835 <result name="E_NOTIMPL">
10836 Feature not implemented.
10837 </result>
10838 <result name="VBOX_E_IPRT_ERROR">
10839 Could not draw to screen.
10840 </result>
10841
10842 </desc>
10843 <param name="screenId" type="unsigned long" dir="in"/>
10844 <param name="address" type="octet" mod="ptr" dir="in"/>
10845 <param name="x" type="unsigned long" dir="in">
10846 <desc>Relative to the screen top left corner.</desc>
10847 </param>
10848 <param name="y" type="unsigned long" dir="in">
10849 <desc>Relative to the screen top left corner.</desc>
10850 </param>
10851 <param name="width" type="unsigned long" dir="in"/>
10852 <param name="height" type="unsigned long" dir="in"/>
10853 </method>
10854
10855 <method name="invalidateAndUpdate">
10856 <desc>
10857 Does a full invalidation of the VM display and instructs the VM
10858 to update it.
10859
10860 <result name="VBOX_E_IPRT_ERROR">
10861 Could not invalidate and update screen.
10862 </result>
10863
10864 </desc>
10865 </method>
10866
10867 <method name="resizeCompleted">
10868 <desc>
10869 Signals that a framebuffer has completed the resize operation.
10870
10871 <result name="VBOX_E_NOT_SUPPORTED">
10872 Operation only valid for external frame buffers.
10873 </result>
10874
10875 </desc>
10876 <param name="screenId" type="unsigned long" dir="in"/>
10877 </method>
10878
10879 <method name="completeVHWACommand">
10880 <desc>
10881 Signals that the Video HW Acceleration command has completed.
10882 </desc>
10883
10884 <param name="command" type="octet" mod="ptr" dir="in">
10885 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10886 </param>
10887 </method>
10888
10889 </interface>
10890
10891 <!--
10892 // INetworkAdapter
10893 /////////////////////////////////////////////////////////////////////////
10894 -->
10895
10896 <enum
10897 name="NetworkAttachmentType"
10898 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10899 >
10900 <desc>
10901 Network attachment type.
10902 </desc>
10903
10904 <const name="Null" value="0">
10905 <desc>Null value, also means "not attached".</desc>
10906 </const>
10907 <const name="NAT" value="1"/>
10908 <const name="Bridged" value="2"/>
10909 <const name="Internal" value="3"/>
10910 <const name="HostOnly" value="4"/>
10911 <const name="VDE" value="5"/>
10912 </enum>
10913
10914 <enum
10915 name="NetworkAdapterType"
10916 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10917 >
10918 <desc>
10919 Network adapter type.
10920 </desc>
10921
10922 <const name="Null" value="0">
10923 <desc>Null value (never used by the API).</desc>
10924 </const>
10925 <const name="Am79C970A" value="1">
10926 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10927 </const>
10928 <const name="Am79C973" value="2">
10929 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10930 </const>
10931 <const name="I82540EM" value="3">
10932 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10933 </const>
10934 <const name="I82543GC" value="4">
10935 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10936 </const>
10937 <const name="I82545EM" value="5">
10938 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10939 </const>
10940 <const name="Virtio" value="6">
10941 <desc>Virtio network device.</desc>
10942 </const>
10943 </enum>
10944
10945 <interface
10946 name="INetworkAdapter" extends="$unknown"
10947 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
10948 wsmap="managed"
10949 >
10950 <desc>
10951 Represents a virtual network adapter that is attached to a virtual machine.
10952 Each virtual machine has a fixed number of network adapter slots with one
10953 instance of this attached to each of them. Call
10954 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10955 is attached to a given slot in a given machine.
10956
10957 Each network adapter can be in one of five attachment modes, which are
10958 represented by the <link to="NetworkAttachmentType" /> enumeration;
10959 see the <link to="#attachmentType" /> attribute.
10960 </desc>
10961
10962 <attribute name="adapterType" type="NetworkAdapterType">
10963 <desc>
10964 Type of the virtual network adapter. Depending on this value,
10965 VirtualBox will provide a different virtual network hardware
10966 to the guest.
10967 </desc>
10968 </attribute>
10969
10970 <attribute name="slot" type="unsigned long" readonly="yes">
10971 <desc>
10972 Slot number this adapter is plugged into. Corresponds to
10973 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10974 to obtain this instance.
10975 </desc>
10976 </attribute>
10977
10978 <attribute name="enabled" type="boolean">
10979 <desc>
10980 Flag whether the network adapter is present in the
10981 guest system. If disabled, the virtual guest hardware will
10982 not contain this network adapter. Can only be changed when
10983 the VM is not running.
10984 </desc>
10985 </attribute>
10986
10987 <attribute name="MACAddress" type="wstring">
10988 <desc>
10989 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10990 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10991 </desc>
10992 </attribute>
10993
10994 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10995
10996 <attribute name="hostInterface" type="wstring">
10997 <desc>
10998 Name of the host network interface the VM is attached to.
10999 </desc>
11000 </attribute>
11001
11002 <attribute name="internalNetwork" type="wstring">
11003 <desc>
11004 Name of the internal network the VM is attached to.
11005 </desc>
11006 </attribute>
11007
11008 <attribute name="NATNetwork" type="wstring">
11009 <desc>
11010 Name of the NAT network the VM is attached to.
11011 </desc>
11012 </attribute>
11013
11014 <attribute name="VDENetwork" type="wstring">
11015 <desc>
11016 Name of the VDE switch the VM is attached to.
11017 </desc>
11018 </attribute>
11019
11020 <attribute name="cableConnected" type="boolean">
11021 <desc>
11022 Flag whether the adapter reports the cable as connected or not.
11023 It can be used to report offline situations to a VM.
11024 </desc>
11025 </attribute>
11026
11027 <attribute name="lineSpeed" type="unsigned long">
11028 <desc>
11029 Line speed reported by custom drivers, in units of 1 kbps.
11030 </desc>
11031 </attribute>
11032
11033 <attribute name="traceEnabled" type="boolean">
11034 <desc>
11035 Flag whether network traffic from/to the network card should be traced.
11036 Can only be toggled when the VM is turned off.
11037 </desc>
11038 </attribute>
11039
11040 <attribute name="traceFile" type="wstring">
11041 <desc>
11042 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11043 will be used.
11044 </desc>
11045 </attribute>
11046
11047 <attribute name="natDriver" type="INATEngine" readonly="yes">
11048 <desc>
11049 Points to the NAT engine which handles the network address translation
11050 for this interface. This is active only when the interface actually uses
11051 NAT (see <link to="#attachToNAT" />).
11052 </desc>
11053 </attribute>
11054
11055 <attribute name="bootPriority" type="unsigned long">
11056 <desc>
11057 Network boot priority of the adapter. Priority 1 is highest. If not set,
11058 the priority is considered to be at the lowest possible setting.
11059 </desc>
11060 </attribute>
11061
11062 <attribute name="bandwidthLimit" type="unsigned long">
11063 <desc>
11064 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11065 A zero value means uncapped/unlimited.
11066 </desc>
11067 </attribute>
11068
11069 <method name="attachToNAT">
11070 <desc>
11071 Attach the network adapter to the Network Address Translation (NAT) interface.
11072 </desc>
11073 </method>
11074
11075 <method name="attachToBridgedInterface">
11076 <desc>
11077 Attach the network adapter to a bridged host interface.
11078 </desc>
11079 </method>
11080
11081 <method name="attachToInternalNetwork">
11082 <desc>
11083 Attach the network adapter to an internal network.
11084 </desc>
11085 </method>
11086
11087 <method name="attachToHostOnlyInterface">
11088 <desc>
11089 Attach the network adapter to the host-only network.
11090 </desc>
11091 </method>
11092
11093 <method name="attachToVDE">
11094 <desc>
11095 Attach the network adapter to a VDE network.
11096 </desc>
11097 </method>
11098
11099 <method name="detach">
11100 <desc>
11101 Detach the network adapter
11102 </desc>
11103 </method>
11104 </interface>
11105
11106
11107 <!--
11108 // ISerialPort
11109 /////////////////////////////////////////////////////////////////////////
11110 -->
11111
11112 <enum
11113 name="PortMode"
11114 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11115 >
11116 <desc>
11117 The PortMode enumeration represents possible communication modes for
11118 the virtual serial port device.
11119 </desc>
11120
11121 <const name="Disconnected" value="0">
11122 <desc>Virtual device is not attached to any real host device.</desc>
11123 </const>
11124 <const name="HostPipe" value="1">
11125 <desc>Virtual device is attached to a host pipe.</desc>
11126 </const>
11127 <const name="HostDevice" value="2">
11128 <desc>Virtual device is attached to a host device.</desc>
11129 </const>
11130 <const name="RawFile" value="3">
11131 <desc>Virtual device is attached to a raw file.</desc>
11132 </const>
11133 </enum>
11134
11135 <interface
11136 name="ISerialPort" extends="$unknown"
11137 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11138 wsmap="managed"
11139 >
11140
11141 <desc>
11142 The ISerialPort interface represents the virtual serial port device.
11143
11144 The virtual serial port device acts like an ordinary serial port
11145 inside the virtual machine. This device communicates to the real
11146 serial port hardware in one of two modes: host pipe or host device.
11147
11148 In host pipe mode, the #path attribute specifies the path to the pipe on
11149 the host computer that represents a serial port. The #server attribute
11150 determines if this pipe is created by the virtual machine process at
11151 machine startup or it must already exist before starting machine
11152 execution.
11153
11154 In host device mode, the #path attribute specifies the name of the
11155 serial port device on the host computer.
11156
11157 There is also a third communication mode: the disconnected mode. In this
11158 mode, the guest OS running inside the virtual machine will be able to
11159 detect the serial port, but all port write operations will be discarded
11160 and all port read operations will return no data.
11161
11162 <see>IMachine::getSerialPort</see>
11163 </desc>
11164
11165 <attribute name="slot" type="unsigned long" readonly="yes">
11166 <desc>
11167 Slot number this serial port is plugged into. Corresponds to
11168 the value you pass to <link to="IMachine::getSerialPort"/>
11169 to obtain this instance.
11170 </desc>
11171 </attribute>
11172
11173 <attribute name="enabled" type="boolean">
11174 <desc>
11175 Flag whether the serial port is enabled. If disabled,
11176 the serial port will not be reported to the guest OS.
11177 </desc>
11178 </attribute>
11179
11180 <attribute name="IOBase" type="unsigned long">
11181 <desc>Base I/O address of the serial port.</desc>
11182 </attribute>
11183
11184 <attribute name="IRQ" type="unsigned long">
11185 <desc>IRQ number of the serial port.</desc>
11186 </attribute>
11187
11188 <attribute name="hostMode" type="PortMode">
11189 <desc>
11190 How is this port connected to the host.
11191 <note>
11192 Changing this attribute may fail if the conditions for
11193 <link to="#path"/> are not met.
11194 </note>
11195 </desc>
11196 </attribute>
11197
11198 <attribute name="server" type="boolean">
11199 <desc>
11200 Flag whether this serial port acts as a server (creates a new pipe on
11201 the host) or as a client (uses the existing pipe). This attribute is
11202 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11203 </desc>
11204 </attribute>
11205
11206 <attribute name="path" type="wstring">
11207 <desc>
11208 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11209 PortMode_HostPipe, or the host serial device name when
11210 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11211 cases, setting a @c null or empty string as the attribute's value
11212 is an error. Otherwise, the value of this property is ignored.
11213 </desc>
11214 </attribute>
11215
11216 </interface>
11217
11218 <!--
11219 // IParallelPort
11220 /////////////////////////////////////////////////////////////////////////
11221 -->
11222
11223 <interface
11224 name="IParallelPort" extends="$unknown"
11225 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11226 wsmap="managed"
11227 >
11228
11229 <desc>
11230 The IParallelPort interface represents the virtual parallel port device.
11231
11232 The virtual parallel port device acts like an ordinary parallel port
11233 inside the virtual machine. This device communicates to the real
11234 parallel port hardware using the name of the parallel device on the host
11235 computer specified in the #path attribute.
11236
11237 Each virtual parallel port device is assigned a base I/O address and an
11238 IRQ number that will be reported to the guest operating system and used
11239 to operate the given parallel port from within the virtual machine.
11240
11241 <see>IMachine::getParallelPort</see>
11242 </desc>
11243
11244 <attribute name="slot" type="unsigned long" readonly="yes">
11245 <desc>
11246 Slot number this parallel port is plugged into. Corresponds to
11247 the value you pass to <link to="IMachine::getParallelPort"/>
11248 to obtain this instance.
11249 </desc>
11250 </attribute>
11251
11252 <attribute name="enabled" type="boolean">
11253 <desc>
11254 Flag whether the parallel port is enabled. If disabled,
11255 the parallel port will not be reported to the guest OS.
11256 </desc>
11257 </attribute>
11258
11259 <attribute name="IOBase" type="unsigned long">
11260 <desc>Base I/O address of the parallel port.</desc>
11261 </attribute>
11262
11263 <attribute name="IRQ" type="unsigned long">
11264 <desc>IRQ number of the parallel port.</desc>
11265 </attribute>
11266
11267 <attribute name="path" type="wstring">
11268 <desc>
11269 Host parallel device name. If this parallel port is enabled, setting a
11270 @c null or an empty string as this attribute's value will result into
11271 an error.
11272 </desc>
11273 </attribute>
11274
11275 </interface>
11276
11277
11278 <!--
11279 // IMachineDebugger
11280 /////////////////////////////////////////////////////////////////////////
11281 -->
11282
11283 <interface
11284 name="IMachineDebugger" extends="$unknown"
11285 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11286 wsmap="suppress"
11287 >
11288 <method name="resetStats">
11289 <desc>
11290 Reset VM statistics.
11291 </desc>
11292 <param name="pattern" type="wstring" dir="in">
11293 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11294 </param>
11295 </method>
11296
11297 <method name="dumpStats">
11298 <desc>
11299 Dumps VM statistics.
11300 </desc>
11301 <param name="pattern" type="wstring" dir="in">
11302 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11303 </param>
11304 </method>
11305
11306 <method name="getStats">
11307 <desc>
11308 Get the VM statistics in a XMLish format.
11309 </desc>
11310 <param name="pattern" type="wstring" dir="in">
11311 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11312 </param>
11313 <param name="withDescriptions" type="boolean" dir="in">
11314 <desc>Whether to include the descriptions.</desc>
11315 </param>
11316 <param name="stats" type="wstring" dir="out">
11317 <desc>The XML document containing the statistics.</desc>
11318 </param>
11319 </method>
11320
11321 <method name="injectNMI">
11322 <desc>
11323 Inject an NMI into a running VT-x/AMD-V VM.
11324 </desc>
11325 </method>
11326
11327 <attribute name="singlestep" type="boolean">
11328 <desc>Switch for enabling singlestepping.</desc>
11329 </attribute>
11330
11331 <attribute name="recompileUser" type="boolean">
11332 <desc>Switch for forcing code recompilation for user mode code.</desc>
11333 </attribute>
11334
11335 <attribute name="recompileSupervisor" type="boolean">
11336 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11337 </attribute>
11338
11339 <attribute name="PATMEnabled" type="boolean">
11340 <desc>Switch for enabling and disabling the PATM component.</desc>
11341 </attribute>
11342
11343 <attribute name="CSAMEnabled" type="boolean">
11344 <desc>Switch for enabling and disabling the CSAM component.</desc>
11345 </attribute>
11346
11347 <attribute name="logEnabled" type="boolean">
11348 <desc>Switch for enabling and disabling logging.</desc>
11349 </attribute>
11350
11351 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11352 <desc>
11353 Flag indicating whether the VM is currently making use of CPU hardware
11354 virtualization extensions.
11355 </desc>
11356 </attribute>
11357
11358 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11359 <desc>
11360 Flag indicating whether the VM is currently making use of the nested paging
11361 CPU hardware virtualization extension.
11362 </desc>
11363 </attribute>
11364
11365 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11366 <desc>
11367 Flag indicating whether the VM is currently making use of the VPID
11368 VT-x extension.
11369 </desc>
11370 </attribute>
11371
11372 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11373 <desc>
11374 Flag indicating whether the VM is currently making use of the Physical
11375 Address Extension CPU feature.
11376 </desc>
11377 </attribute>
11378
11379 <attribute name="virtualTimeRate" type="unsigned long">
11380 <desc>
11381 The rate at which the virtual time runs expressed as a percentage.
11382 The accepted range is 2% to 20000%.
11383 </desc>
11384 </attribute>
11385
11386 <!-- @todo method for setting log flags, groups and destination! -->
11387
11388 <attribute name="VM" type="unsigned long long" readonly="yes">
11389 <desc>
11390 Gets the VM handle. This is only for internal use while
11391 we carve the details of this interface.
11392 </desc>
11393 </attribute>
11394
11395 </interface>
11396
11397 <!--
11398 // IUSBController
11399 /////////////////////////////////////////////////////////////////////////
11400 -->
11401
11402 <interface
11403 name="IUSBController" extends="$unknown"
11404 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11405 wsmap="managed"
11406 >
11407 <attribute name="enabled" type="boolean">
11408 <desc>
11409 Flag whether the USB controller is present in the
11410 guest system. If disabled, the virtual guest hardware will
11411 not contain any USB controller. Can only be changed when
11412 the VM is powered off.
11413 </desc>
11414 </attribute>
11415
11416 <attribute name="enabledEhci" type="boolean">
11417 <desc>
11418 Flag whether the USB EHCI controller is present in the
11419 guest system. If disabled, the virtual guest hardware will
11420 not contain a USB EHCI controller. Can only be changed when
11421 the VM is powered off.
11422 </desc>
11423 </attribute>
11424
11425 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11426 <desc>
11427 Flag whether there is an USB proxy available.
11428 </desc>
11429 </attribute>
11430
11431 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11432 <desc>
11433 USB standard version which the controller implements.
11434 This is a BCD which means that the major version is in the
11435 high byte and minor version is in the low byte.
11436 </desc>
11437 </attribute>
11438
11439 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11440 <desc>
11441 List of USB device filters associated with the machine.
11442
11443 If the machine is currently running, these filters are activated
11444 every time a new (supported) USB device is attached to the host
11445 computer that was not ignored by global filters
11446 (<link to="IHost::USBDeviceFilters"/>).
11447
11448 These filters are also activated when the machine is powered up.
11449 They are run against a list of all currently available USB
11450 devices (in states
11451 <link to="USBDeviceState_Available"/>,
11452 <link to="USBDeviceState_Busy"/>,
11453 <link to="USBDeviceState_Held"/>) that were not previously
11454 ignored by global filters.
11455
11456 If at least one filter matches the USB device in question, this
11457 device is automatically captured (attached to) the virtual USB
11458 controller of this machine.
11459
11460 <see>IUSBDeviceFilter, ::IUSBController</see>
11461 </desc>
11462 </attribute>
11463
11464 <method name="createDeviceFilter">
11465 <desc>
11466 Creates a new USB device filter. All attributes except
11467 the filter name are set to empty (any match),
11468 <i>active</i> is @c false (the filter is not active).
11469
11470 The created filter can then be added to the list of filters using
11471 <link to="#insertDeviceFilter"/>.
11472
11473 <result name="VBOX_E_INVALID_VM_STATE">
11474 The virtual machine is not mutable.
11475 </result>
11476
11477 <see>#deviceFilters</see>
11478 </desc>
11479 <param name="name" type="wstring" dir="in">
11480 <desc>
11481 Filter name. See <link to="IUSBDeviceFilter::name"/>
11482 for more info.
11483 </desc>
11484 </param>
11485 <param name="filter" type="IUSBDeviceFilter" dir="return">
11486 <desc>Created filter object.</desc>
11487 </param>
11488 </method>
11489
11490 <method name="insertDeviceFilter">
11491 <desc>
11492 Inserts the given USB device to the specified position
11493 in the list of filters.
11494
11495 Positions are numbered starting from <tt>0</tt>. If the specified
11496 position is equal to or greater than the number of elements in
11497 the list, the filter is added to the end of the collection.
11498
11499 <note>
11500 Duplicates are not allowed, so an attempt to insert a
11501 filter that is already in the collection, will return an
11502 error.
11503 </note>
11504
11505 <result name="VBOX_E_INVALID_VM_STATE">
11506 Virtual machine is not mutable.
11507 </result>
11508 <result name="E_INVALIDARG">
11509 USB device filter not created within this VirtualBox instance.
11510 </result>
11511 <result name="VBOX_E_INVALID_OBJECT_STATE">
11512 USB device filter already in list.
11513 </result>
11514
11515 <see>#deviceFilters</see>
11516 </desc>
11517 <param name="position" type="unsigned long" dir="in">
11518 <desc>Position to insert the filter to.</desc>
11519 </param>
11520 <param name="filter" type="IUSBDeviceFilter" dir="in">
11521 <desc>USB device filter to insert.</desc>
11522 </param>
11523 </method>
11524
11525 <method name="removeDeviceFilter">
11526 <desc>
11527 Removes a USB device filter from the specified position in the
11528 list of filters.
11529
11530 Positions are numbered starting from <tt>0</tt>. Specifying a
11531 position equal to or greater than the number of elements in
11532 the list will produce an error.
11533
11534 <see>#deviceFilters</see>
11535
11536 <result name="VBOX_E_INVALID_VM_STATE">
11537 Virtual machine is not mutable.
11538 </result>
11539 <result name="E_INVALIDARG">
11540 USB device filter list empty or invalid @a position.
11541 </result>
11542
11543 </desc>
11544 <param name="position" type="unsigned long" dir="in">
11545 <desc>Position to remove the filter from.</desc>
11546 </param>
11547 <param name="filter" type="IUSBDeviceFilter" dir="return">
11548 <desc>Removed USB device filter.</desc>
11549 </param>
11550 </method>
11551
11552 </interface>
11553
11554
11555 <!--
11556 // IUSBDevice
11557 /////////////////////////////////////////////////////////////////////////
11558 -->
11559
11560 <interface
11561 name="IUSBDevice" extends="$unknown"
11562 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11563 wsmap="managed"
11564 >
11565 <desc>
11566 The IUSBDevice interface represents a virtual USB device attached to the
11567 virtual machine.
11568
11569 A collection of objects implementing this interface is stored in the
11570 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11571 attached to a running virtual machine's USB controller.
11572 </desc>
11573
11574 <attribute name="id" type="uuid" mod="string" readonly="yes">
11575 <desc>
11576 Unique USB device ID. This ID is built from #vendorId,
11577 #productId, #revision and #serialNumber.
11578 </desc>
11579 </attribute>
11580
11581 <attribute name="vendorId" type="unsigned short" readonly="yes">
11582 <desc>Vendor ID.</desc>
11583 </attribute>
11584
11585 <attribute name="productId" type="unsigned short" readonly="yes">
11586 <desc>Product ID.</desc>
11587 </attribute>
11588
11589 <attribute name="revision" type="unsigned short" readonly="yes">
11590 <desc>
11591 Product revision number. This is a packed BCD represented as
11592 unsigned short. The high byte is the integer part and the low
11593 byte is the decimal.
11594 </desc>
11595 </attribute>
11596
11597 <attribute name="manufacturer" type="wstring" readonly="yes">
11598 <desc>Manufacturer string.</desc>
11599 </attribute>
11600
11601 <attribute name="product" type="wstring" readonly="yes">
11602 <desc>Product string.</desc>
11603 </attribute>
11604
11605 <attribute name="serialNumber" type="wstring" readonly="yes">
11606 <desc>Serial number string.</desc>
11607 </attribute>
11608
11609 <attribute name="address" type="wstring" readonly="yes">
11610 <desc>Host specific address of the device.</desc>
11611 </attribute>
11612
11613 <attribute name="port" type="unsigned short" readonly="yes">
11614 <desc>
11615 Host USB port number the device is physically
11616 connected to.
11617 </desc>
11618 </attribute>
11619
11620 <attribute name="version" type="unsigned short" readonly="yes">
11621 <desc>
11622 The major USB version of the device - 1 or 2.
11623 </desc>
11624 </attribute>
11625
11626 <attribute name="portVersion" type="unsigned short" readonly="yes">
11627 <desc>
11628 The major USB version of the host USB port the device is
11629 physically connected to - 1 or 2. For devices not connected to
11630 anything this will have the same value as the version attribute.
11631 </desc>
11632 </attribute>
11633
11634 <attribute name="remote" type="boolean" readonly="yes">
11635 <desc>
11636 Whether the device is physically connected to a remote VRDP
11637 client or to a local host machine.
11638 </desc>
11639 </attribute>
11640
11641 </interface>
11642
11643
11644 <!--
11645 // IUSBDeviceFilter
11646 /////////////////////////////////////////////////////////////////////////
11647 -->
11648
11649 <interface
11650 name="IUSBDeviceFilter" extends="$unknown"
11651 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11652 wsmap="managed"
11653 >
11654 <desc>
11655 The IUSBDeviceFilter interface represents an USB device filter used
11656 to perform actions on a group of USB devices.
11657
11658 This type of filters is used by running virtual machines to
11659 automatically capture selected USB devices once they are physically
11660 attached to the host computer.
11661
11662 A USB device is matched to the given device filter if and only if all
11663 attributes of the device match the corresponding attributes of the
11664 filter (that is, attributes are joined together using the logical AND
11665 operation). On the other hand, all together, filters in the list of
11666 filters carry the semantics of the logical OR operation. So if it is
11667 desirable to create a match like "this vendor id OR this product id",
11668 one needs to create two filters and specify "any match" (see below)
11669 for unused attributes.
11670
11671 All filter attributes used for matching are strings. Each string
11672 is an expression representing a set of values of the corresponding
11673 device attribute, that will match the given filter. Currently, the
11674 following filtering expressions are supported:
11675
11676 <ul>
11677 <li><i>Interval filters</i>. Used to specify valid intervals for
11678 integer device attributes (Vendor ID, Product ID and Revision).
11679 The format of the string is:
11680
11681 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11682
11683 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11684 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11685 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11686 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11687 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11688 possible integer is assumed.
11689 </li>
11690 <li><i>Boolean filters</i>. Used to specify acceptable values for
11691 boolean device attributes. The format of the string is:
11692
11693 <tt>true|false|yes|no|0|1</tt>
11694
11695 </li>
11696 <li><i>Exact match</i>. Used to specify a single value for the given
11697 device attribute. Any string that doesn't start with <tt>int:</tt>
11698 represents the exact match. String device attributes are compared to
11699 this string including case of symbols. Integer attributes are first
11700 converted to a string (see individual filter attributes) and then
11701 compared ignoring case.
11702
11703 </li>
11704 <li><i>Any match</i>. Any value of the corresponding device attribute
11705 will match the given filter. An empty or @c null string is
11706 used to construct this type of filtering expressions.
11707
11708 </li>
11709 </ul>
11710
11711 <note>
11712 On the Windows host platform, interval filters are not currently
11713 available. Also all string filter attributes
11714 (<link to="#manufacturer"/>, <link to="#product"/>,
11715 <link to="#serialNumber"/>) are ignored, so they behave as
11716 <i>any match</i> no matter what string expression is specified.
11717 </note>
11718
11719 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11720 </desc>
11721
11722 <attribute name="name" type="wstring">
11723 <desc>
11724 Visible name for this filter.
11725 This name is used to visually distinguish one filter from another,
11726 so it can neither be @c null nor an empty string.
11727 </desc>
11728 </attribute>
11729
11730 <attribute name="active" type="boolean">
11731 <desc>Whether this filter active or has been temporarily disabled.</desc>
11732 </attribute>
11733
11734 <attribute name="vendorId" type="wstring">
11735 <desc>
11736 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11737 The string representation for the <i>exact matching</i>
11738 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11739 (including leading zeroes).
11740 </desc>
11741 </attribute>
11742
11743 <attribute name="productId" type="wstring">
11744 <desc>
11745 <link to="IUSBDevice::productId">Product ID</link> filter.
11746 The string representation for the <i>exact matching</i>
11747 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11748 (including leading zeroes).
11749 </desc>
11750 </attribute>
11751
11752 <attribute name="revision" type="wstring">
11753 <desc>
11754 <link to="IUSBDevice::productId">Product revision number</link>
11755 filter. The string representation for the <i>exact matching</i>
11756 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11757 of the integer part of the revision, and <tt>F</tt> is the
11758 decimal digit of its fractional part (including leading and
11759 trailing zeros).
11760 Note that for interval filters, it's best to use the hexadecimal
11761 form, because the revision is stored as a 16 bit packed BCD value;
11762 so the expression <tt>int:0x0100-0x0199</tt> will match any
11763 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11764 </desc>
11765 </attribute>
11766
11767 <attribute name="manufacturer" type="wstring">
11768 <desc>
11769 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11770 </desc>
11771 </attribute>
11772
11773 <attribute name="product" type="wstring">
11774 <desc>
11775 <link to="IUSBDevice::product">Product</link> filter.
11776 </desc>
11777 </attribute>
11778
11779 <attribute name="serialNumber" type="wstring">
11780 <desc>
11781 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11782 </desc>
11783 </attribute>
11784
11785 <attribute name="port" type="wstring">
11786 <desc>
11787 <link to="IUSBDevice::port">Host USB port</link> filter.
11788 </desc>
11789 </attribute>
11790
11791 <attribute name="remote" type="wstring">
11792 <desc>
11793 <link to="IUSBDevice::remote">Remote state</link> filter.
11794 <note>
11795 This filter makes sense only for machine USB filters,
11796 i.e. it is ignored by IHostUSBDeviceFilter objects.
11797 </note>
11798 </desc>
11799 </attribute>
11800
11801 <attribute name="maskedInterfaces" type="unsigned long">
11802 <desc>
11803 This is an advanced option for hiding one or more USB interfaces
11804 from the guest. The value is a bit mask where the bits that are set
11805 means the corresponding USB interface should be hidden, masked off
11806 if you like.
11807 This feature only works on Linux hosts.
11808 </desc>
11809 </attribute>
11810
11811 </interface>
11812
11813
11814 <!--
11815 // IHostUSBDevice
11816 /////////////////////////////////////////////////////////////////////////
11817 -->
11818
11819 <enum
11820 name="USBDeviceState"
11821 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11822 >
11823 <desc>
11824 USB device state. This enumeration represents all possible states
11825 of the USB device physically attached to the host computer regarding
11826 its state on the host computer and availability to guest computers
11827 (all currently running virtual machines).
11828
11829 Once a supported USB device is attached to the host, global USB
11830 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11831 either ignore the device, or put it to USBDeviceState_Held state, or do
11832 nothing. Unless the device is ignored by global filters, filters of all
11833 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11834 activated that can put it to USBDeviceState_Captured state.
11835
11836 If the device was ignored by global filters, or didn't match
11837 any filters at all (including guest ones), it is handled by the host
11838 in a normal way. In this case, the device state is determined by
11839 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11840 or USBDeviceState_Available, depending on the current device usage.
11841
11842 Besides auto-capturing based on filters, the device can be manually
11843 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11844 state is USBDeviceState_Busy, USBDeviceState_Available or
11845 USBDeviceState_Held.
11846
11847 <note>
11848 Due to differences in USB stack implementations in Linux and Win32,
11849 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11850 only to the Linux version of the product. This also means that (<link
11851 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11852 device state is USBDeviceState_Held.
11853 </note>
11854
11855 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11856 </desc>
11857
11858 <const name="NotSupported" value="0">
11859 <desc>
11860 Not supported by the VirtualBox server, not available to guests.
11861 </desc>
11862 </const>
11863 <const name="Unavailable" value="1">
11864 <desc>
11865 Being used by the host computer exclusively,
11866 not available to guests.
11867 </desc>
11868 </const>
11869 <const name="Busy" value="2">
11870 <desc>
11871 Being used by the host computer, potentially available to guests.
11872 </desc>
11873 </const>
11874 <const name="Available" value="3">
11875 <desc>
11876 Not used by the host computer, available to guests (the host computer
11877 can also start using the device at any time).
11878 </desc>
11879 </const>
11880 <const name="Held" value="4">
11881 <desc>
11882 Held by the VirtualBox server (ignored by the host computer),
11883 available to guests.
11884 </desc>
11885 </const>
11886 <const name="Captured" value="5">
11887 <desc>
11888 Captured by one of the guest computers, not available
11889 to anybody else.
11890 </desc>
11891 </const>
11892 </enum>
11893
11894 <interface
11895 name="IHostUSBDevice" extends="IUSBDevice"
11896 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11897 wsmap="managed"
11898 >
11899 <desc>
11900 The IHostUSBDevice interface represents a physical USB device attached
11901 to the host computer.
11902
11903 Besides properties inherited from IUSBDevice, this interface adds the
11904 <link to="#state"/> property that holds the current state of the USB
11905 device.
11906
11907 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11908 </desc>
11909
11910 <attribute name="state" type="USBDeviceState" readonly="yes">
11911 <desc>
11912 Current state of the device.
11913 </desc>
11914 </attribute>
11915
11916 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11917
11918 </interface>
11919
11920
11921 <!--
11922 // IHostUSBDeviceFilter
11923 /////////////////////////////////////////////////////////////////////////
11924 -->
11925
11926 <enum
11927 name="USBDeviceFilterAction"
11928 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11929 >
11930 <desc>
11931 Actions for host USB device filters.
11932 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11933 </desc>
11934
11935 <const name="Null" value="0">
11936 <desc>Null value (never used by the API).</desc>
11937 </const>
11938 <const name="Ignore" value="1">
11939 <desc>Ignore the matched USB device.</desc>
11940 </const>
11941 <const name="Hold" value="2">
11942 <desc>Hold the matched USB device.</desc>
11943 </const>
11944 </enum>
11945
11946 <interface
11947 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11948 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11949 wsmap="managed"
11950 >
11951 <desc>
11952 The IHostUSBDeviceFilter interface represents a global filter for a
11953 physical USB device used by the host computer. Used indirectly in
11954 <link to="IHost::USBDeviceFilters"/>.
11955
11956 Using filters of this type, the host computer determines the initial
11957 state of the USB device after it is physically attached to the
11958 host's USB controller.
11959
11960 <note>
11961 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
11962 filters, because it makes sense only for
11963 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11964 </note>
11965
11966 <see>IHost::USBDeviceFilters</see>
11967 </desc>
11968
11969 <attribute name="action" type="USBDeviceFilterAction">
11970 <desc>
11971 Action performed by the host when an attached USB device
11972 matches this filter.
11973 </desc>
11974 </attribute>
11975
11976 </interface>
11977
11978 <!--
11979 // IAudioAdapter
11980 /////////////////////////////////////////////////////////////////////////
11981 -->
11982
11983 <enum
11984 name="AudioDriverType"
11985 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11986 >
11987 <desc>
11988 Host audio driver type.
11989 </desc>
11990
11991 <const name="Null" value="0">
11992 <desc>Null value, also means "dummy audio driver".</desc>
11993 </const>
11994 <const name="WinMM" value="1">
11995 <desc>Windows multimedia (Windows hosts only).</desc>
11996 </const>
11997 <const name="OSS" value="2">
11998 <desc>Open Sound System (Linux hosts only).</desc>
11999 </const>
12000 <const name="ALSA" value="3">
12001 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12002 </const>
12003 <const name="DirectSound" value="4">
12004 <desc>DirectSound (Windows hosts only).</desc>
12005 </const>
12006 <const name="CoreAudio" value="5">
12007 <desc>CoreAudio (Mac hosts only).</desc>
12008 </const>
12009 <const name="MMPM" value="6">
12010 <desc>Reserved for historical reasons.</desc>
12011 </const>
12012 <const name="Pulse" value="7">
12013 <desc>PulseAudio (Linux hosts only).</desc>
12014 </const>
12015 <const name="SolAudio" value="8">
12016 <desc>Solaris audio (Solaris hosts only).</desc>
12017 </const>
12018 </enum>
12019
12020 <enum
12021 name="AudioControllerType"
12022 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12023 >
12024 <desc>
12025 Virtual audio controller type.
12026 </desc>
12027
12028 <const name="AC97" value="0"/>
12029 <const name="SB16" value="1"/>
12030 <const name="HDA" value="2"/>
12031 </enum>
12032
12033 <interface
12034 name="IAudioAdapter" extends="$unknown"
12035 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12036 wsmap="managed"
12037 >
12038 <desc>
12039 The IAudioAdapter interface represents the virtual audio adapter of
12040 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12041 </desc>
12042 <attribute name="enabled" type="boolean">
12043 <desc>
12044 Flag whether the audio adapter is present in the
12045 guest system. If disabled, the virtual guest hardware will
12046 not contain any audio adapter. Can only be changed when
12047 the VM is not running.
12048 </desc>
12049 </attribute>
12050 <attribute name="audioController" type="AudioControllerType">
12051 <desc>
12052 The audio hardware we emulate.
12053 </desc>
12054 </attribute>
12055 <attribute name="audioDriver" type="AudioDriverType">
12056 <desc>
12057 Audio driver the adapter is connected to. This setting
12058 can only be changed when the VM is not running.
12059 </desc>
12060 </attribute>
12061 </interface>
12062
12063 <!--
12064 // IVRDPServer
12065 /////////////////////////////////////////////////////////////////////////
12066 -->
12067
12068 <enum
12069 name="VRDPAuthType"
12070 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12071 >
12072 <desc>
12073 VRDP authentication type.
12074 </desc>
12075
12076 <const name="Null" value="0">
12077 <desc>Null value, also means "no authentication".</desc>
12078 </const>
12079 <const name="External" value="1"/>
12080 <const name="Guest" value="2"/>
12081 </enum>
12082
12083 <interface
12084 name="IVRDPServer" extends="$unknown"
12085 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12086 wsmap="managed"
12087 >
12088 <attribute name="enabled" type="boolean">
12089 <desc>VRDP server status.</desc>
12090 </attribute>
12091
12092 <attribute name="ports" type="wstring">
12093 <desc>
12094 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12095 <note>
12096 This is a string of comma separated TCP port numbers or port number ranges.
12097 Example <tt>5000,5010-5012,5015</tt>
12098 </note>
12099 </desc>
12100 </attribute>
12101
12102 <attribute name="netAddress" type="wstring">
12103 <desc>VRDP server address.</desc>
12104 </attribute>
12105
12106 <attribute name="authType" type="VRDPAuthType">
12107 <desc>VRDP authentication method.</desc>
12108 </attribute>
12109
12110 <attribute name="authTimeout" type="unsigned long">
12111 <desc>Timeout for guest authentication. Milliseconds.</desc>
12112 </attribute>
12113
12114 <attribute name="allowMultiConnection" type="boolean">
12115 <desc>
12116 Flag whether multiple simultaneous connections to the VM are permitted.
12117 Note that this will be replaced by a more powerful mechanism in the future.
12118 </desc>
12119 </attribute>
12120
12121 <attribute name="reuseSingleConnection" type="boolean">
12122 <desc>
12123 Flag whether the existing connection must be dropped and a new connection
12124 must be established by the VRDP server, when a new client connects in single
12125 connection mode.
12126 </desc>
12127 </attribute>
12128
12129 <attribute name="videoChannel" type="boolean">
12130 <desc>
12131 Flag whether RDP video channel is supported.
12132 </desc>
12133 </attribute>
12134
12135 <attribute name="videoChannelQuality" type="unsigned long">
12136 <desc>
12137 Image quality in percents.
12138 </desc>
12139 </attribute>
12140
12141 </interface>
12142
12143
12144 <!--
12145 // ISharedFolder
12146 /////////////////////////////////////////////////////////////////////////
12147 -->
12148
12149 <interface
12150 name="ISharedFolder" extends="$unknown"
12151 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12152 wsmap="struct"
12153 >
12154 <desc>
12155 The ISharedFolder interface represents a folder in the host computer's
12156 file system accessible from the guest OS running inside a virtual
12157 machine using an associated logical name.
12158
12159 There are three types of shared folders:
12160 <ul>
12161 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12162 folders available to all virtual machines.</li>
12163 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12164 VM-specific shared folders available to the given virtual machine at
12165 startup.</li>
12166 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12167 VM-specific shared folders created in the session context (for
12168 example, when the virtual machine is running) and automatically
12169 discarded when the session is closed (the VM is powered off).</li>
12170 </ul>
12171
12172 Logical names of shared folders must be unique within the given scope
12173 (global, permanent or transient). However, they do not need to be unique
12174 across scopes. In this case, the definition of the shared folder in a
12175 more specific scope takes precedence over definitions in all other
12176 scopes. The order of precedence is (more specific to more general):
12177 <ol>
12178 <li>Transient definitions</li>
12179 <li>Permanent definitions</li>
12180 <li>Global definitions</li>
12181 </ol>
12182
12183 For example, if MyMachine has a shared folder named
12184 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12185 transient shared folder named <tt>C_DRIVE</tt> (that points
12186 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12187 of <tt>C_DRIVE</tt> in the guest OS so
12188 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12189 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12190 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12191 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12192 to <tt>C:\\</tt> if it still exists.
12193
12194 Note that permanent and transient shared folders of different machines
12195 are in different name spaces, so they don't overlap and don't need to
12196 have unique logical names.
12197
12198 <note>
12199 Global shared folders are not implemented in the current version of the
12200 product.
12201 </note>
12202 </desc>
12203
12204 <attribute name="name" type="wstring" readonly="yes">
12205 <desc>Logical name of the shared folder.</desc>
12206 </attribute>
12207
12208 <attribute name="hostPath" type="wstring" readonly="yes">
12209 <desc>Full path to the shared folder in the host file system.</desc>
12210 </attribute>
12211
12212 <attribute name="accessible" type="boolean" readonly="yes">
12213 <desc>
12214 Whether the folder defined by the host path is currently
12215 accessible or not.
12216 For example, the folder can be unaccessible if it is placed
12217 on the network share that is not available by the time
12218 this property is read.
12219 </desc>
12220 </attribute>
12221
12222 <attribute name="writable" type="boolean" readonly="yes">
12223 <desc>
12224 Whether the folder defined by the host path is writable or
12225 not.
12226 </desc>
12227 </attribute>
12228
12229 <attribute name="autoMount" type="boolean" readonly="yes">
12230 <desc>
12231 Whether the folder gets automatically mounted by the guest or not.
12232 </desc>
12233 </attribute>
12234
12235 <attribute name="lastAccessError" type="wstring" readonly="yes">
12236 <desc>
12237 Text message that represents the result of the last accessibility
12238 check.
12239
12240 Accessibility checks are performed each time the <link to="#accessible"/>
12241 attribute is read. An empty string is returned if the last
12242 accessibility check was successful. A non-empty string indicates a
12243 failure and should normally describe a reason of the failure (for
12244 example, a file read error).
12245 </desc>
12246 </attribute>
12247
12248 </interface>
12249
12250 <!--
12251 // ISession
12252 /////////////////////////////////////////////////////////////////////////
12253 -->
12254
12255 <interface
12256 name="IInternalSessionControl" extends="$unknown"
12257 uuid="ef059f1d-2273-4f81-9342-c152a0d2cd40"
12258 internal="yes"
12259 wsmap="suppress"
12260 >
12261 <method name="getPID">
12262 <desc>PID of the process that has created this Session object.
12263 </desc>
12264 <param name="pid" type="unsigned long" dir="return"/>
12265 </method>
12266
12267 <method name="getRemoteConsole">
12268 <desc>
12269 Returns the console object suitable for remote control.
12270
12271 <result name="VBOX_E_INVALID_VM_STATE">
12272 Session state prevents operation.
12273 </result>
12274 <result name="VBOX_E_INVALID_OBJECT_STATE">
12275 Session type prevents operation.
12276 </result>
12277
12278 </desc>
12279 <param name="console" type="IConsole" dir="return"/>
12280 </method>
12281
12282 <method name="assignMachine">
12283 <desc>
12284 Assigns the machine object associated with this direct-type
12285 session or informs the session that it will be a remote one
12286 (if @a machine == @c null).
12287
12288 <result name="VBOX_E_INVALID_VM_STATE">
12289 Session state prevents operation.
12290 </result>
12291 <result name="VBOX_E_INVALID_OBJECT_STATE">
12292 Session type prevents operation.
12293 </result>
12294
12295 </desc>
12296 <param name="machine" type="IMachine" dir="in"/>
12297 </method>
12298
12299 <method name="assignRemoteMachine">
12300 <desc>
12301 Assigns the machine and the (remote) console object associated with
12302 this remote-type session.
12303
12304 <result name="VBOX_E_INVALID_VM_STATE">
12305 Session state prevents operation.
12306 </result>
12307
12308 </desc>
12309 <param name="machine" type="IMachine" dir="in"/>
12310 <param name="console" type="IConsole" dir="in"/>
12311 </method>
12312
12313 <method name="updateMachineState">
12314 <desc>
12315 Updates the machine state in the VM process.
12316 Must be called only in certain cases
12317 (see the method implementation).
12318
12319 <result name="VBOX_E_INVALID_VM_STATE">
12320 Session state prevents operation.
12321 </result>
12322 <result name="VBOX_E_INVALID_OBJECT_STATE">
12323 Session type prevents operation.
12324 </result>
12325
12326 </desc>
12327 <param name="aMachineState" type="MachineState" dir="in"/>
12328 </method>
12329
12330 <method name="uninitialize">
12331 <desc>
12332 Uninitializes (closes) this session. Used by VirtualBox to close
12333 the corresponding remote session when the direct session dies
12334 or gets closed.
12335
12336 <result name="VBOX_E_INVALID_VM_STATE">
12337 Session state prevents operation.
12338 </result>
12339
12340 </desc>
12341 </method>
12342
12343 <method name="onNetworkAdapterChange">
12344 <desc>
12345 Triggered when settings of a network adapter of the
12346 associated virtual machine have changed.
12347
12348 <result name="VBOX_E_INVALID_VM_STATE">
12349 Session state prevents operation.
12350 </result>
12351 <result name="VBOX_E_INVALID_OBJECT_STATE">
12352 Session type prevents operation.
12353 </result>
12354
12355 </desc>
12356 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12357 <param name="changeAdapter" type="boolean" dir="in"/>
12358 </method>
12359
12360 <method name="onSerialPortChange">
12361 <desc>
12362 Triggered when settings of a serial port of the
12363 associated virtual machine have changed.
12364
12365 <result name="VBOX_E_INVALID_VM_STATE">
12366 Session state prevents operation.
12367 </result>
12368 <result name="VBOX_E_INVALID_OBJECT_STATE">
12369 Session type prevents operation.
12370 </result>
12371
12372 </desc>
12373 <param name="serialPort" type="ISerialPort" dir="in"/>
12374 </method>
12375
12376 <method name="onParallelPortChange">
12377 <desc>
12378 Triggered when settings of a parallel port of the
12379 associated virtual machine have changed.
12380
12381 <result name="VBOX_E_INVALID_VM_STATE">
12382 Session state prevents operation.
12383 </result>
12384 <result name="VBOX_E_INVALID_OBJECT_STATE">
12385 Session type prevents operation.
12386 </result>
12387
12388 </desc>
12389 <param name="parallelPort" type="IParallelPort" dir="in"/>
12390 </method>
12391
12392 <method name="onStorageControllerChange">
12393 <desc>
12394 Triggered when settings of a storage controller of the
12395 associated virtual machine have changed.
12396
12397 <result name="VBOX_E_INVALID_VM_STATE">
12398 Session state prevents operation.
12399 </result>
12400 <result name="VBOX_E_INVALID_OBJECT_STATE">
12401 Session type prevents operation.
12402 </result>
12403
12404 </desc>
12405 </method>
12406
12407 <method name="onMediumChange">
12408 <desc>
12409 Triggered when attached media of the
12410 associated virtual machine have changed.
12411
12412 <result name="VBOX_E_INVALID_VM_STATE">
12413 Session state prevents operation.
12414 </result>
12415 <result name="VBOX_E_INVALID_OBJECT_STATE">
12416 Session type prevents operation.
12417 </result>
12418
12419 </desc>
12420
12421 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12422 <param name="force" type="boolean" dir="in"/>
12423 </method>
12424
12425 <method name="onCPUChange">
12426 <desc>
12427 Notification when a CPU changes.
12428 </desc>
12429 <param name="cpu" type="unsigned long" dir="in">
12430 <desc>The CPU which changed</desc>
12431 </param>
12432 <param name="add" type="boolean" dir="in">
12433 <desc>Flag whether the CPU was added or removed</desc>
12434 </param>
12435 </method>
12436
12437 <method name="onCPUPriorityChange">
12438 <desc>
12439 Notification when the CPU priority changes.
12440 </desc>
12441 <param name="priority" type="unsigned long" dir="in">
12442 <desc>The new CPU priority value. (1-100)</desc>
12443 </param>
12444 </method>
12445
12446 <method name="onVRDPServerChange">
12447 <desc>
12448 Triggered when settings of the VRDP server object of the
12449 associated virtual machine have changed.
12450
12451 <result name="VBOX_E_INVALID_VM_STATE">
12452 Session state prevents operation.
12453 </result>
12454 <result name="VBOX_E_INVALID_OBJECT_STATE">
12455 Session type prevents operation.
12456 </result>
12457
12458 </desc>
12459 <param name="restart" type="boolean" dir="in">
12460 <desc>Flag whether the server must be restarted</desc>
12461 </param>
12462 </method>
12463
12464 <method name="onUSBControllerChange">
12465 <desc>
12466 Triggered when settings of the USB controller object of the
12467 associated virtual machine have changed.
12468
12469 <result name="VBOX_E_INVALID_VM_STATE">
12470 Session state prevents operation.
12471 </result>
12472 <result name="VBOX_E_INVALID_OBJECT_STATE">
12473 Session type prevents operation.
12474 </result>
12475
12476 </desc>
12477 </method>
12478
12479 <method name="onSharedFolderChange">
12480 <desc>
12481 Triggered when a permanent (global or machine) shared folder has been
12482 created or removed.
12483 <note>
12484 We don't pass shared folder parameters in this notification because
12485 the order in which parallel notifications are delivered is not defined,
12486 therefore it could happen that these parameters were outdated by the
12487 time of processing this notification.
12488 </note>
12489
12490 <result name="VBOX_E_INVALID_VM_STATE">
12491 Session state prevents operation.
12492 </result>
12493 <result name="VBOX_E_INVALID_OBJECT_STATE">
12494 Session type prevents operation.
12495 </result>
12496
12497 </desc>
12498 <param name="global" type="boolean" dir="in"/>
12499 </method>
12500
12501 <method name="onUSBDeviceAttach">
12502 <desc>
12503 Triggered when a request to capture a USB device (as a result
12504 of matched USB filters or direct call to
12505 <link to="IConsole::attachUSBDevice"/>) has completed.
12506 A @c null @a error object means success, otherwise it
12507 describes a failure.
12508
12509 <result name="VBOX_E_INVALID_VM_STATE">
12510 Session state prevents operation.
12511 </result>
12512 <result name="VBOX_E_INVALID_OBJECT_STATE">
12513 Session type prevents operation.
12514 </result>
12515
12516 </desc>
12517 <param name="device" type="IUSBDevice" dir="in"/>
12518 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12519 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12520 </method>
12521
12522 <method name="onUSBDeviceDetach">
12523 <desc>
12524 Triggered when a request to release the USB device (as a result
12525 of machine termination or direct call to
12526 <link to="IConsole::detachUSBDevice"/>) has completed.
12527 A @c null @a error object means success, otherwise it
12528 describes a failure.
12529
12530 <result name="VBOX_E_INVALID_VM_STATE">
12531 Session state prevents operation.
12532 </result>
12533 <result name="VBOX_E_INVALID_OBJECT_STATE">
12534 Session type prevents operation.
12535 </result>
12536
12537 </desc>
12538 <param name="id" type="uuid" mod="string" dir="in"/>
12539 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12540 </method>
12541
12542 <method name="onShowWindow">
12543 <desc>
12544 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12545 <link to="IMachine::showConsoleWindow"/> in order to notify
12546 console listeners
12547 <link to="ICanShowWindowEvent"/>
12548 and <link to="IShowWindowEvent"/>.
12549
12550 <result name="VBOX_E_INVALID_OBJECT_STATE">
12551 Session type prevents operation.
12552 </result>
12553
12554 </desc>
12555 <param name="check" type="boolean" dir="in"/>
12556 <param name="canShow" type="boolean" dir="out"/>
12557 <param name="winId" type="unsigned long long" dir="out"/>
12558 </method>
12559
12560 <method name="accessGuestProperty">
12561 <desc>
12562 Called by <link to="IMachine::getGuestProperty"/> and by
12563 <link to="IMachine::setGuestProperty"/> in order to read and
12564 modify guest properties.
12565
12566 <result name="VBOX_E_INVALID_VM_STATE">
12567 Machine session is not open.
12568 </result>
12569 <result name="VBOX_E_INVALID_OBJECT_STATE">
12570 Session type is not direct.
12571 </result>
12572
12573 </desc>
12574 <param name="name" type="wstring" dir="in"/>
12575 <param name="value" type="wstring" dir="in"/>
12576 <param name="flags" type="wstring" dir="in"/>
12577 <param name="isSetter" type="boolean" dir="in"/>
12578 <param name="retValue" type="wstring" dir="out"/>
12579 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12580 <param name="retFlags" type="wstring" dir="out"/>
12581 </method>
12582
12583 <method name="enumerateGuestProperties">
12584 <desc>
12585 Return a list of the guest properties matching a set of patterns along
12586 with their values, time stamps and flags.
12587
12588 <result name="VBOX_E_INVALID_VM_STATE">
12589 Machine session is not open.
12590 </result>
12591 <result name="VBOX_E_INVALID_OBJECT_STATE">
12592 Session type is not direct.
12593 </result>
12594
12595 </desc>
12596 <param name="patterns" type="wstring" dir="in">
12597 <desc>
12598 The patterns to match the properties against as a comma-separated
12599 string. If this is empty, all properties currently set will be
12600 returned.
12601 </desc>
12602 </param>
12603 <param name="key" type="wstring" dir="out" safearray="yes">
12604 <desc>
12605 The key names of the properties returned.
12606 </desc>
12607 </param>
12608 <param name="value" type="wstring" dir="out" safearray="yes">
12609 <desc>
12610 The values of the properties returned. The array entries match the
12611 corresponding entries in the @a key array.
12612 </desc>
12613 </param>
12614 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12615 <desc>
12616 The time stamps of the properties returned. The array entries match
12617 the corresponding entries in the @a key array.
12618 </desc>
12619 </param>
12620 <param name="flags" type="wstring" dir="out" safearray="yes">
12621 <desc>
12622 The flags of the properties returned. The array entries match the
12623 corresponding entries in the @a key array.
12624 </desc>
12625 </param>
12626 </method>
12627
12628 <method name="onlineMergeMedium">
12629 <desc>
12630 Triggers online merging of a hard disk. Used internally when deleting
12631 a snapshot while a VM referring to the same hard disk chain is running.
12632
12633 <result name="VBOX_E_INVALID_VM_STATE">
12634 Machine session is not open.
12635 </result>
12636 <result name="VBOX_E_INVALID_OBJECT_STATE">
12637 Session type is not direct.
12638 </result>
12639
12640 </desc>
12641 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12642 <desc>The medium attachment to identify the medium chain.</desc>
12643 </param>
12644 <param name="sourceIdx" type="unsigned long" dir="in">
12645 <desc>The index of the source image in the chain.
12646 Redundant, but drastically reduces IPC.</desc>
12647 </param>
12648 <param name="targetIdx" type="unsigned long" dir="in">
12649 <desc>The index of the target image in the chain.
12650 Redundant, but drastically reduces IPC.</desc>
12651 </param>
12652 <param name="source" type="IMedium" dir="in">
12653 <desc>Merge source medium.</desc>
12654 </param>
12655 <param name="target" type="IMedium" dir="in">
12656 <desc>Merge target medium.</desc>
12657 </param>
12658 <param name="mergeForward" type="boolean" dir="in">
12659 <desc>Merge direction.</desc>
12660 </param>
12661 <param name="parentForTarget" type="IMedium" dir="in">
12662 <desc>For forward merges: new parent for target medium.</desc>
12663 </param>
12664 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12665 <desc>For backward merges: list of media which need their parent UUID
12666 updated.</desc>
12667 </param>
12668 <param name="progress" type="IProgress" dir="in">
12669 <desc>
12670 Progress object for this operation.
12671 </desc>
12672 </param>
12673 </method>
12674
12675 </interface>
12676
12677 <interface
12678 name="ISession" extends="$unknown"
12679 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12680 wsmap="managed"
12681 >
12682 <desc>
12683 The ISession interface represents a client process and allows for locking
12684 virtual machines (represented by IMachine objects) to prevent conflicting
12685 changes to the machine.
12686
12687 Any caller wishing to manipulate a virtual machine needs to create a session
12688 object first, which lives in its own process space. Such session objects are
12689 then associated with <link to="IMachine" /> objects living in the VirtualBox
12690 server process to coordinate such changes.
12691
12692 There are two typical scenarios in which sessions are used:
12693
12694 <ul>
12695 <li>To alter machine settings or control a running virtual machine, one
12696 needs to lock a machine for a given session (client process) by calling
12697 <link to="IMachine::lockMachine"/>.
12698
12699 Whereas multiple sessions may control a running virtual machine, only
12700 one process can obtain a write lock on the machine to prevent conflicting
12701 changes. A write lock is also needed if a process wants to actually run a
12702 virtual machine in its own context, such as the VirtualBox GUI or
12703 VBoxHeadless front-ends. They must also lock a machine for their own
12704 sessions before they are allowed to power up the virtual machine.
12705
12706 As a result, no machine settings can be altered while another process is
12707 already using it, either because that process is modifying machine settings
12708 or because the machine is running.
12709 </li>
12710 <li>
12711 To start a VM using one of the existing VirtualBox front-ends (e.g. the
12712 VirtualBox GUI or VBoxHeadless), one would use
12713 <link to="IMachine::launchVMProcess"/>, which also takes a session object
12714 as its first parameter. This session then identifies the caller and lets the
12715 caller control the started machine (for example, pause machine execution or
12716 power it down) as well as be notified about machine execution state changes.
12717 </li>
12718 </ul>
12719
12720 How sessions objects are created in a client process depends on whether you use
12721 the Main API via COM or via the webservice:
12722
12723 <ul>
12724 <li>When using the COM API directly, an object of the Session class from the
12725 VirtualBox type library needs to be created. In regular COM C++ client code,
12726 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12727 This object will then act as a local session object in further calls to open
12728 a session.
12729 </li>
12730
12731 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12732 a session object automatically whenever <link to="IWebsessionManager::logon" />
12733 is called. A managed object reference to that session object can be retrieved by
12734 calling <link to="IWebsessionManager::getSessionObject" />.
12735 </li>
12736 </ul>
12737 </desc>
12738
12739 <attribute name="state" type="SessionState" readonly="yes">
12740 <desc>Current state of this session.</desc>
12741 </attribute>
12742
12743 <attribute name="type" type="SessionType" readonly="yes">
12744 <desc>
12745 Type of this session. The value of this attribute is valid only
12746 if the session currently has a machine locked (i.e. its
12747 <link to="#state" /> is Locked), otherwise an error will be returned.
12748 </desc>
12749 </attribute>
12750
12751 <attribute name="machine" type="IMachine" readonly="yes">
12752 <desc>Machine object associated with this session.</desc>
12753 </attribute>
12754
12755 <attribute name="console" type="IConsole" readonly="yes">
12756 <desc>Console object associated with this session.</desc>
12757 </attribute>
12758
12759 <method name="unlockMachine">
12760 <desc>
12761 Unlocks a machine that was previously locked for the current session.
12762
12763 Calling this method is required every time a machine has been locked
12764 for a particular session using the <link to="IMachine::launchVMProcess" />
12765 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
12766 the machine will be set to <link to="MachineState_Aborted" /> on the
12767 server, and changes made to the machine settings will be lost.
12768
12769 Generally, it is recommended to unlock all machines explicitly
12770 before terminating the application (regardless of the reason for
12771 the termination).
12772
12773 <note>
12774 Do not expect the session state (<link to="ISession::state" />
12775 to return to "Unlocked" immediately after you invoke this method,
12776 particularly if you have started a new VM process. The session
12777 state will automatically return to "Unlocked" once the VM is no
12778 longer executing, which can of course take a very long time.
12779 </note>
12780
12781 <result name="E_UNEXPECTED">
12782 Session is not locked.
12783 </result>
12784
12785 </desc>
12786 </method>
12787
12788 </interface>
12789
12790 <!--
12791 // IStorageController
12792 /////////////////////////////////////////////////////////////////////////
12793 -->
12794
12795 <enum
12796 name="StorageBus"
12797 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12798 >
12799 <desc>
12800 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
12801 see <link to="IStorageController::bus" />.
12802 </desc>
12803 <const name="Null" value="0">
12804 <desc>@c null value. Never used by the API.</desc>
12805 </const>
12806 <const name="IDE" value="1"/>
12807 <const name="SATA" value="2"/>
12808 <const name="SCSI" value="3"/>
12809 <const name="Floppy" value="4"/>
12810 <const name="SAS" value="5"/>
12811 </enum>
12812
12813 <enum
12814 name="StorageControllerType"
12815 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12816 >
12817 <desc>
12818 The exact variant of storage controller hardware presented
12819 to the guest; see <link to="IStorageController::controllerType" />.
12820 </desc>
12821
12822 <const name="Null" value="0">
12823 <desc>@c null value. Never used by the API.</desc>
12824 </const>
12825 <const name="LsiLogic" value="1">
12826 <desc>A SCSI controller of the LsiLogic variant.</desc>
12827 </const>
12828 <const name="BusLogic" value="2">
12829 <desc>A SCSI controller of the BusLogic variant.</desc>
12830 </const>
12831 <const name="IntelAhci" value="3">
12832 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12833 </const>
12834 <const name="PIIX3" value="4">
12835 <desc>An IDE controller of the PIIX3 variant.</desc>
12836 </const>
12837 <const name="PIIX4" value="5">
12838 <desc>An IDE controller of the PIIX4 variant.</desc>
12839 </const>
12840 <const name="ICH6" value="6">
12841 <desc>An IDE controller of the ICH6 variant.</desc>
12842 </const>
12843 <const name="I82078" value="7">
12844 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12845 </const>
12846 <const name="LsiLogicSas" value="8">
12847 <desc>A variant of the LsiLogic controller using SAS.</desc>
12848 </const>
12849 </enum>
12850
12851 <interface
12852 name="IStorageController" extends="$unknown"
12853 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
12854 wsmap="managed"
12855 >
12856 <desc>
12857 Represents a storage controller that is attached to a virtual machine
12858 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
12859 attached to storage controllers in a real computer, virtual drives
12860 (represented by <link to="IMediumAttachment" />) are attached to virtual
12861 storage controllers, represented by this interface.
12862
12863 As opposed to physical hardware, VirtualBox has a very generic concept
12864 of a storage controller, and for purposes of the Main API, all virtual
12865 storage is attached to virtual machines via instances of this interface.
12866 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
12867 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
12868 is used, certain sub-types may be available and can be selected in
12869 <link to="#controllerType" />.
12870
12871 Depending on these settings, the guest operating system might see
12872 significantly different virtual hardware.
12873 </desc>
12874
12875 <attribute name="name" type="wstring" readonly="yes">
12876 <desc>
12877 Name of the storage controller, as originally specified with
12878 <link to="IMachine::addStorageController" />. This then uniquely
12879 identifies this controller with other method calls such as
12880 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12881 </desc>
12882 </attribute>
12883
12884 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12885 <desc>
12886 Maximum number of devices which can be attached to one port.
12887 </desc>
12888 </attribute>
12889
12890 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12891 <desc>
12892 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12893 </desc>
12894 </attribute>
12895
12896 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12897 <desc>
12898 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12899 </desc>
12900 </attribute>
12901
12902 <attribute name="instance" type="unsigned long">
12903 <desc>
12904 The instance number of the device in the running VM.
12905 </desc>
12906 </attribute>
12907
12908 <attribute name="portCount" type="unsigned long">
12909 <desc>
12910 The number of currently usable ports on the controller.
12911 The minimum and maximum number of ports for one controller are
12912 stored in <link to="IStorageController::minPortCount"/>
12913 and <link to="IStorageController::maxPortCount"/>.
12914 </desc>
12915 </attribute>
12916
12917 <attribute name="bus" type="StorageBus" readonly="yes">
12918 <desc>
12919 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
12920 </desc>
12921 </attribute>
12922
12923 <attribute name="controllerType" type="StorageControllerType">
12924 <desc>
12925 The exact variant of storage controller hardware presented
12926 to the guest.
12927 Depending on this value, VirtualBox will provide a different
12928 virtual storage controller hardware to the guest.
12929 For SATA, SAS and floppy controllers, only one variant is
12930 available, but for IDE and SCSI, there are several.
12931
12932 For SCSI controllers, the default type is LsiLogic.
12933 </desc>
12934 </attribute>
12935
12936 <attribute name="useHostIOCache" type="boolean">
12937 <desc>
12938 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
12939 caches and use synchronous file APIs on the host. This was the only option in the API before
12940 VirtualBox 3.2 and is still the default for IDE controllers.
12941
12942 If false, the host I/O cache will be disabled for image files attached to this storage controller.
12943 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
12944 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
12945 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
12946 virtual machines are running at the same time to prevent I/O cache related hangs.
12947 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
12948 </desc>
12949 </attribute>
12950
12951 <method name="getIDEEmulationPort">
12952 <desc>
12953 Gets the corresponding port number which is emulated as an IDE device.
12954 Works only with SATA controllers.
12955
12956 <result name="E_INVALIDARG">
12957 The @a devicePosition is not in the range 0 to 3.
12958 </result>
12959 <result name="E_NOTIMPL">
12960 The storage controller type is not SATAIntelAhci.
12961 </result>
12962
12963 </desc>
12964 <param name="devicePosition" type="long" dir="in"/>
12965 <param name="portNumber" type="long" dir="return"/>
12966 </method>
12967
12968 <method name="setIDEEmulationPort">
12969 <desc>
12970 Sets the port number which is emulated as an IDE device.
12971 Works only with SATA controllers.
12972
12973 <result name="E_INVALIDARG">
12974 The @a devicePosition is not in the range 0 to 3 or the
12975 @a portNumber is not in the range 0 to 29.
12976 </result>
12977 <result name="E_NOTIMPL">
12978 The storage controller type is not SATAIntelAhci.
12979 </result>
12980
12981 </desc>
12982 <param name="devicePosition" type="long" dir="in"/>
12983 <param name="portNumber" type="long" dir="in"/>
12984 </method>
12985
12986 </interface>
12987
12988<if target="wsdl">
12989
12990 <!--
12991 // IManagedObjectRef
12992 /////////////////////////////////////////////////////////////////////////
12993 -->
12994
12995 <interface
12996 name="IManagedObjectRef" extends="$unknown"
12997 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12998 internal="yes"
12999 wsmap="managed"
13000 wscpp="hardcoded"
13001 >
13002 <desc>
13003 Managed object reference.
13004
13005 Only within the webservice, a managed object reference (which is really
13006 an opaque number) allows a webservice client to address an object
13007 that lives in the address space of the webservice server.
13008
13009 Behind each managed object reference, there is a COM object that lives
13010 in the webservice server's address space. The COM object is not freed
13011 until the managed object reference is released, either by an explicit
13012 call to <link to="IManagedObjectRef::release" /> or by logging off from
13013 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13014 all objects created during the webservice session.
13015
13016 Whenever a method call of the VirtualBox API returns a COM object, the
13017 webservice representation of that method will instead return a
13018 managed object reference, which can then be used to invoke methods
13019 on that object.
13020 </desc>
13021
13022 <method name="getInterfaceName">
13023 <desc>
13024 Returns the name of the interface that this managed object represents,
13025 for example, "IMachine", as a string.
13026 </desc>
13027 <param name="return" type="wstring" dir="return"/>
13028 </method>
13029
13030 <method name="release">
13031 <desc>
13032 Releases this managed object reference and frees the resources that
13033 were allocated for it in the webservice server process. After calling
13034 this method, the identifier of the reference can no longer be used.
13035 </desc>
13036 </method>
13037
13038 </interface>
13039
13040 <!--
13041 // IWebsessionManager
13042 /////////////////////////////////////////////////////////////////////////
13043 -->
13044
13045 <interface
13046 name="IWebsessionManager" extends="$unknown"
13047 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13048 internal="yes"
13049 wsmap="global"
13050 wscpp="hardcoded"
13051 >
13052 <desc>
13053 Websession manager. This provides essential services
13054 to webservice clients.
13055 </desc>
13056 <method name="logon">
13057 <desc>
13058 Logs a new client onto the webservice and returns a managed object reference to
13059 the IVirtualBox instance, which the client can then use as a basis to further
13060 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13061 interface, in one way or the other.
13062 </desc>
13063 <param name="username" type="wstring" dir="in"/>
13064 <param name="password" type="wstring" dir="in"/>
13065 <param name="return" type="IVirtualBox" dir="return"/>
13066 </method>
13067
13068 <method name="getSessionObject">
13069 <desc>
13070 Returns a managed object reference to the internal ISession object that was created
13071 for this web service session when the client logged on.
13072
13073 <see>ISession</see>
13074 </desc>
13075 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13076 <param name="return" type="ISession" dir="return"/>
13077 </method>
13078
13079 <method name="logoff">
13080 <desc>
13081 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13082 and destroys all resources associated with the session (most importantly, all
13083 managed objects created in the server while the session was active).
13084 </desc>
13085 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13086 </method>
13087
13088 </interface>
13089
13090</if>
13091
13092 <!--
13093 // IPerformanceCollector & friends
13094 /////////////////////////////////////////////////////////////////////////
13095 -->
13096
13097 <interface
13098 name="IPerformanceMetric" extends="$unknown"
13099 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13100 >
13101 <desc>
13102 The IPerformanceMetric interface represents parameters of the given
13103 performance metric.
13104 </desc>
13105
13106 <attribute name="metricName" type="wstring" readonly="yes">
13107 <desc>
13108 Name of the metric.
13109 </desc>
13110 </attribute>
13111
13112 <attribute name="object" type="$unknown" readonly="yes">
13113 <desc>
13114 Object this metric belongs to.
13115 </desc>
13116 </attribute>
13117
13118 <attribute name="description" type="wstring" readonly="yes">
13119 <desc>
13120 Textual description of the metric.
13121 </desc>
13122 </attribute>
13123
13124 <attribute name="period" type="unsigned long" readonly="yes">
13125 <desc>
13126 Time interval between samples, measured in seconds.
13127 </desc>
13128 </attribute>
13129
13130 <attribute name="count" type="unsigned long" readonly="yes">
13131 <desc>
13132 Number of recent samples retained by the performance collector for this
13133 metric.
13134
13135 When the collected sample count exceeds this number, older samples
13136 are discarded.
13137 </desc>
13138 </attribute>
13139
13140 <attribute name="unit" type="wstring" readonly="yes">
13141 <desc>
13142 Unit of measurement.
13143 </desc>
13144 </attribute>
13145
13146 <attribute name="minimumValue" type="long" readonly="yes">
13147 <desc>
13148 Minimum possible value of this metric.
13149 </desc>
13150 </attribute>
13151
13152 <attribute name="maximumValue" type="long" readonly="yes">
13153 <desc>
13154 Maximum possible value of this metric.
13155 </desc>
13156 </attribute>
13157 </interface>
13158
13159 <interface
13160 name="IPerformanceCollector" extends="$unknown"
13161 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13162 wsmap="managed"
13163 >
13164 <desc>
13165 The IPerformanceCollector interface represents a service that collects
13166 and stores performance metrics data.
13167
13168 Performance metrics are associated with objects of interfaces like IHost
13169 and IMachine. Each object has a distinct set of performance metrics. The
13170 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13171
13172 Metric data is collected at the specified intervals and is retained
13173 internally. The interval and the number of retained samples can be set
13174 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13175 and collection settings are not persistent, they are discarded as soon as
13176 VBoxSVC process terminates. Moreover, metric settings and data associated
13177 with a particular VM only exist while VM is running. They disappear as
13178 soon as VM shuts down. It is not possible to set up metrics for machines
13179 that are powered off. One needs to start VM first, then set up metric
13180 collection parameters.
13181
13182 Metrics are organized hierarchically, with each level separated by a
13183 slash (/) character. Generally, the scheme for metric names is like this:
13184
13185 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13186
13187 "Category/Metric" together form the base metric name. A base metric is
13188 the smallest unit for which a sampling interval and the number of
13189 retained samples can be set. Only base metrics can be enabled and
13190 disabled. All sub-metrics are collected when their base metric is
13191 collected. Collected values for any set of sub-metrics can be queried
13192 with <link to="IPerformanceCollector::queryMetricsData" />.
13193
13194 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13195 category, "Load" metric, "User" submetric, "average" aggregate. An
13196 aggregate function is computed over all retained data. Valid aggregate
13197 functions are:
13198
13199 <ul>
13200 <li>avg -- average</li>
13201 <li>min -- minimum</li>
13202 <li>max -- maximum</li>
13203 </ul>
13204
13205 When setting up metric parameters, querying metric data, enabling or
13206 disabling metrics wildcards can be used in metric names to specify a
13207 subset of metrics. For example, to select all CPU-related metrics
13208 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13209 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13210
13211 The valid names for base metrics are:
13212
13213 <ul>
13214 <li>CPU/Load</li>
13215 <li>CPU/MHz</li>
13216 <li>RAM/Usage</li>
13217 </ul>
13218
13219 The general sequence for collecting and retrieving the metrics is:
13220 <ul>
13221 <li>
13222 Obtain an instance of IPerformanceCollector with
13223 <link to="IVirtualBox::performanceCollector" />
13224 </li>
13225 <li>
13226 Allocate and populate an array with references to objects the metrics
13227 will be collected for. Use references to IHost and IMachine objects.
13228 </li>
13229 <li>
13230 Allocate and populate an array with base metric names the data will
13231 be collected for.
13232 </li>
13233 <li>
13234 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13235 the metric data will be collected and stored.
13236 </li>
13237 <li>
13238 Wait for the data to get collected.
13239 </li>
13240 <li>
13241 Allocate and populate an array with references to objects the metric
13242 values will be queried for. You can re-use the object array used for
13243 setting base metrics.
13244 </li>
13245 <li>
13246 Allocate and populate an array with metric names the data will be
13247 collected for. Note that metric names differ from base metric names.
13248 </li>
13249 <li>
13250 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13251 that have been collected so far are returned. Note that the values
13252 are still retained internally and data collection continues.
13253 </li>
13254 </ul>
13255
13256 For an example of usage refer to the following files in VirtualBox SDK:
13257 <ul>
13258 <li>
13259 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13260 </li>
13261 <li>
13262 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13263 </li>
13264 </ul>
13265 </desc>
13266
13267 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13268 <desc>
13269 Array of unique names of metrics.
13270
13271 This array represents all metrics supported by the performance
13272 collector. Individual objects do not necessarily support all of them.
13273 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13274 list of supported metrics for a particular object.
13275 </desc>
13276 </attribute>
13277
13278 <method name="getMetrics">
13279 <desc>
13280 Returns parameters of specified metrics for a set of objects.
13281 <note>
13282 @c Null metrics array means all metrics. @c Null object array means
13283 all existing objects.
13284 </note>
13285 </desc>
13286 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13287 <desc>
13288 Metric name filter. Currently, only a comma-separated list of metrics
13289 is supported.
13290 </desc>
13291 </param>
13292 <param name="objects" type="$unknown" dir="in" safearray="yes">
13293 <desc>
13294 Set of objects to return metric parameters for.
13295 </desc>
13296 </param>
13297 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13298 <desc>
13299 Array of returned metric parameters.
13300 </desc>
13301 </param>
13302 </method>
13303
13304 <method name="setupMetrics">
13305 <desc>
13306 Sets parameters of specified base metrics for a set of objects. Returns
13307 an array of <link to="IPerformanceMetric" /> describing the metrics
13308 have been affected.
13309 <note>
13310 @c Null or empty metric name array means all metrics. @c Null or
13311 empty object array means all existing objects. If metric name array
13312 contains a single element and object array contains many, the single
13313 metric name array element is applied to each object array element to
13314 form metric/object pairs.
13315 </note>
13316 </desc>
13317 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13318 <desc>
13319 Metric name filter. Comma-separated list of metrics with wildcard
13320 support.
13321 </desc>
13322 </param>
13323 <param name="objects" type="$unknown" dir="in" safearray="yes">
13324 <desc>
13325 Set of objects to setup metric parameters for.
13326 </desc>
13327 </param>
13328 <param name="period" type="unsigned long" dir="in">
13329 <desc>
13330 Time interval in seconds between two consecutive samples of
13331 performance data.
13332 </desc>
13333 </param>
13334 <param name="count" type="unsigned long" dir="in">
13335 <desc>
13336 Number of samples to retain in performance data history. Older
13337 samples get discarded.
13338 </desc>
13339 </param>
13340 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13341 <desc>
13342 Array of metrics that have been modified by the call to this method.
13343 </desc>
13344 </param>
13345 </method>
13346
13347 <method name="enableMetrics">
13348 <desc>
13349 Turns on collecting specified base metrics. Returns an array of
13350 <link to="IPerformanceMetric" /> describing the metrics have been
13351 affected.
13352 <note>
13353 @c Null or empty metric name array means all metrics. @c Null or
13354 empty object array means all existing objects. If metric name array
13355 contains a single element and object array contains many, the single
13356 metric name array element is applied to each object array element to
13357 form metric/object pairs.
13358 </note>
13359 </desc>
13360 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13361 <desc>
13362 Metric name filter. Comma-separated list of metrics with wildcard
13363 support.
13364 </desc>
13365 </param>
13366 <param name="objects" type="$unknown" dir="in" safearray="yes">
13367 <desc>
13368 Set of objects to enable metrics for.
13369 </desc>
13370 </param>
13371 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13372 <desc>
13373 Array of metrics that have been modified by the call to this method.
13374 </desc>
13375 </param>
13376 </method>
13377
13378 <method name="disableMetrics">
13379 <desc>
13380 Turns off collecting specified base metrics. Returns an array of
13381 <link to="IPerformanceMetric" /> describing the metrics have been
13382 affected.
13383 <note>
13384 @c Null or empty metric name array means all metrics. @c Null or
13385 empty object array means all existing objects. If metric name array
13386 contains a single element and object array contains many, the single
13387 metric name array element is applied to each object array element to
13388 form metric/object pairs.
13389 </note>
13390 </desc>
13391 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13392 <desc>
13393 Metric name filter. Comma-separated list of metrics with wildcard
13394 support.
13395 </desc>
13396 </param>
13397 <param name="objects" type="$unknown" dir="in" safearray="yes">
13398 <desc>
13399 Set of objects to disable metrics for.
13400 </desc>
13401 </param>
13402 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13403 <desc>
13404 Array of metrics that have been modified by the call to this method.
13405 </desc>
13406 </param>
13407 </method>
13408
13409 <method name="queryMetricsData">
13410 <desc>
13411 Queries collected metrics data for a set of objects.
13412
13413 The data itself and related metric information are returned in seven
13414 parallel and one flattened array of arrays. Elements of
13415 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13416 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13417 the same index describe one set of values corresponding to a single
13418 metric.
13419
13420 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13421 start and length of a sub-array is indicated by
13422 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13423 value for metric <tt>metricNames[i]</tt> is at
13424 <tt>returnData[returnIndices[i]]</tt>.
13425
13426 <note>
13427 @c Null or empty metric name array means all metrics. @c Null or
13428 empty object array means all existing objects. If metric name array
13429 contains a single element and object array contains many, the single
13430 metric name array element is applied to each object array element to
13431 form metric/object pairs.
13432 </note>
13433 <note>
13434 Data collection continues behind the scenes after call to @c
13435 queryMetricsData. The return data can be seen as the snapshot of the
13436 current state at the time of @c queryMetricsData call. The internally
13437 kept metric values are not cleared by the call. This makes possible
13438 querying different subsets of metrics or aggregates with subsequent
13439 calls. If periodic querying is needed it is highly suggested to query
13440 the values with @c interval*count period to avoid confusion. This way
13441 a completely new set of data values will be provided by each query.
13442 </note>
13443 </desc>
13444 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13445 <desc>
13446 Metric name filter. Comma-separated list of metrics with wildcard
13447 support.
13448 </desc>
13449 </param>
13450 <param name="objects" type="$unknown" dir="in" safearray="yes">
13451 <desc>
13452 Set of objects to query metrics for.
13453 </desc>
13454 </param>
13455 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13456 <desc>
13457 Names of metrics returned in @c returnData.
13458 </desc>
13459 </param>
13460 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13461 <desc>
13462 Objects associated with metrics returned in @c returnData.
13463 </desc>
13464 </param>
13465 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13466 <desc>
13467 Units of measurement for each returned metric.
13468 </desc>
13469 </param>
13470 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13471 <desc>
13472 Divisor that should be applied to return values in order to get
13473 floating point values. For example:
13474 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13475 will retrieve the floating point value of i-th sample of the first
13476 metric.
13477 </desc>
13478 </param>
13479 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13480 <desc>
13481 Sequence numbers of the first elements of value sequences of
13482 particular metrics returned in @c returnData. For aggregate metrics
13483 it is the sequence number of the sample the aggregate started
13484 calculation from.
13485 </desc>
13486 </param>
13487 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13488 <desc>
13489 Indices of the first elements of value sequences of particular
13490 metrics returned in @c returnData.
13491 </desc>
13492 </param>
13493 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13494 <desc>
13495 Lengths of value sequences of particular metrics.
13496 </desc>
13497 </param>
13498 <param name="returnData" type="long" dir="return" safearray="yes">
13499 <desc>
13500 Flattened array of all metric data containing sequences of values for
13501 each metric.
13502 </desc>
13503 </param>
13504 </method>
13505
13506 </interface>
13507 <enum
13508 name="NATAliasMode"
13509 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13510 <desc></desc>
13511 <const name="AliasLog" value="0x1">
13512 <desc></desc>
13513 </const>
13514 <const name="AliasProxyOnly" value="0x02">
13515 <desc></desc>
13516 </const>
13517 <const name="AliasUseSamePorts" value="0x04">
13518 <desc></desc>
13519 </const>
13520 </enum>
13521 <enum
13522 name="NATProtocol"
13523 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13524 >
13525 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13526 <const name="UDP" value="0">
13527 <desc>Port-forwarding uses UDP protocol.</desc>
13528 </const>
13529 <const name="TCP" value="1">
13530 <desc>Port-forwarding uses TCP protocol.</desc>
13531 </const>
13532 </enum>
13533
13534 <interface
13535 name="INATEngine" extends="$unknown"
13536 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13537 wsmap="managed"
13538 >
13539 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13540 allows for changing NAT behavior such as port-forwarding rules. This interface is
13541 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13542 <attribute name="network" type="wstring">
13543 <desc>The network attribute of the NAT engine (the same value is used with built-in
13544 DHCP server to fill corresponding fields of DHCP leases).</desc>
13545 </attribute>
13546 <attribute name="hostIP" type="wstring">
13547 <desc>IP of host interface to bind all opened sockets to.
13548 <note>Changing this does not change binding of port forwarding.</note>
13549 </desc>
13550 </attribute>
13551 <attribute name="tftpPrefix" type="wstring">
13552 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
13553 the corresponding fields of DHCP leases.</desc>
13554 </attribute>
13555 <attribute name="tftpBootFile" type="wstring">
13556 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13557 the corresponding fields of DHCP leases.</desc>
13558 </attribute>
13559 <attribute name="tftpNextServer" type="wstring">
13560 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13561 the corresponding fields of DHCP leases.
13562 <note>The preferred form is IPv4 addresses.</note>
13563 </desc>
13564 </attribute>
13565 <attribute name="aliasMode" type="unsigned long">
13566 <desc></desc>
13567 </attribute>
13568 <attribute name="dnsPassDomain" type="boolean">
13569 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13570 </attribute>
13571 <attribute name="dnsProxy" type="boolean">
13572 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13573 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
13574 </attribute>
13575 <attribute name="dnsUseHostResolver" type="boolean">
13576 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13577 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13578 </attribute>
13579 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13580 <desc>Array of NAT port-forwarding rules in string representation, in the following
13581 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13582 </attribute>
13583 <method name="setNetworkSettings">
13584 <desc>Sets network configuration of the NAT engine.</desc>
13585 <param name="mtu" type="unsigned long" dir="in">
13586 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13587 </param>
13588 <param name="sockSnd" type="unsigned long" dir="in">
13589 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13590 </param>
13591 <param name="sockRcv" type="unsigned long" dir="in">
13592 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13593 </param>
13594 <param name="TcpWndSnd" type="unsigned long" dir="in">
13595 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13596 establishing a new TCP connection.</desc>
13597 </param>
13598 <param name="TcpWndRcv" type="unsigned long" dir="in">
13599 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13600 establishing a new TCP connection.</desc>
13601 </param>
13602 </method>
13603 <method name="getNetworkSettings">
13604 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13605 for parameter descriptions.</desc>
13606 <param name="mtu" type="unsigned long" dir="out" />
13607 <param name="sockSnd" type="unsigned long" dir="out" />
13608 <param name="sockRcv" type="unsigned long" dir="out" />
13609 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13610 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13611 </method>
13612 <method name="addRedirect">
13613 <desc>Adds a new NAT port-forwarding rule.</desc>
13614 <param name="name" type="wstring" dir="in">
13615 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13616 auto-generates one using the other parameters.</desc>
13617 </param>
13618 <param name="proto" type="NATProtocol" dir="in">
13619 <desc>Protocol handled with the rule.</desc>
13620 </param>
13621 <param name="hostIp" type="wstring" dir="in">
13622 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13623 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13624 </param>
13625 <param name="hostPort" type="unsigned short" dir="in">
13626 <desc>The port number to listen on.</desc>
13627 </param>
13628 <param name="guestIp" type="wstring" dir="in">
13629 <desc>The IP address of the guest which the NAT engine will forward matching packets
13630 to. An empty IP address is acceptable, in which case the NAT engine will forward
13631 packets to the first DHCP lease (x.x.x.15).</desc>
13632 </param>
13633 <param name="guestPort" type="unsigned short" dir="in">
13634 <desc>The port number to forward.</desc>
13635 </param>
13636 </method>
13637 <method name="removeRedirect">
13638 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13639 <param name="name" type="wstring" dir="in">
13640 <desc>The name of the rule to delete.</desc>
13641 </param>
13642 </method>
13643 </interface>
13644
13645 <enum
13646 name="VBoxEventType"
13647 uuid="2c76667e-6981-4122-a71a-cdfd6a6eb575">
13648
13649 <desc>
13650 Type of an event.
13651 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13652 </desc>
13653
13654 <const name="Invalid" value="0">
13655 <desc>
13656 Invalid event, must be first.
13657 </desc>
13658 </const>
13659
13660 <const name="Any" value="1">
13661 <desc>
13662 Wildcard for all events.
13663 Events of this type are never delivered, and only used in
13664 registerListener() call to simplify registration.
13665 </desc>
13666 </const>
13667
13668 <const name="Vetoable" value="2">
13669 <desc>
13670 Wildcard for all vetoable events. Events of this type are never delivered, and only
13671 used in registerListener() call to simplify registration.
13672 </desc>
13673 </const>
13674
13675 <const name="MachineEvent" value="3">
13676 <desc>
13677 Wildcard for all machine events. Events of this type are never delivered, and only used in
13678 registerListener() call to simplify registration.
13679 </desc>
13680 </const>
13681
13682 <const name="SnapshotEvent" value="4">
13683 <desc>
13684 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13685 registerListener() call to simplify registration.
13686 </desc>
13687 </const>
13688
13689 <const name="InputEvent" value="5">
13690 <desc>
13691 Wildcard for all input device (keyboard, mouse) events.
13692 Events of this type are never delivered, and only used in
13693 registerListener() call to simplify registration.
13694 </desc>
13695 </const>
13696
13697 <const name="LastWildcard" value="31">
13698 <desc>
13699 Last wildcard.
13700 </desc>
13701 </const>
13702
13703 <const name="OnMachineStateChanged" value="32">
13704 <desc>
13705 See <link to="IMachineStateChangedEvent">IMachineStateChangedEvent</link>.
13706 </desc>
13707 </const>
13708 <const name="OnMachineDataChanged" value="33">
13709 <desc>
13710 See <link to="IMachineDataChangedEvent">IMachineDataChangedEvent</link>.
13711 </desc>
13712 </const>
13713 <const name="OnExtraDataChanged" value="34">
13714 <desc>
13715 See <link to="IExtraDataChangedEvent">IExtraDataChangedEvent</link>.
13716 </desc>
13717 </const>
13718 <const name="OnExtraDataCanChange" value="35">
13719 <desc>
13720 See <link to="IExtraDataCanChangeEvent">IExtraDataCanChangeEvent</link>.
13721 </desc>
13722 </const>
13723 <const name="OnMediumRegistered" value="36">
13724 <desc>
13725 See <link to="IMediumRegisteredEvent">IMediumRegisteredEvent</link>.
13726 </desc>
13727 </const>
13728 <const name="OnMachineRegistered" value="37">
13729 <desc>
13730 See <link to="IMachineRegisteredEvent">IMachineRegisteredEvent</link>.
13731 </desc>
13732 </const>
13733 <const name="OnSessionStateChanged" value="38">
13734 <desc>
13735 See <link to="ISessionStateChangedEvent">ISessionStateChangedEvent</link>.
13736 </desc>
13737 </const>
13738 <const name="OnSnapshotTaken" value="39">
13739 <desc>
13740 See <link to="ISnapshotTakenEvent">ISnapshotTakenEvent</link>.
13741 </desc>
13742 </const>
13743 <const name="OnSnapshotDeleted" value="40">
13744 <desc>
13745 See <link to="ISnapshotDeletedEvent">ISnapshotDeletedEvent</link>.
13746 </desc>
13747 </const>
13748 <const name="OnSnapshotChanged" value="41">
13749 <desc>
13750 See <link to="ISnapshotChangedEvent">ISnapshotChangedEvent</link>.
13751 </desc>
13752 </const>
13753 <const name="OnGuestPropertyChanged" value="42">
13754 <desc>
13755 See <link to="IGuestPropertyChangedEvent">IGuestPropertyChangedEvent</link>.
13756 </desc>
13757 </const>
13758 <!-- Console events -->
13759 <const name="OnMousePointerShapeChanged" value="43">
13760 <desc>
13761 See <link to="IMousePointerShapeChangedEvent">IMousePointerShapeChangedEvent</link>.
13762 </desc>
13763 </const>
13764 <const name="OnMouseCapabilityChanged" value="44">
13765 <desc>
13766 See <link to="IMouseCapabilityChangedEvent">IMouseCapabilityChangedEvent</link>.
13767 </desc>
13768 </const>
13769 <const name="OnKeyboardLedsChanged" value="45">
13770 <desc>
13771 See <link to="IKeyboardLedsChangedEvent">IKeyboardLedsChangedEvent</link>.
13772 </desc>
13773 </const>
13774 <const name="OnStateChanged" value="46">
13775 <desc>
13776 See <link to="IStateChangedEvent">IStateChangedEvent</link>.
13777 </desc>
13778 </const>
13779 <const name="OnAdditionsStateChanged" value="47">
13780 <desc>
13781 See <link to="IAdditionsStateChangedEvent">IAdditionsStateChangedEvent</link>.
13782 </desc>
13783 </const>
13784 <const name="OnNetworkAdapterChanged" value="48">
13785 <desc>
13786 See <link to="INetworkAdapterChangedEvent">INetworkAdapterChangedEvent</link>.
13787 </desc>
13788 </const>
13789 <const name="OnSerialPortChanged" value="49">
13790 <desc>
13791 See <link to="ISerialPortChangedEvent">ISerialPortChangedEvent</link>.
13792 </desc>
13793 </const>
13794 <const name="OnParallelPortChanged" value="50">
13795 <desc>
13796 See <link to="IParallelPortChangedEvent">IParallelPortChangedEvent</link>.
13797 </desc>
13798 </const>
13799 <const name="OnStorageControllerChanged" value="51">
13800 <desc>
13801 See <link to="IStorageControllerChangedEvent">IStorageControllerChangedEvent</link>.
13802 </desc>
13803 </const>
13804 <const name="OnMediumChanged" value="52">
13805 <desc>
13806 See <link to="IMediumChangedEvent">IMediumChangedEvent</link>.
13807 </desc>
13808 </const>
13809 <const name="OnVRDPServerChanged" value="53">
13810 <desc>
13811 See <link to="IVRDPServerChangedEvent">IVRDPServerChangedEvent</link>.
13812 </desc>
13813 </const>
13814 <const name="OnUSBControllerChanged" value="54">
13815 <desc>
13816 See <link to="IUSBControllerChangedEvent">IUSBControllerChangedEvent</link>.
13817 </desc>
13818 </const>
13819 <const name="OnUSBDeviceStateChanged" value="55">
13820 <desc>
13821 See <link to="IUSBDeviceStateChangedEvent">IUSBDeviceStateChangedEvent</link>.
13822 </desc>
13823 </const>
13824 <const name="OnSharedFolderChanged" value="56">
13825 <desc>
13826 See <link to="ISharedFolderChangedEvent">ISharedFolderChangedEvent</link>.
13827 </desc>
13828 </const>
13829 <const name="OnRuntimeError" value="57">
13830 <desc>
13831 See <link to="IRuntimeErrorEvent">IRuntimeErrorEvent</link>.
13832 </desc>
13833 </const>
13834 <const name="OnCanShowWindow" value="58">
13835 <desc>
13836 See <link to="ICanShowWindowEvent">ICanShowWindowEvent</link>.
13837 </desc>
13838 </const>
13839 <const name="OnShowWindow" value="59">
13840 <desc>
13841 See <link to="IShowWindowEvent">IShowWindowEvent</link>.
13842 </desc>
13843 </const>
13844 <const name="OnCPUChanged" value="60">
13845 <desc>
13846 See <link to="ICPUChangedEvent">ICPUChangedEvent</link>.
13847 </desc>
13848 </const>
13849 <const name="OnRemoteDisplayInfoChanged" value="61">
13850 <desc>
13851 See <link to="IRemoteDisplayInfoChangedEvent">IRemoteDisplayInfoChangedEvent</link>.
13852 </desc>
13853 </const>
13854 <const name="OnEventSourceChanged" value="62">
13855 <desc>
13856 See <link to="IEventSourceChangedEvent">IEventSourceChangedEvent</link>.
13857 </desc>
13858 </const>
13859 <const name="OnCPUPriorityChanged" value="63">
13860 <desc>
13861 See <link to="ICPUPriorityChangedEvent">ICPUPriorityChangedEvent</link>.
13862 </desc>
13863 </const>
13864 <!-- Last event marker -->
13865 <const name="Last" value="64">
13866 <desc>
13867 Must be last event, used for iterations and structures relying on numerical event values.
13868 </desc>
13869 </const>
13870
13871 </enum>
13872
13873 <interface
13874 name="IEventSource" extends="$unknown"
13875 uuid="3c670618-f727-4fe9-94d2-8243f489a033"
13876 wsmap="managed"
13877 >
13878 <desc>
13879 Event source. Generally, any object which could generate events can be an event source,
13880 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
13881 an event source can work with listeners in either active or passive mode. In active mode it is up to
13882 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
13883 event source keeps track of pending events for each listener and returns available events on demand.
13884
13885 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13886 </desc>
13887
13888 <method name="createListener">
13889 <desc>
13890 Creates a new listener object, useful for passive mode.
13891 </desc>
13892 <param name="listener" type="IEventListener" dir="return"/>
13893 </method>
13894
13895 <method name="registerListener">
13896 <desc>
13897 Register an event listener.
13898
13899 <note>
13900 To avoid system overload, the VirtualBox server process checks if passive event
13901 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
13902 current implementation, if more than 100 pending events are detected for a passive
13903 event listener, it is forcefully unregistered by the system, and further
13904 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
13905 </note>
13906 </desc>
13907 <param name="listener" type="IEventListener" dir="in">
13908 <desc>Listener to register.</desc>
13909 </param>
13910 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
13911 <desc>
13912 Event types listener is interested in. One can use wildcards like -
13913 <link to="VBoxEventType::Any"/> to specify wildcards, matching more
13914 than one event.
13915 </desc>
13916 </param>
13917 <param name="active" type="boolean" dir="in">
13918 <desc>
13919 Which mode this listener is operating in.
13920 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
13921 In passive mode, an internal event queue is created for this this IEventListener.
13922 For each event coming in, it is added to queues for all interested registered passive
13923 listeners. It is then up to the external code to call the listener's
13924 <link to="IEventListener::handleEvent" /> method. When done with an event, the
13925 external code must call <link to="#eventProcessed" />.
13926 </desc>
13927 </param>
13928 </method>
13929
13930 <method name="unregisterListener">
13931 <desc>
13932 Unregister an event listener. If listener is passive, and some waitable events are still
13933 in queue they are marked as processed automatically.
13934 </desc>
13935 <param name="listener" type="IEventListener" dir="in">
13936 <desc>Listener to unregister.</desc>
13937 </param>
13938 </method>
13939
13940 <method name="fireEvent">
13941 <desc>
13942 Fire an event for this source.
13943 </desc>
13944 <param name="event" type="IEvent" dir="in">
13945 <desc>Event to deliver.</desc>
13946 </param>
13947 <param name="timeout" type="long" dir="in">
13948 <desc>
13949 Maximum time to wait for event processing (if event is waitable), in ms;
13950 0 = no wait, -1 = indefinite wait.
13951 </desc>
13952 </param>
13953 <param name="result" type="boolean" dir="return">
13954 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
13955 </param>
13956 </method>
13957
13958 <method name="getEvent">
13959 <desc>
13960 Get events from this peer's event queue (for passive mode). Calling this method
13961 regularly is required for passive event listeners to avoid system overload;
13962 see <link to="IEventSource::registerListener" /> for details.
13963
13964 <result name="VBOX_E_OBJECT_NOT_FOUND">
13965 Listener is not registered, or autounregistered.
13966 </result>
13967 </desc>
13968 <param name="listener" type="IEventListener" dir="in">
13969 <desc>Which listener to get data for.</desc>
13970 </param>
13971 <param name="timeout" type="long" dir="in">
13972 <desc>
13973 Maximum time to wait for events, in ms;
13974 0 = no wait, -1 = indefinite wait.
13975 </desc>
13976 </param>
13977 <param name="event" type="IEvent" dir="return">
13978 <desc>Event retrieved, or null if none available.</desc>
13979 </param>
13980 </method>
13981
13982 <method name="eventProcessed">
13983 <desc>
13984 Must be called for waitable events after a particular listener finished its
13985 event processing. When all listeners of a particular event have called this
13986 method, the system will then call <link to="IEvent::setProcessed" />.
13987 </desc>
13988 <param name="listener" type="IEventListener" dir="in">
13989 <desc>Which listener processed event.</desc>
13990 </param>
13991 <param name="event" type="IEvent" dir="in">
13992 <desc>Which event.</desc>
13993 </param>
13994 </method>
13995
13996 </interface>
13997
13998 <interface
13999 name="IEventListener" extends="$unknown"
14000 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
14001 wsmap="managed"
14002 >
14003 <desc>
14004 Event listener. An event listener can work in either active or passive mode, depending on the way
14005 it was registered.
14006 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14007 </desc>
14008
14009 <method name="handleEvent">
14010 <desc>
14011 Handle event callback (called directly by IEventSource in active mode, or could be
14012 called by event processor thread in passive mode).
14013 </desc>
14014 <param name="event" type="IEvent" dir="in">
14015 <desc>Event available.</desc>
14016 </param>
14017 </method>
14018
14019 </interface>
14020
14021 <interface
14022 name="IEvent" extends="$unknown"
14023 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
14024 wsmap="managed"
14025 >
14026 <desc>
14027 Abstract parent interface for VirtualBox events. Actual events will typically implement
14028 a more specific interface which derives from this (see below).
14029
14030 <b>Introduction to VirtualBox events</b>
14031
14032 Generally speaking, an event (represented by this interface) signals that something
14033 happened, while an event listener (see <link to="IEventListener" />) represents an
14034 entity that is interested in certain events. In order for this to work with
14035 unidirectional protocols (i.e. web services), the concepts of passive and active
14036 listener are used.
14037
14038 Event consumers can register themselves as listeners, providing an array of
14039 events they are interested in (see <link to="IEventSource::registerListener" />).
14040 When an event triggers, the listener is notified about the event. The exact
14041 mechanism of the notification depends on whether the listener was registered as
14042 an active or passive listener:
14043
14044 <ul>
14045 <li>An active listener is very similar to a callback: it is a function invoked
14046 by the API. As opposed to the callbacks that were used in the API before
14047 VirtualBox 3.3 however, events are now objects with an interface hierarchy.
14048 </li>
14049
14050 <li>Passive listeners are somewhat tricker to implement, but do not require
14051 a client function to be callable, which is not an option with scripting
14052 languages or web service clients. Internally the <link to="IEventSource" />
14053 implementation maintains an event queue for each passive listener, and
14054 newly arrived events are put in this queue. When the listener calls
14055 <link to="IEventSource::getEvent"/>, first element from its internal event
14056 queue is returned. When the client completes processing of an event,
14057 the <link to="IEventSource::eventProcessed" /> function must be called,
14058 acknowledging that the event was processed. It supports implementing
14059 waitable events. On passive listener unregistration, all events from its
14060 queue are auto-acknowledged.
14061 </li>
14062 </ul>
14063
14064 Waitable events are useful in situations where the event generator wants to track
14065 delivery or a party wants to wait until all listeners have completed the event. A
14066 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
14067 listeners might veto a certain action, and thus the event producer has to make
14068 sure that all listeners have processed the event and not vetoed before taking
14069 the action.
14070
14071 A given event may have both passive and active listeners at the same time.
14072
14073 <b>Using events</b>
14074
14075 Any VirtualBox object capable of producing externally visible events provides an
14076 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14077 This event source object is notified by VirtualBox once something has happened, so
14078 consumers may register event listeners with this event source. To register a listener,
14079 an object implementing the <link to="IEventListener" /> interface must be provided.
14080 For active listeners, such an object is typically created by the consumer, while for
14081 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14082 note that a listener created with @c createListener() must not be used as an active listener.
14083
14084 Once created, the listener must be registered to listen for the desired events
14085 (see <link to="IEventSource::registerListener" />), providing an array of
14086 <link to="VBoxEventType" /> enums. Those elements can either be the individual
14087 event IDs or wildcards matching multiple event IDs.
14088
14089 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14090 called automatically when the event is triggered, while passive listeners have to call
14091 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14092 an event processing loop.
14093
14094 The IEvent interface is an abstract parent interface for all such VirtualBox events
14095 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14096 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14097 then cast to the appropriate specific interface using @c QueryInterface().
14098 </desc>
14099
14100 <attribute name="type" readonly="yes" type="VBoxEventType">
14101 <desc>
14102 Event type.
14103 </desc>
14104 </attribute>
14105
14106 <attribute name="source" readonly="yes" type="IEventSource">
14107 <desc>
14108 Source of this event.
14109 </desc>
14110 </attribute>
14111
14112 <attribute name="waitable" readonly="yes" type="boolean">
14113 <desc>
14114 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14115 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14116 as no additional overhead associated with waitability imposed.
14117 Waitable events are needed when one need to be able to wait for particular event processed,
14118 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14119 until all consumers confirmed events.
14120 </desc>
14121 </attribute>
14122
14123 <method name="setProcessed">
14124 <desc>
14125 Internal method called by the system when all listeners of a particular event have called
14126 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
14127 </desc>
14128 </method>
14129
14130 <method name="waitProcessed">
14131 <desc>
14132 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14133 described semantics, for non-waitable returns true immediately.
14134 </desc>
14135 <param name="timeout" type="long" dir="in">
14136 <desc>
14137 Maximum time to wait for event processeing, in ms;
14138 0 = no wait, -1 = indefinite wait.
14139 </desc>
14140 </param>
14141 <param name="result" type="boolean" dir="return">
14142 <desc>If this event was processed before timeout.</desc>
14143 </param>
14144 </method>
14145 </interface>
14146
14147
14148 <interface
14149 name="IMachineEvent" extends="IEvent"
14150 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14151 wsmap="managed" id="MachineEvent"
14152 >
14153 <desc>Base abstract interface for all machine events.</desc>
14154
14155 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14156 <desc>ID of the machine this event relates to.</desc>
14157 </attribute>
14158
14159 </interface>
14160
14161 <interface
14162 name="IMachineStateChangedEvent" extends="IMachineEvent"
14163 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14164 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14165 >
14166 <desc>Machine state change event.</desc>
14167
14168 <attribute name="state" readonly="yes" type="MachineState">
14169 <desc>New execution state.</desc>
14170 </attribute>
14171 </interface>
14172
14173 <interface
14174 name="IMachineDataChangedEvent" extends="IMachineEvent"
14175 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14176 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14177 >
14178 <desc>
14179 Any of the settings of the given machine has changed.
14180 </desc>
14181 </interface>
14182
14183 <interface
14184 name="IMediumRegisteredEvent" extends="IEvent"
14185 uuid="53fac49a-b7f1-4a5a-a4ef-a11dd9c2a458"
14186 wsmap="managed" autogen="VBoxEvent" id="OnMediumRegistered"
14187 >
14188 <desc>
14189 The given medium was registered or unregistered
14190 within this VirtualBox installation.
14191 </desc>
14192
14193 <attribute name="mediumId" readonly="yes" type="uuid" mod="string">
14194 <desc>ID of the medium this event relates to.</desc>
14195 </attribute>
14196
14197 <attribute name="mediumType" readonly="yes" type="DeviceType">
14198 <desc>Type of the medium this event relates to.</desc>
14199 </attribute>
14200
14201 <attribute name="registered" type="boolean" readonly="yes">
14202 <desc>
14203 If @c true, the medium was registered, otherwise it was
14204 unregistered.
14205 </desc>
14206 </attribute>
14207 </interface>
14208
14209 <interface
14210 name="IMachineRegisteredEvent" extends="IMachineEvent"
14211 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14212 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14213 >
14214 <desc>
14215 The given machine was registered or unregistered
14216 within this VirtualBox installation.
14217 </desc>
14218
14219 <attribute name="registered" type="boolean" readonly="yes">
14220 <desc>
14221 If @c true, the machine was registered, otherwise it was
14222 unregistered.
14223 </desc>
14224 </attribute>
14225 </interface>
14226
14227 <interface
14228 name="ISessionStateChangedEvent" extends="IMachineEvent"
14229 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14230 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14231 >
14232 <desc>
14233 The state of the session for the given machine was changed.
14234 <see>IMachine::sessionState</see>
14235 </desc>
14236
14237 <attribute name="state" type="SessionState" readonly="yes">
14238 <desc>
14239 New session state.
14240 </desc>
14241 </attribute>
14242 </interface>
14243
14244 <interface
14245 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14246 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14247 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14248 >
14249 <desc>
14250 Notification when a guest property has changed.
14251 </desc>
14252
14253 <attribute name="name" readonly="yes" type="wstring">
14254 <desc>
14255 The name of the property that has changed.
14256 </desc>
14257 </attribute>
14258
14259 <attribute name="value" readonly="yes" type="wstring">
14260 <desc>
14261 The new property value.
14262 </desc>
14263 </attribute>
14264
14265 <attribute name="flags" readonly="yes" type="wstring">
14266 <desc>
14267 The new property flags.
14268 </desc>
14269 </attribute>
14270
14271 </interface>
14272
14273 <interface
14274 name="ISnapshotEvent" extends="IMachineEvent"
14275 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14276 wsmap="managed" id="SnapshotEvent"
14277 >
14278 <desc>Base interface for all snapshot events.</desc>
14279
14280 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14281 <desc>ID of the snapshot this event relates to.</desc>
14282 </attribute>
14283
14284 </interface>
14285
14286 <interface
14287 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14288 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14289 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14290 >
14291 <desc>
14292 A new snapshot of the machine has been taken.
14293 <see>ISnapshot</see>
14294 </desc>
14295 </interface>
14296
14297 <interface
14298 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14299 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14300 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14301 >
14302 <desc>
14303 Snapshot of the given machine has been deleted.
14304
14305 <note>
14306 This notification is delivered <b>after</b> the snapshot
14307 object has been uninitialized on the server (so that any
14308 attempt to call its methods will return an error).
14309 </note>
14310
14311 <see>ISnapshot</see>
14312 </desc>
14313 </interface>
14314
14315 <interface
14316 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14317 uuid="07541941-8079-447a-a33e-47a69c7980db"
14318 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14319 >
14320 <desc>
14321 Snapshot properties (name and/or description) have been changed.
14322 <see>ISnapshot</see>
14323 </desc>
14324 </interface>
14325
14326 <interface
14327 name="IMousePointerShapeChangedEvent" extends="IEvent"
14328 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14329 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14330 >
14331 <desc>
14332 Notification when the guest mouse pointer shape has
14333 changed. The new shape data is given.
14334 </desc>
14335
14336 <attribute name="visible" type="boolean" readonly="yes">
14337 <desc>
14338 Flag whether the pointer is visible.
14339 </desc>
14340 </attribute>
14341 <attribute name="alpha" type="boolean" readonly="yes">
14342 <desc>
14343 Flag whether the pointer has an alpha channel.
14344 </desc>
14345 </attribute>
14346 <attribute name="xhot" type="unsigned long" readonly="yes">
14347 <desc>
14348 The pointer hot spot X coordinate.
14349 </desc>
14350 </attribute>
14351 <attribute name="yhot" type="unsigned long" readonly="yes">
14352 <desc>
14353 The pointer hot spot Y coordinate.
14354 </desc>
14355 </attribute>
14356 <attribute name="width" type="unsigned long" readonly="yes">
14357 <desc>
14358 Width of the pointer shape in pixels.
14359 </desc>
14360 </attribute>
14361 <attribute name="height" type="unsigned long" readonly="yes">
14362 <desc>
14363 Height of the pointer shape in pixels.
14364 </desc>
14365 </attribute>
14366 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14367 <desc>
14368 Shape buffer arrays.
14369
14370 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14371 followed by a 32-bpp XOR (color) mask.
14372
14373 For pointers without alpha channel the XOR mask pixels are 32
14374 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14375 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14376
14377 An AND mask is used for pointers with alpha channel, so if the
14378 callback does not support alpha, the pointer could be
14379 displayed as a normal color pointer.
14380
14381 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14382 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14383 height</tt>. The padding bits at the end of each scanline are
14384 undefined.
14385
14386 The XOR mask follows the AND mask on the next 4-byte aligned
14387 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14388 Bytes in the gap between the AND and the XOR mask are undefined.
14389 The XOR mask scanlines have no gap between them and the size of
14390 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14391
14392 <note>
14393 If @a shape is 0, only the pointer visibility is changed.
14394 </note>
14395 </desc>
14396 </attribute>
14397 </interface>
14398
14399 <interface
14400 name="IMouseCapabilityChangedEvent" extends="IEvent"
14401 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14402 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14403 >
14404 <desc>
14405 Notification when the mouse capabilities reported by the
14406 guest have changed. The new capabilities are passed.
14407 </desc>
14408 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14409 <desc>
14410 Supports absolute coordinates.
14411 </desc>
14412 </attribute>
14413 <attribute name="supportsRelative" type="boolean" readonly="yes">
14414 <desc>
14415 Supports relative coordinates.
14416 </desc>
14417 </attribute>
14418 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14419 <desc>
14420 If host cursor is needed.
14421 </desc>
14422 </attribute>
14423 </interface>
14424
14425 <interface
14426 name="IKeyboardLedsChangedEvent" extends="IEvent"
14427 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14428 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14429 >
14430 <desc>
14431 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14432 to alter the state of the keyboard LEDs.
14433 </desc>
14434 <attribute name="numLock" type="boolean" readonly="yes">
14435 <desc>
14436 NumLock status.
14437 </desc>
14438 </attribute>
14439 <attribute name="capsLock" type="boolean" readonly="yes">
14440 <desc>
14441 CapsLock status.
14442 </desc>
14443 </attribute>
14444 <attribute name="scrollLock" type="boolean" readonly="yes">
14445 <desc>
14446 ScrollLock status.
14447 </desc>
14448 </attribute>
14449 </interface>
14450
14451 <interface
14452 name="IStateChangedEvent" extends="IEvent"
14453 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14454 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14455 >
14456 <desc>
14457 Notification when the execution state of the machine has changed.
14458 The new state is given.
14459 </desc>
14460 <attribute name="state" type="MachineState" readonly="yes">
14461 <desc>
14462 New machine state.
14463 </desc>
14464 </attribute>
14465 </interface>
14466
14467 <interface
14468 name="IAdditionsStateChangedEvent" extends="IEvent"
14469 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14470 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14471 >
14472 <desc>
14473 Notification when a Guest Additions property changes.
14474 Interested callees should query IGuest attributes to
14475 find out what has changed.
14476 </desc>
14477 </interface>
14478
14479 <interface
14480 name="INetworkAdapterChangedEvent" extends="IEvent"
14481 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14482 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14483 >
14484 <desc>
14485 Notification when a property of one of the
14486 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14487 changes. Interested callees should use INetworkAdapter methods and
14488 attributes to find out what has changed.
14489 </desc>
14490 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14491 <desc>
14492 Network adapter that is subject to change.
14493 </desc>
14494 </attribute>
14495 </interface>
14496
14497 <interface
14498 name="ISerialPortChangedEvent" extends="IEvent"
14499 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14500 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14501 >
14502 <desc>
14503 Notification when a property of one of the
14504 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14505 Interested callees should use ISerialPort methods and attributes
14506 to find out what has changed.
14507 </desc>
14508 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14509 <desc>
14510 Serial port that is subject to change.
14511 </desc>
14512 </attribute>
14513 </interface>
14514
14515 <interface
14516 name="IParallelPortChangedEvent" extends="IEvent"
14517 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14518 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14519 >
14520 <desc>
14521 Notification when a property of one of the
14522 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14523 changes. Interested callees should use ISerialPort methods and
14524 attributes to find out what has changed.
14525 </desc>
14526 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14527 <desc>
14528 Parallel port that is subject to change.
14529 </desc>
14530 </attribute>
14531 </interface>
14532
14533 <interface
14534 name="IStorageControllerChangedEvent" extends="IEvent"
14535 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14536 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14537 >
14538 <desc>
14539 Notification when a
14540 <link to="IMachine::mediumAttachments">medium attachment</link>
14541 changes.
14542 </desc>
14543 </interface>
14544
14545 <interface
14546 name="IMediumChangedEvent" extends="IEvent"
14547 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14548 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14549 >
14550 <desc>
14551 Notification when a
14552 <link to="IMachine::mediumAttachments">medium attachment</link>
14553 changes.
14554 </desc>
14555 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14556 <desc>
14557 Medium attachment that is subject to change.
14558 </desc>
14559 </attribute>
14560 </interface>
14561
14562 <interface
14563 name="ICPUChangedEvent" extends="IEvent"
14564 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14565 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14566 >
14567 <desc>
14568 Notification when a CPU changes.
14569 </desc>
14570 <attribute name="cpu" type="unsigned long" readonly="yes">
14571 <desc>
14572 The CPU which changed.
14573 </desc>
14574 </attribute>
14575 <attribute name="add" type="boolean" readonly="yes">
14576 <desc>
14577 Flag whether the CPU was added or removed.
14578 </desc>
14579 </attribute>
14580 </interface>
14581
14582 <interface
14583 name="ICPUPriorityChangedEvent" extends="IEvent"
14584 uuid="657fe2fe-a75a-4cb6-8cf9-072aa41e7d75"
14585 wsmap="managed" autogen="VBoxEvent" id="OnCPUPriorityChanged"
14586 >
14587 <desc>
14588 Notification when the CPU priority changes.
14589 </desc>
14590 <attribute name="priority" type="unsigned long" readonly="yes">
14591 <desc>
14592 The new CPU priority value. (1-100)
14593 </desc>
14594 </attribute>
14595 </interface>
14596
14597 <interface
14598 name="IVRDPServerChangedEvent" extends="IEvent"
14599 uuid="726038B6-6279-4A7A-8037-D041693D1915"
14600 wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
14601 >
14602 <desc>
14603 Notification when a property of the
14604 <link to="IMachine::VRDPServer">VRDP server</link> changes.
14605 Interested callees should use IVRDPServer methods and attributes to
14606 find out what has changed.
14607 </desc>
14608 </interface>
14609
14610 <interface
14611 name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
14612 uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
14613 wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
14614 >
14615 <desc>
14616 Notification when the status of the VRDP server changes. Interested callees
14617 should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
14618 attributes to find out what is the current status.
14619 </desc>
14620 </interface>
14621
14622 <interface
14623 name="IUSBControllerChangedEvent" extends="IEvent"
14624 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
14625 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
14626 >
14627 <desc>
14628 Notification when a property of the virtual
14629 <link to="IMachine::USBController">USB controller</link> changes.
14630 Interested callees should use IUSBController methods and attributes to
14631 find out what has changed.
14632 </desc>
14633 </interface>
14634
14635 <interface
14636 name="IUSBDeviceStateChangedEvent" extends="IEvent"
14637 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
14638 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
14639 >
14640 <desc>
14641 Notification when a USB device is attached to or detached from
14642 the virtual USB controller.
14643
14644 This notification is sent as a result of the indirect
14645 request to attach the device because it matches one of the
14646 machine USB filters, or as a result of the direct request
14647 issued by <link to="IConsole::attachUSBDevice"/> or
14648 <link to="IConsole::detachUSBDevice"/>.
14649
14650 This notification is sent in case of both a succeeded and a
14651 failed request completion. When the request succeeds, the
14652 @a error parameter is @c null, and the given device has been
14653 already added to (when @a attached is @c true) or removed from
14654 (when @a attached is @c false) the collection represented by
14655 <link to="IConsole::USBDevices"/>. On failure, the collection
14656 doesn't change and the @a error parameter represents the error
14657 message describing the failure.
14658 </desc>
14659 <attribute name="device" type="IUSBDevice" readonly="yes">
14660 <desc>
14661 Device that is subject to state change.
14662 </desc>
14663 </attribute>
14664 <attribute name="attached" type="boolean" readonly="yes">
14665 <desc>
14666 @c true if the device was attached and @c false otherwise.
14667 </desc>
14668 </attribute>
14669 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
14670 <desc>
14671 @c null on success or an error message object on failure.
14672 </desc>
14673 </attribute>
14674 </interface>
14675
14676 <interface
14677 name="ISharedFolderChangedEvent" extends="IEvent"
14678 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
14679 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
14680 >
14681 <desc>
14682 Notification when a shared folder is added or removed.
14683 The @a scope argument defines one of three scopes:
14684 <link to="IVirtualBox::sharedFolders">global shared folders</link>
14685 (<link to="Scope_Global">Global</link>),
14686 <link to="IMachine::sharedFolders">permanent shared folders</link> of
14687 the machine (<link to="Scope_Machine">Machine</link>) or <link
14688 to="IConsole::sharedFolders">transient shared folders</link> of the
14689 machine (<link to="Scope_Session">Session</link>). Interested callees
14690 should use query the corresponding collections to find out what has
14691 changed.
14692 </desc>
14693 <attribute name="scope" type="Scope" readonly="yes">
14694 <desc>
14695 Scope of the notification.
14696 </desc>
14697 </attribute>
14698 </interface>
14699
14700 <interface
14701 name="IRuntimeErrorEvent" extends="IEvent"
14702 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
14703 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
14704 >
14705 <desc>
14706 Notification when an error happens during the virtual
14707 machine execution.
14708
14709 There are three kinds of runtime errors:
14710 <ul>
14711 <li><i>fatal</i></li>
14712 <li><i>non-fatal with retry</i></li>
14713 <li><i>non-fatal warnings</i></li>
14714 </ul>
14715
14716 <b>Fatal</b> errors are indicated by the @a fatal parameter set
14717 to @c true. In case of fatal errors, the virtual machine
14718 execution is always paused before calling this notification, and
14719 the notification handler is supposed either to immediately save
14720 the virtual machine state using <link to="IConsole::saveState"/>
14721 or power it off using <link to="IConsole::powerDown"/>.
14722 Resuming the execution can lead to unpredictable results.
14723
14724 <b>Non-fatal</b> errors and warnings are indicated by the
14725 @a fatal parameter set to @c false. If the virtual machine
14726 is in the Paused state by the time the error notification is
14727 received, it means that the user can <i>try to resume</i> the machine
14728 execution after attempting to solve the problem that caused the
14729 error. In this case, the notification handler is supposed
14730 to show an appropriate message to the user (depending on the
14731 value of the @a id parameter) that offers several actions such
14732 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
14733 wants to retry, the notification handler should continue
14734 the machine execution using the <link to="IConsole::resume"/>
14735 call. If the machine execution is not Paused during this
14736 notification, then it means this notification is a <i>warning</i>
14737 (for example, about a fatal condition that can happen very soon);
14738 no immediate action is required from the user, the machine
14739 continues its normal execution.
14740
14741 Note that in either case the notification handler
14742 <b>must not</b> perform any action directly on a thread
14743 where this notification is called. Everything it is allowed to
14744 do is to post a message to another thread that will then talk
14745 to the user and take the corresponding action.
14746
14747 Currently, the following error identifiers are known:
14748 <ul>
14749 <li><tt>"HostMemoryLow"</tt></li>
14750 <li><tt>"HostAudioNotResponding"</tt></li>
14751 <li><tt>"VDIStorageFull"</tt></li>
14752 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
14753 </ul>
14754 </desc>
14755 <attribute name="fatal" type="boolean" readonly="yes">
14756 <desc>
14757 Whether the error is fatal or not.
14758 </desc>
14759 </attribute>
14760 <attribute name="id" type="wstring" readonly="yes">
14761 <desc>
14762 Error identifier.
14763 </desc>
14764 </attribute>
14765 <attribute name="message" type="wstring" readonly="yes">
14766 <desc>
14767 Optional error message.
14768 </desc>
14769 </attribute>
14770 </interface>
14771
14772
14773 <interface
14774 name="IEventSourceChangedEvent" extends="IEvent"
14775 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
14776 waitable="yes"
14777 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
14778 >
14779 <desc>
14780 Notification when an event source state changes (listener added or removed).
14781 </desc>
14782
14783 <attribute name="listener" type="IEventListener" readonly="yes">
14784 <desc>
14785 Event listener which has changed.
14786 </desc>
14787 </attribute>
14788
14789 <attribute name="add" type="boolean" readonly="yes">
14790 <desc>
14791 Flag whether listener was added or removed.
14792 </desc>
14793 </attribute>
14794 </interface>
14795
14796 <interface
14797 name="IExtraDataChangedEvent" extends="IEvent"
14798 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
14799 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
14800 >
14801 <desc>
14802 Notification when machine specific or global extra data
14803 has changed.
14804 </desc>
14805 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14806 <desc>
14807 ID of the machine this event relates to.
14808 Null for global extra data changes.
14809 </desc>
14810 </attribute>
14811 <attribute name="key" type="wstring" readonly="yes">
14812 <desc>
14813 Extra data key that has changed.
14814 </desc>
14815 </attribute>
14816 <attribute name="value" type="wstring" readonly="yes">
14817 <desc>
14818 Extra data value for the given key.
14819 </desc>
14820 </attribute>
14821 </interface>
14822
14823 <interface
14824 name="IVetoEvent" extends="IEvent"
14825 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
14826 wsmap="managed"
14827 >
14828 <desc>Base abstract interface for veto events.</desc>
14829
14830 <method name="addVeto">
14831 <desc>
14832 Adds a veto on this event.
14833 </desc>
14834 <param name="reason" type="wstring" dir="in">
14835 <desc>
14836 Reason for veto, could be null or empty string.
14837 </desc>
14838 </param>
14839 </method>
14840
14841 <method name="isVetoed">
14842 <desc>
14843 If this event was vetoed.
14844 </desc>
14845 <param name="result" type="boolean" dir="return">
14846 <desc>
14847 Reason for veto.
14848 </desc>
14849 </param>
14850 </method>
14851
14852 <method name="getVetos">
14853 <desc>
14854 Current veto reason list, if size is 0 - no veto.
14855 </desc>
14856 <param name="result" type="wstring" dir="return" safearray="yes">
14857 <desc>
14858 Array of reasons for veto provided by different event handlers.
14859 </desc>
14860 </param>
14861 </method>
14862
14863 </interface>
14864
14865 <interface
14866 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
14867 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
14868 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
14869 waitable="true"
14870 >
14871 <desc>
14872 Notification when someone tries to change extra data for
14873 either the given machine or (if @c null) global extra data.
14874 This gives the chance to veto against changes.
14875 </desc>
14876 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14877 <desc>
14878 ID of the machine this event relates to.
14879 Null for global extra data changes.
14880 </desc>
14881 </attribute>
14882 <attribute name="key" type="wstring" readonly="yes">
14883 <desc>
14884 Extra data key that has changed.
14885 </desc>
14886 </attribute>
14887 <attribute name="value" type="wstring" readonly="yes">
14888 <desc>
14889 Extra data value for the given key.
14890 </desc>
14891 </attribute>
14892 </interface>
14893
14894 <interface
14895 name="ICanShowWindowEvent" extends="IVetoEvent"
14896 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
14897 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
14898 waitable="true"
14899 >
14900 <desc>
14901 Notification when a call to
14902 <link to="IMachine::canShowConsoleWindow"/> is made by a
14903 front-end to check if a subsequent call to
14904 <link to="IMachine::showConsoleWindow"/> can succeed.
14905
14906 The callee should give an answer appropriate to the current
14907 machine state using event veto. This answer must
14908 remain valid at least until the next
14909 <link to="IConsole::state">machine state</link> change.
14910 </desc>
14911 </interface>
14912
14913 <interface
14914 name="IShowWindowEvent" extends="IEvent"
14915 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
14916 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
14917 waitable="true"
14918 >
14919 <desc>
14920 Notification when a call to
14921 <link to="IMachine::showConsoleWindow"/>
14922 requests the console window to be activated and brought to
14923 foreground on the desktop of the host PC.
14924
14925 This notification should cause the VM console process to
14926 perform the requested action as described above. If it is
14927 impossible to do it at a time of this notification, this
14928 method should return a failure.
14929
14930 Note that many modern window managers on many platforms
14931 implement some sort of focus stealing prevention logic, so
14932 that it may be impossible to activate a window without the
14933 help of the currently active application (which is supposedly
14934 an initiator of this notification). In this case, this method
14935 must return a non-zero identifier that represents the
14936 top-level window of the VM console process. The caller, if it
14937 represents a currently active process, is responsible to use
14938 this identifier (in a platform-dependent manner) to perform
14939 actual window activation.
14940
14941 This method must set @a winId to zero if it has performed all
14942 actions necessary to complete the request and the console
14943 window is now active and in foreground, to indicate that no
14944 further action is required on the caller's side.
14945 </desc>
14946 <attribute name="winId" type="unsigned long long">
14947 <desc>
14948 Platform-dependent identifier of the top-level VM console
14949 window, or zero if this method has performed all actions
14950 necessary to implement the <i>show window</i> semantics for
14951 the given platform and/or this VirtualBox front-end.
14952 </desc>
14953 </attribute>
14954 </interface>
14955
14956 <module name="VBoxSVC" context="LocalServer">
14957 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
14958 namespace="virtualbox.org">
14959 <interface name="IVirtualBox" default="yes"/>
14960 </class>
14961 </module>
14962
14963 <module name="VBoxC" context="InprocServer" threadingModel="Free">
14964 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
14965 namespace="virtualbox.org">
14966 <interface name="ISession" default="yes"/>
14967 </class>
14968
14969 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
14970 namespace="virtualbox.org">
14971 <interface name="IConsole" default="yes"/>
14972 </class>
14973 </module>
14974
14975</library>
14976
14977</idl>
14978
14979<!-- 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