VirtualBox

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

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

#3285: Improve error handling API to include unique error numbers
document createDiffStorage's E_VBOX_OBJECT_IN_USE.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 406.8 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 14700 2008-11-27 12:23:25Z vboxsync $ *
5 *
6 * :tabSize=2:indentSize=2:noTabs=true:
7 * :folding=explicit:collapseFolds=1:
8 *
9 * Master declaration for VirtualBox's Main API, represented
10 * by COM/XPCOM and web service interfaces.
11 *
12 * From this document, the build system generates several files
13 * via XSLT that are then used during the build process.
14 *
15 * Below is the list of XSL templates that operate on this file and
16 * output files they generate. These XSL templates must be updated
17 * whenever the schema of this file changes:
18 *
19 * 1. src/VBox/Main/idl/midl.xsl =>
20 * out/<platform>/bin/sdk/idl/VirtualBox.idl
21 * (MS COM interface definition file for Main API)
22 *
23 * 2. src/VBox/Main/idl/xpidl.xsl =>
24 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
25 * (XPCOM interface definition file for Main API)
26 *
27 * 3. src/VBox/Main/idl/doxygen.xsl =>
28 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
29 * (pseudo-IDL for Doxygen to generate the official Main API
30 * documentation)
31 *
32 * 4. src/VBox/Main/webservice/*.xsl =>
33 * a bunch of WSDL and C++ files
34 * (VirtualBox web service sources and SOAP mappers;
35 * see src/VBox/Main/webservice/Makefile.kmk for details)
36 *
37 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
38 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
39 * (smart Qt-based C++ wrapper classes for COM interfaces
40 * of the Main API)
41 *
42 * 6. src/VBox/Frontends/VirtualBox4/include/COMWrappers.xsl =>
43 * out/<platform>/obj/src/VBox/Frontends/VirtualBox4/VirtualBox/include/COMWrappers.h
44 * (smart Qt-based C++ wrapper classes for COM interfaces
45 * of the Main API)
46 *
47 * 7. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
48 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
49 * (Main API TypeLib block for the WiX installer)
50 *
51 * 8. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
52 * out/<platform>/obj/src/VBox/Runtime/errmsgvboxcomdata.h
53 * (<result> extraction for the %Rhrc format specifier)
54 *
55 Copyright (C) 2006-2007 Sun Microsystems, Inc.
56
57 This file is part of VirtualBox Open Source Edition (OSE), as
58 available from http://www.virtualbox.org. This file is free software;
59 you can redistribute it and/or modify it under the terms of the GNU
60 General Public License (GPL) as published by the Free Software
61 Foundation, in version 2 as it comes in the "COPYING" file of the
62 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
63 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
64
65 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
66 Clara, CA 95054 USA or visit http://www.sun.com if you need
67 additional information or have any questions.
68-->
69
70<idl>
71
72<desc>
73 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
74 describes the so-called <i>VirtualBox Main API</i> which comprises all public
75 COM interfaces and components provided by the VirtualBox server and by the
76 VirtualBox client library.
77
78 VirtualBox employs a client-server design, meaning that whenever any part of
79 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
80 interface or any virtual machine --, a dedicated server process named
81 VBoxSVC runs in the background. This allows multiple processes working with
82 VirtualBox to cooperate without conflicts. These processes communicate to each
83 other using inter-process communication facilities provided by the COM
84 implementation of the host computer.
85
86 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
87 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
88 implementation, is used.
89
90 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
91 the VBoxManage command-line interface and the VBoxVRDP server) are technically
92 front-ends to the Main API and only use the interfaces that are documented
93 in this Main API documentation. This ensures that, with any given release
94 version of VirtualBox, all capabilities of the product that could be useful
95 to an external client program are always exposed by way of this API.
96
97 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
98 contains two public component classes:
99 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
100 implement IVirtualBox and ISession interfaces respectively. These two classes
101 are of supreme importance and will be needed in order for any front-end
102 program to do anything useful. It is recommended to read the documentation of
103 the mentioned interfaces first.
104
105 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
106 there can be only one object of this class on the local machine at any given
107 time. This object is a parent of many other objects ih the VirtualBox COM
108 library and lives in the VBoxSVC process. In fact, when you create an instance
109 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
110 process is already running, starts it if not, and returns you a reference to
111 the<tt>VirtualBox</tt> object created in this process. When the last reference
112 to this object is released, the VBoxSVC process ends (with a 5 second delay to
113 protect from too frequent restarts).
114
115 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
116 as many <tt>Session</tt> objects as you need but all of them will live in a
117 process which issues the object instantiation call. <tt>Session</tt> objects
118 represent virtual machine sessions which are used to configure virtual
119 machines and control their execution.
120</desc>
121
122<if target="midl">
123 <cpp line="enum {"/>
124 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
125 <cpp line=" kTypeLibraryMinorVersion = 0"/>
126 <cpp line="};"/>
127</if>
128
129<if target="xpidl">
130 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
131 <cpp>
132/* currently, nsISupportsImpl.h lacks the below-like macros */
133
134#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
135#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
142 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
150 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
151#endif
152
153#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
154# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
155 NS_INTERFACE_MAP_BEGIN(_class) \
156 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
157 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
158 NS_IMPL_QUERY_CLASSINFO(_class) \
159 NS_INTERFACE_MAP_END
160#endif
161
162#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
163# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
164 _i2, _ic2) \
165 NS_INTERFACE_MAP_BEGIN(_class) \
166 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
167 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
169 NS_IMPL_QUERY_CLASSINFO(_class) \
170 NS_INTERFACE_MAP_END
171#endif
172
173#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
174#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
175
176#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
177# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
178 NS_IMPL_THREADSAFE_ADDREF(_class) \
179 NS_IMPL_THREADSAFE_RELEASE(_class) \
180 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
181 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
182#endif
183
184#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
185# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
186 _i2, _ic2) \
187 NS_IMPL_THREADSAFE_ADDREF(_class) \
188 NS_IMPL_THREADSAFE_RELEASE(_class) \
189 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
190 _i2, _ic2) \
191 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
192#endif
193 </cpp>
194</if>
195
196<library
197 name="VirtualBox"
198 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
199 version="1.3"
200 desc="VirtualBox Type Library"
201 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
202 supportsErrorInfo="yes"
203>
204
205
206 <!--
207 // COM result codes for VirtualBox
208 /////////////////////////////////////////////////////////////////////////
209 -->
210
211 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
212 <desc>
213 This section describes all VirtualBox-specific COM result codes that may
214 be returned by methods of VirtualBox COM interfaces in addition to
215 standard COM result codes.
216
217 Note that along with the result code, every VirtualBox method returns
218 extended error information through the IVirtualBoxErrorInfo interface on
219 failure. This interface is a preferred way to present the error to the end
220 user because it contains a human readable description of the error. Raw
221 result codes, both standard and described in this section, are intended to
222 be used by programs to analyze the reason of a failure and select an
223 appropriate course of action without involving the end user (for example,
224 retry the operation later or make a different call).
225
226 The standard COM result codes that may originate from our methods include:
227
228 <table>
229 <tr><td>E_INVALIDARG</td>
230 <td>
231 Returned when the value of the method's argument is not within the range
232 of valid values. This should not be confused with situations when the
233 value is within the range but simply doesn't suit the current object
234 state and there is a possibility that it will be accepted later (in such
235 cases VirtualBox-specific codes are returned, for example,
236 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
237 </td>
238 </tr>
239 <tr><td>E_POINTER</td>
240 <td>
241 Returned if a memory pointer for the output argument is invalid (for
242 example, <tt>NULL</tt>). Note that when pointers representing input
243 arguments (such as strings) are invalid, E_INVALIDARG is returned.
244 </td>
245 </tr>
246 <tr><td>E_ACCESSDENIED</td>
247 <td>
248 Returned when the called object is not ready. Since the lifetime of a
249 public COM object cannot be fully controlled by the implementation,
250 VirtualBox maintains the readiness state for all objects it creates and
251 returns this code in response to any method call on the object that was
252 deactivated by VirtualBox and is not functioning any more.
253 </td>
254 </tr>
255 <tr><td>E_OUTOFMEMORY</td>
256 <td>
257 Returned when a memory allocation operation fails.
258 </td>
259 </tr>
260 </table>
261 </desc>
262 </descGroup>
263
264 <!--
265 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
266 everything in <result>/<desc> after (and including) the first dot, so express
267 the matter of the error code in the first sentence and keep it short.
268 -->
269
270 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
271 <desc>
272 Object corresponding to the supplied arguments does not exist.
273 </desc>
274 </result>
275
276 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
277 <desc>
278 Current virtual machine state prevents the operation.
279 </desc>
280 </result>
281
282 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
283 <desc>
284 Virtual machine error occurred attempting the operation.
285 </desc>
286 </result>
287
288 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
289 <desc>
290 File not accessible or erroneous file contents.
291 </desc>
292 </result>
293
294 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
295 <desc>
296 Runtime subsystem error.
297 </desc>
298 </result>
299
300 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
301 <desc>
302 Pluggable Device Manager error.
303 </desc>
304 </result>
305
306 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB0007">
307 <desc>
308 Operation prohibited because object is in use.
309 </desc>
310 </result>
311
312 <!--
313 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
314 everything in <result>/<desc> after (and including) the first dot, so express
315 the matter of the error code in the first sentence and keep it short.
316 -->
317
318 <descGroup/>
319
320 <!--
321 // all common enums
322 /////////////////////////////////////////////////////////////////////////
323 -->
324
325 <enum
326 name="TSBool"
327 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
328 >
329 <desc>
330 Boolean variable having a third state, default.
331 </desc>
332
333 <const name="False" value="0"/>
334 <const name="True" value="1"/>
335 <const name="Default" value="2"/>
336 </enum>
337
338 <enum
339 name="MachineState"
340 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
341 >
342 <desc>
343 Virtual machine execution state. This enumeration represents possible
344 values of the <link to="IMachine::state"/> attribute.
345 </desc>
346
347 <const name="Null" value="0">
348 <desc><tt>null</tt> value. Never used by the API.</desc>
349 </const>
350 <const name="PoweredOff" value="1">
351 <desc>
352 The machine is not running.
353 </desc>
354 </const>
355 <const name="Saved" value="2">
356 <desc>
357 The machine is not currently running, but the execution state
358 of the machine has been saved to an external file when it
359 was running.
360 <note>
361 Only a few machine settings can be altered when the machine
362 is in this state.
363 </note>
364 </desc>
365 </const>
366 <const name="Aborted" value="3">
367 <desc>
368 A process running the machine has terminated abnormally.
369 Other than that, this value is equivalent to #PoweredOff.
370 </desc>
371 </const>
372 <const name="Running" value="4">
373 <desc>
374 The machine is currently being executed.
375 <note>
376 This value can be used in relational expressions:
377 all state values less than Running describe a virtual machine that is
378 not currently being executed (i.e., it is completely out of
379 action).
380 </note>
381 <note internal="yes">
382 For whoever decides to touch this enum: In order to keep the
383 aforementioned comparisons valid, this state must immediately
384 precede the Paused state.
385 </note>
386 </desc>
387 </const>
388 <const name="Paused" value="5">
389 <desc>
390 Execution of the machine has been paused.
391 <note>
392 This value can be used in relational expressions: all state values
393 greater than Paused represent unstable states of the running virtual
394 machine. Unless explicitly stated otherwise, no machine settings can
395 be altered when it is in one of the unstable states.
396 </note>
397 <note internal="yes">
398 For whoever decides to touch this enum: In order to keep the
399 aforementioned comparisons valid, this state must immediately
400 follow the Running state.
401 </note>
402 </desc>
403 </const>
404 <const name="Stuck" value="6">
405 <desc>
406 Execution of the machine has reached the "Guru Meditation"
407 condition. This condition indicates an internal VMM failure which may
408 happen as a result of either an unhandled low-level virtual hardware
409 exception or one of the recompiler exceptions (such as
410 the <i>too-many-traps</i> condition).
411 </desc>
412 </const>
413 <const name="Starting" value="7">
414 <desc>
415 Machine is being started after
416 <link to="IConsole::powerUp">powering it on</link> from a
417 zero execution state.
418 </desc>
419 </const>
420 <const name="Stopping" value="8">
421 <desc>
422 Machine is being normally stopped
423 (after explicitly <link to="IConsole::powerDown">powering it off</link>,
424 or after the guest OS has initiated a shutdown sequence).
425 </desc>
426 </const>
427 <const name="Saving" value="9">
428 <desc>
429 Machine is saving its execution state to a file as a
430 result of calling <link to="IConsole::saveState"/> or an online
431 snapshot of the machine is being taken using
432 <link to="IConsole::takeSnapshot"/>.
433 </desc>
434 </const>
435 <const name="Restoring" value="10">
436 <desc>
437 Execution state of the machine is being restored from a file
438 after <link to="IConsole::powerUp">powering it on</link> from
439 a saved execution state.
440 </desc>
441 </const>
442 <const name="Discarding" value="11">
443 <desc>
444 Snapshot of the machine is being discarded after calling
445 <link to="IConsole::discardSnapshot"/> or its current state is
446 being discarded after <link to="IConsole::discardCurrentState"/>.
447 </desc>
448 </const>
449 <const name="SettingUp" value="12">
450 <desc>
451 Lengthy setup operation is in progress (e.g.
452 <link to="IMachine::attachHardDisk2"/>).
453 </desc>
454 </const>
455 </enum>
456
457 <enum
458 name="SessionState"
459 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
460 >
461 <desc>
462 Session state. This enumeration represents possible values of
463 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
464 attributes. Individual value descriptions contain the appropriate
465 meaning for every case.
466 </desc>
467
468 <const name="Null" value="0">
469 <desc><tt>null</tt> value. Never used by the API.</desc>
470 </const>
471 <const name="Closed" value="1">
472 <desc>
473 The machine has no open sessions (<link to="IMachine::sessionState"/>);
474 the session is closed (<link to="ISession::state"/>)
475 </desc>
476 </const>
477 <const name="Open" value="2">
478 <desc>
479 The machine has an open direct session (<link to="IMachine::sessionState"/>);
480 the session is open (<link to="ISession::state"/>)
481 </desc>
482 </const>
483 <const name="Spawning" value="3">
484 <desc>
485 A new (direct) session is being opened for the machine
486 as a result of <link to="IVirtualBox::openRemoteSession()"/>
487 call (<link to="IMachine::sessionState"/>);
488 the session is currently being opened
489 as a result of <link to="IVirtualBox::openRemoteSession()"/>
490 call (<link to="ISession::state"/>)
491 </desc>
492 </const>
493 <const name="Closing" value="4">
494 <desc>
495 The direct session is being closed (<link to="IMachine::sessionState"/>);
496 the session is being closed (<link to="ISession::state"/>)
497 </desc>
498 </const>
499 </enum>
500
501 <enum
502 name="SessionType"
503 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
504 >
505 <desc>
506 Session type. This enumeration represents possible values of the
507 <link to="ISession::type"/> attribute.
508 </desc>
509
510 <const name="Null" value="0">
511 <desc><tt>null</tt> value. Never used by the API.</desc>
512 </const>
513 <const name="Direct" value="1">
514 <desc>
515 Direct session
516 (opened by <link to="IVirtualBox::openSession()"/>)
517 </desc>
518 </const>
519 <const name="Remote" value="2">
520 <desc>
521 Remote session
522 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
523 </desc>
524 </const>
525 <const name="Existing" value="3">
526 <desc>
527 Existing session
528 (opened by <link to="IVirtualBox::openExistingSession()"/>)
529 </desc>
530 </const>
531 </enum>
532
533 <enum
534 name="DeviceType"
535 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
536 >
537 <desc>
538 Device type.
539 </desc>
540 <const name="Null" value="0">
541 <desc>
542 <tt>null</tt> value which may also mean "no device".
543 <note>
544 This value is not allowed for
545 <link to="IConsole::getDeviceActivity"/>
546 </note>
547 </desc>
548 </const>
549 <const name="Floppy" value="1">
550 <desc>Floppy device.</desc>
551 </const>
552 <const name="DVD" value="2">
553 <desc>CD/DVD-ROM device.</desc>
554 </const>
555 <const name="HardDisk" value="3">
556 <desc>Hard disk device.</desc>
557 </const>
558 <const name="Network" value="4">
559 <desc>Network device.</desc>
560 </const>
561 <const name="USB" value="5">
562 <desc>USB device.</desc>
563 </const>
564 <const name="SharedFolder" value="6">
565 <desc>Shared folder device.</desc>
566 </const>
567 </enum>
568
569 <enum
570 name="DeviceActivity"
571 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
572 >
573 <desc>
574 Device activity for <link to="IConsole::getDeviceActivity"/>.
575 </desc>
576
577 <const name="Null" value="0"/>
578 <const name="Idle" value="1"/>
579 <const name="Reading" value="2"/>
580 <const name="Writing" value="3"/>
581 </enum>
582
583 <enum
584 name="StorageBus"
585 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
586 >
587 <desc>Interface bus type for storage devices.</desc>
588
589 <const name="Null" value="0">
590 <desc><tt>null</tt> value. Never used by the API.</desc>
591 </const>
592
593 <const name="IDE" value="1"/>
594 <const name="SATA" value="2"/>
595 </enum>
596
597 <enum
598 name="ClipboardMode"
599 uuid="33364716-4008-4701-8f14-be0fa3d62950"
600 >
601 <desc>
602 Host-Guest clipboard interchange mode.
603 </desc>
604
605 <const name="Disabled" value="0"/>
606 <const name="HostToGuest" value="1"/>
607 <const name="GuestToHost" value="2"/>
608 <const name="Bidirectional" value="3"/>
609 </enum>
610
611 <enum
612 name="Scope"
613 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
614 >
615 <desc>
616 Scope of the operation.
617
618 A generic enumeration used in various methods to define the action or
619 argument scope.
620 </desc>
621
622 <const name="Global" value="0"/>
623 <const name="Machine" value="1"/>
624 <const name="Session" value="2"/>
625 </enum>
626
627 <enum
628 name="GuestStatisticType"
629 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
630 >
631 <desc>
632 Statistics type for <link to="IGuest::getStatistic"/>.
633 </desc>
634
635 <const name="CPULoad_Idle" value="0">
636 <desc>
637 Idle CPU load (0-100%) for last interval.
638 </desc>
639 </const>
640 <const name="CPULoad_Kernel" value="1">
641 <desc>
642 Kernel CPU load (0-100%) for last interval.
643 </desc>
644 </const>
645 <const name="CPULoad_User" value="2">
646 <desc>
647 User CPU load (0-100%) for last interval.
648 </desc>
649 </const>
650 <const name="Threads" value="3">
651 <desc>
652 Total number of threads in the system.
653 </desc>
654 </const>
655 <const name="Processes" value="4">
656 <desc>
657 Total number of processes in the system.
658 </desc>
659 </const>
660 <const name="Handles" value="5">
661 <desc>
662 Total number of handles in the system.
663 </desc>
664 </const>
665 <const name="MemoryLoad" value="6">
666 <desc>
667 Memory load (0-100%).
668 </desc>
669 </const>
670 <const name="PhysMemTotal" value="7">
671 <desc>
672 Total physical memory in megabytes.
673 </desc>
674 </const>
675 <const name="PhysMemAvailable" value="8">
676 <desc>
677 Free physical memory in megabytes.
678 </desc>
679 </const>
680 <const name="PhysMemBalloon" value="9">
681 <desc>
682 Ballooned physical memory in megabytes.
683 </desc>
684 </const>
685 <const name="MemCommitTotal" value="10">
686 <desc>
687 Total amount of memory in the committed state in megabytes.
688 </desc>
689 </const>
690 <const name="MemKernelTotal" value="11">
691 <desc>
692 Total amount of memory used by the guest OS's kernel in megabytes.
693 </desc>
694 </const>
695 <const name="MemKernelPaged" value="12">
696 <desc>
697 Total amount of paged memory used by the guest OS's kernel in megabytes.
698 </desc>
699 </const>
700 <const name="MemKernelNonpaged" value="13">
701 <desc>
702 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
703 </desc>
704 </const>
705 <const name="MemSystemCache" value="14">
706 <desc>
707 Total amount of memory used by the guest OS's system cache in megabytes.
708 </desc>
709 </const>
710 <const name="PageFileSize" value="15">
711 <desc>
712 Pagefile size in megabytes.
713 </desc>
714 </const>
715 <const name="SampleNumber" value="16">
716 <desc>
717 Statistics sample number
718 </desc>
719 </const>
720 <const name="MaxVal" value="17"/>
721 </enum>
722
723 <enum
724 name="BIOSBootMenuMode"
725 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
726 >
727 <desc>
728 BIOS boot menu mode.
729 </desc>
730
731 <const name="Disabled" value="0"/>
732 <const name="MenuOnly" value="1"/>
733 <const name="MessageAndMenu" value="2"/>
734 </enum>
735
736 <enum
737 name="IDEControllerType"
738 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
739 >
740 <desc>
741 IDE controller type.
742 </desc>
743
744 <const name="Null" value="0">
745 <desc><tt>null</tt> value. Never used by the API.</desc>
746 </const>
747 <const name="PIIX3" value="1"/>
748 <const name="PIIX4" value="2"/>
749 </enum>
750
751 <enum
752 name="DriveState"
753 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
754 >
755 <const name="Null" value="0">
756 <desc><tt>null</tt> value. Never used by the API.</desc>
757 </const>
758 <const name="NotMounted" value="1"/>
759 <const name="ImageMounted" value="2"/>
760 <const name="HostDriveCaptured" value="3"/>
761 </enum>
762
763 <enum
764 name="ProcessorFeature"
765 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
766 >
767 <desc>
768 CPU features.
769 </desc>
770
771 <const name="HWVirtEx" value="0"/>
772 <const name="PAE" value="1"/>
773 <const name="LongMode" value="2"/>
774 </enum>
775
776
777 <!--
778 // IVirtualBoxErrorInfo
779 /////////////////////////////////////////////////////////////////////////
780 -->
781
782 <interface
783 name="IVirtualBoxErrorInfo" extends="$errorinfo"
784 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
785 supportsErrorInfo="no"
786 wsmap="suppress"
787 >
788 <desc>
789 The IVirtualBoxErrorInfo interface represents extended error information.
790
791 Extended error information can be set by VirtualBox components after
792 unsuccessful or partially successful method invocation. This information
793 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
794 and then shown to the client in addition to the plain 32-bit result code.
795
796 In MS COM, this interface extends the IErrorInfo interface,
797 in XPCOM, it extends the nsIException interface. In both cases,
798 it provides a set of common attributes to retrieve error
799 information.
800
801 Sometimes invocation of some component's method may involve methods of
802 other components that may also fail (independently of this method's
803 failure), or a series of non-fatal errors may precede a fatal error that
804 causes method failure. In cases like that, it may be desirable to preserve
805 information about all errors happened during method invocation and deliver
806 it to the caller. The <link to="#next"/> attribute is intended
807 specifically for this purpose and allows to represent a chain of errors
808 through a single IVirtualBoxErrorInfo object set after method invocation.
809
810 Note that errors are stored to a chain in the reverse order, i.e. the
811 initial error object you query right after method invocation is the last
812 error set by the callee, the object it points to in the @a next attribute
813 is the previous error and so on, up to the first error (which is the last
814 in the chain).
815 </desc>
816
817 <attribute name="resultCode" type="result" readonly="yes">
818 <desc>
819 Result code of the error.
820 Usually, it will be the same as the result code returned
821 by the method that provided this error information, but not
822 always. For example, on Win32, CoCreateInstance() will most
823 likely return E_NOINTERFACE upon unsuccessful component
824 instantiation attempt, but not the value the component factory
825 returned.
826 <note>
827 In MS COM, there is no equivalent.
828 In XPCOM, it is the same as nsIException::result.
829 </note>
830 </desc>
831 </attribute>
832
833 <attribute name="interfaceID" type="uuid" readonly="yes">
834 <desc>
835 UUID of the interface that defined the error.
836 <note>
837 In MS COM, it is the same as IErrorInfo::GetGUID.
838 In XPCOM, there is no equivalent.
839 </note>
840 </desc>
841 </attribute>
842
843 <attribute name="component" type="wstring" readonly="yes">
844 <desc>
845 Name of the component that generated the error.
846 <note>
847 In MS COM, it is the same as IErrorInfo::GetSource.
848 In XPCOM, there is no equivalent.
849 </note>
850 </desc>
851 </attribute>
852
853 <attribute name="text" type="wstring" readonly="yes">
854 <desc>
855 Text description of the error.
856 <note>
857 In MS COM, it is the same as IErrorInfo::GetDescription.
858 In XPCOM, it is the same as nsIException::message.
859 </note>
860 </desc>
861 </attribute>
862
863 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
864 <desc>
865 Next error object if there is any, or @c null otherwise.
866 <note>
867 In MS COM, there is no equivalent.
868 In XPCOM, it is the same as nsIException::inner.
869 </note>
870 </desc>
871 </attribute>
872
873 </interface>
874
875
876 <!--
877 // IVirtualBox
878 /////////////////////////////////////////////////////////////////////////
879 -->
880
881 <interface
882 name="IVirtualBoxCallback" extends="$unknown"
883 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
884 wsmap="suppress"
885 >
886 <method name="onMachineStateChange">
887 <desc>
888 The execution state of the given machine has changed.
889 <see>IMachine::state</see>
890 </desc>
891 <param name="machineId" type="uuid" dir="in">
892 <desc>ID of the machine this event relates to.</desc>
893 </param>
894 <param name="state" type="MachineState" dir="in">
895 <desc>New execution state.</desc>
896 </param>
897 </method>
898
899 <method name="onMachineDataChange">
900 <desc>
901 Any of the settings of the given machine has changed.
902 </desc>
903 <param name="machineId" type="uuid" dir="in">
904 <desc>ID of the machine this event relates to.</desc>
905 </param>
906 </method>
907
908 <method name="onExtraDataCanChange">
909 <desc>
910 Notification when someone tries to change extra data for
911 either the given machine or (if null) global extra data.
912 This gives the chance to veto against changes.
913 </desc>
914 <param name="machineId" type="uuid" dir="in">
915 <desc>
916 ID of the machine this event relates to
917 (null ID for global extra data change requests).
918 </desc>
919 </param>
920 <param name="key" type="wstring" dir="in">
921 <desc>
922 Extra data key for the attempted write.
923 </desc>
924 </param>
925 <param name="value" type="wstring" dir="in">
926 <desc>
927 Extra data value for the given key.
928 </desc>
929 </param>
930 <param name="error" type="wstring" dir="out">
931 <desc>
932 Optional error message describing the reason of the
933 veto (ignored if this notification returns @c true).
934 </desc>
935 </param>
936 <param name="allowChange" type="boolean" dir="return">
937 <desc>
938 Flag to indicate whether the callee agrees (@c true)
939 or vetoes against the change (@c false).
940 </desc>
941 </param>
942 </method>
943
944 <method name="onExtraDataChange">
945 <desc>
946 Notification when machine specific or global extra data
947 has changed.
948 </desc>
949 <param name="machineId" type="uuid" dir="in">
950 <desc>
951 ID of the machine this event relates to.
952 Null for global extra data changes.
953 </desc>
954 </param>
955 <param name="key" type="wstring" dir="in">
956 <desc>
957 Extra data key that has changed.
958 </desc>
959 </param>
960 <param name="value" type="wstring" dir="in">
961 <desc>
962 Extra data value for the given key.
963 </desc>
964 </param>
965 </method>
966
967 <method name="onMediaRegistered">
968 <desc>
969 The given media was registered or unregistered
970 within this VirtualBox installation.
971
972 The @a mediaType parameter describes what type of
973 media the specified @a mediaId refers to. Possible
974 values are:
975
976 <ul>
977 <li><link to="DeviceType::HardDisk"/>: the media is a hard disk
978 that, if registered, can be obtained using the
979 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
980 <li><link to="DeviceType::DVD"/>: the media is a CD/DVD image
981 that, if registered, can be obtained using the
982 <link to="IVirtualBox::getDVDImage()"/> call.</li>
983 <li><link to="DeviceType::Floppy"/>: the media is a Floppy image
984 that, if registered, can be obtained using the
985 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
986 </ul>
987
988 Note that if this is a deregistration notification,
989 there is no way to access the object representing the
990 unregistered media. It is supposed that the
991 application will do required cleanup based on the @a
992 mediaId value.
993 </desc>
994 <param name="mediaId" type="uuid" dir="in">
995 <desc>ID of the media this event relates to.</desc>
996 </param>
997 <param name="mediaType" type="DeviceType" dir="in">
998 <desc>Type of the media this event relates to.</desc>
999 </param>
1000 <param name="registered" type="boolean" dir="in">
1001 <desc>
1002 If true, the media was registered, otherwise it was
1003 unregistered.
1004 </desc>
1005 </param>
1006 </method>
1007
1008 <method name="onMachineRegistered">
1009 <desc>
1010 The given machine was registered or unregistered
1011 within this VirtualBox installation.
1012 </desc>
1013 <param name="machineId" type="uuid" dir="in">
1014 <desc>ID of the machine this event relates to.</desc>
1015 </param>
1016 <param name="registered" type="boolean" dir="in">
1017 <desc>
1018 If true, the machine was registered, otherwise it was
1019 unregistered.
1020 </desc>
1021 </param>
1022 </method>
1023
1024 <method name="onSessionStateChange">
1025 <desc>
1026 The state of the session for the given machine was changed.
1027 <see>IMachine::sessionState</see>
1028 </desc>
1029 <param name="machineId" type="uuid" dir="in">
1030 <desc>ID of the machine this event relates to.</desc>
1031 </param>
1032 <param name="state" type="SessionState" dir="in">
1033 <desc>New session state.</desc>
1034 </param>
1035 </method>
1036
1037 <method name="onSnapshotTaken">
1038 <desc>
1039 A new snapshot of the machine has been taken.
1040 <see>ISnapshot</see>
1041 </desc>
1042 <param name="machineId" type="uuid" dir="in">
1043 <desc>ID of the machine this event relates to.</desc>
1044 </param>
1045 <param name="snapshotId" type="uuid" dir="in">
1046 <desc>ID of the new snapshot.</desc>
1047 </param>
1048 </method>
1049
1050 <method name="onSnapshotDiscarded">
1051 <desc>
1052 Snapshot of the given machine has been discarded.
1053
1054 <note>
1055 This notification is delivered <b>after</b> the snapshot
1056 object has been uninitialized on the server (so that any
1057 attempt to call its methods will return an error).
1058 </note>
1059
1060 <see>ISnapshot</see>
1061 </desc>
1062 <param name="machineId" type="uuid" dir="in">
1063 <desc>ID of the machine this event relates to.</desc>
1064 </param>
1065 <param name="snapshotId" type="uuid" dir="in">
1066 <desc>
1067 ID of the discarded snapshot. <tt>null</tt> means the
1068 current machine state has been discarded (restored from
1069 the current snapshot).
1070 </desc>
1071 </param>
1072 </method>
1073
1074 <method name="onSnapshotChange">
1075 <desc>
1076 Snapshot properties (name and/or description) have been changed.
1077 <see>ISnapshot</see>
1078 </desc>
1079 <param name="machineId" type="uuid" dir="in">
1080 <desc>ID of the machine this event relates to.</desc>
1081 </param>
1082 <param name="snapshotId" type="uuid" dir="in">
1083 <desc>ID of the changed snapshot.</desc>
1084 </param>
1085 </method>
1086
1087 <method name="onGuestPropertyChange">
1088 <desc>
1089 Notification when a guest property has changed.
1090 </desc>
1091 <param name="machineId" type="uuid" dir="in">
1092 <desc>
1093 ID of the machine this event relates to.
1094 </desc>
1095 </param>
1096 <param name="name" type="wstring" dir="in">
1097 <desc>
1098 The name of the property that has changed.
1099 </desc>
1100 </param>
1101 <param name="value" type="wstring" dir="in">
1102 <desc>
1103 The new property value.
1104 </desc>
1105 </param>
1106 <param name="flags" type="wstring" dir="in">
1107 <desc>
1108 The new property flags.
1109 </desc>
1110 </param>
1111 </method>
1112
1113 </interface>
1114
1115 <interface
1116 name="IVirtualBox" extends="$dispatched"
1117 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1118 wsmap="managed"
1119 >
1120 <desc>
1121 The IVirtualBox interface represents the main interface exposed by the
1122 product that provides virtual machine management.
1123
1124 An instance of IVirtualBox is required for the product to do anything
1125 useful. Even though the interface does not expose this, internally,
1126 IVirtualBox is implemented as a singleton and actually lives in the
1127 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1128 IVirtualBox can track the state of all virtual machines on a particular
1129 host, regardless of which frontend started them.
1130
1131 To enumerate all the virtual machines on the host, use the
1132 <link to="IVirtualBox::machines2"/> attribute.
1133 </desc>
1134
1135 <attribute name="version" type="wstring" readonly="yes">
1136 <desc>
1137 A string representing the version number of the product. The
1138 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1139 last number represents the build number and will frequently change.
1140 </desc>
1141 </attribute>
1142
1143 <attribute name="revision" type="unsigned long" readonly="yes">
1144 <desc>
1145 The internal build revision number of the product.
1146 </desc>
1147 </attribute>
1148
1149 <attribute name="packageType" type="wstring" readonly="yes">
1150 <desc>
1151 A string representing the package type of this product. The
1152 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1153 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1154 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1155 this.
1156 </desc>
1157 </attribute>
1158
1159 <attribute name="homeFolder" type="wstring" readonly="yes">
1160 <desc>
1161 Full path to the directory where the global settings file,
1162 <tt>VirtualBox.xml</tt>, is stored.
1163
1164 In this version of VirtualBox, the value of this property is
1165 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1166 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1167 as determined by the host OS), and cannot be changed.
1168
1169 This path is also used as the base to resolve relative paths in
1170 places where relative paths are allowed (unless otherwise
1171 expressly indicated).
1172 </desc>
1173 </attribute>
1174
1175 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1176 <desc>
1177 Full name of the global settings file.
1178 The value of this property corresponds to the value of
1179 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1180 </desc>
1181 </attribute>
1182
1183 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1184 <desc>
1185 Current version of the format of the global VirtualBox settings file
1186 (<tt>VirtualBox.xml</tt>).
1187
1188 The version string has the following format:
1189 <pre>
1190 x.y-platform
1191 </pre>
1192 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1193 versions, and <tt>platform</tt> is the platform identifier.
1194
1195 The current version usually matches the value of the
1196 <link to="#settingsFormatVersion"/> attribute unless the
1197 settings file was created by an older version of VirtualBox and there
1198 was a change of the settings file format since then.
1199
1200 Note that VirtualBox automatically converts settings files from older
1201 versions to the most recent version when reading them (usually at
1202 VirtualBox startup) but it doesn't save the changes back until
1203 you call a method that implicitly saves settings (such as
1204 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1205 explicitly. Therefore, if the value of this attribute differs from the
1206 value of <link to="#settingsFormatVersion"/>, then it
1207 means that the settings file was converted but the result of the
1208 conversion is not yet saved to disk.
1209
1210 The above feature may be used by interactive front-ends to inform users
1211 about the settings file format change and offer them to explicitly save
1212 all converted settings files (the global and VM-specific ones),
1213 optionally create backup copies of the old settings files before saving,
1214 etc.
1215
1216 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1217 </desc>
1218 </attribute>
1219
1220 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1221 <desc>
1222 Most recent version of the settings file format.
1223
1224 The version string has the following format:
1225 <pre>
1226 x.y-platform
1227 </pre>
1228 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1229 versions, and <tt>platform</tt> is the platform identifier.
1230
1231 VirtualBox uses this version of the format when saving settings files
1232 (either as a result of method calls that require to save settings or as
1233 a result of an explicit call to <link to="#saveSettings()"/>).
1234
1235 <see>settingsFileVersion</see>
1236 </desc>
1237 </attribute>
1238
1239 <attribute name="host" type="IHost" readonly="yes">
1240 <desc>Associated host object.</desc>
1241 </attribute>
1242
1243 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1244 <desc>Associated system information object.</desc>
1245 </attribute>
1246
1247 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1248 <desc>
1249 Array of machine objects registered within this VirtualBox instance.
1250 </desc>
1251 </attribute>
1252
1253 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1254 <desc>
1255 Array of hard disk objects known to this VirtualBox installation.
1256
1257 This array contains only base (root) hard disks. All differencing
1258 hard disks of the given base hard disk can be enumerated using
1259 <link to="IHardDisk2::children"/>.
1260 </desc>
1261 </attribute>
1262
1263 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1264 <desc>
1265 Array of CD/DVD image objects registered with this VirtualBox instance.
1266 </desc>
1267 </attribute>
1268
1269 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1270 <desc>
1271 Array of floppy image objects registered with this VirtualBox instance.
1272 </desc>
1273 </attribute>
1274
1275 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1276
1277 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1278
1279 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1280 <desc>
1281 Collection of global shared folders. Global shared folders are
1282 available to all virtual machines.
1283
1284 New shared folders are added to the collection using
1285 <link to="#createSharedFolder"/>. Existing shared folders can be
1286 removed using <link to="#removeSharedFolder"/>.
1287
1288 <note>
1289 In the current version of the product, global shared folders are not
1290 implemented and therefore this collection is always empty.
1291 </note>
1292 </desc>
1293 </attribute>
1294
1295 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1296 <desc>
1297 Associated performance collector object.
1298 </desc>
1299 </attribute>
1300
1301 <method name="createMachine">
1302 <desc>
1303 Creates a new virtual machine.
1304
1305 The new machine is created unregistered, with the initial configuration
1306 set according to the specified guest OS type. A typical sequence of
1307 actions to create a new virtual machine is as follows:
1308
1309 <ol>
1310 <li>
1311 Call this method to have a new machine created. The returned machine
1312 object will be "mutable" allowing to change any machine property.
1313 </li>
1314
1315 <li>
1316 Configure the machine using the appropriate attributes and methods.
1317 </li>
1318
1319 <li>
1320 Call <link to="IMachine::saveSettings()" /> to write the settings
1321 to the machine's XML settings file. The configuration of the newly
1322 created machine will not be saved to disk until this method is
1323 called.
1324 </li>
1325
1326 <li>
1327 Call <link to="#registerMachine()" /> to add the machine to the list
1328 of machines known to VirtualBox.
1329 </li>
1330 </ol>
1331
1332 You should specify valid name for the newly created machine when calling
1333 this method. See the <link to="IMachine::name"/> attribute description
1334 for more details about the machine name.
1335
1336 The specified guest OS type identifier must match an ID of one of known
1337 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1338 array.
1339
1340 Every machine has a <i>settings file</i> that is used to store
1341 the machine configuration. This file is stored in a directory called the
1342 <i>machine settings subfolder</i>. Both the settings subfolder and file
1343 will have a name that corresponds to the name of the virtual machine.
1344 You can specify where to create the machine setting subfolder using the
1345 @a baseFolder argument. The base folder can be absolute (full path) or
1346 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1347 directory</link>.
1348
1349 If @a baseFolder is a null or empty string (which is recommended), the
1350 <link to="ISystemProperties::defaultMachineFolder">default machine
1351 settings folder</link> will be used as a base folder for the created
1352 machine. Otherwise the given base folder will be used. In either case,
1353 the full path to the resulting settings file has the following
1354 structure:
1355 <pre>
1356 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1357 </pre>
1358
1359 Note that if the resulting settings file already exists, this method
1360 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1361
1362 Optionally, you may specify an UUID of to assign to the created machine.
1363 However, this is not recommended and you should normally pass an empty
1364 (null) UUID to this method so that a new UUID will be automatically
1365 generated for every created machine.
1366
1367 <note>
1368 There is no way to change the name of the settings file or
1369 subfolder of the created machine directly.
1370 </note>
1371
1372 <result name="VBOX_E_OBJECT_NOT_FOUND">
1373 @a osTypeId is invalid.
1374 </result>
1375 <result name="VBOX_E_FILE_ERROR">
1376 Resulting settings file name is invalid or the settings file already
1377 exists or could not be created due to an I/O error.
1378 </result>
1379 <result name="E_INVALIDARG">
1380 @a name is empty or null.
1381 </result>
1382 </desc>
1383
1384 <param name="name" type="wstring" dir="in">
1385 <desc>Machine name.</desc>
1386 </param>
1387 <param name="osTypeId" type="wstring" dir="in">
1388 <desc>Guest OS Type ID.</desc>
1389 </param>
1390 <param name="baseFolder" type="wstring" dir="in">
1391 <desc>Base machine folder (optional).</desc>
1392 </param>
1393 <param name="id" type="uuid" dir="in">
1394 <desc>Machine UUID (optional).</desc>
1395 </param>
1396 <param name="machine" type="IMachine" dir="return">
1397 <desc>Created machine object.</desc>
1398 </param>
1399 </method>
1400
1401 <method name="createLegacyMachine">
1402 <desc>
1403 Creates a new virtual machine in "legacy" mode, using the specified
1404 settings file to store machine settings.
1405
1406 As opposed to machines created by <link to="#createMachine()"/>,
1407 the settings file of the machine created in "legacy" mode is not
1408 automatically renamed when the machine name is changed -- it will always
1409 remain the same as specified in this method call.
1410
1411 The specified settings file name can be absolute (full path) or relative
1412 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1413 directory</link>. If the file name doesn't contain an extension, the
1414 default extension (.xml) will be appended.
1415
1416 Note that the configuration of the newly created machine is not
1417 saved to disk (and therefore no settings file is created)
1418 until <link to="IMachine::saveSettings()"/> is called. If the
1419 specified settings file already exists, this method
1420 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1421
1422 See <link to="#createMachine()"/> for more information.
1423
1424 @deprecated This method may be removed later. Use <link
1425 to="IVirtualBox::createMachine()"/> instead.
1426
1427 <note>
1428 There is no way to change the name of the settings file
1429 of the machine created in "legacy" mode.
1430 </note>
1431
1432 <result name="VBOX_E_OBJECT_NOT_FOUND">
1433 @a osTypeId is invalid.
1434 </result>
1435 <result name="VBOX_E_FILE_ERROR">
1436 @a settingsFile is invalid or the settings file already exists or
1437 could not be created due to an I/O error.
1438 </result>
1439 <result name="E_INVALIDARG">
1440 @a name or @a settingsFile is empty or null.
1441 </result>
1442 </desc>
1443
1444 <param name="name" type="wstring" dir="in">
1445 <desc>Machine name.</desc>
1446 </param>
1447 <param name="osTypeId" type="wstring" dir="in">
1448 <desc>Machine OS Type ID.</desc>
1449 </param>
1450 <param name="settingsFile" type="wstring" dir="in">
1451 <desc>Name of the machine settings file.</desc>
1452 </param>
1453 <param name="id" type="uuid" dir="in">
1454 <desc>Machine UUID (optional).</desc>
1455 </param>
1456 <param name="machine" type="IMachine" dir="return">
1457 <desc>Created machine object.</desc>
1458 </param>
1459 </method>
1460
1461 <method name="openMachine">
1462 <desc>
1463 Opens a virtual machine from the existing settings file.
1464 The opened machine remains unregistered until you call
1465 <link to="#registerMachine()"/>.
1466
1467 The specified settings file name can be absolute
1468 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1469 VirtualBox home directory</link>. This file must exist
1470 and must be a valid machine settings file whose contents
1471 will be used to construct the machine object.
1472
1473 @deprecated Will be removed soon.
1474 </desc>
1475 <param name="settingsFile" type="wstring" dir="in">
1476 <desc>
1477 Name of the machine settings file.
1478 </desc>
1479 </param>
1480 <param name="machine" type="IMachine" dir="return">
1481 <desc>Opened machine object.</desc>
1482 </param>
1483 <note>
1484 <link to="IMachine::settingsModified"/> will return
1485 false for the created machine, until any of machine settings
1486 are changed.
1487 </note>
1488 </method>
1489
1490 <method name="registerMachine">
1491 <desc>
1492
1493 Registers the machine previously created using
1494 <link to="#createMachine()"/> or opened using
1495 <link to="#openMachine()"/> within this VirtualBox installation. After
1496 successful method invocation, the
1497 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1498 to all registered callbacks.
1499
1500 <note>
1501 This method implicitly calls <link to="IMachine::saveSettings"/>
1502 to save all current machine settings before registering it.
1503 </note>
1504
1505 </desc>
1506 <param name="machine" type="IMachine" dir="in"/>
1507 </method>
1508
1509 <method name="getMachine">
1510 <desc>
1511 Attempts to find a virtual machine given its UUID.
1512 To look up a machine by name, use <link to="IVirtualBox::findMachine" /> instead.
1513 </desc>
1514 <param name="id" type="uuid" dir="in"/>
1515 <param name="machine" type="IMachine" dir="return"/>
1516 </method>
1517
1518 <method name="findMachine">
1519 <desc>
1520 Attempts to find a virtual machine given its name.
1521 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" /> instead.
1522 </desc>
1523 <param name="name" type="wstring" dir="in"/>
1524 <param name="machine" type="IMachine" dir="return"/>
1525 </method>
1526
1527 <method name="unregisterMachine">
1528 <desc>
1529
1530 Unregisters the machine previously registered using
1531 <link to="#registerMachine"/>. After successful method invocation, the
1532 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1533 to all registered callbacks.
1534
1535 <note>
1536 The specified machine must not be in the Saved state, have an open
1537 (or a spawning) direct session associated with it, have snapshots or
1538 have hard disks attached.
1539 </note>
1540
1541 <note>
1542 This method implicitly calls <link to="IMachine::saveSettings"/> to
1543 save all current machine settings before unregistering it.
1544 </note>
1545
1546 <note>
1547 If the given machine is inaccessible (see
1548 <link to="IMachine::accessible"/>), it will be unregistered and
1549 fully uninitialized right afterwards. As a result, the returned
1550 machine object will be unusable and an attempt to call
1551 <b>any</b> method will return the "Object not ready" error.
1552 </note>
1553
1554 </desc>
1555 <param name="id" type="uuid" dir="in">
1556 <desc>UUID of the machine to unregister.</desc>
1557 </param>
1558 <param name="machine" type="IMachine" dir="return">
1559 <desc>Unregistered machine object.</desc>
1560 </param>
1561 </method>
1562
1563 <method name="createHardDisk2">
1564 <desc>
1565 Creates a new base hard disk object that will use the given storage
1566 format and location for hard disk data.
1567
1568 Note that the actual storage unit is not created by this method. In
1569 order to do it, and before you are able to attach the created hard disk
1570 to virtual machines, you must call one of the following methods to
1571 allocate a format-specific storage unit at the specified location:
1572 <ul>
1573 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1574 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1575 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1576 </ul>
1577
1578 Some hard disk attributes, such as <link to="#id"/>, may remain
1579 uninitialized until the hard disk storage unit is successfully created
1580 by one of the above methods.
1581
1582 After the storage unit is successfully created, the hard disk gets
1583 remembered by this VirtualBox installation and will be accessible
1584 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1585 methods. Remembered root (base) hard disks are also returned as part of
1586 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1587
1588 The list of all storage formats supported by this VirtualBox
1589 installation can be obtained using
1590 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1591 attribute is empty or <tt>null</tt> then the default storage format
1592 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1593 be used for creating a storage unit of the hard disk.
1594
1595 Note that the format of the location string is storage format specific.
1596 See <link to="IMedium::location"/>, IHardDisk2 and
1597 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1598 </desc>
1599 <param name="format" type="wstring" dir="in">
1600 <desc>
1601 Identifier of the storage format to use for the new hard disk.
1602 </desc>
1603 </param>
1604 <param name="location" type="wstring" dir="in">
1605 <desc>
1606 Location of the storage unit for the new hard disk.
1607 </desc>
1608 </param>
1609 <param name="hardDisk" type="IHardDisk2" dir="return">
1610 <desc>Created hard disk object.</desc>
1611 </param>
1612 </method>
1613
1614 <method name="openHardDisk2">
1615 <desc>
1616 Opens a hard disk from an existing location.
1617
1618 After the hard disk is successfully opened by this method, it gets
1619 remembered by (known to) this VirtualBox installation and will be
1620 accessible through <link to="#getHardDisk2()"/> and
1621 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1622 are also returned as part of the <link to="#hardDisks2"/> array and can
1623 be attached to virtual machines. See IHardDisk2 for more details.
1624
1625 If a differencing hard disk is to be opened by this method, the
1626 operation will succeed only if its parent hard disk and all ancestors,
1627 if any, are already known to this VirtualBox installation (for example,
1628 were opened by this method before).
1629
1630 This method tries to guess the storage format of the specified hard disk
1631 by reading hard disk data at the specified location.
1632
1633 Note that the format of the location string is storage format specific.
1634 See <link to="IMedium::location"/>, IHardDisk2 and
1635 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1636 </desc>
1637 <param name="location" type="wstring" dir="in">
1638 <desc>
1639 Location of the storage unit that contains hard disk data in one of
1640 the supported storage formats.
1641 </desc>
1642 </param>
1643 <param name="hardDisk" type="IHardDisk2" dir="return">
1644 <desc>Opened hard disk object.</desc>
1645 </param>
1646 </method>
1647
1648 <method name="getHardDisk2" const="yes">
1649 <desc>
1650 Returns a hard disk with the given UUID.
1651
1652 The hard disk with the given UUID must be known to this VirtualBox
1653 installation, i.e. it must be previously created by
1654 <link to="#createHardDisk2()"/> or opened by <link
1655 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1656 </desc>
1657 <param name="id" type="uuid" dir="in">
1658 <desc>UUID of the hard disk to look for.</desc>
1659 </param>
1660 <param name="hardDisk" type="IHardDisk2" dir="return">
1661 <desc>Found hard disk object.</desc>
1662 </param>
1663 </method>
1664
1665 <method name="findHardDisk2">
1666 <desc>
1667 Returns a hard disk that uses the given location to store hard
1668 disk data.
1669
1670 The given hard disk must be known to this VirtualBox installation, i.e.
1671 it must be previously created by
1672 <link to="#createHardDisk2()"/> or opened by <link
1673 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1674
1675 The search is done by comparing the value of the @a location argument to
1676 the <link to="IHardDisk2::location"/> attribute of each known hard
1677 disk.
1678
1679 For locations represented by file names in the host's file system, the
1680 requested location can be a path relative to the
1681 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1682 only a file name without any path is given, the
1683 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1684 folder</link> will be prepended to the file name before searching. Note
1685 that on case sensitive file systems, a case sensitive comparison is
1686 performed, otherwise the case of symbols in the file path is ignored.
1687 </desc>
1688 <param name="location" type="wstring" dir="in">
1689 <desc>Location string to search for.</desc>
1690 </param>
1691 <param name="hardDisk" type="IHardDisk2" dir="return">
1692 <desc>Found hard disk object.</desc>
1693 </param>
1694 </method>
1695
1696 <method name="openDVDImage">
1697 <desc>
1698 Opens a CD/DVD image contained in the specified file of the supported
1699 format and assigns it the given UUID.
1700
1701 After the image is successfully opened by this method, it gets
1702 remembered by (known to) this VirtualBox installation and will be
1703 accessible through <link to="#getDVDImage()"/> and
1704 <link to="#findDVDImage()"/> methods. Remembered images are also
1705 returned as part of the <link to="#DVDImages"/> array and can be mounted
1706 to virtual machines. See IMedium for more details.
1707
1708 See <link to="IMedium::location"/> to get more details about the format
1709 of the location string.
1710
1711 <note>
1712 Currently, only ISO CD/DVD images are supported by VirtualBox.
1713 </note>
1714 </desc>
1715 <param name="location" type="wstring" dir="in">
1716 <desc>
1717 Full path to the file that contains a valid CD/DVD image.
1718 </desc>
1719 </param>
1720 <param name="id" type="uuid" dir="in">
1721 <desc>
1722 UUID to assign to the given image within this VirtualBox installation.
1723 If an empty (null) UUID is specified, the system will randomly
1724 generate a new UUID.
1725 </desc>
1726 </param>
1727 <param name="image" type="IDVDImage2" dir="return">
1728 <desc>Opened CD/DVD image object.</desc>
1729 </param>
1730 </method>
1731
1732 <method name="getDVDImage">
1733 <desc>
1734 Returns a CD/DVD image with the given UUID.
1735
1736 The image with the given UUID must be known to this VirtualBox
1737 installation, i.e. it must be previously opened by <link
1738 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1739 </desc>
1740 <param name="id" type="uuid" dir="in">
1741 <desc>UUID of the image to look for.</desc>
1742 </param>
1743 <param name="image" type="IDVDImage2" dir="return">
1744 <desc>Found CD/DVD image object.</desc>
1745 </param>
1746 </method>
1747
1748 <method name="findDVDImage">
1749 <desc>
1750 Returns a CD/DVD image with the given image location.
1751
1752 The image with the given UUID must be known to this VirtualBox
1753 installation, i.e. it must be previously opened by <link
1754 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1755
1756 The search is done by comparing the value of the @a location argument to
1757 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1758
1759 The requested location can be a path relative to the
1760 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1761 only a file name without any path is given, the
1762 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1763 folder</link> will be prepended to the file name before searching. Note
1764 that on case sensitive file systems, a case sensitive comparison is
1765 performed, otherwise the case of symbols in the file path is ignored.
1766 </desc>
1767 <param name="location" type="wstring" dir="in">
1768 <desc>CD/DVD image file path to look for.</desc>
1769 </param>
1770 <param name="image" type="IDVDImage2" dir="return">
1771 <desc>Found CD/DVD image object.</desc>
1772 </param>
1773 </method>
1774
1775 <method name="openFloppyImage">
1776 <desc>
1777 Opens a floppy image contained in the specified file of the supported
1778 format and assigns it the given UUID.
1779
1780 After the image is successfully opened by this method, it gets
1781 remembered by (known to) this VirtualBox installation and will be
1782 accessible through <link to="#getFloppyImage()"/> and
1783 <link to="#findFloppyImage()"/> methods. Remembered images are also
1784 returned as part of the <link to="#floppyImages"/> array and can be
1785 mounted to virtual machines. See IMedium for more details.
1786
1787 See <link to="IMedium::location"/> to get more details about the format
1788 of the location string.
1789
1790 <note>
1791 Currently, only raw floppy images are supported by VirtualBox.
1792 </note>
1793 </desc>
1794 <param name="location" type="wstring" dir="in">
1795 <desc>
1796 Full path to the file that contains a valid floppy image.
1797 </desc>
1798 </param>
1799 <param name="id" type="uuid" dir="in">
1800 <desc>
1801 UUID to assign to the given image file within this VirtualBox
1802 installation. If an empty (null) UUID is specified, the system will
1803 randomly generate a new UUID.
1804 </desc>
1805 </param>
1806 <param name="image" type="IFloppyImage2" dir="return">
1807 <desc>Opened floppy image object.</desc>
1808 </param>
1809 </method>
1810
1811 <method name="getFloppyImage">
1812 <desc>
1813 Returns a floppy image with the given UUID.
1814
1815 The image with the given UUID must be known to this VirtualBox
1816 installation, i.e. it must be previously opened by <link
1817 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1818 </desc>
1819 <param name="id" type="uuid" dir="in">
1820 <desc>UUID of the image to look for.</desc>
1821 </param>
1822 <param name="image" type="IFloppyImage2" dir="return">
1823 <desc>Found floppy image object.</desc>
1824 </param>
1825 </method>
1826
1827 <method name="findFloppyImage">
1828 <desc>
1829 Returns a floppy image with the given image location.
1830
1831 The image with the given UUID must be known to this VirtualBox
1832 installation, i.e. it must be previously opened by <link
1833 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1834
1835 The search is done by comparing the value of the @a location argument to
1836 the <link to="IMedium::location"/> attribute of each known floppy image.
1837
1838 The requested location can be a path relative to the
1839 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1840 only a file name without any path is given, the
1841 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1842 folder</link> will be prepended to the file name before searching. Note
1843 that on case sensitive file systems, a case sensitive comparison is
1844 performed, otherwise the case of symbols in the file path is ignored.
1845 </desc>
1846 <param name="location" type="wstring" dir="in">
1847 <desc>Floppy image file path to look for.</desc>
1848 </param>
1849 <param name="image" type="IFloppyImage2" dir="return">
1850 <desc>Found floppy image object.</desc>
1851 </param>
1852 </method>
1853
1854 <method name="getGuestOSType">
1855 <desc>
1856 Returns an object describing the specified guest OS type.
1857
1858 The requested guest OS type is specified using a string which is a
1859 mnemonic identifier of the guest operating system, such as
1860 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1861 particular virtual machine can be read or set using the
1862 <link to="IMachine::OSTypeId"/> attribute.
1863
1864 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1865 available guest OS type objects. Each object has an
1866 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1867 the guest OS this object describes.
1868 </desc>
1869 <param name="id" type="wstring" dir="in">
1870 <desc>Guest OS type ID string.</desc>
1871 </param>
1872 <param name="type" type="IGuestOSType" dir="return">
1873 <desc>Guest OS type object.</desc>
1874 </param>
1875 </method>
1876
1877 <method name="createSharedFolder">
1878 <desc>
1879 Creates a new global shared folder by associating the given logical
1880 name with the given host path, adds it to the collection of shared
1881 folders and starts sharing it. Refer to the description of
1882 <link to="ISharedFolder"/> to read more about logical names.
1883 </desc>
1884 <param name="name" type="wstring" dir="in">
1885 <desc>Unique logical name of the shared folder.</desc>
1886 </param>
1887 <param name="hostPath" type="wstring" dir="in">
1888 <desc>Full path to the shared folder in the host file system.</desc>
1889 </param>
1890 <param name="writable" type="boolean" dir="in">
1891 <desc>Whether the share is writable or readonly</desc>
1892 </param>
1893 </method>
1894
1895 <method name="removeSharedFolder">
1896 <desc>
1897 Removes the global shared folder with the given name previously
1898 created by <link to="#createSharedFolder"/> from the collection of
1899 shared folders and stops sharing it.
1900 </desc>
1901 <param name="name" type="wstring" dir="in">
1902 <desc>Logical name of the shared folder to remove.</desc>
1903 </param>
1904 </method>
1905
1906 <method name="getNextExtraDataKey">
1907 <desc>
1908 Returns the global extra data key name following the supplied key.
1909
1910 An error is returned if the supplied @a key does not exist. @c NULL is
1911 returned in @a nextKey if the supplied key is the last key. When
1912 supplying @c NULL for the @a key, the first key item is returned in @a
1913 nextKey (if there is any). @a nextValue is an optional parameter and
1914 if supplied, the next key's value is returned in it.
1915 </desc>
1916 <param name="key" type="wstring" dir="in">
1917 <desc>Name of the data key to follow.</desc>
1918 </param>
1919 <param name="nextKey" type="wstring" dir="out">
1920 <desc>Name of the next data key.</desc>
1921 </param>
1922 <param name="nextValue" type="wstring" dir="out">
1923 <desc>Value of the next data key.</desc>
1924 </param>
1925 </method>
1926
1927 <method name="getExtraData">
1928 <desc>
1929 Returns associated global extra data.
1930
1931 If the requested data @a key does not exist, this function will
1932 succeed and return @c NULL in the @a value argument.
1933 </desc>
1934 <param name="key" type="wstring" dir="in">
1935 <desc>Name of the data key to get.</desc>
1936 </param>
1937 <param name="value" type="wstring" dir="return">
1938 <desc>Value of the requested data key.</desc>
1939 </param>
1940 </method>
1941
1942 <method name="setExtraData">
1943 <desc>
1944 Sets associated global extra data.
1945
1946 If you pass @c NULL as a key @a value, the given @a key will be
1947 deleted.
1948
1949 <note>
1950 Before performing the actual data change, this method will ask all
1951 registered callbacks using the
1952 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
1953 notification for a permission. If one of the callbacks refuses the
1954 new value, the change will not be performed.
1955 </note>
1956 <note>
1957 On success, the
1958 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
1959 is called to inform all registered callbacks about a successful data
1960 change.
1961 </note>
1962 </desc>
1963 <param name="key" type="wstring" dir="in">
1964 <desc>Name of the data key to set.</desc>
1965 </param>
1966 <param name="value" type="wstring" dir="in">
1967 <desc>Value to assign to the key.</desc>
1968 </param>
1969 </method>
1970
1971 <method name="openSession">
1972 <desc>
1973 Opens a new direct session with the given virtual machine.
1974
1975 A direct session acts as a local lock on the given VM.
1976 There can be only one direct session open at a time for every
1977 virtual machine, protecting the VM from being manipulated by
1978 conflicting actions from different processes. Only after a
1979 direct session has been opened, one can change all VM settings
1980 and execute the VM in the process space of the session object.
1981
1982 Sessions therefore can be compared to mutex semaphores that
1983 lock a given VM for modification and execution.
1984 See <link to="ISession">ISession</link> for details.
1985
1986 <note>Unless you are writing a new VM frontend, you will not
1987 want to execute a VM in the current process. To spawn a new
1988 process that executes a VM, use
1989 <link to="IVirtualBox::openRemoteSession" />
1990 instead.</note>
1991
1992 Upon successful return, the session object can be used to
1993 get access to the machine and to the VM console.
1994
1995 In VirtualBox terminology, the machine becomes "mutable" after
1996 a session has been opened. Note that the "mutable" machine
1997 object, on which you may invoke IMachine methods to change its
1998 settings, will be a different object from the immutable IMachine
1999 objects returned by various IVirtualBox methods. To obtain a
2000 mutable IMachine object (upon which you can invoke settings methods),
2001 use the <link to="ISession::machine" /> attribute.
2002
2003 One must always call <link to="ISession::close" /> to release the
2004 lock on the machine, or the machine's state will eventually be
2005 set to "Aborted".
2006
2007 In other words, to change settings on a machine, the following
2008 sequence is typically performed:
2009
2010 <ol>
2011 <li>Call this method (openSession) to have a machine locked for
2012 the current session.</li>
2013
2014 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2015
2016 <li>Change the settings of the machine.</li>
2017
2018 <li>Call <link to="IMachine::saveSettings" />.</li>
2019
2020 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2021 </ol>
2022 </desc>
2023 <param name="session" type="ISession" dir="in">
2024 <desc>
2025 Session object that will represent the opened session after
2026 successful method invocation. This object must not represent
2027 the already open session.
2028 <note>
2029 This session will be automatically closed if the
2030 VirtualBox server is terminated for some reason.
2031 </note>
2032 </desc>
2033 </param>
2034 <param name="machineId" type="uuid" dir="in">
2035 <desc>ID of the virtual machine to open a session with.</desc>
2036 </param>
2037 </method>
2038
2039 <method name="openRemoteSession">
2040 <desc>
2041 Spawns a new process that executes a virtual machine (called a
2042 "remote session").
2043
2044 Opening a remote session causes the VirtualBox server to start a new
2045 process that opens a direct session with the given VM. As a result, the
2046 VM is locked by that direct session in the new process, preventing
2047 conflicting changes from other processes. Since sessions act as locks
2048 that such prevent conflicting changes, one cannot open a remote session
2049 for a VM that already has another open session (direct or remote), or
2050 is currently in the process of opening one (see <link to="IMachine::sessionState"/>).
2051
2052 While the remote session still provides some level of control over the
2053 VM execution to the caller (using the <link to="IConsole" /> interface),
2054 not all VM settings are available for modification within the remote
2055 session context.
2056
2057 This operation can take some time (a new VM is started in a new process,
2058 for which memory and other resources need to be set up). Because of this,
2059 an <link to="IProgress" /> is returned to allow the caller to wait for this
2060 asynchronous operation to be completed. Until then, the remote session
2061 object remains in the closed state, and accessing the machine or its
2062 console through it is invalid. It is recommended to use
2063 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2064 completion.
2065
2066 As with all <link to="ISession" /> objects, it is recommended to call
2067 <link to="ISession::close" /> on the local session object once openRemoteSession()
2068 has been called. However, the session's state (see <link to="ISession::state" />)
2069 will not return to "Closed" until the remote session has also closed (i.e.
2070 until the VM is no longer running). In that case, however, the state of
2071 the session will automatically change back to "Closed".
2072
2073 Currently supported session types (values of the @a type
2074 argument) are:
2075 <ul>
2076 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2077 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2078 </ul>
2079
2080 The @a environment argument is a string containing definitions of
2081 environment variables in the following format:
2082 @code
2083 NAME[=VALUE]\n
2084 NAME[=VALUE]\n
2085 ...
2086 @endcode
2087 where <tt>\\n</tt> is the new line character. These environment
2088 variables will be appended to the environment of the VirtualBox server
2089 process. If an environment variable exists both in the server process
2090 and in this list, the value from this list takes precedence over the
2091 server's variable. If the value of the environment variable is
2092 omitted, this variable will be removed from the resulting environment.
2093 If the environment string is @c null, the server environment is
2094 inherited by the started process as is.
2095
2096 <see>openExistingSession</see>
2097 </desc>
2098 <param name="session" type="ISession" dir="in">
2099 <desc>
2100 Session object that will represent the opened remote session
2101 after successful method invocation (this object must not
2102 represent an already open session).
2103 </desc>
2104 </param>
2105 <param name="machineId" type="uuid" dir="in">
2106 <desc>ID of the virtual machine to open a session with.</desc>
2107 </param>
2108 <param name="type" type="wstring" dir="in">
2109 <desc>
2110 Type of the remote session (case sensitive).
2111 </desc>
2112 </param>
2113 <param name="environment" type="wstring" dir="in">
2114 <desc>
2115 Environment to pass to the opened session (may be @c null).
2116 </desc>
2117 </param>
2118 <param name="progress" type="IProgress" dir="return">
2119 <desc>Progress object to track the operation completion.</desc>
2120 </param>
2121 </method>
2122
2123 <method name="openExistingSession">
2124 <desc>
2125 Opens a new remote session with the virtual machine for
2126 which a direct session is already open.
2127
2128 The remote session provides some level of control over the VM
2129 execution (using the IConsole interface) to the caller; however,
2130 within the remote session context, not all VM settings are available
2131 for modification.
2132
2133 As opposed to <link to="#openRemoteSession()"/>, the number of
2134 remote sessions opened this way is not limited by the API
2135
2136 <note>
2137 It is an error to open a remote session with the machine that
2138 doesn't have an open direct session.
2139 </note>
2140
2141 <see>openRemoteSession</see>
2142 </desc>
2143 <param name="session" type="ISession" dir="in">
2144 <desc>
2145 Session object that will represent the open remote session
2146 after successful method invocation. This object must not
2147 represent an already open session.
2148 <note>
2149 This session will be automatically closed when the peer
2150 (direct) session dies or gets closed.
2151 </note>
2152 </desc>
2153 </param>
2154 <param name="machineId" type="uuid" dir="in">
2155 <desc>ID of the virtual machine to open a session with.</desc>
2156 </param>
2157 </method>
2158
2159 <method name="registerCallback">
2160 <desc>
2161 Registers a new global VirtualBox callback. The methods of the given
2162 callback object will be called by VirtualBox when an appropriate
2163 event occurs.
2164 </desc>
2165 <param name="callback" type="IVirtualBoxCallback" dir="in">
2166 <desc>Callback object to register.</desc>
2167 </param>
2168 </method>
2169
2170 <method name="unregisterCallback">
2171 <desc>
2172 Unregisters the previously registered global VirtualBox callback.
2173 </desc>
2174 <param name="callback" type="IVirtualBoxCallback" dir="in">
2175 <desc>Callback object to unregister.</desc>
2176 </param>
2177 </method>
2178
2179 <method name="waitForPropertyChange">
2180 <desc>
2181 Blocks the caller until any of the properties represented by the @a
2182 what argument changes the value or until the given timeout interval
2183 expires.
2184
2185 The @a what argument is a comma separated list of property masks that
2186 describe properties the caller is interested in. The property mask is
2187 a string in the following format:
2188
2189 <pre>
2190 [[group.]subgroup.]name
2191 </pre>
2192
2193 where @c name is the property name and @c group, @c subgroup are zero
2194 or more property group specifiers. Each element (group or name) in
2195 the property mask may be either a Latin string or an asterisk symbol
2196 (@c "*") which is used to match any string for the given element. A
2197 property mask that doesn't contain asterisk symbols represents a
2198 single fully qualified property name.
2199
2200 Groups in the fully qualified property name go from more generic (the
2201 left-most part) to more specific (the right-most part). The first
2202 element is usually a name of the object the property belongs to. The
2203 second element may be either a property name, or a child object name,
2204 or an index if the preceding element names an object which is one of
2205 many objects of the same type. This way, property names form a
2206 hierarchy of properties. Here are some examples of property names:
2207
2208 <table>
2209 <tr>
2210 <td><tt>VirtualBox.version</tt></td>
2211 <td><link to="IVirtualBox::version"/> property</td>
2212 </tr>
2213 <tr>
2214 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2215 <td><link to="IMachine::name"/> property of the machine with the
2216 given UUID</td>
2217 </tr>
2218 </table>
2219
2220 Most property names directly correspond to the properties of objects
2221 (components) provided by the VirtualBox library and may be used to
2222 track changes to these properties. However, there may be
2223 pseudo-property names that don't correspond to any existing object's
2224 property directly, as well as there may be object properties that
2225 don't have a corresponding property name that is understood by this
2226 method, and therefore changes to such properties cannot be
2227 tracked. See individual object's property descriptions to get a
2228 fully qualified property name that can be used with this method (if
2229 any).
2230
2231 There is a special property mask @c "*" (i.e. a string consisting of a
2232 single asterisk symbol) that can be used to match all properties.
2233 Below are more examples of property masks:
2234
2235 <table>
2236 <tr>
2237 <td><tt>VirtualBox.*</tt></td>
2238 <td>Track all properties of the VirtualBox object</td>
2239 </tr>
2240 <tr>
2241 <td><tt>Machine.*.name</tt></td>
2242 <td>Track changes to the <link to="IMachine::name"/> property of
2243 all registered virtual machines</td>
2244 </tr>
2245 </table>
2246
2247 </desc>
2248 <param name="what" type="wstring" dir="in">
2249 <desc>Comma separated list of property masks.</desc>
2250 </param>
2251 <param name="timeout" type="unsigned long" dir="in">
2252 <desc>
2253 Wait timeout in milliseconds.
2254 Specify -1 for an indefinite wait.
2255 </desc>
2256 </param>
2257 <param name="changed" type="wstring" dir="out">
2258 <desc>
2259 Comma separated list of properties that have been changed and caused
2260 this method to return to the caller.
2261 </desc>
2262 </param>
2263 <param name="values" type="wstring" dir="out">
2264 <desc>Reserved, not currently used.</desc>
2265 </param>
2266 </method>
2267
2268 <method name="saveSettings">
2269 <desc>
2270 Saves the global settings to the global settings file
2271 (<link to="#settingsFilePath"/>).
2272
2273 This method is only useful for explicitly saving the global settings
2274 file after it has been auto-converted from the old format to the most
2275 recent format (see <link to="#settingsFileVersion"/> for details).
2276 Normally, the global settings file is implicitly saved when a global
2277 setting is changed.
2278 </desc>
2279 </method>
2280
2281 <method name="saveSettingsWithBackup">
2282 <desc>
2283 Creates a backup copy of the global settings file
2284 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2285 calls <link to="#saveSettings()"/>.
2286
2287 Note that the backup copy is created <b>only</b> if the settings file
2288 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2289 details). Otherwise, this call is fully equivalent to
2290 <link to="#saveSettings()"/> and no backup copying is done.
2291
2292 The backup copy is created in the same directory where the original
2293 settings file is located. It is given the following file name:
2294 <pre>
2295 original.xml.x.y-platform.bak
2296 </pre>
2297 where <tt>original.xml</tt> is the original settings file name
2298 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2299 format of the settings file (before auto-conversion).
2300
2301 If the given backup file already exists, this method will try to add the
2302 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2303 0 to 9) and copy it again until it succeeds. If all suffixes are
2304 occupied, or if any other copy error occurs, this method will return a
2305 failure.
2306
2307 If the copy operation succeeds, the @a bakFileName return argument will
2308 receive a full path to the created backup file (for informational
2309 purposes). Note that this will happen even if the subsequent
2310 <link to="#saveSettings()"/> call performed by this method after the
2311 copy operation, fails.
2312
2313 <note>
2314 The VirtualBox API never calls this method. It is intended purely for
2315 the purposes of creating backup copies of the settings files by
2316 front-ends before saving the results of the automatically performed
2317 settings conversion to disk.
2318 </note>
2319
2320 <see>settingsFileVersion</see>
2321 </desc>
2322 <param name="bakFileName" type="wstring" dir="return">
2323 <desc>Full path to the created backup copy.</desc>
2324 </param>
2325 </method>
2326
2327 </interface>
2328
2329 <!--
2330 // IMachine
2331 /////////////////////////////////////////////////////////////////////////
2332 -->
2333
2334 <enumerator
2335 name="IMachineEnumerator" type="IMachine"
2336 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
2337 />
2338
2339 <collection
2340 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
2341 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
2342 readonly="yes"
2343 />
2344
2345 <interface
2346 name="IInternalMachineControl" extends="$unknown"
2347 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
2348 internal="yes"
2349 wsmap="suppress"
2350 >
2351 <method name="updateState">
2352 <desc>
2353 Updates the VM state.
2354 <note>
2355 This operation will also update the settings file with
2356 the correct information about the saved state file
2357 and delete this file from disk when appropriate.
2358 </note>
2359 </desc>
2360 <param name="state" type="MachineState" dir="in"/>
2361 </method>
2362
2363 <method name="getIPCId">
2364 <param name="id" type="wstring" dir="return"/>
2365 </method>
2366
2367 <method name="runUSBDeviceFilters">
2368 <desc>
2369 Asks the server to run USB devices filters of the associated
2370 machine against the given USB device and tell if there is
2371 a match.
2372 <note>
2373 Intended to be used only for remote USB devices. Local
2374 ones don't require to call this method (this is done
2375 implicitly by the Host and USBProxyService).
2376 </note>
2377 </desc>
2378 <param name="device" type="IUSBDevice" dir="in"/>
2379 <param name="matched" type="boolean" dir="out"/>
2380 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2381 </method>
2382
2383 <method name="captureUSBDevice">
2384 <desc>
2385 Requests a capture of the given host USB device.
2386 When the request is completed, the VM process will
2387 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2388 notification.
2389 </desc>
2390 <param name="id" type="uuid" dir="in"/>
2391 </method>
2392
2393 <method name="detachUSBDevice">
2394 <desc>
2395 Notification that a VM is going to detach (done = false) or has
2396 already detached (done = true) the given USB device.
2397 When the done = true request is completed, the VM process will
2398 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2399 notification.
2400 <note>
2401 In the done = true case, the server must run its own filters
2402 and filters of all VMs but this one on the detached device
2403 as if it were just attached to the host computer.
2404 </note>
2405 </desc>
2406 <param name="id" type="uuid" dir="in"/>
2407 <param name="done" type="boolean" dir="in"/>
2408 </method>
2409
2410 <method name="autoCaptureUSBDevices">
2411 <desc>
2412 Requests a capture all matching USB devices attached to the host.
2413 When the request is completed, the VM process will
2414 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2415 notification per every captured device.
2416 </desc>
2417 </method>
2418
2419 <method name="detachAllUSBDevices">
2420 <desc>
2421 Notification that a VM that is being powered down. The done
2422 parameter indicates whether which stage of the power down
2423 we're at. When done = false the VM is announcing its
2424 intentions, while when done = true the VM is reporting
2425 what it has done.
2426 <note>
2427 In the done = true case, the server must run its own filters
2428 and filters of all VMs but this one on all detach devices as
2429 if they were just attached to the host computer.
2430 </note>
2431 </desc>
2432 <param name="done" type="boolean" dir="in"/>
2433 </method>
2434
2435 <method name="onSessionEnd">
2436 <desc>
2437 Triggered by the given session object when the session is about
2438 to close normally.
2439 </desc>
2440 <param name="session" type="ISession" dir="in">
2441 <desc>Session that is being closed</desc>
2442 </param>
2443 <param name="progress" type="IProgress" dir="return">
2444 <desc>
2445 Used to wait until the corresponding machine is actually
2446 dissociated from the given session on the server.
2447 Returned only when this session is a direct one.
2448 </desc>
2449 </param>
2450 </method>
2451
2452 <method name="beginSavingState">
2453 <desc>
2454 Called by the VM process to inform the server it wants to
2455 save the current state and stop the VM execution.
2456 </desc>
2457 <param name="progress" type="IProgress" dir="in">
2458 <desc>
2459 Progress object created by the VM process to wait until
2460 the state is saved.
2461 </desc>
2462 </param>
2463 <param name="stateFilePath" type="wstring" dir="out">
2464 <desc>
2465 File path the VM process must save the execution state to.
2466 </desc>
2467 </param>
2468 </method>
2469
2470 <method name="endSavingState">
2471 <desc>
2472 Called by the VM process to inform the server that saving
2473 the state previously requested by #beginSavingState is either
2474 successfully finished or there was a failure.
2475 </desc>
2476
2477 <param name="success" type="boolean" dir="in">
2478 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2479 </param>
2480 </method>
2481
2482 <method name="adoptSavedState">
2483 <desc>
2484 Gets called by IConsole::adoptSavedState.
2485 </desc>
2486 <param name="savedStateFile" type="wstring" dir="in">
2487 <desc>Path to the saved state file to adopt.</desc>
2488 </param>
2489 </method>
2490
2491 <method name="beginTakingSnapshot">
2492 <desc>
2493 Called by the VM process to inform the server it wants to
2494 take a snapshot.
2495 </desc>
2496 <param name="initiator" type="IConsole" dir="in">
2497 <desc>The console object that initiated this call.</desc>
2498 </param>
2499 <param name="name" type="wstring" dir="in">
2500 <desc>Snapshot name</desc>
2501 </param>
2502 <param name="description" type="wstring" dir="in">
2503 <desc>Snapshot description</desc>
2504 </param>
2505 <param name="progress" type="IProgress" dir="in">
2506 <desc>
2507 Progress object created by the VM process to wait until
2508 the state is saved (only for online snapshots).
2509 </desc>
2510 </param>
2511 <param name="stateFilePath" type="wstring" dir="out">
2512 <desc>
2513 File path the VM process must save the execution state to.
2514 </desc>
2515 </param>
2516 <param name="serverProgress" type="IProgress" dir="out">
2517 <desc>
2518 Progress object created by the server process to wait until
2519 the snapshot is taken (VDI diff creation, etc.).
2520 </desc>
2521 </param>
2522 </method>
2523
2524 <method name="endTakingSnapshot">
2525 <desc>
2526 Called by the VM process to inform the server that the snapshot
2527 previously requested by #beginTakingSnapshot is either
2528 successfully taken or there was a failure.
2529 </desc>
2530
2531 <param name="success" type="boolean" dir="in">
2532 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2533 </param>
2534 </method>
2535
2536 <method name="discardSnapshot">
2537 <desc>
2538 Gets called by IConsole::discardSnapshot.
2539 </desc>
2540 <param name="initiator" type="IConsole" dir="in">
2541 <desc>The console object that initiated this call.</desc>
2542 </param>
2543 <param name="id" type="uuid" dir="in">
2544 <desc>UUID of the snapshot to discard.</desc>
2545 </param>
2546 <param name="machineState" type="MachineState" dir="out">
2547 <desc>New machine state after this operation is started.</desc>
2548 </param>
2549 <param name="progress" type="IProgress" dir="return">
2550 <desc>Progress object to track the operation completion.</desc>
2551 </param>
2552 </method>
2553
2554 <method name="discardCurrentState">
2555 <desc>
2556 Gets called by IConsole::discardCurrentState.
2557 </desc>
2558 <param name="initiator" type="IConsole" dir="in">
2559 <desc>The console object that initiated this call.</desc>
2560 </param>
2561 <param name="machineState" type="MachineState" dir="out">
2562 <desc>New machine state after this operation is started.</desc>
2563 </param>
2564 <param name="progress" type="IProgress" dir="return">
2565 <desc>Progress object to track the operation completion.</desc>
2566 </param>
2567 </method>
2568
2569 <method name="discardCurrentSnapshotAndState">
2570 <desc>
2571 Gets called by IConsole::discardCurrentSnapshotAndState.
2572 </desc>
2573 <param name="initiator" type="IConsole" dir="in">
2574 <desc>The console object that initiated this call.</desc>
2575 </param>
2576 <param name="machineState" type="MachineState" dir="out">
2577 <desc>New machine state after this operation is started.</desc>
2578 </param>
2579 <param name="progress" type="IProgress" dir="return">
2580 <desc>Progress object to track the operation completion.</desc>
2581 </param>
2582 </method>
2583
2584 <method name="pullGuestProperties">
2585 <desc>
2586 Get the list of the guest properties matching a set of patterns along
2587 with their values, time stamps and flags and give responsibility for
2588 managing properties to the console.
2589 </desc>
2590 <param name="name" type="wstring" dir="out" safearray="yes">
2591 <desc>
2592 The names of the properties returned.
2593 </desc>
2594 </param>
2595 <param name="value" type="wstring" dir="out" safearray="yes">
2596 <desc>
2597 The values of the properties returned. The array entries match the
2598 corresponding entries in the @a name array.
2599 </desc>
2600 </param>
2601 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
2602 <desc>
2603 The time stamps of the properties returned. The array entries match
2604 the corresponding entries in the @a name array.
2605 </desc>
2606 </param>
2607 <param name="flags" type="wstring" dir="out" safearray="yes">
2608 <desc>
2609 The flags of the properties returned. The array entries match the
2610 corresponding entries in the @a name array.
2611 </desc>
2612 </param>
2613 </method>
2614
2615 <method name="pushGuestProperties">
2616 <desc>
2617 Set the list of the guest properties matching a set of patterns along
2618 with their values, time stamps and flags and return responsibility for
2619 managing properties to IMachine.
2620 </desc>
2621 <param name="name" type="wstring" dir="in" safearray="yes">
2622 <desc>
2623 The names of the properties.
2624 </desc>
2625 </param>
2626 <param name="value" type="wstring" dir="in" safearray="yes">
2627 <desc>
2628 The values of the properties. The array entries match the
2629 corresponding entries in the @a name array.
2630 </desc>
2631 </param>
2632 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
2633 <desc>
2634 The time stamps of the properties. The array entries match
2635 the corresponding entries in the @a name array.
2636 </desc>
2637 </param>
2638 <param name="flags" type="wstring" dir="in" safearray="yes">
2639 <desc>
2640 The flags of the properties. The array entries match the
2641 corresponding entries in the @a name array.
2642 </desc>
2643 </param>
2644 </method>
2645 <method name="pushGuestProperty">
2646 <desc>
2647 Update a single guest property in IMachine.
2648 </desc>
2649 <param name="name" type="wstring" dir="in">
2650 <desc>
2651 The name of the property to be updated.
2652 </desc>
2653 </param>
2654 <param name="value" type="wstring" dir="in">
2655 <desc>
2656 The value of the property.
2657 </desc>
2658 </param>
2659 <param name="timestamp" type="unsigned long long" dir="in">
2660 <desc>
2661 The timestamp of the property.
2662 </desc>
2663 </param>
2664 <param name="flags" type="wstring" dir="in">
2665 <desc>
2666 The flags of the property.
2667 </desc>
2668 </param>
2669 </method>
2670 </interface>
2671
2672 <interface
2673 name="IBIOSSettings" extends="$unknown"
2674 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
2675 wsmap="managed"
2676 >
2677 <desc>
2678 The IBIOSSettings interface represents BIOS settings of the virtual
2679 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
2680 </desc>
2681 <attribute name="logoFadeIn" type="boolean">
2682 <desc>Fade in flag for BIOS logo animation.</desc>
2683 </attribute>
2684
2685 <attribute name="logoFadeOut" type="boolean">
2686 <desc>Fade out flag for BIOS logo animation.</desc>
2687 </attribute>
2688
2689 <attribute name="logoDisplayTime" type="unsigned long">
2690 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
2691 </attribute>
2692
2693 <attribute name="logoImagePath" type="wstring">
2694 <desc>Local file system path for external BIOS image.</desc>
2695 </attribute>
2696
2697 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
2698 <desc>Mode of the BIOS boot device menu.</desc>
2699 </attribute>
2700
2701 <attribute name="ACPIEnabled" type="boolean">
2702 <desc>ACPI support flag.</desc>
2703 </attribute>
2704
2705 <attribute name="IOAPICEnabled" type="boolean">
2706 <desc>
2707 IO APIC support flag. If set, VirtualBox will provide an IO APIC
2708 and support IRQs above 15.
2709 </desc>
2710 </attribute>
2711
2712 <attribute name="timeOffset" type="long long">
2713 <desc>
2714 Offset in milliseconds from the host system time. This allows for
2715 guests running with a different system date/time than the host.
2716 It is equivalent to setting the system date/time in the BIOS other
2717 than it's not an absolute value but a relative one. Guest Additions
2718 time synchronization also honors this offset.
2719 </desc>
2720 </attribute>
2721
2722 <attribute name="PXEDebugEnabled" type="boolean">
2723 <desc>
2724 PXE debug logging flag. If set, VirtualBox will write extensive
2725 PXE trace information to the release log.
2726 </desc>
2727 </attribute>
2728
2729 <attribute name="IDEControllerType" type="IDEControllerType">
2730 <desc>
2731 Type of the virtual IDE controller. Depending on this value,
2732 VirtualBox will provide different virtual IDE hardware
2733 devices to the guest.
2734 </desc>
2735 </attribute>
2736
2737 </interface>
2738
2739 <interface
2740 name="IMachine" extends="$unknown"
2741 uuid="a744b229-3457-422f-8550-649c40346c55"
2742 wsmap="managed"
2743 >
2744 <desc>
2745 The IMachine interface represents a virtual machine, or guest, created
2746 in VirtualBox.
2747
2748 This interface is used in two contexts. First of all, a collection of
2749 objects implementing this interface is stored in the
2750 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
2751 machines that are currently registered with this VirtualBox
2752 installation. Also, once a session has been opened for the given virtual
2753 machine (e.g. the virtual machine is running), the machine object
2754 associated with the open session can be queried from the session object;
2755 see <link to="ISession"/> for details.
2756
2757 The main role of this interface is to expose the settings of the virtual
2758 machine and provide methods to change various aspects of the virtual
2759 machine's configuration. For machine objects stored in the
2760 <link to="IVirtualBox::machines2"/> collection, all attributes are
2761 read-only unless explicitly stated otherwise in individual attribute
2762 and method descriptions. In order to change a machine setting, a session
2763 for this machine must be opened using one of
2764 <link to="IVirtualBox::openSession"/>,
2765 <link to="IVirtualBox::openRemoteSession"/> or
2766 <link to="IVirtualBox::openExistingSession"/> methods. After the
2767 session has been successfully opened, a mutable machine object needs to
2768 be queried from the session object and then the desired settings changes
2769 can be applied to the returned object using IMachine attributes and
2770 methods. See the ISession interface description for more information
2771 about sessions.
2772
2773 Note that the IMachine interface does not provide methods to control
2774 virtual machine execution (such as start the machine, or power it
2775 down) -- these methods are grouped in a separate IConsole
2776 interface. Refer to the IConsole interface description to get more
2777 information about this topic.
2778
2779 <see>ISession, IConsole</see>
2780 </desc>
2781
2782 <attribute name="parent" type="IVirtualBox" readonly="yes">
2783 <desc>Associated parent object.</desc>
2784 </attribute>
2785
2786 <attribute name="accessible" type="boolean" readonly="yes">
2787 <desc>
2788 Whether this virtual machine is currently accessible or not.
2789
2790 The machine is considered to be inaccessible when:
2791 <ul>
2792 <li>It is a registered virtual machine, and
2793 </li>
2794 <li>Its settings file is inaccessible (for example, it is
2795 located on a network share that is not accessible during
2796 VirtualBox startup, or becomes inaccessible later, or if
2797 the settings file can be read but is invalid).
2798 </li>
2799 </ul>
2800
2801 Otherwise, the value of this property is always <tt>true</tt>.
2802
2803 Every time this property is read, the accessibility state of
2804 this machine is re-evaluated. If the returned value is |false|,
2805 the <link to="#accessError"/> property may be used to get the
2806 detailed error information describing the reason of
2807 inaccessibility.
2808
2809 When the machine is inaccessible, only the following properties
2810 can be used on it:
2811 <ul>
2812 <li><link to="#parent"/></li>
2813 <li><link to="#id"/></li>
2814 <li><link to="#settingsFilePath"/></li>
2815 <li><link to="#accessible"/></li>
2816 <li><link to="#accessError"/></li>
2817 </ul>
2818
2819 An attempt to access any other property or method will return
2820 an error.
2821
2822 The only possible action you can perform on an inaccessible
2823 machine is to unregister it using the
2824 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
2825 for the accessibility state once more by querying this
2826 property).
2827
2828 <note>
2829 In the current implementation, once this property returns
2830 <tt>true</tt>, the machine will never become inaccessible
2831 later, even if its settings file cannot be successfully
2832 read/written any more (at least, until the VirtualBox
2833 server is restarted). This limitation may be removed in
2834 future releases.
2835 </note>
2836 </desc>
2837 </attribute>
2838
2839 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
2840 <desc>
2841 Error information describing the reason of machine
2842 inaccessibility.
2843
2844 Reading this property is only valid after the last call to
2845 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
2846 machine is currently unaccessible). Otherwise, a null
2847 IVirtualBoxErrorInfo object will be returned.
2848 </desc>
2849 </attribute>
2850
2851 <attribute name="name" type="wstring">
2852 <desc>
2853 Name of the virtual machine.
2854
2855 Besides being used for human-readable identification purposes
2856 everywhere in VirtualBox, the virtual machine name is also used
2857 as a name of the machine's settings file and as a name of the
2858 subdirectory this settings file resides in. Thus, every time you
2859 change the value of this property, the settings file will be
2860 renamed once you call <link to="#saveSettings()"/> to confirm the
2861 change. The containing subdirectory will be also renamed, but
2862 only if it has exactly the same name as the settings file
2863 itself prior to changing this property (for backward compatibility
2864 with previous API releases). The above implies the following
2865 limitations:
2866 <ul>
2867 <li>The machine name cannot be empty.</li>
2868 <li>The machine name can contain only characters that are valid
2869 file name characters according to the rules of the file
2870 system used to store VirtualBox configuration.</li>
2871 <li>You cannot have two or more machines with the same name
2872 if they use the same subdirectory for storing the machine
2873 settings files.</li>
2874 <li>You cannot change the name of the machine if it is running,
2875 or if any file in the directory containing the settings file
2876 is being used by another running machine or by any other
2877 process in the host operating system at a time when
2878 <link to="#saveSettings()"/> is called.
2879 </li>
2880 </ul>
2881 If any of the above limitations are hit, <link to="#saveSettings()"/>
2882 will return an appropriate error message explaining the exact
2883 reason and the changes you made to this machine will not be
2884 saved.
2885 <note>
2886 For "legacy" machines created using the
2887 <link to="IVirtualBox::createLegacyMachine()"/> call,
2888 the above naming limitations do not apply because the
2889 machine name does not affect the settings file name.
2890 The settings file name remains the same as it was specified
2891 during machine creation and never changes.
2892 </note>
2893 </desc>
2894 </attribute>
2895
2896 <attribute name="description" type="wstring">
2897 <desc>
2898 Description of the virtual machine.
2899
2900 The description attribute can contain any text and is
2901 typically used to describe the hardware and software
2902 configuration of the virtual machine in detail (i.e. network
2903 settings, versions of the installed software and so on).
2904 </desc>
2905 </attribute>
2906
2907 <attribute name="id" type="uuid" readonly="yes">
2908 <desc>UUID of the virtual machine.</desc>
2909 </attribute>
2910
2911 <attribute name="OSTypeId" type="wstring">
2912 <desc>
2913 User-defined identifier of the Guest OS type.
2914 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
2915 an IGuestOSType object representing details about the given
2916 Guest OS type.
2917 <note>
2918 This value may differ from the value returned by
2919 <link to="IGuest::OSTypeId"/> if Guest Additions are
2920 installed to the guest OS.
2921 </note>
2922 </desc>
2923 </attribute>
2924
2925 <attribute name="CPUCount" type="unsigned long">
2926 <desc>Number of virtual CPUs in the VM.</desc>
2927 </attribute>
2928
2929 <attribute name="memorySize" type="unsigned long">
2930 <desc>System memory size in megabytes.</desc>
2931 </attribute>
2932
2933 <attribute name="memoryBalloonSize" type="unsigned long">
2934 <desc>Initial memory balloon size in megabytes.</desc>
2935 </attribute>
2936
2937 <attribute name="statisticsUpdateInterval" type="unsigned long">
2938 <desc>Initial interval to update guest statistics in seconds.</desc>
2939 </attribute>
2940
2941 <attribute name="VRAMSize" type="unsigned long">
2942 <desc>Video memory size in megabytes.</desc>
2943 </attribute>
2944
2945 <attribute name="accelerate3DEnabled" type="boolean" default="false">
2946 <desc>
2947 This setting determines whether VirtualBox allows guests to make use
2948 of the 3D graphics support available on the host. Currently limited
2949 to OpenGL only. </desc>
2950 </attribute>
2951
2952 <attribute name="monitorCount" type="unsigned long">
2953 <desc>
2954 Number of virtual monitors.
2955 <note>
2956 Only effective on Windows XP and later guests with
2957 Guest Additions installed.
2958 </note>
2959 </desc>
2960 </attribute>
2961
2962 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
2963 <desc>Object containing all BIOS settings.</desc>
2964 </attribute>
2965
2966 <attribute name="HWVirtExEnabled" type="TSBool">
2967 <desc>
2968 This setting determines whether VirtualBox will try to make use of
2969 the host CPU's hardware virtualization extensions such as Intel VT-x
2970 and AMD-V. Note that in case such extensions are not available,
2971 they will not be used.
2972 </desc>
2973 </attribute>
2974
2975 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
2976 <desc>
2977 This setting determines whether VirtualBox will try to make use of
2978 the nested paging extension of Intel VT-x and AMD-V. Note that in case
2979 such extensions are not available, they will not be used.
2980 </desc>
2981 </attribute>
2982
2983 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
2984 <desc>
2985 This setting determines whether VirtualBox will try to make use of
2986 the VPID extension of Intel VT-x. Note that in case such extensions are
2987 not available, they will not be used.
2988 </desc>
2989 </attribute>
2990
2991 <attribute name="PAEEnabled" type="boolean" default="false">
2992 <desc>
2993 This setting determines whether VirtualBox will expose the Physical Address
2994 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
2995 is not available, it will not be reported.
2996 </desc>
2997 </attribute>
2998
2999 <attribute name="snapshotFolder" type="wstring">
3000 <desc>
3001 Full path to the directory used to store snapshot data
3002 (differencing hard disks and saved state files) of this machine.
3003
3004 The initial value of this property is
3005 <tt>&lt;</tt><link to="#settingsFilePath">
3006 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3007 <link to="#id">machine_uuid</link>
3008 <tt>&gt;</tt>.
3009
3010 Currently, it is an error to try to change this property on
3011 a machine that has snapshots (because this would require to
3012 move possibly large files to a different location).
3013 A separate method will be available for this purpose later.
3014
3015 <note>
3016 Setting this property to <tt>null</tt> will restore the
3017 initial value.
3018 </note>
3019 <note>
3020 When setting this property, the specified path can be
3021 absolute (full path) or relative to the directory where the
3022 <link to="#settingsFilePath">machine settings file</link>
3023 is located. When reading this property, a full path is
3024 always returned.
3025 </note>
3026 <note>
3027 The specified path may not exist, it will be created
3028 when necessary.
3029 </note>
3030 </desc>
3031 </attribute>
3032
3033 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3034 <desc>VRDP server object.</desc>
3035 </attribute>
3036
3037 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3038 <desc>Array of hard disks attached to this machine.</desc>
3039 </attribute>
3040
3041 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3042 <desc>Associated DVD drive object.</desc>
3043 </attribute>
3044
3045 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3046 <desc>Associated floppy drive object.</desc>
3047 </attribute>
3048
3049 <attribute name="USBController" type="IUSBController" readonly="yes">
3050 <desc>
3051 Associated USB controller object.
3052
3053 <note>
3054 This method may set a @ref com_warnings "warning result code".
3055 </note>
3056 <note>
3057 If USB functionality is not available in the given edition of
3058 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3059 </note>
3060 </desc>
3061 </attribute>
3062
3063 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3064 <desc>Associated audio adapter, always present.</desc>
3065 </attribute>
3066
3067 <attribute name="SATAController" type="ISATAController" readonly="yes">
3068 <desc>
3069 Associated SATA controller object.
3070 </desc>
3071 </attribute>
3072
3073 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3074 <desc>
3075 Full name of the file containing machine settings data.
3076 </desc>
3077 </attribute>
3078
3079 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3080 <desc>
3081 Current version of the format of the settings file of this machine
3082 (<link to="#settingsFilePath"/>).
3083
3084 The version string has the following format:
3085 <pre>
3086 x.y-platform
3087 </pre>
3088 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3089 versions, and <tt>platform</tt> is the platform identifier.
3090
3091 The current version usually matches the value of the
3092 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3093 settings file was created by an older version of VirtualBox and there
3094 was a change of the settings file format since then.
3095
3096 Note that VirtualBox automatically converts settings files from older
3097 versions to the most recent version when reading them (usually at
3098 VirtualBox startup) but it doesn't save the changes back until
3099 you call a method that implicitly saves settings (such as
3100 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3101 explicitly. Therefore, if the value of this attribute differs from the
3102 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3103 means that the settings file was converted but the result of the
3104 conversion is not yet saved to disk.
3105
3106 The above feature may be used by interactive front-ends to inform users
3107 about the settings file format change and offer them to explicitly save
3108 all converted settings files (the global and VM-specific ones),
3109 optionally create backup copies of the old settings files before saving,
3110 etc.
3111
3112 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3113 </desc>
3114 </attribute>
3115
3116 <attribute name="settingsModified" type="boolean" readonly="yes">
3117 <desc>
3118 Whether the settings of this machine have been modified
3119 (but neither yet saved nor discarded).
3120 <note>
3121 Reading this property is only valid on instances returned
3122 by <link to="ISession::machine"/> and on new machines
3123 created by <link to="IVirtualBox::createMachine"/> or opened
3124 by <link to="IVirtualBox::openMachine"/> but not
3125 yet registered, or on unregistered machines after calling
3126 <link to="IVirtualBox::unregisterMachine"/>. For all other
3127 cases, the settings can never be modified.
3128 </note>
3129 <note>
3130 For newly created unregistered machines, the value of this
3131 property is always TRUE until <link to="#saveSettings()"/>
3132 is called (no matter if any machine settings have been
3133 changed after the creation or not). For opened machines
3134 the value is set to FALSE (and then follows to normal rules).
3135 </note>
3136 </desc>
3137 </attribute>
3138
3139 <attribute name="sessionState" type="SessionState" readonly="yes">
3140 <desc>Current session state for this machine.</desc>
3141 </attribute>
3142
3143 <attribute name="sessionType" type="wstring" readonly="yes">
3144 <desc>
3145 Type of the session. If <link to="#sessionState"/> is
3146 SessionSpawning or SessionOpen, this attribute contains the
3147 same value as passed to the
3148 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3149 type parameter. If the session was opened directly using
3150 <link to="IVirtualBox::openSession()"/>, or if
3151 <link to="#sessionState"/> is SessionClosed, the value of this
3152 attribute is @c null.
3153 </desc>
3154 </attribute>
3155
3156 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3157 <desc>
3158 Identifier of the session process. This attribute contains the
3159 platform-dependent identifier of the process that has opened a
3160 direct session for this machine using the
3161 <link to="IVirtualBox::openSession()"/> call. The returned value
3162 is only valid if <link to="#sessionState"/> is SessionOpen or
3163 SessionClosing (i.e. a session is currently open or being
3164 closed) by the time this property is read.
3165 </desc>
3166 </attribute>
3167
3168 <attribute name="state" type="MachineState" readonly="yes">
3169 <desc>Current execution state of this machine.</desc>
3170 </attribute>
3171
3172 <attribute name="lastStateChange" type="long long" readonly="yes">
3173 <desc>
3174 Time stamp of the last execution state change,
3175 in milliseconds since 1970-01-01 UTC.
3176 </desc>
3177 </attribute>
3178
3179 <attribute name="stateFilePath" type="wstring" readonly="yes">
3180 <desc>
3181 Full path to the file that stores the execution state of
3182 the machine when it is in the <link to="MachineState::Saved"/>
3183 state.
3184 <note>
3185 When the machine is not in the Saved state, this attribute
3186 <tt>null</tt>.
3187 </note>
3188 </desc>
3189 </attribute>
3190
3191 <attribute name="logFolder" type="wstring" readonly="yes">
3192 <desc>
3193 Full path to the folder that stores a set of rotated log files
3194 recorded during machine execution. The most recent log file is
3195 named <tt>VBox.log</tt>, the previous log file is
3196 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3197 in the current version).
3198 </desc>
3199 </attribute>
3200
3201 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3202 <desc>
3203 Current snapshot of this machine.
3204 <note>
3205 A <tt>null</tt> object is returned if the machine doesn't
3206 have snapshots.
3207 </note>
3208 <see><link to="ISnapshot"/></see>
3209 </desc>
3210 </attribute>
3211
3212 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3213 <desc>
3214 Number of snapshots taken on this machine. Zero means the
3215 machine doesn't have any snapshots.
3216 </desc>
3217 </attribute>
3218
3219 <attribute name="currentStateModified" type="boolean" readonly="yes">
3220 <desc>
3221 Returns <tt>true</tt> if the current state of the machine is not
3222 identical to the state stored in the current snapshot.
3223
3224 The current state is identical to the current snapshot right
3225 after one of the following calls are made:
3226 <ul>
3227 <li><link to="IConsole::discardCurrentState"/> or
3228 <link to="IConsole::discardCurrentSnapshotAndState"/>
3229 </li>
3230 <li><link to="IConsole::takeSnapshot"/> (issued on a
3231 powered off or saved machine, for which
3232 <link to="#settingsModified"/> returns <tt>false</tt>)
3233 </li>
3234 <li><link to="IMachine::setCurrentSnapshot"/>
3235 </li>
3236 </ul>
3237
3238 The current state remains identical until one of the following
3239 happens:
3240 <ul>
3241 <li>settings of the machine are changed</li>
3242 <li>the saved state is discarded</li>
3243 <li>the current snapshot is discarded</li>
3244 <li>an attempt to execute the machine is made</li>
3245 </ul>
3246
3247 <note>
3248 For machines that don't have snapshots, this property is
3249 always <tt>false</tt>.
3250 </note>
3251 </desc>
3252 </attribute>
3253
3254 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3255 <desc>
3256 Collection of shared folders for this machine (permanent shared
3257 folders). These folders are shared automatically at machine startup
3258 and available only to the guest OS installed within this machine.
3259
3260 New shared folders are added to the collection using
3261 <link to="#createSharedFolder"/>. Existing shared folders can be
3262 removed using <link to="#removeSharedFolder"/>.
3263 </desc>
3264 </attribute>
3265
3266 <attribute name="clipboardMode" type="ClipboardMode">
3267 <desc>
3268 Synchronization mode between the host OS clipboard
3269 and the guest OS clipboard.
3270 </desc>
3271 </attribute>
3272
3273 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3274 <desc>
3275 A comma-separated list of simple glob patterns. Changes to guest
3276 properties whose name matches one of the patterns will generate an
3277 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3278 </desc>
3279 </attribute>
3280
3281 <method name="setBootOrder">
3282 <desc>
3283 Puts the given device to the specified position in
3284 the boot order.
3285
3286 To indicate that no device is associated with the given position,
3287 <link to="DeviceType::Null"/> should be used.
3288
3289 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3290 </desc>
3291 <param name="position" type="unsigned long" dir="in">
3292 <desc>
3293 Position in the boot order (<tt>1</tt> to the total number of
3294 devices the machine can boot from, as returned by
3295 <link to="ISystemProperties::maxBootPosition"/>).
3296 </desc>
3297 </param>
3298 <param name="device" type="DeviceType" dir="in">
3299 <desc>
3300 The type of the device used to boot at the given position.
3301 </desc>
3302 </param>
3303 </method>
3304
3305 <method name="getBootOrder" const="yes">
3306 <desc>
3307 Returns the device type that occupies the specified
3308 position in the boot order.
3309
3310 @todo [remove?]
3311 If the machine can have more than one device of the returned type
3312 (such as hard disks), then a separate method should be used to
3313 retrieve the individual device that occupies the given position.
3314
3315 If here are no devices at the given position, then
3316 <link to="DeviceType::Null"/> is returned.
3317
3318 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3319 </desc>
3320 <param name="order" type="unsigned long" dir="in">
3321 <desc>
3322 Position in the boot order (<tt>1</tt> to the total number of
3323 devices the machine can boot from, as returned by
3324 <link to="ISystemProperties::maxBootPosition"/>).
3325 </desc>
3326 </param>
3327 <param name="device" type="DeviceType" dir="return">
3328 <desc>
3329 Device at the given position.
3330 </desc>
3331 </param>
3332 </method>
3333
3334 <method name="attachHardDisk2">
3335 <desc>
3336 Attaches a virtual hard disk identified by the given UUID to a device
3337 slot of the specified bus.
3338
3339 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3340 specify the primary or secondary IDE controller, respectively. The
3341 SATA bus supports 30 channels, so this parameter can be a number in
3342 range from @c 0 to @c 29.
3343
3344 For the primary controller of the IDE bus, the @a device number can be
3345 either @c 0 or @c 1, to specify the master or the slave device,
3346 respectively. For the secondary IDE controller, the device number is
3347 always @c 1 because the master device is reserved for the CD-ROM drive.
3348
3349 For the SATA bus, the @a device parameter is not currently used and
3350 must always be @c 0.
3351
3352 The specified device slot must not have another disk attached to it, or
3353 this method will fail.
3354
3355 See <link to="IHardDisk2"/> for more detailed information about
3356 attaching hard disks.
3357
3358 <note>
3359 You cannot attach a hard disk to a running machine. Also, you cannot
3360 attach a hard disk to a newly created machine until this machine's
3361 settings are saved to disk using <link to="#saveSettings()"/>.
3362 </note>
3363 <note>
3364 If the hard disk is being attached indirectly, a new differencing hard
3365 disk will be implicitly created for it and attached instead. If the
3366 changes made to the machine settings (including this indirect
3367 attachment) are later cancelled using <link to="#discardSettings()"/>,
3368 this implicitly created differencing hard disk will be implicitly
3369 deleted.
3370 </note>
3371 </desc>
3372 <param name="id" type="uuid" dir="in">
3373 <desc>UUID of the hard disk to attach.</desc>
3374 </param>
3375 <param name="bus" type="StorageBus" dir="in">
3376 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3377 </param>
3378 <param name="channel" type="long" dir="in">
3379 <desc>Channel to attach the hard disk to.</desc>
3380 </param>
3381 <param name="device" type="long" dir="in">
3382 <desc>
3383 Device slot in the given channel to attach the hard disk to.
3384 </desc>
3385 </param>
3386 </method>
3387
3388 <method name="getHardDisk2" const="yes">
3389 <desc>
3390 Returns the virtual hard disk attached to a device slot of the specified
3391 bus.
3392
3393 Note that if the hard disk was indirectly attached by
3394 <link to="#attachHardDisk2()"/> to the given device slot then this
3395 method will return not the same object as passed to the
3396 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3397 more detailed information about attaching hard disks.
3398 </desc>
3399 <param name="bus" type="StorageBus" dir="in">
3400 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3401 </param>
3402 <param name="channel" type="long" dir="in">
3403 <desc>Channel to query.</desc>
3404 </param>
3405 <param name="device" type="long" dir="in">
3406 <desc>Device slot in the given channel to query.</desc>
3407 </param>
3408 <param name="hardDisk" type="IHardDisk2" dir="return">
3409 <desc>Attached hard disk object.</desc>
3410 </param>
3411 </method>
3412
3413 <method name="detachHardDisk2">
3414 <desc>
3415 Detaches the virtual hard disk attached to a device slot of the
3416 specified bus.
3417
3418 Detaching the hard disk from the virtual machine is deferred. This means
3419 that the hard disk remains associated with the machine when this method
3420 returns and gets actually de-associated only after a successful
3421 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3422 for more detailed information about attaching hard disks.
3423
3424 <note>
3425 You cannot detach the hard disk from a running machine.
3426 </note>
3427 <note>
3428 Detaching differencing hard disks implicitly created by <link
3429 to="#attachHardDisk2()"/> for the indirect attachment using this
3430 method will <b>not</b> implicitly delete them. The
3431 <link to="IHardDisk2::deleteStorage()"/> operation should be
3432 explicitly performed by the caller after the hard disk is successfully
3433 detached and the settings are saved with
3434 <link to="#saveSettings()"/>, if it is the desired action.
3435 </note>
3436
3437 </desc>
3438 <param name="bus" type="StorageBus" dir="in">
3439 <desc>Bus to detach the hard disk from.</desc>
3440 </param>
3441 <param name="channel" type="long" dir="in">
3442 <desc>Channel number to detach the hard disk from.</desc>
3443 </param>
3444 <param name="device" type="long" dir="in">
3445 <desc>Device slot number to detach the hard disk from.</desc>
3446 </param>
3447 </method>
3448
3449 <method name="getNetworkAdapter" const="yes">
3450 <desc>
3451 Returns the network adapter associated with the given slot.
3452 Slots are numbered sequentially, starting with zero. The total
3453 number of adapters per every machine is defined by the
3454 <link to="ISystemProperties::networkAdapterCount"/> property,
3455 so the maximum slot number is one less than that property's value.
3456 </desc>
3457 <param name="slot" type="unsigned long" dir="in"/>
3458 <param name="adapter" type="INetworkAdapter" dir="return"/>
3459 </method>
3460
3461 <method name="getSerialPort" const="yes">
3462 <desc>
3463 Returns the serial port associated with the given slot.
3464 Slots are numbered sequentially, starting with zero. The total
3465 number of serial ports per every machine is defined by the
3466 <link to="ISystemProperties::serialPortCount"/> property,
3467 so the maximum slot number is one less than that property's value.
3468 </desc>
3469 <param name="slot" type="unsigned long" dir="in"/>
3470 <param name="port" type="ISerialPort" dir="return"/>
3471 </method>
3472
3473 <method name="getParallelPort" const="yes">
3474 <desc>
3475 Returns the parallel port associated with the given slot.
3476 Slots are numbered sequentially, starting with zero. The total
3477 number of parallel ports per every machine is defined by the
3478 <link to="ISystemProperties::parallelPortCount"/> property,
3479 so the maximum slot number is one less than that property's value.
3480 </desc>
3481 <param name="slot" type="unsigned long" dir="in"/>
3482 <param name="port" type="IParallelPort" dir="return"/>
3483 </method>
3484
3485 <method name="getNextExtraDataKey">
3486 <desc>
3487 Returns the machine-specific extra data key name following the
3488 supplied key.
3489
3490 An error is returned if the supplied @a key does not exist. @c NULL is
3491 returned in @a nextKey if the supplied key is the last key. When
3492 supplying @c NULL for the @a key, the first key item is returned in @a
3493 nextKey (if there is any). @a nextValue is an optional parameter and
3494 if supplied, the next key's value is returned in it.
3495 </desc>
3496 <param name="key" type="wstring" dir="in">
3497 <desc>Name of the data key to follow.</desc>
3498 </param>
3499 <param name="nextKey" type="wstring" dir="out">
3500 <desc>Name of the next data key.</desc>
3501 </param>
3502 <param name="nextValue" type="wstring" dir="out">
3503 <desc>Value of the next data key.</desc>
3504 </param>
3505 </method>
3506
3507 <method name="getExtraData">
3508 <desc>
3509 Returns associated machine-specific extra data.
3510
3511 If the requested data @a key does not exist, this function will
3512 succeed and return @c NULL in the @a value argument.
3513 </desc>
3514 <param name="key" type="wstring" dir="in">
3515 <desc>Name of the data key to get.</desc>
3516 </param>
3517 <param name="value" type="wstring" dir="return">
3518 <desc>Value of the requested data key.</desc>
3519 </param>
3520 </method>
3521
3522 <method name="setExtraData">
3523 <desc>
3524 Sets associated machine-specific extra data.
3525
3526 If you pass @c NULL as a key @a value, the given @a key will be
3527 deleted.
3528
3529 <note>
3530 Before performing the actual data change, this method will ask all
3531 registered callbacks using the
3532 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
3533 notification for a permission. If one of the callbacks refuses the
3534 new value, the change will not be performed.
3535 </note>
3536 <note>
3537 On success, the
3538 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
3539 is called to inform all registered callbacks about a successful data
3540 change.
3541 </note>
3542 <note>
3543 This method can be called outside the machine session and therefore
3544 it's a caller's responsibility to handle possible race conditions
3545 when several clients change the same key at the same time.
3546 </note>
3547 </desc>
3548 <param name="key" type="wstring" dir="in">
3549 <desc>Name of the data key to set.</desc>
3550 </param>
3551 <param name="value" type="wstring" dir="in">
3552 <desc>Value to assign to the key.</desc>
3553 </param>
3554 </method>
3555
3556 <method name="saveSettings">
3557 <desc>
3558 Saves any changes to machine settings made since the session
3559 has been opened or a new machine has been created, or since the
3560 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
3561 For registered machines, new settings become visible to all
3562 other VirtualBox clients after successful invocation of this
3563 method.
3564 <note>
3565 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
3566 notification event after the configuration has been successfully
3567 saved (only for registered machines).
3568 </note>
3569 <note>
3570 Calling this method is only valid on instances returned
3571 by <link to="ISession::machine"/> and on new machines
3572 created by <link to="IVirtualBox::createMachine"/> but not
3573 yet registered, or on unregistered machines after calling
3574 <link to="IVirtualBox::unregisterMachine"/>.
3575 </note>
3576 </desc>
3577 </method>
3578
3579 <method name="saveSettingsWithBackup">
3580 <desc>
3581 Creates a backup copy of the machine settings file (<link
3582 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
3583 <link to="#saveSettings()"/>.
3584
3585 Note that the backup copy is created <b>only</b> if the settings file
3586 auto-conversion took place (see <link to="#settingsFileVersion"/> for
3587 details). Otherwise, this call is fully equivalent to
3588 <link to="#saveSettings()"/> and no backup copying is done.
3589
3590 The backup copy is created in the same directory where the original
3591 settings file is located. It is given the following file name:
3592 <pre>
3593 original.xml.x.y-platform.bak
3594 </pre>
3595 where <tt>original.xml</tt> is the original settings file name
3596 (excluding path), and <tt>x.y-platform</tt> is the version of the old
3597 format of the settings file (before auto-conversion).
3598
3599 If the given backup file already exists, this method will try to add the
3600 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
3601 0 to 9) and copy it again until it succeeds. If all suffixes are
3602 occupied, or if any other copy error occurs, this method will return a
3603 failure.
3604
3605 If the copy operation succeeds, the @a bakFileName return argument will
3606 receive a full path to the created backup file (for informational
3607 purposes). Note that this will happen even if the subsequent
3608 <link to="#saveSettings()"/> call performed by this method after the
3609 copy operation, fails.
3610
3611 <note>
3612 The VirtualBox API never calls this method. It is intended purely for
3613 the purposes of creating backup copies of the settings files by
3614 front-ends before saving the results of the automatically performed
3615 settings conversion to disk.
3616 </note>
3617
3618 <see>settingsFileVersion</see>
3619 </desc>
3620 <param name="bakFileName" type="wstring" dir="return">
3621 <desc>Full path to the created backup copy.</desc>
3622 </param>
3623 </method>
3624
3625 <method name="discardSettings">
3626 <desc>
3627 Discards any changes to the machine settings made since the session
3628 has been opened or since the last call to <link to="#saveSettings()"/>
3629 or <link to="#discardSettings"/>.
3630 <note>
3631 Calling this method is only valid on instances returned
3632 by <link to="ISession::machine"/> and on new machines
3633 created by <link to="IVirtualBox::createMachine"/> or
3634 opened by <link to="IVirtualBox::openMachine"/> but not
3635 yet registered, or on unregistered machines after calling
3636 <link to="IVirtualBox::unregisterMachine"/>.
3637 </note>
3638 </desc>
3639 </method>
3640
3641 <method name="deleteSettings">
3642 <desc>
3643 Deletes the settings file of this machine from disk.
3644 The machine must not be registered in order for this operation
3645 to succeed.
3646 <note>
3647 <link to="#settingsModified"/> will return TRUE after this
3648 method successfully returns.
3649 </note>
3650 <note>
3651 Calling this method is only valid on instances returned
3652 by <link to="ISession::machine"/> and on new machines
3653 created by <link to="IVirtualBox::createMachine"/> or
3654 opened by <link to="IVirtualBox::openMachine"/> but not
3655 yet registered, or on unregistered machines after calling
3656 <link to="IVirtualBox::unregisterMachine"/>.
3657 </note>
3658 <note>
3659 The deleted machine settings file can be restored (saved again)
3660 by calling <link to="#saveSettings()"/>.
3661 </note>
3662 </desc>
3663 </method>
3664
3665 <method name="getSnapshot">
3666 <desc>
3667 Returns a snapshot of this machine with the given UUID.
3668 A <tt>null</tt> UUID can be used to obtain the first snapshot
3669 taken on this machine. This is useful if you want to traverse
3670 the whole tree of snapshots starting from the root.
3671 </desc>
3672 <param name="id" type="uuid" dir="in">
3673 <desc>UUID of the snapshot to get</desc>
3674 </param>
3675 <param name="snapshot" type="ISnapshot" dir="return">
3676 <desc>Snapshot object with the given UUID.</desc>
3677 </param>
3678 </method>
3679
3680 <method name="findSnapshot">
3681 <desc>
3682 Returns a snapshot of this machine with the given name.
3683 </desc>
3684 <param name="name" type="wstring" dir="in">
3685 <desc>Name of the snapshot to find</desc>
3686 </param>
3687 <param name="snapshot" type="ISnapshot" dir="return">
3688 <desc>Snapshot object with the given name.</desc>
3689 </param>
3690 </method>
3691
3692 <method name="setCurrentSnapshot">
3693 <desc>
3694 Sets the current snapshot of this machine.
3695 <note>
3696 In the current implementation, this operation is not
3697 implemented.
3698 </note>
3699 </desc>
3700 <param name="id" type="uuid" dir="in">
3701 <desc>UUID of the snapshot to set as the current snapshot.</desc>
3702 </param>
3703 </method>
3704
3705 <method name="createSharedFolder">
3706 <desc>
3707 Creates a new permanent shared folder by associating the given logical
3708 name with the given host path, adds it to the collection of shared
3709 folders and starts sharing it. Refer to the description of
3710 <link to="ISharedFolder"/> to read more about logical names.
3711 </desc>
3712 <param name="name" type="wstring" dir="in">
3713 <desc>Unique logical name of the shared folder.</desc>
3714 </param>
3715 <param name="hostPath" type="wstring" dir="in">
3716 <desc>Full path to the shared folder in the host file system.</desc>
3717 </param>
3718 <param name="writable" type="boolean" dir="in">
3719 <desc>Whether the share is writable or readonly</desc>
3720 </param>
3721 </method>
3722
3723 <method name="removeSharedFolder">
3724 <desc>
3725 Removes the permanent shared folder with the given name previously
3726 created by <link to="#createSharedFolder"/> from the collection of
3727 shared folders and stops sharing it.
3728 </desc>
3729 <param name="name" type="wstring" dir="in">
3730 <desc>Logical name of the shared folder to remove.</desc>
3731 </param>
3732 </method>
3733
3734 <method name="canShowConsoleWindow">
3735 <desc>
3736 Returns @c true if the VM console process can activate the
3737 console window and bring it to foreground on the desktop of
3738 the host PC.
3739 <note>
3740 This method will fail if a session for this machine is not
3741 currently open.
3742 </note>
3743 </desc>
3744 <param name="canShow" type="boolean" dir="return">
3745 <desc>
3746 @c true if the console window can be shown and @c
3747 false otherwise.
3748 </desc>
3749 </param>
3750 </method>
3751
3752 <method name="showConsoleWindow">
3753 <desc>
3754 Activates the console window and brings it to foreground on
3755 the desktop of the host PC. Many modern window managers on
3756 many platforms implement some sort of focus stealing
3757 prevention logic, so that it may be impossible to activate
3758 a window without the help of the currently active
3759 application. In this case, this method will return a non-zero
3760 identifier that represents the top-level window of the VM
3761 console process. The caller, if it represents a currently
3762 active process, is responsible to use this identifier (in a
3763 platform-dependent manner) to perform actual window
3764 activation.
3765 <note>
3766 This method will fail if a session for this machine is not
3767 currently open.
3768 </note>
3769 </desc>
3770 <param name="winId" type="unsigned long long" dir="return">
3771 <desc>
3772 Platform-dependent identifier of the top-level VM console
3773 window, or zero if this method has performed all actions
3774 necessary to implement the <i>show window</i> semantics for
3775 the given platform and/or VirtualBox front-end.
3776 </desc>
3777 </param>
3778 </method>
3779
3780 <method name="getGuestProperty">
3781 <desc>
3782 Reads an entry from the machine's guest property store.
3783 </desc>
3784 <param name="name" type="wstring" dir="in">
3785 <desc>
3786 The name of the property to read.
3787 </desc>
3788 </param>
3789 <param name="value" type="wstring" dir="out">
3790 <desc>
3791 The value of the property. If the property does not exist then this
3792 will be empty.
3793 </desc>
3794 </param>
3795 <param name="timestamp" type="unsigned long long" dir="out">
3796 <desc>
3797 The time at which the property was last modified, as seen by the
3798 server process.
3799 </desc>
3800 </param>
3801 <param name="flags" type="wstring" dir="out">
3802 <desc>
3803 Additional property parameters, passed as a comma-separated list of
3804 "name=value" type entries.
3805 </desc>
3806 </param>
3807 </method>
3808
3809 <method name="getGuestPropertyValue">
3810 <desc>
3811 Reads a value from the machine's guest property store.
3812 </desc>
3813 <param name="property" type="wstring" dir="in">
3814 <desc>
3815 The name of the property to read.
3816 </desc>
3817 </param>
3818 <param name="value" type="wstring" dir="return">
3819 <desc>
3820 The value of the property. If the property does not exist then this
3821 will be empty.
3822 </desc>
3823 </param>
3824 </method>
3825
3826 <method name="getGuestPropertyTimestamp">
3827 <desc>
3828 Reads a property timestamp from the machine's guest property store.
3829 </desc>
3830 <param name="property" type="wstring" dir="in">
3831 <desc>
3832 The name of the property to read.
3833 </desc>
3834 </param>
3835 <param name="value" type="unsigned long long" dir="return">
3836 <desc>
3837 The timestamp. If the property does not exist then this will be
3838 empty.
3839 </desc>
3840 </param>
3841 </method>
3842
3843 <method name="setGuestProperty">
3844 <desc>
3845 Sets, changes or deletes an entry in the machine's guest property
3846 store.
3847 </desc>
3848 <param name="property" type="wstring" dir="in">
3849 <desc>
3850 The name of the property to set, change or delete.
3851 </desc>
3852 </param>
3853 <param name="value" type="wstring" dir="in">
3854 <desc>
3855 The new value of the property to set, change or delete. If the
3856 property does not yet exist and value is non-empty, it will be
3857 created. If the value is empty, the key will be deleted if it
3858 exists.
3859 </desc>
3860 </param>
3861 <param name="flags" type="wstring" dir="in">
3862 <desc>
3863 Additional property parameters, passed as a comma-separated list of
3864 "name=value" type entries.
3865 </desc>
3866 </param>
3867 </method>
3868
3869 <method name="setGuestPropertyValue">
3870 <desc>
3871 Sets, changes or deletes a value in the machine's guest property
3872 store. The flags field will be left unchanged or created empty for a
3873 new property.
3874 </desc>
3875 <param name="property" type="wstring" dir="in">
3876 <desc>
3877 The name of the property to set, change or delete.
3878 </desc>
3879 </param>
3880 <param name="value" type="wstring" dir="in">
3881 <desc>
3882 The new value of the property to set, change or delete. If the
3883 property does not yet exist and value is non-empty, it will be
3884 created. If value is empty, the property will be deleted if it
3885 exists.
3886 </desc>
3887 </param>
3888 </method>
3889
3890 <method name="enumerateGuestProperties">
3891 <desc>
3892 Return a list of the guest properties matching a set of patterns along
3893 with their values, time stamps and flags.
3894 </desc>
3895 <param name="patterns" type="wstring" dir="in">
3896 <desc>
3897 The patterns to match the properties against, separated by '|'
3898 characters. If this is empty or NULL, all properties will match.
3899 </desc>
3900 </param>
3901 <param name="name" type="wstring" dir="out" safearray="yes">
3902 <desc>
3903 The names of the properties returned.
3904 </desc>
3905 </param>
3906 <param name="value" type="wstring" dir="out" safearray="yes">
3907 <desc>
3908 The values of the properties returned. The array entries match the
3909 corresponding entries in the @a name array.
3910 </desc>
3911 </param>
3912 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3913 <desc>
3914 The time stamps of the properties returned. The array entries match
3915 the corresponding entries in the @a name array.
3916 </desc>
3917 </param>
3918 <param name="flags" type="wstring" dir="out" safearray="yes">
3919 <desc>
3920 The flags of the properties returned. The array entries match the
3921 corresponding entries in the @a name array.
3922 </desc>
3923 </param>
3924 </method>
3925</interface>
3926
3927 <!--
3928 // IConsole
3929 /////////////////////////////////////////////////////////////////////////
3930 -->
3931
3932 <interface
3933 name="IConsoleCallback" extends="$unknown"
3934 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
3935 wsmap="suppress"
3936 >
3937
3938 <method name="onMousePointerShapeChange">
3939 <desc>
3940 Notification when the guest mouse pointer shape has
3941 changed. The new shape data is given.
3942 </desc>
3943 <param name="visible" type="boolean" dir="in">
3944 <desc>
3945 Flag whether the pointer is visible.
3946 </desc>
3947 </param>
3948 <param name="alpha" type="boolean" dir="in">
3949 <desc>
3950 Flag whether the pointer has an alpha channel.
3951 </desc>
3952 </param>
3953 <param name="xHot" type="unsigned long" dir="in">
3954 <desc>
3955 The pointer hot spot x coordinate.
3956 </desc>
3957 </param>
3958 <param name="yHot" type="unsigned long" dir="in">
3959 <desc>
3960 The pointer hot spot y coordinate.
3961 </desc>
3962 </param>
3963 <param name="width" type="unsigned long" dir="in">
3964 <desc>
3965 Width of the pointer shape in pixels.
3966 </desc>
3967 </param>
3968 <param name="height" type="unsigned long" dir="in">
3969 <desc>
3970 Height of the pointer shape in pixels.
3971 </desc>
3972 </param>
3973 <param name="shape" type="octet" mod="ptr" dir="in">
3974 <desc>
3975 Address of the shape buffer.
3976
3977 The buffer contains 1 bpp (bits per pixel) AND mask followed by 32 bpp XOR (color) mask.
3978
3979 For pointers without alpha channel the XOR mask pixels are 32 bit values: (lsb)BGR0(msb).
3980 For pointers with alpha channel the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
3981
3982 AND mask presents for pointers with alpha channel, so if the callback does not
3983 support alpha, the pointer could be displayed as a normal color pointer.
3984
3985 The AND mask is 1 bpp bitmap with byte aligned scanlines. Size of AND mask,
3986 therefore, is <tt>cbAnd = (width + 7) / 8 * height</tt>. The padding bits at the
3987 end of any scanline are undefined.
3988
3989 The XOR mask follows the AND mask on the next 4 bytes aligned offset:
3990 <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>
3991 Bytes in the gap between the AND and the XOR mask are undefined.
3992 XOR mask scanlines have no gap between them and size of XOR mask is:
3993 <tt>cXor = width * 4 * height</tt>.
3994
3995 <note>
3996 If 'shape' is equal to 0, only pointer visibility is being changed.
3997 </note>
3998 </desc>
3999 </param>
4000 </method>
4001
4002 <method name="onMouseCapabilityChange">
4003 <desc>
4004 Notification when the mouse capabilities reported by the
4005 guest have changed. The new capabilities are passed.
4006 </desc>
4007 <param name="supportsAbsolute" type="boolean" dir="in"/>
4008 <param name="needsHostCursor" type="boolean" dir="in"/>
4009 </method>
4010
4011 <method name="onKeyboardLedsChange">
4012 <desc>
4013 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
4014 to alter the state of the keyboard LEDs.
4015 </desc>
4016 <param name="numLock" type="boolean" dir="in"/>
4017 <param name="capsLock" type="boolean" dir="in"/>
4018 <param name="scrollLock" type="boolean" dir="in"/>
4019 </method>
4020
4021 <method name="onStateChange">
4022 <desc>
4023 Notification when the execution state of the machine has changed.
4024 The new state will be given.
4025 </desc>
4026 <param name="state" type="MachineState" dir="in"/>
4027 </method>
4028
4029 <method name="onAdditionsStateChange">
4030 <desc>
4031 Notification when a Guest Additions property changes.
4032 Interested callees should query IGuest attributes to
4033 find out what has changed.
4034 </desc>
4035 </method>
4036
4037 <method name="onDVDDriveChange">
4038 <desc>
4039 Notification when a property of the
4040 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
4041 Interested callees should use IDVDDrive methods to find out what has
4042 changed.
4043 </desc>
4044 </method>
4045
4046 <method name="onFloppyDriveChange">
4047 <desc>
4048 Notification when a property of the
4049 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
4050 Interested callees should use IFloppyDrive methods to find out what
4051 has changed.
4052 </desc>
4053 </method>
4054
4055 <method name="onNetworkAdapterChange">
4056 <desc>
4057 Notification when a property of one of the
4058 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
4059 changes. Interested callees should use INetworkAdapter methods and
4060 attributes to find out what has changed.
4061 </desc>
4062 <param name="networkAdapter" type="INetworkAdapter" dir="in">
4063 <desc>Network adapter that is subject to change.</desc>
4064 </param>
4065 </method>
4066
4067 <method name="onSerialPortChange">
4068 <desc>
4069 Notification when a property of one of the
4070 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
4071 Interested callees should use ISerialPort methods and attributes
4072 to find out what has changed.
4073 </desc>
4074 <param name="serialPort" type="ISerialPort" dir="in">
4075 <desc>Serial port that is subject to change.</desc>
4076 </param>
4077 </method>
4078
4079 <method name="onParallelPortChange">
4080 <desc>
4081 Notification when a property of one of the
4082 virtual <link to="IMachine::getParallelPort">parallel ports</link>
4083 changes. Interested callees should use ISerialPort methods and
4084 attributes to find out what has changed.
4085 </desc>
4086 <param name="parallelPort" type="IParallelPort" dir="in">
4087 <desc>Parallel port that is subject to change.</desc>
4088 </param>
4089 </method>
4090
4091 <method name="onVRDPServerChange">
4092 <desc>
4093 Notification when a property of the
4094 <link to="IMachine::VRDPServer">VRDP server</link> changes.
4095 Interested callees should use IVRDPServer methods and attributes to
4096 find out what has changed.
4097 </desc>
4098 </method>
4099
4100 <method name="onUSBControllerChange">
4101 <desc>
4102 Notification when a property of the virtual
4103 <link to="IMachine::USBController">USB controller</link> changes.
4104 Interested callees should use IUSBController methods and attributes to
4105 find out what has changed.
4106 </desc>
4107 </method>
4108
4109 <method name="onUSBDeviceStateChange">
4110 <desc>
4111 Notification when a USB device is attached to or detached from
4112 the virtual USB controller.
4113
4114 This notification is sent as a result of the indirect
4115 request to attach the device because it matches one of the
4116 machine USB filters, or as a result of the direct request
4117 issued by <link to="IConsole::attachUSBDevice"/> or
4118 <link to="IConsole::detachUSBDevice"/>.
4119
4120 This notification is sent in case of both a succeeded and a
4121 failed request completion. When the request succeeds, the @a
4122 error parameter is @c null, and the given device has been
4123 already added to (when @a attached is @c true) or removed from
4124 (when @a attached is @c false) the collection represented by
4125 <link to="IConsole::USBDevices"/>. On failure, the collection
4126 doesn't change and the @a error parameter represents the error
4127 message describing the failure.
4128
4129 </desc>
4130 <param name="device" type="IUSBDevice" dir="in">
4131 <desc>Device that is subject to state change.</desc>
4132 </param>
4133 <param name="attached" type="boolean" dir="in">
4134 <desc>
4135 <tt>true</tt> if the device was attached
4136 and <tt>false</tt> otherwise.
4137 </desc>
4138 </param>
4139 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
4140 <desc>
4141 <tt>null</tt> on success or an error message object on
4142 failure.
4143 </desc>
4144 </param>
4145 </method>
4146
4147 <method name="onSharedFolderChange">
4148 <desc>
4149 Notification when a shared folder is added or removed.
4150 The @a scope argument defines one of three scopes:
4151 <link to="IVirtualBox::sharedFolders">global shared folders</link>
4152 (<link to="Scope::Global">Global</link>),
4153 <link to="IMachine::sharedFolders">permanent shared folders</link> of
4154 the machine (<link to="Scope::Machine">Machine</link>) or <link
4155 to="IConsole::sharedFolders">transient shared folders</link> of the
4156 machine (<link to="Scope::Session">Session</link>). Interested callees
4157 should use query the corresponding collections to find out what has
4158 changed.
4159 </desc>
4160 <param name="scope" type="Scope" dir="in">
4161 <desc>Scope of the notification.</desc>
4162 </param>
4163 </method>
4164
4165 <method name="onRuntimeError">
4166 <desc>
4167 Notification when an error happens during the virtual
4168 machine execution.
4169
4170 There are three kinds of runtime errors:
4171 <ul>
4172 <li><i>fatal</i></li>
4173 <li><i>non-fatal with retry</i></li>
4174 <li><i>non-fatal warnings</i></li>
4175 </ul>
4176
4177 <b>Fatal</b> errors are indicated by the @a fatal parameter set
4178 to <tt>true</tt>. In case of fatal errors, the virtual machine
4179 execution is always paused before calling this notification, and
4180 the notification handler is supposed either to immediately save
4181 the virtual machine state using <link to="IConsole::saveState()"/>
4182 or power it off using <link to="IConsole::powerDown()"/>.
4183 Resuming the execution can lead to unpredictable results.
4184
4185 <b>Non-fatal</b> errors and warnings are indicated by the
4186 @a fatal parameter set to <tt>false</tt>. If the virtual machine
4187 is in the Paused state by the time the error notification is
4188 received, it means that the user can <i>try to resume</i> the machine
4189 execution after attempting to solve the problem that caused the
4190 error. In this case, the notification handler is supposed
4191 to show an appropriate message to the user (depending on the
4192 value of the @a id parameter) that offers several actions such
4193 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
4194 wants to retry, the notification handler should continue
4195 the machine execution using the <link to="IConsole::resume()"/>
4196 call. If the machine execution is not Paused during this
4197 notification, then it means this notification is a <i>warning</i>
4198 (for example, about a fatal condition that can happen very soon);
4199 no immediate action is required from the user, the machine
4200 continues its normal execution.
4201
4202 Note that in either case the notification handler
4203 <b>must not</b> perform any action directly on a thread
4204 where this notification is called. Everything it is allowed to
4205 do is to post a message to another thread that will then talk
4206 to the user and take the corresponding action.
4207
4208 Currently, the following error identifiers are known:
4209 <ul>
4210 <li><tt>"HostMemoryLow"</tt></li>
4211 <li><tt>"HostAudioNotResponding"</tt></li>
4212 <li><tt>"VDIStorageFull"</tt></li>
4213 </ul>
4214
4215 <note>
4216 This notification is not designed to be implemented by
4217 more than one callback at a time. If you have multiple
4218 IConsoleCallback instances registered on the given
4219 IConsole object, make sure you simply do nothing but
4220 return @c S_OK from all but one of them that does actual
4221 user notification and performs necessary actions.
4222 </note>
4223
4224 </desc>
4225 <param name="fatal" type="boolean" dir="in">
4226 <desc>Whether the error is fatal or not</desc>
4227 </param>
4228 <param name="id" type="wstring" dir="in">
4229 <desc>Error identifier</desc>
4230 </param>
4231 <param name="message" type="wstring" dir="in">
4232 <desc>Optional error message</desc>
4233 </param>
4234 </method>
4235
4236 <method name="onCanShowWindow">
4237 <desc>
4238 Notification when a call to
4239 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4240 front-end to check if a subsequent call to
4241 <link to="IMachine::showConsoleWindow()"/> can succeed.
4242
4243 The callee should give an answer appropriate to the current
4244 machine state in the @a canShow argument. This answer must
4245 remain valid at least until the next
4246 <link to="IConsole::state">machine state</link> change.
4247
4248 <note>
4249 This notification is not designed to be implemented by
4250 more than one callback at a time. If you have multiple
4251 IConsoleCallback instances registered on the given
4252 IConsole object, make sure you simply do nothing but
4253 return @c true and @c S_OK from all but one of them that
4254 actually manages console window activation.
4255 </note>
4256 </desc>
4257 <param name="canShow" type="boolean" dir="return">
4258 <desc>
4259 @c true if the console window can be shown and @c
4260 false otherwise.
4261 </desc>
4262 </param>
4263 </method>
4264
4265 <method name="onShowWindow">
4266 <desc>
4267 Notification when a call to
4268 <link to="IMachine::showConsoleWindow()"/>
4269 requests the console window to be activated and brought to
4270 foreground on the desktop of the host PC.
4271
4272 This notification should cause the VM console process to
4273 perform the requested action as described above. If it is
4274 impossible to do it at a time of this notification, this
4275 method should return a failure.
4276
4277 Note that many modern window managers on many platforms
4278 implement some sort of focus stealing prevention logic, so
4279 that it may be impossible to activate a window without the
4280 help of the currently active application (which is supposedly
4281 an initiator of this notification). In this case, this method
4282 must return a non-zero identifier that represents the
4283 top-level window of the VM console process. The caller, if it
4284 represents a currently active process, is responsible to use
4285 this identifier (in a platform-dependent manner) to perform
4286 actual window activation.
4287
4288 This method must set @a winId to zero if it has performed all
4289 actions necessary to complete the request and the console
4290 window is now active and in foreground, to indicate that no
4291 further action is required on the caller's side.
4292
4293 <note>
4294 This notification is not designed to be implemented by
4295 more than one callback at a time. If you have multiple
4296 IConsoleCallback instances registered on the given
4297 IConsole object, make sure you simply do nothing but
4298 return @c S_OK from all but one of them that actually
4299 manages console window activation.
4300 </note>
4301 </desc>
4302 <param name="winId" type="unsigned long long" dir="return">
4303 <desc>
4304 Platform-dependent identifier of the top-level VM console
4305 window, or zero if this method has performed all actions
4306 necessary to implement the <i>show window</i> semantics for
4307 the given platform and/or this VirtualBox front-end.
4308 </desc>
4309 </param>
4310 </method>
4311
4312 </interface>
4313
4314 <interface
4315 name="IRemoteDisplayInfo" extends="$unknown"
4316 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4317 wsmap="struct"
4318 >
4319 <desc>
4320 Contains information about the remote display (VRDP) capabilities and status.
4321 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4322 </desc>
4323
4324 <attribute name="active" type="boolean" readonly="yes">
4325 <desc>
4326 Whether the remote display connection is active.
4327 </desc>
4328 </attribute>
4329
4330 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4331 <desc>
4332 How many times a client connected.
4333 </desc>
4334 </attribute>
4335
4336 <attribute name="beginTime" type="long long" readonly="yes">
4337 <desc>
4338 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4339 </desc>
4340 </attribute>
4341
4342 <attribute name="endTime" type="long long" readonly="yes">
4343 <desc>
4344 When the last connection was terminated or the current time, if
4345 connection is still active, in milliseconds since 1970-01-01 UTC.
4346 </desc>
4347 </attribute>
4348
4349 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4350 <desc>
4351 How many bytes were sent in last or current, if still active, connection.
4352 </desc>
4353 </attribute>
4354
4355 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4356 <desc>
4357 How many bytes were sent in all connections.
4358 </desc>
4359 </attribute>
4360
4361 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4362 <desc>
4363 How many bytes were received in last or current, if still active, connection.
4364 </desc>
4365 </attribute>
4366
4367 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4368 <desc>
4369 How many bytes were received in all connections.
4370 </desc>
4371 </attribute>
4372
4373 <attribute name="user" type="wstring" readonly="yes">
4374 <desc>
4375 Login user name supplied by the client.
4376 </desc>
4377 </attribute>
4378
4379 <attribute name="domain" type="wstring" readonly="yes">
4380 <desc>
4381 Login domain name supplied by the client.
4382 </desc>
4383 </attribute>
4384
4385 <attribute name="clientName" type="wstring" readonly="yes">
4386 <desc>
4387 The client name supplied by the client.
4388 </desc>
4389 </attribute>
4390
4391 <attribute name="clientIP" type="wstring" readonly="yes">
4392 <desc>
4393 The IP address of the client.
4394 </desc>
4395 </attribute>
4396
4397 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4398 <desc>
4399 The client software version number.
4400 </desc>
4401 </attribute>
4402
4403 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
4404 <desc>
4405 Public key exchange method used when connection was established.
4406 Values: 0 - RDP4 public key exchange scheme.
4407 1 - X509 certificates were sent to client.
4408 </desc>
4409 </attribute>
4410
4411 </interface>
4412
4413 <interface
4414 name="IConsole" extends="$unknown"
4415 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
4416 wsmap="managed"
4417 >
4418 <desc>
4419 The IConsole interface represents an interface to control virtual
4420 machine execution.
4421
4422 The console object that implements the IConsole interface is obtained
4423 from a session object after the session for the given machine has been
4424 opened using one of <link to="IVirtualBox::openSession"/>,
4425 <link to="IVirtualBox::openRemoteSession"/> or
4426 <link to="IVirtualBox::openExistingSession"/> methods.
4427
4428 Methods of the IConsole interface allow the caller to query the current
4429 virtual machine execution state, pause the machine or power it down, save
4430 the machine state or take a snapshot, attach and detach removable media
4431 and so on.
4432
4433 <see>ISession</see>
4434 </desc>
4435
4436 <attribute name="machine" type="IMachine" readonly="yes">
4437 <desc>
4438 Machine object this console is sessioned with.
4439 <note>
4440 This is a convenience property, it has the same value as
4441 <link to="ISession::machine"/> of the corresponding session
4442 object.
4443 </note>
4444 </desc>
4445 </attribute>
4446
4447 <attribute name="state" type="MachineState" readonly="yes">
4448 <desc>
4449 Current execution state of the machine.
4450 <note>
4451 This property always returns the same value as the corresponding
4452 property of the IMachine object this console is sessioned with.
4453 For the process that owns (executes) the VM, this is the
4454 preferable way of querying the VM state, because no IPC
4455 calls are made.
4456 </note>
4457 </desc>
4458 </attribute>
4459
4460 <attribute name="guest" type="IGuest" readonly="yes">
4461 <desc>Guest object.</desc>
4462 </attribute>
4463
4464 <attribute name="keyboard" type="IKeyboard" readonly="yes">
4465 <desc>
4466 Virtual keyboard object.
4467 <note>
4468 If the machine is not running, any attempt to use
4469 the returned object will result in an error.
4470 </note>
4471 </desc>
4472 </attribute>
4473
4474 <attribute name="mouse" type="IMouse" readonly="yes">
4475 <desc>
4476 Virtual mouse object.
4477 <note>
4478 If the machine is not running, any attempt to use
4479 the returned object will result in an error.
4480 </note>
4481 </desc>
4482 </attribute>
4483
4484 <attribute name="display" type="IDisplay" readonly="yes">
4485 <desc>Virtual display object.
4486 <note>
4487 If the machine is not running, any attempt to use
4488 the returned object will result in an error.
4489 </note>
4490 </desc>
4491 </attribute>
4492
4493 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
4494 <desc>Debugging interface.</desc>
4495 </attribute>
4496
4497 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
4498 <desc>
4499 Collection of USB devices currently attached to the virtual
4500 USB controller.
4501 <note>
4502 The collection is empty if the machine is not running.
4503 </note>
4504 </desc>
4505 </attribute>
4506
4507 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
4508 <desc>
4509 List of USB devices currently attached to the remote VRDP client.
4510 Once a new device is physically attached to the remote host computer,
4511 it appears in this list and remains there until detached.
4512 </desc>
4513 </attribute>
4514
4515 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4516 <desc>
4517 Collection of shared folders for the current session. These folders
4518 are called transient shared folders because they are available to the
4519 guest OS running inside the associated virtual machine only for the
4520 duration of the session (as opposed to
4521 <link to="IMachine::sharedFolders"/> which represent permanent shared
4522 folders). When the session is closed (e.g. the machine is powered down),
4523 these folders are automatically discarded.
4524
4525 New shared folders are added to the collection using
4526 <link to="#createSharedFolder"/>. Existing shared folders can be
4527 removed using <link to="#removeSharedFolder"/>.
4528 </desc>
4529 </attribute>
4530
4531 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
4532 <desc>
4533 Interface that provides information on Remote Display (VRDP) connection.
4534 </desc>
4535 </attribute>
4536
4537 <method name="powerUp">
4538 <desc>
4539 Starts the virtual machine execution using the current machine
4540 state (i.e. its current execution state, current settings and
4541 current hard disks).
4542
4543 If the machine is powered off or aborted, the execution will
4544 start from the beginning (as if the real hardware were just
4545 powered on).
4546
4547 If the machine is in the <link to="MachineState::Saved"/> state,
4548 it will continue its execution the point where the state has
4549 been saved.
4550
4551 <note>
4552 Unless you are trying to write a new VirtualBox front-end that
4553 performs direct machine execution (like the VirtualBox or VBoxSDL
4554 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
4555 session opened by <link to="IVirtualBox::openSession"/> and use this
4556 session only to change virtual machine settings. If you simply want to
4557 start virtual machine execution using one of the existing front-ends
4558 (for example the VirtualBox GUI or headless server), simply use
4559 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
4560 power up the machine automatically for you.
4561 </note>
4562
4563 <see>#saveState</see>
4564 </desc>
4565 <param name="progress" type="IProgress" dir="return">
4566 <desc>Progress object to track the operation completion.</desc>
4567 </param>
4568 </method>
4569
4570 <method name="powerUpPaused">
4571 <desc>
4572 Identical to powerUp except that the VM will enter the
4573 <link to="MachineState::Paused"/> state, instead of
4574 <link to="MachineState::Running"/>.
4575
4576 <see>#powerUp</see>
4577 </desc>
4578 <param name="progress" type="IProgress" dir="return">
4579 <desc>Progress object to track the operation completion.</desc>
4580 </param>
4581 </method>
4582
4583 <method name="powerDown">
4584 <desc>
4585 Stops the virtual machine execution.
4586 After this operation completes, the machine will go to the
4587 PoweredOff state.
4588
4589 @deprecated This method will be removed in VirtualBox 2.1 where the
4590 powerDownAsync() method will take its name. Do not use this method in
4591 the code.
4592 </desc>
4593 </method>
4594
4595 <method name="powerDownAsync">
4596 <desc>
4597 Initiates the power down procedure to stop the virtual machine
4598 execution.
4599
4600 The completion of the power down procedure is tracked using the returned
4601 IProgress object. After the operation is complete, the machine will go
4602 to the PoweredOff state.
4603
4604 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
4605 where the original powerDown() method will be removed. You will need to
4606 rename "powerDownAsync" to "powerDown" in your sources to make them
4607 build with version 2.1.
4608 </desc>
4609 <param name="progress" type="IProgress" dir="return">
4610 <desc>Progress object to track the operation completion.</desc>
4611 </param>
4612 </method>
4613
4614 <method name="reset">
4615 <desc>Resets the virtual machine.</desc>
4616 </method>
4617
4618 <method name="pause">
4619 <desc>Pauses the virtual machine execution.</desc>
4620 </method>
4621
4622 <method name="resume">
4623 <desc>Resumes the virtual machine execution.</desc>
4624 </method>
4625
4626 <method name="powerButton">
4627 <desc>Send the ACPI power button event to the guest.</desc>
4628 </method>
4629
4630 <method name="sleepButton">
4631 <desc>Send the ACPI sleep button event to the guest.</desc>
4632 </method>
4633
4634 <method name="getPowerButtonHandled">
4635 <desc>Check if the last power button event was handled by guest.</desc>
4636 <param name="handled" type="boolean" dir="return"/>
4637 </method>
4638
4639 <method name="getGuestEnteredACPIMode">
4640 <desc>Check if the guest entered the ACPI mode G0 (working) or
4641 G1 (sleeping). If this method returns false, the guest will
4642 most likely not respond to external ACPI events.</desc>
4643 <param name="entered" type="boolean" dir="return"/>
4644 </method>
4645
4646 <method name="saveState">
4647 <desc>
4648 Saves the current execution state of a running virtual machine
4649 and stops its execution.
4650
4651 After this operation completes, the machine will go to the
4652 Saved state. Next time it is powered up, this state will
4653 be restored and the machine will continue its execution from
4654 the place where it was saved.
4655
4656 This operation differs from taking a snapshot to the effect
4657 that it doesn't create new differencing hard disks. Also, once
4658 the machine is powered up from the state saved using this method,
4659 the saved state is deleted, so it will be impossible to return
4660 to this state later.
4661
4662 <note>
4663 On success, this method implicitly calls
4664 <link to="IMachine::saveSettings()"/> to save all current machine
4665 settings (including runtime changes to the DVD drive, etc.).
4666 Together with the impossibility to change any VM settings when it is
4667 in the Saved state, this guarantees the adequate hardware
4668 configuration of the machine when it is restored from the saved
4669 state file.
4670 </note>
4671
4672 <note>
4673 The machine must be in the Running or Paused state, otherwise
4674 the operation will fail.
4675 </note>
4676
4677 <see><link to="#takeSnapshot"/></see>
4678 </desc>
4679 <param name="progress" type="IProgress" dir="return">
4680 <desc>Progress object to track the operation completion.</desc>
4681 </param>
4682 </method>
4683
4684 <method name="adoptSavedState">
4685 <desc>
4686 Associates the given saved state file to the virtual machine.
4687
4688 On success, the machine will go to the Saved state. Next time it is
4689 powered up, it will be restored from the adopted saved state and
4690 continue execution from the place where the saved state file was
4691 created.
4692
4693 The specified saved state file path may be full or relative to the
4694 folder the VM normally saves the state to (usually,
4695 <link to="IMachine::snapshotFolder"/>).
4696
4697 <note>
4698 It's a caller's responsibility to make sure the given saved state
4699 file is compatible with the settings of this virtual machine that
4700 represent its virtual hardware (memory size, hard disk configuration
4701 etc.). If there is a mismatch, the behavior of the virtual machine
4702 is undefined.
4703 </note>
4704 </desc>
4705 <param name="savedStateFile" type="wstring" dir="in">
4706 <desc>Path to the saved state file to adopt.</desc>
4707 </param>
4708 </method>
4709
4710 <method name="discardSavedState">
4711 <desc>
4712 Discards (deletes) the saved state of the virtual machine
4713 previously created by <link to="#saveState"/>. Next time the
4714 machine is powered up, a clean boot will occur.
4715 <note>
4716 This operation is equivalent to resetting or powering off
4717 the machine without doing a proper shutdown in the guest OS.
4718 </note>
4719 </desc>
4720 </method>
4721
4722 <method name="getDeviceActivity">
4723 <desc>
4724 Gets the current activity type of a given device or device group.
4725 </desc>
4726 <param name="type" type="DeviceType" dir="in"/>
4727 <param name="activity" type="DeviceActivity" dir="return"/>
4728 </method>
4729
4730 <method name="attachUSBDevice">
4731 <desc>
4732 Attaches a host USB device with the given UUID to the
4733 USB controller of the virtual machine.
4734
4735 The device needs to be in one of the following states:
4736 <link to="USBDeviceState::Busy">Busy</link>,
4737 <link to="USBDeviceState::Available">Available</link> or
4738 <link to="USBDeviceState::Held">Held</link>,
4739 otherwise an error is immediately returned.
4740
4741 When the device state is
4742 <link to="USBDeviceState::Busy">Busy</link>, an error may also
4743 be returned if the host computer refuses to release it for some reason.
4744
4745 <see>IUSBController::deviceFilters, USBDeviceState</see>
4746 </desc>
4747 <param name="id" type="uuid" dir="in">
4748 <desc>UUID of the host USB device to attach.</desc>
4749 </param>
4750 </method>
4751
4752 <method name="detachUSBDevice">
4753 <desc>
4754 Detaches an USB device with the given UUID from the USB controller
4755 of the virtual machine.
4756
4757 After this method succeeds, the VirtualBox server re-initiates
4758 all USB filters as if the device were just physically attached
4759 to the host, but filters of this machine are ignored to avoid
4760 a possible automatic re-attachment.
4761
4762 <see>IUSBController::deviceFilters, USBDeviceState</see>
4763 </desc>
4764 <param name="id" type="uuid" dir="in">
4765 <desc>UUID of the USB device to detach.</desc>
4766 </param>
4767 <param name="device" type="IUSBDevice" dir="return">
4768 <desc>Detached USB device.</desc>
4769 </param>
4770 </method>
4771
4772 <method name="createSharedFolder">
4773 <desc>
4774 Creates a transient new shared folder by associating the given logical
4775 name with the given host path, adds it to the collection of shared
4776 folders and starts sharing it. Refer to the description of
4777 <link to="ISharedFolder"/> to read more about logical names.
4778 </desc>
4779 <param name="name" type="wstring" dir="in">
4780 <desc>Unique logical name of the shared folder.</desc>
4781 </param>
4782 <param name="hostPath" type="wstring" dir="in">
4783 <desc>Full path to the shared folder in the host file system.</desc>
4784 </param>
4785 <param name="writable" type="boolean" dir="in">
4786 <desc>Whether the share is writable or readonly</desc>
4787 </param>
4788 </method>
4789
4790 <method name="removeSharedFolder">
4791 <desc>
4792 Removes a transient shared folder with the given name previously
4793 created by <link to="#createSharedFolder"/> from the collection of
4794 shared folders and stops sharing it.
4795 </desc>
4796 <param name="name" type="wstring" dir="in">
4797 <desc>Logical name of the shared folder to remove.</desc>
4798 </param>
4799 </method>
4800
4801 <method name="takeSnapshot">
4802 <desc>
4803 Saves the current execution state and all settings of the
4804 machine and creates differencing images for all
4805 normal (non-independent) hard disks.
4806
4807 This method can be called for a PoweredOff, Saved, Running or
4808 Paused virtual machine. When the machine is PoweredOff, an
4809 offline <link to="ISnapshot">snapshot</link> is created,
4810 in all other cases -- an online snapshot.
4811
4812 The taken snapshot is always based on the
4813 <link to="IMachine::currentSnapshot">current
4814 snapshot</link> of the associated virtual machine and becomes
4815 a new current snapshot.
4816
4817 <note>
4818 This method implicitly calls <link to="IMachine::saveSettings()"/> to
4819 save all current machine settings before taking an offline snapshot.
4820 </note>
4821
4822 <see>ISnapshot, <link to="#saveState"/></see>
4823 </desc>
4824 <param name="name" type="wstring" dir="in">
4825 <desc>Short name for the snapshot.</desc>
4826 </param>
4827 <param name="description" type="wstring" dir="in">
4828 <desc>Optional description of the snapshot.</desc>
4829 </param>
4830 <param name="progress" type="IProgress" dir="return">
4831 <desc>Progress object to track the operation completion.</desc>
4832 </param>
4833 </method>
4834
4835 <method name="discardSnapshot">
4836 <desc>
4837
4838 Starts discarding the specified snapshot. The execution state
4839 and settings of the associated machine stored in the snapshot
4840 will be deleted. The contents of all differencing hard disks of
4841 this snapshot will be merged with the contents of their
4842 dependent child hard disks to keep the, disks valid (in other
4843 words, all changes represented by hard disks being discarded
4844 will be propagated to their child hard disks). After that, this
4845 snapshot's differencing hard disks will be deleted. The parent
4846 of this snapshot will become a new parent for all its child
4847 snapshots.
4848
4849 If the discarded snapshot is the current one, its parent
4850 snapshot will become a new current snapshot. The current machine
4851 state is not directly affected in this case, except that
4852 currently attached differencing hard disks based on hard disks
4853 of the discarded snapshot will be also merged as described
4854 above.
4855
4856 If the discarded snapshot is the first one (the root snapshot)
4857 and it has exactly one child snapshot, this child snapshot will
4858 become the first snapshot after discarding. If there are no
4859 children at all (i.e. the first snapshot is the only snapshot of
4860 the machine), both the current and the first snapshot of the
4861 machine will be set to null. In all other cases, the first
4862 snapshot cannot be discarded.
4863
4864 You cannot discard the snapshot if it
4865 stores <link to="HardDiskType::Normal">normal</link> (non-differencing)
4866 hard disks that have differencing hard disks based on them. Snapshots of
4867 such kind can be discarded only when every normal hard disk has either
4868 no children at all or exactly one child. In the former case, the normal
4869 hard disk simply becomes unused (i.e. not attached to any VM). In the
4870 latter case, it receives all the changes stored in the child hard disk,
4871 and then it replaces the child hard disk in the configuration of the
4872 corresponding snapshot or machine.
4873
4874 Also, you cannot discard the snapshot if it stores hard disks
4875 (of any type) having differencing child hard disks that belong
4876 to other machines. Such snapshots can be only discarded after
4877 you discard all snapshots of other machines containing "foreign"
4878 child disks, or detach these "foreign" child disks from machines
4879 they are attached to.
4880
4881 One particular example of the snapshot storing normal hard disks
4882 is the first snapshot of a virtual machine that had normal hard
4883 disks attached when taking the snapshot. Be careful when
4884 discarding such snapshots because this implicitly commits
4885 changes (made since the snapshot being discarded has been taken)
4886 to normal hard disks (as described above), which may be not what
4887 you want.
4888
4889 The virtual machine is put to
4890 the <link to="MachineState::Discarding">Discarding</link> state until
4891 the discard operation is completed.
4892
4893 <note>
4894 The machine must not be running, otherwise the operation
4895 will fail.
4896 </note>
4897
4898 <note>
4899 Child hard disks of all normal hard disks of the discarded snapshot
4900 must be accessible (see <link to="IMedium::state"/>) for this
4901 operation to succeed. In particular, this means that all virtual
4902 machines, whose hard disks are directly or indirectly based on the
4903 hard disks of discarded snapshot, must be powered off.
4904 </note>
4905 <note>
4906 Merging hard disk contents can be very time and disk space
4907 consuming, if these disks are big in size and have many
4908 children. However, if the snapshot being discarded is the last
4909 (head) snapshot on the branch, the operation will be rather
4910 quick.
4911 </note>
4912 <note>
4913 Note that discarding the current snapshot
4914 will implicitly call <link to="IMachine::saveSettings()"/> to
4915 make all current machine settings permanent.
4916 </note>
4917 </desc>
4918 <param name="id" type="uuid" dir="in">
4919 <desc>UUID of the snapshot to discard.</desc>
4920 </param>
4921 <param name="progress" type="IProgress" dir="return">
4922 <desc>Progress object to track the operation completion.</desc>
4923 </param>
4924 </method>
4925
4926 <method name="discardCurrentState">
4927 <desc>
4928 This operation is similar to <link to="#discardSnapshot()"/> but
4929 affects the current machine state. This means that the state stored in
4930 the current snapshot will become a new current state, and all current
4931 settings of the machine and changes stored in differencing hard disks
4932 will be lost.
4933
4934 After this operation is successfully completed, new empty differencing
4935 hard disks are created for all normal hard disks of the machine.
4936
4937 If the current snapshot of the machine is an online snapshot, the
4938 machine will go to the <link to="MachineState::Saved"> saved
4939 state</link>, so that the next time it is powered on, the execution
4940 state will be restored from the current snapshot.
4941
4942 <note>
4943 The machine must not be running, otherwise the operation will fail.
4944 </note>
4945
4946 <note>
4947 If the machine state is <link to="MachineState::Saved">Saved</link>
4948 prior to this operation, the saved state file will be implicitly
4949 discarded (as if <link to="IConsole::discardSavedState()"/> were
4950 called).
4951 </note>
4952
4953 </desc>
4954 <param name="progress" type="IProgress" dir="return">
4955 <desc>Progress object to track the operation completion.</desc>
4956 </param>
4957 </method>
4958
4959 <method name="discardCurrentSnapshotAndState">
4960 <desc>
4961
4962 This method is equivalent to
4963 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
4964 (currentSnapshot.id(), progress) followed by
4965 <link to="#discardCurrentState()"/>.
4966
4967 As a result, the machine will be fully restored from the
4968 snapshot preceding the current snapshot, while both the current
4969 snapshot and the current machine state will be discarded.
4970
4971 If the current snapshot is the first snapshot of the machine (i.e. it
4972 has the only snapshot), the current machine state will be
4973 discarded <b>before</b> discarding the snapshot. In other words, the
4974 machine will be restored from its last snapshot, before discarding
4975 it. This differs from performing a single
4976 <link to="#discardSnapshot()"/> call (note that no
4977 <link to="#discardCurrentState()"/> will be possible after it)
4978 to the effect that the latter will preserve the current state instead of
4979 discarding it.
4980
4981 Unless explicitly mentioned otherwise, all remarks and
4982 limitations of the above two methods also apply to this method.
4983
4984 <note>
4985 The machine must not be running, otherwise the operation
4986 will fail.
4987 </note>
4988
4989 <note>
4990 If the machine state is <link to="MachineState::Saved">Saved</link>
4991 prior to this operation, the saved state file will be implicitly
4992 discarded (as if <link to="#discardSavedState()"/> were
4993 called).
4994 </note>
4995
4996 <note>
4997 This method is more efficient than calling two above
4998 methods separately: it requires less IPC calls and provides
4999 a single progress object.
5000 </note>
5001
5002 </desc>
5003 <param name="progress" type="IProgress" dir="return">
5004 <desc>Progress object to track the operation completion.</desc>
5005 </param>
5006 </method>
5007
5008 <method name="registerCallback">
5009 <desc>
5010 Registers a new console callback on this instance. The methods of the
5011 callback interface will be called by this instance when the appropriate
5012 event occurs.
5013 </desc>
5014 <param name="callback" type="IConsoleCallback" dir="in"/>
5015 </method>
5016
5017 <method name="unregisterCallback">
5018 <desc>
5019 Unregisters the console callback previously registered using
5020 <link to="#registerCallback"/>.
5021 </desc>
5022 <param name="callback" type="IConsoleCallback" dir="in"/>
5023 </method>
5024 </interface>
5025
5026 <!--
5027 // IHost
5028 /////////////////////////////////////////////////////////////////////////
5029 -->
5030
5031 <interface
5032 name="IHostDVDDrive" extends="$unknown"
5033 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
5034 wsmap="managed"
5035 >
5036 <desc>
5037 The IHostDVDDrive interface represents the physical CD/DVD drive
5038 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
5039 </desc>
5040
5041 <attribute name="name" type="wstring" readonly="yes">
5042 <desc>
5043 Returns the platform-specific device identifier.
5044 On DOS-like platforms, it is a drive name (e.g. R:).
5045 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
5046 </desc>
5047 </attribute>
5048 <attribute name="description" type="wstring" readonly="yes">
5049 <desc>
5050 Returns a human readable description for the drive. This
5051 description usually contains the product and vendor name. A
5052 @c null string is returned if the description is not available.
5053 </desc>
5054 </attribute>
5055 <attribute name="udi" type="wstring" readonly="yes">
5056 <desc>
5057 Returns the unique device identifier for the drive. This
5058 attribute is reserved for future use instead of
5059 <link to="#name"/>. Currently it is not used and may return
5060 @c null on some platforms.
5061 </desc>
5062 </attribute>
5063
5064 </interface>
5065
5066 <enumerator
5067 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
5068 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
5069 />
5070
5071 <collection
5072 name="IHostDVDDriveCollection" type="IHostDVDDrive"
5073 enumerator="IHostDVDDriveEnumerator"
5074 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
5075 readonly="yes"
5076 >
5077 <method name="findByName">
5078 <desc>
5079 Searches this collection for a host drive with the given name.
5080 <note>
5081 The method returns an error if the given name does not
5082 correspond to any host drive in the collection.
5083 </note>
5084 </desc>
5085 <param name="name" type="wstring" dir="in">
5086 <desc>Name of the host drive to search for</desc>
5087 </param>
5088 <param name="drive" type="IHostDVDDrive" dir="return">
5089 <desc>Found host drive object</desc>
5090 </param>
5091 </method>
5092 </collection>
5093
5094 <interface
5095 name="IHostFloppyDrive" extends="$unknown"
5096 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
5097 wsmap="managed"
5098 >
5099 <desc>
5100 The IHostFloppyDrive interface represents the physical floppy drive
5101 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
5102 </desc>
5103 <attribute name="name" type="wstring" readonly="yes">
5104 <desc>
5105 Returns the platform-specific device identifier.
5106 On DOS-like platforms, it is a drive name (e.g. A:).
5107 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
5108 </desc>
5109 </attribute>
5110 <attribute name="description" type="wstring" readonly="yes">
5111 <desc>
5112 Returns a human readable description for the drive. This
5113 description usually contains the product and vendor name. A
5114 @c null string is returned if the description is not available.
5115 </desc>
5116 </attribute>
5117 <attribute name="udi" type="wstring" readonly="yes">
5118 <desc>
5119 Returns the unique device identifier for the drive. This
5120 attribute is reserved for future use instead of
5121 <link to="#name"/>. Currently it is not used and may return
5122 @c null on some platforms.
5123 </desc>
5124 </attribute>
5125 </interface>
5126
5127 <enumerator
5128 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
5129 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
5130 />
5131
5132 <collection
5133 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
5134 enumerator="IHostFloppyDriveEnumerator"
5135 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
5136 readonly="yes"
5137 >
5138 <method name="findByName">
5139 <desc>
5140 Searches this collection for a host drive with the given name.
5141 <note>
5142 The method returns an error if the given name does not
5143 correspond to any host drive in the collection.
5144 </note>
5145 </desc>
5146 <param name="name" type="wstring" dir="in">
5147 <desc>Name of the host drive to search for</desc>
5148 </param>
5149 <param name="drive" type="IHostFloppyDrive" dir="return">
5150 <desc>Found host drive object</desc>
5151 </param>
5152 </method>
5153 </collection>
5154
5155 <interface
5156 name="IHostNetworkInterface" extends="$unknown"
5157 uuid="F4512D7C-B074-4e97-99B8-6D2BD27C3F5A"
5158 wsmap="managed"
5159 >
5160 <attribute name="name" type="wstring" readonly="yes">
5161 <desc>Returns the host network interface name.</desc>
5162 </attribute>
5163
5164 <attribute name="id" type="uuid" readonly="yes">
5165 <desc>Returns the interface UUID.</desc>
5166 </attribute>
5167 </interface>
5168
5169 <enumerator
5170 name="IHostNetworkInterfaceEnumerator" type="IHostNetworkInterface"
5171 uuid="7B52FEF7-56E8-4aec-92F5-15E6D11EC630"
5172 />
5173
5174 <collection
5175 name="IHostNetworkInterfaceCollection" type="IHostNetworkInterface"
5176 enumerator="IHostNetworkInterfaceEnumerator"
5177 uuid="BF1D41F2-B97B-4314-A0FB-D4823AF42FB5"
5178 readonly="yes"
5179 >
5180 <method name="findByName">
5181 <desc>
5182 Searches this collection for a host network interface with the given name.
5183 <note>
5184 The method returns an error if the given name does not
5185 correspond to any host network interface in the collection.
5186 </note>
5187 </desc>
5188 <param name="name" type="wstring" dir="in">
5189 <desc>Name of the host network interface to search for.</desc>
5190 </param>
5191 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5192 <desc>Found host network interface object.</desc>
5193 </param>
5194 </method>
5195 <method name="findById">
5196 <desc>
5197 Searches this collection for a host network interface with the given GUID.
5198 <note>
5199 The method returns an error if the given GUID does not
5200 correspond to any host network interface in the collection.
5201 </note>
5202 </desc>
5203 <param name="id" type="uuid" dir="in">
5204 <desc>GUID of the host network interface to search for.</desc>
5205 </param>
5206 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5207 <desc>Found host network interface object.</desc>
5208 </param>
5209 </method>
5210 </collection>
5211
5212 <interface
5213 name="IHost" extends="$unknown"
5214 uuid="4be2e85f-a54c-4bc7-8bf6-f070f9113940"
5215 wsmap="managed"
5216 >
5217 <desc>
5218 The IHost interface represents the physical machine that this VirtualBox
5219 installation runs on.
5220
5221 An object implementing this interface is returned by the
5222 <link to="IVirtualBox::host" /> attribute. This interface contains
5223 read-only information about the host's physical hardware (such as what
5224 processors, and disks are available, what the host operating system is,
5225 and so on) and also allows for manipulating some of the host's hardware,
5226 such as global USB device filters and host interface networking.
5227
5228 </desc>
5229 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
5230 <desc>List of DVD drives available on the host.</desc>
5231 </attribute>
5232
5233 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
5234 <desc>List of floppy drives available on the host.</desc>
5235 </attribute>
5236
5237 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5238 <desc>
5239 List of USB devices currently attached to the host.
5240 Once a new device is physically attached to the host computer,
5241 it appears in this list and remains there until detached.
5242
5243 <note>
5244 This method may set a @ref com_warnings "warning result code".
5245 </note>
5246 <note>
5247 If USB functionality is not available in the given edition of
5248 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5249 </note>
5250 </desc>
5251 </attribute>
5252
5253 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
5254 <desc>
5255 List of USB device filters in action.
5256 When a new device is physically attached to the host computer,
5257 filters from this list are applied to it (in order they are stored
5258 in the list). The first matched filter will determine the
5259 <link to="IHostUSBDeviceFilter::action">action</link>
5260 performed on the device.
5261
5262 Unless the device is ignored by these filters, filters of all
5263 currently running virtual machines
5264 (<link to="IUSBController::deviceFilters"/>) are applied to it.
5265
5266 <note>
5267 This method may set a @ref com_warnings "warning result code".
5268 </note>
5269 <note>
5270 If USB functionality is not available in the given edition of
5271 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5272 </note>
5273
5274 <see>IHostUSBDeviceFilter, USBDeviceState</see>
5275 </desc>
5276 </attribute>
5277
5278 <attribute name="networkInterfaces" type="IHostNetworkInterfaceCollection" readonly="yes">
5279 <desc>List of host network interfaces currently defined on the host.</desc>
5280 </attribute>
5281
5282 <attribute name="processorCount" type="unsigned long" readonly="yes">
5283 <desc>Number of (logical) CPUs installed in the host system.</desc>
5284 </attribute>
5285
5286 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
5287 <desc>Number of (logical) CPUs online in the host system.</desc>
5288 </attribute>
5289
5290 <method name="getProcessorSpeed">
5291 <desc>Query the (approximate) maximum speed of a specified host CPU in Megahertz.</desc>
5292 <param name="cpuId" type="unsigned long" dir="in">
5293 <desc>
5294 Identifier of the CPU.
5295 </desc>
5296 </param>
5297 <param name="speed" type="unsigned long" dir="return">
5298 <desc>
5299 Speed value. 0 is returned if value is not known or @a cpuId is
5300 invalid.
5301 </desc>
5302 </param>
5303 </method>
5304
5305 <method name="getProcessorFeature">
5306 <desc>Query whether a CPU feature is supported or not.</desc>
5307 <param name="feature" type="ProcessorFeature" dir="in">
5308 <desc>
5309 CPU Feature identifier.
5310 </desc>
5311 </param>
5312 <param name="supported" type="boolean" dir="return">
5313 <desc>
5314 Feature is supported or not.
5315 </desc>
5316 </param>
5317 </method>
5318
5319 <method name="getProcessorDescription">
5320 <desc>Query the model string of a specified host CPU.</desc>
5321 <param name="cpuId" type="unsigned long" dir="in">
5322 <desc>
5323 Identifier of the CPU.
5324 </desc>
5325 </param>
5326 <param name="description" type="wstring" dir="return">
5327 <desc>
5328 Model string. A NULL string is returned if value is not known or
5329 @a cpuId is invalid.
5330 </desc>
5331 </param>
5332 </method>
5333
5334 <attribute name="memorySize" type="unsigned long" readonly="yes">
5335 <desc>Amount of system memory in megabytes installed in the host system.</desc>
5336 </attribute>
5337
5338 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
5339 <desc>Available system memory in the host system.</desc>
5340 </attribute>
5341
5342 <attribute name="operatingSystem" type="wstring" readonly="yes">
5343 <desc>Name of the host system's operating system.</desc>
5344 </attribute>
5345
5346 <attribute name="OSVersion" type="wstring" readonly="yes">
5347 <desc>Host operating system's version string.</desc>
5348 </attribute>
5349
5350 <attribute name="UTCTime" type="long long" readonly="yes">
5351 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
5352 </attribute>
5353
5354<if target="midl">
5355 <method name="createHostNetworkInterface">
5356 <desc>
5357 Creates a new adapter for Host Interface Networking.
5358 </desc>
5359 <param name="name" type="wstring" dir="in">
5360 <desc>
5361 Adapter name.
5362 </desc>
5363 </param>
5364 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5365 <desc>
5366 Created host interface object.
5367 </desc>
5368 </param>
5369 <param name="progress" type="IProgress" dir="return">
5370 <desc>
5371 Progress object to track the operation completion.
5372 </desc>
5373 </param>
5374 </method>
5375 <method name="removeHostNetworkInterface">
5376 <desc>
5377 Removes the given host network interface.
5378 </desc>
5379 <param name="id" type="uuid" dir="in">
5380 <desc>
5381 Adapter GUID.
5382 </desc>
5383 </param>
5384 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5385 <desc>
5386 Removed host interface object.
5387 </desc>
5388 </param>
5389 <param name="progress" type="IProgress" dir="return">
5390 <desc>
5391 Progress object to track the operation completion.
5392 </desc>
5393 </param>
5394 </method>
5395</if>
5396
5397 <method name="createUSBDeviceFilter">
5398 <desc>
5399 Creates a new USB device filter. All attributes except
5400 the filter name are set to <tt>null</tt> (any match),
5401 <i>active</i> is <tt>false</tt> (the filter is not active).
5402
5403 The created filter can be added to the list of filters using
5404 <link to="#insertUSBDeviceFilter()"/>.
5405
5406 <see>#USBDeviceFilters</see>
5407 </desc>
5408 <param name="name" type="wstring" dir="in">
5409 <desc>
5410 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
5411 for more info.
5412 </desc>
5413 </param>
5414 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5415 <desc>Created filter object.</desc>
5416 </param>
5417 </method>
5418
5419 <method name="insertUSBDeviceFilter">
5420 <desc>
5421 Inserts the given USB device to the specified position
5422 in the list of filters.
5423
5424 Positions are numbered starting from <tt>0</tt>. If the specified
5425 position is equal to or greater than the number of elements in
5426 the list, the filter is added to the end of the collection.
5427
5428 <note>
5429 Duplicates are not allowed, so an attempt to insert a
5430 filter that is already in the list, will return an
5431 error.
5432 </note>
5433 <note>
5434 This method may set a @ref com_warnings "warning result code".
5435 </note>
5436 <note>
5437 If USB functionality is not available in the given edition of
5438 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5439 </note>
5440
5441 <see>#USBDeviceFilters</see>
5442 </desc>
5443 <param name="position" type="unsigned long" dir="in">
5444 <desc>Position to insert the filter to.</desc>
5445 </param>
5446 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
5447 <desc>USB device filter to insert.</desc>
5448 </param>
5449 </method>
5450
5451 <method name="removeUSBDeviceFilter">
5452 <desc>
5453 Removes a USB device filter from the specified position in the
5454 list of filters.
5455
5456 Positions are numbered starting from <tt>0</tt>. Specifying a
5457 position equal to or greater than the number of elements in
5458 the list will produce an error.
5459
5460 <note>
5461 This method may set a @ref com_warnings "warning result code".
5462 </note>
5463 <note>
5464 If USB functionality is not available in the given edition of
5465 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5466 </note>
5467
5468 <see>#USBDeviceFilters</see>
5469 </desc>
5470 <param name="position" type="unsigned long" dir="in">
5471 <desc>Position to remove the filter from.</desc>
5472 </param>
5473 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5474 <desc>Removed USB device filter.</desc>
5475 </param>
5476 </method>
5477
5478 </interface>
5479
5480 <!--
5481 // ISystemProperties
5482 /////////////////////////////////////////////////////////////////////////
5483 -->
5484
5485 <interface
5486 name="ISystemProperties"
5487 extends="$unknown"
5488 uuid="604afeba-5963-4d12-a577-902ffb96352a"
5489 wsmap="managed"
5490 >
5491 <desc>
5492 The ISystemProperties interface represents global properties of the given
5493 VirtualBox installation.
5494
5495 These properties define limits and default values for various attributes
5496 and parameters. Most of the properties are read-only, but some can be
5497 changed by a user.
5498 </desc>
5499
5500 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
5501 <desc>Minimum guest system memory in Megabytes.</desc>
5502 </attribute>
5503
5504 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
5505 <desc>Maximum guest system memory in Megabytes.</desc>
5506 </attribute>
5507
5508 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
5509 <desc>Minimum guest video memory in Megabytes.</desc>
5510 </attribute>
5511
5512 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
5513 <desc>Maximum guest video memory in Megabytes.</desc>
5514 </attribute>
5515
5516 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
5517 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
5518 </attribute>
5519
5520 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
5521 <desc>
5522 Number of network adapters associated with every
5523 <link to="IMachine"/> instance.
5524 </desc>
5525 </attribute>
5526
5527 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
5528 <desc>
5529 Number of serial ports associated with every
5530 <link to="IMachine"/> instance.
5531 </desc>
5532 </attribute>
5533
5534 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
5535 <desc>
5536 Number of parallel ports associated with every
5537 <link to="IMachine"/> instance.
5538 </desc>
5539 </attribute>
5540
5541 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
5542 <desc>
5543 Maximum device position in the boot order. This value corresponds
5544 to the total number of devices a machine can boot from, to make it
5545 possible to include all possible devices to the boot list.
5546 <see><link to="IMachine::setBootOrder()"/></see>
5547 </desc>
5548 </attribute>
5549
5550 <attribute name="defaultMachineFolder" type="wstring">
5551 <desc>
5552 Full path to the default directory used to create new or open
5553 existing machines when a settings file name contains no
5554 path.
5555
5556 The initial value of this property is
5557 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
5558 VirtualBox_home</link><tt>&gt;/Machines</tt>.
5559
5560 <note>
5561 Setting this property to <tt>null</tt> will restore the
5562 initial value.
5563 </note>
5564 <note>
5565 When settings this property, the specified path can be
5566 absolute (full path) or relative
5567 to the <link to="IVirtualBox::homeFolder">
5568 VirtualBox home directory</link>.
5569 When reading this property, a full path is
5570 always returned.
5571 </note>
5572 <note>
5573 The specified path may not exist, it will be created
5574 when necessary.
5575 </note>
5576
5577 <see>
5578 <link to="IVirtualBox::createMachine()"/>,
5579 <link to="IVirtualBox::openMachine()"/>
5580 </see>
5581 </desc>
5582 </attribute>
5583
5584 <attribute name="defaultHardDiskFolder" type="wstring">
5585 <desc>
5586 Full path to the default directory used to create new or open existing
5587 virtual disks.
5588
5589 This path is used when the storage unit of a hard disk is a regular file
5590 in the host's file system and only a file name that contains no path is
5591 given.
5592
5593 The initial value of this property is
5594 <tt>&lt;</tt>
5595 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
5596 <tt>&gt;/HardDisks</tt>.
5597
5598 <note>
5599 Setting this property to <tt>null</tt> will restore the
5600 initial value.
5601 </note>
5602 <note>
5603 When settings this property, the specified path can be relative
5604 to the
5605 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
5606 absolute. When reading this property, a full path is
5607 always returned.
5608 </note>
5609 <note>
5610 The specified path may not exist, it will be created
5611 when necessary.
5612 </note>
5613
5614 <see>
5615 IHardDisk2,
5616 <link to="IVirtualBox::createHardDisk2()"/>,
5617 <link to="IVirtualBox::openHardDisk2()"/>,
5618 <link to="IMedium::location"/>
5619 </see>
5620 </desc>
5621 </attribute>
5622
5623 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
5624 <desc>
5625 List of all hard disk storage formats supported by this VirtualBox
5626 installation.
5627
5628 Note that the virtual hard disk framework is backend-based, therefore
5629 the list of supported formats depends on what backends are currently
5630 installed.
5631
5632 <see>
5633 <link to="IHardDiskFormat"/>,
5634 </see>
5635 </desc>
5636 </attribute>
5637
5638 <attribute name="defaultHardDiskFormat" type="wstring">
5639 <desc>
5640 Identifier of the default hard disk format used by VirtualBox.
5641
5642 The hard disk format set by this attribute is used by VirtualBox
5643 when the hard disk format was not specified explicitly. One example is
5644 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
5645 format argument. A more complex example is implicit creation of
5646 differencing hard disks when taking a snapshot of a virtual machine:
5647 this operation will try to use a format of the parent hard disk first
5648 and if this format does not support differencing hard disks the default
5649 format specified by this argument will be used.
5650
5651 The list of supported hard disk formats may be obtained by the
5652 <link to="#defaultHardDiskFormats"/> call. Note that the default
5653 hard disk format must have a capability to create differencing hard
5654 disks; otherwise opeartions that create hard disks implicitly may fail
5655 unexpectedly.
5656
5657 The initial value of this property is <tt>VDI</tt> in the current
5658 version of the VirtualBox product, but may change in the future.
5659
5660 <note>
5661 Setting this property to <tt>null</tt> will restore the
5662 initial value.
5663 </note>
5664
5665 <see>
5666 <link to="#hardDiskFormats"/>,
5667 <link to="IHardDiskFormat:id"/>,
5668 <link to="IVirtualBox::createHardDisk2()"/>
5669 </see>
5670 </desc>
5671 </attribute>
5672
5673 <attribute name="remoteDisplayAuthLibrary" type="wstring">
5674 <desc>
5675 Library that provides authentication for VRDP clients. The library
5676 is used if a virtual machine's authentication type is set to "external"
5677 in the VM RemoteDisplay configuration.
5678
5679 The system library extension (".DLL" or ".so") must be omitted.
5680 A full path can be specified; if not, then the library must reside on the
5681 system's default library path.
5682
5683 The default value of this property is <tt>VRDPAuth</tt>. There is a library
5684 of that name in one of the default VirtualBox library directories.
5685
5686 For details about VirtualBox authentication libraries and how to implement
5687 them, please refer to the VirtualBox manual.
5688
5689 <note>
5690 Setting this property to <tt>null</tt> will restore the
5691 initial value.
5692 </note>
5693 </desc>
5694 </attribute>
5695
5696 <attribute name="webServiceAuthLibrary" type="wstring">
5697 <desc>
5698 Library that provides authentication for webservice clients. The library
5699 is used if a virtual machine's authentication type is set to "external"
5700 in the VM RemoteDisplay configuration and will be called from
5701 within the <link to="IWebsessionManager::logon" /> implementation.
5702
5703 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
5704 there is no per-VM setting for this, as the webservice is a global
5705 resource (if it is running). Only for this setting (for the webservice),
5706 setting this value to a literal "null" string disables authentication,
5707 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
5708 no matter what user name and password are supplied.
5709
5710 The initial value of this property is <tt>VRDPAuth</tt>,
5711 meaning that the webservice will use the same authentication
5712 library that is used by default for VBoxVRDP (again, see
5713 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
5714 The format and calling convention of authentication libraries
5715 is the same for the webservice as it is for VBoxVRDP.
5716
5717 </desc>
5718 </attribute>
5719
5720 <attribute name="HWVirtExEnabled" type="boolean">
5721 <desc>
5722 This specifies the default value for hardware virtualization
5723 extensions. If enabled, virtual machines will make use of
5724 hardware virtualization extensions such as Intel VT-x and
5725 AMD-V by default. This value can be overridden by each VM
5726 using their <link to="IMachine::HWVirtExEnabled" /> property.
5727 </desc>
5728 </attribute>
5729
5730 <attribute name="LogHistoryCount" type="unsigned long">
5731 <desc>
5732 This value specifies how many old release log files are kept.
5733 </desc>
5734 </attribute>
5735 </interface>
5736
5737 <!--
5738 // IGuest
5739 /////////////////////////////////////////////////////////////////////////
5740 -->
5741
5742 <interface
5743 name="IGuestOSType" extends="$unknown"
5744 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
5745 wsmap="struct"
5746 >
5747 <desc>
5748 </desc>
5749
5750 <attribute name="familyId" type="wstring" readonly="yes">
5751 <desc>Guest OS family identifier string.</desc>
5752 </attribute>
5753
5754 <attribute name="familyDescription" type="wstring" readonly="yes">
5755 <desc>Human readable description of the guest OS family.</desc>
5756 </attribute>
5757
5758 <attribute name="id" type="wstring" readonly="yes">
5759 <desc>Guest OS identifier string.</desc>
5760 </attribute>
5761
5762 <attribute name="description" type="wstring" readonly="yes">
5763 <desc>Human readable description of the guest OS.</desc>
5764 </attribute>
5765
5766 <attribute name="is64Bit" type="boolean" readonly="yes">
5767 <desc>Returns @c true if the given OS is 64-bit</desc>
5768 </attribute>
5769
5770 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
5771 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
5772 </attribute>
5773
5774 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
5775 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
5776 </attribute>
5777
5778 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
5779 <desc>Recommended RAM size in Megabytes.</desc>
5780 </attribute>
5781
5782 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
5783 <desc>Recommended video RAM size in Megabytes.</desc>
5784 </attribute>
5785
5786 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
5787 <desc>Recommended hard disk size in Megabytes.</desc>
5788 </attribute>
5789
5790 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
5791 <desc>Returns recommended network adapter for this OS type.</desc>
5792 </attribute>
5793 </interface>
5794
5795
5796 <enumerator
5797 name="IGuestOSTypeEnumerator" type="IGuestOSType"
5798 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
5799 />
5800
5801 <collection
5802 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
5803 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
5804 readonly="yes"
5805 />
5806
5807 <interface
5808 name="IGuest" extends="$unknown"
5809 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
5810
5811 wsmap="suppress"
5812 >
5813 <desc>
5814 The IGuest interface represents information about the operating system
5815 running inside the virtual machine. Used in
5816 <link to="IConsole::guest"/>.
5817
5818 IGuest provides information about the guest operating system, whether
5819 Guest Additions are installed and other OS-specific virtual machine
5820 properties.
5821 </desc>
5822
5823 <attribute name="OSTypeId" type="wstring" readonly="yes">
5824 <desc>
5825 Identifier of the Guest OS type as reported by the Guest
5826 Additions.
5827 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
5828 an IGuestOSType object representing details about the given
5829 Guest OS type.
5830 <note>
5831 If Guest Additions are not installed, this value will be
5832 the same as <link to="IMachine::OSTypeId"/>.
5833 </note>
5834 </desc>
5835 </attribute>
5836
5837 <attribute name="additionsActive" type="boolean" readonly="yes">
5838 <desc>
5839 Flag whether the Guest Additions are installed and active
5840 in which case their version will be returned by the
5841 <link to="#additionsVersion"/> property.
5842 </desc>
5843 </attribute>
5844
5845 <attribute name="additionsVersion" type="wstring" readonly="yes">
5846 <desc>
5847 Version of the Guest Additions (3 decimal numbers separated
5848 by dots) or empty when the Additions are not installed. The
5849 Additions may also report a version but yet not be active as
5850 the version might be refused by VirtualBox (incompatible) or
5851 other failures occurred.
5852 </desc>
5853 </attribute>
5854
5855 <attribute name="supportsSeamless" type="boolean" readonly="yes">
5856 <desc>
5857 Flag whether seamless guest display rendering (seamless desktop
5858 integration) is supported.
5859 </desc>
5860 </attribute>
5861
5862 <attribute name="supportsGraphics" type="boolean" readonly="yes">
5863 <desc>
5864 Flag whether the guest is in graphics mode. If it is not, then
5865 seamless rendering will not work, resize hints are not immediately
5866 acted on and guest display resizes are probably not initiated by
5867 the guest additions.
5868 </desc>
5869 </attribute>
5870
5871 <attribute name="memoryBalloonSize" type="unsigned long">
5872 <desc>Guest system memory balloon size in megabytes.</desc>
5873 </attribute>
5874
5875 <attribute name="statisticsUpdateInterval" type="unsigned long">
5876 <desc>Interval to update guest statistics in seconds.</desc>
5877 </attribute>
5878
5879 <method name="setCredentials">
5880 <desc>
5881 Store login credentials that can be queried by guest operating
5882 systems with Additions installed. The credentials are transient
5883 to the session and the guest may also choose to erase them. Note
5884 that the caller cannot determine whether the guest operating system
5885 has queried or made use of the credentials.
5886 </desc>
5887 <param name="userName" type="wstring" dir="in">
5888 <desc>User name string, can be empty</desc>
5889 </param>
5890 <param name="password" type="wstring" dir="in">
5891 <desc>Password string, can be empty</desc>
5892 </param>
5893 <param name="domain" type="wstring" dir="in">
5894 <desc>Domain name (guest logon scheme specific), can be empty</desc>
5895 </param>
5896 <param name="allowInteractiveLogon" type="boolean" dir="in">
5897 <desc>
5898 Flag whether the guest should alternatively allow the user to
5899 interactively specify different credentials. This flag might
5900 not be supported by all versions of the Additions.
5901 </desc>
5902 </param>
5903 </method>
5904
5905 <method name="getStatistic">
5906 <desc>
5907 Query specified guest statistics as reported by the VirtualBox Additions.
5908 </desc>
5909 <param name="cpuId" type="unsigned long" dir="in">
5910 <desc>Virtual CPU id; not relevant for all statistic types</desc>
5911 </param>
5912 <param name="statistic" type="GuestStatisticType" dir="in">
5913 <desc>Statistic type.</desc>
5914 </param>
5915 <param name="statVal" type="unsigned long" dir="out">
5916 <desc>Statistics value</desc>
5917 </param>
5918 </method>
5919
5920 </interface>
5921
5922
5923 <!--
5924 // IProgress
5925 /////////////////////////////////////////////////////////////////////////
5926 -->
5927
5928 <enumerator
5929 name="IProgressEnumerator" type="IProgress"
5930 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
5931 />
5932
5933 <collection
5934 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
5935 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
5936 readonly="yes"
5937 />
5938
5939 <interface
5940 name="IProgress" extends="$unknown"
5941 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
5942 wsmap="managed"
5943 >
5944 <desc>
5945 The IProgress interface represents a task progress object that allows
5946 to wait for the completion of some asynchronous task.
5947
5948 The task consists of one or more operations that run sequentially,
5949 one after one. There is an individual percent of completion of the
5950 current operation and the percent of completion of the task as a
5951 whole. Similarly, you can wait for the completion of a particular
5952 operation or for the completion of the whole task.
5953
5954 Every operation is identified by a number (starting from 0)
5955 and has a separate description.
5956 </desc>
5957
5958 <attribute name="id" type="uuid" readonly="yes">
5959 <desc>ID of the task.</desc>
5960 </attribute>
5961
5962 <attribute name="description" type="wstring" readonly="yes">
5963 <desc>Description of the task.</desc>
5964 </attribute>
5965
5966 <attribute name="initiator" type="$unknown" readonly="yes">
5967 <desc>Initiator of the task.</desc>
5968 </attribute>
5969
5970 <attribute name="cancelable" type="boolean" readonly="yes">
5971 <desc>Whether the task can be interrupted.</desc>
5972 </attribute>
5973
5974 <attribute name="percent" type="long" readonly="yes">
5975 <desc>
5976 Current task progress value in percent.
5977 This value depends on how many operations are already complete.
5978 </desc>
5979 </attribute>
5980
5981 <attribute name="completed" type="boolean" readonly="yes">
5982 <desc>Whether the task has been completed.</desc>
5983 </attribute>
5984
5985 <attribute name="canceled" type="boolean" readonly="yes">
5986 <desc>Whether the task has been canceled.</desc>
5987 </attribute>
5988
5989 <attribute name="resultCode" type="result" readonly="yes">
5990 <desc>
5991 Result code of the progress task.
5992 Valid only if <link to="#completed"/> is true.
5993 </desc>
5994 </attribute>
5995
5996 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
5997 <desc>
5998 Extended information about the unsuccessful result of the
5999 progress operation. May be NULL when no extended information
6000 is available.
6001 Valid only if <link to="#completed"/> is true and
6002 <link to="#resultCode"/> indicates a failure.
6003 </desc>
6004 </attribute>
6005
6006 <attribute name="operationCount" type="unsigned long" readonly="yes">
6007 <desc>
6008 Number of operations this task is divided into.
6009 Every task consists of at least one operation.
6010 </desc>
6011 </attribute>
6012
6013 <attribute name="operation" type="unsigned long" readonly="yes">
6014 <desc>Number of the operation being currently executed.</desc>
6015 </attribute>
6016
6017 <attribute name="operationDescription" type="wstring" readonly="yes">
6018 <desc>
6019 Description of the operation being currently executed.
6020 </desc>
6021 </attribute>
6022
6023 <attribute name="operationPercent" type="long" readonly="yes">
6024 <desc>Current operation progress value in percent.</desc>
6025 </attribute>
6026
6027 <method name="waitForCompletion">
6028 <desc>
6029 Waits until the task is done (including all operations) with a
6030 given timeout.
6031 </desc>
6032 <param name="timeout" type="long" dir="in">
6033 <desc>
6034 Timeout value in milliseconds.
6035 Specify -1 for an indefinite wait.
6036 </desc>
6037 </param>
6038 </method>
6039
6040 <method name="waitForOperationCompletion">
6041 <desc>
6042 Waits until the given operation is done with a given timeout.
6043 </desc>
6044 <param name="operation" type="unsigned long" dir="in">
6045 <desc>
6046 Number of the operation to wait for.
6047 Must be less than <link to="#operationCount"/>.
6048 </desc>
6049 </param>
6050 <param name="timeout" type="long" dir="in">
6051 <desc>
6052 Timeout value in milliseconds.
6053 Specify -1 for an indefinite wait.
6054 </desc>
6055 </param>
6056 </method>
6057
6058 <method name="cancel">
6059 <desc>
6060 Cancels the task.
6061 <note>
6062 If <link to="#cancelable"/> is <tt>false</tt>, then
6063 this method will fail.
6064 </note>
6065 </desc>
6066 </method>
6067
6068 </interface>
6069
6070
6071 <!--
6072 // ISnapshot
6073 /////////////////////////////////////////////////////////////////////////
6074 -->
6075
6076 <enumerator
6077 name="ISnapshotEnumerator" type="ISnapshot"
6078 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
6079 />
6080
6081 <collection
6082 name="ISnapshotCollection" type="ISnapshot"
6083 enumerator="ISnapshotEnumerator"
6084 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
6085 readonly="yes"
6086 />
6087
6088 <interface
6089 name="ISnapshot" extends="$unknown"
6090 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
6091 wsmap="managed"
6092 >
6093 <desc>
6094 The ISnapshot interface represents a snapshot of the virtual
6095 machine.
6096
6097 The <i>snapshot</i> stores all the information about a virtual
6098 machine necessary to bring it to exactly the same state as it was at
6099 the time of taking the snapshot. The snapshot includes:
6100
6101 <ul>
6102 <li>all settings of the virtual machine (i.e. its hardware
6103 configuration: RAM size, attached hard disks, etc.)
6104 </li>
6105 <li>the execution state of the virtual machine (memory contents,
6106 CPU state, etc.).
6107 </li>
6108 </ul>
6109
6110 Snapshots can be <i>offline</i> (taken when the VM is powered off)
6111 or <i>online</i> (taken when the VM is running). The execution
6112 state of the offline snapshot is called a <i>zero execution state</i>
6113 (it doesn't actually contain any information about memory contents
6114 or the CPU state, assuming that all hardware is just powered off).
6115
6116 <h3>Snapshot branches</h3>
6117
6118 Snapshots can be chained. Chained snapshots form a branch where
6119 every next snapshot is based on the previous one. This chaining is
6120 mostly related to hard disk branching (see <link to="IHardDisk2"/>
6121 description). This means that every time a new snapshot is created,
6122 a new differencing hard disk is implicitly created for all normal
6123 hard disks attached to the given virtual machine. This allows to
6124 fully restore hard disk contents when the machine is later reverted
6125 to a particular snapshot.
6126
6127 In the current implementation, multiple snapshot branches within one
6128 virtual machine are not allowed. Every machine has a single branch,
6129 and <link to="IConsole::takeSnapshot()"/> operation adds a new
6130 snapshot to the top of that branch.
6131
6132 Existing snapshots can be discarded using
6133 <link to="IConsole::discardSnapshot()"/>.
6134
6135 <h3>Current snapshot</h3>
6136
6137 Every virtual machine has a current snapshot, identified by
6138 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
6139 a base for the <i>current machine state</i> (see below), to the effect
6140 that all normal hard disks of the machine and its execution
6141 state are based on this snapshot.
6142
6143 In the current implementation, the current snapshot is always the
6144 last taken snapshot (i.e. the head snapshot on the branch) and it
6145 cannot be changed.
6146
6147 The current snapshot is <tt>null</tt> if the machine doesn't have
6148 snapshots at all; in this case the current machine state is just
6149 current settings of this machine plus its current execution state.
6150
6151 <h3>Current machine state</h3>
6152
6153 The current machine state is what represented by IMachine instances got
6154 directly from IVirtualBox
6155 using <link
6156 to="IVirtualBox::getMachine()">getMachine()</link>, <link
6157 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
6158 to instances returned by <link to="ISnapshot::machine"/>). This state
6159 is always used when the machine is <link to="IConsole::powerUp"> powered
6160 on</link>.
6161
6162 The current machine state also includes the current execution state.
6163 If the machine is being currently executed
6164 (<link to="IMachine::state"/> is <link to="MachineState::Running"/>
6165 and above), its execution state is just what's happening now.
6166 If it is powered off (<link to="MachineState::PoweredOff"/> or
6167 <link to="MachineState::Aborted"/>), it has a zero execution state.
6168 If the machine is saved (<link to="MachineState::Saved"/>), its
6169 execution state is what saved in the execution state file
6170 (<link to="IMachine::stateFilePath"/>).
6171
6172 If the machine is in the saved state, then, next time it is powered
6173 on, its execution state will be fully restored from the saved state
6174 file and the execution will continue from the point where the state
6175 was saved.
6176
6177 Similarly to snapshots, the current machine state can be discarded
6178 using <link to="IConsole::discardCurrentState()"/>.
6179
6180 <h3>Taking and discarding snapshots</h3>
6181
6182 The table below briefly explains the meaning of every snapshot
6183 operation:
6184
6185 <table>
6186 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
6187
6188 <tr><td><link to="IConsole::takeSnapshot()"/></td>
6189
6190 <td>Save the current state of the virtual machine, including all
6191 settings, contents of normal hard disks and the current modifications
6192 to immutable hard disks (for online snapshots)</td>
6193
6194 <td>The current state is not changed (the machine will continue
6195 execution if it is being executed when the snapshot is
6196 taken)</td></tr>
6197
6198 <tr><td><link to="IConsole::discardSnapshot()"/></td>
6199
6200 <td>Forget the state of the virtual machine stored in the snapshot:
6201 dismiss all saved settings and delete the saved execution state (for
6202 online snapshots)</td>
6203
6204 <td>Other snapshots (including child snapshots, if any) and the
6205 current state are not directly affected</td></tr>
6206
6207 <tr><td><link to="IConsole::discardCurrentState()"/></td>
6208
6209 <td>Restore the current state of the virtual machine from the state
6210 stored in the current snapshot, including all settings and hard disk
6211 contents</td>
6212
6213 <td>The current state of the machine existed prior to this operation
6214 is lost</td></tr>
6215
6216 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
6217
6218 <td>Completely revert the virtual machine to the state it was in
6219 before the current snapshot has been taken</td>
6220
6221 <td>The current state, as well as the current snapshot, are
6222 lost</td></tr>
6223
6224 </table>
6225
6226 </desc>
6227
6228 <attribute name="id" type="uuid" readonly="yes">
6229 <desc>UUID of the snapshot.</desc>
6230 </attribute>
6231
6232 <attribute name="name" type="wstring">
6233 <desc>Short name of the snapshot.</desc>
6234 </attribute>
6235
6236 <attribute name="description" type="wstring">
6237 <desc>Optional description of the snapshot.</desc>
6238 </attribute>
6239
6240 <attribute name="timeStamp" type="long long" readonly="yes">
6241 <desc>
6242 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
6243 </desc>
6244 </attribute>
6245
6246 <attribute name="online" type="boolean" readonly="yes">
6247 <desc>
6248 <tt>true</tt> if this snapshot is an online snapshot and
6249 <tt>false</tt> otherwise.
6250
6251 <note>
6252 When this attribute is <tt>true</tt>, the
6253 <link to="IMachine::stateFilePath"/> attribute of the
6254 <link to="#machine"/> object associated with this snapshot
6255 will point to the saved state file. Otherwise, it will be
6256 <tt>null</tt>.
6257 </note>
6258 </desc>
6259 </attribute>
6260
6261 <attribute name="machine" type="IMachine" readonly="yes">
6262 <desc>
6263 Virtual machine this snapshot is taken on. This object
6264 stores all settings the machine had when taking this snapshot.
6265 <note>
6266 The returned machine object is immutable, i.e. no
6267 any settings can be changed.
6268 </note>
6269 </desc>
6270 </attribute>
6271
6272 <attribute name="parent" type="ISnapshot" readonly="yes">
6273 <desc>
6274 Parent snapshot (a snapshot this one is based on).
6275 <note>
6276 It's not an error to read this attribute on a snapshot
6277 that doesn't have a parent -- a null object will be
6278 returned to indicate this.
6279 </note>
6280 </desc>
6281 </attribute>
6282
6283 <attribute name="children" type="ISnapshotCollection" readonly="yes">
6284 <desc>
6285 Child snapshots (all snapshots having this one as a parent).
6286 <note>
6287 In the current implementation, there can be only one
6288 child snapshot, or no children at all, meaning this is the
6289 last (head) snapshot.
6290 </note>
6291 </desc>
6292 </attribute>
6293
6294 </interface>
6295
6296
6297 <!--
6298 // IMedia
6299 /////////////////////////////////////////////////////////////////////////
6300 -->
6301
6302 <enum
6303 name="MediaState"
6304 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
6305 >
6306 <desc>
6307 Virtual media state.
6308 <see>IMedia</see>
6309 </desc>
6310
6311 <const name="NotCreated" value="0">
6312 <desc>
6313 Associated media storage does not exist (either was not created yet or
6314 was deleted).
6315 </desc>
6316 </const>
6317 <const name="Created" value="1">
6318 <desc>
6319 Associated storage exists and accessible.
6320 </desc>
6321 </const>
6322 <const name="LockedRead" value="2">
6323 <desc>
6324 Media is locked for reading, no data modification is possible.
6325 </desc>
6326 </const>
6327 <const name="LockedWrite" value="3">
6328 <desc>
6329 Media is locked for writing, no concurrent data reading or modification
6330 is possible.
6331 </desc>
6332 </const>
6333 <const name="Inaccessible" value="4">
6334 <desc>
6335 Associated media storage is not accessible.
6336 </desc>
6337 </const>
6338 <const name="Creating" value="5">
6339 <desc>
6340 Associated media storage is being created.
6341 </desc>
6342 </const>
6343 <const name="Deleting" value="6">
6344 <desc>
6345 Associated media storage is being deleted.
6346 </desc>
6347 </const>
6348 </enum>
6349
6350 <interface
6351 name="IMedium" extends="$unknown"
6352 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
6353 wsmap="managed"
6354 >
6355 <desc>
6356 The IMedium interface is a common interface for all objects representing
6357 virtual media such as hard disks, DVD images.
6358
6359 Each medium is associated with a storage unit (such as a file on the host
6360 computer or a network resource) that holds actual data. The location of
6361 the storage unit is represented by the #location attribute. The value of
6362 this attribute is media type dependent.
6363
6364 The exact media type may be determined by querying the appropriate
6365 interface such as:
6366 <ul>
6367 <li>IHardDisk2 (virtual hard disks)</li>
6368 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
6369 <li>IFloppyImage2 (raw floppy image files)</li>
6370 </ul>
6371
6372 Existing media are opened using the following methods, depending on the
6373 media type:
6374 <ul>
6375 <li><link to="IVirtualBox::openHardDisk2()"/></li>
6376 <li><link to="IVirtualBox::openDVDImage()"/></li>
6377 <li><link to="IVirtualBox::openFloppyImage()"/></li>
6378 </ul>
6379
6380 New hard disk media are created using the
6381 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
6382 images are created outside VirtualBox, usually by storing a copy
6383 of the real medium of the corresponding type in a regular file.
6384
6385 <h3>Known Media</h3>
6386
6387 When an existing medium gets opened for the first time, it gets
6388 automatically remembered by the given VirtualBox installation or, in other
6389 words, becomes a <i>known medium</i>. Known media are stored in the media
6390 registry transparently maintained by VirtualBox and stored in settings
6391 files so that this registry is preserved when VirtualBox is not running.
6392
6393 Newly created virtual hard disks get remembered only when the associated
6394 storage unit is actually created (see IHardDisk2 for more details).
6395
6396 All known media can be enumerated using
6397 <link to="IVirtualBox::hardDisks2"/>,
6398 <link to="IVirtualBox::DVDImages"/> and
6399 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
6400 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
6401 and similar methods or by location using
6402 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
6403
6404 Only known media can be attached to virtual machines.
6405
6406 Removing known media from the media registry is performed when the given
6407 medium is closed using the <link to="#close()"/> method or when its
6408 associated storage unit is deleted (only for hard disks).
6409
6410 <h3>Accessibility Checks</h3>
6411
6412 The given medium (with the created storage unit) is considered to be
6413 <i>accessible</i> when its storage unit can be successfully read from.
6414 Accessible media are indicated by the <link to="MediaState::Created"/>
6415 value of the <link to="#state"/> attribute. When the storage unit cannot
6416 be read (for example, because it is located on a disconnected network
6417 resource, or was accidentally deleted outside VirtualBox), the medium is
6418 considered to be <i>inaccessible</i> which is indicated by the
6419 <link to="MediaState::Inaccessible"/> state. The details about the reason
6420 of being inaccessible can be obtained using the
6421 <link to="#lastAccessError"/> attribute.
6422
6423 A new accessibility check is performed each time the <link to="#state"/>
6424 attribute is read. Please note that this check may take long time (several
6425 seconds or even minutes, depending on the storage unit location and
6426 format), and will block the calling thread until finished. For this
6427 reason, it is recommended to never read this attribute on the main UI
6428 thread to avoid making the UI unresponsive.
6429
6430 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
6431 created for the first time), all known media are in the
6432 <link to="MediaState::Inaccessible"/> state but the value of the <link
6433 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
6434 accessibility check is made on startup. This is done to make the
6435 VirtualBox object ready for serving requests as
6436 fast as possible and let the end-user application decide if it needs to
6437 check media accessibility right away or not.
6438 </desc>
6439
6440 <attribute name="id" type="uuid" readonly="yes">
6441 <desc>
6442 UUID of the medium. For a newly created medium, this value is a randomly
6443 generated UUID.
6444 </desc>
6445 </attribute>
6446
6447 <attribute name="description" type="wstring">
6448 <desc>
6449 Optional description of the medium. For newly created media, the value
6450 of this attribute value is <tt>null</tt>.
6451
6452 Media types that don't support this attribute will return E_NOTIMPL in
6453 attempt to get or set this attribute's value.
6454
6455 <note>
6456 For some storage types, reading this attribute may return an outdated
6457 (last known) value when <link to="#state"/> is <link
6458 to="MediaState::Inaccessible"/> or <link
6459 to="MediaState::LockedWrite"/> because the value of this attribute is
6460 stored within the storage unit itself. Also note that changing the
6461 attribute value is not possible in such case, as well as when the
6462 medium is the <link to="MediaState::LockedRead"/> state.
6463 </note>
6464 </desc>
6465 </attribute>
6466
6467 <attribute name="state" type="MediaState" readonly="yes">
6468 <desc>
6469 Current media state. Inspect <link to="MediaState"/> values for details.
6470
6471 Reading this attribute may take long time because a new accessibility
6472 check of the storage unit is performed every time the attribute is read.
6473 This check may cause a significant delay if the storage unit of the
6474 given medium is, for example, a file located on a network share which is
6475 not currently accessible due to connectivity problems -- the call will
6476 not return until a timeout interval defined by the host OS for this
6477 operation expires.
6478
6479 If the last known state of the medium is <link to="MediaState::Created"/>
6480 and the accessibility check fails then the state would be set to
6481 <link to="MediaState::Inaccessible"/> and <link to="#lastAccessError"/>
6482 may be used to get more details about the failure. If the state of the
6483 medium is <link to="MediaState::LockedRead"/> or
6484 <link to="MediaState::LockedWrite"/> then it remains the same, and a
6485 non-null value of <link to="#lastAccessError"/> will indicate a failed
6486 accessibility check in this case.
6487
6488 Note that not all media states are applicable to certain media types.
6489 For example, states <link to="MediaState::NotCreated"/>,
6490 <link to="MediaState::LockedWrite"/>, <link to="MediaState::Creating"/>,
6491 <link to="MediaState::Deleting"/> are meaningless for IDVDImage2 and
6492 IFloppyImage2 media.
6493 </desc>
6494 </attribute>
6495
6496 <attribute name="location" type="wstring">
6497 <desc>
6498 Location of the storage unit holding media data.
6499
6500 The format of the location string is media type specific. For media
6501 types that use regular files in a host's file system, the location
6502 string is just a full file name.
6503
6504 Some media types may support changing the storage unit location by
6505 simply changing the value of this property. If this operation is not
6506 supported, the implementation will return E_NOTIMPL in attempt to set
6507 this attribute's value.
6508
6509 When setting a value of the location attribute which is a regular file
6510 in the host's file system, the given file name may be either relative to
6511 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
6512 absolute. Note that if the given location specification does not contain
6513 the file extension part then a proper default extension will be
6514 automatically appended by the implementation depending on the media type.
6515 </desc>
6516 </attribute>
6517
6518 <attribute name="name" type="wstring" readonly="yes">
6519 <desc>
6520 Name of the storage unit holding media data.
6521
6522 The returned string is a short version of the <link to="#location"/>
6523 attribute that is suitable for representing the medium in situations
6524 where the full location specification is too long (such as lists
6525 and comboboxes in GUI frontends). This string is also used by frontends
6526 to sort the media list alphabetically when needed.
6527
6528 For example, for locations that are regular files in the host's file
6529 system, the value of this attribute is just a file name (+ extension),
6530 without the path specification.
6531
6532 Note that as opposed to the <link to="#location"/> attribute, the name
6533 attribute will not necessary be unique for a list of media of the
6534 given type and format.
6535 </desc>
6536 </attribute>
6537
6538 <attribute name="size" type="unsigned long long" readonly="yes">
6539 <desc>
6540 Physical size of the storage unit used to hold media data (in bytes).
6541
6542 <note>
6543 For media whose <link to="#state"/> is <link
6544 to="MediaState::Inaccessible"/>, the value of this property is the
6545 last known size. For <link to="MediaState::NotCreated"/> media,
6546 the returned value is zero.
6547 </note>
6548 </desc>
6549 </attribute>
6550
6551 <attribute name="lastAccessError" type="wstring" readonly="yes">
6552 <desc>
6553 Text message that represents the result of the last accessibility
6554 check.
6555
6556 Accessibility checks are performed each time the <link to="#state"/>
6557 attribute is read. A @c null string is returned if the last
6558 accessibility check was successful. A non-null string indicates a
6559 failure and should normally describe a reason of the failure (for
6560 example, a file read error).
6561 </desc>
6562 </attribute>
6563
6564 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
6565 <desc>
6566 Array of UUIDs of all machines this medium is attached to.
6567
6568 A <tt>null</tt> array is returned if this medium is not attached to any
6569 machine or to any machine's snapshot.
6570
6571 <note>
6572 The returned array will include a machine even if this medium is not
6573 attached to that machine in the current state but attached to it in
6574 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
6575 details.
6576 </note>
6577 </desc>
6578 </attribute>
6579
6580 <method name="getSnapshotIds">
6581 <desc>
6582 Returns an array of UUIDs of all snapshots of the given machine where
6583 this medium is attached to it.
6584
6585 If the medium is attached to the machine in the current state, then the
6586 first element in the array will always be the ID of the queried machine
6587 (i.e. the value equal to the @c machineId argument), followed by
6588 snapshot IDs (if any).
6589
6590 If the medium is not attached to the machine in the current state, then
6591 the array will contain only snapshot IDs.
6592
6593 The returned array may be <tt>null</tt> if this medium is not attached
6594 to the given machine at all, neither in the current state nor in one of
6595 snapshots.
6596 </desc>
6597 <param name="machineId" type="uuid" dir="in">
6598 <desc>
6599 UUID of the machine to query.
6600 </desc>
6601 </param>
6602 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
6603 <desc>
6604 Array of snapshot UUIDs of the given machine using this medium.
6605 </desc>
6606 </param>
6607 </method>
6608
6609 <method name="lockRead">
6610 <desc>
6611 Locks this medium for reading.
6612
6613 The read lock is shared: many clients can simultaneously lock the
6614 same media for reading unless it is already locked for writing (see
6615 <link to="#lockWrite()"/>) in which case an error is returned.
6616
6617 When the medium is locked for reading, it cannot be modified from within
6618 VirtualBox. This means that any method that changes the properties of
6619 this medium or contents of the storage unit will return an error (unless
6620 explicitly stated otherwise) and that an attempt to start a virtual
6621 machine that wants to modify the medium will also fail.
6622
6623 When the virtual machine is started up, it locks for reading all media
6624 it uses in read-only mode. If some media cannot be locked for reading,
6625 the startup procedure will fail.
6626
6627 The medium locked for reading must be unlocked using the
6628 <link to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/> can
6629 be nested and must be followed by the same number of paired
6630 <link to="#unlockRead()"/> calls.
6631
6632 This method sets the media state to <link to="MediaState::LockedRead"/>
6633 on success. The state prior to this call must be
6634 <link to="MediaState::Created"/>,
6635 <link to="MediaState::Inaccessible"/> or
6636 <link to="MediaState::LockedRead"/>. As you can see, inaccessible media
6637 can be locked too. This is not an error; this method performs a logical
6638 lock that prevents modifications of this media through the VirtualBox
6639 API, not a physical lock of the underlying storage unit.
6640
6641 Either on success or on failure, this method returns the current state
6642 of the medium <b>before</b> the operation.
6643 </desc>
6644 <param name="state" type="MediaState" dir="return">
6645 <desc>
6646 State of the medium after the operation.
6647 </desc>
6648 </param>
6649 </method>
6650
6651 <method name="unlockRead">
6652 <desc>
6653 Cancels the read lock previously set by <link to="#lockRead()"/>.
6654
6655 Either on success or on failure, this method returns the current state
6656 of the medium <b>after</b> the operation.
6657
6658 See <link to="#lockRead()"/> for more details.
6659 </desc>
6660 <param name="state" type="MediaState" dir="return">
6661 <desc>
6662 State of the medium after the operation.
6663 </desc>
6664 </param>
6665 </method>
6666
6667 <method name="lockWrite">
6668 <desc>
6669 Locks this medium for writing.
6670
6671 The write lock, as opposed to <link to="#lockRead()"/>, is exclusive:
6672 there may be only one client that holds a write lock and there may be no
6673 read locks while the write lock is held.
6674
6675 When the medium is locked for writing, it cannot be modified from within
6676 VirtualBox and it is not guaranteed that the values of its properties
6677 are up-to-date. Any method that changes the properties of this medium or
6678 contents of the storage unit will return an error ((unless explicitly
6679 stated otherwise) and an attempt to start a virtual machine that wants
6680 to modify or to read the medium will also fail.
6681
6682 When the virtual machine is started up, it locks for writing all media
6683 it uses to write data to. If some media cannot be locked for writing,
6684 the startup procedure will fail.
6685
6686 The medium locked for writing must be unlocked using the
6687 <link to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
6688 can <b>not</b> be nested and must be followed by a paired
6689 <link to="#unlockWrite()"/> call.
6690
6691 This method sets the media state to <link to="MediaState::LockedWrite"/>
6692 on success. The state prior to this call must be
6693 <link to="MediaState::Created"/> or
6694 <link to="MediaState::Inaccessible"/>. As you can see, inaccessible media
6695 can be locked too. This is not an error; this method performs a logical
6696 lock that prevents modifications of this media through the VirtualBox
6697 API, not a physical lock of the underlying storage unit.
6698
6699 Either on success or on failure, this method returns the current state
6700 of the medium <b>before</b> the operation.
6701 </desc>
6702 <param name="state" type="MediaState" dir="return">
6703 <desc>
6704 State of the medium after the operation.
6705 </desc>
6706 </param>
6707 </method>
6708
6709 <method name="unlockWrite">
6710 <desc>
6711 Cancels the write lock previously set by <link to="#lockWrite()"/>.
6712
6713 Either on success or on failure, this method returns the current state
6714 of the medium <b>after</b> the operation.
6715
6716 See <link to="#lockWrite()"/> for more details.
6717 </desc>
6718 <param name="state" type="MediaState" dir="return">
6719 <desc>
6720 State of the medium after the operation.
6721 </desc>
6722 </param>
6723 </method>
6724
6725 <method name="close">
6726 <desc>
6727 Closes this media.
6728
6729 The hard disk must not be attached to any known virtual machine and must
6730 not have any known child hard disks, otherwise the operation will fail.
6731
6732 When the hard disk is successfully closed, it gets removed from the list
6733 of remembered hard disks, but its storage unit is not deleted. In
6734 particular, this means that this hard disk can be later opened again
6735 using the <link to="IVirtualBox::openHardDisk2"/> call.
6736
6737 Note that after this method successfully returns, the given hard disk
6738 object becomes uninitialized. This means that any attempt to call any of
6739 its methods or attributes will fail with the <tt>"Object not ready"
6740 (E_ACCESSDENIED)</tt> error.
6741 </desc>
6742 </method>
6743
6744 </interface>
6745
6746
6747 <!--
6748 // IHardDisk2
6749 /////////////////////////////////////////////////////////////////////////
6750 -->
6751
6752 <enum
6753 name="HardDiskType"
6754 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
6755 >
6756 <desc>
6757 Virtual hard disk type.
6758 <see>IHardDisk</see>
6759 </desc>
6760
6761 <const name="Normal" value="0">
6762 <desc>
6763 Normal hard disk (attached directly or indirectly, preserved
6764 when taking snapshots).
6765 </desc>
6766 </const>
6767 <const name="Immutable" value="1">
6768 <desc>
6769 Immutable hard disk (attached indirectly, changes are wiped out
6770 after powering off the virtual machine).
6771 </desc>
6772 </const>
6773 <const name="Writethrough" value="2">
6774 <desc>
6775 Write through hard disk (attached directly, ignored when
6776 taking snapshots).
6777 </desc>
6778 </const>
6779 </enum>
6780
6781 <interface
6782 name="IHardDisk2Attachment" extends="$unknown"
6783 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
6784 wsmap="struct"
6785 >
6786 <desc>
6787 The IHardDisk2Attachment interface represents a hard disk attachment of a
6788 virtual machine.
6789
6790 Every hard disk attachment specifies a slot of the virtual hard disk
6791 controller and a virtual hard disk attached to this slot.
6792
6793 The array of hard disk attachments is returned by
6794 <link to="IMachine::hardDisk2Attachments"/>.
6795
6796 <note>
6797 With the COM API, this is an interface like all the others. With the
6798 webservice, this is mapped to a structure, so querying the attribute
6799 will not return an object, but a complete structure.
6800 </note>
6801 </desc>
6802 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
6803 <desc>Hard disk object associated with this attachment.</desc>
6804 </attribute>
6805
6806 <attribute name="bus" type="StorageBus" readonly="yes">
6807 <desc>Interface bus of this attachment.</desc>
6808 </attribute>
6809
6810 <attribute name="channel" type="long" readonly="yes">
6811 <desc>Channel number of this attachment.</desc>
6812 </attribute>
6813
6814 <attribute name="device" type="long" readonly="yes">
6815 <desc>Device slot number of this attachment.</desc>
6816 </attribute>
6817
6818 </interface>
6819
6820 <interface
6821 name="IHardDisk2" extends="IMedium"
6822 uuid="4fece1c1-2a75-43ce-ba82-76d2a89b9d5d"
6823 wsmap="managed"
6824 >
6825 <desc>
6826 The IHardDisk2 interface represents a virtual hard disk drive
6827 used by a virtual machine.
6828
6829 Virtual hard disk objects virtualize the hard disk hardware and look like
6830 regular hard disks for the guest OS running inside the virtual machine.
6831
6832 <h3>Hard Disk Types</h3>
6833
6834 There are three types of hard disks:
6835 <link to="HardDiskType::Normal">Normal</link>,
6836 <link to="HardDiskType::Immutable">Immutable</link> and
6837 <link to="HardDiskType::Writethrough">Writethrough</link>. The type of the
6838 hard disk defines how the hard disk is attached to a virtual machine and
6839 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
6840 machine with the attached hard disk is taken. The type of the hard disk is
6841 defined by the <link to="#type"/> attribute.
6842
6843 All hard disks can be also divided in two big groups: <i>base</i> hard
6844 disks and <i>differencing</i> hard disks. A base hard disk contains all
6845 sectors of the hard disk data in its storage unit and therefore can be
6846 used independently. On the contrary, a differencing hard disk contains
6847 only some part of the hard disk data (a subset of sectors) and needs
6848 another hard disk to get access to the missing sectors of data. This
6849 another hard disk is called a <i>parent</i> hard disk and defines a hard
6850 disk to which this differencing hard disk is known to be <i>linked to</i>.
6851 The parent hard disk may be itself a differencing hard disk. This
6852 way, differencing hard disks form a linked hard disk chain. This chain
6853 always ends with the base hard disk which is sometimes referred to as the
6854 root hard disk of this chain. Note that several differencing hard disks
6855 may be linked to the same parent hard disk. This way, all known hard disks
6856 form a hard disk tree which is based on their parent-child relationship.
6857
6858 Differencing hard disks can be distinguished from base hard disks by
6859 querying the <link to="#parent"/> attribute: base hard disks do not have
6860 parents they would depend on, so the value of this attribute is always
6861 <tt>null</tt> for them. Using this attribute, it is possible to walk up
6862 the hard disk tree (from the child hard disk to its parent). It is also
6863 possible to walk down the tree using the <link to="#children"/>
6864 attribute.
6865
6866 Note that the type of all differencing hard disks is
6867 <link to="HardDiskType::Normal">Normal</link>; all other values are
6868 meaningless for them. Base hard disks may be of any type.
6869
6870 <h3>Creating Hard Disks</h3>
6871
6872 New base hard disks are created using
6873 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
6874 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
6875 disks are usually implicitly created by VirtualBox when needed but may
6876 also be created explicitly using <link to="#createDiffStorage()"/>.
6877
6878 After the hard disk is successfully created (including the storage unit)
6879 or opened, it becomes a known hard disk (remembered in the internal media
6880 registry). Known hard disks can be attached to a virtual machine, accessed
6881 through <link to="IVirtualBox::getHardDisk2()"/> and
6882 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
6883 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
6884
6885 The following methods, besides <link to="IMedium::close()"/>,
6886 automatically remove the hard disk from the media registry:
6887 <ul>
6888 <li><link to="#deleteStorage()"/></li>
6889 <li><link to="#mergeTo()"/></li>
6890 </ul>
6891
6892 If the storage unit of the hard disk is a regular file in the host's
6893 file system then the rules stated in the description of the
6894 <link to="IMedium::location"/> attribute apply when setting its value. In
6895 addition, a plain file name without any path may be given, in which case
6896 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
6897 folder</link> will be prepended to it.
6898
6899 <h4>Automatic composition of the file name part</h4>
6900
6901 Another extension to the <link to="IMedium::location"/> attribute is that
6902 there is a possibility to cause VirtualBox to compose a unique value for
6903 the file name part of the location using the UUID of the hard disk. This
6904 applies only to hard disks in <link to="MediaState::NotCreated"/> state,
6905 e.g. before the storage unit is created, and works as follows. You set the
6906 value of the <link to="IMedium::location"/> attribute to a location
6907 specification which only contains the path specification but not the file
6908 name part and ends with either a forward slash or a backslash character.
6909 In response, VirtualBox will generate a new UUID for the hard disk and
6910 compose the file name using the following pattern:
6911 <pre>
6912 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
6913 </pre>
6914 where <tt>&lt;path&gt;</tt> is the supplied path specification,
6915 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
6916 is the default extension for the storage format of this hard disk. After
6917 that, you may call any of the methods that create a new hard disk storage
6918 unit and they will use the generated UUID and file name.
6919
6920 <h3>Attaching Hard Disks</h3>
6921
6922 Hard disks are attached to virtual machines using the
6923 <link to="IMachine::attachHardDisk2()"/> method and detached using the
6924 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
6925 <link to="#type"/>, hard disks are attached either
6926 <i>directly</i> or <i>indirectly</i>.
6927
6928 When a hard disk is being attached directly, it is associated with the
6929 virtual machine and used for hard disk operations when the machine is
6930 running. When a hard disk is being attached indirectly, a new differencing
6931 hard disk linked to it is implicitly created and this differencing hard
6932 disk is associated with the machine and used for hard disk operations.
6933 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
6934 a direct attachment then the same hard disk will be returned in response
6935 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
6936 an indirect attachment is performed then
6937 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
6938 differencing hard disk, not the original one passed to <link
6939 to="IMachine::attachHardDisk2()"/>. The following table shows the
6940 dependency of the attachment type on the hard disk type:
6941
6942 <table>
6943 <tr>
6944 <th>Hard Disk Type</th>
6945 <th>Direct or Indirect?</th>
6946 </tr>
6947 <tr>
6948 <td>Normal (Base)</td>
6949 <td>
6950 Normal base hard disks that do not have children (i.e. differencing
6951 hard disks linked to them) and that are not already attached to
6952 virtual machines in snapshots are attached <b>directly</b>.
6953 Otherwise, they are attached <b>indirectly</b> because having
6954 dependent children or being part of the snapshot makes it impossible
6955 to modify hard disk contents without breaking the integrity of the
6956 dependent party. The <link to="#readOnly"/> attribute allows to
6957 quickly determine the kind of the attachment for the given hard
6958 disk. Note that if a normal base hard disk is to be indirectly
6959 attached to a virtual machine with snapshots then a special
6960 procedure called <i>smart attachment</i> is performed (see below).
6961 </td>
6962 </tr>
6963 <tr>
6964 <td>Normal (Differencing)</td>
6965 <td>
6966 Differencing hard disks are like normal base hard disks: attached
6967 <b>directly</b> if they do not have children and are not attached to
6968 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
6969 that the smart attachment procedure is never performed for
6970 differencing hard disks.
6971 </td>
6972 </tr>
6973 <tr>
6974 <td>Immutable</td>
6975 <td>
6976 Immutable hard disks are always attached <b>indirectly</b> because
6977 they are designed to be non-writable. If an immutable hard disk is
6978 attached to a virtual machine with snapshots then a special
6979 procedure called smart attachment is performed (see below).
6980 </td>
6981 </tr>
6982 <tr>
6983 <td>Writethrough</td>
6984 <td>
6985 Writethrough hard disks are always attached <b>directly</b>, also as
6986 designed. This also means that writethrough hard disks cannot have
6987 other hard disks linked to them at all.
6988 </td>
6989 </tr>
6990 </table>
6991
6992 Note that the same hard disk, regardless of its type, may be attached to
6993 more than one virtual machine at a time. In this case, the machine that is
6994 started first gains exclusive access to the hard disk and attempts to
6995 start other machines having this hard disk attached will fail until the
6996 first machine is powered down.
6997
6998 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
6999 that the given hard disk remains associated with the given machine after a
7000 successful <link to="IMachine::detachHardDisk2()"/> call until
7001 <link to="IMachine::saveSettings()"/> is called to save all changes to
7002 machine settings to disk. This deferring is necessary to guarantee that
7003 the hard disk configuration may be restored at any time by a call to
7004 <link to="IMachine::discardSettings()"/> before the settings
7005 are saved (committed).
7006
7007 Note that if <link to="IMachine::discardSettings()"/> is called after
7008 indirectly attaching some hard disks to the machine but before a call to
7009 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
7010 all differencing hard disks implicitly created by
7011 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
7012 Such implicitly created hard disks will also be immediately deleted when
7013 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
7014 call if it is made before <link to="IMachine::saveSettings()"/>. This
7015 implicit deletion is safe because newly created differencing hard
7016 disks do not contain any user data.
7017
7018 However, keep in mind that detaching differencing hard disks that were
7019 implicitly created by <link to="IMachine::attachHardDisk2()"/>
7020 before the last <link to="IMachine::saveSettings()"/> call will
7021 <b>not</b> implicitly delete them as they may already contain some data
7022 (for example, as a result of virtual machine execution). If these hard
7023 disks are no more necessary, the caller can always delete them explicitly
7024 using <link to="#deleteStorage()"/> after they are actually de-associated
7025 from this machine by the <link to="IMachine::saveSettings()"/> call.
7026
7027 <h3>Smart Attachment</h3>
7028
7029 When normal base or immutable hard disks are indirectly attached to a
7030 virtual machine then some additional steps are performed to make sure the
7031 virtual machine will have the most recent "view" of the hard disk being
7032 attached. These steps include walking through the machine's snapshots
7033 starting from the current one and going through ancestors up to the first
7034 snapshot. Hard disks attached to the virtual machine in all
7035 of the encountered snapshots are checked whether they are descendants of
7036 the given normal base or immutable hard disk. The first found child (which
7037 is the differencing hard disk) will be used instead of the normal base or
7038 immutable hard disk as a parent for creating a new differencing hard disk
7039 that will be actually attached to the machine. And only if no descendants
7040 are found or if the virtual machine does not have any snapshots then the
7041 normal base or immutable hard disk will be used itself as a parent for
7042 this differencing hard disk.
7043
7044 It is easier to explain what smart attachment does using the
7045 following example:
7046 <pre>
7047BEFORE attaching B.vdi: AFTER attaching B.vdi:
7048
7049Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
7050 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
7051 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
7052 Snapshot 4 (none) Snapshot 4 (none)
7053 CurState (none) CurState (D3->D2.vdi)
7054
7055 NOT
7056 ...
7057 CurState (D3->B.vdi)
7058 </pre>
7059 The first column is the virtual machine configuration before the base hard
7060 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
7061 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
7062 mean that the hard disk that is actually attached to the machine is a
7063 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
7064 another hard disk, <tt>B.vdi</tt>.
7065
7066 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
7067 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
7068 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
7069 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
7070 it cannot be attached directly and needs an indirect attachment (i.e.
7071 implicit creation of a new differencing hard disk). Due to the smart
7072 attachment procedure, the new differencing hard disk
7073 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
7074 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
7075 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
7076 machine.
7077
7078 Note that if there is more than one descendant hard disk of the given base
7079 hard disk found in a snapshot, and there is an exact device, channel and
7080 bus match, then this exact match will be used. Otherwise, the youngest
7081 descendant will be picked up.
7082
7083 There is one more important aspect of the smart attachment procedure which
7084 is not related to snapshots at all. Before walking through the snapshots
7085 as described above, the backup copy of the current list of hard disk
7086 attachment is searched for descendants. This backup copy is created when
7087 the hard disk configuration is changed for the first time after the last
7088 <link to="IMachine::saveSettings()"/> call and used by
7089 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
7090 changes. When such a descendant is found in this backup copy, it will be
7091 simply re-attached back, without creating a new differencing hard disk for
7092 it. This optimization is necessary to make it possible to re-attach the
7093 base or immutable hard disk to a different bus, channel or device slot
7094 without losing the contents of the differencing hard disk actually
7095 attached to the machine in place of it.
7096 </desc>
7097
7098 <attribute name="format" type="wstring" readonly="yes">
7099 <desc>
7100 Storage format of this hard disk.
7101
7102 The value of this attribute is a string that specifies a backend used to
7103 store hard disk data. The storage format is defined when you create a
7104 new hard disk or automatically detected when you open an existing hard
7105 disk medium, and cannot be changed later.
7106
7107 The list of all storage formats supported by this VirtualBox
7108 installation can be obtained using
7109 <link to="ISystemProperties::hardDiskFormats"/>.
7110 </desc>
7111 </attribute>
7112
7113 <attribute name="type" type="HardDiskType">
7114 <desc>
7115 Type (role) of this hard disk.
7116
7117 The following constraints apply when changing the value of this
7118 attribute:
7119 <ul>
7120 <li>If a hard disk is attached to a virtual machine (either in the
7121 current state or in one of the snapshots), its type cannot be
7122 changed.
7123 </li>
7124 <li>As long as the hard disk has children, its type cannot be set
7125 to <link to="HardDiskType::Writethrough"/>.
7126 </li>
7127 <li>The type of all differencing hard disks is
7128 <link to="HardDiskType::Normal"/> and cannot be changed.
7129 </li>
7130 </ul>
7131
7132 The type of a newly created or opened hard disk is set to
7133 <link to="HardDiskType::Normal"/>.
7134 </desc>
7135 </attribute>
7136
7137 <attribute name="parent" type="IHardDisk2" readonly="yes">
7138 <desc>
7139 Parent of this hard disk (a hard disk this hard disk is directly based
7140 on).
7141
7142 Only differencing hard disks have parents. For base (non-differencing)
7143 hard disks, <tt>null</tt> is returned.
7144 </desc>
7145 </attribute>
7146
7147 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
7148 <desc>
7149 Children of this hard disk (all differencing hard disks directly based
7150 on this hard disk). A <tt>null</tt> array is returned if this hard disk
7151 does not have any children.
7152 </desc>
7153 </attribute>
7154
7155 <attribute name="root" type="IHardDisk2" readonly="yes">
7156 <desc>
7157 Root hard disk of this hard disk.
7158
7159 If this is a differencing hard disk, its root hard disk is the base hard
7160 disk the given hard disk branch starts from. For all other types of hard
7161 disks, this property returns the hard disk object itself (i.e. the same
7162 object this property is read on).
7163 </desc>
7164 </attribute>
7165
7166 <attribute name="readOnly" type="boolean" readonly="yes">
7167 <desc>
7168 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
7169 otherwise.
7170
7171 A hard disk is considered to be read-only when its contents cannot be
7172 modified without breaking the integrity of other parties that depend on
7173 this hard disk such as its child hard disks or snapshots of virtual
7174 machines where this hard disk is attached to these machines. If there
7175 are no children and no such snapshots then there is no dependency and
7176 the hard disk is not read-only.
7177
7178 The value of this attribute can be used to determine the kind of the
7179 attachment that will take place when attaching this hard disk to a
7180 virtual machine. If the value is <tt>false</tt> then the hard disk will
7181 be attached directly. If the value is <tt>true</tt> then the hard disk
7182 will be attached indirectly by creating a new differencing child hard
7183 disk for that. See the interface description for more information.
7184
7185 Note that all <link to="HardDiskType::Immutable">Immutable</link> hard
7186 disks are always read-only while all
7187 <link to="HardDiskType::Writethrough">Writethrough</link> hard disks are
7188 always not.
7189
7190 <note>
7191 The read-only condition represented by this attribute is related to
7192 the hard disk type and usage, not to the current
7193 <link to="IMedium::state">media state</link> and not to the read-only
7194 state of the storage unit.
7195 </note>
7196 </desc>
7197 </attribute>
7198
7199 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
7200 <desc>
7201 Logical size of this hard disk (in megabytes), as reported to the
7202 guest OS running inside the virtual machine this disk is
7203 attached to. The logical size is defined when the hard disk is created
7204 and cannot be changed later.
7205
7206 <note>
7207 Reading this property on a differencing hard disk will return the size
7208 of its <link to="#root"/> hard disk.
7209 </note>
7210 <note>
7211 For hard disks whose state is <link to="#state"/> is <link
7212 to="MediaState::Inaccessible"/>, the value of this property is the
7213 last known logical size. For <link to="MediaState::NotCreated"/> hard
7214 disks, the returned value is zero.
7215 </note>
7216 </desc>
7217 </attribute>
7218
7219 <!-- storage methods -->
7220
7221 <method name="getProperty">
7222 <desc>
7223 Returns the value of the custom hard disk property with the given name.
7224
7225 The list of all properties supported by the given hard disk format can
7226 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7227
7228 Note that if this method returns a <tt>null</tt> @a value, the requested
7229 property is supported but currently not assigned any value.
7230
7231 <result name="VBOX_E_OBJECT_NOT_FOUND">
7232 Requested property does not exist (not supported by the format).
7233 </result>
7234 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
7235 </desc>
7236 <param name="name" type="wstring" dir="in">
7237 <desc>Name of the property to get.</desc>
7238 </param>
7239 <param name="value" type="wstring" dir="return">
7240 <desc>Current property value.</desc>
7241 </param>
7242 </method>
7243
7244 <method name="setProperty">
7245 <desc>
7246 Sets the value of the custom hard disk property with the given name.
7247
7248 The list of all properties supported by the given hard disk format can
7249 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7250
7251 Note that passing <tt>null</tt> as @a value will reset the value of the
7252 property to nothing which may also be understood as deleting the
7253 property's value. For properties with no values, the format backend will
7254 use a default value if such a value is defined for the given property.
7255
7256 <result name="VBOX_E_OBJECT_NOT_FOUND">
7257 Requested property does not exist (not supported by the format).
7258 </result>
7259 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
7260 </desc>
7261 <param name="name" type="wstring" dir="in">
7262 <desc>Name of the property to set.</desc>
7263 </param>
7264 <param name="value" type="wstring" dir="in">
7265 <desc>Property value to set.</desc>
7266 </param>
7267 </method>
7268
7269 <method name="getProperties">
7270 <desc>
7271 Returns values for a group of properties in one call.
7272
7273 The names of the properties to get are specified using the @a names
7274 argument which is a list of comma-separated property names or
7275 <tt>null</tt> if all properties are to be returned. Note that currently
7276 the value of this argument is ignored and the method always returns all
7277 existing properties.
7278
7279 The list of all properties supported by the given hard disk format can
7280 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7281
7282 The method returns two arrays, the array of property names corresponding
7283 to the @a names argument and the current values of these properties.
7284 <!-- FIXME: Both arrays [sentence was cut off here. Complete. -->
7285
7286 Note that for properties that don't have values assigned to them,
7287 <tt>null</tt> is returned at the appropriate index in the @a returnValues
7288 array.
7289
7290 </desc>
7291 <param name="names" type="wstring" dir="in">
7292 <desc>
7293 Names of properties to get.
7294 </desc>
7295 </param>
7296 <param name="returnNames" type="wstring" safearray="yes" dir="out">
7297 <desc>Names of returned properties.</desc>
7298 </param>
7299 <param name="returnValues" type="wstring" safearray="yes" dir="return">
7300 <desc>Values of returned properties.</desc>
7301 </param>
7302 </method>
7303
7304 <!-- storage methods -->
7305
7306 <method name="createDynamicStorage">
7307 <desc>
7308 Starts creating a dynamically expanding hard disk storage unit in the
7309 background. The previous storage unit created for this object, if
7310 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
7311 the operation will fail.
7312
7313 Before the operation starts, the hard disk is placed in
7314 <link to="MediaState::Creating"/> state. If the create operation
7315 fails, the media will be placed back in <link to="MediaState::NotCreated"/>
7316 state.
7317
7318 After the returned progress object reports that the operation has
7319 successfully completed, the media state will be set to <link
7320 to="MediaState::Created"/>, the hard disk will be remembered by this
7321 VirtualBox installation and may be attached to virtual machines.
7322 </desc>
7323 <param name="logicalSize" type="unsigned long long" dir="in">
7324 <desc>Maximum logical size of the hard disk in megabytes.</desc>
7325 </param>
7326 <param name="progress" type="IProgress" dir="return">
7327 <desc>Progress object to track the operation completion.</desc>
7328 </param>
7329 </method>
7330
7331 <method name="createFixedStorage">
7332 <desc>
7333 Starts creating a fixed-size hard disk storage unit in the background.
7334 The previous storage unit created for this object, if
7335 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
7336 the operation will fail.
7337
7338 Before the operation starts, the hard disk is placed to
7339 <link to="MediaState::Creating"/> state. If the create operation
7340 fails, the media will placed back to <link to="MediaState::NotCreated"/>
7341 state.
7342
7343 After the returned progress object reports that the operation is
7344 successfully complete, the media state will be set to <link
7345 to="MediaState::Created"/>, the hard disk will be remembered by this
7346 VirtualBox installation and may be attached to virtual machines.
7347 </desc>
7348 <param name="logicalSize" type="unsigned long long" dir="in">
7349 <desc>Logical size of the hard disk in megabytes.</desc>
7350 </param>
7351 <param name="progress" type="IProgress" dir="return">
7352 <desc>Progress object to track the operation completion.</desc>
7353 </param>
7354 </method>
7355
7356 <method name="deleteStorage">
7357 <desc>
7358 Starts deleting the storage unit of this hard disk.
7359
7360 The hard disk must not be attached to any known virtual machine and must
7361 not have any known child hard disks, otherwise the operation will fail.
7362 It will also fail if there is no storage unit to delete or if deletion
7363 is already in progress, or if the hard disk is being in use (locked for
7364 read or for write) or inaccessible. Therefore, the only valid state for
7365 this operation to succeed is <link to="MediaState::Created"/>.
7366
7367 Before the operation starts, the hard disk is placed to
7368 <link to="MediaState::Deleting"/> state and gets removed from the list
7369 of remembered hard disks (media registry). If the delete operation
7370 fails, the media will be remembered again and placed back to
7371 <link to="MediaState::Created"/> state.
7372
7373 After the returned progress object reports that the operation is
7374 complete, the media state will be set to
7375 <link to="MediaState::NotCreated"/> and you will be able to use one of
7376 the storage creation methods to create it again.
7377
7378 <see>#close()</see>
7379
7380 <result name="VBOX_E_OBJECT_IN_USE">
7381 Hard disk is attached to a virtual machine.
7382 </result>
7383 </desc>
7384 <param name="progress" type="IProgress" dir="return">
7385 <desc>Progress object to track the operation completion.</desc>
7386 </param>
7387 </method>
7388
7389 <!-- diff methods -->
7390
7391 <method name="createDiffStorage">
7392 <desc>
7393 Starts creating an empty differencing storage unit based on this hard
7394 disk in the format and at the location defined by the @a target
7395 argument.
7396
7397 The target hard disk must be in <link to="MediaState::NotCreated"/>
7398 state (i.e. must not have an existing storage unit). Upon successful
7399 completion, this operation will set the type of the target hard disk to
7400 <link to="HardDiskType::Normal"/> and create a storage unit necessary to
7401 represent the differencing hard disk data in the given format (according
7402 to the storage format of the target object).
7403
7404 After the returned progress object reports that the operation is
7405 successfully complete, the target hard disk gets remembered by this
7406 VirtualBox installation and may be attached to virtual machines.
7407
7408 <note>
7409 The hard disk will be set to <link to="MediaState::LockedRead"/>
7410 state for the duration of this operation.
7411 </note>
7412 <result name="VBOX_E_OBJECT_IN_USE">
7413 Hard disk not in NotCreated state.
7414 </result>
7415 </desc>
7416 <param name="target" type="IHardDisk2" dir="in">
7417 <desc>Target hard disk.</desc>
7418 </param>
7419 <param name="progress" type="IProgress" dir="return">
7420 <desc>Progress object to track the operation completion.</desc>
7421 </param>
7422 </method>
7423
7424 <method name="mergeTo">
7425 <desc>
7426 Starts merging the contents of this hard disk and all intermediate
7427 differencing hard disks in the chain to the given target hard disk.
7428
7429 The target hard disk must be either a descendant of this hard disk or
7430 its ancestor (otherwise this method will immediately return a failure).
7431 It follows that there are two logical directions of the merge operation:
7432 from ancestor to descendant (<i>forward merge</i>) and from descendant to
7433 ancestor (<i>backward merge</i>). Let us consider the following hard disk
7434 chain:
7435
7436 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
7437
7438 Here, calling this method on the <tt>Base</tt> hard disk object with
7439 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
7440 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
7441 merge. Note that in both cases the contents of the resulting hard disk
7442 will be the same, the only difference is the hard disk object that takes
7443 the result of the merge operation. In case of the forward merge in the
7444 above example, the result will be written to <tt>Diff_2</tt>; in case of
7445 the backward merge, the result will be written to <tt>Base</tt>. In
7446 other words, the result of the operation is always stored in the target
7447 hard disk.
7448
7449 Upon successful operation completion, the storage units of all hard
7450 disks in the chain between this (source) hard disk and the target hard
7451 disk, including the source hard disk itself, will be automatically
7452 deleted and the relevant hard disk objects (including this hard disk)
7453 will become uninitialized. This means that any attempt to call any of
7454 their methods or attributes will fail with the
7455 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
7456 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
7457 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
7458 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
7459 disk itself since it will no longer be based on any other hard disk.
7460
7461 Considering the above, all of the following conditions must be met in
7462 order for the merge operation to succeed:
7463 <ul>
7464 <li>
7465 Neither this (source) hard disk nor any intermediate
7466 differencing hard disk in the chain between it and the target
7467 hard disk is attached to any virtual machine.
7468 </li>
7469 <li>
7470 Neither the source hard disk nor the target hard disk is an
7471 <link to="HardDiskType::Immutable"/> hard disk.
7472 </li>
7473 <li>
7474 The part of the hard disk tree from the source hard disk to the
7475 target hard disk is a linear chain, i.e. all hard disks in this
7476 chain have exactly one child which is the next hard disk in this
7477 chain. The only exception from this rule is the target hard disk in
7478 the forward merge operation; it is allowed to have any number of
7479 child hard disks because the merge operation will hot change its
7480 logical contents (as it is seen by the guest OS or by children).
7481 </li>
7482 <li>
7483 None of the involved hard disks are in
7484 <link to="MediaState::LockedRead"/> or
7485 <link to="MediaState::LockedWrite"/> state.
7486 </li>
7487 </ul>
7488
7489 <note>
7490 This (source) hard disk and all intermediates will be placed to <link
7491 to="MediaState::Deleting"/> state and the target hard disk will be
7492 placed to <link to="MediaState::LockedWrite"/> state and for the
7493 duration of this operation.
7494 </note>
7495 </desc>
7496 <param name="targetId" type="uuid" dir="in">
7497 <desc>UUID of the target ancestor or descendant hard disk.</desc>
7498 </param>
7499 <param name="progress" type="IProgress" dir="return">
7500 <desc>Progress object to track the operation completion.</desc>
7501 </param>
7502 </method>
7503
7504 <!-- clone methods -->
7505
7506 <method name="cloneTo">
7507 <desc>
7508 Starts creating a clone of this hard disk in the format and at the
7509 location defined by the @a target argument.
7510
7511 The target hard disk must be in <link to="MediaState::NotCreated"/>
7512 state (i.e. must not have an existing storage unit). Upon successful
7513 completion, the cloned hard disk will contain exactly the same sector
7514 data as the hard disk being cloned, except that a new UUID for the clone
7515 will be randomly generated.
7516
7517 After the returned progress object reports that the operation is
7518 successfully complete, the target hard disk gets remembered by this
7519 VirtualBox installation and may be attached to virtual machines.
7520
7521 <note>
7522 If the cloned hard disk is a differencing hard disk, it will inherit
7523 parent dependency of the original hard disk.
7524 </note>
7525 <note>
7526 This hard disk will be placed to <link to="MediaState::LockedRead"/>
7527 state for the duration of this operation.
7528 </note>
7529 </desc>
7530 <param name="target" type="IHardDisk2" dir="in">
7531 <desc>Target hard disk.</desc>
7532 </param>
7533 <param name="progress" type="IProgress" dir="return">
7534 <desc>Progress object to track the operation completion.</desc>
7535 </param>
7536 </method>
7537
7538 <method name="flattenTo">
7539 <desc>
7540 Starts creating a deep (independent) clone of this hard disk in the
7541 format and at the location defined by the @a target argument.
7542
7543 This operation is similar to <link to="#cloneTo()"/> except that when
7544 applied to a differencing hard disk, it will also copy missing hard disk
7545 data from all parent hard disks it is linked to. This will make the
7546 created clone an independent base hard disk that contains all hard disk
7547 data and does not need any other hard disks to operate.
7548
7549 After the returned progress object reports that the operation is
7550 successfully complete, the target hard disk gets remembered by this
7551 VirtualBox installation and may be attached to virtual machines.
7552
7553 <note>
7554 For base hard disks, this operation is identical to
7555 <link to="#cloneTo()"/>.
7556 </note>
7557 <note>
7558 This hard disk and all its parent hard disks will be placed to <link
7559 to="MediaState::LockedRead"/> state for the duration of this
7560 operation.
7561 </note>
7562 </desc>
7563 <param name="target" type="IHardDisk2" dir="in">
7564 <desc>Target hard disk.</desc>
7565 </param>
7566 <param name="progress" type="IProgress" dir="return">
7567 <desc>Progress object to track the operation completion.</desc>
7568 </param>
7569 </method>
7570
7571 </interface>
7572
7573
7574 <!--
7575 // IHardDiskFormat
7576 /////////////////////////////////////////////////////////////////////////
7577 -->
7578
7579 <enum
7580 name="DataType"
7581 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
7582 >
7583 <const name="Int32" value="0"/>
7584 <const name="Int8" value="1"/>
7585 <const name="String" value="2"/>
7586 </enum>
7587
7588 <enum
7589 name="DataFlags"
7590 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
7591 >
7592 <const name="None" value="0x00"/>
7593 <const name="Mandatory" value="0x01"/>
7594 <const name="Expert" value="0x02"/>
7595 <const name="Array" value="0x04"/>
7596 <const name="FlagMask" value="0x07"/>
7597 </enum>
7598
7599 <enum
7600 name="HardDiskFormatCapabilities"
7601 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
7602 >
7603 <desc>
7604 Hard disk format capability flags.
7605 </desc>
7606
7607 <const name="Uuid" value="0x01">
7608 <desc>
7609 Supports UUIDs as expected by VirtualBox code.
7610 </desc>
7611 </const>
7612
7613 <const name="CreateFixed" value="0x02">
7614 <desc>
7615 Supports creating fixed size images, allocating all space instantly.
7616 </desc>
7617 </const>
7618
7619 <const name="CreateDynamic" value="0x04">
7620 <desc>
7621 Supports creating dynamically growing images, allocating space on
7622 demand.
7623 </desc>
7624 </const>
7625
7626 <const name="CreateSplit2G" value="0x08">
7627 <desc>
7628 Supports creating images split in chunks of a bit less than 2 GBytes.
7629 </desc>
7630 </const>
7631
7632 <const name="Differencing" value="0x10">
7633 <desc>
7634 Supports being used as a format for differencing hard disks (see <link
7635 to="IHardDisk2::createDiffStorage"/>).
7636 </desc>
7637 </const>
7638
7639 <const name="Asynchronous" value="0x20">
7640 <desc>
7641 Supports asynchronous I/O operations for at least some configurations.
7642 </desc>
7643 </const>
7644
7645 <const name="File" value="0x40">
7646 <desc>
7647 The format backend operates on files. The <link to="IMedium::location"/>
7648 attribute of the hard disk specifies a file used to store hard disk
7649 data. For a list of supported file extensions see
7650 <link to="IHardDiskFormat::fileExtensions"/>.
7651 </desc>
7652 </const>
7653
7654 <const name="Properties" value="0x80">
7655 <desc>
7656 The format backend uses the property interface to configure the storage
7657 location and properties. The <link to="IHardDiskFormat::describeProperties"/>
7658 method is used to get access to properties supported by the given hard
7659 disk format.
7660 </desc>
7661 </const>
7662
7663 <const name="CapabilityMask" value="0xFF"/>
7664 </enum>
7665
7666 <interface
7667 name="IHardDiskFormat" extends="$unknown"
7668 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
7669 wsmap="managed"
7670 >
7671 <desc>
7672 The IHardDiskFormat interface represents a virtual hard disk format.
7673
7674 Each hard disk format has an associated backend which is used to handle
7675 hard disks stored in this format. This interface provides information
7676 about the properties of the associated backend.
7677
7678 Each hard disk format is identified by a string represented by the
7679 <link to="#id"/> attribute. This string is used in calls like
7680 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
7681 format.
7682
7683 The list of all supported hard disk formats can be obtained using
7684 <link to="ISystemProperties::hardDiskFormats"/>.
7685
7686 <see>IHardDisk2</see>
7687 </desc>
7688
7689 <attribute name="id" type="wstring" readonly="yes">
7690 <desc>
7691 Identifier of this format.
7692
7693 This string is used in methods of other interfaces where it is necessary
7694 to specify a hard disk format, such as
7695 <link to="IVirtualBox::createHardDisk2()"/>.
7696 </desc>
7697 </attribute>
7698
7699 <attribute name="name" type="wstring" readonly="yes">
7700 <desc>
7701 Human readable description of this format.
7702
7703 Mainly for use in file open dialogs.
7704 </desc>
7705 </attribute>
7706
7707 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
7708 <desc>
7709 Array of strings containing the supported file extensions.
7710
7711 The first extension in the array is the extension preferred by the
7712 backend. It is recommended to use this extension when specifying a
7713 location of the storage unit for a new hard disk.
7714
7715 Note that some backends do not work on files, so this array may be
7716 empty.
7717
7718 <see>IHardDiskFormat::capabilities</see>
7719 </desc>
7720 </attribute>
7721
7722 <attribute name="capabilities" type="unsigned long" readonly="yes">
7723 <desc>
7724 Capabilities of the format as a set of bit flags.
7725
7726 For the meaning of individual capability flags see
7727 <link to="HardDiskFormatCapabilities"/>.
7728 </desc>
7729 </attribute>
7730
7731 <method name="describeProperties">
7732 <desc>
7733 Returns several arrays describing the properties supported by this
7734 format.
7735
7736 An element with the given index in each array describes one
7737 property. Thus, the number of elements in each returned array is the
7738 same and corresponds to the number of supported properties.
7739
7740 The returned arrays are not empty only if the
7741 <link to="HardDiskFormatCapabilities::Properties"/> flag is set.
7742
7743 <see>DataType</see>
7744 <see>DataFlags</see>
7745 </desc>
7746
7747 <param name="names" type="wstring" safearray="yes" dir="out">
7748 <desc>Array of property names.</desc>
7749 </param>
7750 <param name="description" type="wstring" safearray="yes" dir="out">
7751 <desc>Array of property descriptions.</desc>
7752 </param>
7753 <param name="types" type="DataType" safearray="yes" dir="out">
7754 <desc>Array of property types.</desc>
7755 </param>
7756 <param name="flags" type="unsigned long" safearray="yes" dir="out">
7757 <desc>Array of property flags.</desc>
7758 </param>
7759 <param name="defaults" type="wstring" safearray="yes" dir="out">
7760 <desc>Array of default property values.</desc>
7761 </param>
7762 </method>
7763
7764 </interface>
7765
7766
7767 <!--
7768 // IFloppyImage2
7769 /////////////////////////////////////////////////////////////////////////
7770 -->
7771
7772 <interface
7773 name="IFloppyImage2" extends="IMedium"
7774 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
7775 wsmap="managed"
7776 >
7777 <desc>
7778 The IFloppyImage2 interface represents a medium containing the image
7779 of a floppy disk.
7780 </desc>
7781
7782 </interface>
7783
7784
7785 <!--
7786 // IDVDImage2
7787 /////////////////////////////////////////////////////////////////////////
7788 -->
7789
7790 <interface
7791 name="IDVDImage2" extends="IMedium"
7792 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
7793 wsmap="managed"
7794 >
7795 <desc>
7796 The IDVDImage2 interface represents a medium containing the image
7797 of a CD or DVD disk in the ISO format.
7798 </desc>
7799
7800 </interface>
7801
7802
7803 <!--
7804 // IDVDDrive
7805 /////////////////////////////////////////////////////////////////////////
7806 -->
7807
7808 <interface
7809 name="IDVDDrive" extends="$unknown"
7810 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
7811 wsmap="managed"
7812 >
7813 <desc>
7814 The IDVDDrive interface represents the virtual CD/DVD drive of the
7815 virtual machine. An object of this type is returned by
7816 <link to="IMachine::DVDDrive"/>.
7817 </desc>
7818
7819 <attribute name="state" type="DriveState" readonly="yes">
7820 <desc>Current drive state.</desc>
7821 </attribute>
7822
7823 <attribute name="passthrough" type="boolean">
7824 <desc>
7825 When a host drive is mounted and passthrough is enabled
7826 the guest OS will be able to directly send SCSI commands to
7827 the host drive. This enables the guest OS to use CD/DVD writers
7828 but is potentially dangerous.
7829 </desc>
7830 </attribute>
7831
7832 <method name="mountImage">
7833 <desc>Mounts a CD/DVD image with the specified UUID.</desc>
7834 <param name="imageId" type="uuid" dir="in"/>
7835 </method>
7836
7837 <method name="captureHostDrive">
7838 <desc>Captures the specified host CD/DVD drive.</desc>
7839 <param name="drive" type="IHostDVDDrive" dir="in"/>
7840 </method>
7841
7842 <method name="unmount">
7843 <desc>Unmounts the currently mounted image or host drive.</desc>
7844 </method>
7845
7846 <method name="getImage">
7847 <desc>Returns the currently mounted CD/DVD image.</desc>
7848 <param name="image" type="IDVDImage2" dir="return"/>
7849 </method>
7850
7851 <method name="getHostDrive">
7852 <desc>Returns the currently mounted host CD/DVD drive.</desc>
7853 <param name="drive" type="IHostDVDDrive" dir="return"/>
7854 </method>
7855
7856 </interface>
7857
7858
7859 <!--
7860 // IFloppyDrive
7861 /////////////////////////////////////////////////////////////////////////
7862 -->
7863
7864 <interface
7865 name="IFloppyDrive" extends="$unknown"
7866 uuid="159412cd-bab8-452e-8097-218a020825a6"
7867 wsmap="managed"
7868 >
7869 <desc>
7870 The IFloppyDrive interface represents the virtual floppy drive of the
7871 virtual machine. An object of this type is returned by
7872 <link to="IMachine::floppyDrive" />.
7873 </desc>
7874
7875 <attribute name="enabled" type="boolean">
7876 <desc>
7877 Flag whether the floppy drive is enabled. If it is disabled,
7878 the floppy drive will not be reported to the guest OS.
7879 </desc>
7880 </attribute>
7881
7882 <attribute name="state" type="DriveState" readonly="yes">
7883 <desc>Current drive state.</desc>
7884 </attribute>
7885
7886 <method name="mountImage">
7887 <desc>Mounts a floppy image with the specified UUID.</desc>
7888 <param name="imageId" type="uuid" dir="in"/>
7889 </method>
7890
7891 <method name="captureHostDrive">
7892 <desc>Captures the specified host floppy drive.</desc>
7893 <param name="drive" type="IHostFloppyDrive" dir="in"/>
7894 </method>
7895
7896 <method name="unmount">
7897 <desc>Unmounts the currently mounted image or host drive.</desc>
7898 </method>
7899
7900 <method name="getImage">
7901 <desc>Returns the currently mounted floppy image.</desc>
7902 <param name="image" type="IFloppyImage2" dir="return"/>
7903 </method>
7904
7905 <method name="getHostDrive">
7906 <desc>Returns the currently mounted host floppy drive.</desc>
7907 <param name="drive" type="IHostFloppyDrive" dir="return"/>
7908 </method>
7909
7910 </interface>
7911
7912
7913 <!--
7914 // IKeyboard
7915 /////////////////////////////////////////////////////////////////////////
7916 -->
7917
7918 <interface
7919 name="IKeyboard" extends="$unknown"
7920 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
7921 wsmap="managed"
7922 >
7923 <desc>
7924 The IKeyboard interface represents the virtual machine's keyboard. Used
7925 in <link to="IConsole::keyboard"/>.
7926
7927 Through this interface, the virtual machine's virtual keyboard can be controlled. One
7928 can send keystrokes to the virtual machine and send the Ctrl-Alt-Del sequence to it.
7929 </desc>
7930 <method name="putScancode">
7931 <desc>Sends a scancode to the keyboard.</desc>
7932 <param name="scancode" type="long" dir="in"/>
7933 </method>
7934
7935 <method name="putScancodes">
7936 <desc>Sends an array of scancode to the keyboard.</desc>
7937 <param name="scancodes" type="long" dir="in" safearray="yes"/>
7938 <param name="codesStored" type="unsigned long" dir="return"/>
7939 </method>
7940
7941 <method name="putCAD">
7942 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard.</desc>
7943 </method>
7944
7945 </interface>
7946
7947
7948 <!--
7949 // IMouse
7950 /////////////////////////////////////////////////////////////////////////
7951 -->
7952
7953 <enum
7954 name="MouseButtonState"
7955 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
7956 >
7957 <desc>
7958 Mouse button state.
7959 </desc>
7960
7961 <const name="LeftButton" value="0x01"/>
7962 <const name="RightButton" value="0x02"/>
7963 <const name="MiddleButton" value="0x04"/>
7964 <const name="WheelUp" value="0x08"/>
7965 <const name="WheelDown" value="0x10"/>
7966 <const name="MouseStateMask" value="0x1F"/>
7967 </enum>
7968
7969 <interface
7970 name="IMouse" extends="$unknown"
7971 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
7972 wsmap="managed"
7973 >
7974 <desc>
7975 The IMouse interface represents the virtual machine's mouse. Used in
7976 <link to="IConsole::mouse"/>.
7977
7978 Through this interface, the virtual machine's virtual mouse can be
7979 controlled.
7980 </desc>
7981
7982 <attribute name="absoluteSupported" type="boolean" readonly="yes">
7983 <desc>
7984 Whether the guest OS supports absolute mouse pointer positioning
7985 or not.
7986 <note>
7987 VirtualBox Guest Tools need to be installed to the guest OS
7988 in order to enable absolute mouse positioning support.
7989 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
7990 callback to be instantly informed about changes of this attribute
7991 during virtual machine execution.
7992 </note>
7993 <see><link to="#putMouseEventAbsolute"/></see>
7994 </desc>
7995 </attribute>
7996
7997 <method name="putMouseEvent">
7998 <desc>
7999 Initiates a mouse event using relative pointer movements
8000 along x and y axis.
8001 </desc>
8002
8003 <param name="dx" type="long" dir="in">
8004 <desc>
8005 Amount of pixels the mouse should move to the right.
8006 Negative values move the mouse to the left.
8007 </desc>
8008 </param>
8009 <param name="dy" type="long" dir="in">
8010 <desc>
8011 Amount of pixels the mouse should move downwards.
8012 Negative values move the mouse upwards.
8013 </desc>
8014 </param>
8015 <param name="dz" type="long" dir="in">
8016 <desc>
8017 Amount of mouse wheel moves.
8018 Positive values describe clockwise wheel rotations,
8019 negative values describe counterclockwise rotations.
8020 </desc>
8021 </param>
8022 <param name="buttonState" type="long" dir="in">
8023 <desc>
8024 The current state of mouse buttons. Every bit represents
8025 a mouse button as follows:
8026 <table>
8027 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
8028 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
8029 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
8030 </table>
8031 A value of <tt>1</tt> means the corresponding button is pressed.
8032 otherwise it is released.
8033 </desc>
8034 </param>
8035 </method>
8036
8037 <method name="putMouseEventAbsolute">
8038 <desc>
8039 Positions the mouse pointer using absolute x and y coordinates.
8040 These coordinates are expressed in pixels and
8041 start from <tt>[1,1]</tt> which corresponds to the top left
8042 corner of the virtual display.
8043
8044 <note>
8045 This method will have effect only if absolute mouse
8046 positioning is supported by the guest OS.
8047 </note>
8048
8049 <see><link to="#absoluteSupported"/></see>
8050 </desc>
8051
8052 <param name="x" type="long" dir="in">
8053 <desc>
8054 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
8055 </desc>
8056 </param>
8057 <param name="y" type="long" dir="in">
8058 <desc>
8059 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
8060 </desc>
8061 </param>
8062 <param name="dz" type="long" dir="in">
8063 <desc>
8064 Amount of mouse wheel moves.
8065 Positive values describe clockwise wheel rotations,
8066 negative values describe counterclockwise rotations.
8067 </desc>
8068 </param>
8069 <param name="buttonState" type="long" dir="in">
8070 <desc>
8071 The current state of mouse buttons. Every bit represents
8072 a mouse button as follows:
8073 <table>
8074 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
8075 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
8076 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
8077 </table>
8078 A value of <tt>1</tt> means the corresponding button is pressed.
8079 otherwise it is released.
8080 </desc>
8081 </param>
8082 </method>
8083
8084 </interface>
8085
8086 <!--
8087 // IDisplay
8088 /////////////////////////////////////////////////////////////////////////
8089 -->
8090
8091 <enum
8092 name="FramebufferAccelerationOperation"
8093 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
8094 >
8095 <desc>
8096 Frame buffer acceleration operation.
8097 </desc>
8098
8099 <const name="SolidFillAcceleration" value="1"/>
8100 <const name="ScreenCopyAcceleration" value="2"/>
8101 </enum>
8102
8103 <enum
8104 name="FramebufferPixelFormat"
8105 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
8106 >
8107 <desc>
8108 Format of the video memory buffer. Constants represented by this enum can
8109 be used to test for particular values of <link
8110 to="IFramebuffer::pixelFormat"/>. See also <link
8111 to="IFramebuffer::requestResize()"/>.
8112
8113 See also www.fourcc.org for more information about FOURCC pixel formats.
8114 </desc>
8115
8116 <const name="Opaque" value="0xFFFFFFFF">
8117 <desc>
8118 Unknown buffer format. The user may not assume any particular
8119 format of the buffer.
8120 </desc>
8121 </const>
8122 <const name="FOURCC_RGB" value="0x32424752">
8123 <desc>
8124 Basic RGB format. <link to="IFramebuffer::bitsPerPixel"/> determines
8125 the bit layout.
8126 </desc>
8127 </const>
8128 </enum>
8129
8130 <interface
8131 name="IFramebuffer" extends="$unknown"
8132 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
8133 wsmap="suppress"
8134 >
8135 <attribute name="address" type="octet" mod="ptr" readonly="yes">
8136 <desc>Address of the start byte of the frame buffer.</desc>
8137 </attribute>
8138
8139 <attribute name="width" type="unsigned long" readonly="yes">
8140 <desc>Frame buffer width, in pixels.</desc>
8141 </attribute>
8142
8143 <attribute name="height" type="unsigned long" readonly="yes">
8144 <desc>Frame buffer height, in pixels.</desc>
8145 </attribute>
8146
8147 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8148 <desc>
8149 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
8150 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
8151 are: 8, 15, 16, 24 and 32.
8152 </desc>
8153 </attribute>
8154
8155 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
8156 <desc>
8157 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
8158 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
8159 size of the scan line must be aligned to 32 bits.
8160 </desc>
8161 </attribute>
8162
8163 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
8164 <desc>
8165 Frame buffer pixel format. It's either one of the values defined by <link
8166 to="FramebufferPixelFormat"/> or a raw FOURCC code.
8167 <note>
8168 This attribute must never return <link
8169 to="PixelFormat::Opaque"/> -- the format of the buffer
8170 <link to="#address"/> points to must be always known.
8171 </note>
8172 </desc>
8173 </attribute>
8174
8175 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
8176 <desc>
8177 Defines whether this frame buffer uses the virtual video card's memory
8178 buffer (guest VRAM) directly or not. See <link
8179 to="IFramebuffer::requestResize()"/> for more information.
8180 </desc>
8181 </attribute>
8182
8183 <attribute name="heightReduction" type="unsigned long" readonly="yes">
8184 <desc>
8185 Hint from the frame buffer about how much of the standard
8186 screen height it wants to use for itself. This information is
8187 exposed to the guest through the VESA BIOS and VMMDev interface
8188 so that it can use it for determining its video mode table. It
8189 is not guaranteed that the guest respects the value.
8190 </desc>
8191 </attribute>
8192
8193 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
8194 <desc>
8195 An alpha-blended overlay which is superposed over the frame buffer.
8196 The initial purpose is to allow the display of icons providing
8197 information about the VM state, including disk activity, in front
8198 ends which do not have other means of doing that. The overlay is
8199 designed to controlled exclusively by IDisplay. It has no locking
8200 of its own, and any changes made to it are not guaranteed to be
8201 visible until the affected portion of IFramebuffer is updated. The
8202 overlay can be created lazily the first time it is requested. This
8203 attribute can also return NULL to signal that the overlay is not
8204 implemented.
8205 </desc>
8206 </attribute>
8207
8208 <attribute name="winId" type="unsigned long long" readonly="yes">
8209 <desc>
8210 Platform-dependent identifier of the window where context of this
8211 frame buffer is drawn, or zero if there's no such window.
8212 </desc>
8213 </attribute>
8214
8215 <method name="lock">
8216 <desc>
8217 Locks the frame buffer.
8218 Gets called by the IDisplay object where this frame buffer is
8219 bound to.
8220 </desc>
8221 </method>
8222
8223 <method name="unlock">
8224 <desc>
8225 Unlocks the frame buffer.
8226 Gets called by the IDisplay object where this frame buffer is
8227 bound to.
8228 </desc>
8229 </method>
8230
8231 <method name="notifyUpdate">
8232 <desc>
8233 Informs about an update.
8234 Gets called by the display object where this buffer is
8235 registered.
8236 </desc>
8237 <param name="x" type="unsigned long" dir="in"/>
8238 <param name="y" type="unsigned long" dir="in"/>
8239 <param name="width" type="unsigned long" dir="in"/>
8240 <param name="height" type="unsigned long" dir="in"/>
8241 <param name="finished" type="boolean" dir="return"/>
8242 </method>
8243
8244 <method name="requestResize">
8245 <desc>
8246 Requests a size and pixel format change.
8247
8248 There are two modes of working with the video buffer of the virtual
8249 machine. The <i>indirect</i> mode implies that the IFramebuffer
8250 implementation allocates a memory buffer for the requested display mode
8251 and provides it to the virtual machine. In <i>direct</i> mode, the
8252 IFramebuffer implementation uses the memory buffer allocated and owned
8253 by the virtual machine. This buffer represents the video memory of the
8254 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
8255 usually faster because the implementation gets a raw pointer to the
8256 guest VRAM buffer which it can directly use for visualizing the contents
8257 of the virtual display, as opposed to the indirect mode where the
8258 contents of guest VRAM are copied to the memory buffer provided by
8259 the implementation every time a display update occurs.
8260
8261 It is important to note that the direct mode is really fast only when
8262 the implementation uses the given guest VRAM buffer directly, for
8263 example, by blitting it to the window representing the virtual machine's
8264 display, which saves at least one copy operation comparing to the
8265 indirect mode. However, using the guest VRAM buffer directly is not
8266 always possible: the format and the color depth of this buffer may be
8267 not supported by the target window, or it may be unknown (opaque) as in
8268 case of text or non-linear multi-plane VGA video modes. In this case,
8269 the indirect mode (that is always available) should be used as a
8270 fallback: when the guest VRAM contents are copied to the
8271 implementation-provided memory buffer, color and format conversion is
8272 done automatically by the underlying code.
8273
8274 The @a pixelFormat parameter defines whether the direct mode is
8275 available or not. If @a pixelFormat is <link
8276 to="PixelFormat::Opaque"/> then direct access to the guest
8277 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
8278 bytesPerLine parameters must be ignored and the implementation must use
8279 the indirect mode (where it provides its own buffer in one of the
8280 supported formats). In all other cases, @a pixelFormat together with @a
8281 bitsPerPixel and @a bytesPerLine define the format of the video memory
8282 buffer pointed to by the @a VRAM parameter and the implementation is
8283 free to choose which mode to use. To indicate that this frame buffer uses
8284 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
8285 attribute must return <tt>true</tt> and <link to="#address"/> must
8286 return exactly the same address that is passed in the @a VRAM parameter
8287 of this method; otherwise it is assumed that the indirect strategy is
8288 chosen.
8289
8290 The @a width and @a height parameters represent the size of the
8291 requested display mode in both modes. In case of indirect mode, the
8292 provided memory buffer should be big enough to store data of the given
8293 display mode. In case of direct mode, it is guaranteed that the given @a
8294 VRAM buffer contains enough space to represent the display mode of the
8295 given size. Note that this frame buffer's <link to="#width"/> and <link
8296 to="#height"/> attributes must return exactly the same values as
8297 passed to this method after the resize is completed (see below).
8298
8299 The @a finished output parameter determines if the implementation has
8300 finished resizing the frame buffer or not. If, for some reason, the
8301 resize cannot be finished immediately during this call, @a finished
8302 must be set to @c false, and the implementation must call
8303 <link to="IDisplay::resizeCompleted()"/> after it has returned from
8304 this method as soon as possible. If @a finished is @c false, the
8305 machine will not call any frame buffer methods until
8306 <link to="IDisplay::resizeCompleted()"/> is called.
8307
8308 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
8309 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
8310 this frame buffer must return exactly the same values as specified in the
8311 parameters of this method, after the resize is completed. If the
8312 indirect mode is chosen, these attributes must return values describing
8313 the format of the implementation's own memory buffer <link
8314 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
8315 value must always correlate with <link to="#pixelFormat"/>. Note that
8316 the <link to="#pixelFormat"/> attribute must never return <link
8317 to="PixelFormat::Opaque"/> regardless of the selected mode.
8318
8319 <note>
8320 This method is called by the IDisplay object under the
8321 <link to="#lock()"/> provided by this IFramebuffer
8322 implementation. If this method returns @c false in @a finished, then
8323 this lock is not released until
8324 <link to="IDisplay::resizeCompleted()"/> is called.
8325 </note>
8326 </desc>
8327 <param name="screenId" type="unsigned long" dir="in">
8328 <desc>
8329 Logical screen number. Must be used in the corresponding call to
8330 <link to="IDisplay::resizeCompleted()"/> if this call is made.
8331 </desc>
8332 </param>
8333 <param name="pixelFormat" type="unsigned long" dir="in">
8334 <desc>
8335 Pixel format of the memory buffer pointed to by @a VRAM.
8336 See also <link to="FramebufferPixelFormat"/>.
8337 </desc>
8338 </param>
8339 <param name="VRAM" type="octet" mod="ptr" dir="in">
8340 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
8341 </param>
8342 <param name="bitsPerPixel" type="unsigned long" dir="in">
8343 <desc>Color depth, bits per pixel.</desc>
8344 </param>
8345 <param name="bytesPerLine" type="unsigned long" dir="in">
8346 <desc>Size of one scan line, in bytes.</desc>
8347 </param>
8348 <param name="width" type="unsigned long" dir="in">
8349 <desc>Width of the guest display, in pixels.</desc>
8350 </param>
8351 <param name="height" type="unsigned long" dir="in">
8352 <desc>Height of the guest display, in pixels.</desc>
8353 </param>
8354 <param name="finished" type="boolean" dir="return">
8355 <desc>
8356 Can the VM start using the new frame buffer immediately
8357 after this method returns or it should wait for
8358 <link to="IDisplay::resizeCompleted()"/>.
8359 </desc>
8360 </param>
8361 </method>
8362
8363 <method name="operationSupported">
8364 <desc>
8365 Returns whether the given acceleration operation is supported
8366 by the IFramebuffer implementation. If not, the display object
8367 will not attempt to call the corresponding IFramebuffer entry
8368 point. Even if an operation is indicated to supported, the
8369 IFramebuffer implementation always has the option to return non
8370 supported from the corresponding acceleration method in which
8371 case the operation will be performed by the display engine. This
8372 allows for reduced IFramebuffer implementation complexity where
8373 only common cases are handled.
8374 </desc>
8375 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
8376 <param name="supported" type="boolean" dir="return"/>
8377 </method>
8378
8379 <method name="videoModeSupported">
8380 <desc>
8381 Returns whether the frame buffer implementation is willing to
8382 support a given video mode. In case it is not able to render
8383 the video mode (or for some reason not willing), it should
8384 return false. Usually this method is called when the guest
8385 asks the VMM device whether a given video mode is supported
8386 so the information returned is directly exposed to the guest.
8387 It is important that this method returns very quickly.
8388 </desc>
8389 <param name="width" type="unsigned long" dir="in"/>
8390 <param name="height" type="unsigned long" dir="in"/>
8391 <param name="bpp" type="unsigned long" dir="in"/>
8392 <param name="supported" type="boolean" dir="return"/>
8393 </method>
8394
8395 <method name="solidFill">
8396 <desc>
8397 Fills the specified rectangle on screen with a solid color.
8398 </desc>
8399 <param name="x" type="unsigned long" dir="in"/>
8400 <param name="y" type="unsigned long" dir="in"/>
8401 <param name="width" type="unsigned long" dir="in"/>
8402 <param name="height" type="unsigned long" dir="in"/>
8403 <param name="color" type="unsigned long" dir="in"/>
8404 <param name="handled" type="boolean" dir="return"/>
8405 </method>
8406
8407 <method name="copyScreenBits">
8408 <desc>
8409 Copies specified rectangle on the screen.
8410 </desc>
8411 <param name="xDst" type="unsigned long" dir="in"/>
8412 <param name="yDst" type="unsigned long" dir="in"/>
8413 <param name="xSrc" type="unsigned long" dir="in"/>
8414 <param name="ySrc" type="unsigned long" dir="in"/>
8415 <param name="width" type="unsigned long" dir="in"/>
8416 <param name="height" type="unsigned long" dir="in"/>
8417 <param name="handled" type="boolean" dir="return"/>
8418 </method>
8419
8420 <method name="getVisibleRegion">
8421 <desc>
8422 Returns the visible region of this frame buffer.
8423
8424 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
8425 @a count parameter is ignored and the number of elements necessary to
8426 describe the current visible region is returned in @a countCopied.
8427
8428 If @a rectangles is not <tt>NULL</tt> but @a count is less
8429 than the required number of elements to store region data, the method
8430 will report a failure. If @a count is equal or greater than the
8431 required number of elements, then the actual number of elements copied
8432 to the provided array will be returned in @a countCopied.
8433
8434 <note>
8435 The address of the provided array must be in the process space of
8436 this IFramebuffer object.
8437 </note>
8438 </desc>
8439 <param name="rectangles" type="octet" mod="ptr" dir="in">
8440 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
8441 </param>
8442 <param name="count" type="unsigned long" dir="in">
8443 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8444 </param>
8445 <param name="countCopied" type="unsigned long" dir="return">
8446 <desc>Number of elements copied to the @a rectangles array.</desc>
8447 </param>
8448 </method>
8449
8450 <method name="setVisibleRegion">
8451 <desc>
8452 Suggests a new visible region to this frame buffer. This region
8453 represents the area of the VM display which is a union of regions of
8454 all top-level windows of the guest operating system running inside the
8455 VM (if the Guest Additions for this system support this
8456 functionality). This information may be used by the frontends to
8457 implement the seamless desktop integration feature.
8458
8459 <note>
8460 The address of the provided array must be in the process space of
8461 this IFramebuffer object.
8462 </note>
8463 <note>
8464 The IFramebuffer implementation must make a copy of the provided
8465 array of rectangles.
8466 </note>
8467 </desc>
8468 <param name="rectangles" type="octet" mod="ptr" dir="in">
8469 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
8470 </param>
8471 <param name="count" type="unsigned long" dir="in">
8472 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8473 </param>
8474 </method>
8475
8476 </interface>
8477
8478 <interface
8479 name="IFramebufferOverlay" extends="IFrameBuffer"
8480 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
8481 wsmap="suppress"
8482 >
8483 <desc>
8484 The IFramebufferOverlay interface represents an alpha blended overlay
8485 for displaying status icons above an IFramebuffer. It is always created
8486 not visible, so that it must be explicitly shown. It only covers a
8487 portion of the IFramebuffer, determined by its width, height and
8488 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
8489 that order) format, and may be written to directly. Do re-read the
8490 width though, after setting it, as it may be adjusted (increased) to
8491 make it more suitable for the front end.
8492 </desc>
8493 <attribute name="x" type="unsigned long" readonly="yes">
8494 <desc>X position of the overlay, relative to the frame buffer.</desc>
8495 </attribute>
8496
8497 <attribute name="y" type="unsigned long" readonly="yes">
8498 <desc>Y position of the overlay, relative to the frame buffer.</desc>
8499 </attribute>
8500
8501 <attribute name="visible" type="boolean" readonly="no">
8502 <desc>
8503 Whether the overlay is currently visible.
8504 </desc>
8505 </attribute>
8506
8507 <attribute name="alpha" type="unsigned long" readonly="no">
8508 <desc>
8509 The global alpha value for the overlay. This may or may not be
8510 supported by a given front end.
8511 </desc>
8512 </attribute>
8513
8514 <method name="move">
8515 <desc>
8516 Changes the overlay's position relative to the IFramebuffer.
8517 </desc>
8518 <param name="x" type="unsigned long" dir="in"/>
8519 <param name="y" type="unsigned long" dir="in"/>
8520 </method>
8521
8522 </interface>
8523
8524 <interface
8525 name="IDisplay" extends="$unknown"
8526 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
8527 wsmap="suppress"
8528 >
8529 <desc>
8530 The IDisplay interface represents the virtual machine's display.
8531
8532 The object implementing this interface is contained in each
8533 <link to="IConsole::display"/> attribute and represents the visual
8534 output of the virtual machine.
8535
8536 The virtual display supports pluggable output targets represented by the
8537 IFramebuffer interface. Examples of the output target are a window on
8538 the host computer or an RDP session's display on a remote computer.
8539 </desc>
8540 <attribute name="width" type="unsigned long" readonly="yes">
8541 <desc>Current display width.</desc>
8542 </attribute>
8543
8544 <attribute name="height" type="unsigned long" readonly="yes">
8545 <desc>Current display height.</desc>
8546 </attribute>
8547
8548 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8549 <desc>
8550 Current guest display color depth. Note that this may differ
8551 from <link to="IFramebuffer::bitsPerPixel"/>.
8552 </desc>
8553 </attribute>
8554
8555 <method name="setupInternalFramebuffer">
8556 <desc>
8557 Prepares an internally managed frame buffer.
8558 </desc>
8559 <param name="depth" type="unsigned long" dir="in"/>
8560 </method>
8561
8562 <method name="lockFramebuffer">
8563 <desc>
8564 Requests access to the internal frame buffer.
8565 </desc>
8566 <param name="address" type="octet" mod="ptr" dir="return"/>
8567 </method>
8568
8569 <method name="unlockFramebuffer">
8570 <desc>
8571 Releases access to the internal frame buffer.
8572 </desc>
8573 </method>
8574
8575 <method name="registerExternalFramebuffer">
8576 <desc>
8577 Registers an external frame buffer.
8578 </desc>
8579 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8580 </method>
8581
8582 <method name="setFramebuffer">
8583 <desc>
8584 Sets the framebuffer for given screen.
8585 </desc>
8586 <param name="screenId" type="unsigned long" dir="in"/>
8587 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8588 </method>
8589
8590 <method name="getFramebuffer">
8591 <desc>
8592 Queries the framebuffer for given screen.
8593 </desc>
8594 <param name="screenId" type="unsigned long" dir="in"/>
8595 <param name="framebuffer" type="IFramebuffer" dir="out"/>
8596 <param name="xOrigin" type="long" dir="out"/>
8597 <param name="yOrigin" type="long" dir="out"/>
8598 </method>
8599
8600 <method name="setVideoModeHint">
8601 <desc>
8602 Asks VirtualBox to request the given video mode from
8603 the guest. This is just a hint and it cannot be guaranteed
8604 that the requested resolution will be used. Guest Additions
8605 are required for the request to be seen by guests. The caller
8606 should issue the request and wait for a resolution change and
8607 after a timeout retry.
8608
8609 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
8610 parameters means that the corresponding values should be taken from the
8611 current video mode (i.e. left unchanged).
8612
8613 If the guest OS supports multi-monitor configuration then the @a display
8614 parameter specifies the number of the guest display to send the hint to:
8615 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
8616 so on. If the multi-monitor configuration is not supported, @a display
8617 must be <tt>0</tt>.
8618
8619 </desc>
8620 <param name="width" type="unsigned long" dir="in"/>
8621 <param name="height" type="unsigned long" dir="in"/>
8622 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
8623 <param name="display" type="unsigned long" dir="in"/>
8624 </method>
8625
8626 <method name="setSeamlessMode">
8627 <desc>
8628 Enables or disables seamless guest display rendering (seamless desktop
8629 integration) mode.
8630 <note>
8631 Calling this method has no effect if <link
8632 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
8633 </note>
8634 </desc>
8635 <param name="enabled" type="boolean" dir="in"/>
8636 </method>
8637
8638 <method name="takeScreenShot">
8639 <desc>
8640 Takes a screen shot of the requested size and copies it to the
8641 32-bpp buffer allocated by the caller.
8642 </desc>
8643 <param name="address" type="octet" mod="ptr" dir="in"/>
8644 <param name="width" type="unsigned long" dir="in"/>
8645 <param name="height" type="unsigned long" dir="in"/>
8646 </method>
8647
8648 <method name="drawToScreen">
8649 <desc>
8650 Draws a 32-bpp image of the specified size from the given buffer
8651 to the given point on the VM display.
8652 </desc>
8653 <param name="address" type="octet" mod="ptr" dir="in"/>
8654 <param name="x" type="unsigned long" dir="in"/>
8655 <param name="y" type="unsigned long" dir="in"/>
8656 <param name="width" type="unsigned long" dir="in"/>
8657 <param name="height" type="unsigned long" dir="in"/>
8658 </method>
8659
8660 <method name="invalidateAndUpdate">
8661 <desc>
8662 Does a full invalidation of the VM display and instructs the VM
8663 to update it.
8664 </desc>
8665 </method>
8666
8667 <method name="resizeCompleted">
8668 <desc>
8669 Signals that a framebuffer has completed the resize operation.
8670 </desc>
8671 <param name="screenId" type="unsigned long" dir="in"/>
8672 </method>
8673
8674 <method name="updateCompleted">
8675 <desc>
8676 Signals that a framebuffer has completed the update operation.
8677 </desc>
8678 </method>
8679
8680 </interface>
8681
8682 <!--
8683 // INetworkAdapter
8684 /////////////////////////////////////////////////////////////////////////
8685 -->
8686
8687 <enum
8688 name="NetworkAttachmentType"
8689 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
8690 >
8691 <desc>
8692 Network attachment type.
8693 </desc>
8694
8695 <const name="Null" value="0">
8696 <desc><tt>null</tt> value. Also means "not attached".</desc>
8697 </const>
8698 <const name="NAT" value="1"/>
8699 <const name="HostInterface" value="2"/>
8700 <const name="Internal" value="3"/>
8701 </enum>
8702
8703 <enum
8704 name="NetworkAdapterType"
8705 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
8706 >
8707 <desc>
8708 Network adapter type.
8709 </desc>
8710
8711 <const name="Null" value="0">
8712 <desc><tt>null</tt> value. Never used by the API.</desc>
8713 </const>
8714 <const name="Am79C970A" value="1"/>
8715 <const name="Am79C973" value="2"/>
8716 <const name="I82540EM" value="3"/>
8717 <const name="I82543GC" value="4"/>
8718 </enum>
8719
8720 <interface
8721 name="INetworkAdapter" extends="$unknown"
8722 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
8723 wsmap="managed"
8724 >
8725 <attribute name="adapterType" type="NetworkAdapterType">
8726 <desc>
8727 Type of the virtual network adapter. Depending on this value,
8728 VirtualBox will provide a different virtual network hardware
8729 to the guest.
8730 </desc>
8731 </attribute>
8732
8733 <attribute name="slot" type="unsigned long" readonly="yes">
8734 <desc>
8735 Slot number this adapter is plugged into. Corresponds to
8736 the value you pass to <link to="IMachine::getNetworkAdapter"/>
8737 to obtain this instance.
8738 </desc>
8739 </attribute>
8740
8741 <attribute name="enabled" type="boolean">
8742 <desc>
8743 Flag whether the network adapter is present in the
8744 guest system. If disabled, the virtual guest hardware will
8745 not contain this network adapter. Can only be changed when
8746 the VM is not running.
8747 </desc>
8748 </attribute>
8749
8750 <attribute name="MACAddress" type="wstring">
8751 <desc>
8752 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
8753 it to NULL, VirtualBox will generate a unique MAC address.
8754 </desc>
8755 </attribute>
8756
8757 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
8758
8759 <attribute name="hostInterface" type="wstring">
8760 <desc>
8761 Name of the Host Network Interface that is currently in use. NULL will be returned
8762 if no device has been allocated. On Linux, setting this refers to a permanent TAP
8763 device. However, a file descriptor has precedence over the interface name on Linux.
8764 Note that when VirtualBox allocates a TAP device, this property will not be set, i.e. the
8765 interface name would have to be determined using the file descriptor and /proc/self/fd.
8766 </desc>
8767 </attribute>
8768
8769<if target="xpidl">
8770 <attribute name="TAPFileDescriptor" type="long">
8771 <desc>
8772 File descriptor of the TAP device. It can either be setup by the caller
8773 which has to supply an existing valid file handle allocated in the parent
8774 process of the VM process or allocated by VirtualBox. The value is -1 if it
8775 has not been defined. This property is non persistent, i.e. it will not be
8776 stored in the VM's configuration data and thus has to be set at each startup.
8777 </desc>
8778 </attribute>
8779 <attribute name="TAPSetupApplication" type="wstring">
8780 <desc>
8781 Application to start to configure the TAP device.
8782 It is being passed two parameters, 1) the file handle (as ASCII),
8783 2) the TAP device name if it is available.
8784 </desc>
8785 </attribute>
8786 <attribute name="TAPTerminateApplication" type="wstring">
8787 <desc>
8788 Application to start before closing a TAP device.
8789 It is being passed two parameters, 1) the file handle (as ASCII),
8790 2) the TAP device name if it is available.
8791 </desc>
8792 </attribute>
8793</if>
8794
8795 <attribute name="internalNetwork" type="wstring">
8796 <desc>
8797 Name of the internal network the VM is attached to.
8798 </desc>
8799 </attribute>
8800
8801 <attribute name="NATNetwork" type="wstring">
8802 <desc>
8803 Name of the NAT network the VM is attached to.
8804 </desc>
8805 </attribute>
8806
8807 <attribute name="cableConnected" type="boolean">
8808 <desc>
8809 Flag whether the adapter reports the cable as connected or not.
8810 It can be used to report offline situations to a VM.
8811 </desc>
8812 </attribute>
8813
8814 <attribute name="lineSpeed" type="unsigned long">
8815 <desc>
8816 Line speed reported by custom drivers, in units of 1 kbps.
8817 </desc>
8818 </attribute>
8819
8820 <attribute name="traceEnabled" type="boolean">
8821 <desc>
8822 Flag whether network traffic from/to the network card should be traced.
8823 Can only be toggled when the VM is turned off.
8824 </desc>
8825 </attribute>
8826
8827 <attribute name="traceFile" type="wstring">
8828 <desc>
8829 Filename where a network trace will be stored. If not set, VBox-pid.pcap
8830 will be used.
8831 </desc>
8832 </attribute>
8833
8834 <method name="attachToNAT">
8835 <desc>
8836 Attach the network adapter to the Network Address Translation (NAT) interface.
8837 </desc>
8838 </method>
8839
8840 <method name="attachToHostInterface">
8841 <desc>
8842 Attach the network adapter to a host interface. On Linux, the TAP
8843 setup application will be executed if configured and unless a device
8844 name and/or file descriptor has been set, a new TAP interface will be
8845 created.
8846 </desc>
8847 </method>
8848
8849 <method name="attachToInternalNetwork">
8850 <desc>
8851 Attach the network adapter to an internal network.
8852 </desc>
8853 </method>
8854
8855 <method name="detach">
8856 <desc>
8857 Detach the network adapter
8858 </desc>
8859 </method>
8860 </interface>
8861
8862
8863 <!--
8864 // ISerialPort
8865 /////////////////////////////////////////////////////////////////////////
8866 -->
8867
8868 <enum
8869 name="PortMode"
8870 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
8871 >
8872 <desc>
8873 The PortMode enumeration represents possible communication modes for
8874 the virtual serial port device.
8875 </desc>
8876
8877 <const name="Disconnected" value="0">
8878 <desc>Virtual device is not attached to any real host device.</desc>
8879 </const>
8880 <const name="HostPipe" value="1">
8881 <desc>Virtual device is attached to a host pipe.</desc>
8882 </const>
8883 <const name="HostDevice" value="2">
8884 <desc>Virtual device is attached to a host device.</desc>
8885 </const>
8886 </enum>
8887
8888 <interface
8889 name="ISerialPort" extends="$unknown"
8890 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
8891 wsmap="managed"
8892 >
8893
8894 <desc>
8895 The ISerialPort interface represents the virtual serial port device.
8896
8897 The virtual serial port device acts like an ordinary serial port
8898 inside the virtual machine. This device communicates to the real
8899 serial port hardware in one of two modes: host pipe or host device.
8900
8901 In host pipe mode, the #path attribute specifies the path to the pipe on
8902 the host computer that represents a serial port. The #server attribute
8903 determines if this pipe is created by the virtual machine process at
8904 machine startup or it must already exist before starting machine
8905 execution.
8906
8907 In host device mode, the #path attribute specifies the name of the
8908 serial port device on the host computer.
8909
8910 There is also a third communication mode: the disconnected mode. In this
8911 mode, the guest OS running inside the virtual machine will be able to
8912 detect the serial port, but all port write operations will be discarded
8913 and all port read operations will return no data.
8914
8915 <see>IMachine::getSerialPort</see>
8916 </desc>
8917
8918 <attribute name="slot" type="unsigned long" readonly="yes">
8919 <desc>
8920 Slot number this serial port is plugged into. Corresponds to
8921 the value you pass to <link to="IMachine::getSerialPort"/>
8922 to obtain this instance.
8923 </desc>
8924 </attribute>
8925
8926 <attribute name="enabled" type="boolean">
8927 <desc>
8928 Flag whether the serial port is enabled. If disabled,
8929 the serial port will not be reported to the guest OS.
8930 </desc>
8931 </attribute>
8932
8933 <attribute name="IOBase" type="unsigned long">
8934 <desc>Base I/O address of the serial port.</desc>
8935 </attribute>
8936
8937 <attribute name="IRQ" type="unsigned long">
8938 <desc>IRQ number of the serial port.</desc>
8939 </attribute>
8940
8941 <attribute name="hostMode" type="PortMode">
8942 <desc>How is this port connected to the host.</desc>
8943 </attribute>
8944
8945 <attribute name="server" type="boolean">
8946 <desc>
8947 Flag whether this serial port acts as a server (creates a new pipe on
8948 the host) or as a client (uses the existing pipe). This attribute is
8949 used only when <link to="#hostMode"/> is PortMode::HostPipe.
8950 </desc>
8951 </attribute>
8952
8953 <attribute name="path" type="wstring">
8954 <desc>
8955 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
8956 PortMode::HostPipe, or the host serial device name when
8957 <link to="#hostMode"/> is PortMode::HostDevice. In either of the above
8958 cases, setting a @c null or an empty string as the attribute's value
8959 will result into an error. Otherwise, the value of this property is
8960 ignored.
8961 </desc>
8962 </attribute>
8963
8964 </interface>
8965
8966 <!--
8967 // IParallelPort
8968 /////////////////////////////////////////////////////////////////////////
8969 -->
8970
8971 <interface
8972 name="IParallelPort" extends="$unknown"
8973 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
8974 wsmap="managed"
8975 >
8976
8977 <desc>
8978 The IParallelPort interface represents the virtual parallel port device.
8979
8980 The virtual parallel port device acts like an ordinary parallel port
8981 inside the virtual machine. This device communicates to the real
8982 parallel port hardware using the name of the parallel device on the host
8983 computer specified in the #path attribute.
8984
8985 Each virtual parallel port device is assigned a base I/O address and an
8986 IRQ number that will be reported to the guest operating system and used
8987 to operate the given parallel port from within the virtual machine.
8988
8989 <see>IMachine::getParallelPort</see>
8990 </desc>
8991
8992 <attribute name="slot" type="unsigned long" readonly="yes">
8993 <desc>
8994 Slot number this parallel port is plugged into. Corresponds to
8995 the value you pass to <link to="IMachine::getParallelPort"/>
8996 to obtain this instance.
8997 </desc>
8998 </attribute>
8999
9000 <attribute name="enabled" type="boolean">
9001 <desc>
9002 Flag whether the parallel port is enabled. If disabled,
9003 the parallel port will not be reported to the guest OS.
9004 </desc>
9005 </attribute>
9006
9007 <attribute name="IOBase" type="unsigned long">
9008 <desc>Base I/O address of the parallel port.</desc>
9009 </attribute>
9010
9011 <attribute name="IRQ" type="unsigned long">
9012 <desc>IRQ number of the parallel port.</desc>
9013 </attribute>
9014
9015 <attribute name="path" type="wstring">
9016 <desc>
9017 Host parallel device name. If this parallel port is enabled, setting a
9018 @c null or an empty string as this attribute's value will result into
9019 an error.
9020 </desc>
9021 </attribute>
9022
9023 </interface>
9024
9025
9026 <!--
9027 // IMachineDebugger
9028 /////////////////////////////////////////////////////////////////////////
9029 -->
9030
9031 <interface
9032 name="IMachineDebugger" extends="$unknown"
9033 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
9034 wsmap="suppress"
9035 >
9036 <method name="resetStats">
9037 <desc>
9038 Reset VM statistics.
9039 </desc>
9040 <param name="pattern" type="wstring" dir="in">
9041 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9042 </param>
9043 </method>
9044
9045 <method name="dumpStats">
9046 <desc>
9047 Dumps VM statistics.
9048 </desc>
9049 <param name="pattern" type="wstring" dir="in">
9050 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9051 </param>
9052 </method>
9053
9054 <method name="getStats">
9055 <desc>
9056 Get the VM statistics in a XMLish format.
9057 </desc>
9058 <param name="pattern" type="wstring" dir="in">
9059 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9060 </param>
9061 <param name="withDescriptions" type="boolean" dir="in">
9062 <desc>Whether to include the descriptions.</desc>
9063 </param>
9064 <param name="stats" type="wstring" dir="out">
9065 <desc>The XML document containing the statistics.</desc>
9066 </param>
9067 </method>
9068
9069 <method name="injectNMI">
9070 <desc>
9071 Inject an NMI into a running VT-x/AMD-V VM.
9072 </desc>
9073 </method>
9074
9075 <attribute name="singlestep" type="boolean">
9076 <desc>Switch for enabling singlestepping.</desc>
9077 </attribute>
9078
9079 <attribute name="recompileUser" type="boolean">
9080 <desc>Switch for forcing code recompilation for user mode code.</desc>
9081 </attribute>
9082
9083 <attribute name="recompileSupervisor" type="boolean">
9084 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
9085 </attribute>
9086
9087 <attribute name="PATMEnabled" type="boolean">
9088 <desc>Switch for enabling and disabling the PATM component.</desc>
9089 </attribute>
9090
9091 <attribute name="CSAMEnabled" type="boolean">
9092 <desc>Switch for enabling and disabling the CSAM component.</desc>
9093 </attribute>
9094
9095 <attribute name="logEnabled" type="boolean">
9096 <desc>Switch for enabling and disabling logging.</desc>
9097 </attribute>
9098
9099 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
9100 <desc>
9101 Flag indicating whether the VM is currently making use of CPU hardware
9102 virtualization extensions.
9103 </desc>
9104 </attribute>
9105
9106 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
9107 <desc>
9108 Flag indicating whether the VM is currently making use of the nested paging
9109 CPU hardware virtualization extension.
9110 </desc>
9111 </attribute>
9112
9113 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
9114 <desc>
9115 Flag indicating whether the VM is currently making use of the VPID
9116 VT-x extension.
9117 </desc>
9118 </attribute>
9119
9120 <attribute name="PAEEnabled" type="boolean" readonly="yes">
9121 <desc>
9122 Flag indicating whether the VM is currently making use of the Physical
9123 Address Extension CPU feature.
9124 </desc>
9125 </attribute>
9126
9127 <attribute name="virtualTimeRate" type="unsigned long">
9128 <desc>
9129 The rate at which the virtual time runs expressed as a percentage.
9130 The accepted range is 2% to 20000%.
9131 </desc>
9132 </attribute>
9133
9134 <!-- @todo method for setting log flags, groups and destination! -->
9135
9136 <attribute name="VM" type="unsigned long long" readonly="yes">
9137 <desc>
9138 Gets the VM handle. This is only for internal use while
9139 we carve the details of this interface.
9140 </desc>
9141 </attribute>
9142
9143 </interface>
9144
9145 <!--
9146 // IUSBController
9147 /////////////////////////////////////////////////////////////////////////
9148 -->
9149
9150 <interface
9151 name="IUSBController" extends="$unknown"
9152 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
9153 wsmap="managed"
9154 >
9155 <attribute name="enabled" type="boolean">
9156 <desc>
9157 Flag whether the USB controller is present in the
9158 guest system. If disabled, the virtual guest hardware will
9159 not contain any USB controller. Can only be changed when
9160 the VM is powered off.
9161 </desc>
9162 </attribute>
9163
9164 <attribute name="enabledEhci" type="boolean">
9165 <desc>
9166 Flag whether the USB EHCI controller is present in the
9167 guest system. If disabled, the virtual guest hardware will
9168 not contain a USB EHCI controller. Can only be changed when
9169 the VM is powered off.
9170 </desc>
9171 </attribute>
9172
9173 <attribute name="USBStandard" type="unsigned short" readonly="yes">
9174 <desc>
9175 USB standard version which the controller implements.
9176 This is a BCD which means that the major version is in the
9177 high byte and minor version is in the low byte.
9178 </desc>
9179 </attribute>
9180
9181 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
9182 <desc>
9183 List of USB device filters associated with the machine.
9184
9185 If the machine is currently running, these filters are activated
9186 every time a new (supported) USB device is attached to the host
9187 computer that was not ignored by global filters
9188 (<link to="IHost::USBDeviceFilters"/>).
9189
9190 These filters are also activated when the machine is powered up.
9191 They are run against a list of all currently available USB
9192 devices (in states
9193 <link to="USBDeviceState::Available">Available</link>,
9194 <link to="USBDeviceState::Busy">Busy</link>,
9195 <link to="USBDeviceState::Held">Held</link>) that were not previously
9196 ignored by global filters.
9197
9198 If at least one filter matches the USB device in question, this
9199 device is automatically captured (attached to) the virtual USB
9200 controller of this machine.
9201
9202 <see>IUSBDeviceFilter, ::IUSBController</see>
9203 </desc>
9204 </attribute>
9205
9206 <method name="createDeviceFilter">
9207 <desc>
9208 Creates a new USB device filter. All attributes except
9209 the filter name are set to <tt>null</tt> (any match),
9210 <i>active</i> is <tt>false</tt> (the filter is not active).
9211
9212 The created filter can then be added to the list of filters using
9213 <link to="#insertDeviceFilter()"/>.
9214
9215 <see>#deviceFilters</see>
9216 </desc>
9217 <param name="name" type="wstring" dir="in">
9218 <desc>
9219 Filter name. See <link to="IUSBDeviceFilter::name"/>
9220 for more info.
9221 </desc>
9222 </param>
9223 <param name="filter" type="IUSBDeviceFilter" dir="return">
9224 <desc>Created filter object.</desc>
9225 </param>
9226 </method>
9227
9228 <method name="insertDeviceFilter">
9229 <desc>
9230 Inserts the given USB device to the specified position
9231 in the list of filters.
9232
9233 Positions are numbered starting from <tt>0</tt>. If the specified
9234 position is equal to or greater than the number of elements in
9235 the list, the filter is added to the end of the collection.
9236
9237 <note>
9238 Duplicates are not allowed, so an attempt to insert a
9239 filter that is already in the collection, will return an
9240 error.
9241 </note>
9242
9243 <see>#deviceFilters</see>
9244 </desc>
9245 <param name="position" type="unsigned long" dir="in">
9246 <desc>Position to insert the filter to.</desc>
9247 </param>
9248 <param name="filter" type="IUSBDeviceFilter" dir="in">
9249 <desc>USB device filter to insert.</desc>
9250 </param>
9251 </method>
9252
9253 <method name="removeDeviceFilter">
9254 <desc>
9255 Removes a USB device filter from the specified position in the
9256 list of filters.
9257
9258 Positions are numbered starting from <tt>0</tt>. Specifying a
9259 position equal to or greater than the number of elements in
9260 the list will produce an error.
9261
9262 <see>#deviceFilters</see>
9263 </desc>
9264 <param name="position" type="unsigned long" dir="in">
9265 <desc>Position to remove the filter from.</desc>
9266 </param>
9267 <param name="filter" type="IUSBDeviceFilter" dir="return">
9268 <desc>Removed USB device filter.</desc>
9269 </param>
9270 </method>
9271
9272 </interface>
9273
9274
9275 <!--
9276 // IUSBDevice
9277 /////////////////////////////////////////////////////////////////////////
9278 -->
9279
9280 <enumerator
9281 name="IUSBDeviceEnumerator" type="IUSBDevice"
9282 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
9283 />
9284
9285 <collection
9286 name="IUSBDeviceCollection" type="IUSBDevice"
9287 enumerator="IUSBDeviceEnumerator"
9288 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
9289 readonly="yes"
9290 >
9291 <method name="findById">
9292 <desc>
9293 Searches this collection for a USB device with the given UUID.
9294 <note>
9295 The method returns an error if the given UUID does not
9296 correspond to any USB device in the collection.
9297 </note>
9298 <see>IUSBDevice::id</see>
9299 </desc>
9300 <param name="id" type="uuid" dir="in">
9301 <desc>UUID of the USB device to search for.</desc>
9302 </param>
9303 <param name="device" type="IUSBDevice" dir="return">
9304 <desc>Found USB device object.</desc>
9305 </param>
9306 </method>
9307
9308 <method name="findByAddress">
9309 <desc>
9310 Searches this collection for a USB device with the given
9311 host address.
9312 <note>
9313 The method returns an error if the given address does not
9314 correspond to any USB device in the collection.
9315 </note>
9316 <see>IUSBDevice::address</see>
9317 </desc>
9318 <param name="name" type="wstring" dir="in">
9319 <desc>
9320 Address of the USB device (as assigned by the host) to
9321 search for.
9322 </desc>
9323 </param>
9324 <param name="device" type="IUSBDevice" dir="return">
9325 <desc>Found USB device object.</desc>
9326 </param>
9327 </method>
9328
9329 </collection>
9330
9331 <interface
9332 name="IUSBDevice" extends="$unknown"
9333 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
9334 wsmap="managed"
9335 >
9336 <desc>
9337 The IUSBDevice interface represents a virtual USB device attached to the
9338 virtual machine.
9339
9340 A collection of objects implementing this interface is stored in the
9341 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
9342 attached to a running virtual machine's USB controller.
9343 </desc>
9344
9345 <attribute name="id" type="uuid" readonly="yes">
9346 <desc>
9347 Unique USB device ID. This ID is built from #vendorId,
9348 #productId, #revision and #serialNumber.
9349 </desc>
9350 </attribute>
9351
9352 <attribute name="vendorId" type="unsigned short" readonly="yes">
9353 <desc>Vendor ID.</desc>
9354 </attribute>
9355
9356 <attribute name="productId" type="unsigned short" readonly="yes">
9357 <desc>Product ID.</desc>
9358 </attribute>
9359
9360 <attribute name="revision" type="unsigned short" readonly="yes">
9361 <desc>
9362 Product revision number. This is a packed BCD represented as
9363 unsigned short. The high byte is the integer part and the low
9364 byte is the decimal.
9365 </desc>
9366 </attribute>
9367
9368 <attribute name="manufacturer" type="wstring" readonly="yes">
9369 <desc>Manufacturer string.</desc>
9370 </attribute>
9371
9372 <attribute name="product" type="wstring" readonly="yes">
9373 <desc>Product string.</desc>
9374 </attribute>
9375
9376 <attribute name="serialNumber" type="wstring" readonly="yes">
9377 <desc>Serial number string.</desc>
9378 </attribute>
9379
9380 <attribute name="address" type="wstring" readonly="yes">
9381 <desc>Host specific address of the device.</desc>
9382 </attribute>
9383
9384 <attribute name="port" type="unsigned short" readonly="yes">
9385 <desc>
9386 Host USB port number the device is physically
9387 connected to.
9388 </desc>
9389 </attribute>
9390
9391 <attribute name="version" type="unsigned short" readonly="yes">
9392 <desc>
9393 The major USB version of the device - 1 or 2.
9394 </desc>
9395 </attribute>
9396
9397 <attribute name="portVersion" type="unsigned short" readonly="yes">
9398 <desc>
9399 The major USB version of the host USB port the device is
9400 physically connected to - 1 or 2. For devices not connected to
9401 anything this will have the same value as the version attribute.
9402 </desc>
9403 </attribute>
9404
9405 <attribute name="remote" type="boolean" readonly="yes">
9406 <desc>
9407 Whether the device is physically connected to a remote VRDP
9408 client or to a local host machine.
9409 </desc>
9410 </attribute>
9411
9412 </interface>
9413
9414
9415 <!--
9416 // IUSBDeviceFilter
9417 /////////////////////////////////////////////////////////////////////////
9418 -->
9419
9420 <enumerator
9421 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
9422 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
9423 />
9424
9425 <collection
9426 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
9427 enumerator="IUSBDeviceFilterEnumerator"
9428 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
9429 readonly="yes"
9430 />
9431
9432 <interface
9433 name="IUSBDeviceFilter" extends="$unknown"
9434 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
9435 wsmap="managed"
9436 >
9437 <desc>
9438 The IUSBDeviceFilter interface represents an USB device filter used
9439 to perform actions on a group of USB devices.
9440
9441 This type of filters is used by running virtual machines to
9442 automatically capture selected USB devices once they are physically
9443 attached to the host computer.
9444
9445 A USB device is matched to the given device filter if and only if all
9446 attributes of the device match the corresponding attributes of the
9447 filter (that is, attributes are joined together using the logical AND
9448 operation). On the other hand, all together, filters in the list of
9449 filters carry the semantics of the logical OR operation. So if it is
9450 desirable to create a match like "this vendor id OR this product id",
9451 one needs to create two filters and specify "any match" (see below)
9452 for unused attributes.
9453
9454 All filter attributes used for matching are strings. Each string
9455 is an expression representing a set of values of the corresponding
9456 device attribute, that will match the given filter. Currently, the
9457 following filtering expressions are supported:
9458
9459 <ul>
9460 <li><i>Interval filters</i>. Used to specify valid intervals for
9461 integer device attributes (Vendor ID, Product ID and Revision).
9462 The format of the string is:
9463
9464 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
9465
9466 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
9467 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
9468 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
9469 is omitted before a dash (<tt>-</tt>), the minimum possible integer
9470 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
9471 possible integer is assumed.
9472 </li>
9473 <li><i>Boolean filters</i>. Used to specify acceptable values for
9474 boolean device attributes. The format of the string is:
9475
9476 <tt>true|false|yes|no|0|1</tt>
9477
9478 </li>
9479 <li><i>Exact match</i>. Used to specify a single value for the given
9480 device attribute. Any string that doesn't start with <tt>int:</tt>
9481 represents the exact match. String device attributes are compared to
9482 this string including case of symbols. Integer attributes are first
9483 converted to a string (see individual filter attributes) and then
9484 compared ignoring case.
9485
9486 </li>
9487 <li><i>Any match</i>. Any value of the corresponding device attribute
9488 will match the given filter. An empty or <tt>null</tt> string is
9489 used to construct this type of filtering expressions.
9490
9491 </li>
9492 </ul>
9493
9494 <note>
9495 On the Windows host platform, interval filters are not currently
9496 available. Also all string filter attributes
9497 (<link to="#manufacturer"/>, <link to="#product"/>,
9498 <link to="#serialNumber"/>) are ignored, so they behave as
9499 <i>any match</i> no matter what string expression is specified.
9500 </note>
9501
9502 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
9503 </desc>
9504
9505 <attribute name="name" type="wstring">
9506 <desc>
9507 Visible name for this filter.
9508 This name is used to visually distinguish one filter from another,
9509 so it can neither be <tt>null</tt> nor an empty string.
9510 </desc>
9511 </attribute>
9512
9513 <attribute name="active" type="boolean">
9514 <desc>Whether this filter active or has been temporarily disabled.</desc>
9515 </attribute>
9516
9517 <attribute name="vendorId" type="wstring">
9518 <desc>
9519 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
9520 The string representation for the <i>exact matching</i>
9521 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9522 (including leading zeroes).
9523 </desc>
9524 </attribute>
9525
9526 <attribute name="productId" type="wstring">
9527 <desc>
9528 <link to="IUSBDevice::productId">Product ID</link> filter.
9529 The string representation for the <i>exact matching</i>
9530 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9531 (including leading zeroes).
9532 </desc>
9533 </attribute>
9534
9535 <attribute name="revision" type="wstring">
9536 <desc>
9537 <link to="IUSBDevice::productId">Product revision number</link>
9538 filter. The string representation for the <i>exact matching</i>
9539 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
9540 of the integer part of the revision, and <tt>F</tt> is the
9541 decimal digit of its fractional part (including leading and
9542 trailing zeros).
9543 Note that for interval filters, it's best to use the hexadecimal
9544 form, because the revision is stored as a 16 bit packed BCD value;
9545 so the expression <tt>int:0x0100-0x0199</tt> will match any
9546 revision from <tt>1.0</tt> to <tt>1.99</tt>.
9547 </desc>
9548 </attribute>
9549
9550 <attribute name="manufacturer" type="wstring">
9551 <desc>
9552 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
9553 </desc>
9554 </attribute>
9555
9556 <attribute name="product" type="wstring">
9557 <desc>
9558 <link to="IUSBDevice::product">Product</link> filter.
9559 </desc>
9560 </attribute>
9561
9562 <attribute name="serialNumber" type="wstring">
9563 <desc>
9564 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
9565 </desc>
9566 </attribute>
9567
9568 <attribute name="port" type="wstring">
9569 <desc>
9570 <link to="IUSBDevice::port">Host USB port</link> filter.
9571 </desc>
9572 </attribute>
9573
9574 <attribute name="remote" type="wstring">
9575 <desc>
9576 <link to="IUSBDevice::remote">Remote state</link> filter.
9577 <note>
9578 This filter makes sense only for machine USB filters,
9579 i.e. it is ignored by IHostUSBDeviceFilter objects.
9580 </note>
9581 </desc>
9582 </attribute>
9583
9584 <attribute name="maskedInterfaces" type="unsigned long">
9585 <desc>
9586 This is an advanced option for hiding one or more USB interfaces
9587 from the guest. The value is a bit mask where the bits that are set
9588 means the corresponding USB interface should be hidden, masked off
9589 if you like.
9590 This feature only works on Linux hosts.
9591 </desc>
9592 </attribute>
9593
9594 </interface>
9595
9596
9597 <!--
9598 // IHostUSBDevice
9599 /////////////////////////////////////////////////////////////////////////
9600 -->
9601
9602 <enum
9603 name="USBDeviceState"
9604 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
9605 >
9606 <desc>
9607 USB device state. This enumeration represents all possible states
9608 of the USB device physically attached to the host computer regarding
9609 its state on the host computer and availability to guest computers
9610 (all currently running virtual machines).
9611
9612 Once a supported USB device is attached to the host, global USB
9613 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
9614 either ignore the device, or put it to #Held state, or do nothing. Unless
9615 the device is ignored by global filters, filters of all currently running
9616 guests (<link to="IUSBController::deviceFilters"/>) are activated that can
9617 put it to #Captured state.
9618
9619 If the device was ignored by global filters, or didn't match
9620 any filters at all (including guest ones), it is handled by the host
9621 in a normal way. In this case, the device state is determined by
9622 the host and can be one of #Unavailable, #Busy or #Available, depending on
9623 the current device usage.
9624
9625 Besides auto-capturing based on filters, the device can be manually
9626 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
9627 state is #Busy, #Available or #Held.
9628
9629 <note>
9630 Due to differences in USB stack implementations in Linux and Win32,
9631 states #Busy and #Available are applicable only to the Linux version of
9632 the product. This also means that (<link
9633 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if
9634 the device state is #Held.
9635 </note>
9636
9637 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
9638 </desc>
9639
9640 <const name="NotSupported" value="0">
9641 <desc>
9642 Not supported by the VirtualBox server, not available to guests.
9643 </desc>
9644 </const>
9645 <const name="Unavailable" value="1">
9646 <desc>
9647 Being used by the host computer exclusively,
9648 not available to guests.
9649 </desc>
9650 </const>
9651 <const name="Busy" value="2">
9652 <desc>
9653 Being used by the host computer, potentially available to guests.
9654 </desc>
9655 </const>
9656 <const name="Available" value="3">
9657 <desc>
9658 Not used by the host computer, available to guests.
9659 The host computer can also start using the device at any time.
9660 </desc>
9661 </const>
9662 <const name="Held" value="4">
9663 <desc>
9664 Held by the VirtualBox server (ignored by the host computer),
9665 available to guests.
9666 </desc>
9667 </const>
9668 <const name="Captured" value="5">
9669 <desc>
9670 Captured by one of the guest computers, not available
9671 to anybody else.
9672 </desc>
9673 </const>
9674 </enum>
9675
9676 <enumerator
9677 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
9678 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
9679 />
9680
9681 <collection
9682 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
9683 enumerator="IHostUSBDeviceEnumerator"
9684 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
9685 readonly="yes"
9686 >
9687 <method name="findById">
9688 <desc>
9689 Searches this collection for a USB device with the given UUID.
9690 <note>
9691 The method returns an error if the given UUID does not
9692 correspond to any USB device in the collection.
9693 </note>
9694 <see>IHostUSBDevice::id</see>
9695 </desc>
9696 <param name="id" type="uuid" dir="in">
9697 <desc>UUID of the USB device to search for.</desc>
9698 </param>
9699 <param name="device" type="IHostUSBDevice" dir="return">
9700 <desc>Found USB device object.</desc>
9701 </param>
9702 </method>
9703
9704 <method name="findByAddress">
9705 <desc>
9706 Searches this collection for a USB device with the given
9707 host address.
9708 <note>
9709 The method returns an error if the given address does not
9710 correspond to any USB device in the collection.
9711 </note>
9712 <see>IHostUSBDevice::address</see>
9713 </desc>
9714 <param name="name" type="wstring" dir="in">
9715 <desc>
9716 Address of the USB device (as assigned by the host) to
9717 search for.
9718 </desc>
9719 </param>
9720 <param name="device" type="IHostUSBDevice" dir="return">
9721 <desc>Found USB device object.</desc>
9722 </param>
9723 </method>
9724
9725 </collection>
9726
9727 <interface
9728 name="IHostUSBDevice" extends="IUSBDevice"
9729 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
9730 wsmap="managed"
9731 >
9732 <desc>
9733 The IHostUSBDevice interface represents a physical USB device attached
9734 to the host computer.
9735
9736 Besides properties inherited from IUSBDevice, this interface adds the
9737 <link to="#state"/> property that holds the current state of the USB
9738 device.
9739
9740 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
9741 </desc>
9742
9743 <attribute name="state" type="USBDeviceState" readonly="yes">
9744 <desc>
9745 Current state of the device.
9746 </desc>
9747 </attribute>
9748
9749 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
9750
9751 </interface>
9752
9753
9754 <!--
9755 // IHostUSBDeviceFilter
9756 /////////////////////////////////////////////////////////////////////////
9757 -->
9758
9759 <enum
9760 name="USBDeviceFilterAction"
9761 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
9762 >
9763 <desc>
9764 Actions for host USB device filters.
9765 <see>IHostUSBDeviceFilter, USBDeviceState</see>
9766 </desc>
9767
9768 <const name="Null" value="0">
9769 <desc><tt>null</tt> value. Never used by the API.</desc>
9770 </const>
9771 <const name="Ignore" value="1">
9772 <desc>Ignore the matched USB device.</desc>
9773 </const>
9774 <const name="Hold" value="2">
9775 <desc>Hold the matched USB device.</desc>
9776 </const>
9777 </enum>
9778
9779 <enumerator
9780 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
9781 uuid="ff735211-903e-4642-9c37-189eb44579fe"
9782 />
9783
9784 <collection
9785 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
9786 enumerator="IHostUSBDeviceFilterEnumerator"
9787 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
9788 readonly="yes"
9789 />
9790
9791 <interface
9792 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
9793 uuid="4cc70246-d74a-400f-8222-3900489c0374"
9794 wsmap="managed"
9795 >
9796 <desc>
9797 The IHostUSBDeviceFilter interface represents a global filter for a
9798 physical USB device used by the host computer. Used indirectly in
9799 <link to="IHost::USBDeviceFilters"/>.
9800
9801 Using filters of this type, the host computer determines the initial
9802 state of the USB device after it is physically attached to the
9803 host's USB controller.
9804
9805 <note>
9806 The <link to="#remote"/> attribute is ignored by this type of
9807 filters, because it makes sense only for
9808 <link to="IUSBController::deviceFilters">machine USB filters</link>.
9809 </note>
9810
9811 <see>IHost::USBDeviceFilters</see>
9812 </desc>
9813
9814 <attribute name="action" type="USBDeviceFilterAction">
9815 <desc>
9816 Action performed by the host when an attached USB device
9817 matches this filter.
9818 </desc>
9819 </attribute>
9820
9821 </interface>
9822
9823 <!--
9824 // IAudioAdapter
9825 /////////////////////////////////////////////////////////////////////////
9826 -->
9827
9828 <enum
9829 name="AudioDriverType"
9830 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
9831 >
9832 <desc>
9833 Host audio driver type.
9834 </desc>
9835
9836 <const name="Null" value="0">
9837 <desc><tt>null</tt> value. Also means "dummy audio driver".</desc>
9838 </const>
9839 <const name="WinMM" value="1"/>
9840 <const name="OSS" value="2"/>
9841 <const name="ALSA" value="3"/>
9842 <const name="DirectSound" value="4"/>
9843 <const name="CoreAudio" value="5"/>
9844 <const name="MMPM" value="6"/>
9845 <const name="Pulse" value="7"/>
9846 <const name="SolAudio" value="8"/>
9847 </enum>
9848
9849 <enum
9850 name="AudioControllerType"
9851 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
9852 >
9853 <desc>
9854 Virtual audio controller type.
9855 </desc>
9856
9857 <const name="AC97" value="0"/>
9858 <const name="SB16" value="1"/>
9859 </enum>
9860
9861 <interface
9862 name="IAudioAdapter" extends="$unknown"
9863 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
9864 wsmap="managed"
9865 >
9866 <desc>
9867 The IAudioAdapter interface represents the virtual audio adapter of
9868 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
9869 </desc>
9870 <attribute name="enabled" type="boolean">
9871 <desc>
9872 Flag whether the audio adapter is present in the
9873 guest system. If disabled, the virtual guest hardware will
9874 not contain any audio adapter. Can only be changed when
9875 the VM is not running.
9876 </desc>
9877 </attribute>
9878 <attribute name="audioController" type="AudioControllerType">
9879 <desc>
9880 The audio hardware we emulate.
9881 </desc>
9882 </attribute>
9883 <attribute name="audioDriver" type="AudioDriverType">
9884 <desc>
9885 Audio driver the adapter is connected to. This setting
9886 can only be changed when the VM is not running.
9887 </desc>
9888 </attribute>
9889 </interface>
9890
9891 <!--
9892 // IVRDPServer
9893 /////////////////////////////////////////////////////////////////////////
9894 -->
9895
9896 <enum
9897 name="VRDPAuthType"
9898 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
9899 >
9900 <desc>
9901 VRDP authentication type.
9902 </desc>
9903
9904 <const name="Null" value="0">
9905 <desc><tt>null</tt> value. Also means "no authentication".</desc>
9906 </const>
9907 <const name="External" value="1"/>
9908 <const name="Guest" value="2"/>
9909 </enum>
9910
9911 <interface
9912 name="IVRDPServer" extends="$unknown"
9913 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
9914 wsmap="managed"
9915 >
9916 <attribute name="enabled" type="boolean">
9917 <desc>VRDP server status.</desc>
9918 </attribute>
9919
9920 <attribute name="port" type="unsigned long">
9921 <desc>
9922 VRDP server port number.
9923 <note>
9924 Setting the value of this property to <tt>0</tt> will reset the port
9925 number to the default value which is
9926 currently <tt>3389</tt>. Reading this property will always return a
9927 real port number, even after it has been set to <tt>0</tt> (in which
9928 case the default port is returned).
9929 </note>
9930 </desc>
9931 </attribute>
9932
9933 <attribute name="netAddress" type="wstring">
9934 <desc>VRDP server address.</desc>
9935 </attribute>
9936
9937 <attribute name="authType" type="VRDPAuthType">
9938 <desc>VRDP authentication method.</desc>
9939 </attribute>
9940
9941 <attribute name="authTimeout" type="unsigned long">
9942 <desc>Timeout for guest authentication. Milliseconds.</desc>
9943 </attribute>
9944
9945 <attribute name="allowMultiConnection" type="boolean">
9946 <desc>
9947 Flag whether multiple simultaneous connections to the VM are permitted.
9948 Note that this will be replaced by a more powerful mechanism in the future.
9949 </desc>
9950 </attribute>
9951
9952 <attribute name="reuseSingleConnection" type="boolean">
9953 <desc>
9954 Flag whether the existing connection must be dropped and a new connection
9955 must be established by the VRDP server, when a new client connects in single
9956 connection mode.
9957 </desc>
9958 </attribute>
9959
9960 </interface>
9961
9962
9963 <!--
9964 // ISharedFolder
9965 /////////////////////////////////////////////////////////////////////////
9966 -->
9967
9968 <enumerator
9969 name="ISharedFolderEnumerator" type="ISharedFolder"
9970 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
9971 />
9972
9973 <collection
9974 name="ISharedFolderCollection" type="ISharedFolder"
9975 enumerator="ISharedFolderEnumerator"
9976 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
9977 readonly="yes">
9978
9979 <method name="findByName">
9980 <desc>
9981 Searches this collection for a shared folder with the given logical
9982 name.
9983 <note>
9984 The method returns an error if the given name does not correspond to
9985 any shared folder in the collection.
9986 </note>
9987 </desc>
9988 <param name="name" type="wstring" dir="in">
9989 <desc>Logical name of the shared folder to search for</desc>
9990 </param>
9991 <param name="sharedFolder" type="ISharedFolder" dir="return">
9992 <desc>Found shared folder object</desc>
9993 </param>
9994 </method>
9995
9996 </collection>
9997
9998 <interface
9999 name="ISharedFolder" extends="$unknown"
10000 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
10001 wsmap="struct"
10002 >
10003 <desc>
10004 The ISharedFolder interface represents a folder in the host computer's
10005 file system accessible from the guest OS running inside a virtual
10006 machine using an associated logical name.
10007
10008 There are three types of shared folders:
10009 <ul>
10010 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
10011 folders available to all virtual machines.</li>
10012 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
10013 VM-specific shared folders available to the given virtual machine at
10014 startup.</li>
10015 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
10016 VM-specific shared folders created in the session context (for
10017 example, when the virtual machine is running) and automatically
10018 discarded when the session is closed (the VM is powered off).</li>
10019 </ul>
10020
10021 Logical names of shared folders must be unique within the given scope
10022 (global, permanent or transient). However, they do not need to be unique
10023 across scopes. In this case, the definition of the shared folder in a
10024 more specific scope takes precedence over definitions in all other
10025 scopes. The order of precedence is (more specific to more general):
10026 <ol>
10027 <li>Transient definitions</li>
10028 <li>Permanent definitions</li>
10029 <li>Global definitions</li>
10030 </ol>
10031
10032 For example, if MyMachine has a shared folder named
10033 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
10034 transient shared folder named <tt>C_DRIVE</tt> (that points
10035 to <tt>C:\\\\WINDOWS</tt>) will change the definition
10036 of <tt>C_DRIVE</tt> in the guest OS so
10037 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
10038 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
10039 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
10040 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
10041 to <tt>C:\\</tt> if it still exists.
10042
10043 Note that permanent and transient shared folders of different machines
10044 are in different name spaces, so they don't overlap and don't need to
10045 have unique logical names.
10046
10047 <note>
10048 Global shared folders are not implemented in the current version of the
10049 product.
10050 </note>
10051 </desc>
10052
10053 <attribute name="name" type="wstring" readonly="yes">
10054 <desc>Logical name of the shared folder.</desc>
10055 </attribute>
10056
10057 <attribute name="hostPath" type="wstring" readonly="yes">
10058 <desc>Full path to the shared folder in the host file system.</desc>
10059 </attribute>
10060
10061 <attribute name="accessible" type="boolean" readonly="yes">
10062 <desc>
10063 Whether the folder defined by the host path is currently
10064 accessible or not.
10065 For example, the folder can be unaccessible if it is placed
10066 on the network share that is not available by the time
10067 this property is read.
10068 </desc>
10069 </attribute>
10070
10071 <attribute name="writable" type="boolean" readonly="yes">
10072 <desc>
10073 Whether the folder defined by the host path is writable or
10074 not.
10075 </desc>
10076 </attribute>
10077
10078 </interface>
10079
10080 <!--
10081 // ISession
10082 /////////////////////////////////////////////////////////////////////////
10083 -->
10084
10085 <interface
10086 name="IInternalSessionControl" extends="$unknown"
10087 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
10088 internal="yes"
10089 wsmap="suppress"
10090 >
10091 <method name="getPID">
10092 <desc>PID of the process that has created this Session object.
10093 </desc>
10094 <param name="pid" type="unsigned long" dir="return"/>
10095 </method>
10096
10097 <method name="getRemoteConsole">
10098 <desc>Returns the console object suitable for remote control.</desc>
10099 <param name="console" type="IConsole" dir="return"/>
10100 </method>
10101
10102 <method name="assignMachine">
10103 <desc>
10104 Assigns the machine object associated with this direct-type
10105 session or informs the session that it will be a remote one
10106 (if machine = NULL).
10107 </desc>
10108 <param name="machine" type="IMachine" dir="in"/>
10109 </method>
10110
10111 <method name="assignRemoteMachine">
10112 <desc>
10113 Assigns the machine and the (remote) console object associated with
10114 this remote-type session.
10115 </desc>
10116 <param name="machine" type="IMachine" dir="in"/>
10117 <param name="console" type="IConsole" dir="in"/>
10118 </method>
10119
10120 <method name="updateMachineState">
10121 <desc>
10122 Updates the machine state in the VM process.
10123 Must be called only in certain cases
10124 (see the method implementation).
10125 </desc>
10126 <param name="aMachineState" type="MachineState" dir="in"/>
10127 </method>
10128
10129 <method name="uninitialize">
10130 <desc>
10131 Uninitializes (closes) this session. Used by VirtualBox to close
10132 the corresponding remote session when the direct session dies
10133 or gets closed.
10134 </desc>
10135 </method>
10136
10137 <method name="onDVDDriveChange">
10138 <desc>
10139 Triggered when settings of the DVD drive object of the
10140 associated virtual machine have changed.
10141 </desc>
10142 </method>
10143
10144 <method name="onFloppyDriveChange">
10145 <desc>
10146 Triggered when settings of the floppy drive object of the
10147 associated virtual machine have changed.
10148 </desc>
10149 </method>
10150
10151 <method name="onNetworkAdapterChange">
10152 <desc>
10153 Triggered when settings of a network adapter of the
10154 associated virtual machine have changed.
10155 </desc>
10156 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
10157 </method>
10158
10159 <method name="onSerialPortChange">
10160 <desc>
10161 Triggered when settings of a serial port of the
10162 associated virtual machine have changed.
10163 </desc>
10164 <param name="serialPort" type="ISerialPort" dir="in"/>
10165 </method>
10166
10167 <method name="onParallelPortChange">
10168 <desc>
10169 Triggered when settings of a parallel port of the
10170 associated virtual machine have changed.
10171 </desc>
10172 <param name="parallelPort" type="IParallelPort" dir="in"/>
10173 </method>
10174
10175 <method name="onVRDPServerChange">
10176 <desc>
10177 Triggered when settings of the VRDP server object of the
10178 associated virtual machine have changed.
10179 </desc>
10180 </method>
10181
10182 <method name="onUSBControllerChange">
10183 <desc>
10184 Triggered when settings of the USB controller object of the
10185 associated virtual machine have changed.
10186 </desc>
10187 </method>
10188
10189 <method name="onSharedFolderChange">
10190 <desc>
10191 Triggered when a permanent (global or machine) shared folder has been
10192 created or removed.
10193 <note>
10194 We don't pass shared folder parameters in this notification because
10195 the order in which parallel notifications are delivered is not defined,
10196 therefore it could happen that these parameters were outdated by the
10197 time of processing this notification.
10198 </note>
10199 </desc>
10200 <param name="global" type="boolean" dir="in"/>
10201 </method>
10202
10203 <method name="onUSBDeviceAttach">
10204 <desc>
10205 Triggered when a request to capture a USB device (as a result
10206 of matched USB filters or direct call to
10207 <link to="IConsole::attachUSBDevice"/>) has completed.
10208 A @c null @a error object means success, otherwise it
10209 describes a failure.
10210 </desc>
10211 <param name="device" type="IUSBDevice" dir="in"/>
10212 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
10213 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
10214 </method>
10215
10216 <method name="onUSBDeviceDetach">
10217 <desc>
10218 Triggered when a request to release the USB device (as a result
10219 of machine termination or direct call to
10220 <link to="IConsole::detachUSBDevice"/>) has completed.
10221 A @c null @a error object means success, otherwise it
10222 </desc>
10223 <param name="id" type="uuid" dir="in"/>
10224 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
10225 </method>
10226
10227 <method name="onShowWindow">
10228 <desc>
10229 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
10230 <link to="IMachine::showConsoleWindow()"/> in order to notify
10231 console callbacks
10232 <link to="IConsoleCallback::onCanShowWindow()"/>
10233 and <link to="IConsoleCallback::onShowWindow()"/>.
10234 </desc>
10235 <param name="check" type="boolean" dir="in"/>
10236 <param name="canShow" type="boolean" dir="out"/>
10237 <param name="winId" type="unsigned long long" dir="out"/>
10238 </method>
10239
10240 <method name="accessGuestProperty">
10241 <desc>
10242 Called by <link to="IMachine::getGuestProperty()"/> and by
10243 <link to="IMachine::setGuestProperty()"/> in order to read and
10244 modify guest properties.
10245 </desc>
10246 <param name="name" type="wstring" dir="in"/>
10247 <param name="value" type="wstring" dir="in"/>
10248 <param name="flags" type="wstring" dir="in"/>
10249 <param name="isSetter" type="boolean" dir="in"/>
10250 <param name="retValue" type="wstring" dir="out"/>
10251 <param name="retTimestamp" type="unsigned long long" dir="out"/>
10252 <param name="retFlags" type="wstring" dir="out"/>
10253 </method>
10254
10255 <method name="enumerateGuestProperties">
10256 <desc>
10257 Return a list of the guest properties matching a set of patterns along
10258 with their values, time stamps and flags.
10259 </desc>
10260 <param name="patterns" type="wstring" dir="in">
10261 <desc>
10262 The patterns to match the properties against as a comma-separated
10263 string. If this is empty, all properties currently set will be
10264 returned.
10265 </desc>
10266 </param>
10267 <param name="key" type="wstring" dir="out" safearray="yes">
10268 <desc>
10269 The key names of the properties returned.
10270 </desc>
10271 </param>
10272 <param name="value" type="wstring" dir="out" safearray="yes">
10273 <desc>
10274 The values of the properties returned. The array entries match the
10275 corresponding entries in the @a key array.
10276 </desc>
10277 </param>
10278 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
10279 <desc>
10280 The time stamps of the properties returned. The array entries match
10281 the corresponding entries in the @a key array.
10282 </desc>
10283 </param>
10284 <param name="flags" type="wstring" dir="out" safearray="yes">
10285 <desc>
10286 The flags of the properties returned. The array entries match the
10287 corresponding entries in the @a key array.
10288 </desc>
10289 </param>
10290 </method>
10291
10292 </interface>
10293
10294 <interface
10295 name="ISession" extends="$dispatched"
10296 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
10297 wsmap="managed"
10298 >
10299 <desc>
10300 The ISession interface represents a serialization primitive for virtual
10301 machines.
10302
10303 With VirtualBox, every time one wishes to manipulate a virtual machine
10304 (e.g. change its settings or start execution), a session object is
10305 required. Such an object must be passed to one of the session methods
10306 that open the given session, which then initiates the machine manipulation.
10307
10308 A session serves several purposes: it identifies to the inter-process VirtualBox
10309 code which process is currently working with the virtual machine, and it ensures
10310 that there are no incompatible requests from several processes for the
10311 same virtual machine. Session objects can therefore be thought of as mutex
10312 semaphores that lock virtual machines to prevent conflicting accesses from
10313 several processes.
10314
10315 How sessions objects are used depends on whether you use the Main API
10316 via COM or via the webservice:
10317
10318 <ul>
10319 <li>When using the COM API directly, an object of the Session class from the
10320 VirtualBox type library needs to be created. In regular COM C++ client code,
10321 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
10322 This object will then act as a local session object in further calls to open
10323 a session.
10324 </li>
10325
10326 <li>In the webservice, the session manager (IWebsessionManager) instead creates
10327 one session object automatically when <link to="IWebsessionManager::logon" />
10328 is called. A managed object reference to that session object can be retrieved by
10329 calling <link to="IWebsessionManager::getSessionObject" />. This session object
10330 reference can then be used to open sessions.
10331 </li>
10332 </ul>
10333
10334 Sessions are mainly used in two variations:
10335
10336 <ul>
10337 <li>
10338 To start a virtual machine in a separate process, one would call
10339 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
10340 object as its first parameter. This session then identifies the caller
10341 and lets him control the started machine (for example, pause machine
10342 execution or power it down) as well as be notified about machine
10343 execution state changes.
10344 </li>
10345
10346 <li>To alter machine settings, or to start machine execution within the
10347 current process, one needs to open a direct session for the machine first by
10348 calling <link to="IVirtualBox::openSession"/>. While a direct session
10349 is open within one process, no any other process may open another direct
10350 session for the same machine. This prevents the machine from being changed
10351 by other processes while it is running or while the machine is being configured.
10352 </li>
10353 </ul>
10354
10355 One also can attach to an existing direct session already opened by
10356 another process (for example, in order to send a control request to the
10357 virtual machine such as the pause or the reset request). This is done by
10358 calling <link to="IVirtualBox::openExistingSession"/>.
10359
10360 <note>
10361 Unless you are trying to write a new VirtualBox front-end that
10362 performs direct machine execution (like the VirtualBox or VBoxSDL
10363 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
10364 session opened by <link to="IVirtualBox::openSession"/> and use this
10365 session only to change virtual machine settings. If you simply want to
10366 start virtual machine execution using one of the existing front-ends
10367 (for example the VirtualBox GUI or headless server), simply use
10368 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
10369 will power up the machine automatically for you.
10370 </note>
10371 </desc>
10372
10373 <attribute name="state" type="SessionState" readonly="yes">
10374 <desc>Current state of this session.</desc>
10375 </attribute>
10376
10377 <attribute name="type" type="SessionType" readonly="yes">
10378 <desc>
10379 Type of this session. The value of this attribute is valid only
10380 if the session is currently open (i.e. its #state is SessionType::SessionOpen),
10381 otherwise an error will be returned.
10382 </desc>
10383 </attribute>
10384
10385 <attribute name="machine" type="IMachine" readonly="yes">
10386 <desc>Machine object associated with this session.</desc>
10387 </attribute>
10388
10389 <attribute name="console" type="IConsole" readonly="yes">
10390 <desc>Console object associated with this session.</desc>
10391 </attribute>
10392
10393 <method name="close">
10394 <desc>
10395 Closes a session that was previously opened.
10396
10397 It is recommended that every time an "open session" method (such as
10398 <link to="IVirtualBox::openRemoteSession" /> or
10399 <link to="IVirtualBox::openSession" />) has been called to
10400 manipulate a virtual machine, the caller invoke
10401 ISession::close() when it's done doing so. Since sessions are
10402 serialization primitives much like ordinary mutexes, they are
10403 best used the same way: for each "open" call, there should be
10404 a matching "close" call, even when errors occur.
10405
10406 Otherwise, if a direct session for a machine opened with
10407 <link to="IVirtualBox::openSession()"/> is not explicitly closed
10408 when the application terminates, the state of the machine will
10409 be set to <link to="MachineState::Aborted" /> on the server.
10410
10411 Generally, it is recommended to close all open sessions explicitly
10412 before terminating the application (no matter what is the reason of
10413 the termination).
10414
10415 <note>
10416 Do not expect the session state (<link to="ISession::state" />
10417 to return to "Closed" immediately after you invoke
10418 ISession::close(), particularly if you have started a remote
10419 session to execute the VM in a new process. The session state will
10420 automatically return to "Closed" once the VM is no longer executing,
10421 which can of course take a very long time.
10422 </note>
10423 </desc>
10424 </method>
10425
10426 </interface>
10427
10428 <!--
10429 // ISATAController
10430 /////////////////////////////////////////////////////////////////////////
10431 -->
10432
10433 <interface
10434 name="ISATAController" extends="$unknown"
10435 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
10436 wsmap="managed"
10437 >
10438 <attribute name="enabled" type="boolean">
10439 <desc>
10440 Flag whether the SATA controller is present in the
10441 guest system. If disabled, the virtual guest hardware will
10442 not contain any SATA controller. Can only be changed when
10443 the VM is powered off.
10444 </desc>
10445 </attribute>
10446
10447 <attribute name="portCount" type="unsigned long">
10448 <desc>
10449 The number of usable ports on the SATA controller.
10450 It ranges from 1 to 30.
10451 </desc>
10452 </attribute>
10453
10454 <method name="GetIDEEmulationPort">
10455 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc>
10456 <param name="devicePosition" type="long" dir="in"/>
10457 <param name="portNumber" type="long" dir="return"/>
10458 </method>
10459
10460 <method name="SetIDEEmulationPort">
10461 <desc>Sets the port number which is emulated as an IDE device.</desc>
10462 <param name="devicePosition" type="long" dir="in"/>
10463 <param name="portNumber" type="long" dir="in"/>
10464 </method>
10465
10466 </interface>
10467
10468<if target="wsdl">
10469
10470 <!--
10471 // IManagedObjectRef
10472 /////////////////////////////////////////////////////////////////////////
10473 -->
10474
10475 <interface
10476 name="IManagedObjectRef" extends="$unknown"
10477 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
10478 internal="yes"
10479 wsmap="managed"
10480 wscpp="hardcoded"
10481 >
10482 <desc>
10483 Managed object reference.
10484
10485 Only within the webservice, a managed object reference (which is really
10486 an opaque number) allows a webservice client to address an object
10487 that lives in the address space of the webservice server.
10488
10489 Behind each managed object reference, there is a COM object that lives
10490 in the webservice server's address space. The COM object is not freed
10491 until the managed object reference is released, either by an explicit
10492 call to <link to="IManagedObjectRef::release" /> or by logging off from
10493 the webservice (<link to="IWebsessionManager::logoff" />), which releases
10494 all objects created during the webservice session.
10495
10496 Whenever a method call of the VirtualBox API returns a COM object, the
10497 webservice representation of that method will instead return a
10498 managed object reference, which can then be used to invoke methods
10499 on that object.
10500 </desc>
10501
10502 <method name="getInterfaceName">
10503 <desc>
10504 Returns the name of the interface that this managed object represents,
10505 for example, "IMachine", as a string.
10506 </desc>
10507 <param name="return" type="wstring" dir="return"/>
10508 </method>
10509
10510 <method name="release">
10511 <desc>
10512 Releases this managed object reference and frees the resources that
10513 were allocated for it in the webservice server process. After calling
10514 this method, the identifier of the reference can no longer be used.
10515 </desc>
10516 </method>
10517
10518 </interface>
10519
10520 <!--
10521 // IWebsessionManager
10522 /////////////////////////////////////////////////////////////////////////
10523 -->
10524
10525 <interface
10526 name="IWebsessionManager" extends="$unknown"
10527 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
10528 internal="yes"
10529 wsmap="global"
10530 wscpp="hardcoded"
10531 >
10532 <desc>
10533 Websession manager. This provides essential services
10534 to webservice clients.
10535 </desc>
10536 <method name="logon">
10537 <desc>
10538 Logs a new client onto the webservice and returns a managed object reference to
10539 the IVirtualBox instance, which the client can then use as a basis to further
10540 queries, since all calls to the VirtualBox API are based on the IVirtualBox
10541 interface, in one way or the other.
10542 </desc>
10543 <param name="username" type="wstring" dir="in"/>
10544 <param name="password" type="wstring" dir="in"/>
10545 <param name="return" type="IVirtualBox" dir="return"/>
10546 </method>
10547
10548 <method name="getSessionObject">
10549 <desc>
10550 Returns a managed object reference to the internal ISession object that was created
10551 for this web service session when the client logged on.
10552
10553 <see>ISession</see>
10554 </desc>
10555 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10556 <param name="return" type="ISession" dir="return"/>
10557 </method>
10558
10559 <method name="logoff">
10560 <desc>
10561 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
10562 and destroys all resources associated with the session (most importantly, all
10563 managed objects created in the server while the session was active).
10564 </desc>
10565 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10566 </method>
10567
10568 </interface>
10569
10570</if>
10571
10572 <!--
10573 // IPerformanceCollector & friends
10574 /////////////////////////////////////////////////////////////////////////
10575 -->
10576
10577 <interface
10578 name="IPerformanceMetric" extends="$unknown"
10579 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
10580 >
10581 <desc>
10582 The IPerformanceMetric interface represents parameters of the given
10583 performance metric.
10584 </desc>
10585
10586 <attribute name="metricName" type="wstring" readonly="yes">
10587 <desc>
10588 Name of the metric.
10589 </desc>
10590 </attribute>
10591
10592 <attribute name="object" type="$unknown" readonly="yes">
10593 <desc>
10594 Object this metric belongs to.
10595 </desc>
10596 </attribute>
10597
10598 <attribute name="description" type="wstring" readonly="yes">
10599 <desc>
10600 Textual description of the metric.
10601 </desc>
10602 </attribute>
10603
10604 <attribute name="period" type="unsigned long" readonly="yes">
10605 <desc>
10606 Time interval between samples, measured in seconds.
10607 </desc>
10608 </attribute>
10609
10610 <attribute name="count" type="unsigned long" readonly="yes">
10611 <desc>
10612 Number of recent samples retained by the performance collector for this
10613 metric.
10614
10615 When the collected sample count exceeds this number, older samples
10616 are discarded.
10617 </desc>
10618 </attribute>
10619
10620 <attribute name="unit" type="wstring" readonly="yes">
10621 <desc>
10622 Unit of measurement.
10623 </desc>
10624 </attribute>
10625
10626 <attribute name="minimumValue" type="long" readonly="yes">
10627 <desc>
10628 Minimum possible value of this metric.
10629 </desc>
10630 </attribute>
10631
10632 <attribute name="maximumValue" type="long" readonly="yes">
10633 <desc>
10634 Maximum possible value of this metric.
10635 </desc>
10636 </attribute>
10637 </interface>
10638
10639 <interface
10640 name="IPerformanceCollector" extends="$unknown"
10641 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
10642 wsmap="managed"
10643 >
10644 <desc>
10645 The IPerformanceCollector interface represents a service that collects and
10646 stores performance metrics data.
10647
10648 Performance metrics are associated with objects like IHost and
10649 IMachine. Each object has a distinct set of performance metrics.
10650 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
10651
10652 Metric data are collected at the specified intervals and are retained
10653 internally. The interval and the number of samples retained can be set
10654 with <link to="IPerformanceCollector::setupMetrics" />.
10655
10656 Metrics are organized hierarchically, each level separated by slash (/).
10657 General scheme for metric name is
10658 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
10659 metric name stands for: CPU category, Load metric, User submetric, average
10660 aggregate. An aggregate function is computed over all retained data. Valid
10661 aggregate functions are:
10662
10663 <ul>
10664 <li>avg -- average</li>
10665 <li>min -- minimum</li>
10666 <li>max -- maximum</li>
10667 </ul>
10668
10669 "Category/Metric" together form base metric name. A base metric is the
10670 smallest unit for which a sampling interval and the number of retained
10671 samples can be set. Only base metrics can be enabled and disabled. All
10672 sub-metrics are collected when their base metric is collected.
10673 Collected values for any set of sub-metrics can be queried with
10674 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
10675 metric parameters, querying metric data, enabling or disabling metrics
10676 wildcards can be used in metric names to specify a subset of metrics. For
10677 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
10678 averages can be queried using <tt>*:avg</tt> and so on. To query metric
10679 values without aggregates <tt>*:</tt> can be used.
10680
10681 The valid names for base metrics are:
10682
10683 <ul>
10684 <li>CPU/Load</li>
10685 <li>CPU/MHz</li>
10686 <li>RAM/Usage</li>
10687 </ul>
10688
10689 The general sequence for collecting and retrieving the metrics is:
10690 <ul>
10691 <li>
10692 Obtain an instance of IPerformanceCollector with
10693 <link to="IVirtualBox::performanceCollector" />
10694 </li>
10695 <li>
10696 Allocate and populate an array with references to objects the metrics
10697 will be collected for. Use references to IHost and IMachine objects.
10698 </li>
10699 <li>
10700 Allocate and populate an array with base metric names the data will be
10701 collected for.
10702 </li>
10703 <li>
10704 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
10705 metric data will be collected and stored.
10706 </li>
10707 <li>
10708 Wait for the data to get collected.
10709 </li>
10710 <li>
10711 Allocate and populate an array with references to objects the metric
10712 values will be queried for. You can re-use the object array used for
10713 setting base metrics.
10714 </li>
10715 <li>
10716 Allocate and populate an array with metric names the data will be
10717 collected for. Note that metric names differ from base metric names.
10718 </li>
10719 <li>
10720 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
10721 have been collected so far are returned. Note that the values are still
10722 retained internally and data collection continues.
10723 </li>
10724 </ul>
10725
10726 For an example of usage refer to the following files in VirtualBox SDK:
10727 <ul>
10728 <li>
10729 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
10730 </li>
10731 <li>
10732 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
10733 </li>
10734 </ul>
10735 </desc>
10736
10737 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
10738 <desc>
10739 Array of unique names of metrics.
10740
10741 This array represents all metrics supported by the performance
10742 collector. Individual objects do not necessarily support all of them.
10743 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
10744 list of supported metrics for a particular object.
10745 </desc>
10746 </attribute>
10747
10748 <method name="getMetrics">
10749 <desc>
10750 Returns parameters of specified metrics for a set of objects.
10751 <note>
10752 @c Null metrics array means all metrics. @c Null object array means
10753 all existing objects.
10754 </note>
10755 </desc>
10756 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10757 <desc>
10758 Metric name filter. Currently, only a comma-separated list of metrics
10759 is supported.
10760 </desc>
10761 </param>
10762 <param name="objects" type="$unknown" dir="in" safearray="yes">
10763 <desc>
10764 Set of objects to return metric parameters for.
10765 </desc>
10766 </param>
10767 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
10768 <desc>
10769 Array of returned metric parameters.
10770 </desc>
10771 </param>
10772 </method>
10773
10774 <method name="setupMetrics">
10775 <desc>
10776 Sets parameters of specified base metrics for a set of objects. Returns
10777 an array of <link to="IPerformanceMetric" /> describing the metrics have
10778 been affected.
10779 <note>
10780 @c Null or empty metric name array means all metrics. @c Null or empty
10781 object array means all existing objects. If metric name array contains
10782 a single element and object array contains many, the single metric
10783 name array element is applied to each object array element to form
10784 metric/object pairs.
10785 </note>
10786 </desc>
10787 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10788 <desc>
10789 Metric name filter. Comma-separated list of metrics with wildcard
10790 support.
10791 </desc>
10792 </param>
10793 <param name="objects" type="$unknown" dir="in" safearray="yes">
10794 <desc>
10795 Set of objects to setup metric parameters for.
10796 </desc>
10797 </param>
10798 <param name="period" type="unsigned long" dir="in">
10799 <desc>
10800 Time interval in seconds between two consecutive samples of performance
10801 data.
10802 </desc>
10803 </param>
10804 <param name="count" type="unsigned long" dir="in">
10805 <desc>
10806 Number of samples to retain in performance data history. Older samples
10807 get discarded.
10808 </desc>
10809 </param>
10810 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10811 <desc>
10812 Array of metrics that have been modified by the call to this method.
10813 </desc>
10814 </param>
10815 </method>
10816
10817 <method name="enableMetrics">
10818 <desc>
10819 Turns on collecting specified base metrics. Returns an array of
10820 <link to="IPerformanceMetric" /> describing the metrics have been
10821 affected.
10822 <note>
10823 @c Null or empty metric name array means all metrics. @c Null or empty
10824 object array means all existing objects. If metric name array contains
10825 a single element and object array contains many, the single metric
10826 name array element is applied to each object array element to form
10827 metric/object pairs.
10828 </note>
10829 </desc>
10830 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10831 <desc>
10832 Metric name filter. Comma-separated list of metrics with wildcard
10833 support.
10834 </desc>
10835 </param>
10836 <param name="objects" type="$unknown" dir="in" safearray="yes">
10837 <desc>
10838 Set of objects to enable metrics for.
10839 </desc>
10840 </param>
10841 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10842 <desc>
10843 Array of metrics that have been modified by the call to this method.
10844 </desc>
10845 </param>
10846 </method>
10847
10848 <method name="disableMetrics">
10849 <desc>
10850 Turns off collecting specified base metrics. Returns an array of
10851 <link to="IPerformanceMetric" /> describing the metrics have been
10852 affected.
10853 <note>
10854 @c Null or empty metric name array means all metrics. @c Null or empty
10855 object array means all existing objects. If metric name array contains
10856 a single element and object array contains many, the single metric
10857 name array element is applied to each object array element to form
10858 metric/object pairs.
10859 </note>
10860 </desc>
10861 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10862 <desc>
10863 Metric name filter. Comma-separated list of metrics with wildcard
10864 support.
10865 </desc>
10866 </param>
10867 <param name="objects" type="$unknown" dir="in" safearray="yes">
10868 <desc>
10869 Set of objects to disable metrics for.
10870 </desc>
10871 </param>
10872 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10873 <desc>
10874 Array of metrics that have been modified by the call to this method.
10875 </desc>
10876 </param>
10877 </method>
10878
10879 <method name="queryMetricsData">
10880 <desc>
10881 Queries collected metrics data for a set of objects.
10882
10883 The data itself and related metric information are returned in seven
10884 parallel and one flattened array of arrays. Elements of
10885 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
10886 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
10887 the same index describe one set of values corresponding to a single
10888 metric.
10889
10890 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
10891 start and length of a sub-array is indicated by
10892 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
10893 value for metric <tt>metricNames[i]</tt> is at
10894 <tt>returnData[returnIndices[i]]</tt>.
10895
10896 <note>
10897 @c Null or empty metric name array means all metrics. @c Null or empty
10898 object array means all existing objects. If metric name array contains
10899 a single element and object array contains many, the single metric
10900 name array element is applied to each object array element to form
10901 metric/object pairs.
10902 </note>
10903 <note>
10904 Data collection continues behind the scenes after call to @c
10905 queryMetricsData. The return data can be seen as the snapshot of
10906 the current state at the time of @c queryMetricsData call. The
10907 internally kept metric values are not cleared by the call. This makes
10908 possible querying different subsets of metrics or aggregates with
10909 subsequent calls. If periodic querying is needed it is highly
10910 suggested to query the values with @c interval*count period to avoid
10911 confusion. This way a completely new set of data values will be
10912 provided by each query.
10913 </note>
10914 </desc>
10915 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10916 <desc>
10917 Metric name filter. Comma-separated list of metrics with wildcard
10918 support.
10919 </desc>
10920 </param>
10921 <param name="objects" type="$unknown" dir="in" safearray="yes">
10922 <desc>
10923 Set of objects to query metrics for.
10924 </desc>
10925 </param>
10926 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
10927 <desc>
10928 Names of metrics returned in @c returnData.
10929 </desc>
10930 </param>
10931 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
10932 <desc>
10933 Objects associated with metrics returned in @c returnData.
10934 </desc>
10935 </param>
10936 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
10937 <desc>
10938 Units of measurement for each returned metric.
10939 </desc>
10940 </param>
10941 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
10942 <desc>
10943 Divisor that should be applied to return values in order to get
10944 floating point values. For example:
10945 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
10946 will retrieve the floating point value of i-th sample of the first
10947 metric.
10948 </desc>
10949 </param>
10950 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
10951 <desc>
10952 Sequence numbers of the first elements of value sequences of particular metrics
10953 returned in @c returnData. For aggregate metrics it is the sequence number of
10954 the sample the aggregate started calculation from.
10955 </desc>
10956 </param>
10957 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
10958 <desc>
10959 Indices of the first elements of value sequences of particular metrics
10960 returned in @c returnData.
10961 </desc>
10962 </param>
10963 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
10964 <desc>
10965 Lengths of value sequences of particular metrics.
10966 </desc>
10967 </param>
10968 <param name="returnData" type="long" dir="return" safearray="yes">
10969 <desc>
10970 Flattened array of all metric data containing sequences of values for
10971 each metric.
10972 </desc>
10973 </param>
10974 </method>
10975
10976 </interface>
10977
10978 <module name="VBoxSVC" context="LocalServer">
10979 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
10980 namespace="virtualbox.org">
10981 <interface name="IVirtualBox" default="yes"/>
10982 </class>
10983 </module>
10984
10985 <module name="VBoxC" context="InprocServer" threadingModel="Free">
10986 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
10987 namespace="virtualbox.org">
10988 <interface name="ISession" default="yes"/>
10989 </class>
10990 </module>
10991
10992</library>
10993
10994</idl>
10995<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette