VirtualBox

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

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

Shared paging property for IMachine and IGuest added (not implemented).

  • Property svn:eol-style set to native
File size: 537.1 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
127#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
128# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
129 NS_IMPL_THREADSAFE_ADDREF(_class) \
130 NS_IMPL_THREADSAFE_RELEASE(_class) \
131 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
132 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
133#endif
134
135#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
136# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
137 NS_IMPL_THREADSAFE_ADDREF(_class) \
138 NS_IMPL_THREADSAFE_RELEASE(_class) \
139 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
140 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
141#endif
142
143#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
144# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
145 NS_IMPL_THREADSAFE_ADDREF(_class) \
146 NS_IMPL_THREADSAFE_RELEASE(_class) \
147 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
148 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
149#endif
150
151#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
152# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
153 NS_INTERFACE_MAP_BEGIN(_class) \
154 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
155 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
156 NS_IMPL_QUERY_CLASSINFO(_class) \
157 NS_INTERFACE_MAP_END
158#endif
159
160#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
161# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
162 _i2, _ic2) \
163 NS_INTERFACE_MAP_BEGIN(_class) \
164 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
165 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
166 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
167 NS_IMPL_QUERY_CLASSINFO(_class) \
168 NS_INTERFACE_MAP_END
169#endif
170
171#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
172# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
173 _i2, _ic2, _i3, _ic3) \
174 NS_INTERFACE_MAP_BEGIN(_class) \
175 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
176 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
177 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
178 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
179 NS_IMPL_QUERY_CLASSINFO(_class) \
180 NS_INTERFACE_MAP_END
181#endif
182
183#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
184#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
185#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
186
187#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
188# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
189 NS_IMPL_THREADSAFE_ADDREF(_class) \
190 NS_IMPL_THREADSAFE_RELEASE(_class) \
191 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
192 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
193#endif
194
195#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
196# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
197 _i2, _ic2) \
198 NS_IMPL_THREADSAFE_ADDREF(_class) \
199 NS_IMPL_THREADSAFE_RELEASE(_class) \
200 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
201 _i2, _ic2) \
202 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
203#endif
204
205#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
206# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
207 _i2, _ic2, _i3, _ic3) \
208 NS_IMPL_THREADSAFE_ADDREF(_class) \
209 NS_IMPL_THREADSAFE_RELEASE(_class) \
210 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2, _i3, _ic3) \
212 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
213#endif
214
215 </cpp>
216</if>
217
218<library
219 name="VirtualBox"
220 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
221 version="1.3"
222 desc="VirtualBox Type Library"
223 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
224 supportsErrorInfo="yes"
225>
226
227
228 <!--
229 // COM result codes for VirtualBox
230 /////////////////////////////////////////////////////////////////////////
231 -->
232
233 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
234 <desc>
235 This section describes all VirtualBox-specific COM result codes that may
236 be returned by methods of VirtualBox COM interfaces in addition to
237 standard COM result codes.
238
239 Note that along with the result code, every VirtualBox method returns
240 extended error information through the IVirtualBoxErrorInfo interface on
241 failure. This interface is a preferred way to present the error to the end
242 user because it contains a human readable description of the error. Raw
243 result codes, both standard and described in this section, are intended to
244 be used by programs to analyze the reason of a failure and select an
245 appropriate course of action without involving the end user (for example,
246 retry the operation later or make a different call).
247
248 The standard COM result codes that may originate from our methods include:
249
250 <table>
251 <tr><td>E_INVALIDARG</td>
252 <td>
253 Returned when the value of the method's argument is not within the range
254 of valid values. This should not be confused with situations when the
255 value is within the range but simply doesn't suit the current object
256 state and there is a possibility that it will be accepted later (in such
257 cases VirtualBox-specific codes are returned, for example,
258 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
259 </td>
260 </tr>
261 <tr><td>E_POINTER</td>
262 <td>
263 Returned if a memory pointer for the output argument is invalid (for
264 example, @c null). Note that when pointers representing input
265 arguments (such as strings) are invalid, E_INVALIDARG is returned.
266 </td>
267 </tr>
268 <tr><td>E_ACCESSDENIED</td>
269 <td>
270 Returned when the called object is not ready. Since the lifetime of a
271 public COM object cannot be fully controlled by the implementation,
272 VirtualBox maintains the readiness state for all objects it creates and
273 returns this code in response to any method call on the object that was
274 deactivated by VirtualBox and is not functioning any more.
275 </td>
276 </tr>
277 <tr><td>E_OUTOFMEMORY</td>
278 <td>
279 Returned when a memory allocation operation fails.
280 </td>
281 </tr>
282 </table>
283 </desc>
284 </descGroup>
285
286 <!--
287 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
288 everything in <result>/<desc> after (and including) the first dot, so express
289 the matter of the error code in the first sentence and keep it short.
290 -->
291
292 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
293 <desc>
294 Object corresponding to the supplied arguments does not exist.
295 </desc>
296 </result>
297
298 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
299 <desc>
300 Current virtual machine state prevents the operation.
301 </desc>
302 </result>
303
304 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
305 <desc>
306 Virtual machine error occurred attempting the operation.
307 </desc>
308 </result>
309
310 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
311 <desc>
312 File not accessible or erroneous file contents.
313 </desc>
314 </result>
315
316 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
317 <desc>
318 Runtime subsystem error.
319 </desc>
320 </result>
321
322 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
323 <desc>
324 Pluggable Device Manager error.
325 </desc>
326 </result>
327
328 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
329 <desc>
330 Current object state prohibits operation.
331 </desc>
332 </result>
333
334 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
335 <desc>
336 Host operating system related error.
337 </desc>
338 </result>
339
340 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
341 <desc>
342 Requested operation is not supported.
343 </desc>
344 </result>
345
346 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
347 <desc>
348 Invalid XML found.
349 </desc>
350 </result>
351
352 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
353 <desc>
354 Current session state prohibits operation.
355 </desc>
356 </result>
357
358 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
359 <desc>
360 Object being in use prohibits operation.
361 </desc>
362 </result>
363
364 <result name="VBOX_E_DONT_CALL_AGAIN" value="0x80BB000D">
365 <desc>
366 Returned by callback methods which does not need to be called again
367 because the client does not actually make use of them.
368 </desc>
369 </result>
370
371 <!--
372 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
373 everything in <result>/<desc> after (and including) the first dot, so express
374 the matter of the error code in the first sentence and keep it short.
375 -->
376
377 <descGroup/>
378
379 <!--
380 // all common enums
381 /////////////////////////////////////////////////////////////////////////
382 -->
383
384 <enum name="SettingsVersion"
385 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
386 >
387 <desc>Settings version of VirtualBox settings files. This is written to
388 the "version" attribute of the root "VirtualBox" element in the settings
389 file XML and indicates which VirtualBox version wrote the file.
390 </desc>
391
392 <const name="Null" value="0">
393 <desc>Null value, indicates invalid version.</desc>
394 </const>
395 <const name="v1_0" value="1">
396 <desc>Legacy settings version, not currently supported.</desc>
397 </const>
398 <const name="v1_1" value="2">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_2" value="3">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_3pre" value="4">
405 <desc>Legacy settings version, not currently supported.</desc>
406 </const>
407 <const name="v1_3" value="5">
408 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
409 <!--
410 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
411 -->
412 </const>
413 <const name="v1_4" value="6">
414 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
415 <!--
416 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
417 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
418 -->
419 </const>
420 <const name="v1_5" value="7">
421 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
422 <!-- 2008-09-04: 2.0.0 released
423 2008-11-20: settings version 1.5 introduced
424 2008-12-17: 2.1.0 released
425 Machine changes:
426 guest OS identifiers changed;
427 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
428 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
429 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
430 -->
431 </const>
432 <const name="v1_6" value="8">
433 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
434 <!-- 2008-12-17: 2.1.0 released
435 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
436 2009-04-08: 2.2.0 released
437 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
438 -->
439 </const>
440 <const name="v1_7" value="9">
441 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
442 <!-- 2008-12-17: 2.1.0 released
443 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
444 2009-04-08: 2.2.0 released
445 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
446 Machine changes: HardDiskAttachments is now StorageControllers (done)
447 -->
448 </const>
449 <const name="v1_8" value="10">
450 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
451 <!-- Machine additions: Display/@accelerate2DVideo (done)
452 -->
453 </const>
454 <const name="v1_9" value="11">
455 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
456 <!-- The big storage controller / DVD / Floppy rework (done)
457 -->
458 </const>
459 <const name="v1_10" value="12">
460 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
461 <!-- Machine changes: RTC localOrUTC (done)
462 CPU hot-plug support
463 -->
464 </const>
465 <const name="Future" value="13">
466 <desc>Settings version greater than "1.10", written by a future VirtualBox version.</desc>
467 </const>
468 </enum>
469
470 <enum
471 name="AccessMode"
472 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
473 >
474 <desc>
475 Access mode for opening files.
476 </desc>
477
478 <const name="ReadOnly" value="1"/>
479 <const name="ReadWrite" value="2"/>
480 </enum>
481
482 <enum
483 name="MachineState"
484 uuid="e998d075-543a-41fc-8aa9-5ca3e92393fd"
485 >
486 <desc>
487 Virtual machine execution state.
488
489 This enumeration represents possible values of the <link
490 to="IMachine::state"/> attribute.
491
492 Below is the basic virtual machine state diagram. It shows how the state
493 changes during virtual machine execution. The text in square braces shows
494 a method of the IConsole interface that performs the given state
495 transition.
496
497 <pre>
498 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
499 V |
500 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
501 | | | | V |
502 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
503 | | ^ | ^ |
504 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
505 | ^ | | | |
506 | | +-----------------------------------------+-|-------------------+ +
507 | | | | |
508 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
509 | | | |
510 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
511 | | |
512 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
513 </pre>
514
515 Note that states to the right from PoweredOff, Aborted and Saved in the
516 above diagram are called <i>online VM states</i>. These states
517 represent the virtual machine which is being executed in a dedicated
518 process (usually with a GUI window attached to it where you can see the
519 activity of the virtual machine and interact with it). There are two
520 special pseudo-states, FirstOnline and LastOnline, that can be used in
521 relational expressions to detect if the given machine state is online or
522 not:
523
524 <pre>
525 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
526 machine.GetState() &lt;= MachineState_LastOnline)
527 {
528 ...the machine is being executed...
529 }
530 </pre>
531
532 When the virtual machine is in one of the online VM states (that is, being
533 executed), only a few machine settings can be modified. Methods working
534 with such settings contain an explicit note about that. An attempt to
535 change any oter setting or perform a modifying operation during this time
536 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
537
538 All online states except Running, Paused and Stuck are transitional: they
539 represent temporary conditions of the virtual machine that will last as
540 long as the operation that initiated such a condition.
541
542 The Stuck state is a special case. It means that execution of the machine
543 has reached the "Guru Meditation" condition. This condition indicates an
544 internal VMM (virtual machine manager) failure which may happen as a
545 result of either an unhandled low-level virtual hardware exception or one
546 of the recompiler exceptions (such as the <i>too-many-traps</i>
547 condition).
548
549 Note also that any online VM state may transit to the Aborted state. This
550 happens if the process that is executing the virtual machine terminates
551 unexpectedly (for example, crashes). Other than that, the Aborted state is
552 equivalent to PoweredOff.
553
554 There are also a few additional state diagrams that do not deal with
555 virtual machine execution and therefore are shown separately. The states
556 shown on these diagrams are called <i>offline VM states</i> (this includes
557 PoweredOff, Aborted and Saved too).
558
559 The first diagram shows what happens when a lengthy setup operation is
560 being executed (such as <link to="IMachine::attachDevice"/>).
561
562 <pre>
563 +----------------------------------(same state as before the call)------+
564 | |
565 +-&gt; PoweredOff --+ |
566 | | |
567 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
568 | |
569 +-&gt; Saved -------+
570 </pre>
571
572 The next two diagrams demonstrate the process of taking a snapshot of a
573 powered off virtual machine, restoring the state to that as of a snapshot
574 or deleting a snapshot, respectively.
575
576 <pre>
577 +----------------------------------(same state as before the call)------+
578 | |
579 +-&gt; PoweredOff --+ |
580 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
581 +-&gt; Aborted -----+
582
583 +-&gt; PoweredOff --+
584 | |
585 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
586 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
587 +-&gt; Saved -------+ |
588 | |
589 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
590 </pre>
591
592 Note that the Saving state is present in both the offline state group and
593 online state group. Currently, the only way to determine what group is
594 assumed in a particular case is to remember the previous machine state: if
595 it was Running or Paused, then Saving is an online state, otherwise it is
596 an offline state. This inconsistency may be removed in one of the future
597 versions of VirtualBox by adding a new state.
598
599 <note internal="yes">
600 For whoever decides to touch this enum: In order to keep the
601 comparisons involving FirstOnline and LastOnline pseudo-states valid,
602 the numeric values of these states must be correspondingly updated if
603 needed: for any online VM state, the condition
604 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
605 @c true. The same relates to transient states for which
606 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
607 @c true.
608 </note>
609 </desc>
610
611 <const name="Null" value="0">
612 <desc>Null value (never used by the API).</desc>
613 </const>
614 <const name="PoweredOff" value="1">
615 <desc>
616 The machine is not running and has no saved execution state; it has
617 either never been started or been shut down successfully.
618 </desc>
619 </const>
620 <const name="Saved" value="2">
621 <desc>
622 The machine is not currently running, but the execution state of the machine
623 has been saved to an external file when it was running, from where
624 it can be resumed.
625 </desc>
626 </const>
627 <const name="Teleported" value="3">
628 <desc>
629 The machine was teleported to a different host (or process) and then
630 powered off. Take care when powering it on again may corrupt resources
631 it shares with the teleportation target (e.g. disk and network).
632 </desc>
633 </const>
634 <const name="Aborted" value="4">
635 <desc>
636 The process running the machine has terminated abnormally. This may
637 indicate a crash of the VM process in host execution context, or
638 the VM process has been terminated externally.
639 </desc>
640 </const>
641 <const name="Running" value="5">
642 <desc>
643 The machine is currently being executed.
644 <note internal="yes">
645 For whoever decides to touch this enum: In order to keep the
646 comparisons in the old source code valid, this state must immediately
647 precede the Paused state.
648 TODO: Lift this spectacularly wonderful restriction.
649 </note>
650 </desc>
651 </const>
652 <const name="Paused" value="6">
653 <desc>
654 Execution of the machine has been paused.
655 <note internal="yes">
656 For whoever decides to touch this enum: In order to keep the
657 comparisons in the old source code valid, this state must immediately
658 follow the Running state.
659 TODO: Lift this spectacularly wonderful restriction.
660 </note>
661 </desc>
662 </const>
663 <const name="Stuck" value="7">
664 <desc>
665 Execution of the machine has reached the "Guru Meditation"
666 condition. This indicates a severe error in the hypervisor itself.
667 <note internal="yes">
668 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
669 "Guru", perhaps? Or are there some other VMM states that are
670 intended to be lumped in here as well?
671 </note>
672 </desc>
673 </const>
674 <const name="Teleporting" value="8">
675 <desc>
676 The machine is about to be teleported to a different host or process.
677 It is possible to pause a machine in this state, but it will go to the
678 <link to="MachineState::PausedTeleporting"/> state and it will not be
679 possible to resume it again unless the teleportation fails.
680 </desc>
681 </const>
682 <const name="LiveSnapshotting" value="9">
683 <desc>
684 A live snapshot is being taken. The machine is running normally, but
685 some of the runtime configuration options are inaccessible. Also, if
686 paused while in this state it will transition to
687 <link to="MachineState::Saving"/> and it will not be resume the
688 execution until the snapshot operation has completed.
689 </desc>
690 </const>
691 <const name="Starting" value="10">
692 <desc>
693 Machine is being started after powering it on from a
694 zero execution state.
695 </desc>
696 </const>
697 <const name="Stopping" value="11">
698 <desc>
699 Machine is being normally stopped powering it off, or after the guest OS
700 has initiated a shutdown sequence.
701 </desc>
702 </const>
703 <const name="Saving" value="12">
704 <desc>
705 Machine is saving its execution state to a file, or an online
706 snapshot of the machine is being taken.
707 </desc>
708 </const>
709 <const name="Restoring" value="13">
710 <desc>
711 Execution state of the machine is being restored from a file
712 after powering it on from the saved execution state.
713 </desc>
714 </const>
715 <const name="TeleportingPausedVM" value="14">
716 <desc>
717 The machine is being teleported to another host or process, but it is
718 not running. This is the paused variant of the
719 <link to="MachineState::Teleporting"/> state.
720 </desc>
721 </const>
722 <const name="TeleportingIn" value="15">
723 <desc>
724 Teleporting the machine state in from another host or process.
725 </desc>
726 </const>
727 <const name="DeletingSnapshotOnline" value="16">
728 <desc>
729 Teleporting the machine state in from another host or process.
730 </desc>
731 </const>
732 <const name="DeletingSnapshotPaused" value="17">
733 <desc>
734 Teleporting the machine state in from another host or process.
735 </desc>
736 </const>
737 <const name="RestoringSnapshot" value="18">
738 <desc>
739 A machine snapshot is being restored; this typically does not take long.
740 </desc>
741 </const>
742 <const name="DeletingSnapshot" value="19">
743 <desc>
744 A machine snapshot is being deleted; this can take a long time since this
745 may require merging differencing media.
746 </desc>
747 </const>
748 <const name="SettingUp" value="20">
749 <desc>
750 Lengthy setup operation is in progress.
751 </desc>
752 </const>
753
754 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
755 <desc>
756 Pseudo-state: first online state (for use in relational expressions).
757 </desc>
758 </const>
759 <const name="LastOnline" value="17" wsmap="suppress"> <!-- DeletingSnapshotPaused -->
760 <desc>
761 Pseudo-state: last online state (for use in relational expressions).
762 </desc>
763 </const>
764
765 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
766 <desc>
767 Pseudo-state: first transient state (for use in relational expressions).
768 </desc>
769 </const>
770 <const name="LastTransient" value="20" wsmap="suppress"> <!-- SettingUp -->
771 <desc>
772 Pseudo-state: last transient state (for use in relational expressions).
773 </desc>
774 </const>
775
776 </enum>
777
778 <enum
779 name="SessionState"
780 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
781 >
782 <desc>
783 Session state. This enumeration represents possible values of
784 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
785 attributes. See individual enumerator descriptions for the meaning for
786 every value.
787 </desc>
788
789 <const name="Null" value="0">
790 <desc>Null value (never used by the API).</desc>
791 </const>
792 <const name="Closed" value="1">
793 <desc>
794 The machine has no open sessions (<link to="IMachine::sessionState"/>);
795 the session is closed (<link to="ISession::state"/>)
796 </desc>
797 </const>
798 <const name="Open" value="2">
799 <desc>
800 The machine has an open direct session (<link to="IMachine::sessionState"/>);
801 the session is open (<link to="ISession::state"/>)
802 </desc>
803 </const>
804 <const name="Spawning" value="3">
805 <desc>
806 A new (direct) session is being opened for the machine as a result of
807 <link to="IVirtualBox::openRemoteSession"/> call
808 (<link to="IMachine::sessionState"/> or <link to="ISession::state"/>).
809 This state also occurs as a short transient state when a new direct
810 session is opened by calling <link to="IVirtualBox::openSession"/>.
811 </desc>
812 </const>
813 <const name="Closing" value="4">
814 <desc>
815 The direct session is being closed (<link to="IMachine::sessionState"/>);
816 the session is being closed (<link to="ISession::state"/>)
817 </desc>
818 </const>
819 </enum>
820
821 <enum
822 name="CPUPropertyType"
823 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
824 >
825 <desc>
826 Virtual CPU property type. This enumeration represents possible values of the
827 IMachine get- and setCPUProperty methods.
828 </desc>
829 <const name="Null" value="0">
830 <desc>Null value (never used by the API).</desc>
831 </const>
832 <const name="PAE" value="1">
833 <desc>
834 This setting determines whether VirtualBox will expose the Physical Address
835 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
836 is not available, it will not be reported.
837 </desc>
838 </const>
839 <const name="Synthetic" value="2">
840 <desc>
841 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
842 teleporting between host systems that differ significantly.
843 </desc>
844 </const>
845 </enum>
846
847
848 <enum
849 name="HWVirtExPropertyType"
850 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
851 >
852 <desc>
853 Hardware virtualization property type. This enumeration represents possible values
854 for the <link to="IMachine::getHWVirtExProperty"/> and
855 <link to="IMachine::setHWVirtExProperty"/> methods.
856 </desc>
857 <const name="Null" value="0">
858 <desc>Null value (never used by the API).</desc>
859 </const>
860 <const name="Enabled" value="1">
861 <desc>
862 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
863 such extensions are not available, they will not be used.
864 </desc>
865 </const>
866 <const name="Exclusive" value="2">
867 <desc>
868 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
869 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
870 feature of the host. To share these with other hypervisors, you must disable this property.
871 </desc>
872 </const>
873 <const name="VPID" value="3">
874 <desc>
875 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
876 </desc>
877 </const>
878 <const name="NestedPaging" value="4">
879 <desc>
880 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
881 </desc>
882 </const>
883 <const name="LargePages" value="5">
884 <desc>
885 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
886 </desc>
887 </const>
888 </enum>
889
890 <enum
891 name="SessionType"
892 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
893 >
894 <desc>
895 Session type. This enumeration represents possible values of the
896 <link to="ISession::type"/> attribute.
897 </desc>
898
899 <const name="Null" value="0">
900 <desc>Null value (never used by the API).</desc>
901 </const>
902 <const name="Direct" value="1">
903 <desc>
904 Direct session
905 (opened by <link to="IVirtualBox::openSession"/>)
906 </desc>
907 </const>
908 <const name="Remote" value="2">
909 <desc>
910 Remote session
911 (opened by <link to="IVirtualBox::openRemoteSession"/>)
912 </desc>
913 </const>
914 <const name="Existing" value="3">
915 <desc>
916 Existing session
917 (opened by <link to="IVirtualBox::openExistingSession"/>)
918 </desc>
919 </const>
920 </enum>
921
922 <enum
923 name="DeviceType"
924 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
925 >
926 <desc>
927 Device type.
928 </desc>
929 <const name="Null" value="0">
930 <desc>
931 Null value, may also mean "no device" (not allowed for
932 <link to="IConsole::getDeviceActivity"/>).
933 </desc>
934 </const>
935 <const name="Floppy" value="1">
936 <desc>Floppy device.</desc>
937 </const>
938 <const name="DVD" value="2">
939 <desc>CD/DVD-ROM device.</desc>
940 </const>
941 <const name="HardDisk" value="3">
942 <desc>Hard disk device.</desc>
943 </const>
944 <const name="Network" value="4">
945 <desc>Network device.</desc>
946 </const>
947 <const name="USB" value="5">
948 <desc>USB device.</desc>
949 </const>
950 <const name="SharedFolder" value="6">
951 <desc>Shared folder device.</desc>
952 </const>
953 </enum>
954
955 <enum
956 name="DeviceActivity"
957 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
958 >
959 <desc>
960 Device activity for <link to="IConsole::getDeviceActivity"/>.
961 </desc>
962
963 <const name="Null" value="0"/>
964 <const name="Idle" value="1"/>
965 <const name="Reading" value="2"/>
966 <const name="Writing" value="3"/>
967 </enum>
968
969 <enum
970 name="ClipboardMode"
971 uuid="33364716-4008-4701-8f14-be0fa3d62950"
972 >
973 <desc>
974 Host-Guest clipboard interchange mode.
975 </desc>
976
977 <const name="Disabled" value="0"/>
978 <const name="HostToGuest" value="1"/>
979 <const name="GuestToHost" value="2"/>
980 <const name="Bidirectional" value="3"/>
981 </enum>
982
983 <enum
984 name="Scope"
985 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
986 >
987 <desc>
988 Scope of the operation.
989
990 A generic enumeration used in various methods to define the action or
991 argument scope.
992 </desc>
993
994 <const name="Global" value="0"/>
995 <const name="Machine" value="1"/>
996 <const name="Session" value="2"/>
997 </enum>
998
999 <enum
1000 name="BIOSBootMenuMode"
1001 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1002 >
1003 <desc>
1004 BIOS boot menu mode.
1005 </desc>
1006
1007 <const name="Disabled" value="0"/>
1008 <const name="MenuOnly" value="1"/>
1009 <const name="MessageAndMenu" value="2"/>
1010 </enum>
1011
1012 <enum
1013 name="ProcessorFeature"
1014 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1015 >
1016 <desc>
1017 CPU features.
1018 </desc>
1019
1020 <const name="HWVirtEx" value="0"/>
1021 <const name="PAE" value="1"/>
1022 <const name="LongMode" value="2"/>
1023 <const name="NestedPaging" value="3"/>
1024 </enum>
1025
1026 <enum
1027 name="FirmwareType"
1028 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1029 >
1030 <desc>
1031 Firmware type.
1032 </desc>
1033 <const name="BIOS" value="1">
1034 <desc>BIOS Firmware.</desc>
1035 </const>
1036 <const name="EFI" value="2">
1037 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1038 </const>
1039 <const name="EFI32" value="3">
1040 <desc>Efi firmware, 32-bit.</desc>
1041 </const>
1042 <const name="EFI64" value="4">
1043 <desc>Efi firmware, 64-bit.</desc>
1044 </const>
1045 <const name="EFIDUAL" value="5">
1046 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1047 </const>
1048 </enum>
1049
1050 <enum
1051 name="PointingHidType"
1052 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1053 >
1054 <desc>
1055 Type of pointing device used in a virtual machine.
1056 </desc>
1057 <const name="None" value="1">
1058 <desc>No mouse.</desc>
1059 </const>
1060 <const name="PS2Mouse" value="2">
1061 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1062 </const>
1063 <const name="USBMouse" value="3">
1064 <desc>USB mouse (relative pointer).</desc>
1065 </const>
1066 <const name="USBTablet" value="4">
1067 <desc>USB tablet (absolute pointer).</desc>
1068 </const>
1069 <const name="ComboMouse" value="5">
1070 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1071 Using of such device can have negative performance implications. </desc>
1072 </const>
1073 </enum>
1074
1075 <enum
1076 name="KeyboardHidType"
1077 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1078 >
1079 <desc>
1080 Type of keyboard device used in a virtual machine.
1081 </desc>
1082 <const name="None" value="1">
1083 <desc>No keyboard.</desc>
1084 </const>
1085 <const name="PS2Keyboard" value="2">
1086 <desc>PS/2 keyboard.</desc>
1087 </const>
1088 <const name="USBKeyboard" value="3">
1089 <desc>USB keyboard.</desc>
1090 </const>
1091 <const name="ComboKeyboard" value="4">
1092 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1093 Using of such device can have negative performance implications. </desc>
1094 </const>
1095 </enum>
1096
1097 <enum
1098 name="IoBackendType"
1099 uuid="2a7e16d1-4e6b-4d5d-b0c9-b9bbe6c5b2ad"
1100 >
1101 <desc>
1102 Type of I/O backend used for the image files in a virtual machine.
1103 </desc>
1104 <const name="Buffered" value="1">
1105 <desc>Image files will use the host cache if possible.
1106 The storage controller emulation will use a dedicated I/O thread, enable the host I/O cache and
1107 use synchronous file APIs on the host.
1108 This type does not work with the Async I/O manager on Linux hosts.
1109 This was the only option in the API before VirtualBox 3.2 and is still the default for IDE controllers.</desc>
1110 </const>
1111 <const name="Unbuffered" value="2">
1112 <desc>Image files will not use the host cache.
1113 The storage controller emulation will use asynchronous I/O APIs on the host. This makes it possible
1114 to turn off the host I/O caches because it can handle unaligned access to the file.
1115 This should be used on OS X and Linux hosts if a high I/O load is expected
1116 or many virtual machines are running to prevent I/O cache related hangs.
1117 This is new with the API of version 3.2 and is now the default for non-IDE storage controllers.</desc>
1118 </const>
1119 </enum>
1120
1121
1122 <!--
1123 // IVirtualBoxErrorInfo
1124 /////////////////////////////////////////////////////////////////////////
1125 -->
1126
1127 <interface
1128 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1129 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1130 supportsErrorInfo="no"
1131 wsmap="managed"
1132 >
1133 <desc>
1134 The IVirtualBoxErrorInfo interface represents extended error information.
1135
1136 Extended error information can be set by VirtualBox components after
1137 unsuccessful or partially successful method invocation. This information
1138 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1139 and then shown to the client in addition to the plain 32-bit result code.
1140
1141 In MS COM, this interface extends the IErrorInfo interface,
1142 in XPCOM, it extends the nsIException interface. In both cases,
1143 it provides a set of common attributes to retrieve error
1144 information.
1145
1146 Sometimes invocation of some component's method may involve methods of
1147 other components that may also fail (independently of this method's
1148 failure), or a series of non-fatal errors may precede a fatal error that
1149 causes method failure. In cases like that, it may be desirable to preserve
1150 information about all errors happened during method invocation and deliver
1151 it to the caller. The <link to="#next"/> attribute is intended
1152 specifically for this purpose and allows to represent a chain of errors
1153 through a single IVirtualBoxErrorInfo object set after method invocation.
1154
1155 Note that errors are stored to a chain in the reverse order, i.e. the
1156 initial error object you query right after method invocation is the last
1157 error set by the callee, the object it points to in the @a next attribute
1158 is the previous error and so on, up to the first error (which is the last
1159 in the chain).
1160 </desc>
1161
1162 <attribute name="resultCode" type="long" readonly="yes">
1163 <desc>
1164 Result code of the error.
1165 Usually, it will be the same as the result code returned
1166 by the method that provided this error information, but not
1167 always. For example, on Win32, CoCreateInstance() will most
1168 likely return E_NOINTERFACE upon unsuccessful component
1169 instantiation attempt, but not the value the component factory
1170 returned. Value is typed 'long', not 'result',
1171 to make interface usable from scripting languages.
1172 <note>
1173 In MS COM, there is no equivalent.
1174 In XPCOM, it is the same as nsIException::result.
1175 </note>
1176 </desc>
1177 </attribute>
1178
1179 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1180 <desc>
1181 UUID of the interface that defined the error.
1182 <note>
1183 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1184 data type.
1185 In XPCOM, there is no equivalent.
1186 </note>
1187 </desc>
1188 </attribute>
1189
1190 <attribute name="component" type="wstring" readonly="yes">
1191 <desc>
1192 Name of the component that generated the error.
1193 <note>
1194 In MS COM, it is the same as IErrorInfo::GetSource.
1195 In XPCOM, there is no equivalent.
1196 </note>
1197 </desc>
1198 </attribute>
1199
1200 <attribute name="text" type="wstring" readonly="yes">
1201 <desc>
1202 Text description of the error.
1203 <note>
1204 In MS COM, it is the same as IErrorInfo::GetDescription.
1205 In XPCOM, it is the same as nsIException::message.
1206 </note>
1207 </desc>
1208 </attribute>
1209
1210 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1211 <desc>
1212 Next error object if there is any, or @c null otherwise.
1213 <note>
1214 In MS COM, there is no equivalent.
1215 In XPCOM, it is the same as nsIException::inner.
1216 </note>
1217 </desc>
1218 </attribute>
1219
1220 </interface>
1221
1222 <interface
1223 name="ILocalOwner" extends="$unknown"
1224 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1225 >
1226 <desc>
1227 The ILocalOwner interface allows to register local objects
1228 (created without COM calls, but with new()).
1229 Once registered, calls to methods of such objects can be made
1230 from remote COM processes.
1231 The main usecase is the event callback implementation where
1232 API clients provide callback objects.
1233 </desc>
1234 <method name="setLocalObject">
1235 <desc>
1236 Set local object.
1237 </desc>
1238 <param name="object" type="$unknown" dir="in">
1239 <desc>Local object to forward requests to.
1240 If null, clears currently set local object.</desc>
1241 </param>
1242 </method>
1243 </interface>
1244
1245 <!--
1246 // IVirtualBox
1247 /////////////////////////////////////////////////////////////////////////
1248 -->
1249
1250 <interface
1251 name="IVirtualBoxCallback" extends="$unknown"
1252 uuid="7f6a65b6-ad5d-4a67-8872-0b11cb7ea95c"
1253 wsmap="suppress"
1254 >
1255
1256 <method name="onMachineStateChange">
1257 <desc>
1258 The execution state of the given machine has changed.
1259 <see>IMachine::state</see>
1260 <result name="VBOX_E_DONT_CALL_AGAIN">
1261 Do not call again, this method is a NOP.
1262 </result>
1263 </desc>
1264 <param name="machineId" type="uuid" mod="string" dir="in">
1265 <desc>ID of the machine this event relates to.</desc>
1266 </param>
1267 <param name="state" type="MachineState" dir="in">
1268 <desc>New execution state.</desc>
1269 </param>
1270 </method>
1271
1272 <method name="onMachineDataChange">
1273 <desc>
1274 Any of the settings of the given machine has changed.
1275 <result name="VBOX_E_DONT_CALL_AGAIN">
1276 Do not call again, this method is a NOP.
1277 </result>
1278 </desc>
1279 <param name="machineId" type="uuid" mod="string" dir="in">
1280 <desc>ID of the machine this event relates to.</desc>
1281 </param>
1282 </method>
1283
1284 <method name="onExtraDataCanChange">
1285 <desc>
1286 Notification when someone tries to change extra data for
1287 either the given machine or (if @c null) global extra data.
1288 This gives the chance to veto against changes.
1289 <result name="VBOX_E_DONT_CALL_AGAIN">
1290 Do not call again, this method is a NOP. Change is allowed.
1291 </result>
1292 </desc>
1293 <param name="machineId" type="uuid" mod="string" dir="in">
1294 <desc>
1295 ID of the machine this event relates to
1296 (@c null ID for global extra data change requests).
1297 </desc>
1298 </param>
1299 <param name="key" type="wstring" dir="in">
1300 <desc>
1301 Extra data key for the attempted write.
1302 </desc>
1303 </param>
1304 <param name="value" type="wstring" dir="in">
1305 <desc>
1306 Extra data value for the given key.
1307 </desc>
1308 </param>
1309 <param name="error" type="wstring" dir="out">
1310 <desc>
1311 Optional error message describing the reason of the
1312 veto (ignored if this notification returns @c true).
1313 </desc>
1314 </param>
1315 <param name="allowChange" type="boolean" dir="return">
1316 <desc>
1317 Flag to indicate whether the callee agrees (@c true)
1318 or vetoes against the change (@c false).
1319 </desc>
1320 </param>
1321 </method>
1322
1323 <method name="onExtraDataChange">
1324 <desc>
1325 Notification when machine specific or global extra data
1326 has changed.
1327 <result name="VBOX_E_DONT_CALL_AGAIN">
1328 Do not call again, this method is a NOP.
1329 </result>
1330 </desc>
1331 <param name="machineId" type="uuid" mod="string" dir="in">
1332 <desc>
1333 ID of the machine this event relates to.
1334 Null for global extra data changes.
1335 </desc>
1336 </param>
1337 <param name="key" type="wstring" dir="in">
1338 <desc>
1339 Extra data key that has changed.
1340 </desc>
1341 </param>
1342 <param name="value" type="wstring" dir="in">
1343 <desc>
1344 Extra data value for the given key.
1345 </desc>
1346 </param>
1347 </method>
1348
1349 <method name="onMediumRegistered">
1350 <desc>
1351 The given medium was registered or unregistered
1352 within this VirtualBox installation.
1353
1354 The @a mediumType parameter describes what type of
1355 medium the specified @a mediumId refers to. Possible
1356 values are:
1357
1358 <ul>
1359 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1360 that, if registered, can be obtained using the
1361 <link to="IVirtualBox::getHardDisk"/> call.</li>
1362 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1363 that, if registered, can be obtained using the
1364 <link to="IVirtualBox::getDVDImage"/> call.</li>
1365 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1366 that, if registered, can be obtained using the
1367 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1368 </ul>
1369
1370 Note that if this is a deregistration notification,
1371 there is no way to access the object representing the
1372 unregistered medium. It is supposed that the
1373 application will do required cleanup based on the
1374 @a mediumId value.
1375
1376 <result name="VBOX_E_DONT_CALL_AGAIN">
1377 Do not call again, this method is a NOP.
1378 </result>
1379 </desc>
1380 <param name="mediumId" type="uuid" mod="string" dir="in">
1381 <desc>ID of the medium this event relates to.</desc>
1382 </param>
1383 <param name="mediumType" type="DeviceType" dir="in">
1384 <desc>Type of the medium this event relates to.</desc>
1385 </param>
1386 <param name="registered" type="boolean" dir="in">
1387 <desc>
1388 If @c true, the medium was registered, otherwise it was
1389 unregistered.
1390 </desc>
1391 </param>
1392 </method>
1393
1394 <method name="onMachineRegistered">
1395 <desc>
1396 The given machine was registered or unregistered
1397 within this VirtualBox installation.
1398 <result name="VBOX_E_DONT_CALL_AGAIN">
1399 Do not call again, this method is a NOP.
1400 </result>
1401 </desc>
1402 <param name="machineId" type="uuid" mod="string" dir="in">
1403 <desc>ID of the machine this event relates to.</desc>
1404 </param>
1405 <param name="registered" type="boolean" dir="in">
1406 <desc>
1407 If @c true, the machine was registered, otherwise it was
1408 unregistered.
1409 </desc>
1410 </param>
1411 </method>
1412
1413 <method name="onSessionStateChange">
1414 <desc>
1415 The state of the session for the given machine was changed.
1416 <see>IMachine::sessionState</see>
1417 <result name="VBOX_E_DONT_CALL_AGAIN">
1418 Do not call again, this method is a NOP.
1419 </result>
1420 </desc>
1421 <param name="machineId" type="uuid" mod="string" dir="in">
1422 <desc>ID of the machine this event relates to.</desc>
1423 </param>
1424 <param name="state" type="SessionState" dir="in">
1425 <desc>New session state.</desc>
1426 </param>
1427 </method>
1428
1429 <method name="onSnapshotTaken">
1430 <desc>
1431 A new snapshot of the machine has been taken.
1432 <see>ISnapshot</see>
1433 <result name="VBOX_E_DONT_CALL_AGAIN">
1434 Do not call again, this method is a NOP.
1435 </result>
1436 </desc>
1437 <param name="machineId" type="uuid" mod="string" dir="in">
1438 <desc>ID of the machine this event relates to.</desc>
1439 </param>
1440 <param name="snapshotId" type="uuid" mod="string" dir="in">
1441 <desc>ID of the new snapshot.</desc>
1442 </param>
1443 </method>
1444
1445 <method name="onSnapshotDeleted">
1446 <desc>
1447 Snapshot of the given machine has been deleted.
1448
1449 <note>
1450 This notification is delivered <b>after</b> the snapshot
1451 object has been uninitialized on the server (so that any
1452 attempt to call its methods will return an error).
1453 </note>
1454
1455 <see>ISnapshot</see>
1456
1457 <result name="VBOX_E_DONT_CALL_AGAIN">
1458 Do not call again, this method is a NOP.
1459 </result>
1460 </desc>
1461 <param name="machineId" type="uuid" mod="string" dir="in">
1462 <desc>ID of the machine this event relates to.</desc>
1463 </param>
1464 <param name="snapshotId" type="uuid" mod="string" dir="in">
1465 <desc>
1466 ID of the deleted snapshot. @c null means the current machine
1467 state has been deleted (restored from the current snapshot).
1468 </desc>
1469 </param>
1470 </method>
1471
1472 <method name="onSnapshotChange">
1473 <desc>
1474 Snapshot properties (name and/or description) have been changed.
1475 <see>ISnapshot</see>
1476 <result name="VBOX_E_DONT_CALL_AGAIN">
1477 Do not call again, this method is a NOP.
1478 </result>
1479 </desc>
1480 <param name="machineId" type="uuid" mod="string" dir="in">
1481 <desc>ID of the machine this event relates to.</desc>
1482 </param>
1483 <param name="snapshotId" type="uuid" mod="string" dir="in">
1484 <desc>ID of the changed snapshot.</desc>
1485 </param>
1486 </method>
1487
1488 <method name="onGuestPropertyChange">
1489 <desc>
1490 Notification when a guest property has changed.
1491 <result name="VBOX_E_DONT_CALL_AGAIN">
1492 Do not call again, this method is a NOP.
1493 </result>
1494 </desc>
1495 <param name="machineId" type="uuid" mod="string" dir="in">
1496 <desc>
1497 ID of the machine this event relates to.
1498 </desc>
1499 </param>
1500 <param name="name" type="wstring" dir="in">
1501 <desc>
1502 The name of the property that has changed.
1503 </desc>
1504 </param>
1505 <param name="value" type="wstring" dir="in">
1506 <desc>
1507 The new property value.
1508 </desc>
1509 </param>
1510 <param name="flags" type="wstring" dir="in">
1511 <desc>
1512 The new property flags.
1513 </desc>
1514 </param>
1515 </method>
1516
1517 </interface>
1518
1519 <interface
1520 name="IDHCPServer" extends="$unknown"
1521 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1522 wsmap="managed"
1523 >
1524 <desc>
1525 The IDHCPServer interface represents the vbox dhcp server configuration.
1526
1527 To enumerate all the dhcp servers on the host, use the
1528 <link to="IVirtualBox::DHCPServers"/> attribute.
1529 </desc>
1530
1531 <attribute name="enabled" type="boolean">
1532 <desc>
1533 specifies if the dhcp server is enabled
1534 </desc>
1535 </attribute>
1536
1537 <attribute name="IPAddress" type="wstring" readonly="yes">
1538 <desc>
1539 specifies server IP
1540 </desc>
1541 </attribute>
1542
1543 <attribute name="networkMask" type="wstring" readonly="yes">
1544 <desc>
1545 specifies server network mask
1546 </desc>
1547 </attribute>
1548
1549 <attribute name="networkName" type="wstring" readonly="yes">
1550 <desc>
1551 specifies internal network name the server is used for
1552 </desc>
1553 </attribute>
1554
1555 <attribute name="lowerIP" type="wstring" readonly="yes">
1556 <desc>
1557 specifies from IP adrres in server address range
1558 </desc>
1559 </attribute>
1560
1561 <attribute name="upperIP" type="wstring" readonly="yes">
1562 <desc>
1563 specifies to IP adrres in server address range
1564 </desc>
1565 </attribute>
1566
1567 <method name="setConfiguration">
1568 <desc>
1569 configures the server
1570 <result name="E_INVALIDARG">
1571 invalid configuration supplied
1572 </result>
1573 </desc>
1574 <param name="IPAddress" type="wstring" dir="in">
1575 <desc>
1576 server IP address
1577 </desc>
1578 </param>
1579 <param name="networkMask" type="wstring" dir="in">
1580 <desc>
1581 server network mask
1582 </desc>
1583 </param>
1584 <param name="FromIPAddress" type="wstring" dir="in">
1585 <desc>
1586 server From IP address for address range
1587 </desc>
1588 </param>
1589 <param name="ToIPAddress" type="wstring" dir="in">
1590 <desc>
1591 server To IP address for address range
1592 </desc>
1593 </param>
1594 </method>
1595
1596 <method name="start">
1597 <desc>
1598 Starts DHCP server process.
1599 <result name="E_FAIL">
1600 Failed to start the process.
1601 </result>
1602 </desc>
1603 <param name="networkName" type="wstring" dir="in">
1604 <desc>
1605 Name of internal network DHCP server should attach to.
1606 </desc>
1607 </param>
1608 <param name="trunkName" type="wstring" dir="in">
1609 <desc>
1610 Name of internal network trunk.
1611 </desc>
1612 </param>
1613 <param name="trunkType" type="wstring" dir="in">
1614 <desc>
1615 Type of internal network trunk.
1616 </desc>
1617 </param>
1618 </method>
1619
1620 <method name="stop">
1621 <desc>
1622 Stops DHCP server process.
1623 <result name="E_FAIL">
1624 Failed to stop the process.
1625 </result>
1626 </desc>
1627 </method>
1628 </interface>
1629
1630 <interface
1631 name="IVirtualBox" extends="$unknown"
1632 uuid="3f36e024-7fed-4f20-a02c-9158a82b44e6"
1633 wsmap="managed"
1634 >
1635 <desc>
1636 The IVirtualBox interface represents the main interface exposed by the
1637 product that provides virtual machine management.
1638
1639 An instance of IVirtualBox is required for the product to do anything
1640 useful. Even though the interface does not expose this, internally,
1641 IVirtualBox is implemented as a singleton and actually lives in the
1642 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1643 IVirtualBox can track the state of all virtual machines on a particular
1644 host, regardless of which frontend started them.
1645
1646 To enumerate all the virtual machines on the host, use the
1647 <link to="IVirtualBox::machines"/> attribute.
1648 </desc>
1649
1650 <attribute name="version" type="wstring" readonly="yes">
1651 <desc>
1652 A string representing the version number of the product. The
1653 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1654 last number represents the build number and will frequently change.
1655 </desc>
1656 </attribute>
1657
1658 <attribute name="revision" type="unsigned long" readonly="yes">
1659 <desc>
1660 The internal build revision number of the product.
1661 </desc>
1662 </attribute>
1663
1664 <attribute name="packageType" type="wstring" readonly="yes">
1665 <desc>
1666 A string representing the package type of this product. The
1667 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1668 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1669 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1670 this.
1671 </desc>
1672 </attribute>
1673
1674 <attribute name="homeFolder" type="wstring" readonly="yes">
1675 <desc>
1676 Full path to the directory where the global settings file,
1677 <tt>VirtualBox.xml</tt>, is stored.
1678
1679 In this version of VirtualBox, the value of this property is
1680 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1681 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1682 as determined by the host OS), and cannot be changed.
1683
1684 This path is also used as the base to resolve relative paths in
1685 places where relative paths are allowed (unless otherwise
1686 expressly indicated).
1687 </desc>
1688 </attribute>
1689
1690 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1691 <desc>
1692 Full name of the global settings file.
1693 The value of this property corresponds to the value of
1694 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1695 </desc>
1696 </attribute>
1697
1698 <attribute name="host" type="IHost" readonly="yes">
1699 <desc>Associated host object.</desc>
1700 </attribute>
1701
1702 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1703 <desc>Associated system information object.</desc>
1704 </attribute>
1705
1706 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1707 <desc>
1708 Array of machine objects registered within this VirtualBox instance.
1709 </desc>
1710 </attribute>
1711
1712 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1713 <desc>
1714 Array of medium objects known to this VirtualBox installation.
1715
1716 This array contains only base media. All differencing
1717 media of the given base medium can be enumerated using
1718 <link to="IMedium::children"/>.
1719 </desc>
1720 </attribute>
1721
1722 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1723 <desc>
1724 Array of CD/DVD image objects registered with this VirtualBox instance.
1725 </desc>
1726 </attribute>
1727
1728 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1729 <desc>
1730 Array of floppy image objects registered with this VirtualBox instance.
1731 </desc>
1732 </attribute>
1733
1734 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1735
1736 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1737
1738 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1739 <desc>
1740 Collection of global shared folders. Global shared folders are
1741 available to all virtual machines.
1742
1743 New shared folders are added to the collection using
1744 <link to="#createSharedFolder"/>. Existing shared folders can be
1745 removed using <link to="#removeSharedFolder"/>.
1746
1747 <note>
1748 In the current version of the product, global shared folders are not
1749 implemented and therefore this collection is always empty.
1750 </note>
1751 </desc>
1752 </attribute>
1753
1754 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1755 <desc>
1756 Associated performance collector object.
1757 </desc>
1758 </attribute>
1759
1760 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1761 <desc>
1762 dhcp server settings.
1763 </desc>
1764 </attribute>
1765
1766 <method name="createMachine">
1767 <desc>
1768 Creates a new virtual machine.
1769
1770 The new machine is created unregistered, with the initial configuration
1771 set according to the specified guest OS type. A typical sequence of
1772 actions to create a new virtual machine is as follows:
1773
1774 <ol>
1775 <li>
1776 Call this method to have a new machine created. The returned machine
1777 object will be "mutable" allowing to change any machine property.
1778 </li>
1779
1780 <li>
1781 Configure the machine using the appropriate attributes and methods.
1782 </li>
1783
1784 <li>
1785 Call <link to="IMachine::saveSettings" /> to write the settings
1786 to the machine's XML settings file. The configuration of the newly
1787 created machine will not be saved to disk until this method is
1788 called.
1789 </li>
1790
1791 <li>
1792 Call <link to="#registerMachine" /> to add the machine to the list
1793 of machines known to VirtualBox.
1794 </li>
1795 </ol>
1796
1797 You should specify valid name for the newly created machine when calling
1798 this method. See the <link to="IMachine::name"/> attribute description
1799 for more details about the machine name.
1800
1801 The specified guest OS type identifier must match an ID of one of known
1802 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1803 array.
1804
1805 Every machine has a <i>settings file</i> that is used to store
1806 the machine configuration. This file is stored in a directory called the
1807 <i>machine settings subfolder</i>. Both the settings subfolder and file
1808 will have a name that corresponds to the name of the virtual machine.
1809 You can specify where to create the machine setting subfolder using the
1810 @a baseFolder argument. The base folder can be absolute (full path) or
1811 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1812 directory</link>.
1813
1814 If @a baseFolder is a @c null or empty string (which is recommended), the
1815 <link to="ISystemProperties::defaultMachineFolder">default machine
1816 settings folder</link> will be used as a base folder for the created
1817 machine. Otherwise the given base folder will be used. In either case,
1818 the full path to the resulting settings file has the following
1819 structure:
1820 <pre>
1821 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1822 </pre>
1823
1824 Note that if the resulting settings file already exists, this method
1825 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1826
1827 Optionally, you may specify an UUID of to assign to the created machine.
1828 However, this is not recommended and you should normally pass an empty
1829 (@c null) UUID to this method so that a new UUID will be automatically
1830 generated for every created machine. You can use UUID
1831 00000000-0000-0000-0000-000000000000 as @c null value.
1832
1833 <note>
1834 There is no way to change the name of the settings file or
1835 subfolder of the created machine directly.
1836 </note>
1837
1838 <result name="VBOX_E_OBJECT_NOT_FOUND">
1839 @a osTypeId is invalid.
1840 </result>
1841 <result name="VBOX_E_FILE_ERROR">
1842 Resulting settings file name is invalid or the settings file already
1843 exists or could not be created due to an I/O error.
1844 </result>
1845 <result name="E_INVALIDARG">
1846 @a name is empty or @c null.
1847 </result>
1848 </desc>
1849
1850 <param name="name" type="wstring" dir="in">
1851 <desc>Machine name.</desc>
1852 </param>
1853 <param name="osTypeId" type="wstring" dir="in">
1854 <desc>Guest OS Type ID.</desc>
1855 </param>
1856 <param name="baseFolder" type="wstring" dir="in">
1857 <desc>Base machine folder (optional).</desc>
1858 </param>
1859 <param name="id" type="uuid" mod="string" dir="in">
1860 <desc>Machine UUID (optional).</desc>
1861 </param>
1862 <param name="override" type="boolean" dir="in">
1863 <desc>Create the VM even if there are conflicting files.</desc>
1864 </param>
1865 <param name="machine" type="IMachine" dir="return">
1866 <desc>Created machine object.</desc>
1867 </param>
1868 </method>
1869
1870 <method name="createLegacyMachine">
1871 <desc>
1872 Creates a new virtual machine in "legacy" mode, using the specified
1873 settings file to store machine settings.
1874
1875 As opposed to machines created by <link to="#createMachine"/>,
1876 the settings file of the machine created in "legacy" mode is not
1877 automatically renamed when the machine name is changed -- it will always
1878 remain the same as specified in this method call.
1879
1880 The specified settings file name can be absolute (full path) or relative
1881 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1882 directory</link>. If the file name doesn't contain an extension, the
1883 default extension (.xml) will be appended.
1884
1885 Note that the configuration of the newly created machine is not
1886 saved to disk (and therefore no settings file is created)
1887 until <link to="IMachine::saveSettings"/> is called. If the
1888 specified settings file already exists, this method
1889 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1890
1891 See <link to="#createMachine"/> for more information.
1892
1893 @deprecated This method may be removed later. Use <link
1894 to="IVirtualBox::createMachine"/> instead.
1895
1896 <note>
1897 There is no way to change the name of the settings file
1898 of the machine created in "legacy" mode.
1899 </note>
1900
1901 <result name="VBOX_E_OBJECT_NOT_FOUND">
1902 @a osTypeId is invalid.
1903 </result>
1904 <result name="VBOX_E_FILE_ERROR">
1905 @a settingsFile is invalid or the settings file already exists or
1906 could not be created due to an I/O error.
1907 </result>
1908 <result name="E_INVALIDARG">
1909 @a name or @a settingsFile is empty or @c null.
1910 </result>
1911 </desc>
1912
1913 <param name="name" type="wstring" dir="in">
1914 <desc>Machine name.</desc>
1915 </param>
1916 <param name="osTypeId" type="wstring" dir="in">
1917 <desc>Machine OS Type ID.</desc>
1918 </param>
1919 <param name="settingsFile" type="wstring" dir="in">
1920 <desc>Name of the machine settings file.</desc>
1921 </param>
1922 <param name="id" type="uuid" mod="string" dir="in">
1923 <desc>Machine UUID (optional).</desc>
1924 </param>
1925 <param name="machine" type="IMachine" dir="return">
1926 <desc>Created machine object.</desc>
1927 </param>
1928 </method>
1929
1930 <method name="openMachine">
1931 <desc>
1932 Opens a virtual machine from the existing settings file.
1933 The opened machine remains unregistered until you call
1934 <link to="#registerMachine"/>.
1935
1936 The specified settings file name can be absolute
1937 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1938 VirtualBox home directory</link>. This file must exist
1939 and must be a valid machine settings file whose contents
1940 will be used to construct the machine object.
1941
1942 @deprecated Will be removed soon.
1943 <result name="VBOX_E_FILE_ERROR">
1944 Settings file name invalid, not found or sharing violation.
1945 </result>
1946 </desc>
1947 <param name="settingsFile" type="wstring" dir="in">
1948 <desc>
1949 Name of the machine settings file.
1950 </desc>
1951 </param>
1952 <param name="machine" type="IMachine" dir="return">
1953 <desc>Opened machine object.</desc>
1954 </param>
1955 <note>
1956 <link to="IMachine::settingsModified"/> will return
1957 @c false for the created machine, until any of machine settings
1958 are changed.
1959 </note>
1960 </method>
1961
1962 <method name="registerMachine">
1963 <desc>
1964
1965 Registers the machine previously created using
1966 <link to="#createMachine"/> or opened using
1967 <link to="#openMachine"/> within this VirtualBox installation. After
1968 successful method invocation, the
1969 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1970 to all registered callbacks.
1971
1972 <note>
1973 This method implicitly calls <link to="IMachine::saveSettings"/>
1974 to save all current machine settings before registering it.
1975 </note>
1976
1977 <result name="VBOX_E_OBJECT_NOT_FOUND">
1978 No matching virtual machine found.
1979 </result>
1980 <result name="VBOX_E_INVALID_OBJECT_STATE">
1981 Virtual machine was not created within this VirtualBox instance.
1982 </result>
1983
1984 </desc>
1985 <param name="machine" type="IMachine" dir="in"/>
1986 </method>
1987
1988 <method name="getMachine">
1989 <desc>
1990 Attempts to find a virtual machine given its UUID.
1991 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1992 instead.
1993
1994 <result name="VBOX_E_OBJECT_NOT_FOUND">
1995 Could not find registered machine matching @a id.
1996 </result>
1997
1998 </desc>
1999 <param name="id" type="uuid" mod="string" dir="in"/>
2000 <param name="machine" type="IMachine" dir="return"/>
2001 </method>
2002
2003 <method name="findMachine">
2004 <desc>
2005 Attempts to find a virtual machine given its name.
2006 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
2007 instead.
2008
2009 <result name="VBOX_E_OBJECT_NOT_FOUND">
2010 Could not find registered machine matching @a name.
2011 </result>
2012
2013 </desc>
2014 <param name="name" type="wstring" dir="in"/>
2015 <param name="machine" type="IMachine" dir="return"/>
2016 </method>
2017
2018 <method name="unregisterMachine">
2019 <desc>
2020
2021 Unregisters the machine previously registered using
2022 <link to="#registerMachine"/>. After successful method invocation, the
2023 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
2024 to all registered callbacks.
2025
2026 <note>
2027 The specified machine must not be in the Saved state, have an open
2028 (or a spawning) direct session associated with it, have snapshots or
2029 have any medium attached.
2030 </note>
2031
2032 <note>
2033 This method implicitly calls <link to="IMachine::saveSettings"/> to
2034 save all current machine settings before unregistering it.
2035 </note>
2036
2037 <note>
2038 If the given machine is inaccessible (see
2039 <link to="IMachine::accessible"/>), it will be unregistered and
2040 fully uninitialized right afterwards. As a result, the returned
2041 machine object will be unusable and an attempt to call
2042 <b>any</b> method will return the "Object not ready" error.
2043 </note>
2044
2045 <result name="VBOX_E_OBJECT_NOT_FOUND">
2046 Could not find registered machine matching @a id.
2047 </result>
2048 <result name="VBOX_E_INVALID_VM_STATE">
2049 Machine is in Saved state.
2050 </result>
2051 <result name="VBOX_E_INVALID_OBJECT_STATE">
2052 Machine has snapshot or open session or medium attached.
2053 </result>
2054
2055 </desc>
2056 <param name="id" type="uuid" mod="string" dir="in">
2057 <desc>UUID of the machine to unregister.</desc>
2058 </param>
2059 <param name="machine" type="IMachine" dir="return">
2060 <desc>Unregistered machine object.</desc>
2061 </param>
2062 </method>
2063
2064 <method name="createAppliance">
2065 <desc>
2066 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
2067 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
2068 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
2069 </desc>
2070 <param name="appliance" type="IAppliance" dir="return">
2071 <desc>New appliance.</desc>
2072 </param>
2073 </method>
2074
2075 <method name="createHardDisk">
2076 <desc>
2077 Creates a new base medium object that will use the given storage
2078 format and location for medium data.
2079
2080 Note that the actual storage unit is not created by this method. In
2081 order to do it, and before you are able to attach the created medium
2082 to virtual machines, you must call one of the following methods to
2083 allocate a format-specific storage unit at the specified location:
2084 <ul>
2085 <li><link to="IMedium::createBaseStorage"/></li>
2086 <li><link to="IMedium::createDiffStorage"/></li>
2087 </ul>
2088
2089 Some medium attributes, such as <link to="IMedium::id"/>, may
2090 remain uninitialized until the medium storage unit is successfully
2091 created by one of the above methods.
2092
2093 After the storage unit is successfully created, the medium gets
2094 remembered by this VirtualBox installation and will be accessible
2095 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2096 methods. Remembered base medium are also returned as part of
2097 the <link to="#hardDisks"/> array. See IMedium for more details.
2098
2099 The list of all storage formats supported by this VirtualBox
2100 installation can be obtained using
2101 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2102 attribute is empty or @c null then the default storage format
2103 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2104 be used for creating a storage unit of the medium.
2105
2106 Note that the format of the location string is storage format specific.
2107 See <link to="IMedium::location"/>, IMedium and
2108 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2109
2110 <result name="VBOX_E_OBJECT_NOT_FOUND">
2111 @a format identifier is invalid. See
2112 <link to="ISystemProperties::mediumFormats"/>.
2113 </result>
2114 <result name="VBOX_E_FILE_ERROR">
2115 @a location is a not valid file name (for file-based formats only).
2116 </result>
2117 </desc>
2118 <param name="format" type="wstring" dir="in">
2119 <desc>
2120 Identifier of the storage format to use for the new medium.
2121 </desc>
2122 </param>
2123 <param name="location" type="wstring" dir="in">
2124 <desc>
2125 Location of the storage unit for the new medium.
2126 </desc>
2127 </param>
2128 <param name="medium" type="IMedium" dir="return">
2129 <desc>Created medium object.</desc>
2130 </param>
2131 </method>
2132
2133 <method name="openHardDisk">
2134 <desc>
2135 Opens a medium from an existing location, optionally replacing
2136 the image UUID and/or parent UUID.
2137
2138 After the medium is successfully opened by this method, it gets
2139 remembered by (known to) this VirtualBox installation and will be
2140 accessible through <link to="#getHardDisk"/> and
2141 <link to="#findHardDisk"/> methods. Remembered base media
2142 are also returned as part of the <link to="#hardDisks"/> array and can
2143 be attached to virtual machines. See IMedium for more details.
2144
2145 If a differencing medium is to be opened by this method, the
2146 operation will succeed only if its parent medium and all ancestors,
2147 if any, are already known to this VirtualBox installation (for example,
2148 were opened by this method before).
2149
2150 This method tries to guess the storage format of the specified medium
2151 by reading medium data at the specified location.
2152
2153 If @a accessMode is ReadWrite (which it should be), the image is opened
2154 for read/write access and must have according permissions, as VirtualBox
2155 may actually write status information into the disk's metadata sections.
2156
2157 Note that write access is required for all typical image usage in VirtualBox,
2158 since VirtualBox may need to write metadata such as a UUID into the image.
2159 The only exception is opening a source image temporarily for copying and
2160 cloning when the image will quickly be closed again.
2161
2162 Note that the format of the location string is storage format specific.
2163 See <link to="IMedium::location"/>, IMedium and
2164 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2165
2166 <result name="VBOX_E_FILE_ERROR">
2167 Invalid medium storage file location or could not find the medium
2168 at the specified location.
2169 </result>
2170 <result name="VBOX_E_IPRT_ERROR">
2171 Could not get medium storage format.
2172 </result>
2173 <result name="E_INVALIDARG">
2174 Invalid medium storage format.
2175 </result>
2176
2177 </desc>
2178 <param name="location" type="wstring" dir="in">
2179 <desc>
2180 Location of the storage unit that contains medium data in one of
2181 the supported storage formats.
2182 </desc>
2183 </param>
2184 <param name="accessMode" type="AccessMode" dir="in">
2185 <desc>
2186 Determines whether to open the image in read/write or read-only mode.
2187 </desc>
2188 </param>
2189 <param name="setImageId" type="boolean" dir="in">
2190 <desc>
2191 Select whether a new image UUID is set or not.
2192 </desc>
2193 </param>
2194 <param name="imageId" type="uuid" mod="string" dir="in">
2195 <desc>
2196 New UUID for the image. If an empty string is passed, then a new
2197 UUID is automatically created. Specifying a zero UUIDs is not valid.
2198 </desc>
2199 </param>
2200 <param name="setParentId" type="boolean" dir="in">
2201 <desc>
2202 Select whether a new parent UUID is set or not.
2203 </desc>
2204 </param>
2205 <param name="parentId" type="uuid" mod="string" dir="in">
2206 <desc>
2207 New parent UUID for the image. If an empty string is passed, then a
2208 new UUID is automatically created, provided @a setParentId is
2209 @c true. A zero UUID is valid.
2210 </desc>
2211 </param>
2212 <param name="medium" type="IMedium" dir="return">
2213 <desc>Opened medium object.</desc>
2214 </param>
2215 </method>
2216
2217 <method name="getHardDisk" const="yes">
2218 <desc>
2219 Returns a medium with the given UUID.
2220
2221 The medium with the given UUID must be known to this VirtualBox
2222 installation, i.e. it must be previously created by
2223 <link to="#createHardDisk"/> or opened by <link
2224 to="#openHardDisk"/>, or attached to some known virtual machine.
2225
2226 <result name="VBOX_E_OBJECT_NOT_FOUND">
2227 No medium object matching @a id found.
2228 </result>
2229
2230 </desc>
2231 <param name="id" type="uuid" mod="string" dir="in">
2232 <desc>UUID of the medium to look for.</desc>
2233 </param>
2234 <param name="medium" type="IMedium" dir="return">
2235 <desc>Found medium object.</desc>
2236 </param>
2237 </method>
2238
2239 <method name="findHardDisk">
2240 <desc>
2241 Returns a medium that uses the given location to store medium data.
2242
2243 The given medium must be known to this VirtualBox installation, i.e.
2244 it must be previously created by
2245 <link to="#createHardDisk"/> or opened by <link
2246 to="#openHardDisk"/>, or attached to some known virtual machine.
2247
2248 The search is done by comparing the value of the @a location argument to
2249 the <link to="IMedium::location"/> attribute of each known medium.
2250
2251 For locations represented by file names in the host's file system, the
2252 requested location can be a path relative to the
2253 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2254 only a file name without any path is given, the
2255 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2256 folder</link> will be prepended to the file name before searching. Note
2257 that on case sensitive file systems, a case sensitive comparison is
2258 performed, otherwise the case of symbols in the file path is ignored.
2259
2260 <result name="VBOX_E_OBJECT_NOT_FOUND">
2261 No medium object matching @a location found.
2262 </result>
2263
2264 </desc>
2265 <param name="location" type="wstring" dir="in">
2266 <desc>Location string to search for.</desc>
2267 </param>
2268 <param name="medium" type="IMedium" dir="return">
2269 <desc>Found medium object.</desc>
2270 </param>
2271 </method>
2272
2273 <method name="openDVDImage">
2274 <desc>
2275 Opens a CD/DVD image contained in the specified file of the supported
2276 format and assigns it the given UUID.
2277
2278 After the image is successfully opened by this method, it gets
2279 remembered by (known to) this VirtualBox installation and will be
2280 accessible through <link to="#getDVDImage"/> and
2281 <link to="#findDVDImage"/> methods. Remembered images are also
2282 returned as part of the <link to="#DVDImages"/> array and can be mounted
2283 to virtual machines. See IMedium for more details.
2284
2285 See <link to="IMedium::location"/> to get more details about the format
2286 of the location string.
2287
2288 <note>
2289 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2290 </note>
2291
2292 <result name="VBOX_E_FILE_ERROR">
2293 Invalid CD/DVD image file location or could not find the CD/DVD
2294 image at the specified location.
2295 </result>
2296 <result name="VBOX_E_INVALID_OBJECT_STATE">
2297 CD/DVD image already exists in the media registry.
2298 </result>
2299
2300 </desc>
2301 <param name="location" type="wstring" dir="in">
2302 <desc>
2303 Full path to the file that contains a valid CD/DVD image.
2304 </desc>
2305 </param>
2306 <param name="id" type="uuid" mod="string" dir="in">
2307 <desc>
2308 UUID to assign to the given image within this VirtualBox installation.
2309 If an empty (@c null) UUID is specified, the system will randomly
2310 generate a new UUID.
2311 </desc>
2312 </param>
2313 <param name="image" type="IMedium" dir="return">
2314 <desc>Opened CD/DVD image object.</desc>
2315 </param>
2316 </method>
2317
2318 <method name="getDVDImage">
2319 <desc>
2320 Returns a CD/DVD image with the given UUID.
2321
2322 The image with the given UUID must be known to this VirtualBox
2323 installation, i.e. it must be previously opened by <link
2324 to="#openDVDImage"/>, or mounted to some known virtual machine.
2325
2326 <result name="VBOX_E_OBJECT_NOT_FOUND">
2327 No matching DVD image found in the media registry.
2328 </result>
2329
2330 </desc>
2331 <param name="id" type="uuid" mod="string" dir="in">
2332 <desc>UUID of the image to look for.</desc>
2333 </param>
2334 <param name="image" type="IMedium" dir="return">
2335 <desc>Found CD/DVD image object.</desc>
2336 </param>
2337 </method>
2338
2339 <method name="findDVDImage">
2340 <desc>
2341 Returns a CD/DVD image with the given image location.
2342
2343 The image with the given UUID must be known to this VirtualBox
2344 installation, i.e. it must be previously opened by <link
2345 to="#openDVDImage"/>, or mounted to some known virtual machine.
2346
2347 The search is done by comparing the value of the @a location argument to
2348 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2349
2350 The requested location can be a path relative to the
2351 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2352 only a file name without any path is given, the
2353 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2354 folder</link> will be prepended to the file name before searching. Note
2355 that on case sensitive file systems, a case sensitive comparison is
2356 performed, otherwise the case in the file path is ignored.
2357
2358 <result name="VBOX_E_FILE_ERROR">
2359 Invalid image file location.
2360 </result>
2361 <result name="VBOX_E_OBJECT_NOT_FOUND">
2362 No matching DVD image found in the media registry.
2363 </result>
2364
2365 </desc>
2366 <param name="location" type="wstring" dir="in">
2367 <desc>CD/DVD image file path to look for.</desc>
2368 </param>
2369 <param name="image" type="IMedium" dir="return">
2370 <desc>Found CD/DVD image object.</desc>
2371 </param>
2372 </method>
2373
2374 <method name="openFloppyImage">
2375 <desc>
2376 Opens a floppy image contained in the specified file of the supported
2377 format and assigns it the given UUID.
2378
2379 After the image is successfully opened by this method, it gets
2380 remembered by (known to) this VirtualBox installation and will be
2381 accessible through <link to="#getFloppyImage"/> and
2382 <link to="#findFloppyImage"/> methods. Remembered images are also
2383 returned as part of the <link to="#floppyImages"/> array and can be
2384 mounted to virtual machines. See IMedium for more details.
2385
2386 See <link to="IMedium::location"/> to get more details about the format
2387 of the location string.
2388
2389 <result name="VBOX_E_FILE_ERROR">
2390 Invalid floppy image file location or could not find the floppy
2391 image at the specified location.
2392 </result>
2393 <result name="VBOX_E_INVALID_OBJECT_STATE">
2394 Floppy image already exists in the media registry.
2395 </result>
2396
2397 <note>
2398 Currently, only raw floppy images are supported by VirtualBox.
2399 </note>
2400 </desc>
2401 <param name="location" type="wstring" dir="in">
2402 <desc>
2403 Full path to the file that contains a valid floppy image.
2404 </desc>
2405 </param>
2406 <param name="id" type="uuid" mod="string" dir="in">
2407 <desc>
2408 UUID to assign to the given image file within this VirtualBox
2409 installation. If an empty (@c null) UUID is specified, the system will
2410 randomly generate a new UUID.
2411 </desc>
2412 </param>
2413 <param name="image" type="IMedium" dir="return">
2414 <desc>Opened floppy image object.</desc>
2415 </param>
2416 </method>
2417
2418 <method name="getFloppyImage">
2419 <desc>
2420 Returns a floppy image with the given UUID.
2421
2422 The image with the given UUID must be known to this VirtualBox
2423 installation, i.e. it must be previously opened by <link
2424 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2425
2426 <result name="VBOX_E_OBJECT_NOT_FOUND">
2427 No matching floppy image found in the media registry.
2428 </result>
2429
2430 </desc>
2431 <param name="id" type="uuid" mod="string" dir="in">
2432 <desc>UUID of the image to look for.</desc>
2433 </param>
2434 <param name="image" type="IMedium" dir="return">
2435 <desc>Found floppy image object.</desc>
2436 </param>
2437 </method>
2438
2439 <method name="findFloppyImage">
2440 <desc>
2441 Returns a floppy image with the given image location.
2442
2443 The image with the given UUID must be known to this VirtualBox
2444 installation, i.e. it must be previously opened by <link
2445 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2446
2447 The search is done by comparing the value of the @a location argument to
2448 the <link to="IMedium::location"/> attribute of each known floppy image.
2449
2450 The requested location can be a path relative to the
2451 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2452 only a file name without any path is given, the
2453 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2454 folder</link> will be prepended to the file name before searching. Note
2455 that on case sensitive file systems, a case sensitive comparison is
2456 performed, otherwise the case of symbols in the file path is ignored.
2457
2458 <result name="VBOX_E_FILE_ERROR">
2459 Invalid image file location.
2460 </result>
2461 <result name="VBOX_E_OBJECT_NOT_FOUND">
2462 No matching floppy image found in the media registry.
2463 </result>
2464
2465 </desc>
2466 <param name="location" type="wstring" dir="in">
2467 <desc>Floppy image file path to look for.</desc>
2468 </param>
2469 <param name="image" type="IMedium" dir="return">
2470 <desc>Found floppy image object.</desc>
2471 </param>
2472 </method>
2473
2474 <method name="getGuestOSType">
2475 <desc>
2476 Returns an object describing the specified guest OS type.
2477
2478 The requested guest OS type is specified using a string which is a
2479 mnemonic identifier of the guest operating system, such as
2480 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2481 particular virtual machine can be read or set using the
2482 <link to="IMachine::OSTypeId"/> attribute.
2483
2484 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2485 available guest OS type objects. Each object has an
2486 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2487 the guest OS this object describes.
2488
2489 <result name="E_INVALIDARG">
2490 @a id is not a valid Guest OS type.
2491 </result>
2492
2493 </desc>
2494 <param name="id" type="uuid" mod="string" dir="in">
2495 <desc>Guest OS type ID string.</desc>
2496 </param>
2497 <param name="type" type="IGuestOSType" dir="return">
2498 <desc>Guest OS type object.</desc>
2499 </param>
2500 </method>
2501
2502 <method name="createSharedFolder">
2503 <desc>
2504 Creates a new global shared folder by associating the given logical
2505 name with the given host path, adds it to the collection of shared
2506 folders and starts sharing it. Refer to the description of
2507 <link to="ISharedFolder"/> to read more about logical names.
2508 <note>
2509 In the current implementation, this operation is not
2510 implemented.
2511 </note>
2512 </desc>
2513 <param name="name" type="wstring" dir="in">
2514 <desc>Unique logical name of the shared folder.</desc>
2515 </param>
2516 <param name="hostPath" type="wstring" dir="in">
2517 <desc>Full path to the shared folder in the host file system.</desc>
2518 </param>
2519 <param name="writable" type="boolean" dir="in">
2520 <desc>Whether the share is writable or readonly</desc>
2521 </param>
2522 </method>
2523
2524 <method name="removeSharedFolder">
2525 <desc>
2526 Removes the global shared folder with the given name previously
2527 created by <link to="#createSharedFolder"/> from the collection of
2528 shared folders and stops sharing it.
2529 <note>
2530 In the current implementation, this operation is not
2531 implemented.
2532 </note>
2533 </desc>
2534 <param name="name" type="wstring" dir="in">
2535 <desc>Logical name of the shared folder to remove.</desc>
2536 </param>
2537 </method>
2538
2539 <method name="getExtraDataKeys">
2540 <desc>
2541 Returns an array representing the global extra data keys which currently
2542 have values defined.
2543 </desc>
2544 <param name="value" type="wstring" dir="return" safearray="yes">
2545 <desc>Array of extra data keys.</desc>
2546 </param>
2547 </method>
2548
2549 <method name="getExtraData">
2550 <desc>
2551 Returns associated global extra data.
2552
2553 If the requested data @a key does not exist, this function will
2554 succeed and return an empty string in the @a value argument.
2555
2556 <result name="VBOX_E_FILE_ERROR">
2557 Settings file not accessible.
2558 </result>
2559 <result name="VBOX_E_XML_ERROR">
2560 Could not parse the settings file.
2561 </result>
2562
2563 </desc>
2564 <param name="key" type="wstring" dir="in">
2565 <desc>Name of the data key to get.</desc>
2566 </param>
2567 <param name="value" type="wstring" dir="return">
2568 <desc>Value of the requested data key.</desc>
2569 </param>
2570 </method>
2571
2572 <method name="setExtraData">
2573 <desc>
2574 Sets associated global extra data.
2575
2576 If you pass @c null or empty string as a key @a value, the given @a key
2577 will be deleted.
2578
2579 <note>
2580 Before performing the actual data change, this method will ask all
2581 registered callbacks using the
2582 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2583 notification for a permission. If one of the callbacks refuses the
2584 new value, the change will not be performed.
2585 </note>
2586 <note>
2587 On success, the
2588 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2589 is called to inform all registered callbacks about a successful data
2590 change.
2591 </note>
2592
2593 <result name="VBOX_E_FILE_ERROR">
2594 Settings file not accessible.
2595 </result>
2596 <result name="VBOX_E_XML_ERROR">
2597 Could not parse the settings file.
2598 </result>
2599 <result name="E_ACCESSDENIED">
2600 Modification request refused.
2601 </result>
2602
2603 </desc>
2604 <param name="key" type="wstring" dir="in">
2605 <desc>Name of the data key to set.</desc>
2606 </param>
2607 <param name="value" type="wstring" dir="in">
2608 <desc>Value to assign to the key.</desc>
2609 </param>
2610 </method>
2611
2612 <method name="openSession">
2613 <desc>
2614 Opens a new direct session with the given virtual machine.
2615
2616 A direct session acts as a local lock on the given VM.
2617 There can be only one direct session open at a time for every
2618 virtual machine, protecting the VM from being manipulated by
2619 conflicting actions from different processes. Only after a
2620 direct session has been opened, one can change all VM settings
2621 and execute the VM in the process space of the session object.
2622
2623 Sessions therefore can be compared to mutex semaphores that
2624 lock a given VM for modification and execution.
2625 See <link to="ISession">ISession</link> for details.
2626
2627 <note>Unless you are writing a new VM frontend, you will not
2628 want to execute a VM in the current process. To spawn a new
2629 process that executes a VM, use
2630 <link to="IVirtualBox::openRemoteSession" />
2631 instead.</note>
2632
2633 Upon successful return, the session object can be used to
2634 get access to the machine and to the VM console.
2635
2636 In VirtualBox terminology, the machine becomes "mutable" after
2637 a session has been opened. Note that the "mutable" machine
2638 object, on which you may invoke IMachine methods to change its
2639 settings, will be a different object from the immutable IMachine
2640 objects returned by various IVirtualBox methods. To obtain a
2641 mutable IMachine object (upon which you can invoke settings methods),
2642 use the <link to="ISession::machine" /> attribute.
2643
2644 One must always call <link to="ISession::close" /> to release the
2645 lock on the machine, or the machine's state will eventually be
2646 set to "Aborted".
2647
2648 In other words, to change settings on a machine, the following
2649 sequence is typically performed:
2650
2651 <ol>
2652 <li>Call this method (openSession) to have a machine locked for
2653 the current session.</li>
2654
2655 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2656
2657 <li>Change the settings of the machine.</li>
2658
2659 <li>Call <link to="IMachine::saveSettings" />.</li>
2660
2661 <li>Close the session by calling <link to="ISession::close"/>.</li>
2662 </ol>
2663
2664 <result name="E_UNEXPECTED">
2665 Virtual machine not registered.
2666 </result>
2667 <result name="E_ACCESSDENIED">
2668 Process not started by OpenRemoteSession.
2669 </result>
2670 <result name="VBOX_E_OBJECT_NOT_FOUND">
2671 No matching virtual machine found.
2672 </result>
2673 <result name="VBOX_E_INVALID_OBJECT_STATE">
2674 Session already open or being opened.
2675 </result>
2676 <result name="VBOX_E_VM_ERROR">
2677 Failed to assign machine to session.
2678 </result>
2679
2680 </desc>
2681 <param name="session" type="ISession" dir="in">
2682 <desc>
2683 Session object that will represent the opened session after
2684 successful method invocation. This object must not represent
2685 the already open session.
2686 <note>
2687 This session will be automatically closed if the
2688 VirtualBox server is terminated for some reason.
2689 </note>
2690 </desc>
2691 </param>
2692 <param name="machineId" type="uuid" mod="string" dir="in">
2693 <desc>ID of the virtual machine to open a session with.</desc>
2694 </param>
2695 </method>
2696
2697 <method name="openRemoteSession">
2698 <desc>
2699 Spawns a new process that executes a virtual machine (called a
2700 "remote session").
2701
2702 Opening a remote session causes the VirtualBox server to start a new
2703 process that opens a direct session with the given VM. As a result, the
2704 VM is locked by that direct session in the new process, preventing
2705 conflicting changes from other processes. Since sessions act as locks
2706 that prevent conflicting changes, one cannot open a remote session
2707 for a VM that already has another open session (direct or remote), or
2708 is currently in the process of opening one (see <link
2709 to="IMachine::sessionState"/>).
2710
2711 While the remote session still provides some level of control over the
2712 VM execution to the caller (using the <link to="IConsole" /> interface),
2713 not all VM settings are available for modification within the remote
2714 session context.
2715
2716 This operation can take some time (a new VM is started in a new process,
2717 for which memory and other resources need to be set up). Because of this,
2718 an <link to="IProgress" /> is returned to allow the caller to wait for this
2719 asynchronous operation to be completed. Until then, the remote session
2720 object remains in the closed state, and accessing the machine or its
2721 console through it is invalid. It is recommended to use
2722 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2723 completion. Completion is signalled when the VM is powered on. Error
2724 messages etc. can be queried via the progress object, if available.
2725
2726 As with all <link to="ISession" /> objects, it is recommended to call
2727 <link to="ISession::close" /> on the local session object once openRemoteSession()
2728 has been called. However, the session's state (see <link to="ISession::state" />)
2729 will not return to "Closed" until the remote session has also closed (i.e.
2730 until the VM is no longer running). In that case, however, the state of
2731 the session will automatically change back to "Closed".
2732
2733 Currently supported session types (values of the @a type
2734 argument) are:
2735 <ul>
2736 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2737 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2738 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2739 </ul>
2740
2741 The @a environment argument is a string containing definitions of
2742 environment variables in the following format:
2743 @code
2744 NAME[=VALUE]\n
2745 NAME[=VALUE]\n
2746 ...
2747 @endcode
2748 where <tt>\\n</tt> is the new line character. These environment
2749 variables will be appended to the environment of the VirtualBox server
2750 process. If an environment variable exists both in the server process
2751 and in this list, the value from this list takes precedence over the
2752 server's variable. If the value of the environment variable is
2753 omitted, this variable will be removed from the resulting environment.
2754 If the environment string is @c null or empty, the server environment
2755 is inherited by the started process as is.
2756
2757 <see>openExistingSession</see>
2758
2759 <result name="E_UNEXPECTED">
2760 Virtual machine not registered.
2761 </result>
2762 <result name="E_INVALIDARG">
2763 Invalid session type @a type.
2764 </result>
2765 <result name="VBOX_E_OBJECT_NOT_FOUND">
2766 No machine matching @a machineId found.
2767 </result>
2768 <result name="VBOX_E_INVALID_OBJECT_STATE">
2769 Session already open or being opened.
2770 </result>
2771 <result name="VBOX_E_IPRT_ERROR">
2772 Launching process for machine failed.
2773 </result>
2774 <result name="VBOX_E_VM_ERROR">
2775 Failed to assign machine to session.
2776 </result>
2777
2778 </desc>
2779 <param name="session" type="ISession" dir="in">
2780 <desc>
2781 Session object that will represent the opened remote session
2782 after successful method invocation (this object must not
2783 represent an already open session).
2784 </desc>
2785 </param>
2786 <param name="machineId" type="uuid" mod="string" dir="in">
2787 <desc>ID of the virtual machine to open a session with.</desc>
2788 </param>
2789 <param name="type" type="wstring" dir="in">
2790 <desc>
2791 Type of the remote session (case sensitive).
2792 </desc>
2793 </param>
2794 <param name="environment" type="wstring" dir="in">
2795 <desc>
2796 Environment to pass to the opened session.
2797 </desc>
2798 </param>
2799 <param name="progress" type="IProgress" dir="return">
2800 <desc>Progress object to track the operation completion.</desc>
2801 </param>
2802 </method>
2803
2804 <method name="openExistingSession">
2805 <desc>
2806 Opens a new remote session with the virtual machine for
2807 which a direct session is already open.
2808
2809 The remote session provides some level of control over the VM
2810 execution (using the IConsole interface) to the caller; however,
2811 within the remote session context, not all VM settings are available
2812 for modification.
2813
2814 As opposed to <link to="#openRemoteSession"/>, the number of
2815 remote sessions opened this way is not limited by the API
2816
2817 <note>
2818 It is an error to open a remote session with the machine that
2819 doesn't have an open direct session.
2820 </note>
2821
2822 <result name="E_UNEXPECTED">
2823 Virtual machine not registered.
2824 </result>
2825 <result name="VBOX_E_OBJECT_NOT_FOUND">
2826 No machine matching @a machineId found.
2827 </result>
2828 <result name="VBOX_E_INVALID_OBJECT_STATE">
2829 Session already open or being opened.
2830 </result>
2831 <result name="VBOX_E_INVALID_SESSION_STATE">
2832 Direct session state not Open.
2833 </result>
2834 <result name="VBOX_E_VM_ERROR">
2835 Failed to get console object from direct session or assign
2836 machine to session.
2837 </result>
2838
2839 <see>openRemoteSession</see>
2840 </desc>
2841 <param name="session" type="ISession" dir="in">
2842 <desc>
2843 Session object that will represent the open remote session
2844 after successful method invocation. This object must not
2845 represent an already open session.
2846 <note>
2847 This session will be automatically closed when the peer
2848 (direct) session dies or gets closed.
2849 </note>
2850 </desc>
2851 </param>
2852 <param name="machineId" type="uuid" mod="string" dir="in">
2853 <desc>ID of the virtual machine to open a session with.</desc>
2854 </param>
2855 </method>
2856
2857 <method name="registerCallback">
2858 <desc>
2859 Registers a new global VirtualBox callback. The methods of the given
2860 callback object will be called by VirtualBox when an appropriate
2861 event occurs.
2862
2863 <result name="E_INVALIDARG">
2864 A @c null callback cannot be registered.
2865 </result>
2866
2867 </desc>
2868 <param name="callback" type="IVirtualBoxCallback" dir="in">
2869 <desc>Callback object to register.</desc>
2870 </param>
2871 </method>
2872
2873 <method name="unregisterCallback">
2874 <desc>
2875 Unregisters the previously registered global VirtualBox callback.
2876
2877 <result name="E_INVALIDARG">
2878 Specified @a callback not registered.
2879 </result>
2880
2881 </desc>
2882 <param name="callback" type="IVirtualBoxCallback" dir="in">
2883 <desc>Callback object to unregister.</desc>
2884 </param>
2885 </method>
2886
2887 <method name="waitForPropertyChange">
2888 <desc>
2889 Blocks the caller until any of the properties represented by the
2890 @a what argument changes the value or until the given timeout interval
2891 expires.
2892
2893 The @a what argument is a comma separated list of property masks that
2894 describe properties the caller is interested in. The property mask is
2895 a string in the following format:
2896
2897 <pre>
2898 [[group.]subgroup.]name
2899 </pre>
2900
2901 where @c name is the property name and @c group, @c subgroup are zero
2902 or more property group specifiers. Each element (group or name) in
2903 the property mask may be either a Latin string or an asterisk symbol
2904 (@c "*") which is used to match any string for the given element. A
2905 property mask that doesn't contain asterisk symbols represents a
2906 single fully qualified property name.
2907
2908 Groups in the fully qualified property name go from more generic (the
2909 left-most part) to more specific (the right-most part). The first
2910 element is usually a name of the object the property belongs to. The
2911 second element may be either a property name, or a child object name,
2912 or an index if the preceding element names an object which is one of
2913 many objects of the same type. This way, property names form a
2914 hierarchy of properties. Here are some examples of property names:
2915
2916 <table>
2917 <tr>
2918 <td><tt>VirtualBox.version</tt></td>
2919 <td><link to="IVirtualBox::version"/> property</td>
2920 </tr>
2921 <tr>
2922 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2923 <td><link to="IMachine::name"/> property of the machine with the
2924 given UUID</td>
2925 </tr>
2926 </table>
2927
2928 Most property names directly correspond to the properties of objects
2929 (components) provided by the VirtualBox library and may be used to
2930 track changes to these properties. However, there may be
2931 pseudo-property names that don't correspond to any existing object's
2932 property directly, as well as there may be object properties that
2933 don't have a corresponding property name that is understood by this
2934 method, and therefore changes to such properties cannot be
2935 tracked. See individual object's property descriptions to get a
2936 fully qualified property name that can be used with this method (if
2937 any).
2938
2939 There is a special property mask @c "*" (i.e. a string consisting of a
2940 single asterisk symbol) that can be used to match all properties.
2941 Below are more examples of property masks:
2942
2943 <table>
2944 <tr>
2945 <td><tt>VirtualBox.*</tt></td>
2946 <td>Track all properties of the VirtualBox object</td>
2947 </tr>
2948 <tr>
2949 <td><tt>Machine.*.name</tt></td>
2950 <td>Track changes to the <link to="IMachine::name"/> property of
2951 all registered virtual machines</td>
2952 </tr>
2953 </table>
2954
2955 <note>
2956 This function is not implemented in the current version of the
2957 product.
2958 </note>
2959 </desc>
2960 <param name="what" type="wstring" dir="in">
2961 <desc>Comma separated list of property masks.</desc>
2962 </param>
2963 <param name="timeout" type="unsigned long" dir="in">
2964 <desc>
2965 Wait timeout in milliseconds.
2966 Specify -1 for an indefinite wait.
2967 </desc>
2968 </param>
2969 <param name="changed" type="wstring" dir="out">
2970 <desc>
2971 Comma separated list of properties that have been changed and caused
2972 this method to return to the caller.
2973 </desc>
2974 </param>
2975 <param name="values" type="wstring" dir="out">
2976 <desc>Reserved, not currently used.</desc>
2977 </param>
2978 </method>
2979
2980 <!--method name="createDHCPServerForInterface">
2981 <desc>
2982 Creates a dhcp server settings to be used for the given interface
2983 <result name="E_INVALIDARG">
2984 Host network interface @a name already exists.
2985 </result>
2986 </desc>
2987 <param name="interface" type="IHostNetworkInterface" dir="in">
2988 <desc>Network Interface</desc>
2989 </param>
2990 <param name="server" type="IDHCPServer" dir="out">
2991 <desc>Dhcp server settings</desc>
2992 </param>
2993 </method-->
2994
2995 <method name="createDHCPServer">
2996 <desc>
2997 Creates a dhcp server settings to be used for the given internal network name
2998 <result name="E_INVALIDARG">
2999 Host network interface @a name already exists.
3000 </result>
3001 </desc>
3002 <param name="name" type="wstring" dir="in">
3003 <desc>server name</desc>
3004 </param>
3005 <param name="server" type="IDHCPServer" dir="return">
3006 <desc>Dhcp server settings</desc>
3007 </param>
3008 </method>
3009
3010 <method name="findDHCPServerByNetworkName">
3011 <desc>
3012 Searches a dhcp server settings to be used for the given internal network name
3013 <result name="E_INVALIDARG">
3014 Host network interface @a name already exists.
3015 </result>
3016
3017 </desc>
3018 <param name="name" type="wstring" dir="in">
3019 <desc>server name</desc>
3020 </param>
3021 <param name="server" type="IDHCPServer" dir="return">
3022 <desc>Dhcp server settings</desc>
3023 </param>
3024 </method>
3025
3026 <!--method name="findDHCPServerForInterface">
3027 <desc>
3028 Searches a dhcp server settings to be used for the given interface
3029 <result name="E_INVALIDARG">
3030 Host network interface @a name already exists.
3031 </result>
3032 </desc>
3033 <param name="interface" type="IHostNetworkInterface" dir="in">
3034 <desc>Network Interface</desc>
3035 </param>
3036 <param name="server" type="IDHCPServer" dir="out">
3037 <desc>Dhcp server settings</desc>
3038 </param>
3039 </method-->
3040
3041 <method name="removeDHCPServer">
3042 <desc>
3043 Removes the dhcp server settings
3044 <result name="E_INVALIDARG">
3045 Host network interface @a name already exists.
3046 </result>
3047 </desc>
3048 <param name="server" type="IDHCPServer" dir="in">
3049 <desc>Dhcp server settings to be removed</desc>
3050 </param>
3051 </method>
3052
3053
3054 <method name="checkFirmwarePresent">
3055 <desc>
3056 Check if this VirtualBox installation has a firmware
3057 of the given type available, either system-wide or per-user.
3058 Optionally, this may return a hint where this firmware can be
3059 downloaded from.
3060 </desc>
3061 <param name="firmwareType" type="FirmwareType" dir="in">
3062 <desc>
3063 Type of firmware to check.
3064 </desc>
3065 </param>
3066 <param name="version" type="wstring" dir="in">
3067 <desc>Expected version number, usually empty string (presently ignored).</desc>
3068 </param>
3069
3070 <param name="url" type="wstring" dir="out">
3071 <desc>
3072 Suggested URL to download this firmware from.
3073 </desc>
3074 </param>
3075
3076 <param name="file" type="wstring" dir="out">
3077 <desc>
3078 Filename of firmware, only valid if result == TRUE.
3079 </desc>
3080 </param>
3081
3082 <param name="result" type="boolean" dir="return">
3083 <desc>If firmware of this type and version is available.</desc>
3084 </param>
3085 </method>
3086
3087 </interface>
3088
3089 <!--
3090 // IVFSExplorer
3091 /////////////////////////////////////////////////////////////////////////
3092 -->
3093
3094 <enum
3095 name="VFSType"
3096 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
3097 >
3098 <desc>
3099 Virtual file systems supported by VFSExplorer.
3100 </desc>
3101
3102 <const name="File" value="1" />
3103 <const name="Cloud" value="2" />
3104 <const name="S3" value="3" />
3105 <const name="WebDav" value="4" />
3106 </enum>
3107
3108 <enum
3109 name="VFSFileType"
3110 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
3111 >
3112 <desc>
3113 File types known by VFSExplorer.
3114 </desc>
3115
3116 <const name="Unknown" value="1" />
3117 <const name="Fifo" value="2" />
3118 <const name="DevChar" value="3" />
3119 <const name="Directory" value="4" />
3120 <const name="DevBlock" value="5" />
3121 <const name="File" value="6" />
3122 <const name="SymLink" value="7" />
3123 <const name="Socket" value="8" />
3124 <const name="WhiteOut" value="9" />
3125 </enum>
3126
3127 <interface
3128 name="IVFSExplorer" extends="$unknown"
3129 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3130 wsmap="managed"
3131 >
3132 <desc>
3133 The VFSExplorer interface unifies access to different file system
3134 types. This includes local file systems as well remote file systems like
3135 S3. For a list of supported types see <link to="VFSType" />.
3136 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3137 </desc>
3138
3139 <attribute name="path" type="wstring" readonly="yes">
3140 <desc>Returns the current path in the virtual file system.</desc>
3141 </attribute>
3142
3143 <attribute name="type" type="VFSType" readonly="yes">
3144 <desc>Returns the file system type which is currently in use.</desc>
3145 </attribute>
3146
3147 <method name="update">
3148 <desc>Updates the internal list of files/directories from the
3149 current directory level. Use <link to="#entryList" /> to get the full list
3150 after a call to this method.</desc>
3151
3152 <param name="aProgress" type="IProgress" dir="return">
3153 <desc>Progress object to track the operation completion.</desc>
3154 </param>
3155 </method>
3156
3157 <method name="cd">
3158 <desc>Change the current directory level.</desc>
3159
3160 <param name="aDir" type="wstring" dir="in">
3161 <desc>The name of the directory to go in.</desc>
3162 </param>
3163
3164 <param name="aProgress" type="IProgress" dir="return">
3165 <desc>Progress object to track the operation completion.</desc>
3166 </param>
3167 </method>
3168
3169 <method name="cdUp">
3170 <desc>Go one directory upwards from the current directory level.</desc>
3171
3172 <param name="aProgress" type="IProgress" dir="return">
3173 <desc>Progress object to track the operation completion.</desc>
3174 </param>
3175 </method>
3176
3177 <method name="entryList">
3178 <desc>Returns a list of files/directories after a call to <link
3179 to="#update" />. The user is responsible for keeping this internal
3180 list up do date.</desc>
3181
3182 <param name="aNames" type="wstring" safearray="yes" dir="out">
3183 <desc>The list of names for the entries.</desc>
3184 </param>
3185
3186 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3187 <desc>The list of types for the entries.</desc>
3188 </param>
3189 </method>
3190
3191 <method name="exists">
3192 <desc>Checks if the given file list exists in the current directory
3193 level.</desc>
3194
3195 <param name="aNames" type="wstring" safearray="yes" dir="in">
3196 <desc>The names to check.</desc>
3197 </param>
3198
3199 <param name="aExists" type="wstring" safearray="yes" dir="return">
3200 <desc>The names which exist.</desc>
3201 </param>
3202 </method>
3203
3204 <method name="remove">
3205 <desc>Deletes the given files in the current directory level.</desc>
3206
3207 <param name="aNames" type="wstring" safearray="yes" dir="in">
3208 <desc>The names to remove.</desc>
3209 </param>
3210
3211 <param name="aProgress" type="IProgress" dir="return">
3212 <desc>Progress object to track the operation completion.</desc>
3213 </param>
3214 </method>
3215
3216 </interface>
3217
3218 <!--
3219 // IAppliance
3220 /////////////////////////////////////////////////////////////////////////
3221 -->
3222
3223 <interface
3224 name="IAppliance" extends="$unknown"
3225 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3226 wsmap="managed"
3227 >
3228 <desc>
3229 Represents a platform-independent appliance in OVF format. An instance of this is returned
3230 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3231 virtual machines within an appliance with VirtualBox.
3232
3233 The OVF standard suggests two different physical file formats:
3234
3235 <ol>
3236 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
3237 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
3238 this descriptor file references other files such as disk images, as OVF appliances typically
3239 do, those additional files must be in the same directory as the descriptor file.</li>
3240
3241 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
3242 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3243 files and optionally other files.
3244
3245 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3246 be added with a later version.</li>
3247 </ol>
3248
3249 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3250 <link to="IMachine" /> involves the following sequence of API calls:
3251
3252 <ol>
3253 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3254 </li>
3255
3256 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3257 would like to import. So long as this file is syntactically valid, this will succeed
3258 and fill the appliance object with the parsed data from the OVF file.
3259 </li>
3260
3261 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3262 contents of the IAppliance attributes accordingly. These can be inspected by a
3263 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3264 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3265 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3266 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3267 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3268 The GUI can then give the user the option to confirm and/or change these suggestions.
3269 </li>
3270
3271 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3272 virtual system to override the suggestions made by the interpret() routine.
3273 </li>
3274
3275 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3276 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3277 virtual system descriptions.
3278 </li>
3279 </ol>
3280
3281 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3282
3283 <ol>
3284 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3285 an empty IAppliance object.
3286 </li>
3287
3288 <li>For each machine you would like to export, call <link to="IMachine::export" />
3289 with the IAppliance object you just created. This creates an instance of
3290 <link to="IVirtualSystemDescription" /> inside the appliance.
3291 </li>
3292
3293 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3294 virtual system to override the suggestions made by the export() routine.
3295 </li>
3296
3297 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3298 file written.</li>
3299 </ol>
3300
3301 </desc>
3302
3303 <attribute name="path" type="wstring" readonly="yes">
3304 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3305 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3306 <link to="#write" /> (for export).
3307 This attribute is empty until one of these methods has been called.
3308 </desc>
3309 </attribute>
3310
3311 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3312 <desc>
3313 Array of virtual disk definitions. One such description exists for each
3314 disk definition in the OVF; each string array item represents one such piece of
3315 disk information, with the information fields separated by tab (\t) characters.
3316
3317 The caller should be prepared for additional fields being appended to
3318 this string in future versions of VirtualBox and therefore check for
3319 the number of tabs in the strings returned.
3320
3321 In the current version, the following eight fields are returned per string
3322 in the array:
3323
3324 <ol>
3325 <li>Disk ID (unique string identifier given to disk)</li>
3326
3327 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3328
3329 <li>Populated size (optional unsigned integer indicating the current size of the
3330 disk; can be approximate; -1 if unspecified)</li>
3331
3332 <li>Format (string identifying the disk format, typically
3333 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3334
3335 <li>Reference (where to find the disk image, typically a file name; if empty,
3336 then the disk should be created on import)</li>
3337
3338 <li>Image size (optional unsigned integer indicating the size of the image,
3339 which need not necessarily be the same as the values specified above, since
3340 the image may be compressed or sparse; -1 if not specified)</li>
3341
3342 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3343 presently unsupported and always -1)</li>
3344
3345 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3346 </ol>
3347 </desc>
3348 </attribute>
3349
3350 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3351 <desc> Array of virtual system descriptions. One such description is created
3352 for each virtual system found in the OVF.
3353 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3354 (for export) has been called.
3355 </desc>
3356 </attribute>
3357
3358 <method name="read">
3359 <desc>
3360 Reads an OVF file into the appliance object.
3361
3362 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3363 mere fact that this method returns successfully does not mean that VirtualBox supports all
3364 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3365 </desc>
3366 <param name="file" type="wstring" dir="in">
3367 <desc>
3368 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3369 on whether the appliance is distributed as a set of files or as a single file, respectively).
3370 </desc>
3371 </param>
3372 <param name="aProgress" type="IProgress" dir="return">
3373 <desc></desc>
3374 </param>
3375 </method>
3376
3377 <method name="interpret">
3378 <desc>
3379 Interprets the OVF data that was read when the appliance was constructed. After
3380 calling this method, one can inspect the
3381 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3382 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3383 the appliance.
3384
3385 Calling this method is the second step of importing an appliance into VirtualBox;
3386 see <link to="IAppliance" /> for an overview.
3387
3388 After calling this method, one should call <link to="#getWarnings" /> to find out
3389 if problems were encountered during the processing which might later lead to
3390 errors.
3391 </desc>
3392 </method>
3393
3394 <method name="importMachines">
3395 <desc>
3396 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3397 and other interfaces that match the information contained in the appliance as
3398 closely as possible, as represented by the import instructions in the
3399 <link to="#virtualSystemDescriptions" /> array.
3400
3401 Calling this method is the final step of importing an appliance into VirtualBox;
3402 see <link to="IAppliance" /> for an overview.
3403
3404 Since importing the appliance will most probably involve copying and converting
3405 disk images, which can take a long time, this method operates asynchronously and
3406 returns an IProgress object to allow the caller to monitor the progress.
3407 </desc>
3408
3409 <param name="aProgress" type="IProgress" dir="return">
3410 <desc></desc>
3411 </param>
3412 </method>
3413
3414 <method name="createVFSExplorer">
3415 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3416
3417 <param name="aUri" type="wstring" dir="in">
3418 <desc>The URI describing the file system to use.</desc>
3419 </param>
3420
3421 <param name="aExplorer" type="IVFSExplorer" dir="return">
3422 <desc></desc>
3423 </param>
3424 </method>
3425
3426 <method name="write">
3427 <desc>
3428 Writes the contents of the appliance exports into a new OVF file.
3429
3430 Calling this method is the final step of exporting an appliance from VirtualBox;
3431 see <link to="IAppliance" /> for an overview.
3432
3433 Since exporting the appliance will most probably involve copying and converting
3434 disk images, which can take a long time, this method operates asynchronously and
3435 returns an IProgress object to allow the caller to monitor the progress.
3436 </desc>
3437 <param name="format" type="wstring" dir="in">
3438 <desc>
3439 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3440 future versions of VirtualBox may support additional formats.
3441 </desc>
3442 </param>
3443 <param name="path" type="wstring" dir="in">
3444 <desc>
3445 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3446 on whether the appliance is distributed as a set of files or as a single file, respectively).
3447 </desc>
3448 </param>
3449 <param name="aProgress" type="IProgress" dir="return">
3450 <desc>Progress object to track the operation completion.</desc>
3451 </param>
3452 </method>
3453
3454 <method name="getWarnings">
3455 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3456
3457 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3458 <desc></desc>
3459 </param>
3460 </method>
3461
3462 </interface>
3463
3464 <enum
3465 name="VirtualSystemDescriptionType"
3466 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3467 >
3468 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3469 a configuration value.</desc>
3470
3471 <const name="Ignore" value="1" />
3472 <const name="OS" value="2" />
3473 <const name="Name" value="3" />
3474 <const name="Product" value="4" />
3475 <const name="Vendor" value="5" />
3476 <const name="Version" value="6" />
3477 <const name="ProductUrl" value="7" />
3478 <const name="VendorUrl" value="8" />
3479 <const name="Description" value="9" />
3480 <const name="License" value="10" />
3481 <const name="Miscellaneous" value="11" />
3482 <const name="CPU" value="12" />
3483 <const name="Memory" value="13" />
3484 <const name="HardDiskControllerIDE" value="14" />
3485 <const name="HardDiskControllerSATA" value="15" />
3486 <const name="HardDiskControllerSCSI" value="16" />
3487 <const name="HardDiskImage" value="17" />
3488 <const name="Floppy" value="18" />
3489 <const name="CDROM" value="19" />
3490 <const name="NetworkAdapter" value="20" />
3491 <const name="USBController" value="21" />
3492 <const name="SoundCard" value="22" />
3493
3494 </enum>
3495
3496 <enum
3497 name="VirtualSystemDescriptionValueType"
3498 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3499 >
3500 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3501 type to fetch.</desc>
3502
3503 <const name="Reference" value="1" />
3504 <const name="Original" value="2" />
3505 <const name="Auto" value="3" />
3506 <const name="ExtraConfig" value="4" />
3507
3508 </enum>
3509
3510 <interface
3511 name="IVirtualSystemDescription" extends="$unknown"
3512 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3513 wsmap="managed"
3514 >
3515
3516 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3517 After <link to="IAppliance::interpret" /> has been called, that array contains
3518 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3519 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3520 into VirtualBox.
3521 </desc>
3522
3523 <attribute name="count" type="unsigned long" readonly="yes">
3524 <desc>Return the number of virtual system description entries.</desc>
3525 </attribute>
3526
3527 <method name="getDescription">
3528 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3529 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3530
3531 The list below identifies the value sets that are possible depending on the
3532 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
3533 the array item with the same index in @a aOvfValues[] will contain the original value as contained
3534 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
3535 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3536 the @a aExtraConfigValues[] array item may also be used.
3537
3538 <ul>
3539 <li>
3540 "OS": the guest operating system type. There must be exactly one such array item on import. The
3541 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3542 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3543 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3544 </li>
3545 <li>
3546 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3547 if none is present on import, then an automatic name will be created from the operating system
3548 type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
3549 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
3550 <link to="IMachine" /> name that does not exist yet.
3551 </li>
3552 <li>
3553 "Description": an arbitrary description.
3554 </li>
3555 <li>
3556 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3557 code to display such a license for agreement; the Main API does not enforce any such policy.
3558 </li>
3559 <li>
3560 Miscellaneous: reserved for future use.
3561 </li>
3562 <li>
3563 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3564 </li>
3565 <li>
3566 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3567 is present on import, then VirtualBox will set a meaningful default based on the operating system
3568 type.
3569 </li>
3570 <li>
3571 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
3572 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
3573 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
3574 writes into the OVF.
3575 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
3576 type can use to specify which hard disk controller a virtual disk should be connected to.
3577 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
3578 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
3579 its virtual machines supports four channels (primary master, primary slave, secondary master,
3580 secondary slave) and thus maps to two IDE controllers in the OVF sense.
3581 </li>
3582 <li>
3583 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3584 has no value in @a aOvfValues[] or @a aVBoxValues[].
3585 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
3586 </li>
3587 <li>
3588 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3589 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
3590 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
3591 whereas VirtualBox considers it a class of storage controllers of its own; see
3592 <link to="StorageControllerType" />).
3593 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
3594 </li>
3595 <li>
3596 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3597 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3598
3599 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
3600 a path since the image file should be in the same location as the OVF file itself), whereas the
3601 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3602 hard disk image. This means that on import the image will be copied and converted from the
3603 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3604 On import, the target image will also be registered with VirtualBox.
3605
3606 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
3607 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3608 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3609 the image to. That number must be the index of an array item with one of the hard disk controller
3610 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
3611 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3612 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
3613 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
3614 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
3615 </li>
3616 <li>
3617 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
3618 attachment information as with "HardDiskImage" items.
3619 </li>
3620 <li>
3621 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
3622 attachment information as with "HardDiskImage" items.
3623 </li>
3624 <li>
3625 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
3626 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
3627 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3628 </li>
3629 <li>
3630 "USBController": a USB controller. There can be at most one such item. If and only if such an
3631 item ispresent, USB support will be enabled for the new virtual machine.
3632 </li>
3633 <li>
3634 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3635 present, sound support will be enabled for the new virtual machine. Note that the virtual
3636 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3637 may be different from the virtual soundcard expected by the appliance.
3638 </li>
3639 </ul>
3640
3641 </desc>
3642
3643 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3644 <desc></desc>
3645 </param>
3646
3647 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3648 <desc></desc>
3649 </param>
3650
3651 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3652 <desc></desc>
3653 </param>
3654
3655 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3656 <desc></desc>
3657 </param>
3658
3659 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3660 <desc></desc>
3661 </param>
3662
3663 </method>
3664
3665 <method name="getDescriptionByType">
3666 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3667 should be returned.</desc>
3668
3669 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3670 <desc></desc>
3671 </param>
3672
3673 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3674 <desc></desc>
3675 </param>
3676
3677 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3678 <desc></desc>
3679 </param>
3680
3681 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3682 <desc></desc>
3683 </param>
3684
3685 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3686 <desc></desc>
3687 </param>
3688
3689 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3690 <desc></desc>
3691 </param>
3692
3693 </method>
3694
3695 <method name="getValuesByType">
3696 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3697 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3698 values.</desc>
3699
3700 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3701 <desc></desc>
3702 </param>
3703
3704 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3705 <desc></desc>
3706 </param>
3707
3708 <param name="aValues" type="wstring" dir="return" safearray="yes">
3709 <desc></desc>
3710 </param>
3711
3712 </method>
3713
3714 <method name="setFinalValues">
3715 <desc>
3716 This method allows the appliance's user to change the configuration for the virtual
3717 system descriptions. For each array item returned from <link to="#getDescription" />,
3718 you must pass in one boolean value and one configuration value.
3719
3720 Each item in the boolean array determines whether the particular configuration item
3721 should be enabled.
3722 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3723 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3724 and SoundCard.
3725
3726 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3727 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3728 the configuration remains unchanged. Please see the documentation for getDescription()
3729 for valid configuration values for the individual array item types. If the
3730 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3731 </desc>
3732
3733 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3734 <desc></desc>
3735 </param>
3736
3737 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3738 <desc></desc>
3739 </param>
3740
3741 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3742 <desc></desc>
3743 </param>
3744 </method>
3745
3746 <method name="addDescription">
3747 <desc>
3748 This method adds an additional description entry to the stack of already
3749 available descriptions for this virtual system. This is handy for writing
3750 values which aren't directly supported by VirtualBox. One example would
3751 be the License type of <link to="VirtualSystemDescriptionType" />.
3752 </desc>
3753
3754 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3755 <desc></desc>
3756 </param>
3757
3758 <param name="aVBoxValue" type="wstring" dir="in">
3759 <desc></desc>
3760 </param>
3761
3762 <param name="aExtraConfigValue" type="wstring" dir="in">
3763 <desc></desc>
3764 </param>
3765 </method>
3766 </interface>
3767
3768
3769 <!--
3770 // IMachine
3771 /////////////////////////////////////////////////////////////////////////
3772 -->
3773
3774 <interface
3775 name="IInternalMachineControl" extends="$unknown"
3776 uuid="57e9a280-8d57-4331-aa31-f009f5194f52"
3777 internal="yes"
3778 wsmap="suppress"
3779 >
3780 <method name="setRemoveSavedState">
3781 <desc>
3782 Updates the flag whether saved state is removed on a machine state
3783 change from Saved to PoweredOff.
3784 </desc>
3785 <param name="aRemove" type="boolean" dir="in"/>
3786 </method>
3787
3788 <method name="updateState">
3789 <desc>
3790 Updates the VM state.
3791 <note>
3792 This operation will also update the settings file with
3793 the correct information about the saved state file
3794 and delete this file from disk when appropriate.
3795 </note>
3796 </desc>
3797 <param name="state" type="MachineState" dir="in"/>
3798 </method>
3799
3800 <method name="getIPCId">
3801 <param name="id" type="wstring" dir="return"/>
3802 </method>
3803
3804 <method name="setPowerUpInfo">
3805 <desc>
3806 Transfers success (@c null) or error information for this session.
3807 This method updates the progress object to signal completion of the
3808 <link to="IVirtualBox::openRemoteSession"/> method if appropriate,
3809 which means that the progress object returned by
3810 <link to="IConsole::powerUp"/>.
3811 </desc>
3812 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
3813 </method>
3814
3815 <method name="runUSBDeviceFilters">
3816 <desc>
3817 Asks the server to run USB devices filters of the associated
3818 machine against the given USB device and tell if there is
3819 a match.
3820 <note>
3821 Intended to be used only for remote USB devices. Local
3822 ones don't require to call this method (this is done
3823 implicitly by the Host and USBProxyService).
3824 </note>
3825 </desc>
3826 <param name="device" type="IUSBDevice" dir="in"/>
3827 <param name="matched" type="boolean" dir="out"/>
3828 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3829 </method>
3830
3831 <method name="captureUSBDevice">
3832 <desc>
3833 Requests a capture of the given host USB device.
3834 When the request is completed, the VM process will
3835 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3836 notification.
3837 </desc>
3838 <param name="id" type="uuid" mod="string" dir="in"/>
3839 </method>
3840
3841 <method name="detachUSBDevice">
3842 <desc>
3843 Notification that a VM is going to detach (@a done = @c false) or has
3844 already detached (@a done = @c true) the given USB device.
3845 When the @a done = @c true request is completed, the VM process will
3846 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3847 notification.
3848 <note>
3849 In the @a done = @c true case, the server must run its own filters
3850 and filters of all VMs but this one on the detached device
3851 as if it were just attached to the host computer.
3852 </note>
3853 </desc>
3854 <param name="id" type="uuid" mod="string" dir="in"/>
3855 <param name="done" type="boolean" dir="in"/>
3856 </method>
3857
3858 <method name="autoCaptureUSBDevices">
3859 <desc>
3860 Requests a capture all matching USB devices attached to the host.
3861 When the request is completed, the VM process will
3862 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3863 notification per every captured device.
3864 </desc>
3865 </method>
3866
3867 <method name="detachAllUSBDevices">
3868 <desc>
3869 Notification that a VM that is being powered down. The done
3870 parameter indicates whether which stage of the power down
3871 we're at. When @a done = @c false the VM is announcing its
3872 intentions, while when @a done = @c true the VM is reporting
3873 what it has done.
3874 <note>
3875 In the @a done = @c true case, the server must run its own filters
3876 and filters of all VMs but this one on all detach devices as
3877 if they were just attached to the host computer.
3878 </note>
3879 </desc>
3880 <param name="done" type="boolean" dir="in"/>
3881 </method>
3882
3883 <method name="onSessionEnd">
3884 <desc>
3885 Triggered by the given session object when the session is about
3886 to close normally.
3887 </desc>
3888 <param name="session" type="ISession" dir="in">
3889 <desc>Session that is being closed</desc>
3890 </param>
3891 <param name="progress" type="IProgress" dir="return">
3892 <desc>
3893 Used to wait until the corresponding machine is actually
3894 dissociated from the given session on the server.
3895 Returned only when this session is a direct one.
3896 </desc>
3897 </param>
3898 </method>
3899
3900 <method name="beginSavingState">
3901 <desc>
3902 Called by the VM process to inform the server it wants to
3903 save the current state and stop the VM execution.
3904 </desc>
3905 <param name="progress" type="IProgress" dir="in">
3906 <desc>
3907 Progress object created by the VM process to wait until
3908 the state is saved.
3909 </desc>
3910 </param>
3911 <param name="stateFilePath" type="wstring" dir="out">
3912 <desc>
3913 File path the VM process must save the execution state to.
3914 </desc>
3915 </param>
3916 </method>
3917
3918 <method name="endSavingState">
3919 <desc>
3920 Called by the VM process to inform the server that saving
3921 the state previously requested by #beginSavingState is either
3922 successfully finished or there was a failure.
3923
3924 <result name="VBOX_E_FILE_ERROR">
3925 Settings file not accessible.
3926 </result>
3927 <result name="VBOX_E_XML_ERROR">
3928 Could not parse the settings file.
3929 </result>
3930
3931 </desc>
3932
3933 <param name="success" type="boolean" dir="in">
3934 <desc>@c true to indicate success and @c false otherwise.
3935 </desc>
3936 </param>
3937 </method>
3938
3939 <method name="adoptSavedState">
3940 <desc>
3941 Gets called by IConsole::adoptSavedState.
3942 <result name="VBOX_E_FILE_ERROR">
3943 Invalid saved state file path.
3944 </result>
3945 </desc>
3946 <param name="savedStateFile" type="wstring" dir="in">
3947 <desc>Path to the saved state file to adopt.</desc>
3948 </param>
3949 </method>
3950
3951 <method name="beginTakingSnapshot">
3952 <desc>
3953 Called from the VM process to request from the server to perform the
3954 server-side actions of creating a snapshot (creating differencing images
3955 and the snapshot object).
3956
3957 <result name="VBOX_E_FILE_ERROR">
3958 Settings file not accessible.
3959 </result>
3960 <result name="VBOX_E_XML_ERROR">
3961 Could not parse the settings file.
3962 </result>
3963 </desc>
3964 <param name="initiator" type="IConsole" dir="in">
3965 <desc>The console object that initiated this call.</desc>
3966 </param>
3967 <param name="name" type="wstring" dir="in">
3968 <desc>Snapshot name.</desc>
3969 </param>
3970 <param name="description" type="wstring" dir="in">
3971 <desc>Snapshot description.</desc>
3972 </param>
3973 <param name="consoleProgress" type="IProgress" dir="in">
3974 <desc>
3975 Progress object created by the VM process tracking the
3976 snapshot's progress. This has the following sub-operations:
3977 <ul>
3978 <li>setting up (weight 1);</li>
3979 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3980 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3981 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3982 <li>finishing up (weight 1)</li>
3983 </ul>
3984 </desc>
3985 </param>
3986 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3987 <desc>
3988 Whether this is an online snapshot (i.e. the machine is running).
3989 </desc>
3990 </param>
3991 <param name="stateFilePath" type="wstring" dir="out">
3992 <desc>
3993 File path the VM process must save the execution state to.
3994 </desc>
3995 </param>
3996 </method>
3997
3998 <method name="endTakingSnapshot">
3999 <desc>
4000 Called by the VM process to inform the server that the snapshot
4001 previously requested by #beginTakingSnapshot is either
4002 successfully taken or there was a failure.
4003 </desc>
4004
4005 <param name="success" type="boolean" dir="in">
4006 <desc>@c true to indicate success and @c false otherwise</desc>
4007 </param>
4008 </method>
4009
4010 <method name="deleteSnapshot">
4011 <desc>
4012 Gets called by IConsole::deleteSnapshot.
4013 <result name="VBOX_E_INVALID_OBJECT_STATE">
4014 Snapshot has more than one child snapshot.
4015 </result>
4016 </desc>
4017 <param name="initiator" type="IConsole" dir="in">
4018 <desc>The console object that initiated this call.</desc>
4019 </param>
4020 <param name="id" type="uuid" mod="string" dir="in">
4021 <desc>UUID of the snapshot to delete.</desc>
4022 </param>
4023 <param name="machineState" type="MachineState" dir="out">
4024 <desc>New machine state after this operation is started.</desc>
4025 </param>
4026 <param name="progress" type="IProgress" dir="return">
4027 <desc>Progress object to track the operation completion.</desc>
4028 </param>
4029 </method>
4030
4031 <method name="finishOnlineMergeMedium">
4032 <desc>
4033 Gets called by IConsole::onlineMergeMedium.
4034 </desc>
4035 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
4036 <desc>The medium attachment which needs to be cleaned up.</desc>
4037 </param>
4038 <param name="source" type="IMedium" dir="in">
4039 <desc>Merge source medium.</desc>
4040 </param>
4041 <param name="target" type="IMedium" dir="in">
4042 <desc>Merge target medium.</desc>
4043 </param>
4044 <param name="mergeForward" type="boolean" dir="in">
4045 <desc>Merge direction.</desc>
4046 </param>
4047 <param name="parentForTarget" type="IMedium" dir="in">
4048 <desc>For forward merges: new parent for target medium.</desc>
4049 </param>
4050 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
4051 <desc>For backward merges: list of media which need their parent UUID
4052 updated.</desc>
4053 </param>
4054 </method>
4055
4056 <method name="restoreSnapshot">
4057 <desc>
4058 Gets called by IConsole::RestoreSnapshot.
4059 </desc>
4060 <param name="initiator" type="IConsole" dir="in">
4061 <desc>The console object that initiated this call.</desc>
4062 </param>
4063 <param name="snapshot" type="ISnapshot" dir="in">
4064 <desc>The snapshot to restore the VM state from.</desc>
4065 </param>
4066 <param name="machineState" type="MachineState" dir="out">
4067 <desc>New machine state after this operation is started.</desc>
4068 </param>
4069 <param name="progress" type="IProgress" dir="return">
4070 <desc>Progress object to track the operation completion.</desc>
4071 </param>
4072 </method>
4073
4074 <method name="pullGuestProperties">
4075 <desc>
4076 Get the list of the guest properties matching a set of patterns along
4077 with their values, time stamps and flags and give responsibility for
4078 managing properties to the console.
4079 </desc>
4080 <param name="name" type="wstring" dir="out" safearray="yes">
4081 <desc>
4082 The names of the properties returned.
4083 </desc>
4084 </param>
4085 <param name="value" type="wstring" dir="out" safearray="yes">
4086 <desc>
4087 The values of the properties returned. The array entries match the
4088 corresponding entries in the @a name array.
4089 </desc>
4090 </param>
4091 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4092 <desc>
4093 The time stamps of the properties returned. The array entries match
4094 the corresponding entries in the @a name array.
4095 </desc>
4096 </param>
4097 <param name="flags" type="wstring" dir="out" safearray="yes">
4098 <desc>
4099 The flags of the properties returned. The array entries match the
4100 corresponding entries in the @a name array.
4101 </desc>
4102 </param>
4103 </method>
4104
4105 <method name="pushGuestProperty">
4106 <desc>
4107 Update a single guest property in IMachine.
4108 </desc>
4109 <param name="name" type="wstring" dir="in">
4110 <desc>
4111 The name of the property to be updated.
4112 </desc>
4113 </param>
4114 <param name="value" type="wstring" dir="in">
4115 <desc>
4116 The value of the property.
4117 </desc>
4118 </param>
4119 <param name="timestamp" type="unsigned long long" dir="in">
4120 <desc>
4121 The timestamp of the property.
4122 </desc>
4123 </param>
4124 <param name="flags" type="wstring" dir="in">
4125 <desc>
4126 The flags of the property.
4127 </desc>
4128 </param>
4129 </method>
4130
4131 <method name="lockMedia">
4132 <desc>
4133 Locks all media attached to the machine for writing and parents of
4134 attached differencing media (if any) for reading. This operation is
4135 atomic so that if it fails no media is actually locked.
4136
4137 This method is intended to be called when the machine is in Starting or
4138 Restoring state. The locked media will be automatically unlocked when
4139 the machine is powered off or crashed.
4140 </desc>
4141 </method>
4142 <method name="unlockMedia">
4143 <desc>
4144 Unlocks all media previously locked using
4145 <link to="IInternalMachineControl::lockMedia"/>.
4146
4147 This method is intended to be used with teleportation so that it is
4148 possible to teleport between processes on the same machine.
4149 </desc>
4150 </method>
4151 </interface>
4152
4153 <interface
4154 name="IBIOSSettings" extends="$unknown"
4155 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4156 wsmap="managed"
4157 >
4158 <desc>
4159 The IBIOSSettings interface represents BIOS settings of the virtual
4160 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4161 </desc>
4162 <attribute name="logoFadeIn" type="boolean">
4163 <desc>Fade in flag for BIOS logo animation.</desc>
4164 </attribute>
4165
4166 <attribute name="logoFadeOut" type="boolean">
4167 <desc>Fade out flag for BIOS logo animation.</desc>
4168 </attribute>
4169
4170 <attribute name="logoDisplayTime" type="unsigned long">
4171 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4172 </attribute>
4173
4174 <attribute name="logoImagePath" type="wstring">
4175 <desc>
4176 Local file system path for external BIOS splash image. Empty string
4177 means the default image is shown on boot.
4178 </desc>
4179 </attribute>
4180
4181 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4182 <desc>Mode of the BIOS boot device menu.</desc>
4183 </attribute>
4184
4185 <attribute name="ACPIEnabled" type="boolean">
4186 <desc>ACPI support flag.</desc>
4187 </attribute>
4188
4189 <attribute name="IOAPICEnabled" type="boolean">
4190 <desc>
4191 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4192 and support IRQs above 15.
4193 </desc>
4194 </attribute>
4195
4196 <attribute name="timeOffset" type="long long">
4197 <desc>
4198 Offset in milliseconds from the host system time. This allows for
4199 guests running with a different system date/time than the host.
4200 It is equivalent to setting the system date/time in the BIOS except
4201 it is not an absolute value but a relative one. Guest Additions
4202 time synchronization honors this offset.
4203 </desc>
4204 </attribute>
4205
4206 <attribute name="PXEDebugEnabled" type="boolean">
4207 <desc>
4208 PXE debug logging flag. If set, VirtualBox will write extensive
4209 PXE trace information to the release log.
4210 </desc>
4211 </attribute>
4212
4213 </interface>
4214
4215 <interface
4216 name="IMachine" extends="$unknown"
4217 uuid="ebea94d0-7663-4dea-8052-00946dd63d11"
4218 wsmap="managed"
4219 >
4220 <desc>
4221 The IMachine interface represents a virtual machine, or guest, created
4222 in VirtualBox.
4223
4224 This interface is used in two contexts. First of all, a collection of
4225 objects implementing this interface is stored in the
4226 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4227 machines that are currently registered with this VirtualBox
4228 installation. Also, once a session has been opened for the given virtual
4229 machine (e.g. the virtual machine is running), the machine object
4230 associated with the open session can be queried from the session object;
4231 see <link to="ISession"/> for details.
4232
4233 The main role of this interface is to expose the settings of the virtual
4234 machine and provide methods to change various aspects of the virtual
4235 machine's configuration. For machine objects stored in the
4236 <link to="IVirtualBox::machines"/> collection, all attributes are
4237 read-only unless explicitly stated otherwise in individual attribute
4238 and method descriptions. In order to change a machine setting, a session
4239 for this machine must be opened using one of
4240 <link to="IVirtualBox::openSession"/>,
4241 <link to="IVirtualBox::openRemoteSession"/> or
4242 <link to="IVirtualBox::openExistingSession"/> methods. After the
4243 session has been successfully opened, a mutable machine object needs to
4244 be queried from the session object and then the desired settings changes
4245 can be applied to the returned object using IMachine attributes and
4246 methods. See the <link to="ISession"/> interface description for more
4247 information about sessions.
4248
4249 Note that IMachine does not provide methods to control virtual machine
4250 execution (such as start the machine, or power it down) -- these methods
4251 are grouped in a separate interface called <link to="IConsole" />.
4252
4253 <see>ISession, IConsole</see>
4254 </desc>
4255
4256 <attribute name="parent" type="IVirtualBox" readonly="yes">
4257 <desc>Associated parent object.</desc>
4258 </attribute>
4259
4260 <attribute name="accessible" type="boolean" readonly="yes">
4261 <desc>
4262 Whether this virtual machine is currently accessible or not.
4263
4264 A machine is always deemed accessible unless it is registered <i>and</i>
4265 its settings file cannot be read or parsed (either because the file itself
4266 is unavailable or has invalid XML contents).
4267
4268 Every time this property is read, the accessibility state of
4269 this machine is re-evaluated. If the returned value is @c false,
4270 the <link to="#accessError"/> property may be used to get the
4271 detailed error information describing the reason of
4272 inaccessibility, including XML error messages.
4273
4274 When the machine is inaccessible, only the following properties
4275 can be used on it:
4276 <ul>
4277 <li><link to="#parent"/></li>
4278 <li><link to="#id"/></li>
4279 <li><link to="#settingsFilePath"/></li>
4280 <li><link to="#accessible"/></li>
4281 <li><link to="#accessError"/></li>
4282 </ul>
4283
4284 An attempt to access any other property or method will return
4285 an error.
4286
4287 The only possible action you can perform on an inaccessible
4288 machine is to unregister it using the
4289 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4290 for the accessibility state once more by querying this
4291 property).
4292
4293 <note>
4294 In the current implementation, once this property returns
4295 @c true, the machine will never become inaccessible
4296 later, even if its settings file cannot be successfully
4297 read/written any more (at least, until the VirtualBox
4298 server is restarted). This limitation may be removed in
4299 future releases.
4300 </note>
4301 </desc>
4302 </attribute>
4303
4304 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4305 <desc>
4306 Error information describing the reason of machine
4307 inaccessibility.
4308
4309 Reading this property is only valid after the last call to
4310 <link to="#accessible"/> returned @c false (i.e. the
4311 machine is currently unaccessible). Otherwise, a @c null
4312 IVirtualBoxErrorInfo object will be returned.
4313 </desc>
4314 </attribute>
4315
4316 <attribute name="name" type="wstring">
4317 <desc>
4318 Name of the virtual machine.
4319
4320 Besides being used for human-readable identification purposes
4321 everywhere in VirtualBox, the virtual machine name is also used
4322 as a name of the machine's settings file and as a name of the
4323 subdirectory this settings file resides in. Thus, every time you
4324 change the value of this property, the settings file will be
4325 renamed once you call <link to="#saveSettings"/> to confirm the
4326 change. The containing subdirectory will be also renamed, but
4327 only if it has exactly the same name as the settings file
4328 itself prior to changing this property (for backward compatibility
4329 with previous API releases). The above implies the following
4330 limitations:
4331 <ul>
4332 <li>The machine name cannot be empty.</li>
4333 <li>The machine name can contain only characters that are valid
4334 file name characters according to the rules of the file
4335 system used to store VirtualBox configuration.</li>
4336 <li>You cannot have two or more machines with the same name
4337 if they use the same subdirectory for storing the machine
4338 settings files.</li>
4339 <li>You cannot change the name of the machine if it is running,
4340 or if any file in the directory containing the settings file
4341 is being used by another running machine or by any other
4342 process in the host operating system at a time when
4343 <link to="#saveSettings"/> is called.
4344 </li>
4345 </ul>
4346 If any of the above limitations are hit, <link to="#saveSettings"/>
4347 will return an appropriate error message explaining the exact
4348 reason and the changes you made to this machine will not be
4349 saved.
4350 <note>
4351 For "legacy" machines created using the
4352 <link to="IVirtualBox::createLegacyMachine"/> call,
4353 the above naming limitations do not apply because the
4354 machine name does not affect the settings file name.
4355 The settings file name remains the same as it was specified
4356 during machine creation and never changes.
4357 </note>
4358 </desc>
4359 </attribute>
4360
4361 <attribute name="description" type="wstring">
4362 <desc>
4363 Description of the virtual machine.
4364
4365 The description attribute can contain any text and is
4366 typically used to describe the hardware and software
4367 configuration of the virtual machine in detail (i.e. network
4368 settings, versions of the installed software and so on).
4369 </desc>
4370 </attribute>
4371
4372 <attribute name="id" type="uuid" mod="string" readonly="yes">
4373 <desc>UUID of the virtual machine.</desc>
4374 </attribute>
4375
4376 <attribute name="OSTypeId" type="wstring">
4377 <desc>
4378 User-defined identifier of the Guest OS type.
4379 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4380 an IGuestOSType object representing details about the given
4381 Guest OS type.
4382 <note>
4383 This value may differ from the value returned by
4384 <link to="IGuest::OSTypeId"/> if Guest Additions are
4385 installed to the guest OS.
4386 </note>
4387 </desc>
4388 </attribute>
4389
4390 <attribute name="HardwareVersion" type="wstring">
4391 <desc>Hardware version identifier. Internal use only for now.</desc>
4392 </attribute>
4393
4394 <attribute name="hardwareUUID" type="uuid" mod="string">
4395 <desc>
4396 The UUID presented to the guest via memory tables, hardware and guest
4397 properties. For most VMs this is the same as the @a id, but for VMs
4398 which have been cloned or teleported it may be the same as the source
4399 VM. This latter is because the guest shouldn't notice that it was
4400 cloned or teleported.
4401 </desc>
4402 </attribute>
4403
4404 <attribute name="CPUCount" type="unsigned long">
4405 <desc>Number of virtual CPUs in the VM.</desc>
4406 </attribute>
4407
4408 <attribute name="CPUHotPlugEnabled" type="boolean">
4409 <desc>
4410 This setting determines whether VirtualBox allows CPU
4411 hotplugging for this machine.</desc>
4412 </attribute>
4413
4414 <attribute name="memorySize" type="unsigned long">
4415 <desc>System memory size in megabytes.</desc>
4416 </attribute>
4417
4418 <attribute name="memoryBalloonSize" type="unsigned long">
4419 <desc>Memory balloon size in megabytes.</desc>
4420 </attribute>
4421
4422 <attribute name="SharedPagingEnabled" type="boolean">
4423 <desc>
4424 This setting determines whether VirtualBox allows page
4425 sharing for this machine (64 bits host only).
4426 </desc>
4427 </attribute>
4428
4429 <attribute name="VRAMSize" type="unsigned long">
4430 <desc>Video memory size in megabytes.</desc>
4431 </attribute>
4432
4433 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4434 <desc>
4435 This setting determines whether VirtualBox allows this machine to make
4436 use of the 3D graphics support available on the host.</desc>
4437 </attribute>
4438
4439 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4440 <desc>
4441 This setting determines whether VirtualBox allows this machine to make
4442 use of the 2D video acceleration support available on the host.</desc>
4443 </attribute>
4444
4445 <attribute name="monitorCount" type="unsigned long">
4446 <desc>
4447 Number of virtual monitors.
4448 <note>
4449 Only effective on Windows XP and later guests with
4450 Guest Additions installed.
4451 </note>
4452 </desc>
4453 </attribute>
4454
4455 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4456 <desc>Object containing all BIOS settings.</desc>
4457 </attribute>
4458
4459 <attribute name="firmwareType" type="FirmwareType">
4460 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4461 bootstrap in this VM.</desc>
4462 </attribute>
4463
4464 <attribute name="pointingHidType" type="PointingHidType">
4465 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
4466 The default is typically "PS2Mouse" but can vary depending on the
4467 requirements of the guest operating system.</desc>
4468 </attribute>
4469
4470 <attribute name="keyboardHidType" type="KeyboardHidType">
4471 <desc>Type of keyboard HID used in this VM.
4472 The default is typically "PS2Keyboard" but can vary depending on the
4473 requirements of the guest operating system.</desc>
4474 </attribute>
4475
4476 <attribute name="hpetEnabled" type="boolean">
4477 <desc>This attribute controls if High Precision Event Timer (HPET) is
4478 enabled in this VM. Use this property if you want to provide guests
4479 with additional time source, or if guest requires HPET to function correctly.
4480 Default is false.</desc>
4481 </attribute>
4482
4483 <attribute name="snapshotFolder" type="wstring">
4484 <desc>
4485 Full path to the directory used to store snapshot data
4486 (differencing media and saved state files) of this machine.
4487
4488 The initial value of this property is
4489 <tt>&lt;</tt><link to="#settingsFilePath">
4490 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4491 <link to="#id">machine_uuid</link>
4492 <tt>&gt;</tt>.
4493
4494 Currently, it is an error to try to change this property on
4495 a machine that has snapshots (because this would require to
4496 move possibly large files to a different location).
4497 A separate method will be available for this purpose later.
4498
4499 <note>
4500 Setting this property to @c null or to an empty string will restore
4501 the initial value.
4502 </note>
4503 <note>
4504 When setting this property, the specified path can be
4505 absolute (full path) or relative to the directory where the
4506 <link to="#settingsFilePath">machine settings file</link>
4507 is located. When reading this property, a full path is
4508 always returned.
4509 </note>
4510 <note>
4511 The specified path may not exist, it will be created
4512 when necessary.
4513 </note>
4514 </desc>
4515 </attribute>
4516
4517 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4518 <desc>VRDP server object.</desc>
4519 </attribute>
4520
4521 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4522 <desc>Array of media attached to this machine.</desc>
4523 </attribute>
4524
4525 <attribute name="USBController" type="IUSBController" readonly="yes">
4526 <desc>
4527 Associated USB controller object.
4528
4529 <note>
4530 If USB functionality is not available in the given edition of
4531 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4532 </note>
4533 </desc>
4534 </attribute>
4535
4536 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4537 <desc>Associated audio adapter, always present.</desc>
4538 </attribute>
4539
4540 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4541 <desc>Array of storage controllers attached to this machine.</desc>
4542 </attribute>
4543
4544 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4545 <desc>
4546 Full name of the file containing machine settings data.
4547 </desc>
4548 </attribute>
4549
4550 <attribute name="settingsModified" type="boolean" readonly="yes">
4551 <desc>
4552 Whether the settings of this machine have been modified
4553 (but neither yet saved nor discarded).
4554 <note>
4555 Reading this property is only valid on instances returned
4556 by <link to="ISession::machine"/> and on new machines
4557 created by <link to="IVirtualBox::createMachine"/> or opened
4558 by <link to="IVirtualBox::openMachine"/> but not
4559 yet registered, or on unregistered machines after calling
4560 <link to="IVirtualBox::unregisterMachine"/>. For all other
4561 cases, the settings can never be modified.
4562 </note>
4563 <note>
4564 For newly created unregistered machines, the value of this
4565 property is always @c true until <link to="#saveSettings"/>
4566 is called (no matter if any machine settings have been
4567 changed after the creation or not). For opened machines
4568 the value is set to @c false (and then follows to normal rules).
4569 </note>
4570 </desc>
4571 </attribute>
4572
4573 <attribute name="sessionState" type="SessionState" readonly="yes">
4574 <desc>Current session state for this machine.</desc>
4575 </attribute>
4576
4577 <attribute name="sessionType" type="wstring" readonly="yes">
4578 <desc>
4579 Type of the session. If <link to="#sessionState"/> is
4580 SessionSpawning or SessionOpen, this attribute contains the
4581 same value as passed to the
4582 <link to="IVirtualBox::openRemoteSession"/> method in the
4583 @a type parameter. If the session was opened directly using
4584 <link to="IVirtualBox::openSession"/>, or if
4585 <link to="#sessionState"/> is SessionClosed, the value of this
4586 attribute is an empty string.
4587 </desc>
4588 </attribute>
4589
4590 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4591 <desc>
4592 Identifier of the session process. This attribute contains the
4593 platform-dependent identifier of the process that has opened a
4594 direct session for this machine using the
4595 <link to="IVirtualBox::openSession"/> call. The returned value
4596 is only valid if <link to="#sessionState"/> is SessionOpen or
4597 SessionClosing (i.e. a session is currently open or being
4598 closed) by the time this property is read.
4599 </desc>
4600 </attribute>
4601
4602 <attribute name="state" type="MachineState" readonly="yes">
4603 <desc>Current execution state of this machine.</desc>
4604 </attribute>
4605
4606 <attribute name="lastStateChange" type="long long" readonly="yes">
4607 <desc>
4608 Time stamp of the last execution state change,
4609 in milliseconds since 1970-01-01 UTC.
4610 </desc>
4611 </attribute>
4612
4613 <attribute name="stateFilePath" type="wstring" readonly="yes">
4614 <desc>
4615 Full path to the file that stores the execution state of
4616 the machine when it is in the <link to="MachineState_Saved"/> state.
4617 <note>
4618 When the machine is not in the Saved state, this attribute is
4619 an empty string.
4620 </note>
4621 </desc>
4622 </attribute>
4623
4624 <attribute name="logFolder" type="wstring" readonly="yes">
4625 <desc>
4626 Full path to the folder that stores a set of rotated log files
4627 recorded during machine execution. The most recent log file is
4628 named <tt>VBox.log</tt>, the previous log file is
4629 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4630 in the current version).
4631 </desc>
4632 </attribute>
4633
4634 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4635 <desc>
4636 Current snapshot of this machine. This is @c null if the machine
4637 currently has no snapshots. If it is not @c null, then it was
4638 set by one of <link to="Console::takeSnapshot" />,
4639 <link to="Console::deleteSnapshot" />
4640 or <link to="Console::restoreSnapshot" />, depending on which
4641 was called last. See <link to="ISnapshot"/> for details.
4642 </desc>
4643 </attribute>
4644
4645 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4646 <desc>
4647 Number of snapshots taken on this machine. Zero means the
4648 machine doesn't have any snapshots.
4649 </desc>
4650 </attribute>
4651
4652 <attribute name="currentStateModified" type="boolean" readonly="yes">
4653 <desc>
4654 Returns @c true if the current state of the machine is not
4655 identical to the state stored in the current snapshot.
4656
4657 The current state is identical to the current snapshot only
4658 directly after one of the following calls are made:
4659
4660 <ul>
4661 <li><link to="IConsole::restoreSnapshot"/>
4662 </li>
4663 <li><link to="IConsole::takeSnapshot"/> (issued on a
4664 "powered off" or "saved" machine, for which
4665 <link to="#settingsModified"/> returns @c false)
4666 </li>
4667 <li><link to="IMachine::setCurrentSnapshot"/>
4668 </li>
4669 </ul>
4670
4671 The current state remains identical until one of the following
4672 happens:
4673 <ul>
4674 <li>settings of the machine are changed</li>
4675 <li>the saved state is deleted</li>
4676 <li>the current snapshot is deleted</li>
4677 <li>an attempt to execute the machine is made</li>
4678 </ul>
4679
4680 <note>
4681 For machines that don't have snapshots, this property is
4682 always @c false.
4683 </note>
4684 </desc>
4685 </attribute>
4686
4687 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4688 <desc>
4689 Collection of shared folders for this machine (permanent shared
4690 folders). These folders are shared automatically at machine startup
4691 and available only to the guest OS installed within this machine.
4692
4693 New shared folders are added to the collection using
4694 <link to="#createSharedFolder"/>. Existing shared folders can be
4695 removed using <link to="#removeSharedFolder"/>.
4696 </desc>
4697 </attribute>
4698
4699 <attribute name="clipboardMode" type="ClipboardMode">
4700 <desc>
4701 Synchronization mode between the host OS clipboard
4702 and the guest OS clipboard.
4703 </desc>
4704 </attribute>
4705
4706 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4707 <desc>
4708 A comma-separated list of simple glob patterns. Changes to guest
4709 properties whose name matches one of the patterns will generate an
4710 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4711 </desc>
4712 </attribute>
4713
4714 <attribute name="teleporterEnabled" type="boolean">
4715 <desc>
4716 When set to @a true, the virtual machine becomes a target teleporter
4717 the next time it is powered on. This can only set to @a true when the
4718 VM is in the @a PoweredOff or @a Aborted state.
4719
4720 <!-- This property is automatically set to @a false when the VM is powered
4721 on. (bird: This doesn't work yet ) -->
4722 </desc>
4723 </attribute>
4724
4725 <attribute name="teleporterPort" type="unsigned long">
4726 <desc>
4727 The TCP port the target teleporter will listen for incoming
4728 teleportations on.
4729
4730 0 means the port is automatically selected upon power on. The actual
4731 value can be read from this property while the machine is waiting for
4732 incoming teleportations.
4733 </desc>
4734 </attribute>
4735
4736 <attribute name="teleporterAddress" type="wstring">
4737 <desc>
4738 The address the target teleporter will listen on. If set to an empty
4739 string, it will listen on all addresses.
4740 </desc>
4741 </attribute>
4742
4743 <attribute name="teleporterPassword" type="wstring">
4744 <desc>
4745 The password the to check for on the target teleporter. This is just a
4746 very basic measure to prevent simple hacks and operators accidentally
4747 beaming a virtual machine to the wrong place.
4748 </desc>
4749 </attribute>
4750
4751 <attribute name="RTCUseUTC" type="boolean">
4752 <desc>
4753 When set to @a true, the RTC device of the virtual machine will run
4754 in UTC time, otherwise in local time. Especially Unix guests prefer
4755 the time in UTC.
4756 </desc>
4757 </attribute>
4758
4759 <attribute name="ioCacheEnabled" type="boolean">
4760 <desc>
4761 When set to @a true, the builtin I/O cache of the virtual machine
4762 will be enabled.
4763 </desc>
4764 </attribute>
4765
4766 <attribute name="ioCacheSize" type="unsigned long">
4767 <desc>
4768 Maximum size of the I/O cache in MB.
4769 </desc>
4770 </attribute>
4771
4772 <attribute name="ioBandwidthMax" type="unsigned long">
4773 <desc>
4774 The maximum number of MB the VM is allowed to transfer per second.
4775 0 means unlimited bandwidth.
4776 </desc>
4777 </attribute>
4778
4779 <method name="setBootOrder">
4780 <desc>
4781 Puts the given device to the specified position in
4782 the boot order.
4783
4784 To indicate that no device is associated with the given position,
4785 <link to="DeviceType_Null"/> should be used.
4786
4787 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4788
4789 <result name="E_INVALIDARG">
4790 Boot @a position out of range.
4791 </result>
4792 <result name="E_NOTIMPL">
4793 Booting from USB @a device currently not supported.
4794 </result>
4795
4796 </desc>
4797 <param name="position" type="unsigned long" dir="in">
4798 <desc>
4799 Position in the boot order (@c 1 to the total number of
4800 devices the machine can boot from, as returned by
4801 <link to="ISystemProperties::maxBootPosition"/>).
4802 </desc>
4803 </param>
4804 <param name="device" type="DeviceType" dir="in">
4805 <desc>
4806 The type of the device used to boot at the given position.
4807 </desc>
4808 </param>
4809 </method>
4810
4811 <method name="getBootOrder" const="yes">
4812 <desc>
4813 Returns the device type that occupies the specified
4814 position in the boot order.
4815
4816 @todo [remove?]
4817 If the machine can have more than one device of the returned type
4818 (such as hard disks), then a separate method should be used to
4819 retrieve the individual device that occupies the given position.
4820
4821 If here are no devices at the given position, then
4822 <link to="DeviceType_Null"/> is returned.
4823
4824 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4825
4826 <result name="E_INVALIDARG">
4827 Boot @a position out of range.
4828 </result>
4829
4830 </desc>
4831 <param name="position" type="unsigned long" dir="in">
4832 <desc>
4833 Position in the boot order (@c 1 to the total number of
4834 devices the machine can boot from, as returned by
4835 <link to="ISystemProperties::maxBootPosition"/>).
4836 </desc>
4837 </param>
4838 <param name="device" type="DeviceType" dir="return">
4839 <desc>
4840 Device at the given position.
4841 </desc>
4842 </param>
4843 </method>
4844
4845 <method name="attachDevice">
4846 <desc>
4847 Attaches a device and optionally mounts a medium to the given storage
4848 controller (<link to="IStorageController" />, identified by @a name),
4849 at the indicated port and device.
4850
4851 This method is intended for managing storage devices in general (it works
4852 for both fixed and removable media). For storage devices supporting removable
4853 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4854 for changing the media while the machine is running.
4855
4856 For the IDE bus, the @a controllerPort parameter can be either
4857 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4858 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4859 to specify the master or the slave device, respectively. (In the
4860 default configuration of virtual machines, the secondary master is
4861 used for a CD/DVD drive.)
4862
4863 For an SATA controller, @a controllerPort must be a number ranging
4864 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4865 be a number ranging from @c 0 to @c 15.
4866
4867 For both SCSI and SATA, the @a device parameter is unused and must
4868 be @c 0.
4869
4870 For fixed media such as hard disks, the given medium identifier cannot
4871 be a zero UUID. It may be a zero UUID for removable media such as DVDs
4872 and floppies.
4873
4874 After calling this returns successfully, a new instance of
4875 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4876 attachments (<link to="IMachine::mediumAttachments"/>).
4877
4878 The specified device slot must not have a device attached to it,
4879 or this method will fail.
4880
4881 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4882 information about attaching media.
4883
4884 <note>
4885 You cannot attach a device to a running machine. Also, you cannot
4886 attach a device to a newly created machine until this machine's
4887 settings are saved to disk using <link to="#saveSettings"/>.
4888 </note>
4889 <note>
4890 If the medium is being attached indirectly, a new differencing medium
4891 will implicitly be created for it and attached instead. If the
4892 changes made to the machine settings (including this indirect
4893 attachment) are later cancelled using <link to="#discardSettings"/>,
4894 this implicitly created differencing medium will implicitly
4895 be deleted.
4896 </note>
4897
4898 <result name="E_INVALIDARG">
4899 SATA device, SATA port, IDE port or IDE slot out of range.
4900 </result>
4901 <result name="VBOX_E_INVALID_OBJECT_STATE">
4902 Attempt to attach medium to an unregistered virtual machine.
4903 </result>
4904 <result name="VBOX_E_INVALID_VM_STATE">
4905 Invalid machine state.
4906 </result>
4907 <result name="VBOX_E_OBJECT_IN_USE">
4908 Hard disk already attached to this or another virtual machine.
4909 </result>
4910
4911 </desc>
4912 <param name="name" type="wstring" dir="in">
4913 <desc>Name of the storage controller to attach the device to.</desc>
4914 </param>
4915 <param name="controllerPort" type="long" dir="in">
4916 <desc>Port to attach the device to.</desc>
4917 </param>
4918 <param name="device" type="long" dir="in">
4919 <desc>Device slot in the given port to attach the device to.</desc>
4920 </param>
4921 <param name="type" type="DeviceType" dir="in">
4922 <desc>Device type of the attached device.</desc>
4923 </param>
4924 <param name="id" type="uuid" mod="string" dir="in">
4925 <desc>UUID of the medium to mount. Zero UUID means do not mount any
4926 medium.</desc>
4927 </param>
4928 </method>
4929
4930 <method name="detachDevice">
4931 <desc>
4932 Detaches the device attached to a device slot of the specified bus.
4933
4934 Detaching the device from the virtual machine is deferred. This means
4935 that the medium remains associated with the machine when this method
4936 returns and gets actually de-associated only after a successful
4937 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4938 for more detailed information about attaching media.
4939
4940 <note>
4941 You cannot detach a device from a running machine.
4942 </note>
4943 <note>
4944 Detaching differencing media implicitly created by <link
4945 to="#attachDevice"/> for the indirect attachment using this
4946 method will <b>not</b> implicitly delete them. The
4947 <link to="IMedium::deleteStorage"/> operation should be
4948 explicitly performed by the caller after the medium is successfully
4949 detached and the settings are saved with
4950 <link to="#saveSettings"/>, if it is the desired action.
4951 </note>
4952
4953 <result name="VBOX_E_INVALID_VM_STATE">
4954 Attempt to detach medium from a running virtual machine.
4955 </result>
4956 <result name="VBOX_E_OBJECT_NOT_FOUND">
4957 No medium attached to given slot/bus.
4958 </result>
4959 <result name="VBOX_E_NOT_SUPPORTED">
4960 Medium format does not support storage deletion.
4961 </result>
4962
4963 </desc>
4964 <param name="name" type="wstring" dir="in">
4965 <desc>Name of the storage controller to detach the medium from.</desc>
4966 </param>
4967 <param name="controllerPort" type="long" dir="in">
4968 <desc>Port number to detach the medium from.</desc>
4969 </param>
4970 <param name="device" type="long" dir="in">
4971 <desc>Device slot number to detach the medium from.</desc>
4972 </param>
4973 </method>
4974
4975 <method name="passthroughDevice">
4976 <desc>
4977 Sets the passthrough mode of an existing DVD device. Changing the
4978 setting while the VM is running is forbidden. The setting is only used
4979 if at VM start the device is configured as a host DVD drive, in all
4980 other cases it is ignored. The device must already exist; see
4981 <link to="IMachine::attachDevice"/> for how to attach a new device.
4982
4983 The @a controllerPort and @a device parameters specify the device slot and
4984 have have the same meaning as with <link to="IMachine::attachDevice" />.
4985
4986 <result name="E_INVALIDARG">
4987 SATA device, SATA port, IDE port or IDE slot out of range.
4988 </result>
4989 <result name="VBOX_E_INVALID_OBJECT_STATE">
4990 Attempt to modify an unregistered virtual machine.
4991 </result>
4992 <result name="VBOX_E_INVALID_VM_STATE">
4993 Invalid machine state.
4994 </result>
4995
4996 </desc>
4997 <param name="name" type="wstring" dir="in">
4998 <desc>Name of the storage controller.</desc>
4999 </param>
5000 <param name="controllerPort" type="long" dir="in">
5001 <desc>Storage controller port.</desc>
5002 </param>
5003 <param name="device" type="long" dir="in">
5004 <desc>Device slot in the given port.</desc>
5005 </param>
5006 <param name="passthrough" type="boolean" dir="in">
5007 <desc>New value for the passthrough setting.</desc>
5008 </param>
5009 </method>
5010
5011 <method name="mountMedium">
5012 <desc>
5013 Mounts a medium (<link to="IMedium" />, identified
5014 by the given UUID @a id) to the given storage controller
5015 (<link to="IStorageController" />, identified by @a name),
5016 at the indicated port and device. The device must already exist;
5017 see <link to="IMachine::attachDevice"/> for how to attach a new device.
5018
5019 This method is intended only for managing removable media, where the
5020 device is fixed but media is changeable at runtime (such as DVDs
5021 and floppies). It cannot be used for fixed media such as hard disks.
5022
5023 The @a controllerPort and @a device parameters specify the device slot and
5024 have have the same meaning as with <link to="IMachine::attachDevice" />.
5025
5026 The specified device slot can have a medium mounted, which will be
5027 unmounted first. Specifying a zero UUID (or an empty string) for
5028 @a medium does just an unmount.
5029
5030 See <link to="IMedium"/> for more detailed information about
5031 attaching media.
5032
5033 <result name="E_INVALIDARG">
5034 SATA device, SATA port, IDE port or IDE slot out of range.
5035 </result>
5036 <result name="VBOX_E_INVALID_OBJECT_STATE">
5037 Attempt to attach medium to an unregistered virtual machine.
5038 </result>
5039 <result name="VBOX_E_INVALID_VM_STATE">
5040 Invalid machine state.
5041 </result>
5042 <result name="VBOX_E_OBJECT_IN_USE">
5043 Medium already attached to this or another virtual machine.
5044 </result>
5045
5046 </desc>
5047 <param name="name" type="wstring" dir="in">
5048 <desc>Name of the storage controller to attach the medium to.</desc>
5049 </param>
5050 <param name="controllerPort" type="long" dir="in">
5051 <desc>Port to attach the medium to.</desc>
5052 </param>
5053 <param name="device" type="long" dir="in">
5054 <desc>Device slot in the given port to attach the medium to.</desc>
5055 </param>
5056 <param name="medium" type="uuid" mod="string" dir="in">
5057 <desc>UUID of the medium to attach. A zero UUID means unmount the
5058 currently mounted medium.</desc>
5059 </param>
5060 <param name="force" type="boolean" dir="in">
5061 <desc>Allows to force unmount/mount of a medium which is locked by
5062 theDevice slot in the given port to attach the medium to.</desc>
5063 </param>
5064 </method>
5065
5066 <method name="getMedium" const="yes">
5067 <desc>
5068 Returns the virtual medium attached to a device slot of the specified
5069 bus.
5070
5071 Note that if the medium was indirectly attached by
5072 <link to="#mountMedium"/> to the given device slot then this
5073 method will return not the same object as passed to the
5074 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
5075 more detailed information about mounting a medium.
5076
5077 <result name="VBOX_E_OBJECT_NOT_FOUND">
5078 No medium attached to given slot/bus.
5079 </result>
5080
5081 </desc>
5082 <param name="name" type="wstring" dir="in">
5083 <desc>Name of the storage controller the medium is attached to.</desc>
5084 </param>
5085 <param name="controllerPort" type="long" dir="in">
5086 <desc>Port to query.</desc>
5087 </param>
5088 <param name="device" type="long" dir="in">
5089 <desc>Device slot in the given port to query.</desc>
5090 </param>
5091 <param name="medium" type="IMedium" dir="return">
5092 <desc>Attached medium object.</desc>
5093 </param>
5094 </method>
5095
5096 <method name="getMediumAttachmentsOfController" const="yes">
5097 <desc>
5098 Returns an array of medium attachments which are attached to the
5099 the controller with the given name.
5100
5101 <result name="VBOX_E_OBJECT_NOT_FOUND">
5102 A storage controller with given name doesn't exist.
5103 </result>
5104 </desc>
5105 <param name="name" type="wstring" dir="in"/>
5106 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
5107 </method>
5108
5109 <method name="getMediumAttachment" const="yes">
5110 <desc>
5111 Returns a medium attachment which corresponds to the controller with
5112 the given name, on the given port and device slot.
5113
5114 <result name="VBOX_E_OBJECT_NOT_FOUND">
5115 No attachment exists for the given controller/port/device combination.
5116 </result>
5117 </desc>
5118 <param name="name" type="wstring" dir="in"/>
5119 <param name="controllerPort" type="long" dir="in"/>
5120 <param name="device" type="long" dir="in"/>
5121 <param name="attachment" type="IMediumAttachment" dir="return"/>
5122 </method>
5123
5124 <method name="getNetworkAdapter" const="yes">
5125 <desc>
5126 Returns the network adapter associated with the given slot.
5127 Slots are numbered sequentially, starting with zero. The total
5128 number of adapters per machine is defined by the
5129 <link to="ISystemProperties::networkAdapterCount"/> property,
5130 so the maximum slot number is one less than that property's value.
5131
5132 <result name="E_INVALIDARG">
5133 Invalid @a slot number.
5134 </result>
5135
5136 </desc>
5137 <param name="slot" type="unsigned long" dir="in"/>
5138 <param name="adapter" type="INetworkAdapter" dir="return"/>
5139 </method>
5140
5141 <method name="addStorageController">
5142 <desc>
5143 Adds a new storage controller (SCSI or SATA controller) to the
5144 machine and returns it as an instance of
5145 <link to="IStorageController" />.
5146
5147 @a name identifies the controller for subsequent calls such as
5148 <link to="#getStorageControllerByName" />,
5149 <link to="#getStorageControllerByInstance" />,
5150 <link to="#removeStorageController" />,
5151 <link to="#attachDevice" /> or <link to="#mountMedium" />.
5152
5153 After the controller has been added, you can set its exact
5154 type by setting the <link to="IStorageController::controllerType" />.
5155
5156 <result name="VBOX_E_OBJECT_IN_USE">
5157 A storage controller with given name exists already.
5158 </result>
5159 <result name="E_INVALIDARG">
5160 Invalid @a controllerType.
5161 </result>
5162 </desc>
5163 <param name="name" type="wstring" dir="in"/>
5164 <param name="connectionType" type="StorageBus" dir="in"/>
5165 <param name="controller" type="IStorageController" dir="return"/>
5166 </method>
5167
5168 <method name="getStorageControllerByName" const="yes">
5169 <desc>
5170 Returns a storage controller with the given name.
5171
5172 <result name="VBOX_E_OBJECT_NOT_FOUND">
5173 A storage controller with given name doesn't exist.
5174 </result>
5175 </desc>
5176 <param name="name" type="wstring" dir="in"/>
5177 <param name="storageController" type="IStorageController" dir="return"/>
5178 </method>
5179
5180 <method name="getStorageControllerByInstance" const="yes">
5181 <desc>
5182 Returns a storage controller with the given instance number.
5183
5184 <result name="VBOX_E_OBJECT_NOT_FOUND">
5185 A storage controller with given instance number doesn't exist.
5186 </result>
5187 </desc>
5188 <param name="instance" type="unsigned long" dir="in"/>
5189 <param name="storageController" type="IStorageController" dir="return"/>
5190 </method>
5191
5192 <method name="removeStorageController">
5193 <desc>
5194 Removes a storage controller from the machine.
5195
5196 <result name="VBOX_E_OBJECT_NOT_FOUND">
5197 A storage controller with given name doesn't exist.
5198 </result>
5199 </desc>
5200 <param name="name" type="wstring" dir="in"/>
5201 </method>
5202
5203 <method name="getSerialPort" const="yes">
5204 <desc>
5205 Returns the serial port associated with the given slot.
5206 Slots are numbered sequentially, starting with zero. The total
5207 number of serial ports per machine is defined by the
5208 <link to="ISystemProperties::serialPortCount"/> property,
5209 so the maximum slot number is one less than that property's value.
5210
5211 <result name="E_INVALIDARG">
5212 Invalid @a slot number.
5213 </result>
5214
5215 </desc>
5216 <param name="slot" type="unsigned long" dir="in"/>
5217 <param name="port" type="ISerialPort" dir="return"/>
5218 </method>
5219
5220 <method name="getParallelPort" const="yes">
5221 <desc>
5222 Returns the parallel port associated with the given slot.
5223 Slots are numbered sequentially, starting with zero. The total
5224 number of parallel ports per machine is defined by the
5225 <link to="ISystemProperties::parallelPortCount"/> property,
5226 so the maximum slot number is one less than that property's value.
5227
5228 <result name="E_INVALIDARG">
5229 Invalid @a slot number.
5230 </result>
5231
5232 </desc>
5233 <param name="slot" type="unsigned long" dir="in"/>
5234 <param name="port" type="IParallelPort" dir="return"/>
5235 </method>
5236
5237 <method name="getExtraDataKeys">
5238 <desc>
5239 Returns an array representing the machine-specific extra data keys
5240 which currently have values defined.
5241 </desc>
5242 <param name="value" type="wstring" dir="return" safearray="yes">
5243 <desc>Array of extra data keys.</desc>
5244 </param>
5245 </method>
5246
5247 <method name="getExtraData">
5248 <desc>
5249 Returns associated machine-specific extra data.
5250
5251 If the requested data @a key does not exist, this function will
5252 succeed and return an empty string in the @a value argument.
5253
5254 <result name="VBOX_E_FILE_ERROR">
5255 Settings file not accessible.
5256 </result>
5257 <result name="VBOX_E_XML_ERROR">
5258 Could not parse the settings file.
5259 </result>
5260
5261 </desc>
5262 <param name="key" type="wstring" dir="in">
5263 <desc>Name of the data key to get.</desc>
5264 </param>
5265 <param name="value" type="wstring" dir="return">
5266 <desc>Value of the requested data key.</desc>
5267 </param>
5268 </method>
5269
5270 <method name="setExtraData">
5271 <desc>
5272 Sets associated machine-specific extra data.
5273
5274 If you pass @c null or an empty string as a key @a value, the given
5275 @a key will be deleted.
5276
5277 <note>
5278 Before performing the actual data change, this method will ask all
5279 registered callbacks using the
5280 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5281 notification for a permission. If one of the callbacks refuses the
5282 new value, the change will not be performed.
5283 </note>
5284 <note>
5285 On success, the
5286 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5287 is called to inform all registered callbacks about a successful data
5288 change.
5289 </note>
5290 <note>
5291 This method can be called outside the machine session and therefore
5292 it's a caller's responsibility to handle possible race conditions
5293 when several clients change the same key at the same time.
5294 </note>
5295
5296 <result name="VBOX_E_FILE_ERROR">
5297 Settings file not accessible.
5298 </result>
5299 <result name="VBOX_E_XML_ERROR">
5300 Could not parse the settings file.
5301 </result>
5302
5303 </desc>
5304 <param name="key" type="wstring" dir="in">
5305 <desc>Name of the data key to set.</desc>
5306 </param>
5307 <param name="value" type="wstring" dir="in">
5308 <desc>Value to assign to the key.</desc>
5309 </param>
5310 </method>
5311
5312 <method name="getCPUProperty" const="yes">
5313 <desc>
5314 Returns the virtual CPU boolean value of the specified property.
5315
5316 <result name="E_INVALIDARG">
5317 Invalid property.
5318 </result>
5319
5320 </desc>
5321 <param name="property" type="CPUPropertyType" dir="in">
5322 <desc>
5323 Property type to query.
5324 </desc>
5325 </param>
5326 <param name="value" type="boolean" dir="return">
5327 <desc>
5328 Property value.
5329 </desc>
5330 </param>
5331 </method>
5332
5333 <method name="setCPUProperty">
5334 <desc>
5335 Sets the virtual CPU boolean value of the specified property.
5336
5337 <result name="E_INVALIDARG">
5338 Invalid property.
5339 </result>
5340
5341 </desc>
5342 <param name="property" type="CPUPropertyType" dir="in">
5343 <desc>
5344 Property type to query.
5345 </desc>
5346 </param>
5347 <param name="value" type="boolean" dir="in">
5348 <desc>
5349 Property value.
5350 </desc>
5351 </param>
5352 </method>
5353
5354 <method name="getCPUIDLeaf" const="yes">
5355 <desc>
5356 Returns the virtual CPU cpuid information for the specified leaf.
5357
5358 Currently supported index values for cpuid:
5359 Standard CPUID leafs: 0 - 0xA
5360 Extended CPUID leafs: 0x80000000 - 0x8000000A
5361
5362 See the Intel and AMD programmer's manuals for detailed information
5363 about the cpuid instruction and its leafs.
5364 <result name="E_INVALIDARG">
5365 Invalid id.
5366 </result>
5367
5368 </desc>
5369 <param name="id" type="unsigned long" dir="in">
5370 <desc>
5371 CPUID leaf index.
5372 </desc>
5373 </param>
5374 <param name="valEax" type="unsigned long" dir="out">
5375 <desc>
5376 CPUID leaf value for register eax.
5377 </desc>
5378 </param>
5379 <param name="valEbx" type="unsigned long" dir="out">
5380 <desc>
5381 CPUID leaf value for register ebx.
5382 </desc>
5383 </param>
5384 <param name="valEcx" type="unsigned long" dir="out">
5385 <desc>
5386 CPUID leaf value for register ecx.
5387 </desc>
5388 </param>
5389 <param name="valEdx" type="unsigned long" dir="out">
5390 <desc>
5391 CPUID leaf value for register edx.
5392 </desc>
5393 </param>
5394 </method>
5395
5396 <method name="setCPUIDLeaf">
5397 <desc>
5398 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
5399 are not passed unmodified. VirtualBox clears features that it doesn't support.
5400
5401 Currently supported index values for cpuid:
5402 Standard CPUID leafs: 0 - 0xA
5403 Extended CPUID leafs: 0x80000000 - 0x8000000A
5404
5405 See the Intel and AMD programmer's manuals for detailed information
5406 about the cpuid instruction and its leafs.
5407
5408 Do not use this method unless you know exactly what you're doing. Misuse can lead to
5409 random crashes inside VMs.
5410 <result name="E_INVALIDARG">
5411 Invalid id.
5412 </result>
5413
5414 </desc>
5415 <param name="id" type="unsigned long" dir="in">
5416 <desc>
5417 CPUID leaf index.
5418 </desc>
5419 </param>
5420 <param name="valEax" type="unsigned long" dir="in">
5421 <desc>
5422 CPUID leaf value for register eax.
5423 </desc>
5424 </param>
5425 <param name="valEbx" type="unsigned long" dir="in">
5426 <desc>
5427 CPUID leaf value for register ebx.
5428 </desc>
5429 </param>
5430 <param name="valEcx" type="unsigned long" dir="in">
5431 <desc>
5432 CPUID leaf value for register ecx.
5433 </desc>
5434 </param>
5435 <param name="valEdx" type="unsigned long" dir="in">
5436 <desc>
5437 CPUID leaf value for register edx.
5438 </desc>
5439 </param>
5440 </method>
5441
5442 <method name="removeCPUIDLeaf">
5443 <desc>
5444 Removes the virtual CPU cpuid leaf for the specified index
5445
5446 <result name="E_INVALIDARG">
5447 Invalid id.
5448 </result>
5449
5450 </desc>
5451 <param name="id" type="unsigned long" dir="in">
5452 <desc>
5453 CPUID leaf index.
5454 </desc>
5455 </param>
5456 </method>
5457
5458 <method name="removeAllCPUIDLeaves">
5459 <desc>
5460 Removes all the virtual CPU cpuid leaves
5461 </desc>
5462 </method>
5463
5464 <method name="getHWVirtExProperty" const="yes">
5465 <desc>
5466 Returns the value of the specified hardware virtualization boolean property.
5467
5468 <result name="E_INVALIDARG">
5469 Invalid property.
5470 </result>
5471
5472 </desc>
5473 <param name="property" type="HWVirtExPropertyType" dir="in">
5474 <desc>
5475 Property type to query.
5476 </desc>
5477 </param>
5478 <param name="value" type="boolean" dir="return">
5479 <desc>
5480 Property value.
5481 </desc>
5482 </param>
5483 </method>
5484
5485 <method name="setHWVirtExProperty">
5486 <desc>
5487 Sets a new value for the specified hardware virtualization boolean property.
5488
5489 <result name="E_INVALIDARG">
5490 Invalid property.
5491 </result>
5492
5493 </desc>
5494 <param name="property" type="HWVirtExPropertyType" dir="in">
5495 <desc>
5496 Property type to set.
5497 </desc>
5498 </param>
5499 <param name="value" type="boolean" dir="in">
5500 <desc>
5501 New property value.
5502 </desc>
5503 </param>
5504 </method>
5505
5506 <method name="saveSettings">
5507 <desc>
5508 Saves any changes to machine settings made since the session
5509 has been opened or a new machine has been created, or since the
5510 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5511 For registered machines, new settings become visible to all
5512 other VirtualBox clients after successful invocation of this
5513 method.
5514 <note>
5515 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5516 notification event after the configuration has been successfully
5517 saved (only for registered machines).
5518 </note>
5519 <note>
5520 Calling this method is only valid on instances returned
5521 by <link to="ISession::machine"/> and on new machines
5522 created by <link to="IVirtualBox::createMachine"/> but not
5523 yet registered, or on unregistered machines after calling
5524 <link to="IVirtualBox::unregisterMachine"/>.
5525 </note>
5526
5527 <result name="VBOX_E_FILE_ERROR">
5528 Settings file not accessible.
5529 </result>
5530 <result name="VBOX_E_XML_ERROR">
5531 Could not parse the settings file.
5532 </result>
5533 <result name="E_ACCESSDENIED">
5534 Modification request refused.
5535 </result>
5536
5537 </desc>
5538 </method>
5539
5540 <method name="discardSettings">
5541 <desc>
5542 Discards any changes to the machine settings made since the session
5543 has been opened or since the last call to <link to="#saveSettings"/>
5544 or <link to="#discardSettings"/>.
5545 <note>
5546 Calling this method is only valid on instances returned
5547 by <link to="ISession::machine"/> and on new machines
5548 created by <link to="IVirtualBox::createMachine"/> or
5549 opened by <link to="IVirtualBox::openMachine"/> but not
5550 yet registered, or on unregistered machines after calling
5551 <link to="IVirtualBox::unregisterMachine"/>.
5552 </note>
5553
5554 <result name="VBOX_E_INVALID_VM_STATE">
5555 Virtual machine is not mutable.
5556 </result>
5557
5558 </desc>
5559 </method>
5560
5561 <method name="deleteSettings">
5562 <desc>
5563 Deletes the settings file of this machine from disk.
5564 The machine must not be registered in order for this operation
5565 to succeed.
5566 <note>
5567 <link to="#settingsModified"/> will return @c true after this
5568 method successfully returns.
5569 </note>
5570 <note>
5571 Calling this method is only valid on instances returned
5572 by <link to="ISession::machine"/> and on new machines
5573 created by <link to="IVirtualBox::createMachine"/> or
5574 opened by <link to="IVirtualBox::openMachine"/> but not
5575 yet registered, or on unregistered machines after calling
5576 <link to="IVirtualBox::unregisterMachine"/>.
5577 </note>
5578 <note>
5579 The deleted machine settings file can be restored (saved again)
5580 by calling <link to="#saveSettings"/>.
5581 </note>
5582
5583 <result name="VBOX_E_INVALID_VM_STATE">
5584 Cannot delete settings of a registered machine or
5585 machine not mutable.
5586 </result>
5587 <result name="VBOX_E_IPRT_ERROR">
5588 Could not delete the settings file.
5589 </result>
5590
5591 </desc>
5592 </method>
5593
5594 <method name="export">
5595 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5596 steps required to export VirtualBox machines to OVF.
5597 </desc>
5598
5599 <param name="aAppliance" type="IAppliance" dir="in">
5600 <desc>Appliance to export this machine to.</desc>
5601 </param>
5602 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5603 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5604 </param>
5605 </method >
5606
5607 <method name="getSnapshot">
5608 <desc>
5609 Returns a snapshot of this machine with the given UUID.
5610 A @c null UUID can be used to obtain the first snapshot
5611 taken on this machine. This is useful if you want to traverse
5612 the whole tree of snapshots starting from the root.
5613
5614 <result name="VBOX_E_OBJECT_NOT_FOUND">
5615 Virtual machine has no snapshots or snapshot not found.
5616 </result>
5617
5618 </desc>
5619 <param name="id" type="uuid" mod="string" dir="in">
5620 <desc>UUID of the snapshot to get</desc>
5621 </param>
5622 <param name="snapshot" type="ISnapshot" dir="return">
5623 <desc>Snapshot object with the given UUID.</desc>
5624 </param>
5625 </method>
5626
5627 <method name="findSnapshot">
5628 <desc>
5629 Returns a snapshot of this machine with the given name.
5630
5631 <result name="VBOX_E_OBJECT_NOT_FOUND">
5632 Virtual machine has no snapshots or snapshot not found.
5633 </result>
5634
5635 </desc>
5636 <param name="name" type="wstring" dir="in">
5637 <desc>Name of the snapshot to find</desc>
5638 </param>
5639 <param name="snapshot" type="ISnapshot" dir="return">
5640 <desc>Snapshot object with the given name.</desc>
5641 </param>
5642 </method>
5643
5644 <method name="setCurrentSnapshot">
5645 <desc>
5646 Sets the current snapshot of this machine.
5647 <note>
5648 In the current implementation, this operation is not
5649 implemented.
5650 </note>
5651 </desc>
5652 <param name="id" type="uuid" mod="string" dir="in">
5653 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5654 </param>
5655 </method>
5656
5657 <method name="createSharedFolder">
5658 <desc>
5659 Creates a new permanent shared folder by associating the given logical
5660 name with the given host path, adds it to the collection of shared
5661 folders and starts sharing it. Refer to the description of
5662 <link to="ISharedFolder"/> to read more about logical names.
5663
5664 <result name="VBOX_E_OBJECT_IN_USE">
5665 Shared folder already exists.
5666 </result>
5667 <result name="VBOX_E_FILE_ERROR">
5668 Shared folder @a hostPath not accessible.
5669 </result>
5670
5671 </desc>
5672 <param name="name" type="wstring" dir="in">
5673 <desc>Unique logical name of the shared folder.</desc>
5674 </param>
5675 <param name="hostPath" type="wstring" dir="in">
5676 <desc>Full path to the shared folder in the host file system.</desc>
5677 </param>
5678 <param name="writable" type="boolean" dir="in">
5679 <desc>Whether the share is writable or readonly</desc>
5680 </param>
5681 </method>
5682
5683 <method name="removeSharedFolder">
5684 <desc>
5685 Removes the permanent shared folder with the given name previously
5686 created by <link to="#createSharedFolder"/> from the collection of
5687 shared folders and stops sharing it.
5688
5689 <result name="VBOX_E_INVALID_VM_STATE">
5690 Virtual machine is not mutable.
5691 </result>
5692 <result name="VBOX_E_OBJECT_NOT_FOUND">
5693 Shared folder @a name does not exist.
5694 </result>
5695
5696 </desc>
5697 <param name="name" type="wstring" dir="in">
5698 <desc>Logical name of the shared folder to remove.</desc>
5699 </param>
5700 </method>
5701
5702 <method name="canShowConsoleWindow">
5703 <desc>
5704 Returns @c true if the VM console process can activate the
5705 console window and bring it to foreground on the desktop of
5706 the host PC.
5707 <note>
5708 This method will fail if a session for this machine is not
5709 currently open.
5710 </note>
5711
5712 <result name="VBOX_E_INVALID_VM_STATE">
5713 Machine session is not open.
5714 </result>
5715
5716 </desc>
5717 <param name="canShow" type="boolean" dir="return">
5718 <desc>
5719 @c true if the console window can be shown and @c false otherwise.
5720 </desc>
5721 </param>
5722 </method>
5723
5724 <method name="showConsoleWindow">
5725 <desc>
5726 Activates the console window and brings it to foreground on
5727 the desktop of the host PC. Many modern window managers on
5728 many platforms implement some sort of focus stealing
5729 prevention logic, so that it may be impossible to activate
5730 a window without the help of the currently active
5731 application. In this case, this method will return a non-zero
5732 identifier that represents the top-level window of the VM
5733 console process. The caller, if it represents a currently
5734 active process, is responsible to use this identifier (in a
5735 platform-dependent manner) to perform actual window
5736 activation.
5737 <note>
5738 This method will fail if a session for this machine is not
5739 currently open.
5740 </note>
5741
5742 <result name="VBOX_E_INVALID_VM_STATE">
5743 Machine session is not open.
5744 </result>
5745
5746 </desc>
5747 <param name="winId" type="unsigned long long" dir="return">
5748 <desc>
5749 Platform-dependent identifier of the top-level VM console
5750 window, or zero if this method has performed all actions
5751 necessary to implement the <i>show window</i> semantics for
5752 the given platform and/or VirtualBox front-end.
5753 </desc>
5754 </param>
5755 </method>
5756
5757 <method name="getGuestProperty" const="yes">
5758 <desc>
5759 Reads an entry from the machine's guest property store.
5760
5761 <result name="VBOX_E_INVALID_VM_STATE">
5762 Machine session is not open.
5763 </result>
5764
5765 </desc>
5766 <param name="name" type="wstring" dir="in">
5767 <desc>
5768 The name of the property to read.
5769 </desc>
5770 </param>
5771 <param name="value" type="wstring" dir="out">
5772 <desc>
5773 The value of the property. If the property does not exist then this
5774 will be empty.
5775 </desc>
5776 </param>
5777 <param name="timestamp" type="unsigned long long" dir="out">
5778 <desc>
5779 The time at which the property was last modified, as seen by the
5780 server process.
5781 </desc>
5782 </param>
5783 <param name="flags" type="wstring" dir="out">
5784 <desc>
5785 Additional property parameters, passed as a comma-separated list of
5786 "name=value" type entries.
5787 </desc>
5788 </param>
5789 </method>
5790
5791 <method name="getGuestPropertyValue" const="yes">
5792 <desc>
5793 Reads a value from the machine's guest property store.
5794
5795 <result name="VBOX_E_INVALID_VM_STATE">
5796 Machine session is not open.
5797 </result>
5798
5799 </desc>
5800 <param name="property" type="wstring" dir="in">
5801 <desc>
5802 The name of the property to read.
5803 </desc>
5804 </param>
5805 <param name="value" type="wstring" dir="return">
5806 <desc>
5807 The value of the property. If the property does not exist then this
5808 will be empty.
5809 </desc>
5810 </param>
5811 </method>
5812
5813 <method name="getGuestPropertyTimestamp" const="yes">
5814 <desc>
5815 Reads a property timestamp from the machine's guest property store.
5816
5817 <result name="VBOX_E_INVALID_VM_STATE">
5818 Machine session is not open.
5819 </result>
5820
5821 </desc>
5822 <param name="property" type="wstring" dir="in">
5823 <desc>
5824 The name of the property to read.
5825 </desc>
5826 </param>
5827 <param name="value" type="unsigned long long" dir="return">
5828 <desc>
5829 The timestamp. If the property does not exist then this will be
5830 empty.
5831 </desc>
5832 </param>
5833 </method>
5834
5835 <method name="setGuestProperty">
5836 <desc>
5837 Sets, changes or deletes an entry in the machine's guest property
5838 store.
5839
5840 <result name="E_ACCESSDENIED">
5841 Property cannot be changed.
5842 </result>
5843 <result name="E_INVALIDARG">
5844 Invalid @a flags.
5845 </result>
5846 <result name="VBOX_E_INVALID_VM_STATE">
5847 Virtual machine is not mutable or session not open.
5848 </result>
5849 <result name="VBOX_E_INVALID_OBJECT_STATE">
5850 Cannot set transient property when machine not running.
5851 </result>
5852
5853 </desc>
5854 <param name="property" type="wstring" dir="in">
5855 <desc>
5856 The name of the property to set, change or delete.
5857 </desc>
5858 </param>
5859 <param name="value" type="wstring" dir="in">
5860 <desc>
5861 The new value of the property to set, change or delete. If the
5862 property does not yet exist and value is non-empty, it will be
5863 created. If the value is @c null or empty, the property will be
5864 deleted if it exists.
5865 </desc>
5866 </param>
5867 <param name="flags" type="wstring" dir="in">
5868 <desc>
5869 Additional property parameters, passed as a comma-separated list of
5870 "name=value" type entries.
5871 </desc>
5872 </param>
5873 </method>
5874
5875 <method name="setGuestPropertyValue">
5876 <desc>
5877 Sets, changes or deletes a value in the machine's guest property
5878 store. The flags field will be left unchanged or created empty for a
5879 new property.
5880
5881 <result name="E_ACCESSDENIED">
5882 Property cannot be changed.
5883 </result>
5884 <result name="VBOX_E_INVALID_VM_STATE">
5885 Virtual machine is not mutable or session not open.
5886 </result>
5887 <result name="VBOX_E_INVALID_OBJECT_STATE">
5888 Cannot set transient property when machine not running.
5889 </result>
5890 </desc>
5891
5892 <param name="property" type="wstring" dir="in">
5893 <desc>
5894 The name of the property to set, change or delete.
5895 </desc>
5896 </param>
5897 <param name="value" type="wstring" dir="in">
5898 <desc>
5899 The new value of the property to set, change or delete. If the
5900 property does not yet exist and value is non-empty, it will be
5901 created. If the value is @c null or empty, the property will be
5902 deleted if it exists.
5903 </desc>
5904 </param>
5905 </method>
5906
5907 <method name="enumerateGuestProperties">
5908 <desc>
5909 Return a list of the guest properties matching a set of patterns along
5910 with their values, time stamps and flags.
5911 </desc>
5912 <param name="patterns" type="wstring" dir="in">
5913 <desc>
5914 The patterns to match the properties against, separated by '|'
5915 characters. If this is empty or @c null, all properties will match.
5916 </desc>
5917 </param>
5918 <param name="name" type="wstring" dir="out" safearray="yes">
5919 <desc>
5920 The names of the properties returned.
5921 </desc>
5922 </param>
5923 <param name="value" type="wstring" dir="out" safearray="yes">
5924 <desc>
5925 The values of the properties returned. The array entries match the
5926 corresponding entries in the @a name array.
5927 </desc>
5928 </param>
5929 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5930 <desc>
5931 The time stamps of the properties returned. The array entries match
5932 the corresponding entries in the @a name array.
5933 </desc>
5934 </param>
5935 <param name="flags" type="wstring" dir="out" safearray="yes">
5936 <desc>
5937 The flags of the properties returned. The array entries match the
5938 corresponding entries in the @a name array.
5939 </desc>
5940 </param>
5941 </method>
5942
5943 <method name="querySavedThumbnailSize">
5944 <desc>
5945 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5946 </desc>
5947 <param name="size" type="unsigned long" dir="out">
5948 <desc>
5949 Size of buffer required to store the bitmap.
5950 </desc>
5951 </param>
5952 <param name="width" type="unsigned long" dir="out">
5953 <desc>
5954 Bitmap width.
5955 </desc>
5956 </param>
5957 <param name="height" type="unsigned long" dir="out">
5958 <desc>
5959 Bitmap height.
5960 </desc>
5961 </param>
5962 </method>
5963
5964 <method name="readSavedThumbnailToArray">
5965 <desc>
5966 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5967 </desc>
5968 <param name="BGR" type="boolean" dir="in">
5969 <desc>
5970 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5971 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5972 </desc>
5973 </param>
5974 <param name="width" type="unsigned long" dir="out">
5975 <desc>
5976 Bitmap width.
5977 </desc>
5978 </param>
5979 <param name="height" type="unsigned long" dir="out">
5980 <desc>
5981 Bitmap height.
5982 </desc>
5983 </param>
5984 <param name="data" type="octet" dir="return" safearray="yes">
5985 <desc>
5986 Array with resulting bitmap data.
5987 </desc>
5988 </param>
5989 </method>
5990
5991 <method name="querySavedScreenshotPNGSize">
5992 <desc>
5993 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5994 </desc>
5995 <param name="size" type="unsigned long" dir="out">
5996 <desc>
5997 Size of buffer required to store the PNG binary data.
5998 </desc>
5999 </param>
6000 <param name="width" type="unsigned long" dir="out">
6001 <desc>
6002 Image width.
6003 </desc>
6004 </param>
6005 <param name="height" type="unsigned long" dir="out">
6006 <desc>
6007 Image height.
6008 </desc>
6009 </param>
6010 </method>
6011
6012 <method name="readSavedScreenshotPNGToArray">
6013 <desc>
6014 Screenshot in PNG format is retrieved to an array of bytes.
6015 </desc>
6016 <param name="width" type="unsigned long" dir="out">
6017 <desc>
6018 Image width.
6019 </desc>
6020 </param>
6021 <param name="height" type="unsigned long" dir="out">
6022 <desc>
6023 Image height.
6024 </desc>
6025 </param>
6026 <param name="data" type="octet" dir="return" safearray="yes">
6027 <desc>
6028 Array with resulting PNG data.
6029 </desc>
6030 </param>
6031 </method>
6032
6033 <method name="hotPlugCPU">
6034 <desc>
6035 Plugs a CPU into the machine.
6036 </desc>
6037 <param name="cpu" type="unsigned long" dir="in">
6038 <desc>
6039 The CPU id to insert.
6040 </desc>
6041 </param>
6042 </method>
6043
6044 <method name="hotUnplugCPU">
6045 <desc>
6046 Removes a CPU from the machine.
6047 </desc>
6048 <param name="cpu" type="unsigned long" dir="in">
6049 <desc>
6050 The CPU id to remove.
6051 </desc>
6052 </param>
6053 </method>
6054
6055 <method name="getCPUStatus">
6056 <desc>
6057 Returns the current status of the given CPU.
6058 </desc>
6059 <param name="cpu" type="unsigned long" dir="in">
6060 <desc>
6061 The CPU id to check for.
6062 </desc>
6063 </param>
6064 <param name="attached" type="boolean" dir="return">
6065 <desc>
6066 Status of the CPU.
6067 </desc>
6068 </param>
6069 </method>
6070
6071 <method name="queryLogFilename">
6072 <desc>
6073 Queries for the VM log file name of an given index. Returns an empty
6074 string if a log file with that index doesn't exists.
6075 </desc>
6076 <param name="idx" type="unsigned long" dir="in">
6077 <desc>
6078 Which log file name to query. 0=current log file.
6079 </desc>
6080 </param>
6081 <param name="filename" type="wstring" dir="return">
6082 <desc>
6083 On return the full path to the log file or an empty string on error.
6084 </desc>
6085 </param>
6086 </method>
6087
6088 <method name="readLog">
6089 <desc>
6090 Reads the VM log file. The chunk size is limited, so even if you
6091 ask for a big piece there might be less data returned.
6092 </desc>
6093 <param name="idx" type="unsigned long" dir="in">
6094 <desc>
6095 Which log file to read. 0=current log file.
6096 </desc>
6097 </param>
6098 <param name="offset" type="unsigned long long" dir="in">
6099 <desc>
6100 Offset in the log file.
6101 </desc>
6102 </param>
6103 <param name="size" type="unsigned long long" dir="in">
6104 <desc>
6105 Chunk size to read in the log file.
6106 </desc>
6107 </param>
6108 <param name="data" type="octet" dir="return" safearray="yes">
6109 <desc>
6110 Data read from the log file. A data size of 0 means end of file
6111 if the requested chunk size was not 0. This is the unprocessed
6112 file data, i.e. the line ending style depends on the platform of
6113 the system the server is running on.
6114 </desc>
6115 </param>
6116 </method>
6117 </interface>
6118
6119 <!--
6120 // IConsole
6121 /////////////////////////////////////////////////////////////////////////
6122 -->
6123
6124 <interface
6125 name="IConsoleCallback" extends="$unknown"
6126 uuid="60703f8d-81e4-4b45-a147-dcfd07692b19"
6127 wsmap="suppress"
6128 >
6129
6130 <desc>
6131 This interface is used by a client of the Main API that need to
6132 be notified of events. For example, a graphical user interface
6133 can use this to learn about machine state changes so they can
6134 update the list of virtual machines without having to rely
6135 on polling.
6136
6137 Whenever relevant events occur in VirtualBox, the callbacks in
6138 objects of this interface are called. In order for this to be
6139 useful, a client needs to create its own subclass that implements
6140 this interface in which the methods for the relevant callbacks
6141 are overridden. An instance of this subclass interface can then
6142 be passed to <link to="IConsole::registerCallback" />.
6143 </desc>
6144
6145 <method name="onMousePointerShapeChange">
6146 <desc>
6147 Notification when the guest mouse pointer shape has
6148 changed. The new shape data is given.
6149 <result name="VBOX_E_DONT_CALL_AGAIN">
6150 Do not call again, this method is a NOP.
6151 </result>
6152 </desc>
6153 <param name="visible" type="boolean" dir="in">
6154 <desc>
6155 Flag whether the pointer is visible.
6156 </desc>
6157 </param>
6158 <param name="alpha" type="boolean" dir="in">
6159 <desc>
6160 Flag whether the pointer has an alpha channel.
6161 </desc>
6162 </param>
6163 <param name="xHot" type="unsigned long" dir="in">
6164 <desc>
6165 The pointer hot spot x coordinate.
6166 </desc>
6167 </param>
6168 <param name="yHot" type="unsigned long" dir="in">
6169 <desc>
6170 The pointer hot spot y coordinate.
6171 </desc>
6172 </param>
6173 <param name="width" type="unsigned long" dir="in">
6174 <desc>
6175 Width of the pointer shape in pixels.
6176 </desc>
6177 </param>
6178 <param name="height" type="unsigned long" dir="in">
6179 <desc>
6180 Height of the pointer shape in pixels.
6181 </desc>
6182 </param>
6183 <param name="shape" type="octet" mod="ptr" dir="in">
6184 <desc>
6185 Address of the shape buffer.
6186
6187 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
6188 followed by a 32-bpp XOR (color) mask.
6189
6190 For pointers without alpha channel the XOR mask pixels are 32
6191 bit values: (lsb)BGR0(msb). For pointers with alpha channel
6192 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
6193
6194 An AND mask is used for pointers with alpha channel, so if the
6195 callback does not support alpha, the pointer could be
6196 displayed as a normal color pointer.
6197
6198 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
6199 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
6200 height</tt>. The padding bits at the end of each scanline are
6201 undefined.
6202
6203 The XOR mask follows the AND mask on the next 4-byte aligned
6204 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
6205 Bytes in the gap between the AND and the XOR mask are undefined.
6206 The XOR mask scanlines have no gap between them and the size of
6207 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
6208
6209 <note>
6210 If @a shape is 0, only the pointer visibility is changed.
6211 </note>
6212 </desc>
6213 </param>
6214 </method>
6215
6216 <method name="onMouseCapabilityChange">
6217 <desc>
6218 Notification when the mouse capabilities reported by the
6219 guest have changed. The new capabilities are passed.
6220 <result name="VBOX_E_DONT_CALL_AGAIN">
6221 Do not call again, this method is a NOP.
6222 </result>
6223 </desc>
6224 <param name="supportsAbsolute" type="boolean" dir="in"/>
6225 <param name="supportsRelative" type="boolean" dir="in"/>
6226 <param name="needsHostCursor" type="boolean" dir="in"/>
6227 </method>
6228
6229 <method name="onKeyboardLedsChange">
6230 <desc>
6231 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
6232 to alter the state of the keyboard LEDs.
6233 <result name="VBOX_E_DONT_CALL_AGAIN">
6234 Do not call again, this method is a NOP.
6235 </result>
6236 </desc>
6237 <param name="numLock" type="boolean" dir="in"/>
6238 <param name="capsLock" type="boolean" dir="in"/>
6239 <param name="scrollLock" type="boolean" dir="in"/>
6240 </method>
6241
6242 <method name="onStateChange">
6243 <desc>
6244 Notification when the execution state of the machine has changed.
6245 The new state will be given.
6246 <result name="VBOX_E_DONT_CALL_AGAIN">
6247 Do not call again, this method is a NOP.
6248 </result>
6249 </desc>
6250 <param name="state" type="MachineState" dir="in"/>
6251 </method>
6252
6253 <method name="onAdditionsStateChange">
6254 <desc>
6255 Notification when a Guest Additions property changes.
6256 Interested callees should query IGuest attributes to
6257 find out what has changed.
6258 </desc>
6259 </method>
6260
6261 <method name="onNetworkAdapterChange">
6262 <desc>
6263 Notification when a property of one of the
6264 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
6265 changes. Interested callees should use INetworkAdapter methods and
6266 attributes to find out what has changed.
6267 <result name="VBOX_E_DONT_CALL_AGAIN">
6268 Do not call again, this method is a NOP.
6269 </result>
6270 </desc>
6271 <param name="networkAdapter" type="INetworkAdapter" dir="in">
6272 <desc>Network adapter that is subject to change.</desc>
6273 </param>
6274 </method>
6275
6276 <method name="onSerialPortChange">
6277 <desc>
6278 Notification when a property of one of the
6279 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
6280 Interested callees should use ISerialPort methods and attributes
6281 to find out what has changed.
6282 <result name="VBOX_E_DONT_CALL_AGAIN">
6283 Do not call again, this method is a NOP.
6284 </result>
6285 </desc>
6286 <param name="serialPort" type="ISerialPort" dir="in">
6287 <desc>Serial port that is subject to change.</desc>
6288 </param>
6289 </method>
6290
6291 <method name="onParallelPortChange">
6292 <desc>
6293 Notification when a property of one of the
6294 virtual <link to="IMachine::getParallelPort">parallel ports</link>
6295 changes. Interested callees should use ISerialPort methods and
6296 attributes to find out what has changed.
6297 <result name="VBOX_E_DONT_CALL_AGAIN">
6298 Do not call again, this method is a NOP.
6299 </result>
6300 </desc>
6301 <param name="parallelPort" type="IParallelPort" dir="in">
6302 <desc>Parallel port that is subject to change.</desc>
6303 </param>
6304 </method>
6305
6306 <method name="onStorageControllerChange">
6307 <desc>
6308 Notification when a property of one of the
6309 virtual <link to="IMachine::storageControllers">storage controllers</link>
6310 changes. Interested callees should query the corresponding collections
6311 to find out what has changed.
6312 <result name="VBOX_E_DONT_CALL_AGAIN">
6313 Do not call again, this method is a NOP.
6314 </result>
6315 </desc>
6316 </method>
6317
6318 <method name="onMediumChange">
6319 <desc>
6320 Notification when a
6321 <link to="IMachine::mediumAttachments">medium attachment</link>
6322 changes.
6323 <result name="VBOX_E_DONT_CALL_AGAIN">
6324 Do not call again, this method is a NOP.
6325 </result>
6326 </desc>
6327 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
6328 <desc>Medium attachment that is subject to change.</desc>
6329 </param>
6330 </method>
6331
6332 <method name="onCPUChange">
6333 <desc>
6334 Notification when a CPU changes.
6335 <result name="VBOX_E_DONT_CALL_AGAIN">
6336 Do not call again, this method is a NOP.
6337 </result>
6338 </desc>
6339 <param name="cpu" type="unsigned long" dir="in">
6340 <desc>The CPU which changed</desc>
6341 </param>
6342 <param name="add" type="boolean" dir="in">
6343 <desc>Flag whether the CPU was added or removed</desc>
6344 </param>
6345 </method>
6346
6347 <method name="onVRDPServerChange">
6348 <desc>
6349 Notification when a property of the
6350 <link to="IMachine::VRDPServer">VRDP server</link> changes.
6351 Interested callees should use IVRDPServer methods and attributes to
6352 find out what has changed.
6353 <result name="VBOX_E_DONT_CALL_AGAIN">
6354 Do not call again, this method is a NOP.
6355 </result>
6356 </desc>
6357 </method>
6358
6359 <method name="onRemoteDisplayInfoChange">
6360 <desc>
6361 Notification when the status of the VRDP server changes. Interested callees
6362 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
6363 attributes to find out what is the current status.
6364 <result name="VBOX_E_DONT_CALL_AGAIN">
6365 Do not call again, this method is a NOP.
6366 </result>
6367 </desc>
6368 </method>
6369
6370 <method name="onUSBControllerChange">
6371 <desc>
6372 Notification when a property of the virtual
6373 <link to="IMachine::USBController">USB controller</link> changes.
6374 Interested callees should use IUSBController methods and attributes to
6375 find out what has changed.
6376 <result name="VBOX_E_DONT_CALL_AGAIN">
6377 Do not call again, this method is a NOP.
6378 </result>
6379 </desc>
6380 </method>
6381
6382 <method name="onUSBDeviceStateChange">
6383 <desc>
6384 Notification when a USB device is attached to or detached from
6385 the virtual USB controller.
6386
6387 This notification is sent as a result of the indirect
6388 request to attach the device because it matches one of the
6389 machine USB filters, or as a result of the direct request
6390 issued by <link to="IConsole::attachUSBDevice"/> or
6391 <link to="IConsole::detachUSBDevice"/>.
6392
6393 This notification is sent in case of both a succeeded and a
6394 failed request completion. When the request succeeds, the
6395 @a error parameter is @c null, and the given device has been
6396 already added to (when @a attached is @c true) or removed from
6397 (when @a attached is @c false) the collection represented by
6398 <link to="IConsole::USBDevices"/>. On failure, the collection
6399 doesn't change and the @a error parameter represents the error
6400 message describing the failure.
6401
6402 <result name="VBOX_E_DONT_CALL_AGAIN">
6403 Do not call again, this method is a NOP.
6404 </result>
6405 </desc>
6406 <param name="device" type="IUSBDevice" dir="in">
6407 <desc>Device that is subject to state change.</desc>
6408 </param>
6409 <param name="attached" type="boolean" dir="in">
6410 <desc>
6411 @c true if the device was attached and @c false otherwise.
6412 </desc>
6413 </param>
6414 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
6415 <desc>
6416 @c null on success or an error message object on failure.
6417 </desc>
6418 </param>
6419 </method>
6420
6421 <method name="onSharedFolderChange">
6422 <desc>
6423 Notification when a shared folder is added or removed.
6424 The @a scope argument defines one of three scopes:
6425 <link to="IVirtualBox::sharedFolders">global shared folders</link>
6426 (<link to="Scope_Global">Global</link>),
6427 <link to="IMachine::sharedFolders">permanent shared folders</link> of
6428 the machine (<link to="Scope_Machine">Machine</link>) or <link
6429 to="IConsole::sharedFolders">transient shared folders</link> of the
6430 machine (<link to="Scope_Session">Session</link>). Interested callees
6431 should use query the corresponding collections to find out what has
6432 changed.
6433 <result name="VBOX_E_DONT_CALL_AGAIN">
6434 Do not call again, this method is a NOP.
6435 </result>
6436 </desc>
6437 <param name="scope" type="Scope" dir="in">
6438 <desc>Scope of the notification.</desc>
6439 </param>
6440 </method>
6441
6442 <method name="onRuntimeError">
6443 <desc>
6444 Notification when an error happens during the virtual
6445 machine execution.
6446
6447 There are three kinds of runtime errors:
6448 <ul>
6449 <li><i>fatal</i></li>
6450 <li><i>non-fatal with retry</i></li>
6451 <li><i>non-fatal warnings</i></li>
6452 </ul>
6453
6454 <b>Fatal</b> errors are indicated by the @a fatal parameter set
6455 to @c true. In case of fatal errors, the virtual machine
6456 execution is always paused before calling this notification, and
6457 the notification handler is supposed either to immediately save
6458 the virtual machine state using <link to="IConsole::saveState"/>
6459 or power it off using <link to="IConsole::powerDown"/>.
6460 Resuming the execution can lead to unpredictable results.
6461
6462 <b>Non-fatal</b> errors and warnings are indicated by the
6463 @a fatal parameter set to @c false. If the virtual machine
6464 is in the Paused state by the time the error notification is
6465 received, it means that the user can <i>try to resume</i> the machine
6466 execution after attempting to solve the problem that caused the
6467 error. In this case, the notification handler is supposed
6468 to show an appropriate message to the user (depending on the
6469 value of the @a id parameter) that offers several actions such
6470 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
6471 wants to retry, the notification handler should continue
6472 the machine execution using the <link to="IConsole::resume"/>
6473 call. If the machine execution is not Paused during this
6474 notification, then it means this notification is a <i>warning</i>
6475 (for example, about a fatal condition that can happen very soon);
6476 no immediate action is required from the user, the machine
6477 continues its normal execution.
6478
6479 Note that in either case the notification handler
6480 <b>must not</b> perform any action directly on a thread
6481 where this notification is called. Everything it is allowed to
6482 do is to post a message to another thread that will then talk
6483 to the user and take the corresponding action.
6484
6485 Currently, the following error identifiers are known:
6486 <ul>
6487 <li><tt>"HostMemoryLow"</tt></li>
6488 <li><tt>"HostAudioNotResponding"</tt></li>
6489 <li><tt>"VDIStorageFull"</tt></li>
6490 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
6491 </ul>
6492
6493 <note>
6494 This notification is not designed to be implemented by
6495 more than one callback at a time. If you have multiple
6496 IConsoleCallback instances registered on the given
6497 IConsole object, make sure you simply do nothing but
6498 return @c S_OK from all but one of them that does actual
6499 user notification and performs necessary actions.
6500 </note>
6501
6502 <result name="VBOX_E_DONT_CALL_AGAIN">
6503 Do not call again, this method is a NOP.
6504 </result>
6505 </desc>
6506 <param name="fatal" type="boolean" dir="in">
6507 <desc>Whether the error is fatal or not</desc>
6508 </param>
6509 <param name="id" type="wstring" dir="in">
6510 <desc>Error identifier</desc>
6511 </param>
6512 <param name="message" type="wstring" dir="in">
6513 <desc>Optional error message</desc>
6514 </param>
6515 </method>
6516
6517 <method name="onCanShowWindow">
6518 <desc>
6519 Notification when a call to
6520 <link to="IMachine::canShowConsoleWindow"/> is made by a
6521 front-end to check if a subsequent call to
6522 <link to="IMachine::showConsoleWindow"/> can succeed.
6523
6524 The callee should give an answer appropriate to the current
6525 machine state in the @a canShow argument. This answer must
6526 remain valid at least until the next
6527 <link to="IConsole::state">machine state</link> change.
6528
6529 <note>
6530 This notification is not designed to be implemented by
6531 more than one callback at a time. If you have multiple
6532 IConsoleCallback instances registered on the given
6533 IConsole object, make sure you simply do nothing but
6534 return @c true and @c S_OK from all but one of them that
6535 actually manages console window activation.
6536 </note>
6537
6538 <result name="VBOX_E_DONT_CALL_AGAIN">
6539 Do not call again, this method is a NOP.
6540 </result>
6541 </desc>
6542 <param name="canShow" type="boolean" dir="return">
6543 <desc>
6544 @c true if the console window can be shown and @c false otherwise.
6545 </desc>
6546 </param>
6547 </method>
6548
6549 <method name="onShowWindow">
6550 <desc>
6551 Notification when a call to
6552 <link to="IMachine::showConsoleWindow"/>
6553 requests the console window to be activated and brought to
6554 foreground on the desktop of the host PC.
6555
6556 This notification should cause the VM console process to
6557 perform the requested action as described above. If it is
6558 impossible to do it at a time of this notification, this
6559 method should return a failure.
6560
6561 Note that many modern window managers on many platforms
6562 implement some sort of focus stealing prevention logic, so
6563 that it may be impossible to activate a window without the
6564 help of the currently active application (which is supposedly
6565 an initiator of this notification). In this case, this method
6566 must return a non-zero identifier that represents the
6567 top-level window of the VM console process. The caller, if it
6568 represents a currently active process, is responsible to use
6569 this identifier (in a platform-dependent manner) to perform
6570 actual window activation.
6571
6572 This method must set @a winId to zero if it has performed all
6573 actions necessary to complete the request and the console
6574 window is now active and in foreground, to indicate that no
6575 further action is required on the caller's side.
6576
6577 <note>
6578 This notification is not designed to be implemented by
6579 more than one callback at a time. If you have multiple
6580 IConsoleCallback instances registered on the given
6581 IConsole object, make sure you simply do nothing but
6582 return @c S_OK from all but one of them that actually
6583 manages console window activation.
6584 </note>
6585
6586 <result name="VBOX_E_DONT_CALL_AGAIN">
6587 Do not call again, this method is a NOP.
6588 </result>
6589 </desc>
6590 <param name="winId" type="unsigned long long" dir="return">
6591 <desc>
6592 Platform-dependent identifier of the top-level VM console
6593 window, or zero if this method has performed all actions
6594 necessary to implement the <i>show window</i> semantics for
6595 the given platform and/or this VirtualBox front-end.
6596 </desc>
6597 </param>
6598 </method>
6599
6600 </interface>
6601
6602 <interface
6603 name="IRemoteDisplayInfo" extends="$unknown"
6604 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
6605 wsmap="struct"
6606 >
6607 <desc>
6608 Contains information about the remote display (VRDP) capabilities and status.
6609 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
6610 </desc>
6611
6612 <attribute name="active" type="boolean" readonly="yes">
6613 <desc>
6614 Whether the remote display connection is active.
6615 </desc>
6616 </attribute>
6617
6618 <attribute name="port" type="long" readonly="yes">
6619 <desc>
6620 VRDP server port number. If this property is equal to <tt>0</tt>, then
6621 the VRDP server failed to start, usually because there are no free TCP
6622 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6623 server has not yet been started.
6624 </desc>
6625 </attribute>
6626
6627 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6628 <desc>
6629 How many times a client connected.
6630 </desc>
6631 </attribute>
6632
6633 <attribute name="beginTime" type="long long" readonly="yes">
6634 <desc>
6635 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6636 </desc>
6637 </attribute>
6638
6639 <attribute name="endTime" type="long long" readonly="yes">
6640 <desc>
6641 When the last connection was terminated or the current time, if
6642 connection is still active, in milliseconds since 1970-01-01 UTC.
6643 </desc>
6644 </attribute>
6645
6646 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6647 <desc>
6648 How many bytes were sent in last or current, if still active, connection.
6649 </desc>
6650 </attribute>
6651
6652 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6653 <desc>
6654 How many bytes were sent in all connections.
6655 </desc>
6656 </attribute>
6657
6658 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6659 <desc>
6660 How many bytes were received in last or current, if still active, connection.
6661 </desc>
6662 </attribute>
6663
6664 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6665 <desc>
6666 How many bytes were received in all connections.
6667 </desc>
6668 </attribute>
6669
6670 <attribute name="user" type="wstring" readonly="yes">
6671 <desc>
6672 Login user name supplied by the client.
6673 </desc>
6674 </attribute>
6675
6676 <attribute name="domain" type="wstring" readonly="yes">
6677 <desc>
6678 Login domain name supplied by the client.
6679 </desc>
6680 </attribute>
6681
6682 <attribute name="clientName" type="wstring" readonly="yes">
6683 <desc>
6684 The client name supplied by the client.
6685 </desc>
6686 </attribute>
6687
6688 <attribute name="clientIP" type="wstring" readonly="yes">
6689 <desc>
6690 The IP address of the client.
6691 </desc>
6692 </attribute>
6693
6694 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6695 <desc>
6696 The client software version number.
6697 </desc>
6698 </attribute>
6699
6700 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6701 <desc>
6702 Public key exchange method used when connection was established.
6703 Values: 0 - RDP4 public key exchange scheme.
6704 1 - X509 certificates were sent to client.
6705 </desc>
6706 </attribute>
6707
6708 </interface>
6709
6710 <interface
6711 name="IConsole" extends="$unknown"
6712 uuid="6375231a-c17c-464b-92cb-ae9e128d71c3"
6713 wsmap="managed"
6714 >
6715 <desc>
6716 The IConsole interface represents an interface to control virtual
6717 machine execution.
6718
6719 The console object that implements the IConsole interface is obtained
6720 from a session object after the session for the given machine has been
6721 opened using one of <link to="IVirtualBox::openSession"/>,
6722 <link to="IVirtualBox::openRemoteSession"/> or
6723 <link to="IVirtualBox::openExistingSession"/> methods.
6724
6725 Methods of the IConsole interface allow the caller to query the current
6726 virtual machine execution state, pause the machine or power it down, save
6727 the machine state or take a snapshot, attach and detach removable media
6728 and so on.
6729
6730 <see>ISession</see>
6731 </desc>
6732
6733 <attribute name="machine" type="IMachine" readonly="yes">
6734 <desc>
6735 Machine object this console is sessioned with.
6736 <note>
6737 This is a convenience property, it has the same value as
6738 <link to="ISession::machine"/> of the corresponding session
6739 object.
6740 </note>
6741 </desc>
6742 </attribute>
6743
6744 <attribute name="state" type="MachineState" readonly="yes">
6745 <desc>
6746 Current execution state of the machine.
6747 <note>
6748 This property always returns the same value as the corresponding
6749 property of the IMachine object this console is sessioned with.
6750 For the process that owns (executes) the VM, this is the
6751 preferable way of querying the VM state, because no IPC
6752 calls are made.
6753 </note>
6754 </desc>
6755 </attribute>
6756
6757 <attribute name="guest" type="IGuest" readonly="yes">
6758 <desc>Guest object.</desc>
6759 </attribute>
6760
6761 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6762 <desc>
6763 Virtual keyboard object.
6764 <note>
6765 If the machine is not running, any attempt to use
6766 the returned object will result in an error.
6767 </note>
6768 </desc>
6769 </attribute>
6770
6771 <attribute name="mouse" type="IMouse" readonly="yes">
6772 <desc>
6773 Virtual mouse object.
6774 <note>
6775 If the machine is not running, any attempt to use
6776 the returned object will result in an error.
6777 </note>
6778 </desc>
6779 </attribute>
6780
6781 <attribute name="display" type="IDisplay" readonly="yes">
6782 <desc>Virtual display object.
6783 <note>
6784 If the machine is not running, any attempt to use
6785 the returned object will result in an error.
6786 </note>
6787 </desc>
6788 </attribute>
6789
6790 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6791 <desc>Debugging interface.</desc>
6792 </attribute>
6793
6794 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6795 <desc>
6796 Collection of USB devices currently attached to the virtual
6797 USB controller.
6798 <note>
6799 The collection is empty if the machine is not running.
6800 </note>
6801 </desc>
6802 </attribute>
6803
6804 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6805 <desc>
6806 List of USB devices currently attached to the remote VRDP client.
6807 Once a new device is physically attached to the remote host computer,
6808 it appears in this list and remains there until detached.
6809 </desc>
6810 </attribute>
6811
6812 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6813 <desc>
6814 Collection of shared folders for the current session. These folders
6815 are called transient shared folders because they are available to the
6816 guest OS running inside the associated virtual machine only for the
6817 duration of the session (as opposed to
6818 <link to="IMachine::sharedFolders"/> which represent permanent shared
6819 folders). When the session is closed (e.g. the machine is powered down),
6820 these folders are automatically discarded.
6821
6822 New shared folders are added to the collection using
6823 <link to="#createSharedFolder"/>. Existing shared folders can be
6824 removed using <link to="#removeSharedFolder"/>.
6825 </desc>
6826 </attribute>
6827
6828 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6829 <desc>
6830 Interface that provides information on Remote Display (VRDP) connection.
6831 </desc>
6832 </attribute>
6833
6834 <method name="powerUp">
6835 <desc>
6836 Starts the virtual machine execution using the current machine
6837 state (that is, its current execution state, current settings and
6838 current storage devices).
6839
6840 If the machine is powered off or aborted, the execution will
6841 start from the beginning (as if the real hardware were just
6842 powered on).
6843
6844 If the machine is in the <link to="MachineState_Saved"/> state,
6845 it will continue its execution the point where the state has
6846 been saved.
6847
6848 <note>
6849 Unless you are trying to write a new VirtualBox front-end that
6850 performs direct machine execution (like the VirtualBox or VBoxSDL
6851 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6852 session opened by <link to="IVirtualBox::openSession"/> and use this
6853 session only to change virtual machine settings. If you simply want to
6854 start virtual machine execution using one of the existing front-ends
6855 (for example the VirtualBox GUI or headless server), simply use
6856 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6857 power up the machine automatically for you.
6858 </note>
6859
6860 <see>#saveState</see>
6861 <result name="VBOX_E_INVALID_VM_STATE">
6862 Virtual machine already running.
6863 </result>
6864 <result name="VBOX_E_HOST_ERROR">
6865 Host interface does not exist or name not set.
6866 </result>
6867 <result name="VBOX_E_FILE_ERROR">
6868 Invalid saved state file.
6869 </result>
6870 </desc>
6871 <param name="progress" type="IProgress" dir="return">
6872 <desc>Progress object to track the operation completion.</desc>
6873 </param>
6874 </method>
6875
6876 <method name="powerUpPaused">
6877 <desc>
6878 Identical to powerUp except that the VM will enter the
6879 <link to="MachineState_Paused"/> state, instead of
6880 <link to="MachineState_Running"/>.
6881
6882 <see>#powerUp</see>
6883 <result name="VBOX_E_INVALID_VM_STATE">
6884 Virtual machine already running.
6885 </result>
6886 <result name="VBOX_E_HOST_ERROR">
6887 Host interface does not exist or name not set.
6888 </result>
6889 <result name="VBOX_E_FILE_ERROR">
6890 Invalid saved state file.
6891 </result>
6892 </desc>
6893 <param name="progress" type="IProgress" dir="return">
6894 <desc>Progress object to track the operation completion.</desc>
6895 </param>
6896 </method>
6897
6898 <method name="powerDown">
6899 <desc>
6900 Initiates the power down procedure to stop the virtual machine
6901 execution.
6902
6903 The completion of the power down procedure is tracked using the returned
6904 IProgress object. After the operation is complete, the machine will go
6905 to the PoweredOff state.
6906 <result name="VBOX_E_INVALID_VM_STATE">
6907 Virtual machine must be Running, Paused or Stuck to be powered down.
6908 </result>
6909 </desc>
6910 <param name="progress" type="IProgress" dir="return">
6911 <desc>Progress object to track the operation completion.</desc>
6912 </param>
6913 </method>
6914
6915 <method name="reset">
6916 <desc>Resets the virtual machine.
6917 <result name="VBOX_E_INVALID_VM_STATE">
6918 Virtual machine not in Running state.
6919 </result>
6920 <result name="VBOX_E_VM_ERROR">
6921 Virtual machine error in reset operation.
6922 </result>
6923 </desc>
6924 </method>
6925
6926 <method name="pause">
6927 <desc>Pauses the virtual machine execution.
6928 <result name="VBOX_E_INVALID_VM_STATE">
6929 Virtual machine not in Running state.
6930 </result>
6931 <result name="VBOX_E_VM_ERROR">
6932 Virtual machine error in suspend operation.
6933 </result>
6934 </desc>
6935 </method>
6936
6937 <method name="resume">
6938 <desc>Resumes the virtual machine execution.
6939 <result name="VBOX_E_INVALID_VM_STATE">
6940 Virtual machine not in Paused state.
6941 </result>
6942 <result name="VBOX_E_VM_ERROR">
6943 Virtual machine error in resume operation.
6944 </result>
6945 </desc>
6946 </method>
6947
6948 <method name="powerButton">
6949 <desc>Sends the ACPI power button event to the guest.
6950 <result name="VBOX_E_INVALID_VM_STATE">
6951 Virtual machine not in Running state.
6952 </result>
6953 <result name="VBOX_E_PDM_ERROR">
6954 Controlled power off failed.
6955 </result>
6956 </desc>
6957 </method>
6958
6959 <method name="sleepButton">
6960 <desc>Sends the ACPI sleep button event to the guest.
6961 <result name="VBOX_E_INVALID_VM_STATE">
6962 Virtual machine not in Running state.
6963 </result>
6964 <result name="VBOX_E_PDM_ERROR">
6965 Sending sleep button event failed.
6966 </result>
6967 </desc>
6968 </method>
6969
6970 <method name="getPowerButtonHandled">
6971 <desc>Checks if the last power button event was handled by guest.
6972 <result name="VBOX_E_PDM_ERROR">
6973 Checking if the event was handled by the guest OS failed.
6974 </result>
6975 </desc>
6976 <param name="handled" type="boolean" dir="return"/>
6977 </method>
6978
6979 <method name="getGuestEnteredACPIMode">
6980 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6981 G1 (sleeping). If this method returns @c false, the guest will
6982 most likely not respond to external ACPI events.
6983 <result name="VBOX_E_INVALID_VM_STATE">
6984 Virtual machine not in Running state.
6985 </result>
6986 </desc>
6987 <param name="entered" type="boolean" dir="return"/>
6988 </method>
6989
6990 <method name="saveState">
6991 <desc>
6992 Saves the current execution state of a running virtual machine
6993 and stops its execution.
6994
6995 After this operation completes, the machine will go to the
6996 Saved state. Next time it is powered up, this state will
6997 be restored and the machine will continue its execution from
6998 the place where it was saved.
6999
7000 This operation differs from taking a snapshot to the effect
7001 that it doesn't create new differencing media. Also, once
7002 the machine is powered up from the state saved using this method,
7003 the saved state is deleted, so it will be impossible to return
7004 to this state later.
7005
7006 <note>
7007 On success, this method implicitly calls
7008 <link to="IMachine::saveSettings"/> to save all current machine
7009 settings (including runtime changes to the DVD medium, etc.).
7010 Together with the impossibility to change any VM settings when it is
7011 in the Saved state, this guarantees adequate hardware
7012 configuration of the machine when it is restored from the saved
7013 state file.
7014 </note>
7015
7016 <note>
7017 The machine must be in the Running or Paused state, otherwise
7018 the operation will fail.
7019 </note>
7020 <result name="VBOX_E_INVALID_VM_STATE">
7021 Virtual machine state neither Running nor Paused.
7022 </result>
7023 <result name="VBOX_E_FILE_ERROR">
7024 Failed to create directory for saved state file.
7025 </result>
7026
7027 <see><link to="#takeSnapshot"/></see>
7028 </desc>
7029 <param name="progress" type="IProgress" dir="return">
7030 <desc>Progress object to track the operation completion.</desc>
7031 </param>
7032 </method>
7033
7034 <method name="adoptSavedState">
7035 <desc>
7036 Associates the given saved state file to the virtual machine.
7037
7038 On success, the machine will go to the Saved state. Next time it is
7039 powered up, it will be restored from the adopted saved state and
7040 continue execution from the place where the saved state file was
7041 created.
7042
7043 The specified saved state file path may be absolute or relative to the
7044 folder the VM normally saves the state to (usually,
7045 <link to="IMachine::snapshotFolder"/>).
7046
7047 <note>
7048 It's a caller's responsibility to make sure the given saved state
7049 file is compatible with the settings of this virtual machine that
7050 represent its virtual hardware (memory size, storage disk configuration
7051 etc.). If there is a mismatch, the behavior of the virtual machine
7052 is undefined.
7053 </note>
7054 <result name="VBOX_E_INVALID_VM_STATE">
7055 Virtual machine state neither PoweredOff nor Aborted.
7056 </result>
7057 </desc>
7058 <param name="savedStateFile" type="wstring" dir="in">
7059 <desc>Path to the saved state file to adopt.</desc>
7060 </param>
7061 </method>
7062
7063 <method name="forgetSavedState">
7064 <desc>
7065 Forgets the saved state of the virtual machine previously created
7066 by <link to="#saveState"/>. Next time the machine is powered up, a
7067 clean boot will occur. If @a remove is @c true the saved state file
7068 is deleted.
7069 <note>
7070 This operation is equivalent to resetting or powering off
7071 the machine without doing a proper shutdown in the guest OS.
7072 </note>
7073 <result name="VBOX_E_INVALID_VM_STATE">
7074 Virtual machine not in state Saved.
7075 </result>
7076 </desc>
7077 <param name="remove" type="boolean" dir="in">
7078 <desc>If @c true remove the saved state file.</desc>
7079 </param>
7080 </method>
7081
7082 <method name="getDeviceActivity">
7083 <desc>
7084 Gets the current activity type of a given device or device group.
7085 <result name="E_INVALIDARG">
7086 Invalid device type.
7087 </result>
7088 </desc>
7089 <param name="type" type="DeviceType" dir="in"/>
7090 <param name="activity" type="DeviceActivity" dir="return"/>
7091 </method>
7092
7093 <method name="attachUSBDevice">
7094 <desc>
7095 Attaches a host USB device with the given UUID to the
7096 USB controller of the virtual machine.
7097
7098 The device needs to be in one of the following states:
7099 <link to="USBDeviceState_Busy"/>,
7100 <link to="USBDeviceState_Available"/> or
7101 <link to="USBDeviceState_Held"/>,
7102 otherwise an error is immediately returned.
7103
7104 When the device state is
7105 <link to="USBDeviceState_Busy">Busy</link>, an error may also
7106 be returned if the host computer refuses to release it for some reason.
7107
7108 <see>IUSBController::deviceFilters, USBDeviceState</see>
7109 <result name="VBOX_E_INVALID_VM_STATE">
7110 Virtual machine state neither Running nor Paused.
7111 </result>
7112 <result name="VBOX_E_PDM_ERROR">
7113 Virtual machine does not have a USB controller.
7114 </result>
7115 </desc>
7116 <param name="id" type="uuid" mod="string" dir="in">
7117 <desc>UUID of the host USB device to attach.</desc>
7118 </param>
7119 </method>
7120
7121 <method name="detachUSBDevice">
7122 <desc>
7123 Detaches an USB device with the given UUID from the USB controller
7124 of the virtual machine.
7125
7126 After this method succeeds, the VirtualBox server re-initiates
7127 all USB filters as if the device were just physically attached
7128 to the host, but filters of this machine are ignored to avoid
7129 a possible automatic re-attachment.
7130
7131 <see>IUSBController::deviceFilters, USBDeviceState</see>
7132
7133 <result name="VBOX_E_PDM_ERROR">
7134 Virtual machine does not have a USB controller.
7135 </result>
7136 <result name="E_INVALIDARG">
7137 USB device not attached to this virtual machine.
7138 </result>
7139 </desc>
7140 <param name="id" type="uuid" mod="string" dir="in">
7141 <desc>UUID of the USB device to detach.</desc>
7142 </param>
7143 <param name="device" type="IUSBDevice" dir="return">
7144 <desc>Detached USB device.</desc>
7145 </param>
7146 </method>
7147
7148 <method name="findUSBDeviceByAddress">
7149 <desc>
7150 Searches for a USB device with the given host address.
7151
7152 <result name="VBOX_E_OBJECT_NOT_FOUND">
7153 Given @c name does not correspond to any USB device.
7154 </result>
7155
7156 <see>IUSBDevice::address</see>
7157 </desc>
7158 <param name="name" type="wstring" dir="in">
7159 <desc>
7160 Address of the USB device (as assigned by the host) to
7161 search for.
7162 </desc>
7163 </param>
7164 <param name="device" type="IUSBDevice" dir="return">
7165 <desc>Found USB device object.</desc>
7166 </param>
7167 </method>
7168
7169 <method name="findUSBDeviceById">
7170 <desc>
7171 Searches for a USB device with the given UUID.
7172
7173 <result name="VBOX_E_OBJECT_NOT_FOUND">
7174 Given @c id does not correspond to any USB device.
7175 </result>
7176
7177 <see>IUSBDevice::id</see>
7178 </desc>
7179 <param name="id" type="uuid" mod="string" dir="in">
7180 <desc>UUID of the USB device to search for.</desc>
7181 </param>
7182 <param name="device" type="IUSBDevice" dir="return">
7183 <desc>Found USB device object.</desc>
7184 </param>
7185 </method>
7186
7187 <method name="createSharedFolder">
7188 <desc>
7189 Creates a transient new shared folder by associating the given logical
7190 name with the given host path, adds it to the collection of shared
7191 folders and starts sharing it. Refer to the description of
7192 <link to="ISharedFolder"/> to read more about logical names.
7193
7194 <result name="VBOX_E_INVALID_VM_STATE">
7195 Virtual machine in Saved state or currently changing state.
7196 </result>
7197 <result name="VBOX_E_FILE_ERROR">
7198 Shared folder already exists or not accessible.
7199 </result>
7200 </desc>
7201 <param name="name" type="wstring" dir="in">
7202 <desc>Unique logical name of the shared folder.</desc>
7203 </param>
7204 <param name="hostPath" type="wstring" dir="in">
7205 <desc>Full path to the shared folder in the host file system.</desc>
7206 </param>
7207 <param name="writable" type="boolean" dir="in">
7208 <desc>Whether the share is writable or readonly</desc>
7209 </param>
7210 </method>
7211
7212 <method name="removeSharedFolder">
7213 <desc>
7214 Removes a transient shared folder with the given name previously
7215 created by <link to="#createSharedFolder"/> from the collection of
7216 shared folders and stops sharing it.
7217 <result name="VBOX_E_INVALID_VM_STATE">
7218 Virtual machine in Saved state or currently changing state.
7219 </result>
7220 <result name="VBOX_E_FILE_ERROR">
7221 Shared folder does not exists.
7222 </result>
7223 </desc>
7224 <param name="name" type="wstring" dir="in">
7225 <desc>Logical name of the shared folder to remove.</desc>
7226 </param>
7227 </method>
7228
7229 <method name="takeSnapshot">
7230 <desc>
7231 Saves the current execution state
7232 and all settings of the machine and creates differencing images
7233 for all normal (non-independent) media.
7234 See <link to="ISnapshot" /> for an introduction to snapshots.
7235
7236 This method can be called for a PoweredOff, Saved (see
7237 <link to="#saveState"/>), Running or
7238 Paused virtual machine. When the machine is PoweredOff, an
7239 offline snapshot is created. When the machine is Running a live
7240 snapshot is created, and an online snapshot is is created when Paused.
7241
7242 The taken snapshot is always based on the
7243 <link to="IMachine::currentSnapshot">current snapshot</link>
7244 of the associated virtual machine and becomes a new current snapshot.
7245
7246 <note>
7247 This method implicitly calls <link to="IMachine::saveSettings"/> to
7248 save all current machine settings before taking an offline snapshot.
7249 </note>
7250
7251 <result name="VBOX_E_INVALID_VM_STATE">
7252 Virtual machine currently changing state.
7253 </result>
7254 </desc>
7255 <param name="name" type="wstring" dir="in">
7256 <desc>Short name for the snapshot.</desc>
7257 </param>
7258 <param name="description" type="wstring" dir="in">
7259 <desc>Optional description of the snapshot.</desc>
7260 </param>
7261 <param name="progress" type="IProgress" dir="return">
7262 <desc>Progress object to track the operation completion.</desc>
7263 </param>
7264 </method>
7265
7266 <method name="deleteSnapshot">
7267 <desc>
7268 Starts deleting the specified snapshot asynchronously.
7269 See <link to="ISnapshot" /> for an introduction to snapshots.
7270
7271 The execution state and settings of the associated machine stored in
7272 the snapshot will be deleted. The contents of all differencing media of
7273 this snapshot will be merged with the contents of their dependent child
7274 media to keep the medium chain valid (in other words, all changes
7275 represented by media being deleted will be propagated to their child
7276 medium). After that, this snapshot's differencing medium will be
7277 deleted. The parent of this snapshot will become a new parent for all
7278 its child snapshots.
7279
7280 If the deleted snapshot is the current one, its parent snapshot will
7281 become a new current snapshot. The current machine state is not directly
7282 affected in this case, except that currently attached differencing
7283 media based on media of the deleted snapshot will be also merged as
7284 described above.
7285
7286 If the deleted snapshot is the first or current snapshot, then the
7287 respective IMachine attributes will be adjusted. Deleting the current
7288 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
7289 to make all current machine settings permanent.
7290
7291 Deleting a snapshot has the following preconditions:
7292
7293 <ul>
7294 <li>Child media of all normal media of the deleted snapshot
7295 must be accessible (see <link to="IMedium::state"/>) for this
7296 operation to succeed. In particular, this means that all virtual
7297 machines, whose media are directly or indirectly based on the
7298 media of deleted snapshot, must be powered off.</li>
7299
7300 <li>You cannot delete the snapshot if a medium attached to it has
7301 more than once child medium (differencing images) because otherwise
7302 merging would be impossible. This might be the case if there is
7303 more than one child snapshot or differencing images were created
7304 for other reason (e.g. implicitly because of multiple machine
7305 attachments).</li>
7306 </ul>
7307
7308
7309 The virtual machine's <link to="IMachine::state">state</link> is changed to "DeletingSnapshot"
7310 while this operation is in progress.
7311
7312 <note>
7313 Merging medium contents can be very time and disk space
7314 consuming, if these media are big in size and have many
7315 children. However, if the snapshot being deleted is the last
7316 (head) snapshot on the branch, the operation will be rather
7317 quick.
7318 </note>
7319 <result name="VBOX_E_INVALID_VM_STATE">
7320 Virtual machine is running.
7321 </result>
7322 </desc>
7323 <param name="id" type="uuid" mod="string" dir="in">
7324 <desc>UUID of the snapshot to delete.</desc>
7325 </param>
7326 <param name="progress" type="IProgress" dir="return">
7327 <desc>Progress object to track the operation completion.</desc>
7328 </param>
7329 </method>
7330
7331 <method name="restoreSnapshot">
7332 <desc>
7333 Starts resetting the machine's current state to the state contained
7334 in the given snapshot, asynchronously. All current settings of the
7335 machine will be reset and changes stored in differencing media
7336 will be lost.
7337 See <link to="ISnapshot" /> for an introduction to snapshots.
7338
7339 After this operation is successfully completed, new empty differencing
7340 media are created for all normal media of the machine.
7341
7342 If the given snapshot is an online snapshot, the machine will go to
7343 the <link to="MachineState_Saved"> saved state</link>, so that the
7344 next time it is powered on, the execution state will be restored
7345 from the state of the snapshot.
7346
7347 <note>
7348 The machine must not be running, otherwise the operation will fail.
7349 </note>
7350
7351 <note>
7352 If the machine state is <link to="MachineState_Saved">Saved</link>
7353 prior to this operation, the saved state file will be implicitly
7354 deleted (as if <link to="IConsole::forgetSavedState"/> were
7355 called).
7356 </note>
7357
7358 <result name="VBOX_E_INVALID_VM_STATE">
7359 Virtual machine is running.
7360 </result>
7361 </desc>
7362 <param name="snapshot" type="ISnapshot" dir="in">
7363 <desc>The snapshot to restore the VM state from.</desc>
7364 </param>
7365 <param name="progress" type="IProgress" dir="return">
7366 <desc>Progress object to track the operation completion.</desc>
7367 </param>
7368 </method>
7369
7370 <method name="teleport">
7371 <desc>
7372 Teleport the VM to a different host machine or process.
7373
7374 TODO explain the details.
7375
7376 <result name="VBOX_E_INVALID_VM_STATE">
7377 Virtual machine not running or paused.
7378 </result>
7379 </desc>
7380 <param name="hostname" type="wstring" dir="in">
7381 <desc>The name or IP of the host to teleport to.</desc>
7382 </param>
7383 <param name="tcpport" type="unsigned long" dir="in">
7384 <desc>The TCP port to connect to (1..65535).</desc>
7385 </param>
7386 <param name="password" type="wstring" dir="in">
7387 <desc>The password.</desc>
7388 </param>
7389 <param name="maxDowntime" type="unsigned long" dir="in">
7390 <desc>
7391 The maximum allowed downtime given as milliseconds. 0 is not a valid
7392 value. Recommended value: 250 ms.
7393
7394 The higher the value is, the greater the chance for a successful
7395 teleportation. A small value may easily result in the teleportation
7396 process taking hours and eventually fail.
7397
7398 <note>
7399 The current implementation treats this a guideline, not as an
7400 absolute rule.
7401 </note>
7402 </desc>
7403 </param>
7404 <param name="progress" type="IProgress" dir="return">
7405 <desc>Progress object to track the operation completion.</desc>
7406 </param>
7407 </method>
7408
7409 <method name="registerCallback">
7410 <desc>
7411 Registers a new console callback on this instance. The methods of the
7412 callback interface will be called by this instance when the appropriate
7413 event occurs.
7414 </desc>
7415 <param name="callback" type="IConsoleCallback" dir="in"/>
7416 </method>
7417
7418 <method name="unregisterCallback">
7419 <desc>
7420 Unregisters the console callback previously registered using
7421 <link to="#registerCallback"/>.
7422 <result name="E_INVALIDARG">
7423 Given @a callback handler is not registered.
7424 </result>
7425 </desc>
7426 <param name="callback" type="IConsoleCallback" dir="in"/>
7427 </method>
7428 </interface>
7429
7430 <!--
7431 // IHost
7432 /////////////////////////////////////////////////////////////////////////
7433 -->
7434
7435 <enum
7436 name="HostNetworkInterfaceMediumType"
7437 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
7438 >
7439 <desc>
7440 Type of encapsulation. Ethernet encapsulation includes both wired and
7441 wireless Ethernet connections.
7442 <see>IHostNetworkInterface</see>
7443 </desc>
7444
7445 <const name="Unknown" value="0">
7446 <desc>
7447 The type of interface cannot be determined.
7448 </desc>
7449 </const>
7450 <const name="Ethernet" value="1">
7451 <desc>
7452 Ethernet frame encapsulation.
7453 </desc>
7454 </const>
7455 <const name="PPP" value="2">
7456 <desc>
7457 Point-to-point protocol encapsulation.
7458 </desc>
7459 </const>
7460 <const name="SLIP" value="3">
7461 <desc>
7462 Serial line IP encapsulation.
7463 </desc>
7464 </const>
7465 </enum>
7466
7467 <enum
7468 name="HostNetworkInterfaceStatus"
7469 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
7470 >
7471 <desc>
7472 Current status of the interface.
7473 <see>IHostNetworkInterface</see>
7474 </desc>
7475
7476 <const name="Unknown" value="0">
7477 <desc>
7478 The state of interface cannot be determined.
7479 </desc>
7480 </const>
7481 <const name="Up" value="1">
7482 <desc>
7483 The interface is fully operational.
7484 </desc>
7485 </const>
7486 <const name="Down" value="2">
7487 <desc>
7488 The interface is not functioning.
7489 </desc>
7490 </const>
7491 </enum>
7492
7493 <enum
7494 name="HostNetworkInterfaceType"
7495 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
7496 >
7497 <desc>
7498 Network interface type.
7499 </desc>
7500 <const name="Bridged" value="1"/>
7501 <const name="HostOnly" value="2"/>
7502 </enum>
7503
7504 <interface
7505 name="IHostNetworkInterface" extends="$unknown"
7506 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
7507 wsmap="managed"
7508 >
7509 <desc>
7510 Represents one of host's network interfaces. IP V6 address and network
7511 mask are strings of 32 hexdecimal digits grouped by four. Groups are
7512 separated by colons.
7513 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
7514 </desc>
7515 <attribute name="name" type="wstring" readonly="yes">
7516 <desc>Returns the host network interface name.</desc>
7517 </attribute>
7518
7519 <attribute name="id" type="uuid" mod="string" readonly="yes">
7520 <desc>Returns the interface UUID.</desc>
7521 </attribute>
7522
7523 <attribute name="networkName" type="wstring" readonly="yes">
7524 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
7525 </attribute>
7526
7527 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
7528 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
7529 </attribute>
7530
7531 <attribute name="IPAddress" type="wstring" readonly="yes">
7532 <desc>Returns the IP V4 address of the interface.</desc>
7533 </attribute>
7534
7535 <attribute name="networkMask" type="wstring" readonly="yes">
7536 <desc>Returns the network mask of the interface.</desc>
7537 </attribute>
7538
7539 <attribute name="IPV6Supported" type="boolean" readonly="yes">
7540 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
7541 </attribute>
7542
7543 <attribute name="IPV6Address" type="wstring" readonly="yes">
7544 <desc>Returns the IP V6 address of the interface.</desc>
7545 </attribute>
7546
7547 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
7548 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
7549 </attribute>
7550
7551 <attribute name="hardwareAddress" type="wstring" readonly="yes">
7552 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
7553 </attribute>
7554
7555 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
7556 <desc>Type of protocol encapsulation used.</desc>
7557 </attribute>
7558
7559 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7560 <desc>Status of the interface.</desc>
7561 </attribute>
7562
7563 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7564 <desc>specifies the host interface type.</desc>
7565 </attribute>
7566
7567 <method name="enableStaticIpConfig">
7568 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7569 <param name="IPAddress" type="wstring" dir="in">
7570 <desc>
7571 IP address.
7572 </desc>
7573 </param>
7574 <param name="networkMask" type="wstring" dir="in">
7575 <desc>
7576 network mask.
7577 </desc>
7578 </param>
7579 </method>
7580
7581 <method name="enableStaticIpConfigV6">
7582 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7583 <param name="IPV6Address" type="wstring" dir="in">
7584 <desc>
7585 IP address.
7586 </desc>
7587 </param>
7588 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7589 <desc>
7590 network mask.
7591 </desc>
7592 </param>
7593 </method>
7594
7595 <method name="enableDynamicIpConfig">
7596 <desc>enables the dynamic IP configuration.</desc>
7597 </method>
7598
7599 <method name="dhcpRediscover">
7600 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7601 </method>
7602
7603 </interface>
7604
7605 <interface
7606 name="IHost" extends="$unknown"
7607 uuid="e380cbfc-ae65-4fa6-899e-45ded6b3132a"
7608 wsmap="managed"
7609 >
7610 <desc>
7611 The IHost interface represents the physical machine that this VirtualBox
7612 installation runs on.
7613
7614 An object implementing this interface is returned by the
7615 <link to="IVirtualBox::host" /> attribute. This interface contains
7616 read-only information about the host's physical hardware (such as what
7617 processors and disks are available, what the host operating system is,
7618 and so on) and also allows for manipulating some of the host's hardware,
7619 such as global USB device filters and host interface networking.
7620
7621 </desc>
7622 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7623 <desc>List of DVD drives available on the host.</desc>
7624 </attribute>
7625
7626 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7627 <desc>List of floppy drives available on the host.</desc>
7628 </attribute>
7629
7630 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7631 <desc>
7632 List of USB devices currently attached to the host.
7633 Once a new device is physically attached to the host computer,
7634 it appears in this list and remains there until detached.
7635
7636 <note>
7637 If USB functionality is not available in the given edition of
7638 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7639 </note>
7640 </desc>
7641 </attribute>
7642
7643 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7644 <desc>
7645 List of USB device filters in action.
7646 When a new device is physically attached to the host computer,
7647 filters from this list are applied to it (in order they are stored
7648 in the list). The first matched filter will determine the
7649 <link to="IHostUSBDeviceFilter::action">action</link>
7650 performed on the device.
7651
7652 Unless the device is ignored by these filters, filters of all
7653 currently running virtual machines
7654 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7655
7656 <note>
7657 If USB functionality is not available in the given edition of
7658 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7659 </note>
7660
7661 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7662 </desc>
7663 </attribute>
7664
7665 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7666 <desc>List of host network interfaces currently defined on the host.</desc>
7667 </attribute>
7668
7669 <attribute name="processorCount" type="unsigned long" readonly="yes">
7670 <desc>Number of (logical) CPUs installed in the host system.</desc>
7671 </attribute>
7672
7673 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7674 <desc>Number of (logical) CPUs online in the host system.</desc>
7675 </attribute>
7676
7677 <method name="getProcessorSpeed">
7678 <desc>Query the (approximate) maximum speed of a specified host CPU in
7679 Megahertz.
7680 </desc>
7681 <param name="cpuId" type="unsigned long" dir="in">
7682 <desc>
7683 Identifier of the CPU.
7684 </desc>
7685 </param>
7686 <param name="speed" type="unsigned long" dir="return">
7687 <desc>
7688 Speed value. 0 is returned if value is not known or @a cpuId is
7689 invalid.
7690 </desc>
7691 </param>
7692 </method>
7693
7694 <method name="getProcessorFeature">
7695 <desc>Query whether a CPU feature is supported or not.</desc>
7696 <param name="feature" type="ProcessorFeature" dir="in">
7697 <desc>
7698 CPU Feature identifier.
7699 </desc>
7700 </param>
7701 <param name="supported" type="boolean" dir="return">
7702 <desc>
7703 Feature is supported or not.
7704 </desc>
7705 </param>
7706 </method>
7707
7708 <method name="getProcessorDescription">
7709 <desc>Query the model string of a specified host CPU.
7710 </desc>
7711 <param name="cpuId" type="unsigned long" dir="in">
7712 <desc>
7713 Identifier of the CPU.
7714 <note>
7715 The current implementation might not necessarily return the
7716 description for this exact CPU.
7717 </note>
7718 </desc>
7719 </param>
7720 <param name="description" type="wstring" dir="return">
7721 <desc>
7722 Model string. An empty string is returned if value is not known or
7723 @a cpuId is invalid.
7724 </desc>
7725 </param>
7726 </method>
7727
7728 <method name="getProcessorCPUIDLeaf">
7729 <desc>
7730 Returns the CPU cpuid information for the specified leaf.
7731 </desc>
7732 <param name="cpuId" type="unsigned long" dir="in">
7733 <desc>
7734 Identifier of the CPU. The CPU most be online.
7735 <note>
7736 The current implementation might not necessarily return the
7737 description for this exact CPU.
7738 </note>
7739 </desc>
7740 </param>
7741 <param name="leaf" type="unsigned long" dir="in">
7742 <desc>
7743 CPUID leaf index (eax).
7744 </desc>
7745 </param>
7746 <param name="subLeaf" type="unsigned long" dir="in">
7747 <desc>
7748 CPUID leaf sub index (ecx). This currently only applies to cache
7749 information on Intel CPUs. Use 0 if retriving values for
7750 <link to="IMachine::setCPUIDLeaf"/>.
7751 </desc>
7752 </param>
7753 <param name="valEax" type="unsigned long" dir="out">
7754 <desc>
7755 CPUID leaf value for register eax.
7756 </desc>
7757 </param>
7758 <param name="valEbx" type="unsigned long" dir="out">
7759 <desc>
7760 CPUID leaf value for register ebx.
7761 </desc>
7762 </param>
7763 <param name="valEcx" type="unsigned long" dir="out">
7764 <desc>
7765 CPUID leaf value for register ecx.
7766 </desc>
7767 </param>
7768 <param name="valEdx" type="unsigned long" dir="out">
7769 <desc>
7770 CPUID leaf value for register edx.
7771 </desc>
7772 </param>
7773 </method>
7774
7775 <attribute name="memorySize" type="unsigned long" readonly="yes">
7776 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7777 </attribute>
7778
7779 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7780 <desc>Available system memory in the host system.</desc>
7781 </attribute>
7782
7783 <attribute name="operatingSystem" type="wstring" readonly="yes">
7784 <desc>Name of the host system's operating system.</desc>
7785 </attribute>
7786
7787 <attribute name="OSVersion" type="wstring" readonly="yes">
7788 <desc>Host operating system's version string.</desc>
7789 </attribute>
7790
7791 <attribute name="UTCTime" type="long long" readonly="yes">
7792 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7793 </attribute>
7794
7795 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7796 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7797 </attribute>
7798
7799 <method name="createHostOnlyNetworkInterface">
7800 <desc>
7801 Creates a new adapter for Host Only Networking.
7802 <result name="E_INVALIDARG">
7803 Host network interface @a name already exists.
7804 </result>
7805 </desc>
7806 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7807 <desc>
7808 Created host interface object.
7809 </desc>
7810 </param>
7811 <param name="progress" type="IProgress" dir="return">
7812 <desc>
7813 Progress object to track the operation completion.
7814 </desc>
7815 </param>
7816 </method>
7817
7818 <method name="removeHostOnlyNetworkInterface">
7819 <desc>
7820 Removes the given Host Only Networking interface.
7821 <result name="VBOX_E_OBJECT_NOT_FOUND">
7822 No host network interface matching @a id found.
7823 </result>
7824 </desc>
7825 <param name="id" type="uuid" mod="string" dir="in">
7826 <desc>
7827 Adapter GUID.
7828 </desc>
7829 </param>
7830 <param name="progress" type="IProgress" dir="return">
7831 <desc>
7832 Progress object to track the operation completion.
7833 </desc>
7834 </param>
7835 </method>
7836
7837 <method name="createUSBDeviceFilter">
7838 <desc>
7839 Creates a new USB device filter. All attributes except
7840 the filter name are set to empty (any match),
7841 <i>active</i> is @c false (the filter is not active).
7842
7843 The created filter can be added to the list of filters using
7844 <link to="#insertUSBDeviceFilter"/>.
7845
7846 <see>#USBDeviceFilters</see>
7847 </desc>
7848 <param name="name" type="wstring" dir="in">
7849 <desc>
7850 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7851 for more info.
7852 </desc>
7853 </param>
7854 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7855 <desc>Created filter object.</desc>
7856 </param>
7857 </method>
7858
7859 <method name="insertUSBDeviceFilter">
7860 <desc>
7861 Inserts the given USB device to the specified position
7862 in the list of filters.
7863
7864 Positions are numbered starting from @c 0. If the specified
7865 position is equal to or greater than the number of elements in
7866 the list, the filter is added at the end of the collection.
7867
7868 <note>
7869 Duplicates are not allowed, so an attempt to insert a
7870 filter already in the list is an error.
7871 </note>
7872 <note>
7873 If USB functionality is not available in the given edition of
7874 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7875 </note>
7876
7877 <see>#USBDeviceFilters</see>
7878
7879 <result name="VBOX_E_INVALID_OBJECT_STATE">
7880 USB device filter is not created within this VirtualBox instance.
7881 </result>
7882 <result name="E_INVALIDARG">
7883 USB device filter already in list.
7884 </result>
7885
7886 </desc>
7887 <param name="position" type="unsigned long" dir="in">
7888 <desc>Position to insert the filter to.</desc>
7889 </param>
7890 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7891 <desc>USB device filter to insert.</desc>
7892 </param>
7893 </method>
7894
7895 <method name="removeUSBDeviceFilter">
7896 <desc>
7897 Removes a USB device filter from the specified position in the
7898 list of filters.
7899
7900 Positions are numbered starting from @c 0. Specifying a
7901 position equal to or greater than the number of elements in
7902 the list will produce an error.
7903
7904 <note>
7905 If USB functionality is not available in the given edition of
7906 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7907 </note>
7908
7909 <see>#USBDeviceFilters</see>
7910
7911 <result name="E_INVALIDARG">
7912 USB device filter list empty or invalid @a position.
7913 </result>
7914
7915 </desc>
7916 <param name="position" type="unsigned long" dir="in">
7917 <desc>Position to remove the filter from.</desc>
7918 </param>
7919 </method>
7920
7921 <method name="findHostDVDDrive">
7922 <desc>
7923 Searches for a host DVD drive with the given @c name.
7924
7925 <result name="VBOX_E_OBJECT_NOT_FOUND">
7926 Given @c name does not correspond to any host drive.
7927 </result>
7928
7929 </desc>
7930 <param name="name" type="wstring" dir="in">
7931 <desc>Name of the host drive to search for</desc>
7932 </param>
7933 <param name="drive" type="IMedium" dir="return">
7934 <desc>Found host drive object</desc>
7935 </param>
7936 </method>
7937
7938 <method name="findHostFloppyDrive">
7939 <desc>
7940 Searches for a host floppy drive with the given @c name.
7941
7942 <result name="VBOX_E_OBJECT_NOT_FOUND">
7943 Given @c name does not correspond to any host floppy drive.
7944 </result>
7945
7946 </desc>
7947 <param name="name" type="wstring" dir="in">
7948 <desc>Name of the host floppy drive to search for</desc>
7949 </param>
7950 <param name="drive" type="IMedium" dir="return">
7951 <desc>Found host floppy drive object</desc>
7952 </param>
7953 </method>
7954
7955 <method name="findHostNetworkInterfaceByName">
7956 <desc>
7957 Searches through all host network interfaces for an interface with
7958 the given @c name.
7959 <note>
7960 The method returns an error if the given @c name does not
7961 correspond to any host network interface.
7962 </note>
7963 </desc>
7964 <param name="name" type="wstring" dir="in">
7965 <desc>Name of the host network interface to search for.</desc>
7966 </param>
7967 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7968 <desc>Found host network interface object.</desc>
7969 </param>
7970 </method>
7971 <method name="findHostNetworkInterfaceById">
7972 <desc>
7973 Searches through all host network interfaces for an interface with
7974 the given GUID.
7975 <note>
7976 The method returns an error if the given GUID does not
7977 correspond to any host network interface.
7978 </note>
7979 </desc>
7980 <param name="id" type="uuid" mod="string" dir="in">
7981 <desc>GUID of the host network interface to search for.</desc>
7982 </param>
7983 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7984 <desc>Found host network interface object.</desc>
7985 </param>
7986 </method>
7987 <method name="findHostNetworkInterfacesOfType">
7988 <desc>
7989 Searches through all host network interfaces and returns a list of interfaces of the specified type
7990 </desc>
7991 <param name="type" type="HostNetworkInterfaceType" dir="in">
7992 <desc>type of the host network interfaces to search for.</desc>
7993 </param>
7994 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7995 <desc>Found host network interface objects.</desc>
7996 </param>
7997 </method>
7998
7999 <method name="findUSBDeviceById">
8000 <desc>
8001 Searches for a USB device with the given UUID.
8002
8003 <result name="VBOX_E_OBJECT_NOT_FOUND">
8004 Given @c id does not correspond to any USB device.
8005 </result>
8006
8007 <see>IHostUSBDevice::id</see>
8008 </desc>
8009 <param name="id" type="uuid" mod="string" dir="in">
8010 <desc>UUID of the USB device to search for.</desc>
8011 </param>
8012 <param name="device" type="IHostUSBDevice" dir="return">
8013 <desc>Found USB device object.</desc>
8014 </param>
8015 </method>
8016
8017 <method name="findUSBDeviceByAddress">
8018 <desc>
8019 Searches for a USB device with the given host address.
8020
8021 <result name="VBOX_E_OBJECT_NOT_FOUND">
8022 Given @c name does not correspond to any USB device.
8023 </result>
8024
8025 <see>IHostUSBDevice::address</see>
8026 </desc>
8027 <param name="name" type="wstring" dir="in">
8028 <desc>
8029 Address of the USB device (as assigned by the host) to
8030 search for.
8031 </desc>
8032 </param>
8033 <param name="device" type="IHostUSBDevice" dir="return">
8034 <desc>Found USB device object.</desc>
8035 </param>
8036 </method>
8037
8038 </interface>
8039
8040 <!--
8041 // ISystemProperties
8042 /////////////////////////////////////////////////////////////////////////
8043 -->
8044
8045 <interface
8046 name="ISystemProperties"
8047 extends="$unknown"
8048 uuid="07c3ffd8-8f59-49cc-b608-53a332e85cc3"
8049 wsmap="managed"
8050 >
8051 <desc>
8052 The ISystemProperties interface represents global properties of the given
8053 VirtualBox installation.
8054
8055 These properties define limits and default values for various attributes
8056 and parameters. Most of the properties are read-only, but some can be
8057 changed by a user.
8058 </desc>
8059
8060 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
8061 <desc>Minimum guest system memory in Megabytes.</desc>
8062 </attribute>
8063
8064 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
8065 <desc>Maximum guest system memory in Megabytes.</desc>
8066 </attribute>
8067
8068 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
8069 <desc>Minimum guest video memory in Megabytes.</desc>
8070 </attribute>
8071
8072 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
8073 <desc>Maximum guest video memory in Megabytes.</desc>
8074 </attribute>
8075
8076 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
8077 <desc>Minimum CPU count.</desc>
8078 </attribute>
8079
8080 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
8081 <desc>Maximum CPU count.</desc>
8082 </attribute>
8083
8084 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
8085 <desc>Maximum of monitors which could be connected.</desc>
8086 </attribute>
8087
8088 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
8089 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
8090 </attribute>
8091
8092 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
8093 <desc>
8094 Number of network adapters associated with every
8095 <link to="IMachine"/> instance.
8096 </desc>
8097 </attribute>
8098
8099 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
8100 <desc>
8101 Number of serial ports associated with every
8102 <link to="IMachine"/> instance.
8103 </desc>
8104 </attribute>
8105
8106 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
8107 <desc>
8108 Number of parallel ports associated with every
8109 <link to="IMachine"/> instance.
8110 </desc>
8111 </attribute>
8112
8113 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
8114 <desc>
8115 Maximum device position in the boot order. This value corresponds
8116 to the total number of devices a machine can boot from, to make it
8117 possible to include all possible devices to the boot list.
8118 <see><link to="IMachine::setBootOrder"/></see>
8119 </desc>
8120 </attribute>
8121
8122 <attribute name="defaultMachineFolder" type="wstring">
8123 <desc>
8124 Full path to the default directory used to create new or open
8125 existing machines when a settings file name contains no
8126 path.
8127
8128 The initial value of this property is
8129 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
8130 VirtualBox_home</link><tt>&gt;/Machines</tt>.
8131
8132 <note>
8133 Setting this property to @c null or an empty string will restore the
8134 initial value.
8135 </note>
8136 <note>
8137 When settings this property, the specified path can be
8138 absolute (full path) or relative
8139 to the <link to="IVirtualBox::homeFolder">
8140 VirtualBox home directory</link>.
8141 When reading this property, a full path is
8142 always returned.
8143 </note>
8144 <note>
8145 The specified path may not exist, it will be created
8146 when necessary.
8147 </note>
8148
8149 <see>
8150 <link to="IVirtualBox::createMachine"/>,
8151 <link to="IVirtualBox::openMachine"/>
8152 </see>
8153 </desc>
8154 </attribute>
8155
8156 <attribute name="defaultHardDiskFolder" type="wstring">
8157 <desc>
8158 Full path to the default directory used to create new or open existing
8159 virtual disks.
8160
8161 This path is used when the storage unit of a hard disk is a regular file
8162 in the host's file system and only a file name that contains no path is
8163 given.
8164
8165 The initial value of this property is
8166 <tt>&lt;</tt>
8167 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
8168 <tt>&gt;/HardDisks</tt>.
8169
8170 <note>
8171 Setting this property to @c null or empty string will restore the
8172 initial value.
8173 </note>
8174 <note>
8175 When settings this property, the specified path can be relative
8176 to the
8177 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
8178 absolute. When reading this property, a full path is
8179 always returned.
8180 </note>
8181 <note>
8182 The specified path may not exist, it will be created
8183 when necessary.
8184 </note>
8185
8186 <see>
8187 IMedium,
8188 <link to="IVirtualBox::createHardDisk"/>,
8189 <link to="IVirtualBox::openHardDisk"/>,
8190 <link to="IMedium::location"/>
8191 </see>
8192 </desc>
8193 </attribute>
8194
8195 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
8196 <desc>
8197 List of all medium storage formats supported by this VirtualBox
8198 installation.
8199
8200 Keep in mind that the medium format identifier
8201 (<link to="IMediumFormat::id"/>) used in other API calls like
8202 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
8203 medium format is a case-insensitive string. This means that, for
8204 example, all of the following strings:
8205 <pre>
8206 "VDI"
8207 "vdi"
8208 "VdI"</pre>
8209 refer to the same medium format.
8210
8211 Note that the virtual medium framework is backend-based, therefore
8212 the list of supported formats depends on what backends are currently
8213 installed.
8214
8215 <see>
8216 <link to="IMediumFormat"/>,
8217 </see>
8218 </desc>
8219 </attribute>
8220
8221 <attribute name="defaultHardDiskFormat" type="wstring">
8222 <desc>
8223 Identifier of the default medium format used by VirtualBox.
8224
8225 The medium format set by this attribute is used by VirtualBox
8226 when the medium format was not specified explicitly. One example is
8227 <link to="IVirtualBox::createHardDisk"/> with the empty
8228 format argument. A more complex example is implicit creation of
8229 differencing media when taking a snapshot of a virtual machine:
8230 this operation will try to use a format of the parent medium first
8231 and if this format does not support differencing media the default
8232 format specified by this argument will be used.
8233
8234 The list of supported medium formats may be obtained by the
8235 <link to="#mediaFormats"/> call. Note that the default medium
8236 format must have a capability to create differencing media;
8237 otherwise operations that create media implicitly may fail
8238 unexpectedly.
8239
8240 The initial value of this property is <tt>"VDI"</tt> in the current
8241 version of the VirtualBox product, but may change in the future.
8242
8243 <note>
8244 Setting this property to @c null or empty string will restore the
8245 initial value.
8246 </note>
8247
8248 <see>
8249 <link to="#mediaFormats"/>,
8250 <link to="IMediumFormat::id"/>,
8251 <link to="IVirtualBox::createHardDisk"/>
8252 </see>
8253 </desc>
8254 </attribute>
8255
8256 <attribute name="freeDiskSpaceWarning" type="unsigned long long">
8257 <desc>Issue a warning if the free disk space is below (or in some disk
8258 intensive operation is expected to go below) the given size in
8259 Megabytes.</desc>
8260 </attribute>
8261
8262 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
8263 <desc>Issue a warning if the free disk space is below (or in some disk
8264 intensive operation is expected to go below) the given percentage.</desc>
8265 </attribute>
8266
8267 <attribute name="freeDiskSpaceError" type="unsigned long long">
8268 <desc>Issue an error if the free disk space is below (or in some disk
8269 intensive operation is expected to go below) the given size in
8270 Megabytes.</desc>
8271 </attribute>
8272
8273 <attribute name="freeDiskSpacePercentError" type="unsigned long">
8274 <desc>Issue an error if the free disk space is below (or in some disk
8275 intensive operation is expected to go below) the given percentage.</desc>
8276 </attribute>
8277
8278 <attribute name="remoteDisplayAuthLibrary" type="wstring">
8279 <desc>
8280 Library that provides authentication for VRDP clients. The library
8281 is used if a virtual machine's authentication type is set to "external"
8282 in the VM RemoteDisplay configuration.
8283
8284 The system library extension (".DLL" or ".so") must be omitted.
8285 A full path can be specified; if not, then the library must reside on the
8286 system's default library path.
8287
8288 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
8289 of that name in one of the default VirtualBox library directories.
8290
8291 For details about VirtualBox authentication libraries and how to implement
8292 them, please refer to the VirtualBox manual.
8293
8294 <note>
8295 Setting this property to @c null or empty string will restore the
8296 initial value.
8297 </note>
8298 </desc>
8299 </attribute>
8300
8301 <attribute name="webServiceAuthLibrary" type="wstring">
8302 <desc>
8303 Library that provides authentication for webservice clients. The library
8304 is used if a virtual machine's authentication type is set to "external"
8305 in the VM RemoteDisplay configuration and will be called from
8306 within the <link to="IWebsessionManager::logon" /> implementation.
8307
8308 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
8309 there is no per-VM setting for this, as the webservice is a global
8310 resource (if it is running). Only for this setting (for the webservice),
8311 setting this value to a literal <tt>"null"</tt> string disables authentication,
8312 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
8313 no matter what user name and password are supplied.
8314
8315 The initial value of this property is <tt>"VRDPAuth"</tt>,
8316 meaning that the webservice will use the same authentication
8317 library that is used by default for VBoxVRDP (again, see
8318 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
8319 The format and calling convention of authentication libraries
8320 is the same for the webservice as it is for VBoxVRDP.
8321
8322 <note>
8323 Setting this property to @c null or empty string will restore the
8324 initial value.
8325 </note>
8326 </desc>
8327 </attribute>
8328
8329 <attribute name="LogHistoryCount" type="unsigned long">
8330 <desc>
8331 This value specifies how many old release log files are kept.
8332 </desc>
8333 </attribute>
8334
8335 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
8336 <desc>This value hold the default audio driver for the current
8337 system.</desc>
8338 </attribute>
8339
8340 <method name="getMaxDevicesPerPortForStorageBus">
8341 <desc>Returns the maximum number of devices which can be attached to a port
8342 for the given storage bus.</desc>
8343
8344 <param name="bus" type="StorageBus" dir="in">
8345 <desc>The storage bus type to get the value for.</desc>
8346 </param>
8347
8348 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
8349 <desc>The maximum number of devices which can eb attached to the port for the given
8350 storage bus.</desc>
8351 </param>
8352 </method>
8353
8354 <method name="getMinPortCountForStorageBus">
8355 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
8356
8357 <param name="bus" type="StorageBus" dir="in">
8358 <desc>The storage bus type to get the value for.</desc>
8359 </param>
8360
8361 <param name="minPortCount" type="unsigned long" dir="return">
8362 <desc>The minimum number of ports for the given storage bus.</desc>
8363 </param>
8364 </method>
8365
8366 <method name="getMaxPortCountForStorageBus">
8367 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
8368
8369 <param name="bus" type="StorageBus" dir="in">
8370 <desc>The storage bus type to get the value for.</desc>
8371 </param>
8372
8373 <param name="maxPortCount" type="unsigned long" dir="return">
8374 <desc>The maximum number of ports for the given storage bus.</desc>
8375 </param>
8376 </method>
8377
8378 <method name="getMaxInstancesOfStorageBus">
8379 <desc>Returns the maximum number of storage bus instances which
8380 can be configured for each VM. This corresponds to the number of
8381 storage controllers one can have.</desc>
8382
8383 <param name="bus" type="StorageBus" dir="in">
8384 <desc>The storage bus type to get the value for.</desc>
8385 </param>
8386
8387 <param name="maxInstances" type="unsigned long" dir="return">
8388 <desc>The maximum number of instances for the given storage bus.</desc>
8389 </param>
8390 </method>
8391
8392 <method name="getDeviceTypesForStorageBus">
8393 <desc>Returns list of all the supported device types
8394 (<link to="DeviceType"/>) for the given type of storage
8395 bus.</desc>
8396
8397 <param name="bus" type="StorageBus" dir="in">
8398 <desc>The storage bus type to get the value for.</desc>
8399 </param>
8400
8401 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
8402 <desc>The list of all supported device types for the given storage bus.</desc>
8403 </param>
8404 </method>
8405 </interface>
8406
8407 <!--
8408 // IGuest
8409 /////////////////////////////////////////////////////////////////////////
8410 -->
8411
8412 <interface
8413 name="IGuestOSType" extends="$unknown"
8414 uuid="8aa950f6-668c-4388-b251-3809b404e862"
8415 wsmap="struct"
8416 >
8417 <desc>
8418 </desc>
8419
8420 <attribute name="familyId" type="wstring" readonly="yes">
8421 <desc>Guest OS family identifier string.</desc>
8422 </attribute>
8423
8424 <attribute name="familyDescription" type="wstring" readonly="yes">
8425 <desc>Human readable description of the guest OS family.</desc>
8426 </attribute>
8427
8428 <attribute name="id" type="wstring" readonly="yes">
8429 <desc>Guest OS identifier string.</desc>
8430 </attribute>
8431
8432 <attribute name="description" type="wstring" readonly="yes">
8433 <desc>Human readable description of the guest OS.</desc>
8434 </attribute>
8435
8436 <attribute name="is64Bit" type="boolean" readonly="yes">
8437 <desc>Returns @c true if the given OS is 64-bit</desc>
8438 </attribute>
8439
8440 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
8441 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
8442 </attribute>
8443
8444 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
8445 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
8446 </attribute>
8447
8448 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
8449 <desc>Recommended RAM size in Megabytes.</desc>
8450 </attribute>
8451
8452 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
8453 <desc>Recommended video RAM size in Megabytes.</desc>
8454 </attribute>
8455
8456 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
8457 <desc>Recommended hard disk size in Megabytes.</desc>
8458 </attribute>
8459
8460 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
8461 <desc>Returns recommended network adapter for this OS type.</desc>
8462 </attribute>
8463
8464 <attribute name="recommendedPae" type="boolean" readonly="yes">
8465 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
8466 </attribute>
8467
8468 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
8469 <desc>Recommended storage controller type for DVD/CD drives.</desc>
8470 </attribute>
8471
8472 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
8473 <desc>Recommended storage bus type for DVD/CD drives.</desc>
8474 </attribute>
8475
8476 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
8477 <desc>Recommended storage controller type for HD drives.</desc>
8478 </attribute>
8479
8480 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
8481 <desc>Recommended storage bus type for HD drives.</desc>
8482 </attribute>
8483
8484 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
8485 <desc>Recommended firmware type.</desc>
8486 </attribute>
8487
8488 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
8489 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
8490 </attribute>
8491
8492 <attribute name="recommendedHpet" type="boolean" readonly="yes">
8493 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
8494 </attribute>
8495
8496 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
8497 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
8498 </attribute>
8499
8500 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
8501 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
8502 </attribute>
8503
8504 </interface>
8505
8506 <interface
8507 name="IGuest" extends="$unknown"
8508 uuid="d073545f-9635-489e-b36f-d468a10f8987"
8509 wsmap="managed"
8510 >
8511 <desc>
8512 The IGuest interface represents information about the operating system
8513 running inside the virtual machine. Used in
8514 <link to="IConsole::guest"/>.
8515
8516 IGuest provides information about the guest operating system, whether
8517 Guest Additions are installed and other OS-specific virtual machine
8518 properties.
8519 </desc>
8520
8521 <attribute name="OSTypeId" type="wstring" readonly="yes">
8522 <desc>
8523 Identifier of the Guest OS type as reported by the Guest
8524 Additions.
8525 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
8526 an IGuestOSType object representing details about the given
8527 Guest OS type.
8528 <note>
8529 If Guest Additions are not installed, this value will be
8530 the same as <link to="IMachine::OSTypeId"/>.
8531 </note>
8532 </desc>
8533 </attribute>
8534
8535 <attribute name="additionsActive" type="boolean" readonly="yes">
8536 <desc>
8537 Flag whether the Guest Additions are installed and active
8538 in which case their version will be returned by the
8539 <link to="#additionsVersion"/> property.
8540 </desc>
8541 </attribute>
8542
8543 <attribute name="additionsVersion" type="wstring" readonly="yes">
8544 <desc>
8545 Version of the Guest Additions (3 decimal numbers separated
8546 by dots) or empty when the Additions are not installed. The
8547 Additions may also report a version but yet not be active as
8548 the version might be refused by VirtualBox (incompatible) or
8549 other failures occurred.
8550 </desc>
8551 </attribute>
8552
8553 <attribute name="supportsSeamless" type="boolean" readonly="yes">
8554 <desc>
8555 Flag whether seamless guest display rendering (seamless desktop
8556 integration) is supported.
8557 </desc>
8558 </attribute>
8559
8560 <attribute name="supportsGraphics" type="boolean" readonly="yes">
8561 <desc>
8562 Flag whether the guest is in graphics mode. If it is not, then
8563 seamless rendering will not work, resize hints are not immediately
8564 acted on and guest display resizes are probably not initiated by
8565 the guest additions.
8566 </desc>
8567 </attribute>
8568
8569 <attribute name="memoryBalloonSize" type="unsigned long">
8570 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
8571 </attribute>
8572
8573 <attribute name="SharedPagingEnabled" type="boolean">
8574 <desc>
8575 Flag whether VirtualBox allows page sharing for this machine
8576 (64 bits host only; transient property).
8577 </desc>
8578 </attribute>
8579
8580 <attribute name="statisticsUpdateInterval" type="unsigned long">
8581 <desc>Interval to update guest statistics in seconds.</desc>
8582 </attribute>
8583
8584 <method name="internalGetStatistics">
8585 <desc>
8586 Internal method; do not use as it might change at any time
8587 </desc>
8588 <param name="cpuUser" type="unsigned long" dir="out">
8589 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
8590 </param>
8591 <param name="cpuKernel" type="unsigned long" dir="out">
8592 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
8593 </param>
8594 <param name="cpuIdle" type="unsigned long" dir="out">
8595 <desc>Percentage of processor time spent idling as seen by the guest</desc>
8596 </param>
8597 <param name="memTotal" type="unsigned long" dir="out">
8598 <desc>Total amount of physical guest RAM</desc>
8599 </param>
8600 <param name="memFree" type="unsigned long" dir="out">
8601 <desc>Free amount of physical guest RAM</desc>
8602 </param>
8603 <param name="memBalloon" type="unsigned long" dir="out">
8604 <desc>Amount of ballooned physical guest RAM</desc>
8605 </param>
8606 <param name="memShared" type="unsigned long" dir="out">
8607 <desc>Amount of shared physical guest RAM</desc>
8608 </param>
8609 <param name="memCache" type="unsigned long" dir="out">
8610 <desc>Total amount of guest (disk) cache memory</desc>
8611 </param>
8612 <param name="pagedTotal" type="unsigned long" dir="out">
8613 <desc>Total amount of space in the page file</desc>
8614 </param>
8615 <param name="memAllocTotal" type="unsigned long" dir="out">
8616 <desc>Total amount of memory allocated by the hypervisor</desc>
8617 </param>
8618 <param name="memFreeTotal" type="unsigned long" dir="out">
8619 <desc>Total amount of free memory available in the hypervisor</desc>
8620 </param>
8621 <param name="memBalloonTotal" type="unsigned long" dir="out">
8622 <desc>Total amount of memory ballooned by the hypervisor</desc>
8623 </param>
8624 <param name="memSharedTotal" type="unsigned long" dir="out">
8625 <desc>Total amount of shared memory in the hypervisor</desc>
8626 </param>
8627 </method>
8628
8629 <method name="setCredentials">
8630 <desc>
8631 Store login credentials that can be queried by guest operating
8632 systems with Additions installed. The credentials are transient
8633 to the session and the guest may also choose to erase them. Note
8634 that the caller cannot determine whether the guest operating system
8635 has queried or made use of the credentials.
8636
8637 <result name="VBOX_E_VM_ERROR">
8638 VMM device is not available.
8639 </result>
8640
8641 </desc>
8642 <param name="userName" type="wstring" dir="in">
8643 <desc>User name string, can be empty</desc>
8644 </param>
8645 <param name="password" type="wstring" dir="in">
8646 <desc>Password string, can be empty</desc>
8647 </param>
8648 <param name="domain" type="wstring" dir="in">
8649 <desc>Domain name (guest logon scheme specific), can be empty</desc>
8650 </param>
8651 <param name="allowInteractiveLogon" type="boolean" dir="in">
8652 <desc>
8653 Flag whether the guest should alternatively allow the user to
8654 interactively specify different credentials. This flag might
8655 not be supported by all versions of the Additions.
8656 </desc>
8657 </param>
8658 </method>
8659
8660 <method name="executeProcess">
8661 <desc>
8662 Executes an existing program inside the guest VM.
8663
8664 <result name="VBOX_E_IPRT_ERROR">
8665 Could not execute process.
8666 </result>
8667
8668 </desc>
8669 <param name="execName" type="wstring" dir="in">
8670 <desc>
8671 Full path name of the command to execute on the guest; the
8672 commands has to exists in the guest VM in order to be executed.
8673 </desc>
8674 </param>
8675 <param name="flags" type="unsigned long" dir="in">
8676 <desc>
8677 Execution flags - currently not supported and therefore
8678 has to be set to 0.
8679 </desc>
8680 </param>
8681 <param name="arguments" type="wstring" safearray="yes" dir="in">
8682 <desc>
8683 Array of arguments passed to the execution command.
8684 </desc>
8685 </param>
8686 <param name="environment" type="wstring" safearray="yes" dir="in">
8687 <desc>
8688 Environment variables that can be set while the command is being
8689 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
8690 variable just set its name ("NAME") without a value.
8691 </desc>
8692 </param>
8693 <param name="stdIn" type="wstring" dir="in">
8694 <desc>
8695 What to do with the standard input (stdin) of the command being
8696 executed. Currently not used and has to be set to an empty value.
8697 </desc>
8698 </param>
8699 <param name="stdOut" type="wstring" dir="in">
8700 <desc>
8701 What to do with the standard output (stdout) of the command being
8702 executed. Currently not used and has to be set to an empty value.
8703 </desc>
8704 </param>
8705 <param name="stdErr" type="wstring" dir="in">
8706 <desc>
8707 What to do with the standard error (stderr) of the command being
8708 executed. Currently not used and has to be set to an empty value.
8709 </desc>
8710 </param>
8711 <param name="userName" type="wstring" dir="in">
8712 <desc>
8713 User name under which the command will be executed; has to exist
8714 and have the appropriate rights to execute programs in the VM.
8715 </desc>
8716 </param>
8717 <param name="password" type="wstring" dir="in">
8718 <desc>
8719 Password of the user account specified.
8720 </desc>
8721 </param>
8722 <param name="timeoutMS" type="unsigned long" dir="in">
8723 <desc>
8724 The maximum timeout value (in msec) to wait for finished program
8725 execution. Pass 0 for an infinite timeout.
8726 </desc>
8727 </param>
8728 <param name="pid" type="unsigned long" dir="out">
8729 <desc>
8730 The PID (process ID) of the started command for later reference.
8731 </desc>
8732 </param>
8733 <param name="progress" type="IProgress" dir="return">
8734 <desc>Progress object to track the operation completion.</desc>
8735 </param>
8736 </method>
8737
8738 <method name="getProcessOutput">
8739 <desc>
8740 Retrieves output of a formerly started process.
8741
8742 <result name="VBOX_E_IPRT_ERROR">
8743 Could not retrieve output.
8744 </result>
8745
8746 </desc>
8747 <param name="pid" type="unsigned long" dir="in">
8748 <desc>
8749 Process id returned by earlier executeProcess() call.
8750 </desc>
8751 </param>
8752 <param name="flags" type="unsigned long" dir="in">
8753 <desc>
8754 Flags describing which output to retrieve.
8755 </desc>
8756 </param>
8757 <param name="timeoutMS" type="unsigned long" dir="in">
8758 <desc>
8759 The maximum timeout value (in msec) to wait for output
8760 data. Pass 0 for an infinite timeout.
8761 </desc>
8762 </param>
8763 <param name="size" type="unsigned long long" dir="in">
8764 <desc>
8765 Size in bytes to read in the buffer.
8766 </desc>
8767 </param>
8768 <param name="data" type="octet" dir="return" safearray="yes">
8769 <desc>
8770 Buffer for retrieving the actual output. A data size of 0 means end of file
8771 if the requested size was not 0. This is the unprocessed
8772 output data, i.e. the line ending style depends on the platform of
8773 the system the server is running on.
8774 </desc>
8775 </param>
8776 </method>
8777
8778 <method name="getProcessStatus">
8779 <desc>
8780 Retrieves status, exit code and the exit reason of a formerly started process.
8781
8782 <result name="VBOX_E_IPRT_ERROR">
8783 Process with specified PID was not found.
8784 </result>
8785
8786 </desc>
8787 <param name="pid" type="unsigned long" dir="in">
8788 <desc>
8789 Process id returned by earlier executeProcess() call.
8790 </desc>
8791 </param>
8792 <param name="exitcode" type="unsigned long" dir="out">
8793 <desc>
8794 The exit code (if available).
8795 </desc>
8796 </param>
8797 <param name="flags" type="unsigned long" dir="out">
8798 <desc>
8799 Additional flags of process status (not used at the moment).
8800 </desc>
8801 </param>
8802 <param name="reason" type="unsigned long" dir="return">
8803 <desc>
8804 The current process status.
8805 </desc>
8806 </param>
8807 </method>
8808
8809 </interface>
8810
8811
8812 <!--
8813 // IProgress
8814 /////////////////////////////////////////////////////////////////////////
8815 -->
8816
8817 <interface
8818 name="IProgress" extends="$unknown"
8819 uuid="856aa038-853f-42e2-acf7-6e7b02dbe294"
8820 wsmap="managed"
8821 >
8822 <desc>
8823 The IProgress interface is used to track and control
8824 asynchronous tasks within VirtualBox.
8825
8826 An instance of this is returned every time VirtualBox starts
8827 an asynchronous task (in other words, a separate thread) which
8828 continues to run after a method call returns. For example,
8829 <link to="IConsole::saveState" />, which saves the state of
8830 a running virtual machine, can take a long time to complete.
8831 To be able to display a progress bar, a user interface such as
8832 the VirtualBox graphical user interface can use the IProgress
8833 object returned by that method.
8834
8835 Note that IProgress is a "read-only" interface in the sense
8836 that only the VirtualBox internals behind the Main API can
8837 create and manipulate progress objects, whereas client code
8838 can only use the IProgress object to monitor a task's
8839 progress and, if <link to="#cancelable" /> is @c true,
8840 cancel the task by calling <link to="#cancel" />.
8841
8842 A task represented by IProgress consists of either one or
8843 several sub-operations that run sequentially, one by one (see
8844 <link to="#operation" /> and <link to="#operationCount" />).
8845 Every operation is identified by a number (starting from 0)
8846 and has a separate description.
8847
8848 You can find the individual percentage of completion of the current
8849 operation in <link to="#operationPercent" /> and the
8850 percentage of completion of the task as a whole
8851 in <link to="#percent" />.
8852
8853 Similarly, you can wait for the completion of a particular
8854 operation via <link to="#waitForOperationCompletion" /> or
8855 for the completion of the whole task via
8856 <link to="#waitForCompletion" />.
8857 </desc>
8858
8859 <attribute name="id" type="uuid" mod="string" readonly="yes">
8860 <desc>ID of the task.</desc>
8861 </attribute>
8862
8863 <attribute name="description" type="wstring" readonly="yes">
8864 <desc>Description of the task.</desc>
8865 </attribute>
8866
8867 <attribute name="initiator" type="$unknown" readonly="yes">
8868 <desc>Initiator of the task.</desc>
8869 </attribute>
8870
8871 <attribute name="cancelable" type="boolean" readonly="yes">
8872 <desc>Whether the task can be interrupted.</desc>
8873 </attribute>
8874
8875 <attribute name="percent" type="unsigned long" readonly="yes">
8876 <desc>
8877 Current progress value of the task as a whole, in percent.
8878 This value depends on how many operations are already complete.
8879 Returns 100 if <link to="#completed" /> is @c true.
8880 </desc>
8881 </attribute>
8882
8883 <attribute name="timeRemaining" type="long" readonly="yes">
8884 <desc>
8885 Estimated remaining time until the task completes, in
8886 seconds. Returns 0 once the task has completed; returns -1
8887 if the remaining time cannot be computed, in particular if
8888 the current progress is 0.
8889
8890 Even if a value is returned, the estimate will be unreliable
8891 for low progress values. It will become more reliable as the
8892 task progresses; it is not recommended to display an ETA
8893 before at least 20% of a task have completed.
8894 </desc>
8895 </attribute>
8896
8897 <attribute name="completed" type="boolean" readonly="yes">
8898 <desc>Whether the task has been completed.</desc>
8899 </attribute>
8900
8901 <attribute name="canceled" type="boolean" readonly="yes">
8902 <desc>Whether the task has been canceled.</desc>
8903 </attribute>
8904
8905 <attribute name="resultCode" type="long" readonly="yes">
8906 <desc>
8907 Result code of the progress task.
8908 Valid only if <link to="#completed"/> is @c true.
8909 </desc>
8910 </attribute>
8911
8912 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8913 <desc>
8914 Extended information about the unsuccessful result of the
8915 progress operation. May be @c null if no extended information
8916 is available.
8917 Valid only if <link to="#completed"/> is @c true and
8918 <link to="#resultCode"/> indicates a failure.
8919 </desc>
8920 </attribute>
8921
8922 <attribute name="operationCount" type="unsigned long" readonly="yes">
8923 <desc>
8924 Number of sub-operations this task is divided into.
8925 Every task consists of at least one suboperation.
8926 </desc>
8927 </attribute>
8928
8929 <attribute name="operation" type="unsigned long" readonly="yes">
8930 <desc>Number of the sub-operation being currently executed.</desc>
8931 </attribute>
8932
8933 <attribute name="operationDescription" type="wstring" readonly="yes">
8934 <desc>
8935 Description of the sub-operation being currently executed.
8936 </desc>
8937 </attribute>
8938
8939 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8940 <desc>Progress value of the current sub-operation only, in percent.</desc>
8941 </attribute>
8942
8943 <attribute name="timeout" type="unsigned long">
8944 <desc>
8945 When non-zero, this specifies the number of milliseconds after which
8946 the operation will automatically be canceled. This can only be set on
8947 cancelable objects.
8948 </desc>
8949 </attribute>
8950
8951 <method name="setCurrentOperationProgress">
8952 <desc>Internal method, not to be called externally.</desc>
8953 <param name="percent" type="unsigned long" dir="in" />
8954 </method>
8955 <method name="setNextOperation">
8956 <desc>Internal method, not to be called externally.</desc>
8957 <param name="nextOperationDescription" type="wstring" dir="in" />
8958 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8959 </method>
8960
8961 <method name="waitForCompletion">
8962 <desc>
8963 Waits until the task is done (including all sub-operations)
8964 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8965
8966 <result name="VBOX_E_IPRT_ERROR">
8967 Failed to wait for task completion.
8968 </result>
8969 </desc>
8970
8971 <param name="timeout" type="long" dir="in">
8972 <desc>
8973 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8974 </desc>
8975 </param>
8976 </method>
8977
8978 <method name="waitForOperationCompletion">
8979 <desc>
8980 Waits until the given operation is done with a given timeout in
8981 milliseconds; specify -1 for an indefinite wait.
8982
8983 <result name="VBOX_E_IPRT_ERROR">
8984 Failed to wait for operation completion.
8985 </result>
8986
8987 </desc>
8988 <param name="operation" type="unsigned long" dir="in">
8989 <desc>
8990 Number of the operation to wait for.
8991 Must be less than <link to="#operationCount"/>.
8992 </desc>
8993 </param>
8994 <param name="timeout" type="long" dir="in">
8995 <desc>
8996 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8997 </desc>
8998 </param>
8999 </method>
9000
9001 <method name="cancel">
9002 <desc>
9003 Cancels the task.
9004 <note>
9005 If <link to="#cancelable"/> is @c false, then this method will fail.
9006 </note>
9007
9008 <result name="VBOX_E_INVALID_OBJECT_STATE">
9009 Operation cannot be canceled.
9010 </result>
9011
9012 </desc>
9013 </method>
9014
9015 </interface>
9016
9017
9018 <!--
9019 // ISnapshot
9020 /////////////////////////////////////////////////////////////////////////
9021 -->
9022
9023 <interface
9024 name="ISnapshot" extends="$unknown"
9025 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
9026 wsmap="managed"
9027 >
9028 <desc>
9029 The ISnapshot interface represents a snapshot of the virtual
9030 machine.
9031
9032 Together with the differencing media that are created
9033 when a snapshot is taken, a machine can be brought back to
9034 the exact state it was in when the snapshot was taken.
9035
9036 The ISnapshot interface has no methods, only attributes; snapshots
9037 are controlled through methods of the <link to="IConsole" /> interface
9038 which also manage the media associated with the snapshot.
9039 The following operations exist:
9040
9041 <ul>
9042 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
9043 by creating new, empty differencing images for the machine's
9044 media and saving the VM settings and (if the VM is running)
9045 the current VM state in the snapshot.
9046
9047 The differencing images will then receive all data written to
9048 the machine's media, while their parent (base) images
9049 remain unmodified after the snapshot has been taken (see
9050 <link to="IMedium" /> for details about differencing images).
9051 This simplifies restoring a machine to the state of a snapshot:
9052 only the differencing images need to be deleted.
9053
9054 The current machine state is not changed by taking a snapshot.
9055 If the machine is running, it will resume execution after the
9056 snapshot has been taken.
9057 </li>
9058
9059 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
9060 a previous snapshot. This resets the machine's state to that of
9061 the previous snapshot by deleting the differencing image of each
9062 of the machine's media and setting the machine's settings
9063 and state to the state that was saved in the snapshot (if any).
9064
9065 This destroys the machine's current state.
9066 </li>
9067
9068 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
9069 without affecting the current machine state.
9070
9071 This does not change the machine, but instead frees the resources
9072 allocated when the snapshot was taken: the settings and machine state
9073 is deleted (if any), and the snapshot's differencing image for each
9074 of the machine's media gets merged with its parent image.
9075
9076 Neither the current machine state nor other snapshots are affected
9077 by this operation, except that parent media will be modified
9078 to contain the disk data associated with the snapshot being deleted.
9079 </li>
9080 </ul>
9081
9082 Each snapshot contains the settings of the virtual machine (hardware
9083 configuration etc.). In addition, if the machine was running when the
9084 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
9085 the current VM state is saved in the snapshot (similarly to what happens
9086 when a VM's state is saved). The snapshot is then said to
9087 be <i>online</i> because when restoring it, the VM will be running.
9088
9089 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
9090 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
9091
9092 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
9093 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
9094 it then contains a so-called "zero execution state", representing a
9095 machine that is powered off.
9096
9097 <h3>Snapshot branches and the "current" snapshot</h3>
9098
9099 Snapshots can be chained, whereby every next snapshot is based on the
9100 previous one. This chaining is related to medium branching
9101 (see the <link to="IMedium"/> description) in that every time
9102 a new snapshot is created, a new differencing medium is implicitly
9103 created for all normal media attached to the machine.
9104
9105 Each virtual machine has a "current snapshot", identified by
9106 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
9107 to the last snapshot in the chain. In a future version of VirtualBox,
9108 it will be possible to reset a machine's current state to that of an
9109 earlier snapshot without deleting the current state so that it will be
9110 possible to create alternative snapshot paths in a snapshot tree.
9111
9112 In the current implementation, multiple snapshot branches within one
9113 virtual machine are not allowed. Every machine has a single branch,
9114 and <link to="IConsole::takeSnapshot"/> operation adds a new
9115 snapshot to the top of that branch.
9116 </desc>
9117
9118 <attribute name="id" type="uuid" mod="string" readonly="yes">
9119 <desc>UUID of the snapshot.</desc>
9120 </attribute>
9121
9122 <attribute name="name" type="wstring">
9123 <desc>Short name of the snapshot.</desc>
9124 </attribute>
9125
9126 <attribute name="description" type="wstring">
9127 <desc>Optional description of the snapshot.</desc>
9128 </attribute>
9129
9130 <attribute name="timeStamp" type="long long" readonly="yes">
9131 <desc>
9132 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
9133 </desc>
9134 </attribute>
9135
9136 <attribute name="online" type="boolean" readonly="yes">
9137 <desc>
9138 @c true if this snapshot is an online snapshot and @c false otherwise.
9139
9140 When this attribute is @c true, the
9141 <link to="IMachine::stateFilePath"/> attribute of the
9142 <link to="#machine"/> object associated with this snapshot
9143 will point to the saved state file. Otherwise, it will be
9144 an empty string.
9145 </desc>
9146 </attribute>
9147
9148 <attribute name="machine" type="IMachine" readonly="yes">
9149 <desc>
9150 Virtual machine this snapshot is taken on. This object
9151 stores all settings the machine had when taking this snapshot.
9152 <note>
9153 The returned machine object is immutable, i.e. no
9154 any settings can be changed.
9155 </note>
9156 </desc>
9157 </attribute>
9158
9159 <attribute name="parent" type="ISnapshot" readonly="yes">
9160 <desc>
9161 Parent snapshot (a snapshot this one is based on), or
9162 @c null if the snapshot has no parent (i.e. is the first snapshot).
9163 </desc>
9164 </attribute>
9165
9166 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
9167 <desc>
9168 Child snapshots (all snapshots having this one as a parent).
9169 </desc>
9170 </attribute>
9171
9172 </interface>
9173
9174
9175 <!--
9176 // IMedium
9177 /////////////////////////////////////////////////////////////////////////
9178 -->
9179
9180 <enum
9181 name="MediumState"
9182 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
9183 >
9184 <desc>
9185 Virtual medium state.
9186 <see>IMedium</see>
9187 </desc>
9188
9189 <const name="NotCreated" value="0">
9190 <desc>
9191 Associated medium storage does not exist (either was not created yet or
9192 was deleted).
9193 </desc>
9194 </const>
9195 <const name="Created" value="1">
9196 <desc>
9197 Associated storage exists and accessible; this gets set if the
9198 accessibility check performed by <link to="IMedium::refreshState" />
9199 was successful.
9200 </desc>
9201 </const>
9202 <const name="LockedRead" value="2">
9203 <desc>
9204 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
9205 no data modification is possible.
9206 </desc>
9207 </const>
9208 <const name="LockedWrite" value="3">
9209 <desc>
9210 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
9211 no concurrent data reading or modification is possible.
9212 </desc>
9213 </const>
9214 <const name="Inaccessible" value="4">
9215 <desc>
9216 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
9217 not yet been performed, or else, associated medium storage is not
9218 accessible. In the first case, <link to="IMedium::lastAccessError"/>
9219 is empty, in the second case, it describes the error that occured.
9220 </desc>
9221 </const>
9222 <const name="Creating" value="5">
9223 <desc>
9224 Associated medium storage is being created.
9225 </desc>
9226 </const>
9227 <const name="Deleting" value="6">
9228 <desc>
9229 Associated medium storage is being deleted.
9230 </desc>
9231 </const>
9232 </enum>
9233
9234 <enum
9235 name="MediumType"
9236 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
9237 >
9238 <desc>
9239 Virtual medium type.
9240 <see>IMedium</see>
9241 </desc>
9242
9243 <const name="Normal" value="0">
9244 <desc>
9245 Normal medium (attached directly or indirectly, preserved
9246 when taking snapshots).
9247 </desc>
9248 </const>
9249 <const name="Immutable" value="1">
9250 <desc>
9251 Immutable medium (attached indirectly, changes are wiped out
9252 the next time the virtual machine is started).
9253 </desc>
9254 </const>
9255 <const name="Writethrough" value="2">
9256 <desc>
9257 Write through medium (attached directly, ignored when
9258 taking snapshots).
9259 </desc>
9260 </const>
9261 <const name="Shareable" value="3">
9262 <desc>
9263 Allow using this medium concurrently by several machines.
9264 <note>This is a stub value. Not usable until this note is removed.</note>
9265 </desc>
9266 </const>
9267 </enum>
9268
9269 <enum
9270 name="MediumVariant"
9271 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
9272 >
9273 <desc>
9274 Virtual medium image variant. More than one flag may be set.
9275 <see>IMedium</see>
9276 </desc>
9277
9278 <const name="Standard" value="0">
9279 <desc>
9280 No particular variant requested, results in using the backend default.
9281 </desc>
9282 </const>
9283 <const name="VmdkSplit2G" value="0x01">
9284 <desc>
9285 VMDK image split in chunks of less than 2GByte.
9286 </desc>
9287 </const>
9288 <const name="VmdkStreamOptimized" value="0x04">
9289 <desc>
9290 VMDK streamOptimized image. Special import/export format which is
9291 read-only/append-only.
9292 </desc>
9293 </const>
9294 <const name="VmdkESX" value="0x08">
9295 <desc>
9296 VMDK format variant used on ESX products.
9297 </desc>
9298 </const>
9299 <const name="Fixed" value="0x10000">
9300 <desc>
9301 Fixed image. Only allowed for base images.
9302 </desc>
9303 </const>
9304 <const name="Diff" value="0x20000">
9305 <desc>
9306 Fixed image. Only allowed for base images.
9307 </desc>
9308 </const>
9309 </enum>
9310
9311 <interface
9312 name="IMediumAttachment" extends="$unknown"
9313 uuid="e58eb3eb-8627-428b-bdf8-34487c848de5"
9314 wsmap="struct"
9315 >
9316 <desc>
9317 The IMediumAttachment interface represents the attachment
9318 of a storage medium to a virtual machine. Each machine contains
9319 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
9320
9321 Each medium attachment specifies a storage controller as well as a port
9322 and device number. Fixed media (hard disks) will always also specify
9323 an instance of IMedium in <link to="#medium" />, referring to the hard disk
9324 medium. For removeable media, the IMedia instance is optional; it can be
9325 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
9326 </desc>
9327
9328 <attribute name="medium" type="IMedium" readonly="yes">
9329 <desc>Medium object associated with this attachment; it
9330 can be @c null for removable devices.</desc>
9331 </attribute>
9332
9333 <attribute name="controller" type="wstring" readonly="yes">
9334 <desc>Name of the storage controller of this attachment; this
9335 refers to one of the controllers in <link to="IMachine::storageControllers" />
9336 by name.</desc>
9337 </attribute>
9338
9339 <attribute name="port" type="long" readonly="yes">
9340 <desc>Port number of this attachment.</desc>
9341 </attribute>
9342
9343 <attribute name="device" type="long" readonly="yes">
9344 <desc>Device slot number of this attachment.</desc>
9345 </attribute>
9346
9347 <attribute name="type" type="DeviceType" readonly="yes">
9348 <desc>Device type of this attachment.</desc>
9349 </attribute>
9350
9351 <attribute name="passthrough" type="boolean" readonly="yes">
9352 <desc>Pass I/O requests through to a device on the host.</desc>
9353 </attribute>
9354
9355 </interface>
9356
9357 <interface
9358 name="IMedium" extends="$unknown"
9359 uuid="1d578f43-5ef1-4415-b556-7592d3ccdc8f"
9360 wsmap="managed"
9361 >
9362 <desc>
9363 The IMedium interface represents virtual storage for a machine's
9364 hard disks, CD/DVD or floppy drives. It will typically represent
9365 a disk image on the host, for example a VDI or VMDK file representing
9366 a virtual hard disk, or an ISO or RAW file representing virtual
9367 removable media, but can also point to a network location (e.g.
9368 for iSCSI targets).
9369
9370 Instances of IMedium are connected to virtual machines by way of
9371 medium attachments (see <link to="IMediumAttachment" />), which link
9372 the storage medium to a particular device slot of a storage controller
9373 of the virtual machine.
9374 In the VirtualBox API, virtual storage is therefore always represented
9375 by the following chain of object links:
9376
9377 <ul>
9378 <li><link to="IMachine::storageControllers"/> contains an array of
9379 storage controllers (IDE, SATA, SCSI or a floppy controller;
9380 these are instances of <link to="IStorageController"/>).</li>
9381 <li><link to="IMachine::mediumAttachments"/> contains an array of
9382 medium attachments (instances of <link to="IMediumAttachment"/>),
9383 each containing a storage controller from the above array, a
9384 port/device specification, and an instance of IMedium representing
9385 the medium storage (image file).
9386
9387 For removable media, the storage medium is optional; a medium
9388 attachment with no medium represents a CD/DVD or floppy drive
9389 with no medium inserted. By contrast, hard disk attachments
9390 will always have an IMedium object attached.</li>
9391 <li>Each IMedium in turn points to a storage unit (such as a file
9392 on the host computer or a network resource) that holds actual
9393 data. This location is represented by the <link to="#location"/>
9394 attribute.</li>
9395 </ul>
9396
9397 Existing media are opened using the following methods, depending on the
9398 media type:
9399 <ul>
9400 <li><link to="IVirtualBox::openHardDisk"/></li>
9401 <li><link to="IVirtualBox::openDVDImage"/></li>
9402 <li><link to="IVirtualBox::openFloppyImage"/></li>
9403 </ul>
9404
9405 New hard disk media can be created with the VirtualBox API using the
9406 <link to="IVirtualBox::createHardDisk"/> method.
9407
9408 CD/DVD and floppy images (ISO and RAW files) are usually created outside
9409 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
9410 type in a regular file.
9411
9412 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
9413 drive; in that case the <link to="#id" /> attribute contains the UUID of
9414 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
9415
9416 <h3>Known media</h3>
9417
9418 When an existing medium is opened for the first time, it is automatically
9419 remembered by the given VirtualBox installation or, in other words, becomes
9420 a <i>known medium</i>. Known media are stored in the media
9421 registry transparently maintained by VirtualBox and stored in settings
9422 files so that this registry is preserved when VirtualBox is not running.
9423
9424 Newly created virtual media are remembered only when the associated
9425 storage unit is actually created.
9426
9427 All known media can be enumerated using
9428 <link to="IVirtualBox::hardDisks"/>,
9429 <link to="IVirtualBox::DVDImages"/> and
9430 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
9431 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
9432 and similar methods or by location using
9433 <link to="IVirtualBox::findHardDisk"/> and similar methods.
9434
9435 Only known media can be attached to virtual machines.
9436
9437 Removing known media from the media registry is performed when the given
9438 medium is closed using the <link to="#close"/> method or when its
9439 associated storage unit is deleted.
9440
9441 <h3>Accessibility checks</h3>
9442
9443 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
9444 method is called explicitly on a medium. This is done to make the VirtualBox object
9445 ready for serving requests as fast as possible and let the end-user
9446 application decide if it needs to check media accessibility right away or not.
9447
9448 As a result, when VirtualBox starts up (e.g. the VirtualBox
9449 object gets created for the first time), all known media are in the
9450 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
9451 attribute is an empty string because no actual accessibility check has
9452 been made yet.
9453
9454 After calling <link to="#refreshState" />, a medium is considered
9455 <i>accessible</i> if its storage unit can be read. In that case, the
9456 <link to="#state"/> attribute has a value of "Created". If the storage
9457 unit cannot be read (for example, because it is located on a disconnected
9458 network resource, or was accidentally deleted outside VirtualBox),
9459 the medium is considered <i>inaccessible</i>, which is indicated by the
9460 "Inaccessible" state. The exact reason why the medium is inaccessible can be
9461 obtained by reading the <link to="#lastAccessError"/> attribute.
9462
9463 <h3>Medium types</h3>
9464
9465 There are three types of medium behavior (see <link to="MediumType" />):
9466 "normal", "immutable" and "writethrough", represented by the
9467 <link to="#type"/> attribute. The type of the medium defines how the
9468 medium is attached to a virtual machine and what happens when a
9469 <link to="ISnapshot">snapshot</link> of the virtual machine with the
9470 attached medium is taken. At the moment DVD and floppy media are always
9471 of type "writethrough".
9472
9473 All media can be also divided in two groups: <i>base</i> media and
9474 <i>differencing</i> media. A base medium contains all sectors of the
9475 medium data in its own storage and therefore can be used independently.
9476 In contrast, a differencing mediun is a "delta" to some other medium and
9477 contains only those sectors which differ from that other medium, which is
9478 then called a <i>parent</i>. The differencing medium is said to be
9479 <i>linked to</i> that parent. The parent may be itself a differencing
9480 medium, thus forming a chain of linked media. The last element in that
9481 chain must always be a base medium. Note that several differencing
9482 media may be linked to the same parent medium.
9483
9484 Differencing media can be distinguished from base media by querying the
9485 <link to="#parent"/> attribute: base media do not have parents they would
9486 depend on, so the value of this attribute is always @c null for them.
9487 Using this attribute, it is possible to walk up the medium tree (from the
9488 child medium to its parent). It is also possible to walk down the tree
9489 using the <link to="#children"/> attribute.
9490
9491 Note that the type of all differencing media is "Normal"; all other
9492 values are meaningless for them. Base media may be of any type.
9493
9494 <h3>Creating hard disks</h3>
9495
9496 New base hard disks are created using
9497 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
9498 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
9499 disks are usually implicitly created by VirtualBox when needed but may
9500 also be created explicitly using <link to="#createDiffStorage"/>.
9501
9502 After the hard disk is successfully created (including the storage unit)
9503 or opened, it becomes a known hard disk (remembered in the internal media
9504 registry). Known hard disks can be attached to a virtual machine, accessed
9505 through <link to="IVirtualBox::getHardDisk"/> and
9506 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
9507 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
9508
9509 The following methods, besides <link to="IMedium::close"/>,
9510 automatically remove the hard disk from the media registry:
9511 <ul>
9512 <li><link to="#deleteStorage"/></li>
9513 <li><link to="#mergeTo"/></li>
9514 </ul>
9515
9516 If the storage unit of the hard disk is a regular file in the host's
9517 file system then the rules stated in the description of the
9518 <link to="IMedium::location"/> attribute apply when setting its value. In
9519 addition, a plain file name without any path may be given, in which case
9520 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
9521 folder</link> will be prepended to it.
9522
9523 <h4>Automatic composition of the file name part</h4>
9524
9525 Another extension to the <link to="IMedium::location"/> attribute is that
9526 there is a possibility to cause VirtualBox to compose a unique value for
9527 the file name part of the location using the UUID of the hard disk. This
9528 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
9529 e.g. before the storage unit is created, and works as follows. You set the
9530 value of the <link to="IMedium::location"/> attribute to a location
9531 specification which only contains the path specification but not the file
9532 name part and ends with either a forward slash or a backslash character.
9533 In response, VirtualBox will generate a new UUID for the hard disk and
9534 compose the file name using the following pattern:
9535 <pre>
9536 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
9537 </pre>
9538 where <tt>&lt;path&gt;</tt> is the supplied path specification,
9539 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
9540 is the default extension for the storage format of this hard disk. After
9541 that, you may call any of the methods that create a new hard disk storage
9542 unit and they will use the generated UUID and file name.
9543
9544 <h3>Attaching Hard Disks</h3>
9545
9546 Hard disks are attached to virtual machines using the
9547 <link to="IMachine::attachDevice"/> method and detached using the
9548 <link to="IMachine::detachDevice"/> method. Depending on their
9549 <link to="#type"/>, hard disks are attached either
9550 <i>directly</i> or <i>indirectly</i>.
9551
9552 When a hard disk is being attached directly, it is associated with the
9553 virtual machine and used for hard disk operations when the machine is
9554 running. When a hard disk is being attached indirectly, a new differencing
9555 hard disk linked to it is implicitly created and this differencing hard
9556 disk is associated with the machine and used for hard disk operations.
9557 This also means that if <link to="IMachine::attachDevice"/> performs
9558 a direct attachment then the same hard disk will be returned in response
9559 to the subsequent <link to="IMachine::getMedium"/> call; however if
9560 an indirect attachment is performed then
9561 <link to="IMachine::getMedium"/> will return the implicitly created
9562 differencing hard disk, not the original one passed to <link
9563 to="IMachine::attachDevice"/>. In detail:
9564
9565 <ul>
9566 <li><b>Normal base</b> hard disks that do not have children (i.e.
9567 differencing hard disks linked to them) and that are not already
9568 attached to virtual machines in snapshots are attached <b>directly</b>.
9569 Otherwise, they are attached <b>indirectly</b> because having
9570 dependent children or being part of the snapshot makes it impossible
9571 to modify hard disk contents without breaking the integrity of the
9572 dependent party. The <link to="#readOnly"/> attribute allows to
9573 quickly determine the kind of the attachment for the given hard
9574 disk. Note that if a normal base hard disk is to be indirectly
9575 attached to a virtual machine with snapshots then a special
9576 procedure called <i>smart attachment</i> is performed (see below).</li>
9577 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
9578 they are attached <b>directly</b> if they do not have children and are
9579 not attached to virtual machines in snapshots, and <b>indirectly</b>
9580 otherwise. Note that the smart attachment procedure is never performed
9581 for differencing hard disks.</li>
9582 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
9583 they are designed to be non-writable. If an immutable hard disk is
9584 attached to a virtual machine with snapshots then a special
9585 procedure called smart attachment is performed (see below).</li>
9586 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
9587 also as designed. This also means that writethrough hard disks cannot
9588 have other hard disks linked to them at all.</li>
9589 </ul>
9590
9591 Note that the same hard disk, regardless of its type, may be attached to
9592 more than one virtual machine at a time. In this case, the machine that is
9593 started first gains exclusive access to the hard disk and attempts to
9594 start other machines having this hard disk attached will fail until the
9595 first machine is powered down.
9596
9597 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9598 that the given hard disk remains associated with the given machine after a
9599 successful <link to="IMachine::detachDevice"/> call until
9600 <link to="IMachine::saveSettings"/> is called to save all changes to
9601 machine settings to disk. This deferring is necessary to guarantee that
9602 the hard disk configuration may be restored at any time by a call to
9603 <link to="IMachine::discardSettings"/> before the settings
9604 are saved (committed).
9605
9606 Note that if <link to="IMachine::discardSettings"/> is called after
9607 indirectly attaching some hard disks to the machine but before a call to
9608 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9609 all differencing hard disks implicitly created by
9610 <link to="IMachine::attachDevice"/> for these indirect attachments.
9611 Such implicitly created hard disks will also be immediately deleted when
9612 detached explicitly using the <link to="IMachine::detachDevice"/>
9613 call if it is made before <link to="IMachine::saveSettings"/>. This
9614 implicit deletion is safe because newly created differencing hard
9615 disks do not contain any user data.
9616
9617 However, keep in mind that detaching differencing hard disks that were
9618 implicitly created by <link to="IMachine::attachDevice"/>
9619 before the last <link to="IMachine::saveSettings"/> call will
9620 <b>not</b> implicitly delete them as they may already contain some data
9621 (for example, as a result of virtual machine execution). If these hard
9622 disks are no more necessary, the caller can always delete them explicitly
9623 using <link to="#deleteStorage"/> after they are actually de-associated
9624 from this machine by the <link to="IMachine::saveSettings"/> call.
9625
9626 <h3>Smart Attachment</h3>
9627
9628 When normal base or immutable hard disks are indirectly attached to a
9629 virtual machine then some additional steps are performed to make sure the
9630 virtual machine will have the most recent "view" of the hard disk being
9631 attached. These steps include walking through the machine's snapshots
9632 starting from the current one and going through ancestors up to the first
9633 snapshot. Hard disks attached to the virtual machine in all
9634 of the encountered snapshots are checked whether they are descendants of
9635 the given normal base or immutable hard disk. The first found child (which
9636 is the differencing hard disk) will be used instead of the normal base or
9637 immutable hard disk as a parent for creating a new differencing hard disk
9638 that will be actually attached to the machine. And only if no descendants
9639 are found or if the virtual machine does not have any snapshots then the
9640 normal base or immutable hard disk will be used itself as a parent for
9641 this differencing hard disk.
9642
9643 It is easier to explain what smart attachment does using the
9644 following example:
9645 <pre>
9646BEFORE attaching B.vdi: AFTER attaching B.vdi:
9647
9648Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9649 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9650 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9651 Snapshot 4 (none) Snapshot 4 (none)
9652 CurState (none) CurState (D3->D2.vdi)
9653
9654 NOT
9655 ...
9656 CurState (D3->B.vdi)
9657 </pre>
9658 The first column is the virtual machine configuration before the base hard
9659 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9660 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9661 mean that the hard disk that is actually attached to the machine is a
9662 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9663 another hard disk, <tt>B.vdi</tt>.
9664
9665 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9666 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9667 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9668 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9669 it cannot be attached directly and needs an indirect attachment (i.e.
9670 implicit creation of a new differencing hard disk). Due to the smart
9671 attachment procedure, the new differencing hard disk
9672 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9673 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9674 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9675 machine.
9676
9677 Note that if there is more than one descendant hard disk of the given base
9678 hard disk found in a snapshot, and there is an exact device, channel and
9679 bus match, then this exact match will be used. Otherwise, the youngest
9680 descendant will be picked up.
9681
9682 There is one more important aspect of the smart attachment procedure which
9683 is not related to snapshots at all. Before walking through the snapshots
9684 as described above, the backup copy of the current list of hard disk
9685 attachment is searched for descendants. This backup copy is created when
9686 the hard disk configuration is changed for the first time after the last
9687 <link to="IMachine::saveSettings"/> call and used by
9688 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9689 changes. When such a descendant is found in this backup copy, it will be
9690 simply re-attached back, without creating a new differencing hard disk for
9691 it. This optimization is necessary to make it possible to re-attach the
9692 base or immutable hard disk to a different bus, channel or device slot
9693 without losing the contents of the differencing hard disk actually
9694 attached to the machine in place of it.
9695 </desc>
9696
9697 <attribute name="id" type="uuid" mod="string" readonly="yes">
9698 <desc>
9699 UUID of the medium. For a newly created medium, this value is a randomly
9700 generated UUID.
9701
9702 <note>
9703 For media in one of MediumState_NotCreated, MediumState_Creating or
9704 MediumState_Deleting states, the value of this property is undefined
9705 and will most likely be an empty UUID.
9706 </note>
9707 </desc>
9708 </attribute>
9709
9710 <attribute name="description" type="wstring">
9711 <desc>
9712 Optional description of the medium. For a newly created medium the value
9713 of this attribute is an empty string.
9714
9715 Medium types that don't support this attribute will return E_NOTIMPL in
9716 attempt to get or set this attribute's value.
9717
9718 <note>
9719 For some storage types, reading this attribute may return an outdated
9720 (last known) value when <link to="#state"/> is <link
9721 to="MediumState_Inaccessible"/> or <link
9722 to="MediumState_LockedWrite"/> because the value of this attribute is
9723 stored within the storage unit itself. Also note that changing the
9724 attribute value is not possible in such case, as well as when the
9725 medium is the <link to="MediumState_LockedRead"/> state.
9726 </note>
9727 </desc>
9728 </attribute>
9729
9730 <attribute name="state" type="MediumState" readonly="yes">
9731 <desc>
9732 Returns the current medium state, which is the last state set by
9733 the accessibility check performed by <link to="#refreshState"/>.
9734 If that method has not yet been called on the medium, the state
9735 is "Inaccessible"; as opposed to truly inaccessible media, the
9736 value of <link to="#lastAccessError"/> will be an empty string in
9737 that case.
9738
9739 <note>As of version 3.1, this no longer performs an accessibility check
9740 automatically; call <link to="#refreshState"/> for that.
9741 </note>
9742 </desc>
9743 </attribute>
9744
9745 <attribute name="location" type="wstring">
9746 <desc>
9747 Location of the storage unit holding medium data.
9748
9749 The format of the location string is medium type specific. For medium
9750 types using regular files in a host's file system, the location
9751 string is the full file name.
9752
9753 Some medium types may support changing the storage unit location by
9754 simply changing the value of this property. If this operation is not
9755 supported, the implementation will return E_NOTIMPL in attempt to set
9756 this attribute's value.
9757
9758 When setting a value of the location attribute which is a regular file
9759 in the host's file system, the given file name may be either relative to
9760 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9761 absolute. Note that if the given location specification does not contain
9762 the file extension part then a proper default extension will be
9763 automatically appended by the implementation depending on the medium type.
9764 </desc>
9765 </attribute>
9766
9767 <attribute name="name" type="wstring" readonly="yes">
9768 <desc>
9769 Name of the storage unit holding medium data.
9770
9771 The returned string is a short version of the <link to="#location"/>
9772 attribute that is suitable for representing the medium in situations
9773 where the full location specification is too long (such as lists
9774 and comboboxes in GUI frontends). This string is also used by frontends
9775 to sort the media list alphabetically when needed.
9776
9777 For example, for locations that are regular files in the host's file
9778 system, the value of this attribute is just the file name (+ extension),
9779 without the path specification.
9780
9781 Note that as opposed to the <link to="#location"/> attribute, the name
9782 attribute will not necessary be unique for a list of media of the
9783 given type and format.
9784 </desc>
9785 </attribute>
9786
9787 <attribute name="deviceType" type="DeviceType" readonly="yes">
9788 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9789 medium.</desc>
9790 </attribute>
9791
9792 <attribute name="hostDrive" type="boolean" readonly="yes">
9793 <desc>True if this corresponds to a drive on the host.</desc>
9794 </attribute>
9795
9796 <attribute name="size" type="unsigned long long" readonly="yes">
9797 <desc>
9798 Physical size of the storage unit used to hold medium data (in bytes).
9799
9800 <note>
9801 For media whose <link to="#state"/> is <link
9802 to="MediumState_Inaccessible"/>, the value of this property is the
9803 last known size. For <link to="MediumState_NotCreated"/> media,
9804 the returned value is zero.
9805 </note>
9806 </desc>
9807 </attribute>
9808
9809 <attribute name="format" type="wstring" readonly="yes">
9810 <desc>
9811 Storage format of this medium.
9812
9813 The value of this attribute is a string that specifies a backend used
9814 to store medium data. The storage format is defined when you create a
9815 new medium or automatically detected when you open an existing medium,
9816 and cannot be changed later.
9817
9818 The list of all storage formats supported by this VirtualBox
9819 installation can be obtained using
9820 <link to="ISystemProperties::mediumFormats"/>.
9821 </desc>
9822 </attribute>
9823
9824 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
9825 <desc>
9826 Storage medium format object corresponding to this medium.
9827
9828 The value of this attribute is a reference to the medium format object
9829 that specifies the backend properties used to store medium data. The
9830 storage format is defined when you create a new medium or automatically
9831 detected when you open an existing medium, and cannot be changed later.
9832
9833 <note>@c null is returned if there is no associated medium format
9834 object. This can e.g. happen for medium objects representing host
9835 drives and other special medium objects.</note>
9836 </desc>
9837 </attribute>
9838
9839 <attribute name="type" type="MediumType">
9840 <desc>
9841 Type (role) of this medium.
9842
9843 The following constraints apply when changing the value of this
9844 attribute:
9845 <ul>
9846 <li>If a medium is attached to a virtual machine (either in the
9847 current state or in one of the snapshots), its type cannot be
9848 changed.
9849 </li>
9850 <li>As long as the medium has children, its type cannot be set
9851 to <link to="MediumType_Writethrough"/>.
9852 </li>
9853 <li>The type of all differencing media is
9854 <link to="MediumType_Normal"/> and cannot be changed.
9855 </li>
9856 </ul>
9857
9858 The type of a newly created or opened medium is set to
9859 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9860 which have a type of <link to="MediumType_Writethrough"/>.
9861 </desc>
9862 </attribute>
9863
9864 <attribute name="parent" type="IMedium" readonly="yes">
9865 <desc>
9866 Parent of this medium (the medium this medium is directly based
9867 on).
9868
9869 Only differencing media have parents. For base (non-differencing)
9870 media, @c null is returned.
9871 </desc>
9872 </attribute>
9873
9874 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9875 <desc>
9876 Children of this medium (all differencing media directly based
9877 on this medium). A @c null array is returned if this medium
9878 does not have any children.
9879 </desc>
9880 </attribute>
9881
9882 <attribute name="base" type="IMedium" readonly="yes">
9883 <desc>
9884 Base medium of this medium.
9885
9886 If this is a differencing medium, its base medium is the medium
9887 the given medium branch starts from. For all other types of media, this
9888 property returns the medium object itself (i.e. the same object this
9889 property is read on).
9890 </desc>
9891 </attribute>
9892
9893 <attribute name="readOnly" type="boolean" readonly="yes">
9894 <desc>
9895 Returns @c true if this medium is read-only and @c false otherwise.
9896
9897 A medium is considered to be read-only when its contents cannot be
9898 modified without breaking the integrity of other parties that depend on
9899 this medium such as its child media or snapshots of virtual machines
9900 where this medium is attached to these machines. If there are no
9901 children and no such snapshots then there is no dependency and the
9902 medium is not read-only.
9903
9904 The value of this attribute can be used to determine the kind of the
9905 attachment that will take place when attaching this medium to a
9906 virtual machine. If the value is @c false then the medium will
9907 be attached directly. If the value is @c true then the medium
9908 will be attached indirectly by creating a new differencing child
9909 medium for that. See the interface description for more information.
9910
9911 Note that all <link to="MediumType_Immutable">Immutable</link> media
9912 are always read-only while all
9913 <link to="MediumType_Writethrough">Writethrough</link> media are
9914 always not.
9915
9916 <note>
9917 The read-only condition represented by this attribute is related to
9918 the medium type and usage, not to the current
9919 <link to="IMedium::state">medium state</link> and not to the read-only
9920 state of the storage unit.
9921 </note>
9922 </desc>
9923 </attribute>
9924
9925 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9926 <desc>
9927 Logical size of this medium (in megabytes), as reported to the
9928 guest OS running inside the virtual machine this medium is
9929 attached to. The logical size is defined when the medium is created
9930 and cannot be changed later.
9931
9932 <note>
9933 Reading this property on a differencing medium will return the size
9934 of its <link to="#base"/> medium.
9935 </note>
9936 <note>
9937 For media whose state is <link to="#state"/> is <link
9938 to="MediumState_Inaccessible"/>, the value of this property is the
9939 last known logical size. For <link to="MediumaState_NotCreated"/>
9940 media, the returned value is zero.
9941 </note>
9942 </desc>
9943 </attribute>
9944
9945 <attribute name="autoReset" type="boolean">
9946 <desc>
9947 Whether this differencing medium will be automatically reset each
9948 time a virtual machine it is attached to is powered up. This
9949 attribute is automatically set to @c true for the last
9950 differencing image of an "immutable" medium (see
9951 <link to="MediumType" />).
9952
9953 See <link to="#reset"/> for more information about resetting
9954 differencing media.
9955
9956 <note>
9957 Reading this property on a base (non-differencing) medium will
9958 always @c false. Changing the value of this property in this
9959 case is not supported.
9960 </note>
9961
9962 <result name="VBOX_E_NOT_SUPPORTED">
9963 This is not a differencing medium (when changing the attribute
9964 value).
9965 </result>
9966 </desc>
9967 </attribute>
9968
9969 <attribute name="lastAccessError" type="wstring" readonly="yes">
9970 <desc>
9971 Text message that represents the result of the last accessibility
9972 check performed by <link to="#refreshState"/>.
9973
9974 An empty string is returned if the last accessibility check
9975 was successful or has not yet been called. As a result, if
9976 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9977 then <link to="#refreshState"/> has yet to be called; this is the
9978 default value of media after VirtualBox initialization.
9979 A non-empty string indicates a failure and should normally describe
9980 a reason of the failure (for example, a file read error).
9981 </desc>
9982 </attribute>
9983
9984 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9985 <desc>
9986 Array of UUIDs of all machines this medium is attached to.
9987
9988 A @c null array is returned if this medium is not attached to any
9989 machine or to any machine's snapshot.
9990
9991 <note>
9992 The returned array will include a machine even if this medium is not
9993 attached to that machine in the current state but attached to it in
9994 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9995 details.
9996 </note>
9997 </desc>
9998 </attribute>
9999
10000 <method name="refreshState">
10001 <desc>
10002 If the current medium state (see <link to="MediumState"/>) is one of
10003 "Created", "Inaccessible" or "LockedRead", then this performs an
10004 accessibility check on the medium and sets the value of the <link to="#state"/>
10005 attribute accordingly; that value is also returned for convenience.
10006
10007 For all other state values, this does not perform a refresh but returns
10008 the state only.
10009
10010 The refresh, if performed, may take a long time (several seconds or even
10011 minutes, depending on the storage unit location and format) because it performs an
10012 accessibility check of the storage unit. This check may cause a significant
10013 delay if the storage unit of the given medium is, for example, a file located
10014 on a network share which is not currently accessible due to connectivity
10015 problems. In that case, the call will not return until a timeout
10016 interval defined by the host OS for this operation expires. For this reason,
10017 it is recommended to never read this attribute on the main UI thread to avoid
10018 making the UI unresponsive.
10019
10020 If the last known state of the medium is "Created" and the accessibility
10021 check fails, then the state would be set to "Inaccessible", and
10022 <link to="#lastAccessError"/> may be used to get more details about the
10023 failure. If the state of the medium is "LockedRead", then it remains the
10024 same, and a non-empty value of <link to="#lastAccessError"/> will
10025 indicate a failed accessibility check in this case.
10026
10027 Note that not all medium states are applicable to all medium types.
10028 </desc>
10029 <param name="state" type="MediumState" dir="return">
10030 <desc>
10031 New medium state.
10032 </desc>
10033 </param>
10034 </method>
10035
10036 <method name="getSnapshotIds">
10037 <desc>
10038 Returns an array of UUIDs of all snapshots of the given machine where
10039 this medium is attached to.
10040
10041 If the medium is attached to the machine in the current state, then the
10042 first element in the array will always be the ID of the queried machine
10043 (i.e. the value equal to the @c machineId argument), followed by
10044 snapshot IDs (if any).
10045
10046 If the medium is not attached to the machine in the current state, then
10047 the array will contain only snapshot IDs.
10048
10049 The returned array may be @c null if this medium is not attached
10050 to the given machine at all, neither in the current state nor in one of
10051 the snapshots.
10052 </desc>
10053 <param name="machineId" type="uuid" mod="string" dir="in">
10054 <desc>
10055 UUID of the machine to query.
10056 </desc>
10057 </param>
10058 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
10059 <desc>
10060 Array of snapshot UUIDs of the given machine using this medium.
10061 </desc>
10062 </param>
10063 </method>
10064
10065 <method name="lockRead">
10066 <desc>
10067 Locks this medium for reading.
10068
10069 A read lock is shared: many clients can simultaneously lock the
10070 same medium for reading unless it is already locked for writing (see
10071 <link to="#lockWrite"/>) in which case an error is returned.
10072
10073 When the medium is locked for reading, it cannot be modified
10074 from within VirtualBox. This means that any method that changes
10075 the properties of this medium or contents of the storage unit
10076 will return an error (unless explicitly stated otherwise). That
10077 includes an attempt to start a virtual machine that wants to
10078 write to the the medium.
10079
10080 When the virtual machine is started up, it locks for reading all
10081 media it uses in read-only mode. If some medium cannot be locked
10082 for reading, the startup procedure will fail.
10083 A medium is typically locked for reading while it is used by a running
10084 virtual machine but has a depending differencing image that receives
10085 the actual write operations. This way one base medium can have
10086 multiple child differencing images which can be written to
10087 simultaneously. Read-only media such as DVD and floppy images are
10088 also locked for reading only (so they can be in use by multiple
10089 machines simultaneously).
10090
10091 A medium is also locked for reading when it is the source of a
10092 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
10093
10094 The medium locked for reading must be unlocked using the <link
10095 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
10096 can be nested and must be followed by the same number of paired
10097 <link to="#unlockRead"/> calls.
10098
10099 This method sets the medium state (see <link to="#state"/>) to
10100 "LockedRead" on success. The medium's previous state must be
10101 one of "Created", "Inaccessible" or "LockedRead".
10102
10103 Locking an inaccessible medium is not an error; this method performs
10104 a logical lock that prevents modifications of this medium through
10105 the VirtualBox API, not a physical file-system lock of the underlying
10106 storage unit.
10107
10108 This method returns the current state of the medium
10109 <i>before</i> the operation.
10110
10111 <result name="VBOX_E_INVALID_OBJECT_STATE">
10112 Invalid medium state (e.g. not created, locked, inaccessible,
10113 creating, deleting).
10114 </result>
10115
10116 </desc>
10117 <param name="state" type="MediumState" dir="return">
10118 <desc>
10119 State of the medium after the operation.
10120 </desc>
10121 </param>
10122 </method>
10123
10124 <method name="unlockRead">
10125 <desc>
10126 Cancels the read lock previously set by <link to="#lockRead"/>.
10127
10128 For both success and failure, this method returns the current state
10129 of the medium <i>after</i> the operation.
10130
10131 See <link to="#lockRead"/> for more details.
10132
10133 <result name="VBOX_E_INVALID_OBJECT_STATE">
10134 Medium not locked for reading.
10135 </result>
10136
10137 </desc>
10138 <param name="state" type="MediumState" dir="return">
10139 <desc>
10140 State of the medium after the operation.
10141 </desc>
10142 </param>
10143 </method>
10144
10145 <method name="lockWrite">
10146 <desc>
10147 Locks this medium for writing.
10148
10149 A write lock, as opposed to <link to="#lockRead"/>, is
10150 exclusive: there may be only one client holding a write lock,
10151 and there may be no read locks while the write lock is held.
10152 As a result, read-locking fails if a write lock is held, and
10153 write-locking fails if either a read or another write lock is held.
10154
10155 When a medium is locked for writing, it cannot be modified
10156 from within VirtualBox, and it is not guaranteed that the values
10157 of its properties are up-to-date. Any method that changes the
10158 properties of this medium or contents of the storage unit will
10159 return an error (unless explicitly stated otherwise).
10160
10161 When a virtual machine is started up, it locks for writing all
10162 media it uses to write data to. If any medium could not be locked
10163 for writing, the startup procedure will fail. If a medium has
10164 differencing images, then while the machine is running, only
10165 the last ("leaf") differencing image is locked for writing,
10166 whereas its parents are locked for reading only.
10167
10168 A medium is also locked for writing when it is the target of a
10169 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
10170
10171 The medium locked for writing must be unlocked using the <link
10172 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
10173
10174 This method sets the medium state (see <link to="#state"/>) to
10175 "LockedWrite" on success. The medium's previous state must be
10176 either "Created" or "Inaccessible".
10177
10178 Locking an inaccessible medium is not an error; this method performs
10179 a logical lock that prevents modifications of this medium through
10180 the VirtualBox API, not a physical file-system lock of the underlying
10181 storage unit.
10182
10183 For both, success and failure, this method returns the current
10184 state of the medium <i>before</i> the operation.
10185
10186 <result name="VBOX_E_INVALID_OBJECT_STATE">
10187 Invalid medium state (e.g. not created, locked, inaccessible,
10188 creating, deleting).
10189 </result>
10190
10191 </desc>
10192 <param name="state" type="MediumState" dir="return">
10193 <desc>
10194 State of the medium after the operation.
10195 </desc>
10196 </param>
10197 </method>
10198
10199 <method name="unlockWrite">
10200 <desc>
10201 Cancels the write lock previously set by <link to="#lockWrite"/>.
10202
10203 For both success and failure, this method returns the current
10204 state of the medium <i>after</i> the operation.
10205
10206 See <link to="#lockWrite"/> for more details.
10207
10208 <result name="VBOX_E_INVALID_OBJECT_STATE">
10209 Medium not locked for writing.
10210 </result>
10211
10212 </desc>
10213 <param name="state" type="MediumState" dir="return">
10214 <desc>
10215 State of the medium after the operation.
10216 </desc>
10217 </param>
10218 </method>
10219
10220 <method name="close">
10221 <desc>
10222 Closes this medium.
10223
10224 The medium must not be attached to any known virtual machine
10225 and must not have any known child media, otherwise the
10226 operation will fail.
10227
10228 When the medium is successfully closed, it gets removed from
10229 the list of remembered media, but its storage unit is not
10230 deleted. In particular, this means that this medium can be
10231 later opened again using the <link
10232 to="IVirtualBox::openHardDisk"/> call.
10233
10234 Note that after this method successfully returns, the given medium
10235 object becomes uninitialized. This means that any attempt
10236 to call any of its methods or attributes will fail with the
10237 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
10238
10239 <result name="VBOX_E_INVALID_OBJECT_STATE">
10240 Invalid medium state (other than not created, created or
10241 inaccessible).
10242 </result>
10243 <result name="VBOX_E_OBJECT_IN_USE">
10244 Medium attached to virtual machine.
10245 </result>
10246 <result name="VBOX_E_FILE_ERROR">
10247 Settings file not accessible.
10248 </result>
10249 <result name="VBOX_E_XML_ERROR">
10250 Could not parse the settings file.
10251 </result>
10252
10253 </desc>
10254 </method>
10255
10256 <!-- storage methods -->
10257
10258 <method name="getProperty">
10259 <desc>
10260 Returns the value of the custom medium property with the given name.
10261
10262 The list of all properties supported by the given medium format can
10263 be obtained with <link to="IMediumFormat::describeProperties"/>.
10264
10265 Note that if this method returns an empty string in @a value, the
10266 requested property is supported but currently not assigned any value.
10267
10268 <result name="VBOX_E_OBJECT_NOT_FOUND">
10269 Requested property does not exist (not supported by the format).
10270 </result>
10271 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
10272 </desc>
10273 <param name="name" type="wstring" dir="in">
10274 <desc>Name of the property to get.</desc>
10275 </param>
10276 <param name="value" type="wstring" dir="return">
10277 <desc>Current property value.</desc>
10278 </param>
10279 </method>
10280
10281 <method name="setProperty">
10282 <desc>
10283 Sets the value of the custom medium property with the given name.
10284
10285 The list of all properties supported by the given medium format can
10286 be obtained with <link to="IMediumFormat::describeProperties"/>.
10287
10288 Note that setting the property value to @c null or an empty string is
10289 equivalent to deleting the existing value. A default value (if it is
10290 defined for this property) will be used by the format backend in this
10291 case.
10292
10293 <result name="VBOX_E_OBJECT_NOT_FOUND">
10294 Requested property does not exist (not supported by the format).
10295 </result>
10296 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
10297 </desc>
10298 <param name="name" type="wstring" dir="in">
10299 <desc>Name of the property to set.</desc>
10300 </param>
10301 <param name="value" type="wstring" dir="in">
10302 <desc>Property value to set.</desc>
10303 </param>
10304 </method>
10305
10306 <method name="getProperties">
10307 <desc>
10308 Returns values for a group of properties in one call.
10309
10310 The names of the properties to get are specified using the @a names
10311 argument which is a list of comma-separated property names or
10312 an empty string if all properties are to be returned. Note that currently
10313 the value of this argument is ignored and the method always returns all
10314 existing properties.
10315
10316 The list of all properties supported by the given medium format can
10317 be obtained with <link to="IMediumFormat::describeProperties"/>.
10318
10319 The method returns two arrays, the array of property names corresponding
10320 to the @a names argument and the current values of these properties.
10321 Both arrays have the same number of elements with each elemend at the
10322 given index in the first array corresponds to an element at the same
10323 index in the second array.
10324
10325 Note that for properties that do not have assigned values,
10326 an empty string is returned at the appropriate index in the
10327 @a returnValues array.
10328
10329 </desc>
10330 <param name="names" type="wstring" dir="in">
10331 <desc>
10332 Names of properties to get.
10333 </desc>
10334 </param>
10335 <param name="returnNames" type="wstring" safearray="yes" dir="out">
10336 <desc>Names of returned properties.</desc>
10337 </param>
10338 <param name="returnValues" type="wstring" safearray="yes" dir="return">
10339 <desc>Values of returned properties.</desc>
10340 </param>
10341 </method>
10342
10343 <method name="setProperties">
10344 <desc>
10345 Sets values for a group of properties in one call.
10346
10347 The names of the properties to set are passed in the @a names
10348 array along with the new values for them in the @a values array. Both
10349 arrays have the same number of elements with each elemend at the given
10350 index in the first array corresponding to an element at the same index
10351 in the second array.
10352
10353 If there is at least one property name in @a names that is not valid,
10354 the method will fail before changing the values of any other properties
10355 from the @a names array.
10356
10357 Using this method over <link to="#setProperty"/> is preferred if you
10358 need to set several properties at once since it will result into less
10359 IPC calls.
10360
10361 The list of all properties supported by the given medium format can
10362 be obtained with <link to="IMediumFormat::describeProperties"/>.
10363
10364 Note that setting the property value to @c null or an empty string is
10365 equivalent to deleting the existing value. A default value (if it is
10366 defined for this property) will be used by the format backend in this
10367 case.
10368 </desc>
10369 <param name="names" type="wstring" safearray="yes" dir="in">
10370 <desc>Names of properties to set.</desc>
10371 </param>
10372 <param name="values" type="wstring" safearray="yes" dir="in">
10373 <desc>Values of properties to set.</desc>
10374 </param>
10375 </method>
10376
10377 <!-- storage methods -->
10378
10379 <method name="createBaseStorage">
10380 <desc>
10381 Starts creating a hard disk storage unit (fixed/dynamic, according
10382 to the variant flags) in in the background. The previous storage unit
10383 created for this object, if any, must first be deleted using
10384 <link to="#deleteStorage"/>, otherwise the operation will fail.
10385
10386 Before the operation starts, the medium is placed in
10387 <link to="MediumState_Creating"/> state. If the create operation
10388 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
10389 state.
10390
10391 After the returned progress object reports that the operation has
10392 successfully completed, the medium state will be set to <link
10393 to="MediumState_Created"/>, the medium will be remembered by this
10394 VirtualBox installation and may be attached to virtual machines.
10395
10396 <result name="VBOX_E_NOT_SUPPORTED">
10397 The variant of storage creation operation is not supported. See <link
10398 to="IMediumFormat::capabilities"/>.
10399 </result>
10400 </desc>
10401 <param name="logicalSize" type="unsigned long long" dir="in">
10402 <desc>Maximum logical size of the medium in megabytes.</desc>
10403 </param>
10404 <param name="variant" type="MediumVariant" dir="in">
10405 <desc>Exact image variant which should be created.</desc>
10406 </param>
10407 <param name="progress" type="IProgress" dir="return">
10408 <desc>Progress object to track the operation completion.</desc>
10409 </param>
10410 </method>
10411
10412 <method name="deleteStorage">
10413 <desc>
10414 Starts deleting the storage unit of this medium.
10415
10416 The medium must not be attached to any known virtual machine and must
10417 not have any known child media, otherwise the operation will fail.
10418 It will also fail if there is no storage unit to delete or if deletion
10419 is already in progress, or if the medium is being in use (locked for
10420 read or for write) or inaccessible. Therefore, the only valid state for
10421 this operation to succeed is <link to="MediumState_Created"/>.
10422
10423 Before the operation starts, the medium is placed in
10424 <link to="MediumState_Deleting"/> state and gets removed from the list
10425 of remembered hard disks (media registry). If the delete operation
10426 fails, the medium will be remembered again and placed back to
10427 <link to="MediumState_Created"/> state.
10428
10429 After the returned progress object reports that the operation is
10430 complete, the medium state will be set to
10431 <link to="MediumState_NotCreated"/> and you will be able to use one of
10432 the storage creation methods to create it again.
10433
10434 <see>#close()</see>
10435
10436 <result name="VBOX_E_OBJECT_IN_USE">
10437 Medium is attached to a virtual machine.
10438 </result>
10439 <result name="VBOX_E_NOT_SUPPORTED">
10440 Storage deletion is not allowed because neither of storage creation
10441 operations are supported. See
10442 <link to="IMediumFormat::capabilities"/>.
10443 </result>
10444
10445 <note>
10446 If the deletion operation fails, it is not guaranteed that the storage
10447 unit still exists. You may check the <link to="IMedium::state"/> value
10448 to answer this question.
10449 </note>
10450 </desc>
10451 <param name="progress" type="IProgress" dir="return">
10452 <desc>Progress object to track the operation completion.</desc>
10453 </param>
10454 </method>
10455
10456 <!-- diff methods -->
10457
10458 <method name="createDiffStorage">
10459 <desc>
10460 Starts creating an empty differencing storage unit based on this
10461 medium in the format and at the location defined by the @a target
10462 argument.
10463
10464 The target medium must be in <link to="MediumState_NotCreated"/>
10465 state (i.e. must not have an existing storage unit). Upon successful
10466 completion, this operation will set the type of the target medium to
10467 <link to="MediumType_Normal"/> and create a storage unit necessary to
10468 represent the differencing medium data in the given format (according
10469 to the storage format of the target object).
10470
10471 After the returned progress object reports that the operation is
10472 successfully complete, the target medium gets remembered by this
10473 VirtualBox installation and may be attached to virtual machines.
10474
10475 <note>
10476 The medium will be set to <link to="MediumState_LockedRead"/>
10477 state for the duration of this operation.
10478 </note>
10479 <result name="VBOX_E_OBJECT_IN_USE">
10480 Medium not in @c NotCreated state.
10481 </result>
10482 </desc>
10483 <param name="target" type="IMedium" dir="in">
10484 <desc>Target medium.</desc>
10485 </param>
10486 <param name="variant" type="MediumVariant" dir="in">
10487 <desc>Exact image variant which should be created.</desc>
10488 </param>
10489 <param name="progress" type="IProgress" dir="return">
10490 <desc>Progress object to track the operation completion.</desc>
10491 </param>
10492 </method>
10493
10494 <method name="mergeTo">
10495 <desc>
10496 Starts merging the contents of this medium and all intermediate
10497 differencing media in the chain to the given target medium.
10498
10499 The target medium must be either a descendant of this medium or
10500 its ancestor (otherwise this method will immediately return a failure).
10501 It follows that there are two logical directions of the merge operation:
10502 from ancestor to descendant (<i>forward merge</i>) and from descendant to
10503 ancestor (<i>backward merge</i>). Let us consider the following medium
10504 chain:
10505
10506 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
10507
10508 Here, calling this method on the <tt>Base</tt> medium object with
10509 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
10510 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
10511 merge. Note that in both cases the contents of the resulting medium
10512 will be the same, the only difference is the medium object that takes
10513 the result of the merge operation. In case of the forward merge in the
10514 above example, the result will be written to <tt>Diff_2</tt>; in case of
10515 the backward merge, the result will be written to <tt>Base</tt>. In
10516 other words, the result of the operation is always stored in the target
10517 medium.
10518
10519 Upon successful operation completion, the storage units of all media in
10520 the chain between this (source) medium and the target medium, including
10521 the source medium itself, will be automatically deleted and the
10522 relevant medium objects (including this medium) will become
10523 uninitialized. This means that any attempt to call any of
10524 their methods or attributes will fail with the
10525 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
10526 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
10527 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
10528 Note that <tt>Diff_2</tt> in this case will become a base medium
10529 itself since it will no longer be based on any other medium.
10530
10531 Considering the above, all of the following conditions must be met in
10532 order for the merge operation to succeed:
10533 <ul>
10534 <li>
10535 Neither this (source) medium nor any intermediate
10536 differencing medium in the chain between it and the target
10537 medium is attached to any virtual machine.
10538 </li>
10539 <li>
10540 Neither the source medium nor the target medium is an
10541 <link to="MediumType_Immutable"/> medium.
10542 </li>
10543 <li>
10544 The part of the medium tree from the source medium to the
10545 target medium is a linear chain, i.e. all medium in this
10546 chain have exactly one child which is the next medium in this
10547 chain. The only exception from this rule is the target medium in
10548 the forward merge operation; it is allowed to have any number of
10549 child media because the merge operation will not change its
10550 logical contents (as it is seen by the guest OS or by children).
10551 </li>
10552 <li>
10553 None of the involved media are in
10554 <link to="MediumState_LockedRead"/> or
10555 <link to="MediumState_LockedWrite"/> state.
10556 </li>
10557 </ul>
10558
10559 <note>
10560 This (source) medium and all intermediates will be placed to <link
10561 to="MediumState_Deleting"/> state and the target medium will be
10562 placed to <link to="MediumState_LockedWrite"/> state and for the
10563 duration of this operation.
10564 </note>
10565 </desc>
10566 <param name="target" type="IMedium" dir="in">
10567 <desc>Target medium.</desc>
10568 </param>
10569 <param name="progress" type="IProgress" dir="return">
10570 <desc>Progress object to track the operation completion.</desc>
10571 </param>
10572 </method>
10573
10574 <!-- clone method -->
10575
10576 <method name="cloneTo">
10577 <desc>
10578 Starts creating a clone of this medium in the format and at the
10579 location defined by the @a target argument.
10580
10581 The target medium must be either in <link to="MediumState_NotCreated"/>
10582 state (i.e. must not have an existing storage unit) or in
10583 <link to="MediumState_Created"/> state (i.e. created and not locked, and
10584 big enough to hold the data or else the copy will be partial). Upon
10585 successful completion, the cloned medium will contain exactly the
10586 same sector data as the medium being cloned, except that in the
10587 first case a new UUID for the clone will be randomly generated, and in
10588 the second case the UUID will remain unchanged.
10589
10590 The @a parent argument defines which medium will be the parent
10591 of the clone. Passing a @c null reference indicates that the clone will
10592 be a base image, i.e. completely independent. It is possible to specify
10593 an arbitrary medium for this parameter, including the parent of the
10594 medium which is being cloned. Even cloning to a child of the source
10595 medium is possible. Note that when cloning to an existing image, the
10596 @a parent irgument is ignored.
10597
10598 After the returned progress object reports that the operation is
10599 successfully complete, the target medium gets remembered by this
10600 VirtualBox installation and may be attached to virtual machines.
10601
10602 <note>
10603 This medium will be placed to <link to="MediumState_LockedRead"/>
10604 state for the duration of this operation.
10605 </note>
10606 <result name="E_NOTIMPL">
10607 The specified cloning variant is not supported at the moment.
10608 </result>
10609 </desc>
10610 <param name="target" type="IMedium" dir="in">
10611 <desc>Target medium.</desc>
10612 </param>
10613 <param name="variant" type="MediumVariant" dir="in">
10614 <desc>Exact image variant which should be created.</desc>
10615 </param>
10616 <param name="parent" type="IMedium" dir="in">
10617 <desc>Parent of the cloned medium.</desc>
10618 </param>
10619 <param name="progress" type="IProgress" dir="return">
10620 <desc>Progress object to track the operation completion.</desc>
10621 </param>
10622 </method>
10623
10624 <!-- other methods -->
10625
10626 <method name="compact">
10627 <desc>
10628 Starts compacting of this medium. This means that the medium is
10629 transformed into a possibly more compact storage representation.
10630 This potentially creates temporary images, which can require a
10631 substantial amount of additional disk space.
10632
10633 This medium will be placed to <link to="MediumState_LockedWrite"/>
10634 state and all its parent media (if any) will be placed to
10635 <link to="MediumState_LockedRead"/> state for the duration of this
10636 operation.
10637
10638 Please note that the results can be either returned straight away,
10639 or later as the result of the background operation via the object
10640 returned via the @a progress parameter.
10641
10642 <result name="VBOX_E_NOT_SUPPORTED">
10643 Medium format does not support compacting (but potentially
10644 needs it).
10645 </result>
10646 </desc>
10647 <param name="progress" type="IProgress" dir="return">
10648 <desc>Progress object to track the operation completion.</desc>
10649 </param>
10650 </method>
10651
10652 <method name="resize">
10653 <desc>
10654 Starts resizing this medium. This means that the nominal size of the
10655 medium is set to the new value. Both increasing and decreasing the
10656 size is possible, and there are no safety checks, since VirtualBox
10657 does not make any assumptions about the medium contents.
10658
10659 Resizing usually needs additional disk space, and possibly also
10660 some temporary disk space. Note that resize does not create a full
10661 temporary copy of the medium, so the additional disk space requirement
10662 is usually much lower than using the clone operation.
10663
10664 This medium will be placed to <link to="MediumState_LockedWrite"/>
10665 state for the duration of this operation.
10666
10667 Please note that the results can be either returned straight away,
10668 or later as the result of the background operation via the object
10669 returned via the @a progress parameter.
10670
10671 <result name="VBOX_E_NOT_SUPPORTED">
10672 Medium format does not support resizing.
10673 </result>
10674 </desc>
10675 <param name="logicalSize" type="unsigned long long" dir="in">
10676 <desc>New nominal capacity of the medium in megabytes.</desc>
10677 </param>
10678 <param name="progress" type="IProgress" dir="return">
10679 <desc>Progress object to track the operation completion.</desc>
10680 </param>
10681 </method>
10682
10683 <method name="reset">
10684 <desc>
10685 Starts erasing the contents of this differencing medium.
10686
10687 This operation will reset the differencing medium to its initial
10688 state when it does not contain any sector data and any read operation is
10689 redirected to its parent medium. This automatically gets called
10690 during VM power-up for every medium whose <link to="#autoReset" />
10691 attribute is @c true.
10692
10693 The medium will be write-locked for the duration of this operation (see
10694 <link to="#lockWrite" />).
10695
10696 <result name="VBOX_E_NOT_SUPPORTED">
10697 This is not a differencing medium.
10698 </result>
10699 <result name="VBOX_E_INVALID_OBJECT_STATE">
10700 Medium is not in <link to="MediumState_Created"/> or
10701 <link to="MediumState_Inaccessible"/> state.
10702 </result>
10703 </desc>
10704 <param name="progress" type="IProgress" dir="return">
10705 <desc>Progress object to track the operation completion.</desc>
10706 </param>
10707 </method>
10708
10709 </interface>
10710
10711
10712 <!--
10713 // IMediumFormat
10714 /////////////////////////////////////////////////////////////////////////
10715 -->
10716
10717 <enum
10718 name="DataType"
10719 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10720 >
10721 <const name="Int32" value="0"/>
10722 <const name="Int8" value="1"/>
10723 <const name="String" value="2"/>
10724 </enum>
10725
10726 <enum
10727 name="DataFlags"
10728 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10729 >
10730 <const name="None" value="0x00"/>
10731 <const name="Mandatory" value="0x01"/>
10732 <const name="Expert" value="0x02"/>
10733 <const name="Array" value="0x04"/>
10734 <const name="FlagMask" value="0x07"/>
10735 </enum>
10736
10737 <enum
10738 name="MediumFormatCapabilities"
10739 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
10740 >
10741 <desc>
10742 Medium format capability flags.
10743 </desc>
10744
10745 <const name="Uuid" value="0x01">
10746 <desc>
10747 Supports UUIDs as expected by VirtualBox code.
10748 </desc>
10749 </const>
10750
10751 <const name="CreateFixed" value="0x02">
10752 <desc>
10753 Supports creating fixed size images, allocating all space instantly.
10754 </desc>
10755 </const>
10756
10757 <const name="CreateDynamic" value="0x04">
10758 <desc>
10759 Supports creating dynamically growing images, allocating space on
10760 demand.
10761 </desc>
10762 </const>
10763
10764 <const name="CreateSplit2G" value="0x08">
10765 <desc>
10766 Supports creating images split in chunks of a bit less than 2 GBytes.
10767 </desc>
10768 </const>
10769
10770 <const name="Differencing" value="0x10">
10771 <desc>
10772 Supports being used as a format for differencing media (see <link
10773 to="IMedium::createDiffStorage"/>).
10774 </desc>
10775 </const>
10776
10777 <const name="Asynchronous" value="0x20">
10778 <desc>
10779 Supports asynchronous I/O operations for at least some configurations.
10780 </desc>
10781 </const>
10782
10783 <const name="File" value="0x40">
10784 <desc>
10785 The format backend operates on files (the <link to="IMedium::location"/>
10786 attribute of the medium specifies a file used to store medium
10787 data; for a list of supported file extensions see
10788 <link to="IMediumFormat::fileExtensions"/>).
10789 </desc>
10790 </const>
10791
10792 <const name="Properties" value="0x80">
10793 <desc>
10794 The format backend uses the property interface to configure the storage
10795 location and properties (the <link to="IMediumFormat::describeProperties"/>
10796 method is used to get access to properties supported by the given medium format).
10797 </desc>
10798 </const>
10799
10800 <const name="CapabilityMask" value="0xFF"/>
10801 </enum>
10802
10803 <interface
10804 name="IMediumFormat" extends="$unknown"
10805 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10806 wsmap="managed"
10807 >
10808 <desc>
10809 The IMediumFormat interface represents a medium format.
10810
10811 Each medium format has an associated backend which is used to handle
10812 media stored in this format. This interface provides information
10813 about the properties of the associated backend.
10814
10815 Each medium format is identified by a string represented by the
10816 <link to="#id"/> attribute. This string is used in calls like
10817 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10818 format.
10819
10820 The list of all supported medium formats can be obtained using
10821 <link to="ISystemProperties::mediaFormats"/>.
10822
10823 <see>IMedium</see>
10824 </desc>
10825
10826 <attribute name="id" type="wstring" readonly="yes">
10827 <desc>
10828 Identifier of this format.
10829
10830 The format identifier is a non-@c null non-empty ASCII string. Note that
10831 this string is case-insensitive. This means that, for example, all of
10832 the following strings:
10833 <pre>
10834 "VDI"
10835 "vdi"
10836 "VdI"</pre>
10837 refer to the same medium format.
10838
10839 This string is used in methods of other interfaces where it is necessary
10840 to specify a medium format, such as
10841 <link to="IVirtualBox::createHardDisk"/>.
10842 </desc>
10843 </attribute>
10844
10845 <attribute name="name" type="wstring" readonly="yes">
10846 <desc>
10847 Human readable description of this format.
10848
10849 Mainly for use in file open dialogs.
10850 </desc>
10851 </attribute>
10852
10853 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10854 <desc>
10855 Array of strings containing the supported file extensions.
10856
10857 The first extension in the array is the extension preferred by the
10858 backend. It is recommended to use this extension when specifying a
10859 location of the storage unit for a new medium.
10860
10861 Note that some backends do not work on files, so this array may be
10862 empty.
10863
10864 <see>IMediumFormat::capabilities</see>
10865 </desc>
10866 </attribute>
10867
10868 <attribute name="capabilities" type="unsigned long" readonly="yes">
10869 <desc>
10870 Capabilities of the format as a set of bit flags.
10871
10872 For the meaning of individual capability flags see
10873 <link to="MediumFormatCapabilities"/>.
10874 </desc>
10875 </attribute>
10876
10877 <method name="describeProperties">
10878 <desc>
10879 Returns several arrays describing the properties supported by this
10880 format.
10881
10882 An element with the given index in each array describes one
10883 property. Thus, the number of elements in each returned array is the
10884 same and corresponds to the number of supported properties.
10885
10886 The returned arrays are filled in only if the
10887 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10888 All arguments must be non-@c null.
10889
10890 <see>DataType</see>
10891 <see>DataFlags</see>
10892 </desc>
10893
10894 <param name="names" type="wstring" safearray="yes" dir="out">
10895 <desc>Array of property names.</desc>
10896 </param>
10897 <param name="description" type="wstring" safearray="yes" dir="out">
10898 <desc>Array of property descriptions.</desc>
10899 </param>
10900 <param name="types" type="DataType" safearray="yes" dir="out">
10901 <desc>Array of property types.</desc>
10902 </param>
10903 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10904 <desc>Array of property flags.</desc>
10905 </param>
10906 <param name="defaults" type="wstring" safearray="yes" dir="out">
10907 <desc>Array of default property values.</desc>
10908 </param>
10909 </method>
10910
10911 </interface>
10912
10913
10914 <!--
10915 // IKeyboard
10916 /////////////////////////////////////////////////////////////////////////
10917 -->
10918
10919 <interface
10920 name="IKeyboard" extends="$unknown"
10921 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10922 wsmap="managed"
10923 >
10924 <desc>
10925 The IKeyboard interface represents the virtual machine's keyboard. Used
10926 in <link to="IConsole::keyboard"/>.
10927
10928 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10929 to the virtual machine.
10930
10931 </desc>
10932 <method name="putScancode">
10933 <desc>Sends a scancode to the keyboard.
10934
10935 <result name="VBOX_E_IPRT_ERROR">
10936 Could not send scan code to virtual keyboard.
10937 </result>
10938
10939 </desc>
10940 <param name="scancode" type="long" dir="in"/>
10941 </method>
10942
10943 <method name="putScancodes">
10944 <desc>Sends an array of scancodes to the keyboard.
10945
10946 <result name="VBOX_E_IPRT_ERROR">
10947 Could not send all scan codes to virtual keyboard.
10948 </result>
10949
10950 </desc>
10951 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10952 <param name="codesStored" type="unsigned long" dir="return"/>
10953 </method>
10954
10955 <method name="putCAD">
10956 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10957 function is nothing special, it is just a convenience function
10958 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10959
10960 <result name="VBOX_E_IPRT_ERROR">
10961 Could not send all scan codes to virtual keyboard.
10962 </result>
10963
10964 </desc>
10965 </method>
10966
10967 </interface>
10968
10969
10970 <!--
10971 // IMouse
10972 /////////////////////////////////////////////////////////////////////////
10973 -->
10974
10975 <enum
10976 name="MouseButtonState"
10977 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10978 >
10979 <desc>
10980 Mouse button state.
10981 </desc>
10982
10983 <const name="LeftButton" value="0x01"/>
10984 <const name="RightButton" value="0x02"/>
10985 <const name="MiddleButton" value="0x04"/>
10986 <const name="WheelUp" value="0x08"/>
10987 <const name="WheelDown" value="0x10"/>
10988 <const name="XButton1" value="0x20"/>
10989 <const name="XButton2" value="0x40"/>
10990 <const name="MouseStateMask" value="0x7F"/>
10991 </enum>
10992
10993 <interface
10994 name="IMouse" extends="$unknown"
10995 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10996 wsmap="managed"
10997 >
10998 <desc>
10999 The IMouse interface represents the virtual machine's mouse. Used in
11000 <link to="IConsole::mouse"/>.
11001
11002 Through this interface, the virtual machine's virtual mouse can be
11003 controlled.
11004 </desc>
11005
11006 <attribute name="absoluteSupported" type="boolean" readonly="yes">
11007 <desc>
11008 Whether the guest OS supports absolute mouse pointer positioning
11009 or not.
11010 <note>
11011 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
11012 callback to be instantly informed about changes of this attribute
11013 during virtual machine execution.
11014 </note>
11015 <see><link to="#putMouseEventAbsolute"/></see>
11016 </desc>
11017 </attribute>
11018
11019 <attribute name="relativeSupported" type="boolean" readonly="yes">
11020 <desc>
11021 Whether the guest OS supports relative mouse pointer positioning
11022 or not.
11023 <note>
11024 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
11025 callback to be instantly informed about changes of this attribute
11026 during virtual machine execution.
11027 </note>
11028 <see><link to="#putMouseEvent"/></see>
11029 </desc>
11030 </attribute>
11031
11032 <attribute name="needsHostCursor" type="boolean" readonly="yes">
11033 <desc>
11034 Whether the guest OS can currently switch to drawing it's own mouse
11035 cursor on demand.
11036 <note>
11037 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
11038 callback to be instantly informed about changes of this attribute
11039 during virtual machine execution.
11040 </note>
11041 <see><link to="#putMouseEvent"/></see>
11042 </desc>
11043 </attribute>
11044
11045 <method name="putMouseEvent">
11046 <desc>
11047 Initiates a mouse event using relative pointer movements
11048 along x and y axis.
11049
11050 <result name="E_ACCESSDENIED">
11051 Console not powered up.
11052 </result>
11053 <result name="VBOX_E_IPRT_ERROR">
11054 Could not send mouse event to virtual mouse.
11055 </result>
11056
11057 </desc>
11058
11059 <param name="dx" type="long" dir="in">
11060 <desc>
11061 Amount of pixels the mouse should move to the right.
11062 Negative values move the mouse to the left.
11063 </desc>
11064 </param>
11065 <param name="dy" type="long" dir="in">
11066 <desc>
11067 Amount of pixels the mouse should move downwards.
11068 Negative values move the mouse upwards.
11069 </desc>
11070 </param>
11071 <param name="dz" type="long" dir="in">
11072 <desc>
11073 Amount of mouse wheel moves.
11074 Positive values describe clockwise wheel rotations,
11075 negative values describe counterclockwise rotations.
11076 </desc>
11077 </param>
11078 <param name="dw" type="long" dir="in">
11079 <desc>
11080 Amount of horizontal mouse wheel moves.
11081 Positive values describe a movement to the left,
11082 negative values describe a movement to the right.
11083 </desc>
11084 </param>
11085 <param name="buttonState" type="long" dir="in">
11086 <desc>
11087 The current state of mouse buttons. Every bit represents
11088 a mouse button as follows:
11089 <table>
11090 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
11091 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
11092 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
11093 </table>
11094 A value of <tt>1</tt> means the corresponding button is pressed.
11095 otherwise it is released.
11096 </desc>
11097 </param>
11098 </method>
11099
11100 <method name="putMouseEventAbsolute">
11101 <desc>
11102 Positions the mouse pointer using absolute x and y coordinates.
11103 These coordinates are expressed in pixels and
11104 start from <tt>[1,1]</tt> which corresponds to the top left
11105 corner of the virtual display.
11106
11107 <result name="E_ACCESSDENIED">
11108 Console not powered up.
11109 </result>
11110 <result name="VBOX_E_IPRT_ERROR">
11111 Could not send mouse event to virtual mouse.
11112 </result>
11113
11114 <note>
11115 This method will have effect only if absolute mouse
11116 positioning is supported by the guest OS.
11117 </note>
11118
11119 <see><link to="#absoluteSupported"/></see>
11120 </desc>
11121
11122 <param name="x" type="long" dir="in">
11123 <desc>
11124 X coordinate of the pointer in pixels, starting from @c 1.
11125 </desc>
11126 </param>
11127 <param name="y" type="long" dir="in">
11128 <desc>
11129 Y coordinate of the pointer in pixels, starting from @c 1.
11130 </desc>
11131 </param>
11132 <param name="dz" type="long" dir="in">
11133 <desc>
11134 Amount of mouse wheel moves.
11135 Positive values describe clockwise wheel rotations,
11136 negative values describe counterclockwise rotations.
11137 </desc>
11138 </param>
11139 <param name="dw" type="long" dir="in">
11140 <desc>
11141 Amount of horizontal mouse wheel moves.
11142 Positive values describe a movement to the left,
11143 negative values describe a movement to the right.
11144 </desc>
11145 </param>
11146 <param name="buttonState" type="long" dir="in">
11147 <desc>
11148 The current state of mouse buttons. Every bit represents
11149 a mouse button as follows:
11150 <table>
11151 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
11152 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
11153 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
11154 </table>
11155 A value of @c 1 means the corresponding button is pressed.
11156 otherwise it is released.
11157 </desc>
11158 </param>
11159 </method>
11160
11161 </interface>
11162
11163 <!--
11164 // IDisplay
11165 /////////////////////////////////////////////////////////////////////////
11166 -->
11167
11168 <enum
11169 name="FramebufferPixelFormat"
11170 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
11171 >
11172 <desc>
11173 Format of the video memory buffer. Constants represented by this enum can
11174 be used to test for particular values of <link
11175 to="IFramebuffer::pixelFormat"/>. See also <link
11176 to="IFramebuffer::requestResize"/>.
11177
11178 See also www.fourcc.org for more information about FOURCC pixel formats.
11179 </desc>
11180
11181 <const name="Opaque" value="0">
11182 <desc>
11183 Unknown buffer format (the user may not assume any particular format of
11184 the buffer).
11185 </desc>
11186 </const>
11187 <const name="FOURCC_RGB" value="0x32424752">
11188 <desc>
11189 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
11190 bit layout).
11191 </desc>
11192 </const>
11193 </enum>
11194
11195 <interface
11196 name="IFramebuffer" extends="$unknown"
11197 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
11198 wsmap="suppress"
11199 >
11200 <attribute name="address" type="octet" mod="ptr" readonly="yes">
11201 <desc>Address of the start byte of the frame buffer.</desc>
11202 </attribute>
11203
11204 <attribute name="width" type="unsigned long" readonly="yes">
11205 <desc>Frame buffer width, in pixels.</desc>
11206 </attribute>
11207
11208 <attribute name="height" type="unsigned long" readonly="yes">
11209 <desc>Frame buffer height, in pixels.</desc>
11210 </attribute>
11211
11212 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
11213 <desc>
11214 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
11215 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
11216 are: 8, 15, 16, 24 and 32.
11217 </desc>
11218 </attribute>
11219
11220 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
11221 <desc>
11222 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
11223 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
11224 size of the scan line must be aligned to 32 bits.
11225 </desc>
11226 </attribute>
11227
11228 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
11229 <desc>
11230 Frame buffer pixel format. It's either one of the values defined by <link
11231 to="FramebufferPixelFormat"/> or a raw FOURCC code.
11232 <note>
11233 This attribute must never return <link
11234 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
11235 <link to="#address"/> points to must be always known.
11236 </note>
11237 </desc>
11238 </attribute>
11239
11240 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
11241 <desc>
11242 Defines whether this frame buffer uses the virtual video card's memory
11243 buffer (guest VRAM) directly or not. See <link
11244 to="IFramebuffer::requestResize"/> for more information.
11245 </desc>
11246 </attribute>
11247
11248 <attribute name="heightReduction" type="unsigned long" readonly="yes">
11249 <desc>
11250 Hint from the frame buffer about how much of the standard
11251 screen height it wants to use for itself. This information is
11252 exposed to the guest through the VESA BIOS and VMMDev interface
11253 so that it can use it for determining its video mode table. It
11254 is not guaranteed that the guest respects the value.
11255 </desc>
11256 </attribute>
11257
11258 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
11259 <desc>
11260 An alpha-blended overlay which is superposed over the frame buffer.
11261 The initial purpose is to allow the display of icons providing
11262 information about the VM state, including disk activity, in front
11263 ends which do not have other means of doing that. The overlay is
11264 designed to controlled exclusively by IDisplay. It has no locking
11265 of its own, and any changes made to it are not guaranteed to be
11266 visible until the affected portion of IFramebuffer is updated. The
11267 overlay can be created lazily the first time it is requested. This
11268 attribute can also return @c null to signal that the overlay is not
11269 implemented.
11270 </desc>
11271 </attribute>
11272
11273 <attribute name="winId" type="unsigned long long" readonly="yes">
11274 <desc>
11275 Platform-dependent identifier of the window where context of this
11276 frame buffer is drawn, or zero if there's no such window.
11277 </desc>
11278 </attribute>
11279
11280 <method name="lock">
11281 <desc>
11282 Locks the frame buffer.
11283 Gets called by the IDisplay object where this frame buffer is
11284 bound to.
11285 </desc>
11286 </method>
11287
11288 <method name="unlock">
11289 <desc>
11290 Unlocks the frame buffer.
11291 Gets called by the IDisplay object where this frame buffer is
11292 bound to.
11293 </desc>
11294 </method>
11295
11296 <method name="notifyUpdate">
11297 <desc>
11298 Informs about an update.
11299 Gets called by the display object where this buffer is
11300 registered.
11301 </desc>
11302 <param name="x" type="unsigned long" dir="in"/>
11303 <param name="y" type="unsigned long" dir="in"/>
11304 <param name="width" type="unsigned long" dir="in"/>
11305 <param name="height" type="unsigned long" dir="in"/>
11306 </method>
11307
11308 <method name="requestResize">
11309 <desc>
11310 Requests a size and pixel format change.
11311
11312 There are two modes of working with the video buffer of the virtual
11313 machine. The <i>indirect</i> mode implies that the IFramebuffer
11314 implementation allocates a memory buffer for the requested display mode
11315 and provides it to the virtual machine. In <i>direct</i> mode, the
11316 IFramebuffer implementation uses the memory buffer allocated and owned
11317 by the virtual machine. This buffer represents the video memory of the
11318 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
11319 usually faster because the implementation gets a raw pointer to the
11320 guest VRAM buffer which it can directly use for visualizing the contents
11321 of the virtual display, as opposed to the indirect mode where the
11322 contents of guest VRAM are copied to the memory buffer provided by
11323 the implementation every time a display update occurs.
11324
11325 It is important to note that the direct mode is really fast only when
11326 the implementation uses the given guest VRAM buffer directly, for
11327 example, by blitting it to the window representing the virtual machine's
11328 display, which saves at least one copy operation comparing to the
11329 indirect mode. However, using the guest VRAM buffer directly is not
11330 always possible: the format and the color depth of this buffer may be
11331 not supported by the target window, or it may be unknown (opaque) as in
11332 case of text or non-linear multi-plane VGA video modes. In this case,
11333 the indirect mode (that is always available) should be used as a
11334 fallback: when the guest VRAM contents are copied to the
11335 implementation-provided memory buffer, color and format conversion is
11336 done automatically by the underlying code.
11337
11338 The @a pixelFormat parameter defines whether the direct mode is
11339 available or not. If @a pixelFormat is <link
11340 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
11341 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
11342 @a bytesPerLine parameters must be ignored and the implementation must use
11343 the indirect mode (where it provides its own buffer in one of the
11344 supported formats). In all other cases, @a pixelFormat together with
11345 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
11346 buffer pointed to by the @a VRAM parameter and the implementation is
11347 free to choose which mode to use. To indicate that this frame buffer uses
11348 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
11349 attribute must return @c true and <link to="#address"/> must
11350 return exactly the same address that is passed in the @a VRAM parameter
11351 of this method; otherwise it is assumed that the indirect strategy is
11352 chosen.
11353
11354 The @a width and @a height parameters represent the size of the
11355 requested display mode in both modes. In case of indirect mode, the
11356 provided memory buffer should be big enough to store data of the given
11357 display mode. In case of direct mode, it is guaranteed that the given
11358 @a VRAM buffer contains enough space to represent the display mode of the
11359 given size. Note that this frame buffer's <link to="#width"/> and <link
11360 to="#height"/> attributes must return exactly the same values as
11361 passed to this method after the resize is completed (see below).
11362
11363 The @a finished output parameter determines if the implementation has
11364 finished resizing the frame buffer or not. If, for some reason, the
11365 resize cannot be finished immediately during this call, @a finished
11366 must be set to @c false, and the implementation must call
11367 <link to="IDisplay::resizeCompleted"/> after it has returned from
11368 this method as soon as possible. If @a finished is @c false, the
11369 machine will not call any frame buffer methods until
11370 <link to="IDisplay::resizeCompleted"/> is called.
11371
11372 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
11373 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
11374 this frame buffer must return exactly the same values as specified in the
11375 parameters of this method, after the resize is completed. If the
11376 indirect mode is chosen, these attributes must return values describing
11377 the format of the implementation's own memory buffer <link
11378 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
11379 value must always correlate with <link to="#pixelFormat"/>. Note that
11380 the <link to="#pixelFormat"/> attribute must never return <link
11381 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
11382
11383 <note>
11384 This method is called by the IDisplay object under the
11385 <link to="#lock"/> provided by this IFramebuffer
11386 implementation. If this method returns @c false in @a finished, then
11387 this lock is not released until
11388 <link to="IDisplay::resizeCompleted"/> is called.
11389 </note>
11390 </desc>
11391 <param name="screenId" type="unsigned long" dir="in">
11392 <desc>
11393 Logical screen number. Must be used in the corresponding call to
11394 <link to="IDisplay::resizeCompleted"/> if this call is made.
11395 </desc>
11396 </param>
11397 <param name="pixelFormat" type="unsigned long" dir="in">
11398 <desc>
11399 Pixel format of the memory buffer pointed to by @a VRAM.
11400 See also <link to="FramebufferPixelFormat"/>.
11401 </desc>
11402 </param>
11403 <param name="VRAM" type="octet" mod="ptr" dir="in">
11404 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
11405 </param>
11406 <param name="bitsPerPixel" type="unsigned long" dir="in">
11407 <desc>Color depth, bits per pixel.</desc>
11408 </param>
11409 <param name="bytesPerLine" type="unsigned long" dir="in">
11410 <desc>Size of one scan line, in bytes.</desc>
11411 </param>
11412 <param name="width" type="unsigned long" dir="in">
11413 <desc>Width of the guest display, in pixels.</desc>
11414 </param>
11415 <param name="height" type="unsigned long" dir="in">
11416 <desc>Height of the guest display, in pixels.</desc>
11417 </param>
11418 <param name="finished" type="boolean" dir="return">
11419 <desc>
11420 Can the VM start using the new frame buffer immediately
11421 after this method returns or it should wait for
11422 <link to="IDisplay::resizeCompleted"/>.
11423 </desc>
11424 </param>
11425 </method>
11426
11427 <method name="videoModeSupported">
11428 <desc>
11429 Returns whether the frame buffer implementation is willing to
11430 support a given video mode. In case it is not able to render
11431 the video mode (or for some reason not willing), it should
11432 return @c false. Usually this method is called when the guest
11433 asks the VMM device whether a given video mode is supported
11434 so the information returned is directly exposed to the guest.
11435 It is important that this method returns very quickly.
11436 </desc>
11437 <param name="width" type="unsigned long" dir="in"/>
11438 <param name="height" type="unsigned long" dir="in"/>
11439 <param name="bpp" type="unsigned long" dir="in"/>
11440 <param name="supported" type="boolean" dir="return"/>
11441 </method>
11442
11443 <method name="getVisibleRegion">
11444 <desc>
11445 Returns the visible region of this frame buffer.
11446
11447 If the @a rectangles parameter is @c null then the value of the
11448 @a count parameter is ignored and the number of elements necessary to
11449 describe the current visible region is returned in @a countCopied.
11450
11451 If @a rectangles is not @c null but @a count is less
11452 than the required number of elements to store region data, the method
11453 will report a failure. If @a count is equal or greater than the
11454 required number of elements, then the actual number of elements copied
11455 to the provided array will be returned in @a countCopied.
11456
11457 <note>
11458 The address of the provided array must be in the process space of
11459 this IFramebuffer object.
11460 </note>
11461 <note>
11462 Method not yet implemented.
11463 </note>
11464 </desc>
11465 <param name="rectangles" type="octet" mod="ptr" dir="in">
11466 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
11467 </param>
11468 <param name="count" type="unsigned long" dir="in">
11469 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
11470 </param>
11471 <param name="countCopied" type="unsigned long" dir="return">
11472 <desc>Number of elements copied to the @a rectangles array.</desc>
11473 </param>
11474 </method>
11475
11476 <method name="setVisibleRegion">
11477 <desc>
11478 Suggests a new visible region to this frame buffer. This region
11479 represents the area of the VM display which is a union of regions of
11480 all top-level windows of the guest operating system running inside the
11481 VM (if the Guest Additions for this system support this
11482 functionality). This information may be used by the frontends to
11483 implement the seamless desktop integration feature.
11484
11485 <note>
11486 The address of the provided array must be in the process space of
11487 this IFramebuffer object.
11488 </note>
11489 <note>
11490 The IFramebuffer implementation must make a copy of the provided
11491 array of rectangles.
11492 </note>
11493 <note>
11494 Method not yet implemented.
11495 </note>
11496 </desc>
11497 <param name="rectangles" type="octet" mod="ptr" dir="in">
11498 <desc>Pointer to the @c RTRECT array.</desc>
11499 </param>
11500 <param name="count" type="unsigned long" dir="in">
11501 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
11502 </param>
11503 </method>
11504
11505 <method name="processVHWACommand">
11506 <desc>
11507 Posts a Video HW Acceleration Command to the frame buffer for processing.
11508 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
11509 are posted from quest to the host to be processed by the host hardware.
11510
11511 <note>
11512 The address of the provided command must be in the process space of
11513 this IFramebuffer object.
11514 </note>
11515 </desc>
11516
11517 <param name="command" type="octet" mod="ptr" dir="in">
11518 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
11519 </param>
11520 </method>
11521
11522 </interface>
11523
11524 <interface
11525 name="IFramebufferOverlay" extends="IFramebuffer"
11526 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
11527 wsmap="suppress"
11528 >
11529 <desc>
11530 The IFramebufferOverlay interface represents an alpha blended overlay
11531 for displaying status icons above an IFramebuffer. It is always created
11532 not visible, so that it must be explicitly shown. It only covers a
11533 portion of the IFramebuffer, determined by its width, height and
11534 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
11535 that order) format, and may be written to directly. Do re-read the
11536 width though, after setting it, as it may be adjusted (increased) to
11537 make it more suitable for the front end.
11538 </desc>
11539 <attribute name="x" type="unsigned long" readonly="yes">
11540 <desc>X position of the overlay, relative to the frame buffer.</desc>
11541 </attribute>
11542
11543 <attribute name="y" type="unsigned long" readonly="yes">
11544 <desc>Y position of the overlay, relative to the frame buffer.</desc>
11545 </attribute>
11546
11547 <attribute name="visible" type="boolean" readonly="no">
11548 <desc>
11549 Whether the overlay is currently visible.
11550 </desc>
11551 </attribute>
11552
11553 <attribute name="alpha" type="unsigned long" readonly="no">
11554 <desc>
11555 The global alpha value for the overlay. This may or may not be
11556 supported by a given front end.
11557 </desc>
11558 </attribute>
11559
11560 <method name="move">
11561 <desc>
11562 Changes the overlay's position relative to the IFramebuffer.
11563 </desc>
11564 <param name="x" type="unsigned long" dir="in"/>
11565 <param name="y" type="unsigned long" dir="in"/>
11566 </method>
11567
11568 </interface>
11569
11570 <interface
11571 name="IDisplay" extends="$unknown"
11572 uuid="1fa79e39-0cc9-4ab3-9df3-ed3e96b42496"
11573 wsmap="managed"
11574 >
11575 <desc>
11576 The IDisplay interface represents the virtual machine's display.
11577
11578 The object implementing this interface is contained in each
11579 <link to="IConsole::display"/> attribute and represents the visual
11580 output of the virtual machine.
11581
11582 The virtual display supports pluggable output targets represented by the
11583 IFramebuffer interface. Examples of the output target are a window on
11584 the host computer or an RDP session's display on a remote computer.
11585 </desc>
11586 <method name="getScreenResolution">
11587 <desc>Queries display width, height and color depth for given screen.</desc>
11588 <param name="screenId" type="unsigned long" dir="in"/>
11589 <param name="width" type="unsigned long" dir="out"/>
11590 <param name="height" type="unsigned long" dir="out"/>
11591 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
11592 </method>
11593
11594 <method name="setFramebuffer">
11595 <desc>
11596 Sets the framebuffer for given screen.
11597 </desc>
11598 <param name="screenId" type="unsigned long" dir="in"/>
11599 <param name="framebuffer" type="IFramebuffer" dir="in"/>
11600 </method>
11601
11602 <method name="getFramebuffer">
11603 <desc>
11604 Queries the framebuffer for given screen.
11605 </desc>
11606 <param name="screenId" type="unsigned long" dir="in"/>
11607 <param name="framebuffer" type="IFramebuffer" dir="out"/>
11608 <param name="xOrigin" type="long" dir="out"/>
11609 <param name="yOrigin" type="long" dir="out"/>
11610 </method>
11611
11612 <method name="setVideoModeHint">
11613 <desc>
11614 Asks VirtualBox to request the given video mode from
11615 the guest. This is just a hint and it cannot be guaranteed
11616 that the requested resolution will be used. Guest Additions
11617 are required for the request to be seen by guests. The caller
11618 should issue the request and wait for a resolution change and
11619 after a timeout retry.
11620
11621 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
11622 parameters means that the corresponding values should be taken from the
11623 current video mode (i.e. left unchanged).
11624
11625 If the guest OS supports multi-monitor configuration then the @a display
11626 parameter specifies the number of the guest display to send the hint to:
11627 @c 0 is the primary display, @c 1 is the first secondary and
11628 so on. If the multi-monitor configuration is not supported, @a display
11629 must be @c 0.
11630
11631 <result name="E_INVALIDARG">
11632 The @a display is not associated with any monitor.
11633 </result>
11634
11635 </desc>
11636 <param name="width" type="unsigned long" dir="in"/>
11637 <param name="height" type="unsigned long" dir="in"/>
11638 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
11639 <param name="display" type="unsigned long" dir="in"/>
11640 </method>
11641
11642 <method name="setSeamlessMode">
11643 <desc>
11644 Enables or disables seamless guest display rendering (seamless desktop
11645 integration) mode.
11646 <note>
11647 Calling this method has no effect if <link
11648 to="IGuest::supportsSeamless"/> returns @c false.
11649 </note>
11650 </desc>
11651 <param name="enabled" type="boolean" dir="in"/>
11652 </method>
11653
11654 <method name="takeScreenShot">
11655 <desc>
11656 Takes a screen shot of the requested size and copies it to the
11657 32-bpp buffer allocated by the caller and pointed to by @a address.
11658 A pixel consists of 4 bytes in order: B, G, R, 0.
11659
11660 <note>This API can be used only by the COM/XPCOM C++ API as it
11661 requires pointer support. Use <link to="#takeScreenShotToArray" />
11662 with other language bindings.
11663 </note>
11664
11665 <result name="E_NOTIMPL">
11666 Feature not implemented.
11667 </result>
11668 <result name="VBOX_E_IPRT_ERROR">
11669 Could not take a screenshot.
11670 </result>
11671
11672 </desc>
11673 <param name="screenId" type="unsigned long" dir="in"/>
11674 <param name="address" type="octet" mod="ptr" dir="in"/>
11675 <param name="width" type="unsigned long" dir="in"/>
11676 <param name="height" type="unsigned long" dir="in"/>
11677 </method>
11678
11679 <method name="takeScreenShotToArray">
11680 <desc>
11681 Takes a guest screen shot of the requested size and returns it as
11682 an array of bytes in uncompressed 32-bit RGBA format.
11683 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
11684
11685 This API is slow, but could be the only option to get guest screenshot
11686 for scriptable languages not allowed to manipulate with addresses
11687 directly.
11688
11689 <result name="E_NOTIMPL">
11690 Feature not implemented.
11691 </result>
11692 <result name="VBOX_E_IPRT_ERROR">
11693 Could not take a screenshot.
11694 </result>
11695 </desc>
11696 <param name="screenId" type="unsigned long" dir="in">
11697 <desc>
11698 Monitor to take screenshot from.
11699 </desc>
11700 </param>
11701 <param name="width" type="unsigned long" dir="in">
11702 <desc>
11703 Desired image width.
11704 </desc>
11705 </param>
11706 <param name="height" type="unsigned long" dir="in">
11707 <desc>
11708 Desired image height.
11709 </desc>
11710 </param>
11711 <param name="screenData" type="octet" dir="return" safearray="yes">
11712 <desc>
11713 Array with resulting screen data.
11714 </desc>
11715 </param>
11716 </method>
11717
11718 <method name="drawToScreen">
11719 <desc>
11720 Draws a 32-bpp image of the specified size from the given buffer
11721 to the given point on the VM display.
11722
11723 <result name="E_NOTIMPL">
11724 Feature not implemented.
11725 </result>
11726 <result name="VBOX_E_IPRT_ERROR">
11727 Could not draw to screen.
11728 </result>
11729
11730 </desc>
11731 <param name="screenId" type="unsigned long" dir="in"/>
11732 <param name="address" type="octet" mod="ptr" dir="in"/>
11733 <param name="x" type="unsigned long" dir="in">
11734 <desc>Relative to the screen top left corner.</desc>
11735 </param>
11736 <param name="y" type="unsigned long" dir="in">
11737 <desc>Relative to the screen top left corner.</desc>
11738 </param>
11739 <param name="width" type="unsigned long" dir="in"/>
11740 <param name="height" type="unsigned long" dir="in"/>
11741 </method>
11742
11743 <method name="invalidateAndUpdate">
11744 <desc>
11745 Does a full invalidation of the VM display and instructs the VM
11746 to update it.
11747
11748 <result name="VBOX_E_IPRT_ERROR">
11749 Could not invalidate and update screen.
11750 </result>
11751
11752 </desc>
11753 </method>
11754
11755 <method name="resizeCompleted">
11756 <desc>
11757 Signals that a framebuffer has completed the resize operation.
11758
11759 <result name="VBOX_E_NOT_SUPPORTED">
11760 Operation only valid for external frame buffers.
11761 </result>
11762
11763 </desc>
11764 <param name="screenId" type="unsigned long" dir="in"/>
11765 </method>
11766
11767 <method name="completeVHWACommand">
11768 <desc>
11769 Signals that the Video HW Acceleration command has completed.
11770 </desc>
11771
11772 <param name="command" type="octet" mod="ptr" dir="in">
11773 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11774 </param>
11775 </method>
11776
11777 </interface>
11778
11779 <!--
11780 // INetworkAdapter
11781 /////////////////////////////////////////////////////////////////////////
11782 -->
11783
11784 <enum
11785 name="NetworkAttachmentType"
11786 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11787 >
11788 <desc>
11789 Network attachment type.
11790 </desc>
11791
11792 <const name="Null" value="0">
11793 <desc>Null value, also means "not attached".</desc>
11794 </const>
11795 <const name="NAT" value="1"/>
11796 <const name="Bridged" value="2"/>
11797 <const name="Internal" value="3"/>
11798 <const name="HostOnly" value="4"/>
11799 <const name="VDE" value="5"/>
11800 </enum>
11801
11802 <enum
11803 name="NetworkAdapterType"
11804 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11805 >
11806 <desc>
11807 Network adapter type.
11808 </desc>
11809
11810 <const name="Null" value="0">
11811 <desc>Null value (never used by the API).</desc>
11812 </const>
11813 <const name="Am79C970A" value="1">
11814 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11815 </const>
11816 <const name="Am79C973" value="2">
11817 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11818 </const>
11819 <const name="I82540EM" value="3">
11820 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11821 </const>
11822 <const name="I82543GC" value="4">
11823 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11824 </const>
11825 <const name="I82545EM" value="5">
11826 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11827 </const>
11828 <const name="Virtio" value="6">
11829 <desc>Virtio network device.</desc>
11830 </const>
11831 </enum>
11832
11833 <interface
11834 name="INetworkAdapter" extends="$unknown"
11835 uuid="5bdb9df8-a5e1-4322-a139-b7a4a734c790"
11836 wsmap="managed"
11837 >
11838 <desc>
11839 Represents a virtual network adapter that is attached to a virtual machine.
11840 Each virtual machine has a fixed number of network adapter slots with one
11841 instance of this attached to each of them. Call
11842 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11843 is attached to a given slot in a given machine.
11844
11845 Each network adapter can be in one of five attachment modes, which are
11846 represented by the <link to="NetworkAttachmentType" /> enumeration;
11847 see the <link to="#attachmentType" /> attribute.
11848 </desc>
11849
11850 <attribute name="adapterType" type="NetworkAdapterType">
11851 <desc>
11852 Type of the virtual network adapter. Depending on this value,
11853 VirtualBox will provide a different virtual network hardware
11854 to the guest.
11855 </desc>
11856 </attribute>
11857
11858 <attribute name="slot" type="unsigned long" readonly="yes">
11859 <desc>
11860 Slot number this adapter is plugged into. Corresponds to
11861 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11862 to obtain this instance.
11863 </desc>
11864 </attribute>
11865
11866 <attribute name="enabled" type="boolean">
11867 <desc>
11868 Flag whether the network adapter is present in the
11869 guest system. If disabled, the virtual guest hardware will
11870 not contain this network adapter. Can only be changed when
11871 the VM is not running.
11872 </desc>
11873 </attribute>
11874
11875 <attribute name="MACAddress" type="wstring">
11876 <desc>
11877 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11878 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11879 </desc>
11880 </attribute>
11881
11882 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11883
11884 <attribute name="hostInterface" type="wstring">
11885 <desc>
11886 Name of the host network interface the VM is attached to.
11887 </desc>
11888 </attribute>
11889
11890 <attribute name="internalNetwork" type="wstring">
11891 <desc>
11892 Name of the internal network the VM is attached to.
11893 </desc>
11894 </attribute>
11895
11896 <attribute name="NATNetwork" type="wstring">
11897 <desc>
11898 Name of the NAT network the VM is attached to.
11899 </desc>
11900 </attribute>
11901
11902 <attribute name="VDENetwork" type="wstring">
11903 <desc>
11904 Name of the VDE switch the VM is attached to.
11905 </desc>
11906 </attribute>
11907
11908 <attribute name="cableConnected" type="boolean">
11909 <desc>
11910 Flag whether the adapter reports the cable as connected or not.
11911 It can be used to report offline situations to a VM.
11912 </desc>
11913 </attribute>
11914
11915 <attribute name="lineSpeed" type="unsigned long">
11916 <desc>
11917 Line speed reported by custom drivers, in units of 1 kbps.
11918 </desc>
11919 </attribute>
11920
11921 <attribute name="traceEnabled" type="boolean">
11922 <desc>
11923 Flag whether network traffic from/to the network card should be traced.
11924 Can only be toggled when the VM is turned off.
11925 </desc>
11926 </attribute>
11927
11928 <attribute name="traceFile" type="wstring">
11929 <desc>
11930 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11931 will be used.
11932 </desc>
11933 </attribute>
11934
11935 <attribute name="natDriver" type="INATEngine" readonly="yes">
11936 <desc>
11937 Points to the NAT engine which handles the network address translation
11938 for this interface. This is active only when the interface actually uses
11939 NAT (see <link to="#attachToNAT" />).
11940 </desc>
11941 </attribute>
11942
11943 <attribute name="bootPriority" type="unsigned long">
11944 <desc>
11945 Network boot priority of the adapter. Priority 1 is highest. If not set,
11946 the priority is considered to be at the lowest possible setting.
11947 </desc>
11948 </attribute>
11949
11950 <method name="attachToNAT">
11951 <desc>
11952 Attach the network adapter to the Network Address Translation (NAT) interface.
11953 </desc>
11954 </method>
11955
11956 <method name="attachToBridgedInterface">
11957 <desc>
11958 Attach the network adapter to a bridged host interface.
11959 </desc>
11960 </method>
11961
11962 <method name="attachToInternalNetwork">
11963 <desc>
11964 Attach the network adapter to an internal network.
11965 </desc>
11966 </method>
11967
11968 <method name="attachToHostOnlyInterface">
11969 <desc>
11970 Attach the network adapter to the host-only network.
11971 </desc>
11972 </method>
11973
11974 <method name="attachToVDE">
11975 <desc>
11976 Attach the network adapter to a VDE network.
11977 </desc>
11978 </method>
11979
11980 <method name="detach">
11981 <desc>
11982 Detach the network adapter
11983 </desc>
11984 </method>
11985 </interface>
11986
11987
11988 <!--
11989 // ISerialPort
11990 /////////////////////////////////////////////////////////////////////////
11991 -->
11992
11993 <enum
11994 name="PortMode"
11995 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11996 >
11997 <desc>
11998 The PortMode enumeration represents possible communication modes for
11999 the virtual serial port device.
12000 </desc>
12001
12002 <const name="Disconnected" value="0">
12003 <desc>Virtual device is not attached to any real host device.</desc>
12004 </const>
12005 <const name="HostPipe" value="1">
12006 <desc>Virtual device is attached to a host pipe.</desc>
12007 </const>
12008 <const name="HostDevice" value="2">
12009 <desc>Virtual device is attached to a host device.</desc>
12010 </const>
12011 <const name="RawFile" value="3">
12012 <desc>Virtual device is attached to a raw file.</desc>
12013 </const>
12014 </enum>
12015
12016 <interface
12017 name="ISerialPort" extends="$unknown"
12018 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
12019 wsmap="managed"
12020 >
12021
12022 <desc>
12023 The ISerialPort interface represents the virtual serial port device.
12024
12025 The virtual serial port device acts like an ordinary serial port
12026 inside the virtual machine. This device communicates to the real
12027 serial port hardware in one of two modes: host pipe or host device.
12028
12029 In host pipe mode, the #path attribute specifies the path to the pipe on
12030 the host computer that represents a serial port. The #server attribute
12031 determines if this pipe is created by the virtual machine process at
12032 machine startup or it must already exist before starting machine
12033 execution.
12034
12035 In host device mode, the #path attribute specifies the name of the
12036 serial port device on the host computer.
12037
12038 There is also a third communication mode: the disconnected mode. In this
12039 mode, the guest OS running inside the virtual machine will be able to
12040 detect the serial port, but all port write operations will be discarded
12041 and all port read operations will return no data.
12042
12043 <see>IMachine::getSerialPort</see>
12044 </desc>
12045
12046 <attribute name="slot" type="unsigned long" readonly="yes">
12047 <desc>
12048 Slot number this serial port is plugged into. Corresponds to
12049 the value you pass to <link to="IMachine::getSerialPort"/>
12050 to obtain this instance.
12051 </desc>
12052 </attribute>
12053
12054 <attribute name="enabled" type="boolean">
12055 <desc>
12056 Flag whether the serial port is enabled. If disabled,
12057 the serial port will not be reported to the guest OS.
12058 </desc>
12059 </attribute>
12060
12061 <attribute name="IOBase" type="unsigned long">
12062 <desc>Base I/O address of the serial port.</desc>
12063 </attribute>
12064
12065 <attribute name="IRQ" type="unsigned long">
12066 <desc>IRQ number of the serial port.</desc>
12067 </attribute>
12068
12069 <attribute name="hostMode" type="PortMode">
12070 <desc>
12071 How is this port connected to the host.
12072 <note>
12073 Changing this attribute may fail if the conditions for
12074 <link to="#path"/> are not met.
12075 </note>
12076 </desc>
12077 </attribute>
12078
12079 <attribute name="server" type="boolean">
12080 <desc>
12081 Flag whether this serial port acts as a server (creates a new pipe on
12082 the host) or as a client (uses the existing pipe). This attribute is
12083 used only when <link to="#hostMode"/> is PortMode_HostPipe.
12084 </desc>
12085 </attribute>
12086
12087 <attribute name="path" type="wstring">
12088 <desc>
12089 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
12090 PortMode_HostPipe, or the host serial device name when
12091 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
12092 cases, setting a @c null or empty string as the attribute's value
12093 is an error. Otherwise, the value of this property is ignored.
12094 </desc>
12095 </attribute>
12096
12097 </interface>
12098
12099 <!--
12100 // IParallelPort
12101 /////////////////////////////////////////////////////////////////////////
12102 -->
12103
12104 <interface
12105 name="IParallelPort" extends="$unknown"
12106 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
12107 wsmap="managed"
12108 >
12109
12110 <desc>
12111 The IParallelPort interface represents the virtual parallel port device.
12112
12113 The virtual parallel port device acts like an ordinary parallel port
12114 inside the virtual machine. This device communicates to the real
12115 parallel port hardware using the name of the parallel device on the host
12116 computer specified in the #path attribute.
12117
12118 Each virtual parallel port device is assigned a base I/O address and an
12119 IRQ number that will be reported to the guest operating system and used
12120 to operate the given parallel port from within the virtual machine.
12121
12122 <see>IMachine::getParallelPort</see>
12123 </desc>
12124
12125 <attribute name="slot" type="unsigned long" readonly="yes">
12126 <desc>
12127 Slot number this parallel port is plugged into. Corresponds to
12128 the value you pass to <link to="IMachine::getParallelPort"/>
12129 to obtain this instance.
12130 </desc>
12131 </attribute>
12132
12133 <attribute name="enabled" type="boolean">
12134 <desc>
12135 Flag whether the parallel port is enabled. If disabled,
12136 the parallel port will not be reported to the guest OS.
12137 </desc>
12138 </attribute>
12139
12140 <attribute name="IOBase" type="unsigned long">
12141 <desc>Base I/O address of the parallel port.</desc>
12142 </attribute>
12143
12144 <attribute name="IRQ" type="unsigned long">
12145 <desc>IRQ number of the parallel port.</desc>
12146 </attribute>
12147
12148 <attribute name="path" type="wstring">
12149 <desc>
12150 Host parallel device name. If this parallel port is enabled, setting a
12151 @c null or an empty string as this attribute's value will result into
12152 an error.
12153 </desc>
12154 </attribute>
12155
12156 </interface>
12157
12158
12159 <!--
12160 // IMachineDebugger
12161 /////////////////////////////////////////////////////////////////////////
12162 -->
12163
12164 <interface
12165 name="IMachineDebugger" extends="$unknown"
12166 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
12167 wsmap="suppress"
12168 >
12169 <method name="resetStats">
12170 <desc>
12171 Reset VM statistics.
12172 </desc>
12173 <param name="pattern" type="wstring" dir="in">
12174 <desc>The selection pattern. A bit similar to filename globbing.</desc>
12175 </param>
12176 </method>
12177
12178 <method name="dumpStats">
12179 <desc>
12180 Dumps VM statistics.
12181 </desc>
12182 <param name="pattern" type="wstring" dir="in">
12183 <desc>The selection pattern. A bit similar to filename globbing.</desc>
12184 </param>
12185 </method>
12186
12187 <method name="getStats">
12188 <desc>
12189 Get the VM statistics in a XMLish format.
12190 </desc>
12191 <param name="pattern" type="wstring" dir="in">
12192 <desc>The selection pattern. A bit similar to filename globbing.</desc>
12193 </param>
12194 <param name="withDescriptions" type="boolean" dir="in">
12195 <desc>Whether to include the descriptions.</desc>
12196 </param>
12197 <param name="stats" type="wstring" dir="out">
12198 <desc>The XML document containing the statistics.</desc>
12199 </param>
12200 </method>
12201
12202 <method name="injectNMI">
12203 <desc>
12204 Inject an NMI into a running VT-x/AMD-V VM.
12205 </desc>
12206 </method>
12207
12208 <attribute name="singlestep" type="boolean">
12209 <desc>Switch for enabling singlestepping.</desc>
12210 </attribute>
12211
12212 <attribute name="recompileUser" type="boolean">
12213 <desc>Switch for forcing code recompilation for user mode code.</desc>
12214 </attribute>
12215
12216 <attribute name="recompileSupervisor" type="boolean">
12217 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
12218 </attribute>
12219
12220 <attribute name="PATMEnabled" type="boolean">
12221 <desc>Switch for enabling and disabling the PATM component.</desc>
12222 </attribute>
12223
12224 <attribute name="CSAMEnabled" type="boolean">
12225 <desc>Switch for enabling and disabling the CSAM component.</desc>
12226 </attribute>
12227
12228 <attribute name="logEnabled" type="boolean">
12229 <desc>Switch for enabling and disabling logging.</desc>
12230 </attribute>
12231
12232 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
12233 <desc>
12234 Flag indicating whether the VM is currently making use of CPU hardware
12235 virtualization extensions.
12236 </desc>
12237 </attribute>
12238
12239 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
12240 <desc>
12241 Flag indicating whether the VM is currently making use of the nested paging
12242 CPU hardware virtualization extension.
12243 </desc>
12244 </attribute>
12245
12246 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
12247 <desc>
12248 Flag indicating whether the VM is currently making use of the VPID
12249 VT-x extension.
12250 </desc>
12251 </attribute>
12252
12253 <attribute name="PAEEnabled" type="boolean" readonly="yes">
12254 <desc>
12255 Flag indicating whether the VM is currently making use of the Physical
12256 Address Extension CPU feature.
12257 </desc>
12258 </attribute>
12259
12260 <attribute name="virtualTimeRate" type="unsigned long">
12261 <desc>
12262 The rate at which the virtual time runs expressed as a percentage.
12263 The accepted range is 2% to 20000%.
12264 </desc>
12265 </attribute>
12266
12267 <!-- @todo method for setting log flags, groups and destination! -->
12268
12269 <attribute name="VM" type="unsigned long long" readonly="yes">
12270 <desc>
12271 Gets the VM handle. This is only for internal use while
12272 we carve the details of this interface.
12273 </desc>
12274 </attribute>
12275
12276 </interface>
12277
12278 <!--
12279 // IUSBController
12280 /////////////////////////////////////////////////////////////////////////
12281 -->
12282
12283 <interface
12284 name="IUSBController" extends="$unknown"
12285 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
12286 wsmap="managed"
12287 >
12288 <attribute name="enabled" type="boolean">
12289 <desc>
12290 Flag whether the USB controller is present in the
12291 guest system. If disabled, the virtual guest hardware will
12292 not contain any USB controller. Can only be changed when
12293 the VM is powered off.
12294 </desc>
12295 </attribute>
12296
12297 <attribute name="enabledEhci" type="boolean">
12298 <desc>
12299 Flag whether the USB EHCI controller is present in the
12300 guest system. If disabled, the virtual guest hardware will
12301 not contain a USB EHCI controller. Can only be changed when
12302 the VM is powered off.
12303 </desc>
12304 </attribute>
12305
12306 <attribute name="proxyAvailable" type="boolean" readonly="yes">
12307 <desc>
12308 Flag whether there is an USB proxy available.
12309 </desc>
12310 </attribute>
12311
12312 <attribute name="USBStandard" type="unsigned short" readonly="yes">
12313 <desc>
12314 USB standard version which the controller implements.
12315 This is a BCD which means that the major version is in the
12316 high byte and minor version is in the low byte.
12317 </desc>
12318 </attribute>
12319
12320 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
12321 <desc>
12322 List of USB device filters associated with the machine.
12323
12324 If the machine is currently running, these filters are activated
12325 every time a new (supported) USB device is attached to the host
12326 computer that was not ignored by global filters
12327 (<link to="IHost::USBDeviceFilters"/>).
12328
12329 These filters are also activated when the machine is powered up.
12330 They are run against a list of all currently available USB
12331 devices (in states
12332 <link to="USBDeviceState_Available"/>,
12333 <link to="USBDeviceState_Busy"/>,
12334 <link to="USBDeviceState_Held"/>) that were not previously
12335 ignored by global filters.
12336
12337 If at least one filter matches the USB device in question, this
12338 device is automatically captured (attached to) the virtual USB
12339 controller of this machine.
12340
12341 <see>IUSBDeviceFilter, ::IUSBController</see>
12342 </desc>
12343 </attribute>
12344
12345 <method name="createDeviceFilter">
12346 <desc>
12347 Creates a new USB device filter. All attributes except
12348 the filter name are set to empty (any match),
12349 <i>active</i> is @c false (the filter is not active).
12350
12351 The created filter can then be added to the list of filters using
12352 <link to="#insertDeviceFilter"/>.
12353
12354 <result name="VBOX_E_INVALID_VM_STATE">
12355 The virtual machine is not mutable.
12356 </result>
12357
12358 <see>#deviceFilters</see>
12359 </desc>
12360 <param name="name" type="wstring" dir="in">
12361 <desc>
12362 Filter name. See <link to="IUSBDeviceFilter::name"/>
12363 for more info.
12364 </desc>
12365 </param>
12366 <param name="filter" type="IUSBDeviceFilter" dir="return">
12367 <desc>Created filter object.</desc>
12368 </param>
12369 </method>
12370
12371 <method name="insertDeviceFilter">
12372 <desc>
12373 Inserts the given USB device to the specified position
12374 in the list of filters.
12375
12376 Positions are numbered starting from <tt>0</tt>. If the specified
12377 position is equal to or greater than the number of elements in
12378 the list, the filter is added to the end of the collection.
12379
12380 <note>
12381 Duplicates are not allowed, so an attempt to insert a
12382 filter that is already in the collection, will return an
12383 error.
12384 </note>
12385
12386 <result name="VBOX_E_INVALID_VM_STATE">
12387 Virtual machine is not mutable.
12388 </result>
12389 <result name="E_INVALIDARG">
12390 USB device filter not created within this VirtualBox instance.
12391 </result>
12392 <result name="VBOX_E_INVALID_OBJECT_STATE">
12393 USB device filter already in list.
12394 </result>
12395
12396 <see>#deviceFilters</see>
12397 </desc>
12398 <param name="position" type="unsigned long" dir="in">
12399 <desc>Position to insert the filter to.</desc>
12400 </param>
12401 <param name="filter" type="IUSBDeviceFilter" dir="in">
12402 <desc>USB device filter to insert.</desc>
12403 </param>
12404 </method>
12405
12406 <method name="removeDeviceFilter">
12407 <desc>
12408 Removes a USB device filter from the specified position in the
12409 list of filters.
12410
12411 Positions are numbered starting from <tt>0</tt>. Specifying a
12412 position equal to or greater than the number of elements in
12413 the list will produce an error.
12414
12415 <see>#deviceFilters</see>
12416
12417 <result name="VBOX_E_INVALID_VM_STATE">
12418 Virtual machine is not mutable.
12419 </result>
12420 <result name="E_INVALIDARG">
12421 USB device filter list empty or invalid @a position.
12422 </result>
12423
12424 </desc>
12425 <param name="position" type="unsigned long" dir="in">
12426 <desc>Position to remove the filter from.</desc>
12427 </param>
12428 <param name="filter" type="IUSBDeviceFilter" dir="return">
12429 <desc>Removed USB device filter.</desc>
12430 </param>
12431 </method>
12432
12433 </interface>
12434
12435
12436 <!--
12437 // IUSBDevice
12438 /////////////////////////////////////////////////////////////////////////
12439 -->
12440
12441 <interface
12442 name="IUSBDevice" extends="$unknown"
12443 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
12444 wsmap="managed"
12445 >
12446 <desc>
12447 The IUSBDevice interface represents a virtual USB device attached to the
12448 virtual machine.
12449
12450 A collection of objects implementing this interface is stored in the
12451 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
12452 attached to a running virtual machine's USB controller.
12453 </desc>
12454
12455 <attribute name="id" type="uuid" mod="string" readonly="yes">
12456 <desc>
12457 Unique USB device ID. This ID is built from #vendorId,
12458 #productId, #revision and #serialNumber.
12459 </desc>
12460 </attribute>
12461
12462 <attribute name="vendorId" type="unsigned short" readonly="yes">
12463 <desc>Vendor ID.</desc>
12464 </attribute>
12465
12466 <attribute name="productId" type="unsigned short" readonly="yes">
12467 <desc>Product ID.</desc>
12468 </attribute>
12469
12470 <attribute name="revision" type="unsigned short" readonly="yes">
12471 <desc>
12472 Product revision number. This is a packed BCD represented as
12473 unsigned short. The high byte is the integer part and the low
12474 byte is the decimal.
12475 </desc>
12476 </attribute>
12477
12478 <attribute name="manufacturer" type="wstring" readonly="yes">
12479 <desc>Manufacturer string.</desc>
12480 </attribute>
12481
12482 <attribute name="product" type="wstring" readonly="yes">
12483 <desc>Product string.</desc>
12484 </attribute>
12485
12486 <attribute name="serialNumber" type="wstring" readonly="yes">
12487 <desc>Serial number string.</desc>
12488 </attribute>
12489
12490 <attribute name="address" type="wstring" readonly="yes">
12491 <desc>Host specific address of the device.</desc>
12492 </attribute>
12493
12494 <attribute name="port" type="unsigned short" readonly="yes">
12495 <desc>
12496 Host USB port number the device is physically
12497 connected to.
12498 </desc>
12499 </attribute>
12500
12501 <attribute name="version" type="unsigned short" readonly="yes">
12502 <desc>
12503 The major USB version of the device - 1 or 2.
12504 </desc>
12505 </attribute>
12506
12507 <attribute name="portVersion" type="unsigned short" readonly="yes">
12508 <desc>
12509 The major USB version of the host USB port the device is
12510 physically connected to - 1 or 2. For devices not connected to
12511 anything this will have the same value as the version attribute.
12512 </desc>
12513 </attribute>
12514
12515 <attribute name="remote" type="boolean" readonly="yes">
12516 <desc>
12517 Whether the device is physically connected to a remote VRDP
12518 client or to a local host machine.
12519 </desc>
12520 </attribute>
12521
12522 </interface>
12523
12524
12525 <!--
12526 // IUSBDeviceFilter
12527 /////////////////////////////////////////////////////////////////////////
12528 -->
12529
12530 <interface
12531 name="IUSBDeviceFilter" extends="$unknown"
12532 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
12533 wsmap="managed"
12534 >
12535 <desc>
12536 The IUSBDeviceFilter interface represents an USB device filter used
12537 to perform actions on a group of USB devices.
12538
12539 This type of filters is used by running virtual machines to
12540 automatically capture selected USB devices once they are physically
12541 attached to the host computer.
12542
12543 A USB device is matched to the given device filter if and only if all
12544 attributes of the device match the corresponding attributes of the
12545 filter (that is, attributes are joined together using the logical AND
12546 operation). On the other hand, all together, filters in the list of
12547 filters carry the semantics of the logical OR operation. So if it is
12548 desirable to create a match like "this vendor id OR this product id",
12549 one needs to create two filters and specify "any match" (see below)
12550 for unused attributes.
12551
12552 All filter attributes used for matching are strings. Each string
12553 is an expression representing a set of values of the corresponding
12554 device attribute, that will match the given filter. Currently, the
12555 following filtering expressions are supported:
12556
12557 <ul>
12558 <li><i>Interval filters</i>. Used to specify valid intervals for
12559 integer device attributes (Vendor ID, Product ID and Revision).
12560 The format of the string is:
12561
12562 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
12563
12564 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
12565 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
12566 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
12567 is omitted before a dash (<tt>-</tt>), the minimum possible integer
12568 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
12569 possible integer is assumed.
12570 </li>
12571 <li><i>Boolean filters</i>. Used to specify acceptable values for
12572 boolean device attributes. The format of the string is:
12573
12574 <tt>true|false|yes|no|0|1</tt>
12575
12576 </li>
12577 <li><i>Exact match</i>. Used to specify a single value for the given
12578 device attribute. Any string that doesn't start with <tt>int:</tt>
12579 represents the exact match. String device attributes are compared to
12580 this string including case of symbols. Integer attributes are first
12581 converted to a string (see individual filter attributes) and then
12582 compared ignoring case.
12583
12584 </li>
12585 <li><i>Any match</i>. Any value of the corresponding device attribute
12586 will match the given filter. An empty or @c null string is
12587 used to construct this type of filtering expressions.
12588
12589 </li>
12590 </ul>
12591
12592 <note>
12593 On the Windows host platform, interval filters are not currently
12594 available. Also all string filter attributes
12595 (<link to="#manufacturer"/>, <link to="#product"/>,
12596 <link to="#serialNumber"/>) are ignored, so they behave as
12597 <i>any match</i> no matter what string expression is specified.
12598 </note>
12599
12600 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
12601 </desc>
12602
12603 <attribute name="name" type="wstring">
12604 <desc>
12605 Visible name for this filter.
12606 This name is used to visually distinguish one filter from another,
12607 so it can neither be @c null nor an empty string.
12608 </desc>
12609 </attribute>
12610
12611 <attribute name="active" type="boolean">
12612 <desc>Whether this filter active or has been temporarily disabled.</desc>
12613 </attribute>
12614
12615 <attribute name="vendorId" type="wstring">
12616 <desc>
12617 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
12618 The string representation for the <i>exact matching</i>
12619 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12620 (including leading zeroes).
12621 </desc>
12622 </attribute>
12623
12624 <attribute name="productId" type="wstring">
12625 <desc>
12626 <link to="IUSBDevice::productId">Product ID</link> filter.
12627 The string representation for the <i>exact matching</i>
12628 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12629 (including leading zeroes).
12630 </desc>
12631 </attribute>
12632
12633 <attribute name="revision" type="wstring">
12634 <desc>
12635 <link to="IUSBDevice::productId">Product revision number</link>
12636 filter. The string representation for the <i>exact matching</i>
12637 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
12638 of the integer part of the revision, and <tt>F</tt> is the
12639 decimal digit of its fractional part (including leading and
12640 trailing zeros).
12641 Note that for interval filters, it's best to use the hexadecimal
12642 form, because the revision is stored as a 16 bit packed BCD value;
12643 so the expression <tt>int:0x0100-0x0199</tt> will match any
12644 revision from <tt>1.0</tt> to <tt>1.99</tt>.
12645 </desc>
12646 </attribute>
12647
12648 <attribute name="manufacturer" type="wstring">
12649 <desc>
12650 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
12651 </desc>
12652 </attribute>
12653
12654 <attribute name="product" type="wstring">
12655 <desc>
12656 <link to="IUSBDevice::product">Product</link> filter.
12657 </desc>
12658 </attribute>
12659
12660 <attribute name="serialNumber" type="wstring">
12661 <desc>
12662 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
12663 </desc>
12664 </attribute>
12665
12666 <attribute name="port" type="wstring">
12667 <desc>
12668 <link to="IUSBDevice::port">Host USB port</link> filter.
12669 </desc>
12670 </attribute>
12671
12672 <attribute name="remote" type="wstring">
12673 <desc>
12674 <link to="IUSBDevice::remote">Remote state</link> filter.
12675 <note>
12676 This filter makes sense only for machine USB filters,
12677 i.e. it is ignored by IHostUSBDeviceFilter objects.
12678 </note>
12679 </desc>
12680 </attribute>
12681
12682 <attribute name="maskedInterfaces" type="unsigned long">
12683 <desc>
12684 This is an advanced option for hiding one or more USB interfaces
12685 from the guest. The value is a bit mask where the bits that are set
12686 means the corresponding USB interface should be hidden, masked off
12687 if you like.
12688 This feature only works on Linux hosts.
12689 </desc>
12690 </attribute>
12691
12692 </interface>
12693
12694
12695 <!--
12696 // IHostUSBDevice
12697 /////////////////////////////////////////////////////////////////////////
12698 -->
12699
12700 <enum
12701 name="USBDeviceState"
12702 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12703 >
12704 <desc>
12705 USB device state. This enumeration represents all possible states
12706 of the USB device physically attached to the host computer regarding
12707 its state on the host computer and availability to guest computers
12708 (all currently running virtual machines).
12709
12710 Once a supported USB device is attached to the host, global USB
12711 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12712 either ignore the device, or put it to USBDeviceState_Held state, or do
12713 nothing. Unless the device is ignored by global filters, filters of all
12714 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12715 activated that can put it to USBDeviceState_Captured state.
12716
12717 If the device was ignored by global filters, or didn't match
12718 any filters at all (including guest ones), it is handled by the host
12719 in a normal way. In this case, the device state is determined by
12720 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12721 or USBDeviceState_Available, depending on the current device usage.
12722
12723 Besides auto-capturing based on filters, the device can be manually
12724 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12725 state is USBDeviceState_Busy, USBDeviceState_Available or
12726 USBDeviceState_Held.
12727
12728 <note>
12729 Due to differences in USB stack implementations in Linux and Win32,
12730 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12731 only to the Linux version of the product. This also means that (<link
12732 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12733 device state is USBDeviceState_Held.
12734 </note>
12735
12736 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12737 </desc>
12738
12739 <const name="NotSupported" value="0">
12740 <desc>
12741 Not supported by the VirtualBox server, not available to guests.
12742 </desc>
12743 </const>
12744 <const name="Unavailable" value="1">
12745 <desc>
12746 Being used by the host computer exclusively,
12747 not available to guests.
12748 </desc>
12749 </const>
12750 <const name="Busy" value="2">
12751 <desc>
12752 Being used by the host computer, potentially available to guests.
12753 </desc>
12754 </const>
12755 <const name="Available" value="3">
12756 <desc>
12757 Not used by the host computer, available to guests (the host computer
12758 can also start using the device at any time).
12759 </desc>
12760 </const>
12761 <const name="Held" value="4">
12762 <desc>
12763 Held by the VirtualBox server (ignored by the host computer),
12764 available to guests.
12765 </desc>
12766 </const>
12767 <const name="Captured" value="5">
12768 <desc>
12769 Captured by one of the guest computers, not available
12770 to anybody else.
12771 </desc>
12772 </const>
12773 </enum>
12774
12775 <interface
12776 name="IHostUSBDevice" extends="IUSBDevice"
12777 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12778 wsmap="managed"
12779 >
12780 <desc>
12781 The IHostUSBDevice interface represents a physical USB device attached
12782 to the host computer.
12783
12784 Besides properties inherited from IUSBDevice, this interface adds the
12785 <link to="#state"/> property that holds the current state of the USB
12786 device.
12787
12788 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12789 </desc>
12790
12791 <attribute name="state" type="USBDeviceState" readonly="yes">
12792 <desc>
12793 Current state of the device.
12794 </desc>
12795 </attribute>
12796
12797 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12798
12799 </interface>
12800
12801
12802 <!--
12803 // IHostUSBDeviceFilter
12804 /////////////////////////////////////////////////////////////////////////
12805 -->
12806
12807 <enum
12808 name="USBDeviceFilterAction"
12809 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12810 >
12811 <desc>
12812 Actions for host USB device filters.
12813 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12814 </desc>
12815
12816 <const name="Null" value="0">
12817 <desc>Null value (never used by the API).</desc>
12818 </const>
12819 <const name="Ignore" value="1">
12820 <desc>Ignore the matched USB device.</desc>
12821 </const>
12822 <const name="Hold" value="2">
12823 <desc>Hold the matched USB device.</desc>
12824 </const>
12825 </enum>
12826
12827 <interface
12828 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12829 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12830 wsmap="managed"
12831 >
12832 <desc>
12833 The IHostUSBDeviceFilter interface represents a global filter for a
12834 physical USB device used by the host computer. Used indirectly in
12835 <link to="IHost::USBDeviceFilters"/>.
12836
12837 Using filters of this type, the host computer determines the initial
12838 state of the USB device after it is physically attached to the
12839 host's USB controller.
12840
12841 <note>
12842 The <link to="#remote"/> attribute is ignored by this type of
12843 filters, because it makes sense only for
12844 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12845 </note>
12846
12847 <see>IHost::USBDeviceFilters</see>
12848 </desc>
12849
12850 <attribute name="action" type="USBDeviceFilterAction">
12851 <desc>
12852 Action performed by the host when an attached USB device
12853 matches this filter.
12854 </desc>
12855 </attribute>
12856
12857 </interface>
12858
12859 <!--
12860 // IAudioAdapter
12861 /////////////////////////////////////////////////////////////////////////
12862 -->
12863
12864 <enum
12865 name="AudioDriverType"
12866 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12867 >
12868 <desc>
12869 Host audio driver type.
12870 </desc>
12871
12872 <const name="Null" value="0">
12873 <desc>Null value, also means "dummy audio driver".</desc>
12874 </const>
12875 <const name="WinMM" value="1">
12876 <desc>Windows multimedia (Windows hosts only).</desc>
12877 </const>
12878 <const name="OSS" value="2">
12879 <desc>Open Sound System (Linux hosts only).</desc>
12880 </const>
12881 <const name="ALSA" value="3">
12882 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12883 </const>
12884 <const name="DirectSound" value="4">
12885 <desc>DirectSound (Windows hosts only).</desc>
12886 </const>
12887 <const name="CoreAudio" value="5">
12888 <desc>CoreAudio (Mac hosts only).</desc>
12889 </const>
12890 <const name="MMPM" value="6">
12891 <desc>Reserved for historical reasons.</desc>
12892 </const>
12893 <const name="Pulse" value="7">
12894 <desc>PulseAudio (Linux hosts only).</desc>
12895 </const>
12896 <const name="SolAudio" value="8">
12897 <desc>Solaris audio (Solaris hosts only).</desc>
12898 </const>
12899 </enum>
12900
12901 <enum
12902 name="AudioControllerType"
12903 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12904 >
12905 <desc>
12906 Virtual audio controller type.
12907 </desc>
12908
12909 <const name="AC97" value="0"/>
12910 <const name="SB16" value="1"/>
12911 </enum>
12912
12913 <interface
12914 name="IAudioAdapter" extends="$unknown"
12915 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12916 wsmap="managed"
12917 >
12918 <desc>
12919 The IAudioAdapter interface represents the virtual audio adapter of
12920 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12921 </desc>
12922 <attribute name="enabled" type="boolean">
12923 <desc>
12924 Flag whether the audio adapter is present in the
12925 guest system. If disabled, the virtual guest hardware will
12926 not contain any audio adapter. Can only be changed when
12927 the VM is not running.
12928 </desc>
12929 </attribute>
12930 <attribute name="audioController" type="AudioControllerType">
12931 <desc>
12932 The audio hardware we emulate.
12933 </desc>
12934 </attribute>
12935 <attribute name="audioDriver" type="AudioDriverType">
12936 <desc>
12937 Audio driver the adapter is connected to. This setting
12938 can only be changed when the VM is not running.
12939 </desc>
12940 </attribute>
12941 </interface>
12942
12943 <!--
12944 // IVRDPServer
12945 /////////////////////////////////////////////////////////////////////////
12946 -->
12947
12948 <enum
12949 name="VRDPAuthType"
12950 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12951 >
12952 <desc>
12953 VRDP authentication type.
12954 </desc>
12955
12956 <const name="Null" value="0">
12957 <desc>Null value, also means "no authentication".</desc>
12958 </const>
12959 <const name="External" value="1"/>
12960 <const name="Guest" value="2"/>
12961 </enum>
12962
12963 <interface
12964 name="IVRDPServer" extends="$unknown"
12965 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12966 wsmap="managed"
12967 >
12968 <attribute name="enabled" type="boolean">
12969 <desc>VRDP server status.</desc>
12970 </attribute>
12971
12972 <attribute name="ports" type="wstring">
12973 <desc>
12974 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12975 <note>
12976 This is a string of comma separated TCP port numbers or port number ranges.
12977 Example <tt>5000,5010-5012,5015</tt>
12978 </note>
12979 </desc>
12980 </attribute>
12981
12982 <attribute name="netAddress" type="wstring">
12983 <desc>VRDP server address.</desc>
12984 </attribute>
12985
12986 <attribute name="authType" type="VRDPAuthType">
12987 <desc>VRDP authentication method.</desc>
12988 </attribute>
12989
12990 <attribute name="authTimeout" type="unsigned long">
12991 <desc>Timeout for guest authentication. Milliseconds.</desc>
12992 </attribute>
12993
12994 <attribute name="allowMultiConnection" type="boolean">
12995 <desc>
12996 Flag whether multiple simultaneous connections to the VM are permitted.
12997 Note that this will be replaced by a more powerful mechanism in the future.
12998 </desc>
12999 </attribute>
13000
13001 <attribute name="reuseSingleConnection" type="boolean">
13002 <desc>
13003 Flag whether the existing connection must be dropped and a new connection
13004 must be established by the VRDP server, when a new client connects in single
13005 connection mode.
13006 </desc>
13007 </attribute>
13008
13009 <attribute name="videoChannel" type="boolean">
13010 <desc>
13011 Flag whether RDP video channel is supported.
13012 </desc>
13013 </attribute>
13014
13015 <attribute name="videoChannelQuality" type="unsigned long">
13016 <desc>
13017 Image quality in percents.
13018 </desc>
13019 </attribute>
13020
13021 </interface>
13022
13023
13024 <!--
13025 // ISharedFolder
13026 /////////////////////////////////////////////////////////////////////////
13027 -->
13028
13029 <interface
13030 name="ISharedFolder" extends="$unknown"
13031 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
13032 wsmap="struct"
13033 >
13034 <desc>
13035 The ISharedFolder interface represents a folder in the host computer's
13036 file system accessible from the guest OS running inside a virtual
13037 machine using an associated logical name.
13038
13039 There are three types of shared folders:
13040 <ul>
13041 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
13042 folders available to all virtual machines.</li>
13043 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
13044 VM-specific shared folders available to the given virtual machine at
13045 startup.</li>
13046 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
13047 VM-specific shared folders created in the session context (for
13048 example, when the virtual machine is running) and automatically
13049 discarded when the session is closed (the VM is powered off).</li>
13050 </ul>
13051
13052 Logical names of shared folders must be unique within the given scope
13053 (global, permanent or transient). However, they do not need to be unique
13054 across scopes. In this case, the definition of the shared folder in a
13055 more specific scope takes precedence over definitions in all other
13056 scopes. The order of precedence is (more specific to more general):
13057 <ol>
13058 <li>Transient definitions</li>
13059 <li>Permanent definitions</li>
13060 <li>Global definitions</li>
13061 </ol>
13062
13063 For example, if MyMachine has a shared folder named
13064 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
13065 transient shared folder named <tt>C_DRIVE</tt> (that points
13066 to <tt>C:\\\\WINDOWS</tt>) will change the definition
13067 of <tt>C_DRIVE</tt> in the guest OS so
13068 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
13069 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
13070 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
13071 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
13072 to <tt>C:\\</tt> if it still exists.
13073
13074 Note that permanent and transient shared folders of different machines
13075 are in different name spaces, so they don't overlap and don't need to
13076 have unique logical names.
13077
13078 <note>
13079 Global shared folders are not implemented in the current version of the
13080 product.
13081 </note>
13082 </desc>
13083
13084 <attribute name="name" type="wstring" readonly="yes">
13085 <desc>Logical name of the shared folder.</desc>
13086 </attribute>
13087
13088 <attribute name="hostPath" type="wstring" readonly="yes">
13089 <desc>Full path to the shared folder in the host file system.</desc>
13090 </attribute>
13091
13092 <attribute name="accessible" type="boolean" readonly="yes">
13093 <desc>
13094 Whether the folder defined by the host path is currently
13095 accessible or not.
13096 For example, the folder can be unaccessible if it is placed
13097 on the network share that is not available by the time
13098 this property is read.
13099 </desc>
13100 </attribute>
13101
13102 <attribute name="writable" type="boolean" readonly="yes">
13103 <desc>
13104 Whether the folder defined by the host path is writable or
13105 not.
13106 </desc>
13107 </attribute>
13108
13109 <attribute name="lastAccessError" type="wstring" readonly="yes">
13110 <desc>
13111 Text message that represents the result of the last accessibility
13112 check.
13113
13114 Accessibility checks are performed each time the <link to="#accessible"/>
13115 attribute is read. An empty string is returned if the last
13116 accessibility check was successful. A non-empty string indicates a
13117 failure and should normally describe a reason of the failure (for
13118 example, a file read error).
13119 </desc>
13120 </attribute>
13121
13122 </interface>
13123
13124 <!--
13125 // ISession
13126 /////////////////////////////////////////////////////////////////////////
13127 -->
13128
13129 <interface
13130 name="IInternalSessionControl" extends="$unknown"
13131 uuid="cc8d63a0-568e-45dd-9bf6-6354049ece1e"
13132 internal="yes"
13133 wsmap="suppress"
13134 >
13135 <method name="getPID">
13136 <desc>PID of the process that has created this Session object.
13137 </desc>
13138 <param name="pid" type="unsigned long" dir="return"/>
13139 </method>
13140
13141 <method name="getRemoteConsole">
13142 <desc>
13143 Returns the console object suitable for remote control.
13144
13145 <result name="VBOX_E_INVALID_VM_STATE">
13146 Session state prevents operation.
13147 </result>
13148 <result name="VBOX_E_INVALID_OBJECT_STATE">
13149 Session type prevents operation.
13150 </result>
13151
13152 </desc>
13153 <param name="console" type="IConsole" dir="return"/>
13154 </method>
13155
13156 <method name="assignMachine">
13157 <desc>
13158 Assigns the machine object associated with this direct-type
13159 session or informs the session that it will be a remote one
13160 (if @a machine == @c null).
13161
13162 <result name="VBOX_E_INVALID_VM_STATE">
13163 Session state prevents operation.
13164 </result>
13165 <result name="VBOX_E_INVALID_OBJECT_STATE">
13166 Session type prevents operation.
13167 </result>
13168
13169 </desc>
13170 <param name="machine" type="IMachine" dir="in"/>
13171 </method>
13172
13173 <method name="assignRemoteMachine">
13174 <desc>
13175 Assigns the machine and the (remote) console object associated with
13176 this remote-type session.
13177
13178 <result name="VBOX_E_INVALID_VM_STATE">
13179 Session state prevents operation.
13180 </result>
13181
13182 </desc>
13183 <param name="machine" type="IMachine" dir="in"/>
13184 <param name="console" type="IConsole" dir="in"/>
13185 </method>
13186
13187 <method name="updateMachineState">
13188 <desc>
13189 Updates the machine state in the VM process.
13190 Must be called only in certain cases
13191 (see the method implementation).
13192
13193 <result name="VBOX_E_INVALID_VM_STATE">
13194 Session state prevents operation.
13195 </result>
13196 <result name="VBOX_E_INVALID_OBJECT_STATE">
13197 Session type prevents operation.
13198 </result>
13199
13200 </desc>
13201 <param name="aMachineState" type="MachineState" dir="in"/>
13202 </method>
13203
13204 <method name="uninitialize">
13205 <desc>
13206 Uninitializes (closes) this session. Used by VirtualBox to close
13207 the corresponding remote session when the direct session dies
13208 or gets closed.
13209
13210 <result name="VBOX_E_INVALID_VM_STATE">
13211 Session state prevents operation.
13212 </result>
13213
13214 </desc>
13215 </method>
13216
13217 <method name="onNetworkAdapterChange">
13218 <desc>
13219 Triggered when settings of a network adapter of the
13220 associated virtual machine have changed.
13221
13222 <result name="VBOX_E_INVALID_VM_STATE">
13223 Session state prevents operation.
13224 </result>
13225 <result name="VBOX_E_INVALID_OBJECT_STATE">
13226 Session type prevents operation.
13227 </result>
13228
13229 </desc>
13230 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
13231 <param name="changeAdapter" type="boolean" dir="in"/>
13232 </method>
13233
13234 <method name="onSerialPortChange">
13235 <desc>
13236 Triggered when settings of a serial port of the
13237 associated virtual machine have changed.
13238
13239 <result name="VBOX_E_INVALID_VM_STATE">
13240 Session state prevents operation.
13241 </result>
13242 <result name="VBOX_E_INVALID_OBJECT_STATE">
13243 Session type prevents operation.
13244 </result>
13245
13246 </desc>
13247 <param name="serialPort" type="ISerialPort" dir="in"/>
13248 </method>
13249
13250 <method name="onParallelPortChange">
13251 <desc>
13252 Triggered when settings of a parallel port of the
13253 associated virtual machine have changed.
13254
13255 <result name="VBOX_E_INVALID_VM_STATE">
13256 Session state prevents operation.
13257 </result>
13258 <result name="VBOX_E_INVALID_OBJECT_STATE">
13259 Session type prevents operation.
13260 </result>
13261
13262 </desc>
13263 <param name="parallelPort" type="IParallelPort" dir="in"/>
13264 </method>
13265
13266 <method name="onStorageControllerChange">
13267 <desc>
13268 Triggered when settings of a storage controller of the
13269 associated virtual machine have changed.
13270
13271 <result name="VBOX_E_INVALID_VM_STATE">
13272 Session state prevents operation.
13273 </result>
13274 <result name="VBOX_E_INVALID_OBJECT_STATE">
13275 Session type prevents operation.
13276 </result>
13277
13278 </desc>
13279 </method>
13280
13281 <method name="onMediumChange">
13282 <desc>
13283 Triggered when attached media of the
13284 associated virtual machine have changed.
13285
13286 <result name="VBOX_E_INVALID_VM_STATE">
13287 Session state prevents operation.
13288 </result>
13289 <result name="VBOX_E_INVALID_OBJECT_STATE">
13290 Session type prevents operation.
13291 </result>
13292
13293 </desc>
13294
13295 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
13296 <param name="force" type="boolean" dir="in"/>
13297 </method>
13298
13299 <method name="onCPUChange">
13300 <desc>
13301 Notification when a CPU changes.
13302 </desc>
13303 <param name="cpu" type="unsigned long" dir="in">
13304 <desc>The CPU which changed</desc>
13305 </param>
13306 <param name="add" type="boolean" dir="in">
13307 <desc>Flag whether the CPU was added or removed</desc>
13308 </param>
13309 </method>
13310
13311 <method name="onVRDPServerChange">
13312 <desc>
13313 Triggered when settings of the VRDP server object of the
13314 associated virtual machine have changed.
13315
13316 <result name="VBOX_E_INVALID_VM_STATE">
13317 Session state prevents operation.
13318 </result>
13319 <result name="VBOX_E_INVALID_OBJECT_STATE">
13320 Session type prevents operation.
13321 </result>
13322
13323 </desc>
13324 </method>
13325
13326 <method name="onUSBControllerChange">
13327 <desc>
13328 Triggered when settings of the USB controller object of the
13329 associated virtual machine have changed.
13330
13331 <result name="VBOX_E_INVALID_VM_STATE">
13332 Session state prevents operation.
13333 </result>
13334 <result name="VBOX_E_INVALID_OBJECT_STATE">
13335 Session type prevents operation.
13336 </result>
13337
13338 </desc>
13339 </method>
13340
13341 <method name="onSharedFolderChange">
13342 <desc>
13343 Triggered when a permanent (global or machine) shared folder has been
13344 created or removed.
13345 <note>
13346 We don't pass shared folder parameters in this notification because
13347 the order in which parallel notifications are delivered is not defined,
13348 therefore it could happen that these parameters were outdated by the
13349 time of processing this notification.
13350 </note>
13351
13352 <result name="VBOX_E_INVALID_VM_STATE">
13353 Session state prevents operation.
13354 </result>
13355 <result name="VBOX_E_INVALID_OBJECT_STATE">
13356 Session type prevents operation.
13357 </result>
13358
13359 </desc>
13360 <param name="global" type="boolean" dir="in"/>
13361 </method>
13362
13363 <method name="onUSBDeviceAttach">
13364 <desc>
13365 Triggered when a request to capture a USB device (as a result
13366 of matched USB filters or direct call to
13367 <link to="IConsole::attachUSBDevice"/>) has completed.
13368 A @c null @a error object means success, otherwise it
13369 describes a failure.
13370
13371 <result name="VBOX_E_INVALID_VM_STATE">
13372 Session state prevents operation.
13373 </result>
13374 <result name="VBOX_E_INVALID_OBJECT_STATE">
13375 Session type prevents operation.
13376 </result>
13377
13378 </desc>
13379 <param name="device" type="IUSBDevice" dir="in"/>
13380 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
13381 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
13382 </method>
13383
13384 <method name="onUSBDeviceDetach">
13385 <desc>
13386 Triggered when a request to release the USB device (as a result
13387 of machine termination or direct call to
13388 <link to="IConsole::detachUSBDevice"/>) has completed.
13389 A @c null @a error object means success, otherwise it
13390 describes a failure.
13391
13392 <result name="VBOX_E_INVALID_VM_STATE">
13393 Session state prevents operation.
13394 </result>
13395 <result name="VBOX_E_INVALID_OBJECT_STATE">
13396 Session type prevents operation.
13397 </result>
13398
13399 </desc>
13400 <param name="id" type="uuid" mod="string" dir="in"/>
13401 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
13402 </method>
13403
13404 <method name="onShowWindow">
13405 <desc>
13406 Called by <link to="IMachine::canShowConsoleWindow"/> and by
13407 <link to="IMachine::showConsoleWindow"/> in order to notify
13408 console callbacks
13409 <link to="IConsoleCallback::onCanShowWindow"/>
13410 and <link to="IConsoleCallback::onShowWindow"/>.
13411
13412 <result name="VBOX_E_INVALID_OBJECT_STATE">
13413 Session type prevents operation.
13414 </result>
13415
13416 </desc>
13417 <param name="check" type="boolean" dir="in"/>
13418 <param name="canShow" type="boolean" dir="out"/>
13419 <param name="winId" type="unsigned long long" dir="out"/>
13420 </method>
13421
13422 <method name="accessGuestProperty">
13423 <desc>
13424 Called by <link to="IMachine::getGuestProperty"/> and by
13425 <link to="IMachine::setGuestProperty"/> in order to read and
13426 modify guest properties.
13427
13428 <result name="VBOX_E_INVALID_VM_STATE">
13429 Machine session is not open.
13430 </result>
13431 <result name="VBOX_E_INVALID_OBJECT_STATE">
13432 Session type is not direct.
13433 </result>
13434
13435 </desc>
13436 <param name="name" type="wstring" dir="in"/>
13437 <param name="value" type="wstring" dir="in"/>
13438 <param name="flags" type="wstring" dir="in"/>
13439 <param name="isSetter" type="boolean" dir="in"/>
13440 <param name="retValue" type="wstring" dir="out"/>
13441 <param name="retTimestamp" type="unsigned long long" dir="out"/>
13442 <param name="retFlags" type="wstring" dir="out"/>
13443 </method>
13444
13445 <method name="enumerateGuestProperties">
13446 <desc>
13447 Return a list of the guest properties matching a set of patterns along
13448 with their values, time stamps and flags.
13449
13450 <result name="VBOX_E_INVALID_VM_STATE">
13451 Machine session is not open.
13452 </result>
13453 <result name="VBOX_E_INVALID_OBJECT_STATE">
13454 Session type is not direct.
13455 </result>
13456
13457 </desc>
13458 <param name="patterns" type="wstring" dir="in">
13459 <desc>
13460 The patterns to match the properties against as a comma-separated
13461 string. If this is empty, all properties currently set will be
13462 returned.
13463 </desc>
13464 </param>
13465 <param name="key" type="wstring" dir="out" safearray="yes">
13466 <desc>
13467 The key names of the properties returned.
13468 </desc>
13469 </param>
13470 <param name="value" type="wstring" dir="out" safearray="yes">
13471 <desc>
13472 The values of the properties returned. The array entries match the
13473 corresponding entries in the @a key array.
13474 </desc>
13475 </param>
13476 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
13477 <desc>
13478 The time stamps of the properties returned. The array entries match
13479 the corresponding entries in the @a key array.
13480 </desc>
13481 </param>
13482 <param name="flags" type="wstring" dir="out" safearray="yes">
13483 <desc>
13484 The flags of the properties returned. The array entries match the
13485 corresponding entries in the @a key array.
13486 </desc>
13487 </param>
13488 </method>
13489
13490 <method name="onlineMergeMedium">
13491 <desc>
13492 Triggers online merging of a hard disk. Used internally when deleting
13493 a snapshot while a VM referring to the same hard disk chain is running.
13494
13495 <result name="VBOX_E_INVALID_VM_STATE">
13496 Machine session is not open.
13497 </result>
13498 <result name="VBOX_E_INVALID_OBJECT_STATE">
13499 Session type is not direct.
13500 </result>
13501
13502 </desc>
13503 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
13504 <desc>The medium attachment to identify the medium chain.</desc>
13505 </param>
13506 <param name="sourceIdx" type="unsigned long" dir="in">
13507 <desc>The index of the source image in the chain.
13508 Redundant, but drastically reduces IPC.</desc>
13509 </param>
13510 <param name="targetIdx" type="unsigned long" dir="in">
13511 <desc>The index of the target image in the chain.
13512 Redundant, but drastically reduces IPC.</desc>
13513 </param>
13514 <param name="source" type="IMedium" dir="in">
13515 <desc>Merge source medium.</desc>
13516 </param>
13517 <param name="target" type="IMedium" dir="in">
13518 <desc>Merge target medium.</desc>
13519 </param>
13520 <param name="mergeForward" type="boolean" dir="in">
13521 <desc>Merge direction.</desc>
13522 </param>
13523 <param name="parentForTarget" type="IMedium" dir="in">
13524 <desc>For forward merges: new parent for target medium.</desc>
13525 </param>
13526 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
13527 <desc>For backward merges: list of media which need their parent UUID
13528 updated.</desc>
13529 </param>
13530 <param name="progress" type="IProgress" dir="in">
13531 <desc>
13532 Progress object for this operation.
13533 </desc>
13534 </param>
13535 </method>
13536
13537 </interface>
13538
13539 <interface
13540 name="ISession" extends="$unknown"
13541 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
13542 wsmap="managed"
13543 >
13544 <desc>
13545 The ISession interface represents a serialization primitive for virtual
13546 machines.
13547
13548 With VirtualBox, every time one wishes to manipulate a virtual machine
13549 (e.g. change its settings or start execution), a session object is
13550 required. Such an object must be passed to one of the session methods
13551 that open the given session, which then initiates the machine manipulation.
13552
13553 A session serves several purposes: it identifies to the inter-process VirtualBox
13554 code which process is currently working with the virtual machine, and it ensures
13555 that there are no incompatible requests from several processes for the
13556 same virtual machine. Session objects can therefore be thought of as mutex
13557 semaphores that lock virtual machines to prevent conflicting accesses from
13558 several processes.
13559
13560 How sessions objects are used depends on whether you use the Main API
13561 via COM or via the webservice:
13562
13563 <ul>
13564 <li>When using the COM API directly, an object of the Session class from the
13565 VirtualBox type library needs to be created. In regular COM C++ client code,
13566 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
13567 This object will then act as a local session object in further calls to open
13568 a session.
13569 </li>
13570
13571 <li>In the webservice, the session manager (IWebsessionManager) instead creates
13572 one session object automatically when <link to="IWebsessionManager::logon" />
13573 is called. A managed object reference to that session object can be retrieved by
13574 calling <link to="IWebsessionManager::getSessionObject" />. This session object
13575 reference can then be used to open sessions.
13576 </li>
13577 </ul>
13578
13579 Sessions are mainly used in two variations:
13580
13581 <ul>
13582 <li>
13583 To start a virtual machine in a separate process, one would call
13584 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
13585 object as its first parameter. This session then identifies the caller
13586 and lets him control the started machine (for example, pause machine
13587 execution or power it down) as well as be notified about machine
13588 execution state changes.
13589 </li>
13590
13591 <li>To alter machine settings, or to start machine execution within the
13592 current process, one needs to open a direct session for the machine first by
13593 calling <link to="IVirtualBox::openSession"/>. While a direct session
13594 is open within one process, no any other process may open another direct
13595 session for the same machine. This prevents the machine from being changed
13596 by other processes while it is running or while the machine is being configured.
13597 </li>
13598 </ul>
13599
13600 One also can attach to an existing direct session already opened by
13601 another process (for example, in order to send a control request to the
13602 virtual machine such as the pause or the reset request). This is done by
13603 calling <link to="IVirtualBox::openExistingSession"/>.
13604
13605 <note>
13606 Unless you are trying to write a new VirtualBox front-end that
13607 performs direct machine execution (like the VirtualBox or VBoxSDL
13608 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
13609 session opened by <link to="IVirtualBox::openSession"/> and use this
13610 session only to change virtual machine settings. If you simply want to
13611 start virtual machine execution using one of the existing front-ends
13612 (for example the VirtualBox GUI or headless server), simply use
13613 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
13614 will power up the machine automatically for you.
13615 </note>
13616 </desc>
13617
13618 <attribute name="state" type="SessionState" readonly="yes">
13619 <desc>Current state of this session.</desc>
13620 </attribute>
13621
13622 <attribute name="type" type="SessionType" readonly="yes">
13623 <desc>
13624 Type of this session. The value of this attribute is valid only
13625 if the session is currently open (i.e. its #state is
13626 SessionType_SessionOpen), otherwise an error will be returned.
13627 </desc>
13628 </attribute>
13629
13630 <attribute name="machine" type="IMachine" readonly="yes">
13631 <desc>Machine object associated with this session.</desc>
13632 </attribute>
13633
13634 <attribute name="console" type="IConsole" readonly="yes">
13635 <desc>Console object associated with this session.</desc>
13636 </attribute>
13637
13638 <method name="close">
13639 <desc>
13640 Closes a session that was previously opened.
13641
13642 It is recommended that every time an "open session" method (such as
13643 <link to="IVirtualBox::openRemoteSession" /> or
13644 <link to="IVirtualBox::openSession" />) has been called to
13645 manipulate a virtual machine, the caller invoke
13646 ISession::close() when it's done doing so. Since sessions are
13647 serialization primitives much like ordinary mutexes, they are
13648 best used the same way: for each "open" call, there should be
13649 a matching "close" call, even when errors occur.
13650
13651 Otherwise, if a direct session for a machine opened with
13652 <link to="IVirtualBox::openSession"/> is not explicitly closed
13653 when the application terminates, the state of the machine will
13654 be set to <link to="MachineState_Aborted" /> on the server.
13655
13656 Generally, it is recommended to close all open sessions explicitly
13657 before terminating the application (regardless of the reason for
13658 the termination).
13659
13660 <note>
13661 Do not expect the session state (<link to="ISession::state" />
13662 to return to "Closed" immediately after you invoke
13663 ISession::close(), particularly if you have started a remote
13664 session to execute the VM in a new process. The session state will
13665 automatically return to "Closed" once the VM is no longer executing,
13666 which can of course take a very long time.
13667 </note>
13668
13669 <result name="E_UNEXPECTED">
13670 Session is not open.
13671 </result>
13672
13673 </desc>
13674 </method>
13675
13676 </interface>
13677
13678 <!--
13679 // IStorageController
13680 /////////////////////////////////////////////////////////////////////////
13681 -->
13682
13683 <enum
13684 name="StorageBus"
13685 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
13686 >
13687 <desc>
13688 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
13689 see <link to="IStorageController::bus" />.
13690 </desc>
13691 <const name="Null" value="0">
13692 <desc>@c null value. Never used by the API.</desc>
13693 </const>
13694 <const name="IDE" value="1"/>
13695 <const name="SATA" value="2"/>
13696 <const name="SCSI" value="3"/>
13697 <const name="Floppy" value="4"/>
13698 <const name="SAS" value="5"/>
13699 </enum>
13700
13701 <enum
13702 name="StorageControllerType"
13703 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
13704 >
13705 <desc>
13706 The exact variant of storage controller hardware presented
13707 to the guest; see <link to="IStorageController::controllerType" />.
13708 </desc>
13709
13710 <const name="Null" value="0">
13711 <desc>@c null value. Never used by the API.</desc>
13712 </const>
13713 <const name="LsiLogic" value="1">
13714 <desc>A SCSI controller of the LsiLogic variant.</desc>
13715 </const>
13716 <const name="BusLogic" value="2">
13717 <desc>A SCSI controller of the BusLogic variant.</desc>
13718 </const>
13719 <const name="IntelAhci" value="3">
13720 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13721 </const>
13722 <const name="PIIX3" value="4">
13723 <desc>An IDE controller of the PIIX3 variant.</desc>
13724 </const>
13725 <const name="PIIX4" value="5">
13726 <desc>An IDE controller of the PIIX4 variant.</desc>
13727 </const>
13728 <const name="ICH6" value="6">
13729 <desc>An IDE controller of the ICH6 variant.</desc>
13730 </const>
13731 <const name="I82078" value="7">
13732 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13733 </const>
13734 <const name="LsiLogicSas" value="8">
13735 <desc>A variant of the LsiLogic controller using SAS.</desc>
13736 </const>
13737 </enum>
13738
13739 <interface
13740 name="IStorageController" extends="$unknown"
13741 uuid="7635f4ec-8a28-44b5-9223-315a87b710fb"
13742 wsmap="managed"
13743 >
13744 <desc>
13745 Represents a storage controller that is attached to a virtual machine
13746 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13747 attached to storage controllers in a real computer, virtual drives
13748 (represented by <link to="IMediumAttachment" />) are attached to virtual
13749 storage controllers, represented by this interface.
13750
13751 As opposed to physical hardware, VirtualBox has a very generic concept
13752 of a storage controller, and for purposes of the Main API, all virtual
13753 storage is attached to virtual machines via instances of this interface.
13754 There are four types of such virtual storage controllers: IDE, SCSI, SATA
13755 and Floppy (see <link to="#bus" />). Depending on which of these four is
13756 used, certain sub-types may be available and can be selected in
13757 <link to="#controllerType" />.
13758
13759 Depending on these settings, the guest operating system might see
13760 significantly different virtual hardware.
13761 </desc>
13762
13763 <attribute name="name" type="wstring" readonly="yes">
13764 <desc>
13765 Name of the storage controller, as originally specified with
13766 <link to="IMachine::addStorageController" />. This then uniquely
13767 identifies this controller with other method calls such as
13768 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13769 </desc>
13770 </attribute>
13771
13772 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13773 <desc>
13774 Maximum number of devices which can be attached to one port.
13775 </desc>
13776 </attribute>
13777
13778 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13779 <desc>
13780 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13781 </desc>
13782 </attribute>
13783
13784 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13785 <desc>
13786 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13787 </desc>
13788 </attribute>
13789
13790 <attribute name="instance" type="unsigned long">
13791 <desc>
13792 The instance number of the device in the running VM.
13793 </desc>
13794 </attribute>
13795
13796 <attribute name="portCount" type="unsigned long">
13797 <desc>
13798 The number of currently usable ports on the controller.
13799 The minimum and maximum number of ports for one controller are
13800 stored in <link to="IStorageController::minPortCount"/>
13801 and <link to="IStorageController::maxPortCount"/>.
13802 </desc>
13803 </attribute>
13804
13805 <attribute name="bus" type="StorageBus" readonly="yes">
13806 <desc>
13807 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
13808 </desc>
13809 </attribute>
13810
13811 <attribute name="controllerType" type="StorageControllerType">
13812 <desc>
13813 The exact variant of storage controller hardware presented
13814 to the guest.
13815 Depending on this value, VirtualBox will provide a different
13816 virtual storage controller hardware to the guest.
13817 For SATA and floppy controllers, only one variant is available,
13818 but for IDE and SCSI, there are several.
13819
13820 For SCSI controllers, the default type is LsiLogic.
13821 </desc>
13822 </attribute>
13823
13824 <attribute name="ioBackend" type="IoBackendType">
13825 <desc>
13826 The I/O backend to use for the given storage controller.
13827 </desc>
13828 </attribute>
13829
13830 <method name="getIDEEmulationPort">
13831 <desc>
13832 Gets the corresponding port number which is emulated as an IDE device.
13833 Works only with SATA controllers.
13834
13835 <result name="E_INVALIDARG">
13836 The @a devicePosition is not in the range 0 to 3.
13837 </result>
13838 <result name="E_NOTIMPL">
13839 The storage controller type is not SATAIntelAhci.
13840 </result>
13841
13842 </desc>
13843 <param name="devicePosition" type="long" dir="in"/>
13844 <param name="portNumber" type="long" dir="return"/>
13845 </method>
13846
13847 <method name="setIDEEmulationPort">
13848 <desc>
13849 Sets the port number which is emulated as an IDE device.
13850 Works only with SATA controllers.
13851
13852 <result name="E_INVALIDARG">
13853 The @a devicePosition is not in the range 0 to 3 or the
13854 @a portNumber is not in the range 0 to 29.
13855 </result>
13856 <result name="E_NOTIMPL">
13857 The storage controller type is not SATAIntelAhci.
13858 </result>
13859
13860 </desc>
13861 <param name="devicePosition" type="long" dir="in"/>
13862 <param name="portNumber" type="long" dir="in"/>
13863 </method>
13864
13865 </interface>
13866
13867<if target="wsdl">
13868
13869 <!--
13870 // IManagedObjectRef
13871 /////////////////////////////////////////////////////////////////////////
13872 -->
13873
13874 <interface
13875 name="IManagedObjectRef" extends="$unknown"
13876 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13877 internal="yes"
13878 wsmap="managed"
13879 wscpp="hardcoded"
13880 >
13881 <desc>
13882 Managed object reference.
13883
13884 Only within the webservice, a managed object reference (which is really
13885 an opaque number) allows a webservice client to address an object
13886 that lives in the address space of the webservice server.
13887
13888 Behind each managed object reference, there is a COM object that lives
13889 in the webservice server's address space. The COM object is not freed
13890 until the managed object reference is released, either by an explicit
13891 call to <link to="IManagedObjectRef::release" /> or by logging off from
13892 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13893 all objects created during the webservice session.
13894
13895 Whenever a method call of the VirtualBox API returns a COM object, the
13896 webservice representation of that method will instead return a
13897 managed object reference, which can then be used to invoke methods
13898 on that object.
13899 </desc>
13900
13901 <method name="getInterfaceName">
13902 <desc>
13903 Returns the name of the interface that this managed object represents,
13904 for example, "IMachine", as a string.
13905 </desc>
13906 <param name="return" type="wstring" dir="return"/>
13907 </method>
13908
13909 <method name="release">
13910 <desc>
13911 Releases this managed object reference and frees the resources that
13912 were allocated for it in the webservice server process. After calling
13913 this method, the identifier of the reference can no longer be used.
13914 </desc>
13915 </method>
13916
13917 </interface>
13918
13919 <!--
13920 // IWebsessionManager
13921 /////////////////////////////////////////////////////////////////////////
13922 -->
13923
13924 <interface
13925 name="IWebsessionManager" extends="$unknown"
13926 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13927 internal="yes"
13928 wsmap="global"
13929 wscpp="hardcoded"
13930 >
13931 <desc>
13932 Websession manager. This provides essential services
13933 to webservice clients.
13934 </desc>
13935 <method name="logon">
13936 <desc>
13937 Logs a new client onto the webservice and returns a managed object reference to
13938 the IVirtualBox instance, which the client can then use as a basis to further
13939 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13940 interface, in one way or the other.
13941 </desc>
13942 <param name="username" type="wstring" dir="in"/>
13943 <param name="password" type="wstring" dir="in"/>
13944 <param name="return" type="IVirtualBox" dir="return"/>
13945 </method>
13946
13947 <method name="getSessionObject">
13948 <desc>
13949 Returns a managed object reference to the internal ISession object that was created
13950 for this web service session when the client logged on.
13951
13952 <see>ISession</see>
13953 </desc>
13954 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13955 <param name="return" type="ISession" dir="return"/>
13956 </method>
13957
13958 <method name="logoff">
13959 <desc>
13960 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13961 and destroys all resources associated with the session (most importantly, all
13962 managed objects created in the server while the session was active).
13963 </desc>
13964 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13965 </method>
13966
13967 </interface>
13968
13969</if>
13970
13971 <!--
13972 // IPerformanceCollector & friends
13973 /////////////////////////////////////////////////////////////////////////
13974 -->
13975
13976 <interface
13977 name="IPerformanceMetric" extends="$unknown"
13978 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13979 >
13980 <desc>
13981 The IPerformanceMetric interface represents parameters of the given
13982 performance metric.
13983 </desc>
13984
13985 <attribute name="metricName" type="wstring" readonly="yes">
13986 <desc>
13987 Name of the metric.
13988 </desc>
13989 </attribute>
13990
13991 <attribute name="object" type="$unknown" readonly="yes">
13992 <desc>
13993 Object this metric belongs to.
13994 </desc>
13995 </attribute>
13996
13997 <attribute name="description" type="wstring" readonly="yes">
13998 <desc>
13999 Textual description of the metric.
14000 </desc>
14001 </attribute>
14002
14003 <attribute name="period" type="unsigned long" readonly="yes">
14004 <desc>
14005 Time interval between samples, measured in seconds.
14006 </desc>
14007 </attribute>
14008
14009 <attribute name="count" type="unsigned long" readonly="yes">
14010 <desc>
14011 Number of recent samples retained by the performance collector for this
14012 metric.
14013
14014 When the collected sample count exceeds this number, older samples
14015 are discarded.
14016 </desc>
14017 </attribute>
14018
14019 <attribute name="unit" type="wstring" readonly="yes">
14020 <desc>
14021 Unit of measurement.
14022 </desc>
14023 </attribute>
14024
14025 <attribute name="minimumValue" type="long" readonly="yes">
14026 <desc>
14027 Minimum possible value of this metric.
14028 </desc>
14029 </attribute>
14030
14031 <attribute name="maximumValue" type="long" readonly="yes">
14032 <desc>
14033 Maximum possible value of this metric.
14034 </desc>
14035 </attribute>
14036 </interface>
14037
14038 <interface
14039 name="IPerformanceCollector" extends="$unknown"
14040 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
14041 wsmap="managed"
14042 >
14043 <desc>
14044 The IPerformanceCollector interface represents a service that collects
14045 and stores performance metrics data.
14046
14047 Performance metrics are associated with objects of interfaces like IHost
14048 and IMachine. Each object has a distinct set of performance metrics. The
14049 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
14050
14051 Metric data is collected at the specified intervals and is retained
14052 internally. The interval and the number of retained samples can be set
14053 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
14054 and collection settings are not persistent, they are discarded as soon as
14055 VBoxSVC process terminates. Moreover, metric settings and data associated
14056 with a particular VM only exist while VM is running. They disappear as
14057 soon as VM shuts down. It is not possible to set up metrics for machines
14058 that are powered off. One needs to start VM first, then set up metric
14059 collection parameters.
14060
14061 Metrics are organized hierarchically, with each level separated by a
14062 slash (/) character. Generally, the scheme for metric names is like this:
14063
14064 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
14065
14066 "Category/Metric" together form the base metric name. A base metric is
14067 the smallest unit for which a sampling interval and the number of
14068 retained samples can be set. Only base metrics can be enabled and
14069 disabled. All sub-metrics are collected when their base metric is
14070 collected. Collected values for any set of sub-metrics can be queried
14071 with <link to="IPerformanceCollector::queryMetricsData" />.
14072
14073 For example "CPU/Load/User:avg" metric name stands for the "CPU"
14074 category, "Load" metric, "User" submetric, "average" aggregate. An
14075 aggregate function is computed over all retained data. Valid aggregate
14076 functions are:
14077
14078 <ul>
14079 <li>avg -- average</li>
14080 <li>min -- minimum</li>
14081 <li>max -- maximum</li>
14082 </ul>
14083
14084 When setting up metric parameters, querying metric data, enabling or
14085 disabling metrics wildcards can be used in metric names to specify a
14086 subset of metrics. For example, to select all CPU-related metrics
14087 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
14088 so on. To query metric values without aggregates <tt>*:</tt> can be used.
14089
14090 The valid names for base metrics are:
14091
14092 <ul>
14093 <li>CPU/Load</li>
14094 <li>CPU/MHz</li>
14095 <li>RAM/Usage</li>
14096 </ul>
14097
14098 The general sequence for collecting and retrieving the metrics is:
14099 <ul>
14100 <li>
14101 Obtain an instance of IPerformanceCollector with
14102 <link to="IVirtualBox::performanceCollector" />
14103 </li>
14104 <li>
14105 Allocate and populate an array with references to objects the metrics
14106 will be collected for. Use references to IHost and IMachine objects.
14107 </li>
14108 <li>
14109 Allocate and populate an array with base metric names the data will
14110 be collected for.
14111 </li>
14112 <li>
14113 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
14114 the metric data will be collected and stored.
14115 </li>
14116 <li>
14117 Wait for the data to get collected.
14118 </li>
14119 <li>
14120 Allocate and populate an array with references to objects the metric
14121 values will be queried for. You can re-use the object array used for
14122 setting base metrics.
14123 </li>
14124 <li>
14125 Allocate and populate an array with metric names the data will be
14126 collected for. Note that metric names differ from base metric names.
14127 </li>
14128 <li>
14129 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
14130 that have been collected so far are returned. Note that the values
14131 are still retained internally and data collection continues.
14132 </li>
14133 </ul>
14134
14135 For an example of usage refer to the following files in VirtualBox SDK:
14136 <ul>
14137 <li>
14138 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
14139 </li>
14140 <li>
14141 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
14142 </li>
14143 </ul>
14144 </desc>
14145
14146 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
14147 <desc>
14148 Array of unique names of metrics.
14149
14150 This array represents all metrics supported by the performance
14151 collector. Individual objects do not necessarily support all of them.
14152 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
14153 list of supported metrics for a particular object.
14154 </desc>
14155 </attribute>
14156
14157 <method name="getMetrics">
14158 <desc>
14159 Returns parameters of specified metrics for a set of objects.
14160 <note>
14161 @c Null metrics array means all metrics. @c Null object array means
14162 all existing objects.
14163 </note>
14164 </desc>
14165 <param name="metricNames" type="wstring" dir="in" safearray="yes">
14166 <desc>
14167 Metric name filter. Currently, only a comma-separated list of metrics
14168 is supported.
14169 </desc>
14170 </param>
14171 <param name="objects" type="$unknown" dir="in" safearray="yes">
14172 <desc>
14173 Set of objects to return metric parameters for.
14174 </desc>
14175 </param>
14176 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
14177 <desc>
14178 Array of returned metric parameters.
14179 </desc>
14180 </param>
14181 </method>
14182
14183 <method name="setupMetrics">
14184 <desc>
14185 Sets parameters of specified base metrics for a set of objects. Returns
14186 an array of <link to="IPerformanceMetric" /> describing the metrics
14187 have been affected.
14188 <note>
14189 @c Null or empty metric name array means all metrics. @c Null or
14190 empty object array means all existing objects. If metric name array
14191 contains a single element and object array contains many, the single
14192 metric name array element is applied to each object array element to
14193 form metric/object pairs.
14194 </note>
14195 </desc>
14196 <param name="metricNames" type="wstring" dir="in" safearray="yes">
14197 <desc>
14198 Metric name filter. Comma-separated list of metrics with wildcard
14199 support.
14200 </desc>
14201 </param>
14202 <param name="objects" type="$unknown" dir="in" safearray="yes">
14203 <desc>
14204 Set of objects to setup metric parameters for.
14205 </desc>
14206 </param>
14207 <param name="period" type="unsigned long" dir="in">
14208 <desc>
14209 Time interval in seconds between two consecutive samples of
14210 performance data.
14211 </desc>
14212 </param>
14213 <param name="count" type="unsigned long" dir="in">
14214 <desc>
14215 Number of samples to retain in performance data history. Older
14216 samples get discarded.
14217 </desc>
14218 </param>
14219 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
14220 <desc>
14221 Array of metrics that have been modified by the call to this method.
14222 </desc>
14223 </param>
14224 </method>
14225
14226 <method name="enableMetrics">
14227 <desc>
14228 Turns on collecting specified base metrics. Returns an array of
14229 <link to="IPerformanceMetric" /> describing the metrics have been
14230 affected.
14231 <note>
14232 @c Null or empty metric name array means all metrics. @c Null or
14233 empty object array means all existing objects. If metric name array
14234 contains a single element and object array contains many, the single
14235 metric name array element is applied to each object array element to
14236 form metric/object pairs.
14237 </note>
14238 </desc>
14239 <param name="metricNames" type="wstring" dir="in" safearray="yes">
14240 <desc>
14241 Metric name filter. Comma-separated list of metrics with wildcard
14242 support.
14243 </desc>
14244 </param>
14245 <param name="objects" type="$unknown" dir="in" safearray="yes">
14246 <desc>
14247 Set of objects to enable metrics for.
14248 </desc>
14249 </param>
14250 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
14251 <desc>
14252 Array of metrics that have been modified by the call to this method.
14253 </desc>
14254 </param>
14255 </method>
14256
14257 <method name="disableMetrics">
14258 <desc>
14259 Turns off collecting specified base metrics. Returns an array of
14260 <link to="IPerformanceMetric" /> describing the metrics have been
14261 affected.
14262 <note>
14263 @c Null or empty metric name array means all metrics. @c Null or
14264 empty object array means all existing objects. If metric name array
14265 contains a single element and object array contains many, the single
14266 metric name array element is applied to each object array element to
14267 form metric/object pairs.
14268 </note>
14269 </desc>
14270 <param name="metricNames" type="wstring" dir="in" safearray="yes">
14271 <desc>
14272 Metric name filter. Comma-separated list of metrics with wildcard
14273 support.
14274 </desc>
14275 </param>
14276 <param name="objects" type="$unknown" dir="in" safearray="yes">
14277 <desc>
14278 Set of objects to disable metrics for.
14279 </desc>
14280 </param>
14281 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
14282 <desc>
14283 Array of metrics that have been modified by the call to this method.
14284 </desc>
14285 </param>
14286 </method>
14287
14288 <method name="queryMetricsData">
14289 <desc>
14290 Queries collected metrics data for a set of objects.
14291
14292 The data itself and related metric information are returned in seven
14293 parallel and one flattened array of arrays. Elements of
14294 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
14295 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
14296 the same index describe one set of values corresponding to a single
14297 metric.
14298
14299 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
14300 start and length of a sub-array is indicated by
14301 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
14302 value for metric <tt>metricNames[i]</tt> is at
14303 <tt>returnData[returnIndices[i]]</tt>.
14304
14305 <note>
14306 @c Null or empty metric name array means all metrics. @c Null or
14307 empty object array means all existing objects. If metric name array
14308 contains a single element and object array contains many, the single
14309 metric name array element is applied to each object array element to
14310 form metric/object pairs.
14311 </note>
14312 <note>
14313 Data collection continues behind the scenes after call to @c
14314 queryMetricsData. The return data can be seen as the snapshot of the
14315 current state at the time of @c queryMetricsData call. The internally
14316 kept metric values are not cleared by the call. This makes possible
14317 querying different subsets of metrics or aggregates with subsequent
14318 calls. If periodic querying is needed it is highly suggested to query
14319 the values with @c interval*count period to avoid confusion. This way
14320 a completely new set of data values will be provided by each query.
14321 </note>
14322 </desc>
14323 <param name="metricNames" type="wstring" dir="in" safearray="yes">
14324 <desc>
14325 Metric name filter. Comma-separated list of metrics with wildcard
14326 support.
14327 </desc>
14328 </param>
14329 <param name="objects" type="$unknown" dir="in" safearray="yes">
14330 <desc>
14331 Set of objects to query metrics for.
14332 </desc>
14333 </param>
14334 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
14335 <desc>
14336 Names of metrics returned in @c returnData.
14337 </desc>
14338 </param>
14339 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
14340 <desc>
14341 Objects associated with metrics returned in @c returnData.
14342 </desc>
14343 </param>
14344 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
14345 <desc>
14346 Units of measurement for each returned metric.
14347 </desc>
14348 </param>
14349 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
14350 <desc>
14351 Divisor that should be applied to return values in order to get
14352 floating point values. For example:
14353 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
14354 will retrieve the floating point value of i-th sample of the first
14355 metric.
14356 </desc>
14357 </param>
14358 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
14359 <desc>
14360 Sequence numbers of the first elements of value sequences of
14361 particular metrics returned in @c returnData. For aggregate metrics
14362 it is the sequence number of the sample the aggregate started
14363 calculation from.
14364 </desc>
14365 </param>
14366 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
14367 <desc>
14368 Indices of the first elements of value sequences of particular
14369 metrics returned in @c returnData.
14370 </desc>
14371 </param>
14372 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
14373 <desc>
14374 Lengths of value sequences of particular metrics.
14375 </desc>
14376 </param>
14377 <param name="returnData" type="long" dir="return" safearray="yes">
14378 <desc>
14379 Flattened array of all metric data containing sequences of values for
14380 each metric.
14381 </desc>
14382 </param>
14383 </method>
14384
14385 </interface>
14386 <enum
14387 name="NATAliasMode"
14388 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
14389 <desc></desc>
14390 <const name="AliasLog" value="0x1">
14391 <desc></desc>
14392 </const>
14393 <const name="AliasProxyOnly" value="0x02">
14394 <desc></desc>
14395 </const>
14396 <const name="AliasUseSamePorts" value="0x04">
14397 <desc></desc>
14398 </const>
14399 </enum>
14400 <enum
14401 name="NATProtocol"
14402 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
14403 >
14404 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
14405 <const name="UDP" value="0">
14406 <desc>Port-forwarding uses UDP protocol.</desc>
14407 </const>
14408 <const name="TCP" value="1">
14409 <desc>Port-forwarding uses TCP protocol.</desc>
14410 </const>
14411 </enum>
14412
14413 <interface
14414 name="INATEngine" extends="$unknown"
14415 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
14416 wsmap="managed"
14417 >
14418 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
14419 allows for changing NAT behavior such as port-forwarding rules. This interface is
14420 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
14421 <attribute name="network" type="wstring">
14422 <desc>The network attribute of the NAT engine (the same value is used with built-in
14423 DHCP server to fill corresponding fields of DHCP leases).</desc>
14424 </attribute>
14425 <attribute name="hostIP" type="wstring">
14426 <desc>IP of host interface to bind all opened sockets to.
14427 <note>Changing this does not change binding of port forwarding.</note>
14428 </desc>
14429 </attribute>
14430 <attribute name="tftpPrefix" type="wstring">
14431 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
14432 the corresponding fields of DHCP leases.</desc>
14433 </attribute>
14434 <attribute name="tftpBootFile" type="wstring">
14435 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
14436 the corresponding fields of DHCP leases.</desc>
14437 </attribute>
14438 <attribute name="tftpNextServer" type="wstring">
14439 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
14440 the corresponding fields of DHCP leases.
14441 <note>The preferred form is IPv4 addresses.</note>
14442 </desc>
14443 </attribute>
14444 <attribute name="aliasMode" type="unsigned long">
14445 <desc></desc>
14446 </attribute>
14447 <attribute name="dnsPassDomain" type="boolean">
14448 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
14449 </attribute>
14450 <attribute name="dnsProxy" type="boolean">
14451 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
14452 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
14453 </attribute>
14454 <attribute name="dnsUseHostResolver" type="boolean">
14455 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
14456 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
14457 </attribute>
14458 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
14459 <desc>Array of NAT port-forwarding rules in string representation, in the following
14460 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
14461 </attribute>
14462 <method name="setNetworkSettings">
14463 <desc>Sets network configuration of the NAT engine.</desc>
14464 <param name="mtu" type="unsigned long" dir="in">
14465 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
14466 </param>
14467 <param name="sockSnd" type="unsigned long" dir="in">
14468 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
14469 </param>
14470 <param name="sockRcv" type="unsigned long" dir="in">
14471 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
14472 </param>
14473 <param name="TcpWndSnd" type="unsigned long" dir="in">
14474 <desc>Initial size of the NAT engine's sending TCP window in bytes when
14475 establishing a new TCP connection.</desc>
14476 </param>
14477 <param name="TcpWndRcv" type="unsigned long" dir="in">
14478 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
14479 establishing a new TCP connection.</desc>
14480 </param>
14481 </method>
14482 <method name="getNetworkSettings">
14483 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
14484 for parameter descriptions.</desc>
14485 <param name="mtu" type="unsigned long" dir="out" />
14486 <param name="sockSnd" type="unsigned long" dir="out" />
14487 <param name="sockRcv" type="unsigned long" dir="out" />
14488 <param name="TcpWndSnd" type="unsigned long" dir="out" />
14489 <param name="TcpWndRcv" type="unsigned long" dir="out" />
14490 </method>
14491 <method name="addRedirect">
14492 <desc>Adds a new NAT port-forwarding rule.</desc>
14493 <param name="name" type="wstring" dir="in">
14494 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
14495 auto-generates one using the other parameters.</desc>
14496 </param>
14497 <param name="proto" type="NATProtocol" dir="in">
14498 <desc>Protocol handled with the rule.</desc>
14499 </param>
14500 <param name="hostIp" type="wstring" dir="in">
14501 <desc>IP of the host interface to which the rule should apply. An empty ip address is
14502 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
14503 </param>
14504 <param name="hostPort" type="unsigned short" dir="in">
14505 <desc>The port number to listen on.</desc>
14506 </param>
14507 <param name="guestIp" type="wstring" dir="in">
14508 <desc>The IP address of the guest which the NAT engine will forward matching packets
14509 to. An empty IP address is acceptable, in which case the NAT engine will forward
14510 packets to the first DHCP lease (x.x.x.15).</desc>
14511 </param>
14512 <param name="guestPort" type="unsigned short" dir="in">
14513 <desc>The port number to forward.</desc>
14514 </param>
14515 </method>
14516 <method name="removeRedirect">
14517 <desc>Removes a port-forwarding rule that was previously registered.</desc>
14518 <param name="name" type="wstring" dir="in">
14519 <desc>The name of the rule to delete.</desc>
14520 </param>
14521 </method>
14522 </interface>
14523
14524 <module name="VBoxSVC" context="LocalServer">
14525 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
14526 namespace="virtualbox.org">
14527 <interface name="IVirtualBox" default="yes"/>
14528 </class>
14529 </module>
14530
14531 <module name="VBoxC" context="InprocServer" threadingModel="Free">
14532 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
14533 namespace="virtualbox.org">
14534 <interface name="ISession" default="yes"/>
14535 </class>
14536 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
14537 namespace="virtualbox.org">
14538 <interface name="ILocalOwner" default="yes"/>
14539 <interface name="IVirtualBoxCallback"/>
14540 <interface name="IConsoleCallback"/>
14541 </class>
14542 </module>
14543
14544</library>
14545
14546</idl>
14547
14548<!-- 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