VirtualBox

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

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

Document result codes for powerUpPaused.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 407.7 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 14773 2008-11-28 12:44:41Z 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 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
313 <desc>
314 Host operating system related error.
315 </desc>
316 </result>
317
318 <!--
319 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
320 everything in <result>/<desc> after (and including) the first dot, so express
321 the matter of the error code in the first sentence and keep it short.
322 -->
323
324 <descGroup/>
325
326 <!--
327 // all common enums
328 /////////////////////////////////////////////////////////////////////////
329 -->
330
331 <enum
332 name="TSBool"
333 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
334 >
335 <desc>
336 Boolean variable having a third state, default.
337 </desc>
338
339 <const name="False" value="0"/>
340 <const name="True" value="1"/>
341 <const name="Default" value="2"/>
342 </enum>
343
344 <enum
345 name="MachineState"
346 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
347 >
348 <desc>
349 Virtual machine execution state. This enumeration represents possible
350 values of the <link to="IMachine::state"/> attribute.
351 </desc>
352
353 <const name="Null" value="0">
354 <desc><tt>null</tt> value. Never used by the API.</desc>
355 </const>
356 <const name="PoweredOff" value="1">
357 <desc>
358 The machine is not running.
359 </desc>
360 </const>
361 <const name="Saved" value="2">
362 <desc>
363 The machine is not currently running, but the execution state
364 of the machine has been saved to an external file when it
365 was running.
366 <note>
367 Only a few machine settings can be altered when the machine
368 is in this state.
369 </note>
370 </desc>
371 </const>
372 <const name="Aborted" value="3">
373 <desc>
374 A process running the machine has terminated abnormally.
375 Other than that, this value is equivalent to #PoweredOff.
376 </desc>
377 </const>
378 <const name="Running" value="4">
379 <desc>
380 The machine is currently being executed.
381 <note>
382 This value can be used in relational expressions:
383 all state values less than Running describe a virtual machine that is
384 not currently being executed (i.e., it is completely out of
385 action).
386 </note>
387 <note internal="yes">
388 For whoever decides to touch this enum: In order to keep the
389 aforementioned comparisons valid, this state must immediately
390 precede the Paused state.
391 </note>
392 </desc>
393 </const>
394 <const name="Paused" value="5">
395 <desc>
396 Execution of the machine has been paused.
397 <note>
398 This value can be used in relational expressions: all state values
399 greater than Paused represent unstable states of the running virtual
400 machine. Unless explicitly stated otherwise, no machine settings can
401 be altered when it is in one of the unstable states.
402 </note>
403 <note internal="yes">
404 For whoever decides to touch this enum: In order to keep the
405 aforementioned comparisons valid, this state must immediately
406 follow the Running state.
407 </note>
408 </desc>
409 </const>
410 <const name="Stuck" value="6">
411 <desc>
412 Execution of the machine has reached the "Guru Meditation"
413 condition. This condition indicates an internal VMM failure which may
414 happen as a result of either an unhandled low-level virtual hardware
415 exception or one of the recompiler exceptions (such as
416 the <i>too-many-traps</i> condition).
417 </desc>
418 </const>
419 <const name="Starting" value="7">
420 <desc>
421 Machine is being started after
422 <link to="IConsole::powerUp">powering it on</link> from a
423 zero execution state.
424 </desc>
425 </const>
426 <const name="Stopping" value="8">
427 <desc>
428 Machine is being normally stopped
429 (after explicitly <link to="IConsole::powerDown">powering it off</link>,
430 or after the guest OS has initiated a shutdown sequence).
431 </desc>
432 </const>
433 <const name="Saving" value="9">
434 <desc>
435 Machine is saving its execution state to a file as a
436 result of calling <link to="IConsole::saveState"/> or an online
437 snapshot of the machine is being taken using
438 <link to="IConsole::takeSnapshot"/>.
439 </desc>
440 </const>
441 <const name="Restoring" value="10">
442 <desc>
443 Execution state of the machine is being restored from a file
444 after <link to="IConsole::powerUp">powering it on</link> from
445 a saved execution state.
446 </desc>
447 </const>
448 <const name="Discarding" value="11">
449 <desc>
450 Snapshot of the machine is being discarded after calling
451 <link to="IConsole::discardSnapshot"/> or its current state is
452 being discarded after <link to="IConsole::discardCurrentState"/>.
453 </desc>
454 </const>
455 <const name="SettingUp" value="12">
456 <desc>
457 Lengthy setup operation is in progress (e.g.
458 <link to="IMachine::attachHardDisk2"/>).
459 </desc>
460 </const>
461 </enum>
462
463 <enum
464 name="SessionState"
465 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
466 >
467 <desc>
468 Session state. This enumeration represents possible values of
469 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
470 attributes. Individual value descriptions contain the appropriate
471 meaning for every case.
472 </desc>
473
474 <const name="Null" value="0">
475 <desc><tt>null</tt> value. Never used by the API.</desc>
476 </const>
477 <const name="Closed" value="1">
478 <desc>
479 The machine has no open sessions (<link to="IMachine::sessionState"/>);
480 the session is closed (<link to="ISession::state"/>)
481 </desc>
482 </const>
483 <const name="Open" value="2">
484 <desc>
485 The machine has an open direct session (<link to="IMachine::sessionState"/>);
486 the session is open (<link to="ISession::state"/>)
487 </desc>
488 </const>
489 <const name="Spawning" value="3">
490 <desc>
491 A new (direct) session is being opened for the machine
492 as a result of <link to="IVirtualBox::openRemoteSession()"/>
493 call (<link to="IMachine::sessionState"/>);
494 the session is currently being opened
495 as a result of <link to="IVirtualBox::openRemoteSession()"/>
496 call (<link to="ISession::state"/>)
497 </desc>
498 </const>
499 <const name="Closing" value="4">
500 <desc>
501 The direct session is being closed (<link to="IMachine::sessionState"/>);
502 the session is being closed (<link to="ISession::state"/>)
503 </desc>
504 </const>
505 </enum>
506
507 <enum
508 name="SessionType"
509 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
510 >
511 <desc>
512 Session type. This enumeration represents possible values of the
513 <link to="ISession::type"/> attribute.
514 </desc>
515
516 <const name="Null" value="0">
517 <desc><tt>null</tt> value. Never used by the API.</desc>
518 </const>
519 <const name="Direct" value="1">
520 <desc>
521 Direct session
522 (opened by <link to="IVirtualBox::openSession()"/>)
523 </desc>
524 </const>
525 <const name="Remote" value="2">
526 <desc>
527 Remote session
528 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
529 </desc>
530 </const>
531 <const name="Existing" value="3">
532 <desc>
533 Existing session
534 (opened by <link to="IVirtualBox::openExistingSession()"/>)
535 </desc>
536 </const>
537 </enum>
538
539 <enum
540 name="DeviceType"
541 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
542 >
543 <desc>
544 Device type.
545 </desc>
546 <const name="Null" value="0">
547 <desc>
548 <tt>null</tt> value which may also mean "no device".
549 <note>
550 This value is not allowed for
551 <link to="IConsole::getDeviceActivity"/>
552 </note>
553 </desc>
554 </const>
555 <const name="Floppy" value="1">
556 <desc>Floppy device.</desc>
557 </const>
558 <const name="DVD" value="2">
559 <desc>CD/DVD-ROM device.</desc>
560 </const>
561 <const name="HardDisk" value="3">
562 <desc>Hard disk device.</desc>
563 </const>
564 <const name="Network" value="4">
565 <desc>Network device.</desc>
566 </const>
567 <const name="USB" value="5">
568 <desc>USB device.</desc>
569 </const>
570 <const name="SharedFolder" value="6">
571 <desc>Shared folder device.</desc>
572 </const>
573 </enum>
574
575 <enum
576 name="DeviceActivity"
577 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
578 >
579 <desc>
580 Device activity for <link to="IConsole::getDeviceActivity"/>.
581 </desc>
582
583 <const name="Null" value="0"/>
584 <const name="Idle" value="1"/>
585 <const name="Reading" value="2"/>
586 <const name="Writing" value="3"/>
587 </enum>
588
589 <enum
590 name="StorageBus"
591 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
592 >
593 <desc>Interface bus type for storage devices.</desc>
594
595 <const name="Null" value="0">
596 <desc><tt>null</tt> value. Never used by the API.</desc>
597 </const>
598
599 <const name="IDE" value="1"/>
600 <const name="SATA" value="2"/>
601 </enum>
602
603 <enum
604 name="ClipboardMode"
605 uuid="33364716-4008-4701-8f14-be0fa3d62950"
606 >
607 <desc>
608 Host-Guest clipboard interchange mode.
609 </desc>
610
611 <const name="Disabled" value="0"/>
612 <const name="HostToGuest" value="1"/>
613 <const name="GuestToHost" value="2"/>
614 <const name="Bidirectional" value="3"/>
615 </enum>
616
617 <enum
618 name="Scope"
619 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
620 >
621 <desc>
622 Scope of the operation.
623
624 A generic enumeration used in various methods to define the action or
625 argument scope.
626 </desc>
627
628 <const name="Global" value="0"/>
629 <const name="Machine" value="1"/>
630 <const name="Session" value="2"/>
631 </enum>
632
633 <enum
634 name="GuestStatisticType"
635 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
636 >
637 <desc>
638 Statistics type for <link to="IGuest::getStatistic"/>.
639 </desc>
640
641 <const name="CPULoad_Idle" value="0">
642 <desc>
643 Idle CPU load (0-100%) for last interval.
644 </desc>
645 </const>
646 <const name="CPULoad_Kernel" value="1">
647 <desc>
648 Kernel CPU load (0-100%) for last interval.
649 </desc>
650 </const>
651 <const name="CPULoad_User" value="2">
652 <desc>
653 User CPU load (0-100%) for last interval.
654 </desc>
655 </const>
656 <const name="Threads" value="3">
657 <desc>
658 Total number of threads in the system.
659 </desc>
660 </const>
661 <const name="Processes" value="4">
662 <desc>
663 Total number of processes in the system.
664 </desc>
665 </const>
666 <const name="Handles" value="5">
667 <desc>
668 Total number of handles in the system.
669 </desc>
670 </const>
671 <const name="MemoryLoad" value="6">
672 <desc>
673 Memory load (0-100%).
674 </desc>
675 </const>
676 <const name="PhysMemTotal" value="7">
677 <desc>
678 Total physical memory in megabytes.
679 </desc>
680 </const>
681 <const name="PhysMemAvailable" value="8">
682 <desc>
683 Free physical memory in megabytes.
684 </desc>
685 </const>
686 <const name="PhysMemBalloon" value="9">
687 <desc>
688 Ballooned physical memory in megabytes.
689 </desc>
690 </const>
691 <const name="MemCommitTotal" value="10">
692 <desc>
693 Total amount of memory in the committed state in megabytes.
694 </desc>
695 </const>
696 <const name="MemKernelTotal" value="11">
697 <desc>
698 Total amount of memory used by the guest OS's kernel in megabytes.
699 </desc>
700 </const>
701 <const name="MemKernelPaged" value="12">
702 <desc>
703 Total amount of paged memory used by the guest OS's kernel in megabytes.
704 </desc>
705 </const>
706 <const name="MemKernelNonpaged" value="13">
707 <desc>
708 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
709 </desc>
710 </const>
711 <const name="MemSystemCache" value="14">
712 <desc>
713 Total amount of memory used by the guest OS's system cache in megabytes.
714 </desc>
715 </const>
716 <const name="PageFileSize" value="15">
717 <desc>
718 Pagefile size in megabytes.
719 </desc>
720 </const>
721 <const name="SampleNumber" value="16">
722 <desc>
723 Statistics sample number
724 </desc>
725 </const>
726 <const name="MaxVal" value="17"/>
727 </enum>
728
729 <enum
730 name="BIOSBootMenuMode"
731 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
732 >
733 <desc>
734 BIOS boot menu mode.
735 </desc>
736
737 <const name="Disabled" value="0"/>
738 <const name="MenuOnly" value="1"/>
739 <const name="MessageAndMenu" value="2"/>
740 </enum>
741
742 <enum
743 name="IDEControllerType"
744 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
745 >
746 <desc>
747 IDE controller type.
748 </desc>
749
750 <const name="Null" value="0">
751 <desc><tt>null</tt> value. Never used by the API.</desc>
752 </const>
753 <const name="PIIX3" value="1"/>
754 <const name="PIIX4" value="2"/>
755 </enum>
756
757 <enum
758 name="DriveState"
759 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
760 >
761 <const name="Null" value="0">
762 <desc><tt>null</tt> value. Never used by the API.</desc>
763 </const>
764 <const name="NotMounted" value="1"/>
765 <const name="ImageMounted" value="2"/>
766 <const name="HostDriveCaptured" value="3"/>
767 </enum>
768
769 <enum
770 name="ProcessorFeature"
771 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
772 >
773 <desc>
774 CPU features.
775 </desc>
776
777 <const name="HWVirtEx" value="0"/>
778 <const name="PAE" value="1"/>
779 <const name="LongMode" value="2"/>
780 </enum>
781
782
783 <!--
784 // IVirtualBoxErrorInfo
785 /////////////////////////////////////////////////////////////////////////
786 -->
787
788 <interface
789 name="IVirtualBoxErrorInfo" extends="$errorinfo"
790 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
791 supportsErrorInfo="no"
792 wsmap="suppress"
793 >
794 <desc>
795 The IVirtualBoxErrorInfo interface represents extended error information.
796
797 Extended error information can be set by VirtualBox components after
798 unsuccessful or partially successful method invocation. This information
799 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
800 and then shown to the client in addition to the plain 32-bit result code.
801
802 In MS COM, this interface extends the IErrorInfo interface,
803 in XPCOM, it extends the nsIException interface. In both cases,
804 it provides a set of common attributes to retrieve error
805 information.
806
807 Sometimes invocation of some component's method may involve methods of
808 other components that may also fail (independently of this method's
809 failure), or a series of non-fatal errors may precede a fatal error that
810 causes method failure. In cases like that, it may be desirable to preserve
811 information about all errors happened during method invocation and deliver
812 it to the caller. The <link to="#next"/> attribute is intended
813 specifically for this purpose and allows to represent a chain of errors
814 through a single IVirtualBoxErrorInfo object set after method invocation.
815
816 Note that errors are stored to a chain in the reverse order, i.e. the
817 initial error object you query right after method invocation is the last
818 error set by the callee, the object it points to in the @a next attribute
819 is the previous error and so on, up to the first error (which is the last
820 in the chain).
821 </desc>
822
823 <attribute name="resultCode" type="result" readonly="yes">
824 <desc>
825 Result code of the error.
826 Usually, it will be the same as the result code returned
827 by the method that provided this error information, but not
828 always. For example, on Win32, CoCreateInstance() will most
829 likely return E_NOINTERFACE upon unsuccessful component
830 instantiation attempt, but not the value the component factory
831 returned.
832 <note>
833 In MS COM, there is no equivalent.
834 In XPCOM, it is the same as nsIException::result.
835 </note>
836 </desc>
837 </attribute>
838
839 <attribute name="interfaceID" type="uuid" readonly="yes">
840 <desc>
841 UUID of the interface that defined the error.
842 <note>
843 In MS COM, it is the same as IErrorInfo::GetGUID.
844 In XPCOM, there is no equivalent.
845 </note>
846 </desc>
847 </attribute>
848
849 <attribute name="component" type="wstring" readonly="yes">
850 <desc>
851 Name of the component that generated the error.
852 <note>
853 In MS COM, it is the same as IErrorInfo::GetSource.
854 In XPCOM, there is no equivalent.
855 </note>
856 </desc>
857 </attribute>
858
859 <attribute name="text" type="wstring" readonly="yes">
860 <desc>
861 Text description of the error.
862 <note>
863 In MS COM, it is the same as IErrorInfo::GetDescription.
864 In XPCOM, it is the same as nsIException::message.
865 </note>
866 </desc>
867 </attribute>
868
869 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
870 <desc>
871 Next error object if there is any, or @c null otherwise.
872 <note>
873 In MS COM, there is no equivalent.
874 In XPCOM, it is the same as nsIException::inner.
875 </note>
876 </desc>
877 </attribute>
878
879 </interface>
880
881
882 <!--
883 // IVirtualBox
884 /////////////////////////////////////////////////////////////////////////
885 -->
886
887 <interface
888 name="IVirtualBoxCallback" extends="$unknown"
889 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
890 wsmap="suppress"
891 >
892 <method name="onMachineStateChange">
893 <desc>
894 The execution state of the given machine has changed.
895 <see>IMachine::state</see>
896 </desc>
897 <param name="machineId" type="uuid" dir="in">
898 <desc>ID of the machine this event relates to.</desc>
899 </param>
900 <param name="state" type="MachineState" dir="in">
901 <desc>New execution state.</desc>
902 </param>
903 </method>
904
905 <method name="onMachineDataChange">
906 <desc>
907 Any of the settings of the given machine has changed.
908 </desc>
909 <param name="machineId" type="uuid" dir="in">
910 <desc>ID of the machine this event relates to.</desc>
911 </param>
912 </method>
913
914 <method name="onExtraDataCanChange">
915 <desc>
916 Notification when someone tries to change extra data for
917 either the given machine or (if null) global extra data.
918 This gives the chance to veto against changes.
919 </desc>
920 <param name="machineId" type="uuid" dir="in">
921 <desc>
922 ID of the machine this event relates to
923 (null ID for global extra data change requests).
924 </desc>
925 </param>
926 <param name="key" type="wstring" dir="in">
927 <desc>
928 Extra data key for the attempted write.
929 </desc>
930 </param>
931 <param name="value" type="wstring" dir="in">
932 <desc>
933 Extra data value for the given key.
934 </desc>
935 </param>
936 <param name="error" type="wstring" dir="out">
937 <desc>
938 Optional error message describing the reason of the
939 veto (ignored if this notification returns @c true).
940 </desc>
941 </param>
942 <param name="allowChange" type="boolean" dir="return">
943 <desc>
944 Flag to indicate whether the callee agrees (@c true)
945 or vetoes against the change (@c false).
946 </desc>
947 </param>
948 </method>
949
950 <method name="onExtraDataChange">
951 <desc>
952 Notification when machine specific or global extra data
953 has changed.
954 </desc>
955 <param name="machineId" type="uuid" dir="in">
956 <desc>
957 ID of the machine this event relates to.
958 Null for global extra data changes.
959 </desc>
960 </param>
961 <param name="key" type="wstring" dir="in">
962 <desc>
963 Extra data key that has changed.
964 </desc>
965 </param>
966 <param name="value" type="wstring" dir="in">
967 <desc>
968 Extra data value for the given key.
969 </desc>
970 </param>
971 </method>
972
973 <method name="onMediaRegistered">
974 <desc>
975 The given media was registered or unregistered
976 within this VirtualBox installation.
977
978 The @a mediaType parameter describes what type of
979 media the specified @a mediaId refers to. Possible
980 values are:
981
982 <ul>
983 <li><link to="DeviceType::HardDisk"/>: the media is a hard disk
984 that, if registered, can be obtained using the
985 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
986 <li><link to="DeviceType::DVD"/>: the media is a CD/DVD image
987 that, if registered, can be obtained using the
988 <link to="IVirtualBox::getDVDImage()"/> call.</li>
989 <li><link to="DeviceType::Floppy"/>: the media is a Floppy image
990 that, if registered, can be obtained using the
991 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
992 </ul>
993
994 Note that if this is a deregistration notification,
995 there is no way to access the object representing the
996 unregistered media. It is supposed that the
997 application will do required cleanup based on the @a
998 mediaId value.
999 </desc>
1000 <param name="mediaId" type="uuid" dir="in">
1001 <desc>ID of the media this event relates to.</desc>
1002 </param>
1003 <param name="mediaType" type="DeviceType" dir="in">
1004 <desc>Type of the media this event relates to.</desc>
1005 </param>
1006 <param name="registered" type="boolean" dir="in">
1007 <desc>
1008 If true, the media was registered, otherwise it was
1009 unregistered.
1010 </desc>
1011 </param>
1012 </method>
1013
1014 <method name="onMachineRegistered">
1015 <desc>
1016 The given machine was registered or unregistered
1017 within this VirtualBox installation.
1018 </desc>
1019 <param name="machineId" type="uuid" dir="in">
1020 <desc>ID of the machine this event relates to.</desc>
1021 </param>
1022 <param name="registered" type="boolean" dir="in">
1023 <desc>
1024 If true, the machine was registered, otherwise it was
1025 unregistered.
1026 </desc>
1027 </param>
1028 </method>
1029
1030 <method name="onSessionStateChange">
1031 <desc>
1032 The state of the session for the given machine was changed.
1033 <see>IMachine::sessionState</see>
1034 </desc>
1035 <param name="machineId" type="uuid" dir="in">
1036 <desc>ID of the machine this event relates to.</desc>
1037 </param>
1038 <param name="state" type="SessionState" dir="in">
1039 <desc>New session state.</desc>
1040 </param>
1041 </method>
1042
1043 <method name="onSnapshotTaken">
1044 <desc>
1045 A new snapshot of the machine has been taken.
1046 <see>ISnapshot</see>
1047 </desc>
1048 <param name="machineId" type="uuid" dir="in">
1049 <desc>ID of the machine this event relates to.</desc>
1050 </param>
1051 <param name="snapshotId" type="uuid" dir="in">
1052 <desc>ID of the new snapshot.</desc>
1053 </param>
1054 </method>
1055
1056 <method name="onSnapshotDiscarded">
1057 <desc>
1058 Snapshot of the given machine has been discarded.
1059
1060 <note>
1061 This notification is delivered <b>after</b> the snapshot
1062 object has been uninitialized on the server (so that any
1063 attempt to call its methods will return an error).
1064 </note>
1065
1066 <see>ISnapshot</see>
1067 </desc>
1068 <param name="machineId" type="uuid" dir="in">
1069 <desc>ID of the machine this event relates to.</desc>
1070 </param>
1071 <param name="snapshotId" type="uuid" dir="in">
1072 <desc>
1073 ID of the discarded snapshot. <tt>null</tt> means the
1074 current machine state has been discarded (restored from
1075 the current snapshot).
1076 </desc>
1077 </param>
1078 </method>
1079
1080 <method name="onSnapshotChange">
1081 <desc>
1082 Snapshot properties (name and/or description) have been changed.
1083 <see>ISnapshot</see>
1084 </desc>
1085 <param name="machineId" type="uuid" dir="in">
1086 <desc>ID of the machine this event relates to.</desc>
1087 </param>
1088 <param name="snapshotId" type="uuid" dir="in">
1089 <desc>ID of the changed snapshot.</desc>
1090 </param>
1091 </method>
1092
1093 <method name="onGuestPropertyChange">
1094 <desc>
1095 Notification when a guest property has changed.
1096 </desc>
1097 <param name="machineId" type="uuid" dir="in">
1098 <desc>
1099 ID of the machine this event relates to.
1100 </desc>
1101 </param>
1102 <param name="name" type="wstring" dir="in">
1103 <desc>
1104 The name of the property that has changed.
1105 </desc>
1106 </param>
1107 <param name="value" type="wstring" dir="in">
1108 <desc>
1109 The new property value.
1110 </desc>
1111 </param>
1112 <param name="flags" type="wstring" dir="in">
1113 <desc>
1114 The new property flags.
1115 </desc>
1116 </param>
1117 </method>
1118
1119 </interface>
1120
1121 <interface
1122 name="IVirtualBox" extends="$dispatched"
1123 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1124 wsmap="managed"
1125 >
1126 <desc>
1127 The IVirtualBox interface represents the main interface exposed by the
1128 product that provides virtual machine management.
1129
1130 An instance of IVirtualBox is required for the product to do anything
1131 useful. Even though the interface does not expose this, internally,
1132 IVirtualBox is implemented as a singleton and actually lives in the
1133 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1134 IVirtualBox can track the state of all virtual machines on a particular
1135 host, regardless of which frontend started them.
1136
1137 To enumerate all the virtual machines on the host, use the
1138 <link to="IVirtualBox::machines2"/> attribute.
1139 </desc>
1140
1141 <attribute name="version" type="wstring" readonly="yes">
1142 <desc>
1143 A string representing the version number of the product. The
1144 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1145 last number represents the build number and will frequently change.
1146 </desc>
1147 </attribute>
1148
1149 <attribute name="revision" type="unsigned long" readonly="yes">
1150 <desc>
1151 The internal build revision number of the product.
1152 </desc>
1153 </attribute>
1154
1155 <attribute name="packageType" type="wstring" readonly="yes">
1156 <desc>
1157 A string representing the package type of this product. The
1158 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1159 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1160 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1161 this.
1162 </desc>
1163 </attribute>
1164
1165 <attribute name="homeFolder" type="wstring" readonly="yes">
1166 <desc>
1167 Full path to the directory where the global settings file,
1168 <tt>VirtualBox.xml</tt>, is stored.
1169
1170 In this version of VirtualBox, the value of this property is
1171 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1172 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1173 as determined by the host OS), and cannot be changed.
1174
1175 This path is also used as the base to resolve relative paths in
1176 places where relative paths are allowed (unless otherwise
1177 expressly indicated).
1178 </desc>
1179 </attribute>
1180
1181 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1182 <desc>
1183 Full name of the global settings file.
1184 The value of this property corresponds to the value of
1185 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1186 </desc>
1187 </attribute>
1188
1189 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1190 <desc>
1191 Current version of the format of the global VirtualBox settings file
1192 (<tt>VirtualBox.xml</tt>).
1193
1194 The version string has the following format:
1195 <pre>
1196 x.y-platform
1197 </pre>
1198 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1199 versions, and <tt>platform</tt> is the platform identifier.
1200
1201 The current version usually matches the value of the
1202 <link to="#settingsFormatVersion"/> attribute unless the
1203 settings file was created by an older version of VirtualBox and there
1204 was a change of the settings file format since then.
1205
1206 Note that VirtualBox automatically converts settings files from older
1207 versions to the most recent version when reading them (usually at
1208 VirtualBox startup) but it doesn't save the changes back until
1209 you call a method that implicitly saves settings (such as
1210 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1211 explicitly. Therefore, if the value of this attribute differs from the
1212 value of <link to="#settingsFormatVersion"/>, then it
1213 means that the settings file was converted but the result of the
1214 conversion is not yet saved to disk.
1215
1216 The above feature may be used by interactive front-ends to inform users
1217 about the settings file format change and offer them to explicitly save
1218 all converted settings files (the global and VM-specific ones),
1219 optionally create backup copies of the old settings files before saving,
1220 etc.
1221
1222 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1223 </desc>
1224 </attribute>
1225
1226 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1227 <desc>
1228 Most recent version of the settings file format.
1229
1230 The version string has the following format:
1231 <pre>
1232 x.y-platform
1233 </pre>
1234 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1235 versions, and <tt>platform</tt> is the platform identifier.
1236
1237 VirtualBox uses this version of the format when saving settings files
1238 (either as a result of method calls that require to save settings or as
1239 a result of an explicit call to <link to="#saveSettings()"/>).
1240
1241 <see>settingsFileVersion</see>
1242 </desc>
1243 </attribute>
1244
1245 <attribute name="host" type="IHost" readonly="yes">
1246 <desc>Associated host object.</desc>
1247 </attribute>
1248
1249 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1250 <desc>Associated system information object.</desc>
1251 </attribute>
1252
1253 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1254 <desc>
1255 Array of machine objects registered within this VirtualBox instance.
1256 </desc>
1257 </attribute>
1258
1259 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1260 <desc>
1261 Array of hard disk objects known to this VirtualBox installation.
1262
1263 This array contains only base (root) hard disks. All differencing
1264 hard disks of the given base hard disk can be enumerated using
1265 <link to="IHardDisk2::children"/>.
1266 </desc>
1267 </attribute>
1268
1269 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1270 <desc>
1271 Array of CD/DVD image objects registered with this VirtualBox instance.
1272 </desc>
1273 </attribute>
1274
1275 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1276 <desc>
1277 Array of floppy image objects registered with this VirtualBox instance.
1278 </desc>
1279 </attribute>
1280
1281 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1282
1283 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1284
1285 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1286 <desc>
1287 Collection of global shared folders. Global shared folders are
1288 available to all virtual machines.
1289
1290 New shared folders are added to the collection using
1291 <link to="#createSharedFolder"/>. Existing shared folders can be
1292 removed using <link to="#removeSharedFolder"/>.
1293
1294 <note>
1295 In the current version of the product, global shared folders are not
1296 implemented and therefore this collection is always empty.
1297 </note>
1298 </desc>
1299 </attribute>
1300
1301 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1302 <desc>
1303 Associated performance collector object.
1304 </desc>
1305 </attribute>
1306
1307 <method name="createMachine">
1308 <desc>
1309 Creates a new virtual machine.
1310
1311 The new machine is created unregistered, with the initial configuration
1312 set according to the specified guest OS type. A typical sequence of
1313 actions to create a new virtual machine is as follows:
1314
1315 <ol>
1316 <li>
1317 Call this method to have a new machine created. The returned machine
1318 object will be "mutable" allowing to change any machine property.
1319 </li>
1320
1321 <li>
1322 Configure the machine using the appropriate attributes and methods.
1323 </li>
1324
1325 <li>
1326 Call <link to="IMachine::saveSettings()" /> to write the settings
1327 to the machine's XML settings file. The configuration of the newly
1328 created machine will not be saved to disk until this method is
1329 called.
1330 </li>
1331
1332 <li>
1333 Call <link to="#registerMachine()" /> to add the machine to the list
1334 of machines known to VirtualBox.
1335 </li>
1336 </ol>
1337
1338 You should specify valid name for the newly created machine when calling
1339 this method. See the <link to="IMachine::name"/> attribute description
1340 for more details about the machine name.
1341
1342 The specified guest OS type identifier must match an ID of one of known
1343 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1344 array.
1345
1346 Every machine has a <i>settings file</i> that is used to store
1347 the machine configuration. This file is stored in a directory called the
1348 <i>machine settings subfolder</i>. Both the settings subfolder and file
1349 will have a name that corresponds to the name of the virtual machine.
1350 You can specify where to create the machine setting subfolder using the
1351 @a baseFolder argument. The base folder can be absolute (full path) or
1352 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1353 directory</link>.
1354
1355 If @a baseFolder is a null or empty string (which is recommended), the
1356 <link to="ISystemProperties::defaultMachineFolder">default machine
1357 settings folder</link> will be used as a base folder for the created
1358 machine. Otherwise the given base folder will be used. In either case,
1359 the full path to the resulting settings file has the following
1360 structure:
1361 <pre>
1362 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1363 </pre>
1364
1365 Note that if the resulting settings file already exists, this method
1366 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1367
1368 Optionally, you may specify an UUID of to assign to the created machine.
1369 However, this is not recommended and you should normally pass an empty
1370 (null) UUID to this method so that a new UUID will be automatically
1371 generated for every created machine.
1372
1373 <note>
1374 There is no way to change the name of the settings file or
1375 subfolder of the created machine directly.
1376 </note>
1377
1378 <result name="VBOX_E_OBJECT_NOT_FOUND">
1379 @a osTypeId is invalid.
1380 </result>
1381 <result name="VBOX_E_FILE_ERROR">
1382 Resulting settings file name is invalid or the settings file already
1383 exists or could not be created due to an I/O error.
1384 </result>
1385 <result name="E_INVALIDARG">
1386 @a name is empty or null.
1387 </result>
1388 </desc>
1389
1390 <param name="name" type="wstring" dir="in">
1391 <desc>Machine name.</desc>
1392 </param>
1393 <param name="osTypeId" type="wstring" dir="in">
1394 <desc>Guest OS Type ID.</desc>
1395 </param>
1396 <param name="baseFolder" type="wstring" dir="in">
1397 <desc>Base machine folder (optional).</desc>
1398 </param>
1399 <param name="id" type="uuid" dir="in">
1400 <desc>Machine UUID (optional).</desc>
1401 </param>
1402 <param name="machine" type="IMachine" dir="return">
1403 <desc>Created machine object.</desc>
1404 </param>
1405 </method>
1406
1407 <method name="createLegacyMachine">
1408 <desc>
1409 Creates a new virtual machine in "legacy" mode, using the specified
1410 settings file to store machine settings.
1411
1412 As opposed to machines created by <link to="#createMachine()"/>,
1413 the settings file of the machine created in "legacy" mode is not
1414 automatically renamed when the machine name is changed -- it will always
1415 remain the same as specified in this method call.
1416
1417 The specified settings file name can be absolute (full path) or relative
1418 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1419 directory</link>. If the file name doesn't contain an extension, the
1420 default extension (.xml) will be appended.
1421
1422 Note that the configuration of the newly created machine is not
1423 saved to disk (and therefore no settings file is created)
1424 until <link to="IMachine::saveSettings()"/> is called. If the
1425 specified settings file already exists, this method
1426 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1427
1428 See <link to="#createMachine()"/> for more information.
1429
1430 @deprecated This method may be removed later. Use <link
1431 to="IVirtualBox::createMachine()"/> instead.
1432
1433 <note>
1434 There is no way to change the name of the settings file
1435 of the machine created in "legacy" mode.
1436 </note>
1437
1438 <result name="VBOX_E_OBJECT_NOT_FOUND">
1439 @a osTypeId is invalid.
1440 </result>
1441 <result name="VBOX_E_FILE_ERROR">
1442 @a settingsFile is invalid or the settings file already exists or
1443 could not be created due to an I/O error.
1444 </result>
1445 <result name="E_INVALIDARG">
1446 @a name or @a settingsFile is empty or null.
1447 </result>
1448 </desc>
1449
1450 <param name="name" type="wstring" dir="in">
1451 <desc>Machine name.</desc>
1452 </param>
1453 <param name="osTypeId" type="wstring" dir="in">
1454 <desc>Machine OS Type ID.</desc>
1455 </param>
1456 <param name="settingsFile" type="wstring" dir="in">
1457 <desc>Name of the machine settings file.</desc>
1458 </param>
1459 <param name="id" type="uuid" dir="in">
1460 <desc>Machine UUID (optional).</desc>
1461 </param>
1462 <param name="machine" type="IMachine" dir="return">
1463 <desc>Created machine object.</desc>
1464 </param>
1465 </method>
1466
1467 <method name="openMachine">
1468 <desc>
1469 Opens a virtual machine from the existing settings file.
1470 The opened machine remains unregistered until you call
1471 <link to="#registerMachine()"/>.
1472
1473 The specified settings file name can be absolute
1474 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1475 VirtualBox home directory</link>. This file must exist
1476 and must be a valid machine settings file whose contents
1477 will be used to construct the machine object.
1478
1479 @deprecated Will be removed soon.
1480 </desc>
1481 <param name="settingsFile" type="wstring" dir="in">
1482 <desc>
1483 Name of the machine settings file.
1484 </desc>
1485 </param>
1486 <param name="machine" type="IMachine" dir="return">
1487 <desc>Opened machine object.</desc>
1488 </param>
1489 <note>
1490 <link to="IMachine::settingsModified"/> will return
1491 false for the created machine, until any of machine settings
1492 are changed.
1493 </note>
1494 </method>
1495
1496 <method name="registerMachine">
1497 <desc>
1498
1499 Registers the machine previously created using
1500 <link to="#createMachine()"/> or opened using
1501 <link to="#openMachine()"/> within this VirtualBox installation. After
1502 successful method invocation, the
1503 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1504 to all registered callbacks.
1505
1506 <note>
1507 This method implicitly calls <link to="IMachine::saveSettings"/>
1508 to save all current machine settings before registering it.
1509 </note>
1510
1511 </desc>
1512 <param name="machine" type="IMachine" dir="in"/>
1513 </method>
1514
1515 <method name="getMachine">
1516 <desc>
1517 Attempts to find a virtual machine given its UUID.
1518 To look up a machine by name, use <link to="IVirtualBox::findMachine" /> instead.
1519 </desc>
1520 <param name="id" type="uuid" dir="in"/>
1521 <param name="machine" type="IMachine" dir="return"/>
1522 </method>
1523
1524 <method name="findMachine">
1525 <desc>
1526 Attempts to find a virtual machine given its name.
1527 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" /> instead.
1528 </desc>
1529 <param name="name" type="wstring" dir="in"/>
1530 <param name="machine" type="IMachine" dir="return"/>
1531 </method>
1532
1533 <method name="unregisterMachine">
1534 <desc>
1535
1536 Unregisters the machine previously registered using
1537 <link to="#registerMachine"/>. After successful method invocation, the
1538 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1539 to all registered callbacks.
1540
1541 <note>
1542 The specified machine must not be in the Saved state, have an open
1543 (or a spawning) direct session associated with it, have snapshots or
1544 have hard disks attached.
1545 </note>
1546
1547 <note>
1548 This method implicitly calls <link to="IMachine::saveSettings"/> to
1549 save all current machine settings before unregistering it.
1550 </note>
1551
1552 <note>
1553 If the given machine is inaccessible (see
1554 <link to="IMachine::accessible"/>), it will be unregistered and
1555 fully uninitialized right afterwards. As a result, the returned
1556 machine object will be unusable and an attempt to call
1557 <b>any</b> method will return the "Object not ready" error.
1558 </note>
1559
1560 </desc>
1561 <param name="id" type="uuid" dir="in">
1562 <desc>UUID of the machine to unregister.</desc>
1563 </param>
1564 <param name="machine" type="IMachine" dir="return">
1565 <desc>Unregistered machine object.</desc>
1566 </param>
1567 </method>
1568
1569 <method name="createHardDisk2">
1570 <desc>
1571 Creates a new base hard disk object that will use the given storage
1572 format and location for hard disk data.
1573
1574 Note that the actual storage unit is not created by this method. In
1575 order to do it, and before you are able to attach the created hard disk
1576 to virtual machines, you must call one of the following methods to
1577 allocate a format-specific storage unit at the specified location:
1578 <ul>
1579 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1580 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1581 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1582 </ul>
1583
1584 Some hard disk attributes, such as <link to="#id"/>, may remain
1585 uninitialized until the hard disk storage unit is successfully created
1586 by one of the above methods.
1587
1588 After the storage unit is successfully created, the hard disk gets
1589 remembered by this VirtualBox installation and will be accessible
1590 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1591 methods. Remembered root (base) hard disks are also returned as part of
1592 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1593
1594 The list of all storage formats supported by this VirtualBox
1595 installation can be obtained using
1596 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1597 attribute is empty or <tt>null</tt> then the default storage format
1598 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1599 be used for creating a storage unit of the hard disk.
1600
1601 Note that the format of the location string is storage format specific.
1602 See <link to="IMedium::location"/>, IHardDisk2 and
1603 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1604 </desc>
1605 <param name="format" type="wstring" dir="in">
1606 <desc>
1607 Identifier of the storage format to use for the new hard disk.
1608 </desc>
1609 </param>
1610 <param name="location" type="wstring" dir="in">
1611 <desc>
1612 Location of the storage unit for the new hard disk.
1613 </desc>
1614 </param>
1615 <param name="hardDisk" type="IHardDisk2" dir="return">
1616 <desc>Created hard disk object.</desc>
1617 </param>
1618 </method>
1619
1620 <method name="openHardDisk2">
1621 <desc>
1622 Opens a hard disk from an existing location.
1623
1624 After the hard disk is successfully opened by this method, it gets
1625 remembered by (known to) this VirtualBox installation and will be
1626 accessible through <link to="#getHardDisk2()"/> and
1627 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1628 are also returned as part of the <link to="#hardDisks2"/> array and can
1629 be attached to virtual machines. See IHardDisk2 for more details.
1630
1631 If a differencing hard disk is to be opened by this method, the
1632 operation will succeed only if its parent hard disk and all ancestors,
1633 if any, are already known to this VirtualBox installation (for example,
1634 were opened by this method before).
1635
1636 This method tries to guess the storage format of the specified hard disk
1637 by reading hard disk data at the specified location.
1638
1639 Note that the format of the location string is storage format specific.
1640 See <link to="IMedium::location"/>, IHardDisk2 and
1641 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1642 </desc>
1643 <param name="location" type="wstring" dir="in">
1644 <desc>
1645 Location of the storage unit that contains hard disk data in one of
1646 the supported storage formats.
1647 </desc>
1648 </param>
1649 <param name="hardDisk" type="IHardDisk2" dir="return">
1650 <desc>Opened hard disk object.</desc>
1651 </param>
1652 </method>
1653
1654 <method name="getHardDisk2" const="yes">
1655 <desc>
1656 Returns a hard disk with the given UUID.
1657
1658 The hard disk with the given UUID must be known to this VirtualBox
1659 installation, i.e. it must be previously created by
1660 <link to="#createHardDisk2()"/> or opened by <link
1661 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1662 </desc>
1663 <param name="id" type="uuid" dir="in">
1664 <desc>UUID of the hard disk to look for.</desc>
1665 </param>
1666 <param name="hardDisk" type="IHardDisk2" dir="return">
1667 <desc>Found hard disk object.</desc>
1668 </param>
1669 </method>
1670
1671 <method name="findHardDisk2">
1672 <desc>
1673 Returns a hard disk that uses the given location to store hard
1674 disk data.
1675
1676 The given hard disk must be known to this VirtualBox installation, i.e.
1677 it must be previously created by
1678 <link to="#createHardDisk2()"/> or opened by <link
1679 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1680
1681 The search is done by comparing the value of the @a location argument to
1682 the <link to="IHardDisk2::location"/> attribute of each known hard
1683 disk.
1684
1685 For locations represented by file names in the host's file system, the
1686 requested location can be a path relative to the
1687 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1688 only a file name without any path is given, the
1689 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1690 folder</link> will be prepended to the file name before searching. Note
1691 that on case sensitive file systems, a case sensitive comparison is
1692 performed, otherwise the case of symbols in the file path is ignored.
1693 </desc>
1694 <param name="location" type="wstring" dir="in">
1695 <desc>Location string to search for.</desc>
1696 </param>
1697 <param name="hardDisk" type="IHardDisk2" dir="return">
1698 <desc>Found hard disk object.</desc>
1699 </param>
1700 </method>
1701
1702 <method name="openDVDImage">
1703 <desc>
1704 Opens a CD/DVD image contained in the specified file of the supported
1705 format and assigns it the given UUID.
1706
1707 After the image is successfully opened by this method, it gets
1708 remembered by (known to) this VirtualBox installation and will be
1709 accessible through <link to="#getDVDImage()"/> and
1710 <link to="#findDVDImage()"/> methods. Remembered images are also
1711 returned as part of the <link to="#DVDImages"/> array and can be mounted
1712 to virtual machines. See IMedium for more details.
1713
1714 See <link to="IMedium::location"/> to get more details about the format
1715 of the location string.
1716
1717 <note>
1718 Currently, only ISO CD/DVD images are supported by VirtualBox.
1719 </note>
1720 </desc>
1721 <param name="location" type="wstring" dir="in">
1722 <desc>
1723 Full path to the file that contains a valid CD/DVD image.
1724 </desc>
1725 </param>
1726 <param name="id" type="uuid" dir="in">
1727 <desc>
1728 UUID to assign to the given image within this VirtualBox installation.
1729 If an empty (null) UUID is specified, the system will randomly
1730 generate a new UUID.
1731 </desc>
1732 </param>
1733 <param name="image" type="IDVDImage2" dir="return">
1734 <desc>Opened CD/DVD image object.</desc>
1735 </param>
1736 </method>
1737
1738 <method name="getDVDImage">
1739 <desc>
1740 Returns a CD/DVD image with the given UUID.
1741
1742 The image with the given UUID must be known to this VirtualBox
1743 installation, i.e. it must be previously opened by <link
1744 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1745 </desc>
1746 <param name="id" type="uuid" dir="in">
1747 <desc>UUID of the image to look for.</desc>
1748 </param>
1749 <param name="image" type="IDVDImage2" dir="return">
1750 <desc>Found CD/DVD image object.</desc>
1751 </param>
1752 </method>
1753
1754 <method name="findDVDImage">
1755 <desc>
1756 Returns a CD/DVD image with the given image location.
1757
1758 The image with the given UUID must be known to this VirtualBox
1759 installation, i.e. it must be previously opened by <link
1760 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1761
1762 The search is done by comparing the value of the @a location argument to
1763 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1764
1765 The requested location can be a path relative to the
1766 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1767 only a file name without any path is given, the
1768 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1769 folder</link> will be prepended to the file name before searching. Note
1770 that on case sensitive file systems, a case sensitive comparison is
1771 performed, otherwise the case of symbols in the file path is ignored.
1772 </desc>
1773 <param name="location" type="wstring" dir="in">
1774 <desc>CD/DVD image file path to look for.</desc>
1775 </param>
1776 <param name="image" type="IDVDImage2" dir="return">
1777 <desc>Found CD/DVD image object.</desc>
1778 </param>
1779 </method>
1780
1781 <method name="openFloppyImage">
1782 <desc>
1783 Opens a floppy image contained in the specified file of the supported
1784 format and assigns it the given UUID.
1785
1786 After the image is successfully opened by this method, it gets
1787 remembered by (known to) this VirtualBox installation and will be
1788 accessible through <link to="#getFloppyImage()"/> and
1789 <link to="#findFloppyImage()"/> methods. Remembered images are also
1790 returned as part of the <link to="#floppyImages"/> array and can be
1791 mounted to virtual machines. See IMedium for more details.
1792
1793 See <link to="IMedium::location"/> to get more details about the format
1794 of the location string.
1795
1796 <note>
1797 Currently, only raw floppy images are supported by VirtualBox.
1798 </note>
1799 </desc>
1800 <param name="location" type="wstring" dir="in">
1801 <desc>
1802 Full path to the file that contains a valid floppy image.
1803 </desc>
1804 </param>
1805 <param name="id" type="uuid" dir="in">
1806 <desc>
1807 UUID to assign to the given image file within this VirtualBox
1808 installation. If an empty (null) UUID is specified, the system will
1809 randomly generate a new UUID.
1810 </desc>
1811 </param>
1812 <param name="image" type="IFloppyImage2" dir="return">
1813 <desc>Opened floppy image object.</desc>
1814 </param>
1815 </method>
1816
1817 <method name="getFloppyImage">
1818 <desc>
1819 Returns a floppy image with the given UUID.
1820
1821 The image with the given UUID must be known to this VirtualBox
1822 installation, i.e. it must be previously opened by <link
1823 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1824 </desc>
1825 <param name="id" type="uuid" dir="in">
1826 <desc>UUID of the image to look for.</desc>
1827 </param>
1828 <param name="image" type="IFloppyImage2" dir="return">
1829 <desc>Found floppy image object.</desc>
1830 </param>
1831 </method>
1832
1833 <method name="findFloppyImage">
1834 <desc>
1835 Returns a floppy image with the given image location.
1836
1837 The image with the given UUID must be known to this VirtualBox
1838 installation, i.e. it must be previously opened by <link
1839 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1840
1841 The search is done by comparing the value of the @a location argument to
1842 the <link to="IMedium::location"/> attribute of each known floppy image.
1843
1844 The requested location can be a path relative to the
1845 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1846 only a file name without any path is given, the
1847 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1848 folder</link> will be prepended to the file name before searching. Note
1849 that on case sensitive file systems, a case sensitive comparison is
1850 performed, otherwise the case of symbols in the file path is ignored.
1851 </desc>
1852 <param name="location" type="wstring" dir="in">
1853 <desc>Floppy image file path to look for.</desc>
1854 </param>
1855 <param name="image" type="IFloppyImage2" dir="return">
1856 <desc>Found floppy image object.</desc>
1857 </param>
1858 </method>
1859
1860 <method name="getGuestOSType">
1861 <desc>
1862 Returns an object describing the specified guest OS type.
1863
1864 The requested guest OS type is specified using a string which is a
1865 mnemonic identifier of the guest operating system, such as
1866 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1867 particular virtual machine can be read or set using the
1868 <link to="IMachine::OSTypeId"/> attribute.
1869
1870 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1871 available guest OS type objects. Each object has an
1872 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1873 the guest OS this object describes.
1874 </desc>
1875 <param name="id" type="wstring" dir="in">
1876 <desc>Guest OS type ID string.</desc>
1877 </param>
1878 <param name="type" type="IGuestOSType" dir="return">
1879 <desc>Guest OS type object.</desc>
1880 </param>
1881 </method>
1882
1883 <method name="createSharedFolder">
1884 <desc>
1885 Creates a new global shared folder by associating the given logical
1886 name with the given host path, adds it to the collection of shared
1887 folders and starts sharing it. Refer to the description of
1888 <link to="ISharedFolder"/> to read more about logical names.
1889 </desc>
1890 <param name="name" type="wstring" dir="in">
1891 <desc>Unique logical name of the shared folder.</desc>
1892 </param>
1893 <param name="hostPath" type="wstring" dir="in">
1894 <desc>Full path to the shared folder in the host file system.</desc>
1895 </param>
1896 <param name="writable" type="boolean" dir="in">
1897 <desc>Whether the share is writable or readonly</desc>
1898 </param>
1899 </method>
1900
1901 <method name="removeSharedFolder">
1902 <desc>
1903 Removes the global shared folder with the given name previously
1904 created by <link to="#createSharedFolder"/> from the collection of
1905 shared folders and stops sharing it.
1906 </desc>
1907 <param name="name" type="wstring" dir="in">
1908 <desc>Logical name of the shared folder to remove.</desc>
1909 </param>
1910 </method>
1911
1912 <method name="getNextExtraDataKey">
1913 <desc>
1914 Returns the global extra data key name following the supplied key.
1915
1916 An error is returned if the supplied @a key does not exist. @c NULL is
1917 returned in @a nextKey if the supplied key is the last key. When
1918 supplying @c NULL for the @a key, the first key item is returned in @a
1919 nextKey (if there is any). @a nextValue is an optional parameter and
1920 if supplied, the next key's value is returned in it.
1921 </desc>
1922 <param name="key" type="wstring" dir="in">
1923 <desc>Name of the data key to follow.</desc>
1924 </param>
1925 <param name="nextKey" type="wstring" dir="out">
1926 <desc>Name of the next data key.</desc>
1927 </param>
1928 <param name="nextValue" type="wstring" dir="out">
1929 <desc>Value of the next data key.</desc>
1930 </param>
1931 </method>
1932
1933 <method name="getExtraData">
1934 <desc>
1935 Returns associated global extra data.
1936
1937 If the requested data @a key does not exist, this function will
1938 succeed and return @c NULL in the @a value argument.
1939 </desc>
1940 <param name="key" type="wstring" dir="in">
1941 <desc>Name of the data key to get.</desc>
1942 </param>
1943 <param name="value" type="wstring" dir="return">
1944 <desc>Value of the requested data key.</desc>
1945 </param>
1946 </method>
1947
1948 <method name="setExtraData">
1949 <desc>
1950 Sets associated global extra data.
1951
1952 If you pass @c NULL as a key @a value, the given @a key will be
1953 deleted.
1954
1955 <note>
1956 Before performing the actual data change, this method will ask all
1957 registered callbacks using the
1958 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
1959 notification for a permission. If one of the callbacks refuses the
1960 new value, the change will not be performed.
1961 </note>
1962 <note>
1963 On success, the
1964 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
1965 is called to inform all registered callbacks about a successful data
1966 change.
1967 </note>
1968 </desc>
1969 <param name="key" type="wstring" dir="in">
1970 <desc>Name of the data key to set.</desc>
1971 </param>
1972 <param name="value" type="wstring" dir="in">
1973 <desc>Value to assign to the key.</desc>
1974 </param>
1975 </method>
1976
1977 <method name="openSession">
1978 <desc>
1979 Opens a new direct session with the given virtual machine.
1980
1981 A direct session acts as a local lock on the given VM.
1982 There can be only one direct session open at a time for every
1983 virtual machine, protecting the VM from being manipulated by
1984 conflicting actions from different processes. Only after a
1985 direct session has been opened, one can change all VM settings
1986 and execute the VM in the process space of the session object.
1987
1988 Sessions therefore can be compared to mutex semaphores that
1989 lock a given VM for modification and execution.
1990 See <link to="ISession">ISession</link> for details.
1991
1992 <note>Unless you are writing a new VM frontend, you will not
1993 want to execute a VM in the current process. To spawn a new
1994 process that executes a VM, use
1995 <link to="IVirtualBox::openRemoteSession" />
1996 instead.</note>
1997
1998 Upon successful return, the session object can be used to
1999 get access to the machine and to the VM console.
2000
2001 In VirtualBox terminology, the machine becomes "mutable" after
2002 a session has been opened. Note that the "mutable" machine
2003 object, on which you may invoke IMachine methods to change its
2004 settings, will be a different object from the immutable IMachine
2005 objects returned by various IVirtualBox methods. To obtain a
2006 mutable IMachine object (upon which you can invoke settings methods),
2007 use the <link to="ISession::machine" /> attribute.
2008
2009 One must always call <link to="ISession::close" /> to release the
2010 lock on the machine, or the machine's state will eventually be
2011 set to "Aborted".
2012
2013 In other words, to change settings on a machine, the following
2014 sequence is typically performed:
2015
2016 <ol>
2017 <li>Call this method (openSession) to have a machine locked for
2018 the current session.</li>
2019
2020 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2021
2022 <li>Change the settings of the machine.</li>
2023
2024 <li>Call <link to="IMachine::saveSettings" />.</li>
2025
2026 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2027 </ol>
2028 </desc>
2029 <param name="session" type="ISession" dir="in">
2030 <desc>
2031 Session object that will represent the opened session after
2032 successful method invocation. This object must not represent
2033 the already open session.
2034 <note>
2035 This session will be automatically closed if the
2036 VirtualBox server is terminated for some reason.
2037 </note>
2038 </desc>
2039 </param>
2040 <param name="machineId" type="uuid" dir="in">
2041 <desc>ID of the virtual machine to open a session with.</desc>
2042 </param>
2043 </method>
2044
2045 <method name="openRemoteSession">
2046 <desc>
2047 Spawns a new process that executes a virtual machine (called a
2048 "remote session").
2049
2050 Opening a remote session causes the VirtualBox server to start a new
2051 process that opens a direct session with the given VM. As a result, the
2052 VM is locked by that direct session in the new process, preventing
2053 conflicting changes from other processes. Since sessions act as locks
2054 that such prevent conflicting changes, one cannot open a remote session
2055 for a VM that already has another open session (direct or remote), or
2056 is currently in the process of opening one (see <link to="IMachine::sessionState"/>).
2057
2058 While the remote session still provides some level of control over the
2059 VM execution to the caller (using the <link to="IConsole" /> interface),
2060 not all VM settings are available for modification within the remote
2061 session context.
2062
2063 This operation can take some time (a new VM is started in a new process,
2064 for which memory and other resources need to be set up). Because of this,
2065 an <link to="IProgress" /> is returned to allow the caller to wait for this
2066 asynchronous operation to be completed. Until then, the remote session
2067 object remains in the closed state, and accessing the machine or its
2068 console through it is invalid. It is recommended to use
2069 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2070 completion.
2071
2072 As with all <link to="ISession" /> objects, it is recommended to call
2073 <link to="ISession::close" /> on the local session object once openRemoteSession()
2074 has been called. However, the session's state (see <link to="ISession::state" />)
2075 will not return to "Closed" until the remote session has also closed (i.e.
2076 until the VM is no longer running). In that case, however, the state of
2077 the session will automatically change back to "Closed".
2078
2079 Currently supported session types (values of the @a type
2080 argument) are:
2081 <ul>
2082 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2083 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2084 </ul>
2085
2086 The @a environment argument is a string containing definitions of
2087 environment variables in the following format:
2088 @code
2089 NAME[=VALUE]\n
2090 NAME[=VALUE]\n
2091 ...
2092 @endcode
2093 where <tt>\\n</tt> is the new line character. These environment
2094 variables will be appended to the environment of the VirtualBox server
2095 process. If an environment variable exists both in the server process
2096 and in this list, the value from this list takes precedence over the
2097 server's variable. If the value of the environment variable is
2098 omitted, this variable will be removed from the resulting environment.
2099 If the environment string is @c null, the server environment is
2100 inherited by the started process as is.
2101
2102 <see>openExistingSession</see>
2103 </desc>
2104 <param name="session" type="ISession" dir="in">
2105 <desc>
2106 Session object that will represent the opened remote session
2107 after successful method invocation (this object must not
2108 represent an already open session).
2109 </desc>
2110 </param>
2111 <param name="machineId" type="uuid" dir="in">
2112 <desc>ID of the virtual machine to open a session with.</desc>
2113 </param>
2114 <param name="type" type="wstring" dir="in">
2115 <desc>
2116 Type of the remote session (case sensitive).
2117 </desc>
2118 </param>
2119 <param name="environment" type="wstring" dir="in">
2120 <desc>
2121 Environment to pass to the opened session (may be @c null).
2122 </desc>
2123 </param>
2124 <param name="progress" type="IProgress" dir="return">
2125 <desc>Progress object to track the operation completion.</desc>
2126 </param>
2127 </method>
2128
2129 <method name="openExistingSession">
2130 <desc>
2131 Opens a new remote session with the virtual machine for
2132 which a direct session is already open.
2133
2134 The remote session provides some level of control over the VM
2135 execution (using the IConsole interface) to the caller; however,
2136 within the remote session context, not all VM settings are available
2137 for modification.
2138
2139 As opposed to <link to="#openRemoteSession()"/>, the number of
2140 remote sessions opened this way is not limited by the API
2141
2142 <note>
2143 It is an error to open a remote session with the machine that
2144 doesn't have an open direct session.
2145 </note>
2146
2147 <see>openRemoteSession</see>
2148 </desc>
2149 <param name="session" type="ISession" dir="in">
2150 <desc>
2151 Session object that will represent the open remote session
2152 after successful method invocation. This object must not
2153 represent an already open session.
2154 <note>
2155 This session will be automatically closed when the peer
2156 (direct) session dies or gets closed.
2157 </note>
2158 </desc>
2159 </param>
2160 <param name="machineId" type="uuid" dir="in">
2161 <desc>ID of the virtual machine to open a session with.</desc>
2162 </param>
2163 </method>
2164
2165 <method name="registerCallback">
2166 <desc>
2167 Registers a new global VirtualBox callback. The methods of the given
2168 callback object will be called by VirtualBox when an appropriate
2169 event occurs.
2170 </desc>
2171 <param name="callback" type="IVirtualBoxCallback" dir="in">
2172 <desc>Callback object to register.</desc>
2173 </param>
2174 </method>
2175
2176 <method name="unregisterCallback">
2177 <desc>
2178 Unregisters the previously registered global VirtualBox callback.
2179 </desc>
2180 <param name="callback" type="IVirtualBoxCallback" dir="in">
2181 <desc>Callback object to unregister.</desc>
2182 </param>
2183 </method>
2184
2185 <method name="waitForPropertyChange">
2186 <desc>
2187 Blocks the caller until any of the properties represented by the @a
2188 what argument changes the value or until the given timeout interval
2189 expires.
2190
2191 The @a what argument is a comma separated list of property masks that
2192 describe properties the caller is interested in. The property mask is
2193 a string in the following format:
2194
2195 <pre>
2196 [[group.]subgroup.]name
2197 </pre>
2198
2199 where @c name is the property name and @c group, @c subgroup are zero
2200 or more property group specifiers. Each element (group or name) in
2201 the property mask may be either a Latin string or an asterisk symbol
2202 (@c "*") which is used to match any string for the given element. A
2203 property mask that doesn't contain asterisk symbols represents a
2204 single fully qualified property name.
2205
2206 Groups in the fully qualified property name go from more generic (the
2207 left-most part) to more specific (the right-most part). The first
2208 element is usually a name of the object the property belongs to. The
2209 second element may be either a property name, or a child object name,
2210 or an index if the preceding element names an object which is one of
2211 many objects of the same type. This way, property names form a
2212 hierarchy of properties. Here are some examples of property names:
2213
2214 <table>
2215 <tr>
2216 <td><tt>VirtualBox.version</tt></td>
2217 <td><link to="IVirtualBox::version"/> property</td>
2218 </tr>
2219 <tr>
2220 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2221 <td><link to="IMachine::name"/> property of the machine with the
2222 given UUID</td>
2223 </tr>
2224 </table>
2225
2226 Most property names directly correspond to the properties of objects
2227 (components) provided by the VirtualBox library and may be used to
2228 track changes to these properties. However, there may be
2229 pseudo-property names that don't correspond to any existing object's
2230 property directly, as well as there may be object properties that
2231 don't have a corresponding property name that is understood by this
2232 method, and therefore changes to such properties cannot be
2233 tracked. See individual object's property descriptions to get a
2234 fully qualified property name that can be used with this method (if
2235 any).
2236
2237 There is a special property mask @c "*" (i.e. a string consisting of a
2238 single asterisk symbol) that can be used to match all properties.
2239 Below are more examples of property masks:
2240
2241 <table>
2242 <tr>
2243 <td><tt>VirtualBox.*</tt></td>
2244 <td>Track all properties of the VirtualBox object</td>
2245 </tr>
2246 <tr>
2247 <td><tt>Machine.*.name</tt></td>
2248 <td>Track changes to the <link to="IMachine::name"/> property of
2249 all registered virtual machines</td>
2250 </tr>
2251 </table>
2252
2253 </desc>
2254 <param name="what" type="wstring" dir="in">
2255 <desc>Comma separated list of property masks.</desc>
2256 </param>
2257 <param name="timeout" type="unsigned long" dir="in">
2258 <desc>
2259 Wait timeout in milliseconds.
2260 Specify -1 for an indefinite wait.
2261 </desc>
2262 </param>
2263 <param name="changed" type="wstring" dir="out">
2264 <desc>
2265 Comma separated list of properties that have been changed and caused
2266 this method to return to the caller.
2267 </desc>
2268 </param>
2269 <param name="values" type="wstring" dir="out">
2270 <desc>Reserved, not currently used.</desc>
2271 </param>
2272 </method>
2273
2274 <method name="saveSettings">
2275 <desc>
2276 Saves the global settings to the global settings file
2277 (<link to="#settingsFilePath"/>).
2278
2279 This method is only useful for explicitly saving the global settings
2280 file after it has been auto-converted from the old format to the most
2281 recent format (see <link to="#settingsFileVersion"/> for details).
2282 Normally, the global settings file is implicitly saved when a global
2283 setting is changed.
2284 </desc>
2285 </method>
2286
2287 <method name="saveSettingsWithBackup">
2288 <desc>
2289 Creates a backup copy of the global settings file
2290 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2291 calls <link to="#saveSettings()"/>.
2292
2293 Note that the backup copy is created <b>only</b> if the settings file
2294 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2295 details). Otherwise, this call is fully equivalent to
2296 <link to="#saveSettings()"/> and no backup copying is done.
2297
2298 The backup copy is created in the same directory where the original
2299 settings file is located. It is given the following file name:
2300 <pre>
2301 original.xml.x.y-platform.bak
2302 </pre>
2303 where <tt>original.xml</tt> is the original settings file name
2304 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2305 format of the settings file (before auto-conversion).
2306
2307 If the given backup file already exists, this method will try to add the
2308 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2309 0 to 9) and copy it again until it succeeds. If all suffixes are
2310 occupied, or if any other copy error occurs, this method will return a
2311 failure.
2312
2313 If the copy operation succeeds, the @a bakFileName return argument will
2314 receive a full path to the created backup file (for informational
2315 purposes). Note that this will happen even if the subsequent
2316 <link to="#saveSettings()"/> call performed by this method after the
2317 copy operation, fails.
2318
2319 <note>
2320 The VirtualBox API never calls this method. It is intended purely for
2321 the purposes of creating backup copies of the settings files by
2322 front-ends before saving the results of the automatically performed
2323 settings conversion to disk.
2324 </note>
2325
2326 <see>settingsFileVersion</see>
2327 </desc>
2328 <param name="bakFileName" type="wstring" dir="return">
2329 <desc>Full path to the created backup copy.</desc>
2330 </param>
2331 </method>
2332
2333 </interface>
2334
2335 <!--
2336 // IMachine
2337 /////////////////////////////////////////////////////////////////////////
2338 -->
2339
2340 <enumerator
2341 name="IMachineEnumerator" type="IMachine"
2342 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
2343 />
2344
2345 <collection
2346 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
2347 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
2348 readonly="yes"
2349 />
2350
2351 <interface
2352 name="IInternalMachineControl" extends="$unknown"
2353 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
2354 internal="yes"
2355 wsmap="suppress"
2356 >
2357 <method name="updateState">
2358 <desc>
2359 Updates the VM state.
2360 <note>
2361 This operation will also update the settings file with
2362 the correct information about the saved state file
2363 and delete this file from disk when appropriate.
2364 </note>
2365 </desc>
2366 <param name="state" type="MachineState" dir="in"/>
2367 </method>
2368
2369 <method name="getIPCId">
2370 <param name="id" type="wstring" dir="return"/>
2371 </method>
2372
2373 <method name="runUSBDeviceFilters">
2374 <desc>
2375 Asks the server to run USB devices filters of the associated
2376 machine against the given USB device and tell if there is
2377 a match.
2378 <note>
2379 Intended to be used only for remote USB devices. Local
2380 ones don't require to call this method (this is done
2381 implicitly by the Host and USBProxyService).
2382 </note>
2383 </desc>
2384 <param name="device" type="IUSBDevice" dir="in"/>
2385 <param name="matched" type="boolean" dir="out"/>
2386 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2387 </method>
2388
2389 <method name="captureUSBDevice">
2390 <desc>
2391 Requests a capture of the given host USB device.
2392 When the request is completed, the VM process will
2393 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2394 notification.
2395 </desc>
2396 <param name="id" type="uuid" dir="in"/>
2397 </method>
2398
2399 <method name="detachUSBDevice">
2400 <desc>
2401 Notification that a VM is going to detach (done = false) or has
2402 already detached (done = true) the given USB device.
2403 When the done = true request is completed, the VM process will
2404 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2405 notification.
2406 <note>
2407 In the done = true case, the server must run its own filters
2408 and filters of all VMs but this one on the detached device
2409 as if it were just attached to the host computer.
2410 </note>
2411 </desc>
2412 <param name="id" type="uuid" dir="in"/>
2413 <param name="done" type="boolean" dir="in"/>
2414 </method>
2415
2416 <method name="autoCaptureUSBDevices">
2417 <desc>
2418 Requests a capture all matching USB devices attached to the host.
2419 When the request is completed, the VM process will
2420 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2421 notification per every captured device.
2422 </desc>
2423 </method>
2424
2425 <method name="detachAllUSBDevices">
2426 <desc>
2427 Notification that a VM that is being powered down. The done
2428 parameter indicates whether which stage of the power down
2429 we're at. When done = false the VM is announcing its
2430 intentions, while when done = true the VM is reporting
2431 what it has done.
2432 <note>
2433 In the done = true case, the server must run its own filters
2434 and filters of all VMs but this one on all detach devices as
2435 if they were just attached to the host computer.
2436 </note>
2437 </desc>
2438 <param name="done" type="boolean" dir="in"/>
2439 </method>
2440
2441 <method name="onSessionEnd">
2442 <desc>
2443 Triggered by the given session object when the session is about
2444 to close normally.
2445 </desc>
2446 <param name="session" type="ISession" dir="in">
2447 <desc>Session that is being closed</desc>
2448 </param>
2449 <param name="progress" type="IProgress" dir="return">
2450 <desc>
2451 Used to wait until the corresponding machine is actually
2452 dissociated from the given session on the server.
2453 Returned only when this session is a direct one.
2454 </desc>
2455 </param>
2456 </method>
2457
2458 <method name="beginSavingState">
2459 <desc>
2460 Called by the VM process to inform the server it wants to
2461 save the current state and stop the VM execution.
2462 </desc>
2463 <param name="progress" type="IProgress" dir="in">
2464 <desc>
2465 Progress object created by the VM process to wait until
2466 the state is saved.
2467 </desc>
2468 </param>
2469 <param name="stateFilePath" type="wstring" dir="out">
2470 <desc>
2471 File path the VM process must save the execution state to.
2472 </desc>
2473 </param>
2474 </method>
2475
2476 <method name="endSavingState">
2477 <desc>
2478 Called by the VM process to inform the server that saving
2479 the state previously requested by #beginSavingState is either
2480 successfully finished or there was a failure.
2481 </desc>
2482
2483 <param name="success" type="boolean" dir="in">
2484 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2485 </param>
2486 </method>
2487
2488 <method name="adoptSavedState">
2489 <desc>
2490 Gets called by IConsole::adoptSavedState.
2491 </desc>
2492 <param name="savedStateFile" type="wstring" dir="in">
2493 <desc>Path to the saved state file to adopt.</desc>
2494 </param>
2495 </method>
2496
2497 <method name="beginTakingSnapshot">
2498 <desc>
2499 Called by the VM process to inform the server it wants to
2500 take a snapshot.
2501 </desc>
2502 <param name="initiator" type="IConsole" dir="in">
2503 <desc>The console object that initiated this call.</desc>
2504 </param>
2505 <param name="name" type="wstring" dir="in">
2506 <desc>Snapshot name</desc>
2507 </param>
2508 <param name="description" type="wstring" dir="in">
2509 <desc>Snapshot description</desc>
2510 </param>
2511 <param name="progress" type="IProgress" dir="in">
2512 <desc>
2513 Progress object created by the VM process to wait until
2514 the state is saved (only for online snapshots).
2515 </desc>
2516 </param>
2517 <param name="stateFilePath" type="wstring" dir="out">
2518 <desc>
2519 File path the VM process must save the execution state to.
2520 </desc>
2521 </param>
2522 <param name="serverProgress" type="IProgress" dir="out">
2523 <desc>
2524 Progress object created by the server process to wait until
2525 the snapshot is taken (VDI diff creation, etc.).
2526 </desc>
2527 </param>
2528 </method>
2529
2530 <method name="endTakingSnapshot">
2531 <desc>
2532 Called by the VM process to inform the server that the snapshot
2533 previously requested by #beginTakingSnapshot is either
2534 successfully taken or there was a failure.
2535 </desc>
2536
2537 <param name="success" type="boolean" dir="in">
2538 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2539 </param>
2540 </method>
2541
2542 <method name="discardSnapshot">
2543 <desc>
2544 Gets called by IConsole::discardSnapshot.
2545 </desc>
2546 <param name="initiator" type="IConsole" dir="in">
2547 <desc>The console object that initiated this call.</desc>
2548 </param>
2549 <param name="id" type="uuid" dir="in">
2550 <desc>UUID of the snapshot to discard.</desc>
2551 </param>
2552 <param name="machineState" type="MachineState" dir="out">
2553 <desc>New machine state after this operation is started.</desc>
2554 </param>
2555 <param name="progress" type="IProgress" dir="return">
2556 <desc>Progress object to track the operation completion.</desc>
2557 </param>
2558 </method>
2559
2560 <method name="discardCurrentState">
2561 <desc>
2562 Gets called by IConsole::discardCurrentState.
2563 </desc>
2564 <param name="initiator" type="IConsole" dir="in">
2565 <desc>The console object that initiated this call.</desc>
2566 </param>
2567 <param name="machineState" type="MachineState" dir="out">
2568 <desc>New machine state after this operation is started.</desc>
2569 </param>
2570 <param name="progress" type="IProgress" dir="return">
2571 <desc>Progress object to track the operation completion.</desc>
2572 </param>
2573 </method>
2574
2575 <method name="discardCurrentSnapshotAndState">
2576 <desc>
2577 Gets called by IConsole::discardCurrentSnapshotAndState.
2578 </desc>
2579 <param name="initiator" type="IConsole" dir="in">
2580 <desc>The console object that initiated this call.</desc>
2581 </param>
2582 <param name="machineState" type="MachineState" dir="out">
2583 <desc>New machine state after this operation is started.</desc>
2584 </param>
2585 <param name="progress" type="IProgress" dir="return">
2586 <desc>Progress object to track the operation completion.</desc>
2587 </param>
2588 </method>
2589
2590 <method name="pullGuestProperties">
2591 <desc>
2592 Get the list of the guest properties matching a set of patterns along
2593 with their values, time stamps and flags and give responsibility for
2594 managing properties to the console.
2595 </desc>
2596 <param name="name" type="wstring" dir="out" safearray="yes">
2597 <desc>
2598 The names of the properties returned.
2599 </desc>
2600 </param>
2601 <param name="value" type="wstring" dir="out" safearray="yes">
2602 <desc>
2603 The values of the properties returned. The array entries match the
2604 corresponding entries in the @a name array.
2605 </desc>
2606 </param>
2607 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
2608 <desc>
2609 The time stamps of the properties returned. The array entries match
2610 the corresponding entries in the @a name array.
2611 </desc>
2612 </param>
2613 <param name="flags" type="wstring" dir="out" safearray="yes">
2614 <desc>
2615 The flags of the properties returned. The array entries match the
2616 corresponding entries in the @a name array.
2617 </desc>
2618 </param>
2619 </method>
2620
2621 <method name="pushGuestProperties">
2622 <desc>
2623 Set the list of the guest properties matching a set of patterns along
2624 with their values, time stamps and flags and return responsibility for
2625 managing properties to IMachine.
2626 </desc>
2627 <param name="name" type="wstring" dir="in" safearray="yes">
2628 <desc>
2629 The names of the properties.
2630 </desc>
2631 </param>
2632 <param name="value" type="wstring" dir="in" safearray="yes">
2633 <desc>
2634 The values of the properties. The array entries match the
2635 corresponding entries in the @a name array.
2636 </desc>
2637 </param>
2638 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
2639 <desc>
2640 The time stamps of the properties. The array entries match
2641 the corresponding entries in the @a name array.
2642 </desc>
2643 </param>
2644 <param name="flags" type="wstring" dir="in" safearray="yes">
2645 <desc>
2646 The flags of the properties. The array entries match the
2647 corresponding entries in the @a name array.
2648 </desc>
2649 </param>
2650 </method>
2651 <method name="pushGuestProperty">
2652 <desc>
2653 Update a single guest property in IMachine.
2654 </desc>
2655 <param name="name" type="wstring" dir="in">
2656 <desc>
2657 The name of the property to be updated.
2658 </desc>
2659 </param>
2660 <param name="value" type="wstring" dir="in">
2661 <desc>
2662 The value of the property.
2663 </desc>
2664 </param>
2665 <param name="timestamp" type="unsigned long long" dir="in">
2666 <desc>
2667 The timestamp of the property.
2668 </desc>
2669 </param>
2670 <param name="flags" type="wstring" dir="in">
2671 <desc>
2672 The flags of the property.
2673 </desc>
2674 </param>
2675 </method>
2676 </interface>
2677
2678 <interface
2679 name="IBIOSSettings" extends="$unknown"
2680 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
2681 wsmap="managed"
2682 >
2683 <desc>
2684 The IBIOSSettings interface represents BIOS settings of the virtual
2685 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
2686 </desc>
2687 <attribute name="logoFadeIn" type="boolean">
2688 <desc>Fade in flag for BIOS logo animation.</desc>
2689 </attribute>
2690
2691 <attribute name="logoFadeOut" type="boolean">
2692 <desc>Fade out flag for BIOS logo animation.</desc>
2693 </attribute>
2694
2695 <attribute name="logoDisplayTime" type="unsigned long">
2696 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
2697 </attribute>
2698
2699 <attribute name="logoImagePath" type="wstring">
2700 <desc>Local file system path for external BIOS image.</desc>
2701 </attribute>
2702
2703 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
2704 <desc>Mode of the BIOS boot device menu.</desc>
2705 </attribute>
2706
2707 <attribute name="ACPIEnabled" type="boolean">
2708 <desc>ACPI support flag.</desc>
2709 </attribute>
2710
2711 <attribute name="IOAPICEnabled" type="boolean">
2712 <desc>
2713 IO APIC support flag. If set, VirtualBox will provide an IO APIC
2714 and support IRQs above 15.
2715 </desc>
2716 </attribute>
2717
2718 <attribute name="timeOffset" type="long long">
2719 <desc>
2720 Offset in milliseconds from the host system time. This allows for
2721 guests running with a different system date/time than the host.
2722 It is equivalent to setting the system date/time in the BIOS other
2723 than it's not an absolute value but a relative one. Guest Additions
2724 time synchronization also honors this offset.
2725 </desc>
2726 </attribute>
2727
2728 <attribute name="PXEDebugEnabled" type="boolean">
2729 <desc>
2730 PXE debug logging flag. If set, VirtualBox will write extensive
2731 PXE trace information to the release log.
2732 </desc>
2733 </attribute>
2734
2735 <attribute name="IDEControllerType" type="IDEControllerType">
2736 <desc>
2737 Type of the virtual IDE controller. Depending on this value,
2738 VirtualBox will provide different virtual IDE hardware
2739 devices to the guest.
2740 </desc>
2741 </attribute>
2742
2743 </interface>
2744
2745 <interface
2746 name="IMachine" extends="$unknown"
2747 uuid="a744b229-3457-422f-8550-649c40346c55"
2748 wsmap="managed"
2749 >
2750 <desc>
2751 The IMachine interface represents a virtual machine, or guest, created
2752 in VirtualBox.
2753
2754 This interface is used in two contexts. First of all, a collection of
2755 objects implementing this interface is stored in the
2756 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
2757 machines that are currently registered with this VirtualBox
2758 installation. Also, once a session has been opened for the given virtual
2759 machine (e.g. the virtual machine is running), the machine object
2760 associated with the open session can be queried from the session object;
2761 see <link to="ISession"/> for details.
2762
2763 The main role of this interface is to expose the settings of the virtual
2764 machine and provide methods to change various aspects of the virtual
2765 machine's configuration. For machine objects stored in the
2766 <link to="IVirtualBox::machines2"/> collection, all attributes are
2767 read-only unless explicitly stated otherwise in individual attribute
2768 and method descriptions. In order to change a machine setting, a session
2769 for this machine must be opened using one of
2770 <link to="IVirtualBox::openSession"/>,
2771 <link to="IVirtualBox::openRemoteSession"/> or
2772 <link to="IVirtualBox::openExistingSession"/> methods. After the
2773 session has been successfully opened, a mutable machine object needs to
2774 be queried from the session object and then the desired settings changes
2775 can be applied to the returned object using IMachine attributes and
2776 methods. See the ISession interface description for more information
2777 about sessions.
2778
2779 Note that the IMachine interface does not provide methods to control
2780 virtual machine execution (such as start the machine, or power it
2781 down) -- these methods are grouped in a separate IConsole
2782 interface. Refer to the IConsole interface description to get more
2783 information about this topic.
2784
2785 <see>ISession, IConsole</see>
2786 </desc>
2787
2788 <attribute name="parent" type="IVirtualBox" readonly="yes">
2789 <desc>Associated parent object.</desc>
2790 </attribute>
2791
2792 <attribute name="accessible" type="boolean" readonly="yes">
2793 <desc>
2794 Whether this virtual machine is currently accessible or not.
2795
2796 The machine is considered to be inaccessible when:
2797 <ul>
2798 <li>It is a registered virtual machine, and
2799 </li>
2800 <li>Its settings file is inaccessible (for example, it is
2801 located on a network share that is not accessible during
2802 VirtualBox startup, or becomes inaccessible later, or if
2803 the settings file can be read but is invalid).
2804 </li>
2805 </ul>
2806
2807 Otherwise, the value of this property is always <tt>true</tt>.
2808
2809 Every time this property is read, the accessibility state of
2810 this machine is re-evaluated. If the returned value is |false|,
2811 the <link to="#accessError"/> property may be used to get the
2812 detailed error information describing the reason of
2813 inaccessibility.
2814
2815 When the machine is inaccessible, only the following properties
2816 can be used on it:
2817 <ul>
2818 <li><link to="#parent"/></li>
2819 <li><link to="#id"/></li>
2820 <li><link to="#settingsFilePath"/></li>
2821 <li><link to="#accessible"/></li>
2822 <li><link to="#accessError"/></li>
2823 </ul>
2824
2825 An attempt to access any other property or method will return
2826 an error.
2827
2828 The only possible action you can perform on an inaccessible
2829 machine is to unregister it using the
2830 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
2831 for the accessibility state once more by querying this
2832 property).
2833
2834 <note>
2835 In the current implementation, once this property returns
2836 <tt>true</tt>, the machine will never become inaccessible
2837 later, even if its settings file cannot be successfully
2838 read/written any more (at least, until the VirtualBox
2839 server is restarted). This limitation may be removed in
2840 future releases.
2841 </note>
2842 </desc>
2843 </attribute>
2844
2845 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
2846 <desc>
2847 Error information describing the reason of machine
2848 inaccessibility.
2849
2850 Reading this property is only valid after the last call to
2851 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
2852 machine is currently unaccessible). Otherwise, a null
2853 IVirtualBoxErrorInfo object will be returned.
2854 </desc>
2855 </attribute>
2856
2857 <attribute name="name" type="wstring">
2858 <desc>
2859 Name of the virtual machine.
2860
2861 Besides being used for human-readable identification purposes
2862 everywhere in VirtualBox, the virtual machine name is also used
2863 as a name of the machine's settings file and as a name of the
2864 subdirectory this settings file resides in. Thus, every time you
2865 change the value of this property, the settings file will be
2866 renamed once you call <link to="#saveSettings()"/> to confirm the
2867 change. The containing subdirectory will be also renamed, but
2868 only if it has exactly the same name as the settings file
2869 itself prior to changing this property (for backward compatibility
2870 with previous API releases). The above implies the following
2871 limitations:
2872 <ul>
2873 <li>The machine name cannot be empty.</li>
2874 <li>The machine name can contain only characters that are valid
2875 file name characters according to the rules of the file
2876 system used to store VirtualBox configuration.</li>
2877 <li>You cannot have two or more machines with the same name
2878 if they use the same subdirectory for storing the machine
2879 settings files.</li>
2880 <li>You cannot change the name of the machine if it is running,
2881 or if any file in the directory containing the settings file
2882 is being used by another running machine or by any other
2883 process in the host operating system at a time when
2884 <link to="#saveSettings()"/> is called.
2885 </li>
2886 </ul>
2887 If any of the above limitations are hit, <link to="#saveSettings()"/>
2888 will return an appropriate error message explaining the exact
2889 reason and the changes you made to this machine will not be
2890 saved.
2891 <note>
2892 For "legacy" machines created using the
2893 <link to="IVirtualBox::createLegacyMachine()"/> call,
2894 the above naming limitations do not apply because the
2895 machine name does not affect the settings file name.
2896 The settings file name remains the same as it was specified
2897 during machine creation and never changes.
2898 </note>
2899 </desc>
2900 </attribute>
2901
2902 <attribute name="description" type="wstring">
2903 <desc>
2904 Description of the virtual machine.
2905
2906 The description attribute can contain any text and is
2907 typically used to describe the hardware and software
2908 configuration of the virtual machine in detail (i.e. network
2909 settings, versions of the installed software and so on).
2910 </desc>
2911 </attribute>
2912
2913 <attribute name="id" type="uuid" readonly="yes">
2914 <desc>UUID of the virtual machine.</desc>
2915 </attribute>
2916
2917 <attribute name="OSTypeId" type="wstring">
2918 <desc>
2919 User-defined identifier of the Guest OS type.
2920 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
2921 an IGuestOSType object representing details about the given
2922 Guest OS type.
2923 <note>
2924 This value may differ from the value returned by
2925 <link to="IGuest::OSTypeId"/> if Guest Additions are
2926 installed to the guest OS.
2927 </note>
2928 </desc>
2929 </attribute>
2930
2931 <attribute name="CPUCount" type="unsigned long">
2932 <desc>Number of virtual CPUs in the VM.</desc>
2933 </attribute>
2934
2935 <attribute name="memorySize" type="unsigned long">
2936 <desc>System memory size in megabytes.</desc>
2937 </attribute>
2938
2939 <attribute name="memoryBalloonSize" type="unsigned long">
2940 <desc>Initial memory balloon size in megabytes.</desc>
2941 </attribute>
2942
2943 <attribute name="statisticsUpdateInterval" type="unsigned long">
2944 <desc>Initial interval to update guest statistics in seconds.</desc>
2945 </attribute>
2946
2947 <attribute name="VRAMSize" type="unsigned long">
2948 <desc>Video memory size in megabytes.</desc>
2949 </attribute>
2950
2951 <attribute name="accelerate3DEnabled" type="boolean" default="false">
2952 <desc>
2953 This setting determines whether VirtualBox allows guests to make use
2954 of the 3D graphics support available on the host. Currently limited
2955 to OpenGL only. </desc>
2956 </attribute>
2957
2958 <attribute name="monitorCount" type="unsigned long">
2959 <desc>
2960 Number of virtual monitors.
2961 <note>
2962 Only effective on Windows XP and later guests with
2963 Guest Additions installed.
2964 </note>
2965 </desc>
2966 </attribute>
2967
2968 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
2969 <desc>Object containing all BIOS settings.</desc>
2970 </attribute>
2971
2972 <attribute name="HWVirtExEnabled" type="TSBool">
2973 <desc>
2974 This setting determines whether VirtualBox will try to make use of
2975 the host CPU's hardware virtualization extensions such as Intel VT-x
2976 and AMD-V. Note that in case such extensions are not available,
2977 they will not be used.
2978 </desc>
2979 </attribute>
2980
2981 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
2982 <desc>
2983 This setting determines whether VirtualBox will try to make use of
2984 the nested paging extension of Intel VT-x and AMD-V. Note that in case
2985 such extensions are not available, they will not be used.
2986 </desc>
2987 </attribute>
2988
2989 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
2990 <desc>
2991 This setting determines whether VirtualBox will try to make use of
2992 the VPID extension of Intel VT-x. Note that in case such extensions are
2993 not available, they will not be used.
2994 </desc>
2995 </attribute>
2996
2997 <attribute name="PAEEnabled" type="boolean" default="false">
2998 <desc>
2999 This setting determines whether VirtualBox will expose the Physical Address
3000 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3001 is not available, it will not be reported.
3002 </desc>
3003 </attribute>
3004
3005 <attribute name="snapshotFolder" type="wstring">
3006 <desc>
3007 Full path to the directory used to store snapshot data
3008 (differencing hard disks and saved state files) of this machine.
3009
3010 The initial value of this property is
3011 <tt>&lt;</tt><link to="#settingsFilePath">
3012 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3013 <link to="#id">machine_uuid</link>
3014 <tt>&gt;</tt>.
3015
3016 Currently, it is an error to try to change this property on
3017 a machine that has snapshots (because this would require to
3018 move possibly large files to a different location).
3019 A separate method will be available for this purpose later.
3020
3021 <note>
3022 Setting this property to <tt>null</tt> will restore the
3023 initial value.
3024 </note>
3025 <note>
3026 When setting this property, the specified path can be
3027 absolute (full path) or relative to the directory where the
3028 <link to="#settingsFilePath">machine settings file</link>
3029 is located. When reading this property, a full path is
3030 always returned.
3031 </note>
3032 <note>
3033 The specified path may not exist, it will be created
3034 when necessary.
3035 </note>
3036 </desc>
3037 </attribute>
3038
3039 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3040 <desc>VRDP server object.</desc>
3041 </attribute>
3042
3043 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3044 <desc>Array of hard disks attached to this machine.</desc>
3045 </attribute>
3046
3047 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3048 <desc>Associated DVD drive object.</desc>
3049 </attribute>
3050
3051 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3052 <desc>Associated floppy drive object.</desc>
3053 </attribute>
3054
3055 <attribute name="USBController" type="IUSBController" readonly="yes">
3056 <desc>
3057 Associated USB controller object.
3058
3059 <note>
3060 This method may set a @ref com_warnings "warning result code".
3061 </note>
3062 <note>
3063 If USB functionality is not available in the given edition of
3064 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3065 </note>
3066 </desc>
3067 </attribute>
3068
3069 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3070 <desc>Associated audio adapter, always present.</desc>
3071 </attribute>
3072
3073 <attribute name="SATAController" type="ISATAController" readonly="yes">
3074 <desc>
3075 Associated SATA controller object.
3076 </desc>
3077 </attribute>
3078
3079 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3080 <desc>
3081 Full name of the file containing machine settings data.
3082 </desc>
3083 </attribute>
3084
3085 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3086 <desc>
3087 Current version of the format of the settings file of this machine
3088 (<link to="#settingsFilePath"/>).
3089
3090 The version string has the following format:
3091 <pre>
3092 x.y-platform
3093 </pre>
3094 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3095 versions, and <tt>platform</tt> is the platform identifier.
3096
3097 The current version usually matches the value of the
3098 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3099 settings file was created by an older version of VirtualBox and there
3100 was a change of the settings file format since then.
3101
3102 Note that VirtualBox automatically converts settings files from older
3103 versions to the most recent version when reading them (usually at
3104 VirtualBox startup) but it doesn't save the changes back until
3105 you call a method that implicitly saves settings (such as
3106 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3107 explicitly. Therefore, if the value of this attribute differs from the
3108 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3109 means that the settings file was converted but the result of the
3110 conversion is not yet saved to disk.
3111
3112 The above feature may be used by interactive front-ends to inform users
3113 about the settings file format change and offer them to explicitly save
3114 all converted settings files (the global and VM-specific ones),
3115 optionally create backup copies of the old settings files before saving,
3116 etc.
3117
3118 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3119 </desc>
3120 </attribute>
3121
3122 <attribute name="settingsModified" type="boolean" readonly="yes">
3123 <desc>
3124 Whether the settings of this machine have been modified
3125 (but neither yet saved nor discarded).
3126 <note>
3127 Reading this property is only valid on instances returned
3128 by <link to="ISession::machine"/> and on new machines
3129 created by <link to="IVirtualBox::createMachine"/> or opened
3130 by <link to="IVirtualBox::openMachine"/> but not
3131 yet registered, or on unregistered machines after calling
3132 <link to="IVirtualBox::unregisterMachine"/>. For all other
3133 cases, the settings can never be modified.
3134 </note>
3135 <note>
3136 For newly created unregistered machines, the value of this
3137 property is always TRUE until <link to="#saveSettings()"/>
3138 is called (no matter if any machine settings have been
3139 changed after the creation or not). For opened machines
3140 the value is set to FALSE (and then follows to normal rules).
3141 </note>
3142 </desc>
3143 </attribute>
3144
3145 <attribute name="sessionState" type="SessionState" readonly="yes">
3146 <desc>Current session state for this machine.</desc>
3147 </attribute>
3148
3149 <attribute name="sessionType" type="wstring" readonly="yes">
3150 <desc>
3151 Type of the session. If <link to="#sessionState"/> is
3152 SessionSpawning or SessionOpen, this attribute contains the
3153 same value as passed to the
3154 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3155 type parameter. If the session was opened directly using
3156 <link to="IVirtualBox::openSession()"/>, or if
3157 <link to="#sessionState"/> is SessionClosed, the value of this
3158 attribute is @c null.
3159 </desc>
3160 </attribute>
3161
3162 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3163 <desc>
3164 Identifier of the session process. This attribute contains the
3165 platform-dependent identifier of the process that has opened a
3166 direct session for this machine using the
3167 <link to="IVirtualBox::openSession()"/> call. The returned value
3168 is only valid if <link to="#sessionState"/> is SessionOpen or
3169 SessionClosing (i.e. a session is currently open or being
3170 closed) by the time this property is read.
3171 </desc>
3172 </attribute>
3173
3174 <attribute name="state" type="MachineState" readonly="yes">
3175 <desc>Current execution state of this machine.</desc>
3176 </attribute>
3177
3178 <attribute name="lastStateChange" type="long long" readonly="yes">
3179 <desc>
3180 Time stamp of the last execution state change,
3181 in milliseconds since 1970-01-01 UTC.
3182 </desc>
3183 </attribute>
3184
3185 <attribute name="stateFilePath" type="wstring" readonly="yes">
3186 <desc>
3187 Full path to the file that stores the execution state of
3188 the machine when it is in the <link to="MachineState::Saved"/>
3189 state.
3190 <note>
3191 When the machine is not in the Saved state, this attribute
3192 <tt>null</tt>.
3193 </note>
3194 </desc>
3195 </attribute>
3196
3197 <attribute name="logFolder" type="wstring" readonly="yes">
3198 <desc>
3199 Full path to the folder that stores a set of rotated log files
3200 recorded during machine execution. The most recent log file is
3201 named <tt>VBox.log</tt>, the previous log file is
3202 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3203 in the current version).
3204 </desc>
3205 </attribute>
3206
3207 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3208 <desc>
3209 Current snapshot of this machine.
3210 <note>
3211 A <tt>null</tt> object is returned if the machine doesn't
3212 have snapshots.
3213 </note>
3214 <see><link to="ISnapshot"/></see>
3215 </desc>
3216 </attribute>
3217
3218 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3219 <desc>
3220 Number of snapshots taken on this machine. Zero means the
3221 machine doesn't have any snapshots.
3222 </desc>
3223 </attribute>
3224
3225 <attribute name="currentStateModified" type="boolean" readonly="yes">
3226 <desc>
3227 Returns <tt>true</tt> if the current state of the machine is not
3228 identical to the state stored in the current snapshot.
3229
3230 The current state is identical to the current snapshot right
3231 after one of the following calls are made:
3232 <ul>
3233 <li><link to="IConsole::discardCurrentState"/> or
3234 <link to="IConsole::discardCurrentSnapshotAndState"/>
3235 </li>
3236 <li><link to="IConsole::takeSnapshot"/> (issued on a
3237 powered off or saved machine, for which
3238 <link to="#settingsModified"/> returns <tt>false</tt>)
3239 </li>
3240 <li><link to="IMachine::setCurrentSnapshot"/>
3241 </li>
3242 </ul>
3243
3244 The current state remains identical until one of the following
3245 happens:
3246 <ul>
3247 <li>settings of the machine are changed</li>
3248 <li>the saved state is discarded</li>
3249 <li>the current snapshot is discarded</li>
3250 <li>an attempt to execute the machine is made</li>
3251 </ul>
3252
3253 <note>
3254 For machines that don't have snapshots, this property is
3255 always <tt>false</tt>.
3256 </note>
3257 </desc>
3258 </attribute>
3259
3260 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3261 <desc>
3262 Collection of shared folders for this machine (permanent shared
3263 folders). These folders are shared automatically at machine startup
3264 and available only to the guest OS installed within this machine.
3265
3266 New shared folders are added to the collection using
3267 <link to="#createSharedFolder"/>. Existing shared folders can be
3268 removed using <link to="#removeSharedFolder"/>.
3269 </desc>
3270 </attribute>
3271
3272 <attribute name="clipboardMode" type="ClipboardMode">
3273 <desc>
3274 Synchronization mode between the host OS clipboard
3275 and the guest OS clipboard.
3276 </desc>
3277 </attribute>
3278
3279 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3280 <desc>
3281 A comma-separated list of simple glob patterns. Changes to guest
3282 properties whose name matches one of the patterns will generate an
3283 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3284 </desc>
3285 </attribute>
3286
3287 <method name="setBootOrder">
3288 <desc>
3289 Puts the given device to the specified position in
3290 the boot order.
3291
3292 To indicate that no device is associated with the given position,
3293 <link to="DeviceType::Null"/> should be used.
3294
3295 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3296 </desc>
3297 <param name="position" type="unsigned long" dir="in">
3298 <desc>
3299 Position in the boot order (<tt>1</tt> to the total number of
3300 devices the machine can boot from, as returned by
3301 <link to="ISystemProperties::maxBootPosition"/>).
3302 </desc>
3303 </param>
3304 <param name="device" type="DeviceType" dir="in">
3305 <desc>
3306 The type of the device used to boot at the given position.
3307 </desc>
3308 </param>
3309 </method>
3310
3311 <method name="getBootOrder" const="yes">
3312 <desc>
3313 Returns the device type that occupies the specified
3314 position in the boot order.
3315
3316 @todo [remove?]
3317 If the machine can have more than one device of the returned type
3318 (such as hard disks), then a separate method should be used to
3319 retrieve the individual device that occupies the given position.
3320
3321 If here are no devices at the given position, then
3322 <link to="DeviceType::Null"/> is returned.
3323
3324 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3325 </desc>
3326 <param name="order" type="unsigned long" dir="in">
3327 <desc>
3328 Position in the boot order (<tt>1</tt> to the total number of
3329 devices the machine can boot from, as returned by
3330 <link to="ISystemProperties::maxBootPosition"/>).
3331 </desc>
3332 </param>
3333 <param name="device" type="DeviceType" dir="return">
3334 <desc>
3335 Device at the given position.
3336 </desc>
3337 </param>
3338 </method>
3339
3340 <method name="attachHardDisk2">
3341 <desc>
3342 Attaches a virtual hard disk identified by the given UUID to a device
3343 slot of the specified bus.
3344
3345 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3346 specify the primary or secondary IDE controller, respectively. The
3347 SATA bus supports 30 channels, so this parameter can be a number in
3348 range from @c 0 to @c 29.
3349
3350 For the primary controller of the IDE bus, the @a device number can be
3351 either @c 0 or @c 1, to specify the master or the slave device,
3352 respectively. For the secondary IDE controller, the device number is
3353 always @c 1 because the master device is reserved for the CD-ROM drive.
3354
3355 For the SATA bus, the @a device parameter is not currently used and
3356 must always be @c 0.
3357
3358 The specified device slot must not have another disk attached to it, or
3359 this method will fail.
3360
3361 See <link to="IHardDisk2"/> for more detailed information about
3362 attaching hard disks.
3363
3364 <note>
3365 You cannot attach a hard disk to a running machine. Also, you cannot
3366 attach a hard disk to a newly created machine until this machine's
3367 settings are saved to disk using <link to="#saveSettings()"/>.
3368 </note>
3369 <note>
3370 If the hard disk is being attached indirectly, a new differencing hard
3371 disk will be implicitly created for it and attached instead. If the
3372 changes made to the machine settings (including this indirect
3373 attachment) are later cancelled using <link to="#discardSettings()"/>,
3374 this implicitly created differencing hard disk will be implicitly
3375 deleted.
3376 </note>
3377 </desc>
3378 <param name="id" type="uuid" dir="in">
3379 <desc>UUID of the hard disk to attach.</desc>
3380 </param>
3381 <param name="bus" type="StorageBus" dir="in">
3382 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3383 </param>
3384 <param name="channel" type="long" dir="in">
3385 <desc>Channel to attach the hard disk to.</desc>
3386 </param>
3387 <param name="device" type="long" dir="in">
3388 <desc>
3389 Device slot in the given channel to attach the hard disk to.
3390 </desc>
3391 </param>
3392 </method>
3393
3394 <method name="getHardDisk2" const="yes">
3395 <desc>
3396 Returns the virtual hard disk attached to a device slot of the specified
3397 bus.
3398
3399 Note that if the hard disk was indirectly attached by
3400 <link to="#attachHardDisk2()"/> to the given device slot then this
3401 method will return not the same object as passed to the
3402 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3403 more detailed information about attaching hard disks.
3404 </desc>
3405 <param name="bus" type="StorageBus" dir="in">
3406 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3407 </param>
3408 <param name="channel" type="long" dir="in">
3409 <desc>Channel to query.</desc>
3410 </param>
3411 <param name="device" type="long" dir="in">
3412 <desc>Device slot in the given channel to query.</desc>
3413 </param>
3414 <param name="hardDisk" type="IHardDisk2" dir="return">
3415 <desc>Attached hard disk object.</desc>
3416 </param>
3417 </method>
3418
3419 <method name="detachHardDisk2">
3420 <desc>
3421 Detaches the virtual hard disk attached to a device slot of the
3422 specified bus.
3423
3424 Detaching the hard disk from the virtual machine is deferred. This means
3425 that the hard disk remains associated with the machine when this method
3426 returns and gets actually de-associated only after a successful
3427 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3428 for more detailed information about attaching hard disks.
3429
3430 <note>
3431 You cannot detach the hard disk from a running machine.
3432 </note>
3433 <note>
3434 Detaching differencing hard disks implicitly created by <link
3435 to="#attachHardDisk2()"/> for the indirect attachment using this
3436 method will <b>not</b> implicitly delete them. The
3437 <link to="IHardDisk2::deleteStorage()"/> operation should be
3438 explicitly performed by the caller after the hard disk is successfully
3439 detached and the settings are saved with
3440 <link to="#saveSettings()"/>, if it is the desired action.
3441 </note>
3442
3443 </desc>
3444 <param name="bus" type="StorageBus" dir="in">
3445 <desc>Bus to detach the hard disk from.</desc>
3446 </param>
3447 <param name="channel" type="long" dir="in">
3448 <desc>Channel number to detach the hard disk from.</desc>
3449 </param>
3450 <param name="device" type="long" dir="in">
3451 <desc>Device slot number to detach the hard disk from.</desc>
3452 </param>
3453 </method>
3454
3455 <method name="getNetworkAdapter" const="yes">
3456 <desc>
3457 Returns the network adapter associated with the given slot.
3458 Slots are numbered sequentially, starting with zero. The total
3459 number of adapters per every machine is defined by the
3460 <link to="ISystemProperties::networkAdapterCount"/> property,
3461 so the maximum slot number is one less than that property's value.
3462 </desc>
3463 <param name="slot" type="unsigned long" dir="in"/>
3464 <param name="adapter" type="INetworkAdapter" dir="return"/>
3465 </method>
3466
3467 <method name="getSerialPort" const="yes">
3468 <desc>
3469 Returns the serial port associated with the given slot.
3470 Slots are numbered sequentially, starting with zero. The total
3471 number of serial ports per every machine is defined by the
3472 <link to="ISystemProperties::serialPortCount"/> property,
3473 so the maximum slot number is one less than that property's value.
3474 </desc>
3475 <param name="slot" type="unsigned long" dir="in"/>
3476 <param name="port" type="ISerialPort" dir="return"/>
3477 </method>
3478
3479 <method name="getParallelPort" const="yes">
3480 <desc>
3481 Returns the parallel port associated with the given slot.
3482 Slots are numbered sequentially, starting with zero. The total
3483 number of parallel ports per every machine is defined by the
3484 <link to="ISystemProperties::parallelPortCount"/> property,
3485 so the maximum slot number is one less than that property's value.
3486 </desc>
3487 <param name="slot" type="unsigned long" dir="in"/>
3488 <param name="port" type="IParallelPort" dir="return"/>
3489 </method>
3490
3491 <method name="getNextExtraDataKey">
3492 <desc>
3493 Returns the machine-specific extra data key name following the
3494 supplied key.
3495
3496 An error is returned if the supplied @a key does not exist. @c NULL is
3497 returned in @a nextKey if the supplied key is the last key. When
3498 supplying @c NULL for the @a key, the first key item is returned in @a
3499 nextKey (if there is any). @a nextValue is an optional parameter and
3500 if supplied, the next key's value is returned in it.
3501 </desc>
3502 <param name="key" type="wstring" dir="in">
3503 <desc>Name of the data key to follow.</desc>
3504 </param>
3505 <param name="nextKey" type="wstring" dir="out">
3506 <desc>Name of the next data key.</desc>
3507 </param>
3508 <param name="nextValue" type="wstring" dir="out">
3509 <desc>Value of the next data key.</desc>
3510 </param>
3511 </method>
3512
3513 <method name="getExtraData">
3514 <desc>
3515 Returns associated machine-specific extra data.
3516
3517 If the requested data @a key does not exist, this function will
3518 succeed and return @c NULL in the @a value argument.
3519 </desc>
3520 <param name="key" type="wstring" dir="in">
3521 <desc>Name of the data key to get.</desc>
3522 </param>
3523 <param name="value" type="wstring" dir="return">
3524 <desc>Value of the requested data key.</desc>
3525 </param>
3526 </method>
3527
3528 <method name="setExtraData">
3529 <desc>
3530 Sets associated machine-specific extra data.
3531
3532 If you pass @c NULL as a key @a value, the given @a key will be
3533 deleted.
3534
3535 <note>
3536 Before performing the actual data change, this method will ask all
3537 registered callbacks using the
3538 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
3539 notification for a permission. If one of the callbacks refuses the
3540 new value, the change will not be performed.
3541 </note>
3542 <note>
3543 On success, the
3544 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
3545 is called to inform all registered callbacks about a successful data
3546 change.
3547 </note>
3548 <note>
3549 This method can be called outside the machine session and therefore
3550 it's a caller's responsibility to handle possible race conditions
3551 when several clients change the same key at the same time.
3552 </note>
3553 </desc>
3554 <param name="key" type="wstring" dir="in">
3555 <desc>Name of the data key to set.</desc>
3556 </param>
3557 <param name="value" type="wstring" dir="in">
3558 <desc>Value to assign to the key.</desc>
3559 </param>
3560 </method>
3561
3562 <method name="saveSettings">
3563 <desc>
3564 Saves any changes to machine settings made since the session
3565 has been opened or a new machine has been created, or since the
3566 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
3567 For registered machines, new settings become visible to all
3568 other VirtualBox clients after successful invocation of this
3569 method.
3570 <note>
3571 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
3572 notification event after the configuration has been successfully
3573 saved (only for registered machines).
3574 </note>
3575 <note>
3576 Calling this method is only valid on instances returned
3577 by <link to="ISession::machine"/> and on new machines
3578 created by <link to="IVirtualBox::createMachine"/> but not
3579 yet registered, or on unregistered machines after calling
3580 <link to="IVirtualBox::unregisterMachine"/>.
3581 </note>
3582 </desc>
3583 </method>
3584
3585 <method name="saveSettingsWithBackup">
3586 <desc>
3587 Creates a backup copy of the machine settings file (<link
3588 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
3589 <link to="#saveSettings()"/>.
3590
3591 Note that the backup copy is created <b>only</b> if the settings file
3592 auto-conversion took place (see <link to="#settingsFileVersion"/> for
3593 details). Otherwise, this call is fully equivalent to
3594 <link to="#saveSettings()"/> and no backup copying is done.
3595
3596 The backup copy is created in the same directory where the original
3597 settings file is located. It is given the following file name:
3598 <pre>
3599 original.xml.x.y-platform.bak
3600 </pre>
3601 where <tt>original.xml</tt> is the original settings file name
3602 (excluding path), and <tt>x.y-platform</tt> is the version of the old
3603 format of the settings file (before auto-conversion).
3604
3605 If the given backup file already exists, this method will try to add the
3606 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
3607 0 to 9) and copy it again until it succeeds. If all suffixes are
3608 occupied, or if any other copy error occurs, this method will return a
3609 failure.
3610
3611 If the copy operation succeeds, the @a bakFileName return argument will
3612 receive a full path to the created backup file (for informational
3613 purposes). Note that this will happen even if the subsequent
3614 <link to="#saveSettings()"/> call performed by this method after the
3615 copy operation, fails.
3616
3617 <note>
3618 The VirtualBox API never calls this method. It is intended purely for
3619 the purposes of creating backup copies of the settings files by
3620 front-ends before saving the results of the automatically performed
3621 settings conversion to disk.
3622 </note>
3623
3624 <see>settingsFileVersion</see>
3625 </desc>
3626 <param name="bakFileName" type="wstring" dir="return">
3627 <desc>Full path to the created backup copy.</desc>
3628 </param>
3629 </method>
3630
3631 <method name="discardSettings">
3632 <desc>
3633 Discards any changes to the machine settings made since the session
3634 has been opened or since the last call to <link to="#saveSettings()"/>
3635 or <link to="#discardSettings"/>.
3636 <note>
3637 Calling this method is only valid on instances returned
3638 by <link to="ISession::machine"/> and on new machines
3639 created by <link to="IVirtualBox::createMachine"/> or
3640 opened by <link to="IVirtualBox::openMachine"/> but not
3641 yet registered, or on unregistered machines after calling
3642 <link to="IVirtualBox::unregisterMachine"/>.
3643 </note>
3644 </desc>
3645 </method>
3646
3647 <method name="deleteSettings">
3648 <desc>
3649 Deletes the settings file of this machine from disk.
3650 The machine must not be registered in order for this operation
3651 to succeed.
3652 <note>
3653 <link to="#settingsModified"/> will return TRUE after this
3654 method successfully returns.
3655 </note>
3656 <note>
3657 Calling this method is only valid on instances returned
3658 by <link to="ISession::machine"/> and on new machines
3659 created by <link to="IVirtualBox::createMachine"/> or
3660 opened by <link to="IVirtualBox::openMachine"/> but not
3661 yet registered, or on unregistered machines after calling
3662 <link to="IVirtualBox::unregisterMachine"/>.
3663 </note>
3664 <note>
3665 The deleted machine settings file can be restored (saved again)
3666 by calling <link to="#saveSettings()"/>.
3667 </note>
3668 </desc>
3669 </method>
3670
3671 <method name="getSnapshot">
3672 <desc>
3673 Returns a snapshot of this machine with the given UUID.
3674 A <tt>null</tt> UUID can be used to obtain the first snapshot
3675 taken on this machine. This is useful if you want to traverse
3676 the whole tree of snapshots starting from the root.
3677 </desc>
3678 <param name="id" type="uuid" dir="in">
3679 <desc>UUID of the snapshot to get</desc>
3680 </param>
3681 <param name="snapshot" type="ISnapshot" dir="return">
3682 <desc>Snapshot object with the given UUID.</desc>
3683 </param>
3684 </method>
3685
3686 <method name="findSnapshot">
3687 <desc>
3688 Returns a snapshot of this machine with the given name.
3689 </desc>
3690 <param name="name" type="wstring" dir="in">
3691 <desc>Name of the snapshot to find</desc>
3692 </param>
3693 <param name="snapshot" type="ISnapshot" dir="return">
3694 <desc>Snapshot object with the given name.</desc>
3695 </param>
3696 </method>
3697
3698 <method name="setCurrentSnapshot">
3699 <desc>
3700 Sets the current snapshot of this machine.
3701 <note>
3702 In the current implementation, this operation is not
3703 implemented.
3704 </note>
3705 </desc>
3706 <param name="id" type="uuid" dir="in">
3707 <desc>UUID of the snapshot to set as the current snapshot.</desc>
3708 </param>
3709 </method>
3710
3711 <method name="createSharedFolder">
3712 <desc>
3713 Creates a new permanent shared folder by associating the given logical
3714 name with the given host path, adds it to the collection of shared
3715 folders and starts sharing it. Refer to the description of
3716 <link to="ISharedFolder"/> to read more about logical names.
3717 </desc>
3718 <param name="name" type="wstring" dir="in">
3719 <desc>Unique logical name of the shared folder.</desc>
3720 </param>
3721 <param name="hostPath" type="wstring" dir="in">
3722 <desc>Full path to the shared folder in the host file system.</desc>
3723 </param>
3724 <param name="writable" type="boolean" dir="in">
3725 <desc>Whether the share is writable or readonly</desc>
3726 </param>
3727 </method>
3728
3729 <method name="removeSharedFolder">
3730 <desc>
3731 Removes the permanent shared folder with the given name previously
3732 created by <link to="#createSharedFolder"/> from the collection of
3733 shared folders and stops sharing it.
3734 </desc>
3735 <param name="name" type="wstring" dir="in">
3736 <desc>Logical name of the shared folder to remove.</desc>
3737 </param>
3738 </method>
3739
3740 <method name="canShowConsoleWindow">
3741 <desc>
3742 Returns @c true if the VM console process can activate the
3743 console window and bring it to foreground on the desktop of
3744 the host PC.
3745 <note>
3746 This method will fail if a session for this machine is not
3747 currently open.
3748 </note>
3749 </desc>
3750 <param name="canShow" type="boolean" dir="return">
3751 <desc>
3752 @c true if the console window can be shown and @c
3753 false otherwise.
3754 </desc>
3755 </param>
3756 </method>
3757
3758 <method name="showConsoleWindow">
3759 <desc>
3760 Activates the console window and brings it to foreground on
3761 the desktop of the host PC. Many modern window managers on
3762 many platforms implement some sort of focus stealing
3763 prevention logic, so that it may be impossible to activate
3764 a window without the help of the currently active
3765 application. In this case, this method will return a non-zero
3766 identifier that represents the top-level window of the VM
3767 console process. The caller, if it represents a currently
3768 active process, is responsible to use this identifier (in a
3769 platform-dependent manner) to perform actual window
3770 activation.
3771 <note>
3772 This method will fail if a session for this machine is not
3773 currently open.
3774 </note>
3775 </desc>
3776 <param name="winId" type="unsigned long long" dir="return">
3777 <desc>
3778 Platform-dependent identifier of the top-level VM console
3779 window, or zero if this method has performed all actions
3780 necessary to implement the <i>show window</i> semantics for
3781 the given platform and/or VirtualBox front-end.
3782 </desc>
3783 </param>
3784 </method>
3785
3786 <method name="getGuestProperty">
3787 <desc>
3788 Reads an entry from the machine's guest property store.
3789 </desc>
3790 <param name="name" type="wstring" dir="in">
3791 <desc>
3792 The name of the property to read.
3793 </desc>
3794 </param>
3795 <param name="value" type="wstring" dir="out">
3796 <desc>
3797 The value of the property. If the property does not exist then this
3798 will be empty.
3799 </desc>
3800 </param>
3801 <param name="timestamp" type="unsigned long long" dir="out">
3802 <desc>
3803 The time at which the property was last modified, as seen by the
3804 server process.
3805 </desc>
3806 </param>
3807 <param name="flags" type="wstring" dir="out">
3808 <desc>
3809 Additional property parameters, passed as a comma-separated list of
3810 "name=value" type entries.
3811 </desc>
3812 </param>
3813 </method>
3814
3815 <method name="getGuestPropertyValue">
3816 <desc>
3817 Reads a value from the machine's guest property store.
3818 </desc>
3819 <param name="property" type="wstring" dir="in">
3820 <desc>
3821 The name of the property to read.
3822 </desc>
3823 </param>
3824 <param name="value" type="wstring" dir="return">
3825 <desc>
3826 The value of the property. If the property does not exist then this
3827 will be empty.
3828 </desc>
3829 </param>
3830 </method>
3831
3832 <method name="getGuestPropertyTimestamp">
3833 <desc>
3834 Reads a property timestamp from the machine's guest property store.
3835 </desc>
3836 <param name="property" type="wstring" dir="in">
3837 <desc>
3838 The name of the property to read.
3839 </desc>
3840 </param>
3841 <param name="value" type="unsigned long long" dir="return">
3842 <desc>
3843 The timestamp. If the property does not exist then this will be
3844 empty.
3845 </desc>
3846 </param>
3847 </method>
3848
3849 <method name="setGuestProperty">
3850 <desc>
3851 Sets, changes or deletes an entry in the machine's guest property
3852 store.
3853 </desc>
3854 <param name="property" type="wstring" dir="in">
3855 <desc>
3856 The name of the property to set, change or delete.
3857 </desc>
3858 </param>
3859 <param name="value" type="wstring" dir="in">
3860 <desc>
3861 The new value of the property to set, change or delete. If the
3862 property does not yet exist and value is non-empty, it will be
3863 created. If the value is empty, the key will be deleted if it
3864 exists.
3865 </desc>
3866 </param>
3867 <param name="flags" type="wstring" dir="in">
3868 <desc>
3869 Additional property parameters, passed as a comma-separated list of
3870 "name=value" type entries.
3871 </desc>
3872 </param>
3873 </method>
3874
3875 <method name="setGuestPropertyValue">
3876 <desc>
3877 Sets, changes or deletes a value in the machine's guest property
3878 store. The flags field will be left unchanged or created empty for a
3879 new property.
3880 </desc>
3881 <param name="property" type="wstring" dir="in">
3882 <desc>
3883 The name of the property to set, change or delete.
3884 </desc>
3885 </param>
3886 <param name="value" type="wstring" dir="in">
3887 <desc>
3888 The new value of the property to set, change or delete. If the
3889 property does not yet exist and value is non-empty, it will be
3890 created. If value is empty, the property will be deleted if it
3891 exists.
3892 </desc>
3893 </param>
3894 </method>
3895
3896 <method name="enumerateGuestProperties">
3897 <desc>
3898 Return a list of the guest properties matching a set of patterns along
3899 with their values, time stamps and flags.
3900 </desc>
3901 <param name="patterns" type="wstring" dir="in">
3902 <desc>
3903 The patterns to match the properties against, separated by '|'
3904 characters. If this is empty or NULL, all properties will match.
3905 </desc>
3906 </param>
3907 <param name="name" type="wstring" dir="out" safearray="yes">
3908 <desc>
3909 The names of the properties returned.
3910 </desc>
3911 </param>
3912 <param name="value" type="wstring" dir="out" safearray="yes">
3913 <desc>
3914 The values of the properties returned. The array entries match the
3915 corresponding entries in the @a name array.
3916 </desc>
3917 </param>
3918 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3919 <desc>
3920 The time stamps of the properties returned. The array entries match
3921 the corresponding entries in the @a name array.
3922 </desc>
3923 </param>
3924 <param name="flags" type="wstring" dir="out" safearray="yes">
3925 <desc>
3926 The flags of the properties returned. The array entries match the
3927 corresponding entries in the @a name array.
3928 </desc>
3929 </param>
3930 </method>
3931</interface>
3932
3933 <!--
3934 // IConsole
3935 /////////////////////////////////////////////////////////////////////////
3936 -->
3937
3938 <interface
3939 name="IConsoleCallback" extends="$unknown"
3940 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
3941 wsmap="suppress"
3942 >
3943
3944 <method name="onMousePointerShapeChange">
3945 <desc>
3946 Notification when the guest mouse pointer shape has
3947 changed. The new shape data is given.
3948 </desc>
3949 <param name="visible" type="boolean" dir="in">
3950 <desc>
3951 Flag whether the pointer is visible.
3952 </desc>
3953 </param>
3954 <param name="alpha" type="boolean" dir="in">
3955 <desc>
3956 Flag whether the pointer has an alpha channel.
3957 </desc>
3958 </param>
3959 <param name="xHot" type="unsigned long" dir="in">
3960 <desc>
3961 The pointer hot spot x coordinate.
3962 </desc>
3963 </param>
3964 <param name="yHot" type="unsigned long" dir="in">
3965 <desc>
3966 The pointer hot spot y coordinate.
3967 </desc>
3968 </param>
3969 <param name="width" type="unsigned long" dir="in">
3970 <desc>
3971 Width of the pointer shape in pixels.
3972 </desc>
3973 </param>
3974 <param name="height" type="unsigned long" dir="in">
3975 <desc>
3976 Height of the pointer shape in pixels.
3977 </desc>
3978 </param>
3979 <param name="shape" type="octet" mod="ptr" dir="in">
3980 <desc>
3981 Address of the shape buffer.
3982
3983 The buffer contains 1 bpp (bits per pixel) AND mask followed by 32 bpp XOR (color) mask.
3984
3985 For pointers without alpha channel the XOR mask pixels are 32 bit values: (lsb)BGR0(msb).
3986 For pointers with alpha channel the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
3987
3988 AND mask presents for pointers with alpha channel, so if the callback does not
3989 support alpha, the pointer could be displayed as a normal color pointer.
3990
3991 The AND mask is 1 bpp bitmap with byte aligned scanlines. Size of AND mask,
3992 therefore, is <tt>cbAnd = (width + 7) / 8 * height</tt>. The padding bits at the
3993 end of any scanline are undefined.
3994
3995 The XOR mask follows the AND mask on the next 4 bytes aligned offset:
3996 <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>
3997 Bytes in the gap between the AND and the XOR mask are undefined.
3998 XOR mask scanlines have no gap between them and size of XOR mask is:
3999 <tt>cXor = width * 4 * height</tt>.
4000
4001 <note>
4002 If 'shape' is equal to 0, only pointer visibility is being changed.
4003 </note>
4004 </desc>
4005 </param>
4006 </method>
4007
4008 <method name="onMouseCapabilityChange">
4009 <desc>
4010 Notification when the mouse capabilities reported by the
4011 guest have changed. The new capabilities are passed.
4012 </desc>
4013 <param name="supportsAbsolute" type="boolean" dir="in"/>
4014 <param name="needsHostCursor" type="boolean" dir="in"/>
4015 </method>
4016
4017 <method name="onKeyboardLedsChange">
4018 <desc>
4019 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
4020 to alter the state of the keyboard LEDs.
4021 </desc>
4022 <param name="numLock" type="boolean" dir="in"/>
4023 <param name="capsLock" type="boolean" dir="in"/>
4024 <param name="scrollLock" type="boolean" dir="in"/>
4025 </method>
4026
4027 <method name="onStateChange">
4028 <desc>
4029 Notification when the execution state of the machine has changed.
4030 The new state will be given.
4031 </desc>
4032 <param name="state" type="MachineState" dir="in"/>
4033 </method>
4034
4035 <method name="onAdditionsStateChange">
4036 <desc>
4037 Notification when a Guest Additions property changes.
4038 Interested callees should query IGuest attributes to
4039 find out what has changed.
4040 </desc>
4041 </method>
4042
4043 <method name="onDVDDriveChange">
4044 <desc>
4045 Notification when a property of the
4046 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
4047 Interested callees should use IDVDDrive methods to find out what has
4048 changed.
4049 </desc>
4050 </method>
4051
4052 <method name="onFloppyDriveChange">
4053 <desc>
4054 Notification when a property of the
4055 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
4056 Interested callees should use IFloppyDrive methods to find out what
4057 has changed.
4058 </desc>
4059 </method>
4060
4061 <method name="onNetworkAdapterChange">
4062 <desc>
4063 Notification when a property of one of the
4064 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
4065 changes. Interested callees should use INetworkAdapter methods and
4066 attributes to find out what has changed.
4067 </desc>
4068 <param name="networkAdapter" type="INetworkAdapter" dir="in">
4069 <desc>Network adapter that is subject to change.</desc>
4070 </param>
4071 </method>
4072
4073 <method name="onSerialPortChange">
4074 <desc>
4075 Notification when a property of one of the
4076 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
4077 Interested callees should use ISerialPort methods and attributes
4078 to find out what has changed.
4079 </desc>
4080 <param name="serialPort" type="ISerialPort" dir="in">
4081 <desc>Serial port that is subject to change.</desc>
4082 </param>
4083 </method>
4084
4085 <method name="onParallelPortChange">
4086 <desc>
4087 Notification when a property of one of the
4088 virtual <link to="IMachine::getParallelPort">parallel ports</link>
4089 changes. Interested callees should use ISerialPort methods and
4090 attributes to find out what has changed.
4091 </desc>
4092 <param name="parallelPort" type="IParallelPort" dir="in">
4093 <desc>Parallel port that is subject to change.</desc>
4094 </param>
4095 </method>
4096
4097 <method name="onVRDPServerChange">
4098 <desc>
4099 Notification when a property of the
4100 <link to="IMachine::VRDPServer">VRDP server</link> changes.
4101 Interested callees should use IVRDPServer methods and attributes to
4102 find out what has changed.
4103 </desc>
4104 </method>
4105
4106 <method name="onUSBControllerChange">
4107 <desc>
4108 Notification when a property of the virtual
4109 <link to="IMachine::USBController">USB controller</link> changes.
4110 Interested callees should use IUSBController methods and attributes to
4111 find out what has changed.
4112 </desc>
4113 </method>
4114
4115 <method name="onUSBDeviceStateChange">
4116 <desc>
4117 Notification when a USB device is attached to or detached from
4118 the virtual USB controller.
4119
4120 This notification is sent as a result of the indirect
4121 request to attach the device because it matches one of the
4122 machine USB filters, or as a result of the direct request
4123 issued by <link to="IConsole::attachUSBDevice"/> or
4124 <link to="IConsole::detachUSBDevice"/>.
4125
4126 This notification is sent in case of both a succeeded and a
4127 failed request completion. When the request succeeds, the @a
4128 error parameter is @c null, and the given device has been
4129 already added to (when @a attached is @c true) or removed from
4130 (when @a attached is @c false) the collection represented by
4131 <link to="IConsole::USBDevices"/>. On failure, the collection
4132 doesn't change and the @a error parameter represents the error
4133 message describing the failure.
4134
4135 </desc>
4136 <param name="device" type="IUSBDevice" dir="in">
4137 <desc>Device that is subject to state change.</desc>
4138 </param>
4139 <param name="attached" type="boolean" dir="in">
4140 <desc>
4141 <tt>true</tt> if the device was attached
4142 and <tt>false</tt> otherwise.
4143 </desc>
4144 </param>
4145 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
4146 <desc>
4147 <tt>null</tt> on success or an error message object on
4148 failure.
4149 </desc>
4150 </param>
4151 </method>
4152
4153 <method name="onSharedFolderChange">
4154 <desc>
4155 Notification when a shared folder is added or removed.
4156 The @a scope argument defines one of three scopes:
4157 <link to="IVirtualBox::sharedFolders">global shared folders</link>
4158 (<link to="Scope::Global">Global</link>),
4159 <link to="IMachine::sharedFolders">permanent shared folders</link> of
4160 the machine (<link to="Scope::Machine">Machine</link>) or <link
4161 to="IConsole::sharedFolders">transient shared folders</link> of the
4162 machine (<link to="Scope::Session">Session</link>). Interested callees
4163 should use query the corresponding collections to find out what has
4164 changed.
4165 </desc>
4166 <param name="scope" type="Scope" dir="in">
4167 <desc>Scope of the notification.</desc>
4168 </param>
4169 </method>
4170
4171 <method name="onRuntimeError">
4172 <desc>
4173 Notification when an error happens during the virtual
4174 machine execution.
4175
4176 There are three kinds of runtime errors:
4177 <ul>
4178 <li><i>fatal</i></li>
4179 <li><i>non-fatal with retry</i></li>
4180 <li><i>non-fatal warnings</i></li>
4181 </ul>
4182
4183 <b>Fatal</b> errors are indicated by the @a fatal parameter set
4184 to <tt>true</tt>. In case of fatal errors, the virtual machine
4185 execution is always paused before calling this notification, and
4186 the notification handler is supposed either to immediately save
4187 the virtual machine state using <link to="IConsole::saveState()"/>
4188 or power it off using <link to="IConsole::powerDown()"/>.
4189 Resuming the execution can lead to unpredictable results.
4190
4191 <b>Non-fatal</b> errors and warnings are indicated by the
4192 @a fatal parameter set to <tt>false</tt>. If the virtual machine
4193 is in the Paused state by the time the error notification is
4194 received, it means that the user can <i>try to resume</i> the machine
4195 execution after attempting to solve the problem that caused the
4196 error. In this case, the notification handler is supposed
4197 to show an appropriate message to the user (depending on the
4198 value of the @a id parameter) that offers several actions such
4199 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
4200 wants to retry, the notification handler should continue
4201 the machine execution using the <link to="IConsole::resume()"/>
4202 call. If the machine execution is not Paused during this
4203 notification, then it means this notification is a <i>warning</i>
4204 (for example, about a fatal condition that can happen very soon);
4205 no immediate action is required from the user, the machine
4206 continues its normal execution.
4207
4208 Note that in either case the notification handler
4209 <b>must not</b> perform any action directly on a thread
4210 where this notification is called. Everything it is allowed to
4211 do is to post a message to another thread that will then talk
4212 to the user and take the corresponding action.
4213
4214 Currently, the following error identifiers are known:
4215 <ul>
4216 <li><tt>"HostMemoryLow"</tt></li>
4217 <li><tt>"HostAudioNotResponding"</tt></li>
4218 <li><tt>"VDIStorageFull"</tt></li>
4219 </ul>
4220
4221 <note>
4222 This notification is not designed to be implemented by
4223 more than one callback at a time. If you have multiple
4224 IConsoleCallback instances registered on the given
4225 IConsole object, make sure you simply do nothing but
4226 return @c S_OK from all but one of them that does actual
4227 user notification and performs necessary actions.
4228 </note>
4229
4230 </desc>
4231 <param name="fatal" type="boolean" dir="in">
4232 <desc>Whether the error is fatal or not</desc>
4233 </param>
4234 <param name="id" type="wstring" dir="in">
4235 <desc>Error identifier</desc>
4236 </param>
4237 <param name="message" type="wstring" dir="in">
4238 <desc>Optional error message</desc>
4239 </param>
4240 </method>
4241
4242 <method name="onCanShowWindow">
4243 <desc>
4244 Notification when a call to
4245 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4246 front-end to check if a subsequent call to
4247 <link to="IMachine::showConsoleWindow()"/> can succeed.
4248
4249 The callee should give an answer appropriate to the current
4250 machine state in the @a canShow argument. This answer must
4251 remain valid at least until the next
4252 <link to="IConsole::state">machine state</link> change.
4253
4254 <note>
4255 This notification is not designed to be implemented by
4256 more than one callback at a time. If you have multiple
4257 IConsoleCallback instances registered on the given
4258 IConsole object, make sure you simply do nothing but
4259 return @c true and @c S_OK from all but one of them that
4260 actually manages console window activation.
4261 </note>
4262 </desc>
4263 <param name="canShow" type="boolean" dir="return">
4264 <desc>
4265 @c true if the console window can be shown and @c
4266 false otherwise.
4267 </desc>
4268 </param>
4269 </method>
4270
4271 <method name="onShowWindow">
4272 <desc>
4273 Notification when a call to
4274 <link to="IMachine::showConsoleWindow()"/>
4275 requests the console window to be activated and brought to
4276 foreground on the desktop of the host PC.
4277
4278 This notification should cause the VM console process to
4279 perform the requested action as described above. If it is
4280 impossible to do it at a time of this notification, this
4281 method should return a failure.
4282
4283 Note that many modern window managers on many platforms
4284 implement some sort of focus stealing prevention logic, so
4285 that it may be impossible to activate a window without the
4286 help of the currently active application (which is supposedly
4287 an initiator of this notification). In this case, this method
4288 must return a non-zero identifier that represents the
4289 top-level window of the VM console process. The caller, if it
4290 represents a currently active process, is responsible to use
4291 this identifier (in a platform-dependent manner) to perform
4292 actual window activation.
4293
4294 This method must set @a winId to zero if it has performed all
4295 actions necessary to complete the request and the console
4296 window is now active and in foreground, to indicate that no
4297 further action is required on the caller's side.
4298
4299 <note>
4300 This notification is not designed to be implemented by
4301 more than one callback at a time. If you have multiple
4302 IConsoleCallback instances registered on the given
4303 IConsole object, make sure you simply do nothing but
4304 return @c S_OK from all but one of them that actually
4305 manages console window activation.
4306 </note>
4307 </desc>
4308 <param name="winId" type="unsigned long long" dir="return">
4309 <desc>
4310 Platform-dependent identifier of the top-level VM console
4311 window, or zero if this method has performed all actions
4312 necessary to implement the <i>show window</i> semantics for
4313 the given platform and/or this VirtualBox front-end.
4314 </desc>
4315 </param>
4316 </method>
4317
4318 </interface>
4319
4320 <interface
4321 name="IRemoteDisplayInfo" extends="$unknown"
4322 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4323 wsmap="struct"
4324 >
4325 <desc>
4326 Contains information about the remote display (VRDP) capabilities and status.
4327 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4328 </desc>
4329
4330 <attribute name="active" type="boolean" readonly="yes">
4331 <desc>
4332 Whether the remote display connection is active.
4333 </desc>
4334 </attribute>
4335
4336 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4337 <desc>
4338 How many times a client connected.
4339 </desc>
4340 </attribute>
4341
4342 <attribute name="beginTime" type="long long" readonly="yes">
4343 <desc>
4344 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4345 </desc>
4346 </attribute>
4347
4348 <attribute name="endTime" type="long long" readonly="yes">
4349 <desc>
4350 When the last connection was terminated or the current time, if
4351 connection is still active, in milliseconds since 1970-01-01 UTC.
4352 </desc>
4353 </attribute>
4354
4355 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4356 <desc>
4357 How many bytes were sent in last or current, if still active, connection.
4358 </desc>
4359 </attribute>
4360
4361 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4362 <desc>
4363 How many bytes were sent in all connections.
4364 </desc>
4365 </attribute>
4366
4367 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4368 <desc>
4369 How many bytes were received in last or current, if still active, connection.
4370 </desc>
4371 </attribute>
4372
4373 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4374 <desc>
4375 How many bytes were received in all connections.
4376 </desc>
4377 </attribute>
4378
4379 <attribute name="user" type="wstring" readonly="yes">
4380 <desc>
4381 Login user name supplied by the client.
4382 </desc>
4383 </attribute>
4384
4385 <attribute name="domain" type="wstring" readonly="yes">
4386 <desc>
4387 Login domain name supplied by the client.
4388 </desc>
4389 </attribute>
4390
4391 <attribute name="clientName" type="wstring" readonly="yes">
4392 <desc>
4393 The client name supplied by the client.
4394 </desc>
4395 </attribute>
4396
4397 <attribute name="clientIP" type="wstring" readonly="yes">
4398 <desc>
4399 The IP address of the client.
4400 </desc>
4401 </attribute>
4402
4403 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4404 <desc>
4405 The client software version number.
4406 </desc>
4407 </attribute>
4408
4409 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
4410 <desc>
4411 Public key exchange method used when connection was established.
4412 Values: 0 - RDP4 public key exchange scheme.
4413 1 - X509 certificates were sent to client.
4414 </desc>
4415 </attribute>
4416
4417 </interface>
4418
4419 <interface
4420 name="IConsole" extends="$unknown"
4421 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
4422 wsmap="managed"
4423 >
4424 <desc>
4425 The IConsole interface represents an interface to control virtual
4426 machine execution.
4427
4428 The console object that implements the IConsole interface is obtained
4429 from a session object after the session for the given machine has been
4430 opened using one of <link to="IVirtualBox::openSession"/>,
4431 <link to="IVirtualBox::openRemoteSession"/> or
4432 <link to="IVirtualBox::openExistingSession"/> methods.
4433
4434 Methods of the IConsole interface allow the caller to query the current
4435 virtual machine execution state, pause the machine or power it down, save
4436 the machine state or take a snapshot, attach and detach removable media
4437 and so on.
4438
4439 <see>ISession</see>
4440 </desc>
4441
4442 <attribute name="machine" type="IMachine" readonly="yes">
4443 <desc>
4444 Machine object this console is sessioned with.
4445 <note>
4446 This is a convenience property, it has the same value as
4447 <link to="ISession::machine"/> of the corresponding session
4448 object.
4449 </note>
4450 </desc>
4451 </attribute>
4452
4453 <attribute name="state" type="MachineState" readonly="yes">
4454 <desc>
4455 Current execution state of the machine.
4456 <note>
4457 This property always returns the same value as the corresponding
4458 property of the IMachine object this console is sessioned with.
4459 For the process that owns (executes) the VM, this is the
4460 preferable way of querying the VM state, because no IPC
4461 calls are made.
4462 </note>
4463 </desc>
4464 </attribute>
4465
4466 <attribute name="guest" type="IGuest" readonly="yes">
4467 <desc>Guest object.</desc>
4468 </attribute>
4469
4470 <attribute name="keyboard" type="IKeyboard" readonly="yes">
4471 <desc>
4472 Virtual keyboard object.
4473 <note>
4474 If the machine is not running, any attempt to use
4475 the returned object will result in an error.
4476 </note>
4477 </desc>
4478 </attribute>
4479
4480 <attribute name="mouse" type="IMouse" readonly="yes">
4481 <desc>
4482 Virtual mouse object.
4483 <note>
4484 If the machine is not running, any attempt to use
4485 the returned object will result in an error.
4486 </note>
4487 </desc>
4488 </attribute>
4489
4490 <attribute name="display" type="IDisplay" readonly="yes">
4491 <desc>Virtual display object.
4492 <note>
4493 If the machine is not running, any attempt to use
4494 the returned object will result in an error.
4495 </note>
4496 </desc>
4497 </attribute>
4498
4499 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
4500 <desc>Debugging interface.</desc>
4501 </attribute>
4502
4503 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
4504 <desc>
4505 Collection of USB devices currently attached to the virtual
4506 USB controller.
4507 <note>
4508 The collection is empty if the machine is not running.
4509 </note>
4510 </desc>
4511 </attribute>
4512
4513 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
4514 <desc>
4515 List of USB devices currently attached to the remote VRDP client.
4516 Once a new device is physically attached to the remote host computer,
4517 it appears in this list and remains there until detached.
4518 </desc>
4519 </attribute>
4520
4521 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4522 <desc>
4523 Collection of shared folders for the current session. These folders
4524 are called transient shared folders because they are available to the
4525 guest OS running inside the associated virtual machine only for the
4526 duration of the session (as opposed to
4527 <link to="IMachine::sharedFolders"/> which represent permanent shared
4528 folders). When the session is closed (e.g. the machine is powered down),
4529 these folders are automatically discarded.
4530
4531 New shared folders are added to the collection using
4532 <link to="#createSharedFolder"/>. Existing shared folders can be
4533 removed using <link to="#removeSharedFolder"/>.
4534 </desc>
4535 </attribute>
4536
4537 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
4538 <desc>
4539 Interface that provides information on Remote Display (VRDP) connection.
4540 </desc>
4541 </attribute>
4542
4543 <method name="powerUp">
4544 <desc>
4545 Starts the virtual machine execution using the current machine
4546 state (that is, its current execution state, current settings and
4547 current hard disks).
4548
4549 If the machine is powered off or aborted, the execution will
4550 start from the beginning (as if the real hardware were just
4551 powered on).
4552
4553 If the machine is in the <link to="MachineState::Saved"/> state,
4554 it will continue its execution the point where the state has
4555 been saved.
4556
4557 <note>
4558 Unless you are trying to write a new VirtualBox front-end that
4559 performs direct machine execution (like the VirtualBox or VBoxSDL
4560 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
4561 session opened by <link to="IVirtualBox::openSession"/> and use this
4562 session only to change virtual machine settings. If you simply want to
4563 start virtual machine execution using one of the existing front-ends
4564 (for example the VirtualBox GUI or headless server), simply use
4565 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
4566 power up the machine automatically for you.
4567 </note>
4568
4569 <see>#saveState</see>
4570 <result name="VBOX_E_INVALID_VM_STATE">
4571 Virtual machine already running.
4572 </result>
4573 <result name="VBOX_E_HOST_ERROR">
4574 Host interface does not exist or name not set.
4575 </result>
4576 <result name="VBOX_E_FILE_ERROR">
4577 Invalid saved state file.
4578 </result>
4579 </desc>
4580 <param name="progress" type="IProgress" dir="return">
4581 <desc>Progress object to track the operation completion.</desc>
4582 </param>
4583 </method>
4584
4585 <method name="powerUpPaused">
4586 <desc>
4587 Identical to powerUp except that the VM will enter the
4588 <link to="MachineState::Paused"/> state, instead of
4589 <link to="MachineState::Running"/>.
4590
4591 <see>#powerUp</see>
4592 <result name="VBOX_E_INVALID_VM_STATE">
4593 Virtual machine already running.
4594 </result>
4595 <result name="VBOX_E_HOST_ERROR">
4596 Host interface does not exist or name not set.
4597 </result>
4598 <result name="VBOX_E_FILE_ERROR">
4599 Invalid saved state file.
4600 </result>
4601 </desc>
4602 <param name="progress" type="IProgress" dir="return">
4603 <desc>Progress object to track the operation completion.</desc>
4604 </param>
4605 </method>
4606
4607 <method name="powerDown">
4608 <desc>
4609 Stops the virtual machine execution.
4610 After this operation completes, the machine will go to the
4611 PoweredOff state.
4612
4613 @deprecated This method will be removed in VirtualBox 2.1 where the
4614 powerDownAsync() method will take its name. Do not use this method in
4615 the code.
4616 </desc>
4617 </method>
4618
4619 <method name="powerDownAsync">
4620 <desc>
4621 Initiates the power down procedure to stop the virtual machine
4622 execution.
4623
4624 The completion of the power down procedure is tracked using the returned
4625 IProgress object. After the operation is complete, the machine will go
4626 to the PoweredOff state.
4627
4628 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
4629 where the original powerDown() method will be removed. You will need to
4630 rename "powerDownAsync" to "powerDown" in your sources to make them
4631 build with version 2.1.
4632 </desc>
4633 <param name="progress" type="IProgress" dir="return">
4634 <desc>Progress object to track the operation completion.</desc>
4635 </param>
4636 </method>
4637
4638 <method name="reset">
4639 <desc>Resets the virtual machine.</desc>
4640 </method>
4641
4642 <method name="pause">
4643 <desc>Pauses the virtual machine execution.</desc>
4644 </method>
4645
4646 <method name="resume">
4647 <desc>Resumes the virtual machine execution.</desc>
4648 </method>
4649
4650 <method name="powerButton">
4651 <desc>Send the ACPI power button event to the guest.</desc>
4652 </method>
4653
4654 <method name="sleepButton">
4655 <desc>Send the ACPI sleep button event to the guest.</desc>
4656 </method>
4657
4658 <method name="getPowerButtonHandled">
4659 <desc>Check if the last power button event was handled by guest.</desc>
4660 <param name="handled" type="boolean" dir="return"/>
4661 </method>
4662
4663 <method name="getGuestEnteredACPIMode">
4664 <desc>Check if the guest entered the ACPI mode G0 (working) or
4665 G1 (sleeping). If this method returns false, the guest will
4666 most likely not respond to external ACPI events.</desc>
4667 <param name="entered" type="boolean" dir="return"/>
4668 </method>
4669
4670 <method name="saveState">
4671 <desc>
4672 Saves the current execution state of a running virtual machine
4673 and stops its execution.
4674
4675 After this operation completes, the machine will go to the
4676 Saved state. Next time it is powered up, this state will
4677 be restored and the machine will continue its execution from
4678 the place where it was saved.
4679
4680 This operation differs from taking a snapshot to the effect
4681 that it doesn't create new differencing hard disks. Also, once
4682 the machine is powered up from the state saved using this method,
4683 the saved state is deleted, so it will be impossible to return
4684 to this state later.
4685
4686 <note>
4687 On success, this method implicitly calls
4688 <link to="IMachine::saveSettings()"/> to save all current machine
4689 settings (including runtime changes to the DVD drive, etc.).
4690 Together with the impossibility to change any VM settings when it is
4691 in the Saved state, this guarantees the adequate hardware
4692 configuration of the machine when it is restored from the saved
4693 state file.
4694 </note>
4695
4696 <note>
4697 The machine must be in the Running or Paused state, otherwise
4698 the operation will fail.
4699 </note>
4700
4701 <see><link to="#takeSnapshot"/></see>
4702 </desc>
4703 <param name="progress" type="IProgress" dir="return">
4704 <desc>Progress object to track the operation completion.</desc>
4705 </param>
4706 </method>
4707
4708 <method name="adoptSavedState">
4709 <desc>
4710 Associates the given saved state file to the virtual machine.
4711
4712 On success, the machine will go to the Saved state. Next time it is
4713 powered up, it will be restored from the adopted saved state and
4714 continue execution from the place where the saved state file was
4715 created.
4716
4717 The specified saved state file path may be full or relative to the
4718 folder the VM normally saves the state to (usually,
4719 <link to="IMachine::snapshotFolder"/>).
4720
4721 <note>
4722 It's a caller's responsibility to make sure the given saved state
4723 file is compatible with the settings of this virtual machine that
4724 represent its virtual hardware (memory size, hard disk configuration
4725 etc.). If there is a mismatch, the behavior of the virtual machine
4726 is undefined.
4727 </note>
4728 </desc>
4729 <param name="savedStateFile" type="wstring" dir="in">
4730 <desc>Path to the saved state file to adopt.</desc>
4731 </param>
4732 </method>
4733
4734 <method name="discardSavedState">
4735 <desc>
4736 Discards (deletes) the saved state of the virtual machine
4737 previously created by <link to="#saveState"/>. Next time the
4738 machine is powered up, a clean boot will occur.
4739 <note>
4740 This operation is equivalent to resetting or powering off
4741 the machine without doing a proper shutdown in the guest OS.
4742 </note>
4743 </desc>
4744 </method>
4745
4746 <method name="getDeviceActivity">
4747 <desc>
4748 Gets the current activity type of a given device or device group.
4749 </desc>
4750 <param name="type" type="DeviceType" dir="in"/>
4751 <param name="activity" type="DeviceActivity" dir="return"/>
4752 </method>
4753
4754 <method name="attachUSBDevice">
4755 <desc>
4756 Attaches a host USB device with the given UUID to the
4757 USB controller of the virtual machine.
4758
4759 The device needs to be in one of the following states:
4760 <link to="USBDeviceState::Busy">Busy</link>,
4761 <link to="USBDeviceState::Available">Available</link> or
4762 <link to="USBDeviceState::Held">Held</link>,
4763 otherwise an error is immediately returned.
4764
4765 When the device state is
4766 <link to="USBDeviceState::Busy">Busy</link>, an error may also
4767 be returned if the host computer refuses to release it for some reason.
4768
4769 <see>IUSBController::deviceFilters, USBDeviceState</see>
4770 </desc>
4771 <param name="id" type="uuid" dir="in">
4772 <desc>UUID of the host USB device to attach.</desc>
4773 </param>
4774 </method>
4775
4776 <method name="detachUSBDevice">
4777 <desc>
4778 Detaches an USB device with the given UUID from the USB controller
4779 of the virtual machine.
4780
4781 After this method succeeds, the VirtualBox server re-initiates
4782 all USB filters as if the device were just physically attached
4783 to the host, but filters of this machine are ignored to avoid
4784 a possible automatic re-attachment.
4785
4786 <see>IUSBController::deviceFilters, USBDeviceState</see>
4787 </desc>
4788 <param name="id" type="uuid" dir="in">
4789 <desc>UUID of the USB device to detach.</desc>
4790 </param>
4791 <param name="device" type="IUSBDevice" dir="return">
4792 <desc>Detached USB device.</desc>
4793 </param>
4794 </method>
4795
4796 <method name="createSharedFolder">
4797 <desc>
4798 Creates a transient new shared folder by associating the given logical
4799 name with the given host path, adds it to the collection of shared
4800 folders and starts sharing it. Refer to the description of
4801 <link to="ISharedFolder"/> to read more about logical names.
4802 </desc>
4803 <param name="name" type="wstring" dir="in">
4804 <desc>Unique logical name of the shared folder.</desc>
4805 </param>
4806 <param name="hostPath" type="wstring" dir="in">
4807 <desc>Full path to the shared folder in the host file system.</desc>
4808 </param>
4809 <param name="writable" type="boolean" dir="in">
4810 <desc>Whether the share is writable or readonly</desc>
4811 </param>
4812 </method>
4813
4814 <method name="removeSharedFolder">
4815 <desc>
4816 Removes a transient shared folder with the given name previously
4817 created by <link to="#createSharedFolder"/> from the collection of
4818 shared folders and stops sharing it.
4819 </desc>
4820 <param name="name" type="wstring" dir="in">
4821 <desc>Logical name of the shared folder to remove.</desc>
4822 </param>
4823 </method>
4824
4825 <method name="takeSnapshot">
4826 <desc>
4827 Saves the current execution state and all settings of the
4828 machine and creates differencing images for all
4829 normal (non-independent) hard disks.
4830
4831 This method can be called for a PoweredOff, Saved, Running or
4832 Paused virtual machine. When the machine is PoweredOff, an
4833 offline <link to="ISnapshot">snapshot</link> is created,
4834 in all other cases -- an online snapshot.
4835
4836 The taken snapshot is always based on the
4837 <link to="IMachine::currentSnapshot">current
4838 snapshot</link> of the associated virtual machine and becomes
4839 a new current snapshot.
4840
4841 <note>
4842 This method implicitly calls <link to="IMachine::saveSettings()"/> to
4843 save all current machine settings before taking an offline snapshot.
4844 </note>
4845
4846 <see>ISnapshot, <link to="#saveState"/></see>
4847 </desc>
4848 <param name="name" type="wstring" dir="in">
4849 <desc>Short name for the snapshot.</desc>
4850 </param>
4851 <param name="description" type="wstring" dir="in">
4852 <desc>Optional description of the snapshot.</desc>
4853 </param>
4854 <param name="progress" type="IProgress" dir="return">
4855 <desc>Progress object to track the operation completion.</desc>
4856 </param>
4857 </method>
4858
4859 <method name="discardSnapshot">
4860 <desc>
4861
4862 Starts discarding the specified snapshot. The execution state
4863 and settings of the associated machine stored in the snapshot
4864 will be deleted. The contents of all differencing hard disks of
4865 this snapshot will be merged with the contents of their
4866 dependent child hard disks to keep the, disks valid (in other
4867 words, all changes represented by hard disks being discarded
4868 will be propagated to their child hard disks). After that, this
4869 snapshot's differencing hard disks will be deleted. The parent
4870 of this snapshot will become a new parent for all its child
4871 snapshots.
4872
4873 If the discarded snapshot is the current one, its parent
4874 snapshot will become a new current snapshot. The current machine
4875 state is not directly affected in this case, except that
4876 currently attached differencing hard disks based on hard disks
4877 of the discarded snapshot will be also merged as described
4878 above.
4879
4880 If the discarded snapshot is the first one (the root snapshot)
4881 and it has exactly one child snapshot, this child snapshot will
4882 become the first snapshot after discarding. If there are no
4883 children at all (i.e. the first snapshot is the only snapshot of
4884 the machine), both the current and the first snapshot of the
4885 machine will be set to null. In all other cases, the first
4886 snapshot cannot be discarded.
4887
4888 You cannot discard the snapshot if it
4889 stores <link to="HardDiskType::Normal">normal</link> (non-differencing)
4890 hard disks that have differencing hard disks based on them. Snapshots of
4891 such kind can be discarded only when every normal hard disk has either
4892 no children at all or exactly one child. In the former case, the normal
4893 hard disk simply becomes unused (i.e. not attached to any VM). In the
4894 latter case, it receives all the changes stored in the child hard disk,
4895 and then it replaces the child hard disk in the configuration of the
4896 corresponding snapshot or machine.
4897
4898 Also, you cannot discard the snapshot if it stores hard disks
4899 (of any type) having differencing child hard disks that belong
4900 to other machines. Such snapshots can be only discarded after
4901 you discard all snapshots of other machines containing "foreign"
4902 child disks, or detach these "foreign" child disks from machines
4903 they are attached to.
4904
4905 One particular example of the snapshot storing normal hard disks
4906 is the first snapshot of a virtual machine that had normal hard
4907 disks attached when taking the snapshot. Be careful when
4908 discarding such snapshots because this implicitly commits
4909 changes (made since the snapshot being discarded has been taken)
4910 to normal hard disks (as described above), which may be not what
4911 you want.
4912
4913 The virtual machine is put to
4914 the <link to="MachineState::Discarding">Discarding</link> state until
4915 the discard operation is completed.
4916
4917 <note>
4918 The machine must not be running, otherwise the operation
4919 will fail.
4920 </note>
4921
4922 <note>
4923 Child hard disks of all normal hard disks of the discarded snapshot
4924 must be accessible (see <link to="IMedium::state"/>) for this
4925 operation to succeed. In particular, this means that all virtual
4926 machines, whose hard disks are directly or indirectly based on the
4927 hard disks of discarded snapshot, must be powered off.
4928 </note>
4929 <note>
4930 Merging hard disk contents can be very time and disk space
4931 consuming, if these disks are big in size and have many
4932 children. However, if the snapshot being discarded is the last
4933 (head) snapshot on the branch, the operation will be rather
4934 quick.
4935 </note>
4936 <note>
4937 Note that discarding the current snapshot
4938 will implicitly call <link to="IMachine::saveSettings()"/> to
4939 make all current machine settings permanent.
4940 </note>
4941 </desc>
4942 <param name="id" type="uuid" dir="in">
4943 <desc>UUID of the snapshot to discard.</desc>
4944 </param>
4945 <param name="progress" type="IProgress" dir="return">
4946 <desc>Progress object to track the operation completion.</desc>
4947 </param>
4948 </method>
4949
4950 <method name="discardCurrentState">
4951 <desc>
4952 This operation is similar to <link to="#discardSnapshot()"/> but
4953 affects the current machine state. This means that the state stored in
4954 the current snapshot will become a new current state, and all current
4955 settings of the machine and changes stored in differencing hard disks
4956 will be lost.
4957
4958 After this operation is successfully completed, new empty differencing
4959 hard disks are created for all normal hard disks of the machine.
4960
4961 If the current snapshot of the machine is an online snapshot, the
4962 machine will go to the <link to="MachineState::Saved"> saved
4963 state</link>, so that the next time it is powered on, the execution
4964 state will be restored from the current snapshot.
4965
4966 <note>
4967 The machine must not be running, otherwise the operation will fail.
4968 </note>
4969
4970 <note>
4971 If the machine state is <link to="MachineState::Saved">Saved</link>
4972 prior to this operation, the saved state file will be implicitly
4973 discarded (as if <link to="IConsole::discardSavedState()"/> were
4974 called).
4975 </note>
4976
4977 </desc>
4978 <param name="progress" type="IProgress" dir="return">
4979 <desc>Progress object to track the operation completion.</desc>
4980 </param>
4981 </method>
4982
4983 <method name="discardCurrentSnapshotAndState">
4984 <desc>
4985
4986 This method is equivalent to
4987 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
4988 (currentSnapshot.id(), progress) followed by
4989 <link to="#discardCurrentState()"/>.
4990
4991 As a result, the machine will be fully restored from the
4992 snapshot preceding the current snapshot, while both the current
4993 snapshot and the current machine state will be discarded.
4994
4995 If the current snapshot is the first snapshot of the machine (i.e. it
4996 has the only snapshot), the current machine state will be
4997 discarded <b>before</b> discarding the snapshot. In other words, the
4998 machine will be restored from its last snapshot, before discarding
4999 it. This differs from performing a single
5000 <link to="#discardSnapshot()"/> call (note that no
5001 <link to="#discardCurrentState()"/> will be possible after it)
5002 to the effect that the latter will preserve the current state instead of
5003 discarding it.
5004
5005 Unless explicitly mentioned otherwise, all remarks and
5006 limitations of the above two methods also apply to this method.
5007
5008 <note>
5009 The machine must not be running, otherwise the operation
5010 will fail.
5011 </note>
5012
5013 <note>
5014 If the machine state is <link to="MachineState::Saved">Saved</link>
5015 prior to this operation, the saved state file will be implicitly
5016 discarded (as if <link to="#discardSavedState()"/> were
5017 called).
5018 </note>
5019
5020 <note>
5021 This method is more efficient than calling two above
5022 methods separately: it requires less IPC calls and provides
5023 a single progress object.
5024 </note>
5025
5026 </desc>
5027 <param name="progress" type="IProgress" dir="return">
5028 <desc>Progress object to track the operation completion.</desc>
5029 </param>
5030 </method>
5031
5032 <method name="registerCallback">
5033 <desc>
5034 Registers a new console callback on this instance. The methods of the
5035 callback interface will be called by this instance when the appropriate
5036 event occurs.
5037 </desc>
5038 <param name="callback" type="IConsoleCallback" dir="in"/>
5039 </method>
5040
5041 <method name="unregisterCallback">
5042 <desc>
5043 Unregisters the console callback previously registered using
5044 <link to="#registerCallback"/>.
5045 </desc>
5046 <param name="callback" type="IConsoleCallback" dir="in"/>
5047 </method>
5048 </interface>
5049
5050 <!--
5051 // IHost
5052 /////////////////////////////////////////////////////////////////////////
5053 -->
5054
5055 <interface
5056 name="IHostDVDDrive" extends="$unknown"
5057 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
5058 wsmap="managed"
5059 >
5060 <desc>
5061 The IHostDVDDrive interface represents the physical CD/DVD drive
5062 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
5063 </desc>
5064
5065 <attribute name="name" type="wstring" readonly="yes">
5066 <desc>
5067 Returns the platform-specific device identifier.
5068 On DOS-like platforms, it is a drive name (e.g. R:).
5069 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
5070 </desc>
5071 </attribute>
5072 <attribute name="description" type="wstring" readonly="yes">
5073 <desc>
5074 Returns a human readable description for the drive. This
5075 description usually contains the product and vendor name. A
5076 @c null string is returned if the description is not available.
5077 </desc>
5078 </attribute>
5079 <attribute name="udi" type="wstring" readonly="yes">
5080 <desc>
5081 Returns the unique device identifier for the drive. This
5082 attribute is reserved for future use instead of
5083 <link to="#name"/>. Currently it is not used and may return
5084 @c null on some platforms.
5085 </desc>
5086 </attribute>
5087
5088 </interface>
5089
5090 <enumerator
5091 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
5092 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
5093 />
5094
5095 <collection
5096 name="IHostDVDDriveCollection" type="IHostDVDDrive"
5097 enumerator="IHostDVDDriveEnumerator"
5098 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
5099 readonly="yes"
5100 >
5101 <method name="findByName">
5102 <desc>
5103 Searches this collection for a host drive with the given name.
5104 <note>
5105 The method returns an error if the given name does not
5106 correspond to any host drive in the collection.
5107 </note>
5108 </desc>
5109 <param name="name" type="wstring" dir="in">
5110 <desc>Name of the host drive to search for</desc>
5111 </param>
5112 <param name="drive" type="IHostDVDDrive" dir="return">
5113 <desc>Found host drive object</desc>
5114 </param>
5115 </method>
5116 </collection>
5117
5118 <interface
5119 name="IHostFloppyDrive" extends="$unknown"
5120 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
5121 wsmap="managed"
5122 >
5123 <desc>
5124 The IHostFloppyDrive interface represents the physical floppy drive
5125 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
5126 </desc>
5127 <attribute name="name" type="wstring" readonly="yes">
5128 <desc>
5129 Returns the platform-specific device identifier.
5130 On DOS-like platforms, it is a drive name (e.g. A:).
5131 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
5132 </desc>
5133 </attribute>
5134 <attribute name="description" type="wstring" readonly="yes">
5135 <desc>
5136 Returns a human readable description for the drive. This
5137 description usually contains the product and vendor name. A
5138 @c null string is returned if the description is not available.
5139 </desc>
5140 </attribute>
5141 <attribute name="udi" type="wstring" readonly="yes">
5142 <desc>
5143 Returns the unique device identifier for the drive. This
5144 attribute is reserved for future use instead of
5145 <link to="#name"/>. Currently it is not used and may return
5146 @c null on some platforms.
5147 </desc>
5148 </attribute>
5149 </interface>
5150
5151 <enumerator
5152 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
5153 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
5154 />
5155
5156 <collection
5157 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
5158 enumerator="IHostFloppyDriveEnumerator"
5159 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
5160 readonly="yes"
5161 >
5162 <method name="findByName">
5163 <desc>
5164 Searches this collection for a host drive with the given name.
5165 <note>
5166 The method returns an error if the given name does not
5167 correspond to any host drive in the collection.
5168 </note>
5169 </desc>
5170 <param name="name" type="wstring" dir="in">
5171 <desc>Name of the host drive to search for</desc>
5172 </param>
5173 <param name="drive" type="IHostFloppyDrive" dir="return">
5174 <desc>Found host drive object</desc>
5175 </param>
5176 </method>
5177 </collection>
5178
5179 <interface
5180 name="IHostNetworkInterface" extends="$unknown"
5181 uuid="F4512D7C-B074-4e97-99B8-6D2BD27C3F5A"
5182 wsmap="managed"
5183 >
5184 <attribute name="name" type="wstring" readonly="yes">
5185 <desc>Returns the host network interface name.</desc>
5186 </attribute>
5187
5188 <attribute name="id" type="uuid" readonly="yes">
5189 <desc>Returns the interface UUID.</desc>
5190 </attribute>
5191 </interface>
5192
5193 <enumerator
5194 name="IHostNetworkInterfaceEnumerator" type="IHostNetworkInterface"
5195 uuid="7B52FEF7-56E8-4aec-92F5-15E6D11EC630"
5196 />
5197
5198 <collection
5199 name="IHostNetworkInterfaceCollection" type="IHostNetworkInterface"
5200 enumerator="IHostNetworkInterfaceEnumerator"
5201 uuid="BF1D41F2-B97B-4314-A0FB-D4823AF42FB5"
5202 readonly="yes"
5203 >
5204 <method name="findByName">
5205 <desc>
5206 Searches this collection for a host network interface with the given name.
5207 <note>
5208 The method returns an error if the given name does not
5209 correspond to any host network interface in the collection.
5210 </note>
5211 </desc>
5212 <param name="name" type="wstring" dir="in">
5213 <desc>Name of the host network interface to search for.</desc>
5214 </param>
5215 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5216 <desc>Found host network interface object.</desc>
5217 </param>
5218 </method>
5219 <method name="findById">
5220 <desc>
5221 Searches this collection for a host network interface with the given GUID.
5222 <note>
5223 The method returns an error if the given GUID does not
5224 correspond to any host network interface in the collection.
5225 </note>
5226 </desc>
5227 <param name="id" type="uuid" dir="in">
5228 <desc>GUID of the host network interface to search for.</desc>
5229 </param>
5230 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5231 <desc>Found host network interface object.</desc>
5232 </param>
5233 </method>
5234 </collection>
5235
5236 <interface
5237 name="IHost" extends="$unknown"
5238 uuid="4be2e85f-a54c-4bc7-8bf6-f070f9113940"
5239 wsmap="managed"
5240 >
5241 <desc>
5242 The IHost interface represents the physical machine that this VirtualBox
5243 installation runs on.
5244
5245 An object implementing this interface is returned by the
5246 <link to="IVirtualBox::host" /> attribute. This interface contains
5247 read-only information about the host's physical hardware (such as what
5248 processors, and disks are available, what the host operating system is,
5249 and so on) and also allows for manipulating some of the host's hardware,
5250 such as global USB device filters and host interface networking.
5251
5252 </desc>
5253 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
5254 <desc>List of DVD drives available on the host.</desc>
5255 </attribute>
5256
5257 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
5258 <desc>List of floppy drives available on the host.</desc>
5259 </attribute>
5260
5261 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5262 <desc>
5263 List of USB devices currently attached to the host.
5264 Once a new device is physically attached to the host computer,
5265 it appears in this list and remains there until detached.
5266
5267 <note>
5268 This method may set a @ref com_warnings "warning result code".
5269 </note>
5270 <note>
5271 If USB functionality is not available in the given edition of
5272 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5273 </note>
5274 </desc>
5275 </attribute>
5276
5277 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
5278 <desc>
5279 List of USB device filters in action.
5280 When a new device is physically attached to the host computer,
5281 filters from this list are applied to it (in order they are stored
5282 in the list). The first matched filter will determine the
5283 <link to="IHostUSBDeviceFilter::action">action</link>
5284 performed on the device.
5285
5286 Unless the device is ignored by these filters, filters of all
5287 currently running virtual machines
5288 (<link to="IUSBController::deviceFilters"/>) are applied to it.
5289
5290 <note>
5291 This method may set a @ref com_warnings "warning result code".
5292 </note>
5293 <note>
5294 If USB functionality is not available in the given edition of
5295 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5296 </note>
5297
5298 <see>IHostUSBDeviceFilter, USBDeviceState</see>
5299 </desc>
5300 </attribute>
5301
5302 <attribute name="networkInterfaces" type="IHostNetworkInterfaceCollection" readonly="yes">
5303 <desc>List of host network interfaces currently defined on the host.</desc>
5304 </attribute>
5305
5306 <attribute name="processorCount" type="unsigned long" readonly="yes">
5307 <desc>Number of (logical) CPUs installed in the host system.</desc>
5308 </attribute>
5309
5310 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
5311 <desc>Number of (logical) CPUs online in the host system.</desc>
5312 </attribute>
5313
5314 <method name="getProcessorSpeed">
5315 <desc>Query the (approximate) maximum speed of a specified host CPU in Megahertz.</desc>
5316 <param name="cpuId" type="unsigned long" dir="in">
5317 <desc>
5318 Identifier of the CPU.
5319 </desc>
5320 </param>
5321 <param name="speed" type="unsigned long" dir="return">
5322 <desc>
5323 Speed value. 0 is returned if value is not known or @a cpuId is
5324 invalid.
5325 </desc>
5326 </param>
5327 </method>
5328
5329 <method name="getProcessorFeature">
5330 <desc>Query whether a CPU feature is supported or not.</desc>
5331 <param name="feature" type="ProcessorFeature" dir="in">
5332 <desc>
5333 CPU Feature identifier.
5334 </desc>
5335 </param>
5336 <param name="supported" type="boolean" dir="return">
5337 <desc>
5338 Feature is supported or not.
5339 </desc>
5340 </param>
5341 </method>
5342
5343 <method name="getProcessorDescription">
5344 <desc>Query the model string of a specified host CPU.</desc>
5345 <param name="cpuId" type="unsigned long" dir="in">
5346 <desc>
5347 Identifier of the CPU.
5348 </desc>
5349 </param>
5350 <param name="description" type="wstring" dir="return">
5351 <desc>
5352 Model string. A NULL string is returned if value is not known or
5353 @a cpuId is invalid.
5354 </desc>
5355 </param>
5356 </method>
5357
5358 <attribute name="memorySize" type="unsigned long" readonly="yes">
5359 <desc>Amount of system memory in megabytes installed in the host system.</desc>
5360 </attribute>
5361
5362 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
5363 <desc>Available system memory in the host system.</desc>
5364 </attribute>
5365
5366 <attribute name="operatingSystem" type="wstring" readonly="yes">
5367 <desc>Name of the host system's operating system.</desc>
5368 </attribute>
5369
5370 <attribute name="OSVersion" type="wstring" readonly="yes">
5371 <desc>Host operating system's version string.</desc>
5372 </attribute>
5373
5374 <attribute name="UTCTime" type="long long" readonly="yes">
5375 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
5376 </attribute>
5377
5378<if target="midl">
5379 <method name="createHostNetworkInterface">
5380 <desc>
5381 Creates a new adapter for Host Interface Networking.
5382 </desc>
5383 <param name="name" type="wstring" dir="in">
5384 <desc>
5385 Adapter name.
5386 </desc>
5387 </param>
5388 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5389 <desc>
5390 Created host interface object.
5391 </desc>
5392 </param>
5393 <param name="progress" type="IProgress" dir="return">
5394 <desc>
5395 Progress object to track the operation completion.
5396 </desc>
5397 </param>
5398 </method>
5399 <method name="removeHostNetworkInterface">
5400 <desc>
5401 Removes the given host network interface.
5402 </desc>
5403 <param name="id" type="uuid" dir="in">
5404 <desc>
5405 Adapter GUID.
5406 </desc>
5407 </param>
5408 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5409 <desc>
5410 Removed host interface object.
5411 </desc>
5412 </param>
5413 <param name="progress" type="IProgress" dir="return">
5414 <desc>
5415 Progress object to track the operation completion.
5416 </desc>
5417 </param>
5418 </method>
5419</if>
5420
5421 <method name="createUSBDeviceFilter">
5422 <desc>
5423 Creates a new USB device filter. All attributes except
5424 the filter name are set to <tt>null</tt> (any match),
5425 <i>active</i> is <tt>false</tt> (the filter is not active).
5426
5427 The created filter can be added to the list of filters using
5428 <link to="#insertUSBDeviceFilter()"/>.
5429
5430 <see>#USBDeviceFilters</see>
5431 </desc>
5432 <param name="name" type="wstring" dir="in">
5433 <desc>
5434 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
5435 for more info.
5436 </desc>
5437 </param>
5438 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5439 <desc>Created filter object.</desc>
5440 </param>
5441 </method>
5442
5443 <method name="insertUSBDeviceFilter">
5444 <desc>
5445 Inserts the given USB device to the specified position
5446 in the list of filters.
5447
5448 Positions are numbered starting from <tt>0</tt>. If the specified
5449 position is equal to or greater than the number of elements in
5450 the list, the filter is added to the end of the collection.
5451
5452 <note>
5453 Duplicates are not allowed, so an attempt to insert a
5454 filter that is already in the list, will return an
5455 error.
5456 </note>
5457 <note>
5458 This method may set a @ref com_warnings "warning result code".
5459 </note>
5460 <note>
5461 If USB functionality is not available in the given edition of
5462 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5463 </note>
5464
5465 <see>#USBDeviceFilters</see>
5466 </desc>
5467 <param name="position" type="unsigned long" dir="in">
5468 <desc>Position to insert the filter to.</desc>
5469 </param>
5470 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
5471 <desc>USB device filter to insert.</desc>
5472 </param>
5473 </method>
5474
5475 <method name="removeUSBDeviceFilter">
5476 <desc>
5477 Removes a USB device filter from the specified position in the
5478 list of filters.
5479
5480 Positions are numbered starting from <tt>0</tt>. Specifying a
5481 position equal to or greater than the number of elements in
5482 the list will produce an error.
5483
5484 <note>
5485 This method may set a @ref com_warnings "warning result code".
5486 </note>
5487 <note>
5488 If USB functionality is not available in the given edition of
5489 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5490 </note>
5491
5492 <see>#USBDeviceFilters</see>
5493 </desc>
5494 <param name="position" type="unsigned long" dir="in">
5495 <desc>Position to remove the filter from.</desc>
5496 </param>
5497 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5498 <desc>Removed USB device filter.</desc>
5499 </param>
5500 </method>
5501
5502 </interface>
5503
5504 <!--
5505 // ISystemProperties
5506 /////////////////////////////////////////////////////////////////////////
5507 -->
5508
5509 <interface
5510 name="ISystemProperties"
5511 extends="$unknown"
5512 uuid="604afeba-5963-4d12-a577-902ffb96352a"
5513 wsmap="managed"
5514 >
5515 <desc>
5516 The ISystemProperties interface represents global properties of the given
5517 VirtualBox installation.
5518
5519 These properties define limits and default values for various attributes
5520 and parameters. Most of the properties are read-only, but some can be
5521 changed by a user.
5522 </desc>
5523
5524 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
5525 <desc>Minimum guest system memory in Megabytes.</desc>
5526 </attribute>
5527
5528 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
5529 <desc>Maximum guest system memory in Megabytes.</desc>
5530 </attribute>
5531
5532 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
5533 <desc>Minimum guest video memory in Megabytes.</desc>
5534 </attribute>
5535
5536 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
5537 <desc>Maximum guest video memory in Megabytes.</desc>
5538 </attribute>
5539
5540 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
5541 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
5542 </attribute>
5543
5544 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
5545 <desc>
5546 Number of network adapters associated with every
5547 <link to="IMachine"/> instance.
5548 </desc>
5549 </attribute>
5550
5551 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
5552 <desc>
5553 Number of serial ports associated with every
5554 <link to="IMachine"/> instance.
5555 </desc>
5556 </attribute>
5557
5558 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
5559 <desc>
5560 Number of parallel ports associated with every
5561 <link to="IMachine"/> instance.
5562 </desc>
5563 </attribute>
5564
5565 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
5566 <desc>
5567 Maximum device position in the boot order. This value corresponds
5568 to the total number of devices a machine can boot from, to make it
5569 possible to include all possible devices to the boot list.
5570 <see><link to="IMachine::setBootOrder()"/></see>
5571 </desc>
5572 </attribute>
5573
5574 <attribute name="defaultMachineFolder" type="wstring">
5575 <desc>
5576 Full path to the default directory used to create new or open
5577 existing machines when a settings file name contains no
5578 path.
5579
5580 The initial value of this property is
5581 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
5582 VirtualBox_home</link><tt>&gt;/Machines</tt>.
5583
5584 <note>
5585 Setting this property to <tt>null</tt> will restore the
5586 initial value.
5587 </note>
5588 <note>
5589 When settings this property, the specified path can be
5590 absolute (full path) or relative
5591 to the <link to="IVirtualBox::homeFolder">
5592 VirtualBox home directory</link>.
5593 When reading this property, a full path is
5594 always returned.
5595 </note>
5596 <note>
5597 The specified path may not exist, it will be created
5598 when necessary.
5599 </note>
5600
5601 <see>
5602 <link to="IVirtualBox::createMachine()"/>,
5603 <link to="IVirtualBox::openMachine()"/>
5604 </see>
5605 </desc>
5606 </attribute>
5607
5608 <attribute name="defaultHardDiskFolder" type="wstring">
5609 <desc>
5610 Full path to the default directory used to create new or open existing
5611 virtual disks.
5612
5613 This path is used when the storage unit of a hard disk is a regular file
5614 in the host's file system and only a file name that contains no path is
5615 given.
5616
5617 The initial value of this property is
5618 <tt>&lt;</tt>
5619 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
5620 <tt>&gt;/HardDisks</tt>.
5621
5622 <note>
5623 Setting this property to <tt>null</tt> will restore the
5624 initial value.
5625 </note>
5626 <note>
5627 When settings this property, the specified path can be relative
5628 to the
5629 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
5630 absolute. When reading this property, a full path is
5631 always returned.
5632 </note>
5633 <note>
5634 The specified path may not exist, it will be created
5635 when necessary.
5636 </note>
5637
5638 <see>
5639 IHardDisk2,
5640 <link to="IVirtualBox::createHardDisk2()"/>,
5641 <link to="IVirtualBox::openHardDisk2()"/>,
5642 <link to="IMedium::location"/>
5643 </see>
5644 </desc>
5645 </attribute>
5646
5647 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
5648 <desc>
5649 List of all hard disk storage formats supported by this VirtualBox
5650 installation.
5651
5652 Note that the virtual hard disk framework is backend-based, therefore
5653 the list of supported formats depends on what backends are currently
5654 installed.
5655
5656 <see>
5657 <link to="IHardDiskFormat"/>,
5658 </see>
5659 </desc>
5660 </attribute>
5661
5662 <attribute name="defaultHardDiskFormat" type="wstring">
5663 <desc>
5664 Identifier of the default hard disk format used by VirtualBox.
5665
5666 The hard disk format set by this attribute is used by VirtualBox
5667 when the hard disk format was not specified explicitly. One example is
5668 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
5669 format argument. A more complex example is implicit creation of
5670 differencing hard disks when taking a snapshot of a virtual machine:
5671 this operation will try to use a format of the parent hard disk first
5672 and if this format does not support differencing hard disks the default
5673 format specified by this argument will be used.
5674
5675 The list of supported hard disk formats may be obtained by the
5676 <link to="#defaultHardDiskFormats"/> call. Note that the default
5677 hard disk format must have a capability to create differencing hard
5678 disks; otherwise opeartions that create hard disks implicitly may fail
5679 unexpectedly.
5680
5681 The initial value of this property is <tt>VDI</tt> in the current
5682 version of the VirtualBox product, but may change in the future.
5683
5684 <note>
5685 Setting this property to <tt>null</tt> will restore the
5686 initial value.
5687 </note>
5688
5689 <see>
5690 <link to="#hardDiskFormats"/>,
5691 <link to="IHardDiskFormat:id"/>,
5692 <link to="IVirtualBox::createHardDisk2()"/>
5693 </see>
5694 </desc>
5695 </attribute>
5696
5697 <attribute name="remoteDisplayAuthLibrary" type="wstring">
5698 <desc>
5699 Library that provides authentication for VRDP clients. The library
5700 is used if a virtual machine's authentication type is set to "external"
5701 in the VM RemoteDisplay configuration.
5702
5703 The system library extension (".DLL" or ".so") must be omitted.
5704 A full path can be specified; if not, then the library must reside on the
5705 system's default library path.
5706
5707 The default value of this property is <tt>VRDPAuth</tt>. There is a library
5708 of that name in one of the default VirtualBox library directories.
5709
5710 For details about VirtualBox authentication libraries and how to implement
5711 them, please refer to the VirtualBox manual.
5712
5713 <note>
5714 Setting this property to <tt>null</tt> will restore the
5715 initial value.
5716 </note>
5717 </desc>
5718 </attribute>
5719
5720 <attribute name="webServiceAuthLibrary" type="wstring">
5721 <desc>
5722 Library that provides authentication for webservice clients. The library
5723 is used if a virtual machine's authentication type is set to "external"
5724 in the VM RemoteDisplay configuration and will be called from
5725 within the <link to="IWebsessionManager::logon" /> implementation.
5726
5727 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
5728 there is no per-VM setting for this, as the webservice is a global
5729 resource (if it is running). Only for this setting (for the webservice),
5730 setting this value to a literal "null" string disables authentication,
5731 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
5732 no matter what user name and password are supplied.
5733
5734 The initial value of this property is <tt>VRDPAuth</tt>,
5735 meaning that the webservice will use the same authentication
5736 library that is used by default for VBoxVRDP (again, see
5737 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
5738 The format and calling convention of authentication libraries
5739 is the same for the webservice as it is for VBoxVRDP.
5740
5741 </desc>
5742 </attribute>
5743
5744 <attribute name="HWVirtExEnabled" type="boolean">
5745 <desc>
5746 This specifies the default value for hardware virtualization
5747 extensions. If enabled, virtual machines will make use of
5748 hardware virtualization extensions such as Intel VT-x and
5749 AMD-V by default. This value can be overridden by each VM
5750 using their <link to="IMachine::HWVirtExEnabled" /> property.
5751 </desc>
5752 </attribute>
5753
5754 <attribute name="LogHistoryCount" type="unsigned long">
5755 <desc>
5756 This value specifies how many old release log files are kept.
5757 </desc>
5758 </attribute>
5759 </interface>
5760
5761 <!--
5762 // IGuest
5763 /////////////////////////////////////////////////////////////////////////
5764 -->
5765
5766 <interface
5767 name="IGuestOSType" extends="$unknown"
5768 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
5769 wsmap="struct"
5770 >
5771 <desc>
5772 </desc>
5773
5774 <attribute name="familyId" type="wstring" readonly="yes">
5775 <desc>Guest OS family identifier string.</desc>
5776 </attribute>
5777
5778 <attribute name="familyDescription" type="wstring" readonly="yes">
5779 <desc>Human readable description of the guest OS family.</desc>
5780 </attribute>
5781
5782 <attribute name="id" type="wstring" readonly="yes">
5783 <desc>Guest OS identifier string.</desc>
5784 </attribute>
5785
5786 <attribute name="description" type="wstring" readonly="yes">
5787 <desc>Human readable description of the guest OS.</desc>
5788 </attribute>
5789
5790 <attribute name="is64Bit" type="boolean" readonly="yes">
5791 <desc>Returns @c true if the given OS is 64-bit</desc>
5792 </attribute>
5793
5794 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
5795 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
5796 </attribute>
5797
5798 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
5799 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
5800 </attribute>
5801
5802 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
5803 <desc>Recommended RAM size in Megabytes.</desc>
5804 </attribute>
5805
5806 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
5807 <desc>Recommended video RAM size in Megabytes.</desc>
5808 </attribute>
5809
5810 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
5811 <desc>Recommended hard disk size in Megabytes.</desc>
5812 </attribute>
5813
5814 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
5815 <desc>Returns recommended network adapter for this OS type.</desc>
5816 </attribute>
5817 </interface>
5818
5819
5820 <enumerator
5821 name="IGuestOSTypeEnumerator" type="IGuestOSType"
5822 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
5823 />
5824
5825 <collection
5826 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
5827 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
5828 readonly="yes"
5829 />
5830
5831 <interface
5832 name="IGuest" extends="$unknown"
5833 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
5834
5835 wsmap="suppress"
5836 >
5837 <desc>
5838 The IGuest interface represents information about the operating system
5839 running inside the virtual machine. Used in
5840 <link to="IConsole::guest"/>.
5841
5842 IGuest provides information about the guest operating system, whether
5843 Guest Additions are installed and other OS-specific virtual machine
5844 properties.
5845 </desc>
5846
5847 <attribute name="OSTypeId" type="wstring" readonly="yes">
5848 <desc>
5849 Identifier of the Guest OS type as reported by the Guest
5850 Additions.
5851 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
5852 an IGuestOSType object representing details about the given
5853 Guest OS type.
5854 <note>
5855 If Guest Additions are not installed, this value will be
5856 the same as <link to="IMachine::OSTypeId"/>.
5857 </note>
5858 </desc>
5859 </attribute>
5860
5861 <attribute name="additionsActive" type="boolean" readonly="yes">
5862 <desc>
5863 Flag whether the Guest Additions are installed and active
5864 in which case their version will be returned by the
5865 <link to="#additionsVersion"/> property.
5866 </desc>
5867 </attribute>
5868
5869 <attribute name="additionsVersion" type="wstring" readonly="yes">
5870 <desc>
5871 Version of the Guest Additions (3 decimal numbers separated
5872 by dots) or empty when the Additions are not installed. The
5873 Additions may also report a version but yet not be active as
5874 the version might be refused by VirtualBox (incompatible) or
5875 other failures occurred.
5876 </desc>
5877 </attribute>
5878
5879 <attribute name="supportsSeamless" type="boolean" readonly="yes">
5880 <desc>
5881 Flag whether seamless guest display rendering (seamless desktop
5882 integration) is supported.
5883 </desc>
5884 </attribute>
5885
5886 <attribute name="supportsGraphics" type="boolean" readonly="yes">
5887 <desc>
5888 Flag whether the guest is in graphics mode. If it is not, then
5889 seamless rendering will not work, resize hints are not immediately
5890 acted on and guest display resizes are probably not initiated by
5891 the guest additions.
5892 </desc>
5893 </attribute>
5894
5895 <attribute name="memoryBalloonSize" type="unsigned long">
5896 <desc>Guest system memory balloon size in megabytes.</desc>
5897 </attribute>
5898
5899 <attribute name="statisticsUpdateInterval" type="unsigned long">
5900 <desc>Interval to update guest statistics in seconds.</desc>
5901 </attribute>
5902
5903 <method name="setCredentials">
5904 <desc>
5905 Store login credentials that can be queried by guest operating
5906 systems with Additions installed. The credentials are transient
5907 to the session and the guest may also choose to erase them. Note
5908 that the caller cannot determine whether the guest operating system
5909 has queried or made use of the credentials.
5910 </desc>
5911 <param name="userName" type="wstring" dir="in">
5912 <desc>User name string, can be empty</desc>
5913 </param>
5914 <param name="password" type="wstring" dir="in">
5915 <desc>Password string, can be empty</desc>
5916 </param>
5917 <param name="domain" type="wstring" dir="in">
5918 <desc>Domain name (guest logon scheme specific), can be empty</desc>
5919 </param>
5920 <param name="allowInteractiveLogon" type="boolean" dir="in">
5921 <desc>
5922 Flag whether the guest should alternatively allow the user to
5923 interactively specify different credentials. This flag might
5924 not be supported by all versions of the Additions.
5925 </desc>
5926 </param>
5927 </method>
5928
5929 <method name="getStatistic">
5930 <desc>
5931 Query specified guest statistics as reported by the VirtualBox Additions.
5932 </desc>
5933 <param name="cpuId" type="unsigned long" dir="in">
5934 <desc>Virtual CPU id; not relevant for all statistic types</desc>
5935 </param>
5936 <param name="statistic" type="GuestStatisticType" dir="in">
5937 <desc>Statistic type.</desc>
5938 </param>
5939 <param name="statVal" type="unsigned long" dir="out">
5940 <desc>Statistics value</desc>
5941 </param>
5942 </method>
5943
5944 </interface>
5945
5946
5947 <!--
5948 // IProgress
5949 /////////////////////////////////////////////////////////////////////////
5950 -->
5951
5952 <enumerator
5953 name="IProgressEnumerator" type="IProgress"
5954 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
5955 />
5956
5957 <collection
5958 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
5959 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
5960 readonly="yes"
5961 />
5962
5963 <interface
5964 name="IProgress" extends="$unknown"
5965 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
5966 wsmap="managed"
5967 >
5968 <desc>
5969 The IProgress interface represents a task progress object that allows
5970 to wait for the completion of some asynchronous task.
5971
5972 The task consists of one or more operations that run sequentially,
5973 one after one. There is an individual percent of completion of the
5974 current operation and the percent of completion of the task as a
5975 whole. Similarly, you can wait for the completion of a particular
5976 operation or for the completion of the whole task.
5977
5978 Every operation is identified by a number (starting from 0)
5979 and has a separate description.
5980 </desc>
5981
5982 <attribute name="id" type="uuid" readonly="yes">
5983 <desc>ID of the task.</desc>
5984 </attribute>
5985
5986 <attribute name="description" type="wstring" readonly="yes">
5987 <desc>Description of the task.</desc>
5988 </attribute>
5989
5990 <attribute name="initiator" type="$unknown" readonly="yes">
5991 <desc>Initiator of the task.</desc>
5992 </attribute>
5993
5994 <attribute name="cancelable" type="boolean" readonly="yes">
5995 <desc>Whether the task can be interrupted.</desc>
5996 </attribute>
5997
5998 <attribute name="percent" type="long" readonly="yes">
5999 <desc>
6000 Current task progress value in percent.
6001 This value depends on how many operations are already complete.
6002 </desc>
6003 </attribute>
6004
6005 <attribute name="completed" type="boolean" readonly="yes">
6006 <desc>Whether the task has been completed.</desc>
6007 </attribute>
6008
6009 <attribute name="canceled" type="boolean" readonly="yes">
6010 <desc>Whether the task has been canceled.</desc>
6011 </attribute>
6012
6013 <attribute name="resultCode" type="result" readonly="yes">
6014 <desc>
6015 Result code of the progress task.
6016 Valid only if <link to="#completed"/> is true.
6017 </desc>
6018 </attribute>
6019
6020 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
6021 <desc>
6022 Extended information about the unsuccessful result of the
6023 progress operation. May be NULL when no extended information
6024 is available.
6025 Valid only if <link to="#completed"/> is true and
6026 <link to="#resultCode"/> indicates a failure.
6027 </desc>
6028 </attribute>
6029
6030 <attribute name="operationCount" type="unsigned long" readonly="yes">
6031 <desc>
6032 Number of operations this task is divided into.
6033 Every task consists of at least one operation.
6034 </desc>
6035 </attribute>
6036
6037 <attribute name="operation" type="unsigned long" readonly="yes">
6038 <desc>Number of the operation being currently executed.</desc>
6039 </attribute>
6040
6041 <attribute name="operationDescription" type="wstring" readonly="yes">
6042 <desc>
6043 Description of the operation being currently executed.
6044 </desc>
6045 </attribute>
6046
6047 <attribute name="operationPercent" type="long" readonly="yes">
6048 <desc>Current operation progress value in percent.</desc>
6049 </attribute>
6050
6051 <method name="waitForCompletion">
6052 <desc>
6053 Waits until the task is done (including all operations) with a
6054 given timeout.
6055 </desc>
6056 <param name="timeout" type="long" dir="in">
6057 <desc>
6058 Timeout value in milliseconds.
6059 Specify -1 for an indefinite wait.
6060 </desc>
6061 </param>
6062 </method>
6063
6064 <method name="waitForOperationCompletion">
6065 <desc>
6066 Waits until the given operation is done with a given timeout.
6067 </desc>
6068 <param name="operation" type="unsigned long" dir="in">
6069 <desc>
6070 Number of the operation to wait for.
6071 Must be less than <link to="#operationCount"/>.
6072 </desc>
6073 </param>
6074 <param name="timeout" type="long" dir="in">
6075 <desc>
6076 Timeout value in milliseconds.
6077 Specify -1 for an indefinite wait.
6078 </desc>
6079 </param>
6080 </method>
6081
6082 <method name="cancel">
6083 <desc>
6084 Cancels the task.
6085 <note>
6086 If <link to="#cancelable"/> is <tt>false</tt>, then
6087 this method will fail.
6088 </note>
6089 </desc>
6090 </method>
6091
6092 </interface>
6093
6094
6095 <!--
6096 // ISnapshot
6097 /////////////////////////////////////////////////////////////////////////
6098 -->
6099
6100 <enumerator
6101 name="ISnapshotEnumerator" type="ISnapshot"
6102 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
6103 />
6104
6105 <collection
6106 name="ISnapshotCollection" type="ISnapshot"
6107 enumerator="ISnapshotEnumerator"
6108 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
6109 readonly="yes"
6110 />
6111
6112 <interface
6113 name="ISnapshot" extends="$unknown"
6114 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
6115 wsmap="managed"
6116 >
6117 <desc>
6118 The ISnapshot interface represents a snapshot of the virtual
6119 machine.
6120
6121 The <i>snapshot</i> stores all the information about a virtual
6122 machine necessary to bring it to exactly the same state as it was at
6123 the time of taking the snapshot. The snapshot includes:
6124
6125 <ul>
6126 <li>all settings of the virtual machine (i.e. its hardware
6127 configuration: RAM size, attached hard disks, etc.)
6128 </li>
6129 <li>the execution state of the virtual machine (memory contents,
6130 CPU state, etc.).
6131 </li>
6132 </ul>
6133
6134 Snapshots can be <i>offline</i> (taken when the VM is powered off)
6135 or <i>online</i> (taken when the VM is running). The execution
6136 state of the offline snapshot is called a <i>zero execution state</i>
6137 (it doesn't actually contain any information about memory contents
6138 or the CPU state, assuming that all hardware is just powered off).
6139
6140 <h3>Snapshot branches</h3>
6141
6142 Snapshots can be chained. Chained snapshots form a branch where
6143 every next snapshot is based on the previous one. This chaining is
6144 mostly related to hard disk branching (see <link to="IHardDisk2"/>
6145 description). This means that every time a new snapshot is created,
6146 a new differencing hard disk is implicitly created for all normal
6147 hard disks attached to the given virtual machine. This allows to
6148 fully restore hard disk contents when the machine is later reverted
6149 to a particular snapshot.
6150
6151 In the current implementation, multiple snapshot branches within one
6152 virtual machine are not allowed. Every machine has a single branch,
6153 and <link to="IConsole::takeSnapshot()"/> operation adds a new
6154 snapshot to the top of that branch.
6155
6156 Existing snapshots can be discarded using
6157 <link to="IConsole::discardSnapshot()"/>.
6158
6159 <h3>Current snapshot</h3>
6160
6161 Every virtual machine has a current snapshot, identified by
6162 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
6163 a base for the <i>current machine state</i> (see below), to the effect
6164 that all normal hard disks of the machine and its execution
6165 state are based on this snapshot.
6166
6167 In the current implementation, the current snapshot is always the
6168 last taken snapshot (i.e. the head snapshot on the branch) and it
6169 cannot be changed.
6170
6171 The current snapshot is <tt>null</tt> if the machine doesn't have
6172 snapshots at all; in this case the current machine state is just
6173 current settings of this machine plus its current execution state.
6174
6175 <h3>Current machine state</h3>
6176
6177 The current machine state is what represented by IMachine instances got
6178 directly from IVirtualBox
6179 using <link
6180 to="IVirtualBox::getMachine()">getMachine()</link>, <link
6181 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
6182 to instances returned by <link to="ISnapshot::machine"/>). This state
6183 is always used when the machine is <link to="IConsole::powerUp"> powered
6184 on</link>.
6185
6186 The current machine state also includes the current execution state.
6187 If the machine is being currently executed
6188 (<link to="IMachine::state"/> is <link to="MachineState::Running"/>
6189 and above), its execution state is just what's happening now.
6190 If it is powered off (<link to="MachineState::PoweredOff"/> or
6191 <link to="MachineState::Aborted"/>), it has a zero execution state.
6192 If the machine is saved (<link to="MachineState::Saved"/>), its
6193 execution state is what saved in the execution state file
6194 (<link to="IMachine::stateFilePath"/>).
6195
6196 If the machine is in the saved state, then, next time it is powered
6197 on, its execution state will be fully restored from the saved state
6198 file and the execution will continue from the point where the state
6199 was saved.
6200
6201 Similarly to snapshots, the current machine state can be discarded
6202 using <link to="IConsole::discardCurrentState()"/>.
6203
6204 <h3>Taking and discarding snapshots</h3>
6205
6206 The table below briefly explains the meaning of every snapshot
6207 operation:
6208
6209 <table>
6210 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
6211
6212 <tr><td><link to="IConsole::takeSnapshot()"/></td>
6213
6214 <td>Save the current state of the virtual machine, including all
6215 settings, contents of normal hard disks and the current modifications
6216 to immutable hard disks (for online snapshots)</td>
6217
6218 <td>The current state is not changed (the machine will continue
6219 execution if it is being executed when the snapshot is
6220 taken)</td></tr>
6221
6222 <tr><td><link to="IConsole::discardSnapshot()"/></td>
6223
6224 <td>Forget the state of the virtual machine stored in the snapshot:
6225 dismiss all saved settings and delete the saved execution state (for
6226 online snapshots)</td>
6227
6228 <td>Other snapshots (including child snapshots, if any) and the
6229 current state are not directly affected</td></tr>
6230
6231 <tr><td><link to="IConsole::discardCurrentState()"/></td>
6232
6233 <td>Restore the current state of the virtual machine from the state
6234 stored in the current snapshot, including all settings and hard disk
6235 contents</td>
6236
6237 <td>The current state of the machine existed prior to this operation
6238 is lost</td></tr>
6239
6240 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
6241
6242 <td>Completely revert the virtual machine to the state it was in
6243 before the current snapshot has been taken</td>
6244
6245 <td>The current state, as well as the current snapshot, are
6246 lost</td></tr>
6247
6248 </table>
6249
6250 </desc>
6251
6252 <attribute name="id" type="uuid" readonly="yes">
6253 <desc>UUID of the snapshot.</desc>
6254 </attribute>
6255
6256 <attribute name="name" type="wstring">
6257 <desc>Short name of the snapshot.</desc>
6258 </attribute>
6259
6260 <attribute name="description" type="wstring">
6261 <desc>Optional description of the snapshot.</desc>
6262 </attribute>
6263
6264 <attribute name="timeStamp" type="long long" readonly="yes">
6265 <desc>
6266 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
6267 </desc>
6268 </attribute>
6269
6270 <attribute name="online" type="boolean" readonly="yes">
6271 <desc>
6272 <tt>true</tt> if this snapshot is an online snapshot and
6273 <tt>false</tt> otherwise.
6274
6275 <note>
6276 When this attribute is <tt>true</tt>, the
6277 <link to="IMachine::stateFilePath"/> attribute of the
6278 <link to="#machine"/> object associated with this snapshot
6279 will point to the saved state file. Otherwise, it will be
6280 <tt>null</tt>.
6281 </note>
6282 </desc>
6283 </attribute>
6284
6285 <attribute name="machine" type="IMachine" readonly="yes">
6286 <desc>
6287 Virtual machine this snapshot is taken on. This object
6288 stores all settings the machine had when taking this snapshot.
6289 <note>
6290 The returned machine object is immutable, i.e. no
6291 any settings can be changed.
6292 </note>
6293 </desc>
6294 </attribute>
6295
6296 <attribute name="parent" type="ISnapshot" readonly="yes">
6297 <desc>
6298 Parent snapshot (a snapshot this one is based on).
6299 <note>
6300 It's not an error to read this attribute on a snapshot
6301 that doesn't have a parent -- a null object will be
6302 returned to indicate this.
6303 </note>
6304 </desc>
6305 </attribute>
6306
6307 <attribute name="children" type="ISnapshotCollection" readonly="yes">
6308 <desc>
6309 Child snapshots (all snapshots having this one as a parent).
6310 <note>
6311 In the current implementation, there can be only one
6312 child snapshot, or no children at all, meaning this is the
6313 last (head) snapshot.
6314 </note>
6315 </desc>
6316 </attribute>
6317
6318 </interface>
6319
6320
6321 <!--
6322 // IMedia
6323 /////////////////////////////////////////////////////////////////////////
6324 -->
6325
6326 <enum
6327 name="MediaState"
6328 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
6329 >
6330 <desc>
6331 Virtual media state.
6332 <see>IMedia</see>
6333 </desc>
6334
6335 <const name="NotCreated" value="0">
6336 <desc>
6337 Associated media storage does not exist (either was not created yet or
6338 was deleted).
6339 </desc>
6340 </const>
6341 <const name="Created" value="1">
6342 <desc>
6343 Associated storage exists and accessible.
6344 </desc>
6345 </const>
6346 <const name="LockedRead" value="2">
6347 <desc>
6348 Media is locked for reading, no data modification is possible.
6349 </desc>
6350 </const>
6351 <const name="LockedWrite" value="3">
6352 <desc>
6353 Media is locked for writing, no concurrent data reading or modification
6354 is possible.
6355 </desc>
6356 </const>
6357 <const name="Inaccessible" value="4">
6358 <desc>
6359 Associated media storage is not accessible.
6360 </desc>
6361 </const>
6362 <const name="Creating" value="5">
6363 <desc>
6364 Associated media storage is being created.
6365 </desc>
6366 </const>
6367 <const name="Deleting" value="6">
6368 <desc>
6369 Associated media storage is being deleted.
6370 </desc>
6371 </const>
6372 </enum>
6373
6374 <interface
6375 name="IMedium" extends="$unknown"
6376 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
6377 wsmap="managed"
6378 >
6379 <desc>
6380 The IMedium interface is a common interface for all objects representing
6381 virtual media such as hard disks, DVD images.
6382
6383 Each medium is associated with a storage unit (such as a file on the host
6384 computer or a network resource) that holds actual data. The location of
6385 the storage unit is represented by the #location attribute. The value of
6386 this attribute is media type dependent.
6387
6388 The exact media type may be determined by querying the appropriate
6389 interface such as:
6390 <ul>
6391 <li>IHardDisk2 (virtual hard disks)</li>
6392 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
6393 <li>IFloppyImage2 (raw floppy image files)</li>
6394 </ul>
6395
6396 Existing media are opened using the following methods, depending on the
6397 media type:
6398 <ul>
6399 <li><link to="IVirtualBox::openHardDisk2()"/></li>
6400 <li><link to="IVirtualBox::openDVDImage()"/></li>
6401 <li><link to="IVirtualBox::openFloppyImage()"/></li>
6402 </ul>
6403
6404 New hard disk media are created using the
6405 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
6406 images are created outside VirtualBox, usually by storing a copy
6407 of the real medium of the corresponding type in a regular file.
6408
6409 <h3>Known Media</h3>
6410
6411 When an existing medium gets opened for the first time, it gets
6412 automatically remembered by the given VirtualBox installation or, in other
6413 words, becomes a <i>known medium</i>. Known media are stored in the media
6414 registry transparently maintained by VirtualBox and stored in settings
6415 files so that this registry is preserved when VirtualBox is not running.
6416
6417 Newly created virtual hard disks get remembered only when the associated
6418 storage unit is actually created (see IHardDisk2 for more details).
6419
6420 All known media can be enumerated using
6421 <link to="IVirtualBox::hardDisks2"/>,
6422 <link to="IVirtualBox::DVDImages"/> and
6423 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
6424 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
6425 and similar methods or by location using
6426 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
6427
6428 Only known media can be attached to virtual machines.
6429
6430 Removing known media from the media registry is performed when the given
6431 medium is closed using the <link to="#close()"/> method or when its
6432 associated storage unit is deleted (only for hard disks).
6433
6434 <h3>Accessibility Checks</h3>
6435
6436 The given medium (with the created storage unit) is considered to be
6437 <i>accessible</i> when its storage unit can be successfully read from.
6438 Accessible media are indicated by the <link to="MediaState::Created"/>
6439 value of the <link to="#state"/> attribute. When the storage unit cannot
6440 be read (for example, because it is located on a disconnected network
6441 resource, or was accidentally deleted outside VirtualBox), the medium is
6442 considered to be <i>inaccessible</i> which is indicated by the
6443 <link to="MediaState::Inaccessible"/> state. The details about the reason
6444 of being inaccessible can be obtained using the
6445 <link to="#lastAccessError"/> attribute.
6446
6447 A new accessibility check is performed each time the <link to="#state"/>
6448 attribute is read. Please note that this check may take long time (several
6449 seconds or even minutes, depending on the storage unit location and
6450 format), and will block the calling thread until finished. For this
6451 reason, it is recommended to never read this attribute on the main UI
6452 thread to avoid making the UI unresponsive.
6453
6454 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
6455 created for the first time), all known media are in the
6456 <link to="MediaState::Inaccessible"/> state but the value of the <link
6457 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
6458 accessibility check is made on startup. This is done to make the
6459 VirtualBox object ready for serving requests as
6460 fast as possible and let the end-user application decide if it needs to
6461 check media accessibility right away or not.
6462 </desc>
6463
6464 <attribute name="id" type="uuid" readonly="yes">
6465 <desc>
6466 UUID of the medium. For a newly created medium, this value is a randomly
6467 generated UUID.
6468 </desc>
6469 </attribute>
6470
6471 <attribute name="description" type="wstring">
6472 <desc>
6473 Optional description of the medium. For newly created media, the value
6474 of this attribute value is <tt>null</tt>.
6475
6476 Media types that don't support this attribute will return E_NOTIMPL in
6477 attempt to get or set this attribute's value.
6478
6479 <note>
6480 For some storage types, reading this attribute may return an outdated
6481 (last known) value when <link to="#state"/> is <link
6482 to="MediaState::Inaccessible"/> or <link
6483 to="MediaState::LockedWrite"/> because the value of this attribute is
6484 stored within the storage unit itself. Also note that changing the
6485 attribute value is not possible in such case, as well as when the
6486 medium is the <link to="MediaState::LockedRead"/> state.
6487 </note>
6488 </desc>
6489 </attribute>
6490
6491 <attribute name="state" type="MediaState" readonly="yes">
6492 <desc>
6493 Current media state. Inspect <link to="MediaState"/> values for details.
6494
6495 Reading this attribute may take long time because a new accessibility
6496 check of the storage unit is performed every time the attribute is read.
6497 This check may cause a significant delay if the storage unit of the
6498 given medium is, for example, a file located on a network share which is
6499 not currently accessible due to connectivity problems -- the call will
6500 not return until a timeout interval defined by the host OS for this
6501 operation expires.
6502
6503 If the last known state of the medium is <link to="MediaState::Created"/>
6504 and the accessibility check fails then the state would be set to
6505 <link to="MediaState::Inaccessible"/> and <link to="#lastAccessError"/>
6506 may be used to get more details about the failure. If the state of the
6507 medium is <link to="MediaState::LockedRead"/> or
6508 <link to="MediaState::LockedWrite"/> then it remains the same, and a
6509 non-null value of <link to="#lastAccessError"/> will indicate a failed
6510 accessibility check in this case.
6511
6512 Note that not all media states are applicable to certain media types.
6513 For example, states <link to="MediaState::NotCreated"/>,
6514 <link to="MediaState::LockedWrite"/>, <link to="MediaState::Creating"/>,
6515 <link to="MediaState::Deleting"/> are meaningless for IDVDImage2 and
6516 IFloppyImage2 media.
6517 </desc>
6518 </attribute>
6519
6520 <attribute name="location" type="wstring">
6521 <desc>
6522 Location of the storage unit holding media data.
6523
6524 The format of the location string is media type specific. For media
6525 types that use regular files in a host's file system, the location
6526 string is just a full file name.
6527
6528 Some media types may support changing the storage unit location by
6529 simply changing the value of this property. If this operation is not
6530 supported, the implementation will return E_NOTIMPL in attempt to set
6531 this attribute's value.
6532
6533 When setting a value of the location attribute which is a regular file
6534 in the host's file system, the given file name may be either relative to
6535 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
6536 absolute. Note that if the given location specification does not contain
6537 the file extension part then a proper default extension will be
6538 automatically appended by the implementation depending on the media type.
6539 </desc>
6540 </attribute>
6541
6542 <attribute name="name" type="wstring" readonly="yes">
6543 <desc>
6544 Name of the storage unit holding media data.
6545
6546 The returned string is a short version of the <link to="#location"/>
6547 attribute that is suitable for representing the medium in situations
6548 where the full location specification is too long (such as lists
6549 and comboboxes in GUI frontends). This string is also used by frontends
6550 to sort the media list alphabetically when needed.
6551
6552 For example, for locations that are regular files in the host's file
6553 system, the value of this attribute is just a file name (+ extension),
6554 without the path specification.
6555
6556 Note that as opposed to the <link to="#location"/> attribute, the name
6557 attribute will not necessary be unique for a list of media of the
6558 given type and format.
6559 </desc>
6560 </attribute>
6561
6562 <attribute name="size" type="unsigned long long" readonly="yes">
6563 <desc>
6564 Physical size of the storage unit used to hold media data (in bytes).
6565
6566 <note>
6567 For media whose <link to="#state"/> is <link
6568 to="MediaState::Inaccessible"/>, the value of this property is the
6569 last known size. For <link to="MediaState::NotCreated"/> media,
6570 the returned value is zero.
6571 </note>
6572 </desc>
6573 </attribute>
6574
6575 <attribute name="lastAccessError" type="wstring" readonly="yes">
6576 <desc>
6577 Text message that represents the result of the last accessibility
6578 check.
6579
6580 Accessibility checks are performed each time the <link to="#state"/>
6581 attribute is read. A @c null string is returned if the last
6582 accessibility check was successful. A non-null string indicates a
6583 failure and should normally describe a reason of the failure (for
6584 example, a file read error).
6585 </desc>
6586 </attribute>
6587
6588 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
6589 <desc>
6590 Array of UUIDs of all machines this medium is attached to.
6591
6592 A <tt>null</tt> array is returned if this medium is not attached to any
6593 machine or to any machine's snapshot.
6594
6595 <note>
6596 The returned array will include a machine even if this medium is not
6597 attached to that machine in the current state but attached to it in
6598 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
6599 details.
6600 </note>
6601 </desc>
6602 </attribute>
6603
6604 <method name="getSnapshotIds">
6605 <desc>
6606 Returns an array of UUIDs of all snapshots of the given machine where
6607 this medium is attached to it.
6608
6609 If the medium is attached to the machine in the current state, then the
6610 first element in the array will always be the ID of the queried machine
6611 (i.e. the value equal to the @c machineId argument), followed by
6612 snapshot IDs (if any).
6613
6614 If the medium is not attached to the machine in the current state, then
6615 the array will contain only snapshot IDs.
6616
6617 The returned array may be <tt>null</tt> if this medium is not attached
6618 to the given machine at all, neither in the current state nor in one of
6619 snapshots.
6620 </desc>
6621 <param name="machineId" type="uuid" dir="in">
6622 <desc>
6623 UUID of the machine to query.
6624 </desc>
6625 </param>
6626 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
6627 <desc>
6628 Array of snapshot UUIDs of the given machine using this medium.
6629 </desc>
6630 </param>
6631 </method>
6632
6633 <method name="lockRead">
6634 <desc>
6635 Locks this medium for reading.
6636
6637 The read lock is shared: many clients can simultaneously lock the
6638 same media for reading unless it is already locked for writing (see
6639 <link to="#lockWrite()"/>) in which case an error is returned.
6640
6641 When the medium is locked for reading, it cannot be modified from within
6642 VirtualBox. This means that any method that changes the properties of
6643 this medium or contents of the storage unit will return an error (unless
6644 explicitly stated otherwise) and that an attempt to start a virtual
6645 machine that wants to modify the medium will also fail.
6646
6647 When the virtual machine is started up, it locks for reading all media
6648 it uses in read-only mode. If some media cannot be locked for reading,
6649 the startup procedure will fail.
6650
6651 The medium locked for reading must be unlocked using the
6652 <link to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/> can
6653 be nested and must be followed by the same number of paired
6654 <link to="#unlockRead()"/> calls.
6655
6656 This method sets the media state to <link to="MediaState::LockedRead"/>
6657 on success. The state prior to this call must be
6658 <link to="MediaState::Created"/>,
6659 <link to="MediaState::Inaccessible"/> or
6660 <link to="MediaState::LockedRead"/>. As you can see, inaccessible media
6661 can be locked too. This is not an error; this method performs a logical
6662 lock that prevents modifications of this media through the VirtualBox
6663 API, not a physical lock of the underlying storage unit.
6664
6665 Either on success or on failure, this method returns the current state
6666 of the medium <b>before</b> the operation.
6667 </desc>
6668 <param name="state" type="MediaState" dir="return">
6669 <desc>
6670 State of the medium after the operation.
6671 </desc>
6672 </param>
6673 </method>
6674
6675 <method name="unlockRead">
6676 <desc>
6677 Cancels the read lock previously set by <link to="#lockRead()"/>.
6678
6679 Either on success or on failure, this method returns the current state
6680 of the medium <b>after</b> the operation.
6681
6682 See <link to="#lockRead()"/> for more details.
6683 </desc>
6684 <param name="state" type="MediaState" dir="return">
6685 <desc>
6686 State of the medium after the operation.
6687 </desc>
6688 </param>
6689 </method>
6690
6691 <method name="lockWrite">
6692 <desc>
6693 Locks this medium for writing.
6694
6695 The write lock, as opposed to <link to="#lockRead()"/>, is exclusive:
6696 there may be only one client that holds a write lock and there may be no
6697 read locks while the write lock is held.
6698
6699 When the medium is locked for writing, it cannot be modified from within
6700 VirtualBox and it is not guaranteed that the values of its properties
6701 are up-to-date. Any method that changes the properties of this medium or
6702 contents of the storage unit will return an error ((unless explicitly
6703 stated otherwise) and an attempt to start a virtual machine that wants
6704 to modify or to read the medium will also fail.
6705
6706 When the virtual machine is started up, it locks for writing all media
6707 it uses to write data to. If some media cannot be locked for writing,
6708 the startup procedure will fail.
6709
6710 The medium locked for writing must be unlocked using the
6711 <link to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
6712 can <b>not</b> be nested and must be followed by a paired
6713 <link to="#unlockWrite()"/> call.
6714
6715 This method sets the media state to <link to="MediaState::LockedWrite"/>
6716 on success. The state prior to this call must be
6717 <link to="MediaState::Created"/> or
6718 <link to="MediaState::Inaccessible"/>. As you can see, inaccessible media
6719 can be locked too. This is not an error; this method performs a logical
6720 lock that prevents modifications of this media through the VirtualBox
6721 API, not a physical lock of the underlying storage unit.
6722
6723 Either on success or on failure, this method returns the current state
6724 of the medium <b>before</b> the operation.
6725 </desc>
6726 <param name="state" type="MediaState" dir="return">
6727 <desc>
6728 State of the medium after the operation.
6729 </desc>
6730 </param>
6731 </method>
6732
6733 <method name="unlockWrite">
6734 <desc>
6735 Cancels the write lock previously set by <link to="#lockWrite()"/>.
6736
6737 Either on success or on failure, this method returns the current state
6738 of the medium <b>after</b> the operation.
6739
6740 See <link to="#lockWrite()"/> for more details.
6741 </desc>
6742 <param name="state" type="MediaState" dir="return">
6743 <desc>
6744 State of the medium after the operation.
6745 </desc>
6746 </param>
6747 </method>
6748
6749 <method name="close">
6750 <desc>
6751 Closes this media.
6752
6753 The hard disk must not be attached to any known virtual machine and must
6754 not have any known child hard disks, otherwise the operation will fail.
6755
6756 When the hard disk is successfully closed, it gets removed from the list
6757 of remembered hard disks, but its storage unit is not deleted. In
6758 particular, this means that this hard disk can be later opened again
6759 using the <link to="IVirtualBox::openHardDisk2"/> call.
6760
6761 Note that after this method successfully returns, the given hard disk
6762 object becomes uninitialized. This means that any attempt to call any of
6763 its methods or attributes will fail with the <tt>"Object not ready"
6764 (E_ACCESSDENIED)</tt> error.
6765 </desc>
6766 </method>
6767
6768 </interface>
6769
6770
6771 <!--
6772 // IHardDisk2
6773 /////////////////////////////////////////////////////////////////////////
6774 -->
6775
6776 <enum
6777 name="HardDiskType"
6778 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
6779 >
6780 <desc>
6781 Virtual hard disk type.
6782 <see>IHardDisk</see>
6783 </desc>
6784
6785 <const name="Normal" value="0">
6786 <desc>
6787 Normal hard disk (attached directly or indirectly, preserved
6788 when taking snapshots).
6789 </desc>
6790 </const>
6791 <const name="Immutable" value="1">
6792 <desc>
6793 Immutable hard disk (attached indirectly, changes are wiped out
6794 after powering off the virtual machine).
6795 </desc>
6796 </const>
6797 <const name="Writethrough" value="2">
6798 <desc>
6799 Write through hard disk (attached directly, ignored when
6800 taking snapshots).
6801 </desc>
6802 </const>
6803 </enum>
6804
6805 <interface
6806 name="IHardDisk2Attachment" extends="$unknown"
6807 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
6808 wsmap="struct"
6809 >
6810 <desc>
6811 The IHardDisk2Attachment interface represents a hard disk attachment of a
6812 virtual machine.
6813
6814 Every hard disk attachment specifies a slot of the virtual hard disk
6815 controller and a virtual hard disk attached to this slot.
6816
6817 The array of hard disk attachments is returned by
6818 <link to="IMachine::hardDisk2Attachments"/>.
6819
6820 <note>
6821 With the COM API, this is an interface like all the others. With the
6822 webservice, this is mapped to a structure, so querying the attribute
6823 will not return an object, but a complete structure.
6824 </note>
6825 </desc>
6826 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
6827 <desc>Hard disk object associated with this attachment.</desc>
6828 </attribute>
6829
6830 <attribute name="bus" type="StorageBus" readonly="yes">
6831 <desc>Interface bus of this attachment.</desc>
6832 </attribute>
6833
6834 <attribute name="channel" type="long" readonly="yes">
6835 <desc>Channel number of this attachment.</desc>
6836 </attribute>
6837
6838 <attribute name="device" type="long" readonly="yes">
6839 <desc>Device slot number of this attachment.</desc>
6840 </attribute>
6841
6842 </interface>
6843
6844 <interface
6845 name="IHardDisk2" extends="IMedium"
6846 uuid="4fece1c1-2a75-43ce-ba82-76d2a89b9d5d"
6847 wsmap="managed"
6848 >
6849 <desc>
6850 The IHardDisk2 interface represents a virtual hard disk drive
6851 used by a virtual machine.
6852
6853 Virtual hard disk objects virtualize the hard disk hardware and look like
6854 regular hard disks for the guest OS running inside the virtual machine.
6855
6856 <h3>Hard Disk Types</h3>
6857
6858 There are three types of hard disks:
6859 <link to="HardDiskType::Normal">Normal</link>,
6860 <link to="HardDiskType::Immutable">Immutable</link> and
6861 <link to="HardDiskType::Writethrough">Writethrough</link>. The type of the
6862 hard disk defines how the hard disk is attached to a virtual machine and
6863 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
6864 machine with the attached hard disk is taken. The type of the hard disk is
6865 defined by the <link to="#type"/> attribute.
6866
6867 All hard disks can be also divided in two big groups: <i>base</i> hard
6868 disks and <i>differencing</i> hard disks. A base hard disk contains all
6869 sectors of the hard disk data in its storage unit and therefore can be
6870 used independently. On the contrary, a differencing hard disk contains
6871 only some part of the hard disk data (a subset of sectors) and needs
6872 another hard disk to get access to the missing sectors of data. This
6873 another hard disk is called a <i>parent</i> hard disk and defines a hard
6874 disk to which this differencing hard disk is known to be <i>linked to</i>.
6875 The parent hard disk may be itself a differencing hard disk. This
6876 way, differencing hard disks form a linked hard disk chain. This chain
6877 always ends with the base hard disk which is sometimes referred to as the
6878 root hard disk of this chain. Note that several differencing hard disks
6879 may be linked to the same parent hard disk. This way, all known hard disks
6880 form a hard disk tree which is based on their parent-child relationship.
6881
6882 Differencing hard disks can be distinguished from base hard disks by
6883 querying the <link to="#parent"/> attribute: base hard disks do not have
6884 parents they would depend on, so the value of this attribute is always
6885 <tt>null</tt> for them. Using this attribute, it is possible to walk up
6886 the hard disk tree (from the child hard disk to its parent). It is also
6887 possible to walk down the tree using the <link to="#children"/>
6888 attribute.
6889
6890 Note that the type of all differencing hard disks is
6891 <link to="HardDiskType::Normal">Normal</link>; all other values are
6892 meaningless for them. Base hard disks may be of any type.
6893
6894 <h3>Creating Hard Disks</h3>
6895
6896 New base hard disks are created using
6897 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
6898 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
6899 disks are usually implicitly created by VirtualBox when needed but may
6900 also be created explicitly using <link to="#createDiffStorage()"/>.
6901
6902 After the hard disk is successfully created (including the storage unit)
6903 or opened, it becomes a known hard disk (remembered in the internal media
6904 registry). Known hard disks can be attached to a virtual machine, accessed
6905 through <link to="IVirtualBox::getHardDisk2()"/> and
6906 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
6907 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
6908
6909 The following methods, besides <link to="IMedium::close()"/>,
6910 automatically remove the hard disk from the media registry:
6911 <ul>
6912 <li><link to="#deleteStorage()"/></li>
6913 <li><link to="#mergeTo()"/></li>
6914 </ul>
6915
6916 If the storage unit of the hard disk is a regular file in the host's
6917 file system then the rules stated in the description of the
6918 <link to="IMedium::location"/> attribute apply when setting its value. In
6919 addition, a plain file name without any path may be given, in which case
6920 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
6921 folder</link> will be prepended to it.
6922
6923 <h4>Automatic composition of the file name part</h4>
6924
6925 Another extension to the <link to="IMedium::location"/> attribute is that
6926 there is a possibility to cause VirtualBox to compose a unique value for
6927 the file name part of the location using the UUID of the hard disk. This
6928 applies only to hard disks in <link to="MediaState::NotCreated"/> state,
6929 e.g. before the storage unit is created, and works as follows. You set the
6930 value of the <link to="IMedium::location"/> attribute to a location
6931 specification which only contains the path specification but not the file
6932 name part and ends with either a forward slash or a backslash character.
6933 In response, VirtualBox will generate a new UUID for the hard disk and
6934 compose the file name using the following pattern:
6935 <pre>
6936 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
6937 </pre>
6938 where <tt>&lt;path&gt;</tt> is the supplied path specification,
6939 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
6940 is the default extension for the storage format of this hard disk. After
6941 that, you may call any of the methods that create a new hard disk storage
6942 unit and they will use the generated UUID and file name.
6943
6944 <h3>Attaching Hard Disks</h3>
6945
6946 Hard disks are attached to virtual machines using the
6947 <link to="IMachine::attachHardDisk2()"/> method and detached using the
6948 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
6949 <link to="#type"/>, hard disks are attached either
6950 <i>directly</i> or <i>indirectly</i>.
6951
6952 When a hard disk is being attached directly, it is associated with the
6953 virtual machine and used for hard disk operations when the machine is
6954 running. When a hard disk is being attached indirectly, a new differencing
6955 hard disk linked to it is implicitly created and this differencing hard
6956 disk is associated with the machine and used for hard disk operations.
6957 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
6958 a direct attachment then the same hard disk will be returned in response
6959 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
6960 an indirect attachment is performed then
6961 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
6962 differencing hard disk, not the original one passed to <link
6963 to="IMachine::attachHardDisk2()"/>. The following table shows the
6964 dependency of the attachment type on the hard disk type:
6965
6966 <table>
6967 <tr>
6968 <th>Hard Disk Type</th>
6969 <th>Direct or Indirect?</th>
6970 </tr>
6971 <tr>
6972 <td>Normal (Base)</td>
6973 <td>
6974 Normal base hard disks that do not have children (i.e. differencing
6975 hard disks linked to them) and that are not already attached to
6976 virtual machines in snapshots are attached <b>directly</b>.
6977 Otherwise, they are attached <b>indirectly</b> because having
6978 dependent children or being part of the snapshot makes it impossible
6979 to modify hard disk contents without breaking the integrity of the
6980 dependent party. The <link to="#readOnly"/> attribute allows to
6981 quickly determine the kind of the attachment for the given hard
6982 disk. Note that if a normal base hard disk is to be indirectly
6983 attached to a virtual machine with snapshots then a special
6984 procedure called <i>smart attachment</i> is performed (see below).
6985 </td>
6986 </tr>
6987 <tr>
6988 <td>Normal (Differencing)</td>
6989 <td>
6990 Differencing hard disks are like normal base hard disks: attached
6991 <b>directly</b> if they do not have children and are not attached to
6992 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
6993 that the smart attachment procedure is never performed for
6994 differencing hard disks.
6995 </td>
6996 </tr>
6997 <tr>
6998 <td>Immutable</td>
6999 <td>
7000 Immutable hard disks are always attached <b>indirectly</b> because
7001 they are designed to be non-writable. If an immutable hard disk is
7002 attached to a virtual machine with snapshots then a special
7003 procedure called smart attachment is performed (see below).
7004 </td>
7005 </tr>
7006 <tr>
7007 <td>Writethrough</td>
7008 <td>
7009 Writethrough hard disks are always attached <b>directly</b>, also as
7010 designed. This also means that writethrough hard disks cannot have
7011 other hard disks linked to them at all.
7012 </td>
7013 </tr>
7014 </table>
7015
7016 Note that the same hard disk, regardless of its type, may be attached to
7017 more than one virtual machine at a time. In this case, the machine that is
7018 started first gains exclusive access to the hard disk and attempts to
7019 start other machines having this hard disk attached will fail until the
7020 first machine is powered down.
7021
7022 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
7023 that the given hard disk remains associated with the given machine after a
7024 successful <link to="IMachine::detachHardDisk2()"/> call until
7025 <link to="IMachine::saveSettings()"/> is called to save all changes to
7026 machine settings to disk. This deferring is necessary to guarantee that
7027 the hard disk configuration may be restored at any time by a call to
7028 <link to="IMachine::discardSettings()"/> before the settings
7029 are saved (committed).
7030
7031 Note that if <link to="IMachine::discardSettings()"/> is called after
7032 indirectly attaching some hard disks to the machine but before a call to
7033 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
7034 all differencing hard disks implicitly created by
7035 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
7036 Such implicitly created hard disks will also be immediately deleted when
7037 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
7038 call if it is made before <link to="IMachine::saveSettings()"/>. This
7039 implicit deletion is safe because newly created differencing hard
7040 disks do not contain any user data.
7041
7042 However, keep in mind that detaching differencing hard disks that were
7043 implicitly created by <link to="IMachine::attachHardDisk2()"/>
7044 before the last <link to="IMachine::saveSettings()"/> call will
7045 <b>not</b> implicitly delete them as they may already contain some data
7046 (for example, as a result of virtual machine execution). If these hard
7047 disks are no more necessary, the caller can always delete them explicitly
7048 using <link to="#deleteStorage()"/> after they are actually de-associated
7049 from this machine by the <link to="IMachine::saveSettings()"/> call.
7050
7051 <h3>Smart Attachment</h3>
7052
7053 When normal base or immutable hard disks are indirectly attached to a
7054 virtual machine then some additional steps are performed to make sure the
7055 virtual machine will have the most recent "view" of the hard disk being
7056 attached. These steps include walking through the machine's snapshots
7057 starting from the current one and going through ancestors up to the first
7058 snapshot. Hard disks attached to the virtual machine in all
7059 of the encountered snapshots are checked whether they are descendants of
7060 the given normal base or immutable hard disk. The first found child (which
7061 is the differencing hard disk) will be used instead of the normal base or
7062 immutable hard disk as a parent for creating a new differencing hard disk
7063 that will be actually attached to the machine. And only if no descendants
7064 are found or if the virtual machine does not have any snapshots then the
7065 normal base or immutable hard disk will be used itself as a parent for
7066 this differencing hard disk.
7067
7068 It is easier to explain what smart attachment does using the
7069 following example:
7070 <pre>
7071BEFORE attaching B.vdi: AFTER attaching B.vdi:
7072
7073Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
7074 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
7075 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
7076 Snapshot 4 (none) Snapshot 4 (none)
7077 CurState (none) CurState (D3->D2.vdi)
7078
7079 NOT
7080 ...
7081 CurState (D3->B.vdi)
7082 </pre>
7083 The first column is the virtual machine configuration before the base hard
7084 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
7085 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
7086 mean that the hard disk that is actually attached to the machine is a
7087 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
7088 another hard disk, <tt>B.vdi</tt>.
7089
7090 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
7091 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
7092 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
7093 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
7094 it cannot be attached directly and needs an indirect attachment (i.e.
7095 implicit creation of a new differencing hard disk). Due to the smart
7096 attachment procedure, the new differencing hard disk
7097 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
7098 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
7099 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
7100 machine.
7101
7102 Note that if there is more than one descendant hard disk of the given base
7103 hard disk found in a snapshot, and there is an exact device, channel and
7104 bus match, then this exact match will be used. Otherwise, the youngest
7105 descendant will be picked up.
7106
7107 There is one more important aspect of the smart attachment procedure which
7108 is not related to snapshots at all. Before walking through the snapshots
7109 as described above, the backup copy of the current list of hard disk
7110 attachment is searched for descendants. This backup copy is created when
7111 the hard disk configuration is changed for the first time after the last
7112 <link to="IMachine::saveSettings()"/> call and used by
7113 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
7114 changes. When such a descendant is found in this backup copy, it will be
7115 simply re-attached back, without creating a new differencing hard disk for
7116 it. This optimization is necessary to make it possible to re-attach the
7117 base or immutable hard disk to a different bus, channel or device slot
7118 without losing the contents of the differencing hard disk actually
7119 attached to the machine in place of it.
7120 </desc>
7121
7122 <attribute name="format" type="wstring" readonly="yes">
7123 <desc>
7124 Storage format of this hard disk.
7125
7126 The value of this attribute is a string that specifies a backend used to
7127 store hard disk data. The storage format is defined when you create a
7128 new hard disk or automatically detected when you open an existing hard
7129 disk medium, and cannot be changed later.
7130
7131 The list of all storage formats supported by this VirtualBox
7132 installation can be obtained using
7133 <link to="ISystemProperties::hardDiskFormats"/>.
7134 </desc>
7135 </attribute>
7136
7137 <attribute name="type" type="HardDiskType">
7138 <desc>
7139 Type (role) of this hard disk.
7140
7141 The following constraints apply when changing the value of this
7142 attribute:
7143 <ul>
7144 <li>If a hard disk is attached to a virtual machine (either in the
7145 current state or in one of the snapshots), its type cannot be
7146 changed.
7147 </li>
7148 <li>As long as the hard disk has children, its type cannot be set
7149 to <link to="HardDiskType::Writethrough"/>.
7150 </li>
7151 <li>The type of all differencing hard disks is
7152 <link to="HardDiskType::Normal"/> and cannot be changed.
7153 </li>
7154 </ul>
7155
7156 The type of a newly created or opened hard disk is set to
7157 <link to="HardDiskType::Normal"/>.
7158 </desc>
7159 </attribute>
7160
7161 <attribute name="parent" type="IHardDisk2" readonly="yes">
7162 <desc>
7163 Parent of this hard disk (a hard disk this hard disk is directly based
7164 on).
7165
7166 Only differencing hard disks have parents. For base (non-differencing)
7167 hard disks, <tt>null</tt> is returned.
7168 </desc>
7169 </attribute>
7170
7171 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
7172 <desc>
7173 Children of this hard disk (all differencing hard disks directly based
7174 on this hard disk). A <tt>null</tt> array is returned if this hard disk
7175 does not have any children.
7176 </desc>
7177 </attribute>
7178
7179 <attribute name="root" type="IHardDisk2" readonly="yes">
7180 <desc>
7181 Root hard disk of this hard disk.
7182
7183 If this is a differencing hard disk, its root hard disk is the base hard
7184 disk the given hard disk branch starts from. For all other types of hard
7185 disks, this property returns the hard disk object itself (i.e. the same
7186 object this property is read on).
7187 </desc>
7188 </attribute>
7189
7190 <attribute name="readOnly" type="boolean" readonly="yes">
7191 <desc>
7192 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
7193 otherwise.
7194
7195 A hard disk is considered to be read-only when its contents cannot be
7196 modified without breaking the integrity of other parties that depend on
7197 this hard disk such as its child hard disks or snapshots of virtual
7198 machines where this hard disk is attached to these machines. If there
7199 are no children and no such snapshots then there is no dependency and
7200 the hard disk is not read-only.
7201
7202 The value of this attribute can be used to determine the kind of the
7203 attachment that will take place when attaching this hard disk to a
7204 virtual machine. If the value is <tt>false</tt> then the hard disk will
7205 be attached directly. If the value is <tt>true</tt> then the hard disk
7206 will be attached indirectly by creating a new differencing child hard
7207 disk for that. See the interface description for more information.
7208
7209 Note that all <link to="HardDiskType::Immutable">Immutable</link> hard
7210 disks are always read-only while all
7211 <link to="HardDiskType::Writethrough">Writethrough</link> hard disks are
7212 always not.
7213
7214 <note>
7215 The read-only condition represented by this attribute is related to
7216 the hard disk type and usage, not to the current
7217 <link to="IMedium::state">media state</link> and not to the read-only
7218 state of the storage unit.
7219 </note>
7220 </desc>
7221 </attribute>
7222
7223 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
7224 <desc>
7225 Logical size of this hard disk (in megabytes), as reported to the
7226 guest OS running inside the virtual machine this disk is
7227 attached to. The logical size is defined when the hard disk is created
7228 and cannot be changed later.
7229
7230 <note>
7231 Reading this property on a differencing hard disk will return the size
7232 of its <link to="#root"/> hard disk.
7233 </note>
7234 <note>
7235 For hard disks whose state is <link to="#state"/> is <link
7236 to="MediaState::Inaccessible"/>, the value of this property is the
7237 last known logical size. For <link to="MediaState::NotCreated"/> hard
7238 disks, the returned value is zero.
7239 </note>
7240 </desc>
7241 </attribute>
7242
7243 <!-- storage methods -->
7244
7245 <method name="getProperty">
7246 <desc>
7247 Returns the value of the custom hard disk property with the given name.
7248
7249 The list of all properties supported by the given hard disk format can
7250 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7251
7252 Note that if this method returns a <tt>null</tt> @a value, the requested
7253 property is supported but currently not assigned any value.
7254
7255 <result name="VBOX_E_OBJECT_NOT_FOUND">
7256 Requested property does not exist (not supported by the format).
7257 </result>
7258 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
7259 </desc>
7260 <param name="name" type="wstring" dir="in">
7261 <desc>Name of the property to get.</desc>
7262 </param>
7263 <param name="value" type="wstring" dir="return">
7264 <desc>Current property value.</desc>
7265 </param>
7266 </method>
7267
7268 <method name="setProperty">
7269 <desc>
7270 Sets the value of the custom hard disk property with the given name.
7271
7272 The list of all properties supported by the given hard disk format can
7273 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7274
7275 Note that passing <tt>null</tt> as @a value will reset the value of the
7276 property to nothing which may also be understood as deleting the
7277 property's value. For properties with no values, the format backend will
7278 use a default value if such a value is defined for the given property.
7279
7280 <result name="VBOX_E_OBJECT_NOT_FOUND">
7281 Requested property does not exist (not supported by the format).
7282 </result>
7283 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
7284 </desc>
7285 <param name="name" type="wstring" dir="in">
7286 <desc>Name of the property to set.</desc>
7287 </param>
7288 <param name="value" type="wstring" dir="in">
7289 <desc>Property value to set.</desc>
7290 </param>
7291 </method>
7292
7293 <method name="getProperties">
7294 <desc>
7295 Returns values for a group of properties in one call.
7296
7297 The names of the properties to get are specified using the @a names
7298 argument which is a list of comma-separated property names or
7299 <tt>null</tt> if all properties are to be returned. Note that currently
7300 the value of this argument is ignored and the method always returns all
7301 existing properties.
7302
7303 The list of all properties supported by the given hard disk format can
7304 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
7305
7306 The method returns two arrays, the array of property names corresponding
7307 to the @a names argument and the current values of these properties.
7308 <!-- FIXME: Both arrays [sentence was cut off here. Complete. -->
7309
7310 Note that for properties that don't have values assigned to them,
7311 <tt>null</tt> is returned at the appropriate index in the @a returnValues
7312 array.
7313
7314 </desc>
7315 <param name="names" type="wstring" dir="in">
7316 <desc>
7317 Names of properties to get.
7318 </desc>
7319 </param>
7320 <param name="returnNames" type="wstring" safearray="yes" dir="out">
7321 <desc>Names of returned properties.</desc>
7322 </param>
7323 <param name="returnValues" type="wstring" safearray="yes" dir="return">
7324 <desc>Values of returned properties.</desc>
7325 </param>
7326 </method>
7327
7328 <!-- storage methods -->
7329
7330 <method name="createDynamicStorage">
7331 <desc>
7332 Starts creating a dynamically expanding hard disk storage unit in the
7333 background. The previous storage unit created for this object, if
7334 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
7335 the operation will fail.
7336
7337 Before the operation starts, the hard disk is placed in
7338 <link to="MediaState::Creating"/> state. If the create operation
7339 fails, the media will be placed back in <link to="MediaState::NotCreated"/>
7340 state.
7341
7342 After the returned progress object reports that the operation has
7343 successfully completed, the media state will be set to <link
7344 to="MediaState::Created"/>, the hard disk will be remembered by this
7345 VirtualBox installation and may be attached to virtual machines.
7346 </desc>
7347 <param name="logicalSize" type="unsigned long long" dir="in">
7348 <desc>Maximum logical size of the hard disk in megabytes.</desc>
7349 </param>
7350 <param name="progress" type="IProgress" dir="return">
7351 <desc>Progress object to track the operation completion.</desc>
7352 </param>
7353 </method>
7354
7355 <method name="createFixedStorage">
7356 <desc>
7357 Starts creating a fixed-size hard disk storage unit in the background.
7358 The previous storage unit created for this object, if
7359 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
7360 the operation will fail.
7361
7362 Before the operation starts, the hard disk is placed to
7363 <link to="MediaState::Creating"/> state. If the create operation
7364 fails, the media will placed back to <link to="MediaState::NotCreated"/>
7365 state.
7366
7367 After the returned progress object reports that the operation is
7368 successfully complete, the media state will be set to <link
7369 to="MediaState::Created"/>, the hard disk will be remembered by this
7370 VirtualBox installation and may be attached to virtual machines.
7371 </desc>
7372 <param name="logicalSize" type="unsigned long long" dir="in">
7373 <desc>Logical size of the hard disk in megabytes.</desc>
7374 </param>
7375 <param name="progress" type="IProgress" dir="return">
7376 <desc>Progress object to track the operation completion.</desc>
7377 </param>
7378 </method>
7379
7380 <method name="deleteStorage">
7381 <desc>
7382 Starts deleting the storage unit of this hard disk.
7383
7384 The hard disk must not be attached to any known virtual machine and must
7385 not have any known child hard disks, otherwise the operation will fail.
7386 It will also fail if there is no storage unit to delete or if deletion
7387 is already in progress, or if the hard disk is being in use (locked for
7388 read or for write) or inaccessible. Therefore, the only valid state for
7389 this operation to succeed is <link to="MediaState::Created"/>.
7390
7391 Before the operation starts, the hard disk is placed to
7392 <link to="MediaState::Deleting"/> state and gets removed from the list
7393 of remembered hard disks (media registry). If the delete operation
7394 fails, the media will be remembered again and placed back to
7395 <link to="MediaState::Created"/> state.
7396
7397 After the returned progress object reports that the operation is
7398 complete, the media state will be set to
7399 <link to="MediaState::NotCreated"/> and you will be able to use one of
7400 the storage creation methods to create it again.
7401
7402 <see>#close()</see>
7403
7404 <result name="VBOX_E_OBJECT_IN_USE">
7405 Hard disk is attached to a virtual machine.
7406 </result>
7407 </desc>
7408 <param name="progress" type="IProgress" dir="return">
7409 <desc>Progress object to track the operation completion.</desc>
7410 </param>
7411 </method>
7412
7413 <!-- diff methods -->
7414
7415 <method name="createDiffStorage">
7416 <desc>
7417 Starts creating an empty differencing storage unit based on this hard
7418 disk in the format and at the location defined by the @a target
7419 argument.
7420
7421 The target hard disk must be in <link to="MediaState::NotCreated"/>
7422 state (i.e. must not have an existing storage unit). Upon successful
7423 completion, this operation will set the type of the target hard disk to
7424 <link to="HardDiskType::Normal"/> and create a storage unit necessary to
7425 represent the differencing hard disk data in the given format (according
7426 to the storage format of the target object).
7427
7428 After the returned progress object reports that the operation is
7429 successfully complete, the target hard disk gets remembered by this
7430 VirtualBox installation and may be attached to virtual machines.
7431
7432 <note>
7433 The hard disk will be set to <link to="MediaState::LockedRead"/>
7434 state for the duration of this operation.
7435 </note>
7436 <result name="VBOX_E_OBJECT_IN_USE">
7437 Hard disk not in NotCreated state.
7438 </result>
7439 </desc>
7440 <param name="target" type="IHardDisk2" dir="in">
7441 <desc>Target hard disk.</desc>
7442 </param>
7443 <param name="progress" type="IProgress" dir="return">
7444 <desc>Progress object to track the operation completion.</desc>
7445 </param>
7446 </method>
7447
7448 <method name="mergeTo">
7449 <desc>
7450 Starts merging the contents of this hard disk and all intermediate
7451 differencing hard disks in the chain to the given target hard disk.
7452
7453 The target hard disk must be either a descendant of this hard disk or
7454 its ancestor (otherwise this method will immediately return a failure).
7455 It follows that there are two logical directions of the merge operation:
7456 from ancestor to descendant (<i>forward merge</i>) and from descendant to
7457 ancestor (<i>backward merge</i>). Let us consider the following hard disk
7458 chain:
7459
7460 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
7461
7462 Here, calling this method on the <tt>Base</tt> hard disk object with
7463 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
7464 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
7465 merge. Note that in both cases the contents of the resulting hard disk
7466 will be the same, the only difference is the hard disk object that takes
7467 the result of the merge operation. In case of the forward merge in the
7468 above example, the result will be written to <tt>Diff_2</tt>; in case of
7469 the backward merge, the result will be written to <tt>Base</tt>. In
7470 other words, the result of the operation is always stored in the target
7471 hard disk.
7472
7473 Upon successful operation completion, the storage units of all hard
7474 disks in the chain between this (source) hard disk and the target hard
7475 disk, including the source hard disk itself, will be automatically
7476 deleted and the relevant hard disk objects (including this hard disk)
7477 will become uninitialized. This means that any attempt to call any of
7478 their methods or attributes will fail with the
7479 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
7480 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
7481 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
7482 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
7483 disk itself since it will no longer be based on any other hard disk.
7484
7485 Considering the above, all of the following conditions must be met in
7486 order for the merge operation to succeed:
7487 <ul>
7488 <li>
7489 Neither this (source) hard disk nor any intermediate
7490 differencing hard disk in the chain between it and the target
7491 hard disk is attached to any virtual machine.
7492 </li>
7493 <li>
7494 Neither the source hard disk nor the target hard disk is an
7495 <link to="HardDiskType::Immutable"/> hard disk.
7496 </li>
7497 <li>
7498 The part of the hard disk tree from the source hard disk to the
7499 target hard disk is a linear chain, i.e. all hard disks in this
7500 chain have exactly one child which is the next hard disk in this
7501 chain. The only exception from this rule is the target hard disk in
7502 the forward merge operation; it is allowed to have any number of
7503 child hard disks because the merge operation will hot change its
7504 logical contents (as it is seen by the guest OS or by children).
7505 </li>
7506 <li>
7507 None of the involved hard disks are in
7508 <link to="MediaState::LockedRead"/> or
7509 <link to="MediaState::LockedWrite"/> state.
7510 </li>
7511 </ul>
7512
7513 <note>
7514 This (source) hard disk and all intermediates will be placed to <link
7515 to="MediaState::Deleting"/> state and the target hard disk will be
7516 placed to <link to="MediaState::LockedWrite"/> state and for the
7517 duration of this operation.
7518 </note>
7519 </desc>
7520 <param name="targetId" type="uuid" dir="in">
7521 <desc>UUID of the target ancestor or descendant hard disk.</desc>
7522 </param>
7523 <param name="progress" type="IProgress" dir="return">
7524 <desc>Progress object to track the operation completion.</desc>
7525 </param>
7526 </method>
7527
7528 <!-- clone methods -->
7529
7530 <method name="cloneTo">
7531 <desc>
7532 Starts creating a clone of this hard disk in the format and at the
7533 location defined by the @a target argument.
7534
7535 The target hard disk must be in <link to="MediaState::NotCreated"/>
7536 state (i.e. must not have an existing storage unit). Upon successful
7537 completion, the cloned hard disk will contain exactly the same sector
7538 data as the hard disk being cloned, except that a new UUID for the clone
7539 will be randomly generated.
7540
7541 After the returned progress object reports that the operation is
7542 successfully complete, the target hard disk gets remembered by this
7543 VirtualBox installation and may be attached to virtual machines.
7544
7545 <note>
7546 If the cloned hard disk is a differencing hard disk, it will inherit
7547 parent dependency of the original hard disk.
7548 </note>
7549 <note>
7550 This hard disk will be placed to <link to="MediaState::LockedRead"/>
7551 state for the duration of this operation.
7552 </note>
7553 </desc>
7554 <param name="target" type="IHardDisk2" dir="in">
7555 <desc>Target hard disk.</desc>
7556 </param>
7557 <param name="progress" type="IProgress" dir="return">
7558 <desc>Progress object to track the operation completion.</desc>
7559 </param>
7560 </method>
7561
7562 <method name="flattenTo">
7563 <desc>
7564 Starts creating a deep (independent) clone of this hard disk in the
7565 format and at the location defined by the @a target argument.
7566
7567 This operation is similar to <link to="#cloneTo()"/> except that when
7568 applied to a differencing hard disk, it will also copy missing hard disk
7569 data from all parent hard disks it is linked to. This will make the
7570 created clone an independent base hard disk that contains all hard disk
7571 data and does not need any other hard disks to operate.
7572
7573 After the returned progress object reports that the operation is
7574 successfully complete, the target hard disk gets remembered by this
7575 VirtualBox installation and may be attached to virtual machines.
7576
7577 <note>
7578 For base hard disks, this operation is identical to
7579 <link to="#cloneTo()"/>.
7580 </note>
7581 <note>
7582 This hard disk and all its parent hard disks will be placed to <link
7583 to="MediaState::LockedRead"/> state for the duration of this
7584 operation.
7585 </note>
7586 </desc>
7587 <param name="target" type="IHardDisk2" dir="in">
7588 <desc>Target hard disk.</desc>
7589 </param>
7590 <param name="progress" type="IProgress" dir="return">
7591 <desc>Progress object to track the operation completion.</desc>
7592 </param>
7593 </method>
7594
7595 </interface>
7596
7597
7598 <!--
7599 // IHardDiskFormat
7600 /////////////////////////////////////////////////////////////////////////
7601 -->
7602
7603 <enum
7604 name="DataType"
7605 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
7606 >
7607 <const name="Int32" value="0"/>
7608 <const name="Int8" value="1"/>
7609 <const name="String" value="2"/>
7610 </enum>
7611
7612 <enum
7613 name="DataFlags"
7614 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
7615 >
7616 <const name="None" value="0x00"/>
7617 <const name="Mandatory" value="0x01"/>
7618 <const name="Expert" value="0x02"/>
7619 <const name="Array" value="0x04"/>
7620 <const name="FlagMask" value="0x07"/>
7621 </enum>
7622
7623 <enum
7624 name="HardDiskFormatCapabilities"
7625 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
7626 >
7627 <desc>
7628 Hard disk format capability flags.
7629 </desc>
7630
7631 <const name="Uuid" value="0x01">
7632 <desc>
7633 Supports UUIDs as expected by VirtualBox code.
7634 </desc>
7635 </const>
7636
7637 <const name="CreateFixed" value="0x02">
7638 <desc>
7639 Supports creating fixed size images, allocating all space instantly.
7640 </desc>
7641 </const>
7642
7643 <const name="CreateDynamic" value="0x04">
7644 <desc>
7645 Supports creating dynamically growing images, allocating space on
7646 demand.
7647 </desc>
7648 </const>
7649
7650 <const name="CreateSplit2G" value="0x08">
7651 <desc>
7652 Supports creating images split in chunks of a bit less than 2 GBytes.
7653 </desc>
7654 </const>
7655
7656 <const name="Differencing" value="0x10">
7657 <desc>
7658 Supports being used as a format for differencing hard disks (see <link
7659 to="IHardDisk2::createDiffStorage"/>).
7660 </desc>
7661 </const>
7662
7663 <const name="Asynchronous" value="0x20">
7664 <desc>
7665 Supports asynchronous I/O operations for at least some configurations.
7666 </desc>
7667 </const>
7668
7669 <const name="File" value="0x40">
7670 <desc>
7671 The format backend operates on files. The <link to="IMedium::location"/>
7672 attribute of the hard disk specifies a file used to store hard disk
7673 data. For a list of supported file extensions see
7674 <link to="IHardDiskFormat::fileExtensions"/>.
7675 </desc>
7676 </const>
7677
7678 <const name="Properties" value="0x80">
7679 <desc>
7680 The format backend uses the property interface to configure the storage
7681 location and properties. The <link to="IHardDiskFormat::describeProperties"/>
7682 method is used to get access to properties supported by the given hard
7683 disk format.
7684 </desc>
7685 </const>
7686
7687 <const name="CapabilityMask" value="0xFF"/>
7688 </enum>
7689
7690 <interface
7691 name="IHardDiskFormat" extends="$unknown"
7692 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
7693 wsmap="managed"
7694 >
7695 <desc>
7696 The IHardDiskFormat interface represents a virtual hard disk format.
7697
7698 Each hard disk format has an associated backend which is used to handle
7699 hard disks stored in this format. This interface provides information
7700 about the properties of the associated backend.
7701
7702 Each hard disk format is identified by a string represented by the
7703 <link to="#id"/> attribute. This string is used in calls like
7704 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
7705 format.
7706
7707 The list of all supported hard disk formats can be obtained using
7708 <link to="ISystemProperties::hardDiskFormats"/>.
7709
7710 <see>IHardDisk2</see>
7711 </desc>
7712
7713 <attribute name="id" type="wstring" readonly="yes">
7714 <desc>
7715 Identifier of this format.
7716
7717 This string is used in methods of other interfaces where it is necessary
7718 to specify a hard disk format, such as
7719 <link to="IVirtualBox::createHardDisk2()"/>.
7720 </desc>
7721 </attribute>
7722
7723 <attribute name="name" type="wstring" readonly="yes">
7724 <desc>
7725 Human readable description of this format.
7726
7727 Mainly for use in file open dialogs.
7728 </desc>
7729 </attribute>
7730
7731 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
7732 <desc>
7733 Array of strings containing the supported file extensions.
7734
7735 The first extension in the array is the extension preferred by the
7736 backend. It is recommended to use this extension when specifying a
7737 location of the storage unit for a new hard disk.
7738
7739 Note that some backends do not work on files, so this array may be
7740 empty.
7741
7742 <see>IHardDiskFormat::capabilities</see>
7743 </desc>
7744 </attribute>
7745
7746 <attribute name="capabilities" type="unsigned long" readonly="yes">
7747 <desc>
7748 Capabilities of the format as a set of bit flags.
7749
7750 For the meaning of individual capability flags see
7751 <link to="HardDiskFormatCapabilities"/>.
7752 </desc>
7753 </attribute>
7754
7755 <method name="describeProperties">
7756 <desc>
7757 Returns several arrays describing the properties supported by this
7758 format.
7759
7760 An element with the given index in each array describes one
7761 property. Thus, the number of elements in each returned array is the
7762 same and corresponds to the number of supported properties.
7763
7764 The returned arrays are not empty only if the
7765 <link to="HardDiskFormatCapabilities::Properties"/> flag is set.
7766
7767 <see>DataType</see>
7768 <see>DataFlags</see>
7769 </desc>
7770
7771 <param name="names" type="wstring" safearray="yes" dir="out">
7772 <desc>Array of property names.</desc>
7773 </param>
7774 <param name="description" type="wstring" safearray="yes" dir="out">
7775 <desc>Array of property descriptions.</desc>
7776 </param>
7777 <param name="types" type="DataType" safearray="yes" dir="out">
7778 <desc>Array of property types.</desc>
7779 </param>
7780 <param name="flags" type="unsigned long" safearray="yes" dir="out">
7781 <desc>Array of property flags.</desc>
7782 </param>
7783 <param name="defaults" type="wstring" safearray="yes" dir="out">
7784 <desc>Array of default property values.</desc>
7785 </param>
7786 </method>
7787
7788 </interface>
7789
7790
7791 <!--
7792 // IFloppyImage2
7793 /////////////////////////////////////////////////////////////////////////
7794 -->
7795
7796 <interface
7797 name="IFloppyImage2" extends="IMedium"
7798 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
7799 wsmap="managed"
7800 >
7801 <desc>
7802 The IFloppyImage2 interface represents a medium containing the image
7803 of a floppy disk.
7804 </desc>
7805
7806 </interface>
7807
7808
7809 <!--
7810 // IDVDImage2
7811 /////////////////////////////////////////////////////////////////////////
7812 -->
7813
7814 <interface
7815 name="IDVDImage2" extends="IMedium"
7816 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
7817 wsmap="managed"
7818 >
7819 <desc>
7820 The IDVDImage2 interface represents a medium containing the image
7821 of a CD or DVD disk in the ISO format.
7822 </desc>
7823
7824 </interface>
7825
7826
7827 <!--
7828 // IDVDDrive
7829 /////////////////////////////////////////////////////////////////////////
7830 -->
7831
7832 <interface
7833 name="IDVDDrive" extends="$unknown"
7834 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
7835 wsmap="managed"
7836 >
7837 <desc>
7838 The IDVDDrive interface represents the virtual CD/DVD drive of the
7839 virtual machine. An object of this type is returned by
7840 <link to="IMachine::DVDDrive"/>.
7841 </desc>
7842
7843 <attribute name="state" type="DriveState" readonly="yes">
7844 <desc>Current drive state.</desc>
7845 </attribute>
7846
7847 <attribute name="passthrough" type="boolean">
7848 <desc>
7849 When a host drive is mounted and passthrough is enabled
7850 the guest OS will be able to directly send SCSI commands to
7851 the host drive. This enables the guest OS to use CD/DVD writers
7852 but is potentially dangerous.
7853 </desc>
7854 </attribute>
7855
7856 <method name="mountImage">
7857 <desc>Mounts a CD/DVD image with the specified UUID.</desc>
7858 <param name="imageId" type="uuid" dir="in"/>
7859 </method>
7860
7861 <method name="captureHostDrive">
7862 <desc>Captures the specified host CD/DVD drive.</desc>
7863 <param name="drive" type="IHostDVDDrive" dir="in"/>
7864 </method>
7865
7866 <method name="unmount">
7867 <desc>Unmounts the currently mounted image or host drive.</desc>
7868 </method>
7869
7870 <method name="getImage">
7871 <desc>Returns the currently mounted CD/DVD image.</desc>
7872 <param name="image" type="IDVDImage2" dir="return"/>
7873 </method>
7874
7875 <method name="getHostDrive">
7876 <desc>Returns the currently mounted host CD/DVD drive.</desc>
7877 <param name="drive" type="IHostDVDDrive" dir="return"/>
7878 </method>
7879
7880 </interface>
7881
7882
7883 <!--
7884 // IFloppyDrive
7885 /////////////////////////////////////////////////////////////////////////
7886 -->
7887
7888 <interface
7889 name="IFloppyDrive" extends="$unknown"
7890 uuid="159412cd-bab8-452e-8097-218a020825a6"
7891 wsmap="managed"
7892 >
7893 <desc>
7894 The IFloppyDrive interface represents the virtual floppy drive of the
7895 virtual machine. An object of this type is returned by
7896 <link to="IMachine::floppyDrive" />.
7897 </desc>
7898
7899 <attribute name="enabled" type="boolean">
7900 <desc>
7901 Flag whether the floppy drive is enabled. If it is disabled,
7902 the floppy drive will not be reported to the guest OS.
7903 </desc>
7904 </attribute>
7905
7906 <attribute name="state" type="DriveState" readonly="yes">
7907 <desc>Current drive state.</desc>
7908 </attribute>
7909
7910 <method name="mountImage">
7911 <desc>Mounts a floppy image with the specified UUID.</desc>
7912 <param name="imageId" type="uuid" dir="in"/>
7913 </method>
7914
7915 <method name="captureHostDrive">
7916 <desc>Captures the specified host floppy drive.</desc>
7917 <param name="drive" type="IHostFloppyDrive" dir="in"/>
7918 </method>
7919
7920 <method name="unmount">
7921 <desc>Unmounts the currently mounted image or host drive.</desc>
7922 </method>
7923
7924 <method name="getImage">
7925 <desc>Returns the currently mounted floppy image.</desc>
7926 <param name="image" type="IFloppyImage2" dir="return"/>
7927 </method>
7928
7929 <method name="getHostDrive">
7930 <desc>Returns the currently mounted host floppy drive.</desc>
7931 <param name="drive" type="IHostFloppyDrive" dir="return"/>
7932 </method>
7933
7934 </interface>
7935
7936
7937 <!--
7938 // IKeyboard
7939 /////////////////////////////////////////////////////////////////////////
7940 -->
7941
7942 <interface
7943 name="IKeyboard" extends="$unknown"
7944 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
7945 wsmap="managed"
7946 >
7947 <desc>
7948 The IKeyboard interface represents the virtual machine's keyboard. Used
7949 in <link to="IConsole::keyboard"/>.
7950
7951 Through this interface, the virtual machine's virtual keyboard can be controlled. One
7952 can send keystrokes to the virtual machine and send the Ctrl-Alt-Del sequence to it.
7953 </desc>
7954 <method name="putScancode">
7955 <desc>Sends a scancode to the keyboard.</desc>
7956 <param name="scancode" type="long" dir="in"/>
7957 </method>
7958
7959 <method name="putScancodes">
7960 <desc>Sends an array of scancode to the keyboard.</desc>
7961 <param name="scancodes" type="long" dir="in" safearray="yes"/>
7962 <param name="codesStored" type="unsigned long" dir="return"/>
7963 </method>
7964
7965 <method name="putCAD">
7966 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard.</desc>
7967 </method>
7968
7969 </interface>
7970
7971
7972 <!--
7973 // IMouse
7974 /////////////////////////////////////////////////////////////////////////
7975 -->
7976
7977 <enum
7978 name="MouseButtonState"
7979 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
7980 >
7981 <desc>
7982 Mouse button state.
7983 </desc>
7984
7985 <const name="LeftButton" value="0x01"/>
7986 <const name="RightButton" value="0x02"/>
7987 <const name="MiddleButton" value="0x04"/>
7988 <const name="WheelUp" value="0x08"/>
7989 <const name="WheelDown" value="0x10"/>
7990 <const name="MouseStateMask" value="0x1F"/>
7991 </enum>
7992
7993 <interface
7994 name="IMouse" extends="$unknown"
7995 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
7996 wsmap="managed"
7997 >
7998 <desc>
7999 The IMouse interface represents the virtual machine's mouse. Used in
8000 <link to="IConsole::mouse"/>.
8001
8002 Through this interface, the virtual machine's virtual mouse can be
8003 controlled.
8004 </desc>
8005
8006 <attribute name="absoluteSupported" type="boolean" readonly="yes">
8007 <desc>
8008 Whether the guest OS supports absolute mouse pointer positioning
8009 or not.
8010 <note>
8011 VirtualBox Guest Tools need to be installed to the guest OS
8012 in order to enable absolute mouse positioning support.
8013 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
8014 callback to be instantly informed about changes of this attribute
8015 during virtual machine execution.
8016 </note>
8017 <see><link to="#putMouseEventAbsolute"/></see>
8018 </desc>
8019 </attribute>
8020
8021 <method name="putMouseEvent">
8022 <desc>
8023 Initiates a mouse event using relative pointer movements
8024 along x and y axis.
8025 </desc>
8026
8027 <param name="dx" type="long" dir="in">
8028 <desc>
8029 Amount of pixels the mouse should move to the right.
8030 Negative values move the mouse to the left.
8031 </desc>
8032 </param>
8033 <param name="dy" type="long" dir="in">
8034 <desc>
8035 Amount of pixels the mouse should move downwards.
8036 Negative values move the mouse upwards.
8037 </desc>
8038 </param>
8039 <param name="dz" type="long" dir="in">
8040 <desc>
8041 Amount of mouse wheel moves.
8042 Positive values describe clockwise wheel rotations,
8043 negative values describe counterclockwise rotations.
8044 </desc>
8045 </param>
8046 <param name="buttonState" type="long" dir="in">
8047 <desc>
8048 The current state of mouse buttons. Every bit represents
8049 a mouse button as follows:
8050 <table>
8051 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
8052 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
8053 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
8054 </table>
8055 A value of <tt>1</tt> means the corresponding button is pressed.
8056 otherwise it is released.
8057 </desc>
8058 </param>
8059 </method>
8060
8061 <method name="putMouseEventAbsolute">
8062 <desc>
8063 Positions the mouse pointer using absolute x and y coordinates.
8064 These coordinates are expressed in pixels and
8065 start from <tt>[1,1]</tt> which corresponds to the top left
8066 corner of the virtual display.
8067
8068 <note>
8069 This method will have effect only if absolute mouse
8070 positioning is supported by the guest OS.
8071 </note>
8072
8073 <see><link to="#absoluteSupported"/></see>
8074 </desc>
8075
8076 <param name="x" type="long" dir="in">
8077 <desc>
8078 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
8079 </desc>
8080 </param>
8081 <param name="y" type="long" dir="in">
8082 <desc>
8083 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
8084 </desc>
8085 </param>
8086 <param name="dz" type="long" dir="in">
8087 <desc>
8088 Amount of mouse wheel moves.
8089 Positive values describe clockwise wheel rotations,
8090 negative values describe counterclockwise rotations.
8091 </desc>
8092 </param>
8093 <param name="buttonState" type="long" dir="in">
8094 <desc>
8095 The current state of mouse buttons. Every bit represents
8096 a mouse button as follows:
8097 <table>
8098 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
8099 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
8100 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
8101 </table>
8102 A value of <tt>1</tt> means the corresponding button is pressed.
8103 otherwise it is released.
8104 </desc>
8105 </param>
8106 </method>
8107
8108 </interface>
8109
8110 <!--
8111 // IDisplay
8112 /////////////////////////////////////////////////////////////////////////
8113 -->
8114
8115 <enum
8116 name="FramebufferAccelerationOperation"
8117 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
8118 >
8119 <desc>
8120 Frame buffer acceleration operation.
8121 </desc>
8122
8123 <const name="SolidFillAcceleration" value="1"/>
8124 <const name="ScreenCopyAcceleration" value="2"/>
8125 </enum>
8126
8127 <enum
8128 name="FramebufferPixelFormat"
8129 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
8130 >
8131 <desc>
8132 Format of the video memory buffer. Constants represented by this enum can
8133 be used to test for particular values of <link
8134 to="IFramebuffer::pixelFormat"/>. See also <link
8135 to="IFramebuffer::requestResize()"/>.
8136
8137 See also www.fourcc.org for more information about FOURCC pixel formats.
8138 </desc>
8139
8140 <const name="Opaque" value="0xFFFFFFFF">
8141 <desc>
8142 Unknown buffer format. The user may not assume any particular
8143 format of the buffer.
8144 </desc>
8145 </const>
8146 <const name="FOURCC_RGB" value="0x32424752">
8147 <desc>
8148 Basic RGB format. <link to="IFramebuffer::bitsPerPixel"/> determines
8149 the bit layout.
8150 </desc>
8151 </const>
8152 </enum>
8153
8154 <interface
8155 name="IFramebuffer" extends="$unknown"
8156 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
8157 wsmap="suppress"
8158 >
8159 <attribute name="address" type="octet" mod="ptr" readonly="yes">
8160 <desc>Address of the start byte of the frame buffer.</desc>
8161 </attribute>
8162
8163 <attribute name="width" type="unsigned long" readonly="yes">
8164 <desc>Frame buffer width, in pixels.</desc>
8165 </attribute>
8166
8167 <attribute name="height" type="unsigned long" readonly="yes">
8168 <desc>Frame buffer height, in pixels.</desc>
8169 </attribute>
8170
8171 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8172 <desc>
8173 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
8174 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
8175 are: 8, 15, 16, 24 and 32.
8176 </desc>
8177 </attribute>
8178
8179 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
8180 <desc>
8181 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
8182 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
8183 size of the scan line must be aligned to 32 bits.
8184 </desc>
8185 </attribute>
8186
8187 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
8188 <desc>
8189 Frame buffer pixel format. It's either one of the values defined by <link
8190 to="FramebufferPixelFormat"/> or a raw FOURCC code.
8191 <note>
8192 This attribute must never return <link
8193 to="PixelFormat::Opaque"/> -- the format of the buffer
8194 <link to="#address"/> points to must be always known.
8195 </note>
8196 </desc>
8197 </attribute>
8198
8199 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
8200 <desc>
8201 Defines whether this frame buffer uses the virtual video card's memory
8202 buffer (guest VRAM) directly or not. See <link
8203 to="IFramebuffer::requestResize()"/> for more information.
8204 </desc>
8205 </attribute>
8206
8207 <attribute name="heightReduction" type="unsigned long" readonly="yes">
8208 <desc>
8209 Hint from the frame buffer about how much of the standard
8210 screen height it wants to use for itself. This information is
8211 exposed to the guest through the VESA BIOS and VMMDev interface
8212 so that it can use it for determining its video mode table. It
8213 is not guaranteed that the guest respects the value.
8214 </desc>
8215 </attribute>
8216
8217 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
8218 <desc>
8219 An alpha-blended overlay which is superposed over the frame buffer.
8220 The initial purpose is to allow the display of icons providing
8221 information about the VM state, including disk activity, in front
8222 ends which do not have other means of doing that. The overlay is
8223 designed to controlled exclusively by IDisplay. It has no locking
8224 of its own, and any changes made to it are not guaranteed to be
8225 visible until the affected portion of IFramebuffer is updated. The
8226 overlay can be created lazily the first time it is requested. This
8227 attribute can also return NULL to signal that the overlay is not
8228 implemented.
8229 </desc>
8230 </attribute>
8231
8232 <attribute name="winId" type="unsigned long long" readonly="yes">
8233 <desc>
8234 Platform-dependent identifier of the window where context of this
8235 frame buffer is drawn, or zero if there's no such window.
8236 </desc>
8237 </attribute>
8238
8239 <method name="lock">
8240 <desc>
8241 Locks the frame buffer.
8242 Gets called by the IDisplay object where this frame buffer is
8243 bound to.
8244 </desc>
8245 </method>
8246
8247 <method name="unlock">
8248 <desc>
8249 Unlocks the frame buffer.
8250 Gets called by the IDisplay object where this frame buffer is
8251 bound to.
8252 </desc>
8253 </method>
8254
8255 <method name="notifyUpdate">
8256 <desc>
8257 Informs about an update.
8258 Gets called by the display object where this buffer is
8259 registered.
8260 </desc>
8261 <param name="x" type="unsigned long" dir="in"/>
8262 <param name="y" type="unsigned long" dir="in"/>
8263 <param name="width" type="unsigned long" dir="in"/>
8264 <param name="height" type="unsigned long" dir="in"/>
8265 <param name="finished" type="boolean" dir="return"/>
8266 </method>
8267
8268 <method name="requestResize">
8269 <desc>
8270 Requests a size and pixel format change.
8271
8272 There are two modes of working with the video buffer of the virtual
8273 machine. The <i>indirect</i> mode implies that the IFramebuffer
8274 implementation allocates a memory buffer for the requested display mode
8275 and provides it to the virtual machine. In <i>direct</i> mode, the
8276 IFramebuffer implementation uses the memory buffer allocated and owned
8277 by the virtual machine. This buffer represents the video memory of the
8278 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
8279 usually faster because the implementation gets a raw pointer to the
8280 guest VRAM buffer which it can directly use for visualizing the contents
8281 of the virtual display, as opposed to the indirect mode where the
8282 contents of guest VRAM are copied to the memory buffer provided by
8283 the implementation every time a display update occurs.
8284
8285 It is important to note that the direct mode is really fast only when
8286 the implementation uses the given guest VRAM buffer directly, for
8287 example, by blitting it to the window representing the virtual machine's
8288 display, which saves at least one copy operation comparing to the
8289 indirect mode. However, using the guest VRAM buffer directly is not
8290 always possible: the format and the color depth of this buffer may be
8291 not supported by the target window, or it may be unknown (opaque) as in
8292 case of text or non-linear multi-plane VGA video modes. In this case,
8293 the indirect mode (that is always available) should be used as a
8294 fallback: when the guest VRAM contents are copied to the
8295 implementation-provided memory buffer, color and format conversion is
8296 done automatically by the underlying code.
8297
8298 The @a pixelFormat parameter defines whether the direct mode is
8299 available or not. If @a pixelFormat is <link
8300 to="PixelFormat::Opaque"/> then direct access to the guest
8301 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
8302 bytesPerLine parameters must be ignored and the implementation must use
8303 the indirect mode (where it provides its own buffer in one of the
8304 supported formats). In all other cases, @a pixelFormat together with @a
8305 bitsPerPixel and @a bytesPerLine define the format of the video memory
8306 buffer pointed to by the @a VRAM parameter and the implementation is
8307 free to choose which mode to use. To indicate that this frame buffer uses
8308 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
8309 attribute must return <tt>true</tt> and <link to="#address"/> must
8310 return exactly the same address that is passed in the @a VRAM parameter
8311 of this method; otherwise it is assumed that the indirect strategy is
8312 chosen.
8313
8314 The @a width and @a height parameters represent the size of the
8315 requested display mode in both modes. In case of indirect mode, the
8316 provided memory buffer should be big enough to store data of the given
8317 display mode. In case of direct mode, it is guaranteed that the given @a
8318 VRAM buffer contains enough space to represent the display mode of the
8319 given size. Note that this frame buffer's <link to="#width"/> and <link
8320 to="#height"/> attributes must return exactly the same values as
8321 passed to this method after the resize is completed (see below).
8322
8323 The @a finished output parameter determines if the implementation has
8324 finished resizing the frame buffer or not. If, for some reason, the
8325 resize cannot be finished immediately during this call, @a finished
8326 must be set to @c false, and the implementation must call
8327 <link to="IDisplay::resizeCompleted()"/> after it has returned from
8328 this method as soon as possible. If @a finished is @c false, the
8329 machine will not call any frame buffer methods until
8330 <link to="IDisplay::resizeCompleted()"/> is called.
8331
8332 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
8333 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
8334 this frame buffer must return exactly the same values as specified in the
8335 parameters of this method, after the resize is completed. If the
8336 indirect mode is chosen, these attributes must return values describing
8337 the format of the implementation's own memory buffer <link
8338 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
8339 value must always correlate with <link to="#pixelFormat"/>. Note that
8340 the <link to="#pixelFormat"/> attribute must never return <link
8341 to="PixelFormat::Opaque"/> regardless of the selected mode.
8342
8343 <note>
8344 This method is called by the IDisplay object under the
8345 <link to="#lock()"/> provided by this IFramebuffer
8346 implementation. If this method returns @c false in @a finished, then
8347 this lock is not released until
8348 <link to="IDisplay::resizeCompleted()"/> is called.
8349 </note>
8350 </desc>
8351 <param name="screenId" type="unsigned long" dir="in">
8352 <desc>
8353 Logical screen number. Must be used in the corresponding call to
8354 <link to="IDisplay::resizeCompleted()"/> if this call is made.
8355 </desc>
8356 </param>
8357 <param name="pixelFormat" type="unsigned long" dir="in">
8358 <desc>
8359 Pixel format of the memory buffer pointed to by @a VRAM.
8360 See also <link to="FramebufferPixelFormat"/>.
8361 </desc>
8362 </param>
8363 <param name="VRAM" type="octet" mod="ptr" dir="in">
8364 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
8365 </param>
8366 <param name="bitsPerPixel" type="unsigned long" dir="in">
8367 <desc>Color depth, bits per pixel.</desc>
8368 </param>
8369 <param name="bytesPerLine" type="unsigned long" dir="in">
8370 <desc>Size of one scan line, in bytes.</desc>
8371 </param>
8372 <param name="width" type="unsigned long" dir="in">
8373 <desc>Width of the guest display, in pixels.</desc>
8374 </param>
8375 <param name="height" type="unsigned long" dir="in">
8376 <desc>Height of the guest display, in pixels.</desc>
8377 </param>
8378 <param name="finished" type="boolean" dir="return">
8379 <desc>
8380 Can the VM start using the new frame buffer immediately
8381 after this method returns or it should wait for
8382 <link to="IDisplay::resizeCompleted()"/>.
8383 </desc>
8384 </param>
8385 </method>
8386
8387 <method name="operationSupported">
8388 <desc>
8389 Returns whether the given acceleration operation is supported
8390 by the IFramebuffer implementation. If not, the display object
8391 will not attempt to call the corresponding IFramebuffer entry
8392 point. Even if an operation is indicated to supported, the
8393 IFramebuffer implementation always has the option to return non
8394 supported from the corresponding acceleration method in which
8395 case the operation will be performed by the display engine. This
8396 allows for reduced IFramebuffer implementation complexity where
8397 only common cases are handled.
8398 </desc>
8399 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
8400 <param name="supported" type="boolean" dir="return"/>
8401 </method>
8402
8403 <method name="videoModeSupported">
8404 <desc>
8405 Returns whether the frame buffer implementation is willing to
8406 support a given video mode. In case it is not able to render
8407 the video mode (or for some reason not willing), it should
8408 return false. Usually this method is called when the guest
8409 asks the VMM device whether a given video mode is supported
8410 so the information returned is directly exposed to the guest.
8411 It is important that this method returns very quickly.
8412 </desc>
8413 <param name="width" type="unsigned long" dir="in"/>
8414 <param name="height" type="unsigned long" dir="in"/>
8415 <param name="bpp" type="unsigned long" dir="in"/>
8416 <param name="supported" type="boolean" dir="return"/>
8417 </method>
8418
8419 <method name="solidFill">
8420 <desc>
8421 Fills the specified rectangle on screen with a solid color.
8422 </desc>
8423 <param name="x" type="unsigned long" dir="in"/>
8424 <param name="y" type="unsigned long" dir="in"/>
8425 <param name="width" type="unsigned long" dir="in"/>
8426 <param name="height" type="unsigned long" dir="in"/>
8427 <param name="color" type="unsigned long" dir="in"/>
8428 <param name="handled" type="boolean" dir="return"/>
8429 </method>
8430
8431 <method name="copyScreenBits">
8432 <desc>
8433 Copies specified rectangle on the screen.
8434 </desc>
8435 <param name="xDst" type="unsigned long" dir="in"/>
8436 <param name="yDst" type="unsigned long" dir="in"/>
8437 <param name="xSrc" type="unsigned long" dir="in"/>
8438 <param name="ySrc" type="unsigned long" dir="in"/>
8439 <param name="width" type="unsigned long" dir="in"/>
8440 <param name="height" type="unsigned long" dir="in"/>
8441 <param name="handled" type="boolean" dir="return"/>
8442 </method>
8443
8444 <method name="getVisibleRegion">
8445 <desc>
8446 Returns the visible region of this frame buffer.
8447
8448 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
8449 @a count parameter is ignored and the number of elements necessary to
8450 describe the current visible region is returned in @a countCopied.
8451
8452 If @a rectangles is not <tt>NULL</tt> but @a count is less
8453 than the required number of elements to store region data, the method
8454 will report a failure. If @a count is equal or greater than the
8455 required number of elements, then the actual number of elements copied
8456 to the provided array will be returned in @a countCopied.
8457
8458 <note>
8459 The address of the provided array must be in the process space of
8460 this IFramebuffer object.
8461 </note>
8462 </desc>
8463 <param name="rectangles" type="octet" mod="ptr" dir="in">
8464 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
8465 </param>
8466 <param name="count" type="unsigned long" dir="in">
8467 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8468 </param>
8469 <param name="countCopied" type="unsigned long" dir="return">
8470 <desc>Number of elements copied to the @a rectangles array.</desc>
8471 </param>
8472 </method>
8473
8474 <method name="setVisibleRegion">
8475 <desc>
8476 Suggests a new visible region to this frame buffer. This region
8477 represents the area of the VM display which is a union of regions of
8478 all top-level windows of the guest operating system running inside the
8479 VM (if the Guest Additions for this system support this
8480 functionality). This information may be used by the frontends to
8481 implement the seamless desktop integration feature.
8482
8483 <note>
8484 The address of the provided array must be in the process space of
8485 this IFramebuffer object.
8486 </note>
8487 <note>
8488 The IFramebuffer implementation must make a copy of the provided
8489 array of rectangles.
8490 </note>
8491 </desc>
8492 <param name="rectangles" type="octet" mod="ptr" dir="in">
8493 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
8494 </param>
8495 <param name="count" type="unsigned long" dir="in">
8496 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8497 </param>
8498 </method>
8499
8500 </interface>
8501
8502 <interface
8503 name="IFramebufferOverlay" extends="IFrameBuffer"
8504 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
8505 wsmap="suppress"
8506 >
8507 <desc>
8508 The IFramebufferOverlay interface represents an alpha blended overlay
8509 for displaying status icons above an IFramebuffer. It is always created
8510 not visible, so that it must be explicitly shown. It only covers a
8511 portion of the IFramebuffer, determined by its width, height and
8512 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
8513 that order) format, and may be written to directly. Do re-read the
8514 width though, after setting it, as it may be adjusted (increased) to
8515 make it more suitable for the front end.
8516 </desc>
8517 <attribute name="x" type="unsigned long" readonly="yes">
8518 <desc>X position of the overlay, relative to the frame buffer.</desc>
8519 </attribute>
8520
8521 <attribute name="y" type="unsigned long" readonly="yes">
8522 <desc>Y position of the overlay, relative to the frame buffer.</desc>
8523 </attribute>
8524
8525 <attribute name="visible" type="boolean" readonly="no">
8526 <desc>
8527 Whether the overlay is currently visible.
8528 </desc>
8529 </attribute>
8530
8531 <attribute name="alpha" type="unsigned long" readonly="no">
8532 <desc>
8533 The global alpha value for the overlay. This may or may not be
8534 supported by a given front end.
8535 </desc>
8536 </attribute>
8537
8538 <method name="move">
8539 <desc>
8540 Changes the overlay's position relative to the IFramebuffer.
8541 </desc>
8542 <param name="x" type="unsigned long" dir="in"/>
8543 <param name="y" type="unsigned long" dir="in"/>
8544 </method>
8545
8546 </interface>
8547
8548 <interface
8549 name="IDisplay" extends="$unknown"
8550 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
8551 wsmap="suppress"
8552 >
8553 <desc>
8554 The IDisplay interface represents the virtual machine's display.
8555
8556 The object implementing this interface is contained in each
8557 <link to="IConsole::display"/> attribute and represents the visual
8558 output of the virtual machine.
8559
8560 The virtual display supports pluggable output targets represented by the
8561 IFramebuffer interface. Examples of the output target are a window on
8562 the host computer or an RDP session's display on a remote computer.
8563 </desc>
8564 <attribute name="width" type="unsigned long" readonly="yes">
8565 <desc>Current display width.</desc>
8566 </attribute>
8567
8568 <attribute name="height" type="unsigned long" readonly="yes">
8569 <desc>Current display height.</desc>
8570 </attribute>
8571
8572 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8573 <desc>
8574 Current guest display color depth. Note that this may differ
8575 from <link to="IFramebuffer::bitsPerPixel"/>.
8576 </desc>
8577 </attribute>
8578
8579 <method name="setupInternalFramebuffer">
8580 <desc>
8581 Prepares an internally managed frame buffer.
8582 </desc>
8583 <param name="depth" type="unsigned long" dir="in"/>
8584 </method>
8585
8586 <method name="lockFramebuffer">
8587 <desc>
8588 Requests access to the internal frame buffer.
8589 </desc>
8590 <param name="address" type="octet" mod="ptr" dir="return"/>
8591 </method>
8592
8593 <method name="unlockFramebuffer">
8594 <desc>
8595 Releases access to the internal frame buffer.
8596 </desc>
8597 </method>
8598
8599 <method name="registerExternalFramebuffer">
8600 <desc>
8601 Registers an external frame buffer.
8602 </desc>
8603 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8604 </method>
8605
8606 <method name="setFramebuffer">
8607 <desc>
8608 Sets the framebuffer for given screen.
8609 </desc>
8610 <param name="screenId" type="unsigned long" dir="in"/>
8611 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8612 </method>
8613
8614 <method name="getFramebuffer">
8615 <desc>
8616 Queries the framebuffer for given screen.
8617 </desc>
8618 <param name="screenId" type="unsigned long" dir="in"/>
8619 <param name="framebuffer" type="IFramebuffer" dir="out"/>
8620 <param name="xOrigin" type="long" dir="out"/>
8621 <param name="yOrigin" type="long" dir="out"/>
8622 </method>
8623
8624 <method name="setVideoModeHint">
8625 <desc>
8626 Asks VirtualBox to request the given video mode from
8627 the guest. This is just a hint and it cannot be guaranteed
8628 that the requested resolution will be used. Guest Additions
8629 are required for the request to be seen by guests. The caller
8630 should issue the request and wait for a resolution change and
8631 after a timeout retry.
8632
8633 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
8634 parameters means that the corresponding values should be taken from the
8635 current video mode (i.e. left unchanged).
8636
8637 If the guest OS supports multi-monitor configuration then the @a display
8638 parameter specifies the number of the guest display to send the hint to:
8639 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
8640 so on. If the multi-monitor configuration is not supported, @a display
8641 must be <tt>0</tt>.
8642
8643 </desc>
8644 <param name="width" type="unsigned long" dir="in"/>
8645 <param name="height" type="unsigned long" dir="in"/>
8646 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
8647 <param name="display" type="unsigned long" dir="in"/>
8648 </method>
8649
8650 <method name="setSeamlessMode">
8651 <desc>
8652 Enables or disables seamless guest display rendering (seamless desktop
8653 integration) mode.
8654 <note>
8655 Calling this method has no effect if <link
8656 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
8657 </note>
8658 </desc>
8659 <param name="enabled" type="boolean" dir="in"/>
8660 </method>
8661
8662 <method name="takeScreenShot">
8663 <desc>
8664 Takes a screen shot of the requested size and copies it to the
8665 32-bpp buffer allocated by the caller.
8666 </desc>
8667 <param name="address" type="octet" mod="ptr" dir="in"/>
8668 <param name="width" type="unsigned long" dir="in"/>
8669 <param name="height" type="unsigned long" dir="in"/>
8670 </method>
8671
8672 <method name="drawToScreen">
8673 <desc>
8674 Draws a 32-bpp image of the specified size from the given buffer
8675 to the given point on the VM display.
8676 </desc>
8677 <param name="address" type="octet" mod="ptr" dir="in"/>
8678 <param name="x" type="unsigned long" dir="in"/>
8679 <param name="y" type="unsigned long" dir="in"/>
8680 <param name="width" type="unsigned long" dir="in"/>
8681 <param name="height" type="unsigned long" dir="in"/>
8682 </method>
8683
8684 <method name="invalidateAndUpdate">
8685 <desc>
8686 Does a full invalidation of the VM display and instructs the VM
8687 to update it.
8688 </desc>
8689 </method>
8690
8691 <method name="resizeCompleted">
8692 <desc>
8693 Signals that a framebuffer has completed the resize operation.
8694 </desc>
8695 <param name="screenId" type="unsigned long" dir="in"/>
8696 </method>
8697
8698 <method name="updateCompleted">
8699 <desc>
8700 Signals that a framebuffer has completed the update operation.
8701 </desc>
8702 </method>
8703
8704 </interface>
8705
8706 <!--
8707 // INetworkAdapter
8708 /////////////////////////////////////////////////////////////////////////
8709 -->
8710
8711 <enum
8712 name="NetworkAttachmentType"
8713 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
8714 >
8715 <desc>
8716 Network attachment type.
8717 </desc>
8718
8719 <const name="Null" value="0">
8720 <desc><tt>null</tt> value. Also means "not attached".</desc>
8721 </const>
8722 <const name="NAT" value="1"/>
8723 <const name="HostInterface" value="2"/>
8724 <const name="Internal" value="3"/>
8725 </enum>
8726
8727 <enum
8728 name="NetworkAdapterType"
8729 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
8730 >
8731 <desc>
8732 Network adapter type.
8733 </desc>
8734
8735 <const name="Null" value="0">
8736 <desc><tt>null</tt> value. Never used by the API.</desc>
8737 </const>
8738 <const name="Am79C970A" value="1"/>
8739 <const name="Am79C973" value="2"/>
8740 <const name="I82540EM" value="3"/>
8741 <const name="I82543GC" value="4"/>
8742 </enum>
8743
8744 <interface
8745 name="INetworkAdapter" extends="$unknown"
8746 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
8747 wsmap="managed"
8748 >
8749 <attribute name="adapterType" type="NetworkAdapterType">
8750 <desc>
8751 Type of the virtual network adapter. Depending on this value,
8752 VirtualBox will provide a different virtual network hardware
8753 to the guest.
8754 </desc>
8755 </attribute>
8756
8757 <attribute name="slot" type="unsigned long" readonly="yes">
8758 <desc>
8759 Slot number this adapter is plugged into. Corresponds to
8760 the value you pass to <link to="IMachine::getNetworkAdapter"/>
8761 to obtain this instance.
8762 </desc>
8763 </attribute>
8764
8765 <attribute name="enabled" type="boolean">
8766 <desc>
8767 Flag whether the network adapter is present in the
8768 guest system. If disabled, the virtual guest hardware will
8769 not contain this network adapter. Can only be changed when
8770 the VM is not running.
8771 </desc>
8772 </attribute>
8773
8774 <attribute name="MACAddress" type="wstring">
8775 <desc>
8776 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
8777 it to NULL, VirtualBox will generate a unique MAC address.
8778 </desc>
8779 </attribute>
8780
8781 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
8782
8783 <attribute name="hostInterface" type="wstring">
8784 <desc>
8785 Name of the Host Network Interface that is currently in use. NULL will be returned
8786 if no device has been allocated. On Linux, setting this refers to a permanent TAP
8787 device. However, a file descriptor has precedence over the interface name on Linux.
8788 Note that when VirtualBox allocates a TAP device, this property will not be set, i.e. the
8789 interface name would have to be determined using the file descriptor and /proc/self/fd.
8790 </desc>
8791 </attribute>
8792
8793<if target="xpidl">
8794 <attribute name="TAPFileDescriptor" type="long">
8795 <desc>
8796 File descriptor of the TAP device. It can either be setup by the caller
8797 which has to supply an existing valid file handle allocated in the parent
8798 process of the VM process or allocated by VirtualBox. The value is -1 if it
8799 has not been defined. This property is non persistent, i.e. it will not be
8800 stored in the VM's configuration data and thus has to be set at each startup.
8801 </desc>
8802 </attribute>
8803 <attribute name="TAPSetupApplication" type="wstring">
8804 <desc>
8805 Application to start to configure the TAP device.
8806 It is being passed two parameters, 1) the file handle (as ASCII),
8807 2) the TAP device name if it is available.
8808 </desc>
8809 </attribute>
8810 <attribute name="TAPTerminateApplication" type="wstring">
8811 <desc>
8812 Application to start before closing a TAP device.
8813 It is being passed two parameters, 1) the file handle (as ASCII),
8814 2) the TAP device name if it is available.
8815 </desc>
8816 </attribute>
8817</if>
8818
8819 <attribute name="internalNetwork" type="wstring">
8820 <desc>
8821 Name of the internal network the VM is attached to.
8822 </desc>
8823 </attribute>
8824
8825 <attribute name="NATNetwork" type="wstring">
8826 <desc>
8827 Name of the NAT network the VM is attached to.
8828 </desc>
8829 </attribute>
8830
8831 <attribute name="cableConnected" type="boolean">
8832 <desc>
8833 Flag whether the adapter reports the cable as connected or not.
8834 It can be used to report offline situations to a VM.
8835 </desc>
8836 </attribute>
8837
8838 <attribute name="lineSpeed" type="unsigned long">
8839 <desc>
8840 Line speed reported by custom drivers, in units of 1 kbps.
8841 </desc>
8842 </attribute>
8843
8844 <attribute name="traceEnabled" type="boolean">
8845 <desc>
8846 Flag whether network traffic from/to the network card should be traced.
8847 Can only be toggled when the VM is turned off.
8848 </desc>
8849 </attribute>
8850
8851 <attribute name="traceFile" type="wstring">
8852 <desc>
8853 Filename where a network trace will be stored. If not set, VBox-pid.pcap
8854 will be used.
8855 </desc>
8856 </attribute>
8857
8858 <method name="attachToNAT">
8859 <desc>
8860 Attach the network adapter to the Network Address Translation (NAT) interface.
8861 </desc>
8862 </method>
8863
8864 <method name="attachToHostInterface">
8865 <desc>
8866 Attach the network adapter to a host interface. On Linux, the TAP
8867 setup application will be executed if configured and unless a device
8868 name and/or file descriptor has been set, a new TAP interface will be
8869 created.
8870 </desc>
8871 </method>
8872
8873 <method name="attachToInternalNetwork">
8874 <desc>
8875 Attach the network adapter to an internal network.
8876 </desc>
8877 </method>
8878
8879 <method name="detach">
8880 <desc>
8881 Detach the network adapter
8882 </desc>
8883 </method>
8884 </interface>
8885
8886
8887 <!--
8888 // ISerialPort
8889 /////////////////////////////////////////////////////////////////////////
8890 -->
8891
8892 <enum
8893 name="PortMode"
8894 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
8895 >
8896 <desc>
8897 The PortMode enumeration represents possible communication modes for
8898 the virtual serial port device.
8899 </desc>
8900
8901 <const name="Disconnected" value="0">
8902 <desc>Virtual device is not attached to any real host device.</desc>
8903 </const>
8904 <const name="HostPipe" value="1">
8905 <desc>Virtual device is attached to a host pipe.</desc>
8906 </const>
8907 <const name="HostDevice" value="2">
8908 <desc>Virtual device is attached to a host device.</desc>
8909 </const>
8910 </enum>
8911
8912 <interface
8913 name="ISerialPort" extends="$unknown"
8914 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
8915 wsmap="managed"
8916 >
8917
8918 <desc>
8919 The ISerialPort interface represents the virtual serial port device.
8920
8921 The virtual serial port device acts like an ordinary serial port
8922 inside the virtual machine. This device communicates to the real
8923 serial port hardware in one of two modes: host pipe or host device.
8924
8925 In host pipe mode, the #path attribute specifies the path to the pipe on
8926 the host computer that represents a serial port. The #server attribute
8927 determines if this pipe is created by the virtual machine process at
8928 machine startup or it must already exist before starting machine
8929 execution.
8930
8931 In host device mode, the #path attribute specifies the name of the
8932 serial port device on the host computer.
8933
8934 There is also a third communication mode: the disconnected mode. In this
8935 mode, the guest OS running inside the virtual machine will be able to
8936 detect the serial port, but all port write operations will be discarded
8937 and all port read operations will return no data.
8938
8939 <see>IMachine::getSerialPort</see>
8940 </desc>
8941
8942 <attribute name="slot" type="unsigned long" readonly="yes">
8943 <desc>
8944 Slot number this serial port is plugged into. Corresponds to
8945 the value you pass to <link to="IMachine::getSerialPort"/>
8946 to obtain this instance.
8947 </desc>
8948 </attribute>
8949
8950 <attribute name="enabled" type="boolean">
8951 <desc>
8952 Flag whether the serial port is enabled. If disabled,
8953 the serial port will not be reported to the guest OS.
8954 </desc>
8955 </attribute>
8956
8957 <attribute name="IOBase" type="unsigned long">
8958 <desc>Base I/O address of the serial port.</desc>
8959 </attribute>
8960
8961 <attribute name="IRQ" type="unsigned long">
8962 <desc>IRQ number of the serial port.</desc>
8963 </attribute>
8964
8965 <attribute name="hostMode" type="PortMode">
8966 <desc>
8967 How is this port connected to the host.
8968 <note>
8969 Changing this attribute may fail if the conditions for
8970 <link to="#path"/> are not met.
8971 </note>
8972 </desc>
8973 </attribute>
8974
8975 <attribute name="server" type="boolean">
8976 <desc>
8977 Flag whether this serial port acts as a server (creates a new pipe on
8978 the host) or as a client (uses the existing pipe). This attribute is
8979 used only when <link to="#hostMode"/> is PortMode::HostPipe.
8980 </desc>
8981 </attribute>
8982
8983 <attribute name="path" type="wstring">
8984 <desc>
8985 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
8986 PortMode::HostPipe, or the host serial device name when
8987 <link to="#hostMode"/> is PortMode::HostDevice. In either of the above
8988 cases, setting a @c null or an empty string as the attribute's value
8989 will result into an error. Otherwise, the value of this property is
8990 ignored.
8991 </desc>
8992 </attribute>
8993
8994 </interface>
8995
8996 <!--
8997 // IParallelPort
8998 /////////////////////////////////////////////////////////////////////////
8999 -->
9000
9001 <interface
9002 name="IParallelPort" extends="$unknown"
9003 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
9004 wsmap="managed"
9005 >
9006
9007 <desc>
9008 The IParallelPort interface represents the virtual parallel port device.
9009
9010 The virtual parallel port device acts like an ordinary parallel port
9011 inside the virtual machine. This device communicates to the real
9012 parallel port hardware using the name of the parallel device on the host
9013 computer specified in the #path attribute.
9014
9015 Each virtual parallel port device is assigned a base I/O address and an
9016 IRQ number that will be reported to the guest operating system and used
9017 to operate the given parallel port from within the virtual machine.
9018
9019 <see>IMachine::getParallelPort</see>
9020 </desc>
9021
9022 <attribute name="slot" type="unsigned long" readonly="yes">
9023 <desc>
9024 Slot number this parallel port is plugged into. Corresponds to
9025 the value you pass to <link to="IMachine::getParallelPort"/>
9026 to obtain this instance.
9027 </desc>
9028 </attribute>
9029
9030 <attribute name="enabled" type="boolean">
9031 <desc>
9032 Flag whether the parallel port is enabled. If disabled,
9033 the parallel port will not be reported to the guest OS.
9034 </desc>
9035 </attribute>
9036
9037 <attribute name="IOBase" type="unsigned long">
9038 <desc>Base I/O address of the parallel port.</desc>
9039 </attribute>
9040
9041 <attribute name="IRQ" type="unsigned long">
9042 <desc>IRQ number of the parallel port.</desc>
9043 </attribute>
9044
9045 <attribute name="path" type="wstring">
9046 <desc>
9047 Host parallel device name. If this parallel port is enabled, setting a
9048 @c null or an empty string as this attribute's value will result into
9049 an error.
9050 </desc>
9051 </attribute>
9052
9053 </interface>
9054
9055
9056 <!--
9057 // IMachineDebugger
9058 /////////////////////////////////////////////////////////////////////////
9059 -->
9060
9061 <interface
9062 name="IMachineDebugger" extends="$unknown"
9063 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
9064 wsmap="suppress"
9065 >
9066 <method name="resetStats">
9067 <desc>
9068 Reset VM statistics.
9069 </desc>
9070 <param name="pattern" type="wstring" dir="in">
9071 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9072 </param>
9073 </method>
9074
9075 <method name="dumpStats">
9076 <desc>
9077 Dumps VM statistics.
9078 </desc>
9079 <param name="pattern" type="wstring" dir="in">
9080 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9081 </param>
9082 </method>
9083
9084 <method name="getStats">
9085 <desc>
9086 Get the VM statistics in a XMLish format.
9087 </desc>
9088 <param name="pattern" type="wstring" dir="in">
9089 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9090 </param>
9091 <param name="withDescriptions" type="boolean" dir="in">
9092 <desc>Whether to include the descriptions.</desc>
9093 </param>
9094 <param name="stats" type="wstring" dir="out">
9095 <desc>The XML document containing the statistics.</desc>
9096 </param>
9097 </method>
9098
9099 <method name="injectNMI">
9100 <desc>
9101 Inject an NMI into a running VT-x/AMD-V VM.
9102 </desc>
9103 </method>
9104
9105 <attribute name="singlestep" type="boolean">
9106 <desc>Switch for enabling singlestepping.</desc>
9107 </attribute>
9108
9109 <attribute name="recompileUser" type="boolean">
9110 <desc>Switch for forcing code recompilation for user mode code.</desc>
9111 </attribute>
9112
9113 <attribute name="recompileSupervisor" type="boolean">
9114 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
9115 </attribute>
9116
9117 <attribute name="PATMEnabled" type="boolean">
9118 <desc>Switch for enabling and disabling the PATM component.</desc>
9119 </attribute>
9120
9121 <attribute name="CSAMEnabled" type="boolean">
9122 <desc>Switch for enabling and disabling the CSAM component.</desc>
9123 </attribute>
9124
9125 <attribute name="logEnabled" type="boolean">
9126 <desc>Switch for enabling and disabling logging.</desc>
9127 </attribute>
9128
9129 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
9130 <desc>
9131 Flag indicating whether the VM is currently making use of CPU hardware
9132 virtualization extensions.
9133 </desc>
9134 </attribute>
9135
9136 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
9137 <desc>
9138 Flag indicating whether the VM is currently making use of the nested paging
9139 CPU hardware virtualization extension.
9140 </desc>
9141 </attribute>
9142
9143 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
9144 <desc>
9145 Flag indicating whether the VM is currently making use of the VPID
9146 VT-x extension.
9147 </desc>
9148 </attribute>
9149
9150 <attribute name="PAEEnabled" type="boolean" readonly="yes">
9151 <desc>
9152 Flag indicating whether the VM is currently making use of the Physical
9153 Address Extension CPU feature.
9154 </desc>
9155 </attribute>
9156
9157 <attribute name="virtualTimeRate" type="unsigned long">
9158 <desc>
9159 The rate at which the virtual time runs expressed as a percentage.
9160 The accepted range is 2% to 20000%.
9161 </desc>
9162 </attribute>
9163
9164 <!-- @todo method for setting log flags, groups and destination! -->
9165
9166 <attribute name="VM" type="unsigned long long" readonly="yes">
9167 <desc>
9168 Gets the VM handle. This is only for internal use while
9169 we carve the details of this interface.
9170 </desc>
9171 </attribute>
9172
9173 </interface>
9174
9175 <!--
9176 // IUSBController
9177 /////////////////////////////////////////////////////////////////////////
9178 -->
9179
9180 <interface
9181 name="IUSBController" extends="$unknown"
9182 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
9183 wsmap="managed"
9184 >
9185 <attribute name="enabled" type="boolean">
9186 <desc>
9187 Flag whether the USB controller is present in the
9188 guest system. If disabled, the virtual guest hardware will
9189 not contain any USB controller. Can only be changed when
9190 the VM is powered off.
9191 </desc>
9192 </attribute>
9193
9194 <attribute name="enabledEhci" type="boolean">
9195 <desc>
9196 Flag whether the USB EHCI controller is present in the
9197 guest system. If disabled, the virtual guest hardware will
9198 not contain a USB EHCI controller. Can only be changed when
9199 the VM is powered off.
9200 </desc>
9201 </attribute>
9202
9203 <attribute name="USBStandard" type="unsigned short" readonly="yes">
9204 <desc>
9205 USB standard version which the controller implements.
9206 This is a BCD which means that the major version is in the
9207 high byte and minor version is in the low byte.
9208 </desc>
9209 </attribute>
9210
9211 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
9212 <desc>
9213 List of USB device filters associated with the machine.
9214
9215 If the machine is currently running, these filters are activated
9216 every time a new (supported) USB device is attached to the host
9217 computer that was not ignored by global filters
9218 (<link to="IHost::USBDeviceFilters"/>).
9219
9220 These filters are also activated when the machine is powered up.
9221 They are run against a list of all currently available USB
9222 devices (in states
9223 <link to="USBDeviceState::Available">Available</link>,
9224 <link to="USBDeviceState::Busy">Busy</link>,
9225 <link to="USBDeviceState::Held">Held</link>) that were not previously
9226 ignored by global filters.
9227
9228 If at least one filter matches the USB device in question, this
9229 device is automatically captured (attached to) the virtual USB
9230 controller of this machine.
9231
9232 <see>IUSBDeviceFilter, ::IUSBController</see>
9233 </desc>
9234 </attribute>
9235
9236 <method name="createDeviceFilter">
9237 <desc>
9238 Creates a new USB device filter. All attributes except
9239 the filter name are set to <tt>null</tt> (any match),
9240 <i>active</i> is <tt>false</tt> (the filter is not active).
9241
9242 The created filter can then be added to the list of filters using
9243 <link to="#insertDeviceFilter()"/>.
9244
9245 <see>#deviceFilters</see>
9246 </desc>
9247 <param name="name" type="wstring" dir="in">
9248 <desc>
9249 Filter name. See <link to="IUSBDeviceFilter::name"/>
9250 for more info.
9251 </desc>
9252 </param>
9253 <param name="filter" type="IUSBDeviceFilter" dir="return">
9254 <desc>Created filter object.</desc>
9255 </param>
9256 </method>
9257
9258 <method name="insertDeviceFilter">
9259 <desc>
9260 Inserts the given USB device to the specified position
9261 in the list of filters.
9262
9263 Positions are numbered starting from <tt>0</tt>. If the specified
9264 position is equal to or greater than the number of elements in
9265 the list, the filter is added to the end of the collection.
9266
9267 <note>
9268 Duplicates are not allowed, so an attempt to insert a
9269 filter that is already in the collection, will return an
9270 error.
9271 </note>
9272
9273 <see>#deviceFilters</see>
9274 </desc>
9275 <param name="position" type="unsigned long" dir="in">
9276 <desc>Position to insert the filter to.</desc>
9277 </param>
9278 <param name="filter" type="IUSBDeviceFilter" dir="in">
9279 <desc>USB device filter to insert.</desc>
9280 </param>
9281 </method>
9282
9283 <method name="removeDeviceFilter">
9284 <desc>
9285 Removes a USB device filter from the specified position in the
9286 list of filters.
9287
9288 Positions are numbered starting from <tt>0</tt>. Specifying a
9289 position equal to or greater than the number of elements in
9290 the list will produce an error.
9291
9292 <see>#deviceFilters</see>
9293 </desc>
9294 <param name="position" type="unsigned long" dir="in">
9295 <desc>Position to remove the filter from.</desc>
9296 </param>
9297 <param name="filter" type="IUSBDeviceFilter" dir="return">
9298 <desc>Removed USB device filter.</desc>
9299 </param>
9300 </method>
9301
9302 </interface>
9303
9304
9305 <!--
9306 // IUSBDevice
9307 /////////////////////////////////////////////////////////////////////////
9308 -->
9309
9310 <enumerator
9311 name="IUSBDeviceEnumerator" type="IUSBDevice"
9312 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
9313 />
9314
9315 <collection
9316 name="IUSBDeviceCollection" type="IUSBDevice"
9317 enumerator="IUSBDeviceEnumerator"
9318 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
9319 readonly="yes"
9320 >
9321 <method name="findById">
9322 <desc>
9323 Searches this collection for a USB device with the given UUID.
9324 <note>
9325 The method returns an error if the given UUID does not
9326 correspond to any USB device in the collection.
9327 </note>
9328 <see>IUSBDevice::id</see>
9329 </desc>
9330 <param name="id" type="uuid" dir="in">
9331 <desc>UUID of the USB device to search for.</desc>
9332 </param>
9333 <param name="device" type="IUSBDevice" dir="return">
9334 <desc>Found USB device object.</desc>
9335 </param>
9336 </method>
9337
9338 <method name="findByAddress">
9339 <desc>
9340 Searches this collection for a USB device with the given
9341 host address.
9342 <note>
9343 The method returns an error if the given address does not
9344 correspond to any USB device in the collection.
9345 </note>
9346 <see>IUSBDevice::address</see>
9347 </desc>
9348 <param name="name" type="wstring" dir="in">
9349 <desc>
9350 Address of the USB device (as assigned by the host) to
9351 search for.
9352 </desc>
9353 </param>
9354 <param name="device" type="IUSBDevice" dir="return">
9355 <desc>Found USB device object.</desc>
9356 </param>
9357 </method>
9358
9359 </collection>
9360
9361 <interface
9362 name="IUSBDevice" extends="$unknown"
9363 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
9364 wsmap="managed"
9365 >
9366 <desc>
9367 The IUSBDevice interface represents a virtual USB device attached to the
9368 virtual machine.
9369
9370 A collection of objects implementing this interface is stored in the
9371 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
9372 attached to a running virtual machine's USB controller.
9373 </desc>
9374
9375 <attribute name="id" type="uuid" readonly="yes">
9376 <desc>
9377 Unique USB device ID. This ID is built from #vendorId,
9378 #productId, #revision and #serialNumber.
9379 </desc>
9380 </attribute>
9381
9382 <attribute name="vendorId" type="unsigned short" readonly="yes">
9383 <desc>Vendor ID.</desc>
9384 </attribute>
9385
9386 <attribute name="productId" type="unsigned short" readonly="yes">
9387 <desc>Product ID.</desc>
9388 </attribute>
9389
9390 <attribute name="revision" type="unsigned short" readonly="yes">
9391 <desc>
9392 Product revision number. This is a packed BCD represented as
9393 unsigned short. The high byte is the integer part and the low
9394 byte is the decimal.
9395 </desc>
9396 </attribute>
9397
9398 <attribute name="manufacturer" type="wstring" readonly="yes">
9399 <desc>Manufacturer string.</desc>
9400 </attribute>
9401
9402 <attribute name="product" type="wstring" readonly="yes">
9403 <desc>Product string.</desc>
9404 </attribute>
9405
9406 <attribute name="serialNumber" type="wstring" readonly="yes">
9407 <desc>Serial number string.</desc>
9408 </attribute>
9409
9410 <attribute name="address" type="wstring" readonly="yes">
9411 <desc>Host specific address of the device.</desc>
9412 </attribute>
9413
9414 <attribute name="port" type="unsigned short" readonly="yes">
9415 <desc>
9416 Host USB port number the device is physically
9417 connected to.
9418 </desc>
9419 </attribute>
9420
9421 <attribute name="version" type="unsigned short" readonly="yes">
9422 <desc>
9423 The major USB version of the device - 1 or 2.
9424 </desc>
9425 </attribute>
9426
9427 <attribute name="portVersion" type="unsigned short" readonly="yes">
9428 <desc>
9429 The major USB version of the host USB port the device is
9430 physically connected to - 1 or 2. For devices not connected to
9431 anything this will have the same value as the version attribute.
9432 </desc>
9433 </attribute>
9434
9435 <attribute name="remote" type="boolean" readonly="yes">
9436 <desc>
9437 Whether the device is physically connected to a remote VRDP
9438 client or to a local host machine.
9439 </desc>
9440 </attribute>
9441
9442 </interface>
9443
9444
9445 <!--
9446 // IUSBDeviceFilter
9447 /////////////////////////////////////////////////////////////////////////
9448 -->
9449
9450 <enumerator
9451 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
9452 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
9453 />
9454
9455 <collection
9456 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
9457 enumerator="IUSBDeviceFilterEnumerator"
9458 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
9459 readonly="yes"
9460 />
9461
9462 <interface
9463 name="IUSBDeviceFilter" extends="$unknown"
9464 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
9465 wsmap="managed"
9466 >
9467 <desc>
9468 The IUSBDeviceFilter interface represents an USB device filter used
9469 to perform actions on a group of USB devices.
9470
9471 This type of filters is used by running virtual machines to
9472 automatically capture selected USB devices once they are physically
9473 attached to the host computer.
9474
9475 A USB device is matched to the given device filter if and only if all
9476 attributes of the device match the corresponding attributes of the
9477 filter (that is, attributes are joined together using the logical AND
9478 operation). On the other hand, all together, filters in the list of
9479 filters carry the semantics of the logical OR operation. So if it is
9480 desirable to create a match like "this vendor id OR this product id",
9481 one needs to create two filters and specify "any match" (see below)
9482 for unused attributes.
9483
9484 All filter attributes used for matching are strings. Each string
9485 is an expression representing a set of values of the corresponding
9486 device attribute, that will match the given filter. Currently, the
9487 following filtering expressions are supported:
9488
9489 <ul>
9490 <li><i>Interval filters</i>. Used to specify valid intervals for
9491 integer device attributes (Vendor ID, Product ID and Revision).
9492 The format of the string is:
9493
9494 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
9495
9496 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
9497 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
9498 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
9499 is omitted before a dash (<tt>-</tt>), the minimum possible integer
9500 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
9501 possible integer is assumed.
9502 </li>
9503 <li><i>Boolean filters</i>. Used to specify acceptable values for
9504 boolean device attributes. The format of the string is:
9505
9506 <tt>true|false|yes|no|0|1</tt>
9507
9508 </li>
9509 <li><i>Exact match</i>. Used to specify a single value for the given
9510 device attribute. Any string that doesn't start with <tt>int:</tt>
9511 represents the exact match. String device attributes are compared to
9512 this string including case of symbols. Integer attributes are first
9513 converted to a string (see individual filter attributes) and then
9514 compared ignoring case.
9515
9516 </li>
9517 <li><i>Any match</i>. Any value of the corresponding device attribute
9518 will match the given filter. An empty or <tt>null</tt> string is
9519 used to construct this type of filtering expressions.
9520
9521 </li>
9522 </ul>
9523
9524 <note>
9525 On the Windows host platform, interval filters are not currently
9526 available. Also all string filter attributes
9527 (<link to="#manufacturer"/>, <link to="#product"/>,
9528 <link to="#serialNumber"/>) are ignored, so they behave as
9529 <i>any match</i> no matter what string expression is specified.
9530 </note>
9531
9532 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
9533 </desc>
9534
9535 <attribute name="name" type="wstring">
9536 <desc>
9537 Visible name for this filter.
9538 This name is used to visually distinguish one filter from another,
9539 so it can neither be <tt>null</tt> nor an empty string.
9540 </desc>
9541 </attribute>
9542
9543 <attribute name="active" type="boolean">
9544 <desc>Whether this filter active or has been temporarily disabled.</desc>
9545 </attribute>
9546
9547 <attribute name="vendorId" type="wstring">
9548 <desc>
9549 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
9550 The string representation for the <i>exact matching</i>
9551 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9552 (including leading zeroes).
9553 </desc>
9554 </attribute>
9555
9556 <attribute name="productId" type="wstring">
9557 <desc>
9558 <link to="IUSBDevice::productId">Product ID</link> filter.
9559 The string representation for the <i>exact matching</i>
9560 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9561 (including leading zeroes).
9562 </desc>
9563 </attribute>
9564
9565 <attribute name="revision" type="wstring">
9566 <desc>
9567 <link to="IUSBDevice::productId">Product revision number</link>
9568 filter. The string representation for the <i>exact matching</i>
9569 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
9570 of the integer part of the revision, and <tt>F</tt> is the
9571 decimal digit of its fractional part (including leading and
9572 trailing zeros).
9573 Note that for interval filters, it's best to use the hexadecimal
9574 form, because the revision is stored as a 16 bit packed BCD value;
9575 so the expression <tt>int:0x0100-0x0199</tt> will match any
9576 revision from <tt>1.0</tt> to <tt>1.99</tt>.
9577 </desc>
9578 </attribute>
9579
9580 <attribute name="manufacturer" type="wstring">
9581 <desc>
9582 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
9583 </desc>
9584 </attribute>
9585
9586 <attribute name="product" type="wstring">
9587 <desc>
9588 <link to="IUSBDevice::product">Product</link> filter.
9589 </desc>
9590 </attribute>
9591
9592 <attribute name="serialNumber" type="wstring">
9593 <desc>
9594 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
9595 </desc>
9596 </attribute>
9597
9598 <attribute name="port" type="wstring">
9599 <desc>
9600 <link to="IUSBDevice::port">Host USB port</link> filter.
9601 </desc>
9602 </attribute>
9603
9604 <attribute name="remote" type="wstring">
9605 <desc>
9606 <link to="IUSBDevice::remote">Remote state</link> filter.
9607 <note>
9608 This filter makes sense only for machine USB filters,
9609 i.e. it is ignored by IHostUSBDeviceFilter objects.
9610 </note>
9611 </desc>
9612 </attribute>
9613
9614 <attribute name="maskedInterfaces" type="unsigned long">
9615 <desc>
9616 This is an advanced option for hiding one or more USB interfaces
9617 from the guest. The value is a bit mask where the bits that are set
9618 means the corresponding USB interface should be hidden, masked off
9619 if you like.
9620 This feature only works on Linux hosts.
9621 </desc>
9622 </attribute>
9623
9624 </interface>
9625
9626
9627 <!--
9628 // IHostUSBDevice
9629 /////////////////////////////////////////////////////////////////////////
9630 -->
9631
9632 <enum
9633 name="USBDeviceState"
9634 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
9635 >
9636 <desc>
9637 USB device state. This enumeration represents all possible states
9638 of the USB device physically attached to the host computer regarding
9639 its state on the host computer and availability to guest computers
9640 (all currently running virtual machines).
9641
9642 Once a supported USB device is attached to the host, global USB
9643 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
9644 either ignore the device, or put it to #Held state, or do nothing. Unless
9645 the device is ignored by global filters, filters of all currently running
9646 guests (<link to="IUSBController::deviceFilters"/>) are activated that can
9647 put it to #Captured state.
9648
9649 If the device was ignored by global filters, or didn't match
9650 any filters at all (including guest ones), it is handled by the host
9651 in a normal way. In this case, the device state is determined by
9652 the host and can be one of #Unavailable, #Busy or #Available, depending on
9653 the current device usage.
9654
9655 Besides auto-capturing based on filters, the device can be manually
9656 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
9657 state is #Busy, #Available or #Held.
9658
9659 <note>
9660 Due to differences in USB stack implementations in Linux and Win32,
9661 states #Busy and #Available are applicable only to the Linux version of
9662 the product. This also means that (<link
9663 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if
9664 the device state is #Held.
9665 </note>
9666
9667 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
9668 </desc>
9669
9670 <const name="NotSupported" value="0">
9671 <desc>
9672 Not supported by the VirtualBox server, not available to guests.
9673 </desc>
9674 </const>
9675 <const name="Unavailable" value="1">
9676 <desc>
9677 Being used by the host computer exclusively,
9678 not available to guests.
9679 </desc>
9680 </const>
9681 <const name="Busy" value="2">
9682 <desc>
9683 Being used by the host computer, potentially available to guests.
9684 </desc>
9685 </const>
9686 <const name="Available" value="3">
9687 <desc>
9688 Not used by the host computer, available to guests.
9689 The host computer can also start using the device at any time.
9690 </desc>
9691 </const>
9692 <const name="Held" value="4">
9693 <desc>
9694 Held by the VirtualBox server (ignored by the host computer),
9695 available to guests.
9696 </desc>
9697 </const>
9698 <const name="Captured" value="5">
9699 <desc>
9700 Captured by one of the guest computers, not available
9701 to anybody else.
9702 </desc>
9703 </const>
9704 </enum>
9705
9706 <enumerator
9707 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
9708 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
9709 />
9710
9711 <collection
9712 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
9713 enumerator="IHostUSBDeviceEnumerator"
9714 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
9715 readonly="yes"
9716 >
9717 <method name="findById">
9718 <desc>
9719 Searches this collection for a USB device with the given UUID.
9720 <note>
9721 The method returns an error if the given UUID does not
9722 correspond to any USB device in the collection.
9723 </note>
9724 <see>IHostUSBDevice::id</see>
9725 </desc>
9726 <param name="id" type="uuid" dir="in">
9727 <desc>UUID of the USB device to search for.</desc>
9728 </param>
9729 <param name="device" type="IHostUSBDevice" dir="return">
9730 <desc>Found USB device object.</desc>
9731 </param>
9732 </method>
9733
9734 <method name="findByAddress">
9735 <desc>
9736 Searches this collection for a USB device with the given
9737 host address.
9738 <note>
9739 The method returns an error if the given address does not
9740 correspond to any USB device in the collection.
9741 </note>
9742 <see>IHostUSBDevice::address</see>
9743 </desc>
9744 <param name="name" type="wstring" dir="in">
9745 <desc>
9746 Address of the USB device (as assigned by the host) to
9747 search for.
9748 </desc>
9749 </param>
9750 <param name="device" type="IHostUSBDevice" dir="return">
9751 <desc>Found USB device object.</desc>
9752 </param>
9753 </method>
9754
9755 </collection>
9756
9757 <interface
9758 name="IHostUSBDevice" extends="IUSBDevice"
9759 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
9760 wsmap="managed"
9761 >
9762 <desc>
9763 The IHostUSBDevice interface represents a physical USB device attached
9764 to the host computer.
9765
9766 Besides properties inherited from IUSBDevice, this interface adds the
9767 <link to="#state"/> property that holds the current state of the USB
9768 device.
9769
9770 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
9771 </desc>
9772
9773 <attribute name="state" type="USBDeviceState" readonly="yes">
9774 <desc>
9775 Current state of the device.
9776 </desc>
9777 </attribute>
9778
9779 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
9780
9781 </interface>
9782
9783
9784 <!--
9785 // IHostUSBDeviceFilter
9786 /////////////////////////////////////////////////////////////////////////
9787 -->
9788
9789 <enum
9790 name="USBDeviceFilterAction"
9791 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
9792 >
9793 <desc>
9794 Actions for host USB device filters.
9795 <see>IHostUSBDeviceFilter, USBDeviceState</see>
9796 </desc>
9797
9798 <const name="Null" value="0">
9799 <desc><tt>null</tt> value. Never used by the API.</desc>
9800 </const>
9801 <const name="Ignore" value="1">
9802 <desc>Ignore the matched USB device.</desc>
9803 </const>
9804 <const name="Hold" value="2">
9805 <desc>Hold the matched USB device.</desc>
9806 </const>
9807 </enum>
9808
9809 <enumerator
9810 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
9811 uuid="ff735211-903e-4642-9c37-189eb44579fe"
9812 />
9813
9814 <collection
9815 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
9816 enumerator="IHostUSBDeviceFilterEnumerator"
9817 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
9818 readonly="yes"
9819 />
9820
9821 <interface
9822 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
9823 uuid="4cc70246-d74a-400f-8222-3900489c0374"
9824 wsmap="managed"
9825 >
9826 <desc>
9827 The IHostUSBDeviceFilter interface represents a global filter for a
9828 physical USB device used by the host computer. Used indirectly in
9829 <link to="IHost::USBDeviceFilters"/>.
9830
9831 Using filters of this type, the host computer determines the initial
9832 state of the USB device after it is physically attached to the
9833 host's USB controller.
9834
9835 <note>
9836 The <link to="#remote"/> attribute is ignored by this type of
9837 filters, because it makes sense only for
9838 <link to="IUSBController::deviceFilters">machine USB filters</link>.
9839 </note>
9840
9841 <see>IHost::USBDeviceFilters</see>
9842 </desc>
9843
9844 <attribute name="action" type="USBDeviceFilterAction">
9845 <desc>
9846 Action performed by the host when an attached USB device
9847 matches this filter.
9848 </desc>
9849 </attribute>
9850
9851 </interface>
9852
9853 <!--
9854 // IAudioAdapter
9855 /////////////////////////////////////////////////////////////////////////
9856 -->
9857
9858 <enum
9859 name="AudioDriverType"
9860 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
9861 >
9862 <desc>
9863 Host audio driver type.
9864 </desc>
9865
9866 <const name="Null" value="0">
9867 <desc><tt>null</tt> value. Also means "dummy audio driver".</desc>
9868 </const>
9869 <const name="WinMM" value="1"/>
9870 <const name="OSS" value="2"/>
9871 <const name="ALSA" value="3"/>
9872 <const name="DirectSound" value="4"/>
9873 <const name="CoreAudio" value="5"/>
9874 <const name="MMPM" value="6"/>
9875 <const name="Pulse" value="7"/>
9876 <const name="SolAudio" value="8"/>
9877 </enum>
9878
9879 <enum
9880 name="AudioControllerType"
9881 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
9882 >
9883 <desc>
9884 Virtual audio controller type.
9885 </desc>
9886
9887 <const name="AC97" value="0"/>
9888 <const name="SB16" value="1"/>
9889 </enum>
9890
9891 <interface
9892 name="IAudioAdapter" extends="$unknown"
9893 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
9894 wsmap="managed"
9895 >
9896 <desc>
9897 The IAudioAdapter interface represents the virtual audio adapter of
9898 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
9899 </desc>
9900 <attribute name="enabled" type="boolean">
9901 <desc>
9902 Flag whether the audio adapter is present in the
9903 guest system. If disabled, the virtual guest hardware will
9904 not contain any audio adapter. Can only be changed when
9905 the VM is not running.
9906 </desc>
9907 </attribute>
9908 <attribute name="audioController" type="AudioControllerType">
9909 <desc>
9910 The audio hardware we emulate.
9911 </desc>
9912 </attribute>
9913 <attribute name="audioDriver" type="AudioDriverType">
9914 <desc>
9915 Audio driver the adapter is connected to. This setting
9916 can only be changed when the VM is not running.
9917 </desc>
9918 </attribute>
9919 </interface>
9920
9921 <!--
9922 // IVRDPServer
9923 /////////////////////////////////////////////////////////////////////////
9924 -->
9925
9926 <enum
9927 name="VRDPAuthType"
9928 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
9929 >
9930 <desc>
9931 VRDP authentication type.
9932 </desc>
9933
9934 <const name="Null" value="0">
9935 <desc><tt>null</tt> value. Also means "no authentication".</desc>
9936 </const>
9937 <const name="External" value="1"/>
9938 <const name="Guest" value="2"/>
9939 </enum>
9940
9941 <interface
9942 name="IVRDPServer" extends="$unknown"
9943 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
9944 wsmap="managed"
9945 >
9946 <attribute name="enabled" type="boolean">
9947 <desc>VRDP server status.</desc>
9948 </attribute>
9949
9950 <attribute name="port" type="unsigned long">
9951 <desc>
9952 VRDP server port number.
9953 <note>
9954 Setting the value of this property to <tt>0</tt> will reset the port
9955 number to the default value which is
9956 currently <tt>3389</tt>. Reading this property will always return a
9957 real port number, even after it has been set to <tt>0</tt> (in which
9958 case the default port is returned).
9959 </note>
9960 </desc>
9961 </attribute>
9962
9963 <attribute name="netAddress" type="wstring">
9964 <desc>VRDP server address.</desc>
9965 </attribute>
9966
9967 <attribute name="authType" type="VRDPAuthType">
9968 <desc>VRDP authentication method.</desc>
9969 </attribute>
9970
9971 <attribute name="authTimeout" type="unsigned long">
9972 <desc>Timeout for guest authentication. Milliseconds.</desc>
9973 </attribute>
9974
9975 <attribute name="allowMultiConnection" type="boolean">
9976 <desc>
9977 Flag whether multiple simultaneous connections to the VM are permitted.
9978 Note that this will be replaced by a more powerful mechanism in the future.
9979 </desc>
9980 </attribute>
9981
9982 <attribute name="reuseSingleConnection" type="boolean">
9983 <desc>
9984 Flag whether the existing connection must be dropped and a new connection
9985 must be established by the VRDP server, when a new client connects in single
9986 connection mode.
9987 </desc>
9988 </attribute>
9989
9990 </interface>
9991
9992
9993 <!--
9994 // ISharedFolder
9995 /////////////////////////////////////////////////////////////////////////
9996 -->
9997
9998 <enumerator
9999 name="ISharedFolderEnumerator" type="ISharedFolder"
10000 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
10001 />
10002
10003 <collection
10004 name="ISharedFolderCollection" type="ISharedFolder"
10005 enumerator="ISharedFolderEnumerator"
10006 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
10007 readonly="yes">
10008
10009 <method name="findByName">
10010 <desc>
10011 Searches this collection for a shared folder with the given logical
10012 name.
10013 <note>
10014 The method returns an error if the given name does not correspond to
10015 any shared folder in the collection.
10016 </note>
10017 </desc>
10018 <param name="name" type="wstring" dir="in">
10019 <desc>Logical name of the shared folder to search for</desc>
10020 </param>
10021 <param name="sharedFolder" type="ISharedFolder" dir="return">
10022 <desc>Found shared folder object</desc>
10023 </param>
10024 </method>
10025
10026 </collection>
10027
10028 <interface
10029 name="ISharedFolder" extends="$unknown"
10030 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
10031 wsmap="struct"
10032 >
10033 <desc>
10034 The ISharedFolder interface represents a folder in the host computer's
10035 file system accessible from the guest OS running inside a virtual
10036 machine using an associated logical name.
10037
10038 There are three types of shared folders:
10039 <ul>
10040 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
10041 folders available to all virtual machines.</li>
10042 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
10043 VM-specific shared folders available to the given virtual machine at
10044 startup.</li>
10045 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
10046 VM-specific shared folders created in the session context (for
10047 example, when the virtual machine is running) and automatically
10048 discarded when the session is closed (the VM is powered off).</li>
10049 </ul>
10050
10051 Logical names of shared folders must be unique within the given scope
10052 (global, permanent or transient). However, they do not need to be unique
10053 across scopes. In this case, the definition of the shared folder in a
10054 more specific scope takes precedence over definitions in all other
10055 scopes. The order of precedence is (more specific to more general):
10056 <ol>
10057 <li>Transient definitions</li>
10058 <li>Permanent definitions</li>
10059 <li>Global definitions</li>
10060 </ol>
10061
10062 For example, if MyMachine has a shared folder named
10063 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
10064 transient shared folder named <tt>C_DRIVE</tt> (that points
10065 to <tt>C:\\\\WINDOWS</tt>) will change the definition
10066 of <tt>C_DRIVE</tt> in the guest OS so
10067 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
10068 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
10069 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
10070 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
10071 to <tt>C:\\</tt> if it still exists.
10072
10073 Note that permanent and transient shared folders of different machines
10074 are in different name spaces, so they don't overlap and don't need to
10075 have unique logical names.
10076
10077 <note>
10078 Global shared folders are not implemented in the current version of the
10079 product.
10080 </note>
10081 </desc>
10082
10083 <attribute name="name" type="wstring" readonly="yes">
10084 <desc>Logical name of the shared folder.</desc>
10085 </attribute>
10086
10087 <attribute name="hostPath" type="wstring" readonly="yes">
10088 <desc>Full path to the shared folder in the host file system.</desc>
10089 </attribute>
10090
10091 <attribute name="accessible" type="boolean" readonly="yes">
10092 <desc>
10093 Whether the folder defined by the host path is currently
10094 accessible or not.
10095 For example, the folder can be unaccessible if it is placed
10096 on the network share that is not available by the time
10097 this property is read.
10098 </desc>
10099 </attribute>
10100
10101 <attribute name="writable" type="boolean" readonly="yes">
10102 <desc>
10103 Whether the folder defined by the host path is writable or
10104 not.
10105 </desc>
10106 </attribute>
10107
10108 </interface>
10109
10110 <!--
10111 // ISession
10112 /////////////////////////////////////////////////////////////////////////
10113 -->
10114
10115 <interface
10116 name="IInternalSessionControl" extends="$unknown"
10117 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
10118 internal="yes"
10119 wsmap="suppress"
10120 >
10121 <method name="getPID">
10122 <desc>PID of the process that has created this Session object.
10123 </desc>
10124 <param name="pid" type="unsigned long" dir="return"/>
10125 </method>
10126
10127 <method name="getRemoteConsole">
10128 <desc>Returns the console object suitable for remote control.</desc>
10129 <param name="console" type="IConsole" dir="return"/>
10130 </method>
10131
10132 <method name="assignMachine">
10133 <desc>
10134 Assigns the machine object associated with this direct-type
10135 session or informs the session that it will be a remote one
10136 (if machine = NULL).
10137 </desc>
10138 <param name="machine" type="IMachine" dir="in"/>
10139 </method>
10140
10141 <method name="assignRemoteMachine">
10142 <desc>
10143 Assigns the machine and the (remote) console object associated with
10144 this remote-type session.
10145 </desc>
10146 <param name="machine" type="IMachine" dir="in"/>
10147 <param name="console" type="IConsole" dir="in"/>
10148 </method>
10149
10150 <method name="updateMachineState">
10151 <desc>
10152 Updates the machine state in the VM process.
10153 Must be called only in certain cases
10154 (see the method implementation).
10155 </desc>
10156 <param name="aMachineState" type="MachineState" dir="in"/>
10157 </method>
10158
10159 <method name="uninitialize">
10160 <desc>
10161 Uninitializes (closes) this session. Used by VirtualBox to close
10162 the corresponding remote session when the direct session dies
10163 or gets closed.
10164 </desc>
10165 </method>
10166
10167 <method name="onDVDDriveChange">
10168 <desc>
10169 Triggered when settings of the DVD drive object of the
10170 associated virtual machine have changed.
10171 </desc>
10172 </method>
10173
10174 <method name="onFloppyDriveChange">
10175 <desc>
10176 Triggered when settings of the floppy drive object of the
10177 associated virtual machine have changed.
10178 </desc>
10179 </method>
10180
10181 <method name="onNetworkAdapterChange">
10182 <desc>
10183 Triggered when settings of a network adapter of the
10184 associated virtual machine have changed.
10185 </desc>
10186 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
10187 </method>
10188
10189 <method name="onSerialPortChange">
10190 <desc>
10191 Triggered when settings of a serial port of the
10192 associated virtual machine have changed.
10193 </desc>
10194 <param name="serialPort" type="ISerialPort" dir="in"/>
10195 </method>
10196
10197 <method name="onParallelPortChange">
10198 <desc>
10199 Triggered when settings of a parallel port of the
10200 associated virtual machine have changed.
10201 </desc>
10202 <param name="parallelPort" type="IParallelPort" dir="in"/>
10203 </method>
10204
10205 <method name="onVRDPServerChange">
10206 <desc>
10207 Triggered when settings of the VRDP server object of the
10208 associated virtual machine have changed.
10209 </desc>
10210 </method>
10211
10212 <method name="onUSBControllerChange">
10213 <desc>
10214 Triggered when settings of the USB controller object of the
10215 associated virtual machine have changed.
10216 </desc>
10217 </method>
10218
10219 <method name="onSharedFolderChange">
10220 <desc>
10221 Triggered when a permanent (global or machine) shared folder has been
10222 created or removed.
10223 <note>
10224 We don't pass shared folder parameters in this notification because
10225 the order in which parallel notifications are delivered is not defined,
10226 therefore it could happen that these parameters were outdated by the
10227 time of processing this notification.
10228 </note>
10229 </desc>
10230 <param name="global" type="boolean" dir="in"/>
10231 </method>
10232
10233 <method name="onUSBDeviceAttach">
10234 <desc>
10235 Triggered when a request to capture a USB device (as a result
10236 of matched USB filters or direct call to
10237 <link to="IConsole::attachUSBDevice"/>) has completed.
10238 A @c null @a error object means success, otherwise it
10239 describes a failure.
10240 </desc>
10241 <param name="device" type="IUSBDevice" dir="in"/>
10242 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
10243 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
10244 </method>
10245
10246 <method name="onUSBDeviceDetach">
10247 <desc>
10248 Triggered when a request to release the USB device (as a result
10249 of machine termination or direct call to
10250 <link to="IConsole::detachUSBDevice"/>) has completed.
10251 A @c null @a error object means success, otherwise it
10252 </desc>
10253 <param name="id" type="uuid" dir="in"/>
10254 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
10255 </method>
10256
10257 <method name="onShowWindow">
10258 <desc>
10259 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
10260 <link to="IMachine::showConsoleWindow()"/> in order to notify
10261 console callbacks
10262 <link to="IConsoleCallback::onCanShowWindow()"/>
10263 and <link to="IConsoleCallback::onShowWindow()"/>.
10264 </desc>
10265 <param name="check" type="boolean" dir="in"/>
10266 <param name="canShow" type="boolean" dir="out"/>
10267 <param name="winId" type="unsigned long long" dir="out"/>
10268 </method>
10269
10270 <method name="accessGuestProperty">
10271 <desc>
10272 Called by <link to="IMachine::getGuestProperty()"/> and by
10273 <link to="IMachine::setGuestProperty()"/> in order to read and
10274 modify guest properties.
10275 </desc>
10276 <param name="name" type="wstring" dir="in"/>
10277 <param name="value" type="wstring" dir="in"/>
10278 <param name="flags" type="wstring" dir="in"/>
10279 <param name="isSetter" type="boolean" dir="in"/>
10280 <param name="retValue" type="wstring" dir="out"/>
10281 <param name="retTimestamp" type="unsigned long long" dir="out"/>
10282 <param name="retFlags" type="wstring" dir="out"/>
10283 </method>
10284
10285 <method name="enumerateGuestProperties">
10286 <desc>
10287 Return a list of the guest properties matching a set of patterns along
10288 with their values, time stamps and flags.
10289 </desc>
10290 <param name="patterns" type="wstring" dir="in">
10291 <desc>
10292 The patterns to match the properties against as a comma-separated
10293 string. If this is empty, all properties currently set will be
10294 returned.
10295 </desc>
10296 </param>
10297 <param name="key" type="wstring" dir="out" safearray="yes">
10298 <desc>
10299 The key names of the properties returned.
10300 </desc>
10301 </param>
10302 <param name="value" type="wstring" dir="out" safearray="yes">
10303 <desc>
10304 The values of the properties returned. The array entries match the
10305 corresponding entries in the @a key array.
10306 </desc>
10307 </param>
10308 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
10309 <desc>
10310 The time stamps of the properties returned. The array entries match
10311 the corresponding entries in the @a key array.
10312 </desc>
10313 </param>
10314 <param name="flags" type="wstring" dir="out" safearray="yes">
10315 <desc>
10316 The flags of the properties returned. The array entries match the
10317 corresponding entries in the @a key array.
10318 </desc>
10319 </param>
10320 </method>
10321
10322 </interface>
10323
10324 <interface
10325 name="ISession" extends="$dispatched"
10326 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
10327 wsmap="managed"
10328 >
10329 <desc>
10330 The ISession interface represents a serialization primitive for virtual
10331 machines.
10332
10333 With VirtualBox, every time one wishes to manipulate a virtual machine
10334 (e.g. change its settings or start execution), a session object is
10335 required. Such an object must be passed to one of the session methods
10336 that open the given session, which then initiates the machine manipulation.
10337
10338 A session serves several purposes: it identifies to the inter-process VirtualBox
10339 code which process is currently working with the virtual machine, and it ensures
10340 that there are no incompatible requests from several processes for the
10341 same virtual machine. Session objects can therefore be thought of as mutex
10342 semaphores that lock virtual machines to prevent conflicting accesses from
10343 several processes.
10344
10345 How sessions objects are used depends on whether you use the Main API
10346 via COM or via the webservice:
10347
10348 <ul>
10349 <li>When using the COM API directly, an object of the Session class from the
10350 VirtualBox type library needs to be created. In regular COM C++ client code,
10351 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
10352 This object will then act as a local session object in further calls to open
10353 a session.
10354 </li>
10355
10356 <li>In the webservice, the session manager (IWebsessionManager) instead creates
10357 one session object automatically when <link to="IWebsessionManager::logon" />
10358 is called. A managed object reference to that session object can be retrieved by
10359 calling <link to="IWebsessionManager::getSessionObject" />. This session object
10360 reference can then be used to open sessions.
10361 </li>
10362 </ul>
10363
10364 Sessions are mainly used in two variations:
10365
10366 <ul>
10367 <li>
10368 To start a virtual machine in a separate process, one would call
10369 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
10370 object as its first parameter. This session then identifies the caller
10371 and lets him control the started machine (for example, pause machine
10372 execution or power it down) as well as be notified about machine
10373 execution state changes.
10374 </li>
10375
10376 <li>To alter machine settings, or to start machine execution within the
10377 current process, one needs to open a direct session for the machine first by
10378 calling <link to="IVirtualBox::openSession"/>. While a direct session
10379 is open within one process, no any other process may open another direct
10380 session for the same machine. This prevents the machine from being changed
10381 by other processes while it is running or while the machine is being configured.
10382 </li>
10383 </ul>
10384
10385 One also can attach to an existing direct session already opened by
10386 another process (for example, in order to send a control request to the
10387 virtual machine such as the pause or the reset request). This is done by
10388 calling <link to="IVirtualBox::openExistingSession"/>.
10389
10390 <note>
10391 Unless you are trying to write a new VirtualBox front-end that
10392 performs direct machine execution (like the VirtualBox or VBoxSDL
10393 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
10394 session opened by <link to="IVirtualBox::openSession"/> and use this
10395 session only to change virtual machine settings. If you simply want to
10396 start virtual machine execution using one of the existing front-ends
10397 (for example the VirtualBox GUI or headless server), simply use
10398 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
10399 will power up the machine automatically for you.
10400 </note>
10401 </desc>
10402
10403 <attribute name="state" type="SessionState" readonly="yes">
10404 <desc>Current state of this session.</desc>
10405 </attribute>
10406
10407 <attribute name="type" type="SessionType" readonly="yes">
10408 <desc>
10409 Type of this session. The value of this attribute is valid only
10410 if the session is currently open (i.e. its #state is SessionType::SessionOpen),
10411 otherwise an error will be returned.
10412 </desc>
10413 </attribute>
10414
10415 <attribute name="machine" type="IMachine" readonly="yes">
10416 <desc>Machine object associated with this session.</desc>
10417 </attribute>
10418
10419 <attribute name="console" type="IConsole" readonly="yes">
10420 <desc>Console object associated with this session.</desc>
10421 </attribute>
10422
10423 <method name="close">
10424 <desc>
10425 Closes a session that was previously opened.
10426
10427 It is recommended that every time an "open session" method (such as
10428 <link to="IVirtualBox::openRemoteSession" /> or
10429 <link to="IVirtualBox::openSession" />) has been called to
10430 manipulate a virtual machine, the caller invoke
10431 ISession::close() when it's done doing so. Since sessions are
10432 serialization primitives much like ordinary mutexes, they are
10433 best used the same way: for each "open" call, there should be
10434 a matching "close" call, even when errors occur.
10435
10436 Otherwise, if a direct session for a machine opened with
10437 <link to="IVirtualBox::openSession()"/> is not explicitly closed
10438 when the application terminates, the state of the machine will
10439 be set to <link to="MachineState::Aborted" /> on the server.
10440
10441 Generally, it is recommended to close all open sessions explicitly
10442 before terminating the application (no matter what is the reason of
10443 the termination).
10444
10445 <note>
10446 Do not expect the session state (<link to="ISession::state" />
10447 to return to "Closed" immediately after you invoke
10448 ISession::close(), particularly if you have started a remote
10449 session to execute the VM in a new process. The session state will
10450 automatically return to "Closed" once the VM is no longer executing,
10451 which can of course take a very long time.
10452 </note>
10453 </desc>
10454 </method>
10455
10456 </interface>
10457
10458 <!--
10459 // ISATAController
10460 /////////////////////////////////////////////////////////////////////////
10461 -->
10462
10463 <interface
10464 name="ISATAController" extends="$unknown"
10465 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
10466 wsmap="managed"
10467 >
10468 <attribute name="enabled" type="boolean">
10469 <desc>
10470 Flag whether the SATA controller is present in the
10471 guest system. If disabled, the virtual guest hardware will
10472 not contain any SATA controller. Can only be changed when
10473 the VM is powered off.
10474 </desc>
10475 </attribute>
10476
10477 <attribute name="portCount" type="unsigned long">
10478 <desc>
10479 The number of usable ports on the SATA controller.
10480 It ranges from 1 to 30.
10481 </desc>
10482 </attribute>
10483
10484 <method name="GetIDEEmulationPort">
10485 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc>
10486 <param name="devicePosition" type="long" dir="in"/>
10487 <param name="portNumber" type="long" dir="return"/>
10488 </method>
10489
10490 <method name="SetIDEEmulationPort">
10491 <desc>Sets the port number which is emulated as an IDE device.</desc>
10492 <param name="devicePosition" type="long" dir="in"/>
10493 <param name="portNumber" type="long" dir="in"/>
10494 </method>
10495
10496 </interface>
10497
10498<if target="wsdl">
10499
10500 <!--
10501 // IManagedObjectRef
10502 /////////////////////////////////////////////////////////////////////////
10503 -->
10504
10505 <interface
10506 name="IManagedObjectRef" extends="$unknown"
10507 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
10508 internal="yes"
10509 wsmap="managed"
10510 wscpp="hardcoded"
10511 >
10512 <desc>
10513 Managed object reference.
10514
10515 Only within the webservice, a managed object reference (which is really
10516 an opaque number) allows a webservice client to address an object
10517 that lives in the address space of the webservice server.
10518
10519 Behind each managed object reference, there is a COM object that lives
10520 in the webservice server's address space. The COM object is not freed
10521 until the managed object reference is released, either by an explicit
10522 call to <link to="IManagedObjectRef::release" /> or by logging off from
10523 the webservice (<link to="IWebsessionManager::logoff" />), which releases
10524 all objects created during the webservice session.
10525
10526 Whenever a method call of the VirtualBox API returns a COM object, the
10527 webservice representation of that method will instead return a
10528 managed object reference, which can then be used to invoke methods
10529 on that object.
10530 </desc>
10531
10532 <method name="getInterfaceName">
10533 <desc>
10534 Returns the name of the interface that this managed object represents,
10535 for example, "IMachine", as a string.
10536 </desc>
10537 <param name="return" type="wstring" dir="return"/>
10538 </method>
10539
10540 <method name="release">
10541 <desc>
10542 Releases this managed object reference and frees the resources that
10543 were allocated for it in the webservice server process. After calling
10544 this method, the identifier of the reference can no longer be used.
10545 </desc>
10546 </method>
10547
10548 </interface>
10549
10550 <!--
10551 // IWebsessionManager
10552 /////////////////////////////////////////////////////////////////////////
10553 -->
10554
10555 <interface
10556 name="IWebsessionManager" extends="$unknown"
10557 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
10558 internal="yes"
10559 wsmap="global"
10560 wscpp="hardcoded"
10561 >
10562 <desc>
10563 Websession manager. This provides essential services
10564 to webservice clients.
10565 </desc>
10566 <method name="logon">
10567 <desc>
10568 Logs a new client onto the webservice and returns a managed object reference to
10569 the IVirtualBox instance, which the client can then use as a basis to further
10570 queries, since all calls to the VirtualBox API are based on the IVirtualBox
10571 interface, in one way or the other.
10572 </desc>
10573 <param name="username" type="wstring" dir="in"/>
10574 <param name="password" type="wstring" dir="in"/>
10575 <param name="return" type="IVirtualBox" dir="return"/>
10576 </method>
10577
10578 <method name="getSessionObject">
10579 <desc>
10580 Returns a managed object reference to the internal ISession object that was created
10581 for this web service session when the client logged on.
10582
10583 <see>ISession</see>
10584 </desc>
10585 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10586 <param name="return" type="ISession" dir="return"/>
10587 </method>
10588
10589 <method name="logoff">
10590 <desc>
10591 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
10592 and destroys all resources associated with the session (most importantly, all
10593 managed objects created in the server while the session was active).
10594 </desc>
10595 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10596 </method>
10597
10598 </interface>
10599
10600</if>
10601
10602 <!--
10603 // IPerformanceCollector & friends
10604 /////////////////////////////////////////////////////////////////////////
10605 -->
10606
10607 <interface
10608 name="IPerformanceMetric" extends="$unknown"
10609 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
10610 >
10611 <desc>
10612 The IPerformanceMetric interface represents parameters of the given
10613 performance metric.
10614 </desc>
10615
10616 <attribute name="metricName" type="wstring" readonly="yes">
10617 <desc>
10618 Name of the metric.
10619 </desc>
10620 </attribute>
10621
10622 <attribute name="object" type="$unknown" readonly="yes">
10623 <desc>
10624 Object this metric belongs to.
10625 </desc>
10626 </attribute>
10627
10628 <attribute name="description" type="wstring" readonly="yes">
10629 <desc>
10630 Textual description of the metric.
10631 </desc>
10632 </attribute>
10633
10634 <attribute name="period" type="unsigned long" readonly="yes">
10635 <desc>
10636 Time interval between samples, measured in seconds.
10637 </desc>
10638 </attribute>
10639
10640 <attribute name="count" type="unsigned long" readonly="yes">
10641 <desc>
10642 Number of recent samples retained by the performance collector for this
10643 metric.
10644
10645 When the collected sample count exceeds this number, older samples
10646 are discarded.
10647 </desc>
10648 </attribute>
10649
10650 <attribute name="unit" type="wstring" readonly="yes">
10651 <desc>
10652 Unit of measurement.
10653 </desc>
10654 </attribute>
10655
10656 <attribute name="minimumValue" type="long" readonly="yes">
10657 <desc>
10658 Minimum possible value of this metric.
10659 </desc>
10660 </attribute>
10661
10662 <attribute name="maximumValue" type="long" readonly="yes">
10663 <desc>
10664 Maximum possible value of this metric.
10665 </desc>
10666 </attribute>
10667 </interface>
10668
10669 <interface
10670 name="IPerformanceCollector" extends="$unknown"
10671 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
10672 wsmap="managed"
10673 >
10674 <desc>
10675 The IPerformanceCollector interface represents a service that collects and
10676 stores performance metrics data.
10677
10678 Performance metrics are associated with objects like IHost and
10679 IMachine. Each object has a distinct set of performance metrics.
10680 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
10681
10682 Metric data are collected at the specified intervals and are retained
10683 internally. The interval and the number of samples retained can be set
10684 with <link to="IPerformanceCollector::setupMetrics" />.
10685
10686 Metrics are organized hierarchically, each level separated by slash (/).
10687 General scheme for metric name is
10688 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
10689 metric name stands for: CPU category, Load metric, User submetric, average
10690 aggregate. An aggregate function is computed over all retained data. Valid
10691 aggregate functions are:
10692
10693 <ul>
10694 <li>avg -- average</li>
10695 <li>min -- minimum</li>
10696 <li>max -- maximum</li>
10697 </ul>
10698
10699 "Category/Metric" together form base metric name. A base metric is the
10700 smallest unit for which a sampling interval and the number of retained
10701 samples can be set. Only base metrics can be enabled and disabled. All
10702 sub-metrics are collected when their base metric is collected.
10703 Collected values for any set of sub-metrics can be queried with
10704 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
10705 metric parameters, querying metric data, enabling or disabling metrics
10706 wildcards can be used in metric names to specify a subset of metrics. For
10707 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
10708 averages can be queried using <tt>*:avg</tt> and so on. To query metric
10709 values without aggregates <tt>*:</tt> can be used.
10710
10711 The valid names for base metrics are:
10712
10713 <ul>
10714 <li>CPU/Load</li>
10715 <li>CPU/MHz</li>
10716 <li>RAM/Usage</li>
10717 </ul>
10718
10719 The general sequence for collecting and retrieving the metrics is:
10720 <ul>
10721 <li>
10722 Obtain an instance of IPerformanceCollector with
10723 <link to="IVirtualBox::performanceCollector" />
10724 </li>
10725 <li>
10726 Allocate and populate an array with references to objects the metrics
10727 will be collected for. Use references to IHost and IMachine objects.
10728 </li>
10729 <li>
10730 Allocate and populate an array with base metric names the data will be
10731 collected for.
10732 </li>
10733 <li>
10734 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
10735 metric data will be collected and stored.
10736 </li>
10737 <li>
10738 Wait for the data to get collected.
10739 </li>
10740 <li>
10741 Allocate and populate an array with references to objects the metric
10742 values will be queried for. You can re-use the object array used for
10743 setting base metrics.
10744 </li>
10745 <li>
10746 Allocate and populate an array with metric names the data will be
10747 collected for. Note that metric names differ from base metric names.
10748 </li>
10749 <li>
10750 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
10751 have been collected so far are returned. Note that the values are still
10752 retained internally and data collection continues.
10753 </li>
10754 </ul>
10755
10756 For an example of usage refer to the following files in VirtualBox SDK:
10757 <ul>
10758 <li>
10759 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
10760 </li>
10761 <li>
10762 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
10763 </li>
10764 </ul>
10765 </desc>
10766
10767 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
10768 <desc>
10769 Array of unique names of metrics.
10770
10771 This array represents all metrics supported by the performance
10772 collector. Individual objects do not necessarily support all of them.
10773 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
10774 list of supported metrics for a particular object.
10775 </desc>
10776 </attribute>
10777
10778 <method name="getMetrics">
10779 <desc>
10780 Returns parameters of specified metrics for a set of objects.
10781 <note>
10782 @c Null metrics array means all metrics. @c Null object array means
10783 all existing objects.
10784 </note>
10785 </desc>
10786 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10787 <desc>
10788 Metric name filter. Currently, only a comma-separated list of metrics
10789 is supported.
10790 </desc>
10791 </param>
10792 <param name="objects" type="$unknown" dir="in" safearray="yes">
10793 <desc>
10794 Set of objects to return metric parameters for.
10795 </desc>
10796 </param>
10797 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
10798 <desc>
10799 Array of returned metric parameters.
10800 </desc>
10801 </param>
10802 </method>
10803
10804 <method name="setupMetrics">
10805 <desc>
10806 Sets parameters of specified base metrics for a set of objects. Returns
10807 an array of <link to="IPerformanceMetric" /> describing the metrics have
10808 been affected.
10809 <note>
10810 @c Null or empty metric name array means all metrics. @c Null or empty
10811 object array means all existing objects. If metric name array contains
10812 a single element and object array contains many, the single metric
10813 name array element is applied to each object array element to form
10814 metric/object pairs.
10815 </note>
10816 </desc>
10817 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10818 <desc>
10819 Metric name filter. Comma-separated list of metrics with wildcard
10820 support.
10821 </desc>
10822 </param>
10823 <param name="objects" type="$unknown" dir="in" safearray="yes">
10824 <desc>
10825 Set of objects to setup metric parameters for.
10826 </desc>
10827 </param>
10828 <param name="period" type="unsigned long" dir="in">
10829 <desc>
10830 Time interval in seconds between two consecutive samples of performance
10831 data.
10832 </desc>
10833 </param>
10834 <param name="count" type="unsigned long" dir="in">
10835 <desc>
10836 Number of samples to retain in performance data history. Older samples
10837 get discarded.
10838 </desc>
10839 </param>
10840 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10841 <desc>
10842 Array of metrics that have been modified by the call to this method.
10843 </desc>
10844 </param>
10845 </method>
10846
10847 <method name="enableMetrics">
10848 <desc>
10849 Turns on collecting specified base metrics. Returns an array of
10850 <link to="IPerformanceMetric" /> describing the metrics have been
10851 affected.
10852 <note>
10853 @c Null or empty metric name array means all metrics. @c Null or empty
10854 object array means all existing objects. If metric name array contains
10855 a single element and object array contains many, the single metric
10856 name array element is applied to each object array element to form
10857 metric/object pairs.
10858 </note>
10859 </desc>
10860 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10861 <desc>
10862 Metric name filter. Comma-separated list of metrics with wildcard
10863 support.
10864 </desc>
10865 </param>
10866 <param name="objects" type="$unknown" dir="in" safearray="yes">
10867 <desc>
10868 Set of objects to enable metrics for.
10869 </desc>
10870 </param>
10871 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10872 <desc>
10873 Array of metrics that have been modified by the call to this method.
10874 </desc>
10875 </param>
10876 </method>
10877
10878 <method name="disableMetrics">
10879 <desc>
10880 Turns off collecting specified base metrics. Returns an array of
10881 <link to="IPerformanceMetric" /> describing the metrics have been
10882 affected.
10883 <note>
10884 @c Null or empty metric name array means all metrics. @c Null or empty
10885 object array means all existing objects. If metric name array contains
10886 a single element and object array contains many, the single metric
10887 name array element is applied to each object array element to form
10888 metric/object pairs.
10889 </note>
10890 </desc>
10891 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10892 <desc>
10893 Metric name filter. Comma-separated list of metrics with wildcard
10894 support.
10895 </desc>
10896 </param>
10897 <param name="objects" type="$unknown" dir="in" safearray="yes">
10898 <desc>
10899 Set of objects to disable metrics for.
10900 </desc>
10901 </param>
10902 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10903 <desc>
10904 Array of metrics that have been modified by the call to this method.
10905 </desc>
10906 </param>
10907 </method>
10908
10909 <method name="queryMetricsData">
10910 <desc>
10911 Queries collected metrics data for a set of objects.
10912
10913 The data itself and related metric information are returned in seven
10914 parallel and one flattened array of arrays. Elements of
10915 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
10916 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
10917 the same index describe one set of values corresponding to a single
10918 metric.
10919
10920 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
10921 start and length of a sub-array is indicated by
10922 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
10923 value for metric <tt>metricNames[i]</tt> is at
10924 <tt>returnData[returnIndices[i]]</tt>.
10925
10926 <note>
10927 @c Null or empty metric name array means all metrics. @c Null or empty
10928 object array means all existing objects. If metric name array contains
10929 a single element and object array contains many, the single metric
10930 name array element is applied to each object array element to form
10931 metric/object pairs.
10932 </note>
10933 <note>
10934 Data collection continues behind the scenes after call to @c
10935 queryMetricsData. The return data can be seen as the snapshot of
10936 the current state at the time of @c queryMetricsData call. The
10937 internally kept metric values are not cleared by the call. This makes
10938 possible querying different subsets of metrics or aggregates with
10939 subsequent calls. If periodic querying is needed it is highly
10940 suggested to query the values with @c interval*count period to avoid
10941 confusion. This way a completely new set of data values will be
10942 provided by each query.
10943 </note>
10944 </desc>
10945 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10946 <desc>
10947 Metric name filter. Comma-separated list of metrics with wildcard
10948 support.
10949 </desc>
10950 </param>
10951 <param name="objects" type="$unknown" dir="in" safearray="yes">
10952 <desc>
10953 Set of objects to query metrics for.
10954 </desc>
10955 </param>
10956 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
10957 <desc>
10958 Names of metrics returned in @c returnData.
10959 </desc>
10960 </param>
10961 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
10962 <desc>
10963 Objects associated with metrics returned in @c returnData.
10964 </desc>
10965 </param>
10966 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
10967 <desc>
10968 Units of measurement for each returned metric.
10969 </desc>
10970 </param>
10971 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
10972 <desc>
10973 Divisor that should be applied to return values in order to get
10974 floating point values. For example:
10975 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
10976 will retrieve the floating point value of i-th sample of the first
10977 metric.
10978 </desc>
10979 </param>
10980 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
10981 <desc>
10982 Sequence numbers of the first elements of value sequences of particular metrics
10983 returned in @c returnData. For aggregate metrics it is the sequence number of
10984 the sample the aggregate started calculation from.
10985 </desc>
10986 </param>
10987 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
10988 <desc>
10989 Indices of the first elements of value sequences of particular metrics
10990 returned in @c returnData.
10991 </desc>
10992 </param>
10993 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
10994 <desc>
10995 Lengths of value sequences of particular metrics.
10996 </desc>
10997 </param>
10998 <param name="returnData" type="long" dir="return" safearray="yes">
10999 <desc>
11000 Flattened array of all metric data containing sequences of values for
11001 each metric.
11002 </desc>
11003 </param>
11004 </method>
11005
11006 </interface>
11007
11008 <module name="VBoxSVC" context="LocalServer">
11009 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
11010 namespace="virtualbox.org">
11011 <interface name="IVirtualBox" default="yes"/>
11012 </class>
11013 </module>
11014
11015 <module name="VBoxC" context="InprocServer" threadingModel="Free">
11016 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
11017 namespace="virtualbox.org">
11018 <interface name="ISession" default="yes"/>
11019 </class>
11020 </module>
11021
11022</library>
11023
11024</idl>
11025<!-- 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