VirtualBox

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

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

detabify

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 404.9 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 14576 2008-11-25 15:12:09Z 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 Copyright (C) 2006-2007 Sun Microsystems, Inc.
52
53 This file is part of VirtualBox Open Source Edition (OSE), as
54 available from http://www.virtualbox.org. This file is free software;
55 you can redistribute it and/or modify it under the terms of the GNU
56 General Public License (GPL) as published by the Free Software
57 Foundation, in version 2 as it comes in the "COPYING" file of the
58 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
59 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
60
61 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
62 Clara, CA 95054 USA or visit http://www.sun.com if you need
63 additional information or have any questions.
64-->
65
66<idl>
67
68<desc>
69 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
70 describes the so-called <i>VirtualBox Main API</i> which comprises all public
71 COM interfaces and components provided by the VirtualBox server and by the
72 VirtualBox client library.
73
74 VirtualBox employs a client-server design, meaning that whenever any part of
75 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
76 interface or any virtual machine --, a dedicated server process named
77 VBoxSVC runs in the background. This allows multiple processes working with
78 VirtualBox to cooperate without conflicts. These processes communicate to each
79 other using inter-process communication facilities provided by the COM
80 implementation of the host computer.
81
82 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
83 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
84 implementation, is used.
85
86 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
87 the VBoxManage command-line interface and the VBoxVRDP server) are technically
88 front-ends to the Main API and only use the interfaces that are documented
89 in this Main API documentation. This ensures that, with any given release
90 version of VirtualBox, all capabilities of the product that could be useful
91 to an external client program are always exposed by way of this API.
92
93 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
94 contains two public component classes:
95 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
96 implement IVirtualBox and ISession interfaces respectively. These two classes
97 are of supreme importance and will be needed in order for any front-end
98 program to do anything useful. It is recommended to read the documentation of
99 the mentioned interfaces first.
100
101 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
102 there can be only one object of this class on the local machine at any given
103 time. This object is a parent of many other objects ih the VirtualBox COM
104 library and lives in the VBoxSVC process. In fact, when you create an instance
105 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
106 process is already running, starts it if not, and returns you a reference to
107 the<tt>VirtualBox</tt> object created in this process. When the last reference
108 to this object is released, the VBoxSVC process ends (with a 5 second delay to
109 protect from too frequent restarts).
110
111 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
112 as many <tt>Session</tt> objects as you need but all of them will live in a
113 process which issues the object instantiation call. <tt>Session</tt> objects
114 represent virtual machine sessions which are used to configure virtual
115 machines and control their execution.
116</desc>
117
118<if target="midl">
119 <cpp line="enum {"/>
120 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
121 <cpp line=" kTypeLibraryMinorVersion = 0"/>
122 <cpp line="};"/>
123</if>
124
125<if target="xpidl">
126 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
127 <cpp>
128/* currently, nsISupportsImpl.h lacks the below-like macros */
129
130#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
131#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
132
133#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
134# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
135 NS_IMPL_THREADSAFE_ADDREF(_class) \
136 NS_IMPL_THREADSAFE_RELEASE(_class) \
137 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
138 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
139#endif
140
141#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
142# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
143 NS_IMPL_THREADSAFE_ADDREF(_class) \
144 NS_IMPL_THREADSAFE_RELEASE(_class) \
145 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
146 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
147#endif
148
149#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
150# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
151 NS_INTERFACE_MAP_BEGIN(_class) \
152 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
153 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
154 NS_IMPL_QUERY_CLASSINFO(_class) \
155 NS_INTERFACE_MAP_END
156#endif
157
158#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
159# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
160 _i2, _ic2) \
161 NS_INTERFACE_MAP_BEGIN(_class) \
162 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
163 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
164 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
165 NS_IMPL_QUERY_CLASSINFO(_class) \
166 NS_INTERFACE_MAP_END
167#endif
168
169#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
170#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
171
172#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
173# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
174 NS_IMPL_THREADSAFE_ADDREF(_class) \
175 NS_IMPL_THREADSAFE_RELEASE(_class) \
176 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
177 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
178#endif
179
180#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
181# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
182 _i2, _ic2) \
183 NS_IMPL_THREADSAFE_ADDREF(_class) \
184 NS_IMPL_THREADSAFE_RELEASE(_class) \
185 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
186 _i2, _ic2) \
187 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
188#endif
189 </cpp>
190</if>
191
192<library
193 name="VirtualBox"
194 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
195 version="1.3"
196 desc="VirtualBox Type Library"
197 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
198 supportsErrorInfo="yes"
199>
200
201
202 <!--
203 // COM result codes for VirtualBox
204 /////////////////////////////////////////////////////////////////////////
205 -->
206
207 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
208 <desc>
209 This section describes all VirtualBox-specific COM result codes that may
210 be returned by methods of VirtualBox COM interfaces in addition to
211 standard COM result codes.
212
213 Note that along with the result code, every VirtualBox method returns
214 extended error information through the IVirtualBoxErrorInfo interface on
215 failure. This interface is a preferred way to present the error to the end
216 user because it contains a human readable description of the error. Raw
217 result codes, both standard and described in this section, are intended to
218 be used by programs to analyze the reason of a failure and select an
219 appropriate course of action without involving the end user (for example,
220 retry the operation later or make a different call).
221
222 The standard COM result codes that may originate from our methods include:
223
224 <table>
225 <tr><td>E_INVALIDARG</td>
226 <td>
227 Returned when the value of the method's argument is not within the range
228 of valid values. This should not be confused with situations when the
229 value is within the range but simply doesn't suit the current object
230 state and there is a possibility that it will be accepted later (in such
231 cases VirtualBox-specific codes are returned, for example,
232 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
233 </td>
234 </tr>
235 <tr><td>E_POINTER</td>
236 <td>
237 Returned if a memory pointer for the output argument is invalid (for
238 example, <tt>NULL</tt>). Note that when pointers representing input
239 arguments (such as strings) are invalid, E_INVALIDARG is returned.
240 </td>
241 </tr>
242 <tr><td>E_ACCESSDENIED</td>
243 <td>
244 Returned when the called object is not ready. Since the lifetime of a
245 public COM object cannot be fully controlled by the implementation,
246 VirtualBox maintains the readiness state for all objects it creates and
247 returns this code in response to any method call on the object that was
248 deactivated by VirtualBox and is not functioning any more.
249 </td>
250 </tr>
251 <tr><td>E_OUTOFMEMORY</td>
252 <td>
253 Returned when a memory allocation operation fails.
254 </td>
255 </tr>
256 </table>
257 </desc>
258 </descGroup>
259
260 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
261 <desc>
262 Object corresponding to the supplied arguments does not exist.
263 </desc>
264 </result>
265
266 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
267 <desc>
268 Current virtual machine state prevents the operation.
269 </desc>
270 </result>
271
272 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
273 <desc>
274 Virtual machine error occurred attempting the operation.
275 </desc>
276 </result>
277
278 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
279 <desc>
280 File not accessible or erroneous file contents.
281 </desc>
282 </result>
283
284 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
285 <desc>
286 Runtime subsystem error.
287 </desc>
288 </result>
289
290 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
291 <desc>
292 Pluggable Device Manager error.
293 </desc>
294 </result>
295
296 <descGroup/>
297
298 <!--
299 // all common enums
300 /////////////////////////////////////////////////////////////////////////
301 -->
302
303 <enum
304 name="TSBool"
305 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
306 >
307 <desc>
308 Boolean variable having a third state, default.
309 </desc>
310
311 <const name="False" value="0"/>
312 <const name="True" value="1"/>
313 <const name="Default" value="2"/>
314 </enum>
315
316 <enum
317 name="MachineState"
318 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
319 >
320 <desc>
321 Virtual machine execution state. This enumeration represents possible
322 values of the <link to="IMachine::state"/> attribute.
323 </desc>
324
325 <const name="Null" value="0">
326 <desc><tt>null</tt> value. Never used by the API.</desc>
327 </const>
328 <const name="PoweredOff" value="1">
329 <desc>
330 The machine is not running.
331 </desc>
332 </const>
333 <const name="Saved" value="2">
334 <desc>
335 The machine is not currently running, but the execution state
336 of the machine has been saved to an external file when it
337 was running.
338 <note>
339 Only a few machine settings can be altered when the machine
340 is in this state.
341 </note>
342 </desc>
343 </const>
344 <const name="Aborted" value="3">
345 <desc>
346 A process running the machine has terminated abnormally.
347 Other than that, this value is equivalent to #PoweredOff.
348 </desc>
349 </const>
350 <const name="Running" value="4">
351 <desc>
352 The machine is currently being executed.
353 <note>
354 This value can be used in relational expressions:
355 all state values less than Running describe a virtual machine that is
356 not currently being executed (i.e., it is completely out of
357 action).
358 </note>
359 <note internal="yes">
360 For whoever decides to touch this enum: In order to keep the
361 aforementioned comparisons valid, this state must immediately
362 precede the Paused state.
363 </note>
364 </desc>
365 </const>
366 <const name="Paused" value="5">
367 <desc>
368 Execution of the machine has been paused.
369 <note>
370 This value can be used in relational expressions: all state values
371 greater than Paused represent unstable states of the running virtual
372 machine. Unless explicitly stated otherwise, no machine settings can
373 be altered when it is in one of the unstable states.
374 </note>
375 <note internal="yes">
376 For whoever decides to touch this enum: In order to keep the
377 aforementioned comparisons valid, this state must immediately
378 follow the Running state.
379 </note>
380 </desc>
381 </const>
382 <const name="Stuck" value="6">
383 <desc>
384 Execution of the machine has reached the "Guru Meditation"
385 condition. This condition indicates an internal VMM failure which may
386 happen as a result of either an unhandled low-level virtual hardware
387 exception or one of the recompiler exceptions (such as
388 the <i>too-many-traps</i> condition).
389 </desc>
390 </const>
391 <const name="Starting" value="7">
392 <desc>
393 Machine is being started after
394 <link to="IConsole::powerUp">powering it on</link> from a
395 zero execution state.
396 </desc>
397 </const>
398 <const name="Stopping" value="8">
399 <desc>
400 Machine is being normally stopped
401 (after explicitly <link to="IConsole::powerDown">powering it off</link>,
402 or after the guest OS has initiated a shutdown sequence).
403 </desc>
404 </const>
405 <const name="Saving" value="9">
406 <desc>
407 Machine is saving its execution state to a file as a
408 result of calling <link to="IConsole::saveState"/> or an online
409 snapshot of the machine is being taken using
410 <link to="IConsole::takeSnapshot"/>.
411 </desc>
412 </const>
413 <const name="Restoring" value="10">
414 <desc>
415 Execution state of the machine is being restored from a file
416 after <link to="IConsole::powerUp">powering it on</link> from
417 a saved execution state.
418 </desc>
419 </const>
420 <const name="Discarding" value="11">
421 <desc>
422 Snapshot of the machine is being discarded after calling
423 <link to="IConsole::discardSnapshot"/> or its current state is
424 being discarded after <link to="IConsole::discardCurrentState"/>.
425 </desc>
426 </const>
427 <const name="SettingUp" value="12">
428 <desc>
429 Lengthy setup operation is in progress (e.g.
430 <link to="IMachine::attachHardDisk2"/>).
431 </desc>
432 </const>
433 </enum>
434
435 <enum
436 name="SessionState"
437 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
438 >
439 <desc>
440 Session state. This enumeration represents possible values of
441 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
442 attributes. Individual value descriptions contain the appropriate
443 meaning for every case.
444 </desc>
445
446 <const name="Null" value="0">
447 <desc><tt>null</tt> value. Never used by the API.</desc>
448 </const>
449 <const name="Closed" value="1">
450 <desc>
451 The machine has no open sessions (<link to="IMachine::sessionState"/>);
452 the session is closed (<link to="ISession::state"/>)
453 </desc>
454 </const>
455 <const name="Open" value="2">
456 <desc>
457 The machine has an open direct session (<link to="IMachine::sessionState"/>);
458 the session is open (<link to="ISession::state"/>)
459 </desc>
460 </const>
461 <const name="Spawning" value="3">
462 <desc>
463 A new (direct) session is being opened for the machine
464 as a result of <link to="IVirtualBox::openRemoteSession()"/>
465 call (<link to="IMachine::sessionState"/>);
466 the session is currently being opened
467 as a result of <link to="IVirtualBox::openRemoteSession()"/>
468 call (<link to="ISession::state"/>)
469 </desc>
470 </const>
471 <const name="Closing" value="4">
472 <desc>
473 The direct session is being closed (<link to="IMachine::sessionState"/>);
474 the session is being closed (<link to="ISession::state"/>)
475 </desc>
476 </const>
477 </enum>
478
479 <enum
480 name="SessionType"
481 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
482 >
483 <desc>
484 Session type. This enumeration represents possible values of the
485 <link to="ISession::type"/> attribute.
486 </desc>
487
488 <const name="Null" value="0">
489 <desc><tt>null</tt> value. Never used by the API.</desc>
490 </const>
491 <const name="Direct" value="1">
492 <desc>
493 Direct session
494 (opened by <link to="IVirtualBox::openSession()"/>)
495 </desc>
496 </const>
497 <const name="Remote" value="2">
498 <desc>
499 Remote session
500 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
501 </desc>
502 </const>
503 <const name="Existing" value="3">
504 <desc>
505 Existing session
506 (opened by <link to="IVirtualBox::openExistingSession()"/>)
507 </desc>
508 </const>
509 </enum>
510
511 <enum
512 name="DeviceType"
513 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
514 >
515 <desc>
516 Device type.
517 </desc>
518 <const name="Null" value="0">
519 <desc>
520 <tt>null</tt> value which may also mean "no device".
521 <note>
522 This value is not allowed for
523 <link to="IConsole::getDeviceActivity"/>
524 </note>
525 </desc>
526 </const>
527 <const name="Floppy" value="1">
528 <desc>Floppy device.</desc>
529 </const>
530 <const name="DVD" value="2">
531 <desc>CD/DVD-ROM device.</desc>
532 </const>
533 <const name="HardDisk" value="3">
534 <desc>Hard disk device.</desc>
535 </const>
536 <const name="Network" value="4">
537 <desc>Network device.</desc>
538 </const>
539 <const name="USB" value="5">
540 <desc>USB device.</desc>
541 </const>
542 <const name="SharedFolder" value="6">
543 <desc>Shared folder device.</desc>
544 </const>
545 </enum>
546
547 <enum
548 name="DeviceActivity"
549 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
550 >
551 <desc>
552 Device activity for <link to="IConsole::getDeviceActivity"/>.
553 </desc>
554
555 <const name="Null" value="0"/>
556 <const name="Idle" value="1"/>
557 <const name="Reading" value="2"/>
558 <const name="Writing" value="3"/>
559 </enum>
560
561 <enum
562 name="StorageBus"
563 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
564 >
565 <desc>Interface bus type for storage devices.</desc>
566
567 <const name="Null" value="0">
568 <desc><tt>null</tt> value. Never used by the API.</desc>
569 </const>
570
571 <const name="IDE" value="1"/>
572 <const name="SATA" value="2"/>
573 </enum>
574
575 <enum
576 name="ClipboardMode"
577 uuid="33364716-4008-4701-8f14-be0fa3d62950"
578 >
579 <desc>
580 Host-Guest clipboard interchange mode.
581 </desc>
582
583 <const name="Disabled" value="0"/>
584 <const name="HostToGuest" value="1"/>
585 <const name="GuestToHost" value="2"/>
586 <const name="Bidirectional" value="3"/>
587 </enum>
588
589 <enum
590 name="Scope"
591 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
592 >
593 <desc>
594 Scope of the operation.
595
596 A generic enumeration used in various methods to define the action or
597 argument scope.
598 </desc>
599
600 <const name="Global" value="0"/>
601 <const name="Machine" value="1"/>
602 <const name="Session" value="2"/>
603 </enum>
604
605 <enum
606 name="GuestStatisticType"
607 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
608 >
609 <desc>
610 Statistics type for <link to="IGuest::getStatistic"/>.
611 </desc>
612
613 <const name="CPULoad_Idle" value="0">
614 <desc>
615 Idle CPU load (0-100%) for last interval.
616 </desc>
617 </const>
618 <const name="CPULoad_Kernel" value="1">
619 <desc>
620 Kernel CPU load (0-100%) for last interval.
621 </desc>
622 </const>
623 <const name="CPULoad_User" value="2">
624 <desc>
625 User CPU load (0-100%) for last interval.
626 </desc>
627 </const>
628 <const name="Threads" value="3">
629 <desc>
630 Total number of threads in the system.
631 </desc>
632 </const>
633 <const name="Processes" value="4">
634 <desc>
635 Total number of processes in the system.
636 </desc>
637 </const>
638 <const name="Handles" value="5">
639 <desc>
640 Total number of handles in the system.
641 </desc>
642 </const>
643 <const name="MemoryLoad" value="6">
644 <desc>
645 Memory load (0-100%).
646 </desc>
647 </const>
648 <const name="PhysMemTotal" value="7">
649 <desc>
650 Total physical memory in megabytes.
651 </desc>
652 </const>
653 <const name="PhysMemAvailable" value="8">
654 <desc>
655 Free physical memory in megabytes.
656 </desc>
657 </const>
658 <const name="PhysMemBalloon" value="9">
659 <desc>
660 Ballooned physical memory in megabytes.
661 </desc>
662 </const>
663 <const name="MemCommitTotal" value="10">
664 <desc>
665 Total amount of memory in the committed state in megabytes.
666 </desc>
667 </const>
668 <const name="MemKernelTotal" value="11">
669 <desc>
670 Total amount of memory used by the guest OS's kernel in megabytes.
671 </desc>
672 </const>
673 <const name="MemKernelPaged" value="12">
674 <desc>
675 Total amount of paged memory used by the guest OS's kernel in megabytes.
676 </desc>
677 </const>
678 <const name="MemKernelNonpaged" value="13">
679 <desc>
680 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
681 </desc>
682 </const>
683 <const name="MemSystemCache" value="14">
684 <desc>
685 Total amount of memory used by the guest OS's system cache in megabytes.
686 </desc>
687 </const>
688 <const name="PageFileSize" value="15">
689 <desc>
690 Pagefile size in megabytes.
691 </desc>
692 </const>
693 <const name="SampleNumber" value="16">
694 <desc>
695 Statistics sample number
696 </desc>
697 </const>
698 <const name="MaxVal" value="17"/>
699 </enum>
700
701 <enum
702 name="BIOSBootMenuMode"
703 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
704 >
705 <desc>
706 BIOS boot menu mode.
707 </desc>
708
709 <const name="Disabled" value="0"/>
710 <const name="MenuOnly" value="1"/>
711 <const name="MessageAndMenu" value="2"/>
712 </enum>
713
714 <enum
715 name="IDEControllerType"
716 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
717 >
718 <desc>
719 IDE controller type.
720 </desc>
721
722 <const name="Null" value="0">
723 <desc><tt>null</tt> value. Never used by the API.</desc>
724 </const>
725 <const name="PIIX3" value="1"/>
726 <const name="PIIX4" value="2"/>
727 </enum>
728
729 <enum
730 name="DriveState"
731 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
732 >
733 <const name="Null" value="0">
734 <desc><tt>null</tt> value. Never used by the API.</desc>
735 </const>
736 <const name="NotMounted" value="1"/>
737 <const name="ImageMounted" value="2"/>
738 <const name="HostDriveCaptured" value="3"/>
739 </enum>
740
741 <enum
742 name="ProcessorFeature"
743 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
744 >
745 <desc>
746 CPU features.
747 </desc>
748
749 <const name="HWVirtEx" value="0"/>
750 <const name="PAE" value="1"/>
751 <const name="LongMode" value="2"/>
752 </enum>
753
754
755 <!--
756 // IVirtualBoxErrorInfo
757 /////////////////////////////////////////////////////////////////////////
758 -->
759
760 <interface
761 name="IVirtualBoxErrorInfo" extends="$errorinfo"
762 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
763 supportsErrorInfo="no"
764 wsmap="suppress"
765 >
766 <desc>
767 The IVirtualBoxErrorInfo interface represents extended error information.
768
769 Extended error information can be set by VirtualBox components after
770 unsuccessful or partially successful method invocation. This information
771 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
772 and then shown to the client in addition to the plain 32-bit result code.
773
774 In MS COM, this interface extends the IErrorInfo interface,
775 in XPCOM, it extends the nsIException interface. In both cases,
776 it provides a set of common attributes to retrieve error
777 information.
778
779 Sometimes invocation of some component's method may involve methods of
780 other components that may also fail (independently of this method's
781 failure), or a series of non-fatal errors may precede a fatal error that
782 causes method failure. In cases like that, it may be desirable to preserve
783 information about all errors happened during method invocation and deliver
784 it to the caller. The <link to="#next"/> attribute is intended
785 specifically for this purpose and allows to represent a chain of errors
786 through a single IVirtualBoxErrorInfo object set after method invocation.
787
788 Note that errors are stored to a chain in the reverse order, i.e. the
789 initial error object you query right after method invocation is the last
790 error set by the callee, the object it points to in the @a next attribute
791 is the previous error and so on, up to the first error (which is the last
792 in the chain).
793 </desc>
794
795 <attribute name="resultCode" type="result" readonly="yes">
796 <desc>
797 Result code of the error.
798 Usually, it will be the same as the result code returned
799 by the method that provided this error information, but not
800 always. For example, on Win32, CoCreateInstance() will most
801 likely return E_NOINTERFACE upon unsuccessful component
802 instantiation attempt, but not the value the component factory
803 returned.
804 <note>
805 In MS COM, there is no equivalent.
806 In XPCOM, it is the same as nsIException::result.
807 </note>
808 </desc>
809 </attribute>
810
811 <attribute name="interfaceID" type="uuid" readonly="yes">
812 <desc>
813 UUID of the interface that defined the error.
814 <note>
815 In MS COM, it is the same as IErrorInfo::GetGUID.
816 In XPCOM, there is no equivalent.
817 </note>
818 </desc>
819 </attribute>
820
821 <attribute name="component" type="wstring" readonly="yes">
822 <desc>
823 Name of the component that generated the error.
824 <note>
825 In MS COM, it is the same as IErrorInfo::GetSource.
826 In XPCOM, there is no equivalent.
827 </note>
828 </desc>
829 </attribute>
830
831 <attribute name="text" type="wstring" readonly="yes">
832 <desc>
833 Text description of the error.
834 <note>
835 In MS COM, it is the same as IErrorInfo::GetDescription.
836 In XPCOM, it is the same as nsIException::message.
837 </note>
838 </desc>
839 </attribute>
840
841 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
842 <desc>
843 Next error object if there is any, or @c null otherwise.
844 <note>
845 In MS COM, there is no equivalent.
846 In XPCOM, it is the same as nsIException::inner.
847 </note>
848 </desc>
849 </attribute>
850
851 </interface>
852
853
854 <!--
855 // IVirtualBox
856 /////////////////////////////////////////////////////////////////////////
857 -->
858
859 <interface
860 name="IVirtualBoxCallback" extends="$unknown"
861 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
862 wsmap="suppress"
863 >
864 <method name="onMachineStateChange">
865 <desc>
866 The execution state of the given machine has changed.
867 <see>IMachine::state</see>
868 </desc>
869 <param name="machineId" type="uuid" dir="in">
870 <desc>ID of the machine this event relates to.</desc>
871 </param>
872 <param name="state" type="MachineState" dir="in">
873 <desc>New execution state.</desc>
874 </param>
875 </method>
876
877 <method name="onMachineDataChange">
878 <desc>
879 Any of the settings of the given machine has changed.
880 </desc>
881 <param name="machineId" type="uuid" dir="in">
882 <desc>ID of the machine this event relates to.</desc>
883 </param>
884 </method>
885
886 <method name="onExtraDataCanChange">
887 <desc>
888 Notification when someone tries to change extra data for
889 either the given machine or (if null) global extra data.
890 This gives the chance to veto against changes.
891 </desc>
892 <param name="machineId" type="uuid" dir="in">
893 <desc>
894 ID of the machine this event relates to
895 (null ID for global extra data change requests).
896 </desc>
897 </param>
898 <param name="key" type="wstring" dir="in">
899 <desc>
900 Extra data key for the attempted write.
901 </desc>
902 </param>
903 <param name="value" type="wstring" dir="in">
904 <desc>
905 Extra data value for the given key.
906 </desc>
907 </param>
908 <param name="error" type="wstring" dir="out">
909 <desc>
910 Optional error message describing the reason of the
911 veto (ignored if this notification returns @c true).
912 </desc>
913 </param>
914 <param name="allowChange" type="boolean" dir="return">
915 <desc>
916 Flag to indicate whether the callee agrees (@c true)
917 or vetoes against the change (@c false).
918 </desc>
919 </param>
920 </method>
921
922 <method name="onExtraDataChange">
923 <desc>
924 Notification when machine specific or global extra data
925 has changed.
926 </desc>
927 <param name="machineId" type="uuid" dir="in">
928 <desc>
929 ID of the machine this event relates to.
930 Null for global extra data changes.
931 </desc>
932 </param>
933 <param name="key" type="wstring" dir="in">
934 <desc>
935 Extra data key that has changed.
936 </desc>
937 </param>
938 <param name="value" type="wstring" dir="in">
939 <desc>
940 Extra data value for the given key.
941 </desc>
942 </param>
943 </method>
944
945 <method name="onMediaRegistered">
946 <desc>
947 The given media was registered or unregistered
948 within this VirtualBox installation.
949
950 The @a mediaType parameter describes what type of
951 media the specified @a mediaId refers to. Possible
952 values are:
953
954 <ul>
955 <li><link to="DeviceType::HardDisk"/>: the media is a hard disk
956 that, if registered, can be obtained using the
957 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
958 <li><link to="DeviceType::DVD"/>: the media is a CD/DVD image
959 that, if registered, can be obtained using the
960 <link to="IVirtualBox::getDVDImage()"/> call.</li>
961 <li><link to="DeviceType::Floppy"/>: the media is a Floppy image
962 that, if registered, can be obtained using the
963 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
964 </ul>
965
966 Note that if this is a deregistration notification,
967 there is no way to access the object representing the
968 unregistered media. It is supposed that the
969 application will do required cleanup based on the @a
970 mediaId value.
971 </desc>
972 <param name="mediaId" type="uuid" dir="in">
973 <desc>ID of the media this event relates to.</desc>
974 </param>
975 <param name="mediaType" type="DeviceType" dir="in">
976 <desc>Type of the media this event relates to.</desc>
977 </param>
978 <param name="registered" type="boolean" dir="in">
979 <desc>
980 If true, the media was registered, otherwise it was
981 unregistered.
982 </desc>
983 </param>
984 </method>
985
986 <method name="onMachineRegistered">
987 <desc>
988 The given machine was registered or unregistered
989 within this VirtualBox installation.
990 </desc>
991 <param name="machineId" type="uuid" dir="in">
992 <desc>ID of the machine this event relates to.</desc>
993 </param>
994 <param name="registered" type="boolean" dir="in">
995 <desc>
996 If true, the machine was registered, otherwise it was
997 unregistered.
998 </desc>
999 </param>
1000 </method>
1001
1002 <method name="onSessionStateChange">
1003 <desc>
1004 The state of the session for the given machine was changed.
1005 <see>IMachine::sessionState</see>
1006 </desc>
1007 <param name="machineId" type="uuid" dir="in">
1008 <desc>ID of the machine this event relates to.</desc>
1009 </param>
1010 <param name="state" type="SessionState" dir="in">
1011 <desc>New session state.</desc>
1012 </param>
1013 </method>
1014
1015 <method name="onSnapshotTaken">
1016 <desc>
1017 A new snapshot of the machine has been taken.
1018 <see>ISnapshot</see>
1019 </desc>
1020 <param name="machineId" type="uuid" dir="in">
1021 <desc>ID of the machine this event relates to.</desc>
1022 </param>
1023 <param name="snapshotId" type="uuid" dir="in">
1024 <desc>ID of the new snapshot.</desc>
1025 </param>
1026 </method>
1027
1028 <method name="onSnapshotDiscarded">
1029 <desc>
1030 Snapshot of the given machine has been discarded.
1031
1032 <note>
1033 This notification is delivered <b>after</b> the snapshot
1034 object has been uninitialized on the server (so that any
1035 attempt to call its methods will return an error).
1036 </note>
1037
1038 <see>ISnapshot</see>
1039 </desc>
1040 <param name="machineId" type="uuid" dir="in">
1041 <desc>ID of the machine this event relates to.</desc>
1042 </param>
1043 <param name="snapshotId" type="uuid" dir="in">
1044 <desc>
1045 ID of the discarded snapshot. <tt>null</tt> means the
1046 current machine state has been discarded (restored from
1047 the current snapshot).
1048 </desc>
1049 </param>
1050 </method>
1051
1052 <method name="onSnapshotChange">
1053 <desc>
1054 Snapshot properties (name and/or description) have been changed.
1055 <see>ISnapshot</see>
1056 </desc>
1057 <param name="machineId" type="uuid" dir="in">
1058 <desc>ID of the machine this event relates to.</desc>
1059 </param>
1060 <param name="snapshotId" type="uuid" dir="in">
1061 <desc>ID of the changed snapshot.</desc>
1062 </param>
1063 </method>
1064
1065 <method name="onGuestPropertyChange">
1066 <desc>
1067 Notification when a guest property has changed.
1068 </desc>
1069 <param name="machineId" type="uuid" dir="in">
1070 <desc>
1071 ID of the machine this event relates to.
1072 </desc>
1073 </param>
1074 <param name="name" type="wstring" dir="in">
1075 <desc>
1076 The name of the property that has changed.
1077 </desc>
1078 </param>
1079 <param name="value" type="wstring" dir="in">
1080 <desc>
1081 The new property value.
1082 </desc>
1083 </param>
1084 <param name="flags" type="wstring" dir="in">
1085 <desc>
1086 The new property flags.
1087 </desc>
1088 </param>
1089 </method>
1090
1091 </interface>
1092
1093 <interface
1094 name="IVirtualBox" extends="$dispatched"
1095 uuid="2aa11223-ba64-4610-84b8-066d2a89384f"
1096 wsmap="managed"
1097 >
1098 <desc>
1099 The IVirtualBox interface represents the main interface exposed by the
1100 product that provides virtual machine management.
1101
1102 An instance of IVirtualBox is required for the product to do anything
1103 useful. Even though the interface does not expose this, internally,
1104 IVirtualBox is implemented as a singleton and actually lives in the
1105 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1106 IVirtualBox can track the state of all virtual machines on a particular
1107 host, regardless of which frontend started them.
1108
1109 To enumerate all the virtual machines on the host, use the
1110 <link to="IVirtualBox::machines2"/> attribute.
1111 </desc>
1112
1113 <attribute name="version" type="wstring" readonly="yes">
1114 <desc>
1115 A string representing the version number of the product. The
1116 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1117 last number represents the build number and will frequently change.
1118 </desc>
1119 </attribute>
1120
1121 <attribute name="revision" type="unsigned long" readonly="yes">
1122 <desc>
1123 The internal build revision number of the product.
1124 </desc>
1125 </attribute>
1126
1127 <attribute name="packageType" type="wstring" readonly="yes">
1128 <desc>
1129 A string representing the package type of this product. The
1130 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1131 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1132 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1133 this.
1134 </desc>
1135 </attribute>
1136
1137 <attribute name="homeFolder" type="wstring" readonly="yes">
1138 <desc>
1139 Full path to the directory where the global settings file,
1140 <tt>VirtualBox.xml</tt>, is stored.
1141
1142 In this version of VirtualBox, the value of this property is
1143 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1144 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1145 as determined by the host OS), and cannot be changed.
1146
1147 This path is also used as the base to resolve relative paths in
1148 places where relative paths are allowed (unless otherwise
1149 expressly indicated).
1150 </desc>
1151 </attribute>
1152
1153 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1154 <desc>
1155 Full name of the global settings file.
1156 The value of this property corresponds to the value of
1157 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1158 </desc>
1159 </attribute>
1160
1161 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1162 <desc>
1163 Current version of the format of the global VirtualBox settings file
1164 (<tt>VirtualBox.xml</tt>).
1165
1166 The version string has the following format:
1167 <pre>
1168 x.y-platform
1169 </pre>
1170 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1171 versions, and <tt>platform</tt> is the platform identifier.
1172
1173 The current version usually matches the value of the
1174 <link to="#settingsFormatVersion"/> attribute unless the
1175 settings file was created by an older version of VirtualBox and there
1176 was a change of the settings file format since then.
1177
1178 Note that VirtualBox automatically converts settings files from older
1179 versions to the most recent version when reading them (usually at
1180 VirtualBox startup) but it doesn't save the changes back until
1181 you call a method that implicitly saves settings (such as
1182 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1183 explicitly. Therefore, if the value of this attribute differs from the
1184 value of <link to="#settingsFormatVersion"/>, then it
1185 means that the settings file was converted but the result of the
1186 conversion is not yet saved to disk.
1187
1188 The above feature may be used by interactive front-ends to inform users
1189 about the settings file format change and offer them to explicitly save
1190 all converted settings files (the global and VM-specific ones),
1191 optionally create backup copies of the old settings files before saving,
1192 etc.
1193
1194 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1195 </desc>
1196 </attribute>
1197
1198 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1199 <desc>
1200 Most recent version of the settings file format.
1201
1202 The version string has the following format:
1203 <pre>
1204 x.y-platform
1205 </pre>
1206 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1207 versions, and <tt>platform</tt> is the platform identifier.
1208
1209 VirtualBox uses this version of the format when saving settings files
1210 (either as a result of method calls that require to save settings or as
1211 a result of an explicit call to <link to="#saveSettings()"/>).
1212
1213 <see>settingsFileVersion</see>
1214 </desc>
1215 </attribute>
1216
1217 <attribute name="host" type="IHost" readonly="yes">
1218 <desc>Associated host object.</desc>
1219 </attribute>
1220
1221 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1222 <desc>Associated system information object.</desc>
1223 </attribute>
1224
1225 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1226 <desc>
1227 Array of machine objects registered within this VirtualBox instance.
1228 </desc>
1229 </attribute>
1230
1231 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1232 <desc>
1233 Array of hard disk objects known to this VirtualBox installation.
1234
1235 This array contains only base (root) hard disks. All differencing
1236 hard disks of the given base hard disk can be enumerated using
1237 <link to="IHardDisk2::children"/>.
1238 </desc>
1239 </attribute>
1240
1241 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1242 <desc>
1243 Array of CD/DVD image objects registered with this VirtualBox instance.
1244 </desc>
1245 </attribute>
1246
1247 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1248 <desc>
1249 Array of floppy image objects registered with this VirtualBox instance.
1250 </desc>
1251 </attribute>
1252
1253 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1254
1255 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1256
1257 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1258 <desc>
1259 Collection of global shared folders. Global shared folders are
1260 available to all virtual machines.
1261
1262 New shared folders are added to the collection using
1263 <link to="#createSharedFolder"/>. Existing shared folders can be
1264 removed using <link to="#removeSharedFolder"/>.
1265
1266 <note>
1267 In the current version of the product, global shared folders are not
1268 implemented and therefore this collection is always empty.
1269 </note>
1270 </desc>
1271 </attribute>
1272
1273 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1274 <desc>
1275 Associated performance collector object.
1276 </desc>
1277 </attribute>
1278
1279 <method name="createMachine">
1280 <desc>
1281 Creates a new virtual machine.
1282
1283 The new machine will have "empty" default settings and will not
1284 yet be registered. The typical sequence to create a virtual machine
1285 is therefore something like this:
1286
1287 <ol>
1288 <li>Call this method (IVirtualBox::createMachine) to have a new
1289 machine created. The machine object returned is "mutable", i.e.
1290 automatically locked for the current session, as if
1291 <link to="#openSession" /> had been called on it.</li>
1292
1293 <li>Assign meaningful settings to the new machine by calling the
1294 respective methods.</li>
1295
1296 <li>Call <link to="IMachine::saveSettings" /> to have the settings written
1297 to the machine's XML settings file. The configuration of the newly
1298 created machine will not be saved to disk (and the settings subfolder
1299 and file, as described below, will not be created) until this method
1300 is called.</li>
1301
1302 <li>Call <link to="#registerMachine" /> to have the
1303 machine show up in the list of machines registered with VirtualBox.</li>
1304 </ol>
1305
1306 Every machine has a <i>settings file</i> that is used to store
1307 the machine configuration. This file is stored in the directory
1308 called <i>machine settings subfolder</i>. Unless specified otherwise,
1309 both the subfolder and the settings file will have a name that
1310 corresponds to the name of the virtual machine. You can specify
1311 where to create the machine settings subfolder using the @a
1312 baseFolder argument. The base folder can be absolute (full path)
1313 or relative to the <link to="IVirtualBox::homeFolder">
1314 VirtualBox home directory</link>.
1315
1316 If a null or empty string is given as the base folder (which is
1317 recommended), the <link to="ISystemProperties::defaultMachineFolder">
1318 default machine settings folder</link> will be used as the base
1319 folder to create the machine settings subfolder and file. In
1320 any case, the full path to the settings file will look like:
1321 <pre>
1322 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1323 </pre>
1324
1325 Optionally the UUID of the machine can be predefined. If this is
1326 not desired (i.e. a new UUID should be generated), pass just an
1327 empty or null UUID.
1328
1329 You should also specify a valid name for the machine.
1330 See the <link to="IMachine::name"/> property
1331 description for more details about the machine name.
1332
1333 The created machine remains
1334 unregistered until you call <link to="#registerMachine()"/>.
1335
1336 <note>
1337 There is no way to change the name of the settings file or
1338 subfolder of the created machine directly.
1339 </note>
1340 </desc>
1341 <param name="baseFolder" type="wstring" dir="in">
1342 <desc>
1343 Name of the folder where to create the machine settings
1344 subfolder containing the settings file.
1345 </desc>
1346 </param>
1347 <param name="name" type="wstring" dir="in">
1348 <desc>Machine name.</desc>
1349 </param>
1350 <param name="id" type="uuid" dir="in">
1351 <desc>
1352 UUID of the newly created VM, when non-null or non-empty.
1353 Otherwise a UUID is automatically generated.
1354 </desc>
1355 </param>
1356 <param name="machine" type="IMachine" dir="return">
1357 <desc>Created machine object.</desc>
1358 </param>
1359 </method>
1360
1361 <method name="createLegacyMachine">
1362 <desc>
1363 Creates a new virtual machine in "legacy" mode, using the
1364 specified settings file to store machine settings.
1365
1366 As opposed to machines created by <link to="#createMachine()"/>,
1367 the settings file of the machine created in "legacy" mode
1368 is not automatically renamed when the machine name is
1369 changed -- it will always remain the same as specified in this
1370 method call.
1371
1372 The specified settings file name can be absolute
1373 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1374 VirtualBox home directory</link>. If the file name doesn't
1375 contain an extension, the default extension (.xml) will be
1376 appended.
1377
1378 Optionally the UUID of the machine can be predefined. If this is
1379 not desired (i.e. a new UUID should be generated), pass just an
1380 empty or null UUID.
1381
1382 Note that the configuration of the newly created machine is not
1383 saved to disk (and therefore no settings file is created)
1384 until <link to="IMachine::saveSettings()"/> is called. If the
1385 specified settings file already exists,
1386 <link to="IMachine::saveSettings()"/> will return an error.
1387
1388 You should also specify a valid name for the machine.
1389 See the <link to="IMachine::name"/> property
1390 description for more details about the machine name.
1391
1392 The created machine remains
1393 unregistered until you call <link to="#registerMachine()"/>.
1394
1395 @deprecated This method may be removed later. It is better
1396 to use <link to="IVirtualBox::createMachine()"/>.
1397
1398 <note>
1399 There is no way to change the name of the settings file
1400 of the created machine.
1401 </note>
1402 </desc>
1403 <param name="settingsFile" type="wstring" dir="in">
1404 <desc>
1405 Name of the file where to store machine settings.
1406 </desc>
1407 </param>
1408 <param name="name" type="wstring" dir="in">
1409 <desc>Machine name.</desc>
1410 </param>
1411 <param name="id" type="uuid" dir="in">
1412 <desc>
1413 UUID of the newly created VM, when non-null or non-empty.
1414 Otherwise a UUID is automatically generated.
1415 </desc>
1416 </param>
1417 <param name="machine" type="IMachine" dir="return">
1418 <desc>Created machine object.</desc>
1419 </param>
1420 </method>
1421
1422 <method name="openMachine">
1423 <desc>
1424 Opens a virtual machine from the existing settings file.
1425 The opened machine remains unregistered until you call
1426 <link to="#registerMachine()"/>.
1427
1428 The specified settings file name can be absolute
1429 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1430 VirtualBox home directory</link>. This file must exist
1431 and must be a valid machine settings file whose contents
1432 will be used to construct the machine object.
1433
1434 @deprecated Will be removed soon.
1435 </desc>
1436 <param name="settingsFile" type="wstring" dir="in">
1437 <desc>
1438 Name of the machine settings file.
1439 </desc>
1440 </param>
1441 <param name="machine" type="IMachine" dir="return">
1442 <desc>Opened machine object.</desc>
1443 </param>
1444 <note>
1445 <link to="IMachine::settingsModified"/> will return
1446 false for the created machine, until any of machine settings
1447 are changed.
1448 </note>
1449 </method>
1450
1451 <method name="registerMachine">
1452 <desc>
1453
1454 Registers the machine previously created using
1455 <link to="#createMachine()"/> or opened using
1456 <link to="#openMachine()"/> within this VirtualBox installation. After
1457 successful method invocation, the
1458 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1459 to all registered callbacks.
1460
1461 <note>
1462 This method implicitly calls <link to="IMachine::saveSettings"/>
1463 to save all current machine settings before registering it.
1464 </note>
1465
1466 </desc>
1467 <param name="machine" type="IMachine" dir="in"/>
1468 </method>
1469
1470 <method name="getMachine">
1471 <desc>
1472 Attempts to find a virtual machine given its UUID.
1473 To look up a machine by name, use <link to="IVirtualBox::findMachine" /> instead.
1474 </desc>
1475 <param name="id" type="uuid" dir="in"/>
1476 <param name="machine" type="IMachine" dir="return"/>
1477 </method>
1478
1479 <method name="findMachine">
1480 <desc>
1481 Attempts to find a virtual machine given its name.
1482 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" /> instead.
1483 </desc>
1484 <param name="name" type="wstring" dir="in"/>
1485 <param name="machine" type="IMachine" dir="return"/>
1486 </method>
1487
1488 <method name="unregisterMachine">
1489 <desc>
1490
1491 Unregisters the machine previously registered using
1492 <link to="#registerMachine"/>. After successful method invocation, the
1493 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1494 to all registered callbacks.
1495
1496 <note>
1497 The specified machine must not be in the Saved state, have an open
1498 (or a spawning) direct session associated with it, have snapshots or
1499 have hard disks attached.
1500 </note>
1501
1502 <note>
1503 This method implicitly calls <link to="IMachine::saveSettings"/> to
1504 save all current machine settings before unregistering it.
1505 </note>
1506
1507 <note>
1508 If the given machine is inaccessible (see
1509 <link to="IMachine::accessible"/>), it will be unregistered and
1510 fully uninitialized right afterwards. As a result, the returned
1511 machine object will be unusable and an attempt to call
1512 <b>any</b> method will return the "Object not ready" error.
1513 </note>
1514
1515 </desc>
1516 <param name="id" type="uuid" dir="in">
1517 <desc>UUID of the machine to unregister.</desc>
1518 </param>
1519 <param name="machine" type="IMachine" dir="return">
1520 <desc>Unregistered machine object.</desc>
1521 </param>
1522 </method>
1523
1524 <method name="createHardDisk2">
1525 <desc>
1526 Creates a new base hard disk object that will use the given storage
1527 format and location for hard disk data.
1528
1529 Note that the actual storage unit is not created by this method. In
1530 order to do it, and before you are able to attach the created hard disk
1531 to virtual machines, you must call one of the following methods to
1532 allocate a format-specific storage unit at the specified location:
1533 <ul>
1534 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1535 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1536 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1537 </ul>
1538
1539 Some hard disk attributes, such as <link to="#id"/>, may remain
1540 uninitialized until the hard disk storage unit is successfully created
1541 by one of the above methods.
1542
1543 After the storage unit is successfully created, the hard disk gets
1544 remembered by this VirtualBox installation and will be accessible
1545 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1546 methods. Remembered root (base) hard disks are also returned as part of
1547 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1548
1549 The list of all storage formats supported by this VirtualBox
1550 installation can be obtained using
1551 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1552 attribute is empty or <tt>null</tt> then the default storage format
1553 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1554 be used for creating a storage unit of the hard disk.
1555
1556 Note that the format of the location string is storage format specific.
1557 See <link to="IMedium::location"/>, IHardDisk2 and
1558 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1559 </desc>
1560 <param name="format" type="wstring" dir="in">
1561 <desc>
1562 Identifier of the storage format to use for the new hard disk.
1563 </desc>
1564 </param>
1565 <param name="location" type="wstring" dir="in">
1566 <desc>
1567 Location of the storage unit for the new hard disk.
1568 </desc>
1569 </param>
1570 <param name="hardDisk" type="IHardDisk2" dir="return">
1571 <desc>Created hard disk object.</desc>
1572 </param>
1573 </method>
1574
1575 <method name="openHardDisk2">
1576 <desc>
1577 Opens a hard disk from an existing location.
1578
1579 After the hard disk is successfully opened by this method, it gets
1580 remembered by (known to) this VirtualBox installation and will be
1581 accessible through <link to="#getHardDisk2()"/> and
1582 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1583 are also returned as part of the <link to="#hardDisks2"/> array and can
1584 be attached to virtual machines. See IHardDisk2 for more details.
1585
1586 If a differencing hard disk is to be opened by this method, the
1587 operation will succeed only if its parent hard disk and all ancestors,
1588 if any, are already known to this VirtualBox installation (for example,
1589 were opened by this method before).
1590
1591 This method tries to guess the storage format of the specified hard disk
1592 by reading hard disk data at the specified location.
1593
1594 Note that the format of the location string is storage format specific.
1595 See <link to="IMedium::location"/>, IHardDisk2 and
1596 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1597 </desc>
1598 <param name="location" type="wstring" dir="in">
1599 <desc>
1600 Location of the storage unit that contains hard disk data in one of
1601 the supported storage formats.
1602 </desc>
1603 </param>
1604 <param name="hardDisk" type="IHardDisk2" dir="return">
1605 <desc>Opened hard disk object.</desc>
1606 </param>
1607 </method>
1608
1609 <method name="getHardDisk2" const="yes">
1610 <desc>
1611 Returns a hard disk with the given UUID.
1612
1613 The hard disk with the given UUID must be known to this VirtualBox
1614 installation, i.e. it must be previously created by
1615 <link to="#createHardDisk2()"/> or opened by <link
1616 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1617 </desc>
1618 <param name="id" type="uuid" dir="in">
1619 <desc>UUID of the hard disk to look for.</desc>
1620 </param>
1621 <param name="hardDisk" type="IHardDisk2" dir="return">
1622 <desc>Found hard disk object.</desc>
1623 </param>
1624 </method>
1625
1626 <method name="findHardDisk2">
1627 <desc>
1628 Returns a hard disk that uses the given location to store hard
1629 disk data.
1630
1631 The given hard disk must be known to this VirtualBox installation, i.e.
1632 it must be previously created by
1633 <link to="#createHardDisk2()"/> or opened by <link
1634 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1635
1636 The search is done by comparing the value of the @a location argument to
1637 the <link to="IHardDisk2::location"/> attribute of each known hard
1638 disk.
1639
1640 For locations represented by file names in the host's file system, the
1641 requested location can be a path relative to the
1642 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1643 only a file name without any path is given, the
1644 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1645 folder</link> will be prepended to the file name before searching. Note
1646 that on case sensitive file systems, a case sensitive comparison is
1647 performed, otherwise the case of symbols in the file path is ignored.
1648 </desc>
1649 <param name="location" type="wstring" dir="in">
1650 <desc>Location string to search for.</desc>
1651 </param>
1652 <param name="hardDisk" type="IHardDisk2" dir="return">
1653 <desc>Found hard disk object.</desc>
1654 </param>
1655 </method>
1656
1657 <method name="openDVDImage">
1658 <desc>
1659 Opens a CD/DVD image contained in the specified file of the supported
1660 format and assigns it the given UUID.
1661
1662 After the image is successfully opened by this method, it gets
1663 remembered by (known to) this VirtualBox installation and will be
1664 accessible through <link to="#getDVDImage()"/> and
1665 <link to="#findDVDImage()"/> methods. Remembered images are also
1666 returned as part of the <link to="#DVDImages"/> array and can be mounted
1667 to virtual machines. See IMedium for more details.
1668
1669 See <link to="IMedium::location"/> to get more details about the format
1670 of the location string.
1671
1672 <note>
1673 Currently, only ISO CD/DVD images are supported by VirtualBox.
1674 </note>
1675 </desc>
1676 <param name="location" type="wstring" dir="in">
1677 <desc>
1678 Full path to the file that contains a valid CD/DVD image.
1679 </desc>
1680 </param>
1681 <param name="id" type="uuid" dir="in">
1682 <desc>
1683 UUID to assign to the given image within this VirtualBox installation.
1684 If an empty (null) UUID is specified, the system will randomly
1685 generate a new UUID.
1686 </desc>
1687 </param>
1688 <param name="image" type="IDVDImage2" dir="return">
1689 <desc>Opened CD/DVD image object.</desc>
1690 </param>
1691 </method>
1692
1693 <method name="getDVDImage">
1694 <desc>
1695 Returns a CD/DVD image with the given UUID.
1696
1697 The image with the given UUID must be known to this VirtualBox
1698 installation, i.e. it must be previously opened by <link
1699 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1700 </desc>
1701 <param name="id" type="uuid" dir="in">
1702 <desc>UUID of the image to look for.</desc>
1703 </param>
1704 <param name="image" type="IDVDImage2" dir="return">
1705 <desc>Found CD/DVD image object.</desc>
1706 </param>
1707 </method>
1708
1709 <method name="findDVDImage">
1710 <desc>
1711 Returns a CD/DVD image with the given image location.
1712
1713 The image with the given UUID must be known to this VirtualBox
1714 installation, i.e. it must be previously opened by <link
1715 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1716
1717 The search is done by comparing the value of the @a location argument to
1718 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1719
1720 The requested location can be a path relative to the
1721 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1722 only a file name without any path is given, the
1723 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1724 folder</link> will be prepended to the file name before searching. Note
1725 that on case sensitive file systems, a case sensitive comparison is
1726 performed, otherwise the case of symbols in the file path is ignored.
1727 </desc>
1728 <param name="location" type="wstring" dir="in">
1729 <desc>CD/DVD image file path to look for.</desc>
1730 </param>
1731 <param name="image" type="IDVDImage2" dir="return">
1732 <desc>Found CD/DVD image object.</desc>
1733 </param>
1734 </method>
1735
1736 <method name="openFloppyImage">
1737 <desc>
1738 Opens a floppy image contained in the specified file of the supported
1739 format and assigns it the given UUID.
1740
1741 After the image is successfully opened by this method, it gets
1742 remembered by (known to) this VirtualBox installation and will be
1743 accessible through <link to="#getFloppyImage()"/> and
1744 <link to="#findFloppyImage()"/> methods. Remembered images are also
1745 returned as part of the <link to="#floppyImages"/> array and can be
1746 mounted to virtual machines. See IMedium for more details.
1747
1748 See <link to="IMedium::location"/> to get more details about the format
1749 of the location string.
1750
1751 <note>
1752 Currently, only raw floppy images are supported by VirtualBox.
1753 </note>
1754 </desc>
1755 <param name="location" type="wstring" dir="in">
1756 <desc>
1757 Full path to the file that contains a valid floppy image.
1758 </desc>
1759 </param>
1760 <param name="id" type="uuid" dir="in">
1761 <desc>
1762 UUID to assign to the given image file within this VirtualBox
1763 installation. If an empty (null) UUID is specified, the system will
1764 randomly generate a new UUID.
1765 </desc>
1766 </param>
1767 <param name="image" type="IFloppyImage2" dir="return">
1768 <desc>Opened floppy image object.</desc>
1769 </param>
1770 </method>
1771
1772 <method name="getFloppyImage">
1773 <desc>
1774 Returns a floppy image with the given UUID.
1775
1776 The image with the given UUID must be known to this VirtualBox
1777 installation, i.e. it must be previously opened by <link
1778 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1779 </desc>
1780 <param name="id" type="uuid" dir="in">
1781 <desc>UUID of the image to look for.</desc>
1782 </param>
1783 <param name="image" type="IFloppyImage2" dir="return">
1784 <desc>Found floppy image object.</desc>
1785 </param>
1786 </method>
1787
1788 <method name="findFloppyImage">
1789 <desc>
1790 Returns a floppy image with the given image location.
1791
1792 The image with the given UUID must be known to this VirtualBox
1793 installation, i.e. it must be previously opened by <link
1794 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1795
1796 The search is done by comparing the value of the @a location argument to
1797 the <link to="IMedium::location"/> attribute of each known floppy image.
1798
1799 The requested location can be a path relative to the
1800 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1801 only a file name without any path is given, the
1802 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1803 folder</link> will be prepended to the file name before searching. Note
1804 that on case sensitive file systems, a case sensitive comparison is
1805 performed, otherwise the case of symbols in the file path is ignored.
1806 </desc>
1807 <param name="location" type="wstring" dir="in">
1808 <desc>Floppy image file path to look for.</desc>
1809 </param>
1810 <param name="image" type="IFloppyImage2" dir="return">
1811 <desc>Found floppy image object.</desc>
1812 </param>
1813 </method>
1814
1815 <method name="getGuestOSType">
1816 <desc>
1817 Returns an object describing the specified guest OS type.
1818
1819 The requested guest OS type is specified using a string which is a
1820 mnemonic identifier of the guest operating system, such as
1821 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1822 particular virtual machine can be read or set using the
1823 <link to="IMachine::OSTypeId"/> attribute.
1824
1825 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1826 available guest OS type objects. Each object has an
1827 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1828 the guest OS this object describes.
1829 </desc>
1830 <param name="id" type="wstring" dir="in">
1831 <desc>Guest OS type ID string.</desc>
1832 </param>
1833 <param name="type" type="IGuestOSType" dir="return">
1834 <desc>Guest OS type object.</desc>
1835 </param>
1836 </method>
1837
1838 <method name="createSharedFolder">
1839 <desc>
1840 Creates a new global shared folder by associating the given logical
1841 name with the given host path, adds it to the collection of shared
1842 folders and starts sharing it. Refer to the description of
1843 <link to="ISharedFolder"/> to read more about logical names.
1844 </desc>
1845 <param name="name" type="wstring" dir="in">
1846 <desc>Unique logical name of the shared folder.</desc>
1847 </param>
1848 <param name="hostPath" type="wstring" dir="in">
1849 <desc>Full path to the shared folder in the host file system.</desc>
1850 </param>
1851 <param name="writable" type="boolean" dir="in">
1852 <desc>Whether the share is writable or readonly</desc>
1853 </param>
1854 </method>
1855
1856 <method name="removeSharedFolder">
1857 <desc>
1858 Removes the global shared folder with the given name previously
1859 created by <link to="#createSharedFolder"/> from the collection of
1860 shared folders and stops sharing it.
1861 </desc>
1862 <param name="name" type="wstring" dir="in">
1863 <desc>Logical name of the shared folder to remove.</desc>
1864 </param>
1865 </method>
1866
1867 <method name="getNextExtraDataKey">
1868 <desc>
1869 Returns the global extra data key name following the supplied key.
1870
1871 An error is returned if the supplied @a key does not exist. @c NULL is
1872 returned in @a nextKey if the supplied key is the last key. When
1873 supplying @c NULL for the @a key, the first key item is returned in @a
1874 nextKey (if there is any). @a nextValue is an optional parameter and
1875 if supplied, the next key's value is returned in it.
1876 </desc>
1877 <param name="key" type="wstring" dir="in">
1878 <desc>Name of the data key to follow.</desc>
1879 </param>
1880 <param name="nextKey" type="wstring" dir="out">
1881 <desc>Name of the next data key.</desc>
1882 </param>
1883 <param name="nextValue" type="wstring" dir="out">
1884 <desc>Value of the next data key.</desc>
1885 </param>
1886 </method>
1887
1888 <method name="getExtraData">
1889 <desc>
1890 Returns associated global extra data.
1891
1892 If the requested data @a key does not exist, this function will
1893 succeed and return @c NULL in the @a value argument.
1894 </desc>
1895 <param name="key" type="wstring" dir="in">
1896 <desc>Name of the data key to get.</desc>
1897 </param>
1898 <param name="value" type="wstring" dir="return">
1899 <desc>Value of the requested data key.</desc>
1900 </param>
1901 </method>
1902
1903 <method name="setExtraData">
1904 <desc>
1905 Sets associated global extra data.
1906
1907 If you pass @c NULL as a key @a value, the given @a key will be
1908 deleted.
1909
1910 <note>
1911 Before performing the actual data change, this method will ask all
1912 registered callbacks using the
1913 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
1914 notification for a permission. If one of the callbacks refuses the
1915 new value, the change will not be performed.
1916 </note>
1917 <note>
1918 On success, the
1919 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
1920 is called to inform all registered callbacks about a successful data
1921 change.
1922 </note>
1923 </desc>
1924 <param name="key" type="wstring" dir="in">
1925 <desc>Name of the data key to set.</desc>
1926 </param>
1927 <param name="value" type="wstring" dir="in">
1928 <desc>Value to assign to the key.</desc>
1929 </param>
1930 </method>
1931
1932 <method name="openSession">
1933 <desc>
1934 Opens a new direct session with the given virtual machine.
1935
1936 A direct session acts as a local lock on the given VM.
1937 There can be only one direct session open at a time for every
1938 virtual machine, protecting the VM from being manipulated by
1939 conflicting actions from different processes. Only after a
1940 direct session has been opened, one can change all VM settings
1941 and execute the VM in the process space of the session object.
1942
1943 Sessions therefore can be compared to mutex semaphores that
1944 lock a given VM for modification and execution.
1945 See <link to="ISession">ISession</link> for details.
1946
1947 <note>Unless you are writing a new VM frontend, you will not
1948 want to execute a VM in the current process. To spawn a new
1949 process that executes a VM, use
1950 <link to="IVirtualBox::openRemoteSession" />
1951 instead.</note>
1952
1953 Upon successful return, the session object can be used to
1954 get access to the machine and to the VM console.
1955
1956 In VirtualBox terminology, the machine becomes "mutable" after
1957 a session has been opened. Note that the "mutable" machine
1958 object, on which you may invoke IMachine methods to change its
1959 settings, will be a different object from the immutable IMachine
1960 objects returned by various IVirtualBox methods. To obtain a
1961 mutable IMachine object (upon which you can invoke settings methods),
1962 use the <link to="ISession::machine" /> attribute.
1963
1964 One must always call <link to="ISession::close" /> to release the
1965 lock on the machine, or the machine's state will eventually be
1966 set to "Aborted".
1967
1968 In other words, to change settings on a machine, the following
1969 sequence is typically performed:
1970
1971 <ol>
1972 <li>Call this method (openSession) to have a machine locked for
1973 the current session.</li>
1974
1975 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
1976
1977 <li>Change the settings of the machine.</li>
1978
1979 <li>Call <link to="IMachine::saveSettings" />.</li>
1980
1981 <li>Close the session by calling <link to="ISession::close()"/>.</li>
1982 </ol>
1983 </desc>
1984 <param name="session" type="ISession" dir="in">
1985 <desc>
1986 Session object that will represent the opened session after
1987 successful method invocation. This object must not represent
1988 the already open session.
1989 <note>
1990 This session will be automatically closed if the
1991 VirtualBox server is terminated for some reason.
1992 </note>
1993 </desc>
1994 </param>
1995 <param name="machineId" type="uuid" dir="in">
1996 <desc>ID of the virtual machine to open a session with.</desc>
1997 </param>
1998 </method>
1999
2000 <method name="openRemoteSession">
2001 <desc>
2002 Spawns a new process that executes a virtual machine (called a
2003 "remote session").
2004
2005 Opening a remote session causes the VirtualBox server to start a new
2006 process that opens a direct session with the given VM. As a result, the
2007 VM is locked by that direct session in the new process, preventing
2008 conflicting changes from other processes. Since sessions act as locks
2009 that such prevent conflicting changes, one cannot open a remote session
2010 for a VM that already has another open session (direct or remote), or
2011 is currently in the process of opening one (see <link to="IMachine::sessionState"/>).
2012
2013 While the remote session still provides some level of control over the
2014 VM execution to the caller (using the <link to="IConsole" /> interface),
2015 not all VM settings are available for modification within the remote
2016 session context.
2017
2018 This operation can take some time (a new VM is started in a new process,
2019 for which memory and other resources need to be set up). Because of this,
2020 an <link to="IProgress" /> is returned to allow the caller to wait for this
2021 asynchronous operation to be completed. Until then, the remote session
2022 object remains in the closed state, and accessing the machine or its
2023 console through it is invalid. It is recommended to use
2024 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2025 completion.
2026
2027 As with all <link to="ISession" /> objects, it is recommended to call
2028 <link to="ISession::close" /> on the local session object once openRemoteSession()
2029 has been called. However, the session's state (see <link to="ISession::state" />)
2030 will not return to "Closed" until the remote session has also closed (i.e.
2031 until the VM is no longer running). In that case, however, the state of
2032 the session will automatically change back to "Closed".
2033
2034 Currently supported session types (values of the @a type
2035 argument) are:
2036 <ul>
2037 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2038 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2039 </ul>
2040
2041 The @a environment argument is a string containing definitions of
2042 environment variables in the following format:
2043 @code
2044 NAME[=VALUE]\n
2045 NAME[=VALUE]\n
2046 ...
2047 @endcode
2048 where <tt>\\n</tt> is the new line character. These environment
2049 variables will be appended to the environment of the VirtualBox server
2050 process. If an environment variable exists both in the server process
2051 and in this list, the value from this list takes precedence over the
2052 server's variable. If the value of the environment variable is
2053 omitted, this variable will be removed from the resulting environment.
2054 If the environment string is @c null, the server environment is
2055 inherited by the started process as is.
2056
2057 <see>openExistingSession</see>
2058 </desc>
2059 <param name="session" type="ISession" dir="in">
2060 <desc>
2061 Session object that will represent the opened remote session
2062 after successful method invocation (this object must not
2063 represent an already open session).
2064 </desc>
2065 </param>
2066 <param name="machineId" type="uuid" dir="in">
2067 <desc>ID of the virtual machine to open a session with.</desc>
2068 </param>
2069 <param name="type" type="wstring" dir="in">
2070 <desc>
2071 Type of the remote session (case sensitive).
2072 </desc>
2073 </param>
2074 <param name="environment" type="wstring" dir="in">
2075 <desc>
2076 Environment to pass to the opened session (may be @c null).
2077 </desc>
2078 </param>
2079 <param name="progress" type="IProgress" dir="return">
2080 <desc>Progress object to track the operation completion.</desc>
2081 </param>
2082 </method>
2083
2084 <method name="openExistingSession">
2085 <desc>
2086 Opens a new remote session with the virtual machine for
2087 which a direct session is already open.
2088
2089 The remote session provides some level of control over the VM
2090 execution (using the IConsole interface) to the caller; however,
2091 within the remote session context, not all VM settings are available
2092 for modification.
2093
2094 As opposed to <link to="#openRemoteSession()"/>, the number of
2095 remote sessions opened this way is not limited by the API
2096
2097 <note>
2098 It is an error to open a remote session with the machine that
2099 doesn't have an open direct session.
2100 </note>
2101
2102 <see>openRemoteSession</see>
2103 </desc>
2104 <param name="session" type="ISession" dir="in">
2105 <desc>
2106 Session object that will represent the open remote session
2107 after successful method invocation. This object must not
2108 represent an already open session.
2109 <note>
2110 This session will be automatically closed when the peer
2111 (direct) session dies or gets closed.
2112 </note>
2113 </desc>
2114 </param>
2115 <param name="machineId" type="uuid" dir="in">
2116 <desc>ID of the virtual machine to open a session with.</desc>
2117 </param>
2118 </method>
2119
2120 <method name="registerCallback">
2121 <desc>
2122 Registers a new global VirtualBox callback. The methods of the given
2123 callback object will be called by VirtualBox when an appropriate
2124 event occurs.
2125 </desc>
2126 <param name="callback" type="IVirtualBoxCallback" dir="in">
2127 <desc>Callback object to register.</desc>
2128 </param>
2129 </method>
2130
2131 <method name="unregisterCallback">
2132 <desc>
2133 Unregisters the previously registered global VirtualBox callback.
2134 </desc>
2135 <param name="callback" type="IVirtualBoxCallback" dir="in">
2136 <desc>Callback object to unregister.</desc>
2137 </param>
2138 </method>
2139
2140 <method name="waitForPropertyChange">
2141 <desc>
2142 Blocks the caller until any of the properties represented by the @a
2143 what argument changes the value or until the given timeout interval
2144 expires.
2145
2146 The @a what argument is a comma separated list of property masks that
2147 describe properties the caller is interested in. The property mask is
2148 a string in the following format:
2149
2150 <pre>
2151 [[group.]subgroup.]name
2152 </pre>
2153
2154 where @c name is the property name and @c group, @c subgroup are zero
2155 or or more property group specifiers. Each element (group or name) in
2156 the property mask may be either a Latin string or an asterisk symbol
2157 (@c "*") which is used to match any string for the given element. A
2158 property mask that doesn't contain asterisk symbols represents a
2159 single fully qualified property name.
2160
2161 Groups in the fully qualified property name go from more generic (the
2162 left-most part) to more specific (the right-most part). The first
2163 element is usually a name of the object the property belongs to. The
2164 second element may be either a property name, or a child object name,
2165 or an index if the preceding element names an object which is one of
2166 many objects of the same type. This way, property names form a
2167 hierarchy of properties. Here are some examples of property names:
2168
2169 <table>
2170 <tr>
2171 <td><tt>VirtualBox.version</tt></td>
2172 <td><link to="IVirtualBox::version"/> property</td>
2173 </tr>
2174 <tr>
2175 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2176 <td><link to="IMachine::name"/> property of the machine with the
2177 given UUID</td>
2178 </tr>
2179 </table>
2180
2181 Most property names directly correspond to the properties of objects
2182 (components) provided by the VirtualBox library and may be used to
2183 track changes to these properties. However, there may be
2184 pseudo-property names that don't correspond to any existing object's
2185 property directly, as well as there may be object properties that
2186 don't have a corresponding property name that is understood by this
2187 method, and therefore changes to such properties cannot be
2188 tracked. See individual object's property descriptions to get a
2189 fully qualified property name that can be used with this method (if
2190 any).
2191
2192 There is a special property mask @c "*" (i.e. a string consisting of a
2193 single asterisk symbol) that can be used to match all properties.
2194 Below are more examples of property masks:
2195
2196 <table>
2197 <tr>
2198 <td><tt>VirtualBox.*</tt></td>
2199 <td>Track all properties of the VirtualBox object</td>
2200 </tr>
2201 <tr>
2202 <td><tt>Machine.*.name</tt></td>
2203 <td>Track changes to the <link to="IMachine::name"/> property of
2204 all registered virtual machines</td>
2205 </tr>
2206 </table>
2207
2208 </desc>
2209 <param name="what" type="wstring" dir="in">
2210 <desc>Comma separated list of property masks.</desc>
2211 </param>
2212 <param name="timeout" type="unsigned long" dir="in">
2213 <desc>
2214 Wait timeout in milliseconds.
2215 Specify -1 for an indefinite wait.
2216 </desc>
2217 </param>
2218 <param name="changed" type="wstring" dir="out">
2219 <desc>
2220 Comma separated list of properties that have been changed and caused
2221 this method to return to the caller.
2222 </desc>
2223 </param>
2224 <param name="values" type="wstring" dir="out">
2225 <desc>Reserved, not currently used.</desc>
2226 </param>
2227 </method>
2228
2229 <method name="saveSettings">
2230 <desc>
2231 Saves the global settings to the global settings file
2232 (<link to="#settingsFilePath"/>).
2233
2234 This method is only useful for explicitly saving the global settings
2235 file after it has been auto-converted from the old format to the most
2236 recent format (see <link to="#settingsFileVersion"/> for details).
2237 Normally, the global settings file is implicitly saved when a global
2238 setting is changed.
2239 </desc>
2240 </method>
2241
2242 <method name="saveSettingsWithBackup">
2243 <desc>
2244 Creates a backup copy of the global settings file
2245 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2246 calls <link to="#saveSettings()"/>.
2247
2248 Note that the backup copy is created <b>only</b> if the settings file
2249 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2250 details). Otherwise, this call is fully equivalent to
2251 <link to="#saveSettings()"/> and no backup copying is done.
2252
2253 The backup copy is created in the same directory where the original
2254 settings file is located. It is given the following file name:
2255 <pre>
2256 original.xml.x.y-platform.bak
2257 </pre>
2258 where <tt>original.xml</tt> is the original settings file name
2259 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2260 format of the settings file (before auto-conversion).
2261
2262 If the given backup file already exists, this method will try to add the
2263 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2264 0 to 9) and copy it again until it succeeds. If all suffixes are
2265 occupied, or if any other copy error occurs, this method will return a
2266 failure.
2267
2268 If the copy operation succeeds, the @a bakFileName return argument will
2269 receive a full path to the created backup file (for informational
2270 purposes). Note that this will happen even if the subsequent
2271 <link to="#saveSettings()"/> call performed by this method after the
2272 copy operation, fails.
2273
2274 <note>
2275 The VirtualBox API never calls this method. It is intended purely for
2276 the purposes of creating backup copies of the settings files by
2277 front-ends before saving the results of the automatically performed
2278 settings conversion to disk.
2279 </note>
2280
2281 <see>settingsFileVersion</see>
2282 </desc>
2283 <param name="bakFileName" type="wstring" dir="return">
2284 <desc>Full path to the created backup copy.</desc>
2285 </param>
2286 </method>
2287
2288 </interface>
2289
2290 <!--
2291 // IMachine
2292 /////////////////////////////////////////////////////////////////////////
2293 -->
2294
2295 <enumerator
2296 name="IMachineEnumerator" type="IMachine"
2297 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
2298 />
2299
2300 <collection
2301 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
2302 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
2303 readonly="yes"
2304 />
2305
2306 <interface
2307 name="IInternalMachineControl" extends="$unknown"
2308 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
2309 internal="yes"
2310 wsmap="suppress"
2311 >
2312 <method name="updateState">
2313 <desc>
2314 Updates the VM state.
2315 <note>
2316 This operation will also update the settings file with
2317 the correct information about the saved state file
2318 and delete this file from disk when appropriate.
2319 </note>
2320 </desc>
2321 <param name="state" type="MachineState" dir="in"/>
2322 </method>
2323
2324 <method name="getIPCId">
2325 <param name="id" type="wstring" dir="return"/>
2326 </method>
2327
2328 <method name="runUSBDeviceFilters">
2329 <desc>
2330 Asks the server to run USB devices filters of the associated
2331 machine against the given USB device and tell if there is
2332 a match.
2333 <note>
2334 Intended to be used only for remote USB devices. Local
2335 ones don't require to call this method (this is done
2336 implicitly by the Host and USBProxyService).
2337 </note>
2338 </desc>
2339 <param name="device" type="IUSBDevice" dir="in"/>
2340 <param name="matched" type="boolean" dir="out"/>
2341 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2342 </method>
2343
2344 <method name="captureUSBDevice">
2345 <desc>
2346 Requests a capture of the given host USB device.
2347 When the request is completed, the VM process will
2348 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2349 notification.
2350 </desc>
2351 <param name="id" type="uuid" dir="in"/>
2352 </method>
2353
2354 <method name="detachUSBDevice">
2355 <desc>
2356 Notification that a VM is going to detach (done = false) or has
2357 already detached (done = true) the given USB device.
2358 When the done = true request is completed, the VM process will
2359 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2360 notification.
2361 <note>
2362 In the done = true case, the server must run its own filters
2363 and filters of all VMs but this one on the detached device
2364 as if it were just attached to the host computer.
2365 </note>
2366 </desc>
2367 <param name="id" type="uuid" dir="in"/>
2368 <param name="done" type="boolean" dir="in"/>
2369 </method>
2370
2371 <method name="autoCaptureUSBDevices">
2372 <desc>
2373 Requests a capture all matching USB devices attached to the host.
2374 When the request is completed, the VM process will
2375 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2376 notification per every captured device.
2377 </desc>
2378 </method>
2379
2380 <method name="detachAllUSBDevices">
2381 <desc>
2382 Notification that a VM that is being powered down. The done
2383 parameter indicates whether which stage of the power down
2384 we're at. When done = false the VM is announcing its
2385 intentions, while when done = true the VM is reporting
2386 what it has done.
2387 <note>
2388 In the done = true case, the server must run its own filters
2389 and filters of all VMs but this one on all detach devices as
2390 if they were just attached to the host computer.
2391 </note>
2392 </desc>
2393 <param name="done" type="boolean" dir="in"/>
2394 </method>
2395
2396 <method name="onSessionEnd">
2397 <desc>
2398 Triggered by the given session object when the session is about
2399 to close normally.
2400 </desc>
2401 <param name="session" type="ISession" dir="in">
2402 <desc>Session that is being closed</desc>
2403 </param>
2404 <param name="progress" type="IProgress" dir="return">
2405 <desc>
2406 Used to wait until the corresponding machine is actually
2407 dissociated from the given session on the server.
2408 Returned only when this session is a direct one.
2409 </desc>
2410 </param>
2411 </method>
2412
2413 <method name="beginSavingState">
2414 <desc>
2415 Called by the VM process to inform the server it wants to
2416 save the current state and stop the VM execution.
2417 </desc>
2418 <param name="progress" type="IProgress" dir="in">
2419 <desc>
2420 Progress object created by the VM process to wait until
2421 the state is saved.
2422 </desc>
2423 </param>
2424 <param name="stateFilePath" type="wstring" dir="out">
2425 <desc>
2426 File path the VM process must save the execution state to.
2427 </desc>
2428 </param>
2429 </method>
2430
2431 <method name="endSavingState">
2432 <desc>
2433 Called by the VM process to inform the server that saving
2434 the state previously requested by #beginSavingState is either
2435 successfully finished or there was a failure.
2436 </desc>
2437
2438 <param name="success" type="boolean" dir="in">
2439 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2440 </param>
2441 </method>
2442
2443 <method name="adoptSavedState">
2444 <desc>
2445 Gets called by IConsole::adoptSavedState.
2446 </desc>
2447 <param name="savedStateFile" type="wstring" dir="in">
2448 <desc>Path to the saved state file to adopt.</desc>
2449 </param>
2450 </method>
2451
2452 <method name="beginTakingSnapshot">
2453 <desc>
2454 Called by the VM process to inform the server it wants to
2455 take a snapshot.
2456 </desc>
2457 <param name="initiator" type="IConsole" dir="in">
2458 <desc>The console object that initiated this call.</desc>
2459 </param>
2460 <param name="name" type="wstring" dir="in">
2461 <desc>Snapshot name</desc>
2462 </param>
2463 <param name="description" type="wstring" dir="in">
2464 <desc>Snapshot description</desc>
2465 </param>
2466 <param name="progress" type="IProgress" dir="in">
2467 <desc>
2468 Progress object created by the VM process to wait until
2469 the state is saved (only for online snapshots).
2470 </desc>
2471 </param>
2472 <param name="stateFilePath" type="wstring" dir="out">
2473 <desc>
2474 File path the VM process must save the execution state to.
2475 </desc>
2476 </param>
2477 <param name="serverProgress" type="IProgress" dir="out">
2478 <desc>
2479 Progress object created by the server process to wait until
2480 the snapshot is taken (VDI diff creation, etc.).
2481 </desc>
2482 </param>
2483 </method>
2484
2485 <method name="endTakingSnapshot">
2486 <desc>
2487 Called by the VM process to inform the server that the snapshot
2488 previously requested by #beginTakingSnapshot is either
2489 successfully taken or there was a failure.
2490 </desc>
2491
2492 <param name="success" type="boolean" dir="in">
2493 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2494 </param>
2495 </method>
2496
2497 <method name="discardSnapshot">
2498 <desc>
2499 Gets called by IConsole::discardSnapshot.
2500 </desc>
2501 <param name="initiator" type="IConsole" dir="in">
2502 <desc>The console object that initiated this call.</desc>
2503 </param>
2504 <param name="id" type="uuid" dir="in">
2505 <desc>UUID of the snapshot to discard.</desc>
2506 </param>
2507 <param name="machineState" type="MachineState" dir="out">
2508 <desc>New machine state after this operation is started.</desc>
2509 </param>
2510 <param name="progress" type="IProgress" dir="return">
2511 <desc>Progress object to track the operation completion.</desc>
2512 </param>
2513 </method>
2514
2515 <method name="discardCurrentState">
2516 <desc>
2517 Gets called by IConsole::discardCurrentState.
2518 </desc>
2519 <param name="initiator" type="IConsole" dir="in">
2520 <desc>The console object that initiated this call.</desc>
2521 </param>
2522 <param name="machineState" type="MachineState" dir="out">
2523 <desc>New machine state after this operation is started.</desc>
2524 </param>
2525 <param name="progress" type="IProgress" dir="return">
2526 <desc>Progress object to track the operation completion.</desc>
2527 </param>
2528 </method>
2529
2530 <method name="discardCurrentSnapshotAndState">
2531 <desc>
2532 Gets called by IConsole::discardCurrentSnapshotAndState.
2533 </desc>
2534 <param name="initiator" type="IConsole" dir="in">
2535 <desc>The console object that initiated this call.</desc>
2536 </param>
2537 <param name="machineState" type="MachineState" dir="out">
2538 <desc>New machine state after this operation is started.</desc>
2539 </param>
2540 <param name="progress" type="IProgress" dir="return">
2541 <desc>Progress object to track the operation completion.</desc>
2542 </param>
2543 </method>
2544
2545 <method name="pullGuestProperties">
2546 <desc>
2547 Get the list of the guest properties matching a set of patterns along
2548 with their values, time stamps and flags and give responsibility for
2549 managing properties to the console.
2550 </desc>
2551 <param name="name" type="wstring" dir="out" safearray="yes">
2552 <desc>
2553 The names of the properties returned.
2554 </desc>
2555 </param>
2556 <param name="value" type="wstring" dir="out" safearray="yes">
2557 <desc>
2558 The values of the properties returned. The array entries match the
2559 corresponding entries in the @a name array.
2560 </desc>
2561 </param>
2562 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
2563 <desc>
2564 The time stamps of the properties returned. The array entries match
2565 the corresponding entries in the @a name array.
2566 </desc>
2567 </param>
2568 <param name="flags" type="wstring" dir="out" safearray="yes">
2569 <desc>
2570 The flags of the properties returned. The array entries match the
2571 corresponding entries in the @a name array.
2572 </desc>
2573 </param>
2574 </method>
2575
2576 <method name="pushGuestProperties">
2577 <desc>
2578 Set the list of the guest properties matching a set of patterns along
2579 with their values, time stamps and flags and return responsibility for
2580 managing properties to IMachine.
2581 </desc>
2582 <param name="name" type="wstring" dir="in" safearray="yes">
2583 <desc>
2584 The names of the properties.
2585 </desc>
2586 </param>
2587 <param name="value" type="wstring" dir="in" safearray="yes">
2588 <desc>
2589 The values of the properties. The array entries match the
2590 corresponding entries in the @a name array.
2591 </desc>
2592 </param>
2593 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
2594 <desc>
2595 The time stamps of the properties. The array entries match
2596 the corresponding entries in the @a name array.
2597 </desc>
2598 </param>
2599 <param name="flags" type="wstring" dir="in" safearray="yes">
2600 <desc>
2601 The flags of the properties. The array entries match the
2602 corresponding entries in the @a name array.
2603 </desc>
2604 </param>
2605 </method>
2606 <method name="pushGuestProperty">
2607 <desc>
2608 Update a single guest property in IMachine.
2609 </desc>
2610 <param name="name" type="wstring" dir="in">
2611 <desc>
2612 The name of the property to be updated.
2613 </desc>
2614 </param>
2615 <param name="value" type="wstring" dir="in">
2616 <desc>
2617 The value of the property.
2618 </desc>
2619 </param>
2620 <param name="timestamp" type="unsigned long long" dir="in">
2621 <desc>
2622 The timestamp of the property.
2623 </desc>
2624 </param>
2625 <param name="flags" type="wstring" dir="in">
2626 <desc>
2627 The flags of the property.
2628 </desc>
2629 </param>
2630 </method>
2631 </interface>
2632
2633 <interface
2634 name="IBIOSSettings" extends="$unknown"
2635 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
2636 wsmap="managed"
2637 >
2638 <desc>
2639 The IBIOSSettings interface represents BIOS settings of the virtual
2640 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
2641 </desc>
2642 <attribute name="logoFadeIn" type="boolean">
2643 <desc>Fade in flag for BIOS logo animation.</desc>
2644 </attribute>
2645
2646 <attribute name="logoFadeOut" type="boolean">
2647 <desc>Fade out flag for BIOS logo animation.</desc>
2648 </attribute>
2649
2650 <attribute name="logoDisplayTime" type="unsigned long">
2651 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
2652 </attribute>
2653
2654 <attribute name="logoImagePath" type="wstring">
2655 <desc>Local file system path for external BIOS image.</desc>
2656 </attribute>
2657
2658 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
2659 <desc>Mode of the BIOS boot device menu.</desc>
2660 </attribute>
2661
2662 <attribute name="ACPIEnabled" type="boolean">
2663 <desc>ACPI support flag.</desc>
2664 </attribute>
2665
2666 <attribute name="IOAPICEnabled" type="boolean">
2667 <desc>
2668 IO APIC support flag. If set, VirtualBox will provide an IO APIC
2669 and support IRQs above 15.
2670 </desc>
2671 </attribute>
2672
2673 <attribute name="timeOffset" type="long long">
2674 <desc>
2675 Offset in milliseconds from the host system time. This allows for
2676 guests running with a different system date/time than the host.
2677 It is equivalent to setting the system date/time in the BIOS other
2678 than it's not an absolute value but a relative one. Guest Additions
2679 time synchronization also honors this offset.
2680 </desc>
2681 </attribute>
2682
2683 <attribute name="PXEDebugEnabled" type="boolean">
2684 <desc>
2685 PXE debug logging flag. If set, VirtualBox will write extensive
2686 PXE trace information to the release log.
2687 </desc>
2688 </attribute>
2689
2690 <attribute name="IDEControllerType" type="IDEControllerType">
2691 <desc>
2692 Type of the virtual IDE controller. Depending on this value,
2693 VirtualBox will provide different virtual IDE hardware
2694 devices to the guest.
2695 </desc>
2696 </attribute>
2697
2698 </interface>
2699
2700 <interface
2701 name="IMachine" extends="$unknown"
2702 uuid="a744b229-3457-422f-8550-649c40346c55"
2703 wsmap="managed"
2704 >
2705 <desc>
2706 The IMachine interface represents a virtual machine, or guest, created
2707 in VirtualBox.
2708
2709 This interface is used in two contexts. First of all, a collection of
2710 objects implementing this interface is stored in the
2711 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
2712 machines that are currently registered with this VirtualBox
2713 installation. Also, once a session has been opened for the given virtual
2714 machine (e.g. the virtual machine is running), the machine object
2715 associated with the open session can be queried from the session object;
2716 see <link to="ISession"/> for details.
2717
2718 The main role of this interface is to expose the settings of the virtual
2719 machine and provide methods to change various aspects of the virtual
2720 machine's configuration. For machine objects stored in the
2721 <link to="IVirtualBox::machines2"/> collection, all attributes are
2722 read-only unless explicitly stated otherwise in individual attribute
2723 and method descriptions. In order to change a machine setting, a session
2724 for this machine must be opened using one of
2725 <link to="IVirtualBox::openSession"/>,
2726 <link to="IVirtualBox::openRemoteSession"/> or
2727 <link to="IVirtualBox::openExistingSession"/> methods. After the
2728 session has been successfully opened, a mutable machine object needs to
2729 be queried from the session object and then the desired settings changes
2730 can be applied to the returned object using IMachine attributes and
2731 methods. See the ISession interface description for more information
2732 about sessions.
2733
2734 Note that the IMachine interface does not provide methods to control
2735 virtual machine execution (such as start the machine, or power it
2736 down) -- these methods are grouped in a separate IConsole
2737 interface. Refer to the IConsole interface description to get more
2738 information about this topic.
2739
2740 <see>ISession, IConsole</see>
2741 </desc>
2742
2743 <attribute name="parent" type="IVirtualBox" readonly="yes">
2744 <desc>Associated parent object.</desc>
2745 </attribute>
2746
2747 <attribute name="accessible" type="boolean" readonly="yes">
2748 <desc>
2749 Whether this virtual machine is currently accessible or not.
2750
2751 The machine is considered to be inaccessible when:
2752 <ul>
2753 <li>It is a registered virtual machine, and
2754 </li>
2755 <li>Its settings file is inaccessible (for example, it is
2756 located on a network share that is not accessible during
2757 VirtualBox startup, or becomes inaccessible later, or if
2758 the settings file can be read but is invalid).
2759 </li>
2760 </ul>
2761
2762 Otherwise, the value of this property is always <tt>true</tt>.
2763
2764 Every time this property is read, the accessibility state of
2765 this machine is re-evaluated. If the returned value is |false|,
2766 the <link to="#accessError"/> property may be used to get the
2767 detailed error information describing the reason of
2768 inaccessibility.
2769
2770 When the machine is inaccessible, only the following properties
2771 can be used on it:
2772 <ul>
2773 <li><link to="#parent"/></li>
2774 <li><link to="#id"/></li>
2775 <li><link to="#settingsFilePath"/></li>
2776 <li><link to="#accessible"/></li>
2777 <li><link to="#accessError"/></li>
2778 </ul>
2779
2780 An attempt to access any other property or method will return
2781 an error.
2782
2783 The only possible action you can perform on an inaccessible
2784 machine is to unregister it using the
2785 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
2786 for the accessibility state once more by querying this
2787 property).
2788
2789 <note>
2790 In the current implementation, once this property returns
2791 <tt>true</tt>, the machine will never become inaccessible
2792 later, even if its settings file cannot be successfully
2793 read/written any more (at least, until the VirtualBox
2794 server is restarted). This limitation may be removed in
2795 future releases.
2796 </note>
2797 </desc>
2798 </attribute>
2799
2800 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
2801 <desc>
2802 Error information describing the reason of machine
2803 inaccessibility.
2804
2805 Reading this property is only valid after the last call to
2806 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
2807 machine is currently unaccessible). Otherwise, a null
2808 IVirtualBoxErrorInfo object will be returned.
2809 </desc>
2810 </attribute>
2811
2812 <attribute name="name" type="wstring">
2813 <desc>
2814 Name of the virtual machine.
2815
2816 Besides being used for human-readable identification purposes
2817 everywhere in VirtualBox, the virtual machine name is also used
2818 as a name of the machine's settings file and as a name of the
2819 subdirectory this settings file resides in. Thus, every time you
2820 change the value of this property, the settings file will be
2821 renamed once you call <link to="#saveSettings()"/> to confirm the
2822 change. The containing subdirectory will be also renamed, but
2823 only if it has exactly the same name as the settings file
2824 itself prior to changing this property (for backward compatibility
2825 with previous API releases). The above implies the following
2826 limitations:
2827 <ul>
2828 <li>The machine name cannot be empty.</li>
2829 <li>The machine name can contain only characters that are valid
2830 file name characters according to the rules of the file
2831 system used to store VirtualBox configuration.</li>
2832 <li>You cannot have two or more machines with the same name
2833 if they use the same subdirectory for storing the machine
2834 settings files.</li>
2835 <li>You cannot change the name of the machine if it is running,
2836 or if any file in the directory containing the settings file
2837 is being used by another running machine or by any other
2838 process in the host operating system at a time when
2839 <link to="#saveSettings()"/> is called.
2840 </li>
2841 </ul>
2842 If any of the above limitations are hit, <link to="#saveSettings()"/>
2843 will return an appropriate error message explaining the exact
2844 reason and the changes you made to this machine will not be
2845 saved.
2846 <note>
2847 For "legacy" machines created using the
2848 <link to="IVirtualBox::createLegacyMachine()"/> call,
2849 the above naming limitations do not apply because the
2850 machine name does not affect the settings file name.
2851 The settings file name remains the same as it was specified
2852 during machine creation and never changes.
2853 </note>
2854 </desc>
2855 </attribute>
2856
2857 <attribute name="description" type="wstring">
2858 <desc>
2859 Description of the virtual machine.
2860
2861 The description attribute can contain any text and is
2862 typically used to describe the hardware and software
2863 configuration of the virtual machine in detail (i.e. network
2864 settings, versions of the installed software and so on).
2865 </desc>
2866 </attribute>
2867
2868 <attribute name="id" type="uuid" readonly="yes">
2869 <desc>UUID of the virtual machine.</desc>
2870 </attribute>
2871
2872 <attribute name="OSTypeId" type="wstring">
2873 <desc>
2874 User-defined identifier of the Guest OS type.
2875 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
2876 an IGuestOSType object representing details about the given
2877 Guest OS type.
2878 <note>
2879 This value may differ from the value returned by
2880 <link to="IGuest::OSTypeId"/> if Guest Additions are
2881 installed to the guest OS.
2882 </note>
2883 </desc>
2884 </attribute>
2885
2886 <attribute name="CPUCount" type="unsigned long">
2887 <desc>Number of virtual CPUs in the VM.</desc>
2888 </attribute>
2889
2890 <attribute name="memorySize" type="unsigned long">
2891 <desc>System memory size in megabytes.</desc>
2892 </attribute>
2893
2894 <attribute name="memoryBalloonSize" type="unsigned long">
2895 <desc>Initial memory balloon size in megabytes.</desc>
2896 </attribute>
2897
2898 <attribute name="statisticsUpdateInterval" type="unsigned long">
2899 <desc>Initial interval to update guest statistics in seconds.</desc>
2900 </attribute>
2901
2902 <attribute name="VRAMSize" type="unsigned long">
2903 <desc>Video memory size in megabytes.</desc>
2904 </attribute>
2905
2906 <attribute name="accelerate3DEnabled" type="boolean" default="false">
2907 <desc>
2908 This setting determines whether VirtualBox allows guests to make use
2909 of the 3D graphics support available on the host. Currently limited
2910 to OpenGL only. </desc>
2911 </attribute>
2912
2913 <attribute name="monitorCount" type="unsigned long">
2914 <desc>
2915 Number of virtual monitors.
2916 <note>
2917 Only effective on Windows XP and later guests with
2918 Guest Additions installed.
2919 </note>
2920 </desc>
2921 </attribute>
2922
2923 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
2924 <desc>Object containing all BIOS settings.</desc>
2925 </attribute>
2926
2927 <attribute name="HWVirtExEnabled" type="TSBool">
2928 <desc>
2929 This setting determines whether VirtualBox will try to make use of
2930 the host CPU's hardware virtualization extensions such as Intel VT-x
2931 and AMD-V. Note that in case such extensions are not available,
2932 they will not be used.
2933 </desc>
2934 </attribute>
2935
2936 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
2937 <desc>
2938 This setting determines whether VirtualBox will try to make use of
2939 the nested paging extension of Intel VT-x and AMD-V. Note that in case
2940 such extensions are not available, they will not be used.
2941 </desc>
2942 </attribute>
2943
2944 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
2945 <desc>
2946 This setting determines whether VirtualBox will try to make use of
2947 the VPID extension of Intel VT-x. Note that in case such extensions are
2948 not available, they will not be used.
2949 </desc>
2950 </attribute>
2951
2952 <attribute name="PAEEnabled" type="boolean" default="false">
2953 <desc>
2954 This setting determines whether VirtualBox will expose the Physical Address
2955 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
2956 is not available, it will not be reported.
2957 </desc>
2958 </attribute>
2959
2960 <attribute name="snapshotFolder" type="wstring">
2961 <desc>
2962 Full path to the directory used to store snapshot data
2963 (differencing hard disks and saved state files) of this machine.
2964
2965 The initial value of this property is
2966 <tt>&lt;</tt><link to="#settingsFilePath">
2967 path_to_settings_file</link><tt>&gt;/&lt;</tt>
2968 <link to="#id">machine_uuid</link>
2969 <tt>&gt;</tt>.
2970
2971 Currently, it is an error to try to change this property on
2972 a machine that has snapshots (because this would require to
2973 move possibly large files to a different location).
2974 A separate method will be available for this purpose later.
2975
2976 <note>
2977 Setting this property to <tt>null</tt> will restore the
2978 initial value.
2979 </note>
2980 <note>
2981 When setting this property, the specified path can be
2982 absolute (full path) or relative to the directory where the
2983 <link to="#settingsFilePath">machine settings file</link>
2984 is located. When reading this property, a full path is
2985 always returned.
2986 </note>
2987 <note>
2988 The specified path may not exist, it will be created
2989 when necessary.
2990 </note>
2991 </desc>
2992 </attribute>
2993
2994 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
2995 <desc>VRDP server object.</desc>
2996 </attribute>
2997
2998 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
2999 <desc>Array of hard disks attached to this machine.</desc>
3000 </attribute>
3001
3002 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3003 <desc>Associated DVD drive object.</desc>
3004 </attribute>
3005
3006 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3007 <desc>Associated floppy drive object.</desc>
3008 </attribute>
3009
3010 <attribute name="USBController" type="IUSBController" readonly="yes">
3011 <desc>
3012 Associated USB controller object.
3013
3014 <note>
3015 This method may set a @ref com_warnings "warning result code".
3016 </note>
3017 <note>
3018 If USB functionality is not available in the given edition of
3019 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3020 </note>
3021 </desc>
3022 </attribute>
3023
3024 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3025 <desc>Associated audio adapter, always present.</desc>
3026 </attribute>
3027
3028 <attribute name="SATAController" type="ISATAController" readonly="yes">
3029 <desc>
3030 Associated SATA controller object.
3031 </desc>
3032 </attribute>
3033
3034 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3035 <desc>
3036 Full name of the file containing machine settings data.
3037 </desc>
3038 </attribute>
3039
3040 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3041 <desc>
3042 Current version of the format of the settings file of this machine
3043 (<link to="#settingsFilePath"/>).
3044
3045 The version string has the following format:
3046 <pre>
3047 x.y-platform
3048 </pre>
3049 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3050 versions, and <tt>platform</tt> is the platform identifier.
3051
3052 The current version usually matches the value of the
3053 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3054 settings file was created by an older version of VirtualBox and there
3055 was a change of the settings file format since then.
3056
3057 Note that VirtualBox automatically converts settings files from older
3058 versions to the most recent version when reading them (usually at
3059 VirtualBox startup) but it doesn't save the changes back until
3060 you call a method that implicitly saves settings (such as
3061 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3062 explicitly. Therefore, if the value of this attribute differs from the
3063 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3064 means that the settings file was converted but the result of the
3065 conversion is not yet saved to disk.
3066
3067 The above feature may be used by interactive front-ends to inform users
3068 about the settings file format change and offer them to explicitly save
3069 all converted settings files (the global and VM-specific ones),
3070 optionally create backup copies of the old settings files before saving,
3071 etc.
3072
3073 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3074 </desc>
3075 </attribute>
3076
3077 <attribute name="settingsModified" type="boolean" readonly="yes">
3078 <desc>
3079 Whether the settings of this machine have been modified
3080 (but neither yet saved nor discarded).
3081 <note>
3082 Reading this property is only valid on instances returned
3083 by <link to="ISession::machine"/> and on new machines
3084 created by <link to="IVirtualBox::createMachine"/> or opened
3085 by <link to="IVirtualBox::openMachine"/> but not
3086 yet registered, or on unregistered machines after calling
3087 <link to="IVirtualBox::unregisterMachine"/>. For all other
3088 cases, the settings can never be modified.
3089 </note>
3090 <note>
3091 For newly created unregistered machines, the value of this
3092 property is always TRUE until <link to="#saveSettings()"/>
3093 is called (no matter if any machine settings have been
3094 changed after the creation or not). For opened machines
3095 the value is set to FALSE (and then follows to normal rules).
3096 </note>
3097 </desc>
3098 </attribute>
3099
3100 <attribute name="sessionState" type="SessionState" readonly="yes">
3101 <desc>Current session state for this machine.</desc>
3102 </attribute>
3103
3104 <attribute name="sessionType" type="wstring" readonly="yes">
3105 <desc>
3106 Type of the session. If <link to="#sessionState"/> is
3107 SessionSpawning or SessionOpen, this attribute contains the
3108 same value as passed to the
3109 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3110 type parameter. If the session was opened directly using
3111 <link to="IVirtualBox::openSession()"/>, or if
3112 <link to="#sessionState"/> is SessionClosed, the value of this
3113 attribute is @c null.
3114 </desc>
3115 </attribute>
3116
3117 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3118 <desc>
3119 Identifier of the session process. This attribute contains the
3120 platform-dependent identifier of the process that has opened a
3121 direct session for this machine using the
3122 <link to="IVirtualBox::openSession()"/> call. The returned value
3123 is only valid if <link to="#sessionState"/> is SessionOpen or
3124 SessionClosing (i.e. a session is currently open or being
3125 closed) by the time this property is read.
3126 </desc>
3127 </attribute>
3128
3129 <attribute name="state" type="MachineState" readonly="yes">
3130 <desc>Current execution state of this machine.</desc>
3131 </attribute>
3132
3133 <attribute name="lastStateChange" type="long long" readonly="yes">
3134 <desc>
3135 Time stamp of the last execution state change,
3136 in milliseconds since 1970-01-01 UTC.
3137 </desc>
3138 </attribute>
3139
3140 <attribute name="stateFilePath" type="wstring" readonly="yes">
3141 <desc>
3142 Full path to the file that stores the execution state of
3143 the machine when it is in the <link to="MachineState::Saved"/>
3144 state.
3145 <note>
3146 When the machine is not in the Saved state, this attribute
3147 <tt>null</tt>.
3148 </note>
3149 </desc>
3150 </attribute>
3151
3152 <attribute name="logFolder" type="wstring" readonly="yes">
3153 <desc>
3154 Full path to the folder that stores a set of rotated log files
3155 recorded during machine execution. The most recent log file is
3156 named <tt>VBox.log</tt>, the previous log file is
3157 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3158 in the current version).
3159 </desc>
3160 </attribute>
3161
3162 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3163 <desc>
3164 Current snapshot of this machine.
3165 <note>
3166 A <tt>null</tt> object is returned if the machine doesn't
3167 have snapshots.
3168 </note>
3169 <see><link to="ISnapshot"/></see>
3170 </desc>
3171 </attribute>
3172
3173 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3174 <desc>
3175 Number of snapshots taken on this machine. Zero means the
3176 machine doesn't have any snapshots.
3177 </desc>
3178 </attribute>
3179
3180 <attribute name="currentStateModified" type="boolean" readonly="yes">
3181 <desc>
3182 Returns <tt>true</tt> if the current state of the machine is not
3183 identical to the state stored in the current snapshot.
3184
3185 The current state is identical to the current snapshot right
3186 after one of the following calls are made:
3187 <ul>
3188 <li><link to="IConsole::discardCurrentState"/> or
3189 <link to="IConsole::discardCurrentSnapshotAndState"/>
3190 </li>
3191 <li><link to="IConsole::takeSnapshot"/> (issued on a
3192 powered off or saved machine, for which
3193 <link to="#settingsModified"/> returns <tt>false</tt>)
3194 </li>
3195 <li><link to="IMachine::setCurrentSnapshot"/>
3196 </li>
3197 </ul>
3198
3199 The current state remains identical until one of the following
3200 happens:
3201 <ul>
3202 <li>settings of the machine are changed</li>
3203 <li>the saved state is discarded</li>
3204 <li>the current snapshot is discarded</li>
3205 <li>an attempt to execute the machine is made</li>
3206 </ul>
3207
3208 <note>
3209 For machines that don't have snapshots, this property is
3210 always <tt>false</tt>.
3211 </note>
3212 </desc>
3213 </attribute>
3214
3215 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3216 <desc>
3217 Collection of shared folders for this machine (permanent shared
3218 folders). These folders are shared automatically at machine startup
3219 and available only to the guest OS installed within this machine.
3220
3221 New shared folders are added to the collection using
3222 <link to="#createSharedFolder"/>. Existing shared folders can be
3223 removed using <link to="#removeSharedFolder"/>.
3224 </desc>
3225 </attribute>
3226
3227 <attribute name="clipboardMode" type="ClipboardMode">
3228 <desc>
3229 Synchronization mode between the host OS clipboard
3230 and the guest OS clipboard.
3231 </desc>
3232 </attribute>
3233
3234 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3235 <desc>
3236 A comma-separated list of simple glob patterns. Changes to guest
3237 properties whose name matches one of the patterns will generate an
3238 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3239 </desc>
3240 </attribute>
3241
3242 <method name="setBootOrder">
3243 <desc>
3244 Puts the given device to the specified position in
3245 the boot order.
3246
3247 To indicate that no device is associated with the given position,
3248 <link to="DeviceType::Null"/> should be used.
3249
3250 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3251 </desc>
3252 <param name="position" type="unsigned long" dir="in">
3253 <desc>
3254 Position in the boot order (<tt>1</tt> to the total number of
3255 devices the machine can boot from, as returned by
3256 <link to="ISystemProperties::maxBootPosition"/>).
3257 </desc>
3258 </param>
3259 <param name="device" type="DeviceType" dir="in">
3260 <desc>
3261 The type of the device used to boot at the given position.
3262 </desc>
3263 </param>
3264 </method>
3265
3266 <method name="getBootOrder" const="yes">
3267 <desc>
3268 Returns the device type that occupies the specified
3269 position in the boot order.
3270
3271 @todo [remove?]
3272 If the machine can have more than one device of the returned type
3273 (such as hard disks), then a separate method should be used to
3274 retrieve the individual device that occupies the given position.
3275
3276 If here are no devices at the given position, then
3277 <link to="DeviceType::Null"/> is returned.
3278
3279 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3280 </desc>
3281 <param name="order" type="unsigned long" dir="in">
3282 <desc>
3283 Position in the boot order (<tt>1</tt> to the total number of
3284 devices the machine can boot from, as returned by
3285 <link to="ISystemProperties::maxBootPosition"/>).
3286 </desc>
3287 </param>
3288 <param name="device" type="DeviceType" dir="return">
3289 <desc>
3290 Device at the given position.
3291 </desc>
3292 </param>
3293 </method>
3294
3295 <method name="attachHardDisk2">
3296 <desc>
3297 Attaches a virtual hard disk identified by the given UUID to a device
3298 slot of the specified bus.
3299
3300 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3301 specify the primary or secondary IDE controller, respectively. The
3302 SATA bus supports 30 channels, so this parameter can be a number in
3303 range from @c 0 to @c 29.
3304
3305 For the primary controller of the IDE bus, the @a device number can be
3306 either @c 0 or @c 1, to specify the master or the slave device,
3307 respectively. For the secondary IDE controller, the device number is
3308 always @c 1 because the master device is reserved for the CD-ROM drive.
3309
3310 For the SATA bus, the @a device parameter is not currently used and
3311 must always be @c 0.
3312
3313 The specified device slot must not have another disk attached to it, or
3314 this method will fail.
3315
3316 See <link to="IHardDisk2"/> for more detailed information about
3317 attaching hard disks.
3318
3319 <note>
3320 You cannot attach a hard disk to a running machine. Also, you cannot
3321 attach a hard disk to a newly created machine until this machine's
3322 settings are saved to disk using <link to="#saveSettings()"/>.
3323 </note>
3324 <note>
3325 If the hard disk is being attached indirectly, a new differencing hard
3326 disk will be implicitly created for it and attached instead. If the
3327 changes made to the machine settings (including this indirect
3328 attachment) are later cancelled using <link to="#discardSettings()"/>,
3329 this implicitly created differencing hard disk will be implicitly
3330 deleted.
3331 </note>
3332 </desc>
3333 <param name="id" type="uuid" dir="in">
3334 <desc>UUID of the hard disk to attach.</desc>
3335 </param>
3336 <param name="bus" type="StorageBus" dir="in">
3337 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3338 </param>
3339 <param name="channel" type="long" dir="in">
3340 <desc>Channel to attach the hard disk to.</desc>
3341 </param>
3342 <param name="device" type="long" dir="in">
3343 <desc>
3344 Device slot in the given channel to attach the hard disk to.
3345 </desc>
3346 </param>
3347 </method>
3348
3349 <method name="getHardDisk2" const="yes">
3350 <desc>
3351 Returns the virtual hard disk attached to a device slot of the specified
3352 bus.
3353
3354 Note that if the hard disk was indirectly attached by
3355 <link to="#attachHardDisk2()"/> to the given device slot then this
3356 method will return not the same object as passed to the
3357 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3358 more detailed information about attaching hard disks.
3359 </desc>
3360 <param name="bus" type="StorageBus" dir="in">
3361 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3362 </param>
3363 <param name="channel" type="long" dir="in">
3364 <desc>Channel to query.</desc>
3365 </param>
3366 <param name="device" type="long" dir="in">
3367 <desc>Device slot in the given channel to query.</desc>
3368 </param>
3369 <param name="hardDisk" type="IHardDisk2" dir="return">
3370 <desc>Attached hard disk object.</desc>
3371 </param>
3372 </method>
3373
3374 <method name="detachHardDisk2">
3375 <desc>
3376 Detaches the virtual hard disk attached to a device slot of the
3377 specified bus.
3378
3379 Detaching the hard disk from the virtual machine is deferred. This means
3380 that the hard disk remains associated with the machine when this method
3381 returns and gets actually de-associated only after a successful
3382 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3383 for more detailed information about attaching hard disks.
3384
3385 <note>
3386 You cannot detach the hard disk from a running machine.
3387 </note>
3388 <note>
3389 Detaching differencing hard disks implicitly created by <link
3390 to="#attachHardDisk2()"/> for the indirect attachment using this
3391 method will <b>not</b> implicitly delete them. The
3392 <link to="IHardDisk2::deleteStorage()"/> operation should be
3393 explicitly performed by the caller after the hard disk is successfully
3394 detached and the settings are saved with
3395 <link to="#saveSettings()"/>, if it is the desired action.
3396 </note>
3397
3398 </desc>
3399 <param name="bus" type="StorageBus" dir="in">
3400 <desc>Bus to detach the hard disk from.</desc>
3401 </param>
3402 <param name="channel" type="long" dir="in">
3403 <desc>Channel number to detach the hard disk from.</desc>
3404 </param>
3405 <param name="device" type="long" dir="in">
3406 <desc>Device slot number to detach the hard disk from.</desc>
3407 </param>
3408 </method>
3409
3410 <method name="getNetworkAdapter" const="yes">
3411 <desc>
3412 Returns the network adapter associated with the given slot.
3413 Slots are numbered sequentially, starting with zero. The total
3414 number of adapters per every machine is defined by the
3415 <link to="ISystemProperties::networkAdapterCount"/> property,
3416 so the maximum slot number is one less than that property's value.
3417 </desc>
3418 <param name="slot" type="unsigned long" dir="in"/>
3419 <param name="adapter" type="INetworkAdapter" dir="return"/>
3420 </method>
3421
3422 <method name="getSerialPort" const="yes">
3423 <desc>
3424 Returns the serial port associated with the given slot.
3425 Slots are numbered sequentially, starting with zero. The total
3426 number of serial ports per every machine is defined by the
3427 <link to="ISystemProperties::serialPortCount"/> property,
3428 so the maximum slot number is one less than that property's value.
3429 </desc>
3430 <param name="slot" type="unsigned long" dir="in"/>
3431 <param name="port" type="ISerialPort" dir="return"/>
3432 </method>
3433
3434 <method name="getParallelPort" const="yes">
3435 <desc>
3436 Returns the parallel port associated with the given slot.
3437 Slots are numbered sequentially, starting with zero. The total
3438 number of parallel ports per every machine is defined by the
3439 <link to="ISystemProperties::parallelPortCount"/> property,
3440 so the maximum slot number is one less than that property's value.
3441 </desc>
3442 <param name="slot" type="unsigned long" dir="in"/>
3443 <param name="port" type="IParallelPort" dir="return"/>
3444 </method>
3445
3446 <method name="getNextExtraDataKey">
3447 <desc>
3448 Returns the machine-specific extra data key name following the
3449 supplied key.
3450
3451 An error is returned if the supplied @a key does not exist. @c NULL is
3452 returned in @a nextKey if the supplied key is the last key. When
3453 supplying @c NULL for the @a key, the first key item is returned in @a
3454 nextKey (if there is any). @a nextValue is an optional parameter and
3455 if supplied, the next key's value is returned in it.
3456 </desc>
3457 <param name="key" type="wstring" dir="in">
3458 <desc>Name of the data key to follow.</desc>
3459 </param>
3460 <param name="nextKey" type="wstring" dir="out">
3461 <desc>Name of the next data key.</desc>
3462 </param>
3463 <param name="nextValue" type="wstring" dir="out">
3464 <desc>Value of the next data key.</desc>
3465 </param>
3466 </method>
3467
3468 <method name="getExtraData">
3469 <desc>
3470 Returns associated machine-specific extra data.
3471
3472 If the requested data @a key does not exist, this function will
3473 succeed and return @c NULL in the @a value argument.
3474 </desc>
3475 <param name="key" type="wstring" dir="in">
3476 <desc>Name of the data key to get.</desc>
3477 </param>
3478 <param name="value" type="wstring" dir="return">
3479 <desc>Value of the requested data key.</desc>
3480 </param>
3481 </method>
3482
3483 <method name="setExtraData">
3484 <desc>
3485 Sets associated machine-specific extra data.
3486
3487 If you pass @c NULL as a key @a value, the given @a key will be
3488 deleted.
3489
3490 <note>
3491 Before performing the actual data change, this method will ask all
3492 registered callbacks using the
3493 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
3494 notification for a permission. If one of the callbacks refuses the
3495 new value, the change will not be performed.
3496 </note>
3497 <note>
3498 On success, the
3499 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
3500 is called to inform all registered callbacks about a successful data
3501 change.
3502 </note>
3503 <note>
3504 This method can be called outside the machine session and therefore
3505 it's a caller's responsibility to handle possible race conditions
3506 when several clients change the same key at the same time.
3507 </note>
3508 </desc>
3509 <param name="key" type="wstring" dir="in">
3510 <desc>Name of the data key to set.</desc>
3511 </param>
3512 <param name="value" type="wstring" dir="in">
3513 <desc>Value to assign to the key.</desc>
3514 </param>
3515 </method>
3516
3517 <method name="saveSettings">
3518 <desc>
3519 Saves any changes to machine settings made since the session
3520 has been opened or a new machine has been created, or since the
3521 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
3522 For registered machines, new settings become visible to all
3523 other VirtualBox clients after successful invocation of this
3524 method.
3525 <note>
3526 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
3527 notification event after the configuration has been successfully
3528 saved (only for registered machines).
3529 </note>
3530 <note>
3531 Calling this method is only valid on instances returned
3532 by <link to="ISession::machine"/> and on new machines
3533 created by <link to="IVirtualBox::createMachine"/> but not
3534 yet registered, or on unregistered machines after calling
3535 <link to="IVirtualBox::unregisterMachine"/>.
3536 </note>
3537 </desc>
3538 </method>
3539
3540 <method name="saveSettingsWithBackup">
3541 <desc>
3542 Creates a backup copy of the machine settings file (<link
3543 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
3544 <link to="#saveSettings()"/>.
3545
3546 Note that the backup copy is created <b>only</b> if the settings file
3547 auto-conversion took place (see <link to="#settingsFileVersion"/> for
3548 details). Otherwise, this call is fully equivalent to
3549 <link to="#saveSettings()"/> and no backup copying is done.
3550
3551 The backup copy is created in the same directory where the original
3552 settings file is located. It is given the following file name:
3553 <pre>
3554 original.xml.x.y-platform.bak
3555 </pre>
3556 where <tt>original.xml</tt> is the original settings file name
3557 (excluding path), and <tt>x.y-platform</tt> is the version of the old
3558 format of the settings file (before auto-conversion).
3559
3560 If the given backup file already exists, this method will try to add the
3561 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
3562 0 to 9) and copy it again until it succeeds. If all suffixes are
3563 occupied, or if any other copy error occurs, this method will return a
3564 failure.
3565
3566 If the copy operation succeeds, the @a bakFileName return argument will
3567 receive a full path to the created backup file (for informational
3568 purposes). Note that this will happen even if the subsequent
3569 <link to="#saveSettings()"/> call performed by this method after the
3570 copy operation, fails.
3571
3572 <note>
3573 The VirtualBox API never calls this method. It is intended purely for
3574 the purposes of creating backup copies of the settings files by
3575 front-ends before saving the results of the automatically performed
3576 settings conversion to disk.
3577 </note>
3578
3579 <see>settingsFileVersion</see>
3580 </desc>
3581 <param name="bakFileName" type="wstring" dir="return">
3582 <desc>Full path to the created backup copy.</desc>
3583 </param>
3584 </method>
3585
3586 <method name="discardSettings">
3587 <desc>
3588 Discards any changes to the machine settings made since the session
3589 has been opened or since the last call to <link to="#saveSettings()"/>
3590 or <link to="#discardSettings"/>.
3591 <note>
3592 Calling this method is only valid on instances returned
3593 by <link to="ISession::machine"/> and on new machines
3594 created by <link to="IVirtualBox::createMachine"/> or
3595 opened by <link to="IVirtualBox::openMachine"/> but not
3596 yet registered, or on unregistered machines after calling
3597 <link to="IVirtualBox::unregisterMachine"/>.
3598 </note>
3599 </desc>
3600 </method>
3601
3602 <method name="deleteSettings">
3603 <desc>
3604 Deletes the settings file of this machine from disk.
3605 The machine must not be registered in order for this operation
3606 to succeed.
3607 <note>
3608 <link to="#settingsModified"/> will return TRUE after this
3609 method successfully returns.
3610 </note>
3611 <note>
3612 Calling this method is only valid on instances returned
3613 by <link to="ISession::machine"/> and on new machines
3614 created by <link to="IVirtualBox::createMachine"/> or
3615 opened by <link to="IVirtualBox::openMachine"/> but not
3616 yet registered, or on unregistered machines after calling
3617 <link to="IVirtualBox::unregisterMachine"/>.
3618 </note>
3619 <note>
3620 The deleted machine settings file can be restored (saved again)
3621 by calling <link to="#saveSettings()"/>.
3622 </note>
3623 </desc>
3624 </method>
3625
3626 <method name="getSnapshot">
3627 <desc>
3628 Returns a snapshot of this machine with the given UUID.
3629 A <tt>null</tt> UUID can be used to obtain the first snapshot
3630 taken on this machine. This is useful if you want to traverse
3631 the whole tree of snapshots starting from the root.
3632 </desc>
3633 <param name="id" type="uuid" dir="in">
3634 <desc>UUID of the snapshot to get</desc>
3635 </param>
3636 <param name="snapshot" type="ISnapshot" dir="return">
3637 <desc>Snapshot object with the given UUID.</desc>
3638 </param>
3639 </method>
3640
3641 <method name="findSnapshot">
3642 <desc>
3643 Returns a snapshot of this machine with the given name.
3644 </desc>
3645 <param name="name" type="wstring" dir="in">
3646 <desc>Name of the snapshot to find</desc>
3647 </param>
3648 <param name="snapshot" type="ISnapshot" dir="return">
3649 <desc>Snapshot object with the given name.</desc>
3650 </param>
3651 </method>
3652
3653 <method name="setCurrentSnapshot">
3654 <desc>
3655 Sets the current snapshot of this machine.
3656 <note>
3657 In the current implementation, this operation is not
3658 implemented.
3659 </note>
3660 </desc>
3661 <param name="id" type="uuid" dir="in">
3662 <desc>UUID of the snapshot to set as the current snapshot.</desc>
3663 </param>
3664 </method>
3665
3666 <method name="createSharedFolder">
3667 <desc>
3668 Creates a new permanent shared folder by associating the given logical
3669 name with the given host path, adds it to the collection of shared
3670 folders and starts sharing it. Refer to the description of
3671 <link to="ISharedFolder"/> to read more about logical names.
3672 </desc>
3673 <param name="name" type="wstring" dir="in">
3674 <desc>Unique logical name of the shared folder.</desc>
3675 </param>
3676 <param name="hostPath" type="wstring" dir="in">
3677 <desc>Full path to the shared folder in the host file system.</desc>
3678 </param>
3679 <param name="writable" type="boolean" dir="in">
3680 <desc>Whether the share is writable or readonly</desc>
3681 </param>
3682 </method>
3683
3684 <method name="removeSharedFolder">
3685 <desc>
3686 Removes the permanent shared folder with the given name previously
3687 created by <link to="#createSharedFolder"/> from the collection of
3688 shared folders and stops sharing it.
3689 </desc>
3690 <param name="name" type="wstring" dir="in">
3691 <desc>Logical name of the shared folder to remove.</desc>
3692 </param>
3693 </method>
3694
3695 <method name="canShowConsoleWindow">
3696 <desc>
3697 Returns @c true if the VM console process can activate the
3698 console window and bring it to foreground on the desktop of
3699 the host PC.
3700 <note>
3701 This method will fail if a session for this machine is not
3702 currently open.
3703 </note>
3704 </desc>
3705 <param name="canShow" type="boolean" dir="return">
3706 <desc>
3707 @c true if the console window can be shown and @c
3708 false otherwise.
3709 </desc>
3710 </param>
3711 </method>
3712
3713 <method name="showConsoleWindow">
3714 <desc>
3715 Activates the console window and brings it to foreground on
3716 the desktop of the host PC. Many modern window managers on
3717 many platforms implement some sort of focus stealing
3718 prevention logic, so that it may be impossible to activate
3719 a window without the help of the currently active
3720 application. In this case, this method will return a non-zero
3721 identifier that represents the top-level window of the VM
3722 console process. The caller, if it represents a currently
3723 active process, is responsible to use this identifier (in a
3724 platform-dependent manner) to perform actual window
3725 activation.
3726 <note>
3727 This method will fail if a session for this machine is not
3728 currently open.
3729 </note>
3730 </desc>
3731 <param name="winId" type="unsigned long long" dir="return">
3732 <desc>
3733 Platform-dependent identifier of the top-level VM console
3734 window, or zero if this method has performed all actions
3735 necessary to implement the <i>show window</i> semantics for
3736 the given platform and/or VirtualBox front-end.
3737 </desc>
3738 </param>
3739 </method>
3740
3741 <method name="getGuestProperty">
3742 <desc>
3743 Reads an entry from the machine's guest property store.
3744 </desc>
3745 <param name="name" type="wstring" dir="in">
3746 <desc>
3747 The name of the property to read.
3748 </desc>
3749 </param>
3750 <param name="value" type="wstring" dir="out">
3751 <desc>
3752 The value of the property. If the property does not exist then this
3753 will be empty.
3754 </desc>
3755 </param>
3756 <param name="timestamp" type="unsigned long long" dir="out">
3757 <desc>
3758 The time at which the property was last modified, as seen by the
3759 server process.
3760 </desc>
3761 </param>
3762 <param name="flags" type="wstring" dir="out">
3763 <desc>
3764 Additional property parameters, passed as a comma-separated list of
3765 "name=value" type entries.
3766 </desc>
3767 </param>
3768 </method>
3769
3770 <method name="getGuestPropertyValue">
3771 <desc>
3772 Reads a value from the machine's guest property store.
3773 </desc>
3774 <param name="property" type="wstring" dir="in">
3775 <desc>
3776 The name of the property to read.
3777 </desc>
3778 </param>
3779 <param name="value" type="wstring" dir="return">
3780 <desc>
3781 The value of the property. If the property does not exist then this
3782 will be empty.
3783 </desc>
3784 </param>
3785 </method>
3786
3787 <method name="getGuestPropertyTimestamp">
3788 <desc>
3789 Reads a property timestamp from the machine's guest property store.
3790 </desc>
3791 <param name="property" type="wstring" dir="in">
3792 <desc>
3793 The name of the property to read.
3794 </desc>
3795 </param>
3796 <param name="value" type="unsigned long long" dir="return">
3797 <desc>
3798 The timestamp. If the property does not exist then this will be
3799 empty.
3800 </desc>
3801 </param>
3802 </method>
3803
3804 <method name="setGuestProperty">
3805 <desc>
3806 Sets, changes or deletes an entry in the machine's guest property
3807 store.
3808 </desc>
3809 <param name="property" type="wstring" dir="in">
3810 <desc>
3811 The name of the property to set, change or delete.
3812 </desc>
3813 </param>
3814 <param name="value" type="wstring" dir="in">
3815 <desc>
3816 The new value of the property to set, change or delete. If the
3817 property does not yet exist and value is non-empty, it will be
3818 created. If the value is empty, the key will be deleted if it
3819 exists.
3820 </desc>
3821 </param>
3822 <param name="flags" type="wstring" dir="in">
3823 <desc>
3824 Additional property parameters, passed as a comma-separated list of
3825 "name=value" type entries.
3826 </desc>
3827 </param>
3828 </method>
3829
3830 <method name="setGuestPropertyValue">
3831 <desc>
3832 Sets, changes or deletes a value in the machine's guest property
3833 store. The flags field will be left unchanged or created empty for a
3834 new property.
3835 </desc>
3836 <param name="property" type="wstring" dir="in">
3837 <desc>
3838 The name of the property to set, change or delete.
3839 </desc>
3840 </param>
3841 <param name="value" type="wstring" dir="in">
3842 <desc>
3843 The new value of the property to set, change or delete. If the
3844 property does not yet exist and value is non-empty, it will be
3845 created. If value is empty, the property will be deleted if it
3846 exists.
3847 </desc>
3848 </param>
3849 </method>
3850
3851 <method name="enumerateGuestProperties">
3852 <desc>
3853 Return a list of the guest properties matching a set of patterns along
3854 with their values, time stamps and flags.
3855 </desc>
3856 <param name="patterns" type="wstring" dir="in">
3857 <desc>
3858 The patterns to match the properties against, separated by '|'
3859 characters. If this is empty or NULL, all properties will match.
3860 </desc>
3861 </param>
3862 <param name="name" type="wstring" dir="out" safearray="yes">
3863 <desc>
3864 The names of the properties returned.
3865 </desc>
3866 </param>
3867 <param name="value" type="wstring" dir="out" safearray="yes">
3868 <desc>
3869 The values of the properties returned. The array entries match the
3870 corresponding entries in the @a name array.
3871 </desc>
3872 </param>
3873 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3874 <desc>
3875 The time stamps of the properties returned. The array entries match
3876 the corresponding entries in the @a name array.
3877 </desc>
3878 </param>
3879 <param name="flags" type="wstring" dir="out" safearray="yes">
3880 <desc>
3881 The flags of the properties returned. The array entries match the
3882 corresponding entries in the @a name array.
3883 </desc>
3884 </param>
3885 </method>
3886</interface>
3887
3888 <!--
3889 // IConsole
3890 /////////////////////////////////////////////////////////////////////////
3891 -->
3892
3893 <interface
3894 name="IConsoleCallback" extends="$unknown"
3895 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
3896 wsmap="suppress"
3897 >
3898
3899 <method name="onMousePointerShapeChange">
3900 <desc>
3901 Notification when the guest mouse pointer shape has
3902 changed. The new shape data is given.
3903 </desc>
3904 <param name="visible" type="boolean" dir="in">
3905 <desc>
3906 Flag whether the pointer is visible.
3907 </desc>
3908 </param>
3909 <param name="alpha" type="boolean" dir="in">
3910 <desc>
3911 Flag whether the pointer has an alpha channel.
3912 </desc>
3913 </param>
3914 <param name="xHot" type="unsigned long" dir="in">
3915 <desc>
3916 The pointer hot spot x coordinate.
3917 </desc>
3918 </param>
3919 <param name="yHot" type="unsigned long" dir="in">
3920 <desc>
3921 The pointer hot spot y coordinate.
3922 </desc>
3923 </param>
3924 <param name="width" type="unsigned long" dir="in">
3925 <desc>
3926 Width of the pointer shape in pixels.
3927 </desc>
3928 </param>
3929 <param name="height" type="unsigned long" dir="in">
3930 <desc>
3931 Height of the pointer shape in pixels.
3932 </desc>
3933 </param>
3934 <param name="shape" type="octet" mod="ptr" dir="in">
3935 <desc>
3936 Address of the shape buffer.
3937
3938 The buffer contains 1 bpp (bits per pixel) AND mask followed by 32 bpp XOR (color) mask.
3939
3940 For pointers without alpha channel the XOR mask pixels are 32 bit values: (lsb)BGR0(msb).
3941 For pointers with alpha channel the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
3942
3943 AND mask presents for pointers with alpha channel, so if the callback does not
3944 support alpha, the pointer could be displayed as a normal color pointer.
3945
3946 The AND mask is 1 bpp bitmap with byte aligned scanlines. Size of AND mask,
3947 therefore, is <tt>cbAnd = (width + 7) / 8 * height</tt>. The padding bits at the
3948 end of any scanline are undefined.
3949
3950 The XOR mask follows the AND mask on the next 4 bytes aligned offset:
3951 <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>
3952 Bytes in the gap between the AND and the XOR mask are undefined.
3953 XOR mask scanlines have no gap between them and size of XOR mask is:
3954 <tt>cXor = width * 4 * height</tt>.
3955
3956 <note>
3957 If 'shape' is equal to 0, only pointer visibility is being changed.
3958 </note>
3959 </desc>
3960 </param>
3961 </method>
3962
3963 <method name="onMouseCapabilityChange">
3964 <desc>
3965 Notification when the mouse capabilities reported by the
3966 guest have changed. The new capabilities are passed.
3967 </desc>
3968 <param name="supportsAbsolute" type="boolean" dir="in"/>
3969 <param name="needsHostCursor" type="boolean" dir="in"/>
3970 </method>
3971
3972 <method name="onKeyboardLedsChange">
3973 <desc>
3974 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
3975 to alter the state of the keyboard LEDs.
3976 </desc>
3977 <param name="numLock" type="boolean" dir="in"/>
3978 <param name="capsLock" type="boolean" dir="in"/>
3979 <param name="scrollLock" type="boolean" dir="in"/>
3980 </method>
3981
3982 <method name="onStateChange">
3983 <desc>
3984 Notification when the execution state of the machine has changed.
3985 The new state will be given.
3986 </desc>
3987 <param name="state" type="MachineState" dir="in"/>
3988 </method>
3989
3990 <method name="onAdditionsStateChange">
3991 <desc>
3992 Notification when a Guest Additions property changes.
3993 Interested callees should query IGuest attributes to
3994 find out what has changed.
3995 </desc>
3996 </method>
3997
3998 <method name="onDVDDriveChange">
3999 <desc>
4000 Notification when a property of the
4001 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
4002 Interested callees should use IDVDDrive methods to find out what has
4003 changed.
4004 </desc>
4005 </method>
4006
4007 <method name="onFloppyDriveChange">
4008 <desc>
4009 Notification when a property of the
4010 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
4011 Interested callees should use IFloppyDrive methods to find out what
4012 has changed.
4013 </desc>
4014 </method>
4015
4016 <method name="onNetworkAdapterChange">
4017 <desc>
4018 Notification when a property of one of the
4019 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
4020 changes. Interested callees should use INetworkAdapter methods and
4021 attributes to find out what has changed.
4022 </desc>
4023 <param name="networkAdapter" type="INetworkAdapter" dir="in">
4024 <desc>Network adapter that is subject to change.</desc>
4025 </param>
4026 </method>
4027
4028 <method name="onSerialPortChange">
4029 <desc>
4030 Notification when a property of one of the
4031 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
4032 Interested callees should use ISerialPort methods and attributes
4033 to find out what has changed.
4034 </desc>
4035 <param name="serialPort" type="ISerialPort" dir="in">
4036 <desc>Serial port that is subject to change.</desc>
4037 </param>
4038 </method>
4039
4040 <method name="onParallelPortChange">
4041 <desc>
4042 Notification when a property of one of the
4043 virtual <link to="IMachine::getParallelPort">parallel ports</link>
4044 changes. Interested callees should use ISerialPort methods and
4045 attributes to find out what has changed.
4046 </desc>
4047 <param name="parallelPort" type="IParallelPort" dir="in">
4048 <desc>Parallel port that is subject to change.</desc>
4049 </param>
4050 </method>
4051
4052 <method name="onVRDPServerChange">
4053 <desc>
4054 Notification when a property of the
4055 <link to="IMachine::VRDPServer">VRDP server</link> changes.
4056 Interested callees should use IVRDPServer methods and attributes to
4057 find out what has changed.
4058 </desc>
4059 </method>
4060
4061 <method name="onUSBControllerChange">
4062 <desc>
4063 Notification when a property of the virtual
4064 <link to="IMachine::USBController">USB controller</link> changes.
4065 Interested callees should use IUSBController methods and attributes to
4066 find out what has changed.
4067 </desc>
4068 </method>
4069
4070 <method name="onUSBDeviceStateChange">
4071 <desc>
4072 Notification when a USB device is attached to or detached from
4073 the virtual USB controller.
4074
4075 This notification is sent as a result of the indirect
4076 request to attach the device because it matches one of the
4077 machine USB filters, or as a result of the direct request
4078 issued by <link to="IConsole::attachUSBDevice"/> or
4079 <link to="IConsole::detachUSBDevice"/>.
4080
4081 This notification is sent in case of both a succeeded and a
4082 failed request completion. When the request succeeds, the @a
4083 error parameter is @c null, and the given device has been
4084 already added to (when @a attached is @c true) or removed from
4085 (when @a attached is @c false) the collection represented by
4086 <link to="IConsole::USBDevices"/>. On failure, the collection
4087 doesn't change and the @a error parameter represents the error
4088 message describing the failure.
4089
4090 </desc>
4091 <param name="device" type="IUSBDevice" dir="in">
4092 <desc>Device that is subject to state change.</desc>
4093 </param>
4094 <param name="attached" type="boolean" dir="in">
4095 <desc>
4096 <tt>true</tt> if the device was attached
4097 and <tt>false</tt> otherwise.
4098 </desc>
4099 </param>
4100 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
4101 <desc>
4102 <tt>null</tt> on success or an error message object on
4103 failure.
4104 </desc>
4105 </param>
4106 </method>
4107
4108 <method name="onSharedFolderChange">
4109 <desc>
4110 Notification when a shared folder is added or removed.
4111 The @a scope argument defines one of three scopes:
4112 <link to="IVirtualBox::sharedFolders">global shared folders</link>
4113 (<link to="Scope::Global">Global</link>),
4114 <link to="IMachine::sharedFolders">permanent shared folders</link> of
4115 the machine (<link to="Scope::Machine">Machine</link>) or <link
4116 to="IConsole::sharedFolders">transient shared folders</link> of the
4117 machine (<link to="Scope::Session">Session</link>). Interested callees
4118 should use query the corresponding collections to find out what has
4119 changed.
4120 </desc>
4121 <param name="scope" type="Scope" dir="in">
4122 <desc>Scope of the notification.</desc>
4123 </param>
4124 </method>
4125
4126 <method name="onRuntimeError">
4127 <desc>
4128 Notification when an error happens during the virtual
4129 machine execution.
4130
4131 There are three kinds of runtime errors:
4132 <ul>
4133 <li><i>fatal</i></li>
4134 <li><i>non-fatal with retry</i></li>
4135 <li><i>non-fatal warnings</i></li>
4136 </ul>
4137
4138 <b>Fatal</b> errors are indicated by the @a fatal parameter set
4139 to <tt>true</tt>. In case of fatal errors, the virtual machine
4140 execution is always paused before calling this notification, and
4141 the notification handler is supposed either to immediately save
4142 the virtual machine state using <link to="IConsole::saveState()"/>
4143 or power it off using <link to="IConsole::powerDown()"/>.
4144 Resuming the execution can lead to unpredictable results.
4145
4146 <b>Non-fatal</b> errors and warnings are indicated by the
4147 @a fatal parameter set to <tt>false</tt>. If the virtual machine
4148 is in the Paused state by the time the error notification is
4149 received, it means that the user can <i>try to resume</i> the machine
4150 execution after attempting to solve the problem that caused the
4151 error. In this case, the notification handler is supposed
4152 to show an appropriate message to the user (depending on the
4153 value of the @a id parameter) that offers several actions such
4154 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
4155 wants to retry, the notification handler should continue
4156 the machine execution using the <link to="IConsole::resume()"/>
4157 call. If the machine execution is not Paused during this
4158 notification, then it means this notification is a <i>warning</i>
4159 (for example, about a fatal condition that can happen very soon);
4160 no immediate action is required from the user, the machine
4161 continues its normal execution.
4162
4163 Note that in either case the notification handler
4164 <b>must not</b> perform any action directly on a thread
4165 where this notification is called. Everything it is allowed to
4166 do is to post a message to another thread that will then talk
4167 to the user and take the corresponding action.
4168
4169 Currently, the following error identifiers are known:
4170 <ul>
4171 <li><tt>"HostMemoryLow"</tt></li>
4172 <li><tt>"HostAudioNotResponding"</tt></li>
4173 <li><tt>"VDIStorageFull"</tt></li>
4174 </ul>
4175
4176 <note>
4177 This notification is not designed to be implemented by
4178 more than one callback at a time. If you have multiple
4179 IConsoleCallback instances registered on the given
4180 IConsole object, make sure you simply do nothing but
4181 return @c S_OK from all but one of them that does actual
4182 user notification and performs necessary actions.
4183 </note>
4184
4185 </desc>
4186 <param name="fatal" type="boolean" dir="in">
4187 <desc>Whether the error is fatal or not</desc>
4188 </param>
4189 <param name="id" type="wstring" dir="in">
4190 <desc>Error identifier</desc>
4191 </param>
4192 <param name="message" type="wstring" dir="in">
4193 <desc>Optional error message</desc>
4194 </param>
4195 </method>
4196
4197 <method name="onCanShowWindow">
4198 <desc>
4199 Notification when a call to
4200 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4201 front-end to check if a subsequent call to
4202 <link to="IMachine::showConsoleWindow()"/> can succeed.
4203
4204 The callee should give an answer appropriate to the current
4205 machine state in the @a canShow argument. This answer must
4206 remain valid at least until the next
4207 <link to="IConsole::state">machine state</link> change.
4208
4209 <note>
4210 This notification is not designed to be implemented by
4211 more than one callback at a time. If you have multiple
4212 IConsoleCallback instances registered on the given
4213 IConsole object, make sure you simply do nothing but
4214 return @c true and @c S_OK from all but one of them that
4215 actually manages console window activation.
4216 </note>
4217 </desc>
4218 <param name="canShow" type="boolean" dir="return">
4219 <desc>
4220 @c true if the console window can be shown and @c
4221 false otherwise.
4222 </desc>
4223 </param>
4224 </method>
4225
4226 <method name="onShowWindow">
4227 <desc>
4228 Notification when a call to
4229 <link to="IMachine::showConsoleWindow()"/>
4230 requests the console window to be activated and brought to
4231 foreground on the desktop of the host PC.
4232
4233 This notification should cause the VM console process to
4234 perform the requested action as described above. If it is
4235 impossible to do it at a time of this notification, this
4236 method should return a failure.
4237
4238 Note that many modern window managers on many platforms
4239 implement some sort of focus stealing prevention logic, so
4240 that it may be impossible to activate a window without the
4241 help of the currently active application (which is supposedly
4242 an initiator of this notification). In this case, this method
4243 must return a non-zero identifier that represents the
4244 top-level window of the VM console process. The caller, if it
4245 represents a currently active process, is responsible to use
4246 this identifier (in a platform-dependent manner) to perform
4247 actual window activation.
4248
4249 This method must set @a winId to zero if it has performed all
4250 actions necessary to complete the request and the console
4251 window is now active and in foreground, to indicate that no
4252 further action is required on the caller's side.
4253
4254 <note>
4255 This notification is not designed to be implemented by
4256 more than one callback at a time. If you have multiple
4257 IConsoleCallback instances registered on the given
4258 IConsole object, make sure you simply do nothing but
4259 return @c S_OK from all but one of them that actually
4260 manages console window activation.
4261 </note>
4262 </desc>
4263 <param name="winId" type="unsigned long long" dir="return">
4264 <desc>
4265 Platform-dependent identifier of the top-level VM console
4266 window, or zero if this method has performed all actions
4267 necessary to implement the <i>show window</i> semantics for
4268 the given platform and/or this VirtualBox front-end.
4269 </desc>
4270 </param>
4271 </method>
4272
4273 </interface>
4274
4275 <interface
4276 name="IRemoteDisplayInfo" extends="$unknown"
4277 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4278 wsmap="struct"
4279 >
4280 <desc>
4281 Contains information about the remote display (VRDP) capabilities and status.
4282 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4283 </desc>
4284
4285 <attribute name="active" type="boolean" readonly="yes">
4286 <desc>
4287 Whether the remote display connection is active.
4288 </desc>
4289 </attribute>
4290
4291 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4292 <desc>
4293 How many times a client connected.
4294 </desc>
4295 </attribute>
4296
4297 <attribute name="beginTime" type="long long" readonly="yes">
4298 <desc>
4299 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4300 </desc>
4301 </attribute>
4302
4303 <attribute name="endTime" type="long long" readonly="yes">
4304 <desc>
4305 When the last connection was terminated or the current time, if
4306 connection is still active, in milliseconds since 1970-01-01 UTC.
4307 </desc>
4308 </attribute>
4309
4310 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4311 <desc>
4312 How many bytes were sent in last or current, if still active, connection.
4313 </desc>
4314 </attribute>
4315
4316 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4317 <desc>
4318 How many bytes were sent in all connections.
4319 </desc>
4320 </attribute>
4321
4322 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4323 <desc>
4324 How many bytes were received in last or current, if still active, connection.
4325 </desc>
4326 </attribute>
4327
4328 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4329 <desc>
4330 How many bytes were received in all connections.
4331 </desc>
4332 </attribute>
4333
4334 <attribute name="user" type="wstring" readonly="yes">
4335 <desc>
4336 Login user name supplied by the client.
4337 </desc>
4338 </attribute>
4339
4340 <attribute name="domain" type="wstring" readonly="yes">
4341 <desc>
4342 Login domain name supplied by the client.
4343 </desc>
4344 </attribute>
4345
4346 <attribute name="clientName" type="wstring" readonly="yes">
4347 <desc>
4348 The client name supplied by the client.
4349 </desc>
4350 </attribute>
4351
4352 <attribute name="clientIP" type="wstring" readonly="yes">
4353 <desc>
4354 The IP address of the client.
4355 </desc>
4356 </attribute>
4357
4358 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4359 <desc>
4360 The client software version number.
4361 </desc>
4362 </attribute>
4363
4364 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
4365 <desc>
4366 Public key exchange method used when connection was established.
4367 Values: 0 - RDP4 public key exchange scheme.
4368 1 - X509 certificates were sent to client.
4369 </desc>
4370 </attribute>
4371
4372 </interface>
4373
4374 <interface
4375 name="IConsole" extends="$unknown"
4376 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
4377 wsmap="managed"
4378 >
4379 <desc>
4380 The IConsole interface represents an interface to control virtual
4381 machine execution.
4382
4383 The console object that implements the IConsole interface is obtained
4384 from a session object after the session for the given machine has been
4385 opened using one of <link to="IVirtualBox::openSession"/>,
4386 <link to="IVirtualBox::openRemoteSession"/> or
4387 <link to="IVirtualBox::openExistingSession"/> methods.
4388
4389 Methods of the IConsole interface allow the caller to query the current
4390 virtual machine execution state, pause the machine or power it down, save
4391 the machine state or take a snapshot, attach and detach removable media
4392 and so on.
4393
4394 <see>ISession</see>
4395 </desc>
4396
4397 <attribute name="machine" type="IMachine" readonly="yes">
4398 <desc>
4399 Machine object this console is sessioned with.
4400 <note>
4401 This is a convenience property, it has the same value as
4402 <link to="ISession::machine"/> of the corresponding session
4403 object.
4404 </note>
4405 </desc>
4406 </attribute>
4407
4408 <attribute name="state" type="MachineState" readonly="yes">
4409 <desc>
4410 Current execution state of the machine.
4411 <note>
4412 This property always returns the same value as the corresponding
4413 property of the IMachine object this console is sessioned with.
4414 For the process that owns (executes) the VM, this is the
4415 preferable way of querying the VM state, because no IPC
4416 calls are made.
4417 </note>
4418 </desc>
4419 </attribute>
4420
4421 <attribute name="guest" type="IGuest" readonly="yes">
4422 <desc>Guest object.</desc>
4423 </attribute>
4424
4425 <attribute name="keyboard" type="IKeyboard" readonly="yes">
4426 <desc>
4427 Virtual keyboard object.
4428 <note>
4429 If the machine is not running, any attempt to use
4430 the returned object will result in an error.
4431 </note>
4432 </desc>
4433 </attribute>
4434
4435 <attribute name="mouse" type="IMouse" readonly="yes">
4436 <desc>
4437 Virtual mouse object.
4438 <note>
4439 If the machine is not running, any attempt to use
4440 the returned object will result in an error.
4441 </note>
4442 </desc>
4443 </attribute>
4444
4445 <attribute name="display" type="IDisplay" readonly="yes">
4446 <desc>Virtual display object.
4447 <note>
4448 If the machine is not running, any attempt to use
4449 the returned object will result in an error.
4450 </note>
4451 </desc>
4452 </attribute>
4453
4454 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
4455 <desc>Debugging interface.</desc>
4456 </attribute>
4457
4458 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
4459 <desc>
4460 Collection of USB devices currently attached to the virtual
4461 USB controller.
4462 <note>
4463 The collection is empty if the machine is not running.
4464 </note>
4465 </desc>
4466 </attribute>
4467
4468 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
4469 <desc>
4470 List of USB devices currently attached to the remote VRDP client.
4471 Once a new device is physically attached to the remote host computer,
4472 it appears in this list and remains there until detached.
4473 </desc>
4474 </attribute>
4475
4476 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4477 <desc>
4478 Collection of shared folders for the current session. These folders
4479 are called transient shared folders because they are available to the
4480 guest OS running inside the associated virtual machine only for the
4481 duration of the session (as opposed to
4482 <link to="IMachine::sharedFolders"/> which represent permanent shared
4483 folders). When the session is closed (e.g. the machine is powered down),
4484 these folders are automatically discarded.
4485
4486 New shared folders are added to the collection using
4487 <link to="#createSharedFolder"/>. Existing shared folders can be
4488 removed using <link to="#removeSharedFolder"/>.
4489 </desc>
4490 </attribute>
4491
4492 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
4493 <desc>
4494 Interface that provides information on Remote Display (VRDP) connection.
4495 </desc>
4496 </attribute>
4497
4498 <method name="powerUp">
4499 <desc>
4500 Starts the virtual machine execution using the current machine
4501 state (i.e. its current execution state, current settings and
4502 current hard disks).
4503
4504 If the machine is powered off or aborted, the execution will
4505 start from the beginning (as if the real hardware were just
4506 powered on).
4507
4508 If the machine is in the <link to="MachineState::Saved"/> state,
4509 it will continue its execution the point where the state has
4510 been saved.
4511
4512 <note>
4513 Unless you are trying to write a new VirtualBox front-end that
4514 performs direct machine execution (like the VirtualBox or VBoxSDL
4515 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
4516 session opened by <link to="IVirtualBox::openSession"/> and use this
4517 session only to change virtual machine settings. If you simply want to
4518 start virtual machine execution using one of the existing front-ends
4519 (for example the VirtualBox GUI or headless server), simply use
4520 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
4521 power up the machine automatically for you.
4522 </note>
4523
4524 <see>#saveState</see>
4525 </desc>
4526 <param name="progress" type="IProgress" dir="return">
4527 <desc>Progress object to track the operation completion.</desc>
4528 </param>
4529 </method>
4530
4531 <method name="powerUpPaused">
4532 <desc>
4533 Identical to powerUp except that the VM will enter the
4534 <link to="MachineState::Paused"/> state, instead of
4535 <link to="MachineState::Running"/>.
4536
4537 <see>#powerUp</see>
4538 </desc>
4539 <param name="progress" type="IProgress" dir="return">
4540 <desc>Progress object to track the operation completion.</desc>
4541 </param>
4542 </method>
4543
4544 <method name="powerDown">
4545 <desc>
4546 Stops the virtual machine execution.
4547 After this operation completes, the machine will go to the
4548 PoweredOff state.
4549
4550 @deprecated This method will be removed in VirtualBox 2.1 where the
4551 powerDownAsync() method will take its name. Do not use this method in
4552 the code.
4553 </desc>
4554 </method>
4555
4556 <method name="powerDownAsync">
4557 <desc>
4558 Initiates the power down procedure to stop the virtual machine
4559 execution.
4560
4561 The completion of the power down procedure is tracked using the returned
4562 IProgress object. After the operation is complete, the machine will go
4563 to the PoweredOff state.
4564
4565 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
4566 where the original powerDown() method will be removed. You will need to
4567 rename "powerDownAsync" to "powerDown" in your sources to make them
4568 build with version 2.1.
4569 </desc>
4570 <param name="progress" type="IProgress" dir="return">
4571 <desc>Progress object to track the operation completion.</desc>
4572 </param>
4573 </method>
4574
4575 <method name="reset">
4576 <desc>Resets the virtual machine.</desc>
4577 </method>
4578
4579 <method name="pause">
4580 <desc>Pauses the virtual machine execution.</desc>
4581 </method>
4582
4583 <method name="resume">
4584 <desc>Resumes the virtual machine execution.</desc>
4585 </method>
4586
4587 <method name="powerButton">
4588 <desc>Send the ACPI power button event to the guest.</desc>
4589 </method>
4590
4591 <method name="sleepButton">
4592 <desc>Send the ACPI sleep button event to the guest.</desc>
4593 </method>
4594
4595 <method name="getPowerButtonHandled">
4596 <desc>Check if the last power button event was handled by guest.</desc>
4597 <param name="handled" type="boolean" dir="return"/>
4598 </method>
4599
4600 <method name="getGuestEnteredACPIMode">
4601 <desc>Check if the guest entered the ACPI mode G0 (working) or
4602 G1 (sleeping). If this method returns false, the guest will
4603 most likely not respond to external ACPI events.</desc>
4604 <param name="entered" type="boolean" dir="return"/>
4605 </method>
4606
4607 <method name="saveState">
4608 <desc>
4609 Saves the current execution state of a running virtual machine
4610 and stops its execution.
4611
4612 After this operation completes, the machine will go to the
4613 Saved state. Next time it is powered up, this state will
4614 be restored and the machine will continue its execution from
4615 the place where it was saved.
4616
4617 This operation differs from taking a snapshot to the effect
4618 that it doesn't create new differencing hard disks. Also, once
4619 the machine is powered up from the state saved using this method,
4620 the saved state is deleted, so it will be impossible to return
4621 to this state later.
4622
4623 <note>
4624 On success, this method implicitly calls
4625 <link to="IMachine::saveSettings()"/> to save all current machine
4626 settings (including runtime changes to the DVD drive, etc.).
4627 Together with the impossibility to change any VM settings when it is
4628 in the Saved state, this guarantees the adequate hardware
4629 configuration of the machine when it is restored from the saved
4630 state file.
4631 </note>
4632
4633 <note>
4634 The machine must be in the Running or Paused state, otherwise
4635 the operation will fail.
4636 </note>
4637
4638 <see><link to="#takeSnapshot"/></see>
4639 </desc>
4640 <param name="progress" type="IProgress" dir="return">
4641 <desc>Progress object to track the operation completion.</desc>
4642 </param>
4643 </method>
4644
4645 <method name="adoptSavedState">
4646 <desc>
4647 Associates the given saved state file to the virtual machine.
4648
4649 On success, the machine will go to the Saved state. Next time it is
4650 powered up, it will be restored from the adopted saved state and
4651 continue execution from the place where the saved state file was
4652 created.
4653
4654 The specified saved state file path may be full or relative to the
4655 folder the VM normally saves the state to (usually,
4656 <link to="IMachine::snapshotFolder"/>).
4657
4658 <note>
4659 It's a caller's responsibility to make sure the given saved state
4660 file is compatible with the settings of this virtual machine that
4661 represent its virtual hardware (memory size, hard disk configuration
4662 etc.). If there is a mismatch, the behavior of the virtual machine
4663 is undefined.
4664 </note>
4665 </desc>
4666 <param name="savedStateFile" type="wstring" dir="in">
4667 <desc>Path to the saved state file to adopt.</desc>
4668 </param>
4669 </method>
4670
4671 <method name="discardSavedState">
4672 <desc>
4673 Discards (deletes) the saved state of the virtual machine
4674 previously created by <link to="#saveState"/>. Next time the
4675 machine is powered up, a clean boot will occur.
4676 <note>
4677 This operation is equivalent to resetting or powering off
4678 the machine without doing a proper shutdown in the guest OS.
4679 </note>
4680 </desc>
4681 </method>
4682
4683 <method name="getDeviceActivity">
4684 <desc>
4685 Gets the current activity type of a given device or device group.
4686 </desc>
4687 <param name="type" type="DeviceType" dir="in"/>
4688 <param name="activity" type="DeviceActivity" dir="return"/>
4689 </method>
4690
4691 <method name="attachUSBDevice">
4692 <desc>
4693 Attaches a host USB device with the given UUID to the
4694 USB controller of the virtual machine.
4695
4696 The device needs to be in one of the following states:
4697 <link to="USBDeviceState::Busy">Busy</link>,
4698 <link to="USBDeviceState::Available">Available</link> or
4699 <link to="USBDeviceState::Held">Held</link>,
4700 otherwise an error is immediately returned.
4701
4702 When the device state is
4703 <link to="USBDeviceState::Busy">Busy</link>, an error may also
4704 be returned if the host computer refuses to release it for some reason.
4705
4706 <see>IUSBController::deviceFilters, USBDeviceState</see>
4707 </desc>
4708 <param name="id" type="uuid" dir="in">
4709 <desc>UUID of the host USB device to attach.</desc>
4710 </param>
4711 </method>
4712
4713 <method name="detachUSBDevice">
4714 <desc>
4715 Detaches an USB device with the given UUID from the USB controller
4716 of the virtual machine.
4717
4718 After this method succeeds, the VirtualBox server re-initiates
4719 all USB filters as if the device were just physically attached
4720 to the host, but filters of this machine are ignored to avoid
4721 a possible automatic re-attachment.
4722
4723 <see>IUSBController::deviceFilters, USBDeviceState</see>
4724 </desc>
4725 <param name="id" type="uuid" dir="in">
4726 <desc>UUID of the USB device to detach.</desc>
4727 </param>
4728 <param name="device" type="IUSBDevice" dir="return">
4729 <desc>Detached USB device.</desc>
4730 </param>
4731 </method>
4732
4733 <method name="createSharedFolder">
4734 <desc>
4735 Creates a transient new shared folder by associating the given logical
4736 name with the given host path, adds it to the collection of shared
4737 folders and starts sharing it. Refer to the description of
4738 <link to="ISharedFolder"/> to read more about logical names.
4739 </desc>
4740 <param name="name" type="wstring" dir="in">
4741 <desc>Unique logical name of the shared folder.</desc>
4742 </param>
4743 <param name="hostPath" type="wstring" dir="in">
4744 <desc>Full path to the shared folder in the host file system.</desc>
4745 </param>
4746 <param name="writable" type="boolean" dir="in">
4747 <desc>Whether the share is writable or readonly</desc>
4748 </param>
4749 </method>
4750
4751 <method name="removeSharedFolder">
4752 <desc>
4753 Removes a transient shared folder with the given name previously
4754 created by <link to="#createSharedFolder"/> from the collection of
4755 shared folders and stops sharing it.
4756 </desc>
4757 <param name="name" type="wstring" dir="in">
4758 <desc>Logical name of the shared folder to remove.</desc>
4759 </param>
4760 </method>
4761
4762 <method name="takeSnapshot">
4763 <desc>
4764 Saves the current execution state and all settings of the
4765 machine and creates differencing images for all
4766 normal (non-independent) hard disks.
4767
4768 This method can be called for a PoweredOff, Saved, Running or
4769 Paused virtual machine. When the machine is PoweredOff, an
4770 offline <link to="ISnapshot">snapshot</link> is created,
4771 in all other cases -- an online snapshot.
4772
4773 The taken snapshot is always based on the
4774 <link to="IMachine::currentSnapshot">current
4775 snapshot</link> of the associated virtual machine and becomes
4776 a new current snapshot.
4777
4778 <note>
4779 This method implicitly calls <link to="IMachine::saveSettings()"/> to
4780 save all current machine settings before taking an offline snapshot.
4781 </note>
4782
4783 <see>ISnapshot, <link to="#saveState"/></see>
4784 </desc>
4785 <param name="name" type="wstring" dir="in">
4786 <desc>Short name for the snapshot.</desc>
4787 </param>
4788 <param name="description" type="wstring" dir="in">
4789 <desc>Optional description of the snapshot.</desc>
4790 </param>
4791 <param name="progress" type="IProgress" dir="return">
4792 <desc>Progress object to track the operation completion.</desc>
4793 </param>
4794 </method>
4795
4796 <method name="discardSnapshot">
4797 <desc>
4798
4799 Starts discarding the specified snapshot. The execution state
4800 and settings of the associated machine stored in the snapshot
4801 will be deleted. The contents of all differencing hard disks of
4802 this snapshot will be merged with the contents of their
4803 dependent child hard disks to keep the, disks valid (in other
4804 words, all changes represented by hard disks being discarded
4805 will be propagated to their child hard disks). After that, this
4806 snapshot's differencing hard disks will be deleted. The parent
4807 of this snapshot will become a new parent for all its child
4808 snapshots.
4809
4810 If the discarded snapshot is the current one, its parent
4811 snapshot will become a new current snapshot. The current machine
4812 state is not directly affected in this case, except that
4813 currently attached differencing hard disks based on hard disks
4814 of the discarded snapshot will be also merged as described
4815 above.
4816
4817 If the discarded snapshot is the first one (the root snapshot)
4818 and it has exactly one child snapshot, this child snapshot will
4819 become the first snapshot after discarding. If there are no
4820 children at all (i.e. the first snapshot is the only snapshot of
4821 the machine), both the current and the first snapshot of the
4822 machine will be set to null. In all other cases, the first
4823 snapshot cannot be discarded.
4824
4825 You cannot discard the snapshot if it
4826 stores <link to="HardDiskType::Normal">normal</link> (non-differencing)
4827 hard disks that have differencing hard disks based on them. Snapshots of
4828 such kind can be discarded only when every normal hard disk has either
4829 no children at all or exactly one child. In the former case, the normal
4830 hard disk simply becomes unused (i.e. not attached to any VM). In the
4831 latter case, it receives all the changes stored in the child hard disk,
4832 and then it replaces the child hard disk in the configuration of the
4833 corresponding snapshot or machine.
4834
4835 Also, you cannot discard the snapshot if it stores hard disks
4836 (of any type) having differencing child hard disks that belong
4837 to other machines. Such snapshots can be only discarded after
4838 you discard all snapshots of other machines containing "foreign"
4839 child disks, or detach these "foreign" child disks from machines
4840 they are attached to.
4841
4842 One particular example of the snapshot storing normal hard disks
4843 is the first snapshot of a virtual machine that had normal hard
4844 disks attached when taking the snapshot. Be careful when
4845 discarding such snapshots because this implicitly commits
4846 changes (made since the snapshot being discarded has been taken)
4847 to normal hard disks (as described above), which may be not what
4848 you want.
4849
4850 The virtual machine is put to
4851 the <link to="MachineState::Discarding">Discarding</link> state until
4852 the discard operation is completed.
4853
4854 <note>
4855 The machine must not be running, otherwise the operation
4856 will fail.
4857 </note>
4858
4859 <note>
4860 Child hard disks of all normal hard disks of the discarded snapshot
4861 must be accessible (see <link to="IMedium::state"/>) for this
4862 operation to succeed. In particular, this means that all virtual
4863 machines, whose hard disks are directly or indirectly based on the
4864 hard disks of discarded snapshot, must be powered off.
4865 </note>
4866 <note>
4867 Merging hard disk contents can be very time and disk space
4868 consuming, if these disks are big in size and have many
4869 children. However, if the snapshot being discarded is the last
4870 (head) snapshot on the branch, the operation will be rather
4871 quick.
4872 </note>
4873 <note>
4874 Note that discarding the current snapshot
4875 will implicitly call <link to="IMachine::saveSettings()"/> to
4876 make all current machine settings permanent.
4877 </note>
4878 </desc>
4879 <param name="id" type="uuid" dir="in">
4880 <desc>UUID of the snapshot to discard.</desc>
4881 </param>
4882 <param name="progress" type="IProgress" dir="return">
4883 <desc>Progress object to track the operation completion.</desc>
4884 </param>
4885 </method>
4886
4887 <method name="discardCurrentState">
4888 <desc>
4889 This operation is similar to <link to="#discardSnapshot()"/> but
4890 affects the current machine state. This means that the state stored in
4891 the current snapshot will become a new current state, and all current
4892 settings of the machine and changes stored in differencing hard disks
4893 will be lost.
4894
4895 After this operation is successfully completed, new empty differencing
4896 hard disks are created for all normal hard disks of the machine.
4897
4898 If the current snapshot of the machine is an online snapshot, the
4899 machine will go to the <link to="MachineState::Saved"> saved
4900 state</link>, so that the next time it is powered on, the execution
4901 state will be restored from the current snapshot.
4902
4903 <note>
4904 The machine must not be running, otherwise the operation will fail.
4905 </note>
4906
4907 <note>
4908 If the machine state is <link to="MachineState::Saved">Saved</link>
4909 prior to this operation, the saved state file will be implicitly
4910 discarded (as if <link to="IConsole::discardSavedState()"/> were
4911 called).
4912 </note>
4913
4914 </desc>
4915 <param name="progress" type="IProgress" dir="return">
4916 <desc>Progress object to track the operation completion.</desc>
4917 </param>
4918 </method>
4919
4920 <method name="discardCurrentSnapshotAndState">
4921 <desc>
4922
4923 This method is equivalent to
4924 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
4925 (currentSnapshot.id(), progress) followed by
4926 <link to="#discardCurrentState()"/>.
4927
4928 As a result, the machine will be fully restored from the
4929 snapshot preceding the current snapshot, while both the current
4930 snapshot and the current machine state will be discarded.
4931
4932 If the current snapshot is the first snapshot of the machine (i.e. it
4933 has the only snapshot), the current machine state will be
4934 discarded <b>before</b> discarding the snapshot. In other words, the
4935 machine will be restored from its last snapshot, before discarding
4936 it. This differs from performing a single
4937 <link to="#discardSnapshot()"/> call (note that no
4938 <link to="#discardCurrentState()"/> will be possible after it)
4939 to the effect that the latter will preserve the current state instead of
4940 discarding it.
4941
4942 Unless explicitly mentioned otherwise, all remarks and
4943 limitations of the above two methods also apply to this method.
4944
4945 <note>
4946 The machine must not be running, otherwise the operation
4947 will fail.
4948 </note>
4949
4950 <note>
4951 If the machine state is <link to="MachineState::Saved">Saved</link>
4952 prior to this operation, the saved state file will be implicitly
4953 discarded (as if <link to="#discardSavedState()"/> were
4954 called).
4955 </note>
4956
4957 <note>
4958 This method is more efficient than calling two above
4959 methods separately: it requires less IPC calls and provides
4960 a single progress object.
4961 </note>
4962
4963 </desc>
4964 <param name="progress" type="IProgress" dir="return">
4965 <desc>Progress object to track the operation completion.</desc>
4966 </param>
4967 </method>
4968
4969 <method name="registerCallback">
4970 <desc>
4971 Registers a new console callback on this instance. The methods of the
4972 callback interface will be called by this instance when the appropriate
4973 event occurs.
4974 </desc>
4975 <param name="callback" type="IConsoleCallback" dir="in"/>
4976 </method>
4977
4978 <method name="unregisterCallback">
4979 <desc>
4980 Unregisters the console callback previously registered using
4981 <link to="#registerCallback"/>.
4982 </desc>
4983 <param name="callback" type="IConsoleCallback" dir="in"/>
4984 </method>
4985 </interface>
4986
4987 <!--
4988 // IHost
4989 /////////////////////////////////////////////////////////////////////////
4990 -->
4991
4992 <interface
4993 name="IHostDVDDrive" extends="$unknown"
4994 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
4995 wsmap="managed"
4996 >
4997 <desc>
4998 The IHostDVDDrive interface represents the physical CD/DVD drive
4999 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
5000 </desc>
5001
5002 <attribute name="name" type="wstring" readonly="yes">
5003 <desc>
5004 Returns the platform-specific device identifier.
5005 On DOS-like platforms, it is a drive name (e.g. R:).
5006 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
5007 </desc>
5008 </attribute>
5009 <attribute name="description" type="wstring" readonly="yes">
5010 <desc>
5011 Returns a human readable description for the drive. This
5012 description usually contains the product and vendor name. A
5013 @c null string is returned if the description is not available.
5014 </desc>
5015 </attribute>
5016 <attribute name="udi" type="wstring" readonly="yes">
5017 <desc>
5018 Returns the unique device identifier for the drive. This
5019 attribute is reserved for future use instead of
5020 <link to="#name"/>. Currently it is not used and may return
5021 @c null on some platforms.
5022 </desc>
5023 </attribute>
5024
5025 </interface>
5026
5027 <enumerator
5028 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
5029 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
5030 />
5031
5032 <collection
5033 name="IHostDVDDriveCollection" type="IHostDVDDrive"
5034 enumerator="IHostDVDDriveEnumerator"
5035 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
5036 readonly="yes"
5037 >
5038 <method name="findByName">
5039 <desc>
5040 Searches this collection for a host drive with the given name.
5041 <note>
5042 The method returns an error if the given name does not
5043 correspond to any host drive in the collection.
5044 </note>
5045 </desc>
5046 <param name="name" type="wstring" dir="in">
5047 <desc>Name of the host drive to search for</desc>
5048 </param>
5049 <param name="drive" type="IHostDVDDrive" dir="return">
5050 <desc>Found host drive object</desc>
5051 </param>
5052 </method>
5053 </collection>
5054
5055 <interface
5056 name="IHostFloppyDrive" extends="$unknown"
5057 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
5058 wsmap="managed"
5059 >
5060 <desc>
5061 The IHostFloppyDrive interface represents the physical floppy drive
5062 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
5063 </desc>
5064 <attribute name="name" type="wstring" readonly="yes">
5065 <desc>
5066 Returns the platform-specific device identifier.
5067 On DOS-like platforms, it is a drive name (e.g. A:).
5068 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
5069 </desc>
5070 </attribute>
5071 <attribute name="description" type="wstring" readonly="yes">
5072 <desc>
5073 Returns a human readable description for the drive. This
5074 description usually contains the product and vendor name. A
5075 @c null string is returned if the description is not available.
5076 </desc>
5077 </attribute>
5078 <attribute name="udi" type="wstring" readonly="yes">
5079 <desc>
5080 Returns the unique device identifier for the drive. This
5081 attribute is reserved for future use instead of
5082 <link to="#name"/>. Currently it is not used and may return
5083 @c null on some platforms.
5084 </desc>
5085 </attribute>
5086 </interface>
5087
5088 <enumerator
5089 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
5090 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
5091 />
5092
5093 <collection
5094 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
5095 enumerator="IHostFloppyDriveEnumerator"
5096 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
5097 readonly="yes"
5098 >
5099 <method name="findByName">
5100 <desc>
5101 Searches this collection for a host drive with the given name.
5102 <note>
5103 The method returns an error if the given name does not
5104 correspond to any host drive in the collection.
5105 </note>
5106 </desc>
5107 <param name="name" type="wstring" dir="in">
5108 <desc>Name of the host drive to search for</desc>
5109 </param>
5110 <param name="drive" type="IHostFloppyDrive" dir="return">
5111 <desc>Found host drive object</desc>
5112 </param>
5113 </method>
5114 </collection>
5115
5116 <interface
5117 name="IHostNetworkInterface" extends="$unknown"
5118 uuid="F4512D7C-B074-4e97-99B8-6D2BD27C3F5A"
5119 wsmap="managed"
5120 >
5121 <attribute name="name" type="wstring" readonly="yes">
5122 <desc>Returns the host network interface name.</desc>
5123 </attribute>
5124
5125 <attribute name="id" type="uuid" readonly="yes">
5126 <desc>Returns the interface UUID.</desc>
5127 </attribute>
5128 </interface>
5129
5130 <enumerator
5131 name="IHostNetworkInterfaceEnumerator" type="IHostNetworkInterface"
5132 uuid="7B52FEF7-56E8-4aec-92F5-15E6D11EC630"
5133 />
5134
5135 <collection
5136 name="IHostNetworkInterfaceCollection" type="IHostNetworkInterface"
5137 enumerator="IHostNetworkInterfaceEnumerator"
5138 uuid="BF1D41F2-B97B-4314-A0FB-D4823AF42FB5"
5139 readonly="yes"
5140 >
5141 <method name="findByName">
5142 <desc>
5143 Searches this collection for a host network interface with the given name.
5144 <note>
5145 The method returns an error if the given name does not
5146 correspond to any host network interface in the collection.
5147 </note>
5148 </desc>
5149 <param name="name" type="wstring" dir="in">
5150 <desc>Name of the host network interface to search for.</desc>
5151 </param>
5152 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5153 <desc>Found host network interface object.</desc>
5154 </param>
5155 </method>
5156 <method name="findById">
5157 <desc>
5158 Searches this collection for a host network interface with the given GUID.
5159 <note>
5160 The method returns an error if the given GUID does not
5161 correspond to any host network interface in the collection.
5162 </note>
5163 </desc>
5164 <param name="id" type="uuid" dir="in">
5165 <desc>GUID of the host network interface to search for.</desc>
5166 </param>
5167 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5168 <desc>Found host network interface object.</desc>
5169 </param>
5170 </method>
5171 </collection>
5172
5173 <interface
5174 name="IHost" extends="$unknown"
5175 uuid="4be2e85f-a54c-4bc7-8bf6-f070f9113940"
5176 wsmap="managed"
5177 >
5178 <desc>
5179 The IHost interface represents the physical machine that this VirtualBox
5180 installation runs on.
5181
5182 An object implementing this interface is returned by the
5183 <link to="IVirtualBox::host" /> attribute. This interface contains
5184 read-only information about the host's physical hardware (such as what
5185 processors, and disks are available, what the host operating system is,
5186 and so on) and also allows for manipulating some of the host's hardware,
5187 such as global USB device filters and host interface networking.
5188
5189 </desc>
5190 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
5191 <desc>List of DVD drives available on the host.</desc>
5192 </attribute>
5193
5194 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
5195 <desc>List of floppy drives available on the host.</desc>
5196 </attribute>
5197
5198 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5199 <desc>
5200 List of USB devices currently attached to the host.
5201 Once a new device is physically attached to the host computer,
5202 it appears in this list and remains there until detached.
5203
5204 <note>
5205 This method may set a @ref com_warnings "warning result code".
5206 </note>
5207 <note>
5208 If USB functionality is not available in the given edition of
5209 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5210 </note>
5211 </desc>
5212 </attribute>
5213
5214 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
5215 <desc>
5216 List of USB device filters in action.
5217 When a new device is physically attached to the host computer,
5218 filters from this list are applied to it (in order they are stored
5219 in the list). The first matched filter will determine the
5220 <link to="IHostUSBDeviceFilter::action">action</link>
5221 performed on the device.
5222
5223 Unless the device is ignored by these filters, filters of all
5224 currently running virtual machines
5225 (<link to="IUSBController::deviceFilters"/>) are applied to it.
5226
5227 <note>
5228 This method may set a @ref com_warnings "warning result code".
5229 </note>
5230 <note>
5231 If USB functionality is not available in the given edition of
5232 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5233 </note>
5234
5235 <see>IHostUSBDeviceFilter, USBDeviceState</see>
5236 </desc>
5237 </attribute>
5238
5239 <attribute name="networkInterfaces" type="IHostNetworkInterfaceCollection" readonly="yes">
5240 <desc>List of host network interfaces currently defined on the host.</desc>
5241 </attribute>
5242
5243 <attribute name="processorCount" type="unsigned long" readonly="yes">
5244 <desc>Number of (logical) CPUs installed in the host system.</desc>
5245 </attribute>
5246
5247 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
5248 <desc>Number of (logical) CPUs online in the host system.</desc>
5249 </attribute>
5250
5251 <method name="getProcessorSpeed">
5252 <desc>Query the (approximate) maximum speed of a specified host CPU in Megahertz.</desc>
5253 <param name="cpuId" type="unsigned long" dir="in">
5254 <desc>
5255 Identifier of the CPU.
5256 </desc>
5257 </param>
5258 <param name="speed" type="unsigned long" dir="return">
5259 <desc>
5260 Speed value. 0 is returned if value is not known or @a cpuId is
5261 invalid.
5262 </desc>
5263 </param>
5264 </method>
5265
5266 <method name="getProcessorFeature">
5267 <desc>Query whether a CPU feature is supported or not.</desc>
5268 <param name="feature" type="ProcessorFeature" dir="in">
5269 <desc>
5270 CPU Feature identifier.
5271 </desc>
5272 </param>
5273 <param name="supported" type="boolean" dir="return">
5274 <desc>
5275 Feature is supported or not.
5276 </desc>
5277 </param>
5278 </method>
5279
5280 <method name="getProcessorDescription">
5281 <desc>Query the model string of a specified host CPU.</desc>
5282 <param name="cpuId" type="unsigned long" dir="in">
5283 <desc>
5284 Identifier of the CPU.
5285 </desc>
5286 </param>
5287 <param name="description" type="wstring" dir="return">
5288 <desc>
5289 Model string. A NULL string is returned if value is not known or
5290 @a cpuId is invalid.
5291 </desc>
5292 </param>
5293 </method>
5294
5295 <attribute name="memorySize" type="unsigned long" readonly="yes">
5296 <desc>Amount of system memory in megabytes installed in the host system.</desc>
5297 </attribute>
5298
5299 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
5300 <desc>Available system memory in the host system.</desc>
5301 </attribute>
5302
5303 <attribute name="operatingSystem" type="wstring" readonly="yes">
5304 <desc>Name of the host system's operating system.</desc>
5305 </attribute>
5306
5307 <attribute name="OSVersion" type="wstring" readonly="yes">
5308 <desc>Host operating system's version string.</desc>
5309 </attribute>
5310
5311 <attribute name="UTCTime" type="long long" readonly="yes">
5312 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
5313 </attribute>
5314
5315<if target="midl">
5316 <method name="createHostNetworkInterface">
5317 <desc>
5318 Creates a new adapter for Host Interface Networking.
5319 </desc>
5320 <param name="name" type="wstring" dir="in">
5321 <desc>
5322 Adapter name.
5323 </desc>
5324 </param>
5325 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5326 <desc>
5327 Created host interface object.
5328 </desc>
5329 </param>
5330 <param name="progress" type="IProgress" dir="return">
5331 <desc>
5332 Progress object to track the operation completion.
5333 </desc>
5334 </param>
5335 </method>
5336 <method name="removeHostNetworkInterface">
5337 <desc>
5338 Removes the given host network interface.
5339 </desc>
5340 <param name="id" type="uuid" dir="in">
5341 <desc>
5342 Adapter GUID.
5343 </desc>
5344 </param>
5345 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5346 <desc>
5347 Removed host interface object.
5348 </desc>
5349 </param>
5350 <param name="progress" type="IProgress" dir="return">
5351 <desc>
5352 Progress object to track the operation completion.
5353 </desc>
5354 </param>
5355 </method>
5356</if>
5357
5358 <method name="createUSBDeviceFilter">
5359 <desc>
5360 Creates a new USB device filter. All attributes except
5361 the filter name are set to <tt>null</tt> (any match),
5362 <i>active</i> is <tt>false</tt> (the filter is not active).
5363
5364 The created filter can be added to the list of filters using
5365 <link to="#insertUSBDeviceFilter()"/>.
5366
5367 <see>#USBDeviceFilters</see>
5368 </desc>
5369 <param name="name" type="wstring" dir="in">
5370 <desc>
5371 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
5372 for more info.
5373 </desc>
5374 </param>
5375 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5376 <desc>Created filter object.</desc>
5377 </param>
5378 </method>
5379
5380 <method name="insertUSBDeviceFilter">
5381 <desc>
5382 Inserts the given USB device to the specified position
5383 in the list of filters.
5384
5385 Positions are numbered starting from <tt>0</tt>. If the specified
5386 position is equal to or greater than the number of elements in
5387 the list, the filter is added to the end of the collection.
5388
5389 <note>
5390 Duplicates are not allowed, so an attempt to insert a
5391 filter that is already in the list, will return an
5392 error.
5393 </note>
5394 <note>
5395 This method may set a @ref com_warnings "warning result code".
5396 </note>
5397 <note>
5398 If USB functionality is not available in the given edition of
5399 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5400 </note>
5401
5402 <see>#USBDeviceFilters</see>
5403 </desc>
5404 <param name="position" type="unsigned long" dir="in">
5405 <desc>Position to insert the filter to.</desc>
5406 </param>
5407 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
5408 <desc>USB device filter to insert.</desc>
5409 </param>
5410 </method>
5411
5412 <method name="removeUSBDeviceFilter">
5413 <desc>
5414 Removes a USB device filter from the specified position in the
5415 list of filters.
5416
5417 Positions are numbered starting from <tt>0</tt>. Specifying a
5418 position equal to or greater than the number of elements in
5419 the list will produce an error.
5420
5421 <note>
5422 This method may set a @ref com_warnings "warning result code".
5423 </note>
5424 <note>
5425 If USB functionality is not available in the given edition of
5426 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5427 </note>
5428
5429 <see>#USBDeviceFilters</see>
5430 </desc>
5431 <param name="position" type="unsigned long" dir="in">
5432 <desc>Position to remove the filter from.</desc>
5433 </param>
5434 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5435 <desc>Removed USB device filter.</desc>
5436 </param>
5437 </method>
5438
5439 </interface>
5440
5441 <!--
5442 // ISystemProperties
5443 /////////////////////////////////////////////////////////////////////////
5444 -->
5445
5446 <interface
5447 name="ISystemProperties"
5448 extends="$unknown"
5449 uuid="604afeba-5963-4d12-a577-902ffb96352a"
5450 wsmap="managed"
5451 >
5452 <desc>
5453 The ISystemProperties interface represents global properties of the given
5454 VirtualBox installation.
5455
5456 These properties define limits and default values for various attributes
5457 and parameters. Most of the properties are read-only, but some can be
5458 changed by a user.
5459 </desc>
5460
5461 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
5462 <desc>Minimum guest system memory in Megabytes.</desc>
5463 </attribute>
5464
5465 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
5466 <desc>Maximum guest system memory in Megabytes.</desc>
5467 </attribute>
5468
5469 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
5470 <desc>Minimum guest video memory in Megabytes.</desc>
5471 </attribute>
5472
5473 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
5474 <desc>Maximum guest video memory in Megabytes.</desc>
5475 </attribute>
5476
5477 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
5478 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
5479 </attribute>
5480
5481 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
5482 <desc>
5483 Number of network adapters associated with every
5484 <link to="IMachine"/> instance.
5485 </desc>
5486 </attribute>
5487
5488 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
5489 <desc>
5490 Number of serial ports associated with every
5491 <link to="IMachine"/> instance.
5492 </desc>
5493 </attribute>
5494
5495 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
5496 <desc>
5497 Number of parallel ports associated with every
5498 <link to="IMachine"/> instance.
5499 </desc>
5500 </attribute>
5501
5502 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
5503 <desc>
5504 Maximum device position in the boot order. This value corresponds
5505 to the total number of devices a machine can boot from, to make it
5506 possible to include all possible devices to the boot list.
5507 <see><link to="IMachine::setBootOrder()"/></see>
5508 </desc>
5509 </attribute>
5510
5511 <attribute name="defaultMachineFolder" type="wstring">
5512 <desc>
5513 Full path to the default directory used to create new or open
5514 existing machines when a settings file name contains no
5515 path.
5516
5517 The initial value of this property is
5518 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
5519 VirtualBox_home</link><tt>&gt;/Machines</tt>.
5520
5521 <note>
5522 Setting this property to <tt>null</tt> will restore the
5523 initial value.
5524 </note>
5525 <note>
5526 When settings this property, the specified path can be
5527 absolute (full path) or relative
5528 to the <link to="IVirtualBox::homeFolder">
5529 VirtualBox home directory</link>.
5530 When reading this property, a full path is
5531 always returned.
5532 </note>
5533 <note>
5534 The specified path may not exist, it will be created
5535 when necessary.
5536 </note>
5537
5538 <see>
5539 <link to="IVirtualBox::createMachine()"/>,
5540 <link to="IVirtualBox::openMachine()"/>
5541 </see>
5542 </desc>
5543 </attribute>
5544
5545 <attribute name="defaultHardDiskFolder" type="wstring">
5546 <desc>
5547 Full path to the default directory used to create new or open existing
5548 virtual disks.
5549
5550 This path is used when the storage unit of a hard disk is a regular file
5551 in the host's file system and only a file name that contains no path is
5552 given.
5553
5554 The initial value of this property is
5555 <tt>&lt;</tt>
5556 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
5557 <tt>&gt;/HardDisks</tt>.
5558
5559 <note>
5560 Setting this property to <tt>null</tt> will restore the
5561 initial value.
5562 </note>
5563 <note>
5564 When settings this property, the specified path can be relative
5565 to the
5566 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
5567 absolute. When reading this property, a full path is
5568 always returned.
5569 </note>
5570 <note>
5571 The specified path may not exist, it will be created
5572 when necessary.
5573 </note>
5574
5575 <see>
5576 IHardDisk2,
5577 <link to="IVirtualBox::createHardDisk2()"/>,
5578 <link to="IVirtualBox::openHardDisk2()"/>,
5579 <link to="IMedium::location"/>
5580 </see>
5581 </desc>
5582 </attribute>
5583
5584 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
5585 <desc>
5586 List of all hard disk storage formats supported by this VirtualBox
5587 installation.
5588
5589 Note that the virtual hard disk framework is backend-based, therefore
5590 the list of supported formats depends on what backends are currently
5591 installed.
5592
5593 <see>
5594 <link to="IHardDiskFormat"/>,
5595 </see>
5596 </desc>
5597 </attribute>
5598
5599 <attribute name="defaultHardDiskFormat" type="wstring">
5600 <desc>
5601 Identifier of the default hard disk format used by VirtualBox.
5602
5603 The hard disk format set by this attribute is used by VirtualBox
5604 when the hard disk format was not specified explicitly. One example is
5605 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
5606 format argument. A more complex example is implicit creation of
5607 differencing hard disks when taking a snapshot of a virtual machine:
5608 this operation will try to use a format of the parent hard disk first
5609 and if this format does not support differencing hard disks the default
5610 format specified by this argument will be used.
5611
5612 The list of supported hard disk formats may be obtained by the
5613 <link to="#defaultHardDiskFormats"/> call. Note that the default
5614 hard disk format must have a capability to create differencing hard
5615 disks; otherwise opeartions that create hard disks implicitly may fail
5616 unexpectedly.
5617
5618 The initial value of this property is <tt>VDI</tt> in the current
5619 version of the VirtualBox product, but may change in the future.
5620
5621 <note>
5622 Setting this property to <tt>null</tt> will restore the
5623 initial value.
5624 </note>
5625
5626 <see>
5627 <link to="#hardDiskFormats"/>,
5628 <link to="IHardDiskFormat:id"/>,
5629 <link to="IVirtualBox::createHardDisk2()"/>
5630 </see>
5631 </desc>
5632 </attribute>
5633
5634 <attribute name="remoteDisplayAuthLibrary" type="wstring">
5635 <desc>
5636 Library that provides authentication for VRDP clients. The library
5637 is used if a virtual machine's authentication type is set to "external"
5638 in the VM RemoteDisplay configuration.
5639
5640 The system library extension (".DLL" or ".so") must be omitted.
5641 A full path can be specified; if not, then the library must reside on the
5642 system's default library path.
5643
5644 The default value of this property is <tt>VRDPAuth</tt>. There is a library
5645 of that name in one of the default VirtualBox library directories.
5646
5647 For details about VirtualBox authentication libraries and how to implement
5648 them, please refer to the VirtualBox manual.
5649
5650 <note>
5651 Setting this property to <tt>null</tt> will restore the
5652 initial value.
5653 </note>
5654 </desc>
5655 </attribute>
5656
5657 <attribute name="webServiceAuthLibrary" type="wstring">
5658 <desc>
5659 Library that provides authentication for webservice clients. The library
5660 is used if a virtual machine's authentication type is set to "external"
5661 in the VM RemoteDisplay configuration and will be called from
5662 within the <link to="IWebsessionManager::logon" /> implementation.
5663
5664 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
5665 there is no per-VM setting for this, as the webservice is a global
5666 resource (if it is running). Only for this setting (for the webservice),
5667 setting this value to a literal "null" string disables authentication,
5668 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
5669 no matter what user name and password are supplied.
5670
5671 The initial value of this property is <tt>VRDPAuth</tt>,
5672 meaning that the webservice will use the same authentication
5673 library that is used by default for VBoxVRDP (again, see
5674 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
5675 The format and calling convention of authentication libraries
5676 is the same for the webservice as it is for VBoxVRDP.
5677
5678 </desc>
5679 </attribute>
5680
5681 <attribute name="HWVirtExEnabled" type="boolean">
5682 <desc>
5683 This specifies the default value for hardware virtualization
5684 extensions. If enabled, virtual machines will make use of
5685 hardware virtualization extensions such as Intel VT-x and
5686 AMD-V by default. This value can be overridden by each VM
5687 using their <link to="IMachine::HWVirtExEnabled" /> property.
5688 </desc>
5689 </attribute>
5690
5691 <attribute name="LogHistoryCount" type="unsigned long">
5692 <desc>
5693 This value specifies how many old release log files are kept.
5694 </desc>
5695 </attribute>
5696 </interface>
5697
5698 <!--
5699 // IGuest
5700 /////////////////////////////////////////////////////////////////////////
5701 -->
5702
5703 <interface
5704 name="IGuestOSType" extends="$unknown"
5705 uuid="da94f478-1f37-4726-b750-2235950dc2fe"
5706 wsmap="struct"
5707 >
5708 <desc>
5709 </desc>
5710
5711 <attribute name="familyId" type="wstring" readonly="yes">
5712 <desc>Guest OS family identifier string.</desc>
5713 </attribute>
5714
5715 <attribute name="familyDescription" type="wstring" readonly="yes">
5716 <desc>Human readable description of the guest OS family.</desc>
5717 </attribute>
5718
5719 <attribute name="id" type="wstring" readonly="yes">
5720 <desc>Guest OS identifier string.</desc>
5721 </attribute>
5722
5723 <attribute name="description" type="wstring" readonly="yes">
5724 <desc>Human readable description of the guest OS.</desc>
5725 </attribute>
5726
5727 <attribute name="is64Bit" type="boolean" readonly="yes">
5728 <desc>Returns @c true if the given OS is 64-bit</desc>
5729 </attribute>
5730
5731 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
5732 <desc>Recommended RAM size in Megabytes.</desc>
5733 </attribute>
5734
5735 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
5736 <desc>Recommended video RAM size in Megabytes.</desc>
5737 </attribute>
5738
5739 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
5740 <desc>Recommended hard disk size in Megabytes.</desc>
5741 </attribute>
5742 </interface>
5743
5744
5745 <enumerator
5746 name="IGuestOSTypeEnumerator" type="IGuestOSType"
5747 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
5748 />
5749
5750 <collection
5751 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
5752 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
5753 readonly="yes"
5754 />
5755
5756 <interface
5757 name="IGuest" extends="$unknown"
5758 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
5759
5760 wsmap="suppress"
5761 >
5762 <desc>
5763 The IGuest interface represents information about the operating system
5764 running inside the virtual machine. Used in
5765 <link to="IConsole::guest"/>.
5766
5767 IGuest provides information about the guest operating system, whether
5768 Guest Additions are installed and other OS-specific virtual machine
5769 properties.
5770 </desc>
5771
5772 <attribute name="OSTypeId" type="wstring" readonly="yes">
5773 <desc>
5774 Identifier of the Guest OS type as reported by the Guest
5775 Additions.
5776 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
5777 an IGuestOSType object representing details about the given
5778 Guest OS type.
5779 <note>
5780 If Guest Additions are not installed, this value will be
5781 the same as <link to="IMachine::OSTypeId"/>.
5782 </note>
5783 </desc>
5784 </attribute>
5785
5786 <attribute name="additionsActive" type="boolean" readonly="yes">
5787 <desc>
5788 Flag whether the Guest Additions are installed and active
5789 in which case their version will be returned by the
5790 <link to="#additionsVersion"/> property.
5791 </desc>
5792 </attribute>
5793
5794 <attribute name="additionsVersion" type="wstring" readonly="yes">
5795 <desc>
5796 Version of the Guest Additions (3 decimal numbers separated
5797 by dots) or empty when the Additions are not installed. The
5798 Additions may also report a version but yet not be active as
5799 the version might be refused by VirtualBox (incompatible) or
5800 other failures occurred.
5801 </desc>
5802 </attribute>
5803
5804 <attribute name="supportsSeamless" type="boolean" readonly="yes">
5805 <desc>
5806 Flag whether seamless guest display rendering (seamless desktop
5807 integration) is supported.
5808 </desc>
5809 </attribute>
5810
5811 <attribute name="supportsGraphics" type="boolean" readonly="yes">
5812 <desc>
5813 Flag whether the guest is in graphics mode. If it is not, then
5814 seamless rendering will not work, resize hints are not immediately
5815 acted on and guest display resizes are probably not initiated by
5816 the guest additions.
5817 </desc>
5818 </attribute>
5819
5820 <attribute name="memoryBalloonSize" type="unsigned long">
5821 <desc>Guest system memory balloon size in megabytes.</desc>
5822 </attribute>
5823
5824 <attribute name="statisticsUpdateInterval" type="unsigned long">
5825 <desc>Interval to update guest statistics in seconds.</desc>
5826 </attribute>
5827
5828 <method name="setCredentials">
5829 <desc>
5830 Store login credentials that can be queried by guest operating
5831 systems with Additions installed. The credentials are transient
5832 to the session and the guest may also choose to erase them. Note
5833 that the caller cannot determine whether the guest operating system
5834 has queried or made use of the credentials.
5835 </desc>
5836 <param name="userName" type="wstring" dir="in">
5837 <desc>User name string, can be empty</desc>
5838 </param>
5839 <param name="password" type="wstring" dir="in">
5840 <desc>Password string, can be empty</desc>
5841 </param>
5842 <param name="domain" type="wstring" dir="in">
5843 <desc>Domain name (guest logon scheme specific), can be empty</desc>
5844 </param>
5845 <param name="allowInteractiveLogon" type="boolean" dir="in">
5846 <desc>
5847 Flag whether the guest should alternatively allow the user to
5848 interactively specify different credentials. This flag might
5849 not be supported by all versions of the Additions.
5850 </desc>
5851 </param>
5852 </method>
5853
5854 <method name="getStatistic">
5855 <desc>
5856 Query specified guest statistics as reported by the VirtualBox Additions.
5857 </desc>
5858 <param name="cpuId" type="unsigned long" dir="in">
5859 <desc>Virtual CPU id; not relevant for all statistic types</desc>
5860 </param>
5861 <param name="statistic" type="GuestStatisticType" dir="in">
5862 <desc>Statistic type.</desc>
5863 </param>
5864 <param name="statVal" type="unsigned long" dir="out">
5865 <desc>Statistics value</desc>
5866 </param>
5867 </method>
5868
5869 </interface>
5870
5871
5872 <!--
5873 // IProgress
5874 /////////////////////////////////////////////////////////////////////////
5875 -->
5876
5877 <enumerator
5878 name="IProgressEnumerator" type="IProgress"
5879 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
5880 />
5881
5882 <collection
5883 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
5884 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
5885 readonly="yes"
5886 />
5887
5888 <interface
5889 name="IProgress" extends="$unknown"
5890 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
5891 wsmap="managed"
5892 >
5893 <desc>
5894 The IProgress interface represents a task progress object that allows
5895 to wait for the completion of some asynchronous task.
5896
5897 The task consists of one or more operations that run sequentially,
5898 one after one. There is an individual percent of completion of the
5899 current operation and the percent of completion of the task as a
5900 whole. Similarly, you can wait for the completion of a particular
5901 operation or for the completion of the whole task.
5902
5903 Every operation is identified by a number (starting from 0)
5904 and has a separate description.
5905 </desc>
5906
5907 <attribute name="id" type="uuid" readonly="yes">
5908 <desc>ID of the task.</desc>
5909 </attribute>
5910
5911 <attribute name="description" type="wstring" readonly="yes">
5912 <desc>Description of the task.</desc>
5913 </attribute>
5914
5915 <attribute name="initiator" type="$unknown" readonly="yes">
5916 <desc>Initiator of the task.</desc>
5917 </attribute>
5918
5919 <attribute name="cancelable" type="boolean" readonly="yes">
5920 <desc>Whether the task can be interrupted.</desc>
5921 </attribute>
5922
5923 <attribute name="percent" type="long" readonly="yes">
5924 <desc>
5925 Current task progress value in percent.
5926 This value depends on how many operations are already complete.
5927 </desc>
5928 </attribute>
5929
5930 <attribute name="completed" type="boolean" readonly="yes">
5931 <desc>Whether the task has been completed.</desc>
5932 </attribute>
5933
5934 <attribute name="canceled" type="boolean" readonly="yes">
5935 <desc>Whether the task has been canceled.</desc>
5936 </attribute>
5937
5938 <attribute name="resultCode" type="result" readonly="yes">
5939 <desc>
5940 Result code of the progress task.
5941 Valid only if <link to="#completed"/> is true.
5942 </desc>
5943 </attribute>
5944
5945 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
5946 <desc>
5947 Extended information about the unsuccessful result of the
5948 progress operation. May be NULL when no extended information
5949 is available.
5950 Valid only if <link to="#completed"/> is true and
5951 <link to="#resultCode"/> indicates a failure.
5952 </desc>
5953 </attribute>
5954
5955 <attribute name="operationCount" type="unsigned long" readonly="yes">
5956 <desc>
5957 Number of operations this task is divided into.
5958 Every task consists of at least one operation.
5959 </desc>
5960 </attribute>
5961
5962 <attribute name="operation" type="unsigned long" readonly="yes">
5963 <desc>Number of the operation being currently executed.</desc>
5964 </attribute>
5965
5966 <attribute name="operationDescription" type="wstring" readonly="yes">
5967 <desc>
5968 Description of the operation being currently executed.
5969 </desc>
5970 </attribute>
5971
5972 <attribute name="operationPercent" type="long" readonly="yes">
5973 <desc>Current operation progress value in percent.</desc>
5974 </attribute>
5975
5976 <method name="waitForCompletion">
5977 <desc>
5978 Waits until the task is done (including all operations) with a
5979 given timeout.
5980 </desc>
5981 <param name="timeout" type="long" dir="in">
5982 <desc>
5983 Timeout value in milliseconds.
5984 Specify -1 for an indefinite wait.
5985 </desc>
5986 </param>
5987 </method>
5988
5989 <method name="waitForOperationCompletion">
5990 <desc>
5991 Waits until the given operation is done with a given timeout.
5992 </desc>
5993 <param name="operation" type="unsigned long" dir="in">
5994 <desc>
5995 Number of the operation to wait for.
5996 Must be less than <link to="#operationCount"/>.
5997 </desc>
5998 </param>
5999 <param name="timeout" type="long" dir="in">
6000 <desc>
6001 Timeout value in milliseconds.
6002 Specify -1 for an indefinite wait.
6003 </desc>
6004 </param>
6005 </method>
6006
6007 <method name="cancel">
6008 <desc>
6009 Cancels the task.
6010 <note>
6011 If <link to="#cancelable"/> is <tt>false</tt>, then
6012 this method will fail.
6013 </note>
6014 </desc>
6015 </method>
6016
6017 </interface>
6018
6019
6020 <!--
6021 // ISnapshot
6022 /////////////////////////////////////////////////////////////////////////
6023 -->
6024
6025 <enumerator
6026 name="ISnapshotEnumerator" type="ISnapshot"
6027 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
6028 />
6029
6030 <collection
6031 name="ISnapshotCollection" type="ISnapshot"
6032 enumerator="ISnapshotEnumerator"
6033 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
6034 readonly="yes"
6035 />
6036
6037 <interface
6038 name="ISnapshot" extends="$unknown"
6039 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
6040 wsmap="managed"
6041 >
6042 <desc>
6043 The ISnapshot interface represents a snapshot of the virtual
6044 machine.
6045
6046 The <i>snapshot</i> stores all the information about a virtual
6047 machine necessary to bring it to exactly the same state as it was at
6048 the time of taking the snapshot. The snapshot includes:
6049
6050 <ul>
6051 <li>all settings of the virtual machine (i.e. its hardware
6052 configuration: RAM size, attached hard disks, etc.)
6053 </li>
6054 <li>the execution state of the virtual machine (memory contents,
6055 CPU state, etc.).
6056 </li>
6057 </ul>
6058
6059 Snapshots can be <i>offline</i> (taken when the VM is powered off)
6060 or <i>online</i> (taken when the VM is running). The execution
6061 state of the offline snapshot is called a <i>zero execution state</i>
6062 (it doesn't actually contain any information about memory contents
6063 or the CPU state, assuming that all hardware is just powered off).
6064
6065 <h3>Snapshot branches</h3>
6066
6067 Snapshots can be chained. Chained snapshots form a branch where
6068 every next snapshot is based on the previous one. This chaining is
6069 mostly related to hard disk branching (see <link to="IHardDisk2"/>
6070 description). This means that every time a new snapshot is created,
6071 a new differencing hard disk is implicitly created for all normal
6072 hard disks attached to the given virtual machine. This allows to
6073 fully restore hard disk contents when the machine is later reverted
6074 to a particular snapshot.
6075
6076 In the current implementation, multiple snapshot branches within one
6077 virtual machine are not allowed. Every machine has a single branch,
6078 and <link to="IConsole::takeSnapshot()"/> operation adds a new
6079 snapshot to the top of that branch.
6080
6081 Existing snapshots can be discarded using
6082 <link to="IConsole::discardSnapshot()"/>.
6083
6084 <h3>Current snapshot</h3>
6085
6086 Every virtual machine has a current snapshot, identified by
6087 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
6088 a base for the <i>current machine state</i> (see below), to the effect
6089 that all normal hard disks of the machine and its execution
6090 state are based on this snapshot.
6091
6092 In the current implementation, the current snapshot is always the
6093 last taken snapshot (i.e. the head snapshot on the branch) and it
6094 cannot be changed.
6095
6096 The current snapshot is <tt>null</tt> if the machine doesn't have
6097 snapshots at all; in this case the current machine state is just
6098 current settings of this machine plus its current execution state.
6099
6100 <h3>Current machine state</h3>
6101
6102 The current machine state is what represented by IMachine instances got
6103 directly from IVirtualBox
6104 using <link
6105 to="IVirtualBox::getMachine()">getMachine()</link>, <link
6106 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
6107 to instances returned by <link to="ISnapshot::machine"/>). This state
6108 is always used when the machine is <link to="IConsole::powerUp"> powered
6109 on</link>.
6110
6111 The current machine state also includes the current execution state.
6112 If the machine is being currently executed
6113 (<link to="IMachine::state"/> is <link to="MachineState::Running"/>
6114 and above), its execution state is just what's happening now.
6115 If it is powered off (<link to="MachineState::PoweredOff"/> or
6116 <link to="MachineState::Aborted"/>), it has a zero execution state.
6117 If the machine is saved (<link to="MachineState::Saved"/>), its
6118 execution state is what saved in the execution state file
6119 (<link to="IMachine::stateFilePath"/>).
6120
6121 If the machine is in the saved state, then, next time it is powered
6122 on, its execution state will be fully restored from the saved state
6123 file and the execution will continue from the point where the state
6124 was saved.
6125
6126 Similarly to snapshots, the current machine state can be discarded
6127 using <link to="IConsole::discardCurrentState()"/>.
6128
6129 <h3>Taking and discarding snapshots</h3>
6130
6131 The table below briefly explains the meaning of every snapshot
6132 operation:
6133
6134 <table>
6135 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
6136
6137 <tr><td><link to="IConsole::takeSnapshot()"/></td>
6138
6139 <td>Save the current state of the virtual machine, including all
6140 settings, contents of normal hard disks and the current modifications
6141 to immutable hard disks (for online snapshots)</td>
6142
6143 <td>The current state is not changed (the machine will continue
6144 execution if it is being executed when the snapshot is
6145 taken)</td></tr>
6146
6147 <tr><td><link to="IConsole::discardSnapshot()"/></td>
6148
6149 <td>Forget the state of the virtual machine stored in the snapshot:
6150 dismiss all saved settings and delete the saved execution state (for
6151 online snapshots)</td>
6152
6153 <td>Other snapshots (including child snapshots, if any) and the
6154 current state are not directly affected</td></tr>
6155
6156 <tr><td><link to="IConsole::discardCurrentState()"/></td>
6157
6158 <td>Restore the current state of the virtual machine from the state
6159 stored in the current snapshot, including all settings and hard disk
6160 contents</td>
6161
6162 <td>The current state of the machine existed prior to this operation
6163 is lost</td></tr>
6164
6165 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
6166
6167 <td>Completely revert the virtual machine to the state it was in
6168 before the current snapshot has been taken</td>
6169
6170 <td>The current state, as well as the current snapshot, are
6171 lost</td></tr>
6172
6173 </table>
6174
6175 </desc>
6176
6177 <attribute name="id" type="uuid" readonly="yes">
6178 <desc>UUID of the snapshot.</desc>
6179 </attribute>
6180
6181 <attribute name="name" type="wstring">
6182 <desc>Short name of the snapshot.</desc>
6183 </attribute>
6184
6185 <attribute name="description" type="wstring">
6186 <desc>Optional description of the snapshot.</desc>
6187 </attribute>
6188
6189 <attribute name="timeStamp" type="long long" readonly="yes">
6190 <desc>
6191 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
6192 </desc>
6193 </attribute>
6194
6195 <attribute name="online" type="boolean" readonly="yes">
6196 <desc>
6197 <tt>true</tt> if this snapshot is an online snapshot and
6198 <tt>false</tt> otherwise.
6199
6200 <note>
6201 When this attribute is <tt>true</tt>, the
6202 <link to="IMachine::stateFilePath"/> attribute of the
6203 <link to="#machine"/> object associated with this snapshot
6204 will point to the saved state file. Otherwise, it will be
6205 <tt>null</tt>.
6206 </note>
6207 </desc>
6208 </attribute>
6209
6210 <attribute name="machine" type="IMachine" readonly="yes">
6211 <desc>
6212 Virtual machine this snapshot is taken on. This object
6213 stores all settings the machine had when taking this snapshot.
6214 <note>
6215 The returned machine object is immutable, i.e. no
6216 any settings can be changed.
6217 </note>
6218 </desc>
6219 </attribute>
6220
6221 <attribute name="parent" type="ISnapshot" readonly="yes">
6222 <desc>
6223 Parent snapshot (a snapshot this one is based on).
6224 <note>
6225 It's not an error to read this attribute on a snapshot
6226 that doesn't have a parent -- a null object will be
6227 returned to indicate this.
6228 </note>
6229 </desc>
6230 </attribute>
6231
6232 <attribute name="children" type="ISnapshotCollection" readonly="yes">
6233 <desc>
6234 Child snapshots (all snapshots having this one as a parent).
6235 <note>
6236 In the current implementation, there can be only one
6237 child snapshot, or no children at all, meaning this is the
6238 last (head) snapshot.
6239 </note>
6240 </desc>
6241 </attribute>
6242
6243 </interface>
6244
6245
6246 <!--
6247 // IMedia
6248 /////////////////////////////////////////////////////////////////////////
6249 -->
6250
6251 <enum
6252 name="MediaState"
6253 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
6254 >
6255 <desc>
6256 Virtual media state.
6257 <see>IMedia</see>
6258 </desc>
6259
6260 <const name="NotCreated" value="0">
6261 <desc>
6262 Associated media storage does not exist (either was not created yet or
6263 was deleted).
6264 </desc>
6265 </const>
6266 <const name="Created" value="1">
6267 <desc>
6268 Associated storage exists and accessible.
6269 </desc>
6270 </const>
6271 <const name="LockedRead" value="2">
6272 <desc>
6273 Media is locked for reading, no data modification is possible.
6274 </desc>
6275 </const>
6276 <const name="LockedWrite" value="3">
6277 <desc>
6278 Media is locked for writing, no concurrent data reading or modification
6279 is possible.
6280 </desc>
6281 </const>
6282 <const name="Inaccessible" value="4">
6283 <desc>
6284 Associated media storage is not accessible.
6285 </desc>
6286 </const>
6287 <const name="Creating" value="5">
6288 <desc>
6289 Associated media storage is being created.
6290 </desc>
6291 </const>
6292 <const name="Deleting" value="6">
6293 <desc>
6294 Associated media storage is being deleted.
6295 </desc>
6296 </const>
6297 </enum>
6298
6299 <interface
6300 name="IMedium" extends="$unknown"
6301 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
6302 wsmap="managed"
6303 >
6304 <desc>
6305 The IMedium interface is a common interface for all objects representing
6306 virtual media such as hard disks, DVD images.
6307
6308 Each medium is associated with a storage unit (such as a file on the host
6309 computer or a network resource) that holds actual data. The location of
6310 the storage unit is represented by the #location attribute. The value of
6311 this attribute is media type dependent.
6312
6313 The exact media type may be determined by querying the appropriate
6314 interface such as:
6315 <ul>
6316 <li>IHardDisk2 (virtual hard disks)</li>
6317 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
6318 <li>IFloppyImage2 (raw floppy image files)</li>
6319 </ul>
6320
6321 Existing media are opened using the following methods, depending on the
6322 media type:
6323 <ul>
6324 <li><link to="IVirtualBox::openHardDisk2()"/></li>
6325 <li><link to="IVirtualBox::openDVDImage()"/></li>
6326 <li><link to="IVirtualBox::openFloppyImage()"/></li>
6327 </ul>
6328
6329 New hard disk media are created using the
6330 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
6331 images are created outside VirtualBox, usually by storing a copy
6332 of the real medium of the corresponding type in a regular file.
6333
6334 <h3>Known Media</h3>
6335
6336 When an existing medium gets opened for the first time, it gets
6337 automatically remembered by the given VirtualBox installation or, in other
6338 words, becomes a <i>known medium</i>. Known media are stored in the media
6339 registry transparently maintained by VirtualBox and stored in settings
6340 files so that this registry is preserved when VirtualBox is not running.
6341
6342 Newly created virtual hard disks get remembered only when the associated
6343 storage unit is actually created (see IHardDisk2 for more details).
6344
6345 All known media can be enumerated using
6346 <link to="IVirtualBox::hardDisks2"/>,
6347 <link to="IVirtualBox::DVDImages"/> and
6348 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
6349 quickly found by by UUID using <link to="IVirtualBox::getHardDisk2()"/>
6350 and similar methods or by location using
6351 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
6352
6353 Only known media can be attached to virtual machines.
6354
6355 Removing known media from the media registry is performed when the given
6356 medium is closed using the <link to="#close()"/> method or when its
6357 associated storage unit is deleted (only for hard disks).
6358
6359 <h3>Accessibility Checks</h3>
6360
6361 The given medium (with the created storage unit) is considered to be
6362 <i>accessible</i> when its storage unit can be successfully read from.
6363 Accessible media are indicated by the <link to="MediaState::Created"/>
6364 value of the <link to="#state"/> attribute. When the storage unit cannot
6365 be read (for example, because it is located on a disconnected network
6366 resource, or was accidentally deleted outside VirtualBox), the medium is
6367 considered to be <i>inaccessible</i> which is indicated by the
6368 <link to="MediaState::Inaccessible"/> state. The details about the reason
6369 of being inaccessible can be obtained using the
6370 <link to="#lastAccessError"/> attribute.
6371
6372 A new accessibility check is performed each time the <link to="#state"/>
6373 attribute is read. Please note that this check may take long time (several
6374 seconds or even minutes, depending on the storage unit location and
6375 format), and will block the calling thread until finished. For this
6376 reason, it is recommended to never read this attribute on the main UI
6377 thread to avoid making the UI unresponsive.
6378
6379 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
6380 created for the first time), all known media are in the
6381 <link to="MediaState::Inaccessible"/> state but the value of the <link
6382 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
6383 accessibility check is made on startup. This is done to make the
6384 VirtualBox object ready for serving requests as
6385 fast as possible and let the end-user application decide if it needs to
6386 check media accessibility right away or not.
6387 </desc>
6388
6389 <attribute name="id" type="uuid" readonly="yes">
6390 <desc>
6391 UUID of the medium. For a newly created medium, this value is a randomly
6392 generated UUID.
6393 </desc>
6394 </attribute>
6395
6396 <attribute name="description" type="wstring">
6397 <desc>
6398 Optional description of the medium. For newly created media, the value
6399 of this attribute value is <tt>null</tt>.
6400
6401 Media types that don't support this attribute will return E_NOTIMPL in
6402 attempt to get or set this attribute's value.
6403
6404 <note>
6405 For some storage types, reading this attribute may return an outdated
6406 (last known) value when <link to="#state"/> is <link
6407 to="MediaState::Inaccessible"/> or <link
6408 to="MediaState::LockedWrite"/> because the value of this attribute is
6409 stored within the storage unit itself. Also note that changing the
6410 attribute value is not possible in such case, as well as when the
6411 medium is the <link to="MediaState::LockedRead"/> state.
6412 </note>
6413 </desc>
6414 </attribute>
6415
6416 <attribute name="state" type="MediaState" readonly="yes">
6417 <desc>
6418 Current media state. Inspect <link to="MediaState"/> values for details.
6419
6420 Reading this attribute may take long time because a new accessibility
6421 check of the storage unit is performed every time the attribute is read.
6422 This check may cause a significant delay if the storage unit of the
6423 given medium is, for example, a file located on a network share which is
6424 not currently accessible due to connectivity problems -- the call will
6425 not return until a timeout interval defined by the host OS for this
6426 operation expires.
6427
6428 If the last known state of the medium is <link to="MediaState::Created"/>
6429 and the accessibility check fails then the state would be set to
6430 <link to="MediaState::Inaccessible"/> and <link to="#lastAccessError"/>
6431 may be used to get more details about the failure. If the state of the
6432 medium is <link to="MediaState::LockedRead"/> or
6433 <link to="MediaState::LockedWrite"/> then it remains the same, and a
6434 non-null value of <link to="#lastAccessError"/> will indicate a failed
6435 accessibility check in this case.
6436
6437 Note that not all media states are applicable to certain media types.
6438 For example, states <link to="MediaState::NotCreated"/>,
6439 <link to="MediaState::LockedWrite"/>, <link to="MediaState::Creating"/>,
6440 <link to="MediaState::Deleting"/> are meaningless for IDVDImage2 and
6441 IFloppyImage2 media.
6442 </desc>
6443 </attribute>
6444
6445 <attribute name="location" type="wstring">
6446 <desc>
6447 Location of the storage unit holding media data.
6448
6449 The format of the location string is media type specific. For media
6450 types that use regular files in a host's file system, the location
6451 string is just a full file name.
6452
6453 Some media types may support changing the storage unit location by
6454 simply changing the value of this property. If this operation is not
6455 supported, the implementation will return E_NOTIMPL in attempt to set
6456 this attribute's value.
6457
6458 When setting a value of the location attribute which is a regular file
6459 in the host's file system, the given file name may be either relative to
6460 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
6461 absolute. Note that if the given location specification does not contain
6462 the file extension part then a proper default extension will be
6463 automatically appended by the implementation depending on the media type.
6464 </desc>
6465 </attribute>
6466
6467 <attribute name="name" type="wstring" readonly="yes">
6468 <desc>
6469 Name of the storage unit holding media data.
6470
6471 The returned string is a short version of the <link to="#location"/>
6472 attribute that is suitable for representing the medium in situations
6473 where the full location specification is too long (such as lists
6474 and comboboxes in GUI frontends). This string is also used by frontends
6475 to sort the media list alphabetically when needed.
6476
6477 For example, for locations that are regular files in the host's file
6478 system, the value of this attribute is just a file name (+ extension),
6479 without the path specification.
6480
6481 Note that as opposed to the <link to="#location"/> attribute, the name
6482 name attribute will not necessary be unique for a list of media of the
6483 given type and format.
6484 </desc>
6485 </attribute>
6486
6487 <attribute name="size" type="unsigned long long" readonly="yes">
6488 <desc>
6489 Physical size of the storage unit used to hold media data (in bytes).
6490
6491 <note>
6492 For media whose <link to="#state"/> is <link
6493 to="MediaState::Inaccessible"/>, the value of this property is the
6494 last known size. For <link to="MediaState::NotCreated"/> media,
6495 the returned value is zero.
6496 </note>
6497 </desc>
6498 </attribute>
6499
6500 <attribute name="lastAccessError" type="wstring" readonly="yes">
6501 <desc>
6502 Text message that represents the result of the last accessibility
6503 check.
6504
6505 Accessibility checks are performed each time the <link to="#state"/>
6506 attribute is read. A @c null string is returned if the last
6507 accessibility check was successful. A non-null string indicates a
6508 failure and should normally describe a reason of the failure (for
6509 example, a file read error).
6510 </desc>
6511 </attribute>
6512
6513 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
6514 <desc>
6515 Array of UUIDs of all machines this medium is attached to.
6516
6517 A <tt>null</tt> array is returned if this medium is not attached to any
6518 machine or to any machine's snapshot.
6519
6520 <note>
6521 The returned array will include a machine even if this medium is not
6522 attached to that machine in the current state but attached to it in
6523 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
6524 details.
6525 </note>
6526 </desc>
6527 </attribute>
6528
6529 <method name="getSnapshotIds">
6530 <desc>
6531 Returns an array of UUIDs of all snapshots of the given machine where
6532 this medium is attached to it.
6533
6534 If the medium is attached to the machine in the current state, then the
6535 first element in the array will always be the ID of the queried machine
6536 (i.e. the value equal to the @c machineId argument), followed by
6537 snapshot IDs (if any).
6538
6539 If the medium is not attached to the machine in the current state, then
6540 the array will contain only snapshot IDs.
6541
6542 The returned array may be <tt>null</tt> if this medium is not attached
6543 to the given machine at all, neither in the current state nor in one of
6544 snapshots.
6545 </desc>
6546 <param name="machineId" type="uuid" dir="in">
6547 <desc>
6548 UUID of the machine to query.
6549 </desc>
6550 </param>
6551 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
6552 <desc>
6553 Array of snapshot UUIDs of the given machine using this medium.
6554 </desc>
6555 </param>
6556 </method>
6557
6558 <method name="lockRead">
6559 <desc>
6560 Locks this medium for reading.
6561
6562 The read lock is shared: many clients can simultaneously lock the
6563 same media for reading unless it is already locked for writing (see
6564 <link to="#lockWrite()"/>) in which case an error is returned.
6565
6566 When the medium is locked for reading, it cannot be modified from within
6567 VirtualBox. This means that any method that changes the properties of
6568 this medium or contents of the storage unit will return an error (unless
6569 explicitly stated otherwise) and that an attempt to start a virtual
6570 machine that wants to modify the medium will also fail.
6571
6572 When the virtual machine is started up, it locks for reading all media
6573 it uses in read-only mode. If some media cannot be locked for reading,
6574 the startup procedure will fail.
6575
6576 The medium locked for reading must be unlocked using the
6577 <link to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/> can
6578 be nested and must be followed by the same number of paired
6579 <link to="#unlockRead()"/> calls.
6580
6581 This method sets the media state to <link to="MediaState::LockedRead"/>
6582 on success. The state prior to this call must be
6583 <link to="MediaState::Created"/>,
6584 <link to="MediaState::Inaccessible"/> or
6585 <link to="MediaState::LockedRead"/>. As you can see, inaccessible media
6586 can be locked too. This is not an error; this method performs a logical
6587 lock that prevents modifications of this media through the VirtualBox
6588 API, not a physical lock of the underlying storage unit.
6589
6590 Either on success or on failure, this method returns the current state
6591 of the medium <b>before</b> the operation.
6592 </desc>
6593 <param name="state" type="MediaState" dir="return">
6594 <desc>
6595 State of the medium after the operation.
6596 </desc>
6597 </param>
6598 </method>
6599
6600 <method name="unlockRead">
6601 <desc>
6602 Cancels the read lock previously set by <link to="#lockRead()"/>.
6603
6604 Either on success or on failure, this method returns the current state
6605 of the medium <b>after</b> the operation.
6606
6607 See <link to="#lockRead()"/> for more details.
6608 </desc>
6609 <param name="state" type="MediaState" dir="return">
6610 <desc>
6611 State of the medium after the operation.
6612 </desc>
6613 </param>
6614 </method>
6615
6616 <method name="lockWrite">
6617 <desc>
6618 Locks this medium for writing.
6619
6620 The write lock, as opposed to <link to="#lockRead()"/>, is exclusive:
6621 there may be only one client that holds a write lock and there may be no
6622 read locks while the write lock is held.
6623
6624 When the medium is locked for writing, it cannot be modified from within
6625 VirtualBox and it is not guaranteed that the values of its properties
6626 are up-to-date. Any method that changes the properties of this medium or
6627 contents of the storage unit will return an error ((unless explicitly
6628 stated otherwise) and an attempt to start a virtual machine that wants
6629 to modify or to read the medium will also fail.
6630
6631 When the virtual machine is started up, it locks for writing all media
6632 it uses to write data to. If some media cannot be locked for writing,
6633 the startup procedure will fail.
6634
6635 The medium locked for writing must be unlocked using the
6636 <link to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
6637 can <b>not</b> be nested and must be followed by a paired
6638 <link to="#unlockWrite()"/> call.
6639
6640 This method sets the media state to <link to="MediaState::LockedWrite"/>
6641 on success. The state prior to this call must be
6642 <link to="MediaState::Created"/> or
6643 <link to="MediaState::Inaccessible"/>. As you can see, inaccessible media
6644 can be locked too. This is not an error; this method performs a logical
6645 lock that prevents modifications of this media through the VirtualBox
6646 API, not a physical lock of the underlying storage unit.
6647
6648 Either on success or on failure, this method returns the current state
6649 of the medium <b>before</b> the operation.
6650 </desc>
6651 <param name="state" type="MediaState" dir="return">
6652 <desc>
6653 State of the medium after the operation.
6654 </desc>
6655 </param>
6656 </method>
6657
6658 <method name="unlockWrite">
6659 <desc>
6660 Cancels the write lock previously set by <link to="#lockWrite()"/>.
6661
6662 Either on success or on failure, this method returns the current state
6663 of the medium <b>after</b> the operation.
6664
6665 See <link to="#lockWrite()"/> for more details.
6666 </desc>
6667 <param name="state" type="MediaState" dir="return">
6668 <desc>
6669 State of the medium after the operation.
6670 </desc>
6671 </param>
6672 </method>
6673
6674 <method name="close">
6675 <desc>
6676 Closes this media.
6677
6678 The hard disk must not be attached to any known virtual machine and must
6679 not have any known child hard disks, otherwise the operation will fail.
6680
6681 When the hard disk is successfully closed, it gets removed from the list
6682 of remembered hard disks, but its storage unit is not deleted. In
6683 particular, this means that this hard disk can be later opened again
6684 using the <link to="IVirtualBox::openHardDisk2"/> call.
6685
6686 Note that after this method successfully returns, the given hard disk
6687 object becomes uninitialized. This means that any attempt to call any of
6688 its methods or attributes will fail with the <tt>"Object not ready"
6689 (E_ACCESSDENIED)</tt> error.
6690 </desc>
6691 </method>
6692
6693 </interface>
6694
6695
6696 <!--
6697 // IHardDisk2
6698 /////////////////////////////////////////////////////////////////////////
6699 -->
6700
6701 <enum
6702 name="HardDiskType"
6703 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
6704 >
6705 <desc>
6706 Virtual hard disk type.
6707 <see>IHardDisk</see>
6708 </desc>
6709
6710 <const name="Normal" value="0">
6711 <desc>
6712 Normal hard disk (attached directly or indirectly, preserved
6713 when taking snapshots).
6714 </desc>
6715 </const>
6716 <const name="Immutable" value="1">
6717 <desc>
6718 Immutable hard disk (attached indirectly, changes are wiped out
6719 after powering off the virtual machine).
6720 </desc>
6721 </const>
6722 <const name="Writethrough" value="2">
6723 <desc>
6724 Write through hard disk (attached directly, ignored when
6725 taking snapshots).
6726 </desc>
6727 </const>
6728 </enum>
6729
6730 <interface
6731 name="IHardDisk2Attachment" extends="$unknown"
6732 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
6733 wsmap="struct"
6734 >
6735 <desc>
6736 The IHardDisk2Attachment interface represents a hard disk attachment of a
6737 virtual machine.
6738
6739 Every hard disk attachments specifies a slot of the virtual hard disk
6740 controller and a virtual virtual hard disk attached to this slot.
6741
6742 The array of hard disk attachments is returned by
6743 <link to="IMachine::hardDisk2Attachments"/>.
6744
6745 <note>
6746 With the COM API, this is an interface like all the others. With the
6747 webservice, this is mapped to a structure, so querying the attribute
6748 will not return an object, but a complete structure.
6749 </note>
6750 </desc>
6751 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
6752 <desc>Hard disk object associated with this attachment.</desc>
6753 </attribute>
6754
6755 <attribute name="bus" type="StorageBus" readonly="yes">
6756 <desc>Interface bus of this attachment.</desc>
6757 </attribute>
6758
6759 <attribute name="channel" type="long" readonly="yes">
6760 <desc>Channel number of this attachment.</desc>
6761 </attribute>
6762
6763 <attribute name="device" type="long" readonly="yes">
6764 <desc>Device slot number of this attachment.</desc>
6765 </attribute>
6766
6767 </interface>
6768
6769 <interface
6770 name="IHardDisk2" extends="IMedium"
6771 uuid="4fece1c1-2a75-43ce-ba82-76d2a89b9d5d"
6772 wsmap="managed"
6773 >
6774 <desc>
6775 The IHardDisk2 interface represents a virtual hard disk drive
6776 used by a virtual machine.
6777
6778 Virtual hard disk objects virtualize the hard disk hardware and look like
6779 regular hard disks for the guest OS running inside the virtual machine.
6780
6781 <h3>Hard Disk Types</h3>
6782
6783 There are three types of hard disks:
6784 <link to="HardDiskType::Normal">Normal</link>,
6785 <link to="HardDiskType::Immutable">Immutable</link> and
6786 <link to="HardDiskType::Writethrough">Writethrough</link>. The type of the
6787 hard disk defines how the hard disk is attached to a virtual machine and
6788 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
6789 machine with the attached hard disk is taken. The type of the hard disk is
6790 defined by the <link to="#type"/> attribute.
6791
6792 All hard disks can be also divided in two big groups: <i>base</i> hard
6793 disks and <i>differencing</i> hard disks. A base hard disk contains all
6794 sectors of the hard disk data in its storage unit and therefore can be
6795 used independently. On the contrary, a differencing hard disk contains
6796 only some part of the hard disk data (a subset of sectors) and needs
6797 another hard disk to get access to the missing sectors of data. This
6798 another hard disk is called a <i>parent</i> hard disk and defines a hard
6799 disk to which this differencing hard disk is known to be <i>linked to</i>.
6800 The parent hard disk may be itself a differencing hard disk. This
6801 way, differencing hard disks form a linked hard disk chain. This chain
6802 always ends with the base hard disk which is sometimes referred to as the
6803 root hard disk of this chain. Note that several differencing hard disks
6804 may be linked to the same parent hard disk. This way, all known hard disks
6805 form a hard disk tree which is based on their parent-child relationship.
6806
6807 Differencing hard disks can be distinguished from base hard disks by
6808 querying the <link to="#parent"/> attribute: base hard disks do not have
6809 parents they would depend on, so the value of this attribute is always
6810 <tt>null</tt> for them. Using this attribute, it is possible to walk up
6811 the hard disk tree (from the child hard disk to its parent). It is also
6812 possible to walk down the tree using the <link to="#children"/>
6813 attribute.
6814
6815 Note that the type of all differencing hard disks is
6816 <link to="HardDiskType::Normal">Normal</link>; all other values are
6817 meaningless for them. Base hard disks may be of any type.
6818
6819 <h3>Creating Hard Disks</h3>
6820
6821 New base hard disks are created using
6822 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
6823 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
6824 disks are usually implicitly created by VirtualBox when needed but may
6825 also be created explicitly using <link to="#createDiffStorage()"/>.
6826
6827 After the hard disk is successfully created (including the storage unit)
6828 or opened, it becomes a known hard disk (remembered in the internal media
6829 registry). Known hard disks can be attached to a virtual machine, accessed
6830 through <link to="IVirtualBox::getHardDisk2()"/> and
6831 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
6832 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
6833
6834 The following methods, besides <link to="IMedium::close()"/>,
6835 automatically remove the hard disk from the media registry:
6836 <ul>
6837 <li><link to="#deleteStorage()"/></li>
6838 <li><link to="#mergeTo()"/></li>
6839 </ul>
6840
6841 If the storage unit of the hard disk is a regular file in the host's
6842 file system then the rules stated in the description of the
6843 <link to="IMedium::location"/> attribute apply when setting its value. In
6844 addition, a plain file name without any path may be given, in which case
6845 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
6846 folder</link> will be prepended to it.
6847
6848 <h4>Automatic composition of the file name part</h4>
6849
6850 Another extension to the <link to="IMedium::location"/> attribute is that
6851 there is a possibility to cause VirtualBox to compose a unique value for
6852 the file name part of the location using the UUID of the hard disk. This
6853 applies only to hard disks in <link to="MediaState::NotCreated"/> state,
6854 e.g. before the storage unit is created, and works as follows. You set the
6855 value of the <link to="IMedium::location"/> attribute to a location
6856 specification which only contains the path specification but not the file
6857 name part and ends with either a forward slash or a backslash character.
6858 In response, VirtualBox will generate a new UUID for the hard disk and
6859 compose the file name using the following pattern:
6860 <pre>
6861 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
6862 </pre>
6863 where <tt>&lt;path&gt;</tt> is the supplied path specification,
6864 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
6865 is the default extension for the storage format of this hard disk. After
6866 that, you may call any of the methods that create a new hard disk storage
6867 unit and they will use the generated UUID and file name.
6868
6869 <h3>Attaching Hard Disks</h3>
6870
6871 Hard disks are attached to virtual machines using the
6872 <link to="IMachine::attachHardDisk2()"/> method and detached using the
6873 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
6874 <link to="#type"/>, hard disks are attached either
6875 <i>directly</i> or <i>indirectly</i>.
6876
6877 When a hard disk is being attached directly, it is associated with the
6878 virtual machine and used for hard disk operations when the machine is
6879 running. When a hard disk is being attached indirectly, a new differencing
6880 hard disk linked to it is implicitly created and this differencing hard
6881 disk is associated with the machine and used for hard disk operations.
6882 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
6883 a direct attachment then the same hard disk will be returned in response
6884 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
6885 an indirect attachment is performed then
6886 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
6887 differencing hard disk, not the original one passed to <link
6888 to="IMachine::attachHardDisk2()"/>. The following table shows the
6889 dependency of the attachment type on the hard disk type:
6890
6891 <table>
6892 <tr>
6893 <th>Hard Disk Type</th>
6894 <th>Direct or Indirect?</th>
6895 </tr>
6896 <tr>
6897 <td>Normal (Base)</td>
6898 <td>
6899 Normal base hard disks that do not have children (i.e. differencing
6900 hard disks linked to them) and that are not already attached to
6901 virtual machines in snapshots are attached <b>directly</b>.
6902 Otherwise, they are attached <b>indirectly</b> because having
6903 dependent children or being part of the snapshot makes it impossible
6904 to modify hard disk contents without breaking the integrity of the
6905 dependent party. The <link to="#readOnly"/> attribute allows to
6906 quickly determine the kind of the attachment for the given hard
6907 disk. Note that if a normal base hard disk is to be indirectly
6908 attached to a virtual machine with snapshots then a special
6909 procedure called <i>smart attachment</i> is performed (see below).
6910 </td>
6911 </tr>
6912 <tr>
6913 <td>Normal (Differencing)</td>
6914 <td>
6915 Differencing hard disks are like normal base hard disks: attached
6916 <b>directly</b> if they do not have children and are not attached to
6917 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
6918 that the smart attachment procedure is never performed for
6919 differencing hard disks.
6920 </td>
6921 </tr>
6922 <tr>
6923 <td>Immutable</td>
6924 <td>
6925 Immutable hard disks are always attached <b>indirectly</b> because
6926 they are designed to be non-writable. If an immutable hard disk is
6927 attached to a virtual machine with snapshots then a special
6928 procedure called smart attachment is performed (see below).
6929 </td>
6930 </tr>
6931 <tr>
6932 <td>Writethrough</td>
6933 <td>
6934 Writethrough hard disks are always attached <b>directly</b>, also as
6935 designed. This also means that writethrough hard disks cannot have
6936 other hard disks linked to them at all.
6937 </td>
6938 </tr>
6939 </table>
6940
6941 Note that the same hard disk, regardless of its type, may be attached to
6942 more than one virtual machine at a time. In this case, the machine that is
6943 started first gains exclusive access to the hard disk and attempts to
6944 start other machines having this hard disk attached will fail until the
6945 first machine is powered down.
6946
6947 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
6948 that the given hard disk remains associated with the given machine after a
6949 successful <link to="IMachine::detachHardDisk2()"/> call until
6950 <link to="IMachine::saveSettings()"/> is called to save all changes to
6951 machine settings to disk. This deferring is necessary to guarantee that
6952 the hard disk configuration may be restored at any time by a call to
6953 <link to="IMachine::discardSettings()"/> before the settings
6954 are saved (committed).
6955
6956 Note that if <link to="IMachine::discardSettings()"/> is called after
6957 indirectly attaching some hard disks to the machine but before a call to
6958 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
6959 all differencing hard disks implicitly created by
6960 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
6961 Such implicitly created hard disks will also be immediately deleted when
6962 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
6963 call if it is made before <link to="IMachine::saveSettings()"/>. This
6964 implicit deletion is safe because newly created differencing hard
6965 disks do not contain any user data.
6966
6967 However, keep in mind that detaching differencing hard disks that were
6968 implicitly created by <link to="IMachine::attachHardDisk2()"/>
6969 before the last <link to="IMachine::saveSettings()"/> call will
6970 <b>not</b> implicitly delete them as they may already contain some data
6971 (for example, as a result of virtual machine execution). If these hard
6972 disks are no more necessary, the caller can always delete them explicitly
6973 using <link to="#deleteStorage()"/> after they are actually de-associated
6974 from this machine by the <link to="IMachine::saveSettings()"/> call.
6975
6976 <h3>Smart Attachment</h3>
6977
6978 When normal base or immutable hard disks are indirectly attached to a
6979 virtual machine then some additional steps are performed to make sure the
6980 virtual machine will have the most recent "view" of the hard disk being
6981 attached. These steps include walking through the machine's snapshots
6982 starting from the current one and going through ancestors up to the first
6983 snapshot. Hard disks attached to the virtual machine in all
6984 of the encountered snapshots are checked whether they are descendants of
6985 the given normal base or immutable hard disk. The first found child (which
6986 is the differencing hard disk) will be used instead of the normal base or
6987 immutable hard disk as a parent for creating a new differencing hard disk
6988 that will be actually attached to the machine. And only if no descendants
6989 are found or if the virtual machine does not have any snapshots then the
6990 normal base or immutable hard disk will be used itself as a parent for
6991 this differencing hard disk.
6992
6993 It is easier to explain what smart attachment does using the
6994 following example:
6995 <pre>
6996BEFORE attaching B.vdi: AFTER attaching B.vdi:
6997
6998Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
6999 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
7000 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
7001 Snapshot 4 (none) Snapshot 4 (none)
7002 CurState (none) CurState (D3->D2.vdi)
7003
7004 NOT
7005 ...
7006 CurState (D3->B.vdi)
7007 </pre>
7008 The first column is the virtual machine configuration before the base hard
7009 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
7010 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
7011 mean that the hard disk that is actually attached to the machine is a
7012 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
7013 another hard disk, <tt>B.vdi</tt>.
7014
7015 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
7016 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
7017 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
7018 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
7019 it cannot be attached directly and needs an indirect attachment (i.e.
7020 implicit creation of a new differencing hard disk). Due to the smart
7021 attachment procedure, the new differencing hard disk
7022 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
7023 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
7024 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
7025 machine.
7026
7027 Note that if there is more than one descendant hard disk of the given base
7028 hard disk found in a snapshot, and there is an exact device, channel and
7029 bus match, then this exact match will be used. Otherwise, the youngest
7030 descendant will be picked up.
7031
7032 There is one more important aspect of the smart attachment procedure which
7033 is not related to snapshots at all. Before walking through the snapshots
7034 as described above, the backup copy of the current list of hard disk
7035 attachment is searched for descendants. This backup copy is created when
7036 the hard disk configuration is changed for the first time after the last
7037 <link to="IMachine::saveSettings()"/> call and used by
7038 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
7039 changes. When such a descendant is found in this backup copy, it will be
7040 simply re-attached back, without creating a new differencing hard disk for
7041 it. This optimization is necessary to make it possible to re-attach the
7042 base or immutable hard disk to a different bus, channel or device slot
7043 without losing the contents of the differencing hard disk actually
7044 attached to the machine in place of it.
7045 </desc>
7046
7047 <attribute name="format" type="wstring" readonly="yes">
7048 <desc>
7049 Storage format of this hard disk.
7050
7051 The value of this attribute is a string that specifies a backend used to
7052 store hard disk data. The storage format is defined when you create a
7053 new hard disk or automatically detected when you open an existing hard
7054 disk medium, and cannot be changed later.
7055
7056 The list of all storage formats supported by this VirtualBox
7057 installation can be obtained using
7058 <link to="ISystemProperties::hardDiskFormats"/>.
7059 </desc>
7060 </attribute>
7061
7062 <attribute name="type" type="HardDiskType">
7063 <desc>
7064 Type (role) of this hard disk.
7065
7066 The following constraints apply when changing the value of this
7067 attribute:
7068 <ul>
7069 <li>If a hard disk is attached to a virtual machine (either in the
7070 current state or in one of the snapshots), its type cannot be
7071 changed.
7072 </li>
7073 <li>As long as the hard disk has children, its type cannot be set
7074 to <link to="HardDiskType::Writethrough"/>.
7075 </li>
7076 <li>The type of all differencing hard disks is
7077 <link to="HardDiskType::Normal"/> and cannot be changed.
7078 </li>
7079 </ul>
7080
7081 The type of a newly created or opened hard disk is set to
7082 <link to="HardDiskType::Normal"/>.
7083 </desc>
7084 </attribute>
7085
7086 <attribute name="parent" type="IHardDisk2" readonly="yes">
7087 <desc>
7088 Parent of this hard disk (a hard disk this hard disk is directly based
7089 on).
7090
7091 Only differencing hard disks have parents. For base (non-differencing)
7092 hard disks, <tt>null</tt> is returned.
7093 </desc>
7094 </attribute>
7095
7096 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
7097 <desc>
7098 Children of this hard disk (all differencing hard disks directly based
7099 on this hard disk). A <tt>null</tt> array is returned if this hard disk
7100 does not have any children.
7101 </desc>
7102 </attribute>
7103
7104 <attribute name="root" type="IHardDisk2" readonly="yes">
7105 <desc>
7106 Root hard disk of this hard disk.
7107
7108 If this is a differencing hard disk, its root hard disk is the base hard
7109 disk the given hard disk branch starts from. For all other types of hard
7110 disks, this property returns the hard disk object itself (i.e. the same
7111 object this property is read on).
7112 </desc>
7113 </attribute>
7114
7115 <attribute name="readOnly" type="boolean" readonly="yes">
7116 <desc>
7117 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
7118 otherwise.
7119
7120 A hard disk is considered to be read-only when its contents cannot be
7121 modified without breaking the integrity of other parties that depend on
7122 this hard disk such as its child hard disks or snapshots of virtual
7123 machines where this hard disk is attached to these machines. If there
7124 are no children and no such snapshots then there is no dependency and
7125 the hard disk is not read-only.
7126
7127 The value of this attribute can be used to determine the kind of the
7128 attachment that will take place when attaching this hard disk to a
7129 virtual machine. If the value is <tt>false</tt> then the hard disk will
7130 be attached directly. If the value is <tt>true</tt> then the hard disk
7131 will be attached indirectly by creating a new differencing child hard
7132 disk for that. See the interface description for more information.
7133
7134 Note that all <link to="HardDiskType::Immutable">Immutable</link> hard
7135 disks are always read-only while all
7136 <link to="HardDiskType::Writethrough">Writethrough</link> hard disks are
7137 always not.
7138
7139 <note>
7140 The read-only condition represented by this attribute is related to
7141 the hard disk type and usage, not to the current
7142 <link to="IMedium::state">media state</link> and not to the read-only
7143 state of the storage unit.
7144 </note>
7145 </desc>
7146 </attribute>
7147
7148 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
7149 <desc>
7150 Logical size of this hard disk (in megabytes), as reported to the
7151 guest OS running inside the virtual machine this disk is
7152 attached to. The logical size is defined when the hard disk is created
7153 and cannot be changed later.
7154
7155 <note>
7156 Reading this property on a differencing hard disk will return the size
7157 of its <link to="#root"/> hard disk.
7158 </note>
7159 <note>
7160 For hard disks whose state is <link to="#state"/> is <link
7161 to="MediaState::Inaccessible"/>, the value of this property is the
7162 last known logical size. For <link to="MediaState::NotCreated"/> hard
7163 disks, the returned value is zero.
7164 </note>
7165 </desc>
7166 </attribute>
7167
7168 <!-- storage methods -->
7169
7170 <method name="getProperty">
7171 <desc>
7172 Returns the value of the custom hard disk property with the given name.
7173
7174 The list of all properties supported by the given hard disk format can
7175 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7176
7177 Note that If <tt>null</tt> returned by this method as @a value, it
7178 means that the requested property is supported but currently has not
7179 assigned any value.
7180
7181 <result name="VBOX_E_OBJECT_NOT_FOUND">
7182 Requested property does not exist (not supported by the format).
7183 </result>
7184 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
7185 </desc>
7186 <param name="name" type="wstring" dir="in">
7187 <desc>Name of the property to get.</desc>
7188 </param>
7189 <param name="value" type="wstring" dir="return">
7190 <desc>Current property value.</desc>
7191 </param>
7192 </method>
7193
7194 <method name="setProperty">
7195 <desc>
7196 Sets the value of the custom hard disk property with the given name.
7197
7198 The list of all properties supported by the given hard disk format can
7199 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7200
7201 Note that passing <tt>null</tt> as @a value will reset the value of the
7202 property to nothing which may also be undertood as deleting the
7203 property's value. For properties with no values, the format backend will
7204 use a default value if such a value is defined for the given roperty.
7205
7206 <result name="VBOX_E_OBJECT_NOT_FOUND">
7207 Requested property does not exist (not supported by the format).
7208 </result>
7209 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
7210 </desc>
7211 <param name="name" type="wstring" dir="in">
7212 <desc>Name of the property to set.</desc>
7213 </param>
7214 <param name="value" type="wstring" dir="in">
7215 <desc>Property value to set.</desc>
7216 </param>
7217 </method>
7218
7219 <method name="getProperties">
7220 <desc>
7221 Returns values for a group of properties in one call.
7222
7223 The names of the properties to get are specified using the @a name
7224 argument which is a list of comma-separated property names or
7225 <tt>null</tt> if all properties are to be returned. Note that currently
7226 the value of this argument is ignored and the method always returns all
7227 existing properties.
7228
7229 The list of all properties supported by the given hard disk format can
7230 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7231
7232 The method returns two arrays, the array of property names correspinding
7233 to the @a names argument and the current values of these properties. Both
7234 arrays
7235
7236 Note that for properties that don't have values assigned to them,
7237 <tt>null</tt> is returned at the appropriate index in the @a returnValues
7238 array.
7239 </desc>
7240 <param name="names" type="wstring" dir="in">
7241 <desc>
7242 Names of properties to get.
7243 </desc>
7244 </param>
7245 <param name="returnNames" type="wstring" safearray="yes" dir="out">
7246 <desc>Names of returned properties.</desc>
7247 </param>
7248 <param name="returnValues" type="wstring" safearray="yes" dir="return">
7249 <desc>Values of returned properties.</desc>
7250 </param>
7251 </method>
7252
7253 <!-- storage methods -->
7254
7255 <method name="createDynamicStorage">
7256 <desc>
7257 Starts creating a dynamically expanding hard disk storage unit in the
7258 background. The previous storage unit created for this this object, if
7259 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
7260 the operation will fail.
7261
7262 Before the operation starts, the hard disk is placed to
7263 <link to="MediaState::Creating"/> state. If the create operation
7264 fails, the media will placed back to <link to="MediaState::NotCreated"/>
7265 state.
7266
7267 After the returned progress object reports that the operation is
7268 successfully complete, the media state will be set to <link
7269 to="MediaState::Created"/>, the hard disk will be remembered by this
7270 VirtualBox installation and may be attached to virtual machines.
7271 </desc>
7272 <param name="logicalSize" type="unsigned long long" dir="in">
7273 <desc>Maximum logical size of the hard disk in megabytes.</desc>
7274 </param>
7275 <param name="progress" type="IProgress" dir="return">
7276 <desc>Progress object to track the operation completion.</desc>
7277 </param>
7278 </method>
7279
7280 <method name="createFixedStorage">
7281 <desc>
7282 Starts creating a fixed-size hard disk storage unit in the background.
7283 The previous storage unit created for this this object, if
7284 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
7285 the operation will fail.
7286
7287 Before the operation starts, the hard disk is placed to
7288 <link to="MediaState::Creating"/> state. If the create operation
7289 fails, the media will placed back to <link to="MediaState::NotCreated"/>
7290 state.
7291
7292 After the returned progress object reports that the operation is
7293 successfully complete, the media state will be set to <link
7294 to="MediaState::Created"/>, the hard disk will be remembered by this
7295 VirtualBox installation and may be attached to virtual machines.
7296 </desc>
7297 <param name="logicalSize" type="unsigned long long" dir="in">
7298 <desc>Logical size of the hard disk in megabytes.</desc>
7299 </param>
7300 <param name="progress" type="IProgress" dir="return">
7301 <desc>Progress object to track the operation completion.</desc>
7302 </param>
7303 </method>
7304
7305 <method name="deleteStorage">
7306 <desc>
7307 Starts deleting the storage unit of this hard disk.
7308
7309 The hard disk must not be attached to any known virtual machine and must
7310 not have any known child hard disks, otherwise the operation will fail.
7311 It will also fail if there is no storage unit to delete or if deletion
7312 is already in progress, or if the hard disk is being in use (locked for
7313 read or for write) or inaccessible. Therefore, the only valid state for
7314 this operation to succeed is <link to="MediaState::Created"/>.
7315
7316 Before the operation starts, the hard disk is placed to
7317 <link to="MediaState::Deleting"/> state and gets removed from the list
7318 of remembered hard disks (media registry). If the delete operation
7319 fails, the media will be remembered again and placed back to
7320 <link to="MediaState::Created"/> state.
7321
7322 After the returned progress object reports that the operation is
7323 complete, the media state will be set to
7324 <link to="MediaState::NotCreated"/> and you will be able to use one of
7325 the storage creation methods to create it again.
7326
7327 <see>#close()</see>
7328 </desc>
7329 <param name="progress" type="IProgress" dir="return">
7330 <desc>Progress object to track the operation completion.</desc>
7331 </param>
7332 </method>
7333
7334 <!-- diff methods -->
7335
7336 <method name="createDiffStorage">
7337 <desc>
7338 Starts creating an empty differencing storage unit based on this hard
7339 disk in the format and at the location defined by the @a target
7340 argument.
7341
7342 The target hard disk must be in <link to="MediaState::NotCreated"/>
7343 state (i.e. must not have an existing storage unit). Upon successful
7344 completion, this operation will set the type of the target hard disk to
7345 <link to="HardDiskType::Normal"/> and create a storage unit necessary to
7346 represent the differencing hard disk data in the given format (according
7347 to the storage format of the target object).
7348
7349 After the returned progress object reports that the operation is
7350 successfully complete, the target hard disk gets remembered by this
7351 VirtualBox installation and may be attached to virtual machines.
7352
7353 <note>
7354 The hard disk will be placed to <link to="MediaState::LockedRead"/>
7355 state for the duration of this operation.
7356 </note>
7357 </desc> <param name="target" type="IHardDisk2" dir="in">
7358 <desc>Target hard disk.</desc>
7359 </param>
7360 <param name="progress" type="IProgress" dir="return">
7361 <desc>Progress object to track the operation completion.</desc>
7362 </param>
7363 </method>
7364
7365 <method name="mergeTo">
7366 <desc>
7367 Starts merging the contents of this hard disk and all intermediate
7368 differencing hard disks in the chain to the given target hard disk.
7369
7370 The target hard disk must be either a descendant of this hard disk or
7371 its ancestor (otherwise this method will immediately return a failure).
7372 It follows that there are two logical directions of the merge operation:
7373 from ancestor to descendant (<i>forward merge</i>) and from descendant to
7374 ancestor (<i>backward merge</i>). Let us consider the following hard disk
7375 chain:
7376
7377 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
7378
7379 Here, calling this method on the <tt>Base</tt> hard disk object with
7380 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
7381 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
7382 merge. Note that in both cases the contents of the resulting hard disk
7383 will be the same, the only difference is the hard disk object that takes
7384 the result of the merge operation. In case of the forward merge in the
7385 above example, the result will be written to <tt>Diff_2</tt>; in case of
7386 the backward merge, the result will be written to <tt>Base</tt>. In
7387 other words, the result of the operation is always stored in the target
7388 hard disk.
7389
7390 Upon successful operation completion, the storage units of all hard
7391 disks in the chain between this (source) hard disk and the target hard
7392 disk, including the source hard disk itself, will be automatically
7393 deleted and the relevant hard disk objects (including this hard disk)
7394 will become uninitialized. This means that any attempt to call any of
7395 their methods or attributes will fail with the
7396 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
7397 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
7398 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
7399 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
7400 disk itself since it will no longer be based on any other hard disk.
7401
7402 Considering the above, all of the following conditions must be met in
7403 order for the merge operation to succeed:
7404 <ul>
7405 <li>
7406 Neither this (source) hard disk nor any intermediate
7407 differencing hard disk in the chain between it and the target
7408 hard disk is attached to any virtual machine.
7409 </li>
7410 <li>
7411 Neither the source hard disk nor the target hard disk is an
7412 <link to="HardDiskType::Immutable"/> hard disk.
7413 </li>
7414 <li>
7415 The part of the hard disk tree from the source hard disk to the
7416 target hard disk is a linear chain, i.e. all hard disks in this
7417 chain have exactly one child which is the next hard disk in this
7418 chain. The only exception from this rule is the target hard disk in
7419 the forward merge operation; it is allowed to have any number of
7420 child hard disks because the merge operation will hot change its
7421 logical contents (as it is seen by the guest OS or by children).
7422 </li>
7423 <li>
7424 None of the involved hard disks are in
7425 <link to="MediaState::LockedRead"/> or
7426 <link to="MediaState::LockedWrite"/> state.
7427 </li>
7428 </ul>
7429
7430 <note>
7431 This (source) hard disk and all intermediates will be placed to <link
7432 to="MediaState::Deleting"/> state and the target hard disk will be
7433 placed to <link to="MediaState::LockedWrite"/> state and for the
7434 duration of this operation.
7435 </note>
7436 </desc>
7437 <param name="targetId" type="uuid" dir="in">
7438 <desc>UUID of the target ancestor or descendant hard disk.</desc>
7439 </param>
7440 <param name="progress" type="IProgress" dir="return">
7441 <desc>Progress object to track the operation completion.</desc>
7442 </param>
7443 </method>
7444
7445 <!-- clone methods -->
7446
7447 <method name="cloneTo">
7448 <desc>
7449 Starts creating a clone of this hard disk in the format and at the
7450 location defined by the @a target argument.
7451
7452 The target hard disk must be in <link to="MediaState::NotCreated"/>
7453 state (i.e. must not have an existing storage unit). Upon successful
7454 completion, the cloned hard disk will contain exactly the same sector
7455 data as the hard disk being cloned, except that a new UUID for the clone
7456 will be randomly generated.
7457
7458 After the returned progress object reports that the operation is
7459 successfully complete, the target hard disk gets remembered by this
7460 VirtualBox installation and may be attached to virtual machines.
7461
7462 <note>
7463 If the cloned hard disk is a differencing hard disk, it will inherit
7464 parent dependency of the original hard disk.
7465 </note>
7466 <note>
7467 This hard disk will be placed to <link to="MediaState::LockedRead"/>
7468 state for the duration of this operation.
7469 </note>
7470 </desc>
7471 <param name="target" type="IHardDisk2" dir="in">
7472 <desc>Target hard disk.</desc>
7473 </param>
7474 <param name="progress" type="IProgress" dir="return">
7475 <desc>Progress object to track the operation completion.</desc>
7476 </param>
7477 </method>
7478
7479 <method name="flattenTo">
7480 <desc>
7481 Starts creating a deep (independent) clone of this hard disk in the
7482 format and at the location defined by the @a target argument.
7483
7484 This operation is similar to <link to="#cloneTo()"/> except that when
7485 applied to a differencing hard disk, it will also copy missing hard disk
7486 data from all parent hard disks it is linked to. This will make the
7487 created clone an independent base hard disk that contains all hard disk
7488 data and does not need any other hard disks to operate.
7489
7490 After the returned progress object reports that the operation is
7491 successfully complete, the target hard disk gets remembered by this
7492 VirtualBox installation and may be attached to virtual machines.
7493
7494 <note>
7495 For base hard disks, this operation is identical to
7496 <link to="#cloneTo()"/>.
7497 </note>
7498 <note>
7499 This hard disk and all its parent hard disks will be placed to <link
7500 to="MediaState::LockedRead"/> state for the duration of this
7501 operation.
7502 </note>
7503 </desc>
7504 <param name="target" type="IHardDisk2" dir="in">
7505 <desc>Target hard disk.</desc>
7506 </param>
7507 <param name="progress" type="IProgress" dir="return">
7508 <desc>Progress object to track the operation completion.</desc>
7509 </param>
7510 </method>
7511
7512 </interface>
7513
7514
7515 <!--
7516 // IHardDiskFormat
7517 /////////////////////////////////////////////////////////////////////////
7518 -->
7519
7520 <enum
7521 name="DataType"
7522 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
7523 >
7524 <const name="Int32" value="0"/>
7525 <const name="Int8" value="1"/>
7526 <const name="String" value="2"/>
7527 </enum>
7528
7529 <enum
7530 name="DataFlags"
7531 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
7532 >
7533 <const name="None" value="0x00"/>
7534 <const name="Mandatory" value="0x01"/>
7535 <const name="Expert" value="0x02"/>
7536 <const name="Array" value="0x04"/>
7537 <const name="FlagMask" value="0x07"/>
7538 </enum>
7539
7540 <enum
7541 name="HardDiskFormatCapabilities"
7542 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
7543 >
7544 <desc>
7545 Hard disk format capability flags.
7546 </desc>
7547
7548 <const name="Uuid" value="0x01">
7549 <desc>
7550 Supports UUIDs as expected by VirtualBox code.
7551 </desc>
7552 </const>
7553
7554 <const name="CreateFixed" value="0x02">
7555 <desc>
7556 Supports creating fixed size images, allocating all space instantly.
7557 </desc>
7558 </const>
7559
7560 <const name="CreateDynamic" value="0x04">
7561 <desc>
7562 Supports creating dynamically growing images, allocating space on
7563 demand.
7564 </desc>
7565 </const>
7566
7567 <const name="CreateSplit2G" value="0x08">
7568 <desc>
7569 Supports creating images split in chunks of a bit less than 2 GBytes.
7570 </desc>
7571 </const>
7572
7573 <const name="Differencing" value="0x10">
7574 <desc>
7575 Supports being used as a format for differencing hard disks (see <link
7576 to="IHardDisk2::createDiffStorage"/>).
7577 </desc>
7578 </const>
7579
7580 <const name="Asynchronous" value="0x20">
7581 <desc>
7582 Supports asynchronous I/O operations for at least some configurations.
7583 </desc>
7584 </const>
7585
7586 <const name="File" value="0x40">
7587 <desc>
7588 The format backend operates on files. The <link to="IMedium::location"/>
7589 attribute of the hard disk specifies a file used to store hard disk
7590 data. For a list of supported file extensions see
7591 <link to="IHardDiskFormat::fileExtensions"/>.
7592 </desc>
7593 </const>
7594
7595 <const name="Properties" value="0x80">
7596 <desc>
7597 The format backend uses the property interface to configure the storage
7598 location and properties. The <link to="IHardDiskFormat::describeProperties"/>
7599 method is used to get access to properties supported by the given hard
7600 disk format.
7601 </desc>
7602 </const>
7603
7604 <const name="CapabilityMask" value="0xFF"/>
7605 </enum>
7606
7607 <interface
7608 name="IHardDiskFormat" extends="$unknown"
7609 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
7610 wsmap="managed"
7611 >
7612 <desc>
7613 The IHardDiskFormat interface represents a virtual hard disk format.
7614
7615 Each hard disk format has an associated backend which is used to handle
7616 hard disks stored in this format. This interface provides information
7617 about the properties of the associated backend.
7618
7619 Each hard disk format is identified by a string represented by the
7620 <link to="#id"/> attribute. This string is used in calls like
7621 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
7622 format.
7623
7624 The list of all supported hard disk formats can be obtained using
7625 <link to="ISystemProperties::hardDiskFormats"/>.
7626
7627 <see>IHardDisk2</see>
7628 </desc>
7629
7630 <attribute name="id" type="wstring" readonly="yes">
7631 <desc>
7632 Identifier of this format.
7633
7634 This string is used in methods of other interfaces where it is necessary
7635 to specify a hard disk format, such as
7636 <link to="IVirtualBox::createHardDisk2()"/>.
7637 </desc>
7638 </attribute>
7639
7640 <attribute name="name" type="wstring" readonly="yes">
7641 <desc>
7642 Human readable description of this format.
7643
7644 Mainly for use in file open dialogs.
7645 </desc>
7646 </attribute>
7647
7648 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
7649 <desc>
7650 Array of strings containing the supported file extensions.
7651
7652 The first extension in the array is the extension preferred by the
7653 backend. It is recommended to use this extension when specifying a
7654 location of the storage unit for a new hard disk.
7655
7656 Note that some backends do not work on files, so this array may be
7657 empty.
7658
7659 <see>IHardDiskFormat::capabilities</see>
7660 </desc>
7661 </attribute>
7662
7663 <attribute name="capabilities" type="unsigned long" readonly="yes">
7664 <desc>
7665 Capabilities of the format as a set of bit flags.
7666
7667 For the meaning of individual capability flags see
7668 <link to="HardDiskFormatCapabilities"/>.
7669 </desc>
7670 </attribute>
7671
7672 <method name="describeProperties">
7673 <desc>
7674 Returns several arrays describing the properties supported by this
7675 format.
7676
7677 An element with the given index in each array describes one
7678 property. Thus, the number of elements in each returned array is the
7679 same and corresponds to the number of supported properties.
7680
7681 The returned arrays are not empty only if the
7682 <link to="HardDiskFormatCapabilities::Properties"/> flag is set.
7683
7684 <see>DataType</see>
7685 <see>DataFlags</see>
7686 </desc>
7687
7688 <param name="names" type="wstring" safearray="yes" dir="out">
7689 <desc>Array of property names.</desc>
7690 </param>
7691 <param name="description" type="wstring" safearray="yes" dir="out">
7692 <desc>Array of property descriptions.</desc>
7693 </param>
7694 <param name="types" type="DataType" safearray="yes" dir="out">
7695 <desc>Array of property types.</desc>
7696 </param>
7697 <param name="flags" type="unsigned long" safearray="yes" dir="out">
7698 <desc>Array of property flags.</desc>
7699 </param>
7700 <param name="defaults" type="wstring" safearray="yes" dir="out">
7701 <desc>Array of default property values.</desc>
7702 </param>
7703 </method>
7704
7705 </interface>
7706
7707
7708 <!--
7709 // IFloppyImage2
7710 /////////////////////////////////////////////////////////////////////////
7711 -->
7712
7713 <interface
7714 name="IFloppyImage2" extends="IMedium"
7715 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
7716 wsmap="managed"
7717 >
7718 <desc>
7719 The IFloppyImage2 interface represents a medium containing the image
7720 of a floppy disk.
7721 </desc>
7722
7723 </interface>
7724
7725
7726 <!--
7727 // IDVDImage2
7728 /////////////////////////////////////////////////////////////////////////
7729 -->
7730
7731 <interface
7732 name="IDVDImage2" extends="IMedium"
7733 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
7734 wsmap="managed"
7735 >
7736 <desc>
7737 The IDVDImage2 interface represents a medium containing the image
7738 of a CD or DVD disk in the ISO format.
7739 </desc>
7740
7741 </interface>
7742
7743
7744 <!--
7745 // IDVDDrive
7746 /////////////////////////////////////////////////////////////////////////
7747 -->
7748
7749 <interface
7750 name="IDVDDrive" extends="$unknown"
7751 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
7752 wsmap="managed"
7753 >
7754 <desc>
7755 The IDVDDrive interface represents the virtual CD/DVD drive of the
7756 virtual machine. An object of this type is returned by
7757 <link to="IMachine::DVDDrive"/>.
7758 </desc>
7759
7760 <attribute name="state" type="DriveState" readonly="yes">
7761 <desc>Current drive state.</desc>
7762 </attribute>
7763
7764 <attribute name="passthrough" type="boolean">
7765 <desc>
7766 When a host drive is mounted and passthrough is enabled
7767 the guest OS will be able to directly send SCSI commands to
7768 the host drive. This enables the guest OS to use CD/DVD writers
7769 but is potentially dangerous.
7770 </desc>
7771 </attribute>
7772
7773 <method name="mountImage">
7774 <desc>Mounts a CD/DVD image with the specified UUID.</desc>
7775 <param name="imageId" type="uuid" dir="in"/>
7776 </method>
7777
7778 <method name="captureHostDrive">
7779 <desc>Captures the specified host CD/DVD drive.</desc>
7780 <param name="drive" type="IHostDVDDrive" dir="in"/>
7781 </method>
7782
7783 <method name="unmount">
7784 <desc>Unmounts the currently mounted image or host drive.</desc>
7785 </method>
7786
7787 <method name="getImage">
7788 <desc>Returns the currently mounted CD/DVD image.</desc>
7789 <param name="image" type="IDVDImage2" dir="return"/>
7790 </method>
7791
7792 <method name="getHostDrive">
7793 <desc>Returns the currently mounted host CD/DVD drive.</desc>
7794 <param name="drive" type="IHostDVDDrive" dir="return"/>
7795 </method>
7796
7797 </interface>
7798
7799
7800 <!--
7801 // IFloppyDrive
7802 /////////////////////////////////////////////////////////////////////////
7803 -->
7804
7805 <interface
7806 name="IFloppyDrive" extends="$unknown"
7807 uuid="159412cd-bab8-452e-8097-218a020825a6"
7808 wsmap="managed"
7809 >
7810 <desc>
7811 The IFloppyDrive interface represents the virtual floppy drive of the
7812 virtual machine. An object of this type is returned by
7813 <link to="IMachine::floppyDrive" />.
7814 </desc>
7815
7816 <attribute name="enabled" type="boolean">
7817 <desc>
7818 Flag whether the floppy drive is enabled. If it is disabled,
7819 the floppy drive will not be reported to the guest OS.
7820 </desc>
7821 </attribute>
7822
7823 <attribute name="state" type="DriveState" readonly="yes">
7824 <desc>Current drive state.</desc>
7825 </attribute>
7826
7827 <method name="mountImage">
7828 <desc>Mounts a floppy image with the specified UUID.</desc>
7829 <param name="imageId" type="uuid" dir="in"/>
7830 </method>
7831
7832 <method name="captureHostDrive">
7833 <desc>Captures the specified host floppy drive.</desc>
7834 <param name="drive" type="IHostFloppyDrive" dir="in"/>
7835 </method>
7836
7837 <method name="unmount">
7838 <desc>Unmounts the currently mounted image or host drive.</desc>
7839 </method>
7840
7841 <method name="getImage">
7842 <desc>Returns the currently mounted floppy image.</desc>
7843 <param name="image" type="IFloppyImage2" dir="return"/>
7844 </method>
7845
7846 <method name="getHostDrive">
7847 <desc>Returns the currently mounted host floppy drive.</desc>
7848 <param name="drive" type="IHostFloppyDrive" dir="return"/>
7849 </method>
7850
7851 </interface>
7852
7853
7854 <!--
7855 // IKeyboard
7856 /////////////////////////////////////////////////////////////////////////
7857 -->
7858
7859 <interface
7860 name="IKeyboard" extends="$unknown"
7861 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
7862 wsmap="managed"
7863 >
7864 <desc>
7865 The IKeyboard interface represents the virtual machine's keyboard. Used
7866 in <link to="IConsole::keyboard"/>.
7867
7868 Through this interface, the virtual machine's virtual keyboard can be controlled. One
7869 can send keystrokes to the virtual machine and send the Ctrl-Alt-Del sequence to it.
7870 </desc>
7871 <method name="putScancode">
7872 <desc>Sends a scancode to the keyboard.</desc>
7873 <param name="scancode" type="long" dir="in"/>
7874 </method>
7875
7876 <method name="putScancodes">
7877 <desc>Sends an array of scancode to the keyboard.</desc>
7878 <param name="scancodes" type="long" dir="in" safearray="yes"/>
7879 <param name="codesStored" type="unsigned long" dir="return"/>
7880 </method>
7881
7882 <method name="putCAD">
7883 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard.</desc>
7884 </method>
7885
7886 </interface>
7887
7888
7889 <!--
7890 // IMouse
7891 /////////////////////////////////////////////////////////////////////////
7892 -->
7893
7894 <enum
7895 name="MouseButtonState"
7896 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
7897 >
7898 <desc>
7899 Mouse button state.
7900 </desc>
7901
7902 <const name="LeftButton" value="0x01"/>
7903 <const name="RightButton" value="0x02"/>
7904 <const name="MiddleButton" value="0x04"/>
7905 <const name="WheelUp" value="0x08"/>
7906 <const name="WheelDown" value="0x10"/>
7907 <const name="MouseStateMask" value="0x1F"/>
7908 </enum>
7909
7910 <interface
7911 name="IMouse" extends="$unknown"
7912 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
7913 wsmap="managed"
7914 >
7915 <desc>
7916 The IMouse interface represents the virtual machine's mouse. Used in
7917 <link to="IConsole::mouse"/>.
7918
7919 Through this interface, the virtual machine's virtual mouse can be
7920 controlled.
7921 </desc>
7922
7923 <attribute name="absoluteSupported" type="boolean" readonly="yes">
7924 <desc>
7925 Whether the guest OS supports absolute mouse pointer positioning
7926 or not.
7927 <note>
7928 VirtualBox Guest Tools need to be installed to the guest OS
7929 in order to enable absolute mouse positioning support.
7930 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
7931 callback to be instantly informed about changes of this attribute
7932 during virtual machine execution.
7933 </note>
7934 <see><link to="#putMouseEventAbsolute"/></see>
7935 </desc>
7936 </attribute>
7937
7938 <method name="putMouseEvent">
7939 <desc>
7940 Initiates a mouse event using relative pointer movements
7941 along x and y axis.
7942 </desc>
7943
7944 <param name="dx" type="long" dir="in">
7945 <desc>
7946 Amount of pixels the mouse should move to the right.
7947 Negative values move the mouse to the left.
7948 </desc>
7949 </param>
7950 <param name="dy" type="long" dir="in">
7951 <desc>
7952 Amount of pixels the mouse should move downwards.
7953 Negative values move the mouse upwards.
7954 </desc>
7955 </param>
7956 <param name="dz" type="long" dir="in">
7957 <desc>
7958 Amount of mouse wheel moves.
7959 Positive values describe clockwise wheel rotations,
7960 negative values describe counterclockwise rotations.
7961 </desc>
7962 </param>
7963 <param name="buttonState" type="long" dir="in">
7964 <desc>
7965 The current state of mouse buttons. Every bit represents
7966 a mouse button as follows:
7967 <table>
7968 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
7969 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
7970 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
7971 </table>
7972 A value of <tt>1</tt> means the corresponding button is pressed.
7973 otherwise it is released.
7974 </desc>
7975 </param>
7976 </method>
7977
7978 <method name="putMouseEventAbsolute">
7979 <desc>
7980 Positions the mouse pointer using absolute x and y coordinates.
7981 These coordinates are expressed in pixels and
7982 start from <tt>[1,1]</tt> which corresponds to the top left
7983 corner of the virtual display.
7984
7985 <note>
7986 This method will have effect only if absolute mouse
7987 positioning is supported by the guest OS.
7988 </note>
7989
7990 <see><link to="#absoluteSupported"/></see>
7991 </desc>
7992
7993 <param name="x" type="long" dir="in">
7994 <desc>
7995 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
7996 </desc>
7997 </param>
7998 <param name="y" type="long" dir="in">
7999 <desc>
8000 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
8001 </desc>
8002 </param>
8003 <param name="dz" type="long" dir="in">
8004 <desc>
8005 Amount of mouse wheel moves.
8006 Positive values describe clockwise wheel rotations,
8007 negative values describe counterclockwise rotations.
8008 </desc>
8009 </param>
8010 <param name="buttonState" type="long" dir="in">
8011 <desc>
8012 The current state of mouse buttons. Every bit represents
8013 a mouse button as follows:
8014 <table>
8015 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
8016 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
8017 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
8018 </table>
8019 A value of <tt>1</tt> means the corresponding button is pressed.
8020 otherwise it is released.
8021 </desc>
8022 </param>
8023 </method>
8024
8025 </interface>
8026
8027 <!--
8028 // IDisplay
8029 /////////////////////////////////////////////////////////////////////////
8030 -->
8031
8032 <enum
8033 name="FramebufferAccelerationOperation"
8034 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
8035 >
8036 <desc>
8037 Frame buffer acceleration operation.
8038 </desc>
8039
8040 <const name="SolidFillAcceleration" value="1"/>
8041 <const name="ScreenCopyAcceleration" value="2"/>
8042 </enum>
8043
8044 <enum
8045 name="FramebufferPixelFormat"
8046 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
8047 >
8048 <desc>
8049 Format of the video memory buffer. Constants represented by this enum can
8050 be used to test for particular values of <link
8051 to="IFramebuffer::pixelFormat"/>. See also <link
8052 to="IFramebuffer::requestResize()"/>.
8053
8054 See also www.fourcc.org for more information about FOURCC pixel formats.
8055 </desc>
8056
8057 <const name="Opaque" value="0xFFFFFFFF">
8058 <desc>
8059 Unknown buffer format. The user may not assume any particular
8060 format of the buffer.
8061 </desc>
8062 </const>
8063 <const name="FOURCC_RGB" value="0x32424752">
8064 <desc>
8065 Basic RGB format. <link to="IFramebuffer::bitsPerPixel"/> determines
8066 the bit layout.
8067 </desc>
8068 </const>
8069 </enum>
8070
8071 <interface
8072 name="IFramebuffer" extends="$unknown"
8073 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
8074 wsmap="suppress"
8075 >
8076 <attribute name="address" type="octet" mod="ptr" readonly="yes">
8077 <desc>Address of the start byte of the frame buffer.</desc>
8078 </attribute>
8079
8080 <attribute name="width" type="unsigned long" readonly="yes">
8081 <desc>Frame buffer width, in pixels.</desc>
8082 </attribute>
8083
8084 <attribute name="height" type="unsigned long" readonly="yes">
8085 <desc>Frame buffer height, in pixels.</desc>
8086 </attribute>
8087
8088 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8089 <desc>
8090 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
8091 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
8092 are: 8, 15, 16, 24 and 32.
8093 </desc>
8094 </attribute>
8095
8096 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
8097 <desc>
8098 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
8099 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
8100 size of the scan line must be aligned to 32 bits.
8101 </desc>
8102 </attribute>
8103
8104 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
8105 <desc>
8106 Frame buffer pixel format. It's either one of the values defined by <link
8107 to="FramebufferPixelFormat"/> or a raw FOURCC code.
8108 <note>
8109 This attribute must never return <link
8110 to="PixelFormat::Opaque"/> -- the format of the buffer
8111 <link to="#address"/> points to must be always known.
8112 </note>
8113 </desc>
8114 </attribute>
8115
8116 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
8117 <desc>
8118 Defines whether this frame buffer uses the virtual video card's memory
8119 buffer (guest VRAM) directly or not. See <link
8120 to="IFramebuffer::requestResize()"/> for more information.
8121 </desc>
8122 </attribute>
8123
8124 <attribute name="heightReduction" type="unsigned long" readonly="yes">
8125 <desc>
8126 Hint from the frame buffer about how much of the standard
8127 screen height it wants to use for itself. This information is
8128 exposed to the guest through the VESA BIOS and VMMDev interface
8129 so that it can use it for determining its video mode table. It
8130 is not guaranteed that the guest respects the value.
8131 </desc>
8132 </attribute>
8133
8134 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
8135 <desc>
8136 An alpha-blended overlay which is superposed over the frame buffer.
8137 The initial purpose is to allow the display of icons providing
8138 information about the VM state, including disk activity, in front
8139 ends which do not have other means of doing that. The overlay is
8140 designed to controlled exclusively by IDisplay. It has no locking
8141 of its own, and any changes made to it are not guaranteed to be
8142 visible until the affected portion of IFramebuffer is updated. The
8143 overlay can be created lazily the first time it is requested. This
8144 attribute can also return NULL to signal that the overlay is not
8145 implemented.
8146 </desc>
8147 </attribute>
8148
8149 <attribute name="winId" type="unsigned long long" readonly="yes">
8150 <desc>
8151 Platform-dependent identifier of the window where context of this
8152 frame buffer is drawn, or zero if there's no such window.
8153 </desc>
8154 </attribute>
8155
8156 <method name="lock">
8157 <desc>
8158 Locks the frame buffer.
8159 Gets called by the IDisplay object where this frame buffer is
8160 bound to.
8161 </desc>
8162 </method>
8163
8164 <method name="unlock">
8165 <desc>
8166 Unlocks the frame buffer.
8167 Gets called by the IDisplay object where this frame buffer is
8168 bound to.
8169 </desc>
8170 </method>
8171
8172 <method name="notifyUpdate">
8173 <desc>
8174 Informs about an update.
8175 Gets called by the display object where this buffer is
8176 registered.
8177 </desc>
8178 <param name="x" type="unsigned long" dir="in"/>
8179 <param name="y" type="unsigned long" dir="in"/>
8180 <param name="width" type="unsigned long" dir="in"/>
8181 <param name="height" type="unsigned long" dir="in"/>
8182 <param name="finished" type="boolean" dir="return"/>
8183 </method>
8184
8185 <method name="requestResize">
8186 <desc>
8187 Requests a size and pixel format change.
8188
8189 There are two modes of working with the video buffer of the virtual
8190 machine. The <i>indirect</i> mode implies that the IFramebuffer
8191 implementation allocates a memory buffer for the requested display mode
8192 and provides it to the virtual machine. In <i>direct</i> mode, the
8193 IFramebuffer implementation uses the memory buffer allocated and owned
8194 by the virtual machine. This buffer represents the video memory of the
8195 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
8196 usually faster because the implementation gets a raw pointer to the
8197 guest VRAM buffer which it can directly use for visualizing the contents
8198 of the virtual display, as opposed to the indirect mode where the
8199 contents of guest VRAM are copied to the memory buffer provided by
8200 the implementation every time a display update occurs.
8201
8202 It is important to note that the direct mode is really fast only when
8203 the implementation uses the given guest VRAM buffer directly, for
8204 example, by blitting it to the window representing the virtual machine's
8205 display, which saves at least one copy operation comparing to the
8206 indirect mode. However, using the guest VRAM buffer directly is not
8207 always possible: the format and the color depth of this buffer may be
8208 not supported by the target window, or it may be unknown (opaque) as in
8209 case of text or non-linear multi-plane VGA video modes. In this case,
8210 the indirect mode (that is always available) should be used as a
8211 fallback: when the guest VRAM contents are copied to the
8212 implementation-provided memory buffer, color and format conversion is
8213 done automatically by the underlying code.
8214
8215 The @a pixelFormat parameter defines whether the direct mode is
8216 available or not. If @a pixelFormat is <link
8217 to="PixelFormat::Opaque"/> then direct access to the guest
8218 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
8219 bytesPerLine parameters must be ignored and the implementation must use
8220 the indirect mode (where it provides its own buffer in one of the
8221 supported formats). In all other cases, @a pixelFormat together with @a
8222 bitsPerPixel and @a bytesPerLine define the format of the video memory
8223 buffer pointed to by the @a VRAM parameter and the implementation is
8224 free to choose which mode to use. To indicate that this frame buffer uses
8225 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
8226 attribute must return <tt>true</tt> and <link to="#address"/> must
8227 return exactly the same address that is passed in the @a VRAM parameter
8228 of this method; otherwise it is assumed that the indirect strategy is
8229 chosen.
8230
8231 The @a width and @a height parameters represent the size of the
8232 requested display mode in both modes. In case of indirect mode, the
8233 provided memory buffer should be big enough to store data of the given
8234 display mode. In case of direct mode, it is guaranteed that the given @a
8235 VRAM buffer contains enough space to represent the display mode of the
8236 given size. Note that this frame buffer's <link to="#width"/> and <link
8237 to="#height"/> attributes must return exactly the same values as
8238 passed to this method after the resize is completed (see below).
8239
8240 The @a finished output parameter determines if the implementation has
8241 finished resizing the frame buffer or not. If, for some reason, the
8242 resize cannot be finished immediately during this call, @a finished
8243 must be set to @c false, and the implementation must call
8244 <link to="IDisplay::resizeCompleted()"/> after it has returned from
8245 this method as soon as possible. If @a finished is @c false, the
8246 machine will not call any frame buffer methods until
8247 <link to="IDisplay::resizeCompleted()"/> is called.
8248
8249 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
8250 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
8251 this frame buffer must return exactly the same values as specified in the
8252 parameters of this method, after the resize is completed. If the
8253 indirect mode is chosen, these attributes must return values describing
8254 the format of the implementation's own memory buffer <link
8255 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
8256 value must always correlate with <link to="#pixelFormat"/>. Note that
8257 the <link to="#pixelFormat"/> attribute must never return <link
8258 to="PixelFormat::Opaque"/> regardless of the selected mode.
8259
8260 <note>
8261 This method is called by the IDisplay object under the
8262 <link to="#lock()"/> provided by this IFramebuffer
8263 implementation. If this method returns @c false in @a finished, then
8264 this lock is not released until
8265 <link to="IDisplay::resizeCompleted()"/> is called.
8266 </note>
8267 </desc>
8268 <param name="screenId" type="unsigned long" dir="in">
8269 <desc>
8270 Logical screen number. Must be used in the corresponding call to
8271 <link to="IDisplay::resizeCompleted()"/> if this call is made.
8272 </desc>
8273 </param>
8274 <param name="pixelFormat" type="unsigned long" dir="in">
8275 <desc>
8276 Pixel format of the memory buffer pointed to by @a VRAM.
8277 See also <link to="FramebufferPixelFormat"/>.
8278 </desc>
8279 </param>
8280 <param name="VRAM" type="octet" mod="ptr" dir="in">
8281 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
8282 </param>
8283 <param name="bitsPerPixel" type="unsigned long" dir="in">
8284 <desc>Color depth, bits per pixel.</desc>
8285 </param>
8286 <param name="bytesPerLine" type="unsigned long" dir="in">
8287 <desc>Size of one scan line, in bytes.</desc>
8288 </param>
8289 <param name="width" type="unsigned long" dir="in">
8290 <desc>Width of the guest display, in pixels.</desc>
8291 </param>
8292 <param name="height" type="unsigned long" dir="in">
8293 <desc>Height of the guest display, in pixels.</desc>
8294 </param>
8295 <param name="finished" type="boolean" dir="return">
8296 <desc>
8297 Can the VM start using the new frame buffer immediately
8298 after this method returns or it should wait for
8299 <link to="IDisplay::resizeCompleted()"/>.
8300 </desc>
8301 </param>
8302 </method>
8303
8304 <method name="operationSupported">
8305 <desc>
8306 Returns whether the given acceleration operation is supported
8307 by the IFramebuffer implementation. If not, the display object
8308 will not attempt to call the corresponding IFramebuffer entry
8309 point. Even if an operation is indicated to supported, the
8310 IFramebuffer implementation always has the option to return non
8311 supported from the corresponding acceleration method in which
8312 case the operation will be performed by the display engine. This
8313 allows for reduced IFramebuffer implementation complexity where
8314 only common cases are handled.
8315 </desc>
8316 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
8317 <param name="supported" type="boolean" dir="return"/>
8318 </method>
8319
8320 <method name="videoModeSupported">
8321 <desc>
8322 Returns whether the frame buffer implementation is willing to
8323 support a given video mode. In case it is not able to render
8324 the video mode (or for some reason not willing), it should
8325 return false. Usually this method is called when the guest
8326 asks the VMM device whether a given video mode is supported
8327 so the information returned is directly exposed to the guest.
8328 It is important that this method returns very quickly.
8329 </desc>
8330 <param name="width" type="unsigned long" dir="in"/>
8331 <param name="height" type="unsigned long" dir="in"/>
8332 <param name="bpp" type="unsigned long" dir="in"/>
8333 <param name="supported" type="boolean" dir="return"/>
8334 </method>
8335
8336 <method name="solidFill">
8337 <desc>
8338 Fills the specified rectangle on screen with a solid color.
8339 </desc>
8340 <param name="x" type="unsigned long" dir="in"/>
8341 <param name="y" type="unsigned long" dir="in"/>
8342 <param name="width" type="unsigned long" dir="in"/>
8343 <param name="height" type="unsigned long" dir="in"/>
8344 <param name="color" type="unsigned long" dir="in"/>
8345 <param name="handled" type="boolean" dir="return"/>
8346 </method>
8347
8348 <method name="copyScreenBits">
8349 <desc>
8350 Copies specified rectangle on the screen.
8351 </desc>
8352 <param name="xDst" type="unsigned long" dir="in"/>
8353 <param name="yDst" type="unsigned long" dir="in"/>
8354 <param name="xSrc" type="unsigned long" dir="in"/>
8355 <param name="ySrc" type="unsigned long" dir="in"/>
8356 <param name="width" type="unsigned long" dir="in"/>
8357 <param name="height" type="unsigned long" dir="in"/>
8358 <param name="handled" type="boolean" dir="return"/>
8359 </method>
8360
8361 <method name="getVisibleRegion">
8362 <desc>
8363 Returns the visible region of this frame buffer.
8364
8365 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
8366 @a count parameter is ignored and the number of elements necessary to
8367 describe the current visible region is returned in @a countCopied.
8368
8369 If @a rectangles is not <tt>NULL</tt> but @a count is less
8370 than the required number of elements to store region data, the method
8371 will report a failure. If @a count is equal or greater than the
8372 required number of elements, then the actual number of elements copied
8373 to the provided array will be returned in @a countCopied.
8374
8375 <note>
8376 The address of the provided array must be in the process space of
8377 this IFramebuffer object.
8378 </note>
8379 </desc>
8380 <param name="rectangles" type="octet" mod="ptr" dir="in">
8381 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
8382 </param>
8383 <param name="count" type="unsigned long" dir="in">
8384 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8385 </param>
8386 <param name="countCopied" type="unsigned long" dir="return">
8387 <desc>Number of elements copied to the @a rectangles array.</desc>
8388 </param>
8389 </method>
8390
8391 <method name="setVisibleRegion">
8392 <desc>
8393 Suggests a new visible region to this frame buffer. This region
8394 represents the area of the VM display which is a union of regions of
8395 all top-level windows of the guest operating system running inside the
8396 VM (if the Guest Additions for this system support this
8397 functionality). This information may be used by the frontends to
8398 implement the seamless desktop integration feature.
8399
8400 <note>
8401 The address of the provided array must be in the process space of
8402 this IFramebuffer object.
8403 </note>
8404 <note>
8405 The IFramebuffer implementation must make a copy of the provided
8406 array of rectangles.
8407 </note>
8408 </desc>
8409 <param name="rectangles" type="octet" mod="ptr" dir="in">
8410 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
8411 </param>
8412 <param name="count" type="unsigned long" dir="in">
8413 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8414 </param>
8415 </method>
8416
8417 </interface>
8418
8419 <interface
8420 name="IFramebufferOverlay" extends="IFrameBuffer"
8421 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
8422 wsmap="suppress"
8423 >
8424 <desc>
8425 The IFramebufferOverlay interface represents an alpha blended overlay
8426 for displaying status icons above an IFramebuffer. It is always created
8427 not visible, so that it must be explicitly shown. It only covers a
8428 portion of the IFramebuffer, determined by its width, height and
8429 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
8430 that order) format, and may be written to directly. Do re-read the
8431 width though, after setting it, as it may be adjusted (increased) to
8432 make it more suitable for the front end.
8433 </desc>
8434 <attribute name="x" type="unsigned long" readonly="yes">
8435 <desc>X position of the overlay, relative to the frame buffer.</desc>
8436 </attribute>
8437
8438 <attribute name="y" type="unsigned long" readonly="yes">
8439 <desc>Y position of the overlay, relative to the frame buffer.</desc>
8440 </attribute>
8441
8442 <attribute name="visible" type="boolean" readonly="no">
8443 <desc>
8444 Whether the overlay is currently visible.
8445 </desc>
8446 </attribute>
8447
8448 <attribute name="alpha" type="unsigned long" readonly="no">
8449 <desc>
8450 The global alpha value for the overlay. This may or may not be
8451 supported by a given front end.
8452 </desc>
8453 </attribute>
8454
8455 <method name="move">
8456 <desc>
8457 Changes the overlay's position relative to the IFramebuffer.
8458 </desc>
8459 <param name="x" type="unsigned long" dir="in"/>
8460 <param name="y" type="unsigned long" dir="in"/>
8461 </method>
8462
8463 </interface>
8464
8465 <interface
8466 name="IDisplay" extends="$unknown"
8467 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
8468 wsmap="suppress"
8469 >
8470 <desc>
8471 The IDisplay interface represents the virtual machine's display.
8472
8473 The object implementing this interface is contained in each
8474 <link to="IConsole::display"/> attribute and represents the visual
8475 output of the virtual machine.
8476
8477 The virtual display supports pluggable output targets represented by the
8478 IFramebuffer interface. Examples of the output target are a window on
8479 the host computer or an RDP session's display on a remote computer.
8480 </desc>
8481 <attribute name="width" type="unsigned long" readonly="yes">
8482 <desc>Current display width.</desc>
8483 </attribute>
8484
8485 <attribute name="height" type="unsigned long" readonly="yes">
8486 <desc>Current display height.</desc>
8487 </attribute>
8488
8489 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8490 <desc>
8491 Current guest display color depth. Note that this may differ
8492 from <link to="IFramebuffer::bitsPerPixel"/>.
8493 </desc>
8494 </attribute>
8495
8496 <method name="setupInternalFramebuffer">
8497 <desc>
8498 Prepares an internally managed frame buffer.
8499 </desc>
8500 <param name="depth" type="unsigned long" dir="in"/>
8501 </method>
8502
8503 <method name="lockFramebuffer">
8504 <desc>
8505 Requests access to the internal frame buffer.
8506 </desc>
8507 <param name="address" type="octet" mod="ptr" dir="return"/>
8508 </method>
8509
8510 <method name="unlockFramebuffer">
8511 <desc>
8512 Releases access to the internal frame buffer.
8513 </desc>
8514 </method>
8515
8516 <method name="registerExternalFramebuffer">
8517 <desc>
8518 Registers an external frame buffer.
8519 </desc>
8520 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8521 </method>
8522
8523 <method name="setFramebuffer">
8524 <desc>
8525 Sets the framebuffer for given screen.
8526 </desc>
8527 <param name="screenId" type="unsigned long" dir="in"/>
8528 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8529 </method>
8530
8531 <method name="getFramebuffer">
8532 <desc>
8533 Queries the framebuffer for given screen.
8534 </desc>
8535 <param name="screenId" type="unsigned long" dir="in"/>
8536 <param name="framebuffer" type="IFramebuffer" dir="out"/>
8537 <param name="xOrigin" type="long" dir="out"/>
8538 <param name="yOrigin" type="long" dir="out"/>
8539 </method>
8540
8541 <method name="setVideoModeHint">
8542 <desc>
8543 Asks VirtualBox to request the given video mode from
8544 the guest. This is just a hint and it cannot be guaranteed
8545 that the requested resolution will be used. Guest Additions
8546 are required for the request to be seen by guests. The caller
8547 should issue the request and wait for a resolution change and
8548 after a timeout retry.
8549
8550 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
8551 parameters means that the corresponding values should be taken from the
8552 current video mode (i.e. left unchanged).
8553
8554 If the guest OS supports multi-monitor configuration then the @a display
8555 parameter specifies the number of the guest display to send the hint to:
8556 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
8557 so on. If the multi-monitor configuration is not supported, @a display
8558 must be <tt>0</tt>.
8559
8560 </desc>
8561 <param name="width" type="unsigned long" dir="in"/>
8562 <param name="height" type="unsigned long" dir="in"/>
8563 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
8564 <param name="display" type="unsigned long" dir="in"/>
8565 </method>
8566
8567 <method name="setSeamlessMode">
8568 <desc>
8569 Enables or disables seamless guest display rendering (seamless desktop
8570 integration) mode.
8571 <note>
8572 Calling this method has no effect if <link
8573 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
8574 </note>
8575 </desc>
8576 <param name="enabled" type="boolean" dir="in"/>
8577 </method>
8578
8579 <method name="takeScreenShot">
8580 <desc>
8581 Takes a screen shot of the requested size and copies it to the
8582 32-bpp buffer allocated by the caller.
8583 </desc>
8584 <param name="address" type="octet" mod="ptr" dir="in"/>
8585 <param name="width" type="unsigned long" dir="in"/>
8586 <param name="height" type="unsigned long" dir="in"/>
8587 </method>
8588
8589 <method name="drawToScreen">
8590 <desc>
8591 Draws a 32-bpp image of the specified size from the given buffer
8592 to the given point on the VM display.
8593 </desc>
8594 <param name="address" type="octet" mod="ptr" dir="in"/>
8595 <param name="x" type="unsigned long" dir="in"/>
8596 <param name="y" type="unsigned long" dir="in"/>
8597 <param name="width" type="unsigned long" dir="in"/>
8598 <param name="height" type="unsigned long" dir="in"/>
8599 </method>
8600
8601 <method name="invalidateAndUpdate">
8602 <desc>
8603 Does a full invalidation of the VM display and instructs the VM
8604 to update it.
8605 </desc>
8606 </method>
8607
8608 <method name="resizeCompleted">
8609 <desc>
8610 Signals that a framebuffer has completed the resize operation.
8611 </desc>
8612 <param name="screenId" type="unsigned long" dir="in"/>
8613 </method>
8614
8615 <method name="updateCompleted">
8616 <desc>
8617 Signals that a framebuffer has completed the update operation.
8618 </desc>
8619 </method>
8620
8621 </interface>
8622
8623 <!--
8624 // INetworkAdapter
8625 /////////////////////////////////////////////////////////////////////////
8626 -->
8627
8628 <enum
8629 name="NetworkAttachmentType"
8630 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
8631 >
8632 <desc>
8633 Network attachment type.
8634 </desc>
8635
8636 <const name="Null" value="0">
8637 <desc><tt>null</tt> value. Also means "not attached".</desc>
8638 </const>
8639 <const name="NAT" value="1"/>
8640 <const name="HostInterface" value="2"/>
8641 <const name="Internal" value="3"/>
8642 </enum>
8643
8644 <enum
8645 name="NetworkAdapterType"
8646 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
8647 >
8648 <desc>
8649 Network adapter type.
8650 </desc>
8651
8652 <const name="Null" value="0">
8653 <desc><tt>null</tt> value. Never used by the API.</desc>
8654 </const>
8655 <const name="Am79C970A" value="1"/>
8656 <const name="Am79C973" value="2"/>
8657 <const name="I82540EM" value="3"/>
8658 <const name="I82543GC" value="4"/>
8659 </enum>
8660
8661 <interface
8662 name="INetworkAdapter" extends="$unknown"
8663 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
8664 wsmap="managed"
8665 >
8666 <attribute name="adapterType" type="NetworkAdapterType">
8667 <desc>
8668 Type of the virtual network adapter. Depending on this value,
8669 VirtualBox will provide a different virtual network hardware
8670 to the guest.
8671 </desc>
8672 </attribute>
8673
8674 <attribute name="slot" type="unsigned long" readonly="yes">
8675 <desc>
8676 Slot number this adapter is plugged into. Corresponds to
8677 the value you pass to <link to="IMachine::getNetworkAdapter"/>
8678 to obtain this instance.
8679 </desc>
8680 </attribute>
8681
8682 <attribute name="enabled" type="boolean">
8683 <desc>
8684 Flag whether the network adapter is present in the
8685 guest system. If disabled, the virtual guest hardware will
8686 not contain this network adapter. Can only be changed when
8687 the VM is not running.
8688 </desc>
8689 </attribute>
8690
8691 <attribute name="MACAddress" type="wstring">
8692 <desc>
8693 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
8694 it to NULL, VirtualBox will generate a unique MAC address.
8695 </desc>
8696 </attribute>
8697
8698 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
8699
8700 <attribute name="hostInterface" type="wstring">
8701 <desc>
8702 Name of the Host Network Interface that is currently in use. NULL will be returned
8703 if no device has been allocated. On Linux, setting this refers to a permanent TAP
8704 device. However, a file descriptor has precedence over the interface name on Linux.
8705 Note that when VirtualBox allocates a TAP device, this property will not be set, i.e. the
8706 interface name would have to be determined using the file descriptor and /proc/self/fd.
8707 </desc>
8708 </attribute>
8709
8710<if target="xpidl">
8711 <attribute name="TAPFileDescriptor" type="long">
8712 <desc>
8713 File descriptor of the TAP device. It can either be setup by the caller
8714 which has to supply an existing valid file handle allocated in the parent
8715 process of the VM process or allocated by VirtualBox. The value is -1 if it
8716 has not been defined. This property is non persistent, i.e. it will not be
8717 stored in the VM's configuration data and thus has to be set at each startup.
8718 </desc>
8719 </attribute>
8720 <attribute name="TAPSetupApplication" type="wstring">
8721 <desc>
8722 Application to start to configure the TAP device.
8723 It is being passed two parameters, 1) the file handle (as ASCII),
8724 2) the TAP device name if it is available.
8725 </desc>
8726 </attribute>
8727 <attribute name="TAPTerminateApplication" type="wstring">
8728 <desc>
8729 Application to start before closing a TAP device.
8730 It is being passed two parameters, 1) the file handle (as ASCII),
8731 2) the TAP device name if it is available.
8732 </desc>
8733 </attribute>
8734</if>
8735
8736 <attribute name="internalNetwork" type="wstring">
8737 <desc>
8738 Name of the internal network the VM is attached to.
8739 </desc>
8740 </attribute>
8741
8742 <attribute name="NATNetwork" type="wstring">
8743 <desc>
8744 Name of the NAT network the VM is attached to.
8745 </desc>
8746 </attribute>
8747
8748 <attribute name="cableConnected" type="boolean">
8749 <desc>
8750 Flag whether the adapter reports the cable as connected or not.
8751 It can be used to report offline situations to a VM.
8752 </desc>
8753 </attribute>
8754
8755 <attribute name="lineSpeed" type="unsigned long">
8756 <desc>
8757 Line speed reported by custom drivers, in units of 1 kbps.
8758 </desc>
8759 </attribute>
8760
8761 <attribute name="traceEnabled" type="boolean">
8762 <desc>
8763 Flag whether network traffic from/to the network card should be traced.
8764 Can only be toggled when the VM is turned off.
8765 </desc>
8766 </attribute>
8767
8768 <attribute name="traceFile" type="wstring">
8769 <desc>
8770 Filename where a network trace will be stored. If not set, VBox-pid.pcap
8771 will be used.
8772 </desc>
8773 </attribute>
8774
8775 <method name="attachToNAT">
8776 <desc>
8777 Attach the network adapter to the Network Address Translation (NAT) interface.
8778 </desc>
8779 </method>
8780
8781 <method name="attachToHostInterface">
8782 <desc>
8783 Attach the network adapter to a host interface. On Linux, the TAP
8784 setup application will be executed if configured and unless a device
8785 name and/or file descriptor has been set, a new TAP interface will be
8786 created.
8787 </desc>
8788 </method>
8789
8790 <method name="attachToInternalNetwork">
8791 <desc>
8792 Attach the network adapter to an internal network.
8793 </desc>
8794 </method>
8795
8796 <method name="detach">
8797 <desc>
8798 Detach the network adapter
8799 </desc>
8800 </method>
8801 </interface>
8802
8803
8804 <!--
8805 // ISerialPort
8806 /////////////////////////////////////////////////////////////////////////
8807 -->
8808
8809 <enum
8810 name="PortMode"
8811 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
8812 >
8813 <desc>
8814 The PortMode enumeration represents possible communication modes for
8815 the virtual serial port device.
8816 </desc>
8817
8818 <const name="Disconnected" value="0">
8819 <desc>Virtual device is not attached to any real host device.</desc>
8820 </const>
8821 <const name="HostPipe" value="1">
8822 <desc>Virtual device is attached to a host pipe.</desc>
8823 </const>
8824 <const name="HostDevice" value="2">
8825 <desc>Virtual device is attached to a host device.</desc>
8826 </const>
8827 </enum>
8828
8829 <interface
8830 name="ISerialPort" extends="$unknown"
8831 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
8832 wsmap="managed"
8833 >
8834
8835 <desc>
8836 The ISerialPort interface represents the virtual serial port device.
8837
8838 The virtual serial port device acts like an ordinary serial port
8839 inside the virtual machine. This device communicates to the real
8840 serial port hardware in one of two modes: host pipe or host device.
8841
8842 In host pipe mode, the #path attribute specifies the path to the pipe on
8843 the host computer that represents a serial port. The #server attribute
8844 determines if this pipe is created by the virtual machine process at
8845 machine startup or it must already exist before starting machine
8846 execution.
8847
8848 In host device mode, the #path attribute specifies the name of the
8849 serial port device on the host computer.
8850
8851 There is also a third communication mode: the disconnected mode. In this
8852 mode, the guest OS running inside the virtual machine will be able to
8853 detect the serial port, but all port write operations will be discarded
8854 and all port read operations will return no data.
8855
8856 <see>IMachine::getSerialPort</see>
8857 </desc>
8858
8859 <attribute name="slot" type="unsigned long" readonly="yes">
8860 <desc>
8861 Slot number this serial port is plugged into. Corresponds to
8862 the value you pass to <link to="IMachine::getSerialPort"/>
8863 to obtain this instance.
8864 </desc>
8865 </attribute>
8866
8867 <attribute name="enabled" type="boolean">
8868 <desc>
8869 Flag whether the serial port is enabled. If disabled,
8870 the serial port will not be reported to the guest OS.
8871 </desc>
8872 </attribute>
8873
8874 <attribute name="IOBase" type="unsigned long">
8875 <desc>Base I/O address of the serial port.</desc>
8876 </attribute>
8877
8878 <attribute name="IRQ" type="unsigned long">
8879 <desc>IRQ number of the serial port.</desc>
8880 </attribute>
8881
8882 <attribute name="hostMode" type="PortMode">
8883 <desc>How is this port connected to the host.</desc>
8884 </attribute>
8885
8886 <attribute name="server" type="boolean">
8887 <desc>
8888 Flag whether this serial port acts as a server (creates a new pipe on
8889 the host) or as a client (uses the existing pipe). This attribute is
8890 used only when <link to="#hostMode"/> is PortMode::HostPipe.
8891 </desc>
8892 </attribute>
8893
8894 <attribute name="path" type="wstring">
8895 <desc>
8896 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
8897 PortMode::HostPipe, or the host serial device name when
8898 <link to="#hostMode"/> is PortMode::HostDevice. In either of the above
8899 cases, setting a @c null or an empty string as the attribute's value
8900 will result into an error. Otherwise, the value of this property is
8901 ignored.
8902 </desc>
8903 </attribute>
8904
8905 </interface>
8906
8907 <!--
8908 // IParallelPort
8909 /////////////////////////////////////////////////////////////////////////
8910 -->
8911
8912 <interface
8913 name="IParallelPort" extends="$unknown"
8914 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
8915 wsmap="managed"
8916 >
8917
8918 <desc>
8919 The IParallelPort interface represents the virtual parallel port device.
8920
8921 The virtual parallel port device acts like an ordinary parallel port
8922 inside the virtual machine. This device communicates to the real
8923 parallel port hardware using the name of the parallel device on the host
8924 computer specified in the #path attribute.
8925
8926 Each virtual parallel port device is assigned a base I/O address and an
8927 IRQ number that will be reported to the guest operating system and used
8928 to operate the given parallel port from within the virtual machine.
8929
8930 <see>IMachine::getParallelPort</see>
8931 </desc>
8932
8933 <attribute name="slot" type="unsigned long" readonly="yes">
8934 <desc>
8935 Slot number this parallel port is plugged into. Corresponds to
8936 the value you pass to <link to="IMachine::getParallelPort"/>
8937 to obtain this instance.
8938 </desc>
8939 </attribute>
8940
8941 <attribute name="enabled" type="boolean">
8942 <desc>
8943 Flag whether the parallel port is enabled. If disabled,
8944 the parallel port will not be reported to the guest OS.
8945 </desc>
8946 </attribute>
8947
8948 <attribute name="IOBase" type="unsigned long">
8949 <desc>Base I/O address of the parallel port.</desc>
8950 </attribute>
8951
8952 <attribute name="IRQ" type="unsigned long">
8953 <desc>IRQ number of the parallel port.</desc>
8954 </attribute>
8955
8956 <attribute name="path" type="wstring">
8957 <desc>
8958 Host parallel device name. If this parallel port is enabled, setting a
8959 @c null or an empty string as this attribute's value will result into
8960 an error.
8961 </desc>
8962 </attribute>
8963
8964 </interface>
8965
8966
8967 <!--
8968 // IMachineDebugger
8969 /////////////////////////////////////////////////////////////////////////
8970 -->
8971
8972 <interface
8973 name="IMachineDebugger" extends="$unknown"
8974 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
8975 wsmap="suppress"
8976 >
8977 <method name="resetStats">
8978 <desc>
8979 Reset VM statistics.
8980 </desc>
8981 <param name="pattern" type="wstring" dir="in">
8982 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8983 </param>
8984 </method>
8985
8986 <method name="dumpStats">
8987 <desc>
8988 Dumps VM statistics.
8989 </desc>
8990 <param name="pattern" type="wstring" dir="in">
8991 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8992 </param>
8993 </method>
8994
8995 <method name="getStats">
8996 <desc>
8997 Get the VM statistics in a XMLish format.
8998 </desc>
8999 <param name="pattern" type="wstring" dir="in">
9000 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9001 </param>
9002 <param name="withDescriptions" type="boolean" dir="in">
9003 <desc>Whether to include the descriptions.</desc>
9004 </param>
9005 <param name="stats" type="wstring" dir="out">
9006 <desc>The XML document containing the statistics.</desc>
9007 </param>
9008 </method>
9009
9010 <method name="injectNMI">
9011 <desc>
9012 Inject an NMI into a running VT-x/AMD-V VM.
9013 </desc>
9014 </method>
9015
9016 <attribute name="singlestep" type="boolean">
9017 <desc>Switch for enabling singlestepping.</desc>
9018 </attribute>
9019
9020 <attribute name="recompileUser" type="boolean">
9021 <desc>Switch for forcing code recompilation for user mode code.</desc>
9022 </attribute>
9023
9024 <attribute name="recompileSupervisor" type="boolean">
9025 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
9026 </attribute>
9027
9028 <attribute name="PATMEnabled" type="boolean">
9029 <desc>Switch for enabling and disabling the PATM component.</desc>
9030 </attribute>
9031
9032 <attribute name="CSAMEnabled" type="boolean">
9033 <desc>Switch for enabling and disabling the CSAM component.</desc>
9034 </attribute>
9035
9036 <attribute name="logEnabled" type="boolean">
9037 <desc>Switch for enabling and disabling logging.</desc>
9038 </attribute>
9039
9040 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
9041 <desc>
9042 Flag indicating whether the VM is currently making use of CPU hardware
9043 virtualization extensions.
9044 </desc>
9045 </attribute>
9046
9047 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
9048 <desc>
9049 Flag indicating whether the VM is currently making use of the nested paging
9050 CPU hardware virtualization extension.
9051 </desc>
9052 </attribute>
9053
9054 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
9055 <desc>
9056 Flag indicating whether the VM is currently making use of the VPID
9057 VT-x extension.
9058 </desc>
9059 </attribute>
9060
9061 <attribute name="PAEEnabled" type="boolean" readonly="yes">
9062 <desc>
9063 Flag indicating whether the VM is currently making use of the Physical
9064 Address Extension CPU feature.
9065 </desc>
9066 </attribute>
9067
9068 <attribute name="virtualTimeRate" type="unsigned long">
9069 <desc>
9070 The rate at which the virtual time runs expressed as a percentage.
9071 The accepted range is 2% to 20000%.
9072 </desc>
9073 </attribute>
9074
9075 <!-- @todo method for setting log flags, groups and destination! -->
9076
9077 <attribute name="VM" type="unsigned long long" readonly="yes">
9078 <desc>
9079 Gets the VM handle. This is only for internal use while
9080 we carve the details of this interface.
9081 </desc>
9082 </attribute>
9083
9084 </interface>
9085
9086 <!--
9087 // IUSBController
9088 /////////////////////////////////////////////////////////////////////////
9089 -->
9090
9091 <interface
9092 name="IUSBController" extends="$unknown"
9093 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
9094 wsmap="managed"
9095 >
9096 <attribute name="enabled" type="boolean">
9097 <desc>
9098 Flag whether the USB controller is present in the
9099 guest system. If disabled, the virtual guest hardware will
9100 not contain any USB controller. Can only be changed when
9101 the VM is powered off.
9102 </desc>
9103 </attribute>
9104
9105 <attribute name="enabledEhci" type="boolean">
9106 <desc>
9107 Flag whether the USB EHCI controller is present in the
9108 guest system. If disabled, the virtual guest hardware will
9109 not contain a USB EHCI controller. Can only be changed when
9110 the VM is powered off.
9111 </desc>
9112 </attribute>
9113
9114 <attribute name="USBStandard" type="unsigned short" readonly="yes">
9115 <desc>
9116 USB standard version which the controller implements.
9117 This is a BCD which means that the major version is in the
9118 high byte and minor version is in the low byte.
9119 </desc>
9120 </attribute>
9121
9122 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
9123 <desc>
9124 List of USB device filters associated with the machine.
9125
9126 If the machine is currently running, these filters are activated
9127 every time a new (supported) USB device is attached to the host
9128 computer that was not ignored by global filters
9129 (<link to="IHost::USBDeviceFilters"/>).
9130
9131 These filters are also activated when the machine is powered up.
9132 They are run against a list of all currently available USB
9133 devices (in states
9134 <link to="USBDeviceState::Available">Available</link>,
9135 <link to="USBDeviceState::Busy">Busy</link>,
9136 <link to="USBDeviceState::Held">Held</link>) that were not previously
9137 ignored by global filters.
9138
9139 If at least one filter matches the USB device in question, this
9140 device is automatically captured (attached to) the virtual USB
9141 controller of this machine.
9142
9143 <see>IUSBDeviceFilter, ::IUSBController</see>
9144 </desc>
9145 </attribute>
9146
9147 <method name="createDeviceFilter">
9148 <desc>
9149 Creates a new USB device filter. All attributes except
9150 the filter name are set to <tt>null</tt> (any match),
9151 <i>active</i> is <tt>false</tt> (the filter is not active).
9152
9153 The created filter can then be added to the list of filters using
9154 <link to="#insertDeviceFilter()"/>.
9155
9156 <see>#deviceFilters</see>
9157 </desc>
9158 <param name="name" type="wstring" dir="in">
9159 <desc>
9160 Filter name. See <link to="IUSBDeviceFilter::name"/>
9161 for more info.
9162 </desc>
9163 </param>
9164 <param name="filter" type="IUSBDeviceFilter" dir="return">
9165 <desc>Created filter object.</desc>
9166 </param>
9167 </method>
9168
9169 <method name="insertDeviceFilter">
9170 <desc>
9171 Inserts the given USB device to the specified position
9172 in the list of filters.
9173
9174 Positions are numbered starting from <tt>0</tt>. If the specified
9175 position is equal to or greater than the number of elements in
9176 the list, the filter is added to the end of the collection.
9177
9178 <note>
9179 Duplicates are not allowed, so an attempt to insert a
9180 filter that is already in the collection, will return an
9181 error.
9182 </note>
9183
9184 <see>#deviceFilters</see>
9185 </desc>
9186 <param name="position" type="unsigned long" dir="in">
9187 <desc>Position to insert the filter to.</desc>
9188 </param>
9189 <param name="filter" type="IUSBDeviceFilter" dir="in">
9190 <desc>USB device filter to insert.</desc>
9191 </param>
9192 </method>
9193
9194 <method name="removeDeviceFilter">
9195 <desc>
9196 Removes a USB device filter from the specified position in the
9197 list of filters.
9198
9199 Positions are numbered starting from <tt>0</tt>. Specifying a
9200 position equal to or greater than the number of elements in
9201 the list will produce an error.
9202
9203 <see>#deviceFilters</see>
9204 </desc>
9205 <param name="position" type="unsigned long" dir="in">
9206 <desc>Position to remove the filter from.</desc>
9207 </param>
9208 <param name="filter" type="IUSBDeviceFilter" dir="return">
9209 <desc>Removed USB device filter.</desc>
9210 </param>
9211 </method>
9212
9213 </interface>
9214
9215
9216 <!--
9217 // IUSBDevice
9218 /////////////////////////////////////////////////////////////////////////
9219 -->
9220
9221 <enumerator
9222 name="IUSBDeviceEnumerator" type="IUSBDevice"
9223 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
9224 />
9225
9226 <collection
9227 name="IUSBDeviceCollection" type="IUSBDevice"
9228 enumerator="IUSBDeviceEnumerator"
9229 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
9230 readonly="yes"
9231 >
9232 <method name="findById">
9233 <desc>
9234 Searches this collection for a USB device with the given UUID.
9235 <note>
9236 The method returns an error if the given UUID does not
9237 correspond to any USB device in the collection.
9238 </note>
9239 <see>IUSBDevice::id</see>
9240 </desc>
9241 <param name="id" type="uuid" dir="in">
9242 <desc>UUID of the USB device to search for.</desc>
9243 </param>
9244 <param name="device" type="IUSBDevice" dir="return">
9245 <desc>Found USB device object.</desc>
9246 </param>
9247 </method>
9248
9249 <method name="findByAddress">
9250 <desc>
9251 Searches this collection for a USB device with the given
9252 host address.
9253 <note>
9254 The method returns an error if the given address does not
9255 correspond to any USB device in the collection.
9256 </note>
9257 <see>IUSBDevice::address</see>
9258 </desc>
9259 <param name="name" type="wstring" dir="in">
9260 <desc>
9261 Address of the USB device (as assigned by the host) to
9262 search for.
9263 </desc>
9264 </param>
9265 <param name="device" type="IUSBDevice" dir="return">
9266 <desc>Found USB device object.</desc>
9267 </param>
9268 </method>
9269
9270 </collection>
9271
9272 <interface
9273 name="IUSBDevice" extends="$unknown"
9274 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
9275 wsmap="managed"
9276 >
9277 <desc>
9278 The IUSBDevice interface represents a virtual USB device attached to the
9279 virtual machine.
9280
9281 A collection of objects implementing this interface is stored in the
9282 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
9283 attached to a running virtual machine's USB controller.
9284 </desc>
9285
9286 <attribute name="id" type="uuid" readonly="yes">
9287 <desc>
9288 Unique USB device ID. This ID is built from #vendorId,
9289 #productId, #revision and #serialNumber.
9290 </desc>
9291 </attribute>
9292
9293 <attribute name="vendorId" type="unsigned short" readonly="yes">
9294 <desc>Vendor ID.</desc>
9295 </attribute>
9296
9297 <attribute name="productId" type="unsigned short" readonly="yes">
9298 <desc>Product ID.</desc>
9299 </attribute>
9300
9301 <attribute name="revision" type="unsigned short" readonly="yes">
9302 <desc>
9303 Product revision number. This is a packed BCD represented as
9304 unsigned short. The high byte is the integer part and the low
9305 byte is the decimal.
9306 </desc>
9307 </attribute>
9308
9309 <attribute name="manufacturer" type="wstring" readonly="yes">
9310 <desc>Manufacturer string.</desc>
9311 </attribute>
9312
9313 <attribute name="product" type="wstring" readonly="yes">
9314 <desc>Product string.</desc>
9315 </attribute>
9316
9317 <attribute name="serialNumber" type="wstring" readonly="yes">
9318 <desc>Serial number string.</desc>
9319 </attribute>
9320
9321 <attribute name="address" type="wstring" readonly="yes">
9322 <desc>Host specific address of the device.</desc>
9323 </attribute>
9324
9325 <attribute name="port" type="unsigned short" readonly="yes">
9326 <desc>
9327 Host USB port number the device is physically
9328 connected to.
9329 </desc>
9330 </attribute>
9331
9332 <attribute name="version" type="unsigned short" readonly="yes">
9333 <desc>
9334 The major USB version of the device - 1 or 2.
9335 </desc>
9336 </attribute>
9337
9338 <attribute name="portVersion" type="unsigned short" readonly="yes">
9339 <desc>
9340 The major USB version of the host USB port the device is
9341 physically connected to - 1 or 2. For devices not connected to
9342 anything this will have the same value as the version attribute.
9343 </desc>
9344 </attribute>
9345
9346 <attribute name="remote" type="boolean" readonly="yes">
9347 <desc>
9348 Whether the device is physically connected to a remote VRDP
9349 client or to a local host machine.
9350 </desc>
9351 </attribute>
9352
9353 </interface>
9354
9355
9356 <!--
9357 // IUSBDeviceFilter
9358 /////////////////////////////////////////////////////////////////////////
9359 -->
9360
9361 <enumerator
9362 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
9363 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
9364 />
9365
9366 <collection
9367 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
9368 enumerator="IUSBDeviceFilterEnumerator"
9369 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
9370 readonly="yes"
9371 />
9372
9373 <interface
9374 name="IUSBDeviceFilter" extends="$unknown"
9375 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
9376 wsmap="managed"
9377 >
9378 <desc>
9379 The IUSBDeviceFilter interface represents an USB device filter used
9380 to perform actions on a group of USB devices.
9381
9382 This type of filters is used by running virtual machines to
9383 automatically capture selected USB devices once they are physically
9384 attached to the host computer.
9385
9386 A USB device is matched to the given device filter if and only if all
9387 attributes of the device match the corresponding attributes of the
9388 filter (that is, attributes are joined together using the logical AND
9389 operation). On the other hand, all together, filters in the list of
9390 filters carry the semantics of the logical OR operation. So if it is
9391 desirable to create a match like "this vendor id OR this product id",
9392 one needs to create two filters and specify "any match" (see below)
9393 for unused attributes.
9394
9395 All filter attributes used for matching are strings. Each string
9396 is an expression representing a set of values of the corresponding
9397 device attribute, that will match the given filter. Currently, the
9398 following filtering expressions are supported:
9399
9400 <ul>
9401 <li><i>Interval filters</i>. Used to specify valid intervals for
9402 integer device attributes (Vendor ID, Product ID and Revision).
9403 The format of the string is:
9404
9405 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
9406
9407 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
9408 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
9409 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
9410 is omitted before a dash (<tt>-</tt>), the minimum possible integer
9411 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
9412 possible integer is assumed.
9413 </li>
9414 <li><i>Boolean filters</i>. Used to specify acceptable values for
9415 boolean device attributes. The format of the string is:
9416
9417 <tt>true|false|yes|no|0|1</tt>
9418
9419 </li>
9420 <li><i>Exact match</i>. Used to specify a single value for the given
9421 device attribute. Any string that doesn't start with <tt>int:</tt>
9422 represents the exact match. String device attributes are compared to
9423 this string including case of symbols. Integer attributes are first
9424 converted to a string (see individual filter attributes) and then
9425 compared ignoring case.
9426
9427 </li>
9428 <li><i>Any match</i>. Any value of the corresponding device attribute
9429 will match the given filter. An empty or <tt>null</tt> string is
9430 used to construct this type of filtering expressions.
9431
9432 </li>
9433 </ul>
9434
9435 <note>
9436 On the Windows host platform, interval filters are not currently
9437 available. Also all string filter attributes
9438 (<link to="#manufacturer"/>, <link to="#product"/>,
9439 <link to="#serialNumber"/>) are ignored, so they behave as
9440 <i>any match</i> no matter what string expression is specified.
9441 </note>
9442
9443 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
9444 </desc>
9445
9446 <attribute name="name" type="wstring">
9447 <desc>
9448 Visible name for this filter.
9449 This name is used to visually distinguish one filter from another,
9450 so it can neither be <tt>null</tt> nor an empty string.
9451 </desc>
9452 </attribute>
9453
9454 <attribute name="active" type="boolean">
9455 <desc>Whether this filter active or has been temporarily disabled.</desc>
9456 </attribute>
9457
9458 <attribute name="vendorId" type="wstring">
9459 <desc>
9460 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
9461 The string representation for the <i>exact matching</i>
9462 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9463 (including leading zeroes).
9464 </desc>
9465 </attribute>
9466
9467 <attribute name="productId" type="wstring">
9468 <desc>
9469 <link to="IUSBDevice::productId">Product ID</link> filter.
9470 The string representation for the <i>exact matching</i>
9471 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9472 (including leading zeroes).
9473 </desc>
9474 </attribute>
9475
9476 <attribute name="revision" type="wstring">
9477 <desc>
9478 <link to="IUSBDevice::productId">Product revision number</link>
9479 filter. The string representation for the <i>exact matching</i>
9480 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
9481 of the integer part of the revision, and <tt>F</tt> is the
9482 decimal digit of its fractional part (including leading and
9483 trailing zeros).
9484 Note that for interval filters, it's best to use the hexadecimal
9485 form, because the revision is stored as a 16 bit packed BCD value;
9486 so the expression <tt>int:0x0100-0x0199</tt> will match any
9487 revision from <tt>1.0</tt> to <tt>1.99</tt>.
9488 </desc>
9489 </attribute>
9490
9491 <attribute name="manufacturer" type="wstring">
9492 <desc>
9493 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
9494 </desc>
9495 </attribute>
9496
9497 <attribute name="product" type="wstring">
9498 <desc>
9499 <link to="IUSBDevice::product">Product</link> filter.
9500 </desc>
9501 </attribute>
9502
9503 <attribute name="serialNumber" type="wstring">
9504 <desc>
9505 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
9506 </desc>
9507 </attribute>
9508
9509 <attribute name="port" type="wstring">
9510 <desc>
9511 <link to="IUSBDevice::port">Host USB port</link> filter.
9512 </desc>
9513 </attribute>
9514
9515 <attribute name="remote" type="wstring">
9516 <desc>
9517 <link to="IUSBDevice::remote">Remote state</link> filter.
9518 <note>
9519 This filter makes sense only for machine USB filters,
9520 i.e. it is ignored by IHostUSBDeviceFilter objects.
9521 </note>
9522 </desc>
9523 </attribute>
9524
9525 <attribute name="maskedInterfaces" type="unsigned long">
9526 <desc>
9527 This is an advanced option for hiding one or more USB interfaces
9528 from the guest. The value is a bit mask where the bits that are set
9529 means the corresponding USB interface should be hidden, masked off
9530 if you like.
9531 This feature only works on Linux hosts.
9532 </desc>
9533 </attribute>
9534
9535 </interface>
9536
9537
9538 <!--
9539 // IHostUSBDevice
9540 /////////////////////////////////////////////////////////////////////////
9541 -->
9542
9543 <enum
9544 name="USBDeviceState"
9545 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
9546 >
9547 <desc>
9548 USB device state. This enumeration represents all possible states
9549 of the USB device physically attached to the host computer regarding
9550 its state on the host computer and availability to guest computers
9551 (all currently running virtual machines).
9552
9553 Once a supported USB device is attached to the host, global USB
9554 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
9555 either ignore the device, or put it to #Held state, or do nothing. Unless
9556 the device is ignored by global filters, filters of all currently running
9557 guests (<link to="IUSBController::deviceFilters"/>) are activated that can
9558 put it to #Captured state.
9559
9560 If the device was ignored by global filters, or didn't match
9561 any filters at all (including guest ones), it is handled by the host
9562 in a normal way. In this case, the device state is determined by
9563 the host and can be one of #Unavailable, #Busy or #Available, depending on
9564 the current device usage.
9565
9566 Besides auto-capturing based on filters, the device can be manually
9567 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
9568 state is #Busy, #Available or #Held.
9569
9570 <note>
9571 Due to differences in USB stack implementations in Linux and Win32,
9572 states #Busy and #Available are applicable only to the Linux version of
9573 the product. This also means that (<link
9574 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if
9575 the device state is #Held.
9576 </note>
9577
9578 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
9579 </desc>
9580
9581 <const name="NotSupported" value="0">
9582 <desc>
9583 Not supported by the VirtualBox server, not available to guests.
9584 </desc>
9585 </const>
9586 <const name="Unavailable" value="1">
9587 <desc>
9588 Being used by the host computer exclusively,
9589 not available to guests.
9590 </desc>
9591 </const>
9592 <const name="Busy" value="2">
9593 <desc>
9594 Being used by the host computer, potentially available to guests.
9595 </desc>
9596 </const>
9597 <const name="Available" value="3">
9598 <desc>
9599 Not used by the host computer, available to guests.
9600 The host computer can also start using the device at any time.
9601 </desc>
9602 </const>
9603 <const name="Held" value="4">
9604 <desc>
9605 Held by the VirtualBox server (ignored by the host computer),
9606 available to guests.
9607 </desc>
9608 </const>
9609 <const name="Captured" value="5">
9610 <desc>
9611 Captured by one of the guest computers, not available
9612 to anybody else.
9613 </desc>
9614 </const>
9615 </enum>
9616
9617 <enumerator
9618 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
9619 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
9620 />
9621
9622 <collection
9623 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
9624 enumerator="IHostUSBDeviceEnumerator"
9625 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
9626 readonly="yes"
9627 >
9628 <method name="findById">
9629 <desc>
9630 Searches this collection for a USB device with the given UUID.
9631 <note>
9632 The method returns an error if the given UUID does not
9633 correspond to any USB device in the collection.
9634 </note>
9635 <see>IHostUSBDevice::id</see>
9636 </desc>
9637 <param name="id" type="uuid" dir="in">
9638 <desc>UUID of the USB device to search for.</desc>
9639 </param>
9640 <param name="device" type="IHostUSBDevice" dir="return">
9641 <desc>Found USB device object.</desc>
9642 </param>
9643 </method>
9644
9645 <method name="findByAddress">
9646 <desc>
9647 Searches this collection for a USB device with the given
9648 host address.
9649 <note>
9650 The method returns an error if the given address does not
9651 correspond to any USB device in the collection.
9652 </note>
9653 <see>IHostUSBDevice::address</see>
9654 </desc>
9655 <param name="name" type="wstring" dir="in">
9656 <desc>
9657 Address of the USB device (as assigned by the host) to
9658 search for.
9659 </desc>
9660 </param>
9661 <param name="device" type="IHostUSBDevice" dir="return">
9662 <desc>Found USB device object.</desc>
9663 </param>
9664 </method>
9665
9666 </collection>
9667
9668 <interface
9669 name="IHostUSBDevice" extends="IUSBDevice"
9670 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
9671 wsmap="managed"
9672 >
9673 <desc>
9674 The IHostUSBDevice interface represents a physical USB device attached
9675 to the host computer.
9676
9677 Besides properties inherited from IUSBDevice, this interface adds the
9678 <link to="#state"/> property that holds the current state of the USB
9679 device.
9680
9681 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
9682 </desc>
9683
9684 <attribute name="state" type="USBDeviceState" readonly="yes">
9685 <desc>
9686 Current state of the device.
9687 </desc>
9688 </attribute>
9689
9690 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
9691
9692 </interface>
9693
9694
9695 <!--
9696 // IHostUSBDeviceFilter
9697 /////////////////////////////////////////////////////////////////////////
9698 -->
9699
9700 <enum
9701 name="USBDeviceFilterAction"
9702 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
9703 >
9704 <desc>
9705 Actions for host USB device filters.
9706 <see>IHostUSBDeviceFilter, USBDeviceState</see>
9707 </desc>
9708
9709 <const name="Null" value="0">
9710 <desc><tt>null</tt> value. Never used by the API.</desc>
9711 </const>
9712 <const name="Ignore" value="1">
9713 <desc>Ignore the matched USB device.</desc>
9714 </const>
9715 <const name="Hold" value="2">
9716 <desc>Hold the matched USB device.</desc>
9717 </const>
9718 </enum>
9719
9720 <enumerator
9721 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
9722 uuid="ff735211-903e-4642-9c37-189eb44579fe"
9723 />
9724
9725 <collection
9726 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
9727 enumerator="IHostUSBDeviceFilterEnumerator"
9728 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
9729 readonly="yes"
9730 />
9731
9732 <interface
9733 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
9734 uuid="4cc70246-d74a-400f-8222-3900489c0374"
9735 wsmap="managed"
9736 >
9737 <desc>
9738 The IHostUSBDeviceFilter interface represents a global filter for a
9739 physical USB device used by the host computer. Used indirectly in
9740 <link to="IHost::USBDeviceFilters"/>.
9741
9742 Using filters of this type, the host computer determines the initial
9743 state of the USB device after it is physically attached to the
9744 host's USB controller.
9745
9746 <note>
9747 The <link to="#remote"/> attribute is ignored by this type of
9748 filters, because it makes sense only for
9749 <link to="IUSBController::deviceFilters">machine USB filters</link>.
9750 </note>
9751
9752 <see>IHost::USBDeviceFilters</see>
9753 </desc>
9754
9755 <attribute name="action" type="USBDeviceFilterAction">
9756 <desc>
9757 Action performed by the host when an attached USB device
9758 matches this filter.
9759 </desc>
9760 </attribute>
9761
9762 </interface>
9763
9764 <!--
9765 // IAudioAdapter
9766 /////////////////////////////////////////////////////////////////////////
9767 -->
9768
9769 <enum
9770 name="AudioDriverType"
9771 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
9772 >
9773 <desc>
9774 Host audio driver type.
9775 </desc>
9776
9777 <const name="Null" value="0">
9778 <desc><tt>null</tt> value. Also means "dummy audio driver".</desc>
9779 </const>
9780 <const name="WinMM" value="1"/>
9781 <const name="OSS" value="2"/>
9782 <const name="ALSA" value="3"/>
9783 <const name="DirectSound" value="4"/>
9784 <const name="CoreAudio" value="5"/>
9785 <const name="MMPM" value="6"/>
9786 <const name="Pulse" value="7"/>
9787 <const name="SolAudio" value="8"/>
9788 </enum>
9789
9790 <enum
9791 name="AudioControllerType"
9792 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
9793 >
9794 <desc>
9795 Virtual audio controller type.
9796 </desc>
9797
9798 <const name="AC97" value="0"/>
9799 <const name="SB16" value="1"/>
9800 </enum>
9801
9802 <interface
9803 name="IAudioAdapter" extends="$unknown"
9804 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
9805 wsmap="managed"
9806 >
9807 <desc>
9808 The IAudioAdapter interface represents the virtual audio adapter of
9809 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
9810 </desc>
9811 <attribute name="enabled" type="boolean">
9812 <desc>
9813 Flag whether the audio adapter is present in the
9814 guest system. If disabled, the virtual guest hardware will
9815 not contain any audio adapter. Can only be changed when
9816 the VM is not running.
9817 </desc>
9818 </attribute>
9819 <attribute name="audioController" type="AudioControllerType">
9820 <desc>
9821 The audio hardware we emulate.
9822 </desc>
9823 </attribute>
9824 <attribute name="audioDriver" type="AudioDriverType">
9825 <desc>
9826 Audio driver the adapter is connected to. This setting
9827 can only be changed when the VM is not running.
9828 </desc>
9829 </attribute>
9830 </interface>
9831
9832 <!--
9833 // IVRDPServer
9834 /////////////////////////////////////////////////////////////////////////
9835 -->
9836
9837 <enum
9838 name="VRDPAuthType"
9839 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
9840 >
9841 <desc>
9842 VRDP authentication type.
9843 </desc>
9844
9845 <const name="Null" value="0">
9846 <desc><tt>null</tt> value. Also means "no authentication".</desc>
9847 </const>
9848 <const name="External" value="1"/>
9849 <const name="Guest" value="2"/>
9850 </enum>
9851
9852 <interface
9853 name="IVRDPServer" extends="$unknown"
9854 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
9855 wsmap="managed"
9856 >
9857 <attribute name="enabled" type="boolean">
9858 <desc>VRDP server status.</desc>
9859 </attribute>
9860
9861 <attribute name="port" type="unsigned long">
9862 <desc>
9863 VRDP server port number.
9864 <note>
9865 Setting the value of this property to <tt>0</tt> will reset the port
9866 number to the default value which is
9867 currently <tt>3389</tt>. Reading this property will always return a
9868 real port number, even after it has been set to <tt>0</tt> (in which
9869 case the default port is returned).
9870 </note>
9871 </desc>
9872 </attribute>
9873
9874 <attribute name="netAddress" type="wstring">
9875 <desc>VRDP server address.</desc>
9876 </attribute>
9877
9878 <attribute name="authType" type="VRDPAuthType">
9879 <desc>VRDP authentication method.</desc>
9880 </attribute>
9881
9882 <attribute name="authTimeout" type="unsigned long">
9883 <desc>Timeout for guest authentication. Milliseconds.</desc>
9884 </attribute>
9885
9886 <attribute name="allowMultiConnection" type="boolean">
9887 <desc>
9888 Flag whether multiple simultaneous connections to the VM are permitted.
9889 Note that this will be replaced by a more powerful mechanism in the future.
9890 </desc>
9891 </attribute>
9892
9893 <attribute name="reuseSingleConnection" type="boolean">
9894 <desc>
9895 Flag whether the existing connection must be dropped and a new connection
9896 must be established by the VRDP server, when a new client connects in single
9897 connection mode.
9898 </desc>
9899 </attribute>
9900
9901 </interface>
9902
9903
9904 <!--
9905 // ISharedFolder
9906 /////////////////////////////////////////////////////////////////////////
9907 -->
9908
9909 <enumerator
9910 name="ISharedFolderEnumerator" type="ISharedFolder"
9911 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
9912 />
9913
9914 <collection
9915 name="ISharedFolderCollection" type="ISharedFolder"
9916 enumerator="ISharedFolderEnumerator"
9917 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
9918 readonly="yes">
9919
9920 <method name="findByName">
9921 <desc>
9922 Searches this collection for a shared folder with the given logical
9923 name.
9924 <note>
9925 The method returns an error if the given name does not correspond to
9926 any shared folder in the collection.
9927 </note>
9928 </desc>
9929 <param name="name" type="wstring" dir="in">
9930 <desc>Logical name of the shared folder to search for</desc>
9931 </param>
9932 <param name="sharedFolder" type="ISharedFolder" dir="return">
9933 <desc>Found shared folder object</desc>
9934 </param>
9935 </method>
9936
9937 </collection>
9938
9939 <interface
9940 name="ISharedFolder" extends="$unknown"
9941 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
9942 wsmap="struct"
9943 >
9944 <desc>
9945 The ISharedFolder interface represents a folder in the host computer's
9946 file system accessible from the guest OS running inside a virtual
9947 machine using an associated logical name.
9948
9949 There are three types of shared folders:
9950 <ul>
9951 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
9952 folders available to all virtual machines.</li>
9953 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
9954 VM-specific shared folders available to the given virtual machine at
9955 startup.</li>
9956 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
9957 VM-specific shared folders created in the session context (for
9958 example, when the virtual machine is running) and automatically
9959 discarded when the session is closed (the VM is powered off).</li>
9960 </ul>
9961
9962 Logical names of shared folders must be unique within the given scope
9963 (global, permanent or transient). However, they do not need to be unique
9964 across scopes. In this case, the definition of the shared folder in a
9965 more specific scope takes precedence over definitions in all other
9966 scopes. The order of precedence is (more specific to more general):
9967 <ol>
9968 <li>Transient definitions</li>
9969 <li>Permanent definitions</li>
9970 <li>Global definitions</li>
9971 </ol>
9972
9973 For example, if MyMachine has a shared folder named
9974 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
9975 transient shared folder named <tt>C_DRIVE</tt> (that points
9976 to <tt>C:\\\\WINDOWS</tt>) will change the definition
9977 of <tt>C_DRIVE</tt> in the guest OS so
9978 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
9979 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
9980 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
9981 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
9982 to <tt>C:\\</tt> if it still exists.
9983
9984 Note that permanent and transient shared folders of different machines
9985 are in different name spaces, so they don't overlap and don't need to
9986 have unique logical names.
9987
9988 <note>
9989 Global shared folders are not implemented in the current version of the
9990 product.
9991 </note>
9992 </desc>
9993
9994 <attribute name="name" type="wstring" readonly="yes">
9995 <desc>Logical name of the shared folder.</desc>
9996 </attribute>
9997
9998 <attribute name="hostPath" type="wstring" readonly="yes">
9999 <desc>Full path to the shared folder in the host file system.</desc>
10000 </attribute>
10001
10002 <attribute name="accessible" type="boolean" readonly="yes">
10003 <desc>
10004 Whether the folder defined by the host path is currently
10005 accessible or not.
10006 For example, the folder can be unaccessible if it is placed
10007 on the network share that is not available by the time
10008 this property is read.
10009 </desc>
10010 </attribute>
10011
10012 <attribute name="writable" type="boolean" readonly="yes">
10013 <desc>
10014 Whether the folder defined by the host path is writable or
10015 not.
10016 </desc>
10017 </attribute>
10018
10019 </interface>
10020
10021 <!--
10022 // ISession
10023 /////////////////////////////////////////////////////////////////////////
10024 -->
10025
10026 <interface
10027 name="IInternalSessionControl" extends="$unknown"
10028 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
10029 internal="yes"
10030 wsmap="suppress"
10031 >
10032 <method name="getPID">
10033 <desc>PID of the process that has created this Session object.
10034 </desc>
10035 <param name="pid" type="unsigned long" dir="return"/>
10036 </method>
10037
10038 <method name="getRemoteConsole">
10039 <desc>Returns the console object suitable for remote control.</desc>
10040 <param name="console" type="IConsole" dir="return"/>
10041 </method>
10042
10043 <method name="assignMachine">
10044 <desc>
10045 Assigns the machine object associated with this direct-type
10046 session or informs the session that it will be a remote one
10047 (if machine = NULL).
10048 </desc>
10049 <param name="machine" type="IMachine" dir="in"/>
10050 </method>
10051
10052 <method name="assignRemoteMachine">
10053 <desc>
10054 Assigns the machine and the (remote) console object associated with
10055 this remote-type session.
10056 </desc>
10057 <param name="machine" type="IMachine" dir="in"/>
10058 <param name="console" type="IConsole" dir="in"/>
10059 </method>
10060
10061 <method name="updateMachineState">
10062 <desc>
10063 Updates the machine state in the VM process.
10064 Must be called only in certain cases
10065 (see the method implementation).
10066 </desc>
10067 <param name="aMachineState" type="MachineState" dir="in"/>
10068 </method>
10069
10070 <method name="uninitialize">
10071 <desc>
10072 Uninitializes (closes) this session. Used by VirtualBox to close
10073 the corresponding remote session when the direct session dies
10074 or gets closed.
10075 </desc>
10076 </method>
10077
10078 <method name="onDVDDriveChange">
10079 <desc>
10080 Triggered when settings of the DVD drive object of the
10081 associated virtual machine have changed.
10082 </desc>
10083 </method>
10084
10085 <method name="onFloppyDriveChange">
10086 <desc>
10087 Triggered when settings of the floppy drive object of the
10088 associated virtual machine have changed.
10089 </desc>
10090 </method>
10091
10092 <method name="onNetworkAdapterChange">
10093 <desc>
10094 Triggered when settings of a network adapter of the
10095 associated virtual machine have changed.
10096 </desc>
10097 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
10098 </method>
10099
10100 <method name="onSerialPortChange">
10101 <desc>
10102 Triggered when settings of a serial port of the
10103 associated virtual machine have changed.
10104 </desc>
10105 <param name="serialPort" type="ISerialPort" dir="in"/>
10106 </method>
10107
10108 <method name="onParallelPortChange">
10109 <desc>
10110 Triggered when settings of a parallel port of the
10111 associated virtual machine have changed.
10112 </desc>
10113 <param name="parallelPort" type="IParallelPort" dir="in"/>
10114 </method>
10115
10116 <method name="onVRDPServerChange">
10117 <desc>
10118 Triggered when settings of the VRDP server object of the
10119 associated virtual machine have changed.
10120 </desc>
10121 </method>
10122
10123 <method name="onUSBControllerChange">
10124 <desc>
10125 Triggered when settings of the USB controller object of the
10126 associated virtual machine have changed.
10127 </desc>
10128 </method>
10129
10130 <method name="onSharedFolderChange">
10131 <desc>
10132 Triggered when a permanent (global or machine) shared folder has been
10133 created or removed.
10134 <note>
10135 We don't pass shared folder parameters in this notification because
10136 the order in which parallel notifications are delivered is not defined,
10137 therefore it could happen that these parameters were outdated by the
10138 time of processing this notification.
10139 </note>
10140 </desc>
10141 <param name="global" type="boolean" dir="in"/>
10142 </method>
10143
10144 <method name="onUSBDeviceAttach">
10145 <desc>
10146 Triggered when a request to capture a USB device (as a result
10147 of matched USB filters or direct call to
10148 <link to="IConsole::attachUSBDevice"/>) has completed.
10149 A @c null @a error object means success, otherwise it
10150 describes a failure.
10151 </desc>
10152 <param name="device" type="IUSBDevice" dir="in"/>
10153 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
10154 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
10155 </method>
10156
10157 <method name="onUSBDeviceDetach">
10158 <desc>
10159 Triggered when a request to release the USB device (as a result
10160 of machine termination or direct call to
10161 <link to="IConsole::detachUSBDevice"/>) has completed.
10162 A @c null @a error object means success, otherwise it
10163 </desc>
10164 <param name="id" type="uuid" dir="in"/>
10165 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
10166 </method>
10167
10168 <method name="onShowWindow">
10169 <desc>
10170 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
10171 <link to="IMachine::showConsoleWindow()"/> in order to notify
10172 console callbacks
10173 <link to="IConsoleCallback::onCanShowWindow()"/>
10174 and <link to="IConsoleCallback::onShowWindow()"/>.
10175 </desc>
10176 <param name="check" type="boolean" dir="in"/>
10177 <param name="canShow" type="boolean" dir="out"/>
10178 <param name="winId" type="unsigned long long" dir="out"/>
10179 </method>
10180
10181 <method name="accessGuestProperty">
10182 <desc>
10183 Called by <link to="IMachine::getGuestProperty()"/> and by
10184 <link to="IMachine::setGuestProperty()"/> in order to read and
10185 modify guest properties.
10186 </desc>
10187 <param name="name" type="wstring" dir="in"/>
10188 <param name="value" type="wstring" dir="in"/>
10189 <param name="flags" type="wstring" dir="in"/>
10190 <param name="isSetter" type="boolean" dir="in"/>
10191 <param name="retValue" type="wstring" dir="out"/>
10192 <param name="retTimestamp" type="unsigned long long" dir="out"/>
10193 <param name="retFlags" type="wstring" dir="out"/>
10194 </method>
10195
10196 <method name="enumerateGuestProperties">
10197 <desc>
10198 Return a list of the guest properties matching a set of patterns along
10199 with their values, time stamps and flags.
10200 </desc>
10201 <param name="patterns" type="wstring" dir="in">
10202 <desc>
10203 The patterns to match the properties against as a comma-separated
10204 string. If this is empty, all properties currently set will be
10205 returned.
10206 </desc>
10207 </param>
10208 <param name="key" type="wstring" dir="out" safearray="yes">
10209 <desc>
10210 The key names of the properties returned.
10211 </desc>
10212 </param>
10213 <param name="value" type="wstring" dir="out" safearray="yes">
10214 <desc>
10215 The values of the properties returned. The array entries match the
10216 corresponding entries in the @a key array.
10217 </desc>
10218 </param>
10219 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
10220 <desc>
10221 The time stamps of the properties returned. The array entries match
10222 the corresponding entries in the @a key array.
10223 </desc>
10224 </param>
10225 <param name="flags" type="wstring" dir="out" safearray="yes">
10226 <desc>
10227 The flags of the properties returned. The array entries match the
10228 corresponding entries in the @a key array.
10229 </desc>
10230 </param>
10231 </method>
10232
10233 </interface>
10234
10235 <interface
10236 name="ISession" extends="$dispatched"
10237 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
10238 wsmap="managed"
10239 >
10240 <desc>
10241 The ISession interface represents a serialization primitive for virtual
10242 machines.
10243
10244 With VirtualBox, every time one wishes to manipulate a virtual machine
10245 (e.g. change its settings or start execution), a session object is
10246 required. Such an object must be passed to one of the session methods
10247 that open the given session, which then initiates the machine manipulation.
10248
10249 A session serves several purposes: it identifies to the inter-process VirtualBox
10250 code which process is currently working with the virtual machine, and it ensures
10251 that there are no incompatible requests from several processes for the
10252 same virtual machine. Session objects can therefore be thought of as mutex
10253 semaphores that lock virtual machines to prevent conflicting accesses from
10254 several processes.
10255
10256 How sessions objects are used depends on whether you use the Main API
10257 via COM or via the webservice:
10258
10259 <ul>
10260 <li>When using the COM API directly, an object of the Session class from the
10261 VirtualBox type library needs to be created. In regular COM C++ client code,
10262 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
10263 This object will then act as a local session object in further calls to open
10264 a session.
10265 </li>
10266
10267 <li>In the webservice, the session manager (IWebsessionManager) instead creates
10268 one session object automatically when <link to="IWebsessionManager::logon" />
10269 is called. A managed object reference to that session object can be retrieved by
10270 calling <link to="IWebsessionManager::getSessionObject" />. This session object
10271 reference can then be used to open sessions.
10272 </li>
10273 </ul>
10274
10275 Sessions are mainly used in two variations:
10276
10277 <ul>
10278 <li>
10279 To start a virtual machine in a separate process, one would call
10280 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
10281 object as its first parameter. This session then identifies the caller
10282 and lets him control the started machine (for example, pause machine
10283 execution or power it down) as well as be notified about machine
10284 execution state changes.
10285 </li>
10286
10287 <li>To alter machine settings, or to start machine execution within the
10288 current process, one needs to open a direct session for the machine first by
10289 calling <link to="IVirtualBox::openSession"/>. While a direct session
10290 is open within one process, no any other process may open another direct
10291 session for the same machine. This prevents the machine from being changed
10292 by other processes while it is running or while the machine is being configured.
10293 </li>
10294 </ul>
10295
10296 One also can attach to an existing direct session already opened by
10297 another process (for example, in order to send a control request to the
10298 virtual machine such as the pause or the reset request). This is done by
10299 calling <link to="IVirtualBox::openExistingSession"/>.
10300
10301 <note>
10302 Unless you are trying to write a new VirtualBox front-end that
10303 performs direct machine execution (like the VirtualBox or VBoxSDL
10304 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
10305 session opened by <link to="IVirtualBox::openSession"/> and use this
10306 session only to change virtual machine settings. If you simply want to
10307 start virtual machine execution using one of the existing front-ends
10308 (for example the VirtualBox GUI or headless server), simply use
10309 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
10310 will power up the machine automatically for you.
10311 </note>
10312 </desc>
10313
10314 <attribute name="state" type="SessionState" readonly="yes">
10315 <desc>Current state of this session.</desc>
10316 </attribute>
10317
10318 <attribute name="type" type="SessionType" readonly="yes">
10319 <desc>
10320 Type of this session. The value of this attribute is valid only
10321 if the session is currently open (i.e. its #state is SessionType::SessionOpen),
10322 otherwise an error will be returned.
10323 </desc>
10324 </attribute>
10325
10326 <attribute name="machine" type="IMachine" readonly="yes">
10327 <desc>Machine object associated with this session.</desc>
10328 </attribute>
10329
10330 <attribute name="console" type="IConsole" readonly="yes">
10331 <desc>Console object associated with this session.</desc>
10332 </attribute>
10333
10334 <method name="close">
10335 <desc>
10336 Closes a session that was previously opened.
10337
10338 It is recommended that every time an "open session" method (such as
10339 <link to="IVirtualBox::openRemoteSession" /> or
10340 <link to="IVirtualBox::openSession" />) has been called to
10341 manipulate a virtual machine, the caller invoke
10342 ISession::close() when it's done doing so. Since sessions are
10343 serialization primitives much like ordinary mutexes, they are
10344 best used the same way: for each "open" call, there should be
10345 a matching "close" call, even when errors occur.
10346
10347 Otherwise, if a direct session for a machine opened with
10348 <link to="IVirtualBox::openSession()"/> is not explicitly closed
10349 when the application terminates, the state of the machine will
10350 be set to <link to="MachineState::Aborted" /> on the server.
10351
10352 Generally, it is recommended to close all open sessions explicitly
10353 before terminating the application (no matter what is the reason of
10354 the termination).
10355
10356 <note>
10357 Do not expect the session state (<link to="ISession::state" />
10358 to return to "Closed" immediately after you invoke
10359 ISession::close(), particularly if you have started a remote
10360 session to execute the VM in a new process. The session state will
10361 automatically return to "Closed" once the VM is no longer executing,
10362 which can of course take a very long time.
10363 </note>
10364 </desc>
10365 </method>
10366
10367 </interface>
10368
10369 <!--
10370 // ISATAController
10371 /////////////////////////////////////////////////////////////////////////
10372 -->
10373
10374 <interface
10375 name="ISATAController" extends="$unknown"
10376 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
10377 wsmap="managed"
10378 >
10379 <attribute name="enabled" type="boolean">
10380 <desc>
10381 Flag whether the SATA controller is present in the
10382 guest system. If disabled, the virtual guest hardware will
10383 not contain any SATA controller. Can only be changed when
10384 the VM is powered off.
10385 </desc>
10386 </attribute>
10387
10388 <attribute name="portCount" type="unsigned long">
10389 <desc>
10390 The number of usable ports on the SATA controller.
10391 It ranges from 1 to 30.
10392 </desc>
10393 </attribute>
10394
10395 <method name="GetIDEEmulationPort">
10396 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc>
10397 <param name="devicePosition" type="long" dir="in"/>
10398 <param name="portNumber" type="long" dir="return"/>
10399 </method>
10400
10401 <method name="SetIDEEmulationPort">
10402 <desc>Sets the port number which is emulated as an IDE device.</desc>
10403 <param name="devicePosition" type="long" dir="in"/>
10404 <param name="portNumber" type="long" dir="in"/>
10405 </method>
10406
10407 </interface>
10408
10409<if target="wsdl">
10410
10411 <!--
10412 // IManagedObjectRef
10413 /////////////////////////////////////////////////////////////////////////
10414 -->
10415
10416 <interface
10417 name="IManagedObjectRef" extends="$unknown"
10418 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
10419 internal="yes"
10420 wsmap="managed"
10421 wscpp="hardcoded"
10422 >
10423 <desc>
10424 Managed object reference.
10425
10426 Only within the webservice, a managed object reference (which is really
10427 an opaque number) allows a webservice client to address an object
10428 that lives in the address space of the webservice server.
10429
10430 Behind each managed object reference, there is a COM object that lives
10431 in the webservice server's address space. The COM object is not freed
10432 until the managed object reference is released, either by an explicit
10433 call to <link to="IManagedObjectRef::release" /> or by logging off from
10434 the webservice (<link to="IWebsessionManager::logoff" />), which releases
10435 all objects created during the webservice session.
10436
10437 Whenever a method call of the VirtualBox API returns a COM object, the
10438 webservice representation of that method will instead return a
10439 managed object reference, which can then be used to invoke methods
10440 on that object.
10441 </desc>
10442
10443 <method name="getInterfaceName">
10444 <desc>
10445 Returns the name of the interface that this managed object represents,
10446 for example, "IMachine", as a string.
10447 </desc>
10448 <param name="return" type="wstring" dir="return"/>
10449 </method>
10450
10451 <method name="release">
10452 <desc>
10453 Releases this managed object reference and frees the resources that
10454 were allocated for it in the webservice server process. After calling
10455 this method, the identifier of the reference can no longer be used.
10456 </desc>
10457 </method>
10458
10459 </interface>
10460
10461 <!--
10462 // IWebsessionManager
10463 /////////////////////////////////////////////////////////////////////////
10464 -->
10465
10466 <interface
10467 name="IWebsessionManager" extends="$unknown"
10468 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
10469 internal="yes"
10470 wsmap="global"
10471 wscpp="hardcoded"
10472 >
10473 <desc>
10474 Websession manager. This provides essential services
10475 to webservice clients.
10476 </desc>
10477 <method name="logon">
10478 <desc>
10479 Logs a new client onto the webservice and returns a managed object reference to
10480 the IVirtualBox instance, which the client can then use as a basis to further
10481 queries, since all calls to the VirtualBox API are based on the IVirtualBox
10482 interface, in one way or the other.
10483 </desc>
10484 <param name="username" type="wstring" dir="in"/>
10485 <param name="password" type="wstring" dir="in"/>
10486 <param name="return" type="IVirtualBox" dir="return"/>
10487 </method>
10488
10489 <method name="getSessionObject">
10490 <desc>
10491 Returns a managed object reference to the internal ISession object that was created
10492 for this web service session when the client logged on.
10493
10494 <see>ISession</see>
10495 </desc>
10496 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10497 <param name="return" type="ISession" dir="return"/>
10498 </method>
10499
10500 <method name="logoff">
10501 <desc>
10502 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
10503 and destroys all resources associated with the session (most importantly, all
10504 managed objects created in the server while the session was active).
10505 </desc>
10506 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10507 </method>
10508
10509 </interface>
10510
10511</if>
10512
10513 <!--
10514 // IPerformanceCollector & friends
10515 /////////////////////////////////////////////////////////////////////////
10516 -->
10517
10518 <interface
10519 name="IPerformanceMetric" extends="$unknown"
10520 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
10521 >
10522 <desc>
10523 The IPerformanceMetric interface represents parameters of the given
10524 performance metric.
10525 </desc>
10526
10527 <attribute name="metricName" type="wstring" readonly="yes">
10528 <desc>
10529 Name of the metric.
10530 </desc>
10531 </attribute>
10532
10533 <attribute name="object" type="$unknown" readonly="yes">
10534 <desc>
10535 Object this metric belongs to.
10536 </desc>
10537 </attribute>
10538
10539 <attribute name="description" type="wstring" readonly="yes">
10540 <desc>
10541 Textual description of the metric.
10542 </desc>
10543 </attribute>
10544
10545 <attribute name="period" type="unsigned long" readonly="yes">
10546 <desc>
10547 Time interval between samples, measured in seconds.
10548 </desc>
10549 </attribute>
10550
10551 <attribute name="count" type="unsigned long" readonly="yes">
10552 <desc>
10553 Number of recent samples retained by the performance collector for this
10554 metric.
10555
10556 When the collected sample count exceeds this number, older samples
10557 are discarded.
10558 </desc>
10559 </attribute>
10560
10561 <attribute name="unit" type="wstring" readonly="yes">
10562 <desc>
10563 Unit of measurement.
10564 </desc>
10565 </attribute>
10566
10567 <attribute name="minimumValue" type="long" readonly="yes">
10568 <desc>
10569 Minimum possible value of this metric.
10570 </desc>
10571 </attribute>
10572
10573 <attribute name="maximumValue" type="long" readonly="yes">
10574 <desc>
10575 Maximum possible value of this metric.
10576 </desc>
10577 </attribute>
10578 </interface>
10579
10580 <interface
10581 name="IPerformanceCollector" extends="$unknown"
10582 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
10583 wsmap="managed"
10584 >
10585 <desc>
10586 The IPerformanceCollector interface represents a service that collects and
10587 stores performance metrics data.
10588
10589 Performance metrics are associated with objects like IHost and
10590 IMachine. Each object has a distinct set of performance metrics.
10591 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
10592
10593 Metric data are collected at the specified intervals and are retained
10594 internally. The interval and the number of samples retained can be set
10595 with <link to="IPerformanceCollector::setupMetrics" />.
10596
10597 Metrics are organized hierarchically, each level separated by slash (/).
10598 General scheme for metric name is
10599 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
10600 metric name stands for: CPU category, Load metric, User submetric, average
10601 aggregate. An aggregate function is computed over all retained data. Valid
10602 aggregate functions are:
10603
10604 <ul>
10605 <li>avg -- average</li>
10606 <li>min -- minimum</li>
10607 <li>max -- maximum</li>
10608 </ul>
10609
10610 "Category/Metric" together form base metric name. A base metric is the
10611 smallest unit for which a sampling interval and the number of retained
10612 samples can be set. Only base metrics can be enabled and disabled. All
10613 sub-metrics are collected when their base metric is collected.
10614 Collected values for any set of sub-metrics can be queried with
10615 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
10616 metric parameters, querying metric data, enabling or disabling metrics
10617 wildcards can be used in metric names to specify a subset of metrics. For
10618 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
10619 averages can be queried using <tt>*:avg</tt> and so on. To query metric
10620 values without aggregates <tt>*:</tt> can be used.
10621
10622 The valid names for base metrics are:
10623
10624 <ul>
10625 <li>CPU/Load</li>
10626 <li>CPU/MHz</li>
10627 <li>RAM/Usage</li>
10628 </ul>
10629
10630 The general sequence for collecting and retrieving the metrics is:
10631 <ul>
10632 <li>
10633 Obtain an instance of IPerformanceCollector with
10634 <link to="IVirtualBox::performanceCollector" />
10635 </li>
10636 <li>
10637 Allocate and populate an array with references to objects the metrics
10638 will be collected for. Use references to IHost and IMachine objects.
10639 </li>
10640 <li>
10641 Allocate and populate an array with base metric names the data will be
10642 collected for.
10643 </li>
10644 <li>
10645 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
10646 metric data will be collected and stored.
10647 </li>
10648 <li>
10649 Wait for the data to get collected.
10650 </li>
10651 <li>
10652 Allocate and populate an array with references to objects the metric
10653 values will be queried for. You can re-use the object array used for
10654 setting base metrics.
10655 </li>
10656 <li>
10657 Allocate and populate an array with metric names the data will be
10658 collected for. Note that metric names differ from base metric names.
10659 </li>
10660 <li>
10661 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
10662 have been collected so far are returned. Note that the values are still
10663 retained internally and data collection continues.
10664 </li>
10665 </ul>
10666
10667 For an example of usage refer to the following files in VirtualBox SDK:
10668 <ul>
10669 <li>
10670 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
10671 </li>
10672 <li>
10673 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
10674 </li>
10675 </ul>
10676 </desc>
10677
10678 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
10679 <desc>
10680 Array of unique names of metrics.
10681
10682 This array represents all metrics supported by the performance
10683 collector. Individual objects do not necessarily support all of them.
10684 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
10685 list of supported metrics for a particular object.
10686 </desc>
10687 </attribute>
10688
10689 <method name="getMetrics">
10690 <desc>
10691 Returns parameters of specified metrics for a set of objects.
10692 <note>
10693 @c Null metrics array means all metrics. @c Null object array means
10694 all existing objects.
10695 </note>
10696 </desc>
10697 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10698 <desc>
10699 Metric name filter. Currently, only a comma-separated list of metrics
10700 is supported.
10701 </desc>
10702 </param>
10703 <param name="objects" type="$unknown" dir="in" safearray="yes">
10704 <desc>
10705 Set of objects to return metric parameters for.
10706 </desc>
10707 </param>
10708 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
10709 <desc>
10710 Array of returned metric parameters.
10711 </desc>
10712 </param>
10713 </method>
10714
10715 <method name="setupMetrics">
10716 <desc>
10717 Sets parameters of specified base metrics for a set of objects. Returns
10718 an array of <link to="IPerformanceMetric" /> describing the metrics have
10719 been affected.
10720 <note>
10721 @c Null or empty metric name array means all metrics. @c Null or empty
10722 object array means all existing objects. If metric name array contains
10723 a single element and object array contains many, the single metric
10724 name array element is applied to each object array element to form
10725 metric/object pairs.
10726 </note>
10727 </desc>
10728 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10729 <desc>
10730 Metric name filter. Comma-separated list of metrics with wildcard
10731 support.
10732 </desc>
10733 </param>
10734 <param name="objects" type="$unknown" dir="in" safearray="yes">
10735 <desc>
10736 Set of objects to setup metric parameters for.
10737 </desc>
10738 </param>
10739 <param name="period" type="unsigned long" dir="in">
10740 <desc>
10741 Time interval in seconds between two consecutive samples of performance
10742 data.
10743 </desc>
10744 </param>
10745 <param name="count" type="unsigned long" dir="in">
10746 <desc>
10747 Number of samples to retain in performance data history. Older samples
10748 get discarded.
10749 </desc>
10750 </param>
10751 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10752 <desc>
10753 Array of metrics that have been modified by the call to this method.
10754 </desc>
10755 </param>
10756 </method>
10757
10758 <method name="enableMetrics">
10759 <desc>
10760 Turns on collecting specified base metrics. Returns an array of
10761 <link to="IPerformanceMetric" /> describing the metrics have been
10762 affected.
10763 <note>
10764 @c Null or empty metric name array means all metrics. @c Null or empty
10765 object array means all existing objects. If metric name array contains
10766 a single element and object array contains many, the single metric
10767 name array element is applied to each object array element to form
10768 metric/object pairs.
10769 </note>
10770 </desc>
10771 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10772 <desc>
10773 Metric name filter. Comma-separated list of metrics with wildcard
10774 support.
10775 </desc>
10776 </param>
10777 <param name="objects" type="$unknown" dir="in" safearray="yes">
10778 <desc>
10779 Set of objects to enable metrics for.
10780 </desc>
10781 </param>
10782 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10783 <desc>
10784 Array of metrics that have been modified by the call to this method.
10785 </desc>
10786 </param>
10787 </method>
10788
10789 <method name="disableMetrics">
10790 <desc>
10791 Turns off collecting specified base metrics. Returns an array of
10792 <link to="IPerformanceMetric" /> describing the metrics have been
10793 affected.
10794 <note>
10795 @c Null or empty metric name array means all metrics. @c Null or empty
10796 object array means all existing objects. If metric name array contains
10797 a single element and object array contains many, the single metric
10798 name array element is applied to each object array element to form
10799 metric/object pairs.
10800 </note>
10801 </desc>
10802 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10803 <desc>
10804 Metric name filter. Comma-separated list of metrics with wildcard
10805 support.
10806 </desc>
10807 </param>
10808 <param name="objects" type="$unknown" dir="in" safearray="yes">
10809 <desc>
10810 Set of objects to disable metrics for.
10811 </desc>
10812 </param>
10813 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10814 <desc>
10815 Array of metrics that have been modified by the call to this method.
10816 </desc>
10817 </param>
10818 </method>
10819
10820 <method name="queryMetricsData">
10821 <desc>
10822 Queries collected metrics data for a set of objects.
10823
10824 The data itself and related metric information are returned in seven
10825 parallel and one flattened array of arrays. Elements of
10826 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
10827 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
10828 the same index describe one set of values corresponding to a single
10829 metric.
10830
10831 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
10832 start and length of a sub-array is indicated by
10833 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
10834 value for metric <tt>metricNames[i]</tt> is at
10835 <tt>returnData[returnIndices[i]]</tt>.
10836
10837 <note>
10838 @c Null or empty metric name array means all metrics. @c Null or empty
10839 object array means all existing objects. If metric name array contains
10840 a single element and object array contains many, the single metric
10841 name array element is applied to each object array element to form
10842 metric/object pairs.
10843 </note>
10844 <note>
10845 Data collection continues behind the scenes after call to @c
10846 queryMetricsData. The return data can be seen as the snapshot of
10847 the current state at the time of @c queryMetricsData call. The
10848 internally kept metric values are not cleared by the call. This makes
10849 possible querying different subsets of metrics or aggregates with
10850 subsequent calls. If periodic querying is needed it is highly
10851 suggested to query the values with @c interval*count period to avoid
10852 confusion. This way a completely new set of data values will be
10853 provided by each query.
10854 </note>
10855 </desc>
10856 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10857 <desc>
10858 Metric name filter. Comma-separated list of metrics with wildcard
10859 support.
10860 </desc>
10861 </param>
10862 <param name="objects" type="$unknown" dir="in" safearray="yes">
10863 <desc>
10864 Set of objects to query metrics for.
10865 </desc>
10866 </param>
10867 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
10868 <desc>
10869 Names of metrics returned in @c returnData.
10870 </desc>
10871 </param>
10872 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
10873 <desc>
10874 Objects associated with metrics returned in @c returnData.
10875 </desc>
10876 </param>
10877 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
10878 <desc>
10879 Units of measurement for each returned metric.
10880 </desc>
10881 </param>
10882 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
10883 <desc>
10884 Divisor that should be applied to return values in order to get
10885 floating point values. For example:
10886 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
10887 will retrieve the floating point value of i-th sample of the first
10888 metric.
10889 </desc>
10890 </param>
10891 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
10892 <desc>
10893 Sequence numbers of the first elements of value sequences of particular metrics
10894 returned in @c returnData. For aggregate metrics it is the sequence number of
10895 the sample the aggregate started calculation from.
10896 </desc>
10897 </param>
10898 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
10899 <desc>
10900 Indices of the first elements of value sequences of particular metrics
10901 returned in @c returnData.
10902 </desc>
10903 </param>
10904 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
10905 <desc>
10906 Lengths of value sequences of particular metrics.
10907 </desc>
10908 </param>
10909 <param name="returnData" type="long" dir="return" safearray="yes">
10910 <desc>
10911 Flattened array of all metric data containing sequences of values for
10912 each metric.
10913 </desc>
10914 </param>
10915 </method>
10916
10917 </interface>
10918
10919 <module name="VBoxSVC" context="LocalServer">
10920 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
10921 namespace="virtualbox.org">
10922 <interface name="IVirtualBox" default="yes"/>
10923 </class>
10924 </module>
10925
10926 <module name="VBoxC" context="InprocServer" threadingModel="Free">
10927 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
10928 namespace="virtualbox.org">
10929 <interface name="ISession" default="yes"/>
10930 </class>
10931 </module>
10932
10933</library>
10934
10935</idl>
10936<!-- 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