VirtualBox

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

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

#3285: Improve error handling API to include unique error numbers
Document

  • IVirtualBox::openHardDisk2
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 413.9 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 14866 2008-12-01 15:05:47Z vboxsync $ *
5 *
6 * :tabSize=2:indentSize=2:noTabs=true:
7 * :folding=explicit:collapseFolds=1:
8 *
9 * Master declaration for VirtualBox's Main API, represented
10 * by COM/XPCOM and web service interfaces.
11 *
12 * From this document, the build system generates several files
13 * via XSLT that are then used during the build process.
14 *
15 * Below is the list of XSL templates that operate on this file and
16 * output files they generate. These XSL templates must be updated
17 * whenever the schema of this file changes:
18 *
19 * 1. src/VBox/Main/idl/midl.xsl =>
20 * out/<platform>/bin/sdk/idl/VirtualBox.idl
21 * (MS COM interface definition file for Main API)
22 *
23 * 2. src/VBox/Main/idl/xpidl.xsl =>
24 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
25 * (XPCOM interface definition file for Main API)
26 *
27 * 3. src/VBox/Main/idl/doxygen.xsl =>
28 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
29 * (pseudo-IDL for Doxygen to generate the official Main API
30 * documentation)
31 *
32 * 4. src/VBox/Main/webservice/*.xsl =>
33 * a bunch of WSDL and C++ files
34 * (VirtualBox web service sources and SOAP mappers;
35 * see src/VBox/Main/webservice/Makefile.kmk for details)
36 *
37 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
38 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
39 * (smart Qt-based C++ wrapper classes for COM interfaces
40 * of the Main API)
41 *
42 * 6. src/VBox/Frontends/VirtualBox4/include/COMWrappers.xsl =>
43 * out/<platform>/obj/src/VBox/Frontends/VirtualBox4/VirtualBox/include/COMWrappers.h
44 * (smart Qt-based C++ wrapper classes for COM interfaces
45 * of the Main API)
46 *
47 * 7. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
48 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
49 * (Main API TypeLib block for the WiX installer)
50 *
51 * 8. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
52 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
53 * (<result> extraction for the %Rhrc format specifier)
54 *
55 Copyright (C) 2006-2008 Sun Microsystems, Inc.
56
57 This file is part of VirtualBox Open Source Edition (OSE), as
58 available from http://www.virtualbox.org. This file is free software;
59 you can redistribute it and/or modify it under the terms of the GNU
60 General Public License (GPL) as published by the Free Software
61 Foundation, in version 2 as it comes in the "COPYING" file of the
62 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
63 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
64
65 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
66 Clara, CA 95054 USA or visit http://www.sun.com if you need
67 additional information or have any questions.
68-->
69
70<idl>
71
72<desc>
73 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
74 describes the so-called <i>VirtualBox Main API</i> which comprises all public
75 COM interfaces and components provided by the VirtualBox server and by the
76 VirtualBox client library.
77
78 VirtualBox employs a client-server design, meaning that whenever any part of
79 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
80 interface or any virtual machine --, a dedicated server process named
81 VBoxSVC runs in the background. This allows multiple processes working with
82 VirtualBox to cooperate without conflicts. These processes communicate to each
83 other using inter-process communication facilities provided by the COM
84 implementation of the host computer.
85
86 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
87 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
88 implementation, is used.
89
90 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
91 the VBoxManage command-line interface and the VBoxVRDP server) are technically
92 front-ends to the Main API and only use the interfaces that are documented
93 in this Main API documentation. This ensures that, with any given release
94 version of VirtualBox, all capabilities of the product that could be useful
95 to an external client program are always exposed by way of this API.
96
97 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
98 contains two public component classes:
99 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
100 implement IVirtualBox and ISession interfaces respectively. These two classes
101 are of supreme importance and will be needed in order for any front-end
102 program to do anything useful. It is recommended to read the documentation of
103 the mentioned interfaces first.
104
105 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
106 there can be only one object of this class on the local machine at any given
107 time. This object is a parent of many other objects in the VirtualBox COM
108 library and lives in the VBoxSVC process. In fact, when you create an instance
109 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
110 process is already running, starts it if not, and returns you a reference to
111 the<tt>VirtualBox</tt> object created in this process. When the last reference
112 to this object is released, the VBoxSVC process ends (with a 5 second delay to
113 protect from too frequent restarts).
114
115 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
116 as many <tt>Session</tt> objects as you need but all of them will live in a
117 process which issues the object instantiation call. <tt>Session</tt> objects
118 represent virtual machine sessions which are used to configure virtual
119 machines and control their execution.
120</desc>
121
122<if target="midl">
123 <cpp line="enum {"/>
124 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
125 <cpp line=" kTypeLibraryMinorVersion = 0"/>
126 <cpp line="};"/>
127</if>
128
129<if target="xpidl">
130 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
131 <cpp>
132/* currently, nsISupportsImpl.h lacks the below-like macros */
133
134#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
135#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
142 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
150 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
151#endif
152
153#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
154# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
155 NS_INTERFACE_MAP_BEGIN(_class) \
156 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
157 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
158 NS_IMPL_QUERY_CLASSINFO(_class) \
159 NS_INTERFACE_MAP_END
160#endif
161
162#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
163# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
164 _i2, _ic2) \
165 NS_INTERFACE_MAP_BEGIN(_class) \
166 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
167 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
169 NS_IMPL_QUERY_CLASSINFO(_class) \
170 NS_INTERFACE_MAP_END
171#endif
172
173#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
174#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
175
176#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
177# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
178 NS_IMPL_THREADSAFE_ADDREF(_class) \
179 NS_IMPL_THREADSAFE_RELEASE(_class) \
180 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
181 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
182#endif
183
184#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
185# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
186 _i2, _ic2) \
187 NS_IMPL_THREADSAFE_ADDREF(_class) \
188 NS_IMPL_THREADSAFE_RELEASE(_class) \
189 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
190 _i2, _ic2) \
191 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
192#endif
193 </cpp>
194</if>
195
196<library
197 name="VirtualBox"
198 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
199 version="1.3"
200 desc="VirtualBox Type Library"
201 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
202 supportsErrorInfo="yes"
203>
204
205
206 <!--
207 // COM result codes for VirtualBox
208 /////////////////////////////////////////////////////////////////////////
209 -->
210
211 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
212 <desc>
213 This section describes all VirtualBox-specific COM result codes that may
214 be returned by methods of VirtualBox COM interfaces in addition to
215 standard COM result codes.
216
217 Note that along with the result code, every VirtualBox method returns
218 extended error information through the IVirtualBoxErrorInfo interface on
219 failure. This interface is a preferred way to present the error to the end
220 user because it contains a human readable description of the error. Raw
221 result codes, both standard and described in this section, are intended to
222 be used by programs to analyze the reason of a failure and select an
223 appropriate course of action without involving the end user (for example,
224 retry the operation later or make a different call).
225
226 The standard COM result codes that may originate from our methods include:
227
228 <table>
229 <tr><td>E_INVALIDARG</td>
230 <td>
231 Returned when the value of the method's argument is not within the range
232 of valid values. This should not be confused with situations when the
233 value is within the range but simply doesn't suit the current object
234 state and there is a possibility that it will be accepted later (in such
235 cases VirtualBox-specific codes are returned, for example,
236 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
237 </td>
238 </tr>
239 <tr><td>E_POINTER</td>
240 <td>
241 Returned if a memory pointer for the output argument is invalid (for
242 example, <tt>NULL</tt>). Note that when pointers representing input
243 arguments (such as strings) are invalid, E_INVALIDARG is returned.
244 </td>
245 </tr>
246 <tr><td>E_ACCESSDENIED</td>
247 <td>
248 Returned when the called object is not ready. Since the lifetime of a
249 public COM object cannot be fully controlled by the implementation,
250 VirtualBox maintains the readiness state for all objects it creates and
251 returns this code in response to any method call on the object that was
252 deactivated by VirtualBox and is not functioning any more.
253 </td>
254 </tr>
255 <tr><td>E_OUTOFMEMORY</td>
256 <td>
257 Returned when a memory allocation operation fails.
258 </td>
259 </tr>
260 </table>
261 </desc>
262 </descGroup>
263
264 <!--
265 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
266 everything in <result>/<desc> after (and including) the first dot, so express
267 the matter of the error code in the first sentence and keep it short.
268 -->
269
270 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
271 <desc>
272 Object corresponding to the supplied arguments does not exist.
273 </desc>
274 </result>
275
276 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
277 <desc>
278 Current virtual machine state prevents the operation.
279 </desc>
280 </result>
281
282 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
283 <desc>
284 Virtual machine error occurred attempting the operation.
285 </desc>
286 </result>
287
288 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
289 <desc>
290 File not accessible or erroneous file contents.
291 </desc>
292 </result>
293
294 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
295 <desc>
296 Runtime subsystem error.
297 </desc>
298 </result>
299
300 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
301 <desc>
302 Pluggable Device Manager error.
303 </desc>
304 </result>
305
306 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
307 <desc>
308 Current object state prohibits operation.
309 </desc>
310 </result>
311
312 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
313 <desc>
314 Host operating system related error.
315 </desc>
316 </result>
317
318 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
319 <desc>
320 Requested operation is not supported.
321 </desc>
322 </result>
323
324 <!--
325 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
326 everything in <result>/<desc> after (and including) the first dot, so express
327 the matter of the error code in the first sentence and keep it short.
328 -->
329
330 <descGroup/>
331
332 <!--
333 // all common enums
334 /////////////////////////////////////////////////////////////////////////
335 -->
336
337 <enum
338 name="TSBool"
339 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
340 >
341 <desc>
342 Boolean variable having a third state, default.
343 </desc>
344
345 <const name="False" value="0"/>
346 <const name="True" value="1"/>
347 <const name="Default" value="2"/>
348 </enum>
349
350 <enum
351 name="MachineState"
352 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
353 >
354 <desc>
355 Virtual machine execution state. This enumeration represents possible
356 values of the <link to="IMachine::state"/> attribute.
357 </desc>
358
359 <const name="Null" value="0">
360 <desc><tt>null</tt> value. Never used by the API.</desc>
361 </const>
362 <const name="PoweredOff" value="1">
363 <desc>
364 The machine is not running.
365 </desc>
366 </const>
367 <const name="Saved" value="2">
368 <desc>
369 The machine is not currently running, but the execution state
370 of the machine has been saved to an external file when it
371 was running.
372 <note>
373 Only a few machine settings can be altered when the machine
374 is in this state.
375 </note>
376 </desc>
377 </const>
378 <const name="Aborted" value="3">
379 <desc>
380 A process running the machine has terminated abnormally.
381 Other than that, this value is equivalent to #PoweredOff.
382 </desc>
383 </const>
384 <const name="Running" value="4">
385 <desc>
386 The machine is currently being executed.
387 <note>
388 This value can be used in relational expressions:
389 all state values less than Running describe a virtual machine that is
390 not currently being executed (i.e., it is completely out of
391 action).
392 </note>
393 <note internal="yes">
394 For whoever decides to touch this enum: In order to keep the
395 aforementioned comparisons valid, this state must immediately
396 precede the Paused state.
397 </note>
398 </desc>
399 </const>
400 <const name="Paused" value="5">
401 <desc>
402 Execution of the machine has been paused.
403 <note>
404 This value can be used in relational expressions: all state values
405 greater than Paused represent unstable states of the running virtual
406 machine. Unless explicitly stated otherwise, no machine settings can
407 be altered when it is in one of the unstable states.
408 </note>
409 <note internal="yes">
410 For whoever decides to touch this enum: In order to keep the
411 aforementioned comparisons valid, this state must immediately
412 follow the Running state.
413 </note>
414 </desc>
415 </const>
416 <const name="Stuck" value="6">
417 <desc>
418 Execution of the machine has reached the "Guru Meditation"
419 condition. This condition indicates an internal VMM failure which may
420 happen as a result of either an unhandled low-level virtual hardware
421 exception or one of the recompiler exceptions (such as
422 the <i>too-many-traps</i> condition).
423 </desc>
424 </const>
425 <const name="Starting" value="7">
426 <desc>
427 Machine is being started after
428 <link to="IConsole::powerUp">powering it on</link> from a
429 zero execution state.
430 </desc>
431 </const>
432 <const name="Stopping" value="8">
433 <desc>
434 Machine is being normally stopped
435 (after explicitly <link to="IConsole::powerDown">powering it off</link>,
436 or after the guest OS has initiated a shutdown sequence).
437 </desc>
438 </const>
439 <const name="Saving" value="9">
440 <desc>
441 Machine is saving its execution state to a file as a
442 result of calling <link to="IConsole::saveState"/> or an online
443 snapshot of the machine is being taken using
444 <link to="IConsole::takeSnapshot"/>.
445 </desc>
446 </const>
447 <const name="Restoring" value="10">
448 <desc>
449 Execution state of the machine is being restored from a file
450 after <link to="IConsole::powerUp">powering it on</link> from
451 a saved execution state.
452 </desc>
453 </const>
454 <const name="Discarding" value="11">
455 <desc>
456 Snapshot of the machine is being discarded after calling
457 <link to="IConsole::discardSnapshot"/> or its current state is
458 being discarded after <link to="IConsole::discardCurrentState"/>.
459 </desc>
460 </const>
461 <const name="SettingUp" value="12">
462 <desc>
463 Lengthy setup operation is in progress (e.g.
464 <link to="IMachine::attachHardDisk2"/>).
465 </desc>
466 </const>
467 </enum>
468
469 <enum
470 name="SessionState"
471 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
472 >
473 <desc>
474 Session state. This enumeration represents possible values of
475 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
476 attributes. Individual value descriptions contain the appropriate
477 meaning for every case.
478 </desc>
479
480 <const name="Null" value="0">
481 <desc><tt>null</tt> value. Never used by the API.</desc>
482 </const>
483 <const name="Closed" value="1">
484 <desc>
485 The machine has no open sessions (<link to="IMachine::sessionState"/>);
486 the session is closed (<link to="ISession::state"/>)
487 </desc>
488 </const>
489 <const name="Open" value="2">
490 <desc>
491 The machine has an open direct session (<link to="IMachine::sessionState"/>);
492 the session is open (<link to="ISession::state"/>)
493 </desc>
494 </const>
495 <const name="Spawning" value="3">
496 <desc>
497 A new (direct) session is being opened for the machine
498 as a result of <link to="IVirtualBox::openRemoteSession()"/>
499 call (<link to="IMachine::sessionState"/>);
500 the session is currently being opened
501 as a result of <link to="IVirtualBox::openRemoteSession()"/>
502 call (<link to="ISession::state"/>)
503 </desc>
504 </const>
505 <const name="Closing" value="4">
506 <desc>
507 The direct session is being closed (<link to="IMachine::sessionState"/>);
508 the session is being closed (<link to="ISession::state"/>)
509 </desc>
510 </const>
511 </enum>
512
513 <enum
514 name="SessionType"
515 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
516 >
517 <desc>
518 Session type. This enumeration represents possible values of the
519 <link to="ISession::type"/> attribute.
520 </desc>
521
522 <const name="Null" value="0">
523 <desc><tt>null</tt> value. Never used by the API.</desc>
524 </const>
525 <const name="Direct" value="1">
526 <desc>
527 Direct session
528 (opened by <link to="IVirtualBox::openSession()"/>)
529 </desc>
530 </const>
531 <const name="Remote" value="2">
532 <desc>
533 Remote session
534 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
535 </desc>
536 </const>
537 <const name="Existing" value="3">
538 <desc>
539 Existing session
540 (opened by <link to="IVirtualBox::openExistingSession()"/>)
541 </desc>
542 </const>
543 </enum>
544
545 <enum
546 name="DeviceType"
547 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
548 >
549 <desc>
550 Device type.
551 </desc>
552 <const name="Null" value="0">
553 <desc>
554 <tt>null</tt> value which may also mean "no device".
555 <note>
556 This value is not allowed for
557 <link to="IConsole::getDeviceActivity"/>
558 </note>
559 </desc>
560 </const>
561 <const name="Floppy" value="1">
562 <desc>Floppy device.</desc>
563 </const>
564 <const name="DVD" value="2">
565 <desc>CD/DVD-ROM device.</desc>
566 </const>
567 <const name="HardDisk" value="3">
568 <desc>Hard disk device.</desc>
569 </const>
570 <const name="Network" value="4">
571 <desc>Network device.</desc>
572 </const>
573 <const name="USB" value="5">
574 <desc>USB device.</desc>
575 </const>
576 <const name="SharedFolder" value="6">
577 <desc>Shared folder device.</desc>
578 </const>
579 </enum>
580
581 <enum
582 name="DeviceActivity"
583 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
584 >
585 <desc>
586 Device activity for <link to="IConsole::getDeviceActivity"/>.
587 </desc>
588
589 <const name="Null" value="0"/>
590 <const name="Idle" value="1"/>
591 <const name="Reading" value="2"/>
592 <const name="Writing" value="3"/>
593 </enum>
594
595 <enum
596 name="StorageBus"
597 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
598 >
599 <desc>Interface bus type for storage devices.</desc>
600
601 <const name="Null" value="0">
602 <desc><tt>null</tt> value. Never used by the API.</desc>
603 </const>
604
605 <const name="IDE" value="1"/>
606 <const name="SATA" value="2"/>
607 </enum>
608
609 <enum
610 name="ClipboardMode"
611 uuid="33364716-4008-4701-8f14-be0fa3d62950"
612 >
613 <desc>
614 Host-Guest clipboard interchange mode.
615 </desc>
616
617 <const name="Disabled" value="0"/>
618 <const name="HostToGuest" value="1"/>
619 <const name="GuestToHost" value="2"/>
620 <const name="Bidirectional" value="3"/>
621 </enum>
622
623 <enum
624 name="Scope"
625 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
626 >
627 <desc>
628 Scope of the operation.
629
630 A generic enumeration used in various methods to define the action or
631 argument scope.
632 </desc>
633
634 <const name="Global" value="0"/>
635 <const name="Machine" value="1"/>
636 <const name="Session" value="2"/>
637 </enum>
638
639 <enum
640 name="GuestStatisticType"
641 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
642 >
643 <desc>
644 Statistics type for <link to="IGuest::getStatistic"/>.
645 </desc>
646
647 <const name="CPULoad_Idle" value="0">
648 <desc>
649 Idle CPU load (0-100%) for last interval.
650 </desc>
651 </const>
652 <const name="CPULoad_Kernel" value="1">
653 <desc>
654 Kernel CPU load (0-100%) for last interval.
655 </desc>
656 </const>
657 <const name="CPULoad_User" value="2">
658 <desc>
659 User CPU load (0-100%) for last interval.
660 </desc>
661 </const>
662 <const name="Threads" value="3">
663 <desc>
664 Total number of threads in the system.
665 </desc>
666 </const>
667 <const name="Processes" value="4">
668 <desc>
669 Total number of processes in the system.
670 </desc>
671 </const>
672 <const name="Handles" value="5">
673 <desc>
674 Total number of handles in the system.
675 </desc>
676 </const>
677 <const name="MemoryLoad" value="6">
678 <desc>
679 Memory load (0-100%).
680 </desc>
681 </const>
682 <const name="PhysMemTotal" value="7">
683 <desc>
684 Total physical memory in megabytes.
685 </desc>
686 </const>
687 <const name="PhysMemAvailable" value="8">
688 <desc>
689 Free physical memory in megabytes.
690 </desc>
691 </const>
692 <const name="PhysMemBalloon" value="9">
693 <desc>
694 Ballooned physical memory in megabytes.
695 </desc>
696 </const>
697 <const name="MemCommitTotal" value="10">
698 <desc>
699 Total amount of memory in the committed state in megabytes.
700 </desc>
701 </const>
702 <const name="MemKernelTotal" value="11">
703 <desc>
704 Total amount of memory used by the guest OS's kernel in megabytes.
705 </desc>
706 </const>
707 <const name="MemKernelPaged" value="12">
708 <desc>
709 Total amount of paged memory used by the guest OS's kernel in megabytes.
710 </desc>
711 </const>
712 <const name="MemKernelNonpaged" value="13">
713 <desc>
714 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
715 </desc>
716 </const>
717 <const name="MemSystemCache" value="14">
718 <desc>
719 Total amount of memory used by the guest OS's system cache in megabytes.
720 </desc>
721 </const>
722 <const name="PageFileSize" value="15">
723 <desc>
724 Pagefile size in megabytes.
725 </desc>
726 </const>
727 <const name="SampleNumber" value="16">
728 <desc>
729 Statistics sample number
730 </desc>
731 </const>
732 <const name="MaxVal" value="17"/>
733 </enum>
734
735 <enum
736 name="BIOSBootMenuMode"
737 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
738 >
739 <desc>
740 BIOS boot menu mode.
741 </desc>
742
743 <const name="Disabled" value="0"/>
744 <const name="MenuOnly" value="1"/>
745 <const name="MessageAndMenu" value="2"/>
746 </enum>
747
748 <enum
749 name="IDEControllerType"
750 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
751 >
752 <desc>
753 IDE controller type.
754 </desc>
755
756 <const name="Null" value="0">
757 <desc><tt>null</tt> value. Never used by the API.</desc>
758 </const>
759 <const name="PIIX3" value="1"/>
760 <const name="PIIX4" value="2"/>
761 </enum>
762
763 <enum
764 name="DriveState"
765 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
766 >
767 <const name="Null" value="0">
768 <desc><tt>null</tt> value. Never used by the API.</desc>
769 </const>
770 <const name="NotMounted" value="1"/>
771 <const name="ImageMounted" value="2"/>
772 <const name="HostDriveCaptured" value="3"/>
773 </enum>
774
775 <enum
776 name="ProcessorFeature"
777 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
778 >
779 <desc>
780 CPU features.
781 </desc>
782
783 <const name="HWVirtEx" value="0"/>
784 <const name="PAE" value="1"/>
785 <const name="LongMode" value="2"/>
786 </enum>
787
788
789 <!--
790 // IVirtualBoxErrorInfo
791 /////////////////////////////////////////////////////////////////////////
792 -->
793
794 <interface
795 name="IVirtualBoxErrorInfo" extends="$errorinfo"
796 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
797 supportsErrorInfo="no"
798 wsmap="suppress"
799 >
800 <desc>
801 The IVirtualBoxErrorInfo interface represents extended error information.
802
803 Extended error information can be set by VirtualBox components after
804 unsuccessful or partially successful method invocation. This information
805 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
806 and then shown to the client in addition to the plain 32-bit result code.
807
808 In MS COM, this interface extends the IErrorInfo interface,
809 in XPCOM, it extends the nsIException interface. In both cases,
810 it provides a set of common attributes to retrieve error
811 information.
812
813 Sometimes invocation of some component's method may involve methods of
814 other components that may also fail (independently of this method's
815 failure), or a series of non-fatal errors may precede a fatal error that
816 causes method failure. In cases like that, it may be desirable to preserve
817 information about all errors happened during method invocation and deliver
818 it to the caller. The <link to="#next"/> attribute is intended
819 specifically for this purpose and allows to represent a chain of errors
820 through a single IVirtualBoxErrorInfo object set after method invocation.
821
822 Note that errors are stored to a chain in the reverse order, i.e. the
823 initial error object you query right after method invocation is the last
824 error set by the callee, the object it points to in the @a next attribute
825 is the previous error and so on, up to the first error (which is the last
826 in the chain).
827 </desc>
828
829 <attribute name="resultCode" type="result" readonly="yes">
830 <desc>
831 Result code of the error.
832 Usually, it will be the same as the result code returned
833 by the method that provided this error information, but not
834 always. For example, on Win32, CoCreateInstance() will most
835 likely return E_NOINTERFACE upon unsuccessful component
836 instantiation attempt, but not the value the component factory
837 returned.
838 <note>
839 In MS COM, there is no equivalent.
840 In XPCOM, it is the same as nsIException::result.
841 </note>
842 </desc>
843 </attribute>
844
845 <attribute name="interfaceID" type="uuid" readonly="yes">
846 <desc>
847 UUID of the interface that defined the error.
848 <note>
849 In MS COM, it is the same as IErrorInfo::GetGUID.
850 In XPCOM, there is no equivalent.
851 </note>
852 </desc>
853 </attribute>
854
855 <attribute name="component" type="wstring" readonly="yes">
856 <desc>
857 Name of the component that generated the error.
858 <note>
859 In MS COM, it is the same as IErrorInfo::GetSource.
860 In XPCOM, there is no equivalent.
861 </note>
862 </desc>
863 </attribute>
864
865 <attribute name="text" type="wstring" readonly="yes">
866 <desc>
867 Text description of the error.
868 <note>
869 In MS COM, it is the same as IErrorInfo::GetDescription.
870 In XPCOM, it is the same as nsIException::message.
871 </note>
872 </desc>
873 </attribute>
874
875 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
876 <desc>
877 Next error object if there is any, or @c null otherwise.
878 <note>
879 In MS COM, there is no equivalent.
880 In XPCOM, it is the same as nsIException::inner.
881 </note>
882 </desc>
883 </attribute>
884
885 </interface>
886
887
888 <!--
889 // IVirtualBox
890 /////////////////////////////////////////////////////////////////////////
891 -->
892
893 <interface
894 name="IVirtualBoxCallback" extends="$unknown"
895 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
896 wsmap="suppress"
897 >
898 <method name="onMachineStateChange">
899 <desc>
900 The execution state of the given machine has changed.
901 <see>IMachine::state</see>
902 </desc>
903 <param name="machineId" type="uuid" dir="in">
904 <desc>ID of the machine this event relates to.</desc>
905 </param>
906 <param name="state" type="MachineState" dir="in">
907 <desc>New execution state.</desc>
908 </param>
909 </method>
910
911 <method name="onMachineDataChange">
912 <desc>
913 Any of the settings of the given machine has changed.
914 </desc>
915 <param name="machineId" type="uuid" dir="in">
916 <desc>ID of the machine this event relates to.</desc>
917 </param>
918 </method>
919
920 <method name="onExtraDataCanChange">
921 <desc>
922 Notification when someone tries to change extra data for
923 either the given machine or (if null) global extra data.
924 This gives the chance to veto against changes.
925 </desc>
926 <param name="machineId" type="uuid" dir="in">
927 <desc>
928 ID of the machine this event relates to
929 (null ID for global extra data change requests).
930 </desc>
931 </param>
932 <param name="key" type="wstring" dir="in">
933 <desc>
934 Extra data key for the attempted write.
935 </desc>
936 </param>
937 <param name="value" type="wstring" dir="in">
938 <desc>
939 Extra data value for the given key.
940 </desc>
941 </param>
942 <param name="error" type="wstring" dir="out">
943 <desc>
944 Optional error message describing the reason of the
945 veto (ignored if this notification returns @c true).
946 </desc>
947 </param>
948 <param name="allowChange" type="boolean" dir="return">
949 <desc>
950 Flag to indicate whether the callee agrees (@c true)
951 or vetoes against the change (@c false).
952 </desc>
953 </param>
954 </method>
955
956 <method name="onExtraDataChange">
957 <desc>
958 Notification when machine specific or global extra data
959 has changed.
960 </desc>
961 <param name="machineId" type="uuid" dir="in">
962 <desc>
963 ID of the machine this event relates to.
964 Null for global extra data changes.
965 </desc>
966 </param>
967 <param name="key" type="wstring" dir="in">
968 <desc>
969 Extra data key that has changed.
970 </desc>
971 </param>
972 <param name="value" type="wstring" dir="in">
973 <desc>
974 Extra data value for the given key.
975 </desc>
976 </param>
977 </method>
978
979 <method name="onMediaRegistered">
980 <desc>
981 The given media was registered or unregistered
982 within this VirtualBox installation.
983
984 The @a mediaType parameter describes what type of
985 media the specified @a mediaId refers to. Possible
986 values are:
987
988 <ul>
989 <li><link to="DeviceType::HardDisk"/>: the media is a hard disk
990 that, if registered, can be obtained using the
991 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
992 <li><link to="DeviceType::DVD"/>: the media is a CD/DVD image
993 that, if registered, can be obtained using the
994 <link to="IVirtualBox::getDVDImage()"/> call.</li>
995 <li><link to="DeviceType::Floppy"/>: the media is a Floppy image
996 that, if registered, can be obtained using the
997 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
998 </ul>
999
1000 Note that if this is a deregistration notification,
1001 there is no way to access the object representing the
1002 unregistered media. It is supposed that the
1003 application will do required cleanup based on the @a
1004 mediaId value.
1005 </desc>
1006 <param name="mediaId" type="uuid" dir="in">
1007 <desc>ID of the media this event relates to.</desc>
1008 </param>
1009 <param name="mediaType" type="DeviceType" dir="in">
1010 <desc>Type of the media this event relates to.</desc>
1011 </param>
1012 <param name="registered" type="boolean" dir="in">
1013 <desc>
1014 If true, the media was registered, otherwise it was
1015 unregistered.
1016 </desc>
1017 </param>
1018 </method>
1019
1020 <method name="onMachineRegistered">
1021 <desc>
1022 The given machine was registered or unregistered
1023 within this VirtualBox installation.
1024 </desc>
1025 <param name="machineId" type="uuid" dir="in">
1026 <desc>ID of the machine this event relates to.</desc>
1027 </param>
1028 <param name="registered" type="boolean" dir="in">
1029 <desc>
1030 If true, the machine was registered, otherwise it was
1031 unregistered.
1032 </desc>
1033 </param>
1034 </method>
1035
1036 <method name="onSessionStateChange">
1037 <desc>
1038 The state of the session for the given machine was changed.
1039 <see>IMachine::sessionState</see>
1040 </desc>
1041 <param name="machineId" type="uuid" dir="in">
1042 <desc>ID of the machine this event relates to.</desc>
1043 </param>
1044 <param name="state" type="SessionState" dir="in">
1045 <desc>New session state.</desc>
1046 </param>
1047 </method>
1048
1049 <method name="onSnapshotTaken">
1050 <desc>
1051 A new snapshot of the machine has been taken.
1052 <see>ISnapshot</see>
1053 </desc>
1054 <param name="machineId" type="uuid" dir="in">
1055 <desc>ID of the machine this event relates to.</desc>
1056 </param>
1057 <param name="snapshotId" type="uuid" dir="in">
1058 <desc>ID of the new snapshot.</desc>
1059 </param>
1060 </method>
1061
1062 <method name="onSnapshotDiscarded">
1063 <desc>
1064 Snapshot of the given machine has been discarded.
1065
1066 <note>
1067 This notification is delivered <b>after</b> the snapshot
1068 object has been uninitialized on the server (so that any
1069 attempt to call its methods will return an error).
1070 </note>
1071
1072 <see>ISnapshot</see>
1073 </desc>
1074 <param name="machineId" type="uuid" dir="in">
1075 <desc>ID of the machine this event relates to.</desc>
1076 </param>
1077 <param name="snapshotId" type="uuid" dir="in">
1078 <desc>
1079 ID of the discarded snapshot. <tt>null</tt> means the
1080 current machine state has been discarded (restored from
1081 the current snapshot).
1082 </desc>
1083 </param>
1084 </method>
1085
1086 <method name="onSnapshotChange">
1087 <desc>
1088 Snapshot properties (name and/or description) have been changed.
1089 <see>ISnapshot</see>
1090 </desc>
1091 <param name="machineId" type="uuid" dir="in">
1092 <desc>ID of the machine this event relates to.</desc>
1093 </param>
1094 <param name="snapshotId" type="uuid" dir="in">
1095 <desc>ID of the changed snapshot.</desc>
1096 </param>
1097 </method>
1098
1099 <method name="onGuestPropertyChange">
1100 <desc>
1101 Notification when a guest property has changed.
1102 </desc>
1103 <param name="machineId" type="uuid" dir="in">
1104 <desc>
1105 ID of the machine this event relates to.
1106 </desc>
1107 </param>
1108 <param name="name" type="wstring" dir="in">
1109 <desc>
1110 The name of the property that has changed.
1111 </desc>
1112 </param>
1113 <param name="value" type="wstring" dir="in">
1114 <desc>
1115 The new property value.
1116 </desc>
1117 </param>
1118 <param name="flags" type="wstring" dir="in">
1119 <desc>
1120 The new property flags.
1121 </desc>
1122 </param>
1123 </method>
1124
1125 </interface>
1126
1127 <interface
1128 name="IVirtualBox" extends="$dispatched"
1129 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1130 wsmap="managed"
1131 >
1132 <desc>
1133 The IVirtualBox interface represents the main interface exposed by the
1134 product that provides virtual machine management.
1135
1136 An instance of IVirtualBox is required for the product to do anything
1137 useful. Even though the interface does not expose this, internally,
1138 IVirtualBox is implemented as a singleton and actually lives in the
1139 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1140 IVirtualBox can track the state of all virtual machines on a particular
1141 host, regardless of which frontend started them.
1142
1143 To enumerate all the virtual machines on the host, use the
1144 <link to="IVirtualBox::machines2"/> attribute.
1145 </desc>
1146
1147 <attribute name="version" type="wstring" readonly="yes">
1148 <desc>
1149 A string representing the version number of the product. The
1150 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1151 last number represents the build number and will frequently change.
1152 </desc>
1153 </attribute>
1154
1155 <attribute name="revision" type="unsigned long" readonly="yes">
1156 <desc>
1157 The internal build revision number of the product.
1158 </desc>
1159 </attribute>
1160
1161 <attribute name="packageType" type="wstring" readonly="yes">
1162 <desc>
1163 A string representing the package type of this product. The
1164 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1165 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1166 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1167 this.
1168 </desc>
1169 </attribute>
1170
1171 <attribute name="homeFolder" type="wstring" readonly="yes">
1172 <desc>
1173 Full path to the directory where the global settings file,
1174 <tt>VirtualBox.xml</tt>, is stored.
1175
1176 In this version of VirtualBox, the value of this property is
1177 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1178 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1179 as determined by the host OS), and cannot be changed.
1180
1181 This path is also used as the base to resolve relative paths in
1182 places where relative paths are allowed (unless otherwise
1183 expressly indicated).
1184 </desc>
1185 </attribute>
1186
1187 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1188 <desc>
1189 Full name of the global settings file.
1190 The value of this property corresponds to the value of
1191 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1192 </desc>
1193 </attribute>
1194
1195 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1196 <desc>
1197 Current version of the format of the global VirtualBox settings file
1198 (<tt>VirtualBox.xml</tt>).
1199
1200 The version string has the following format:
1201 <pre>
1202 x.y-platform
1203 </pre>
1204 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1205 versions, and <tt>platform</tt> is the platform identifier.
1206
1207 The current version usually matches the value of the
1208 <link to="#settingsFormatVersion"/> attribute unless the
1209 settings file was created by an older version of VirtualBox and there
1210 was a change of the settings file format since then.
1211
1212 Note that VirtualBox automatically converts settings files from older
1213 versions to the most recent version when reading them (usually at
1214 VirtualBox startup) but it doesn't save the changes back until
1215 you call a method that implicitly saves settings (such as
1216 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1217 explicitly. Therefore, if the value of this attribute differs from the
1218 value of <link to="#settingsFormatVersion"/>, then it
1219 means that the settings file was converted but the result of the
1220 conversion is not yet saved to disk.
1221
1222 The above feature may be used by interactive front-ends to inform users
1223 about the settings file format change and offer them to explicitly save
1224 all converted settings files (the global and VM-specific ones),
1225 optionally create backup copies of the old settings files before saving,
1226 etc.
1227
1228 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1229 </desc>
1230 </attribute>
1231
1232 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1233 <desc>
1234 Most recent version of the settings file format.
1235
1236 The version string has the following format:
1237 <pre>
1238 x.y-platform
1239 </pre>
1240 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1241 versions, and <tt>platform</tt> is the platform identifier.
1242
1243 VirtualBox uses this version of the format when saving settings files
1244 (either as a result of method calls that require to save settings or as
1245 a result of an explicit call to <link to="#saveSettings()"/>).
1246
1247 <see>settingsFileVersion</see>
1248 </desc>
1249 </attribute>
1250
1251 <attribute name="host" type="IHost" readonly="yes">
1252 <desc>Associated host object.</desc>
1253 </attribute>
1254
1255 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1256 <desc>Associated system information object.</desc>
1257 </attribute>
1258
1259 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1260 <desc>
1261 Array of machine objects registered within this VirtualBox instance.
1262 </desc>
1263 </attribute>
1264
1265 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1266 <desc>
1267 Array of hard disk objects known to this VirtualBox installation.
1268
1269 This array contains only base (root) hard disks. All differencing
1270 hard disks of the given base hard disk can be enumerated using
1271 <link to="IHardDisk2::children"/>.
1272 </desc>
1273 </attribute>
1274
1275 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1276 <desc>
1277 Array of CD/DVD image objects registered with this VirtualBox instance.
1278 </desc>
1279 </attribute>
1280
1281 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1282 <desc>
1283 Array of floppy image objects registered with this VirtualBox instance.
1284 </desc>
1285 </attribute>
1286
1287 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1288
1289 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1290
1291 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1292 <desc>
1293 Collection of global shared folders. Global shared folders are
1294 available to all virtual machines.
1295
1296 New shared folders are added to the collection using
1297 <link to="#createSharedFolder"/>. Existing shared folders can be
1298 removed using <link to="#removeSharedFolder"/>.
1299
1300 <note>
1301 In the current version of the product, global shared folders are not
1302 implemented and therefore this collection is always empty.
1303 </note>
1304 </desc>
1305 </attribute>
1306
1307 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1308 <desc>
1309 Associated performance collector object.
1310 </desc>
1311 </attribute>
1312
1313 <method name="createMachine">
1314 <desc>
1315 Creates a new virtual machine.
1316
1317 The new machine is created unregistered, with the initial configuration
1318 set according to the specified guest OS type. A typical sequence of
1319 actions to create a new virtual machine is as follows:
1320
1321 <ol>
1322 <li>
1323 Call this method to have a new machine created. The returned machine
1324 object will be "mutable" allowing to change any machine property.
1325 </li>
1326
1327 <li>
1328 Configure the machine using the appropriate attributes and methods.
1329 </li>
1330
1331 <li>
1332 Call <link to="IMachine::saveSettings()" /> to write the settings
1333 to the machine's XML settings file. The configuration of the newly
1334 created machine will not be saved to disk until this method is
1335 called.
1336 </li>
1337
1338 <li>
1339 Call <link to="#registerMachine()" /> to add the machine to the list
1340 of machines known to VirtualBox.
1341 </li>
1342 </ol>
1343
1344 You should specify valid name for the newly created machine when calling
1345 this method. See the <link to="IMachine::name"/> attribute description
1346 for more details about the machine name.
1347
1348 The specified guest OS type identifier must match an ID of one of known
1349 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1350 array.
1351
1352 Every machine has a <i>settings file</i> that is used to store
1353 the machine configuration. This file is stored in a directory called the
1354 <i>machine settings subfolder</i>. Both the settings subfolder and file
1355 will have a name that corresponds to the name of the virtual machine.
1356 You can specify where to create the machine setting subfolder using the
1357 @a baseFolder argument. The base folder can be absolute (full path) or
1358 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1359 directory</link>.
1360
1361 If @a baseFolder is a null or empty string (which is recommended), the
1362 <link to="ISystemProperties::defaultMachineFolder">default machine
1363 settings folder</link> will be used as a base folder for the created
1364 machine. Otherwise the given base folder will be used. In either case,
1365 the full path to the resulting settings file has the following
1366 structure:
1367 <pre>
1368 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1369 </pre>
1370
1371 Note that if the resulting settings file already exists, this method
1372 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1373
1374 Optionally, you may specify an UUID of to assign to the created machine.
1375 However, this is not recommended and you should normally pass an empty
1376 (null) UUID to this method so that a new UUID will be automatically
1377 generated for every created machine.
1378
1379 <note>
1380 There is no way to change the name of the settings file or
1381 subfolder of the created machine directly.
1382 </note>
1383
1384 <result name="VBOX_E_OBJECT_NOT_FOUND">
1385 @a osTypeId is invalid.
1386 </result>
1387 <result name="VBOX_E_FILE_ERROR">
1388 Resulting settings file name is invalid or the settings file already
1389 exists or could not be created due to an I/O error.
1390 </result>
1391 <result name="E_INVALIDARG">
1392 @a name is empty or null.
1393 </result>
1394 </desc>
1395
1396 <param name="name" type="wstring" dir="in">
1397 <desc>Machine name.</desc>
1398 </param>
1399 <param name="osTypeId" type="wstring" dir="in">
1400 <desc>Guest OS Type ID.</desc>
1401 </param>
1402 <param name="baseFolder" type="wstring" dir="in">
1403 <desc>Base machine folder (optional).</desc>
1404 </param>
1405 <param name="id" type="uuid" dir="in">
1406 <desc>Machine UUID (optional).</desc>
1407 </param>
1408 <param name="machine" type="IMachine" dir="return">
1409 <desc>Created machine object.</desc>
1410 </param>
1411 </method>
1412
1413 <method name="createLegacyMachine">
1414 <desc>
1415 Creates a new virtual machine in "legacy" mode, using the specified
1416 settings file to store machine settings.
1417
1418 As opposed to machines created by <link to="#createMachine()"/>,
1419 the settings file of the machine created in "legacy" mode is not
1420 automatically renamed when the machine name is changed -- it will always
1421 remain the same as specified in this method call.
1422
1423 The specified settings file name can be absolute (full path) or relative
1424 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1425 directory</link>. If the file name doesn't contain an extension, the
1426 default extension (.xml) will be appended.
1427
1428 Note that the configuration of the newly created machine is not
1429 saved to disk (and therefore no settings file is created)
1430 until <link to="IMachine::saveSettings()"/> is called. If the
1431 specified settings file already exists, this method
1432 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1433
1434 See <link to="#createMachine()"/> for more information.
1435
1436 @deprecated This method may be removed later. Use <link
1437 to="IVirtualBox::createMachine()"/> instead.
1438
1439 <note>
1440 There is no way to change the name of the settings file
1441 of the machine created in "legacy" mode.
1442 </note>
1443
1444 <result name="VBOX_E_OBJECT_NOT_FOUND">
1445 @a osTypeId is invalid.
1446 </result>
1447 <result name="VBOX_E_FILE_ERROR">
1448 @a settingsFile is invalid or the settings file already exists or
1449 could not be created due to an I/O error.
1450 </result>
1451 <result name="E_INVALIDARG">
1452 @a name or @a settingsFile is empty or null.
1453 </result>
1454 </desc>
1455
1456 <param name="name" type="wstring" dir="in">
1457 <desc>Machine name.</desc>
1458 </param>
1459 <param name="osTypeId" type="wstring" dir="in">
1460 <desc>Machine OS Type ID.</desc>
1461 </param>
1462 <param name="settingsFile" type="wstring" dir="in">
1463 <desc>Name of the machine settings file.</desc>
1464 </param>
1465 <param name="id" type="uuid" dir="in">
1466 <desc>Machine UUID (optional).</desc>
1467 </param>
1468 <param name="machine" type="IMachine" dir="return">
1469 <desc>Created machine object.</desc>
1470 </param>
1471 </method>
1472
1473 <method name="openMachine">
1474 <desc>
1475 Opens a virtual machine from the existing settings file.
1476 The opened machine remains unregistered until you call
1477 <link to="#registerMachine()"/>.
1478
1479 The specified settings file name can be absolute
1480 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1481 VirtualBox home directory</link>. This file must exist
1482 and must be a valid machine settings file whose contents
1483 will be used to construct the machine object.
1484
1485 @deprecated Will be removed soon.
1486 <result name="VBOX_E_FILE_ERROR">
1487 Settings file name invalid, not found or sharing violation.
1488 </result>
1489 </desc>
1490 <param name="settingsFile" type="wstring" dir="in">
1491 <desc>
1492 Name of the machine settings file.
1493 </desc>
1494 </param>
1495 <param name="machine" type="IMachine" dir="return">
1496 <desc>Opened machine object.</desc>
1497 </param>
1498 <note>
1499 <link to="IMachine::settingsModified"/> will return
1500 false for the created machine, until any of machine settings
1501 are changed.
1502 </note>
1503 </method>
1504
1505 <method name="registerMachine">
1506 <desc>
1507
1508 Registers the machine previously created using
1509 <link to="#createMachine()"/> or opened using
1510 <link to="#openMachine()"/> within this VirtualBox installation. After
1511 successful method invocation, the
1512 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1513 to all registered callbacks.
1514
1515 <note>
1516 This method implicitly calls <link to="IMachine::saveSettings"/>
1517 to save all current machine settings before registering it.
1518 </note>
1519
1520 <result name="VBOX_E_INVALID_OBJECT_STATE">
1521 Virtual machine was not created within this VirtualBox instance.
1522 </result>
1523
1524 </desc>
1525 <param name="machine" type="IMachine" dir="in"/>
1526 </method>
1527
1528 <method name="getMachine">
1529 <desc>
1530 Attempts to find a virtual machine given its UUID.
1531 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1532 instead.
1533
1534 <result name="VBOX_E_FILE_ERROR">
1535 Could not find registered machine matching @a id.
1536 </result>
1537
1538 </desc>
1539 <param name="id" type="uuid" dir="in"/>
1540 <param name="machine" type="IMachine" dir="return"/>
1541 </method>
1542
1543 <method name="findMachine">
1544 <desc>
1545 Attempts to find a virtual machine given its name.
1546 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1547 instead.
1548
1549 <result name="VBOX_E_FILE_ERROR">
1550 Could not find registered machine matching @a name.
1551 </result>
1552
1553 </desc>
1554 <param name="name" type="wstring" dir="in"/>
1555 <param name="machine" type="IMachine" dir="return"/>
1556 </method>
1557
1558 <method name="unregisterMachine">
1559 <desc>
1560
1561 Unregisters the machine previously registered using
1562 <link to="#registerMachine"/>. After successful method invocation, the
1563 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1564 to all registered callbacks.
1565
1566 <note>
1567 The specified machine must not be in the Saved state, have an open
1568 (or a spawning) direct session associated with it, have snapshots or
1569 have hard disks attached.
1570 </note>
1571
1572 <note>
1573 This method implicitly calls <link to="IMachine::saveSettings"/> to
1574 save all current machine settings before unregistering it.
1575 </note>
1576
1577 <note>
1578 If the given machine is inaccessible (see
1579 <link to="IMachine::accessible"/>), it will be unregistered and
1580 fully uninitialized right afterwards. As a result, the returned
1581 machine object will be unusable and an attempt to call
1582 <b>any</b> method will return the "Object not ready" error.
1583 </note>
1584
1585 <result name="VBOX_E_FILE_ERROR">
1586 Could not find registered machine matching @a id.
1587 </result>
1588 <result name="VBOX_E_INVALID_VM_STATE">
1589 Machine is in Saved state.
1590 </result>
1591 <result name="VBOX_E_INVALID_OBJECT_STATE">
1592 Machine has snapshot or open session or hard disk attached.
1593 </result>
1594
1595 </desc>
1596 <param name="id" type="uuid" dir="in">
1597 <desc>UUID of the machine to unregister.</desc>
1598 </param>
1599 <param name="machine" type="IMachine" dir="return">
1600 <desc>Unregistered machine object.</desc>
1601 </param>
1602 </method>
1603
1604 <method name="createHardDisk2">
1605 <desc>
1606 Creates a new base hard disk object that will use the given storage
1607 format and location for hard disk data.
1608
1609 Note that the actual storage unit is not created by this method. In
1610 order to do it, and before you are able to attach the created hard disk
1611 to virtual machines, you must call one of the following methods to
1612 allocate a format-specific storage unit at the specified location:
1613 <ul>
1614 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1615 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1616 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1617 </ul>
1618
1619 Some hard disk attributes, such as <link to="#id"/>, may remain
1620 uninitialized until the hard disk storage unit is successfully created
1621 by one of the above methods.
1622
1623 After the storage unit is successfully created, the hard disk gets
1624 remembered by this VirtualBox installation and will be accessible
1625 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1626 methods. Remembered root (base) hard disks are also returned as part of
1627 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1628
1629 The list of all storage formats supported by this VirtualBox
1630 installation can be obtained using
1631 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1632 attribute is empty or <tt>null</tt> then the default storage format
1633 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1634 be used for creating a storage unit of the hard disk.
1635
1636 Note that the format of the location string is storage format specific.
1637 See <link to="IMedium::location"/>, IHardDisk2 and
1638 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1639
1640 <result name="VBOX_E_OBJECT_NOT_FOUND">
1641 @a format identifier is invalid. See
1642 <link to="ISystemProperties::hardDiskFormats"/>.
1643 </result>
1644 <result name="VBOX_E_FILE_ERROR">
1645 @a location is a not valid file name (for file-based formats only).
1646 </result>
1647 <result name="E_INVALIDARG">
1648 @a format is a null or empty string.
1649 </result>
1650 </desc>
1651 <param name="format" type="wstring" dir="in">
1652 <desc>
1653 Identifier of the storage format to use for the new hard disk.
1654 </desc>
1655 </param>
1656 <param name="location" type="wstring" dir="in">
1657 <desc>
1658 Location of the storage unit for the new hard disk.
1659 </desc>
1660 </param>
1661 <param name="hardDisk" type="IHardDisk2" dir="return">
1662 <desc>Created hard disk object.</desc>
1663 </param>
1664 </method>
1665
1666 <method name="openHardDisk2">
1667 <desc>
1668 Opens a hard disk from an existing location.
1669
1670 After the hard disk is successfully opened by this method, it gets
1671 remembered by (known to) this VirtualBox installation and will be
1672 accessible through <link to="#getHardDisk2()"/> and
1673 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1674 are also returned as part of the <link to="#hardDisks2"/> array and can
1675 be attached to virtual machines. See IHardDisk2 for more details.
1676
1677 If a differencing hard disk is to be opened by this method, the
1678 operation will succeed only if its parent hard disk and all ancestors,
1679 if any, are already known to this VirtualBox installation (for example,
1680 were opened by this method before).
1681
1682 This method tries to guess the storage format of the specified hard disk
1683 by reading hard disk data at the specified location.
1684
1685 Note that the format of the location string is storage format specific.
1686 See <link to="IMedium::location"/>, IHardDisk2 and
1687 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1688
1689
1690 <result name="VBOX_E_FILE_ERROR">
1691 Invalid hard disk storage file location.
1692 </result>
1693 <result name="VBOX_E_IPRT_ERROR">
1694 Could not get hard disk storage format.
1695 </result>
1696 <result name="E_INVALIDARG">
1697 Invalid hard disk storage format.
1698 </result>
1699
1700 </desc>
1701 <param name="location" type="wstring" dir="in">
1702 <desc>
1703 Location of the storage unit that contains hard disk data in one of
1704 the supported storage formats.
1705 </desc>
1706 </param>
1707 <param name="hardDisk" type="IHardDisk2" dir="return">
1708 <desc>Opened hard disk object.</desc>
1709 </param>
1710 </method>
1711
1712 <method name="getHardDisk2" const="yes">
1713 <desc>
1714 Returns a hard disk with the given UUID.
1715
1716 The hard disk with the given UUID must be known to this VirtualBox
1717 installation, i.e. it must be previously created by
1718 <link to="#createHardDisk2()"/> or opened by <link
1719 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1720 </desc>
1721 <param name="id" type="uuid" dir="in">
1722 <desc>UUID of the hard disk to look for.</desc>
1723 </param>
1724 <param name="hardDisk" type="IHardDisk2" dir="return">
1725 <desc>Found hard disk object.</desc>
1726 </param>
1727 </method>
1728
1729 <method name="findHardDisk2">
1730 <desc>
1731 Returns a hard disk that uses the given location to store hard
1732 disk data.
1733
1734 The given hard disk must be known to this VirtualBox installation, i.e.
1735 it must be previously created by
1736 <link to="#createHardDisk2()"/> or opened by <link
1737 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1738
1739 The search is done by comparing the value of the @a location argument to
1740 the <link to="IHardDisk2::location"/> attribute of each known hard
1741 disk.
1742
1743 For locations represented by file names in the host's file system, the
1744 requested location can be a path relative to the
1745 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1746 only a file name without any path is given, the
1747 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1748 folder</link> will be prepended to the file name before searching. Note
1749 that on case sensitive file systems, a case sensitive comparison is
1750 performed, otherwise the case of symbols in the file path is ignored.
1751 </desc>
1752 <param name="location" type="wstring" dir="in">
1753 <desc>Location string to search for.</desc>
1754 </param>
1755 <param name="hardDisk" type="IHardDisk2" dir="return">
1756 <desc>Found hard disk object.</desc>
1757 </param>
1758 </method>
1759
1760 <method name="openDVDImage">
1761 <desc>
1762 Opens a CD/DVD image contained in the specified file of the supported
1763 format and assigns it the given UUID.
1764
1765 After the image is successfully opened by this method, it gets
1766 remembered by (known to) this VirtualBox installation and will be
1767 accessible through <link to="#getDVDImage()"/> and
1768 <link to="#findDVDImage()"/> methods. Remembered images are also
1769 returned as part of the <link to="#DVDImages"/> array and can be mounted
1770 to virtual machines. See IMedium for more details.
1771
1772 See <link to="IMedium::location"/> to get more details about the format
1773 of the location string.
1774
1775 <note>
1776 Currently, only ISO CD/DVD images are supported by VirtualBox.
1777 </note>
1778 </desc>
1779 <param name="location" type="wstring" dir="in">
1780 <desc>
1781 Full path to the file that contains a valid CD/DVD image.
1782 </desc>
1783 </param>
1784 <param name="id" type="uuid" dir="in">
1785 <desc>
1786 UUID to assign to the given image within this VirtualBox installation.
1787 If an empty (null) UUID is specified, the system will randomly
1788 generate a new UUID.
1789 </desc>
1790 </param>
1791 <param name="image" type="IDVDImage2" dir="return">
1792 <desc>Opened CD/DVD image object.</desc>
1793 </param>
1794 </method>
1795
1796 <method name="getDVDImage">
1797 <desc>
1798 Returns a CD/DVD image with the given UUID.
1799
1800 The image with the given UUID must be known to this VirtualBox
1801 installation, i.e. it must be previously opened by <link
1802 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1803 </desc>
1804 <param name="id" type="uuid" dir="in">
1805 <desc>UUID of the image to look for.</desc>
1806 </param>
1807 <param name="image" type="IDVDImage2" dir="return">
1808 <desc>Found CD/DVD image object.</desc>
1809 </param>
1810 </method>
1811
1812 <method name="findDVDImage">
1813 <desc>
1814 Returns a CD/DVD image with the given image location.
1815
1816 The image with the given UUID must be known to this VirtualBox
1817 installation, i.e. it must be previously opened by <link
1818 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1819
1820 The search is done by comparing the value of the @a location argument to
1821 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1822
1823 The requested location can be a path relative to the
1824 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1825 only a file name without any path is given, the
1826 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1827 folder</link> will be prepended to the file name before searching. Note
1828 that on case sensitive file systems, a case sensitive comparison is
1829 performed, otherwise the case of symbols in the file path is ignored.
1830 </desc>
1831 <param name="location" type="wstring" dir="in">
1832 <desc>CD/DVD image file path to look for.</desc>
1833 </param>
1834 <param name="image" type="IDVDImage2" dir="return">
1835 <desc>Found CD/DVD image object.</desc>
1836 </param>
1837 </method>
1838
1839 <method name="openFloppyImage">
1840 <desc>
1841 Opens a floppy image contained in the specified file of the supported
1842 format and assigns it the given UUID.
1843
1844 After the image is successfully opened by this method, it gets
1845 remembered by (known to) this VirtualBox installation and will be
1846 accessible through <link to="#getFloppyImage()"/> and
1847 <link to="#findFloppyImage()"/> methods. Remembered images are also
1848 returned as part of the <link to="#floppyImages"/> array and can be
1849 mounted to virtual machines. See IMedium for more details.
1850
1851 See <link to="IMedium::location"/> to get more details about the format
1852 of the location string.
1853
1854 <note>
1855 Currently, only raw floppy images are supported by VirtualBox.
1856 </note>
1857 </desc>
1858 <param name="location" type="wstring" dir="in">
1859 <desc>
1860 Full path to the file that contains a valid floppy image.
1861 </desc>
1862 </param>
1863 <param name="id" type="uuid" dir="in">
1864 <desc>
1865 UUID to assign to the given image file within this VirtualBox
1866 installation. If an empty (null) UUID is specified, the system will
1867 randomly generate a new UUID.
1868 </desc>
1869 </param>
1870 <param name="image" type="IFloppyImage2" dir="return">
1871 <desc>Opened floppy image object.</desc>
1872 </param>
1873 </method>
1874
1875 <method name="getFloppyImage">
1876 <desc>
1877 Returns a floppy image with the given UUID.
1878
1879 The image with the given UUID must be known to this VirtualBox
1880 installation, i.e. it must be previously opened by <link
1881 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1882 </desc>
1883 <param name="id" type="uuid" dir="in">
1884 <desc>UUID of the image to look for.</desc>
1885 </param>
1886 <param name="image" type="IFloppyImage2" dir="return">
1887 <desc>Found floppy image object.</desc>
1888 </param>
1889 </method>
1890
1891 <method name="findFloppyImage">
1892 <desc>
1893 Returns a floppy image with the given image location.
1894
1895 The image with the given UUID must be known to this VirtualBox
1896 installation, i.e. it must be previously opened by <link
1897 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1898
1899 The search is done by comparing the value of the @a location argument to
1900 the <link to="IMedium::location"/> attribute of each known floppy image.
1901
1902 The requested location can be a path relative to the
1903 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1904 only a file name without any path is given, the
1905 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1906 folder</link> will be prepended to the file name before searching. Note
1907 that on case sensitive file systems, a case sensitive comparison is
1908 performed, otherwise the case of symbols in the file path is ignored.
1909 </desc>
1910 <param name="location" type="wstring" dir="in">
1911 <desc>Floppy image file path to look for.</desc>
1912 </param>
1913 <param name="image" type="IFloppyImage2" dir="return">
1914 <desc>Found floppy image object.</desc>
1915 </param>
1916 </method>
1917
1918 <method name="getGuestOSType">
1919 <desc>
1920 Returns an object describing the specified guest OS type.
1921
1922 The requested guest OS type is specified using a string which is a
1923 mnemonic identifier of the guest operating system, such as
1924 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1925 particular virtual machine can be read or set using the
1926 <link to="IMachine::OSTypeId"/> attribute.
1927
1928 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1929 available guest OS type objects. Each object has an
1930 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1931 the guest OS this object describes.
1932 </desc>
1933 <param name="id" type="wstring" dir="in">
1934 <desc>Guest OS type ID string.</desc>
1935 </param>
1936 <param name="type" type="IGuestOSType" dir="return">
1937 <desc>Guest OS type object.</desc>
1938 </param>
1939 </method>
1940
1941 <method name="createSharedFolder">
1942 <desc>
1943 Creates a new global shared folder by associating the given logical
1944 name with the given host path, adds it to the collection of shared
1945 folders and starts sharing it. Refer to the description of
1946 <link to="ISharedFolder"/> to read more about logical names.
1947 </desc>
1948 <param name="name" type="wstring" dir="in">
1949 <desc>Unique logical name of the shared folder.</desc>
1950 </param>
1951 <param name="hostPath" type="wstring" dir="in">
1952 <desc>Full path to the shared folder in the host file system.</desc>
1953 </param>
1954 <param name="writable" type="boolean" dir="in">
1955 <desc>Whether the share is writable or readonly</desc>
1956 </param>
1957 </method>
1958
1959 <method name="removeSharedFolder">
1960 <desc>
1961 Removes the global shared folder with the given name previously
1962 created by <link to="#createSharedFolder"/> from the collection of
1963 shared folders and stops sharing it.
1964 </desc>
1965 <param name="name" type="wstring" dir="in">
1966 <desc>Logical name of the shared folder to remove.</desc>
1967 </param>
1968 </method>
1969
1970 <method name="getNextExtraDataKey">
1971 <desc>
1972 Returns the global extra data key name following the supplied key.
1973
1974 An error is returned if the supplied @a key does not exist. @c NULL is
1975 returned in @a nextKey if the supplied key is the last key. When
1976 supplying @c NULL for the @a key, the first key item is returned in @a
1977 nextKey (if there is any). @a nextValue is an optional parameter and
1978 if supplied, the next key's value is returned in it.
1979 </desc>
1980 <param name="key" type="wstring" dir="in">
1981 <desc>Name of the data key to follow.</desc>
1982 </param>
1983 <param name="nextKey" type="wstring" dir="out">
1984 <desc>Name of the next data key.</desc>
1985 </param>
1986 <param name="nextValue" type="wstring" dir="out">
1987 <desc>Value of the next data key.</desc>
1988 </param>
1989 </method>
1990
1991 <method name="getExtraData">
1992 <desc>
1993 Returns associated global extra data.
1994
1995 If the requested data @a key does not exist, this function will
1996 succeed and return @c NULL in the @a value argument.
1997 </desc>
1998 <param name="key" type="wstring" dir="in">
1999 <desc>Name of the data key to get.</desc>
2000 </param>
2001 <param name="value" type="wstring" dir="return">
2002 <desc>Value of the requested data key.</desc>
2003 </param>
2004 </method>
2005
2006 <method name="setExtraData">
2007 <desc>
2008 Sets associated global extra data.
2009
2010 If you pass @c NULL as a key @a value, the given @a key will be
2011 deleted.
2012
2013 <note>
2014 Before performing the actual data change, this method will ask all
2015 registered callbacks using the
2016 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
2017 notification for a permission. If one of the callbacks refuses the
2018 new value, the change will not be performed.
2019 </note>
2020 <note>
2021 On success, the
2022 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
2023 is called to inform all registered callbacks about a successful data
2024 change.
2025 </note>
2026 </desc>
2027 <param name="key" type="wstring" dir="in">
2028 <desc>Name of the data key to set.</desc>
2029 </param>
2030 <param name="value" type="wstring" dir="in">
2031 <desc>Value to assign to the key.</desc>
2032 </param>
2033 </method>
2034
2035 <method name="openSession">
2036 <desc>
2037 Opens a new direct session with the given virtual machine.
2038
2039 A direct session acts as a local lock on the given VM.
2040 There can be only one direct session open at a time for every
2041 virtual machine, protecting the VM from being manipulated by
2042 conflicting actions from different processes. Only after a
2043 direct session has been opened, one can change all VM settings
2044 and execute the VM in the process space of the session object.
2045
2046 Sessions therefore can be compared to mutex semaphores that
2047 lock a given VM for modification and execution.
2048 See <link to="ISession">ISession</link> for details.
2049
2050 <note>Unless you are writing a new VM frontend, you will not
2051 want to execute a VM in the current process. To spawn a new
2052 process that executes a VM, use
2053 <link to="IVirtualBox::openRemoteSession" />
2054 instead.</note>
2055
2056 Upon successful return, the session object can be used to
2057 get access to the machine and to the VM console.
2058
2059 In VirtualBox terminology, the machine becomes "mutable" after
2060 a session has been opened. Note that the "mutable" machine
2061 object, on which you may invoke IMachine methods to change its
2062 settings, will be a different object from the immutable IMachine
2063 objects returned by various IVirtualBox methods. To obtain a
2064 mutable IMachine object (upon which you can invoke settings methods),
2065 use the <link to="ISession::machine" /> attribute.
2066
2067 One must always call <link to="ISession::close" /> to release the
2068 lock on the machine, or the machine's state will eventually be
2069 set to "Aborted".
2070
2071 In other words, to change settings on a machine, the following
2072 sequence is typically performed:
2073
2074 <ol>
2075 <li>Call this method (openSession) to have a machine locked for
2076 the current session.</li>
2077
2078 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2079
2080 <li>Change the settings of the machine.</li>
2081
2082 <li>Call <link to="IMachine::saveSettings" />.</li>
2083
2084 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2085 </ol>
2086 </desc>
2087 <param name="session" type="ISession" dir="in">
2088 <desc>
2089 Session object that will represent the opened session after
2090 successful method invocation. This object must not represent
2091 the already open session.
2092 <note>
2093 This session will be automatically closed if the
2094 VirtualBox server is terminated for some reason.
2095 </note>
2096 </desc>
2097 </param>
2098 <param name="machineId" type="uuid" dir="in">
2099 <desc>ID of the virtual machine to open a session with.</desc>
2100 </param>
2101 </method>
2102
2103 <method name="openRemoteSession">
2104 <desc>
2105 Spawns a new process that executes a virtual machine (called a
2106 "remote session").
2107
2108 Opening a remote session causes the VirtualBox server to start a new
2109 process that opens a direct session with the given VM. As a result, the
2110 VM is locked by that direct session in the new process, preventing
2111 conflicting changes from other processes. Since sessions act as locks
2112 that such prevent conflicting changes, one cannot open a remote session
2113 for a VM that already has another open session (direct or remote), or
2114 is currently in the process of opening one (see <link to="IMachine::sessionState"/>).
2115
2116 While the remote session still provides some level of control over the
2117 VM execution to the caller (using the <link to="IConsole" /> interface),
2118 not all VM settings are available for modification within the remote
2119 session context.
2120
2121 This operation can take some time (a new VM is started in a new process,
2122 for which memory and other resources need to be set up). Because of this,
2123 an <link to="IProgress" /> is returned to allow the caller to wait for this
2124 asynchronous operation to be completed. Until then, the remote session
2125 object remains in the closed state, and accessing the machine or its
2126 console through it is invalid. It is recommended to use
2127 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2128 completion.
2129
2130 As with all <link to="ISession" /> objects, it is recommended to call
2131 <link to="ISession::close" /> on the local session object once openRemoteSession()
2132 has been called. However, the session's state (see <link to="ISession::state" />)
2133 will not return to "Closed" until the remote session has also closed (i.e.
2134 until the VM is no longer running). In that case, however, the state of
2135 the session will automatically change back to "Closed".
2136
2137 Currently supported session types (values of the @a type
2138 argument) are:
2139 <ul>
2140 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2141 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2142 </ul>
2143
2144 The @a environment argument is a string containing definitions of
2145 environment variables in the following format:
2146 @code
2147 NAME[=VALUE]\n
2148 NAME[=VALUE]\n
2149 ...
2150 @endcode
2151 where <tt>\\n</tt> is the new line character. These environment
2152 variables will be appended to the environment of the VirtualBox server
2153 process. If an environment variable exists both in the server process
2154 and in this list, the value from this list takes precedence over the
2155 server's variable. If the value of the environment variable is
2156 omitted, this variable will be removed from the resulting environment.
2157 If the environment string is @c null, the server environment is
2158 inherited by the started process as is.
2159
2160 <see>openExistingSession</see>
2161 </desc>
2162 <param name="session" type="ISession" dir="in">
2163 <desc>
2164 Session object that will represent the opened remote session
2165 after successful method invocation (this object must not
2166 represent an already open session).
2167 </desc>
2168 </param>
2169 <param name="machineId" type="uuid" dir="in">
2170 <desc>ID of the virtual machine to open a session with.</desc>
2171 </param>
2172 <param name="type" type="wstring" dir="in">
2173 <desc>
2174 Type of the remote session (case sensitive).
2175 </desc>
2176 </param>
2177 <param name="environment" type="wstring" dir="in">
2178 <desc>
2179 Environment to pass to the opened session (may be @c null).
2180 </desc>
2181 </param>
2182 <param name="progress" type="IProgress" dir="return">
2183 <desc>Progress object to track the operation completion.</desc>
2184 </param>
2185 </method>
2186
2187 <method name="openExistingSession">
2188 <desc>
2189 Opens a new remote session with the virtual machine for
2190 which a direct session is already open.
2191
2192 The remote session provides some level of control over the VM
2193 execution (using the IConsole interface) to the caller; however,
2194 within the remote session context, not all VM settings are available
2195 for modification.
2196
2197 As opposed to <link to="#openRemoteSession()"/>, the number of
2198 remote sessions opened this way is not limited by the API
2199
2200 <note>
2201 It is an error to open a remote session with the machine that
2202 doesn't have an open direct session.
2203 </note>
2204
2205 <see>openRemoteSession</see>
2206 </desc>
2207 <param name="session" type="ISession" dir="in">
2208 <desc>
2209 Session object that will represent the open remote session
2210 after successful method invocation. This object must not
2211 represent an already open session.
2212 <note>
2213 This session will be automatically closed when the peer
2214 (direct) session dies or gets closed.
2215 </note>
2216 </desc>
2217 </param>
2218 <param name="machineId" type="uuid" dir="in">
2219 <desc>ID of the virtual machine to open a session with.</desc>
2220 </param>
2221 </method>
2222
2223 <method name="registerCallback">
2224 <desc>
2225 Registers a new global VirtualBox callback. The methods of the given
2226 callback object will be called by VirtualBox when an appropriate
2227 event occurs.
2228 </desc>
2229 <param name="callback" type="IVirtualBoxCallback" dir="in">
2230 <desc>Callback object to register.</desc>
2231 </param>
2232 </method>
2233
2234 <method name="unregisterCallback">
2235 <desc>
2236 Unregisters the previously registered global VirtualBox callback.
2237 </desc>
2238 <param name="callback" type="IVirtualBoxCallback" dir="in">
2239 <desc>Callback object to unregister.</desc>
2240 </param>
2241 </method>
2242
2243 <method name="waitForPropertyChange">
2244 <desc>
2245 Blocks the caller until any of the properties represented by the @a
2246 what argument changes the value or until the given timeout interval
2247 expires.
2248
2249 The @a what argument is a comma separated list of property masks that
2250 describe properties the caller is interested in. The property mask is
2251 a string in the following format:
2252
2253 <pre>
2254 [[group.]subgroup.]name
2255 </pre>
2256
2257 where @c name is the property name and @c group, @c subgroup are zero
2258 or more property group specifiers. Each element (group or name) in
2259 the property mask may be either a Latin string or an asterisk symbol
2260 (@c "*") which is used to match any string for the given element. A
2261 property mask that doesn't contain asterisk symbols represents a
2262 single fully qualified property name.
2263
2264 Groups in the fully qualified property name go from more generic (the
2265 left-most part) to more specific (the right-most part). The first
2266 element is usually a name of the object the property belongs to. The
2267 second element may be either a property name, or a child object name,
2268 or an index if the preceding element names an object which is one of
2269 many objects of the same type. This way, property names form a
2270 hierarchy of properties. Here are some examples of property names:
2271
2272 <table>
2273 <tr>
2274 <td><tt>VirtualBox.version</tt></td>
2275 <td><link to="IVirtualBox::version"/> property</td>
2276 </tr>
2277 <tr>
2278 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2279 <td><link to="IMachine::name"/> property of the machine with the
2280 given UUID</td>
2281 </tr>
2282 </table>
2283
2284 Most property names directly correspond to the properties of objects
2285 (components) provided by the VirtualBox library and may be used to
2286 track changes to these properties. However, there may be
2287 pseudo-property names that don't correspond to any existing object's
2288 property directly, as well as there may be object properties that
2289 don't have a corresponding property name that is understood by this
2290 method, and therefore changes to such properties cannot be
2291 tracked. See individual object's property descriptions to get a
2292 fully qualified property name that can be used with this method (if
2293 any).
2294
2295 There is a special property mask @c "*" (i.e. a string consisting of a
2296 single asterisk symbol) that can be used to match all properties.
2297 Below are more examples of property masks:
2298
2299 <table>
2300 <tr>
2301 <td><tt>VirtualBox.*</tt></td>
2302 <td>Track all properties of the VirtualBox object</td>
2303 </tr>
2304 <tr>
2305 <td><tt>Machine.*.name</tt></td>
2306 <td>Track changes to the <link to="IMachine::name"/> property of
2307 all registered virtual machines</td>
2308 </tr>
2309 </table>
2310
2311 </desc>
2312 <param name="what" type="wstring" dir="in">
2313 <desc>Comma separated list of property masks.</desc>
2314 </param>
2315 <param name="timeout" type="unsigned long" dir="in">
2316 <desc>
2317 Wait timeout in milliseconds.
2318 Specify -1 for an indefinite wait.
2319 </desc>
2320 </param>
2321 <param name="changed" type="wstring" dir="out">
2322 <desc>
2323 Comma separated list of properties that have been changed and caused
2324 this method to return to the caller.
2325 </desc>
2326 </param>
2327 <param name="values" type="wstring" dir="out">
2328 <desc>Reserved, not currently used.</desc>
2329 </param>
2330 </method>
2331
2332 <method name="saveSettings">
2333 <desc>
2334 Saves the global settings to the global settings file
2335 (<link to="#settingsFilePath"/>).
2336
2337 This method is only useful for explicitly saving the global settings
2338 file after it has been auto-converted from the old format to the most
2339 recent format (see <link to="#settingsFileVersion"/> for details).
2340 Normally, the global settings file is implicitly saved when a global
2341 setting is changed.
2342 </desc>
2343 </method>
2344
2345 <method name="saveSettingsWithBackup">
2346 <desc>
2347 Creates a backup copy of the global settings file
2348 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2349 calls <link to="#saveSettings()"/>.
2350
2351 Note that the backup copy is created <b>only</b> if the settings file
2352 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2353 details). Otherwise, this call is fully equivalent to
2354 <link to="#saveSettings()"/> and no backup copying is done.
2355
2356 The backup copy is created in the same directory where the original
2357 settings file is located. It is given the following file name:
2358 <pre>
2359 original.xml.x.y-platform.bak
2360 </pre>
2361 where <tt>original.xml</tt> is the original settings file name
2362 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2363 format of the settings file (before auto-conversion).
2364
2365 If the given backup file already exists, this method will try to add the
2366 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2367 0 to 9) and copy it again until it succeeds. If all suffixes are
2368 occupied, or if any other copy error occurs, this method will return a
2369 failure.
2370
2371 If the copy operation succeeds, the @a bakFileName return argument will
2372 receive a full path to the created backup file (for informational
2373 purposes). Note that this will happen even if the subsequent
2374 <link to="#saveSettings()"/> call performed by this method after the
2375 copy operation, fails.
2376
2377 <note>
2378 The VirtualBox API never calls this method. It is intended purely for
2379 the purposes of creating backup copies of the settings files by
2380 front-ends before saving the results of the automatically performed
2381 settings conversion to disk.
2382 </note>
2383
2384 <see>settingsFileVersion</see>
2385 </desc>
2386 <param name="bakFileName" type="wstring" dir="return">
2387 <desc>Full path to the created backup copy.</desc>
2388 </param>
2389 </method>
2390
2391 </interface>
2392
2393 <!--
2394 // IMachine
2395 /////////////////////////////////////////////////////////////////////////
2396 -->
2397
2398 <enumerator
2399 name="IMachineEnumerator" type="IMachine"
2400 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
2401 />
2402
2403 <collection
2404 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
2405 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
2406 readonly="yes"
2407 />
2408
2409 <interface
2410 name="IInternalMachineControl" extends="$unknown"
2411 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
2412 internal="yes"
2413 wsmap="suppress"
2414 >
2415 <method name="updateState">
2416 <desc>
2417 Updates the VM state.
2418 <note>
2419 This operation will also update the settings file with
2420 the correct information about the saved state file
2421 and delete this file from disk when appropriate.
2422 </note>
2423 </desc>
2424 <param name="state" type="MachineState" dir="in"/>
2425 </method>
2426
2427 <method name="getIPCId">
2428 <param name="id" type="wstring" dir="return"/>
2429 </method>
2430
2431 <method name="runUSBDeviceFilters">
2432 <desc>
2433 Asks the server to run USB devices filters of the associated
2434 machine against the given USB device and tell if there is
2435 a match.
2436 <note>
2437 Intended to be used only for remote USB devices. Local
2438 ones don't require to call this method (this is done
2439 implicitly by the Host and USBProxyService).
2440 </note>
2441 </desc>
2442 <param name="device" type="IUSBDevice" dir="in"/>
2443 <param name="matched" type="boolean" dir="out"/>
2444 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2445 </method>
2446
2447 <method name="captureUSBDevice">
2448 <desc>
2449 Requests a capture of the given host USB device.
2450 When the request is completed, the VM process will
2451 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2452 notification.
2453 </desc>
2454 <param name="id" type="uuid" dir="in"/>
2455 </method>
2456
2457 <method name="detachUSBDevice">
2458 <desc>
2459 Notification that a VM is going to detach (done = false) or has
2460 already detached (done = true) the given USB device.
2461 When the done = true request is completed, the VM process will
2462 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2463 notification.
2464 <note>
2465 In the done = true case, the server must run its own filters
2466 and filters of all VMs but this one on the detached device
2467 as if it were just attached to the host computer.
2468 </note>
2469 </desc>
2470 <param name="id" type="uuid" dir="in"/>
2471 <param name="done" type="boolean" dir="in"/>
2472 </method>
2473
2474 <method name="autoCaptureUSBDevices">
2475 <desc>
2476 Requests a capture all matching USB devices attached to the host.
2477 When the request is completed, the VM process will
2478 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2479 notification per every captured device.
2480 </desc>
2481 </method>
2482
2483 <method name="detachAllUSBDevices">
2484 <desc>
2485 Notification that a VM that is being powered down. The done
2486 parameter indicates whether which stage of the power down
2487 we're at. When done = false the VM is announcing its
2488 intentions, while when done = true the VM is reporting
2489 what it has done.
2490 <note>
2491 In the done = true case, the server must run its own filters
2492 and filters of all VMs but this one on all detach devices as
2493 if they were just attached to the host computer.
2494 </note>
2495 </desc>
2496 <param name="done" type="boolean" dir="in"/>
2497 </method>
2498
2499 <method name="onSessionEnd">
2500 <desc>
2501 Triggered by the given session object when the session is about
2502 to close normally.
2503 </desc>
2504 <param name="session" type="ISession" dir="in">
2505 <desc>Session that is being closed</desc>
2506 </param>
2507 <param name="progress" type="IProgress" dir="return">
2508 <desc>
2509 Used to wait until the corresponding machine is actually
2510 dissociated from the given session on the server.
2511 Returned only when this session is a direct one.
2512 </desc>
2513 </param>
2514 </method>
2515
2516 <method name="beginSavingState">
2517 <desc>
2518 Called by the VM process to inform the server it wants to
2519 save the current state and stop the VM execution.
2520 </desc>
2521 <param name="progress" type="IProgress" dir="in">
2522 <desc>
2523 Progress object created by the VM process to wait until
2524 the state is saved.
2525 </desc>
2526 </param>
2527 <param name="stateFilePath" type="wstring" dir="out">
2528 <desc>
2529 File path the VM process must save the execution state to.
2530 </desc>
2531 </param>
2532 </method>
2533
2534 <method name="endSavingState">
2535 <desc>
2536 Called by the VM process to inform the server that saving
2537 the state previously requested by #beginSavingState is either
2538 successfully finished or there was a failure.
2539 </desc>
2540
2541 <param name="success" type="boolean" dir="in">
2542 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2543 </param>
2544 </method>
2545
2546 <method name="adoptSavedState">
2547 <desc>
2548 Gets called by IConsole::adoptSavedState.
2549 </desc>
2550 <param name="savedStateFile" type="wstring" dir="in">
2551 <desc>Path to the saved state file to adopt.</desc>
2552 </param>
2553 </method>
2554
2555 <method name="beginTakingSnapshot">
2556 <desc>
2557 Called by the VM process to inform the server it wants to
2558 take a snapshot.
2559 </desc>
2560 <param name="initiator" type="IConsole" dir="in">
2561 <desc>The console object that initiated this call.</desc>
2562 </param>
2563 <param name="name" type="wstring" dir="in">
2564 <desc>Snapshot name</desc>
2565 </param>
2566 <param name="description" type="wstring" dir="in">
2567 <desc>Snapshot description</desc>
2568 </param>
2569 <param name="progress" type="IProgress" dir="in">
2570 <desc>
2571 Progress object created by the VM process to wait until
2572 the state is saved (only for online snapshots).
2573 </desc>
2574 </param>
2575 <param name="stateFilePath" type="wstring" dir="out">
2576 <desc>
2577 File path the VM process must save the execution state to.
2578 </desc>
2579 </param>
2580 <param name="serverProgress" type="IProgress" dir="out">
2581 <desc>
2582 Progress object created by the server process to wait until
2583 the snapshot is taken (VDI diff creation, etc.).
2584 </desc>
2585 </param>
2586 </method>
2587
2588 <method name="endTakingSnapshot">
2589 <desc>
2590 Called by the VM process to inform the server that the snapshot
2591 previously requested by #beginTakingSnapshot is either
2592 successfully taken or there was a failure.
2593 </desc>
2594
2595 <param name="success" type="boolean" dir="in">
2596 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2597 </param>
2598 </method>
2599
2600 <method name="discardSnapshot">
2601 <desc>
2602 Gets called by IConsole::discardSnapshot.
2603 </desc>
2604 <param name="initiator" type="IConsole" dir="in">
2605 <desc>The console object that initiated this call.</desc>
2606 </param>
2607 <param name="id" type="uuid" dir="in">
2608 <desc>UUID of the snapshot to discard.</desc>
2609 </param>
2610 <param name="machineState" type="MachineState" dir="out">
2611 <desc>New machine state after this operation is started.</desc>
2612 </param>
2613 <param name="progress" type="IProgress" dir="return">
2614 <desc>Progress object to track the operation completion.</desc>
2615 </param>
2616 </method>
2617
2618 <method name="discardCurrentState">
2619 <desc>
2620 Gets called by IConsole::discardCurrentState.
2621 </desc>
2622 <param name="initiator" type="IConsole" dir="in">
2623 <desc>The console object that initiated this call.</desc>
2624 </param>
2625 <param name="machineState" type="MachineState" dir="out">
2626 <desc>New machine state after this operation is started.</desc>
2627 </param>
2628 <param name="progress" type="IProgress" dir="return">
2629 <desc>Progress object to track the operation completion.</desc>
2630 </param>
2631 </method>
2632
2633 <method name="discardCurrentSnapshotAndState">
2634 <desc>
2635 Gets called by IConsole::discardCurrentSnapshotAndState.
2636 </desc>
2637 <param name="initiator" type="IConsole" dir="in">
2638 <desc>The console object that initiated this call.</desc>
2639 </param>
2640 <param name="machineState" type="MachineState" dir="out">
2641 <desc>New machine state after this operation is started.</desc>
2642 </param>
2643 <param name="progress" type="IProgress" dir="return">
2644 <desc>Progress object to track the operation completion.</desc>
2645 </param>
2646 </method>
2647
2648 <method name="pullGuestProperties">
2649 <desc>
2650 Get the list of the guest properties matching a set of patterns along
2651 with their values, time stamps and flags and give responsibility for
2652 managing properties to the console.
2653 </desc>
2654 <param name="name" type="wstring" dir="out" safearray="yes">
2655 <desc>
2656 The names of the properties returned.
2657 </desc>
2658 </param>
2659 <param name="value" type="wstring" dir="out" safearray="yes">
2660 <desc>
2661 The values of the properties returned. The array entries match the
2662 corresponding entries in the @a name array.
2663 </desc>
2664 </param>
2665 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
2666 <desc>
2667 The time stamps of the properties returned. The array entries match
2668 the corresponding entries in the @a name array.
2669 </desc>
2670 </param>
2671 <param name="flags" type="wstring" dir="out" safearray="yes">
2672 <desc>
2673 The flags of the properties returned. The array entries match the
2674 corresponding entries in the @a name array.
2675 </desc>
2676 </param>
2677 </method>
2678
2679 <method name="pushGuestProperties">
2680 <desc>
2681 Set the list of the guest properties matching a set of patterns along
2682 with their values, time stamps and flags and return responsibility for
2683 managing properties to IMachine.
2684 </desc>
2685 <param name="name" type="wstring" dir="in" safearray="yes">
2686 <desc>
2687 The names of the properties.
2688 </desc>
2689 </param>
2690 <param name="value" type="wstring" dir="in" safearray="yes">
2691 <desc>
2692 The values of the properties. The array entries match the
2693 corresponding entries in the @a name array.
2694 </desc>
2695 </param>
2696 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
2697 <desc>
2698 The time stamps of the properties. The array entries match
2699 the corresponding entries in the @a name array.
2700 </desc>
2701 </param>
2702 <param name="flags" type="wstring" dir="in" safearray="yes">
2703 <desc>
2704 The flags of the properties. The array entries match the
2705 corresponding entries in the @a name array.
2706 </desc>
2707 </param>
2708 </method>
2709 <method name="pushGuestProperty">
2710 <desc>
2711 Update a single guest property in IMachine.
2712 </desc>
2713 <param name="name" type="wstring" dir="in">
2714 <desc>
2715 The name of the property to be updated.
2716 </desc>
2717 </param>
2718 <param name="value" type="wstring" dir="in">
2719 <desc>
2720 The value of the property.
2721 </desc>
2722 </param>
2723 <param name="timestamp" type="unsigned long long" dir="in">
2724 <desc>
2725 The timestamp of the property.
2726 </desc>
2727 </param>
2728 <param name="flags" type="wstring" dir="in">
2729 <desc>
2730 The flags of the property.
2731 </desc>
2732 </param>
2733 </method>
2734 </interface>
2735
2736 <interface
2737 name="IBIOSSettings" extends="$unknown"
2738 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
2739 wsmap="managed"
2740 >
2741 <desc>
2742 The IBIOSSettings interface represents BIOS settings of the virtual
2743 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
2744 </desc>
2745 <attribute name="logoFadeIn" type="boolean">
2746 <desc>Fade in flag for BIOS logo animation.</desc>
2747 </attribute>
2748
2749 <attribute name="logoFadeOut" type="boolean">
2750 <desc>Fade out flag for BIOS logo animation.</desc>
2751 </attribute>
2752
2753 <attribute name="logoDisplayTime" type="unsigned long">
2754 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
2755 </attribute>
2756
2757 <attribute name="logoImagePath" type="wstring">
2758 <desc>Local file system path for external BIOS image.</desc>
2759 </attribute>
2760
2761 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
2762 <desc>Mode of the BIOS boot device menu.</desc>
2763 </attribute>
2764
2765 <attribute name="ACPIEnabled" type="boolean">
2766 <desc>ACPI support flag.</desc>
2767 </attribute>
2768
2769 <attribute name="IOAPICEnabled" type="boolean">
2770 <desc>
2771 IO APIC support flag. If set, VirtualBox will provide an IO APIC
2772 and support IRQs above 15.
2773 </desc>
2774 </attribute>
2775
2776 <attribute name="timeOffset" type="long long">
2777 <desc>
2778 Offset in milliseconds from the host system time. This allows for
2779 guests running with a different system date/time than the host.
2780 It is equivalent to setting the system date/time in the BIOS other
2781 than it's not an absolute value but a relative one. Guest Additions
2782 time synchronization also honors this offset.
2783 </desc>
2784 </attribute>
2785
2786 <attribute name="PXEDebugEnabled" type="boolean">
2787 <desc>
2788 PXE debug logging flag. If set, VirtualBox will write extensive
2789 PXE trace information to the release log.
2790 </desc>
2791 </attribute>
2792
2793 <attribute name="IDEControllerType" type="IDEControllerType">
2794 <desc>
2795 Type of the virtual IDE controller. Depending on this value,
2796 VirtualBox will provide different virtual IDE hardware
2797 devices to the guest.
2798 </desc>
2799 </attribute>
2800
2801 </interface>
2802
2803 <interface
2804 name="IMachine" extends="$unknown"
2805 uuid="a744b229-3457-422f-8550-649c40346c55"
2806 wsmap="managed"
2807 >
2808 <desc>
2809 The IMachine interface represents a virtual machine, or guest, created
2810 in VirtualBox.
2811
2812 This interface is used in two contexts. First of all, a collection of
2813 objects implementing this interface is stored in the
2814 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
2815 machines that are currently registered with this VirtualBox
2816 installation. Also, once a session has been opened for the given virtual
2817 machine (e.g. the virtual machine is running), the machine object
2818 associated with the open session can be queried from the session object;
2819 see <link to="ISession"/> for details.
2820
2821 The main role of this interface is to expose the settings of the virtual
2822 machine and provide methods to change various aspects of the virtual
2823 machine's configuration. For machine objects stored in the
2824 <link to="IVirtualBox::machines2"/> collection, all attributes are
2825 read-only unless explicitly stated otherwise in individual attribute
2826 and method descriptions. In order to change a machine setting, a session
2827 for this machine must be opened using one of
2828 <link to="IVirtualBox::openSession"/>,
2829 <link to="IVirtualBox::openRemoteSession"/> or
2830 <link to="IVirtualBox::openExistingSession"/> methods. After the
2831 session has been successfully opened, a mutable machine object needs to
2832 be queried from the session object and then the desired settings changes
2833 can be applied to the returned object using IMachine attributes and
2834 methods. See the ISession interface description for more information
2835 about sessions.
2836
2837 Note that the IMachine interface does not provide methods to control
2838 virtual machine execution (such as start the machine, or power it
2839 down) -- these methods are grouped in a separate IConsole
2840 interface. Refer to the IConsole interface description to get more
2841 information about this topic.
2842
2843 <see>ISession, IConsole</see>
2844 </desc>
2845
2846 <attribute name="parent" type="IVirtualBox" readonly="yes">
2847 <desc>Associated parent object.</desc>
2848 </attribute>
2849
2850 <attribute name="accessible" type="boolean" readonly="yes">
2851 <desc>
2852 Whether this virtual machine is currently accessible or not.
2853
2854 The machine is considered to be inaccessible when:
2855 <ul>
2856 <li>It is a registered virtual machine, and
2857 </li>
2858 <li>Its settings file is inaccessible (for example, it is
2859 located on a network share that is not accessible during
2860 VirtualBox startup, or becomes inaccessible later, or if
2861 the settings file can be read but is invalid).
2862 </li>
2863 </ul>
2864
2865 Otherwise, the value of this property is always <tt>true</tt>.
2866
2867 Every time this property is read, the accessibility state of
2868 this machine is re-evaluated. If the returned value is |false|,
2869 the <link to="#accessError"/> property may be used to get the
2870 detailed error information describing the reason of
2871 inaccessibility.
2872
2873 When the machine is inaccessible, only the following properties
2874 can be used on it:
2875 <ul>
2876 <li><link to="#parent"/></li>
2877 <li><link to="#id"/></li>
2878 <li><link to="#settingsFilePath"/></li>
2879 <li><link to="#accessible"/></li>
2880 <li><link to="#accessError"/></li>
2881 </ul>
2882
2883 An attempt to access any other property or method will return
2884 an error.
2885
2886 The only possible action you can perform on an inaccessible
2887 machine is to unregister it using the
2888 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
2889 for the accessibility state once more by querying this
2890 property).
2891
2892 <note>
2893 In the current implementation, once this property returns
2894 <tt>true</tt>, the machine will never become inaccessible
2895 later, even if its settings file cannot be successfully
2896 read/written any more (at least, until the VirtualBox
2897 server is restarted). This limitation may be removed in
2898 future releases.
2899 </note>
2900 </desc>
2901 </attribute>
2902
2903 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
2904 <desc>
2905 Error information describing the reason of machine
2906 inaccessibility.
2907
2908 Reading this property is only valid after the last call to
2909 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
2910 machine is currently unaccessible). Otherwise, a null
2911 IVirtualBoxErrorInfo object will be returned.
2912 </desc>
2913 </attribute>
2914
2915 <attribute name="name" type="wstring">
2916 <desc>
2917 Name of the virtual machine.
2918
2919 Besides being used for human-readable identification purposes
2920 everywhere in VirtualBox, the virtual machine name is also used
2921 as a name of the machine's settings file and as a name of the
2922 subdirectory this settings file resides in. Thus, every time you
2923 change the value of this property, the settings file will be
2924 renamed once you call <link to="#saveSettings()"/> to confirm the
2925 change. The containing subdirectory will be also renamed, but
2926 only if it has exactly the same name as the settings file
2927 itself prior to changing this property (for backward compatibility
2928 with previous API releases). The above implies the following
2929 limitations:
2930 <ul>
2931 <li>The machine name cannot be empty.</li>
2932 <li>The machine name can contain only characters that are valid
2933 file name characters according to the rules of the file
2934 system used to store VirtualBox configuration.</li>
2935 <li>You cannot have two or more machines with the same name
2936 if they use the same subdirectory for storing the machine
2937 settings files.</li>
2938 <li>You cannot change the name of the machine if it is running,
2939 or if any file in the directory containing the settings file
2940 is being used by another running machine or by any other
2941 process in the host operating system at a time when
2942 <link to="#saveSettings()"/> is called.
2943 </li>
2944 </ul>
2945 If any of the above limitations are hit, <link to="#saveSettings()"/>
2946 will return an appropriate error message explaining the exact
2947 reason and the changes you made to this machine will not be
2948 saved.
2949 <note>
2950 For "legacy" machines created using the
2951 <link to="IVirtualBox::createLegacyMachine()"/> call,
2952 the above naming limitations do not apply because the
2953 machine name does not affect the settings file name.
2954 The settings file name remains the same as it was specified
2955 during machine creation and never changes.
2956 </note>
2957 </desc>
2958 </attribute>
2959
2960 <attribute name="description" type="wstring">
2961 <desc>
2962 Description of the virtual machine.
2963
2964 The description attribute can contain any text and is
2965 typically used to describe the hardware and software
2966 configuration of the virtual machine in detail (i.e. network
2967 settings, versions of the installed software and so on).
2968 </desc>
2969 </attribute>
2970
2971 <attribute name="id" type="uuid" readonly="yes">
2972 <desc>UUID of the virtual machine.</desc>
2973 </attribute>
2974
2975 <attribute name="OSTypeId" type="wstring">
2976 <desc>
2977 User-defined identifier of the Guest OS type.
2978 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
2979 an IGuestOSType object representing details about the given
2980 Guest OS type.
2981 <note>
2982 This value may differ from the value returned by
2983 <link to="IGuest::OSTypeId"/> if Guest Additions are
2984 installed to the guest OS.
2985 </note>
2986 </desc>
2987 </attribute>
2988
2989 <attribute name="CPUCount" type="unsigned long">
2990 <desc>Number of virtual CPUs in the VM.</desc>
2991 </attribute>
2992
2993 <attribute name="memorySize" type="unsigned long">
2994 <desc>System memory size in megabytes.</desc>
2995 </attribute>
2996
2997 <attribute name="memoryBalloonSize" type="unsigned long">
2998 <desc>Initial memory balloon size in megabytes.</desc>
2999 </attribute>
3000
3001 <attribute name="statisticsUpdateInterval" type="unsigned long">
3002 <desc>Initial interval to update guest statistics in seconds.</desc>
3003 </attribute>
3004
3005 <attribute name="VRAMSize" type="unsigned long">
3006 <desc>Video memory size in megabytes.</desc>
3007 </attribute>
3008
3009 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3010 <desc>
3011 This setting determines whether VirtualBox allows guests to make use
3012 of the 3D graphics support available on the host. Currently limited
3013 to OpenGL only. </desc>
3014 </attribute>
3015
3016 <attribute name="monitorCount" type="unsigned long">
3017 <desc>
3018 Number of virtual monitors.
3019 <note>
3020 Only effective on Windows XP and later guests with
3021 Guest Additions installed.
3022 </note>
3023 </desc>
3024 </attribute>
3025
3026 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3027 <desc>Object containing all BIOS settings.</desc>
3028 </attribute>
3029
3030 <attribute name="HWVirtExEnabled" type="TSBool">
3031 <desc>
3032 This setting determines whether VirtualBox will try to make use of
3033 the host CPU's hardware virtualization extensions such as Intel VT-x
3034 and AMD-V. Note that in case such extensions are not available,
3035 they will not be used.
3036 </desc>
3037 </attribute>
3038
3039 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3040 <desc>
3041 This setting determines whether VirtualBox will try to make use of
3042 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3043 such extensions are not available, they will not be used.
3044 </desc>
3045 </attribute>
3046
3047 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3048 <desc>
3049 This setting determines whether VirtualBox will try to make use of
3050 the VPID extension of Intel VT-x. Note that in case such extensions are
3051 not available, they will not be used.
3052 </desc>
3053 </attribute>
3054
3055 <attribute name="PAEEnabled" type="boolean" default="false">
3056 <desc>
3057 This setting determines whether VirtualBox will expose the Physical Address
3058 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3059 is not available, it will not be reported.
3060 </desc>
3061 </attribute>
3062
3063 <attribute name="snapshotFolder" type="wstring">
3064 <desc>
3065 Full path to the directory used to store snapshot data
3066 (differencing hard disks and saved state files) of this machine.
3067
3068 The initial value of this property is
3069 <tt>&lt;</tt><link to="#settingsFilePath">
3070 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3071 <link to="#id">machine_uuid</link>
3072 <tt>&gt;</tt>.
3073
3074 Currently, it is an error to try to change this property on
3075 a machine that has snapshots (because this would require to
3076 move possibly large files to a different location).
3077 A separate method will be available for this purpose later.
3078
3079 <note>
3080 Setting this property to <tt>null</tt> will restore the
3081 initial value.
3082 </note>
3083 <note>
3084 When setting this property, the specified path can be
3085 absolute (full path) or relative to the directory where the
3086 <link to="#settingsFilePath">machine settings file</link>
3087 is located. When reading this property, a full path is
3088 always returned.
3089 </note>
3090 <note>
3091 The specified path may not exist, it will be created
3092 when necessary.
3093 </note>
3094 </desc>
3095 </attribute>
3096
3097 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3098 <desc>VRDP server object.</desc>
3099 </attribute>
3100
3101 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3102 <desc>Array of hard disks attached to this machine.</desc>
3103 </attribute>
3104
3105 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3106 <desc>Associated DVD drive object.</desc>
3107 </attribute>
3108
3109 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3110 <desc>Associated floppy drive object.</desc>
3111 </attribute>
3112
3113 <attribute name="USBController" type="IUSBController" readonly="yes">
3114 <desc>
3115 Associated USB controller object.
3116
3117 <note>
3118 This method may set a @ref com_warnings "warning result code".
3119 </note>
3120 <note>
3121 If USB functionality is not available in the given edition of
3122 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3123 </note>
3124 </desc>
3125 </attribute>
3126
3127 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3128 <desc>Associated audio adapter, always present.</desc>
3129 </attribute>
3130
3131 <attribute name="SATAController" type="ISATAController" readonly="yes">
3132 <desc>
3133 Associated SATA controller object.
3134 </desc>
3135 </attribute>
3136
3137 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3138 <desc>
3139 Full name of the file containing machine settings data.
3140 </desc>
3141 </attribute>
3142
3143 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3144 <desc>
3145 Current version of the format of the settings file of this machine
3146 (<link to="#settingsFilePath"/>).
3147
3148 The version string has the following format:
3149 <pre>
3150 x.y-platform
3151 </pre>
3152 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3153 versions, and <tt>platform</tt> is the platform identifier.
3154
3155 The current version usually matches the value of the
3156 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3157 settings file was created by an older version of VirtualBox and there
3158 was a change of the settings file format since then.
3159
3160 Note that VirtualBox automatically converts settings files from older
3161 versions to the most recent version when reading them (usually at
3162 VirtualBox startup) but it doesn't save the changes back until
3163 you call a method that implicitly saves settings (such as
3164 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3165 explicitly. Therefore, if the value of this attribute differs from the
3166 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3167 means that the settings file was converted but the result of the
3168 conversion is not yet saved to disk.
3169
3170 The above feature may be used by interactive front-ends to inform users
3171 about the settings file format change and offer them to explicitly save
3172 all converted settings files (the global and VM-specific ones),
3173 optionally create backup copies of the old settings files before saving,
3174 etc.
3175
3176 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3177 </desc>
3178 </attribute>
3179
3180 <attribute name="settingsModified" type="boolean" readonly="yes">
3181 <desc>
3182 Whether the settings of this machine have been modified
3183 (but neither yet saved nor discarded).
3184 <note>
3185 Reading this property is only valid on instances returned
3186 by <link to="ISession::machine"/> and on new machines
3187 created by <link to="IVirtualBox::createMachine"/> or opened
3188 by <link to="IVirtualBox::openMachine"/> but not
3189 yet registered, or on unregistered machines after calling
3190 <link to="IVirtualBox::unregisterMachine"/>. For all other
3191 cases, the settings can never be modified.
3192 </note>
3193 <note>
3194 For newly created unregistered machines, the value of this
3195 property is always TRUE until <link to="#saveSettings()"/>
3196 is called (no matter if any machine settings have been
3197 changed after the creation or not). For opened machines
3198 the value is set to FALSE (and then follows to normal rules).
3199 </note>
3200 </desc>
3201 </attribute>
3202
3203 <attribute name="sessionState" type="SessionState" readonly="yes">
3204 <desc>Current session state for this machine.</desc>
3205 </attribute>
3206
3207 <attribute name="sessionType" type="wstring" readonly="yes">
3208 <desc>
3209 Type of the session. If <link to="#sessionState"/> is
3210 SessionSpawning or SessionOpen, this attribute contains the
3211 same value as passed to the
3212 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3213 type parameter. If the session was opened directly using
3214 <link to="IVirtualBox::openSession()"/>, or if
3215 <link to="#sessionState"/> is SessionClosed, the value of this
3216 attribute is @c null.
3217 </desc>
3218 </attribute>
3219
3220 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3221 <desc>
3222 Identifier of the session process. This attribute contains the
3223 platform-dependent identifier of the process that has opened a
3224 direct session for this machine using the
3225 <link to="IVirtualBox::openSession()"/> call. The returned value
3226 is only valid if <link to="#sessionState"/> is SessionOpen or
3227 SessionClosing (i.e. a session is currently open or being
3228 closed) by the time this property is read.
3229 </desc>
3230 </attribute>
3231
3232 <attribute name="state" type="MachineState" readonly="yes">
3233 <desc>Current execution state of this machine.</desc>
3234 </attribute>
3235
3236 <attribute name="lastStateChange" type="long long" readonly="yes">
3237 <desc>
3238 Time stamp of the last execution state change,
3239 in milliseconds since 1970-01-01 UTC.
3240 </desc>
3241 </attribute>
3242
3243 <attribute name="stateFilePath" type="wstring" readonly="yes">
3244 <desc>
3245 Full path to the file that stores the execution state of
3246 the machine when it is in the <link to="MachineState::Saved"/>
3247 state.
3248 <note>
3249 When the machine is not in the Saved state, this attribute
3250 <tt>null</tt>.
3251 </note>
3252 </desc>
3253 </attribute>
3254
3255 <attribute name="logFolder" type="wstring" readonly="yes">
3256 <desc>
3257 Full path to the folder that stores a set of rotated log files
3258 recorded during machine execution. The most recent log file is
3259 named <tt>VBox.log</tt>, the previous log file is
3260 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3261 in the current version).
3262 </desc>
3263 </attribute>
3264
3265 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3266 <desc>
3267 Current snapshot of this machine.
3268 <note>
3269 A <tt>null</tt> object is returned if the machine doesn't
3270 have snapshots.
3271 </note>
3272 <see><link to="ISnapshot"/></see>
3273 </desc>
3274 </attribute>
3275
3276 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3277 <desc>
3278 Number of snapshots taken on this machine. Zero means the
3279 machine doesn't have any snapshots.
3280 </desc>
3281 </attribute>
3282
3283 <attribute name="currentStateModified" type="boolean" readonly="yes">
3284 <desc>
3285 Returns <tt>true</tt> if the current state of the machine is not
3286 identical to the state stored in the current snapshot.
3287
3288 The current state is identical to the current snapshot right
3289 after one of the following calls are made:
3290 <ul>
3291 <li><link to="IConsole::discardCurrentState"/> or
3292 <link to="IConsole::discardCurrentSnapshotAndState"/>
3293 </li>
3294 <li><link to="IConsole::takeSnapshot"/> (issued on a
3295 powered off or saved machine, for which
3296 <link to="#settingsModified"/> returns <tt>false</tt>)
3297 </li>
3298 <li><link to="IMachine::setCurrentSnapshot"/>
3299 </li>
3300 </ul>
3301
3302 The current state remains identical until one of the following
3303 happens:
3304 <ul>
3305 <li>settings of the machine are changed</li>
3306 <li>the saved state is discarded</li>
3307 <li>the current snapshot is discarded</li>
3308 <li>an attempt to execute the machine is made</li>
3309 </ul>
3310
3311 <note>
3312 For machines that don't have snapshots, this property is
3313 always <tt>false</tt>.
3314 </note>
3315 </desc>
3316 </attribute>
3317
3318 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3319 <desc>
3320 Collection of shared folders for this machine (permanent shared
3321 folders). These folders are shared automatically at machine startup
3322 and available only to the guest OS installed within this machine.
3323
3324 New shared folders are added to the collection using
3325 <link to="#createSharedFolder"/>. Existing shared folders can be
3326 removed using <link to="#removeSharedFolder"/>.
3327 </desc>
3328 </attribute>
3329
3330 <attribute name="clipboardMode" type="ClipboardMode">
3331 <desc>
3332 Synchronization mode between the host OS clipboard
3333 and the guest OS clipboard.
3334 </desc>
3335 </attribute>
3336
3337 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3338 <desc>
3339 A comma-separated list of simple glob patterns. Changes to guest
3340 properties whose name matches one of the patterns will generate an
3341 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3342 </desc>
3343 </attribute>
3344
3345 <method name="setBootOrder">
3346 <desc>
3347 Puts the given device to the specified position in
3348 the boot order.
3349
3350 To indicate that no device is associated with the given position,
3351 <link to="DeviceType::Null"/> should be used.
3352
3353 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3354 </desc>
3355 <param name="position" type="unsigned long" dir="in">
3356 <desc>
3357 Position in the boot order (<tt>1</tt> to the total number of
3358 devices the machine can boot from, as returned by
3359 <link to="ISystemProperties::maxBootPosition"/>).
3360 </desc>
3361 </param>
3362 <param name="device" type="DeviceType" dir="in">
3363 <desc>
3364 The type of the device used to boot at the given position.
3365 </desc>
3366 </param>
3367 </method>
3368
3369 <method name="getBootOrder" const="yes">
3370 <desc>
3371 Returns the device type that occupies the specified
3372 position in the boot order.
3373
3374 @todo [remove?]
3375 If the machine can have more than one device of the returned type
3376 (such as hard disks), then a separate method should be used to
3377 retrieve the individual device that occupies the given position.
3378
3379 If here are no devices at the given position, then
3380 <link to="DeviceType::Null"/> is returned.
3381
3382 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3383 </desc>
3384 <param name="order" type="unsigned long" dir="in">
3385 <desc>
3386 Position in the boot order (<tt>1</tt> to the total number of
3387 devices the machine can boot from, as returned by
3388 <link to="ISystemProperties::maxBootPosition"/>).
3389 </desc>
3390 </param>
3391 <param name="device" type="DeviceType" dir="return">
3392 <desc>
3393 Device at the given position.
3394 </desc>
3395 </param>
3396 </method>
3397
3398 <method name="attachHardDisk2">
3399 <desc>
3400 Attaches a virtual hard disk identified by the given UUID to a device
3401 slot of the specified bus.
3402
3403 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3404 specify the primary or secondary IDE controller, respectively. The
3405 SATA bus supports 30 channels, so this parameter can be a number in
3406 range from @c 0 to @c 29.
3407
3408 For the primary controller of the IDE bus, the @a device number can be
3409 either @c 0 or @c 1, to specify the master or the slave device,
3410 respectively. For the secondary IDE controller, the device number is
3411 always @c 1 because the master device is reserved for the CD-ROM drive.
3412
3413 For the SATA bus, the @a device parameter is not currently used and
3414 must always be @c 0.
3415
3416 The specified device slot must not have another disk attached to it, or
3417 this method will fail.
3418
3419 See <link to="IHardDisk2"/> for more detailed information about
3420 attaching hard disks.
3421
3422 <note>
3423 You cannot attach a hard disk to a running machine. Also, you cannot
3424 attach a hard disk to a newly created machine until this machine's
3425 settings are saved to disk using <link to="#saveSettings()"/>.
3426 </note>
3427 <note>
3428 If the hard disk is being attached indirectly, a new differencing hard
3429 disk will be implicitly created for it and attached instead. If the
3430 changes made to the machine settings (including this indirect
3431 attachment) are later cancelled using <link to="#discardSettings()"/>,
3432 this implicitly created differencing hard disk will be implicitly
3433 deleted.
3434 </note>
3435 </desc>
3436 <param name="id" type="uuid" dir="in">
3437 <desc>UUID of the hard disk to attach.</desc>
3438 </param>
3439 <param name="bus" type="StorageBus" dir="in">
3440 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3441 </param>
3442 <param name="channel" type="long" dir="in">
3443 <desc>Channel to attach the hard disk to.</desc>
3444 </param>
3445 <param name="device" type="long" dir="in">
3446 <desc>
3447 Device slot in the given channel to attach the hard disk to.
3448 </desc>
3449 </param>
3450 </method>
3451
3452 <method name="getHardDisk2" const="yes">
3453 <desc>
3454 Returns the virtual hard disk attached to a device slot of the specified
3455 bus.
3456
3457 Note that if the hard disk was indirectly attached by
3458 <link to="#attachHardDisk2()"/> to the given device slot then this
3459 method will return not the same object as passed to the
3460 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3461 more detailed information about attaching hard disks.
3462 </desc>
3463 <param name="bus" type="StorageBus" dir="in">
3464 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3465 </param>
3466 <param name="channel" type="long" dir="in">
3467 <desc>Channel to query.</desc>
3468 </param>
3469 <param name="device" type="long" dir="in">
3470 <desc>Device slot in the given channel to query.</desc>
3471 </param>
3472 <param name="hardDisk" type="IHardDisk2" dir="return">
3473 <desc>Attached hard disk object.</desc>
3474 </param>
3475 </method>
3476
3477 <method name="detachHardDisk2">
3478 <desc>
3479 Detaches the virtual hard disk attached to a device slot of the
3480 specified bus.
3481
3482 Detaching the hard disk from the virtual machine is deferred. This means
3483 that the hard disk remains associated with the machine when this method
3484 returns and gets actually de-associated only after a successful
3485 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3486 for more detailed information about attaching hard disks.
3487
3488 <note>
3489 You cannot detach the hard disk from a running machine.
3490 </note>
3491 <note>
3492 Detaching differencing hard disks implicitly created by <link
3493 to="#attachHardDisk2()"/> for the indirect attachment using this
3494 method will <b>not</b> implicitly delete them. The
3495 <link to="IHardDisk2::deleteStorage()"/> operation should be
3496 explicitly performed by the caller after the hard disk is successfully
3497 detached and the settings are saved with
3498 <link to="#saveSettings()"/>, if it is the desired action.
3499 </note>
3500
3501 </desc>
3502 <param name="bus" type="StorageBus" dir="in">
3503 <desc>Bus to detach the hard disk from.</desc>
3504 </param>
3505 <param name="channel" type="long" dir="in">
3506 <desc>Channel number to detach the hard disk from.</desc>
3507 </param>
3508 <param name="device" type="long" dir="in">
3509 <desc>Device slot number to detach the hard disk from.</desc>
3510 </param>
3511 </method>
3512
3513 <method name="getNetworkAdapter" const="yes">
3514 <desc>
3515 Returns the network adapter associated with the given slot.
3516 Slots are numbered sequentially, starting with zero. The total
3517 number of adapters per every machine is defined by the
3518 <link to="ISystemProperties::networkAdapterCount"/> property,
3519 so the maximum slot number is one less than that property's value.
3520 </desc>
3521 <param name="slot" type="unsigned long" dir="in"/>
3522 <param name="adapter" type="INetworkAdapter" dir="return"/>
3523 </method>
3524
3525 <method name="getSerialPort" const="yes">
3526 <desc>
3527 Returns the serial port associated with the given slot.
3528 Slots are numbered sequentially, starting with zero. The total
3529 number of serial ports per every machine is defined by the
3530 <link to="ISystemProperties::serialPortCount"/> property,
3531 so the maximum slot number is one less than that property's value.
3532 </desc>
3533 <param name="slot" type="unsigned long" dir="in"/>
3534 <param name="port" type="ISerialPort" dir="return"/>
3535 </method>
3536
3537 <method name="getParallelPort" const="yes">
3538 <desc>
3539 Returns the parallel port associated with the given slot.
3540 Slots are numbered sequentially, starting with zero. The total
3541 number of parallel ports per every machine is defined by the
3542 <link to="ISystemProperties::parallelPortCount"/> property,
3543 so the maximum slot number is one less than that property's value.
3544 </desc>
3545 <param name="slot" type="unsigned long" dir="in"/>
3546 <param name="port" type="IParallelPort" dir="return"/>
3547 </method>
3548
3549 <method name="getNextExtraDataKey">
3550 <desc>
3551 Returns the machine-specific extra data key name following the
3552 supplied key.
3553
3554 An error is returned if the supplied @a key does not exist. @c NULL is
3555 returned in @a nextKey if the supplied key is the last key. When
3556 supplying @c NULL for the @a key, the first key item is returned in @a
3557 nextKey (if there is any). @a nextValue is an optional parameter and
3558 if supplied, the next key's value is returned in it.
3559 </desc>
3560 <param name="key" type="wstring" dir="in">
3561 <desc>Name of the data key to follow.</desc>
3562 </param>
3563 <param name="nextKey" type="wstring" dir="out">
3564 <desc>Name of the next data key.</desc>
3565 </param>
3566 <param name="nextValue" type="wstring" dir="out">
3567 <desc>Value of the next data key.</desc>
3568 </param>
3569 </method>
3570
3571 <method name="getExtraData">
3572 <desc>
3573 Returns associated machine-specific extra data.
3574
3575 If the requested data @a key does not exist, this function will
3576 succeed and return @c NULL in the @a value argument.
3577 </desc>
3578 <param name="key" type="wstring" dir="in">
3579 <desc>Name of the data key to get.</desc>
3580 </param>
3581 <param name="value" type="wstring" dir="return">
3582 <desc>Value of the requested data key.</desc>
3583 </param>
3584 </method>
3585
3586 <method name="setExtraData">
3587 <desc>
3588 Sets associated machine-specific extra data.
3589
3590 If you pass @c NULL as a key @a value, the given @a key will be
3591 deleted.
3592
3593 <note>
3594 Before performing the actual data change, this method will ask all
3595 registered callbacks using the
3596 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
3597 notification for a permission. If one of the callbacks refuses the
3598 new value, the change will not be performed.
3599 </note>
3600 <note>
3601 On success, the
3602 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
3603 is called to inform all registered callbacks about a successful data
3604 change.
3605 </note>
3606 <note>
3607 This method can be called outside the machine session and therefore
3608 it's a caller's responsibility to handle possible race conditions
3609 when several clients change the same key at the same time.
3610 </note>
3611 </desc>
3612 <param name="key" type="wstring" dir="in">
3613 <desc>Name of the data key to set.</desc>
3614 </param>
3615 <param name="value" type="wstring" dir="in">
3616 <desc>Value to assign to the key.</desc>
3617 </param>
3618 </method>
3619
3620 <method name="saveSettings">
3621 <desc>
3622 Saves any changes to machine settings made since the session
3623 has been opened or a new machine has been created, or since the
3624 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
3625 For registered machines, new settings become visible to all
3626 other VirtualBox clients after successful invocation of this
3627 method.
3628 <note>
3629 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
3630 notification event after the configuration has been successfully
3631 saved (only for registered machines).
3632 </note>
3633 <note>
3634 Calling this method is only valid on instances returned
3635 by <link to="ISession::machine"/> and on new machines
3636 created by <link to="IVirtualBox::createMachine"/> but not
3637 yet registered, or on unregistered machines after calling
3638 <link to="IVirtualBox::unregisterMachine"/>.
3639 </note>
3640 </desc>
3641 </method>
3642
3643 <method name="saveSettingsWithBackup">
3644 <desc>
3645 Creates a backup copy of the machine settings file (<link
3646 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
3647 <link to="#saveSettings()"/>.
3648
3649 Note that the backup copy is created <b>only</b> if the settings file
3650 auto-conversion took place (see <link to="#settingsFileVersion"/> for
3651 details). Otherwise, this call is fully equivalent to
3652 <link to="#saveSettings()"/> and no backup copying is done.
3653
3654 The backup copy is created in the same directory where the original
3655 settings file is located. It is given the following file name:
3656 <pre>
3657 original.xml.x.y-platform.bak
3658 </pre>
3659 where <tt>original.xml</tt> is the original settings file name
3660 (excluding path), and <tt>x.y-platform</tt> is the version of the old
3661 format of the settings file (before auto-conversion).
3662
3663 If the given backup file already exists, this method will try to add the
3664 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
3665 0 to 9) and copy it again until it succeeds. If all suffixes are
3666 occupied, or if any other copy error occurs, this method will return a
3667 failure.
3668
3669 If the copy operation succeeds, the @a bakFileName return argument will
3670 receive a full path to the created backup file (for informational
3671 purposes). Note that this will happen even if the subsequent
3672 <link to="#saveSettings()"/> call performed by this method after the
3673 copy operation, fails.
3674
3675 <note>
3676 The VirtualBox API never calls this method. It is intended purely for
3677 the purposes of creating backup copies of the settings files by
3678 front-ends before saving the results of the automatically performed
3679 settings conversion to disk.
3680 </note>
3681
3682 <see>settingsFileVersion</see>
3683 </desc>
3684 <param name="bakFileName" type="wstring" dir="return">
3685 <desc>Full path to the created backup copy.</desc>
3686 </param>
3687 </method>
3688
3689 <method name="discardSettings">
3690 <desc>
3691 Discards any changes to the machine settings made since the session
3692 has been opened or since the last call to <link to="#saveSettings()"/>
3693 or <link to="#discardSettings"/>.
3694 <note>
3695 Calling this method is only valid on instances returned
3696 by <link to="ISession::machine"/> and on new machines
3697 created by <link to="IVirtualBox::createMachine"/> or
3698 opened by <link to="IVirtualBox::openMachine"/> but not
3699 yet registered, or on unregistered machines after calling
3700 <link to="IVirtualBox::unregisterMachine"/>.
3701 </note>
3702 </desc>
3703 </method>
3704
3705 <method name="deleteSettings">
3706 <desc>
3707 Deletes the settings file of this machine from disk.
3708 The machine must not be registered in order for this operation
3709 to succeed.
3710 <note>
3711 <link to="#settingsModified"/> will return TRUE after this
3712 method successfully returns.
3713 </note>
3714 <note>
3715 Calling this method is only valid on instances returned
3716 by <link to="ISession::machine"/> and on new machines
3717 created by <link to="IVirtualBox::createMachine"/> or
3718 opened by <link to="IVirtualBox::openMachine"/> but not
3719 yet registered, or on unregistered machines after calling
3720 <link to="IVirtualBox::unregisterMachine"/>.
3721 </note>
3722 <note>
3723 The deleted machine settings file can be restored (saved again)
3724 by calling <link to="#saveSettings()"/>.
3725 </note>
3726 </desc>
3727 </method>
3728
3729 <method name="getSnapshot">
3730 <desc>
3731 Returns a snapshot of this machine with the given UUID.
3732 A <tt>null</tt> UUID can be used to obtain the first snapshot
3733 taken on this machine. This is useful if you want to traverse
3734 the whole tree of snapshots starting from the root.
3735 </desc>
3736 <param name="id" type="uuid" dir="in">
3737 <desc>UUID of the snapshot to get</desc>
3738 </param>
3739 <param name="snapshot" type="ISnapshot" dir="return">
3740 <desc>Snapshot object with the given UUID.</desc>
3741 </param>
3742 </method>
3743
3744 <method name="findSnapshot">
3745 <desc>
3746 Returns a snapshot of this machine with the given name.
3747 </desc>
3748 <param name="name" type="wstring" dir="in">
3749 <desc>Name of the snapshot to find</desc>
3750 </param>
3751 <param name="snapshot" type="ISnapshot" dir="return">
3752 <desc>Snapshot object with the given name.</desc>
3753 </param>
3754 </method>
3755
3756 <method name="setCurrentSnapshot">
3757 <desc>
3758 Sets the current snapshot of this machine.
3759 <note>
3760 In the current implementation, this operation is not
3761 implemented.
3762 </note>
3763 </desc>
3764 <param name="id" type="uuid" dir="in">
3765 <desc>UUID of the snapshot to set as the current snapshot.</desc>
3766 </param>
3767 </method>
3768
3769 <method name="createSharedFolder">
3770 <desc>
3771 Creates a new permanent shared folder by associating the given logical
3772 name with the given host path, adds it to the collection of shared
3773 folders and starts sharing it. Refer to the description of
3774 <link to="ISharedFolder"/> to read more about logical names.
3775 </desc>
3776 <param name="name" type="wstring" dir="in">
3777 <desc>Unique logical name of the shared folder.</desc>
3778 </param>
3779 <param name="hostPath" type="wstring" dir="in">
3780 <desc>Full path to the shared folder in the host file system.</desc>
3781 </param>
3782 <param name="writable" type="boolean" dir="in">
3783 <desc>Whether the share is writable or readonly</desc>
3784 </param>
3785 </method>
3786
3787 <method name="removeSharedFolder">
3788 <desc>
3789 Removes the permanent shared folder with the given name previously
3790 created by <link to="#createSharedFolder"/> from the collection of
3791 shared folders and stops sharing it.
3792 </desc>
3793 <param name="name" type="wstring" dir="in">
3794 <desc>Logical name of the shared folder to remove.</desc>
3795 </param>
3796 </method>
3797
3798 <method name="canShowConsoleWindow">
3799 <desc>
3800 Returns @c true if the VM console process can activate the
3801 console window and bring it to foreground on the desktop of
3802 the host PC.
3803 <note>
3804 This method will fail if a session for this machine is not
3805 currently open.
3806 </note>
3807 </desc>
3808 <param name="canShow" type="boolean" dir="return">
3809 <desc>
3810 @c true if the console window can be shown and @c
3811 false otherwise.
3812 </desc>
3813 </param>
3814 </method>
3815
3816 <method name="showConsoleWindow">
3817 <desc>
3818 Activates the console window and brings it to foreground on
3819 the desktop of the host PC. Many modern window managers on
3820 many platforms implement some sort of focus stealing
3821 prevention logic, so that it may be impossible to activate
3822 a window without the help of the currently active
3823 application. In this case, this method will return a non-zero
3824 identifier that represents the top-level window of the VM
3825 console process. The caller, if it represents a currently
3826 active process, is responsible to use this identifier (in a
3827 platform-dependent manner) to perform actual window
3828 activation.
3829 <note>
3830 This method will fail if a session for this machine is not
3831 currently open.
3832 </note>
3833 </desc>
3834 <param name="winId" type="unsigned long long" dir="return">
3835 <desc>
3836 Platform-dependent identifier of the top-level VM console
3837 window, or zero if this method has performed all actions
3838 necessary to implement the <i>show window</i> semantics for
3839 the given platform and/or VirtualBox front-end.
3840 </desc>
3841 </param>
3842 </method>
3843
3844 <method name="getGuestProperty">
3845 <desc>
3846 Reads an entry from the machine's guest property store.
3847 </desc>
3848 <param name="name" type="wstring" dir="in">
3849 <desc>
3850 The name of the property to read.
3851 </desc>
3852 </param>
3853 <param name="value" type="wstring" dir="out">
3854 <desc>
3855 The value of the property. If the property does not exist then this
3856 will be empty.
3857 </desc>
3858 </param>
3859 <param name="timestamp" type="unsigned long long" dir="out">
3860 <desc>
3861 The time at which the property was last modified, as seen by the
3862 server process.
3863 </desc>
3864 </param>
3865 <param name="flags" type="wstring" dir="out">
3866 <desc>
3867 Additional property parameters, passed as a comma-separated list of
3868 "name=value" type entries.
3869 </desc>
3870 </param>
3871 </method>
3872
3873 <method name="getGuestPropertyValue">
3874 <desc>
3875 Reads a value from the machine's guest property store.
3876 </desc>
3877 <param name="property" type="wstring" dir="in">
3878 <desc>
3879 The name of the property to read.
3880 </desc>
3881 </param>
3882 <param name="value" type="wstring" dir="return">
3883 <desc>
3884 The value of the property. If the property does not exist then this
3885 will be empty.
3886 </desc>
3887 </param>
3888 </method>
3889
3890 <method name="getGuestPropertyTimestamp">
3891 <desc>
3892 Reads a property timestamp from the machine's guest property store.
3893 </desc>
3894 <param name="property" type="wstring" dir="in">
3895 <desc>
3896 The name of the property to read.
3897 </desc>
3898 </param>
3899 <param name="value" type="unsigned long long" dir="return">
3900 <desc>
3901 The timestamp. If the property does not exist then this will be
3902 empty.
3903 </desc>
3904 </param>
3905 </method>
3906
3907 <method name="setGuestProperty">
3908 <desc>
3909 Sets, changes or deletes an entry in the machine's guest property
3910 store.
3911 </desc>
3912 <param name="property" type="wstring" dir="in">
3913 <desc>
3914 The name of the property to set, change or delete.
3915 </desc>
3916 </param>
3917 <param name="value" type="wstring" dir="in">
3918 <desc>
3919 The new value of the property to set, change or delete. If the
3920 property does not yet exist and value is non-empty, it will be
3921 created. If the value is empty, the key will be deleted if it
3922 exists.
3923 </desc>
3924 </param>
3925 <param name="flags" type="wstring" dir="in">
3926 <desc>
3927 Additional property parameters, passed as a comma-separated list of
3928 "name=value" type entries.
3929 </desc>
3930 </param>
3931 </method>
3932
3933 <method name="setGuestPropertyValue">
3934 <desc>
3935 Sets, changes or deletes a value in the machine's guest property
3936 store. The flags field will be left unchanged or created empty for a
3937 new property.
3938 </desc>
3939 <param name="property" type="wstring" dir="in">
3940 <desc>
3941 The name of the property to set, change or delete.
3942 </desc>
3943 </param>
3944 <param name="value" type="wstring" dir="in">
3945 <desc>
3946 The new value of the property to set, change or delete. If the
3947 property does not yet exist and value is non-empty, it will be
3948 created. If value is empty, the property will be deleted if it
3949 exists.
3950 </desc>
3951 </param>
3952 </method>
3953
3954 <method name="enumerateGuestProperties">
3955 <desc>
3956 Return a list of the guest properties matching a set of patterns along
3957 with their values, time stamps and flags.
3958 </desc>
3959 <param name="patterns" type="wstring" dir="in">
3960 <desc>
3961 The patterns to match the properties against, separated by '|'
3962 characters. If this is empty or NULL, all properties will match.
3963 </desc>
3964 </param>
3965 <param name="name" type="wstring" dir="out" safearray="yes">
3966 <desc>
3967 The names of the properties returned.
3968 </desc>
3969 </param>
3970 <param name="value" type="wstring" dir="out" safearray="yes">
3971 <desc>
3972 The values of the properties returned. The array entries match the
3973 corresponding entries in the @a name array.
3974 </desc>
3975 </param>
3976 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3977 <desc>
3978 The time stamps of the properties returned. The array entries match
3979 the corresponding entries in the @a name array.
3980 </desc>
3981 </param>
3982 <param name="flags" type="wstring" dir="out" safearray="yes">
3983 <desc>
3984 The flags of the properties returned. The array entries match the
3985 corresponding entries in the @a name array.
3986 </desc>
3987 </param>
3988 </method>
3989</interface>
3990
3991 <!--
3992 // IConsole
3993 /////////////////////////////////////////////////////////////////////////
3994 -->
3995
3996 <interface
3997 name="IConsoleCallback" extends="$unknown"
3998 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
3999 wsmap="suppress"
4000 >
4001
4002 <method name="onMousePointerShapeChange">
4003 <desc>
4004 Notification when the guest mouse pointer shape has
4005 changed. The new shape data is given.
4006 </desc>
4007 <param name="visible" type="boolean" dir="in">
4008 <desc>
4009 Flag whether the pointer is visible.
4010 </desc>
4011 </param>
4012 <param name="alpha" type="boolean" dir="in">
4013 <desc>
4014 Flag whether the pointer has an alpha channel.
4015 </desc>
4016 </param>
4017 <param name="xHot" type="unsigned long" dir="in">
4018 <desc>
4019 The pointer hot spot x coordinate.
4020 </desc>
4021 </param>
4022 <param name="yHot" type="unsigned long" dir="in">
4023 <desc>
4024 The pointer hot spot y coordinate.
4025 </desc>
4026 </param>
4027 <param name="width" type="unsigned long" dir="in">
4028 <desc>
4029 Width of the pointer shape in pixels.
4030 </desc>
4031 </param>
4032 <param name="height" type="unsigned long" dir="in">
4033 <desc>
4034 Height of the pointer shape in pixels.
4035 </desc>
4036 </param>
4037 <param name="shape" type="octet" mod="ptr" dir="in">
4038 <desc>
4039 Address of the shape buffer.
4040
4041 The buffer contains 1 bpp (bits per pixel) AND mask followed by 32 bpp XOR (color) mask.
4042
4043 For pointers without alpha channel the XOR mask pixels are 32 bit values: (lsb)BGR0(msb).
4044 For pointers with alpha channel the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
4045
4046 AND mask presents for pointers with alpha channel, so if the callback does not
4047 support alpha, the pointer could be displayed as a normal color pointer.
4048
4049 The AND mask is 1 bpp bitmap with byte aligned scanlines. Size of AND mask,
4050 therefore, is <tt>cbAnd = (width + 7) / 8 * height</tt>. The padding bits at the
4051 end of any scanline are undefined.
4052
4053 The XOR mask follows the AND mask on the next 4 bytes aligned offset:
4054 <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>
4055 Bytes in the gap between the AND and the XOR mask are undefined.
4056 XOR mask scanlines have no gap between them and size of XOR mask is:
4057 <tt>cXor = width * 4 * height</tt>.
4058
4059 <note>
4060 If 'shape' is equal to 0, only pointer visibility is being changed.
4061 </note>
4062 </desc>
4063 </param>
4064 </method>
4065
4066 <method name="onMouseCapabilityChange">
4067 <desc>
4068 Notification when the mouse capabilities reported by the
4069 guest have changed. The new capabilities are passed.
4070 </desc>
4071 <param name="supportsAbsolute" type="boolean" dir="in"/>
4072 <param name="needsHostCursor" type="boolean" dir="in"/>
4073 </method>
4074
4075 <method name="onKeyboardLedsChange">
4076 <desc>
4077 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
4078 to alter the state of the keyboard LEDs.
4079 </desc>
4080 <param name="numLock" type="boolean" dir="in"/>
4081 <param name="capsLock" type="boolean" dir="in"/>
4082 <param name="scrollLock" type="boolean" dir="in"/>
4083 </method>
4084
4085 <method name="onStateChange">
4086 <desc>
4087 Notification when the execution state of the machine has changed.
4088 The new state will be given.
4089 </desc>
4090 <param name="state" type="MachineState" dir="in"/>
4091 </method>
4092
4093 <method name="onAdditionsStateChange">
4094 <desc>
4095 Notification when a Guest Additions property changes.
4096 Interested callees should query IGuest attributes to
4097 find out what has changed.
4098 </desc>
4099 </method>
4100
4101 <method name="onDVDDriveChange">
4102 <desc>
4103 Notification when a property of the
4104 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
4105 Interested callees should use IDVDDrive methods to find out what has
4106 changed.
4107 </desc>
4108 </method>
4109
4110 <method name="onFloppyDriveChange">
4111 <desc>
4112 Notification when a property of the
4113 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
4114 Interested callees should use IFloppyDrive methods to find out what
4115 has changed.
4116 </desc>
4117 </method>
4118
4119 <method name="onNetworkAdapterChange">
4120 <desc>
4121 Notification when a property of one of the
4122 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
4123 changes. Interested callees should use INetworkAdapter methods and
4124 attributes to find out what has changed.
4125 </desc>
4126 <param name="networkAdapter" type="INetworkAdapter" dir="in">
4127 <desc>Network adapter that is subject to change.</desc>
4128 </param>
4129 </method>
4130
4131 <method name="onSerialPortChange">
4132 <desc>
4133 Notification when a property of one of the
4134 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
4135 Interested callees should use ISerialPort methods and attributes
4136 to find out what has changed.
4137 </desc>
4138 <param name="serialPort" type="ISerialPort" dir="in">
4139 <desc>Serial port that is subject to change.</desc>
4140 </param>
4141 </method>
4142
4143 <method name="onParallelPortChange">
4144 <desc>
4145 Notification when a property of one of the
4146 virtual <link to="IMachine::getParallelPort">parallel ports</link>
4147 changes. Interested callees should use ISerialPort methods and
4148 attributes to find out what has changed.
4149 </desc>
4150 <param name="parallelPort" type="IParallelPort" dir="in">
4151 <desc>Parallel port that is subject to change.</desc>
4152 </param>
4153 </method>
4154
4155 <method name="onVRDPServerChange">
4156 <desc>
4157 Notification when a property of the
4158 <link to="IMachine::VRDPServer">VRDP server</link> changes.
4159 Interested callees should use IVRDPServer methods and attributes to
4160 find out what has changed.
4161 </desc>
4162 </method>
4163
4164 <method name="onUSBControllerChange">
4165 <desc>
4166 Notification when a property of the virtual
4167 <link to="IMachine::USBController">USB controller</link> changes.
4168 Interested callees should use IUSBController methods and attributes to
4169 find out what has changed.
4170 </desc>
4171 </method>
4172
4173 <method name="onUSBDeviceStateChange">
4174 <desc>
4175 Notification when a USB device is attached to or detached from
4176 the virtual USB controller.
4177
4178 This notification is sent as a result of the indirect
4179 request to attach the device because it matches one of the
4180 machine USB filters, or as a result of the direct request
4181 issued by <link to="IConsole::attachUSBDevice"/> or
4182 <link to="IConsole::detachUSBDevice"/>.
4183
4184 This notification is sent in case of both a succeeded and a
4185 failed request completion. When the request succeeds, the @a
4186 error parameter is @c null, and the given device has been
4187 already added to (when @a attached is @c true) or removed from
4188 (when @a attached is @c false) the collection represented by
4189 <link to="IConsole::USBDevices"/>. On failure, the collection
4190 doesn't change and the @a error parameter represents the error
4191 message describing the failure.
4192
4193 </desc>
4194 <param name="device" type="IUSBDevice" dir="in">
4195 <desc>Device that is subject to state change.</desc>
4196 </param>
4197 <param name="attached" type="boolean" dir="in">
4198 <desc>
4199 <tt>true</tt> if the device was attached
4200 and <tt>false</tt> otherwise.
4201 </desc>
4202 </param>
4203 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
4204 <desc>
4205 <tt>null</tt> on success or an error message object on
4206 failure.
4207 </desc>
4208 </param>
4209 </method>
4210
4211 <method name="onSharedFolderChange">
4212 <desc>
4213 Notification when a shared folder is added or removed.
4214 The @a scope argument defines one of three scopes:
4215 <link to="IVirtualBox::sharedFolders">global shared folders</link>
4216 (<link to="Scope::Global">Global</link>),
4217 <link to="IMachine::sharedFolders">permanent shared folders</link> of
4218 the machine (<link to="Scope::Machine">Machine</link>) or <link
4219 to="IConsole::sharedFolders">transient shared folders</link> of the
4220 machine (<link to="Scope::Session">Session</link>). Interested callees
4221 should use query the corresponding collections to find out what has
4222 changed.
4223 </desc>
4224 <param name="scope" type="Scope" dir="in">
4225 <desc>Scope of the notification.</desc>
4226 </param>
4227 </method>
4228
4229 <method name="onRuntimeError">
4230 <desc>
4231 Notification when an error happens during the virtual
4232 machine execution.
4233
4234 There are three kinds of runtime errors:
4235 <ul>
4236 <li><i>fatal</i></li>
4237 <li><i>non-fatal with retry</i></li>
4238 <li><i>non-fatal warnings</i></li>
4239 </ul>
4240
4241 <b>Fatal</b> errors are indicated by the @a fatal parameter set
4242 to <tt>true</tt>. In case of fatal errors, the virtual machine
4243 execution is always paused before calling this notification, and
4244 the notification handler is supposed either to immediately save
4245 the virtual machine state using <link to="IConsole::saveState()"/>
4246 or power it off using <link to="IConsole::powerDown()"/>.
4247 Resuming the execution can lead to unpredictable results.
4248
4249 <b>Non-fatal</b> errors and warnings are indicated by the
4250 @a fatal parameter set to <tt>false</tt>. If the virtual machine
4251 is in the Paused state by the time the error notification is
4252 received, it means that the user can <i>try to resume</i> the machine
4253 execution after attempting to solve the problem that caused the
4254 error. In this case, the notification handler is supposed
4255 to show an appropriate message to the user (depending on the
4256 value of the @a id parameter) that offers several actions such
4257 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
4258 wants to retry, the notification handler should continue
4259 the machine execution using the <link to="IConsole::resume()"/>
4260 call. If the machine execution is not Paused during this
4261 notification, then it means this notification is a <i>warning</i>
4262 (for example, about a fatal condition that can happen very soon);
4263 no immediate action is required from the user, the machine
4264 continues its normal execution.
4265
4266 Note that in either case the notification handler
4267 <b>must not</b> perform any action directly on a thread
4268 where this notification is called. Everything it is allowed to
4269 do is to post a message to another thread that will then talk
4270 to the user and take the corresponding action.
4271
4272 Currently, the following error identifiers are known:
4273 <ul>
4274 <li><tt>"HostMemoryLow"</tt></li>
4275 <li><tt>"HostAudioNotResponding"</tt></li>
4276 <li><tt>"VDIStorageFull"</tt></li>
4277 </ul>
4278
4279 <note>
4280 This notification is not designed to be implemented by
4281 more than one callback at a time. If you have multiple
4282 IConsoleCallback instances registered on the given
4283 IConsole object, make sure you simply do nothing but
4284 return @c S_OK from all but one of them that does actual
4285 user notification and performs necessary actions.
4286 </note>
4287
4288 </desc>
4289 <param name="fatal" type="boolean" dir="in">
4290 <desc>Whether the error is fatal or not</desc>
4291 </param>
4292 <param name="id" type="wstring" dir="in">
4293 <desc>Error identifier</desc>
4294 </param>
4295 <param name="message" type="wstring" dir="in">
4296 <desc>Optional error message</desc>
4297 </param>
4298 </method>
4299
4300 <method name="onCanShowWindow">
4301 <desc>
4302 Notification when a call to
4303 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4304 front-end to check if a subsequent call to
4305 <link to="IMachine::showConsoleWindow()"/> can succeed.
4306
4307 The callee should give an answer appropriate to the current
4308 machine state in the @a canShow argument. This answer must
4309 remain valid at least until the next
4310 <link to="IConsole::state">machine state</link> change.
4311
4312 <note>
4313 This notification is not designed to be implemented by
4314 more than one callback at a time. If you have multiple
4315 IConsoleCallback instances registered on the given
4316 IConsole object, make sure you simply do nothing but
4317 return @c true and @c S_OK from all but one of them that
4318 actually manages console window activation.
4319 </note>
4320 </desc>
4321 <param name="canShow" type="boolean" dir="return">
4322 <desc>
4323 @c true if the console window can be shown and @c
4324 false otherwise.
4325 </desc>
4326 </param>
4327 </method>
4328
4329 <method name="onShowWindow">
4330 <desc>
4331 Notification when a call to
4332 <link to="IMachine::showConsoleWindow()"/>
4333 requests the console window to be activated and brought to
4334 foreground on the desktop of the host PC.
4335
4336 This notification should cause the VM console process to
4337 perform the requested action as described above. If it is
4338 impossible to do it at a time of this notification, this
4339 method should return a failure.
4340
4341 Note that many modern window managers on many platforms
4342 implement some sort of focus stealing prevention logic, so
4343 that it may be impossible to activate a window without the
4344 help of the currently active application (which is supposedly
4345 an initiator of this notification). In this case, this method
4346 must return a non-zero identifier that represents the
4347 top-level window of the VM console process. The caller, if it
4348 represents a currently active process, is responsible to use
4349 this identifier (in a platform-dependent manner) to perform
4350 actual window activation.
4351
4352 This method must set @a winId to zero if it has performed all
4353 actions necessary to complete the request and the console
4354 window is now active and in foreground, to indicate that no
4355 further action is required on the caller's side.
4356
4357 <note>
4358 This notification is not designed to be implemented by
4359 more than one callback at a time. If you have multiple
4360 IConsoleCallback instances registered on the given
4361 IConsole object, make sure you simply do nothing but
4362 return @c S_OK from all but one of them that actually
4363 manages console window activation.
4364 </note>
4365 </desc>
4366 <param name="winId" type="unsigned long long" dir="return">
4367 <desc>
4368 Platform-dependent identifier of the top-level VM console
4369 window, or zero if this method has performed all actions
4370 necessary to implement the <i>show window</i> semantics for
4371 the given platform and/or this VirtualBox front-end.
4372 </desc>
4373 </param>
4374 </method>
4375
4376 </interface>
4377
4378 <interface
4379 name="IRemoteDisplayInfo" extends="$unknown"
4380 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4381 wsmap="struct"
4382 >
4383 <desc>
4384 Contains information about the remote display (VRDP) capabilities and status.
4385 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4386 </desc>
4387
4388 <attribute name="active" type="boolean" readonly="yes">
4389 <desc>
4390 Whether the remote display connection is active.
4391 </desc>
4392 </attribute>
4393
4394 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4395 <desc>
4396 How many times a client connected.
4397 </desc>
4398 </attribute>
4399
4400 <attribute name="beginTime" type="long long" readonly="yes">
4401 <desc>
4402 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4403 </desc>
4404 </attribute>
4405
4406 <attribute name="endTime" type="long long" readonly="yes">
4407 <desc>
4408 When the last connection was terminated or the current time, if
4409 connection is still active, in milliseconds since 1970-01-01 UTC.
4410 </desc>
4411 </attribute>
4412
4413 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4414 <desc>
4415 How many bytes were sent in last or current, if still active, connection.
4416 </desc>
4417 </attribute>
4418
4419 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4420 <desc>
4421 How many bytes were sent in all connections.
4422 </desc>
4423 </attribute>
4424
4425 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4426 <desc>
4427 How many bytes were received in last or current, if still active, connection.
4428 </desc>
4429 </attribute>
4430
4431 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4432 <desc>
4433 How many bytes were received in all connections.
4434 </desc>
4435 </attribute>
4436
4437 <attribute name="user" type="wstring" readonly="yes">
4438 <desc>
4439 Login user name supplied by the client.
4440 </desc>
4441 </attribute>
4442
4443 <attribute name="domain" type="wstring" readonly="yes">
4444 <desc>
4445 Login domain name supplied by the client.
4446 </desc>
4447 </attribute>
4448
4449 <attribute name="clientName" type="wstring" readonly="yes">
4450 <desc>
4451 The client name supplied by the client.
4452 </desc>
4453 </attribute>
4454
4455 <attribute name="clientIP" type="wstring" readonly="yes">
4456 <desc>
4457 The IP address of the client.
4458 </desc>
4459 </attribute>
4460
4461 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4462 <desc>
4463 The client software version number.
4464 </desc>
4465 </attribute>
4466
4467 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
4468 <desc>
4469 Public key exchange method used when connection was established.
4470 Values: 0 - RDP4 public key exchange scheme.
4471 1 - X509 certificates were sent to client.
4472 </desc>
4473 </attribute>
4474
4475 </interface>
4476
4477 <interface
4478 name="IConsole" extends="$unknown"
4479 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
4480 wsmap="managed"
4481 >
4482 <desc>
4483 The IConsole interface represents an interface to control virtual
4484 machine execution.
4485
4486 The console object that implements the IConsole interface is obtained
4487 from a session object after the session for the given machine has been
4488 opened using one of <link to="IVirtualBox::openSession"/>,
4489 <link to="IVirtualBox::openRemoteSession"/> or
4490 <link to="IVirtualBox::openExistingSession"/> methods.
4491
4492 Methods of the IConsole interface allow the caller to query the current
4493 virtual machine execution state, pause the machine or power it down, save
4494 the machine state or take a snapshot, attach and detach removable media
4495 and so on.
4496
4497 <see>ISession</see>
4498 </desc>
4499
4500 <attribute name="machine" type="IMachine" readonly="yes">
4501 <desc>
4502 Machine object this console is sessioned with.
4503 <note>
4504 This is a convenience property, it has the same value as
4505 <link to="ISession::machine"/> of the corresponding session
4506 object.
4507 </note>
4508 </desc>
4509 </attribute>
4510
4511 <attribute name="state" type="MachineState" readonly="yes">
4512 <desc>
4513 Current execution state of the machine.
4514 <note>
4515 This property always returns the same value as the corresponding
4516 property of the IMachine object this console is sessioned with.
4517 For the process that owns (executes) the VM, this is the
4518 preferable way of querying the VM state, because no IPC
4519 calls are made.
4520 </note>
4521 </desc>
4522 </attribute>
4523
4524 <attribute name="guest" type="IGuest" readonly="yes">
4525 <desc>Guest object.</desc>
4526 </attribute>
4527
4528 <attribute name="keyboard" type="IKeyboard" readonly="yes">
4529 <desc>
4530 Virtual keyboard object.
4531 <note>
4532 If the machine is not running, any attempt to use
4533 the returned object will result in an error.
4534 </note>
4535 </desc>
4536 </attribute>
4537
4538 <attribute name="mouse" type="IMouse" readonly="yes">
4539 <desc>
4540 Virtual mouse object.
4541 <note>
4542 If the machine is not running, any attempt to use
4543 the returned object will result in an error.
4544 </note>
4545 </desc>
4546 </attribute>
4547
4548 <attribute name="display" type="IDisplay" readonly="yes">
4549 <desc>Virtual display object.
4550 <note>
4551 If the machine is not running, any attempt to use
4552 the returned object will result in an error.
4553 </note>
4554 </desc>
4555 </attribute>
4556
4557 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
4558 <desc>Debugging interface.</desc>
4559 </attribute>
4560
4561 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
4562 <desc>
4563 Collection of USB devices currently attached to the virtual
4564 USB controller.
4565 <note>
4566 The collection is empty if the machine is not running.
4567 </note>
4568 </desc>
4569 </attribute>
4570
4571 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
4572 <desc>
4573 List of USB devices currently attached to the remote VRDP client.
4574 Once a new device is physically attached to the remote host computer,
4575 it appears in this list and remains there until detached.
4576 </desc>
4577 </attribute>
4578
4579 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4580 <desc>
4581 Collection of shared folders for the current session. These folders
4582 are called transient shared folders because they are available to the
4583 guest OS running inside the associated virtual machine only for the
4584 duration of the session (as opposed to
4585 <link to="IMachine::sharedFolders"/> which represent permanent shared
4586 folders). When the session is closed (e.g. the machine is powered down),
4587 these folders are automatically discarded.
4588
4589 New shared folders are added to the collection using
4590 <link to="#createSharedFolder"/>. Existing shared folders can be
4591 removed using <link to="#removeSharedFolder"/>.
4592 </desc>
4593 </attribute>
4594
4595 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
4596 <desc>
4597 Interface that provides information on Remote Display (VRDP) connection.
4598 </desc>
4599 </attribute>
4600
4601 <method name="powerUp">
4602 <desc>
4603 Starts the virtual machine execution using the current machine
4604 state (that is, its current execution state, current settings and
4605 current hard disks).
4606
4607 If the machine is powered off or aborted, the execution will
4608 start from the beginning (as if the real hardware were just
4609 powered on).
4610
4611 If the machine is in the <link to="MachineState::Saved"/> state,
4612 it will continue its execution the point where the state has
4613 been saved.
4614
4615 <note>
4616 Unless you are trying to write a new VirtualBox front-end that
4617 performs direct machine execution (like the VirtualBox or VBoxSDL
4618 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
4619 session opened by <link to="IVirtualBox::openSession"/> and use this
4620 session only to change virtual machine settings. If you simply want to
4621 start virtual machine execution using one of the existing front-ends
4622 (for example the VirtualBox GUI or headless server), simply use
4623 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
4624 power up the machine automatically for you.
4625 </note>
4626
4627 <see>#saveState</see>
4628 <result name="VBOX_E_INVALID_VM_STATE">
4629 Virtual machine already running.
4630 </result>
4631 <result name="VBOX_E_HOST_ERROR">
4632 Host interface does not exist or name not set.
4633 </result>
4634 <result name="VBOX_E_FILE_ERROR">
4635 Invalid saved state file.
4636 </result>
4637 </desc>
4638 <param name="progress" type="IProgress" dir="return">
4639 <desc>Progress object to track the operation completion.</desc>
4640 </param>
4641 </method>
4642
4643 <method name="powerUpPaused">
4644 <desc>
4645 Identical to powerUp except that the VM will enter the
4646 <link to="MachineState::Paused"/> state, instead of
4647 <link to="MachineState::Running"/>.
4648
4649 <see>#powerUp</see>
4650 <result name="VBOX_E_INVALID_VM_STATE">
4651 Virtual machine already running.
4652 </result>
4653 <result name="VBOX_E_HOST_ERROR">
4654 Host interface does not exist or name not set.
4655 </result>
4656 <result name="VBOX_E_FILE_ERROR">
4657 Invalid saved state file.
4658 </result>
4659 </desc>
4660 <param name="progress" type="IProgress" dir="return">
4661 <desc>Progress object to track the operation completion.</desc>
4662 </param>
4663 </method>
4664
4665 <method name="powerDown">
4666 <desc>
4667 Stops the virtual machine execution.
4668 After this operation completes, the machine will go to the
4669 PoweredOff state.
4670
4671 @deprecated This method will be removed in VirtualBox 2.1 where the
4672 powerDownAsync() method will take its name. Do not use this method in
4673 the code.
4674 <result name="VBOX_E_INVALID_VM_STATE">
4675 Virtual machine must be Running, Paused or Stuck to be powered down.
4676 </result>
4677 <result name="VBOX_E_VM_ERROR">
4678 Unable to power off or destroy virtual machine.
4679 </result>
4680 </desc>
4681 </method>
4682
4683 <method name="powerDownAsync">
4684 <desc>
4685 Initiates the power down procedure to stop the virtual machine
4686 execution.
4687
4688 The completion of the power down procedure is tracked using the returned
4689 IProgress object. After the operation is complete, the machine will go
4690 to the PoweredOff state.
4691
4692 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
4693 where the original powerDown() method will be removed. You will need to
4694 rename "powerDownAsync" to "powerDown" in your sources to make them
4695 build with version 2.1.
4696 <result name="VBOX_E_INVALID_VM_STATE">
4697 Virtual machine must be Running, Paused or Stuck to be powered down.
4698 </result>
4699 </desc>
4700 <param name="progress" type="IProgress" dir="return">
4701 <desc>Progress object to track the operation completion.</desc>
4702 </param>
4703 </method>
4704
4705 <method name="reset">
4706 <desc>Resets the virtual machine.
4707 <result name="VBOX_E_INVALID_VM_STATE">
4708 Virtual machine not in Running state.
4709 </result>
4710 <result name="VBOX_E_VM_ERROR">
4711 Virtual machine error in reset operation.
4712 </result>
4713 </desc>
4714 </method>
4715
4716 <method name="pause">
4717 <desc>Pauses the virtual machine execution.
4718 <result name="VBOX_E_INVALID_VM_STATE">
4719 Virtual machine not in Running state.
4720 </result>
4721 <result name="VBOX_E_VM_ERROR">
4722 Virtual machine error in suspend operation.
4723 </result>
4724 </desc>
4725 </method>
4726
4727 <method name="resume">
4728 <desc>Resumes the virtual machine execution.
4729 <result name="VBOX_E_INVALID_VM_STATE">
4730 Virtual machine not in Paused state.
4731 </result>
4732 <result name="VBOX_E_VM_ERROR">
4733 Virtual machine error in resume operation.
4734 </result>
4735 </desc>
4736 </method>
4737
4738 <method name="powerButton">
4739 <desc>Send the ACPI power button event to the guest.
4740 <result name="VBOX_E_INVALID_VM_STATE">
4741 Virtual machine not in Running state.
4742 </result>
4743 <result name="VBOX_E_PDM_ERROR">
4744 Controlled power off failed.
4745 </result>
4746 </desc>
4747 </method>
4748
4749 <method name="sleepButton">
4750 <desc>Sends the ACPI sleep button event to the guest.
4751 <result name="VBOX_E_INVALID_VM_STATE">
4752 Virtual machine not in Running state.
4753 </result>
4754 <result name="VBOX_E_PDM_ERROR">
4755 Sending sleep button event failed.
4756 </result>
4757 </desc>
4758 </method>
4759
4760 <method name="getPowerButtonHandled">
4761 <desc>Checks if the last power button event was handled by guest.
4762 <result name="VBOX_E_PDM_ERROR">
4763 Checking if the event was handled by the guest OS failed.
4764 </result>
4765 </desc>
4766 <param name="handled" type="boolean" dir="return"/>
4767 </method>
4768
4769 <method name="getGuestEnteredACPIMode">
4770 <desc>Checks if the guest entered the ACPI mode G0 (working) or
4771 G1 (sleeping). If this method returns false, the guest will
4772 most likely not respond to external ACPI events.
4773 <result name="VBOX_E_INVALID_VM_STATE">
4774 Virtual machine not in Running state.
4775 </result>
4776 </desc>
4777 <param name="entered" type="boolean" dir="return"/>
4778 </method>
4779
4780 <method name="saveState">
4781 <desc>
4782 Saves the current execution state of a running virtual machine
4783 and stops its execution.
4784
4785 After this operation completes, the machine will go to the
4786 Saved state. Next time it is powered up, this state will
4787 be restored and the machine will continue its execution from
4788 the place where it was saved.
4789
4790 This operation differs from taking a snapshot to the effect
4791 that it doesn't create new differencing hard disks. Also, once
4792 the machine is powered up from the state saved using this method,
4793 the saved state is deleted, so it will be impossible to return
4794 to this state later.
4795
4796 <note>
4797 On success, this method implicitly calls
4798 <link to="IMachine::saveSettings()"/> to save all current machine
4799 settings (including runtime changes to the DVD drive, etc.).
4800 Together with the impossibility to change any VM settings when it is
4801 in the Saved state, this guarantees adequate hardware
4802 configuration of the machine when it is restored from the saved
4803 state file.
4804 </note>
4805
4806 <note>
4807 The machine must be in the Running or Paused state, otherwise
4808 the operation will fail.
4809 </note>
4810 <result name="VBOX_E_INVALID_VM_STATE">
4811 Virtual machine state neither Running nor Paused.
4812 </result>
4813 <result name="VBOX_E_FILE_ERROR">
4814 Failed to create directory for saved state file.
4815 </result>
4816
4817 <see><link to="#takeSnapshot"/></see>
4818 </desc>
4819 <param name="progress" type="IProgress" dir="return">
4820 <desc>Progress object to track the operation completion.</desc>
4821 </param>
4822 </method>
4823
4824 <method name="adoptSavedState">
4825 <desc>
4826 Associates the given saved state file to the virtual machine.
4827
4828 On success, the machine will go to the Saved state. Next time it is
4829 powered up, it will be restored from the adopted saved state and
4830 continue execution from the place where the saved state file was
4831 created.
4832
4833 The specified saved state file path may be absolute or relative to the
4834 folder the VM normally saves the state to (usually,
4835 <link to="IMachine::snapshotFolder"/>).
4836
4837 <note>
4838 It's a caller's responsibility to make sure the given saved state
4839 file is compatible with the settings of this virtual machine that
4840 represent its virtual hardware (memory size, hard disk configuration
4841 etc.). If there is a mismatch, the behavior of the virtual machine
4842 is undefined.
4843 </note>
4844 <result name="VBOX_E_INVALID_VM_STATE">
4845 Virtual machine state neither PoweredOff nor Aborted.
4846 </result>
4847 </desc>
4848 <param name="savedStateFile" type="wstring" dir="in">
4849 <desc>Path to the saved state file to adopt.</desc>
4850 </param>
4851 </method>
4852
4853 <method name="discardSavedState">
4854 <desc>
4855 Discards (deletes) the saved state of the virtual machine
4856 previously created by <link to="#saveState"/>. Next time the
4857 machine is powered up, a clean boot will occur.
4858 <note>
4859 This operation is equivalent to resetting or powering off
4860 the machine without doing a proper shutdown in the guest OS.
4861 </note>
4862 <result name="VBOX_E_INVALID_VM_STATE">
4863 Virtual machine not in state Saved.
4864 </result>
4865 </desc>
4866 </method>
4867
4868 <method name="getDeviceActivity">
4869 <desc>
4870 Gets the current activity type of a given device or device group.
4871 <result name="E_INVALIDARG">
4872 Invalid device type.
4873 </result>
4874 </desc>
4875 <param name="type" type="DeviceType" dir="in"/>
4876 <param name="activity" type="DeviceActivity" dir="return"/>
4877 </method>
4878
4879 <method name="attachUSBDevice">
4880 <desc>
4881 Attaches a host USB device with the given UUID to the
4882 USB controller of the virtual machine.
4883
4884 The device needs to be in one of the following states:
4885 <link to="USBDeviceState::Busy">Busy</link>,
4886 <link to="USBDeviceState::Available">Available</link> or
4887 <link to="USBDeviceState::Held">Held</link>,
4888 otherwise an error is immediately returned.
4889
4890 When the device state is
4891 <link to="USBDeviceState::Busy">Busy</link>, an error may also
4892 be returned if the host computer refuses to release it for some reason.
4893
4894 <see>IUSBController::deviceFilters, USBDeviceState</see>
4895 <result name="VBOX_E_INVALID_VM_STATE">
4896 Virtual machine state neither Running nor Paused.
4897 </result>
4898 <result name="VBOX_E_PDM_ERROR">
4899 Virtual machine does not have a USB controller.
4900 </result>
4901 </desc>
4902 <param name="id" type="uuid" dir="in">
4903 <desc>UUID of the host USB device to attach.</desc>
4904 </param>
4905 </method>
4906
4907 <method name="detachUSBDevice">
4908 <desc>
4909 Detaches an USB device with the given UUID from the USB controller
4910 of the virtual machine.
4911
4912 After this method succeeds, the VirtualBox server re-initiates
4913 all USB filters as if the device were just physically attached
4914 to the host, but filters of this machine are ignored to avoid
4915 a possible automatic re-attachment.
4916
4917 <see>IUSBController::deviceFilters, USBDeviceState</see>
4918
4919 <result name="VBOX_E_PDM_ERROR">
4920 Virtual machine does not have a USB controller.
4921 </result>
4922 <result name="E_INVALIDARG">
4923 USB device not attached to this virtual machine.
4924 </result>
4925 </desc>
4926 <param name="id" type="uuid" dir="in">
4927 <desc>UUID of the USB device to detach.</desc>
4928 </param>
4929 <param name="device" type="IUSBDevice" dir="return">
4930 <desc>Detached USB device.</desc>
4931 </param>
4932 </method>
4933
4934 <method name="createSharedFolder">
4935 <desc>
4936 Creates a transient new shared folder by associating the given logical
4937 name with the given host path, adds it to the collection of shared
4938 folders and starts sharing it. Refer to the description of
4939 <link to="ISharedFolder"/> to read more about logical names.
4940
4941 <result name="VBOX_E_INVALID_VM_STATE">
4942 Virtual machine in Saved state or currently changing state.
4943 </result>
4944 <result name="VBOX_E_FILE_ERROR">
4945 Shared folder already exists or not accessible.
4946 </result>
4947 </desc>
4948 <param name="name" type="wstring" dir="in">
4949 <desc>Unique logical name of the shared folder.</desc>
4950 </param>
4951 <param name="hostPath" type="wstring" dir="in">
4952 <desc>Full path to the shared folder in the host file system.</desc>
4953 </param>
4954 <param name="writable" type="boolean" dir="in">
4955 <desc>Whether the share is writable or readonly</desc>
4956 </param>
4957 </method>
4958
4959 <method name="removeSharedFolder">
4960 <desc>
4961 Removes a transient shared folder with the given name previously
4962 created by <link to="#createSharedFolder"/> from the collection of
4963 shared folders and stops sharing it.
4964 <result name="VBOX_E_INVALID_VM_STATE">
4965 Virtual machine in Saved state or currently changing state.
4966 </result>
4967 <result name="VBOX_E_FILE_ERROR">
4968 Shared folder does not exists.
4969 </result>
4970 </desc>
4971 <param name="name" type="wstring" dir="in">
4972 <desc>Logical name of the shared folder to remove.</desc>
4973 </param>
4974 </method>
4975
4976 <method name="takeSnapshot">
4977 <desc>
4978 Saves the current execution state and all settings of the
4979 machine and creates differencing images for all
4980 normal (non-independent) hard disks.
4981
4982 This method can be called for a PoweredOff, Saved, Running or
4983 Paused virtual machine. When the machine is PoweredOff, an
4984 offline <link to="ISnapshot">snapshot</link> is created,
4985 in all other cases -- an online snapshot.
4986
4987 The taken snapshot is always based on the
4988 <link to="IMachine::currentSnapshot">current
4989 snapshot</link> of the associated virtual machine and becomes
4990 a new current snapshot.
4991
4992 <note>
4993 This method implicitly calls <link to="IMachine::saveSettings()"/> to
4994 save all current machine settings before taking an offline snapshot.
4995 </note>
4996
4997 <see>ISnapshot, <link to="#saveState"/></see>
4998 <result name="VBOX_E_INVALID_VM_STATE">
4999 Virtual machine currently changing state.
5000 </result>
5001 </desc>
5002 <param name="name" type="wstring" dir="in">
5003 <desc>Short name for the snapshot.</desc>
5004 </param>
5005 <param name="description" type="wstring" dir="in">
5006 <desc>Optional description of the snapshot.</desc>
5007 </param>
5008 <param name="progress" type="IProgress" dir="return">
5009 <desc>Progress object to track the operation completion.</desc>
5010 </param>
5011 </method>
5012
5013 <method name="discardSnapshot">
5014 <desc>
5015
5016 Starts discarding the specified snapshot. The execution state
5017 and settings of the associated machine stored in the snapshot
5018 will be deleted. The contents of all differencing hard disks of
5019 this snapshot will be merged with the contents of their
5020 dependent child hard disks to keep the, disks valid (in other
5021 words, all changes represented by hard disks being discarded
5022 will be propagated to their child hard disks). After that, this
5023 snapshot's differencing hard disks will be deleted. The parent
5024 of this snapshot will become a new parent for all its child
5025 snapshots.
5026
5027 If the discarded snapshot is the current one, its parent
5028 snapshot will become a new current snapshot. The current machine
5029 state is not directly affected in this case, except that
5030 currently attached differencing hard disks based on hard disks
5031 of the discarded snapshot will be also merged as described
5032 above.
5033
5034 If the discarded snapshot is the first one (the root snapshot)
5035 and it has exactly one child snapshot, this child snapshot will
5036 become the first snapshot after discarding. If there are no
5037 children at all (i.e. the first snapshot is the only snapshot of
5038 the machine), both the current and the first snapshot of the
5039 machine will be set to null. In all other cases, the first
5040 snapshot cannot be discarded.
5041
5042 You cannot discard the snapshot if it
5043 stores <link to="HardDiskType::Normal">normal</link> (non-differencing)
5044 hard disks that have differencing hard disks based on them. Snapshots of
5045 such kind can be discarded only when every normal hard disk has either
5046 no children at all or exactly one child. In the former case, the normal
5047 hard disk simply becomes unused (i.e. not attached to any VM). In the
5048 latter case, it receives all the changes stored in the child hard disk,
5049 and then it replaces the child hard disk in the configuration of the
5050 corresponding snapshot or machine.
5051
5052 Also, you cannot discard the snapshot if it stores hard disks
5053 (of any type) having differencing child hard disks that belong
5054 to other machines. Such snapshots can be only discarded after
5055 you discard all snapshots of other machines containing "foreign"
5056 child disks, or detach these "foreign" child disks from machines
5057 they are attached to.
5058
5059 One particular example of the snapshot storing normal hard disks
5060 is the first snapshot of a virtual machine that had normal hard
5061 disks attached when taking the snapshot. Be careful when
5062 discarding such snapshots because this implicitly commits
5063 changes (made since the snapshot being discarded has been taken)
5064 to normal hard disks (as described above), which may be not what
5065 you want.
5066
5067 The virtual machine is put to
5068 the <link to="MachineState::Discarding">Discarding</link> state until
5069 the discard operation is completed.
5070
5071 <note>
5072 The machine must not be running, otherwise the operation
5073 will fail.
5074 </note>
5075
5076 <note>
5077 Child hard disks of all normal hard disks of the discarded snapshot
5078 must be accessible (see <link to="IMedium::state"/>) for this
5079 operation to succeed. In particular, this means that all virtual
5080 machines, whose hard disks are directly or indirectly based on the
5081 hard disks of discarded snapshot, must be powered off.
5082 </note>
5083 <note>
5084 Merging hard disk contents can be very time and disk space
5085 consuming, if these disks are big in size and have many
5086 children. However, if the snapshot being discarded is the last
5087 (head) snapshot on the branch, the operation will be rather
5088 quick.
5089 </note>
5090 <note>
5091 Note that discarding the current snapshot
5092 will implicitly call <link to="IMachine::saveSettings()"/> to
5093 make all current machine settings permanent.
5094 </note>
5095 <result name="VBOX_E_INVALID_VM_STATE">
5096 Virtual machine is running.
5097 </result>
5098 </desc>
5099 <param name="id" type="uuid" dir="in">
5100 <desc>UUID of the snapshot to discard.</desc>
5101 </param>
5102 <param name="progress" type="IProgress" dir="return">
5103 <desc>Progress object to track the operation completion.</desc>
5104 </param>
5105 </method>
5106
5107 <method name="discardCurrentState">
5108 <desc>
5109 This operation is similar to <link to="#discardSnapshot()"/> but
5110 affects the current machine state. This means that the state stored in
5111 the current snapshot will become a new current state, and all current
5112 settings of the machine and changes stored in differencing hard disks
5113 will be lost.
5114
5115 After this operation is successfully completed, new empty differencing
5116 hard disks are created for all normal hard disks of the machine.
5117
5118 If the current snapshot of the machine is an online snapshot, the
5119 machine will go to the <link to="MachineState::Saved"> saved
5120 state</link>, so that the next time it is powered on, the execution
5121 state will be restored from the current snapshot.
5122
5123 <note>
5124 The machine must not be running, otherwise the operation will fail.
5125 </note>
5126
5127 <note>
5128 If the machine state is <link to="MachineState::Saved">Saved</link>
5129 prior to this operation, the saved state file will be implicitly
5130 discarded (as if <link to="IConsole::discardSavedState()"/> were
5131 called).
5132 </note>
5133
5134 <result name="VBOX_E_INVALID_VM_STATE">
5135 Virtual machine is running.
5136 </result>
5137 </desc>
5138 <param name="progress" type="IProgress" dir="return">
5139 <desc>Progress object to track the operation completion.</desc>
5140 </param>
5141 </method>
5142
5143 <method name="discardCurrentSnapshotAndState">
5144 <desc>
5145
5146 This method is equivalent to
5147 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
5148 (currentSnapshot.id(), progress) followed by
5149 <link to="#discardCurrentState()"/>.
5150
5151 As a result, the machine will be fully restored from the
5152 snapshot preceding the current snapshot, while both the current
5153 snapshot and the current machine state will be discarded.
5154
5155 If the current snapshot is the first snapshot of the machine (i.e. it
5156 has the only snapshot), the current machine state will be
5157 discarded <b>before</b> discarding the snapshot. In other words, the
5158 machine will be restored from its last snapshot, before discarding
5159 it. This differs from performing a single
5160 <link to="#discardSnapshot()"/> call (note that no
5161 <link to="#discardCurrentState()"/> will be possible after it)
5162 to the effect that the latter will preserve the current state instead of
5163 discarding it.
5164
5165 Unless explicitly mentioned otherwise, all remarks and
5166 limitations of the above two methods also apply to this method.
5167
5168 <note>
5169 The machine must not be running, otherwise the operation
5170 will fail.
5171 </note>
5172
5173 <note>
5174 If the machine state is <link to="MachineState::Saved">Saved</link>
5175 prior to this operation, the saved state file will be implicitly
5176 discarded (as if <link to="#discardSavedState()"/> were
5177 called).
5178 </note>
5179
5180 <note>
5181 This method is more efficient than calling both of the above
5182 methods separately: it requires less IPC calls and provides
5183 a single progress object.
5184 </note>
5185
5186 <result name="VBOX_E_INVALID_VM_STATE">
5187 Virtual machine is running.
5188 </result>
5189 </desc>
5190 <param name="progress" type="IProgress" dir="return">
5191 <desc>Progress object to track the operation completion.</desc>
5192 </param>
5193 </method>
5194
5195 <method name="registerCallback">
5196 <desc>
5197 Registers a new console callback on this instance. The methods of the
5198 callback interface will be called by this instance when the appropriate
5199 event occurs.
5200 </desc>
5201 <param name="callback" type="IConsoleCallback" dir="in"/>
5202 </method>
5203
5204 <method name="unregisterCallback">
5205 <desc>
5206 Unregisters the console callback previously registered using
5207 <link to="#registerCallback"/>.
5208 <result name="E_INVALIDARG">
5209 Given @a callback handler is not registered.
5210 </result>
5211 </desc>
5212 <param name="callback" type="IConsoleCallback" dir="in"/>
5213 </method>
5214 </interface>
5215
5216 <!--
5217 // IHost
5218 /////////////////////////////////////////////////////////////////////////
5219 -->
5220
5221 <interface
5222 name="IHostDVDDrive" extends="$unknown"
5223 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
5224 wsmap="managed"
5225 >
5226 <desc>
5227 The IHostDVDDrive interface represents the physical CD/DVD drive
5228 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
5229 </desc>
5230
5231 <attribute name="name" type="wstring" readonly="yes">
5232 <desc>
5233 Returns the platform-specific device identifier.
5234 On DOS-like platforms, it is a drive name (e.g. R:).
5235 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
5236 </desc>
5237 </attribute>
5238 <attribute name="description" type="wstring" readonly="yes">
5239 <desc>
5240 Returns a human readable description for the drive. This
5241 description usually contains the product and vendor name. A
5242 @c null string is returned if the description is not available.
5243 </desc>
5244 </attribute>
5245 <attribute name="udi" type="wstring" readonly="yes">
5246 <desc>
5247 Returns the unique device identifier for the drive. This
5248 attribute is reserved for future use instead of
5249 <link to="#name"/>. Currently it is not used and may return
5250 @c null on some platforms.
5251 </desc>
5252 </attribute>
5253
5254 </interface>
5255
5256 <enumerator
5257 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
5258 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
5259 />
5260
5261 <collection
5262 name="IHostDVDDriveCollection" type="IHostDVDDrive"
5263 enumerator="IHostDVDDriveEnumerator"
5264 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
5265 readonly="yes"
5266 >
5267 <method name="findByName">
5268 <desc>
5269 Searches this collection for a host drive with the given name.
5270 <note>
5271 The method returns an error if the given name does not
5272 correspond to any host drive in the collection.
5273 </note>
5274 </desc>
5275 <param name="name" type="wstring" dir="in">
5276 <desc>Name of the host drive to search for</desc>
5277 </param>
5278 <param name="drive" type="IHostDVDDrive" dir="return">
5279 <desc>Found host drive object</desc>
5280 </param>
5281 </method>
5282 </collection>
5283
5284 <interface
5285 name="IHostFloppyDrive" extends="$unknown"
5286 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
5287 wsmap="managed"
5288 >
5289 <desc>
5290 The IHostFloppyDrive interface represents the physical floppy drive
5291 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
5292 </desc>
5293 <attribute name="name" type="wstring" readonly="yes">
5294 <desc>
5295 Returns the platform-specific device identifier.
5296 On DOS-like platforms, it is a drive name (e.g. A:).
5297 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
5298 </desc>
5299 </attribute>
5300 <attribute name="description" type="wstring" readonly="yes">
5301 <desc>
5302 Returns a human readable description for the drive. This
5303 description usually contains the product and vendor name. A
5304 @c null string is returned if the description is not available.
5305 </desc>
5306 </attribute>
5307 <attribute name="udi" type="wstring" readonly="yes">
5308 <desc>
5309 Returns the unique device identifier for the drive. This
5310 attribute is reserved for future use instead of
5311 <link to="#name"/>. Currently it is not used and may return
5312 @c null on some platforms.
5313 </desc>
5314 </attribute>
5315 </interface>
5316
5317 <enumerator
5318 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
5319 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
5320 />
5321
5322 <collection
5323 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
5324 enumerator="IHostFloppyDriveEnumerator"
5325 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
5326 readonly="yes"
5327 >
5328 <method name="findByName">
5329 <desc>
5330 Searches this collection for a host drive with the given name.
5331 <note>
5332 The method returns an error if the given name does not
5333 correspond to any host drive in the collection.
5334 </note>
5335 </desc>
5336 <param name="name" type="wstring" dir="in">
5337 <desc>Name of the host drive to search for</desc>
5338 </param>
5339 <param name="drive" type="IHostFloppyDrive" dir="return">
5340 <desc>Found host drive object</desc>
5341 </param>
5342 </method>
5343 </collection>
5344
5345 <interface
5346 name="IHostNetworkInterface" extends="$unknown"
5347 uuid="F4512D7C-B074-4e97-99B8-6D2BD27C3F5A"
5348 wsmap="managed"
5349 >
5350 <attribute name="name" type="wstring" readonly="yes">
5351 <desc>Returns the host network interface name.</desc>
5352 </attribute>
5353
5354 <attribute name="id" type="uuid" readonly="yes">
5355 <desc>Returns the interface UUID.</desc>
5356 </attribute>
5357 </interface>
5358
5359 <enumerator
5360 name="IHostNetworkInterfaceEnumerator" type="IHostNetworkInterface"
5361 uuid="7B52FEF7-56E8-4aec-92F5-15E6D11EC630"
5362 />
5363
5364 <collection
5365 name="IHostNetworkInterfaceCollection" type="IHostNetworkInterface"
5366 enumerator="IHostNetworkInterfaceEnumerator"
5367 uuid="BF1D41F2-B97B-4314-A0FB-D4823AF42FB5"
5368 readonly="yes"
5369 >
5370 <method name="findByName">
5371 <desc>
5372 Searches this collection for a host network interface with the given name.
5373 <note>
5374 The method returns an error if the given name does not
5375 correspond to any host network interface in the collection.
5376 </note>
5377 </desc>
5378 <param name="name" type="wstring" dir="in">
5379 <desc>Name of the host network interface to search for.</desc>
5380 </param>
5381 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5382 <desc>Found host network interface object.</desc>
5383 </param>
5384 </method>
5385 <method name="findById">
5386 <desc>
5387 Searches this collection for a host network interface with the given GUID.
5388 <note>
5389 The method returns an error if the given GUID does not
5390 correspond to any host network interface in the collection.
5391 </note>
5392 </desc>
5393 <param name="id" type="uuid" dir="in">
5394 <desc>GUID of the host network interface to search for.</desc>
5395 </param>
5396 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5397 <desc>Found host network interface object.</desc>
5398 </param>
5399 </method>
5400 </collection>
5401
5402 <interface
5403 name="IHost" extends="$unknown"
5404 uuid="4be2e85f-a54c-4bc7-8bf6-f070f9113940"
5405 wsmap="managed"
5406 >
5407 <desc>
5408 The IHost interface represents the physical machine that this VirtualBox
5409 installation runs on.
5410
5411 An object implementing this interface is returned by the
5412 <link to="IVirtualBox::host" /> attribute. This interface contains
5413 read-only information about the host's physical hardware (such as what
5414 processors, and disks are available, what the host operating system is,
5415 and so on) and also allows for manipulating some of the host's hardware,
5416 such as global USB device filters and host interface networking.
5417
5418 </desc>
5419 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
5420 <desc>List of DVD drives available on the host.</desc>
5421 </attribute>
5422
5423 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
5424 <desc>List of floppy drives available on the host.</desc>
5425 </attribute>
5426
5427 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5428 <desc>
5429 List of USB devices currently attached to the host.
5430 Once a new device is physically attached to the host computer,
5431 it appears in this list and remains there until detached.
5432
5433 <note>
5434 This method may set a @ref com_warnings "warning result code".
5435 </note>
5436 <note>
5437 If USB functionality is not available in the given edition of
5438 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5439 </note>
5440 </desc>
5441 </attribute>
5442
5443 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
5444 <desc>
5445 List of USB device filters in action.
5446 When a new device is physically attached to the host computer,
5447 filters from this list are applied to it (in order they are stored
5448 in the list). The first matched filter will determine the
5449 <link to="IHostUSBDeviceFilter::action">action</link>
5450 performed on the device.
5451
5452 Unless the device is ignored by these filters, filters of all
5453 currently running virtual machines
5454 (<link to="IUSBController::deviceFilters"/>) are applied to it.
5455
5456 <note>
5457 This method may set a @ref com_warnings "warning result code".
5458 </note>
5459 <note>
5460 If USB functionality is not available in the given edition of
5461 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5462 </note>
5463
5464 <see>IHostUSBDeviceFilter, USBDeviceState</see>
5465 </desc>
5466 </attribute>
5467
5468 <attribute name="networkInterfaces" type="IHostNetworkInterfaceCollection" readonly="yes">
5469 <desc>List of host network interfaces currently defined on the host.</desc>
5470 </attribute>
5471
5472 <attribute name="processorCount" type="unsigned long" readonly="yes">
5473 <desc>Number of (logical) CPUs installed in the host system.</desc>
5474 </attribute>
5475
5476 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
5477 <desc>Number of (logical) CPUs online in the host system.</desc>
5478 </attribute>
5479
5480 <method name="getProcessorSpeed">
5481 <desc>Query the (approximate) maximum speed of a specified host CPU in Megahertz.</desc>
5482 <param name="cpuId" type="unsigned long" dir="in">
5483 <desc>
5484 Identifier of the CPU.
5485 </desc>
5486 </param>
5487 <param name="speed" type="unsigned long" dir="return">
5488 <desc>
5489 Speed value. 0 is returned if value is not known or @a cpuId is
5490 invalid.
5491 </desc>
5492 </param>
5493 </method>
5494
5495 <method name="getProcessorFeature">
5496 <desc>Query whether a CPU feature is supported or not.</desc>
5497 <param name="feature" type="ProcessorFeature" dir="in">
5498 <desc>
5499 CPU Feature identifier.
5500 </desc>
5501 </param>
5502 <param name="supported" type="boolean" dir="return">
5503 <desc>
5504 Feature is supported or not.
5505 </desc>
5506 </param>
5507 </method>
5508
5509 <method name="getProcessorDescription">
5510 <desc>Query the model string of a specified host CPU.</desc>
5511 <param name="cpuId" type="unsigned long" dir="in">
5512 <desc>
5513 Identifier of the CPU.
5514 </desc>
5515 </param>
5516 <param name="description" type="wstring" dir="return">
5517 <desc>
5518 Model string. A NULL string is returned if value is not known or
5519 @a cpuId is invalid.
5520 </desc>
5521 </param>
5522 </method>
5523
5524 <attribute name="memorySize" type="unsigned long" readonly="yes">
5525 <desc>Amount of system memory in megabytes installed in the host system.</desc>
5526 </attribute>
5527
5528 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
5529 <desc>Available system memory in the host system.</desc>
5530 </attribute>
5531
5532 <attribute name="operatingSystem" type="wstring" readonly="yes">
5533 <desc>Name of the host system's operating system.</desc>
5534 </attribute>
5535
5536 <attribute name="OSVersion" type="wstring" readonly="yes">
5537 <desc>Host operating system's version string.</desc>
5538 </attribute>
5539
5540 <attribute name="UTCTime" type="long long" readonly="yes">
5541 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
5542 </attribute>
5543
5544<if target="midl">
5545 <method name="createHostNetworkInterface">
5546 <desc>
5547 Creates a new adapter for Host Interface Networking.
5548 </desc>
5549 <param name="name" type="wstring" dir="in">
5550 <desc>
5551 Adapter name.
5552 </desc>
5553 </param>
5554 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5555 <desc>
5556 Created host interface object.
5557 </desc>
5558 </param>
5559 <param name="progress" type="IProgress" dir="return">
5560 <desc>
5561 Progress object to track the operation completion.
5562 </desc>
5563 </param>
5564 </method>
5565 <method name="removeHostNetworkInterface">
5566 <desc>
5567 Removes the given host network interface.
5568 </desc>
5569 <param name="id" type="uuid" dir="in">
5570 <desc>
5571 Adapter GUID.
5572 </desc>
5573 </param>
5574 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5575 <desc>
5576 Removed host interface object.
5577 </desc>
5578 </param>
5579 <param name="progress" type="IProgress" dir="return">
5580 <desc>
5581 Progress object to track the operation completion.
5582 </desc>
5583 </param>
5584 </method>
5585</if>
5586
5587 <method name="createUSBDeviceFilter">
5588 <desc>
5589 Creates a new USB device filter. All attributes except
5590 the filter name are set to <tt>null</tt> (any match),
5591 <i>active</i> is <tt>false</tt> (the filter is not active).
5592
5593 The created filter can be added to the list of filters using
5594 <link to="#insertUSBDeviceFilter()"/>.
5595
5596 <see>#USBDeviceFilters</see>
5597 </desc>
5598 <param name="name" type="wstring" dir="in">
5599 <desc>
5600 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
5601 for more info.
5602 </desc>
5603 </param>
5604 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5605 <desc>Created filter object.</desc>
5606 </param>
5607 </method>
5608
5609 <method name="insertUSBDeviceFilter">
5610 <desc>
5611 Inserts the given USB device to the specified position
5612 in the list of filters.
5613
5614 Positions are numbered starting from <tt>0</tt>. If the specified
5615 position is equal to or greater than the number of elements in
5616 the list, the filter is added to the end of the collection.
5617
5618 <note>
5619 Duplicates are not allowed, so an attempt to insert a
5620 filter that is already in the list, will return an
5621 error.
5622 </note>
5623 <note>
5624 This method may set a @ref com_warnings "warning result code".
5625 </note>
5626 <note>
5627 If USB functionality is not available in the given edition of
5628 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5629 </note>
5630
5631 <see>#USBDeviceFilters</see>
5632 </desc>
5633 <param name="position" type="unsigned long" dir="in">
5634 <desc>Position to insert the filter to.</desc>
5635 </param>
5636 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
5637 <desc>USB device filter to insert.</desc>
5638 </param>
5639 </method>
5640
5641 <method name="removeUSBDeviceFilter">
5642 <desc>
5643 Removes a USB device filter from the specified position in the
5644 list of filters.
5645
5646 Positions are numbered starting from <tt>0</tt>. Specifying a
5647 position equal to or greater than the number of elements in
5648 the list will produce an error.
5649
5650 <note>
5651 This method may set a @ref com_warnings "warning result code".
5652 </note>
5653 <note>
5654 If USB functionality is not available in the given edition of
5655 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5656 </note>
5657
5658 <see>#USBDeviceFilters</see>
5659 </desc>
5660 <param name="position" type="unsigned long" dir="in">
5661 <desc>Position to remove the filter from.</desc>
5662 </param>
5663 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5664 <desc>Removed USB device filter.</desc>
5665 </param>
5666 </method>
5667
5668 </interface>
5669
5670 <!--
5671 // ISystemProperties
5672 /////////////////////////////////////////////////////////////////////////
5673 -->
5674
5675 <interface
5676 name="ISystemProperties"
5677 extends="$unknown"
5678 uuid="604afeba-5963-4d12-a577-902ffb96352a"
5679 wsmap="managed"
5680 >
5681 <desc>
5682 The ISystemProperties interface represents global properties of the given
5683 VirtualBox installation.
5684
5685 These properties define limits and default values for various attributes
5686 and parameters. Most of the properties are read-only, but some can be
5687 changed by a user.
5688 </desc>
5689
5690 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
5691 <desc>Minimum guest system memory in Megabytes.</desc>
5692 </attribute>
5693
5694 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
5695 <desc>Maximum guest system memory in Megabytes.</desc>
5696 </attribute>
5697
5698 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
5699 <desc>Minimum guest video memory in Megabytes.</desc>
5700 </attribute>
5701
5702 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
5703 <desc>Maximum guest video memory in Megabytes.</desc>
5704 </attribute>
5705
5706 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
5707 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
5708 </attribute>
5709
5710 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
5711 <desc>
5712 Number of network adapters associated with every
5713 <link to="IMachine"/> instance.
5714 </desc>
5715 </attribute>
5716
5717 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
5718 <desc>
5719 Number of serial ports associated with every
5720 <link to="IMachine"/> instance.
5721 </desc>
5722 </attribute>
5723
5724 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
5725 <desc>
5726 Number of parallel ports associated with every
5727 <link to="IMachine"/> instance.
5728 </desc>
5729 </attribute>
5730
5731 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
5732 <desc>
5733 Maximum device position in the boot order. This value corresponds
5734 to the total number of devices a machine can boot from, to make it
5735 possible to include all possible devices to the boot list.
5736 <see><link to="IMachine::setBootOrder()"/></see>
5737 </desc>
5738 </attribute>
5739
5740 <attribute name="defaultMachineFolder" type="wstring">
5741 <desc>
5742 Full path to the default directory used to create new or open
5743 existing machines when a settings file name contains no
5744 path.
5745
5746 The initial value of this property is
5747 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
5748 VirtualBox_home</link><tt>&gt;/Machines</tt>.
5749
5750 <note>
5751 Setting this property to <tt>null</tt> will restore the
5752 initial value.
5753 </note>
5754 <note>
5755 When settings this property, the specified path can be
5756 absolute (full path) or relative
5757 to the <link to="IVirtualBox::homeFolder">
5758 VirtualBox home directory</link>.
5759 When reading this property, a full path is
5760 always returned.
5761 </note>
5762 <note>
5763 The specified path may not exist, it will be created
5764 when necessary.
5765 </note>
5766
5767 <see>
5768 <link to="IVirtualBox::createMachine()"/>,
5769 <link to="IVirtualBox::openMachine()"/>
5770 </see>
5771 </desc>
5772 </attribute>
5773
5774 <attribute name="defaultHardDiskFolder" type="wstring">
5775 <desc>
5776 Full path to the default directory used to create new or open existing
5777 virtual disks.
5778
5779 This path is used when the storage unit of a hard disk is a regular file
5780 in the host's file system and only a file name that contains no path is
5781 given.
5782
5783 The initial value of this property is
5784 <tt>&lt;</tt>
5785 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
5786 <tt>&gt;/HardDisks</tt>.
5787
5788 <note>
5789 Setting this property to <tt>null</tt> will restore the
5790 initial value.
5791 </note>
5792 <note>
5793 When settings this property, the specified path can be relative
5794 to the
5795 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
5796 absolute. When reading this property, a full path is
5797 always returned.
5798 </note>
5799 <note>
5800 The specified path may not exist, it will be created
5801 when necessary.
5802 </note>
5803
5804 <see>
5805 IHardDisk2,
5806 <link to="IVirtualBox::createHardDisk2()"/>,
5807 <link to="IVirtualBox::openHardDisk2()"/>,
5808 <link to="IMedium::location"/>
5809 </see>
5810 </desc>
5811 </attribute>
5812
5813 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
5814 <desc>
5815 List of all hard disk storage formats supported by this VirtualBox
5816 installation.
5817
5818 Note that the virtual hard disk framework is backend-based, therefore
5819 the list of supported formats depends on what backends are currently
5820 installed.
5821
5822 <see>
5823 <link to="IHardDiskFormat"/>,
5824 </see>
5825 </desc>
5826 </attribute>
5827
5828 <attribute name="defaultHardDiskFormat" type="wstring">
5829 <desc>
5830 Identifier of the default hard disk format used by VirtualBox.
5831
5832 The hard disk format set by this attribute is used by VirtualBox
5833 when the hard disk format was not specified explicitly. One example is
5834 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
5835 format argument. A more complex example is implicit creation of
5836 differencing hard disks when taking a snapshot of a virtual machine:
5837 this operation will try to use a format of the parent hard disk first
5838 and if this format does not support differencing hard disks the default
5839 format specified by this argument will be used.
5840
5841 The list of supported hard disk formats may be obtained by the
5842 <link to="#defaultHardDiskFormats"/> call. Note that the default
5843 hard disk format must have a capability to create differencing hard
5844 disks; otherwise opeartions that create hard disks implicitly may fail
5845 unexpectedly.
5846
5847 The initial value of this property is <tt>VDI</tt> in the current
5848 version of the VirtualBox product, but may change in the future.
5849
5850 <note>
5851 Setting this property to <tt>null</tt> will restore the
5852 initial value.
5853 </note>
5854
5855 <see>
5856 <link to="#hardDiskFormats"/>,
5857 <link to="IHardDiskFormat:id"/>,
5858 <link to="IVirtualBox::createHardDisk2()"/>
5859 </see>
5860 </desc>
5861 </attribute>
5862
5863 <attribute name="remoteDisplayAuthLibrary" type="wstring">
5864 <desc>
5865 Library that provides authentication for VRDP clients. The library
5866 is used if a virtual machine's authentication type is set to "external"
5867 in the VM RemoteDisplay configuration.
5868
5869 The system library extension (".DLL" or ".so") must be omitted.
5870 A full path can be specified; if not, then the library must reside on the
5871 system's default library path.
5872
5873 The default value of this property is <tt>VRDPAuth</tt>. There is a library
5874 of that name in one of the default VirtualBox library directories.
5875
5876 For details about VirtualBox authentication libraries and how to implement
5877 them, please refer to the VirtualBox manual.
5878
5879 <note>
5880 Setting this property to <tt>null</tt> will restore the
5881 initial value.
5882 </note>
5883 </desc>
5884 </attribute>
5885
5886 <attribute name="webServiceAuthLibrary" type="wstring">
5887 <desc>
5888 Library that provides authentication for webservice clients. The library
5889 is used if a virtual machine's authentication type is set to "external"
5890 in the VM RemoteDisplay configuration and will be called from
5891 within the <link to="IWebsessionManager::logon" /> implementation.
5892
5893 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
5894 there is no per-VM setting for this, as the webservice is a global
5895 resource (if it is running). Only for this setting (for the webservice),
5896 setting this value to a literal "null" string disables authentication,
5897 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
5898 no matter what user name and password are supplied.
5899
5900 The initial value of this property is <tt>VRDPAuth</tt>,
5901 meaning that the webservice will use the same authentication
5902 library that is used by default for VBoxVRDP (again, see
5903 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
5904 The format and calling convention of authentication libraries
5905 is the same for the webservice as it is for VBoxVRDP.
5906
5907 </desc>
5908 </attribute>
5909
5910 <attribute name="HWVirtExEnabled" type="boolean">
5911 <desc>
5912 This specifies the default value for hardware virtualization
5913 extensions. If enabled, virtual machines will make use of
5914 hardware virtualization extensions such as Intel VT-x and
5915 AMD-V by default. This value can be overridden by each VM
5916 using their <link to="IMachine::HWVirtExEnabled" /> property.
5917 </desc>
5918 </attribute>
5919
5920 <attribute name="LogHistoryCount" type="unsigned long">
5921 <desc>
5922 This value specifies how many old release log files are kept.
5923 </desc>
5924 </attribute>
5925 </interface>
5926
5927 <!--
5928 // IGuest
5929 /////////////////////////////////////////////////////////////////////////
5930 -->
5931
5932 <interface
5933 name="IGuestOSType" extends="$unknown"
5934 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
5935 wsmap="struct"
5936 >
5937 <desc>
5938 </desc>
5939
5940 <attribute name="familyId" type="wstring" readonly="yes">
5941 <desc>Guest OS family identifier string.</desc>
5942 </attribute>
5943
5944 <attribute name="familyDescription" type="wstring" readonly="yes">
5945 <desc>Human readable description of the guest OS family.</desc>
5946 </attribute>
5947
5948 <attribute name="id" type="wstring" readonly="yes">
5949 <desc>Guest OS identifier string.</desc>
5950 </attribute>
5951
5952 <attribute name="description" type="wstring" readonly="yes">
5953 <desc>Human readable description of the guest OS.</desc>
5954 </attribute>
5955
5956 <attribute name="is64Bit" type="boolean" readonly="yes">
5957 <desc>Returns @c true if the given OS is 64-bit</desc>
5958 </attribute>
5959
5960 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
5961 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
5962 </attribute>
5963
5964 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
5965 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
5966 </attribute>
5967
5968 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
5969 <desc>Recommended RAM size in Megabytes.</desc>
5970 </attribute>
5971
5972 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
5973 <desc>Recommended video RAM size in Megabytes.</desc>
5974 </attribute>
5975
5976 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
5977 <desc>Recommended hard disk size in Megabytes.</desc>
5978 </attribute>
5979
5980 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
5981 <desc>Returns recommended network adapter for this OS type.</desc>
5982 </attribute>
5983 </interface>
5984
5985
5986 <enumerator
5987 name="IGuestOSTypeEnumerator" type="IGuestOSType"
5988 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
5989 />
5990
5991 <collection
5992 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
5993 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
5994 readonly="yes"
5995 />
5996
5997 <interface
5998 name="IGuest" extends="$unknown"
5999 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
6000
6001 wsmap="suppress"
6002 >
6003 <desc>
6004 The IGuest interface represents information about the operating system
6005 running inside the virtual machine. Used in
6006 <link to="IConsole::guest"/>.
6007
6008 IGuest provides information about the guest operating system, whether
6009 Guest Additions are installed and other OS-specific virtual machine
6010 properties.
6011 </desc>
6012
6013 <attribute name="OSTypeId" type="wstring" readonly="yes">
6014 <desc>
6015 Identifier of the Guest OS type as reported by the Guest
6016 Additions.
6017 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
6018 an IGuestOSType object representing details about the given
6019 Guest OS type.
6020 <note>
6021 If Guest Additions are not installed, this value will be
6022 the same as <link to="IMachine::OSTypeId"/>.
6023 </note>
6024 </desc>
6025 </attribute>
6026
6027 <attribute name="additionsActive" type="boolean" readonly="yes">
6028 <desc>
6029 Flag whether the Guest Additions are installed and active
6030 in which case their version will be returned by the
6031 <link to="#additionsVersion"/> property.
6032 </desc>
6033 </attribute>
6034
6035 <attribute name="additionsVersion" type="wstring" readonly="yes">
6036 <desc>
6037 Version of the Guest Additions (3 decimal numbers separated
6038 by dots) or empty when the Additions are not installed. The
6039 Additions may also report a version but yet not be active as
6040 the version might be refused by VirtualBox (incompatible) or
6041 other failures occurred.
6042 </desc>
6043 </attribute>
6044
6045 <attribute name="supportsSeamless" type="boolean" readonly="yes">
6046 <desc>
6047 Flag whether seamless guest display rendering (seamless desktop
6048 integration) is supported.
6049 </desc>
6050 </attribute>
6051
6052 <attribute name="supportsGraphics" type="boolean" readonly="yes">
6053 <desc>
6054 Flag whether the guest is in graphics mode. If it is not, then
6055 seamless rendering will not work, resize hints are not immediately
6056 acted on and guest display resizes are probably not initiated by
6057 the guest additions.
6058 </desc>
6059 </attribute>
6060
6061 <attribute name="memoryBalloonSize" type="unsigned long">
6062 <desc>Guest system memory balloon size in megabytes.</desc>
6063 </attribute>
6064
6065 <attribute name="statisticsUpdateInterval" type="unsigned long">
6066 <desc>Interval to update guest statistics in seconds.</desc>
6067 </attribute>
6068
6069 <method name="setCredentials">
6070 <desc>
6071 Store login credentials that can be queried by guest operating
6072 systems with Additions installed. The credentials are transient
6073 to the session and the guest may also choose to erase them. Note
6074 that the caller cannot determine whether the guest operating system
6075 has queried or made use of the credentials.
6076 </desc>
6077 <param name="userName" type="wstring" dir="in">
6078 <desc>User name string, can be empty</desc>
6079 </param>
6080 <param name="password" type="wstring" dir="in">
6081 <desc>Password string, can be empty</desc>
6082 </param>
6083 <param name="domain" type="wstring" dir="in">
6084 <desc>Domain name (guest logon scheme specific), can be empty</desc>
6085 </param>
6086 <param name="allowInteractiveLogon" type="boolean" dir="in">
6087 <desc>
6088 Flag whether the guest should alternatively allow the user to
6089 interactively specify different credentials. This flag might
6090 not be supported by all versions of the Additions.
6091 </desc>
6092 </param>
6093 </method>
6094
6095 <method name="getStatistic">
6096 <desc>
6097 Query specified guest statistics as reported by the VirtualBox Additions.
6098 </desc>
6099 <param name="cpuId" type="unsigned long" dir="in">
6100 <desc>Virtual CPU id; not relevant for all statistic types</desc>
6101 </param>
6102 <param name="statistic" type="GuestStatisticType" dir="in">
6103 <desc>Statistic type.</desc>
6104 </param>
6105 <param name="statVal" type="unsigned long" dir="out">
6106 <desc>Statistics value</desc>
6107 </param>
6108 </method>
6109
6110 </interface>
6111
6112
6113 <!--
6114 // IProgress
6115 /////////////////////////////////////////////////////////////////////////
6116 -->
6117
6118 <enumerator
6119 name="IProgressEnumerator" type="IProgress"
6120 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
6121 />
6122
6123 <collection
6124 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
6125 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
6126 readonly="yes"
6127 />
6128
6129 <interface
6130 name="IProgress" extends="$unknown"
6131 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
6132 wsmap="managed"
6133 >
6134 <desc>
6135 The IProgress interface represents a task progress object that allows
6136 to wait for the completion of some asynchronous task.
6137
6138 The task consists of one or more operations that run sequentially,
6139 one after one. There is an individual percent of completion of the
6140 current operation and the percent of completion of the task as a
6141 whole. Similarly, you can wait for the completion of a particular
6142 operation or for the completion of the whole task.
6143
6144 Every operation is identified by a number (starting from 0)
6145 and has a separate description.
6146 </desc>
6147
6148 <attribute name="id" type="uuid" readonly="yes">
6149 <desc>ID of the task.</desc>
6150 </attribute>
6151
6152 <attribute name="description" type="wstring" readonly="yes">
6153 <desc>Description of the task.</desc>
6154 </attribute>
6155
6156 <attribute name="initiator" type="$unknown" readonly="yes">
6157 <desc>Initiator of the task.</desc>
6158 </attribute>
6159
6160 <attribute name="cancelable" type="boolean" readonly="yes">
6161 <desc>Whether the task can be interrupted.</desc>
6162 </attribute>
6163
6164 <attribute name="percent" type="long" readonly="yes">
6165 <desc>
6166 Current task progress value in percent.
6167 This value depends on how many operations are already complete.
6168 </desc>
6169 </attribute>
6170
6171 <attribute name="completed" type="boolean" readonly="yes">
6172 <desc>Whether the task has been completed.</desc>
6173 </attribute>
6174
6175 <attribute name="canceled" type="boolean" readonly="yes">
6176 <desc>Whether the task has been canceled.</desc>
6177 </attribute>
6178
6179 <attribute name="resultCode" type="result" readonly="yes">
6180 <desc>
6181 Result code of the progress task.
6182 Valid only if <link to="#completed"/> is true.
6183 </desc>
6184 </attribute>
6185
6186 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
6187 <desc>
6188 Extended information about the unsuccessful result of the
6189 progress operation. May be NULL when no extended information
6190 is available.
6191 Valid only if <link to="#completed"/> is true and
6192 <link to="#resultCode"/> indicates a failure.
6193 </desc>
6194 </attribute>
6195
6196 <attribute name="operationCount" type="unsigned long" readonly="yes">
6197 <desc>
6198 Number of operations this task is divided into.
6199 Every task consists of at least one operation.
6200 </desc>
6201 </attribute>
6202
6203 <attribute name="operation" type="unsigned long" readonly="yes">
6204 <desc>Number of the operation being currently executed.</desc>
6205 </attribute>
6206
6207 <attribute name="operationDescription" type="wstring" readonly="yes">
6208 <desc>
6209 Description of the operation being currently executed.
6210 </desc>
6211 </attribute>
6212
6213 <attribute name="operationPercent" type="long" readonly="yes">
6214 <desc>Current operation progress value in percent.</desc>
6215 </attribute>
6216
6217 <method name="waitForCompletion">
6218 <desc>
6219 Waits until the task is done (including all operations) with a
6220 given timeout.
6221 </desc>
6222 <param name="timeout" type="long" dir="in">
6223 <desc>
6224 Timeout value in milliseconds.
6225 Specify -1 for an indefinite wait.
6226 </desc>
6227 </param>
6228 </method>
6229
6230 <method name="waitForOperationCompletion">
6231 <desc>
6232 Waits until the given operation is done with a given timeout.
6233 </desc>
6234 <param name="operation" type="unsigned long" dir="in">
6235 <desc>
6236 Number of the operation to wait for.
6237 Must be less than <link to="#operationCount"/>.
6238 </desc>
6239 </param>
6240 <param name="timeout" type="long" dir="in">
6241 <desc>
6242 Timeout value in milliseconds.
6243 Specify -1 for an indefinite wait.
6244 </desc>
6245 </param>
6246 </method>
6247
6248 <method name="cancel">
6249 <desc>
6250 Cancels the task.
6251 <note>
6252 If <link to="#cancelable"/> is <tt>false</tt>, then
6253 this method will fail.
6254 </note>
6255 </desc>
6256 </method>
6257
6258 </interface>
6259
6260
6261 <!--
6262 // ISnapshot
6263 /////////////////////////////////////////////////////////////////////////
6264 -->
6265
6266 <enumerator
6267 name="ISnapshotEnumerator" type="ISnapshot"
6268 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
6269 />
6270
6271 <collection
6272 name="ISnapshotCollection" type="ISnapshot"
6273 enumerator="ISnapshotEnumerator"
6274 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
6275 readonly="yes"
6276 />
6277
6278 <interface
6279 name="ISnapshot" extends="$unknown"
6280 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
6281 wsmap="managed"
6282 >
6283 <desc>
6284 The ISnapshot interface represents a snapshot of the virtual
6285 machine.
6286
6287 The <i>snapshot</i> stores all the information about a virtual
6288 machine necessary to bring it to exactly the same state as it was at
6289 the time of taking the snapshot. The snapshot includes:
6290
6291 <ul>
6292 <li>all settings of the virtual machine (i.e. its hardware
6293 configuration: RAM size, attached hard disks, etc.)
6294 </li>
6295 <li>the execution state of the virtual machine (memory contents,
6296 CPU state, etc.).
6297 </li>
6298 </ul>
6299
6300 Snapshots can be <i>offline</i> (taken when the VM is powered off)
6301 or <i>online</i> (taken when the VM is running). The execution
6302 state of the offline snapshot is called a <i>zero execution state</i>
6303 (it doesn't actually contain any information about memory contents
6304 or the CPU state, assuming that all hardware is just powered off).
6305
6306 <h3>Snapshot branches</h3>
6307
6308 Snapshots can be chained. Chained snapshots form a branch where
6309 every next snapshot is based on the previous one. This chaining is
6310 mostly related to hard disk branching (see <link to="IHardDisk2"/>
6311 description). This means that every time a new snapshot is created,
6312 a new differencing hard disk is implicitly created for all normal
6313 hard disks attached to the given virtual machine. This allows to
6314 fully restore hard disk contents when the machine is later reverted
6315 to a particular snapshot.
6316
6317 In the current implementation, multiple snapshot branches within one
6318 virtual machine are not allowed. Every machine has a single branch,
6319 and <link to="IConsole::takeSnapshot()"/> operation adds a new
6320 snapshot to the top of that branch.
6321
6322 Existing snapshots can be discarded using
6323 <link to="IConsole::discardSnapshot()"/>.
6324
6325 <h3>Current snapshot</h3>
6326
6327 Every virtual machine has a current snapshot, identified by
6328 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
6329 a base for the <i>current machine state</i> (see below), to the effect
6330 that all normal hard disks of the machine and its execution
6331 state are based on this snapshot.
6332
6333 In the current implementation, the current snapshot is always the
6334 last taken snapshot (i.e. the head snapshot on the branch) and it
6335 cannot be changed.
6336
6337 The current snapshot is <tt>null</tt> if the machine doesn't have
6338 snapshots at all; in this case the current machine state is just
6339 current settings of this machine plus its current execution state.
6340
6341 <h3>Current machine state</h3>
6342
6343 The current machine state is what represented by IMachine instances got
6344 directly from IVirtualBox
6345 using <link
6346 to="IVirtualBox::getMachine()">getMachine()</link>, <link
6347 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
6348 to instances returned by <link to="ISnapshot::machine"/>). This state
6349 is always used when the machine is <link to="IConsole::powerUp"> powered
6350 on</link>.
6351
6352 The current machine state also includes the current execution state.
6353 If the machine is being currently executed
6354 (<link to="IMachine::state"/> is <link to="MachineState::Running"/>
6355 and above), its execution state is just what's happening now.
6356 If it is powered off (<link to="MachineState::PoweredOff"/> or
6357 <link to="MachineState::Aborted"/>), it has a zero execution state.
6358 If the machine is saved (<link to="MachineState::Saved"/>), its
6359 execution state is what saved in the execution state file
6360 (<link to="IMachine::stateFilePath"/>).
6361
6362 If the machine is in the saved state, then, next time it is powered
6363 on, its execution state will be fully restored from the saved state
6364 file and the execution will continue from the point where the state
6365 was saved.
6366
6367 Similarly to snapshots, the current machine state can be discarded
6368 using <link to="IConsole::discardCurrentState()"/>.
6369
6370 <h3>Taking and discarding snapshots</h3>
6371
6372 The table below briefly explains the meaning of every snapshot
6373 operation:
6374
6375 <table>
6376 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
6377
6378 <tr><td><link to="IConsole::takeSnapshot()"/></td>
6379
6380 <td>Save the current state of the virtual machine, including all
6381 settings, contents of normal hard disks and the current modifications
6382 to immutable hard disks (for online snapshots)</td>
6383
6384 <td>The current state is not changed (the machine will continue
6385 execution if it is being executed when the snapshot is
6386 taken)</td></tr>
6387
6388 <tr><td><link to="IConsole::discardSnapshot()"/></td>
6389
6390 <td>Forget the state of the virtual machine stored in the snapshot:
6391 dismiss all saved settings and delete the saved execution state (for
6392 online snapshots)</td>
6393
6394 <td>Other snapshots (including child snapshots, if any) and the
6395 current state are not directly affected</td></tr>
6396
6397 <tr><td><link to="IConsole::discardCurrentState()"/></td>
6398
6399 <td>Restore the current state of the virtual machine from the state
6400 stored in the current snapshot, including all settings and hard disk
6401 contents</td>
6402
6403 <td>The current state of the machine existed prior to this operation
6404 is lost</td></tr>
6405
6406 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
6407
6408 <td>Completely revert the virtual machine to the state it was in
6409 before the current snapshot has been taken</td>
6410
6411 <td>The current state, as well as the current snapshot, are
6412 lost</td></tr>
6413
6414 </table>
6415
6416 </desc>
6417
6418 <attribute name="id" type="uuid" readonly="yes">
6419 <desc>UUID of the snapshot.</desc>
6420 </attribute>
6421
6422 <attribute name="name" type="wstring">
6423 <desc>Short name of the snapshot.</desc>
6424 </attribute>
6425
6426 <attribute name="description" type="wstring">
6427 <desc>Optional description of the snapshot.</desc>
6428 </attribute>
6429
6430 <attribute name="timeStamp" type="long long" readonly="yes">
6431 <desc>
6432 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
6433 </desc>
6434 </attribute>
6435
6436 <attribute name="online" type="boolean" readonly="yes">
6437 <desc>
6438 <tt>true</tt> if this snapshot is an online snapshot and
6439 <tt>false</tt> otherwise.
6440
6441 <note>
6442 When this attribute is <tt>true</tt>, the
6443 <link to="IMachine::stateFilePath"/> attribute of the
6444 <link to="#machine"/> object associated with this snapshot
6445 will point to the saved state file. Otherwise, it will be
6446 <tt>null</tt>.
6447 </note>
6448 </desc>
6449 </attribute>
6450
6451 <attribute name="machine" type="IMachine" readonly="yes">
6452 <desc>
6453 Virtual machine this snapshot is taken on. This object
6454 stores all settings the machine had when taking this snapshot.
6455 <note>
6456 The returned machine object is immutable, i.e. no
6457 any settings can be changed.
6458 </note>
6459 </desc>
6460 </attribute>
6461
6462 <attribute name="parent" type="ISnapshot" readonly="yes">
6463 <desc>
6464 Parent snapshot (a snapshot this one is based on).
6465 <note>
6466 It's not an error to read this attribute on a snapshot
6467 that doesn't have a parent -- a null object will be
6468 returned to indicate this.
6469 </note>
6470 </desc>
6471 </attribute>
6472
6473 <attribute name="children" type="ISnapshotCollection" readonly="yes">
6474 <desc>
6475 Child snapshots (all snapshots having this one as a parent).
6476 <note>
6477 In the current implementation, there can be only one
6478 child snapshot, or no children at all, meaning this is the
6479 last (head) snapshot.
6480 </note>
6481 </desc>
6482 </attribute>
6483
6484 </interface>
6485
6486
6487 <!--
6488 // IMedia
6489 /////////////////////////////////////////////////////////////////////////
6490 -->
6491
6492 <enum
6493 name="MediaState"
6494 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
6495 >
6496 <desc>
6497 Virtual media state.
6498 <see>IMedia</see>
6499 </desc>
6500
6501 <const name="NotCreated" value="0">
6502 <desc>
6503 Associated media storage does not exist (either was not created yet or
6504 was deleted).
6505 </desc>
6506 </const>
6507 <const name="Created" value="1">
6508 <desc>
6509 Associated storage exists and accessible.
6510 </desc>
6511 </const>
6512 <const name="LockedRead" value="2">
6513 <desc>
6514 Media is locked for reading, no data modification is possible.
6515 </desc>
6516 </const>
6517 <const name="LockedWrite" value="3">
6518 <desc>
6519 Media is locked for writing, no concurrent data reading or modification
6520 is possible.
6521 </desc>
6522 </const>
6523 <const name="Inaccessible" value="4">
6524 <desc>
6525 Associated media storage is not accessible.
6526 </desc>
6527 </const>
6528 <const name="Creating" value="5">
6529 <desc>
6530 Associated media storage is being created.
6531 </desc>
6532 </const>
6533 <const name="Deleting" value="6">
6534 <desc>
6535 Associated media storage is being deleted.
6536 </desc>
6537 </const>
6538 </enum>
6539
6540 <interface
6541 name="IMedium" extends="$unknown"
6542 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
6543 wsmap="managed"
6544 >
6545 <desc>
6546 The IMedium interface is a common interface for all objects representing
6547 virtual media such as hard disks, DVD images.
6548
6549 Each medium is associated with a storage unit (such as a file on the host
6550 computer or a network resource) that holds actual data. The location of
6551 the storage unit is represented by the #location attribute. The value of
6552 this attribute is media type dependent.
6553
6554 The exact media type may be determined by querying the appropriate
6555 interface such as:
6556 <ul>
6557 <li>IHardDisk2 (virtual hard disks)</li>
6558 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
6559 <li>IFloppyImage2 (raw floppy image files)</li>
6560 </ul>
6561
6562 Existing media are opened using the following methods, depending on the
6563 media type:
6564 <ul>
6565 <li><link to="IVirtualBox::openHardDisk2()"/></li>
6566 <li><link to="IVirtualBox::openDVDImage()"/></li>
6567 <li><link to="IVirtualBox::openFloppyImage()"/></li>
6568 </ul>
6569
6570 New hard disk media are created using the
6571 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
6572 images are created outside VirtualBox, usually by storing a copy
6573 of the real medium of the corresponding type in a regular file.
6574
6575 <h3>Known Media</h3>
6576
6577 When an existing medium gets opened for the first time, it gets
6578 automatically remembered by the given VirtualBox installation or, in other
6579 words, becomes a <i>known medium</i>. Known media are stored in the media
6580 registry transparently maintained by VirtualBox and stored in settings
6581 files so that this registry is preserved when VirtualBox is not running.
6582
6583 Newly created virtual hard disks get remembered only when the associated
6584 storage unit is actually created (see IHardDisk2 for more details).
6585
6586 All known media can be enumerated using
6587 <link to="IVirtualBox::hardDisks2"/>,
6588 <link to="IVirtualBox::DVDImages"/> and
6589 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
6590 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
6591 and similar methods or by location using
6592 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
6593
6594 Only known media can be attached to virtual machines.
6595
6596 Removing known media from the media registry is performed when the given
6597 medium is closed using the <link to="#close()"/> method or when its
6598 associated storage unit is deleted (only for hard disks).
6599
6600 <h3>Accessibility Checks</h3>
6601
6602 The given medium (with the created storage unit) is considered to be
6603 <i>accessible</i> when its storage unit can be successfully read from.
6604 Accessible media are indicated by the <link to="MediaState::Created"/>
6605 value of the <link to="#state"/> attribute. When the storage unit cannot
6606 be read (for example, because it is located on a disconnected network
6607 resource, or was accidentally deleted outside VirtualBox), the medium is
6608 considered to be <i>inaccessible</i> which is indicated by the
6609 <link to="MediaState::Inaccessible"/> state. The details about the reason
6610 of being inaccessible can be obtained using the
6611 <link to="#lastAccessError"/> attribute.
6612
6613 A new accessibility check is performed each time the <link to="#state"/>
6614 attribute is read. Please note that this check may take long time (several
6615 seconds or even minutes, depending on the storage unit location and
6616 format), and will block the calling thread until finished. For this
6617 reason, it is recommended to never read this attribute on the main UI
6618 thread to avoid making the UI unresponsive.
6619
6620 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
6621 created for the first time), all known media are in the
6622 <link to="MediaState::Inaccessible"/> state but the value of the <link
6623 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
6624 accessibility check is made on startup. This is done to make the
6625 VirtualBox object ready for serving requests as
6626 fast as possible and let the end-user application decide if it needs to
6627 check media accessibility right away or not.
6628 </desc>
6629
6630 <attribute name="id" type="uuid" readonly="yes">
6631 <desc>
6632 UUID of the medium. For a newly created medium, this value is a randomly
6633 generated UUID.
6634 </desc>
6635 </attribute>
6636
6637 <attribute name="description" type="wstring">
6638 <desc>
6639 Optional description of the medium. For newly created media, the value
6640 of this attribute value is <tt>null</tt>.
6641
6642 Media types that don't support this attribute will return E_NOTIMPL in
6643 attempt to get or set this attribute's value.
6644
6645 <note>
6646 For some storage types, reading this attribute may return an outdated
6647 (last known) value when <link to="#state"/> is <link
6648 to="MediaState::Inaccessible"/> or <link
6649 to="MediaState::LockedWrite"/> because the value of this attribute is
6650 stored within the storage unit itself. Also note that changing the
6651 attribute value is not possible in such case, as well as when the
6652 medium is the <link to="MediaState::LockedRead"/> state.
6653 </note>
6654 </desc>
6655 </attribute>
6656
6657 <attribute name="state" type="MediaState" readonly="yes">
6658 <desc>
6659 Current media state. Inspect <link to="MediaState"/> values for details.
6660
6661 Reading this attribute may take long time because a new accessibility
6662 check of the storage unit is performed every time the attribute is read.
6663 This check may cause a significant delay if the storage unit of the
6664 given medium is, for example, a file located on a network share which is
6665 not currently accessible due to connectivity problems -- the call will
6666 not return until a timeout interval defined by the host OS for this
6667 operation expires.
6668
6669 If the last known state of the medium is <link to="MediaState::Created"/>
6670 and the accessibility check fails then the state would be set to
6671 <link to="MediaState::Inaccessible"/> and <link to="#lastAccessError"/>
6672 may be used to get more details about the failure. If the state of the
6673 medium is <link to="MediaState::LockedRead"/> or
6674 <link to="MediaState::LockedWrite"/> then it remains the same, and a
6675 non-null value of <link to="#lastAccessError"/> will indicate a failed
6676 accessibility check in this case.
6677
6678 Note that not all media states are applicable to certain media types.
6679 For example, states <link to="MediaState::NotCreated"/>,
6680 <link to="MediaState::LockedWrite"/>, <link to="MediaState::Creating"/>,
6681 <link to="MediaState::Deleting"/> are meaningless for IDVDImage2 and
6682 IFloppyImage2 media.
6683 </desc>
6684 </attribute>
6685
6686 <attribute name="location" type="wstring">
6687 <desc>
6688 Location of the storage unit holding media data.
6689
6690 The format of the location string is media type specific. For media
6691 types that use regular files in a host's file system, the location
6692 string is just a full file name.
6693
6694 Some media types may support changing the storage unit location by
6695 simply changing the value of this property. If this operation is not
6696 supported, the implementation will return E_NOTIMPL in attempt to set
6697 this attribute's value.
6698
6699 When setting a value of the location attribute which is a regular file
6700 in the host's file system, the given file name may be either relative to
6701 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
6702 absolute. Note that if the given location specification does not contain
6703 the file extension part then a proper default extension will be
6704 automatically appended by the implementation depending on the media type.
6705 </desc>
6706 </attribute>
6707
6708 <attribute name="name" type="wstring" readonly="yes">
6709 <desc>
6710 Name of the storage unit holding media data.
6711
6712 The returned string is a short version of the <link to="#location"/>
6713 attribute that is suitable for representing the medium in situations
6714 where the full location specification is too long (such as lists
6715 and comboboxes in GUI frontends). This string is also used by frontends
6716 to sort the media list alphabetically when needed.
6717
6718 For example, for locations that are regular files in the host's file
6719 system, the value of this attribute is just a file name (+ extension),
6720 without the path specification.
6721
6722 Note that as opposed to the <link to="#location"/> attribute, the name
6723 attribute will not necessary be unique for a list of media of the
6724 given type and format.
6725 </desc>
6726 </attribute>
6727
6728 <attribute name="size" type="unsigned long long" readonly="yes">
6729 <desc>
6730 Physical size of the storage unit used to hold media data (in bytes).
6731
6732 <note>
6733 For media whose <link to="#state"/> is <link
6734 to="MediaState::Inaccessible"/>, the value of this property is the
6735 last known size. For <link to="MediaState::NotCreated"/> media,
6736 the returned value is zero.
6737 </note>
6738 </desc>
6739 </attribute>
6740
6741 <attribute name="lastAccessError" type="wstring" readonly="yes">
6742 <desc>
6743 Text message that represents the result of the last accessibility
6744 check.
6745
6746 Accessibility checks are performed each time the <link to="#state"/>
6747 attribute is read. A @c null string is returned if the last
6748 accessibility check was successful. A non-null string indicates a
6749 failure and should normally describe a reason of the failure (for
6750 example, a file read error).
6751 </desc>
6752 </attribute>
6753
6754 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
6755 <desc>
6756 Array of UUIDs of all machines this medium is attached to.
6757
6758 A <tt>null</tt> array is returned if this medium is not attached to any
6759 machine or to any machine's snapshot.
6760
6761 <note>
6762 The returned array will include a machine even if this medium is not
6763 attached to that machine in the current state but attached to it in
6764 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
6765 details.
6766 </note>
6767 </desc>
6768 </attribute>
6769
6770 <method name="getSnapshotIds">
6771 <desc>
6772 Returns an array of UUIDs of all snapshots of the given machine where
6773 this medium is attached to it.
6774
6775 If the medium is attached to the machine in the current state, then the
6776 first element in the array will always be the ID of the queried machine
6777 (i.e. the value equal to the @c machineId argument), followed by
6778 snapshot IDs (if any).
6779
6780 If the medium is not attached to the machine in the current state, then
6781 the array will contain only snapshot IDs.
6782
6783 The returned array may be <tt>null</tt> if this medium is not attached
6784 to the given machine at all, neither in the current state nor in one of
6785 snapshots.
6786 </desc>
6787 <param name="machineId" type="uuid" dir="in">
6788 <desc>
6789 UUID of the machine to query.
6790 </desc>
6791 </param>
6792 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
6793 <desc>
6794 Array of snapshot UUIDs of the given machine using this medium.
6795 </desc>
6796 </param>
6797 </method>
6798
6799 <method name="lockRead">
6800 <desc>
6801 Locks this medium for reading.
6802
6803 The read lock is shared: many clients can simultaneously lock the
6804 same media for reading unless it is already locked for writing (see
6805 <link to="#lockWrite()"/>) in which case an error is returned.
6806
6807 When the medium is locked for reading, it cannot be modified from within
6808 VirtualBox. This means that any method that changes the properties of
6809 this medium or contents of the storage unit will return an error (unless
6810 explicitly stated otherwise) and that an attempt to start a virtual
6811 machine that wants to modify the medium will also fail.
6812
6813 When the virtual machine is started up, it locks for reading all media
6814 it uses in read-only mode. If some media cannot be locked for reading,
6815 the startup procedure will fail.
6816
6817 The medium locked for reading must be unlocked using the
6818 <link to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/> can
6819 be nested and must be followed by the same number of paired
6820 <link to="#unlockRead()"/> calls.
6821
6822 This method sets the media state to <link to="MediaState::LockedRead"/>
6823 on success. The state prior to this call must be
6824 <link to="MediaState::Created"/>,
6825 <link to="MediaState::Inaccessible"/> or
6826 <link to="MediaState::LockedRead"/>. As you can see, inaccessible media
6827 can be locked too. This is not an error; this method performs a logical
6828 lock that prevents modifications of this media through the VirtualBox
6829 API, not a physical lock of the underlying storage unit.
6830
6831 Either on success or on failure, this method returns the current state
6832 of the medium <b>before</b> the operation.
6833 </desc>
6834 <param name="state" type="MediaState" dir="return">
6835 <desc>
6836 State of the medium after the operation.
6837 </desc>
6838 </param>
6839 </method>
6840
6841 <method name="unlockRead">
6842 <desc>
6843 Cancels the read lock previously set by <link to="#lockRead()"/>.
6844
6845 Either on success or on failure, this method returns the current state
6846 of the medium <b>after</b> the operation.
6847
6848 See <link to="#lockRead()"/> for more details.
6849 </desc>
6850 <param name="state" type="MediaState" dir="return">
6851 <desc>
6852 State of the medium after the operation.
6853 </desc>
6854 </param>
6855 </method>
6856
6857 <method name="lockWrite">
6858 <desc>
6859 Locks this medium for writing.
6860
6861 The write lock, as opposed to <link to="#lockRead()"/>, is exclusive:
6862 there may be only one client that holds a write lock and there may be no
6863 read locks while the write lock is held.
6864
6865 When the medium is locked for writing, it cannot be modified from within
6866 VirtualBox and it is not guaranteed that the values of its properties
6867 are up-to-date. Any method that changes the properties of this medium or
6868 contents of the storage unit will return an error ((unless explicitly
6869 stated otherwise) and an attempt to start a virtual machine that wants
6870 to modify or to read the medium will also fail.
6871
6872 When the virtual machine is started up, it locks for writing all media
6873 it uses to write data to. If some media cannot be locked for writing,
6874 the startup procedure will fail.
6875
6876 The medium locked for writing must be unlocked using the
6877 <link to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
6878 can <b>not</b> be nested and must be followed by a paired
6879 <link to="#unlockWrite()"/> call.
6880
6881 This method sets the media state to <link to="MediaState::LockedWrite"/>
6882 on success. The state prior to this call must be
6883 <link to="MediaState::Created"/> or
6884 <link to="MediaState::Inaccessible"/>. As you can see, inaccessible media
6885 can be locked too. This is not an error; this method performs a logical
6886 lock that prevents modifications of this media through the VirtualBox
6887 API, not a physical lock of the underlying storage unit.
6888
6889 Either on success or on failure, this method returns the current state
6890 of the medium <b>before</b> the operation.
6891 </desc>
6892 <param name="state" type="MediaState" dir="return">
6893 <desc>
6894 State of the medium after the operation.
6895 </desc>
6896 </param>
6897 </method>
6898
6899 <method name="unlockWrite">
6900 <desc>
6901 Cancels the write lock previously set by <link to="#lockWrite()"/>.
6902
6903 Either on success or on failure, this method returns the current state
6904 of the medium <b>after</b> the operation.
6905
6906 See <link to="#lockWrite()"/> for more details.
6907 </desc>
6908 <param name="state" type="MediaState" dir="return">
6909 <desc>
6910 State of the medium after the operation.
6911 </desc>
6912 </param>
6913 </method>
6914
6915 <method name="close">
6916 <desc>
6917 Closes this media.
6918
6919 The hard disk must not be attached to any known virtual machine and must
6920 not have any known child hard disks, otherwise the operation will fail.
6921
6922 When the hard disk is successfully closed, it gets removed from the list
6923 of remembered hard disks, but its storage unit is not deleted. In
6924 particular, this means that this hard disk can be later opened again
6925 using the <link to="IVirtualBox::openHardDisk2"/> call.
6926
6927 Note that after this method successfully returns, the given hard disk
6928 object becomes uninitialized. This means that any attempt to call any of
6929 its methods or attributes will fail with the <tt>"Object not ready"
6930 (E_ACCESSDENIED)</tt> error.
6931 </desc>
6932 </method>
6933
6934 </interface>
6935
6936
6937 <!--
6938 // IHardDisk2
6939 /////////////////////////////////////////////////////////////////////////
6940 -->
6941
6942 <enum
6943 name="HardDiskType"
6944 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
6945 >
6946 <desc>
6947 Virtual hard disk type.
6948 <see>IHardDisk</see>
6949 </desc>
6950
6951 <const name="Normal" value="0">
6952 <desc>
6953 Normal hard disk (attached directly or indirectly, preserved
6954 when taking snapshots).
6955 </desc>
6956 </const>
6957 <const name="Immutable" value="1">
6958 <desc>
6959 Immutable hard disk (attached indirectly, changes are wiped out
6960 after powering off the virtual machine).
6961 </desc>
6962 </const>
6963 <const name="Writethrough" value="2">
6964 <desc>
6965 Write through hard disk (attached directly, ignored when
6966 taking snapshots).
6967 </desc>
6968 </const>
6969 </enum>
6970
6971 <interface
6972 name="IHardDisk2Attachment" extends="$unknown"
6973 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
6974 wsmap="struct"
6975 >
6976 <desc>
6977 The IHardDisk2Attachment interface represents a hard disk attachment of a
6978 virtual machine.
6979
6980 Every hard disk attachment specifies a slot of the virtual hard disk
6981 controller and a virtual hard disk attached to this slot.
6982
6983 The array of hard disk attachments is returned by
6984 <link to="IMachine::hardDisk2Attachments"/>.
6985
6986 <note>
6987 With the COM API, this is an interface like all the others. With the
6988 webservice, this is mapped to a structure, so querying the attribute
6989 will not return an object, but a complete structure.
6990 </note>
6991 </desc>
6992 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
6993 <desc>Hard disk object associated with this attachment.</desc>
6994 </attribute>
6995
6996 <attribute name="bus" type="StorageBus" readonly="yes">
6997 <desc>Interface bus of this attachment.</desc>
6998 </attribute>
6999
7000 <attribute name="channel" type="long" readonly="yes">
7001 <desc>Channel number of this attachment.</desc>
7002 </attribute>
7003
7004 <attribute name="device" type="long" readonly="yes">
7005 <desc>Device slot number of this attachment.</desc>
7006 </attribute>
7007
7008 </interface>
7009
7010 <interface
7011 name="IHardDisk2" extends="IMedium"
7012 uuid="4fece1c1-2a75-43ce-ba82-76d2a89b9d5d"
7013 wsmap="managed"
7014 >
7015 <desc>
7016 The IHardDisk2 interface represents a virtual hard disk drive
7017 used by a virtual machine.
7018
7019 Virtual hard disk objects virtualize the hard disk hardware and look like
7020 regular hard disks for the guest OS running inside the virtual machine.
7021
7022 <h3>Hard Disk Types</h3>
7023
7024 There are three types of hard disks:
7025 <link to="HardDiskType::Normal">Normal</link>,
7026 <link to="HardDiskType::Immutable">Immutable</link> and
7027 <link to="HardDiskType::Writethrough">Writethrough</link>. The type of the
7028 hard disk defines how the hard disk is attached to a virtual machine and
7029 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
7030 machine with the attached hard disk is taken. The type of the hard disk is
7031 defined by the <link to="#type"/> attribute.
7032
7033 All hard disks can be also divided in two big groups: <i>base</i> hard
7034 disks and <i>differencing</i> hard disks. A base hard disk contains all
7035 sectors of the hard disk data in its storage unit and therefore can be
7036 used independently. On the contrary, a differencing hard disk contains
7037 only some part of the hard disk data (a subset of sectors) and needs
7038 another hard disk to get access to the missing sectors of data. This
7039 another hard disk is called a <i>parent</i> hard disk and defines a hard
7040 disk to which this differencing hard disk is known to be <i>linked to</i>.
7041 The parent hard disk may be itself a differencing hard disk. This
7042 way, differencing hard disks form a linked hard disk chain. This chain
7043 always ends with the base hard disk which is sometimes referred to as the
7044 root hard disk of this chain. Note that several differencing hard disks
7045 may be linked to the same parent hard disk. This way, all known hard disks
7046 form a hard disk tree which is based on their parent-child relationship.
7047
7048 Differencing hard disks can be distinguished from base hard disks by
7049 querying the <link to="#parent"/> attribute: base hard disks do not have
7050 parents they would depend on, so the value of this attribute is always
7051 <tt>null</tt> for them. Using this attribute, it is possible to walk up
7052 the hard disk tree (from the child hard disk to its parent). It is also
7053 possible to walk down the tree using the <link to="#children"/>
7054 attribute.
7055
7056 Note that the type of all differencing hard disks is
7057 <link to="HardDiskType::Normal">Normal</link>; all other values are
7058 meaningless for them. Base hard disks may be of any type.
7059
7060 <h3>Creating Hard Disks</h3>
7061
7062 New base hard disks are created using
7063 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
7064 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
7065 disks are usually implicitly created by VirtualBox when needed but may
7066 also be created explicitly using <link to="#createDiffStorage()"/>.
7067
7068 After the hard disk is successfully created (including the storage unit)
7069 or opened, it becomes a known hard disk (remembered in the internal media
7070 registry). Known hard disks can be attached to a virtual machine, accessed
7071 through <link to="IVirtualBox::getHardDisk2()"/> and
7072 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
7073 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
7074
7075 The following methods, besides <link to="IMedium::close()"/>,
7076 automatically remove the hard disk from the media registry:
7077 <ul>
7078 <li><link to="#deleteStorage()"/></li>
7079 <li><link to="#mergeTo()"/></li>
7080 </ul>
7081
7082 If the storage unit of the hard disk is a regular file in the host's
7083 file system then the rules stated in the description of the
7084 <link to="IMedium::location"/> attribute apply when setting its value. In
7085 addition, a plain file name without any path may be given, in which case
7086 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
7087 folder</link> will be prepended to it.
7088
7089 <h4>Automatic composition of the file name part</h4>
7090
7091 Another extension to the <link to="IMedium::location"/> attribute is that
7092 there is a possibility to cause VirtualBox to compose a unique value for
7093 the file name part of the location using the UUID of the hard disk. This
7094 applies only to hard disks in <link to="MediaState::NotCreated"/> state,
7095 e.g. before the storage unit is created, and works as follows. You set the
7096 value of the <link to="IMedium::location"/> attribute to a location
7097 specification which only contains the path specification but not the file
7098 name part and ends with either a forward slash or a backslash character.
7099 In response, VirtualBox will generate a new UUID for the hard disk and
7100 compose the file name using the following pattern:
7101 <pre>
7102 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
7103 </pre>
7104 where <tt>&lt;path&gt;</tt> is the supplied path specification,
7105 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
7106 is the default extension for the storage format of this hard disk. After
7107 that, you may call any of the methods that create a new hard disk storage
7108 unit and they will use the generated UUID and file name.
7109
7110 <h3>Attaching Hard Disks</h3>
7111
7112 Hard disks are attached to virtual machines using the
7113 <link to="IMachine::attachHardDisk2()"/> method and detached using the
7114 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
7115 <link to="#type"/>, hard disks are attached either
7116 <i>directly</i> or <i>indirectly</i>.
7117
7118 When a hard disk is being attached directly, it is associated with the
7119 virtual machine and used for hard disk operations when the machine is
7120 running. When a hard disk is being attached indirectly, a new differencing
7121 hard disk linked to it is implicitly created and this differencing hard
7122 disk is associated with the machine and used for hard disk operations.
7123 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
7124 a direct attachment then the same hard disk will be returned in response
7125 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
7126 an indirect attachment is performed then
7127 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
7128 differencing hard disk, not the original one passed to <link
7129 to="IMachine::attachHardDisk2()"/>. The following table shows the
7130 dependency of the attachment type on the hard disk type:
7131
7132 <table>
7133 <tr>
7134 <th>Hard Disk Type</th>
7135 <th>Direct or Indirect?</th>
7136 </tr>
7137 <tr>
7138 <td>Normal (Base)</td>
7139 <td>
7140 Normal base hard disks that do not have children (i.e. differencing
7141 hard disks linked to them) and that are not already attached to
7142 virtual machines in snapshots are attached <b>directly</b>.
7143 Otherwise, they are attached <b>indirectly</b> because having
7144 dependent children or being part of the snapshot makes it impossible
7145 to modify hard disk contents without breaking the integrity of the
7146 dependent party. The <link to="#readOnly"/> attribute allows to
7147 quickly determine the kind of the attachment for the given hard
7148 disk. Note that if a normal base hard disk is to be indirectly
7149 attached to a virtual machine with snapshots then a special
7150 procedure called <i>smart attachment</i> is performed (see below).
7151 </td>
7152 </tr>
7153 <tr>
7154 <td>Normal (Differencing)</td>
7155 <td>
7156 Differencing hard disks are like normal base hard disks: attached
7157 <b>directly</b> if they do not have children and are not attached to
7158 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
7159 that the smart attachment procedure is never performed for
7160 differencing hard disks.
7161 </td>
7162 </tr>
7163 <tr>
7164 <td>Immutable</td>
7165 <td>
7166 Immutable hard disks are always attached <b>indirectly</b> because
7167 they are designed to be non-writable. If an immutable hard disk is
7168 attached to a virtual machine with snapshots then a special
7169 procedure called smart attachment is performed (see below).
7170 </td>
7171 </tr>
7172 <tr>
7173 <td>Writethrough</td>
7174 <td>
7175 Writethrough hard disks are always attached <b>directly</b>, also as
7176 designed. This also means that writethrough hard disks cannot have
7177 other hard disks linked to them at all.
7178 </td>
7179 </tr>
7180 </table>
7181
7182 Note that the same hard disk, regardless of its type, may be attached to
7183 more than one virtual machine at a time. In this case, the machine that is
7184 started first gains exclusive access to the hard disk and attempts to
7185 start other machines having this hard disk attached will fail until the
7186 first machine is powered down.
7187
7188 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
7189 that the given hard disk remains associated with the given machine after a
7190 successful <link to="IMachine::detachHardDisk2()"/> call until
7191 <link to="IMachine::saveSettings()"/> is called to save all changes to
7192 machine settings to disk. This deferring is necessary to guarantee that
7193 the hard disk configuration may be restored at any time by a call to
7194 <link to="IMachine::discardSettings()"/> before the settings
7195 are saved (committed).
7196
7197 Note that if <link to="IMachine::discardSettings()"/> is called after
7198 indirectly attaching some hard disks to the machine but before a call to
7199 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
7200 all differencing hard disks implicitly created by
7201 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
7202 Such implicitly created hard disks will also be immediately deleted when
7203 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
7204 call if it is made before <link to="IMachine::saveSettings()"/>. This
7205 implicit deletion is safe because newly created differencing hard
7206 disks do not contain any user data.
7207
7208 However, keep in mind that detaching differencing hard disks that were
7209 implicitly created by <link to="IMachine::attachHardDisk2()"/>
7210 before the last <link to="IMachine::saveSettings()"/> call will
7211 <b>not</b> implicitly delete them as they may already contain some data
7212 (for example, as a result of virtual machine execution). If these hard
7213 disks are no more necessary, the caller can always delete them explicitly
7214 using <link to="#deleteStorage()"/> after they are actually de-associated
7215 from this machine by the <link to="IMachine::saveSettings()"/> call.
7216
7217 <h3>Smart Attachment</h3>
7218
7219 When normal base or immutable hard disks are indirectly attached to a
7220 virtual machine then some additional steps are performed to make sure the
7221 virtual machine will have the most recent "view" of the hard disk being
7222 attached. These steps include walking through the machine's snapshots
7223 starting from the current one and going through ancestors up to the first
7224 snapshot. Hard disks attached to the virtual machine in all
7225 of the encountered snapshots are checked whether they are descendants of
7226 the given normal base or immutable hard disk. The first found child (which
7227 is the differencing hard disk) will be used instead of the normal base or
7228 immutable hard disk as a parent for creating a new differencing hard disk
7229 that will be actually attached to the machine. And only if no descendants
7230 are found or if the virtual machine does not have any snapshots then the
7231 normal base or immutable hard disk will be used itself as a parent for
7232 this differencing hard disk.
7233
7234 It is easier to explain what smart attachment does using the
7235 following example:
7236 <pre>
7237BEFORE attaching B.vdi: AFTER attaching B.vdi:
7238
7239Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
7240 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
7241 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
7242 Snapshot 4 (none) Snapshot 4 (none)
7243 CurState (none) CurState (D3->D2.vdi)
7244
7245 NOT
7246 ...
7247 CurState (D3->B.vdi)
7248 </pre>
7249 The first column is the virtual machine configuration before the base hard
7250 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
7251 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
7252 mean that the hard disk that is actually attached to the machine is a
7253 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
7254 another hard disk, <tt>B.vdi</tt>.
7255
7256 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
7257 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
7258 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
7259 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
7260 it cannot be attached directly and needs an indirect attachment (i.e.
7261 implicit creation of a new differencing hard disk). Due to the smart
7262 attachment procedure, the new differencing hard disk
7263 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
7264 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
7265 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
7266 machine.
7267
7268 Note that if there is more than one descendant hard disk of the given base
7269 hard disk found in a snapshot, and there is an exact device, channel and
7270 bus match, then this exact match will be used. Otherwise, the youngest
7271 descendant will be picked up.
7272
7273 There is one more important aspect of the smart attachment procedure which
7274 is not related to snapshots at all. Before walking through the snapshots
7275 as described above, the backup copy of the current list of hard disk
7276 attachment is searched for descendants. This backup copy is created when
7277 the hard disk configuration is changed for the first time after the last
7278 <link to="IMachine::saveSettings()"/> call and used by
7279 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
7280 changes. When such a descendant is found in this backup copy, it will be
7281 simply re-attached back, without creating a new differencing hard disk for
7282 it. This optimization is necessary to make it possible to re-attach the
7283 base or immutable hard disk to a different bus, channel or device slot
7284 without losing the contents of the differencing hard disk actually
7285 attached to the machine in place of it.
7286 </desc>
7287
7288 <attribute name="format" type="wstring" readonly="yes">
7289 <desc>
7290 Storage format of this hard disk.
7291
7292 The value of this attribute is a string that specifies a backend used to
7293 store hard disk data. The storage format is defined when you create a
7294 new hard disk or automatically detected when you open an existing hard
7295 disk medium, and cannot be changed later.
7296
7297 The list of all storage formats supported by this VirtualBox
7298 installation can be obtained using
7299 <link to="ISystemProperties::hardDiskFormats"/>.
7300 </desc>
7301 </attribute>
7302
7303 <attribute name="type" type="HardDiskType">
7304 <desc>
7305 Type (role) of this hard disk.
7306
7307 The following constraints apply when changing the value of this
7308 attribute:
7309 <ul>
7310 <li>If a hard disk is attached to a virtual machine (either in the
7311 current state or in one of the snapshots), its type cannot be
7312 changed.
7313 </li>
7314 <li>As long as the hard disk has children, its type cannot be set
7315 to <link to="HardDiskType::Writethrough"/>.
7316 </li>
7317 <li>The type of all differencing hard disks is
7318 <link to="HardDiskType::Normal"/> and cannot be changed.
7319 </li>
7320 </ul>
7321
7322 The type of a newly created or opened hard disk is set to
7323 <link to="HardDiskType::Normal"/>.
7324 </desc>
7325 </attribute>
7326
7327 <attribute name="parent" type="IHardDisk2" readonly="yes">
7328 <desc>
7329 Parent of this hard disk (a hard disk this hard disk is directly based
7330 on).
7331
7332 Only differencing hard disks have parents. For base (non-differencing)
7333 hard disks, <tt>null</tt> is returned.
7334 </desc>
7335 </attribute>
7336
7337 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
7338 <desc>
7339 Children of this hard disk (all differencing hard disks directly based
7340 on this hard disk). A <tt>null</tt> array is returned if this hard disk
7341 does not have any children.
7342 </desc>
7343 </attribute>
7344
7345 <attribute name="root" type="IHardDisk2" readonly="yes">
7346 <desc>
7347 Root hard disk of this hard disk.
7348
7349 If this is a differencing hard disk, its root hard disk is the base hard
7350 disk the given hard disk branch starts from. For all other types of hard
7351 disks, this property returns the hard disk object itself (i.e. the same
7352 object this property is read on).
7353 </desc>
7354 </attribute>
7355
7356 <attribute name="readOnly" type="boolean" readonly="yes">
7357 <desc>
7358 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
7359 otherwise.
7360
7361 A hard disk is considered to be read-only when its contents cannot be
7362 modified without breaking the integrity of other parties that depend on
7363 this hard disk such as its child hard disks or snapshots of virtual
7364 machines where this hard disk is attached to these machines. If there
7365 are no children and no such snapshots then there is no dependency and
7366 the hard disk is not read-only.
7367
7368 The value of this attribute can be used to determine the kind of the
7369 attachment that will take place when attaching this hard disk to a
7370 virtual machine. If the value is <tt>false</tt> then the hard disk will
7371 be attached directly. If the value is <tt>true</tt> then the hard disk
7372 will be attached indirectly by creating a new differencing child hard
7373 disk for that. See the interface description for more information.
7374
7375 Note that all <link to="HardDiskType::Immutable">Immutable</link> hard
7376 disks are always read-only while all
7377 <link to="HardDiskType::Writethrough">Writethrough</link> hard disks are
7378 always not.
7379
7380 <note>
7381 The read-only condition represented by this attribute is related to
7382 the hard disk type and usage, not to the current
7383 <link to="IMedium::state">media state</link> and not to the read-only
7384 state of the storage unit.
7385 </note>
7386 </desc>
7387 </attribute>
7388
7389 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
7390 <desc>
7391 Logical size of this hard disk (in megabytes), as reported to the
7392 guest OS running inside the virtual machine this disk is
7393 attached to. The logical size is defined when the hard disk is created
7394 and cannot be changed later.
7395
7396 <note>
7397 Reading this property on a differencing hard disk will return the size
7398 of its <link to="#root"/> hard disk.
7399 </note>
7400 <note>
7401 For hard disks whose state is <link to="#state"/> is <link
7402 to="MediaState::Inaccessible"/>, the value of this property is the
7403 last known logical size. For <link to="MediaState::NotCreated"/> hard
7404 disks, the returned value is zero.
7405 </note>
7406 </desc>
7407 </attribute>
7408
7409 <!-- storage methods -->
7410
7411 <method name="getProperty">
7412 <desc>
7413 Returns the value of the custom hard disk property with the given name.
7414
7415 The list of all properties supported by the given hard disk format can
7416 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7417
7418 Note that if this method returns a <tt>null</tt> @a value, the requested
7419 property is supported but currently not assigned any value.
7420
7421 <result name="VBOX_E_OBJECT_NOT_FOUND">
7422 Requested property does not exist (not supported by the format).
7423 </result>
7424 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
7425 </desc>
7426 <param name="name" type="wstring" dir="in">
7427 <desc>Name of the property to get.</desc>
7428 </param>
7429 <param name="value" type="wstring" dir="return">
7430 <desc>Current property value.</desc>
7431 </param>
7432 </method>
7433
7434 <method name="setProperty">
7435 <desc>
7436 Sets the value of the custom hard disk property with the given name.
7437
7438 The list of all properties supported by the given hard disk format can
7439 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7440
7441 Note that passing <tt>null</tt> as @a value will reset the value of the
7442 property to nothing which may also be understood as deleting the
7443 property's value. For properties with no values, the format backend will
7444 use a default value if such a value is defined for the given property.
7445
7446 <result name="VBOX_E_OBJECT_NOT_FOUND">
7447 Requested property does not exist (not supported by the format).
7448 </result>
7449 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
7450 </desc>
7451 <param name="name" type="wstring" dir="in">
7452 <desc>Name of the property to set.</desc>
7453 </param>
7454 <param name="value" type="wstring" dir="in">
7455 <desc>Property value to set.</desc>
7456 </param>
7457 </method>
7458
7459 <method name="getProperties">
7460 <desc>
7461 Returns values for a group of properties in one call.
7462
7463 The names of the properties to get are specified using the @a names
7464 argument which is a list of comma-separated property names or
7465 <tt>null</tt> if all properties are to be returned. Note that currently
7466 the value of this argument is ignored and the method always returns all
7467 existing properties.
7468
7469 The list of all properties supported by the given hard disk format can
7470 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7471
7472 The method returns two arrays, the array of property names corresponding
7473 to the @a names argument and the current values of these properties.
7474 <!-- FIXME: Both arrays [sentence was cut off here. Complete. -->
7475
7476 Note that for properties that don't have values assigned to them,
7477 <tt>null</tt> is returned at the appropriate index in the @a returnValues
7478 array.
7479
7480 </desc>
7481 <param name="names" type="wstring" dir="in">
7482 <desc>
7483 Names of properties to get.
7484 </desc>
7485 </param>
7486 <param name="returnNames" type="wstring" safearray="yes" dir="out">
7487 <desc>Names of returned properties.</desc>
7488 </param>
7489 <param name="returnValues" type="wstring" safearray="yes" dir="return">
7490 <desc>Values of returned properties.</desc>
7491 </param>
7492 </method>
7493
7494 <!-- storage methods -->
7495
7496 <method name="createDynamicStorage">
7497 <desc>
7498 Starts creating a dynamically expanding hard disk storage unit in the
7499 background. The previous storage unit created for this object, if
7500 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
7501 the operation will fail.
7502
7503 Before the operation starts, the hard disk is placed in
7504 <link to="MediaState::Creating"/> state. If the create operation
7505 fails, the media will be placed back in <link to="MediaState::NotCreated"/>
7506 state.
7507
7508 After the returned progress object reports that the operation has
7509 successfully completed, the media state will be set to <link
7510 to="MediaState::Created"/>, the hard disk will be remembered by this
7511 VirtualBox installation and may be attached to virtual machines.
7512
7513 <result name="VBOX_E_NOT_SUPPORTED">
7514 Dynamic storage creation operation is not supported. See <link
7515 to="IHardDiskFormat::capabilities"/>.
7516 </result>
7517 </desc>
7518 <param name="logicalSize" type="unsigned long long" dir="in">
7519 <desc>Maximum logical size of the hard disk in megabytes.</desc>
7520 </param>
7521 <param name="progress" type="IProgress" dir="return">
7522 <desc>Progress object to track the operation completion.</desc>
7523 </param>
7524 </method>
7525
7526 <method name="createFixedStorage">
7527 <desc>
7528 Starts creating a fixed-size hard disk storage unit in the background.
7529 The previous storage unit created for this object, if
7530 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
7531 the operation will fail.
7532
7533 Before the operation starts, the hard disk is placed to
7534 <link to="MediaState::Creating"/> state. If the create operation
7535 fails, the media will placed back to <link to="MediaState::NotCreated"/>
7536 state.
7537
7538 After the returned progress object reports that the operation is
7539 successfully complete, the media state will be set to <link
7540 to="MediaState::Created"/>, the hard disk will be remembered by this
7541 VirtualBox installation and may be attached to virtual machines.
7542
7543 <result name="VBOX_E_NOT_SUPPORTED">
7544 Fixed storage creation operation is not supported. See
7545 <link to="IHardDiskFormat::capabilities"/>.
7546 </result>
7547 </desc>
7548 <param name="logicalSize" type="unsigned long long" dir="in">
7549 <desc>Logical size of the hard disk in megabytes.</desc>
7550 </param>
7551 <param name="progress" type="IProgress" dir="return">
7552 <desc>Progress object to track the operation completion.</desc>
7553 </param>
7554 </method>
7555
7556 <method name="deleteStorage">
7557 <desc>
7558 Starts deleting the storage unit of this hard disk.
7559
7560 The hard disk must not be attached to any known virtual machine and must
7561 not have any known child hard disks, otherwise the operation will fail.
7562 It will also fail if there is no storage unit to delete or if deletion
7563 is already in progress, or if the hard disk is being in use (locked for
7564 read or for write) or inaccessible. Therefore, the only valid state for
7565 this operation to succeed is <link to="MediaState::Created"/>.
7566
7567 Before the operation starts, the hard disk is placed to
7568 <link to="MediaState::Deleting"/> state and gets removed from the list
7569 of remembered hard disks (media registry). If the delete operation
7570 fails, the media will be remembered again and placed back to
7571 <link to="MediaState::Created"/> state.
7572
7573 After the returned progress object reports that the operation is
7574 complete, the media state will be set to
7575 <link to="MediaState::NotCreated"/> and you will be able to use one of
7576 the storage creation methods to create it again.
7577
7578 <see>#close()</see>
7579
7580 <result name="VBOX_E_OBJECT_IN_USE">
7581 Hard disk is attached to a virtual machine.
7582 </result>
7583 <result name="VBOX_E_NOT_SUPPORTED">
7584 Storage deletion is not allowed because neither of storage creation
7585 operations are supported. See
7586 <link to="IHardDiskFormat::capabilities"/>.
7587 </result>
7588 </desc>
7589 <param name="progress" type="IProgress" dir="return">
7590 <desc>Progress object to track the operation completion.</desc>
7591 </param>
7592 </method>
7593
7594 <!-- diff methods -->
7595
7596 <method name="createDiffStorage">
7597 <desc>
7598 Starts creating an empty differencing storage unit based on this hard
7599 disk in the format and at the location defined by the @a target
7600 argument.
7601
7602 The target hard disk must be in <link to="MediaState::NotCreated"/>
7603 state (i.e. must not have an existing storage unit). Upon successful
7604 completion, this operation will set the type of the target hard disk to
7605 <link to="HardDiskType::Normal"/> and create a storage unit necessary to
7606 represent the differencing hard disk data in the given format (according
7607 to the storage format of the target object).
7608
7609 After the returned progress object reports that the operation is
7610 successfully complete, the target hard disk gets remembered by this
7611 VirtualBox installation and may be attached to virtual machines.
7612
7613 <note>
7614 The hard disk will be set to <link to="MediaState::LockedRead"/>
7615 state for the duration of this operation.
7616 </note>
7617 <result name="VBOX_E_OBJECT_IN_USE">
7618 Hard disk not in NotCreated state.
7619 </result>
7620 </desc>
7621 <param name="target" type="IHardDisk2" dir="in">
7622 <desc>Target hard disk.</desc>
7623 </param>
7624 <param name="progress" type="IProgress" dir="return">
7625 <desc>Progress object to track the operation completion.</desc>
7626 </param>
7627 </method>
7628
7629 <method name="mergeTo">
7630 <desc>
7631 Starts merging the contents of this hard disk and all intermediate
7632 differencing hard disks in the chain to the given target hard disk.
7633
7634 The target hard disk must be either a descendant of this hard disk or
7635 its ancestor (otherwise this method will immediately return a failure).
7636 It follows that there are two logical directions of the merge operation:
7637 from ancestor to descendant (<i>forward merge</i>) and from descendant to
7638 ancestor (<i>backward merge</i>). Let us consider the following hard disk
7639 chain:
7640
7641 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
7642
7643 Here, calling this method on the <tt>Base</tt> hard disk object with
7644 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
7645 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
7646 merge. Note that in both cases the contents of the resulting hard disk
7647 will be the same, the only difference is the hard disk object that takes
7648 the result of the merge operation. In case of the forward merge in the
7649 above example, the result will be written to <tt>Diff_2</tt>; in case of
7650 the backward merge, the result will be written to <tt>Base</tt>. In
7651 other words, the result of the operation is always stored in the target
7652 hard disk.
7653
7654 Upon successful operation completion, the storage units of all hard
7655 disks in the chain between this (source) hard disk and the target hard
7656 disk, including the source hard disk itself, will be automatically
7657 deleted and the relevant hard disk objects (including this hard disk)
7658 will become uninitialized. This means that any attempt to call any of
7659 their methods or attributes will fail with the
7660 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
7661 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
7662 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
7663 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
7664 disk itself since it will no longer be based on any other hard disk.
7665
7666 Considering the above, all of the following conditions must be met in
7667 order for the merge operation to succeed:
7668 <ul>
7669 <li>
7670 Neither this (source) hard disk nor any intermediate
7671 differencing hard disk in the chain between it and the target
7672 hard disk is attached to any virtual machine.
7673 </li>
7674 <li>
7675 Neither the source hard disk nor the target hard disk is an
7676 <link to="HardDiskType::Immutable"/> hard disk.
7677 </li>
7678 <li>
7679 The part of the hard disk tree from the source hard disk to the
7680 target hard disk is a linear chain, i.e. all hard disks in this
7681 chain have exactly one child which is the next hard disk in this
7682 chain. The only exception from this rule is the target hard disk in
7683 the forward merge operation; it is allowed to have any number of
7684 child hard disks because the merge operation will hot change its
7685 logical contents (as it is seen by the guest OS or by children).
7686 </li>
7687 <li>
7688 None of the involved hard disks are in
7689 <link to="MediaState::LockedRead"/> or
7690 <link to="MediaState::LockedWrite"/> state.
7691 </li>
7692 </ul>
7693
7694 <note>
7695 This (source) hard disk and all intermediates will be placed to <link
7696 to="MediaState::Deleting"/> state and the target hard disk will be
7697 placed to <link to="MediaState::LockedWrite"/> state and for the
7698 duration of this operation.
7699 </note>
7700 </desc>
7701 <param name="targetId" type="uuid" dir="in">
7702 <desc>UUID of the target ancestor or descendant hard disk.</desc>
7703 </param>
7704 <param name="progress" type="IProgress" dir="return">
7705 <desc>Progress object to track the operation completion.</desc>
7706 </param>
7707 </method>
7708
7709 <!-- clone methods -->
7710
7711 <method name="cloneTo">
7712 <desc>
7713 Starts creating a clone of this hard disk in the format and at the
7714 location defined by the @a target argument.
7715
7716 The target hard disk must be in <link to="MediaState::NotCreated"/>
7717 state (i.e. must not have an existing storage unit). Upon successful
7718 completion, the cloned hard disk will contain exactly the same sector
7719 data as the hard disk being cloned, except that a new UUID for the clone
7720 will be randomly generated.
7721
7722 After the returned progress object reports that the operation is
7723 successfully complete, the target hard disk gets remembered by this
7724 VirtualBox installation and may be attached to virtual machines.
7725
7726 <note>
7727 If the cloned hard disk is a differencing hard disk, it will inherit
7728 parent dependency of the original hard disk.
7729 </note>
7730 <note>
7731 This hard disk will be placed to <link to="MediaState::LockedRead"/>
7732 state for the duration of this operation.
7733 </note>
7734 </desc>
7735 <param name="target" type="IHardDisk2" dir="in">
7736 <desc>Target hard disk.</desc>
7737 </param>
7738 <param name="progress" type="IProgress" dir="return">
7739 <desc>Progress object to track the operation completion.</desc>
7740 </param>
7741 </method>
7742
7743 <method name="flattenTo">
7744 <desc>
7745 Starts creating a deep (independent) clone of this hard disk in the
7746 format and at the location defined by the @a target argument.
7747
7748 This operation is similar to <link to="#cloneTo()"/> except that when
7749 applied to a differencing hard disk, it will also copy missing hard disk
7750 data from all parent hard disks it is linked to. This will make the
7751 created clone an independent base hard disk that contains all hard disk
7752 data and does not need any other hard disks to operate.
7753
7754 After the returned progress object reports that the operation is
7755 successfully complete, the target hard disk gets remembered by this
7756 VirtualBox installation and may be attached to virtual machines.
7757
7758 <note>
7759 For base hard disks, this operation is identical to
7760 <link to="#cloneTo()"/>.
7761 </note>
7762 <note>
7763 This hard disk and all its parent hard disks will be placed to <link
7764 to="MediaState::LockedRead"/> state for the duration of this
7765 operation.
7766 </note>
7767 </desc>
7768 <param name="target" type="IHardDisk2" dir="in">
7769 <desc>Target hard disk.</desc>
7770 </param>
7771 <param name="progress" type="IProgress" dir="return">
7772 <desc>Progress object to track the operation completion.</desc>
7773 </param>
7774 </method>
7775
7776 </interface>
7777
7778
7779 <!--
7780 // IHardDiskFormat
7781 /////////////////////////////////////////////////////////////////////////
7782 -->
7783
7784 <enum
7785 name="DataType"
7786 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
7787 >
7788 <const name="Int32" value="0"/>
7789 <const name="Int8" value="1"/>
7790 <const name="String" value="2"/>
7791 </enum>
7792
7793 <enum
7794 name="DataFlags"
7795 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
7796 >
7797 <const name="None" value="0x00"/>
7798 <const name="Mandatory" value="0x01"/>
7799 <const name="Expert" value="0x02"/>
7800 <const name="Array" value="0x04"/>
7801 <const name="FlagMask" value="0x07"/>
7802 </enum>
7803
7804 <enum
7805 name="HardDiskFormatCapabilities"
7806 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
7807 >
7808 <desc>
7809 Hard disk format capability flags.
7810 </desc>
7811
7812 <const name="Uuid" value="0x01">
7813 <desc>
7814 Supports UUIDs as expected by VirtualBox code.
7815 </desc>
7816 </const>
7817
7818 <const name="CreateFixed" value="0x02">
7819 <desc>
7820 Supports creating fixed size images, allocating all space instantly.
7821 </desc>
7822 </const>
7823
7824 <const name="CreateDynamic" value="0x04">
7825 <desc>
7826 Supports creating dynamically growing images, allocating space on
7827 demand.
7828 </desc>
7829 </const>
7830
7831 <const name="CreateSplit2G" value="0x08">
7832 <desc>
7833 Supports creating images split in chunks of a bit less than 2 GBytes.
7834 </desc>
7835 </const>
7836
7837 <const name="Differencing" value="0x10">
7838 <desc>
7839 Supports being used as a format for differencing hard disks (see <link
7840 to="IHardDisk2::createDiffStorage"/>).
7841 </desc>
7842 </const>
7843
7844 <const name="Asynchronous" value="0x20">
7845 <desc>
7846 Supports asynchronous I/O operations for at least some configurations.
7847 </desc>
7848 </const>
7849
7850 <const name="File" value="0x40">
7851 <desc>
7852 The format backend operates on files. The <link to="IMedium::location"/>
7853 attribute of the hard disk specifies a file used to store hard disk
7854 data. For a list of supported file extensions see
7855 <link to="IHardDiskFormat::fileExtensions"/>.
7856 </desc>
7857 </const>
7858
7859 <const name="Properties" value="0x80">
7860 <desc>
7861 The format backend uses the property interface to configure the storage
7862 location and properties. The <link to="IHardDiskFormat::describeProperties"/>
7863 method is used to get access to properties supported by the given hard
7864 disk format.
7865 </desc>
7866 </const>
7867
7868 <const name="CapabilityMask" value="0xFF"/>
7869 </enum>
7870
7871 <interface
7872 name="IHardDiskFormat" extends="$unknown"
7873 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
7874 wsmap="managed"
7875 >
7876 <desc>
7877 The IHardDiskFormat interface represents a virtual hard disk format.
7878
7879 Each hard disk format has an associated backend which is used to handle
7880 hard disks stored in this format. This interface provides information
7881 about the properties of the associated backend.
7882
7883 Each hard disk format is identified by a string represented by the
7884 <link to="#id"/> attribute. This string is used in calls like
7885 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
7886 format.
7887
7888 The list of all supported hard disk formats can be obtained using
7889 <link to="ISystemProperties::hardDiskFormats"/>.
7890
7891 <see>IHardDisk2</see>
7892 </desc>
7893
7894 <attribute name="id" type="wstring" readonly="yes">
7895 <desc>
7896 Identifier of this format.
7897
7898 This string is used in methods of other interfaces where it is necessary
7899 to specify a hard disk format, such as
7900 <link to="IVirtualBox::createHardDisk2()"/>.
7901 </desc>
7902 </attribute>
7903
7904 <attribute name="name" type="wstring" readonly="yes">
7905 <desc>
7906 Human readable description of this format.
7907
7908 Mainly for use in file open dialogs.
7909 </desc>
7910 </attribute>
7911
7912 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
7913 <desc>
7914 Array of strings containing the supported file extensions.
7915
7916 The first extension in the array is the extension preferred by the
7917 backend. It is recommended to use this extension when specifying a
7918 location of the storage unit for a new hard disk.
7919
7920 Note that some backends do not work on files, so this array may be
7921 empty.
7922
7923 <see>IHardDiskFormat::capabilities</see>
7924 </desc>
7925 </attribute>
7926
7927 <attribute name="capabilities" type="unsigned long" readonly="yes">
7928 <desc>
7929 Capabilities of the format as a set of bit flags.
7930
7931 For the meaning of individual capability flags see
7932 <link to="HardDiskFormatCapabilities"/>.
7933 </desc>
7934 </attribute>
7935
7936 <method name="describeProperties">
7937 <desc>
7938 Returns several arrays describing the properties supported by this
7939 format.
7940
7941 An element with the given index in each array describes one
7942 property. Thus, the number of elements in each returned array is the
7943 same and corresponds to the number of supported properties.
7944
7945 The returned arrays are not empty only if the
7946 <link to="HardDiskFormatCapabilities::Properties"/> flag is set.
7947
7948 <see>DataType</see>
7949 <see>DataFlags</see>
7950 </desc>
7951
7952 <param name="names" type="wstring" safearray="yes" dir="out">
7953 <desc>Array of property names.</desc>
7954 </param>
7955 <param name="description" type="wstring" safearray="yes" dir="out">
7956 <desc>Array of property descriptions.</desc>
7957 </param>
7958 <param name="types" type="DataType" safearray="yes" dir="out">
7959 <desc>Array of property types.</desc>
7960 </param>
7961 <param name="flags" type="unsigned long" safearray="yes" dir="out">
7962 <desc>Array of property flags.</desc>
7963 </param>
7964 <param name="defaults" type="wstring" safearray="yes" dir="out">
7965 <desc>Array of default property values.</desc>
7966 </param>
7967 </method>
7968
7969 </interface>
7970
7971
7972 <!--
7973 // IFloppyImage2
7974 /////////////////////////////////////////////////////////////////////////
7975 -->
7976
7977 <interface
7978 name="IFloppyImage2" extends="IMedium"
7979 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
7980 wsmap="managed"
7981 >
7982 <desc>
7983 The IFloppyImage2 interface represents a medium containing the image
7984 of a floppy disk.
7985 </desc>
7986
7987 </interface>
7988
7989
7990 <!--
7991 // IDVDImage2
7992 /////////////////////////////////////////////////////////////////////////
7993 -->
7994
7995 <interface
7996 name="IDVDImage2" extends="IMedium"
7997 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
7998 wsmap="managed"
7999 >
8000 <desc>
8001 The IDVDImage2 interface represents a medium containing the image
8002 of a CD or DVD disk in the ISO format.
8003 </desc>
8004
8005 </interface>
8006
8007
8008 <!--
8009 // IDVDDrive
8010 /////////////////////////////////////////////////////////////////////////
8011 -->
8012
8013 <interface
8014 name="IDVDDrive" extends="$unknown"
8015 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
8016 wsmap="managed"
8017 >
8018 <desc>
8019 The IDVDDrive interface represents the virtual CD/DVD drive of the
8020 virtual machine. An object of this type is returned by
8021 <link to="IMachine::DVDDrive"/>.
8022 </desc>
8023
8024 <attribute name="state" type="DriveState" readonly="yes">
8025 <desc>Current drive state.</desc>
8026 </attribute>
8027
8028 <attribute name="passthrough" type="boolean">
8029 <desc>
8030 When a host drive is mounted and passthrough is enabled
8031 the guest OS will be able to directly send SCSI commands to
8032 the host drive. This enables the guest OS to use CD/DVD writers
8033 but is potentially dangerous.
8034 </desc>
8035 </attribute>
8036
8037 <method name="mountImage">
8038 <desc>Mounts a CD/DVD image with the specified UUID.</desc>
8039 <param name="imageId" type="uuid" dir="in"/>
8040 </method>
8041
8042 <method name="captureHostDrive">
8043 <desc>Captures the specified host CD/DVD drive.</desc>
8044 <param name="drive" type="IHostDVDDrive" dir="in"/>
8045 </method>
8046
8047 <method name="unmount">
8048 <desc>Unmounts the currently mounted image or host drive.</desc>
8049 </method>
8050
8051 <method name="getImage">
8052 <desc>Returns the currently mounted CD/DVD image.</desc>
8053 <param name="image" type="IDVDImage2" dir="return"/>
8054 </method>
8055
8056 <method name="getHostDrive">
8057 <desc>Returns the currently mounted host CD/DVD drive.</desc>
8058 <param name="drive" type="IHostDVDDrive" dir="return"/>
8059 </method>
8060
8061 </interface>
8062
8063
8064 <!--
8065 // IFloppyDrive
8066 /////////////////////////////////////////////////////////////////////////
8067 -->
8068
8069 <interface
8070 name="IFloppyDrive" extends="$unknown"
8071 uuid="159412cd-bab8-452e-8097-218a020825a6"
8072 wsmap="managed"
8073 >
8074 <desc>
8075 The IFloppyDrive interface represents the virtual floppy drive of the
8076 virtual machine. An object of this type is returned by
8077 <link to="IMachine::floppyDrive" />.
8078 </desc>
8079
8080 <attribute name="enabled" type="boolean">
8081 <desc>
8082 Flag whether the floppy drive is enabled. If it is disabled,
8083 the floppy drive will not be reported to the guest OS.
8084 </desc>
8085 </attribute>
8086
8087 <attribute name="state" type="DriveState" readonly="yes">
8088 <desc>Current drive state.</desc>
8089 </attribute>
8090
8091 <method name="mountImage">
8092 <desc>Mounts a floppy image with the specified UUID.</desc>
8093 <param name="imageId" type="uuid" dir="in"/>
8094 </method>
8095
8096 <method name="captureHostDrive">
8097 <desc>Captures the specified host floppy drive.</desc>
8098 <param name="drive" type="IHostFloppyDrive" dir="in"/>
8099 </method>
8100
8101 <method name="unmount">
8102 <desc>Unmounts the currently mounted image or host drive.</desc>
8103 </method>
8104
8105 <method name="getImage">
8106 <desc>Returns the currently mounted floppy image.</desc>
8107 <param name="image" type="IFloppyImage2" dir="return"/>
8108 </method>
8109
8110 <method name="getHostDrive">
8111 <desc>Returns the currently mounted host floppy drive.</desc>
8112 <param name="drive" type="IHostFloppyDrive" dir="return"/>
8113 </method>
8114
8115 </interface>
8116
8117
8118 <!--
8119 // IKeyboard
8120 /////////////////////////////////////////////////////////////////////////
8121 -->
8122
8123 <interface
8124 name="IKeyboard" extends="$unknown"
8125 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
8126 wsmap="managed"
8127 >
8128 <desc>
8129 The IKeyboard interface represents the virtual machine's keyboard. Used
8130 in <link to="IConsole::keyboard"/>.
8131
8132 Through this interface, the virtual machine's virtual keyboard can be controlled. One
8133 can send keystrokes to the virtual machine and send the Ctrl-Alt-Del sequence to it.
8134 </desc>
8135 <method name="putScancode">
8136 <desc>Sends a scancode to the keyboard.</desc>
8137 <param name="scancode" type="long" dir="in"/>
8138 </method>
8139
8140 <method name="putScancodes">
8141 <desc>Sends an array of scancode to the keyboard.</desc>
8142 <param name="scancodes" type="long" dir="in" safearray="yes"/>
8143 <param name="codesStored" type="unsigned long" dir="return"/>
8144 </method>
8145
8146 <method name="putCAD">
8147 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard.</desc>
8148 </method>
8149
8150 </interface>
8151
8152
8153 <!--
8154 // IMouse
8155 /////////////////////////////////////////////////////////////////////////
8156 -->
8157
8158 <enum
8159 name="MouseButtonState"
8160 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
8161 >
8162 <desc>
8163 Mouse button state.
8164 </desc>
8165
8166 <const name="LeftButton" value="0x01"/>
8167 <const name="RightButton" value="0x02"/>
8168 <const name="MiddleButton" value="0x04"/>
8169 <const name="WheelUp" value="0x08"/>
8170 <const name="WheelDown" value="0x10"/>
8171 <const name="MouseStateMask" value="0x1F"/>
8172 </enum>
8173
8174 <interface
8175 name="IMouse" extends="$unknown"
8176 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
8177 wsmap="managed"
8178 >
8179 <desc>
8180 The IMouse interface represents the virtual machine's mouse. Used in
8181 <link to="IConsole::mouse"/>.
8182
8183 Through this interface, the virtual machine's virtual mouse can be
8184 controlled.
8185 </desc>
8186
8187 <attribute name="absoluteSupported" type="boolean" readonly="yes">
8188 <desc>
8189 Whether the guest OS supports absolute mouse pointer positioning
8190 or not.
8191 <note>
8192 VirtualBox Guest Tools need to be installed to the guest OS
8193 in order to enable absolute mouse positioning support.
8194 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
8195 callback to be instantly informed about changes of this attribute
8196 during virtual machine execution.
8197 </note>
8198 <see><link to="#putMouseEventAbsolute"/></see>
8199 </desc>
8200 </attribute>
8201
8202 <method name="putMouseEvent">
8203 <desc>
8204 Initiates a mouse event using relative pointer movements
8205 along x and y axis.
8206 </desc>
8207
8208 <param name="dx" type="long" dir="in">
8209 <desc>
8210 Amount of pixels the mouse should move to the right.
8211 Negative values move the mouse to the left.
8212 </desc>
8213 </param>
8214 <param name="dy" type="long" dir="in">
8215 <desc>
8216 Amount of pixels the mouse should move downwards.
8217 Negative values move the mouse upwards.
8218 </desc>
8219 </param>
8220 <param name="dz" type="long" dir="in">
8221 <desc>
8222 Amount of mouse wheel moves.
8223 Positive values describe clockwise wheel rotations,
8224 negative values describe counterclockwise rotations.
8225 </desc>
8226 </param>
8227 <param name="buttonState" type="long" dir="in">
8228 <desc>
8229 The current state of mouse buttons. Every bit represents
8230 a mouse button as follows:
8231 <table>
8232 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
8233 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
8234 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
8235 </table>
8236 A value of <tt>1</tt> means the corresponding button is pressed.
8237 otherwise it is released.
8238 </desc>
8239 </param>
8240 </method>
8241
8242 <method name="putMouseEventAbsolute">
8243 <desc>
8244 Positions the mouse pointer using absolute x and y coordinates.
8245 These coordinates are expressed in pixels and
8246 start from <tt>[1,1]</tt> which corresponds to the top left
8247 corner of the virtual display.
8248
8249 <note>
8250 This method will have effect only if absolute mouse
8251 positioning is supported by the guest OS.
8252 </note>
8253
8254 <see><link to="#absoluteSupported"/></see>
8255 </desc>
8256
8257 <param name="x" type="long" dir="in">
8258 <desc>
8259 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
8260 </desc>
8261 </param>
8262 <param name="y" type="long" dir="in">
8263 <desc>
8264 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
8265 </desc>
8266 </param>
8267 <param name="dz" type="long" dir="in">
8268 <desc>
8269 Amount of mouse wheel moves.
8270 Positive values describe clockwise wheel rotations,
8271 negative values describe counterclockwise rotations.
8272 </desc>
8273 </param>
8274 <param name="buttonState" type="long" dir="in">
8275 <desc>
8276 The current state of mouse buttons. Every bit represents
8277 a mouse button as follows:
8278 <table>
8279 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
8280 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
8281 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
8282 </table>
8283 A value of <tt>1</tt> means the corresponding button is pressed.
8284 otherwise it is released.
8285 </desc>
8286 </param>
8287 </method>
8288
8289 </interface>
8290
8291 <!--
8292 // IDisplay
8293 /////////////////////////////////////////////////////////////////////////
8294 -->
8295
8296 <enum
8297 name="FramebufferAccelerationOperation"
8298 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
8299 >
8300 <desc>
8301 Frame buffer acceleration operation.
8302 </desc>
8303
8304 <const name="SolidFillAcceleration" value="1"/>
8305 <const name="ScreenCopyAcceleration" value="2"/>
8306 </enum>
8307
8308 <enum
8309 name="FramebufferPixelFormat"
8310 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
8311 >
8312 <desc>
8313 Format of the video memory buffer. Constants represented by this enum can
8314 be used to test for particular values of <link
8315 to="IFramebuffer::pixelFormat"/>. See also <link
8316 to="IFramebuffer::requestResize()"/>.
8317
8318 See also www.fourcc.org for more information about FOURCC pixel formats.
8319 </desc>
8320
8321 <const name="Opaque" value="0xFFFFFFFF">
8322 <desc>
8323 Unknown buffer format. The user may not assume any particular
8324 format of the buffer.
8325 </desc>
8326 </const>
8327 <const name="FOURCC_RGB" value="0x32424752">
8328 <desc>
8329 Basic RGB format. <link to="IFramebuffer::bitsPerPixel"/> determines
8330 the bit layout.
8331 </desc>
8332 </const>
8333 </enum>
8334
8335 <interface
8336 name="IFramebuffer" extends="$unknown"
8337 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
8338 wsmap="suppress"
8339 >
8340 <attribute name="address" type="octet" mod="ptr" readonly="yes">
8341 <desc>Address of the start byte of the frame buffer.</desc>
8342 </attribute>
8343
8344 <attribute name="width" type="unsigned long" readonly="yes">
8345 <desc>Frame buffer width, in pixels.</desc>
8346 </attribute>
8347
8348 <attribute name="height" type="unsigned long" readonly="yes">
8349 <desc>Frame buffer height, in pixels.</desc>
8350 </attribute>
8351
8352 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8353 <desc>
8354 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
8355 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
8356 are: 8, 15, 16, 24 and 32.
8357 </desc>
8358 </attribute>
8359
8360 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
8361 <desc>
8362 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
8363 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
8364 size of the scan line must be aligned to 32 bits.
8365 </desc>
8366 </attribute>
8367
8368 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
8369 <desc>
8370 Frame buffer pixel format. It's either one of the values defined by <link
8371 to="FramebufferPixelFormat"/> or a raw FOURCC code.
8372 <note>
8373 This attribute must never return <link
8374 to="PixelFormat::Opaque"/> -- the format of the buffer
8375 <link to="#address"/> points to must be always known.
8376 </note>
8377 </desc>
8378 </attribute>
8379
8380 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
8381 <desc>
8382 Defines whether this frame buffer uses the virtual video card's memory
8383 buffer (guest VRAM) directly or not. See <link
8384 to="IFramebuffer::requestResize()"/> for more information.
8385 </desc>
8386 </attribute>
8387
8388 <attribute name="heightReduction" type="unsigned long" readonly="yes">
8389 <desc>
8390 Hint from the frame buffer about how much of the standard
8391 screen height it wants to use for itself. This information is
8392 exposed to the guest through the VESA BIOS and VMMDev interface
8393 so that it can use it for determining its video mode table. It
8394 is not guaranteed that the guest respects the value.
8395 </desc>
8396 </attribute>
8397
8398 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
8399 <desc>
8400 An alpha-blended overlay which is superposed over the frame buffer.
8401 The initial purpose is to allow the display of icons providing
8402 information about the VM state, including disk activity, in front
8403 ends which do not have other means of doing that. The overlay is
8404 designed to controlled exclusively by IDisplay. It has no locking
8405 of its own, and any changes made to it are not guaranteed to be
8406 visible until the affected portion of IFramebuffer is updated. The
8407 overlay can be created lazily the first time it is requested. This
8408 attribute can also return NULL to signal that the overlay is not
8409 implemented.
8410 </desc>
8411 </attribute>
8412
8413 <attribute name="winId" type="unsigned long long" readonly="yes">
8414 <desc>
8415 Platform-dependent identifier of the window where context of this
8416 frame buffer is drawn, or zero if there's no such window.
8417 </desc>
8418 </attribute>
8419
8420 <method name="lock">
8421 <desc>
8422 Locks the frame buffer.
8423 Gets called by the IDisplay object where this frame buffer is
8424 bound to.
8425 </desc>
8426 </method>
8427
8428 <method name="unlock">
8429 <desc>
8430 Unlocks the frame buffer.
8431 Gets called by the IDisplay object where this frame buffer is
8432 bound to.
8433 </desc>
8434 </method>
8435
8436 <method name="notifyUpdate">
8437 <desc>
8438 Informs about an update.
8439 Gets called by the display object where this buffer is
8440 registered.
8441 </desc>
8442 <param name="x" type="unsigned long" dir="in"/>
8443 <param name="y" type="unsigned long" dir="in"/>
8444 <param name="width" type="unsigned long" dir="in"/>
8445 <param name="height" type="unsigned long" dir="in"/>
8446 <param name="finished" type="boolean" dir="return"/>
8447 </method>
8448
8449 <method name="requestResize">
8450 <desc>
8451 Requests a size and pixel format change.
8452
8453 There are two modes of working with the video buffer of the virtual
8454 machine. The <i>indirect</i> mode implies that the IFramebuffer
8455 implementation allocates a memory buffer for the requested display mode
8456 and provides it to the virtual machine. In <i>direct</i> mode, the
8457 IFramebuffer implementation uses the memory buffer allocated and owned
8458 by the virtual machine. This buffer represents the video memory of the
8459 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
8460 usually faster because the implementation gets a raw pointer to the
8461 guest VRAM buffer which it can directly use for visualizing the contents
8462 of the virtual display, as opposed to the indirect mode where the
8463 contents of guest VRAM are copied to the memory buffer provided by
8464 the implementation every time a display update occurs.
8465
8466 It is important to note that the direct mode is really fast only when
8467 the implementation uses the given guest VRAM buffer directly, for
8468 example, by blitting it to the window representing the virtual machine's
8469 display, which saves at least one copy operation comparing to the
8470 indirect mode. However, using the guest VRAM buffer directly is not
8471 always possible: the format and the color depth of this buffer may be
8472 not supported by the target window, or it may be unknown (opaque) as in
8473 case of text or non-linear multi-plane VGA video modes. In this case,
8474 the indirect mode (that is always available) should be used as a
8475 fallback: when the guest VRAM contents are copied to the
8476 implementation-provided memory buffer, color and format conversion is
8477 done automatically by the underlying code.
8478
8479 The @a pixelFormat parameter defines whether the direct mode is
8480 available or not. If @a pixelFormat is <link
8481 to="PixelFormat::Opaque"/> then direct access to the guest
8482 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
8483 bytesPerLine parameters must be ignored and the implementation must use
8484 the indirect mode (where it provides its own buffer in one of the
8485 supported formats). In all other cases, @a pixelFormat together with @a
8486 bitsPerPixel and @a bytesPerLine define the format of the video memory
8487 buffer pointed to by the @a VRAM parameter and the implementation is
8488 free to choose which mode to use. To indicate that this frame buffer uses
8489 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
8490 attribute must return <tt>true</tt> and <link to="#address"/> must
8491 return exactly the same address that is passed in the @a VRAM parameter
8492 of this method; otherwise it is assumed that the indirect strategy is
8493 chosen.
8494
8495 The @a width and @a height parameters represent the size of the
8496 requested display mode in both modes. In case of indirect mode, the
8497 provided memory buffer should be big enough to store data of the given
8498 display mode. In case of direct mode, it is guaranteed that the given @a
8499 VRAM buffer contains enough space to represent the display mode of the
8500 given size. Note that this frame buffer's <link to="#width"/> and <link
8501 to="#height"/> attributes must return exactly the same values as
8502 passed to this method after the resize is completed (see below).
8503
8504 The @a finished output parameter determines if the implementation has
8505 finished resizing the frame buffer or not. If, for some reason, the
8506 resize cannot be finished immediately during this call, @a finished
8507 must be set to @c false, and the implementation must call
8508 <link to="IDisplay::resizeCompleted()"/> after it has returned from
8509 this method as soon as possible. If @a finished is @c false, the
8510 machine will not call any frame buffer methods until
8511 <link to="IDisplay::resizeCompleted()"/> is called.
8512
8513 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
8514 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
8515 this frame buffer must return exactly the same values as specified in the
8516 parameters of this method, after the resize is completed. If the
8517 indirect mode is chosen, these attributes must return values describing
8518 the format of the implementation's own memory buffer <link
8519 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
8520 value must always correlate with <link to="#pixelFormat"/>. Note that
8521 the <link to="#pixelFormat"/> attribute must never return <link
8522 to="PixelFormat::Opaque"/> regardless of the selected mode.
8523
8524 <note>
8525 This method is called by the IDisplay object under the
8526 <link to="#lock()"/> provided by this IFramebuffer
8527 implementation. If this method returns @c false in @a finished, then
8528 this lock is not released until
8529 <link to="IDisplay::resizeCompleted()"/> is called.
8530 </note>
8531 </desc>
8532 <param name="screenId" type="unsigned long" dir="in">
8533 <desc>
8534 Logical screen number. Must be used in the corresponding call to
8535 <link to="IDisplay::resizeCompleted()"/> if this call is made.
8536 </desc>
8537 </param>
8538 <param name="pixelFormat" type="unsigned long" dir="in">
8539 <desc>
8540 Pixel format of the memory buffer pointed to by @a VRAM.
8541 See also <link to="FramebufferPixelFormat"/>.
8542 </desc>
8543 </param>
8544 <param name="VRAM" type="octet" mod="ptr" dir="in">
8545 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
8546 </param>
8547 <param name="bitsPerPixel" type="unsigned long" dir="in">
8548 <desc>Color depth, bits per pixel.</desc>
8549 </param>
8550 <param name="bytesPerLine" type="unsigned long" dir="in">
8551 <desc>Size of one scan line, in bytes.</desc>
8552 </param>
8553 <param name="width" type="unsigned long" dir="in">
8554 <desc>Width of the guest display, in pixels.</desc>
8555 </param>
8556 <param name="height" type="unsigned long" dir="in">
8557 <desc>Height of the guest display, in pixels.</desc>
8558 </param>
8559 <param name="finished" type="boolean" dir="return">
8560 <desc>
8561 Can the VM start using the new frame buffer immediately
8562 after this method returns or it should wait for
8563 <link to="IDisplay::resizeCompleted()"/>.
8564 </desc>
8565 </param>
8566 </method>
8567
8568 <method name="operationSupported">
8569 <desc>
8570 Returns whether the given acceleration operation is supported
8571 by the IFramebuffer implementation. If not, the display object
8572 will not attempt to call the corresponding IFramebuffer entry
8573 point. Even if an operation is indicated to supported, the
8574 IFramebuffer implementation always has the option to return non
8575 supported from the corresponding acceleration method in which
8576 case the operation will be performed by the display engine. This
8577 allows for reduced IFramebuffer implementation complexity where
8578 only common cases are handled.
8579 </desc>
8580 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
8581 <param name="supported" type="boolean" dir="return"/>
8582 </method>
8583
8584 <method name="videoModeSupported">
8585 <desc>
8586 Returns whether the frame buffer implementation is willing to
8587 support a given video mode. In case it is not able to render
8588 the video mode (or for some reason not willing), it should
8589 return false. Usually this method is called when the guest
8590 asks the VMM device whether a given video mode is supported
8591 so the information returned is directly exposed to the guest.
8592 It is important that this method returns very quickly.
8593 </desc>
8594 <param name="width" type="unsigned long" dir="in"/>
8595 <param name="height" type="unsigned long" dir="in"/>
8596 <param name="bpp" type="unsigned long" dir="in"/>
8597 <param name="supported" type="boolean" dir="return"/>
8598 </method>
8599
8600 <method name="solidFill">
8601 <desc>
8602 Fills the specified rectangle on screen with a solid color.
8603 </desc>
8604 <param name="x" type="unsigned long" dir="in"/>
8605 <param name="y" type="unsigned long" dir="in"/>
8606 <param name="width" type="unsigned long" dir="in"/>
8607 <param name="height" type="unsigned long" dir="in"/>
8608 <param name="color" type="unsigned long" dir="in"/>
8609 <param name="handled" type="boolean" dir="return"/>
8610 </method>
8611
8612 <method name="copyScreenBits">
8613 <desc>
8614 Copies specified rectangle on the screen.
8615 </desc>
8616 <param name="xDst" type="unsigned long" dir="in"/>
8617 <param name="yDst" type="unsigned long" dir="in"/>
8618 <param name="xSrc" type="unsigned long" dir="in"/>
8619 <param name="ySrc" type="unsigned long" dir="in"/>
8620 <param name="width" type="unsigned long" dir="in"/>
8621 <param name="height" type="unsigned long" dir="in"/>
8622 <param name="handled" type="boolean" dir="return"/>
8623 </method>
8624
8625 <method name="getVisibleRegion">
8626 <desc>
8627 Returns the visible region of this frame buffer.
8628
8629 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
8630 @a count parameter is ignored and the number of elements necessary to
8631 describe the current visible region is returned in @a countCopied.
8632
8633 If @a rectangles is not <tt>NULL</tt> but @a count is less
8634 than the required number of elements to store region data, the method
8635 will report a failure. If @a count is equal or greater than the
8636 required number of elements, then the actual number of elements copied
8637 to the provided array will be returned in @a countCopied.
8638
8639 <note>
8640 The address of the provided array must be in the process space of
8641 this IFramebuffer object.
8642 </note>
8643 </desc>
8644 <param name="rectangles" type="octet" mod="ptr" dir="in">
8645 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
8646 </param>
8647 <param name="count" type="unsigned long" dir="in">
8648 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8649 </param>
8650 <param name="countCopied" type="unsigned long" dir="return">
8651 <desc>Number of elements copied to the @a rectangles array.</desc>
8652 </param>
8653 </method>
8654
8655 <method name="setVisibleRegion">
8656 <desc>
8657 Suggests a new visible region to this frame buffer. This region
8658 represents the area of the VM display which is a union of regions of
8659 all top-level windows of the guest operating system running inside the
8660 VM (if the Guest Additions for this system support this
8661 functionality). This information may be used by the frontends to
8662 implement the seamless desktop integration feature.
8663
8664 <note>
8665 The address of the provided array must be in the process space of
8666 this IFramebuffer object.
8667 </note>
8668 <note>
8669 The IFramebuffer implementation must make a copy of the provided
8670 array of rectangles.
8671 </note>
8672 </desc>
8673 <param name="rectangles" type="octet" mod="ptr" dir="in">
8674 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
8675 </param>
8676 <param name="count" type="unsigned long" dir="in">
8677 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8678 </param>
8679 </method>
8680
8681 </interface>
8682
8683 <interface
8684 name="IFramebufferOverlay" extends="IFrameBuffer"
8685 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
8686 wsmap="suppress"
8687 >
8688 <desc>
8689 The IFramebufferOverlay interface represents an alpha blended overlay
8690 for displaying status icons above an IFramebuffer. It is always created
8691 not visible, so that it must be explicitly shown. It only covers a
8692 portion of the IFramebuffer, determined by its width, height and
8693 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
8694 that order) format, and may be written to directly. Do re-read the
8695 width though, after setting it, as it may be adjusted (increased) to
8696 make it more suitable for the front end.
8697 </desc>
8698 <attribute name="x" type="unsigned long" readonly="yes">
8699 <desc>X position of the overlay, relative to the frame buffer.</desc>
8700 </attribute>
8701
8702 <attribute name="y" type="unsigned long" readonly="yes">
8703 <desc>Y position of the overlay, relative to the frame buffer.</desc>
8704 </attribute>
8705
8706 <attribute name="visible" type="boolean" readonly="no">
8707 <desc>
8708 Whether the overlay is currently visible.
8709 </desc>
8710 </attribute>
8711
8712 <attribute name="alpha" type="unsigned long" readonly="no">
8713 <desc>
8714 The global alpha value for the overlay. This may or may not be
8715 supported by a given front end.
8716 </desc>
8717 </attribute>
8718
8719 <method name="move">
8720 <desc>
8721 Changes the overlay's position relative to the IFramebuffer.
8722 </desc>
8723 <param name="x" type="unsigned long" dir="in"/>
8724 <param name="y" type="unsigned long" dir="in"/>
8725 </method>
8726
8727 </interface>
8728
8729 <interface
8730 name="IDisplay" extends="$unknown"
8731 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
8732 wsmap="suppress"
8733 >
8734 <desc>
8735 The IDisplay interface represents the virtual machine's display.
8736
8737 The object implementing this interface is contained in each
8738 <link to="IConsole::display"/> attribute and represents the visual
8739 output of the virtual machine.
8740
8741 The virtual display supports pluggable output targets represented by the
8742 IFramebuffer interface. Examples of the output target are a window on
8743 the host computer or an RDP session's display on a remote computer.
8744 </desc>
8745 <attribute name="width" type="unsigned long" readonly="yes">
8746 <desc>Current display width.</desc>
8747 </attribute>
8748
8749 <attribute name="height" type="unsigned long" readonly="yes">
8750 <desc>Current display height.</desc>
8751 </attribute>
8752
8753 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8754 <desc>
8755 Current guest display color depth. Note that this may differ
8756 from <link to="IFramebuffer::bitsPerPixel"/>.
8757 </desc>
8758 </attribute>
8759
8760 <method name="setupInternalFramebuffer">
8761 <desc>
8762 Prepares an internally managed frame buffer.
8763 </desc>
8764 <param name="depth" type="unsigned long" dir="in"/>
8765 </method>
8766
8767 <method name="lockFramebuffer">
8768 <desc>
8769 Requests access to the internal frame buffer.
8770 </desc>
8771 <param name="address" type="octet" mod="ptr" dir="return"/>
8772 </method>
8773
8774 <method name="unlockFramebuffer">
8775 <desc>
8776 Releases access to the internal frame buffer.
8777 </desc>
8778 </method>
8779
8780 <method name="registerExternalFramebuffer">
8781 <desc>
8782 Registers an external frame buffer.
8783 </desc>
8784 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8785 </method>
8786
8787 <method name="setFramebuffer">
8788 <desc>
8789 Sets the framebuffer for given screen.
8790 </desc>
8791 <param name="screenId" type="unsigned long" dir="in"/>
8792 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8793 </method>
8794
8795 <method name="getFramebuffer">
8796 <desc>
8797 Queries the framebuffer for given screen.
8798 </desc>
8799 <param name="screenId" type="unsigned long" dir="in"/>
8800 <param name="framebuffer" type="IFramebuffer" dir="out"/>
8801 <param name="xOrigin" type="long" dir="out"/>
8802 <param name="yOrigin" type="long" dir="out"/>
8803 </method>
8804
8805 <method name="setVideoModeHint">
8806 <desc>
8807 Asks VirtualBox to request the given video mode from
8808 the guest. This is just a hint and it cannot be guaranteed
8809 that the requested resolution will be used. Guest Additions
8810 are required for the request to be seen by guests. The caller
8811 should issue the request and wait for a resolution change and
8812 after a timeout retry.
8813
8814 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
8815 parameters means that the corresponding values should be taken from the
8816 current video mode (i.e. left unchanged).
8817
8818 If the guest OS supports multi-monitor configuration then the @a display
8819 parameter specifies the number of the guest display to send the hint to:
8820 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
8821 so on. If the multi-monitor configuration is not supported, @a display
8822 must be <tt>0</tt>.
8823
8824 </desc>
8825 <param name="width" type="unsigned long" dir="in"/>
8826 <param name="height" type="unsigned long" dir="in"/>
8827 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
8828 <param name="display" type="unsigned long" dir="in"/>
8829 </method>
8830
8831 <method name="setSeamlessMode">
8832 <desc>
8833 Enables or disables seamless guest display rendering (seamless desktop
8834 integration) mode.
8835 <note>
8836 Calling this method has no effect if <link
8837 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
8838 </note>
8839 </desc>
8840 <param name="enabled" type="boolean" dir="in"/>
8841 </method>
8842
8843 <method name="takeScreenShot">
8844 <desc>
8845 Takes a screen shot of the requested size and copies it to the
8846 32-bpp buffer allocated by the caller.
8847 </desc>
8848 <param name="address" type="octet" mod="ptr" dir="in"/>
8849 <param name="width" type="unsigned long" dir="in"/>
8850 <param name="height" type="unsigned long" dir="in"/>
8851 </method>
8852
8853 <method name="drawToScreen">
8854 <desc>
8855 Draws a 32-bpp image of the specified size from the given buffer
8856 to the given point on the VM display.
8857 </desc>
8858 <param name="address" type="octet" mod="ptr" dir="in"/>
8859 <param name="x" type="unsigned long" dir="in"/>
8860 <param name="y" type="unsigned long" dir="in"/>
8861 <param name="width" type="unsigned long" dir="in"/>
8862 <param name="height" type="unsigned long" dir="in"/>
8863 </method>
8864
8865 <method name="invalidateAndUpdate">
8866 <desc>
8867 Does a full invalidation of the VM display and instructs the VM
8868 to update it.
8869 </desc>
8870 </method>
8871
8872 <method name="resizeCompleted">
8873 <desc>
8874 Signals that a framebuffer has completed the resize operation.
8875 </desc>
8876 <param name="screenId" type="unsigned long" dir="in"/>
8877 </method>
8878
8879 <method name="updateCompleted">
8880 <desc>
8881 Signals that a framebuffer has completed the update operation.
8882 </desc>
8883 </method>
8884
8885 </interface>
8886
8887 <!--
8888 // INetworkAdapter
8889 /////////////////////////////////////////////////////////////////////////
8890 -->
8891
8892 <enum
8893 name="NetworkAttachmentType"
8894 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
8895 >
8896 <desc>
8897 Network attachment type.
8898 </desc>
8899
8900 <const name="Null" value="0">
8901 <desc><tt>null</tt> value. Also means "not attached".</desc>
8902 </const>
8903 <const name="NAT" value="1"/>
8904 <const name="HostInterface" value="2"/>
8905 <const name="Internal" value="3"/>
8906 </enum>
8907
8908 <enum
8909 name="NetworkAdapterType"
8910 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
8911 >
8912 <desc>
8913 Network adapter type.
8914 </desc>
8915
8916 <const name="Null" value="0">
8917 <desc><tt>null</tt> value. Never used by the API.</desc>
8918 </const>
8919 <const name="Am79C970A" value="1"/>
8920 <const name="Am79C973" value="2"/>
8921 <const name="I82540EM" value="3"/>
8922 <const name="I82543GC" value="4"/>
8923 </enum>
8924
8925 <interface
8926 name="INetworkAdapter" extends="$unknown"
8927 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
8928 wsmap="managed"
8929 >
8930 <attribute name="adapterType" type="NetworkAdapterType">
8931 <desc>
8932 Type of the virtual network adapter. Depending on this value,
8933 VirtualBox will provide a different virtual network hardware
8934 to the guest.
8935 </desc>
8936 </attribute>
8937
8938 <attribute name="slot" type="unsigned long" readonly="yes">
8939 <desc>
8940 Slot number this adapter is plugged into. Corresponds to
8941 the value you pass to <link to="IMachine::getNetworkAdapter"/>
8942 to obtain this instance.
8943 </desc>
8944 </attribute>
8945
8946 <attribute name="enabled" type="boolean">
8947 <desc>
8948 Flag whether the network adapter is present in the
8949 guest system. If disabled, the virtual guest hardware will
8950 not contain this network adapter. Can only be changed when
8951 the VM is not running.
8952 </desc>
8953 </attribute>
8954
8955 <attribute name="MACAddress" type="wstring">
8956 <desc>
8957 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
8958 it to NULL, VirtualBox will generate a unique MAC address.
8959 </desc>
8960 </attribute>
8961
8962 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
8963
8964 <attribute name="hostInterface" type="wstring">
8965 <desc>
8966 Name of the Host Network Interface that is currently in use. NULL will be returned
8967 if no device has been allocated. On Linux, setting this refers to a permanent TAP
8968 device. However, a file descriptor has precedence over the interface name on Linux.
8969 Note that when VirtualBox allocates a TAP device, this property will not be set, i.e. the
8970 interface name would have to be determined using the file descriptor and /proc/self/fd.
8971 </desc>
8972 </attribute>
8973
8974<if target="xpidl">
8975 <attribute name="TAPFileDescriptor" type="long">
8976 <desc>
8977 File descriptor of the TAP device. It can either be setup by the caller
8978 which has to supply an existing valid file handle allocated in the parent
8979 process of the VM process or allocated by VirtualBox. The value is -1 if it
8980 has not been defined. This property is non persistent, i.e. it will not be
8981 stored in the VM's configuration data and thus has to be set at each startup.
8982 </desc>
8983 </attribute>
8984 <attribute name="TAPSetupApplication" type="wstring">
8985 <desc>
8986 Application to start to configure the TAP device.
8987 It is being passed two parameters, 1) the file handle (as ASCII),
8988 2) the TAP device name if it is available.
8989 </desc>
8990 </attribute>
8991 <attribute name="TAPTerminateApplication" type="wstring">
8992 <desc>
8993 Application to start before closing a TAP device.
8994 It is being passed two parameters, 1) the file handle (as ASCII),
8995 2) the TAP device name if it is available.
8996 </desc>
8997 </attribute>
8998</if>
8999
9000 <attribute name="internalNetwork" type="wstring">
9001 <desc>
9002 Name of the internal network the VM is attached to.
9003 </desc>
9004 </attribute>
9005
9006 <attribute name="NATNetwork" type="wstring">
9007 <desc>
9008 Name of the NAT network the VM is attached to.
9009 </desc>
9010 </attribute>
9011
9012 <attribute name="cableConnected" type="boolean">
9013 <desc>
9014 Flag whether the adapter reports the cable as connected or not.
9015 It can be used to report offline situations to a VM.
9016 </desc>
9017 </attribute>
9018
9019 <attribute name="lineSpeed" type="unsigned long">
9020 <desc>
9021 Line speed reported by custom drivers, in units of 1 kbps.
9022 </desc>
9023 </attribute>
9024
9025 <attribute name="traceEnabled" type="boolean">
9026 <desc>
9027 Flag whether network traffic from/to the network card should be traced.
9028 Can only be toggled when the VM is turned off.
9029 </desc>
9030 </attribute>
9031
9032 <attribute name="traceFile" type="wstring">
9033 <desc>
9034 Filename where a network trace will be stored. If not set, VBox-pid.pcap
9035 will be used.
9036 </desc>
9037 </attribute>
9038
9039 <method name="attachToNAT">
9040 <desc>
9041 Attach the network adapter to the Network Address Translation (NAT) interface.
9042 </desc>
9043 </method>
9044
9045 <method name="attachToHostInterface">
9046 <desc>
9047 Attach the network adapter to a host interface. On Linux, the TAP
9048 setup application will be executed if configured and unless a device
9049 name and/or file descriptor has been set, a new TAP interface will be
9050 created.
9051 </desc>
9052 </method>
9053
9054 <method name="attachToInternalNetwork">
9055 <desc>
9056 Attach the network adapter to an internal network.
9057 </desc>
9058 </method>
9059
9060 <method name="detach">
9061 <desc>
9062 Detach the network adapter
9063 </desc>
9064 </method>
9065 </interface>
9066
9067
9068 <!--
9069 // ISerialPort
9070 /////////////////////////////////////////////////////////////////////////
9071 -->
9072
9073 <enum
9074 name="PortMode"
9075 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
9076 >
9077 <desc>
9078 The PortMode enumeration represents possible communication modes for
9079 the virtual serial port device.
9080 </desc>
9081
9082 <const name="Disconnected" value="0">
9083 <desc>Virtual device is not attached to any real host device.</desc>
9084 </const>
9085 <const name="HostPipe" value="1">
9086 <desc>Virtual device is attached to a host pipe.</desc>
9087 </const>
9088 <const name="HostDevice" value="2">
9089 <desc>Virtual device is attached to a host device.</desc>
9090 </const>
9091 </enum>
9092
9093 <interface
9094 name="ISerialPort" extends="$unknown"
9095 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
9096 wsmap="managed"
9097 >
9098
9099 <desc>
9100 The ISerialPort interface represents the virtual serial port device.
9101
9102 The virtual serial port device acts like an ordinary serial port
9103 inside the virtual machine. This device communicates to the real
9104 serial port hardware in one of two modes: host pipe or host device.
9105
9106 In host pipe mode, the #path attribute specifies the path to the pipe on
9107 the host computer that represents a serial port. The #server attribute
9108 determines if this pipe is created by the virtual machine process at
9109 machine startup or it must already exist before starting machine
9110 execution.
9111
9112 In host device mode, the #path attribute specifies the name of the
9113 serial port device on the host computer.
9114
9115 There is also a third communication mode: the disconnected mode. In this
9116 mode, the guest OS running inside the virtual machine will be able to
9117 detect the serial port, but all port write operations will be discarded
9118 and all port read operations will return no data.
9119
9120 <see>IMachine::getSerialPort</see>
9121 </desc>
9122
9123 <attribute name="slot" type="unsigned long" readonly="yes">
9124 <desc>
9125 Slot number this serial port is plugged into. Corresponds to
9126 the value you pass to <link to="IMachine::getSerialPort"/>
9127 to obtain this instance.
9128 </desc>
9129 </attribute>
9130
9131 <attribute name="enabled" type="boolean">
9132 <desc>
9133 Flag whether the serial port is enabled. If disabled,
9134 the serial port will not be reported to the guest OS.
9135 </desc>
9136 </attribute>
9137
9138 <attribute name="IOBase" type="unsigned long">
9139 <desc>Base I/O address of the serial port.</desc>
9140 </attribute>
9141
9142 <attribute name="IRQ" type="unsigned long">
9143 <desc>IRQ number of the serial port.</desc>
9144 </attribute>
9145
9146 <attribute name="hostMode" type="PortMode">
9147 <desc>
9148 How is this port connected to the host.
9149 <note>
9150 Changing this attribute may fail if the conditions for
9151 <link to="#path"/> are not met.
9152 </note>
9153 </desc>
9154 </attribute>
9155
9156 <attribute name="server" type="boolean">
9157 <desc>
9158 Flag whether this serial port acts as a server (creates a new pipe on
9159 the host) or as a client (uses the existing pipe). This attribute is
9160 used only when <link to="#hostMode"/> is PortMode::HostPipe.
9161 </desc>
9162 </attribute>
9163
9164 <attribute name="path" type="wstring">
9165 <desc>
9166 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
9167 PortMode::HostPipe, or the host serial device name when
9168 <link to="#hostMode"/> is PortMode::HostDevice. In either of the above
9169 cases, setting a @c null or an empty string as the attribute's value
9170 will result into an error. Otherwise, the value of this property is
9171 ignored.
9172 </desc>
9173 </attribute>
9174
9175 </interface>
9176
9177 <!--
9178 // IParallelPort
9179 /////////////////////////////////////////////////////////////////////////
9180 -->
9181
9182 <interface
9183 name="IParallelPort" extends="$unknown"
9184 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
9185 wsmap="managed"
9186 >
9187
9188 <desc>
9189 The IParallelPort interface represents the virtual parallel port device.
9190
9191 The virtual parallel port device acts like an ordinary parallel port
9192 inside the virtual machine. This device communicates to the real
9193 parallel port hardware using the name of the parallel device on the host
9194 computer specified in the #path attribute.
9195
9196 Each virtual parallel port device is assigned a base I/O address and an
9197 IRQ number that will be reported to the guest operating system and used
9198 to operate the given parallel port from within the virtual machine.
9199
9200 <see>IMachine::getParallelPort</see>
9201 </desc>
9202
9203 <attribute name="slot" type="unsigned long" readonly="yes">
9204 <desc>
9205 Slot number this parallel port is plugged into. Corresponds to
9206 the value you pass to <link to="IMachine::getParallelPort"/>
9207 to obtain this instance.
9208 </desc>
9209 </attribute>
9210
9211 <attribute name="enabled" type="boolean">
9212 <desc>
9213 Flag whether the parallel port is enabled. If disabled,
9214 the parallel port will not be reported to the guest OS.
9215 </desc>
9216 </attribute>
9217
9218 <attribute name="IOBase" type="unsigned long">
9219 <desc>Base I/O address of the parallel port.</desc>
9220 </attribute>
9221
9222 <attribute name="IRQ" type="unsigned long">
9223 <desc>IRQ number of the parallel port.</desc>
9224 </attribute>
9225
9226 <attribute name="path" type="wstring">
9227 <desc>
9228 Host parallel device name. If this parallel port is enabled, setting a
9229 @c null or an empty string as this attribute's value will result into
9230 an error.
9231 </desc>
9232 </attribute>
9233
9234 </interface>
9235
9236
9237 <!--
9238 // IMachineDebugger
9239 /////////////////////////////////////////////////////////////////////////
9240 -->
9241
9242 <interface
9243 name="IMachineDebugger" extends="$unknown"
9244 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
9245 wsmap="suppress"
9246 >
9247 <method name="resetStats">
9248 <desc>
9249 Reset VM statistics.
9250 </desc>
9251 <param name="pattern" type="wstring" dir="in">
9252 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9253 </param>
9254 </method>
9255
9256 <method name="dumpStats">
9257 <desc>
9258 Dumps VM statistics.
9259 </desc>
9260 <param name="pattern" type="wstring" dir="in">
9261 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9262 </param>
9263 </method>
9264
9265 <method name="getStats">
9266 <desc>
9267 Get the VM statistics in a XMLish format.
9268 </desc>
9269 <param name="pattern" type="wstring" dir="in">
9270 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9271 </param>
9272 <param name="withDescriptions" type="boolean" dir="in">
9273 <desc>Whether to include the descriptions.</desc>
9274 </param>
9275 <param name="stats" type="wstring" dir="out">
9276 <desc>The XML document containing the statistics.</desc>
9277 </param>
9278 </method>
9279
9280 <method name="injectNMI">
9281 <desc>
9282 Inject an NMI into a running VT-x/AMD-V VM.
9283 </desc>
9284 </method>
9285
9286 <attribute name="singlestep" type="boolean">
9287 <desc>Switch for enabling singlestepping.</desc>
9288 </attribute>
9289
9290 <attribute name="recompileUser" type="boolean">
9291 <desc>Switch for forcing code recompilation for user mode code.</desc>
9292 </attribute>
9293
9294 <attribute name="recompileSupervisor" type="boolean">
9295 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
9296 </attribute>
9297
9298 <attribute name="PATMEnabled" type="boolean">
9299 <desc>Switch for enabling and disabling the PATM component.</desc>
9300 </attribute>
9301
9302 <attribute name="CSAMEnabled" type="boolean">
9303 <desc>Switch for enabling and disabling the CSAM component.</desc>
9304 </attribute>
9305
9306 <attribute name="logEnabled" type="boolean">
9307 <desc>Switch for enabling and disabling logging.</desc>
9308 </attribute>
9309
9310 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
9311 <desc>
9312 Flag indicating whether the VM is currently making use of CPU hardware
9313 virtualization extensions.
9314 </desc>
9315 </attribute>
9316
9317 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
9318 <desc>
9319 Flag indicating whether the VM is currently making use of the nested paging
9320 CPU hardware virtualization extension.
9321 </desc>
9322 </attribute>
9323
9324 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
9325 <desc>
9326 Flag indicating whether the VM is currently making use of the VPID
9327 VT-x extension.
9328 </desc>
9329 </attribute>
9330
9331 <attribute name="PAEEnabled" type="boolean" readonly="yes">
9332 <desc>
9333 Flag indicating whether the VM is currently making use of the Physical
9334 Address Extension CPU feature.
9335 </desc>
9336 </attribute>
9337
9338 <attribute name="virtualTimeRate" type="unsigned long">
9339 <desc>
9340 The rate at which the virtual time runs expressed as a percentage.
9341 The accepted range is 2% to 20000%.
9342 </desc>
9343 </attribute>
9344
9345 <!-- @todo method for setting log flags, groups and destination! -->
9346
9347 <attribute name="VM" type="unsigned long long" readonly="yes">
9348 <desc>
9349 Gets the VM handle. This is only for internal use while
9350 we carve the details of this interface.
9351 </desc>
9352 </attribute>
9353
9354 </interface>
9355
9356 <!--
9357 // IUSBController
9358 /////////////////////////////////////////////////////////////////////////
9359 -->
9360
9361 <interface
9362 name="IUSBController" extends="$unknown"
9363 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
9364 wsmap="managed"
9365 >
9366 <attribute name="enabled" type="boolean">
9367 <desc>
9368 Flag whether the USB controller is present in the
9369 guest system. If disabled, the virtual guest hardware will
9370 not contain any USB controller. Can only be changed when
9371 the VM is powered off.
9372 </desc>
9373 </attribute>
9374
9375 <attribute name="enabledEhci" type="boolean">
9376 <desc>
9377 Flag whether the USB EHCI controller is present in the
9378 guest system. If disabled, the virtual guest hardware will
9379 not contain a USB EHCI controller. Can only be changed when
9380 the VM is powered off.
9381 </desc>
9382 </attribute>
9383
9384 <attribute name="USBStandard" type="unsigned short" readonly="yes">
9385 <desc>
9386 USB standard version which the controller implements.
9387 This is a BCD which means that the major version is in the
9388 high byte and minor version is in the low byte.
9389 </desc>
9390 </attribute>
9391
9392 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
9393 <desc>
9394 List of USB device filters associated with the machine.
9395
9396 If the machine is currently running, these filters are activated
9397 every time a new (supported) USB device is attached to the host
9398 computer that was not ignored by global filters
9399 (<link to="IHost::USBDeviceFilters"/>).
9400
9401 These filters are also activated when the machine is powered up.
9402 They are run against a list of all currently available USB
9403 devices (in states
9404 <link to="USBDeviceState::Available">Available</link>,
9405 <link to="USBDeviceState::Busy">Busy</link>,
9406 <link to="USBDeviceState::Held">Held</link>) that were not previously
9407 ignored by global filters.
9408
9409 If at least one filter matches the USB device in question, this
9410 device is automatically captured (attached to) the virtual USB
9411 controller of this machine.
9412
9413 <see>IUSBDeviceFilter, ::IUSBController</see>
9414 </desc>
9415 </attribute>
9416
9417 <method name="createDeviceFilter">
9418 <desc>
9419 Creates a new USB device filter. All attributes except
9420 the filter name are set to <tt>null</tt> (any match),
9421 <i>active</i> is <tt>false</tt> (the filter is not active).
9422
9423 The created filter can then be added to the list of filters using
9424 <link to="#insertDeviceFilter()"/>.
9425
9426 <see>#deviceFilters</see>
9427 </desc>
9428 <param name="name" type="wstring" dir="in">
9429 <desc>
9430 Filter name. See <link to="IUSBDeviceFilter::name"/>
9431 for more info.
9432 </desc>
9433 </param>
9434 <param name="filter" type="IUSBDeviceFilter" dir="return">
9435 <desc>Created filter object.</desc>
9436 </param>
9437 </method>
9438
9439 <method name="insertDeviceFilter">
9440 <desc>
9441 Inserts the given USB device to the specified position
9442 in the list of filters.
9443
9444 Positions are numbered starting from <tt>0</tt>. If the specified
9445 position is equal to or greater than the number of elements in
9446 the list, the filter is added to the end of the collection.
9447
9448 <note>
9449 Duplicates are not allowed, so an attempt to insert a
9450 filter that is already in the collection, will return an
9451 error.
9452 </note>
9453
9454 <see>#deviceFilters</see>
9455 </desc>
9456 <param name="position" type="unsigned long" dir="in">
9457 <desc>Position to insert the filter to.</desc>
9458 </param>
9459 <param name="filter" type="IUSBDeviceFilter" dir="in">
9460 <desc>USB device filter to insert.</desc>
9461 </param>
9462 </method>
9463
9464 <method name="removeDeviceFilter">
9465 <desc>
9466 Removes a USB device filter from the specified position in the
9467 list of filters.
9468
9469 Positions are numbered starting from <tt>0</tt>. Specifying a
9470 position equal to or greater than the number of elements in
9471 the list will produce an error.
9472
9473 <see>#deviceFilters</see>
9474 </desc>
9475 <param name="position" type="unsigned long" dir="in">
9476 <desc>Position to remove the filter from.</desc>
9477 </param>
9478 <param name="filter" type="IUSBDeviceFilter" dir="return">
9479 <desc>Removed USB device filter.</desc>
9480 </param>
9481 </method>
9482
9483 </interface>
9484
9485
9486 <!--
9487 // IUSBDevice
9488 /////////////////////////////////////////////////////////////////////////
9489 -->
9490
9491 <enumerator
9492 name="IUSBDeviceEnumerator" type="IUSBDevice"
9493 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
9494 />
9495
9496 <collection
9497 name="IUSBDeviceCollection" type="IUSBDevice"
9498 enumerator="IUSBDeviceEnumerator"
9499 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
9500 readonly="yes"
9501 >
9502 <method name="findById">
9503 <desc>
9504 Searches this collection for a USB device with the given UUID.
9505 <note>
9506 The method returns an error if the given UUID does not
9507 correspond to any USB device in the collection.
9508 </note>
9509 <see>IUSBDevice::id</see>
9510 </desc>
9511 <param name="id" type="uuid" dir="in">
9512 <desc>UUID of the USB device to search for.</desc>
9513 </param>
9514 <param name="device" type="IUSBDevice" dir="return">
9515 <desc>Found USB device object.</desc>
9516 </param>
9517 </method>
9518
9519 <method name="findByAddress">
9520 <desc>
9521 Searches this collection for a USB device with the given
9522 host address.
9523 <note>
9524 The method returns an error if the given address does not
9525 correspond to any USB device in the collection.
9526 </note>
9527 <see>IUSBDevice::address</see>
9528 </desc>
9529 <param name="name" type="wstring" dir="in">
9530 <desc>
9531 Address of the USB device (as assigned by the host) to
9532 search for.
9533 </desc>
9534 </param>
9535 <param name="device" type="IUSBDevice" dir="return">
9536 <desc>Found USB device object.</desc>
9537 </param>
9538 </method>
9539
9540 </collection>
9541
9542 <interface
9543 name="IUSBDevice" extends="$unknown"
9544 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
9545 wsmap="managed"
9546 >
9547 <desc>
9548 The IUSBDevice interface represents a virtual USB device attached to the
9549 virtual machine.
9550
9551 A collection of objects implementing this interface is stored in the
9552 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
9553 attached to a running virtual machine's USB controller.
9554 </desc>
9555
9556 <attribute name="id" type="uuid" readonly="yes">
9557 <desc>
9558 Unique USB device ID. This ID is built from #vendorId,
9559 #productId, #revision and #serialNumber.
9560 </desc>
9561 </attribute>
9562
9563 <attribute name="vendorId" type="unsigned short" readonly="yes">
9564 <desc>Vendor ID.</desc>
9565 </attribute>
9566
9567 <attribute name="productId" type="unsigned short" readonly="yes">
9568 <desc>Product ID.</desc>
9569 </attribute>
9570
9571 <attribute name="revision" type="unsigned short" readonly="yes">
9572 <desc>
9573 Product revision number. This is a packed BCD represented as
9574 unsigned short. The high byte is the integer part and the low
9575 byte is the decimal.
9576 </desc>
9577 </attribute>
9578
9579 <attribute name="manufacturer" type="wstring" readonly="yes">
9580 <desc>Manufacturer string.</desc>
9581 </attribute>
9582
9583 <attribute name="product" type="wstring" readonly="yes">
9584 <desc>Product string.</desc>
9585 </attribute>
9586
9587 <attribute name="serialNumber" type="wstring" readonly="yes">
9588 <desc>Serial number string.</desc>
9589 </attribute>
9590
9591 <attribute name="address" type="wstring" readonly="yes">
9592 <desc>Host specific address of the device.</desc>
9593 </attribute>
9594
9595 <attribute name="port" type="unsigned short" readonly="yes">
9596 <desc>
9597 Host USB port number the device is physically
9598 connected to.
9599 </desc>
9600 </attribute>
9601
9602 <attribute name="version" type="unsigned short" readonly="yes">
9603 <desc>
9604 The major USB version of the device - 1 or 2.
9605 </desc>
9606 </attribute>
9607
9608 <attribute name="portVersion" type="unsigned short" readonly="yes">
9609 <desc>
9610 The major USB version of the host USB port the device is
9611 physically connected to - 1 or 2. For devices not connected to
9612 anything this will have the same value as the version attribute.
9613 </desc>
9614 </attribute>
9615
9616 <attribute name="remote" type="boolean" readonly="yes">
9617 <desc>
9618 Whether the device is physically connected to a remote VRDP
9619 client or to a local host machine.
9620 </desc>
9621 </attribute>
9622
9623 </interface>
9624
9625
9626 <!--
9627 // IUSBDeviceFilter
9628 /////////////////////////////////////////////////////////////////////////
9629 -->
9630
9631 <enumerator
9632 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
9633 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
9634 />
9635
9636 <collection
9637 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
9638 enumerator="IUSBDeviceFilterEnumerator"
9639 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
9640 readonly="yes"
9641 />
9642
9643 <interface
9644 name="IUSBDeviceFilter" extends="$unknown"
9645 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
9646 wsmap="managed"
9647 >
9648 <desc>
9649 The IUSBDeviceFilter interface represents an USB device filter used
9650 to perform actions on a group of USB devices.
9651
9652 This type of filters is used by running virtual machines to
9653 automatically capture selected USB devices once they are physically
9654 attached to the host computer.
9655
9656 A USB device is matched to the given device filter if and only if all
9657 attributes of the device match the corresponding attributes of the
9658 filter (that is, attributes are joined together using the logical AND
9659 operation). On the other hand, all together, filters in the list of
9660 filters carry the semantics of the logical OR operation. So if it is
9661 desirable to create a match like "this vendor id OR this product id",
9662 one needs to create two filters and specify "any match" (see below)
9663 for unused attributes.
9664
9665 All filter attributes used for matching are strings. Each string
9666 is an expression representing a set of values of the corresponding
9667 device attribute, that will match the given filter. Currently, the
9668 following filtering expressions are supported:
9669
9670 <ul>
9671 <li><i>Interval filters</i>. Used to specify valid intervals for
9672 integer device attributes (Vendor ID, Product ID and Revision).
9673 The format of the string is:
9674
9675 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
9676
9677 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
9678 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
9679 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
9680 is omitted before a dash (<tt>-</tt>), the minimum possible integer
9681 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
9682 possible integer is assumed.
9683 </li>
9684 <li><i>Boolean filters</i>. Used to specify acceptable values for
9685 boolean device attributes. The format of the string is:
9686
9687 <tt>true|false|yes|no|0|1</tt>
9688
9689 </li>
9690 <li><i>Exact match</i>. Used to specify a single value for the given
9691 device attribute. Any string that doesn't start with <tt>int:</tt>
9692 represents the exact match. String device attributes are compared to
9693 this string including case of symbols. Integer attributes are first
9694 converted to a string (see individual filter attributes) and then
9695 compared ignoring case.
9696
9697 </li>
9698 <li><i>Any match</i>. Any value of the corresponding device attribute
9699 will match the given filter. An empty or <tt>null</tt> string is
9700 used to construct this type of filtering expressions.
9701
9702 </li>
9703 </ul>
9704
9705 <note>
9706 On the Windows host platform, interval filters are not currently
9707 available. Also all string filter attributes
9708 (<link to="#manufacturer"/>, <link to="#product"/>,
9709 <link to="#serialNumber"/>) are ignored, so they behave as
9710 <i>any match</i> no matter what string expression is specified.
9711 </note>
9712
9713 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
9714 </desc>
9715
9716 <attribute name="name" type="wstring">
9717 <desc>
9718 Visible name for this filter.
9719 This name is used to visually distinguish one filter from another,
9720 so it can neither be <tt>null</tt> nor an empty string.
9721 </desc>
9722 </attribute>
9723
9724 <attribute name="active" type="boolean">
9725 <desc>Whether this filter active or has been temporarily disabled.</desc>
9726 </attribute>
9727
9728 <attribute name="vendorId" type="wstring">
9729 <desc>
9730 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
9731 The string representation for the <i>exact matching</i>
9732 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9733 (including leading zeroes).
9734 </desc>
9735 </attribute>
9736
9737 <attribute name="productId" type="wstring">
9738 <desc>
9739 <link to="IUSBDevice::productId">Product ID</link> filter.
9740 The string representation for the <i>exact matching</i>
9741 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9742 (including leading zeroes).
9743 </desc>
9744 </attribute>
9745
9746 <attribute name="revision" type="wstring">
9747 <desc>
9748 <link to="IUSBDevice::productId">Product revision number</link>
9749 filter. The string representation for the <i>exact matching</i>
9750 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
9751 of the integer part of the revision, and <tt>F</tt> is the
9752 decimal digit of its fractional part (including leading and
9753 trailing zeros).
9754 Note that for interval filters, it's best to use the hexadecimal
9755 form, because the revision is stored as a 16 bit packed BCD value;
9756 so the expression <tt>int:0x0100-0x0199</tt> will match any
9757 revision from <tt>1.0</tt> to <tt>1.99</tt>.
9758 </desc>
9759 </attribute>
9760
9761 <attribute name="manufacturer" type="wstring">
9762 <desc>
9763 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
9764 </desc>
9765 </attribute>
9766
9767 <attribute name="product" type="wstring">
9768 <desc>
9769 <link to="IUSBDevice::product">Product</link> filter.
9770 </desc>
9771 </attribute>
9772
9773 <attribute name="serialNumber" type="wstring">
9774 <desc>
9775 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
9776 </desc>
9777 </attribute>
9778
9779 <attribute name="port" type="wstring">
9780 <desc>
9781 <link to="IUSBDevice::port">Host USB port</link> filter.
9782 </desc>
9783 </attribute>
9784
9785 <attribute name="remote" type="wstring">
9786 <desc>
9787 <link to="IUSBDevice::remote">Remote state</link> filter.
9788 <note>
9789 This filter makes sense only for machine USB filters,
9790 i.e. it is ignored by IHostUSBDeviceFilter objects.
9791 </note>
9792 </desc>
9793 </attribute>
9794
9795 <attribute name="maskedInterfaces" type="unsigned long">
9796 <desc>
9797 This is an advanced option for hiding one or more USB interfaces
9798 from the guest. The value is a bit mask where the bits that are set
9799 means the corresponding USB interface should be hidden, masked off
9800 if you like.
9801 This feature only works on Linux hosts.
9802 </desc>
9803 </attribute>
9804
9805 </interface>
9806
9807
9808 <!--
9809 // IHostUSBDevice
9810 /////////////////////////////////////////////////////////////////////////
9811 -->
9812
9813 <enum
9814 name="USBDeviceState"
9815 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
9816 >
9817 <desc>
9818 USB device state. This enumeration represents all possible states
9819 of the USB device physically attached to the host computer regarding
9820 its state on the host computer and availability to guest computers
9821 (all currently running virtual machines).
9822
9823 Once a supported USB device is attached to the host, global USB
9824 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
9825 either ignore the device, or put it to #Held state, or do nothing. Unless
9826 the device is ignored by global filters, filters of all currently running
9827 guests (<link to="IUSBController::deviceFilters"/>) are activated that can
9828 put it to #Captured state.
9829
9830 If the device was ignored by global filters, or didn't match
9831 any filters at all (including guest ones), it is handled by the host
9832 in a normal way. In this case, the device state is determined by
9833 the host and can be one of #Unavailable, #Busy or #Available, depending on
9834 the current device usage.
9835
9836 Besides auto-capturing based on filters, the device can be manually
9837 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
9838 state is #Busy, #Available or #Held.
9839
9840 <note>
9841 Due to differences in USB stack implementations in Linux and Win32,
9842 states #Busy and #Available are applicable only to the Linux version of
9843 the product. This also means that (<link
9844 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if
9845 the device state is #Held.
9846 </note>
9847
9848 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
9849 </desc>
9850
9851 <const name="NotSupported" value="0">
9852 <desc>
9853 Not supported by the VirtualBox server, not available to guests.
9854 </desc>
9855 </const>
9856 <const name="Unavailable" value="1">
9857 <desc>
9858 Being used by the host computer exclusively,
9859 not available to guests.
9860 </desc>
9861 </const>
9862 <const name="Busy" value="2">
9863 <desc>
9864 Being used by the host computer, potentially available to guests.
9865 </desc>
9866 </const>
9867 <const name="Available" value="3">
9868 <desc>
9869 Not used by the host computer, available to guests.
9870 The host computer can also start using the device at any time.
9871 </desc>
9872 </const>
9873 <const name="Held" value="4">
9874 <desc>
9875 Held by the VirtualBox server (ignored by the host computer),
9876 available to guests.
9877 </desc>
9878 </const>
9879 <const name="Captured" value="5">
9880 <desc>
9881 Captured by one of the guest computers, not available
9882 to anybody else.
9883 </desc>
9884 </const>
9885 </enum>
9886
9887 <enumerator
9888 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
9889 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
9890 />
9891
9892 <collection
9893 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
9894 enumerator="IHostUSBDeviceEnumerator"
9895 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
9896 readonly="yes"
9897 >
9898 <method name="findById">
9899 <desc>
9900 Searches this collection for a USB device with the given UUID.
9901 <note>
9902 The method returns an error if the given UUID does not
9903 correspond to any USB device in the collection.
9904 </note>
9905 <see>IHostUSBDevice::id</see>
9906 </desc>
9907 <param name="id" type="uuid" dir="in">
9908 <desc>UUID of the USB device to search for.</desc>
9909 </param>
9910 <param name="device" type="IHostUSBDevice" dir="return">
9911 <desc>Found USB device object.</desc>
9912 </param>
9913 </method>
9914
9915 <method name="findByAddress">
9916 <desc>
9917 Searches this collection for a USB device with the given
9918 host address.
9919 <note>
9920 The method returns an error if the given address does not
9921 correspond to any USB device in the collection.
9922 </note>
9923 <see>IHostUSBDevice::address</see>
9924 </desc>
9925 <param name="name" type="wstring" dir="in">
9926 <desc>
9927 Address of the USB device (as assigned by the host) to
9928 search for.
9929 </desc>
9930 </param>
9931 <param name="device" type="IHostUSBDevice" dir="return">
9932 <desc>Found USB device object.</desc>
9933 </param>
9934 </method>
9935
9936 </collection>
9937
9938 <interface
9939 name="IHostUSBDevice" extends="IUSBDevice"
9940 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
9941 wsmap="managed"
9942 >
9943 <desc>
9944 The IHostUSBDevice interface represents a physical USB device attached
9945 to the host computer.
9946
9947 Besides properties inherited from IUSBDevice, this interface adds the
9948 <link to="#state"/> property that holds the current state of the USB
9949 device.
9950
9951 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
9952 </desc>
9953
9954 <attribute name="state" type="USBDeviceState" readonly="yes">
9955 <desc>
9956 Current state of the device.
9957 </desc>
9958 </attribute>
9959
9960 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
9961
9962 </interface>
9963
9964
9965 <!--
9966 // IHostUSBDeviceFilter
9967 /////////////////////////////////////////////////////////////////////////
9968 -->
9969
9970 <enum
9971 name="USBDeviceFilterAction"
9972 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
9973 >
9974 <desc>
9975 Actions for host USB device filters.
9976 <see>IHostUSBDeviceFilter, USBDeviceState</see>
9977 </desc>
9978
9979 <const name="Null" value="0">
9980 <desc><tt>null</tt> value. Never used by the API.</desc>
9981 </const>
9982 <const name="Ignore" value="1">
9983 <desc>Ignore the matched USB device.</desc>
9984 </const>
9985 <const name="Hold" value="2">
9986 <desc>Hold the matched USB device.</desc>
9987 </const>
9988 </enum>
9989
9990 <enumerator
9991 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
9992 uuid="ff735211-903e-4642-9c37-189eb44579fe"
9993 />
9994
9995 <collection
9996 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
9997 enumerator="IHostUSBDeviceFilterEnumerator"
9998 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
9999 readonly="yes"
10000 />
10001
10002 <interface
10003 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
10004 uuid="4cc70246-d74a-400f-8222-3900489c0374"
10005 wsmap="managed"
10006 >
10007 <desc>
10008 The IHostUSBDeviceFilter interface represents a global filter for a
10009 physical USB device used by the host computer. Used indirectly in
10010 <link to="IHost::USBDeviceFilters"/>.
10011
10012 Using filters of this type, the host computer determines the initial
10013 state of the USB device after it is physically attached to the
10014 host's USB controller.
10015
10016 <note>
10017 The <link to="#remote"/> attribute is ignored by this type of
10018 filters, because it makes sense only for
10019 <link to="IUSBController::deviceFilters">machine USB filters</link>.
10020 </note>
10021
10022 <see>IHost::USBDeviceFilters</see>
10023 </desc>
10024
10025 <attribute name="action" type="USBDeviceFilterAction">
10026 <desc>
10027 Action performed by the host when an attached USB device
10028 matches this filter.
10029 </desc>
10030 </attribute>
10031
10032 </interface>
10033
10034 <!--
10035 // IAudioAdapter
10036 /////////////////////////////////////////////////////////////////////////
10037 -->
10038
10039 <enum
10040 name="AudioDriverType"
10041 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
10042 >
10043 <desc>
10044 Host audio driver type.
10045 </desc>
10046
10047 <const name="Null" value="0">
10048 <desc><tt>null</tt> value. Also means "dummy audio driver".</desc>
10049 </const>
10050 <const name="WinMM" value="1"/>
10051 <const name="OSS" value="2"/>
10052 <const name="ALSA" value="3"/>
10053 <const name="DirectSound" value="4"/>
10054 <const name="CoreAudio" value="5"/>
10055 <const name="MMPM" value="6"/>
10056 <const name="Pulse" value="7"/>
10057 <const name="SolAudio" value="8"/>
10058 </enum>
10059
10060 <enum
10061 name="AudioControllerType"
10062 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
10063 >
10064 <desc>
10065 Virtual audio controller type.
10066 </desc>
10067
10068 <const name="AC97" value="0"/>
10069 <const name="SB16" value="1"/>
10070 </enum>
10071
10072 <interface
10073 name="IAudioAdapter" extends="$unknown"
10074 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
10075 wsmap="managed"
10076 >
10077 <desc>
10078 The IAudioAdapter interface represents the virtual audio adapter of
10079 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
10080 </desc>
10081 <attribute name="enabled" type="boolean">
10082 <desc>
10083 Flag whether the audio adapter is present in the
10084 guest system. If disabled, the virtual guest hardware will
10085 not contain any audio adapter. Can only be changed when
10086 the VM is not running.
10087 </desc>
10088 </attribute>
10089 <attribute name="audioController" type="AudioControllerType">
10090 <desc>
10091 The audio hardware we emulate.
10092 </desc>
10093 </attribute>
10094 <attribute name="audioDriver" type="AudioDriverType">
10095 <desc>
10096 Audio driver the adapter is connected to. This setting
10097 can only be changed when the VM is not running.
10098 </desc>
10099 </attribute>
10100 </interface>
10101
10102 <!--
10103 // IVRDPServer
10104 /////////////////////////////////////////////////////////////////////////
10105 -->
10106
10107 <enum
10108 name="VRDPAuthType"
10109 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
10110 >
10111 <desc>
10112 VRDP authentication type.
10113 </desc>
10114
10115 <const name="Null" value="0">
10116 <desc><tt>null</tt> value. Also means "no authentication".</desc>
10117 </const>
10118 <const name="External" value="1"/>
10119 <const name="Guest" value="2"/>
10120 </enum>
10121
10122 <interface
10123 name="IVRDPServer" extends="$unknown"
10124 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
10125 wsmap="managed"
10126 >
10127 <attribute name="enabled" type="boolean">
10128 <desc>VRDP server status.</desc>
10129 </attribute>
10130
10131 <attribute name="port" type="unsigned long">
10132 <desc>
10133 VRDP server port number.
10134 <note>
10135 Setting the value of this property to <tt>0</tt> will reset the port
10136 number to the default value which is
10137 currently <tt>3389</tt>. Reading this property will always return a
10138 real port number, even after it has been set to <tt>0</tt> (in which
10139 case the default port is returned).
10140 </note>
10141 </desc>
10142 </attribute>
10143
10144 <attribute name="netAddress" type="wstring">
10145 <desc>VRDP server address.</desc>
10146 </attribute>
10147
10148 <attribute name="authType" type="VRDPAuthType">
10149 <desc>VRDP authentication method.</desc>
10150 </attribute>
10151
10152 <attribute name="authTimeout" type="unsigned long">
10153 <desc>Timeout for guest authentication. Milliseconds.</desc>
10154 </attribute>
10155
10156 <attribute name="allowMultiConnection" type="boolean">
10157 <desc>
10158 Flag whether multiple simultaneous connections to the VM are permitted.
10159 Note that this will be replaced by a more powerful mechanism in the future.
10160 </desc>
10161 </attribute>
10162
10163 <attribute name="reuseSingleConnection" type="boolean">
10164 <desc>
10165 Flag whether the existing connection must be dropped and a new connection
10166 must be established by the VRDP server, when a new client connects in single
10167 connection mode.
10168 </desc>
10169 </attribute>
10170
10171 </interface>
10172
10173
10174 <!--
10175 // ISharedFolder
10176 /////////////////////////////////////////////////////////////////////////
10177 -->
10178
10179 <enumerator
10180 name="ISharedFolderEnumerator" type="ISharedFolder"
10181 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
10182 />
10183
10184 <collection
10185 name="ISharedFolderCollection" type="ISharedFolder"
10186 enumerator="ISharedFolderEnumerator"
10187 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
10188 readonly="yes">
10189
10190 <method name="findByName">
10191 <desc>
10192 Searches this collection for a shared folder with the given logical
10193 name.
10194 <note>
10195 The method returns an error if the given name does not correspond to
10196 any shared folder in the collection.
10197 </note>
10198 </desc>
10199 <param name="name" type="wstring" dir="in">
10200 <desc>Logical name of the shared folder to search for</desc>
10201 </param>
10202 <param name="sharedFolder" type="ISharedFolder" dir="return">
10203 <desc>Found shared folder object</desc>
10204 </param>
10205 </method>
10206
10207 </collection>
10208
10209 <interface
10210 name="ISharedFolder" extends="$unknown"
10211 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
10212 wsmap="struct"
10213 >
10214 <desc>
10215 The ISharedFolder interface represents a folder in the host computer's
10216 file system accessible from the guest OS running inside a virtual
10217 machine using an associated logical name.
10218
10219 There are three types of shared folders:
10220 <ul>
10221 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
10222 folders available to all virtual machines.</li>
10223 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
10224 VM-specific shared folders available to the given virtual machine at
10225 startup.</li>
10226 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
10227 VM-specific shared folders created in the session context (for
10228 example, when the virtual machine is running) and automatically
10229 discarded when the session is closed (the VM is powered off).</li>
10230 </ul>
10231
10232 Logical names of shared folders must be unique within the given scope
10233 (global, permanent or transient). However, they do not need to be unique
10234 across scopes. In this case, the definition of the shared folder in a
10235 more specific scope takes precedence over definitions in all other
10236 scopes. The order of precedence is (more specific to more general):
10237 <ol>
10238 <li>Transient definitions</li>
10239 <li>Permanent definitions</li>
10240 <li>Global definitions</li>
10241 </ol>
10242
10243 For example, if MyMachine has a shared folder named
10244 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
10245 transient shared folder named <tt>C_DRIVE</tt> (that points
10246 to <tt>C:\\\\WINDOWS</tt>) will change the definition
10247 of <tt>C_DRIVE</tt> in the guest OS so
10248 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
10249 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
10250 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
10251 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
10252 to <tt>C:\\</tt> if it still exists.
10253
10254 Note that permanent and transient shared folders of different machines
10255 are in different name spaces, so they don't overlap and don't need to
10256 have unique logical names.
10257
10258 <note>
10259 Global shared folders are not implemented in the current version of the
10260 product.
10261 </note>
10262 </desc>
10263
10264 <attribute name="name" type="wstring" readonly="yes">
10265 <desc>Logical name of the shared folder.</desc>
10266 </attribute>
10267
10268 <attribute name="hostPath" type="wstring" readonly="yes">
10269 <desc>Full path to the shared folder in the host file system.</desc>
10270 </attribute>
10271
10272 <attribute name="accessible" type="boolean" readonly="yes">
10273 <desc>
10274 Whether the folder defined by the host path is currently
10275 accessible or not.
10276 For example, the folder can be unaccessible if it is placed
10277 on the network share that is not available by the time
10278 this property is read.
10279 </desc>
10280 </attribute>
10281
10282 <attribute name="writable" type="boolean" readonly="yes">
10283 <desc>
10284 Whether the folder defined by the host path is writable or
10285 not.
10286 </desc>
10287 </attribute>
10288
10289 </interface>
10290
10291 <!--
10292 // ISession
10293 /////////////////////////////////////////////////////////////////////////
10294 -->
10295
10296 <interface
10297 name="IInternalSessionControl" extends="$unknown"
10298 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
10299 internal="yes"
10300 wsmap="suppress"
10301 >
10302 <method name="getPID">
10303 <desc>PID of the process that has created this Session object.
10304 </desc>
10305 <param name="pid" type="unsigned long" dir="return"/>
10306 </method>
10307
10308 <method name="getRemoteConsole">
10309 <desc>Returns the console object suitable for remote control.</desc>
10310 <param name="console" type="IConsole" dir="return"/>
10311 </method>
10312
10313 <method name="assignMachine">
10314 <desc>
10315 Assigns the machine object associated with this direct-type
10316 session or informs the session that it will be a remote one
10317 (if machine = NULL).
10318 </desc>
10319 <param name="machine" type="IMachine" dir="in"/>
10320 </method>
10321
10322 <method name="assignRemoteMachine">
10323 <desc>
10324 Assigns the machine and the (remote) console object associated with
10325 this remote-type session.
10326 </desc>
10327 <param name="machine" type="IMachine" dir="in"/>
10328 <param name="console" type="IConsole" dir="in"/>
10329 </method>
10330
10331 <method name="updateMachineState">
10332 <desc>
10333 Updates the machine state in the VM process.
10334 Must be called only in certain cases
10335 (see the method implementation).
10336 </desc>
10337 <param name="aMachineState" type="MachineState" dir="in"/>
10338 </method>
10339
10340 <method name="uninitialize">
10341 <desc>
10342 Uninitializes (closes) this session. Used by VirtualBox to close
10343 the corresponding remote session when the direct session dies
10344 or gets closed.
10345 </desc>
10346 </method>
10347
10348 <method name="onDVDDriveChange">
10349 <desc>
10350 Triggered when settings of the DVD drive object of the
10351 associated virtual machine have changed.
10352 </desc>
10353 </method>
10354
10355 <method name="onFloppyDriveChange">
10356 <desc>
10357 Triggered when settings of the floppy drive object of the
10358 associated virtual machine have changed.
10359 </desc>
10360 </method>
10361
10362 <method name="onNetworkAdapterChange">
10363 <desc>
10364 Triggered when settings of a network adapter of the
10365 associated virtual machine have changed.
10366 </desc>
10367 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
10368 </method>
10369
10370 <method name="onSerialPortChange">
10371 <desc>
10372 Triggered when settings of a serial port of the
10373 associated virtual machine have changed.
10374 </desc>
10375 <param name="serialPort" type="ISerialPort" dir="in"/>
10376 </method>
10377
10378 <method name="onParallelPortChange">
10379 <desc>
10380 Triggered when settings of a parallel port of the
10381 associated virtual machine have changed.
10382 </desc>
10383 <param name="parallelPort" type="IParallelPort" dir="in"/>
10384 </method>
10385
10386 <method name="onVRDPServerChange">
10387 <desc>
10388 Triggered when settings of the VRDP server object of the
10389 associated virtual machine have changed.
10390 </desc>
10391 </method>
10392
10393 <method name="onUSBControllerChange">
10394 <desc>
10395 Triggered when settings of the USB controller object of the
10396 associated virtual machine have changed.
10397 </desc>
10398 </method>
10399
10400 <method name="onSharedFolderChange">
10401 <desc>
10402 Triggered when a permanent (global or machine) shared folder has been
10403 created or removed.
10404 <note>
10405 We don't pass shared folder parameters in this notification because
10406 the order in which parallel notifications are delivered is not defined,
10407 therefore it could happen that these parameters were outdated by the
10408 time of processing this notification.
10409 </note>
10410 </desc>
10411 <param name="global" type="boolean" dir="in"/>
10412 </method>
10413
10414 <method name="onUSBDeviceAttach">
10415 <desc>
10416 Triggered when a request to capture a USB device (as a result
10417 of matched USB filters or direct call to
10418 <link to="IConsole::attachUSBDevice"/>) has completed.
10419 A @c null @a error object means success, otherwise it
10420 describes a failure.
10421 </desc>
10422 <param name="device" type="IUSBDevice" dir="in"/>
10423 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
10424 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
10425 </method>
10426
10427 <method name="onUSBDeviceDetach">
10428 <desc>
10429 Triggered when a request to release the USB device (as a result
10430 of machine termination or direct call to
10431 <link to="IConsole::detachUSBDevice"/>) has completed.
10432 A @c null @a error object means success, otherwise it
10433 </desc>
10434 <param name="id" type="uuid" dir="in"/>
10435 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
10436 </method>
10437
10438 <method name="onShowWindow">
10439 <desc>
10440 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
10441 <link to="IMachine::showConsoleWindow()"/> in order to notify
10442 console callbacks
10443 <link to="IConsoleCallback::onCanShowWindow()"/>
10444 and <link to="IConsoleCallback::onShowWindow()"/>.
10445 </desc>
10446 <param name="check" type="boolean" dir="in"/>
10447 <param name="canShow" type="boolean" dir="out"/>
10448 <param name="winId" type="unsigned long long" dir="out"/>
10449 </method>
10450
10451 <method name="accessGuestProperty">
10452 <desc>
10453 Called by <link to="IMachine::getGuestProperty()"/> and by
10454 <link to="IMachine::setGuestProperty()"/> in order to read and
10455 modify guest properties.
10456 </desc>
10457 <param name="name" type="wstring" dir="in"/>
10458 <param name="value" type="wstring" dir="in"/>
10459 <param name="flags" type="wstring" dir="in"/>
10460 <param name="isSetter" type="boolean" dir="in"/>
10461 <param name="retValue" type="wstring" dir="out"/>
10462 <param name="retTimestamp" type="unsigned long long" dir="out"/>
10463 <param name="retFlags" type="wstring" dir="out"/>
10464 </method>
10465
10466 <method name="enumerateGuestProperties">
10467 <desc>
10468 Return a list of the guest properties matching a set of patterns along
10469 with their values, time stamps and flags.
10470 </desc>
10471 <param name="patterns" type="wstring" dir="in">
10472 <desc>
10473 The patterns to match the properties against as a comma-separated
10474 string. If this is empty, all properties currently set will be
10475 returned.
10476 </desc>
10477 </param>
10478 <param name="key" type="wstring" dir="out" safearray="yes">
10479 <desc>
10480 The key names of the properties returned.
10481 </desc>
10482 </param>
10483 <param name="value" type="wstring" dir="out" safearray="yes">
10484 <desc>
10485 The values of the properties returned. The array entries match the
10486 corresponding entries in the @a key array.
10487 </desc>
10488 </param>
10489 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
10490 <desc>
10491 The time stamps of the properties returned. The array entries match
10492 the corresponding entries in the @a key array.
10493 </desc>
10494 </param>
10495 <param name="flags" type="wstring" dir="out" safearray="yes">
10496 <desc>
10497 The flags of the properties returned. The array entries match the
10498 corresponding entries in the @a key array.
10499 </desc>
10500 </param>
10501 </method>
10502
10503 </interface>
10504
10505 <interface
10506 name="ISession" extends="$dispatched"
10507 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
10508 wsmap="managed"
10509 >
10510 <desc>
10511 The ISession interface represents a serialization primitive for virtual
10512 machines.
10513
10514 With VirtualBox, every time one wishes to manipulate a virtual machine
10515 (e.g. change its settings or start execution), a session object is
10516 required. Such an object must be passed to one of the session methods
10517 that open the given session, which then initiates the machine manipulation.
10518
10519 A session serves several purposes: it identifies to the inter-process VirtualBox
10520 code which process is currently working with the virtual machine, and it ensures
10521 that there are no incompatible requests from several processes for the
10522 same virtual machine. Session objects can therefore be thought of as mutex
10523 semaphores that lock virtual machines to prevent conflicting accesses from
10524 several processes.
10525
10526 How sessions objects are used depends on whether you use the Main API
10527 via COM or via the webservice:
10528
10529 <ul>
10530 <li>When using the COM API directly, an object of the Session class from the
10531 VirtualBox type library needs to be created. In regular COM C++ client code,
10532 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
10533 This object will then act as a local session object in further calls to open
10534 a session.
10535 </li>
10536
10537 <li>In the webservice, the session manager (IWebsessionManager) instead creates
10538 one session object automatically when <link to="IWebsessionManager::logon" />
10539 is called. A managed object reference to that session object can be retrieved by
10540 calling <link to="IWebsessionManager::getSessionObject" />. This session object
10541 reference can then be used to open sessions.
10542 </li>
10543 </ul>
10544
10545 Sessions are mainly used in two variations:
10546
10547 <ul>
10548 <li>
10549 To start a virtual machine in a separate process, one would call
10550 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
10551 object as its first parameter. This session then identifies the caller
10552 and lets him control the started machine (for example, pause machine
10553 execution or power it down) as well as be notified about machine
10554 execution state changes.
10555 </li>
10556
10557 <li>To alter machine settings, or to start machine execution within the
10558 current process, one needs to open a direct session for the machine first by
10559 calling <link to="IVirtualBox::openSession"/>. While a direct session
10560 is open within one process, no any other process may open another direct
10561 session for the same machine. This prevents the machine from being changed
10562 by other processes while it is running or while the machine is being configured.
10563 </li>
10564 </ul>
10565
10566 One also can attach to an existing direct session already opened by
10567 another process (for example, in order to send a control request to the
10568 virtual machine such as the pause or the reset request). This is done by
10569 calling <link to="IVirtualBox::openExistingSession"/>.
10570
10571 <note>
10572 Unless you are trying to write a new VirtualBox front-end that
10573 performs direct machine execution (like the VirtualBox or VBoxSDL
10574 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
10575 session opened by <link to="IVirtualBox::openSession"/> and use this
10576 session only to change virtual machine settings. If you simply want to
10577 start virtual machine execution using one of the existing front-ends
10578 (for example the VirtualBox GUI or headless server), simply use
10579 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
10580 will power up the machine automatically for you.
10581 </note>
10582 </desc>
10583
10584 <attribute name="state" type="SessionState" readonly="yes">
10585 <desc>Current state of this session.</desc>
10586 </attribute>
10587
10588 <attribute name="type" type="SessionType" readonly="yes">
10589 <desc>
10590 Type of this session. The value of this attribute is valid only
10591 if the session is currently open (i.e. its #state is SessionType::SessionOpen),
10592 otherwise an error will be returned.
10593 </desc>
10594 </attribute>
10595
10596 <attribute name="machine" type="IMachine" readonly="yes">
10597 <desc>Machine object associated with this session.</desc>
10598 </attribute>
10599
10600 <attribute name="console" type="IConsole" readonly="yes">
10601 <desc>Console object associated with this session.</desc>
10602 </attribute>
10603
10604 <method name="close">
10605 <desc>
10606 Closes a session that was previously opened.
10607
10608 It is recommended that every time an "open session" method (such as
10609 <link to="IVirtualBox::openRemoteSession" /> or
10610 <link to="IVirtualBox::openSession" />) has been called to
10611 manipulate a virtual machine, the caller invoke
10612 ISession::close() when it's done doing so. Since sessions are
10613 serialization primitives much like ordinary mutexes, they are
10614 best used the same way: for each "open" call, there should be
10615 a matching "close" call, even when errors occur.
10616
10617 Otherwise, if a direct session for a machine opened with
10618 <link to="IVirtualBox::openSession()"/> is not explicitly closed
10619 when the application terminates, the state of the machine will
10620 be set to <link to="MachineState::Aborted" /> on the server.
10621
10622 Generally, it is recommended to close all open sessions explicitly
10623 before terminating the application (no matter what is the reason of
10624 the termination).
10625
10626 <note>
10627 Do not expect the session state (<link to="ISession::state" />
10628 to return to "Closed" immediately after you invoke
10629 ISession::close(), particularly if you have started a remote
10630 session to execute the VM in a new process. The session state will
10631 automatically return to "Closed" once the VM is no longer executing,
10632 which can of course take a very long time.
10633 </note>
10634 </desc>
10635 </method>
10636
10637 </interface>
10638
10639 <!--
10640 // ISATAController
10641 /////////////////////////////////////////////////////////////////////////
10642 -->
10643
10644 <interface
10645 name="ISATAController" extends="$unknown"
10646 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
10647 wsmap="managed"
10648 >
10649 <attribute name="enabled" type="boolean">
10650 <desc>
10651 Flag whether the SATA controller is present in the
10652 guest system. If disabled, the virtual guest hardware will
10653 not contain any SATA controller. Can only be changed when
10654 the VM is powered off.
10655 </desc>
10656 </attribute>
10657
10658 <attribute name="portCount" type="unsigned long">
10659 <desc>
10660 The number of usable ports on the SATA controller.
10661 It ranges from 1 to 30.
10662 </desc>
10663 </attribute>
10664
10665 <method name="GetIDEEmulationPort">
10666 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc>
10667 <param name="devicePosition" type="long" dir="in"/>
10668 <param name="portNumber" type="long" dir="return"/>
10669 </method>
10670
10671 <method name="SetIDEEmulationPort">
10672 <desc>Sets the port number which is emulated as an IDE device.</desc>
10673 <param name="devicePosition" type="long" dir="in"/>
10674 <param name="portNumber" type="long" dir="in"/>
10675 </method>
10676
10677 </interface>
10678
10679<if target="wsdl">
10680
10681 <!--
10682 // IManagedObjectRef
10683 /////////////////////////////////////////////////////////////////////////
10684 -->
10685
10686 <interface
10687 name="IManagedObjectRef" extends="$unknown"
10688 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
10689 internal="yes"
10690 wsmap="managed"
10691 wscpp="hardcoded"
10692 >
10693 <desc>
10694 Managed object reference.
10695
10696 Only within the webservice, a managed object reference (which is really
10697 an opaque number) allows a webservice client to address an object
10698 that lives in the address space of the webservice server.
10699
10700 Behind each managed object reference, there is a COM object that lives
10701 in the webservice server's address space. The COM object is not freed
10702 until the managed object reference is released, either by an explicit
10703 call to <link to="IManagedObjectRef::release" /> or by logging off from
10704 the webservice (<link to="IWebsessionManager::logoff" />), which releases
10705 all objects created during the webservice session.
10706
10707 Whenever a method call of the VirtualBox API returns a COM object, the
10708 webservice representation of that method will instead return a
10709 managed object reference, which can then be used to invoke methods
10710 on that object.
10711 </desc>
10712
10713 <method name="getInterfaceName">
10714 <desc>
10715 Returns the name of the interface that this managed object represents,
10716 for example, "IMachine", as a string.
10717 </desc>
10718 <param name="return" type="wstring" dir="return"/>
10719 </method>
10720
10721 <method name="release">
10722 <desc>
10723 Releases this managed object reference and frees the resources that
10724 were allocated for it in the webservice server process. After calling
10725 this method, the identifier of the reference can no longer be used.
10726 </desc>
10727 </method>
10728
10729 </interface>
10730
10731 <!--
10732 // IWebsessionManager
10733 /////////////////////////////////////////////////////////////////////////
10734 -->
10735
10736 <interface
10737 name="IWebsessionManager" extends="$unknown"
10738 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
10739 internal="yes"
10740 wsmap="global"
10741 wscpp="hardcoded"
10742 >
10743 <desc>
10744 Websession manager. This provides essential services
10745 to webservice clients.
10746 </desc>
10747 <method name="logon">
10748 <desc>
10749 Logs a new client onto the webservice and returns a managed object reference to
10750 the IVirtualBox instance, which the client can then use as a basis to further
10751 queries, since all calls to the VirtualBox API are based on the IVirtualBox
10752 interface, in one way or the other.
10753 </desc>
10754 <param name="username" type="wstring" dir="in"/>
10755 <param name="password" type="wstring" dir="in"/>
10756 <param name="return" type="IVirtualBox" dir="return"/>
10757 </method>
10758
10759 <method name="getSessionObject">
10760 <desc>
10761 Returns a managed object reference to the internal ISession object that was created
10762 for this web service session when the client logged on.
10763
10764 <see>ISession</see>
10765 </desc>
10766 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10767 <param name="return" type="ISession" dir="return"/>
10768 </method>
10769
10770 <method name="logoff">
10771 <desc>
10772 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
10773 and destroys all resources associated with the session (most importantly, all
10774 managed objects created in the server while the session was active).
10775 </desc>
10776 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10777 </method>
10778
10779 </interface>
10780
10781</if>
10782
10783 <!--
10784 // IPerformanceCollector & friends
10785 /////////////////////////////////////////////////////////////////////////
10786 -->
10787
10788 <interface
10789 name="IPerformanceMetric" extends="$unknown"
10790 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
10791 >
10792 <desc>
10793 The IPerformanceMetric interface represents parameters of the given
10794 performance metric.
10795 </desc>
10796
10797 <attribute name="metricName" type="wstring" readonly="yes">
10798 <desc>
10799 Name of the metric.
10800 </desc>
10801 </attribute>
10802
10803 <attribute name="object" type="$unknown" readonly="yes">
10804 <desc>
10805 Object this metric belongs to.
10806 </desc>
10807 </attribute>
10808
10809 <attribute name="description" type="wstring" readonly="yes">
10810 <desc>
10811 Textual description of the metric.
10812 </desc>
10813 </attribute>
10814
10815 <attribute name="period" type="unsigned long" readonly="yes">
10816 <desc>
10817 Time interval between samples, measured in seconds.
10818 </desc>
10819 </attribute>
10820
10821 <attribute name="count" type="unsigned long" readonly="yes">
10822 <desc>
10823 Number of recent samples retained by the performance collector for this
10824 metric.
10825
10826 When the collected sample count exceeds this number, older samples
10827 are discarded.
10828 </desc>
10829 </attribute>
10830
10831 <attribute name="unit" type="wstring" readonly="yes">
10832 <desc>
10833 Unit of measurement.
10834 </desc>
10835 </attribute>
10836
10837 <attribute name="minimumValue" type="long" readonly="yes">
10838 <desc>
10839 Minimum possible value of this metric.
10840 </desc>
10841 </attribute>
10842
10843 <attribute name="maximumValue" type="long" readonly="yes">
10844 <desc>
10845 Maximum possible value of this metric.
10846 </desc>
10847 </attribute>
10848 </interface>
10849
10850 <interface
10851 name="IPerformanceCollector" extends="$unknown"
10852 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
10853 wsmap="managed"
10854 >
10855 <desc>
10856 The IPerformanceCollector interface represents a service that collects and
10857 stores performance metrics data.
10858
10859 Performance metrics are associated with objects like IHost and
10860 IMachine. Each object has a distinct set of performance metrics.
10861 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
10862
10863 Metric data are collected at the specified intervals and are retained
10864 internally. The interval and the number of samples retained can be set
10865 with <link to="IPerformanceCollector::setupMetrics" />.
10866
10867 Metrics are organized hierarchically, each level separated by slash (/).
10868 General scheme for metric name is
10869 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
10870 metric name stands for: CPU category, Load metric, User submetric, average
10871 aggregate. An aggregate function is computed over all retained data. Valid
10872 aggregate functions are:
10873
10874 <ul>
10875 <li>avg -- average</li>
10876 <li>min -- minimum</li>
10877 <li>max -- maximum</li>
10878 </ul>
10879
10880 "Category/Metric" together form base metric name. A base metric is the
10881 smallest unit for which a sampling interval and the number of retained
10882 samples can be set. Only base metrics can be enabled and disabled. All
10883 sub-metrics are collected when their base metric is collected.
10884 Collected values for any set of sub-metrics can be queried with
10885 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
10886 metric parameters, querying metric data, enabling or disabling metrics
10887 wildcards can be used in metric names to specify a subset of metrics. For
10888 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
10889 averages can be queried using <tt>*:avg</tt> and so on. To query metric
10890 values without aggregates <tt>*:</tt> can be used.
10891
10892 The valid names for base metrics are:
10893
10894 <ul>
10895 <li>CPU/Load</li>
10896 <li>CPU/MHz</li>
10897 <li>RAM/Usage</li>
10898 </ul>
10899
10900 The general sequence for collecting and retrieving the metrics is:
10901 <ul>
10902 <li>
10903 Obtain an instance of IPerformanceCollector with
10904 <link to="IVirtualBox::performanceCollector" />
10905 </li>
10906 <li>
10907 Allocate and populate an array with references to objects the metrics
10908 will be collected for. Use references to IHost and IMachine objects.
10909 </li>
10910 <li>
10911 Allocate and populate an array with base metric names the data will be
10912 collected for.
10913 </li>
10914 <li>
10915 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
10916 metric data will be collected and stored.
10917 </li>
10918 <li>
10919 Wait for the data to get collected.
10920 </li>
10921 <li>
10922 Allocate and populate an array with references to objects the metric
10923 values will be queried for. You can re-use the object array used for
10924 setting base metrics.
10925 </li>
10926 <li>
10927 Allocate and populate an array with metric names the data will be
10928 collected for. Note that metric names differ from base metric names.
10929 </li>
10930 <li>
10931 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
10932 have been collected so far are returned. Note that the values are still
10933 retained internally and data collection continues.
10934 </li>
10935 </ul>
10936
10937 For an example of usage refer to the following files in VirtualBox SDK:
10938 <ul>
10939 <li>
10940 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
10941 </li>
10942 <li>
10943 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
10944 </li>
10945 </ul>
10946 </desc>
10947
10948 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
10949 <desc>
10950 Array of unique names of metrics.
10951
10952 This array represents all metrics supported by the performance
10953 collector. Individual objects do not necessarily support all of them.
10954 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
10955 list of supported metrics for a particular object.
10956 </desc>
10957 </attribute>
10958
10959 <method name="getMetrics">
10960 <desc>
10961 Returns parameters of specified metrics for a set of objects.
10962 <note>
10963 @c Null metrics array means all metrics. @c Null object array means
10964 all existing objects.
10965 </note>
10966 </desc>
10967 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10968 <desc>
10969 Metric name filter. Currently, only a comma-separated list of metrics
10970 is supported.
10971 </desc>
10972 </param>
10973 <param name="objects" type="$unknown" dir="in" safearray="yes">
10974 <desc>
10975 Set of objects to return metric parameters for.
10976 </desc>
10977 </param>
10978 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
10979 <desc>
10980 Array of returned metric parameters.
10981 </desc>
10982 </param>
10983 </method>
10984
10985 <method name="setupMetrics">
10986 <desc>
10987 Sets parameters of specified base metrics for a set of objects. Returns
10988 an array of <link to="IPerformanceMetric" /> describing the metrics have
10989 been affected.
10990 <note>
10991 @c Null or empty metric name array means all metrics. @c Null or empty
10992 object array means all existing objects. If metric name array contains
10993 a single element and object array contains many, the single metric
10994 name array element is applied to each object array element to form
10995 metric/object pairs.
10996 </note>
10997 </desc>
10998 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10999 <desc>
11000 Metric name filter. Comma-separated list of metrics with wildcard
11001 support.
11002 </desc>
11003 </param>
11004 <param name="objects" type="$unknown" dir="in" safearray="yes">
11005 <desc>
11006 Set of objects to setup metric parameters for.
11007 </desc>
11008 </param>
11009 <param name="period" type="unsigned long" dir="in">
11010 <desc>
11011 Time interval in seconds between two consecutive samples of performance
11012 data.
11013 </desc>
11014 </param>
11015 <param name="count" type="unsigned long" dir="in">
11016 <desc>
11017 Number of samples to retain in performance data history. Older samples
11018 get discarded.
11019 </desc>
11020 </param>
11021 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11022 <desc>
11023 Array of metrics that have been modified by the call to this method.
11024 </desc>
11025 </param>
11026 </method>
11027
11028 <method name="enableMetrics">
11029 <desc>
11030 Turns on collecting specified base metrics. Returns an array of
11031 <link to="IPerformanceMetric" /> describing the metrics have been
11032 affected.
11033 <note>
11034 @c Null or empty metric name array means all metrics. @c Null or empty
11035 object array means all existing objects. If metric name array contains
11036 a single element and object array contains many, the single metric
11037 name array element is applied to each object array element to form
11038 metric/object pairs.
11039 </note>
11040 </desc>
11041 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11042 <desc>
11043 Metric name filter. Comma-separated list of metrics with wildcard
11044 support.
11045 </desc>
11046 </param>
11047 <param name="objects" type="$unknown" dir="in" safearray="yes">
11048 <desc>
11049 Set of objects to enable metrics for.
11050 </desc>
11051 </param>
11052 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11053 <desc>
11054 Array of metrics that have been modified by the call to this method.
11055 </desc>
11056 </param>
11057 </method>
11058
11059 <method name="disableMetrics">
11060 <desc>
11061 Turns off collecting specified base metrics. Returns an array of
11062 <link to="IPerformanceMetric" /> describing the metrics have been
11063 affected.
11064 <note>
11065 @c Null or empty metric name array means all metrics. @c Null or empty
11066 object array means all existing objects. If metric name array contains
11067 a single element and object array contains many, the single metric
11068 name array element is applied to each object array element to form
11069 metric/object pairs.
11070 </note>
11071 </desc>
11072 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11073 <desc>
11074 Metric name filter. Comma-separated list of metrics with wildcard
11075 support.
11076 </desc>
11077 </param>
11078 <param name="objects" type="$unknown" dir="in" safearray="yes">
11079 <desc>
11080 Set of objects to disable metrics for.
11081 </desc>
11082 </param>
11083 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11084 <desc>
11085 Array of metrics that have been modified by the call to this method.
11086 </desc>
11087 </param>
11088 </method>
11089
11090 <method name="queryMetricsData">
11091 <desc>
11092 Queries collected metrics data for a set of objects.
11093
11094 The data itself and related metric information are returned in seven
11095 parallel and one flattened array of arrays. Elements of
11096 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
11097 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
11098 the same index describe one set of values corresponding to a single
11099 metric.
11100
11101 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
11102 start and length of a sub-array is indicated by
11103 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
11104 value for metric <tt>metricNames[i]</tt> is at
11105 <tt>returnData[returnIndices[i]]</tt>.
11106
11107 <note>
11108 @c Null or empty metric name array means all metrics. @c Null or empty
11109 object array means all existing objects. If metric name array contains
11110 a single element and object array contains many, the single metric
11111 name array element is applied to each object array element to form
11112 metric/object pairs.
11113 </note>
11114 <note>
11115 Data collection continues behind the scenes after call to @c
11116 queryMetricsData. The return data can be seen as the snapshot of
11117 the current state at the time of @c queryMetricsData call. The
11118 internally kept metric values are not cleared by the call. This makes
11119 possible querying different subsets of metrics or aggregates with
11120 subsequent calls. If periodic querying is needed it is highly
11121 suggested to query the values with @c interval*count period to avoid
11122 confusion. This way a completely new set of data values will be
11123 provided by each query.
11124 </note>
11125 </desc>
11126 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11127 <desc>
11128 Metric name filter. Comma-separated list of metrics with wildcard
11129 support.
11130 </desc>
11131 </param>
11132 <param name="objects" type="$unknown" dir="in" safearray="yes">
11133 <desc>
11134 Set of objects to query metrics for.
11135 </desc>
11136 </param>
11137 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
11138 <desc>
11139 Names of metrics returned in @c returnData.
11140 </desc>
11141 </param>
11142 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
11143 <desc>
11144 Objects associated with metrics returned in @c returnData.
11145 </desc>
11146 </param>
11147 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
11148 <desc>
11149 Units of measurement for each returned metric.
11150 </desc>
11151 </param>
11152 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
11153 <desc>
11154 Divisor that should be applied to return values in order to get
11155 floating point values. For example:
11156 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
11157 will retrieve the floating point value of i-th sample of the first
11158 metric.
11159 </desc>
11160 </param>
11161 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
11162 <desc>
11163 Sequence numbers of the first elements of value sequences of particular metrics
11164 returned in @c returnData. For aggregate metrics it is the sequence number of
11165 the sample the aggregate started calculation from.
11166 </desc>
11167 </param>
11168 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
11169 <desc>
11170 Indices of the first elements of value sequences of particular metrics
11171 returned in @c returnData.
11172 </desc>
11173 </param>
11174 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
11175 <desc>
11176 Lengths of value sequences of particular metrics.
11177 </desc>
11178 </param>
11179 <param name="returnData" type="long" dir="return" safearray="yes">
11180 <desc>
11181 Flattened array of all metric data containing sequences of values for
11182 each metric.
11183 </desc>
11184 </param>
11185 </method>
11186
11187 </interface>
11188
11189 <module name="VBoxSVC" context="LocalServer">
11190 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
11191 namespace="virtualbox.org">
11192 <interface name="IVirtualBox" default="yes"/>
11193 </class>
11194 </module>
11195
11196 <module name="VBoxC" context="InprocServer" threadingModel="Free">
11197 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
11198 namespace="virtualbox.org">
11199 <interface name="ISession" default="yes"/>
11200 </class>
11201 </module>
11202
11203</library>
11204
11205</idl>
11206<!-- 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