VirtualBox

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

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

Main: Removed redundant suffixes from DataType, DataFlags and HardDiskFormatCapabilities enums + cleanup.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 391.9 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 13950 2008-11-07 11:23:23Z vboxsync $ *
5 *
6 * :tabSize=2:indentSize=2:noTabs=true:
7 * :folding=explicit:collapseFolds=1:
8 *
9 * Master declaration for VirtualBox's Main API, represented
10 * by COM/XPCOM and web service interfaces.
11 *
12 * From this document, the build system generates several files
13 * via XSLT that are then used during the build process.
14 *
15 * Below is the list of XSL templates that operate on this file and
16 * output files they generate. These XSL templates must be updated
17 * whenever the schema of this file changes:
18 *
19 * 1. src/VBox/Main/idl/midl.xsl =>
20 * out/<platform>/bin/sdk/idl/VirtualBox.idl
21 * (MS COM interface definition file for Main API)
22 *
23 * 2. src/VBox/Main/idl/xpidl.xsl =>
24 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
25 * (XPCOM interface definition file for Main API)
26 *
27 * 3. src/VBox/Main/idl/doxygen.xsl =>
28 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
29 * (pseudo-IDL for Doxygen to generate the official Main API
30 * documentation)
31 *
32 * 4. src/VBox/Main/webservice/*.xsl =>
33 * a bunch of WSDL and C++ files
34 * (VirtualBox web service sources and SOAP mappers;
35 * see src/VBox/Main/webservice/Makefile.kmk for details)
36 *
37 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
38 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
39 * (smart Qt-based C++ wrapper classes for COM interfaces
40 * of the Main API)
41 *
42 * 6. src/VBox/Frontends/VirtualBox4/include/COMWrappers.xsl =>
43 * out/<platform>/obj/src/VBox/Frontends/VirtualBox4/VirtualBox/include/COMWrappers.h
44 * (smart Qt-based C++ wrapper classes for COM interfaces
45 * of the Main API)
46 *
47 * 7. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
48 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
49 * (Main API TypeLib block for the WiX installer)
50 *
51 Copyright (C) 2006-2007 Sun Microsystems, Inc.
52
53 This file is part of VirtualBox Open Source Edition (OSE), as
54 available from http://www.virtualbox.org. This file is free software;
55 you can redistribute it and/or modify it under the terms of the GNU
56 General Public License (GPL) as published by the Free Software
57 Foundation, in version 2 as it comes in the "COPYING" file of the
58 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
59 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
60
61 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
62 Clara, CA 95054 USA or visit http://www.sun.com if you need
63 additional information or have any questions.
64-->
65
66<idl>
67
68<if target="midl">
69 <cpp line="enum {"/>
70 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
71 <cpp line=" kTypeLibraryMinorVersion = 0"/>
72 <cpp line="};"/>
73</if>
74
75<if target="xpidl">
76 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
77 <cpp>
78/* currenty, nsISupportsImpl.h lacks the below-like macros */
79
80#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
81#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
82
83#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
84# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
85 NS_IMPL_THREADSAFE_ADDREF(_class) \
86 NS_IMPL_THREADSAFE_RELEASE(_class) \
87 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
88 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
89#endif
90
91#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
92# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
93 NS_IMPL_THREADSAFE_ADDREF(_class) \
94 NS_IMPL_THREADSAFE_RELEASE(_class) \
95 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
96 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
97#endif
98
99#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
100# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
101 NS_INTERFACE_MAP_BEGIN(_class) \
102 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
103 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
104 NS_IMPL_QUERY_CLASSINFO(_class) \
105 NS_INTERFACE_MAP_END
106#endif
107
108#ifndef NS_IMPL_QUERY_INTERFACE2_AMBGUOUS_CI
109# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
110 _i2, _ic2) \
111 NS_INTERFACE_MAP_BEGIN(_class) \
112 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
113 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
114 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
115 NS_IMPL_QUERY_CLASSINFO(_class) \
116 NS_INTERFACE_MAP_END
117#endif
118
119#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
120#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
121
122#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
123# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
124 NS_IMPL_THREADSAFE_ADDREF(_class) \
125 NS_IMPL_THREADSAFE_RELEASE(_class) \
126 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
127 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
128#endif
129
130#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
131# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
132 _i2, _ic2) \
133 NS_IMPL_THREADSAFE_ADDREF(_class) \
134 NS_IMPL_THREADSAFE_RELEASE(_class) \
135 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
136 _i2, _ic2) \
137 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
138#endif
139 </cpp>
140</if>
141
142<library
143 name="VirtualBox"
144 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
145 version="1.3"
146 desc="VirtualBox Type Library"
147 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
148 supportsErrorInfo="yes"
149>
150
151 <!--
152 // all common enums
153 /////////////////////////////////////////////////////////////////////////
154 -->
155
156 <enum
157 name="TSBool"
158 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
159 >
160 <desc>
161 Boolean variable having a third state, default.
162 </desc>
163
164 <const name="False" value="0"/>
165 <const name="True" value="1"/>
166 <const name="Default" value="2"/>
167 </enum>
168
169 <enum
170 name="MachineState"
171 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
172 >
173 <desc>
174 Virtual machine execution state. This enumeration represents possible
175 values of the <link to="IMachine::state"/> attribute.
176 </desc>
177
178 <const name="Null" value="0">
179 <desc><tt>null</tt> value. Never used by the API.</desc>
180 </const>
181 <const name="PoweredOff" value="1">
182 <desc>
183 The machine is not running.
184 </desc>
185 </const>
186 <const name="Saved" value="2">
187 <desc>
188 The machine is not currently running, but the execution state
189 of the machine has been saved to an external file when it
190 was running.
191 <note>
192 No any machine settings can be altered when the machine
193 is in this state.
194 </note>
195 </desc>
196 </const>
197 <const name="Aborted" value="3">
198 <desc>
199 A process that run the machine has abnormally terminated.
200 Other than that, this value is equivalent to #PoweredOff.
201 </desc>
202 </const>
203 <const name="Running" value="4">
204 <desc>
205 The machine is currently being executed.
206 <note>
207 This value can be used in comparison expressions:
208 all state values below it describe a virtual machine that is
209 not currently being executed (i.e., it is completely out of
210 action).
211 </note>
212 <note internal="yes">
213 For whoever decides to touch this enum: In order to keep the
214 aforementioned comparisons valid, this state must immediately
215 preceed the Paused state.
216 </note>
217 </desc>
218 </const>
219 <const name="Paused" value="5">
220 <desc>
221 Execution of the machine has been paused.
222 <note>
223 This value can be used in comparison expressions: all state values
224 above it represent unstable states of the running virtual
225 machine. Unless explicitly stated otherwise, no machine settings can
226 be altered when it is in one of the unstable states.
227 </note>
228 <note internal="yes">
229 For whoever decides to touch this enum: In order to keep the
230 aforementioned comparisons valid, this state must immediately
231 follow the Running state.
232 </note>
233 </desc>
234 </const>
235 <const name="Stuck" value="6">
236 <desc>
237 Execution of the machine has reached the "Guru Meditaion"
238 condition. This condition indicates an internal VMM failure which may
239 happen as a result of either an unhandled low-level virtual hardware
240 exception or one of the recompiler exceptions (such as
241 the <i>too-many-traps</i> condition).
242 </desc>
243 </const>
244 <const name="Starting" value="7">
245 <desc>
246 Machine is being started after
247 <link to="IConsole::powerUp">powering it on</link> from a
248 zero execution state.
249 </desc>
250 </const>
251 <const name="Stopping" value="8">
252 <desc>
253 Machine is being normally stopped
254 (after explicitly <link to="IConsole::powerDown">powering it off</link>,
255 or after the guest OS has initiated a shutdown sequence).
256 </desc>
257 </const>
258 <const name="Saving" value="9">
259 <desc>
260 Machine is saving its execution state to a file as a
261 result of calling <link to="IConsole::saveState"/> or an online
262 snapshot of the machine is being taken using
263 <link to="IConsole::takeSnapshot"/>.
264 </desc>
265 </const>
266 <const name="Restoring" value="10">
267 <desc>
268 Execution state of the machine is being restored from a file
269 after <link to="IConsole::powerUp">powering it on</link> from
270 a saved execution state.
271 </desc>
272 </const>
273 <const name="Discarding" value="11">
274 <desc>
275 Snapshot of the machine is being discarded after calling
276 <link to="IConsole::discardSnapshot"/> or its current state is
277 being discarded after <link to="IConsole::discardCurrentState"/>.
278 </desc>
279 </const>
280 <const name="SettingUp" value="12">
281 <desc>
282 Lengthy setup operation is in progress (e.g.
283 <link to="IMachine::attachHardDisk2"/>).
284 </desc>
285 </const>
286 </enum>
287
288 <enum
289 name="SessionState"
290 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
291 >
292 <desc>
293 Session state. This enumeration represents possible values of
294 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
295 attributes. Individual value descriptions contain the appropriate
296 meaning for every case.
297 </desc>
298
299 <const name="Null" value="0">
300 <desc><tt>null</tt> value. Never used by the API.</desc>
301 </const>
302 <const name="Closed" value="1">
303 <desc>
304 The machine has no open sessions (<link to="IMachine::sessionState"/>);
305 the session is closed (<link to="ISession::state"/>)
306 </desc>
307 </const>
308 <const name="Open" value="2">
309 <desc>
310 The machine has an open direct session (<link to="IMachine::sessionState"/>);
311 the session is open (<link to="ISession::state"/>)
312 </desc>
313 </const>
314 <const name="Spawning" value="3">
315 <desc>
316 A new (direct) session is being opened for the machine
317 as a result of <link to="IVirtualBox::openRemoteSession()"/>
318 call (<link to="IMachine::sessionState"/>);
319 the session is currently being opened
320 as a result of <link to="IVirtualBox::openRemoteSession()"/>
321 call (<link to="ISession::state"/>)
322 </desc>
323 </const>
324 <const name="Closing" value="4">
325 <desc>
326 The direct session is being closed (<link to="IMachine::sessionState"/>);
327 the session is being closed (<link to="ISession::state"/>)
328 </desc>
329 </const>
330 </enum>
331
332 <enum
333 name="SessionType"
334 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
335 >
336 <desc>
337 Session type. This enumeration represents possible values of the
338 <link to="ISession::type"/> attribute.
339 </desc>
340
341 <const name="Null" value="0">
342 <desc><tt>null</tt> value. Never used by the API.</desc>
343 </const>
344 <const name="Direct" value="1">
345 <desc>
346 Direct session
347 (opened by <link to="IVirtualBox::openSession()"/>)
348 </desc>
349 </const>
350 <const name="Remote" value="2">
351 <desc>
352 Remote session
353 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
354 </desc>
355 </const>
356 <const name="Existing" value="3">
357 <desc>
358 Existing session
359 (opened by <link to="IVirtualBox::openExistingSession()"/>)
360 </desc>
361 </const>
362 </enum>
363
364 <enum
365 name="DeviceType"
366 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
367 >
368 <desc>
369 Device type.
370 </desc>
371 <const name="Null" value="0">
372 <desc>
373 <tt>null</tt> value which may also mean "no device".
374 <note>
375 This value is not allowed for
376 <link to="IConsole::getDeviceActivity"/>
377 </note>
378 </desc>
379 </const>
380 <const name="Floppy" value="1">
381 <desc>Floppy device.</desc>
382 </const>
383 <const name="DVD" value="2">
384 <desc>CD/DVD-ROM device.</desc>
385 </const>
386 <const name="HardDisk" value="3">
387 <desc>Hard disk device.</desc>
388 </const>
389 <const name="Network" value="4">
390 <desc>Network device.</desc>
391 </const>
392 <const name="USB" value="5">
393 <desc>USB device.</desc>
394 </const>
395 <const name="SharedFolder" value="6">
396 <desc>Shared folder device.</desc>
397 </const>
398 </enum>
399
400 <enum
401 name="DeviceActivity"
402 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
403 >
404 <desc>
405 Device activity for <link to="IConsole::getDeviceActivity"/>.
406 </desc>
407
408 <const name="Null" value="0"/>
409 <const name="Idle" value="1"/>
410 <const name="Reading" value="2"/>
411 <const name="Writing" value="3"/>
412 </enum>
413
414 <enum
415 name="StorageBus"
416 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
417 >
418 <desc>Interface bus type for storage devices.</desc>
419
420 <const name="Null" value="0">
421 <desc><tt>null</tt> value. Never used by the API.</desc>
422 </const>
423
424 <const name="IDE" value="1"/>
425 <const name="SATA" value="2"/>
426 </enum>
427
428 <enum
429 name="ClipboardMode"
430 uuid="33364716-4008-4701-8f14-be0fa3d62950"
431 >
432 <desc>
433 Host-Guest clipboard interchange mode.
434 </desc>
435
436 <const name="Disabled" value="0"/>
437 <const name="HostToGuest" value="1"/>
438 <const name="GuestToHost" value="2"/>
439 <const name="Bidirectional" value="3"/>
440 </enum>
441
442 <enum
443 name="Scope"
444 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
445 >
446 <desc>
447 Scope of the operation.
448
449 A generic enumeration used in various methods to define the action or
450 argument scope.
451 </desc>
452
453 <const name="Global" value="0"/>
454 <const name="Machine" value="1"/>
455 <const name="Session" value="2"/>
456 </enum>
457
458 <enum
459 name="GuestStatisticType"
460 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
461 >
462 <desc>
463 Statistics type for <link to="IGuest::getStatistic"/>.
464 </desc>
465
466 <const name="CPULoad_Idle" value="0">
467 <desc>
468 Idle CPU load (0-100%) for last interval.
469 </desc>
470 </const>
471 <const name="CPULoad_Kernel" value="1">
472 <desc>
473 Kernel CPU load (0-100%) for last interval.
474 </desc>
475 </const>
476 <const name="CPULoad_User" value="2">
477 <desc>
478 User CPU load (0-100%) for last interval.
479 </desc>
480 </const>
481 <const name="Threads" value="3">
482 <desc>
483 Total number of threads in the system.
484 </desc>
485 </const>
486 <const name="Processes" value="4">
487 <desc>
488 Total number of processes in the system.
489 </desc>
490 </const>
491 <const name="Handles" value="5">
492 <desc>
493 Total number of handles in the system.
494 </desc>
495 </const>
496 <const name="MemoryLoad" value="6">
497 <desc>
498 Memory load (0-100%).
499 </desc>
500 </const>
501 <const name="PhysMemTotal" value="7">
502 <desc>
503 Total physical memory in megabytes.
504 </desc>
505 </const>
506 <const name="PhysMemAvailable" value="8">
507 <desc>
508 Free physical memory in megabytes.
509 </desc>
510 </const>
511 <const name="PhysMemBalloon" value="9">
512 <desc>
513 Ballooned physical memory in megabytes.
514 </desc>
515 </const>
516 <const name="MemCommitTotal" value="10">
517 <desc>
518 Total amount of memory in the committed state in megabytes.
519 </desc>
520 </const>
521 <const name="MemKernelTotal" value="11">
522 <desc>
523 Total amount of memory used by the guest OS's kernel in megabytes.
524 </desc>
525 </const>
526 <const name="MemKernelPaged" value="12">
527 <desc>
528 Total amount of paged memory used by the guest OS's kernel in megabytes.
529 </desc>
530 </const>
531 <const name="MemKernelNonpaged" value="13">
532 <desc>
533 Total amount of nonpaged memory used by the guest OS's kernel in megabytes.
534 </desc>
535 </const>
536 <const name="MemSystemCache" value="14">
537 <desc>
538 Total amount of memory used by the guest OS's system cache in megabytes.
539 </desc>
540 </const>
541 <const name="PageFileSize" value="15">
542 <desc>
543 Pagefile size in megabytes.
544 </desc>
545 </const>
546 <const name="SampleNumber" value="16">
547 <desc>
548 Statistics sample number
549 </desc>
550 </const>
551 <const name="MaxVal" value="17"/>
552 </enum>
553
554 <enum
555 name="BIOSBootMenuMode"
556 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
557 >
558 <desc>
559 BIOS boot menu mode.
560 </desc>
561
562 <const name="Disabled" value="0"/>
563 <const name="MenuOnly" value="1"/>
564 <const name="MessageAndMenu" value="2"/>
565 </enum>
566
567 <enum
568 name="IDEControllerType"
569 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
570 >
571 <desc>
572 IDE controller type.
573 </desc>
574
575 <const name="Null" value="0">
576 <desc><tt>null</tt> value. Never used by the API.</desc>
577 </const>
578 <const name="PIIX3" value="1"/>
579 <const name="PIIX4" value="2"/>
580 </enum>
581
582 <enum
583 name="DriveState"
584 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
585 >
586 <const name="Null" value="0">
587 <desc><tt>null</tt> value. Never used by the API.</desc>
588 </const>
589 <const name="NotMounted" value="1"/>
590 <const name="ImageMounted" value="2"/>
591 <const name="HostDriveCaptured" value="3"/>
592 </enum>
593
594 <!--
595 // IVirtualBoxErrorInfo
596 /////////////////////////////////////////////////////////////////////////
597 -->
598
599 <interface
600 name="IVirtualBoxErrorInfo" extends="$errorinfo"
601 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
602 supportsErrorInfo="no"
603 wsmap="suppress"
604 >
605 <desc>
606 The IVirtualBoxErrorInfo interface represents extended error information.
607
608 Extended error information can be set by VirtualBox components after
609 unsuccessful or partially successful method invocation. This information
610 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
611 and then shown to the client in addition to the plain 32-bit result code.
612
613 In MS COM, this interface extends the IErrorInfo interface,
614 in XPCOM, it extends the nsIException interface. In both cases,
615 it provides a set of common attributes to retrieve error
616 information.
617
618 Sometimes invocation of some component's method may involve methods of
619 other components that may also fail (independently of this method's
620 failure), or a series of non-fatal errors may precede a fatal error that
621 causes method failure. In cases like that, it may be desirable to preserve
622 information about all errors happened during method invocation and deliver
623 it to the caller. The <link to="#next"/> attribute is intended
624 specifically for this purpose and allows to represent a chain of errors
625 through a single IVirtualBoxErrorInfo object set after method invocation.
626
627 Note that errors are stored to a chain in the reverse order, i.e. the
628 initial error object you query right after method invocation is the last
629 error set by the callee, the object it points to in the @a next attribute
630 is the previous error and so on, up to the first error (which is the last
631 in the chain).
632 </desc>
633
634 <attribute name="resultCode" type="result" readonly="yes">
635 <desc>
636 Result code of the error.
637 Usually, it will be the same as the result code returned
638 by the method that provided this error information, but not
639 always. For example, on Win32, CoCreateInstance() will most
640 likely return E_NOINTERFACE upon unsuccessful component
641 instantiation attempt, but not the value the component factory
642 returned.
643 <note>
644 In MS COM, there is no equivalent.
645 In XPCOM, it is the same as nsIException::result.
646 </note>
647 </desc>
648 </attribute>
649
650 <attribute name="interfaceID" type="uuid" readonly="yes">
651 <desc>
652 UUID of the interface that defined the error.
653 <note>
654 In MS COM, it is the same as IErrorInfo::GetGUID.
655 In XPCOM, there is no equivalent.
656 </note>
657 </desc>
658 </attribute>
659
660 <attribute name="component" type="wstring" readonly="yes">
661 <desc>
662 Name of the component that generated the error.
663 <note>
664 In MS COM, it is the same as IErrorInfo::GetSource.
665 In XPCOM, there is no equivalent.
666 </note>
667 </desc>
668 </attribute>
669
670 <attribute name="text" type="wstring" readonly="yes">
671 <desc>
672 Text description of the error.
673 <note>
674 In MS COM, it is the same as IErrorInfo::GetDescription.
675 In XPCOM, it is the same as nsIException::message.
676 </note>
677 </desc>
678 </attribute>
679
680 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
681 <desc>
682 Next error object if there is any, or @c null otherwise.
683 <note>
684 In MS COM, there is no equivalent.
685 In XPCOM, it is the same as nsIException::inner.
686 </note>
687 </desc>
688 </attribute>
689
690 </interface>
691
692
693 <!--
694 // IVirtualBox
695 /////////////////////////////////////////////////////////////////////////
696 -->
697
698 <interface
699 name="IVirtualBoxCallback" extends="$unknown"
700 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
701 wsmap="suppress"
702 >
703 <method name="onMachineStateChange">
704 <desc>
705 The execution state of the given machine has changed.
706 <see>IMachine::state</see>
707 </desc>
708 <param name="machineId" type="uuid" dir="in">
709 <desc>ID of the machine this event relates to.</desc>
710 </param>
711 <param name="state" type="MachineState" dir="in">
712 <desc>New execution state.</desc>
713 </param>
714 </method>
715
716 <method name="onMachineDataChange">
717 <desc>
718 Any of the settings of the given machine has changed.
719 </desc>
720 <param name="machineId" type="uuid" dir="in">
721 <desc>ID of the machine this event relates to.</desc>
722 </param>
723 </method>
724
725 <method name="onExtraDataCanChange">
726 <desc>
727 Notification when someone tries to change extra data for
728 either the given machine or (if null) global extra data.
729 This gives the chance to veto against changes.
730 </desc>
731 <param name="machineId" type="uuid" dir="in">
732 <desc>
733 ID of the machine this event relates to
734 (null ID for global extra data change requests).
735 </desc>
736 </param>
737 <param name="key" type="wstring" dir="in">
738 <desc>
739 Extra data key for the attempted write.
740 </desc>
741 </param>
742 <param name="value" type="wstring" dir="in">
743 <desc>
744 Extra data value for the given key.
745 </desc>
746 </param>
747 <param name="error" type="wstring" dir="out">
748 <desc>
749 Optional error message describing the reason of the
750 veto (ignored if this notification returns @c true).
751 </desc>
752 </param>
753 <param name="allowChange" type="boolean" dir="return">
754 <desc>
755 Flag to indicate whether the callee agrees (@ true)
756 or vetoes against the change (@ false).
757 </desc>
758 </param>
759 </method>
760
761 <method name="onExtraDataChange">
762 <desc>
763 Notification when machine specific or global extra data
764 has changed.
765 </desc>
766 <param name="machineId" type="uuid" dir="in">
767 <desc>
768 ID of the machine this event relates to.
769 Null for global extra data changes.
770 </desc>
771 </param>
772 <param name="key" type="wstring" dir="in">
773 <desc>
774 Extra data key that has changed.
775 </desc>
776 </param>
777 <param name="value" type="wstring" dir="in">
778 <desc>
779 Extra data value for the given key.
780 </desc>
781 </param>
782 </method>
783
784 <method name="onMediaRegistered">
785 <desc>
786 The given media was registered or unregistered
787 within this VirtualBox installation.
788
789 The @a mediaType parameter describes what type of
790 media the specified @a mediaId refers to. Possible
791 values are:
792
793 <ul>
794 <li><link to="DeviceType::HardDisk"/>: the media is a hard disk
795 that, if registered, can be obtained using the
796 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
797 <li><link to="DeviceType::DVD"/>: the media is a CD/DVD image
798 that, if registered, can be obtained using the
799 <link to="IVirtualBox::getDVDImage()"/> call.</li>
800 <li><link to="DeviceType::Floppy"/>: the media is a Floppy image
801 that, if registered, can be obtained using the
802 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
803 </ul>
804
805 Note that if this is a deregistration notification,
806 there is no way to access the object representing the
807 unregistered media. It is supposed that the
808 application will do required cleanup based on the @a
809 mediaId value.
810 </desc>
811 <param name="mediaId" type="uuid" dir="in">
812 <desc>ID of the media this event relates to.</desc>
813 </param>
814 <param name="mediaType" type="DeviceType" dir="in">
815 <desc>Type of the media this event relates to.</desc>
816 </param>
817 <param name="registered" type="boolean" dir="in">
818 <desc>
819 If true, the media was registered, otherwise it was
820 unregistered.
821 </desc>
822 </param>
823 </method>
824
825 <method name="onMachineRegistered">
826 <desc>
827 The given machine was registered or unregistered
828 within this VirtualBox installation.
829 </desc>
830 <param name="machineId" type="uuid" dir="in">
831 <desc>ID of the machine this event relates to.</desc>
832 </param>
833 <param name="registered" type="boolean" dir="in">
834 <desc>
835 If true, the machine was registered, otherwise it was
836 unregistered.
837 </desc>
838 </param>
839 </method>
840
841 <method name="onSessionStateChange">
842 <desc>
843 The state of the session for the given machine was changed.
844 <see>IMachine::sessionState</see>
845 </desc>
846 <param name="machineId" type="uuid" dir="in">
847 <desc>ID of the machine this event relates to.</desc>
848 </param>
849 <param name="state" type="SessionState" dir="in">
850 <desc>New session state.</desc>
851 </param>
852 </method>
853
854 <method name="onSnapshotTaken">
855 <desc>
856 A new snapshot of the machine has been taken.
857 <see>ISnapshot</see>
858 </desc>
859 <param name="machineId" type="uuid" dir="in">
860 <desc>ID of the machine this event relates to.</desc>
861 </param>
862 <param name="snapshotId" type="uuid" dir="in">
863 <desc>ID of the new snapshot.</desc>
864 </param>
865 </method>
866
867 <method name="onSnapshotDiscarded">
868 <desc>
869 Snapshot of the given machine has been discarded.
870
871 <note>
872 This notification is delivered <b>after</b> the snapshot
873 object has been uninitialized on the server (so that any
874 attempt to call its methods will return an error).
875 </note>
876
877 <see>ISnapshot</see>
878 </desc>
879 <param name="machineId" type="uuid" dir="in">
880 <desc>ID of the machine this event relates to.</desc>
881 </param>
882 <param name="snapshotId" type="uuid" dir="in">
883 <desc>
884 ID of the discarded snapshot. <tt>null</tt> means the
885 current machine state has been discarded (restored from
886 the current snapshot).
887 </desc>
888 </param>
889 </method>
890
891 <method name="onSnapshotChange">
892 <desc>
893 Snapshot properties (name and/or description) have been changed.
894 <see>ISnapshot</see>
895 </desc>
896 <param name="machineId" type="uuid" dir="in">
897 <desc>ID of the machine this event relates to.</desc>
898 </param>
899 <param name="snapshotId" type="uuid" dir="in">
900 <desc>ID of the changed snapshot.</desc>
901 </param>
902 </method>
903
904 <method name="onGuestPropertyChange">
905 <desc>
906 Notification when a guest property has changed.
907 </desc>
908 <param name="machineId" type="uuid" dir="in">
909 <desc>
910 ID of the machine this event relates to.
911 </desc>
912 </param>
913 <param name="name" type="wstring" dir="in">
914 <desc>
915 The name of the property that has changed.
916 </desc>
917 </param>
918 <param name="value" type="wstring" dir="in">
919 <desc>
920 The new property value.
921 </desc>
922 </param>
923 <param name="flags" type="wstring" dir="in">
924 <desc>
925 The new property flags.
926 </desc>
927 </param>
928 </method>
929
930 </interface>
931
932 <interface
933 name="IVirtualBox" extends="$dispatched"
934 uuid="2aa11223-ba64-4610-84b8-066d2a89384f"
935 wsmap="managed"
936 >
937 <desc>
938 The IVirtualBox interface represents the main interface exposed by the
939 product that provides virtual machine management.
940
941 An instance of IVirtualBox is required for the product to do anything
942 useful. Even though the interface does not expose this, internally,
943 IVirtualBox is implemented as a singleton and actually lives in the
944 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
945 IVirtualBox can track the state of all virtual machines on a particular
946 host, regardless of which frontend started them.
947
948 To enumerate all the virtual machines on the host, use the
949 <link to="IVirtualBox::machines2"/> attribute.
950 </desc>
951
952 <attribute name="version" type="wstring" readonly="yes">
953 <desc>
954 A string representing the version number of the product. The
955 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
956 last number represents the build number and will frequently change.
957 </desc>
958 </attribute>
959
960 <attribute name="revision" type="unsigned long" readonly="yes">
961 <desc>
962 The internal build revision number of the product.
963 </desc>
964 </attribute>
965
966 <attribute name="packageType" type="wstring" readonly="yes">
967 <desc>
968 A string representing the package type of this product. The
969 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
970 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
971 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
972 this.
973 </desc>
974 </attribute>
975
976 <attribute name="homeFolder" type="wstring" readonly="yes">
977 <desc>
978 Full path to the directory where the global settings file,
979 <tt>VirtualBox.xml</tt>, is stored.
980
981 In this version of VirtualBox, the value of this property is
982 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
983 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
984 as determined by the host OS), and cannot be changed.
985
986 This path is also used as the base to resolve relative paths in
987 places where relative paths are allowed (unless otherwise
988 expressly indicated).
989 </desc>
990 </attribute>
991
992 <attribute name="settingsFilePath" type="wstring" readonly="yes">
993 <desc>
994 Full name of the global settings file.
995 The value of this property corresponds to the value of
996 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
997 </desc>
998 </attribute>
999
1000 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1001 <desc>
1002 Current version of the format of the global VirtualBox settings file
1003 (<tt>VirtualBox.xml</tt>).
1004
1005 The version string has the following format:
1006 <pre>
1007 x.y-platform
1008 </pre>
1009 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1010 versions, and <tt>platform</tt> is the platform identifier.
1011
1012 The current version usually matches the value of the
1013 <link to="#settingsFormatVersion"/> attribute unless the
1014 settings file was created by an older version of VirtualBox and there
1015 was a change of the settings file format since then.
1016
1017 Note that VirtualBox automatically converts settings files from older
1018 versions to the most recent version when reading them (usually at
1019 VirtualBox startup) but it doesn't save the changes back until
1020 you call a method that implicitly saves settings (such as
1021 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1022 explicitly. Therefore, if the value of this attribute differs from the
1023 value of <link to="#settingsFormatVersion"/>, then it
1024 means that the settings file was converted but the result of the
1025 conversion is not yet saved to disk.
1026
1027 The above feature may be used by interactive front-ends to inform users
1028 about the settings file format change and offer them to explicitly save
1029 all converted settings files (the global and VM-specific ones),
1030 optionally create backup copies of the old settings files before saving,
1031 etc.
1032
1033 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1034 </desc>
1035 </attribute>
1036
1037 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1038 <desc>
1039 Most recent version of the settings file format.
1040
1041 The version string has the following format:
1042 <pre>
1043 x.y-platform
1044 </pre>
1045 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1046 versions, and <tt>platform</tt> is the platform identifier.
1047
1048 VirtualBox uses this version of the format when saving settings files
1049 (either as a result of method calls that require to save settings or as
1050 a result of an explicit call to <link to="#saveSettings()"/>).
1051
1052 <see>settingsFileVersion</see>
1053 </desc>
1054 </attribute>
1055
1056 <attribute name="host" type="IHost" readonly="yes">
1057 <desc>Associated host object.</desc>
1058 </attribute>
1059
1060 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1061 <desc>Associated system information object.</desc>
1062 </attribute>
1063
1064 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1065 <desc>
1066 Array of machine objects registered within this VirtualBox instance.
1067 </desc>
1068 </attribute>
1069
1070 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1071 <desc>
1072 Array of hard disk objects known to this VirtualBox installation.
1073
1074 This array contains only base (root) hard disks. All differencing
1075 hard disks of the given base hard disk can be enumerated using
1076 <link to="IHardDisk2::children"/>.
1077 </desc>
1078 </attribute>
1079
1080 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1081 <desc>
1082 Array of CD/DVD image objects registered with this VirtualBox instance.
1083 </desc>
1084 </attribute>
1085
1086 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1087 <desc>
1088 Array of floppy image objects registered with this VirtualBox instance.
1089 </desc>
1090 </attribute>
1091
1092 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1093
1094 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1095
1096 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1097 <desc>
1098 Collection of global shared folders. Global shared folders are
1099 available to all virtual machines.
1100
1101 New shared folders are added to the collection using
1102 <link to="#createSharedFolder"/>. Existing shared folders can be
1103 removed using <link to="#removeSharedFolder"/>.
1104
1105 <note>
1106 In the current version of the product, global shared folders are not
1107 implemented and therefore this collection is always empty.
1108 </note>
1109 </desc>
1110 </attribute>
1111
1112 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1113 <desc>
1114 Associated performance collector object.
1115 </desc>
1116 </attribute>
1117
1118 <method name="createMachine">
1119 <desc>
1120 Creates a new virtual machine.
1121
1122 The new machine will have "empty" default settings and will not
1123 yet be registered. The typical sequence to create a virtual machine
1124 is therefore something like this:
1125
1126 <ol>
1127 <li>Call this method (IVirtualBox::createMachine) to have a new
1128 machine created. The machine object returned is "mutable", i.e.
1129 automatically locked for the current session, as if
1130 <link to="#openSession" /> had been called on it.</li>
1131
1132 <li>Assign meaningful settings to the new machine by calling the
1133 respective methods.</li>
1134
1135 <li>Call <link to="IMachine::saveSettings" /> to have the settings written
1136 to the machine's XML settings file. The configuration of the newly
1137 created machine will not be saved to disk (and the settings subfolder
1138 and file, as described below, will not be created) until this method
1139 is called.</li>
1140
1141 <li>Call <link to="#registerMachine" /> to have the
1142 machine show up in the list of machines registered with VirtualBox.</li>
1143 </ol>
1144
1145 Every machine has a <i>settings file</i> that is used to store
1146 the machine configuration. This file is stored in the directory
1147 called <i>machine settings subfolder</i>. Unless specified otherwise,
1148 both the subfolder and the settings file will have a name that
1149 corresponds to the name of the virtual machine. You can specify
1150 where to create the machine settings subfolder using the @a
1151 baseFolder argument. The base folder can be absolute (full path)
1152 or relative to the <link to="IVirtualBox::homeFolder">
1153 VirtualBox home directory</link>.
1154
1155 If a null or empty string is given as the base folder (which is
1156 recommended), the <link to="ISystemProperties::defaultMachineFolder">
1157 default machine settings folder</link> will be used as the base
1158 folder to create the machine settings subfolder and file. In
1159 any case, the full path to the settings file will look like:
1160 <pre>
1161 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1162 </pre>
1163
1164 Optionally the UUID of the machine can be predefined. If this is
1165 not desired (i.e. a new UUID should be generated), pass just an
1166 empty or null UUID.
1167
1168 You should also specify a valid name for the machine.
1169 See the <link to="IMachine::name"/> property
1170 description for more details about the machine name.
1171
1172 The created machine remains
1173 unregistered until you call <link to="#registerMachine()"/>.
1174
1175 <note>
1176 There is no way to change the name of the settings file or
1177 subfolder of the created machine directly.
1178 </note>
1179 </desc>
1180 <param name="baseFolder" type="wstring" dir="in">
1181 <desc>
1182 Name of the folder where to create the machine settings
1183 subfolder containing the settings file.
1184 </desc>
1185 </param>
1186 <param name="name" type="wstring" dir="in">
1187 <desc>Machine name.</desc>
1188 </param>
1189 <param name="id" type="uuid" dir="in">
1190 <desc>
1191 UUID of the newly created VM, when non-null or non-empty.
1192 Otherwise a UUID is automatically generated.
1193 </desc>
1194 </param>
1195 <param name="machine" type="IMachine" dir="return">
1196 <desc>Created machine object.</desc>
1197 </param>
1198 </method>
1199
1200 <method name="createLegacyMachine">
1201 <desc>
1202 Creates a new virtual machine in "legacy" mode, using the
1203 specified settings file to store machine settings.
1204
1205 As opposed to machines created by <link to="#createMachine()"/>,
1206 the settings file of the machine created in "legacy" mode
1207 is not automatically renamed when the machine name is
1208 changed -- it will always remain the same as specified in this
1209 method call.
1210
1211 The specified settings file name can be absolute
1212 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1213 VirtualBox home directory</link>. If the file name doesn't
1214 contain an extension, the default extension (.xml) will be
1215 appended.
1216
1217 Optionally the UUID of the machine can be predefined. If this is
1218 not desired (i.e. a new UUID should be generated), pass just an
1219 empty or null UUID.
1220
1221 Note that the configuration of the newly created machine is not
1222 saved to disk (and therefore no settings file is created)
1223 until <link to="IMachine::saveSettings()"/> is called. If the
1224 specified settings file already exists,
1225 <link to="IMachine::saveSettings()"/> will return an error.
1226
1227 You should also specify a valid name for the machine.
1228 See the <link to="IMachine::name"/> property
1229 description for more details about the machine name.
1230
1231 The created machine remains
1232 unregistered until you call <link to="#registerMachine()"/>.
1233
1234 @deprecated This method may be removed later. It is better
1235 to use <link to="IVirtualBox::createMachine()"/>.
1236
1237 <note>
1238 There is no way to change the name of the settings file
1239 of the created machine.
1240 </note>
1241 </desc>
1242 <param name="settingsFile" type="wstring" dir="in">
1243 <desc>
1244 Name of the file where to store machine settings.
1245 </desc>
1246 </param>
1247 <param name="name" type="wstring" dir="in">
1248 <desc>Machine name.</desc>
1249 </param>
1250 <param name="id" type="uuid" dir="in">
1251 <desc>
1252 UUID of the newly created VM, when non-null or non-empty.
1253 Otherwise a UUID is automatically generated.
1254 </desc>
1255 </param>
1256 <param name="machine" type="IMachine" dir="return">
1257 <desc>Created machine object.</desc>
1258 </param>
1259 </method>
1260
1261 <method name="openMachine">
1262 <desc>
1263 Opens a virtual machine from the existing settings file.
1264 The opened machine remains unregistered until you call
1265 <link to="#registerMachine()"/>.
1266
1267 The specified settings file name can be absolute
1268 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1269 VirtualBox home directory</link>. This file must exist
1270 and must be a valid machine settings file whose contents
1271 will be used to construct the machine object.
1272
1273 @deprecated Will be removed soon.
1274 </desc>
1275 <param name="settingsFile" type="wstring" dir="in">
1276 <desc>
1277 Name of the machine settings file.
1278 </desc>
1279 </param>
1280 <param name="machine" type="IMachine" dir="return">
1281 <desc>Opened machine object.</desc>
1282 </param>
1283 <note>
1284 <link to="IMachine::settingsModified"/> will return
1285 false for the created machine, until any of machine settings
1286 are changed.
1287 </note>
1288 </method>
1289
1290 <method name="registerMachine">
1291 <desc>
1292
1293 Registers the machine previously created using
1294 <link to="#createMachine()"/> or opened using
1295 <link to="#openMachine()"/> within this VirtualBox installation. After
1296 successful method invocation, the
1297 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1298 to all registered callbacks.
1299
1300 <note>
1301 This method implicitly calls <link to="IMachine::saveSettings"/>
1302 to save all current machine settings before registering it.
1303 </note>
1304
1305 </desc>
1306 <param name="machine" type="IMachine" dir="in"/>
1307 </method>
1308
1309 <method name="getMachine">
1310 <desc>
1311 Attempts to find a virtual machine given its UUID.
1312 To look up a machine by name, use <link to="IVirtualBox::findMachine" /> instead.
1313 </desc>
1314 <param name="id" type="uuid" dir="in"/>
1315 <param name="machine" type="IMachine" dir="return"/>
1316 </method>
1317
1318 <method name="findMachine">
1319 <desc>
1320 Attempts to find a virtual machine given its name.
1321 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" /> instead.
1322 </desc>
1323 <param name="name" type="wstring" dir="in"/>
1324 <param name="machine" type="IMachine" dir="return"/>
1325 </method>
1326
1327 <method name="unregisterMachine">
1328 <desc>
1329
1330 Unregisters the machine previously registered using
1331 <link to="#registerMachine"/>. After successful method invocation, the
1332 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1333 to all registered callbacks.
1334
1335 <note>
1336 The specified machine must not be in the Saved state, have an open
1337 (or a spawning) direct session associated with it, have snapshots or
1338 have hard disks attached.
1339 </note>
1340
1341 <note>
1342 This method implicitly calls <link to="IMachine::saveSettings"/> to
1343 save all current machine settings before unregistering it.
1344 </note>
1345
1346 <note>
1347 If the given machine is inaccessible (see
1348 <link to="IMachine::accessible"/>), it will be unregistered and
1349 fully uninitialized right afterwards. As a result, the returned
1350 machine object will be unusable and an attempt to call
1351 <b>any</b> method will return the "Object not ready" error.
1352 </note>
1353
1354 </desc>
1355 <param name="id" type="uuid" dir="in">
1356 <desc>UUID of the machine to unregister.</desc>
1357 </param>
1358 <param name="machine" type="IMachine" dir="return">
1359 <desc>Unregistered machine object.</desc>
1360 </param>
1361 </method>
1362
1363 <method name="createHardDisk2">
1364 <desc>
1365 Creates a new base hard disk object that will use the given storage
1366 format and location for hard disk data.
1367
1368 Note that the actual storage unit is not created by this method. In
1369 order to do it, and before you are able to attach the created hard disk
1370 to virtual machiens, you must call one of the following methods to
1371 allocate a format-specific storage unit at the specified location:
1372 <ul>
1373 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1374 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1375 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1376 </ul>
1377
1378 Some hard disk attributes, such as <link to="#id"/>, may remain
1379 uninitialized until the hard disk storage unit is successfully created
1380 by one of the above methods.
1381
1382 After the storage unit is successfully created, the hard disk gets
1383 remembered by this VirtualBox installation and will be accessible
1384 trhough <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1385 methods. Remembered root (base) hard disks are also returned as part of
1386 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1387
1388 The list of all <link to="IHardDisk2::format">storage formats</link>
1389 supported by this VirtualBox installation can be obtained using
1390 <link to="ISystemProperties::hardDiskFormats"/>.
1391
1392 Note that the format of the location string is storage format specific.
1393 See <link to="IMedium::location"/>, IHardDisk2 and
1394 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1395 </desc>
1396 <param name="format" type="wstring" dir="in">
1397 <desc>
1398 Storage format to use for the new hard disk.
1399 </desc>
1400 </param>
1401 <param name="location" type="wstring" dir="in">
1402 <desc>
1403 Location of the storage unit for the new hard disk.
1404 </desc>
1405 </param>
1406 <param name="hardDisk" type="IHardDisk2" dir="return">
1407 <desc>Created hard disk object.</desc>
1408 </param>
1409 </method>
1410
1411 <method name="openHardDisk2">
1412 <desc>
1413 Opens a hard disk from an existing location.
1414
1415 After the hard disk is successfully opened by this method, it gets
1416 remembered by (known to) this VirtualBox installation and will be
1417 accessible trhough <link to="#getHardDisk2()"/> and
1418 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1419 are also returned as part of the <link to="#hardDisks2"/> array and can
1420 be attached to virtual machines. See IHardDisk2 for more details.
1421
1422 If a differencing hard disk is to be opened by this method, the
1423 operation will succeed only if its parent hard disk and all ancestors,
1424 if any, are already known to this VirtualBox installation (for example,
1425 were opened by this method before).
1426
1427 This method tries to guess the storage format of the specified hard disk
1428 by reading hard disk data at the specified location.
1429
1430 Note that the format of the location string is storage format specific.
1431 See <link to="IMedium::location"/>, IHardDisk2 and
1432 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1433 </desc>
1434 <param name="location" type="wstring" dir="in">
1435 <desc>
1436 Location of the storage unit that contains hard disk data in one of
1437 the supported storage formats.
1438 </desc>
1439 </param>
1440 <param name="hardDisk" type="IHardDisk2" dir="return">
1441 <desc>Opened hard disk object.</desc>
1442 </param>
1443 </method>
1444
1445 <method name="getHardDisk2" const="yes">
1446 <desc>
1447 Returns a hard disk with the given UUID.
1448
1449 The hard disk with the given UUID must be known to this VirtualBox
1450 installation, i.e. it must be previously created by
1451 <link to="#createHardDisk2()"/> or opened by <link
1452 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1453 </desc>
1454 <param name="id" type="uuid" dir="in">
1455 <desc>UUID of the hard disk to look for.</desc>
1456 </param>
1457 <param name="hardDisk" type="IHardDisk2" dir="return">
1458 <desc>Found hard disk object.</desc>
1459 </param>
1460 </method>
1461
1462 <method name="findHardDisk2">
1463 <desc>
1464 Returns a hard disk that uses the given location to store hard
1465 disk data.
1466
1467 The given hard disk must be known to this VirtualBox installation, i.e.
1468 it must be previously created by
1469 <link to="#createHardDisk2()"/> or opened by <link
1470 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1471
1472 The search is done by comparing the value of the @a location argument to
1473 the <link to="IHardDisk2::location"/> attribute of each known hard
1474 disk.
1475
1476 For locations repesented by file names in the host's filesystem, the
1477 requested location can be a path relative to the
1478 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1479 only a file name without any path is given, the
1480 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1481 folder</link> will be prepended to the file name before seacrhing. Note
1482 that on case sensitive filesystems, a case sensitive comparison is
1483 performed, otherwise the case of symbols in the file path is ignored.
1484 </desc>
1485 <param name="location" type="wstring" dir="in">
1486 <desc>Location string to search for.</desc>
1487 </param>
1488 <param name="hardDisk" type="IHardDisk2" dir="return">
1489 <desc>Found hard disk object.</desc>
1490 </param>
1491 </method>
1492
1493 <method name="openDVDImage">
1494 <desc>
1495 Opens a CD/DVD image contained in the specified file of the supported
1496 format and assigns it the given UUID.
1497
1498 After the image is successfully opened by this method, it gets
1499 remembered by (known to) this VirtualBox installation and will be
1500 accessible trhough <link to="#getDVDImage()"/> and
1501 <link to="#findDVDImage()"/> methods. Remembered images are also
1502 returned as part of the <link to="#DVDImages"/> array and can be mounted
1503 to virtual machines. See IMedium for more details.
1504
1505 See <link to="IMedium::location"/> to get more details about the format
1506 of the location string.
1507
1508 <note>
1509 Currently, only ISO CD/DVD images are supported by VirtualBox.
1510 </note>
1511 </desc>
1512 <param name="location" type="wstring" dir="in">
1513 <desc>
1514 Full path to the file that contains a valid CD/DVD image.
1515 </desc>
1516 </param>
1517 <param name="id" type="uuid" dir="in">
1518 <desc>
1519 UUID to assign to the given image within this VirtualBox installation.
1520 If an empty (null) UUID is specified, the system will randomly
1521 generate a new UUID.
1522 </desc>
1523 </param>
1524 <param name="image" type="IDVDImage2" dir="return">
1525 <desc>Opened CD/DVD image object.</desc>
1526 </param>
1527 </method>
1528
1529 <method name="getDVDImage">
1530 <desc>
1531 Returns a CD/DVD image with the given UUID.
1532
1533 The image with the given UUID must be known to this VirtualBox
1534 installation, i.e. it must be previously opened by <link
1535 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1536 </desc>
1537 <param name="id" type="uuid" dir="in">
1538 <desc>UUID of the image to look for.</desc>
1539 </param>
1540 <param name="image" type="IDVDImage2" dir="return">
1541 <desc>Found CD/DVD image object.</desc>
1542 </param>
1543 </method>
1544
1545 <method name="findDVDImage">
1546 <desc>
1547 Returns a CD/DVD image with the given image location.
1548
1549 The image with the given UUID must be known to this VirtualBox
1550 installation, i.e. it must be previously opened by <link
1551 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1552
1553 The search is done by comparing the value of the @a location argument to
1554 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1555
1556 The requested location can be a path relative to the
1557 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1558 only a file name without any path is given, the
1559 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1560 folder</link> will be prepended to the file name before seacrhing. Note
1561 that on case sensitive filesystems, a case sensitive comparison is
1562 performed, otherwise the case of symbols in the file path is ignored.
1563 </desc>
1564 <param name="location" type="wstring" dir="in">
1565 <desc>CD/DVD image file path to look for.</desc>
1566 </param>
1567 <param name="image" type="IDVDImage2" dir="return">
1568 <desc>Found CD/DVD image object.</desc>
1569 </param>
1570 </method>
1571
1572 <method name="openFloppyImage">
1573 <desc>
1574 Opens a floppy image contained in the specified file of the supported
1575 format and assigns it the given UUID.
1576
1577 After the image is successfully opened by this method, it gets
1578 remembered by (known to) this VirtualBox installation and will be
1579 accessible trhough <link to="#getFloppyImage()"/> and
1580 <link to="#findFloppyImage()"/> methods. Remembered images are also
1581 returned as part of the <link to="#floppyImages"/> array and can be
1582 mounted to virtual machines. See IMedium for more details.
1583
1584 See <link to="IMedium::location"/> to get more details about the format
1585 of the location string.
1586
1587 <note>
1588 Currently, only raw floppy images are supported by VirtualBox.
1589 </note>
1590 </desc>
1591 <param name="location" type="wstring" dir="in">
1592 <desc>
1593 Full path to the file that contains a valid floopy image.
1594 </desc>
1595 </param>
1596 <param name="id" type="uuid" dir="in">
1597 <desc>
1598 UUID to assign to the given image file within this VirtualBox
1599 installation. If an empty (null) UUID is specified, the system will
1600 randomly generate a new UUID.
1601 </desc>
1602 </param>
1603 <param name="image" type="IFloppyImage2" dir="return">
1604 <desc>Opened floppy image object.</desc>
1605 </param>
1606 </method>
1607
1608 <method name="getFloppyImage">
1609 <desc>
1610 Returns a floppy image with the given UUID.
1611
1612 The image with the given UUID must be known to this VirtualBox
1613 installation, i.e. it must be previously opened by <link
1614 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1615 </desc>
1616 <param name="id" type="uuid" dir="in">
1617 <desc>UUID of the image to look for.</desc>
1618 </param>
1619 <param name="image" type="IFloppyImage2" dir="return">
1620 <desc>Found floppy image object.</desc>
1621 </param>
1622 </method>
1623
1624 <method name="findFloppyImage">
1625 <desc>
1626 Returns a floppy image with the given image location.
1627
1628 The image with the given UUID must be known to this VirtualBox
1629 installation, i.e. it must be previously opened by <link
1630 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1631
1632 The search is done by comparing the value of the @a location argument to
1633 the <link to="IMedium::location"/> attribute of each known floppy image.
1634
1635 The requested location can be a path relative to the
1636 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1637 only a file name without any path is given, the
1638 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1639 folder</link> will be prepended to the file name before seacrhing. Note
1640 that on case sensitive filesystems, a case sensitive comparison is
1641 performed, otherwise the case of symbols in the file path is ignored.
1642 </desc>
1643 <param name="location" type="wstring" dir="in">
1644 <desc>Floppy image file path to look for.</desc>
1645 </param>
1646 <param name="image" type="IFloppyImage2" dir="return">
1647 <desc>Found floppy image object.</desc>
1648 </param>
1649 </method>
1650
1651 <method name="getGuestOSType">
1652 <desc>
1653 Returns an object describing the specified guest OS type.
1654
1655 The requested guest OS type is specified using a string which is a
1656 mnemonic identifier of the guest operating system, such as
1657 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1658 particular virtual machine can be read or set using the
1659 <link to="IMachine::OSTypeId"/> attribute.
1660
1661 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1662 available guest OS type objects. Each object has an
1663 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1664 the guest OS this object describes.
1665 </desc>
1666 <param name="id" type="wstring" dir="in">
1667 <desc>Guest OS type ID string.</desc>
1668 </param>
1669 <param name="type" type="IGuestOSType" dir="return">
1670 <desc>Guest OS type object.</desc>
1671 </param>
1672 </method>
1673
1674 <method name="createSharedFolder">
1675 <desc>
1676 Creates a new global shared folder by associating the given logical
1677 name with the given host path, adds it to the collection of shared
1678 folders and starts sharing it. Refer to the description of
1679 <link to="ISharedFolder"/> to read more about logical names.
1680 </desc>
1681 <param name="name" type="wstring" dir="in">
1682 <desc>Unique logical name of the shared folder.</desc>
1683 </param>
1684 <param name="hostPath" type="wstring" dir="in">
1685 <desc>Full path to the shared folder in the host file system.</desc>
1686 </param>
1687 <param name="writable" type="boolean" dir="in">
1688 <desc>Whether the share is writable or readonly</desc>
1689 </param>
1690 </method>
1691
1692 <method name="removeSharedFolder">
1693 <desc>
1694 Removes the global shared folder with the given name previously
1695 created by <link to="#createSharedFolder"/> from the collection of
1696 shared folders and stops sharing it.
1697 </desc>
1698 <param name="name" type="wstring" dir="in">
1699 <desc>Logical name of the shared folder to remove.</desc>
1700 </param>
1701 </method>
1702
1703 <method name="getNextExtraDataKey">
1704 <desc>
1705 Returns the global extra data key name following the supplied key.
1706
1707 An error is returned if the supplied @a key does not exist. @c NULL is
1708 returned in @a nextKey if the supplied key is the last key. When
1709 supplying @c NULL for the @a key, the first key item is returned in @a
1710 nextKey (if there is any). @a nextValue is an optional parameter and
1711 if supplied, the next key's value is returned in it.
1712 </desc>
1713 <param name="key" type="wstring" dir="in">
1714 <desc>Name of the data key to follow.</desc>
1715 </param>
1716 <param name="nextKey" type="wstring" dir="out">
1717 <desc>Name of the next data key.</desc>
1718 </param>
1719 <param name="nextValue" type="wstring" dir="out">
1720 <desc>Value of the next data key.</desc>
1721 </param>
1722 </method>
1723
1724 <method name="getExtraData">
1725 <desc>
1726 Returns associated global extra data.
1727
1728 If the requested data @a key does not exist, this function will
1729 succeed and return @c NULL in the @a value argument.
1730 </desc>
1731 <param name="key" type="wstring" dir="in">
1732 <desc>Name of the data key to get.</desc>
1733 </param>
1734 <param name="value" type="wstring" dir="return">
1735 <desc>Value of the requested data key.</desc>
1736 </param>
1737 </method>
1738
1739 <method name="setExtraData">
1740 <desc>
1741 Sets associated global extra data.
1742
1743 If you pass @c NULL as a key @a value, the given @a key will be
1744 deleted.
1745
1746 <note>
1747 Before performing the actual data change, this method will ask all
1748 registered callbacks using the
1749 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
1750 notification for a permission. If one of the callbacks refuses the
1751 new value, the change will not be performed.
1752 </note>
1753 <note>
1754 On success, the
1755 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
1756 is called to inform all registered callbacks about a successful data
1757 change.
1758 </note>
1759 </desc>
1760 <param name="key" type="wstring" dir="in">
1761 <desc>Name of the data key to set.</desc>
1762 </param>
1763 <param name="value" type="wstring" dir="in">
1764 <desc>Value to assign to the key.</desc>
1765 </param>
1766 </method>
1767
1768 <method name="openSession">
1769 <desc>
1770 Opens a new direct session with the given virtual machine.
1771
1772 A direct session acts as a local lock on the given VM.
1773 There can be only one direct session open at a time for every
1774 virtual machine, protecting the VM from being manipulated by
1775 conflicting actions from different processes. Only after a
1776 direct session has been opened, one can change all VM settings
1777 and execute the VM in the process space of the session object.
1778
1779 Sessions therefore can be compared to mutex semaphores that
1780 lock a given VM for modification and execution.
1781 See <link to="ISession">ISession</link> for details.
1782
1783 <note>Unless you are writing a new VM frontend, you will not
1784 want to execute a VM in the current process. To spawn a new
1785 process that executes a VM, use
1786 <link to="IVirtualBox::openRemoteSession" />
1787 instead.</note>
1788
1789 Upon successful return, the session object can be used to
1790 get access to the machine and to the VM console.
1791
1792 In VirtualBox terminology, the machine becomes "mutable" after
1793 a session has been opened. Note that the "mutable" machine
1794 object, on which you may invoke IMachine methods to change its
1795 settings, will be a different object from the immutable IMachine
1796 objects returned by various IVirtualBox methods. To obtain a
1797 mutable IMachine object (upon which you can invoke settings methods),
1798 use the <link to="ISession::machine" /> attribute.
1799
1800 One must always call <link to="ISession::close" /> to release the
1801 lock on the machine, or the machine's state will eventually be
1802 set to "Aborted".
1803
1804 In other words, to change settings on a machine, the following
1805 sequence is typically performed:
1806
1807 <ol>
1808 <li>Call this method (openSession) to have a machine locked for
1809 the current session.</li>
1810
1811 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
1812
1813 <li>Change the settings of the machine.</li>
1814
1815 <li>Call <link to="IMachine::saveSettings" />.</li>
1816
1817 <li>Close the session by calling <link to="ISession::close()"/>.</li>
1818 </ol>
1819 </desc>
1820 <param name="session" type="ISession" dir="in">
1821 <desc>
1822 Session object that will represent the opened session after
1823 successful method invocation. This object must not represent
1824 the already open session.
1825 <note>
1826 This session will be automatically closed if the
1827 VirtualBox server is terminated for some reason.
1828 </note>
1829 </desc>
1830 </param>
1831 <param name="machineId" type="uuid" dir="in">
1832 <desc>ID of the virtual machine to open a session with.</desc>
1833 </param>
1834 </method>
1835
1836 <method name="openRemoteSession">
1837 <desc>
1838 Spawns a new process that executes a virtual machine (called a
1839 "remote session").
1840
1841 Opening a remote session causes the VirtualBox server to start a new
1842 process that opens a direct session with the given VM. As a result, the
1843 VM is locked by that direct session in the new process, preventing
1844 conflicting changes from other processes. Since sessions act as locks
1845 that such prevent conflicting changes, one cannot open a remote session
1846 for a VM that already has another open session (direct or remote), or
1847 is currently in the process of opening one (see <link to="IMachine::sessionState"/>).
1848
1849 While the remote session still provides some level of control over the
1850 VM execution to the caller (using the <link to="IConsole" /> interface),
1851 not all VM settings are available for modification within the remote
1852 session context.
1853
1854 This operation can take some time (a new VM is started in a new process,
1855 for which memory and other resources need to be set up). Because of this,
1856 an <link to="IProgress" /> is returned to allow the caller to wait for this
1857 asynchronous operation to be completed. Until then, the remote session
1858 object remains in the closed state, and accessing the machine or its
1859 console through it is invalid. It is recommended to use
1860 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
1861 completion.
1862
1863 As with all <link to="ISession" /> objects, it is recommended to call
1864 <link to="ISession::close" /> on the local session object once openRemoteSession()
1865 has been called. However, the session's state (see <link to="ISession::state" />)
1866 will not return to "Closed" until the remote session has also closed (i.e.
1867 until the VM is no longer running). In that case, however, the state of
1868 the session will automatically change back to "Closed".
1869
1870 Currently supported session types (values of the @a type
1871 argument) are:
1872 <ul>
1873 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
1874 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
1875 </ul>
1876
1877 The @a environment argument is a string containing definitions of
1878 environment variables in the following format:
1879 @code
1880 NAME[=VALUE]\n
1881 NAME[=VALUE]\n
1882 ...
1883 @endcode
1884 where <tt>\\n</tt> is the new line character. These environment
1885 variables will be appended to the environment of the VirtualBox server
1886 process. If an environment variable exists both in the server process
1887 and in this list, the value from this list takes precedence over the
1888 server's variable. If the value of the environment variable is
1889 omitted, this variable will be removed from the resulting environment.
1890 If the environment string is @c null, the server environment is
1891 inherited by the started process as is.
1892
1893 <see>openExistingSession</see>
1894 </desc>
1895 <param name="session" type="ISession" dir="in">
1896 <desc>
1897 Session object that will represent the opened remote session
1898 after successful method invocation (this object must not
1899 represent an already open session).
1900 </desc>
1901 </param>
1902 <param name="machineId" type="uuid" dir="in">
1903 <desc>ID of the virtual machine to open a session with.</desc>
1904 </param>
1905 <param name="type" type="wstring" dir="in">
1906 <desc>
1907 Type of the remote session (case sensitive).
1908 </desc>
1909 </param>
1910 <param name="environment" type="wstring" dir="in">
1911 <desc>
1912 Environment to pass to the opened session (may be @c null).
1913 </desc>
1914 </param>
1915 <param name="progress" type="IProgress" dir="return">
1916 <desc>Progress object to track the operation completion.</desc>
1917 </param>
1918 </method>
1919
1920 <method name="openExistingSession">
1921 <desc>
1922 Opens a new remote session with the virtual machine for
1923 which a direct session is already open.
1924
1925 The remote session provides some level of control over the VM
1926 execution (using the IConsole interface) to the caller; however,
1927 within the remote session context, not all VM settings are available
1928 for modification.
1929
1930 As opposed to <link to="#openRemoteSession()"/>, the number of
1931 remote sessions opened this way is not limited by the API
1932
1933 <note>
1934 It is an error to open a remote session with the machine that
1935 doesn't have an open direct session.
1936 </note>
1937
1938 <see>openRemoteSession</see>
1939 </desc>
1940 <param name="session" type="ISession" dir="in">
1941 <desc>
1942 Session object that will represent the open remote session
1943 after successful method invocation. This object must not
1944 represent an already open session.
1945 <note>
1946 This session will be automatically closed when the peer
1947 (direct) session dies or gets closed.
1948 </note>
1949 </desc>
1950 </param>
1951 <param name="machineId" type="uuid" dir="in">
1952 <desc>ID of the virtual machine to open a session with.</desc>
1953 </param>
1954 </method>
1955
1956 <method name="registerCallback">
1957 <desc>
1958 Registers a new global VirtualBox callback. The methods of the given
1959 callback object will be called by VirtualBox when an appropriate
1960 event occurs.
1961 </desc>
1962 <param name="callback" type="IVirtualBoxCallback" dir="in">
1963 <desc>Callback object to register.</desc>
1964 </param>
1965 </method>
1966
1967 <method name="unregisterCallback">
1968 <desc>
1969 Unregisters the previously registered global VirtualBox callback.
1970 </desc>
1971 <param name="callback" type="IVirtualBoxCallback" dir="in">
1972 <desc>Callback object to unregister.</desc>
1973 </param>
1974 </method>
1975
1976 <method name="waitForPropertyChange">
1977 <desc>
1978 Blocks the caller until any of the properties represented by the @a
1979 what argument changes the value or until the given timeout interval
1980 expires.
1981
1982 The @a what argument is a comma separated list of property masks that
1983 describe properties the caller is interested in. The property mask is
1984 a string in the following format:
1985
1986 <pre>
1987 [[group.]subgroup.]name
1988 </pre>
1989
1990 where @c name is the property name and @c group, @c subgroup are zero
1991 or or more property group specifiers. Each element (group or name) in
1992 the property mask may be either a Latin string or an asterisk symbol
1993 (@c "*") which is used to match any string for the given element. A
1994 property mask that doesn't contain asterisk symbols represents a
1995 single fully qualified property name.
1996
1997 Groups in the fully qualified property name go from more generic (the
1998 left-most part) to more specific (the right-most part). The first
1999 element is usually a name of the object the property belongs to. The
2000 second element may be either a property name, or a child object name,
2001 or an index if the preceding element names an object which is one of
2002 many objects of the same type. This way, property names form a
2003 hierarchy of properties. Here are some examples of property names:
2004
2005 <table>
2006 <tr>
2007 <td><tt>VirtualBox.version</tt></td>
2008 <td><link to="IVirtualBox::version"/> property</td>
2009 </tr>
2010 <tr>
2011 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2012 <td><link to="IMachine::name"/> property of the machine with the
2013 given UUID</td>
2014 </tr>
2015 </table>
2016
2017 Most property names directly correspond to the properties of objects
2018 (components) provided by the VirtualBox library and may be used to
2019 track changes to these properties. However, there may be
2020 pseudo-property names that don't correspond to any existing object's
2021 property directly, as well as there may be object properties that
2022 don't have a corresponding property name that is understood by this
2023 method, and therefore changes to such properties cannot be
2024 tracked. See individual object's property descriptions to get a
2025 fully qualified property name that can be used with this method (if
2026 any).
2027
2028 There is a special property mask @c "*" (i.e. a string consisting of a
2029 single asterisk symbol) that can be used to match all properties.
2030 Below are more examples of property masks:
2031
2032 <table>
2033 <tr>
2034 <td><tt>VirtualBox.*</tt></td>
2035 <td>Track all properties of the VirtualBox object</td>
2036 </tr>
2037 <tr>
2038 <td><tt>Machine.*.name</tt></td>
2039 <td>Track changes to the <link to="IMachine::name"/> property of
2040 all registered virtual machines</td>
2041 </tr>
2042 </table>
2043
2044 </desc>
2045 <param name="what" type="wstring" dir="in">
2046 <desc>Comma separated list of property masks.</desc>
2047 </param>
2048 <param name="timeout" type="unsigned long" dir="in">
2049 <desc>
2050 Wait timeout in milliseconds.
2051 Specify -1 for an indefinite wait.
2052 </desc>
2053 </param>
2054 <param name="changed" type="wstring" dir="out">
2055 <desc>
2056 Comma separated list of properties that have been changed and caused
2057 this method to return to the caller.
2058 </desc>
2059 </param>
2060 <param name="values" type="wstring" dir="out">
2061 <desc>Reserved, not currently used.</desc>
2062 </param>
2063 </method>
2064
2065 <method name="saveSettings">
2066 <desc>
2067 Saves the global settings to the global settings file
2068 (<link to="#settingsFilePath"/>).
2069
2070 This method is only useful for explicitly saving the global settings
2071 file after it has been auto-converted from the old format to the most
2072 recent format (see <link to="#settingsFileVersion"/> for details).
2073 Normally, the global settings file is implicitly saved when a global
2074 setting is changed.
2075 </desc>
2076 </method>
2077
2078 <method name="saveSettingsWithBackup">
2079 <desc>
2080 Creates a backup copy of the global settings file
2081 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2082 calls <link to="#saveSettings()"/>.
2083
2084 Note that the backup copy is created <b>only</b> if the settings file
2085 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2086 details). Otherwise, this call is fully equivalent to
2087 <link to="#saveSettings()"/> and no backup copying is done.
2088
2089 The backup copy is created in the same directory where the original
2090 settings file is located. It is given the following file name:
2091 <pre>
2092 original.xml.x.y-platform.bak
2093 </pre>
2094 where <tt>original.xml</tt> is the original settings file name
2095 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2096 format of the settings file (before auto-conversion).
2097
2098 If the given backup file already exists, this method will try to add the
2099 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2100 0 to 9) and copy it again until it succeeds. If all suffixes are
2101 occupied, or if any other copy error occurs, this method will return a
2102 failure.
2103
2104 If the copy operation succeeds, the @a bakFileName return argument will
2105 receive a full path to the created backup file (for informational
2106 purposes). Note that this will happen even if the subsequent
2107 <link to="#saveSettings()"/> call performed by this method after the
2108 copy operation, fails.
2109
2110 <note>
2111 The VirtualBox API never calls this method. It is intended purely for
2112 the purposes of creating backup copies of the settings files by
2113 front-ends before saving the results of the automatically performed
2114 settings conversion to disk.
2115 </note>
2116
2117 <see>settingsFileVersion</see>
2118 </desc>
2119 <param name="bakFileName" type="wstring" dir="return">
2120 <desc>Full path to the created backup copy.</desc>
2121 </param>
2122 </method>
2123
2124 </interface>
2125
2126 <!--
2127 // IMachine
2128 /////////////////////////////////////////////////////////////////////////
2129 -->
2130
2131 <enumerator
2132 name="IMachineEnumerator" type="IMachine"
2133 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
2134 />
2135
2136 <collection
2137 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
2138 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
2139 readonly="yes"
2140 />
2141
2142 <interface
2143 name="IInternalMachineControl" extends="$unknown"
2144 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
2145 internal="yes"
2146 wsmap="suppress"
2147 >
2148 <method name="updateState">
2149 <desc>
2150 Updates the VM state.
2151 <note>
2152 This operation will also update the settings file with
2153 the correct information about the saved state file
2154 and delete this file from disk when appropriate.
2155 </note>
2156 </desc>
2157 <param name="state" type="MachineState" dir="in"/>
2158 </method>
2159
2160 <method name="getIPCId">
2161 <param name="id" type="wstring" dir="return"/>
2162 </method>
2163
2164 <method name="runUSBDeviceFilters">
2165 <desc>
2166 Asks the server to run USB devices filters of the associated
2167 machine against the given USB device and tell if there is
2168 a match.
2169 <note>
2170 Intended to be used only for remote USB devices. Local
2171 ones don't require to call this method (this is done
2172 implicitly by the Host and USBProxyService).
2173 </note>
2174 </desc>
2175 <param name="device" type="IUSBDevice" dir="in"/>
2176 <param name="matched" type="boolean" dir="out"/>
2177 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2178 </method>
2179
2180 <method name="captureUSBDevice">
2181 <desc>
2182 Requests a capture of the given host USB device.
2183 When the request is completed, the VM process will
2184 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2185 notification.
2186 </desc>
2187 <param name="id" type="uuid" dir="in"/>
2188 </method>
2189
2190 <method name="detachUSBDevice">
2191 <desc>
2192 Notification that a VM is going to detach (done = false) or has
2193 already detached (done = true) the given USB device.
2194 When the done = true request is completed, the VM process will
2195 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2196 notification.
2197 <note>
2198 In the done = true case, the server must run its own filters
2199 and filters of all VMs but this one on the detached device
2200 as if it were just attached to the host computer.
2201 </note>
2202 </desc>
2203 <param name="id" type="uuid" dir="in"/>
2204 <param name="done" type="boolean" dir="in"/>
2205 </method>
2206
2207 <method name="autoCaptureUSBDevices">
2208 <desc>
2209 Requests a capture all matching USB devices attached to the host.
2210 When the request is completed, the VM process will
2211 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2212 notification per every captured device.
2213 </desc>
2214 </method>
2215
2216 <method name="detachAllUSBDevices">
2217 <desc>
2218 Notification that a VM that is being powered down. The done
2219 parameter indicates whether which stage of the power down
2220 we're at. When done = false the VM is announcing its
2221 intentions, while when done = true the VM is reporting
2222 what it has done.
2223 <note>
2224 In the done = true case, the server must run its own filters
2225 and filters of all VMs but this one on all detach devices as
2226 if they were just attached to the host computer.
2227 </note>
2228 </desc>
2229 <param name="done" type="boolean" dir="in"/>
2230 </method>
2231
2232 <method name="onSessionEnd">
2233 <desc>
2234 Triggered by the given session object when the session is about
2235 to close normally.
2236 </desc>
2237 <param name="session" type="ISession" dir="in">
2238 <desc>Session that is being closed</desc>
2239 </param>
2240 <param name="progress" type="IProgress" dir="return">
2241 <desc>
2242 Used to wait until the corresponding machine is actually
2243 deassociated from the given session on the server.
2244 Returned only when this session is a direct one.
2245 </desc>
2246 </param>
2247 </method>
2248
2249 <method name="beginSavingState">
2250 <desc>
2251 Called by the VM process to inform the server it wants to
2252 save the current state and stop the VM execution.
2253 </desc>
2254 <param name="progress" type="IProgress" dir="in">
2255 <desc>
2256 Progress object created by the VM process to wait until
2257 the state is saved.
2258 </desc>
2259 </param>
2260 <param name="stateFilePath" type="wstring" dir="out">
2261 <desc>
2262 File path the VM process must save the execution state to.
2263 </desc>
2264 </param>
2265 </method>
2266
2267 <method name="endSavingState">
2268 <desc>
2269 Called by the VM process to inform the server that saving
2270 the state previously requested by #beginSavingState is either
2271 successfully finished or there was a failure.
2272 </desc>
2273
2274 <param name="success" type="boolean" dir="in">
2275 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2276 </param>
2277 </method>
2278
2279 <method name="adoptSavedState">
2280 <desc>
2281 Gets called by IConsole::adoptSavedState.
2282 </desc>
2283 <param name="savedStateFile" type="wstring" dir="in">
2284 <desc>Path to the saved state file to adopt.</desc>
2285 </param>
2286 </method>
2287
2288 <method name="beginTakingSnapshot">
2289 <desc>
2290 Called by the VM process to inform the server it wants to
2291 take a snapshot.
2292 </desc>
2293 <param name="initiator" type="IConsole" dir="in">
2294 <desc>The console object that initiated this call.</desc>
2295 </param>
2296 <param name="name" type="wstring" dir="in">
2297 <desc>Snapshot name</desc>
2298 </param>
2299 <param name="description" type="wstring" dir="in">
2300 <desc>Snapshot description</desc>
2301 </param>
2302 <param name="progress" type="IProgress" dir="in">
2303 <desc>
2304 Progress object created by the VM process to wait until
2305 the state is saved (only for online snapshots).
2306 </desc>
2307 </param>
2308 <param name="stateFilePath" type="wstring" dir="out">
2309 <desc>
2310 File path the VM process must save the execution state to.
2311 </desc>
2312 </param>
2313 <param name="serverProgress" type="IProgress" dir="out">
2314 <desc>
2315 Progress object created by the server process to wait until
2316 the snapshot is taken (VDI diff creation, etc.).
2317 </desc>
2318 </param>
2319 </method>
2320
2321 <method name="endTakingSnapshot">
2322 <desc>
2323 Called by the VM process to inform the server that the snapshot
2324 previously requested by #beginTakingSnapshot is either
2325 successfully taken or there was a failure.
2326 </desc>
2327
2328 <param name="success" type="boolean" dir="in">
2329 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2330 </param>
2331 </method>
2332
2333 <method name="discardSnapshot">
2334 <desc>
2335 Gets called by IConsole::discardSnapshot.
2336 </desc>
2337 <param name="initiator" type="IConsole" dir="in">
2338 <desc>The console object that initiated this call.</desc>
2339 </param>
2340 <param name="id" type="uuid" dir="in">
2341 <desc>UUID of the snapshot to discard.</desc>
2342 </param>
2343 <param name="machineState" type="MachineState" dir="out">
2344 <desc>New machine state after this operation is started.</desc>
2345 </param>
2346 <param name="progress" type="IProgress" dir="return">
2347 <desc>Progress object to track the operation completion.</desc>
2348 </param>
2349 </method>
2350
2351 <method name="discardCurrentState">
2352 <desc>
2353 Gets called by IConsole::discardCurrentState.
2354 </desc>
2355 <param name="initiator" type="IConsole" dir="in">
2356 <desc>The console object that initiated this call.</desc>
2357 </param>
2358 <param name="machineState" type="MachineState" dir="out">
2359 <desc>New machine state after this operation is started.</desc>
2360 </param>
2361 <param name="progress" type="IProgress" dir="return">
2362 <desc>Progress object to track the operation completion.</desc>
2363 </param>
2364 </method>
2365
2366 <method name="discardCurrentSnapshotAndState">
2367 <desc>
2368 Gets called by IConsole::discardCurrentSnapshotAndState.
2369 </desc>
2370 <param name="initiator" type="IConsole" dir="in">
2371 <desc>The console object that initiated this call.</desc>
2372 </param>
2373 <param name="machineState" type="MachineState" dir="out">
2374 <desc>New machine state after this operation is started.</desc>
2375 </param>
2376 <param name="progress" type="IProgress" dir="return">
2377 <desc>Progress object to track the operation completion.</desc>
2378 </param>
2379 </method>
2380
2381 <method name="pullGuestProperties">
2382 <desc>
2383 Get the list of the guest properties matching a set of patterns along
2384 with their values, timestamps and flags and give responsibility for
2385 managing properties to the console.
2386 </desc>
2387 <param name="name" type="wstring" dir="out" safearray="yes">
2388 <desc>
2389 The names of the properties returned.
2390 </desc>
2391 </param>
2392 <param name="value" type="wstring" dir="out" safearray="yes">
2393 <desc>
2394 The values of the properties returned. The array entries match the
2395 corresponding entries in the @a name array.
2396 </desc>
2397 </param>
2398 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
2399 <desc>
2400 The timestamps of the properties returned. The array entries match
2401 the corresponding entries in the @a name array.
2402 </desc>
2403 </param>
2404 <param name="flags" type="wstring" dir="out" safearray="yes">
2405 <desc>
2406 The flags of the properties returned. The array entries match the
2407 corresponding entries in the @a name array.
2408 </desc>
2409 </param>
2410 </method>
2411
2412 <method name="pushGuestProperties">
2413 <desc>
2414 Set the list of the guest properties matching a set of patterns along
2415 with their values, timestamps and flags and return responsibility for
2416 managing properties to IMachine.
2417 </desc>
2418 <param name="name" type="wstring" dir="in" safearray="yes">
2419 <desc>
2420 The names of the properties.
2421 </desc>
2422 </param>
2423 <param name="value" type="wstring" dir="in" safearray="yes">
2424 <desc>
2425 The values of the properties. The array entries match the
2426 corresponding entries in the @a name array.
2427 </desc>
2428 </param>
2429 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
2430 <desc>
2431 The timestamps of the properties. The array entries match
2432 the corresponding entries in the @a name array.
2433 </desc>
2434 </param>
2435 <param name="flags" type="wstring" dir="in" safearray="yes">
2436 <desc>
2437 The flags of the properties. The array entries match the
2438 corresponding entries in the @a name array.
2439 </desc>
2440 </param>
2441 </method>
2442 <method name="pushGuestProperty">
2443 <desc>
2444 Update a single guest property in IMachine.
2445 </desc>
2446 <param name="name" type="wstring" dir="in">
2447 <desc>
2448 The name of the property to be updated.
2449 </desc>
2450 </param>
2451 <param name="value" type="wstring" dir="in">
2452 <desc>
2453 The value of the property.
2454 </desc>
2455 </param>
2456 <param name="timestamp" type="unsigned long long" dir="in">
2457 <desc>
2458 The timestamp of the property.
2459 </desc>
2460 </param>
2461 <param name="flags" type="wstring" dir="in">
2462 <desc>
2463 The flags of the property.
2464 </desc>
2465 </param>
2466 </method>
2467 </interface>
2468
2469 <interface
2470 name="IBIOSSettings" extends="$unknown"
2471 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
2472 wsmap="managed"
2473 >
2474 <desc>
2475 The IBIOSSettings interface represents BIOS settings of the virtual
2476 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
2477 </desc>
2478 <attribute name="logoFadeIn" type="boolean">
2479 <desc>Fade in flag for BIOS logo animation.</desc>
2480 </attribute>
2481
2482 <attribute name="logoFadeOut" type="boolean">
2483 <desc>Fade out flag for BIOS logo animation.</desc>
2484 </attribute>
2485
2486 <attribute name="logoDisplayTime" type="unsigned long">
2487 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
2488 </attribute>
2489
2490 <attribute name="logoImagePath" type="wstring">
2491 <desc>Local file system path for external BIOS image.</desc>
2492 </attribute>
2493
2494 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
2495 <desc>Mode of the BIOS boot device menu.</desc>
2496 </attribute>
2497
2498 <attribute name="ACPIEnabled" type="boolean">
2499 <desc>ACPI support flag.</desc>
2500 </attribute>
2501
2502 <attribute name="IOAPICEnabled" type="boolean">
2503 <desc>
2504 IO APIC support flag. If set, VirtualBox will provide an IO APIC
2505 and support IRQs above 15.
2506 </desc>
2507 </attribute>
2508
2509 <attribute name="timeOffset" type="long long">
2510 <desc>
2511 Offset in milliseconds from the host system time. This allows for
2512 guests running with a different system date/time than the host.
2513 It is equivalent to setting the system date/time in the BIOS other
2514 than it's not an absolute value but a relative one. Guest Additions
2515 time synchronization also honors this offset.
2516 </desc>
2517 </attribute>
2518
2519 <attribute name="PXEDebugEnabled" type="boolean">
2520 <desc>
2521 PXE debug logging flag. If set, VirtualBox will write extensive
2522 PXE trace information to the release log.
2523 </desc>
2524 </attribute>
2525
2526 <attribute name="IDEControllerType" type="IDEControllerType">
2527 <desc>
2528 Type of the virtual IDE controller. Depending on this value,
2529 VirtualBox will provide different virtual IDE hardware
2530 devices to the guest.
2531 </desc>
2532 </attribute>
2533
2534 </interface>
2535
2536 <interface
2537 name="IMachine" extends="$unknown"
2538 uuid="b5d1baca-da5b-4202-905f-ee53a5f60ae5"
2539 wsmap="managed"
2540 >
2541 <desc>
2542 The IMachine interface represents a virtual machine, or guest, created
2543 in VirtualBox.
2544
2545 This interface is used in two contexts. First of all, a collection of
2546 objects implementing this interface is stored in the
2547 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
2548 machines that are currently registered with this VirtualBox
2549 installation. Also, once a session has been opened for the given virtual
2550 machine (e.g. the virtual machine is running), the machine object
2551 associated with the open session can be queried from the session object;
2552 see <link to="ISession"/> for details.
2553
2554 The main role of this interface is to expose the settings of the virtual
2555 machine and provide methods to change various aspects of the virtual
2556 machine's configuration. For machine objects stored in the
2557 <link to="IVirtualBox::machines2"/> collection, all attributes are
2558 read-only unless explicitly stated otherwise in individual attribute
2559 and method descriptions. In order to change a machine setting, a session
2560 for this machine must be opened using one of
2561 <link to="IVirtualBox::openSession"/>,
2562 <link to="IVirtualBox::openRemoteSession"/> or
2563 <link to="IVirtualBox::openExistingSession"/> methods. After the
2564 session has been successfully opened, a mutable machine object needs to
2565 be queried from the session object and then the desired settings changes
2566 can be applied to the returned object using IMachine attributes and
2567 methods. See the ISession interface description for more information
2568 about sessions.
2569
2570 Note that the IMachine interface does not provide methods to control
2571 virtual machine execution (such as start the machine, or power it
2572 down) -- these methods are grouped in a separate IConsole
2573 interface. Refer to the IConsole interface description to get more
2574 information about this topic.
2575
2576 <see>ISession, IConsole</see>
2577 </desc>
2578
2579 <attribute name="parent" type="IVirtualBox" readonly="yes">
2580 <desc>Associated parent obect.</desc>
2581 </attribute>
2582
2583 <attribute name="accessible" type="boolean" readonly="yes">
2584 <desc>
2585 Whether this virtual machine is currently accessible or not.
2586
2587 The machine is considered to be inaccessible when:
2588 <ul>
2589 <li>It is a registered virtual machine, and
2590 </li>
2591 <li>Its settings file is inaccessible (for example, it is
2592 located on a network share that is not accessible during
2593 VirtualBox startup, or becomes inaccessible later, or if
2594 the settings file can be read but is invalid).
2595 </li>
2596 </ul>
2597
2598 Otherwise, the value of this property is always <tt>true</tt>.
2599
2600 Every time this property is read, the accessibility state of
2601 this machine is re-evaluated. If the returned value is |false|,
2602 the <link to="#accessError"/> property may be used to get the
2603 detailed error information describing the reason of
2604 inaccessibility.
2605
2606 When the machine is inaccessible, only the following properties
2607 can be used on it:
2608 <ul>
2609 <li><link to="#parent"/></li>
2610 <li><link to="#id"/></li>
2611 <li><link to="#settingsFilePath"/></li>
2612 <li><link to="#accessible"/></li>
2613 <li><link to="#accessError"/></li>
2614 </ul>
2615
2616 An attempt to access any other property or method will return
2617 an error.
2618
2619 The only possible action you can perform on an inaccessible
2620 machine is to unregister it using the
2621 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
2622 for the accessibility state once more by querying this
2623 property).
2624
2625 <note>
2626 In the current implementation, once this property returns
2627 <tt>true</tt>, the machine will never become inaccessible
2628 later, even if its settings file cannot be successfully
2629 read/written any more (at least, until the VirtualBox
2630 server is restarted). This limitation may be removed in
2631 future releases.
2632 </note>
2633 </desc>
2634 </attribute>
2635
2636 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
2637 <desc>
2638 Error information describing the reason of machine
2639 inaccessibility.
2640
2641 Reading this property is only valid after the last call to
2642 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
2643 machine is currently unaccessible). Otherwise, a null
2644 IVirtualBoxErrorInfo object will be returned.
2645 </desc>
2646 </attribute>
2647
2648 <attribute name="name" type="wstring">
2649 <desc>
2650 Name of the virtual machine.
2651
2652 Besides being used for human-readable identification purposes
2653 everywhere in VirtualBox, the virtual machine name is also used
2654 as a name of the machine's settings file and as a name of the
2655 subdirectory this settings file resides in. Thus, every time you
2656 change the value of this property, the settings file will be
2657 renamed once you call <link to="#saveSettings()"/> to confirm the
2658 change. The containing subdirectory will be also renamed, but
2659 only if it has exactly the same name as the settings file
2660 itself prior to changing this property (for backward compatibility
2661 with previous API releases). The above implies the following
2662 limitations:
2663 <ul>
2664 <li>The machine name cannot be empty.</li>
2665 <li>The machine name can contain only characters that are valid
2666 file name characters according to the rules of the file
2667 system used to store VirtualBox configuration.</li>
2668 <li>You cannot have two or more machines with the same name
2669 if they use the same subdirectory for storing the machine
2670 settings files.</li>
2671 <li>You cannot change the name of the machine if it is running,
2672 or if any file in the directory containing the settings file
2673 is being used by another running machine or by any other
2674 process in the host operating system at a time when
2675 <link to="#saveSettings()"/> is called.
2676 </li>
2677 </ul>
2678 If any of the above limitations are hit, <link to="#saveSettings()"/>
2679 will return an appropriate error message explaining the exact
2680 reason and the changes you made to this machine will not be
2681 saved.
2682 <note>
2683 For "legacy" machines created using the
2684 <link to="IVirtualBox::createLegacyMachine()"/> call,
2685 the above naming limitations do not apply because the
2686 machine name does not affect the settings file name.
2687 The settings file name remains the same as it was specified
2688 during machine creation and never changes.
2689 </note>
2690 </desc>
2691 </attribute>
2692
2693 <attribute name="description" type="wstring">
2694 <desc>
2695 Description of the virtual machine.
2696
2697 The description attribute can contain any text and is
2698 typically used to describe the hardware and software
2699 configuration of the virtual machine in detail (i.e. network
2700 settings, versions of the installed software and so on).
2701 </desc>
2702 </attribute>
2703
2704 <attribute name="id" type="uuid" readonly="yes">
2705 <desc>UUID of the virtual machine.</desc>
2706 </attribute>
2707
2708 <attribute name="OSTypeId" type="wstring">
2709 <desc>
2710 User-defined identifier of the Guest OS type.
2711 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
2712 an IGuestOSType object representing details about the given
2713 Guest OS type.
2714 <note>
2715 This value may differ from the value returned by
2716 <link to="IGuest::OSTypeId"/> if Guest Additions are
2717 installed to the guest OS.
2718 </note>
2719 </desc>
2720 </attribute>
2721
2722 <attribute name="CPUCount" type="unsigned long">
2723 <desc>Number of virtual CPUs in the VM.</desc>
2724 </attribute>
2725
2726 <attribute name="memorySize" type="unsigned long">
2727 <desc>System memory size in megabytes.</desc>
2728 </attribute>
2729
2730 <attribute name="memoryBalloonSize" type="unsigned long">
2731 <desc>Initial memory balloon size in megabytes.</desc>
2732 </attribute>
2733
2734 <attribute name="statisticsUpdateInterval" type="unsigned long">
2735 <desc>Initial interval to update guest statistics in seconds.</desc>
2736 </attribute>
2737
2738 <attribute name="VRAMSize" type="unsigned long">
2739 <desc>Video memory size in megabytes.</desc>
2740 </attribute>
2741
2742 <attribute name="MonitorCount" type="unsigned long">
2743 <desc>
2744 Number of virtual monitors.
2745 <note>
2746 Only effective on Windows XP and later guests with
2747 Guest Additions installed.
2748 </note>
2749 </desc>
2750 </attribute>
2751
2752 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
2753 <desc>Object containing all BIOS settings.</desc>
2754 </attribute>
2755
2756 <attribute name="HWVirtExEnabled" type="TSBool">
2757 <desc>
2758 This setting determines whether VirtualBox will try to make use of
2759 the host CPU's hardware virtualization extensions such as Intel VT-x
2760 and AMD-V. Note that in case such extensions are not available,
2761 they will not be used.
2762 </desc>
2763 </attribute>
2764
2765 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
2766 <desc>
2767 This setting determines whether VirtualBox will try to make use of
2768 the nested paging extension of Intel VT-x and AMD-V. Note that in case
2769 such extensions are not available, they will not be used.
2770 </desc>
2771 </attribute>
2772
2773 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
2774 <desc>
2775 This setting determines whether VirtualBox will try to make use of
2776 the VPID extension of Intel VT-x. Note that in case such extensions are
2777 not available, they will not be used.
2778 </desc>
2779 </attribute>
2780
2781 <attribute name="PAEEnabled" type="boolean" default="false">
2782 <desc>
2783 This setting determines whether VirtualBox will expose the Physical Address
2784 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
2785 is not available, it will not be reported.
2786 </desc>
2787 </attribute>
2788
2789 <attribute name="snapshotFolder" type="wstring">
2790 <desc>
2791 Full path to the directory used to store snapshot data
2792 (differencing hard disks and saved state files) of this machine.
2793
2794 The initial value of this property is
2795 <tt>&lt;</tt><link to="#settingsFilePath">
2796 path_to_settings_file</link><tt>&gt;/&lt;</tt>
2797 <link to="#id">machine_uuid</link>
2798 <tt>&gt;</tt>.
2799
2800 Currently, it is an error to try to change this property on
2801 a machine that has snapshots (because this would require to
2802 move possibly large files to a different location).
2803 A separate method will be available for this purpose later.
2804
2805 <note>
2806 Setting this property to <tt>null</tt> will restore the
2807 initial value.
2808 </note>
2809 <note>
2810 When setting this property, the specified path can be
2811 absolute (full path) or relative to the directory where the
2812 <link to="#settingsFilePath">machine settings file</link>
2813 is located. When reading this property, a full path is
2814 always returned.
2815 </note>
2816 <note>
2817 The specified path may not exist, it will be created
2818 when necessary.
2819 </note>
2820 </desc>
2821 </attribute>
2822
2823 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
2824 <desc>VRDP server object.</desc>
2825 </attribute>
2826
2827 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
2828 <desc>Array of hard disks attached to this machine.</desc>
2829 </attribute>
2830
2831 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
2832 <desc>Associated DVD drive object.</desc>
2833 </attribute>
2834
2835 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
2836 <desc>Associated floppy drive object.</desc>
2837 </attribute>
2838
2839 <attribute name="USBController" type="IUSBController" readonly="yes">
2840 <desc>
2841 Associated USB controller object.
2842
2843 <note>
2844 This method may set a @ref com_warnings "warning result code".
2845 </note>
2846 <note>
2847 If USB functionality is not available in the given edition of
2848 VirtualBox, this method will set the result code to @c E_NOTIMPL.
2849 </note>
2850 </desc>
2851 </attribute>
2852
2853 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
2854 <desc>Associated audio adapter, always present.</desc>
2855 </attribute>
2856
2857 <attribute name="SATAController" type="ISATAController" readonly="yes">
2858 <desc>
2859 Associated SATA controller object.
2860 </desc>
2861 </attribute>
2862
2863 <attribute name="settingsFilePath" type="wstring" readonly="yes">
2864 <desc>
2865 Full name of the file containing machine settings data.
2866 </desc>
2867 </attribute>
2868
2869 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
2870 <desc>
2871 Current version of the format of the settings file of this machine
2872 (<link to="#settingsFilePath"/>).
2873
2874 The version string has the following format:
2875 <pre>
2876 x.y-platform
2877 </pre>
2878 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
2879 versions, and <tt>platform</tt> is the platform identifier.
2880
2881 The current version usually matches the value of the
2882 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
2883 settings file was created by an older version of VirtualBox and there
2884 was a change of the settings file format since then.
2885
2886 Note that VirtualBox automatically converts settings files from older
2887 versions to the most recent version when reading them (usually at
2888 VirtualBox startup) but it doesn't save the changes back until
2889 you call a method that implicitly saves settings (such as
2890 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
2891 explicitly. Therefore, if the value of this attribute differs from the
2892 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
2893 means that the settings file was converted but the result of the
2894 conversion is not yet saved to disk.
2895
2896 The above feature may be used by interactive front-ends to inform users
2897 about the settings file format change and offer them to explicitly save
2898 all converted settings files (the global and VM-specific ones),
2899 optionally create backup copies of the old settings files before saving,
2900 etc.
2901
2902 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
2903 </desc>
2904 </attribute>
2905
2906 <attribute name="settingsModified" type="boolean" readonly="yes">
2907 <desc>
2908 Whether the settings of this machine have been modified
2909 (but neither yet saved nor discarded).
2910 <note>
2911 Reading this property is only valid on instances returned
2912 by <link to="ISession::machine"/> and on new machines
2913 created by <link to="IVirtualBox::createMachine"/> or opened
2914 by <link to="IVirtualBox::openMachine"/> but not
2915 yet registered, or on unregistered machines after calling
2916 <link to="IVirtualBox::unregisterMachine"/>. For all other
2917 cases, the settings can never be modified.
2918 </note>
2919 <note>
2920 For newly created unregistered machines, the value of this
2921 property is always TRUE until <link to="#saveSettings()"/>
2922 is called (no matter if any machine settings have been
2923 changed after the creation or not). For opened machines
2924 the value is set to FALSE (and then follows to normal rules).
2925 </note>
2926 </desc>
2927 </attribute>
2928
2929 <attribute name="sessionState" type="SessionState" readonly="yes">
2930 <desc>Current session state for this machine.</desc>
2931 </attribute>
2932
2933 <attribute name="sessionType" type="wstring" readonly="yes">
2934 <desc>
2935 Type of the session. If <link to="#sessionState"/> is
2936 SessionSpawning or SessionOpen, this attribute contains the
2937 same value as passed to the
2938 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
2939 type parameter. If the session was opened directly using
2940 <link to="IVirtualBox::openSession()"/>, or if
2941 <link to="#sessionState"/> is SessionClosed, the value of this
2942 attribute is @c null.
2943 </desc>
2944 </attribute>
2945
2946 <attribute name="sessionPid" type="unsigned long" readonly="yes">
2947 <desc>
2948 Identifier of the session process. This attribute contains the
2949 platform-dependent identifier of the process that has opened a
2950 direct session for this machine using the
2951 <link to="IVirtualBox::openSession()"/> call. The returned value
2952 is only valid if <link to="#sessionState"/> is SessionOpen or
2953 SessionClosing (i.e. a session is currently open or being
2954 closed) by the time this property is read.
2955 </desc>
2956 </attribute>
2957
2958 <attribute name="state" type="MachineState" readonly="yes">
2959 <desc>Current execution state of this machine.</desc>
2960 </attribute>
2961
2962 <attribute name="lastStateChange" type="long long" readonly="yes">
2963 <desc>
2964 Time stamp of the last execution state change,
2965 in milliseconds since 1970-01-01 UTC.
2966 </desc>
2967 </attribute>
2968
2969 <attribute name="stateFilePath" type="wstring" readonly="yes">
2970 <desc>
2971 Full path to the file that stores the execution state of
2972 the machine when it is in the <link to="MachineState::Saved"/>
2973 state.
2974 <note>
2975 When the machine is not in the Saved state, this attribute
2976 <tt>null</tt>.
2977 </note>
2978 </desc>
2979 </attribute>
2980
2981 <attribute name="logFolder" type="wstring" readonly="yes">
2982 <desc>
2983 Full path to the folder that stores a set of rotated log files
2984 recorded during machine execution. The most recent log file is
2985 named <tt>VBox.log</tt>, the previous log file is
2986 named <tt>VBox.log.1</tt> and so on (upto <tt>VBox.log.3</tt>
2987 in the current version).
2988 </desc>
2989 </attribute>
2990
2991 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
2992 <desc>
2993 Current snapshot of this machine.
2994 <note>
2995 A <tt>null</tt> object is returned if the machine doesn't
2996 have snapshots.
2997 </note>
2998 <see><link to="ISnapshot"/></see>
2999 </desc>
3000 </attribute>
3001
3002 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3003 <desc>
3004 Number of snapshots taken on this machine. Zero means the
3005 machine doesn't have any snapshots.
3006 </desc>
3007 </attribute>
3008
3009 <attribute name="currentStateModified" type="boolean" readonly="yes">
3010 <desc>
3011 Returns <tt>true</tt> if the current state of the machine is not
3012 identical to the state stored in the current snapshot.
3013
3014 The current state is identical to the current snapshot right
3015 after one of the following calls are made:
3016 <ul>
3017 <li><link to="IConsole::discardCurrentState"/> or
3018 <link to="IConsole::discardCurrentSnapshotAndState"/>
3019 </li>
3020 <li><link to="IConsole::takeSnapshot"/> (issued on a
3021 powered off or saved machine, for which
3022 <link to="#settingsModified"/> returns <tt>false</tt>)
3023 </li>
3024 <li><link to="IMachine::setCurrentSnapshot"/>
3025 </li>
3026 </ul>
3027
3028 The current state remains identical until one of the following
3029 happens:
3030 <ul>
3031 <li>settings of the machine are changed</li>
3032 <li>the saved state is discarded</li>
3033 <li>the current snapshot is discarded</li>
3034 <li>an attempt to execute the machine is made</li>
3035 </ul>
3036
3037 <note>
3038 For machines that don't have snapshots, this property is
3039 always <tt>false</tt>.
3040 </note>
3041 </desc>
3042 </attribute>
3043
3044 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3045 <desc>
3046 Collection of shared folders for this machine (permanent shared
3047 folders). These folders are shared automatically at machine startup
3048 and available only to the guest OS installed within this machine.
3049
3050 New shared folders are added to the collection using
3051 <link to="#createSharedFolder"/>. Existing shared folders can be
3052 removed using <link to="#removeSharedFolder"/>.
3053 </desc>
3054 </attribute>
3055
3056 <attribute name="clipboardMode" type="ClipboardMode">
3057 <desc>
3058 Synchronization mode between the host OS clipboard
3059 and the guest OS clipboard.
3060 </desc>
3061 </attribute>
3062
3063 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3064 <desc>
3065 A comma-separated list of simple glob patterns. Changes to guest
3066 properties whose name matches one of the patterns will generate an
3067 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3068 </desc>
3069 </attribute>
3070
3071 <method name="setBootOrder">
3072 <desc>
3073 Puts the given device to the specified position in
3074 the boot order.
3075
3076 To indicate that no device is associated with the given position,
3077 <link to="DeviceType::Null"/> should be used.
3078
3079 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3080 </desc>
3081 <param name="position" type="unsigned long" dir="in">
3082 <desc>
3083 Position in the boot order (<tt>1</tt> to the total number of
3084 devices the machine can boot from, as returned by
3085 <link to="ISystemProperties::maxBootPosition"/>).
3086 </desc>
3087 </param>
3088 <param name="device" type="DeviceType" dir="in">
3089 <desc>
3090 The type of the device used to boot at the given position.
3091 </desc>
3092 </param>
3093 </method>
3094
3095 <method name="getBootOrder" const="yes">
3096 <desc>
3097 Returns the device type that occupies the specified
3098 position in the boot order.
3099
3100 @todo [remove?]
3101 If the machine can have more than one device of the returned type
3102 (such as hard disks), then a separate method should be used to
3103 retrieve the individual device that occupies the given position.
3104
3105 If here are no devices at the given position, then
3106 <link to="DeviceType::Null"/> is returned.
3107
3108 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3109 </desc>
3110 <param name="order" type="unsigned long" dir="in">
3111 <desc>
3112 Position in the boot order (<tt>1</tt> to the total number of
3113 devices the machine can boot from, as returned by
3114 <link to="ISystemProperties::maxBootPosition"/>).
3115 </desc>
3116 </param>
3117 <param name="device" type="DeviceType" dir="return">
3118 <desc>
3119 Device at the given position.
3120 </desc>
3121 </param>
3122 </method>
3123
3124 <method name="attachHardDisk2">
3125 <desc>
3126 Attaches a virtual hard disk identified by the given UUID to a device
3127 slot of the specified bus.
3128
3129 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3130 specify the primary or secondary IDE controller, respectively. The
3131 SATA bus supports 30 channels, so this parameter can be a number in
3132 range from @c 0 to @c 29.
3133
3134 For the primary controller of the IDE bus, the @a device number can be
3135 either @c 0 or @c 1, to specify the master or the slave device,
3136 respectively. For the scondary IDE controller, the device number is
3137 always @c 1 because the master device is reserved for the CD-ROM drive.
3138
3139 For the SATA bus, the @a device parameter is not currently used and
3140 must always be @c 0.
3141
3142 The specified device slot must not have another disk attached to it, or
3143 this method will fail.
3144
3145 See <link to="IHardDisk2"/> for more detailed information about
3146 attaching hard disks.
3147
3148 <note>
3149 You cannot attach a hard disk to a running machine. Also, you cannot
3150 attach a hard disk to a newly created machine until this machine's
3151 settings are saved to disk using <link to="#saveSettings()"/>.
3152 </note>
3153 <note>
3154 If the hard disk is being attached indirectly, a new differencing hard
3155 disk will be implicitly created for it and attached instead. If the
3156 changes made to the machine settings (icluding this indirect
3157 attachment) are later cancelled using <link to="#discardSettings()"/>,
3158 this implicitly created diffrerencing hard disk will be implicitly
3159 deleted.
3160 </note>
3161 </desc>
3162 <param name="id" type="uuid" dir="in">
3163 <desc>UUID of the hard disk to attach.</desc>
3164 </param>
3165 <param name="bus" type="StorageBus" dir="in">
3166 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3167 </param>
3168 <param name="channel" type="long" dir="in">
3169 <desc>Channel to attach the hard disk to.</desc>
3170 </param>
3171 <param name="device" type="long" dir="in">
3172 <desc>
3173 Device slot in the given channel to attach the hard disk to.
3174 </desc>
3175 </param>
3176 </method>
3177
3178 <method name="getHardDisk2" const="yes">
3179 <desc>
3180 Returns the virtual hard disk attached to a device slot of the specified
3181 bus.
3182
3183 Note that if the hard disk was indirectly attached by
3184 <link to="#attachHardDisk2()"/> to the given device slot then this
3185 method will return not the same object as passed to the
3186 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3187 more detailed information about attaching hard disks.
3188 </desc>
3189 <param name="bus" type="StorageBus" dir="in">
3190 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3191 </param>
3192 <param name="channel" type="long" dir="in">
3193 <desc>Channel to query.</desc>
3194 </param>
3195 <param name="device" type="long" dir="in">
3196 <desc>Device slot in the given channel to query.</desc>
3197 </param>
3198 <param name="hardDisk" type="IHardDisk2" dir="return">
3199 <desc>Attached hard disk object.</desc>
3200 </param>
3201 </method>
3202
3203 <method name="detachHardDisk2">
3204 <desc>
3205 Detaches the virtual hard disk attached to a device slot of the
3206 specified bus.
3207
3208 Detaching the hard disk from the virtual machine is deferred. This means
3209 that the hard disk remains associated with the machine when this methor
3210 returns and gets actually de-associated only after a successful
3211 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3212 for more detailed information about attaching hard disks.
3213
3214 <note>
3215 You cannot detach the hard disk from a running machine.
3216 </note>
3217 <note>
3218 Detaching differencing hard disks implicitly created by <link
3219 to="#attachHardDisk2()"/> for the indirect attachment using this
3220 method will <b>not</b> implicitly delete them. The
3221 <link to="IHardDisk2::deleteStorage()"/> operation should be
3222 explicitly performed by the caller after the hard disk is successfully
3223 detached and the settings are saved with
3224 <link to="#saveSettings()"/>, if it is the desired action.
3225 </note>
3226
3227 </desc>
3228 <param name="bus" type="StorageBus" dir="in">
3229 <desc>Bus to detach the hard disk from.</desc>
3230 </param>
3231 <param name="channel" type="long" dir="in">
3232 <desc>Channel number to detach the hard disk from.</desc>
3233 </param>
3234 <param name="device" type="long" dir="in">
3235 <desc>Device slot number to detach the hard disk from.</desc>
3236 </param>
3237 </method>
3238
3239 <method name="getNetworkAdapter" const="yes">
3240 <desc>
3241 Returns the network adapter associated with the given slot.
3242 Slots are numbered sequentially, starting with zero. The total
3243 number of adapters per every machine is defined by the
3244 <link to="ISystemProperties::networkAdapterCount"/> property,
3245 so the maximum slot number is one less than that property's value.
3246 </desc>
3247 <param name="slot" type="unsigned long" dir="in"/>
3248 <param name="adapter" type="INetworkAdapter" dir="return"/>
3249 </method>
3250
3251 <method name="getSerialPort" const="yes">
3252 <desc>
3253 Returns the serial port associated with the given slot.
3254 Slots are numbered sequentially, starting with zero. The total
3255 number of serial ports per every machine is defined by the
3256 <link to="ISystemProperties::serialPortCount"/> property,
3257 so the maximum slot number is one less than that property's value.
3258 </desc>
3259 <param name="slot" type="unsigned long" dir="in"/>
3260 <param name="port" type="ISerialPort" dir="return"/>
3261 </method>
3262
3263 <method name="getParallelPort" const="yes">
3264 <desc>
3265 Returns the parallel port associated with the given slot.
3266 Slots are numbered sequentially, starting with zero. The total
3267 number of parallel ports per every machine is defined by the
3268 <link to="ISystemProperties::parallelPortCount"/> property,
3269 so the maximum slot number is one less than that property's value.
3270 </desc>
3271 <param name="slot" type="unsigned long" dir="in"/>
3272 <param name="port" type="IParallelPort" dir="return"/>
3273 </method>
3274
3275 <method name="getNextExtraDataKey">
3276 <desc>
3277 Returns the machine-specific extra data key name following the
3278 supplied key.
3279
3280 An error is returned if the supplied @a key does not exist. @c NULL is
3281 returned in @a nextKey if the supplied key is the last key. When
3282 supplying @c NULL for the @a key, the first key item is returned in @a
3283 nextKey (if there is any). @a nextValue is an optional parameter and
3284 if supplied, the next key's value is returned in it.
3285 </desc>
3286 <param name="key" type="wstring" dir="in">
3287 <desc>Name of the data key to follow.</desc>
3288 </param>
3289 <param name="nextKey" type="wstring" dir="out">
3290 <desc>Name of the next data key.</desc>
3291 </param>
3292 <param name="nextValue" type="wstring" dir="out">
3293 <desc>Value of the next data key.</desc>
3294 </param>
3295 </method>
3296
3297 <method name="getExtraData">
3298 <desc>
3299 Returns associated machine-specific extra data.
3300
3301 If the requested data @a key does not exist, this function will
3302 succeed and return @c NULL in the @a value argument.
3303 </desc>
3304 <param name="key" type="wstring" dir="in">
3305 <desc>Name of the data key to get.</desc>
3306 </param>
3307 <param name="value" type="wstring" dir="return">
3308 <desc>Value of the requested data key.</desc>
3309 </param>
3310 </method>
3311
3312 <method name="setExtraData">
3313 <desc>
3314 Sets associated machine-specific extra data.
3315
3316 If you pass @c NULL as a key @a value, the given @a key will be
3317 deleted.
3318
3319 <note>
3320 Before performing the actual data change, this method will ask all
3321 registered callbacks using the
3322 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
3323 notification for a permission. If one of the callbacks refuses the
3324 new value, the change will not be performed.
3325 </note>
3326 <note>
3327 On success, the
3328 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
3329 is called to inform all registered callbacks about a successful data
3330 change.
3331 </note>
3332 <note>
3333 This method can be called outside the machine session and therefore
3334 it's a caller's responsibility to handle possible race conditions
3335 when several clients change the same key at the same time.
3336 </note>
3337 </desc>
3338 <param name="key" type="wstring" dir="in">
3339 <desc>Name of the data key to set.</desc>
3340 </param>
3341 <param name="value" type="wstring" dir="in">
3342 <desc>Value to assign to the key.</desc>
3343 </param>
3344 </method>
3345
3346 <method name="saveSettings">
3347 <desc>
3348 Saves any changes to machine settings made since the session
3349 has been opened or a new machine has been created, or since the
3350 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
3351 For registered machines, new settings become visible to all
3352 other VirtualBox clients after successful invocation of this
3353 method.
3354 <note>
3355 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
3356 notification event after the configuration has been successfully
3357 saved (only for registered machines).
3358 </note>
3359 <note>
3360 Calling this method is only valid on instances returned
3361 by <link to="ISession::machine"/> and on new machines
3362 created by <link to="IVirtualBox::createMachine"/> but not
3363 yet registered, or on unregistered machines after calling
3364 <link to="IVirtualBox::unregisterMachine"/>.
3365 </note>
3366 </desc>
3367 </method>
3368
3369 <method name="saveSettingsWithBackup">
3370 <desc>
3371 Creates a backup copy of the machine settings file (<link
3372 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
3373 <link to="#saveSettings()"/>.
3374
3375 Note that the backup copy is created <b>only</b> if the settings file
3376 auto-conversion took place (see <link to="#settingsFileVersion"/> for
3377 details). Otherwise, this call is fully equivalent to
3378 <link to="#saveSettings()"/> and no backup copying is done.
3379
3380 The backup copy is created in the same directory where the original
3381 settings file is located. It is given the following file name:
3382 <pre>
3383 original.xml.x.y-platform.bak
3384 </pre>
3385 where <tt>original.xml</tt> is the original settings file name
3386 (excluding path), and <tt>x.y-platform</tt> is the version of the old
3387 format of the settings file (before auto-conversion).
3388
3389 If the given backup file already exists, this method will try to add the
3390 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
3391 0 to 9) and copy it again until it succeeds. If all suffixes are
3392 occupied, or if any other copy error occurs, this method will return a
3393 failure.
3394
3395 If the copy operation succeeds, the @a bakFileName return argument will
3396 receive a full path to the created backup file (for informational
3397 purposes). Note that this will happen even if the subsequent
3398 <link to="#saveSettings()"/> call performed by this method after the
3399 copy operation, fails.
3400
3401 <note>
3402 The VirtualBox API never calls this method. It is intended purely for
3403 the purposes of creating backup copies of the settings files by
3404 front-ends before saving the results of the automatically performed
3405 settings conversion to disk.
3406 </note>
3407
3408 <see>settingsFileVersion</see>
3409 </desc>
3410 <param name="bakFileName" type="wstring" dir="return">
3411 <desc>Full path to the created backup copy.</desc>
3412 </param>
3413 </method>
3414
3415 <method name="discardSettings">
3416 <desc>
3417 Discards any changes to the machine settings made since the session
3418 has been opened or since the last call to <link to="#saveSettings()"/>
3419 or <link to="#discardSettings"/>.
3420 <note>
3421 Calling this method is only valid on instances returned
3422 by <link to="ISession::machine"/> and on new machines
3423 created by <link to="IVirtualBox::createMachine"/> or
3424 opened by <link to="IVirtualBox::openMachine"/> but not
3425 yet registered, or on unregistered machines after calling
3426 <link to="IVirtualBox::unregisterMachine"/>.
3427 </note>
3428 </desc>
3429 </method>
3430
3431 <method name="deleteSettings">
3432 <desc>
3433 Deletes the settings file of this machine from disk.
3434 The machine must not be registered in order for this operation
3435 to succeed.
3436 <note>
3437 <link to="#settingsModified"/> will return TRUE after this
3438 method successfully returns.
3439 </note>
3440 <note>
3441 Calling this method is only valid on instances returned
3442 by <link to="ISession::machine"/> and on new machines
3443 created by <link to="IVirtualBox::createMachine"/> or
3444 opened by <link to="IVirtualBox::openMachine"/> but not
3445 yet registered, or on unregistered machines after calling
3446 <link to="IVirtualBox::unregisterMachine"/>.
3447 </note>
3448 <note>
3449 The deleted machine settings file can be restored (saved again)
3450 by calling <link to="#saveSettings()"/>.
3451 </note>
3452 </desc>
3453 </method>
3454
3455 <method name="getSnapshot">
3456 <desc>
3457 Returns a snapshot of this machine with the given UUID.
3458 A <tt>null</tt> UUID can be used to obtain the first snapshot
3459 taken on this machine. This is useful if you want to traverse
3460 the whole tree of snapshots starting from the root.
3461 </desc>
3462 <param name="id" type="uuid" dir="in">
3463 <desc>UUID of the snapshot to get</desc>
3464 </param>
3465 <param name="snapshot" type="ISnapshot" dir="return">
3466 <desc>Snapshot object with the given UUID.</desc>
3467 </param>
3468 </method>
3469
3470 <method name="findSnapshot">
3471 <desc>
3472 Returns a snapshot of this machine with the given name.
3473 </desc>
3474 <param name="name" type="wstring" dir="in">
3475 <desc>Name of the snapshot to find</desc>
3476 </param>
3477 <param name="snapshot" type="ISnapshot" dir="return">
3478 <desc>Snapshot object with the given name.</desc>
3479 </param>
3480 </method>
3481
3482 <method name="setCurrentSnapshot">
3483 <desc>
3484 Sets the current snapshot of this machine.
3485 <note>
3486 In the current implementation, this operation is not
3487 implemented.
3488 </note>
3489 </desc>
3490 <param name="id" type="uuid" dir="in">
3491 <desc>UUID of the snapshot to set as the current snapshot.</desc>
3492 </param>
3493 </method>
3494
3495 <method name="createSharedFolder">
3496 <desc>
3497 Creates a new permanent shared folder by associating the given logical
3498 name with the given host path, adds it to the collection of shared
3499 folders and starts sharing it. Refer to the description of
3500 <link to="ISharedFolder"/> to read more about logical names.
3501 </desc>
3502 <param name="name" type="wstring" dir="in">
3503 <desc>Unique logical name of the shared folder.</desc>
3504 </param>
3505 <param name="hostPath" type="wstring" dir="in">
3506 <desc>Full path to the shared folder in the host file system.</desc>
3507 </param>
3508 <param name="writable" type="boolean" dir="in">
3509 <desc>Whether the share is writable or readonly</desc>
3510 </param>
3511 </method>
3512
3513 <method name="removeSharedFolder">
3514 <desc>
3515 Removes the permanent shared folder with the given name previously
3516 created by <link to="#createSharedFolder"/> from the collection of
3517 shared folders and stops sharing it.
3518 </desc>
3519 <param name="name" type="wstring" dir="in">
3520 <desc>Logical name of the shared folder to remove.</desc>
3521 </param>
3522 </method>
3523
3524 <method name="canShowConsoleWindow">
3525 <desc>
3526 Returns @c true if the VM console process can activate the
3527 console window and bring it to foreground on the desktop of
3528 the host PC.
3529 <note>
3530 This method will fail if a session for this machine is not
3531 currently open.
3532 </note>
3533 </desc>
3534 <param name="canShow" type="boolean" dir="return">
3535 <desc>
3536 @c true if the console window can be shown and @c
3537 false otherwise.
3538 </desc>
3539 </param>
3540 </method>
3541
3542 <method name="showConsoleWindow">
3543 <desc>
3544 Activates the console window and brings it to foreground on
3545 the desktop of the host PC. Many modern window managers on
3546 many platforms implement some sort of focus stealing
3547 prevention logic, so that it may be impossible to activate
3548 a window without the help of the currently active
3549 application. In this case, this method will return a non-zero
3550 identifier that represents the top-level window of the VM
3551 console process. The caller, if it represents a currently
3552 active process, is responsible to use this identifier (in a
3553 platform-dependent manner) to perform actual window
3554 activation.
3555 <note>
3556 This method will fail if a session for this machine is not
3557 currently open.
3558 </note>
3559 </desc>
3560 <param name="winId" type="unsigned long long" dir="return">
3561 <desc>
3562 Platform-dependent identifier of the top-level VM console
3563 window, or zero if this method has performed all actions
3564 necessary to implement the <i>show window</i> semantics for
3565 the given platform and/or VirtualBox front-end.
3566 </desc>
3567 </param>
3568 </method>
3569
3570 <method name="getGuestProperty">
3571 <desc>
3572 Reads an entry from the machine's guest property store.
3573 </desc>
3574 <param name="name" type="wstring" dir="in">
3575 <desc>
3576 The name of the property to read.
3577 </desc>
3578 </param>
3579 <param name="value" type="wstring" dir="out">
3580 <desc>
3581 The value of the property. If the property does not exist then this
3582 will be empty.
3583 </desc>
3584 </param>
3585 <param name="timestamp" type="unsigned long long" dir="out">
3586 <desc>
3587 The time at which the property was last modified, as seen by the
3588 server process.
3589 </desc>
3590 </param>
3591 <param name="flags" type="wstring" dir="out">
3592 <desc>
3593 Additional property parameters, passed as a comma-separated list of
3594 "name=value" type entries.
3595 </desc>
3596 </param>
3597 </method>
3598
3599 <method name="getGuestPropertyValue">
3600 <desc>
3601 Reads a value from the machine's guest property store.
3602 </desc>
3603 <param name="property" type="wstring" dir="in">
3604 <desc>
3605 The name of the property to read.
3606 </desc>
3607 </param>
3608 <param name="value" type="wstring" dir="return">
3609 <desc>
3610 The value of the property. If the property does not exist then this
3611 will be empty.
3612 </desc>
3613 </param>
3614 </method>
3615
3616 <method name="getGuestPropertyTimestamp">
3617 <desc>
3618 Reads a property timestamp from the machine's guest property store.
3619 </desc>
3620 <param name="property" type="wstring" dir="in">
3621 <desc>
3622 The name of the property to read.
3623 </desc>
3624 </param>
3625 <param name="value" type="unsigned long long" dir="return">
3626 <desc>
3627 The timestamp. If the property does not exist then this will be
3628 empty.
3629 </desc>
3630 </param>
3631 </method>
3632
3633 <method name="setGuestProperty">
3634 <desc>
3635 Sets, changes or deletes an entry in the machine's guest property
3636 store.
3637 </desc>
3638 <param name="property" type="wstring" dir="in">
3639 <desc>
3640 The name of the property to set, change or delete.
3641 </desc>
3642 </param>
3643 <param name="value" type="wstring" dir="in">
3644 <desc>
3645 The new value of the property to set, change or delete. If the
3646 property does not yet exist and value is non-empty, it will be
3647 created. If the value is empty, the key will be deleted if it
3648 exists.
3649 </desc>
3650 </param>
3651 <param name="flags" type="wstring" dir="in">
3652 <desc>
3653 Additional property parameters, passed as a comma-separated list of
3654 "name=value" type entries.
3655 </desc>
3656 </param>
3657 </method>
3658
3659 <method name="setGuestPropertyValue">
3660 <desc>
3661 Sets, changes or deletes a value in the machine's guest property
3662 store. The flags field will be left unchanged or created empty for a
3663 new property.
3664 </desc>
3665 <param name="property" type="wstring" dir="in">
3666 <desc>
3667 The name of the property to set, change or delete.
3668 </desc>
3669 </param>
3670 <param name="value" type="wstring" dir="in">
3671 <desc>
3672 The new value of the property to set, change or delete. If the
3673 property does not yet exist and value is non-empty, it will be
3674 created. If value is empty, the property will be deleted if it
3675 exists.
3676 </desc>
3677 </param>
3678 </method>
3679
3680 <method name="enumerateGuestProperties">
3681 <desc>
3682 Return a list of the guest properties matching a set of patterns along
3683 with their values, timestamps and flags.
3684 </desc>
3685 <param name="patterns" type="wstring" dir="in">
3686 <desc>
3687 The patterns to match the properties against, separated by '|'
3688 characters. If this is empty or NULL, all properties will match.
3689 </desc>
3690 </param>
3691 <param name="name" type="wstring" dir="out" safearray="yes">
3692 <desc>
3693 The names of the properties returned.
3694 </desc>
3695 </param>
3696 <param name="value" type="wstring" dir="out" safearray="yes">
3697 <desc>
3698 The values of the properties returned. The array entries match the
3699 corresponding entries in the @a name array.
3700 </desc>
3701 </param>
3702 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3703 <desc>
3704 The timestamps of the properties returned. The array entries match
3705 the corresponding entries in the @a name array.
3706 </desc>
3707 </param>
3708 <param name="flags" type="wstring" dir="out" safearray="yes">
3709 <desc>
3710 The flags of the properties returned. The array entries match the
3711 corresponding entries in the @a name array.
3712 </desc>
3713 </param>
3714 </method>
3715</interface>
3716
3717 <!--
3718 // IConsole
3719 /////////////////////////////////////////////////////////////////////////
3720 -->
3721
3722 <interface
3723 name="IConsoleCallback" extends="$unknown"
3724 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
3725 wsmap="suppress"
3726 >
3727
3728 <method name="onMousePointerShapeChange">
3729 <desc>
3730 Notification when the guest mouse pointer shape has
3731 changed. The new shape data is given.
3732 </desc>
3733 <param name="visible" type="boolean" dir="in">
3734 <desc>
3735 Flag whether the pointer is visible.
3736 </desc>
3737 </param>
3738 <param name="alpha" type="boolean" dir="in">
3739 <desc>
3740 Flag whether the pointer has an alpha channel.
3741 </desc>
3742 </param>
3743 <param name="xHot" type="unsigned long" dir="in">
3744 <desc>
3745 The pointer hot spot x coordinate.
3746 </desc>
3747 </param>
3748 <param name="yHot" type="unsigned long" dir="in">
3749 <desc>
3750 The pointer hot spot y coordinate.
3751 </desc>
3752 </param>
3753 <param name="width" type="unsigned long" dir="in">
3754 <desc>
3755 Width of the pointer shape in pixels.
3756 </desc>
3757 </param>
3758 <param name="height" type="unsigned long" dir="in">
3759 <desc>
3760 Height of the pointer shape in pixels.
3761 </desc>
3762 </param>
3763 <param name="shape" type="octet" mod="ptr" dir="in">
3764 <desc>
3765 Address of the shape buffer.
3766
3767 The buffer contains 1 bpp (bits per pixel) AND mask followed by 32 bpp XOR (color) mask.
3768
3769 For pointers without alpha channel the XOR mask pixels are 32 bit values: (lsb)BGR0(msb).
3770 For pointers with alpha channel the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
3771
3772 AND mask presents for pointers with alpha channel, so if the callback does not
3773 support alpha, the pointer could be displayed as a normal color pointer.
3774
3775 The AND mask is 1 bpp bitmap with byte aligned scanlines. Size of AND mask,
3776 therefore, is <tt>cbAnd = (width + 7) / 8 * height</tt>. The padding bits at the
3777 end of any scanline are undefined.
3778
3779 The XOR mask follows the AND mask on the next 4 bytes aligned offset:
3780 <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>
3781 Bytes in the gap between the AND and the XOR mask are undefined.
3782 XOR mask scanlines have no gap between them and size of XOR mask is:
3783 <tt>cXor = width * 4 * height</tt>.
3784
3785 <note>
3786 If 'shape' is equal to 0, only pointer visibility is being changed.
3787 </note>
3788 </desc>
3789 </param>
3790 </method>
3791
3792 <method name="onMouseCapabilityChange">
3793 <desc>
3794 Notification when the mouse capabilities reported by the
3795 guest have changed. The new capabilities are passed.
3796 </desc>
3797 <param name="supportsAbsolute" type="boolean" dir="in"/>
3798 <param name="needsHostCursor" type="boolean" dir="in"/>
3799 </method>
3800
3801 <method name="onKeyboardLedsChange">
3802 <desc>
3803 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
3804 to alter the state of the keyboard LEDs.
3805 </desc>
3806 <param name="numLock" type="boolean" dir="in"/>
3807 <param name="capsLock" type="boolean" dir="in"/>
3808 <param name="scrollLock" type="boolean" dir="in"/>
3809 </method>
3810
3811 <method name="onStateChange">
3812 <desc>
3813 Notification when the execution state of the machine has changed.
3814 The new state will be given.
3815 </desc>
3816 <param name="state" type="MachineState" dir="in"/>
3817 </method>
3818
3819 <method name="onAdditionsStateChange">
3820 <desc>
3821 Notification when a Guest Additions property changes.
3822 Interested callees should query IGuest attributes to
3823 find out what has changed.
3824 </desc>
3825 </method>
3826
3827 <method name="onDVDDriveChange">
3828 <desc>
3829 Notification when a property of the
3830 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
3831 Interested callees should use IDVDDrive methods to find out what has
3832 changed.
3833 </desc>
3834 </method>
3835
3836 <method name="onFloppyDriveChange">
3837 <desc>
3838 Notification when a property of the
3839 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
3840 Interested callees should use IFloppyDrive methods to find out what
3841 has changed.
3842 </desc>
3843 </method>
3844
3845 <method name="onNetworkAdapterChange">
3846 <desc>
3847 Notification when a property of one of the
3848 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
3849 changes. Interested callees should use INetworkAdapter methods and
3850 attributes to find out what has changed.
3851 </desc>
3852 <param name="networkAdapter" type="INetworkAdapter" dir="in">
3853 <desc>Network adapter that is subject to change.</desc>
3854 </param>
3855 </method>
3856
3857 <method name="onSerialPortChange">
3858 <desc>
3859 Notification when a property of one of the
3860 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
3861 Interested callees should use ISerialPort methods and attributes
3862 to find out what has changed.
3863 </desc>
3864 <param name="serialPort" type="ISerialPort" dir="in">
3865 <desc>Serial port that is subject to change.</desc>
3866 </param>
3867 </method>
3868
3869 <method name="onParallelPortChange">
3870 <desc>
3871 Notification when a property of one of the
3872 virtual <link to="IMachine::getParallelPort">parallel ports</link>
3873 changes. Interested callees should use ISerialPort methods and
3874 attributes to find out what has changed.
3875 </desc>
3876 <param name="parallelPort" type="IParallelPort" dir="in">
3877 <desc>Parallel port that is subject to change.</desc>
3878 </param>
3879 </method>
3880
3881 <method name="onVRDPServerChange">
3882 <desc>
3883 Notification when a property of the
3884 <link to="IMachine::VRDPServer">VRDP server</link> changes.
3885 Interested callees should use IVRDPServer methods and attributes to
3886 find out what has changed.
3887 </desc>
3888 </method>
3889
3890 <method name="onUSBControllerChange">
3891 <desc>
3892 Notification when a property of the virtual
3893 <link to="IMachine::USBController">USB controller</link> changes.
3894 Interested callees should use IUSBController methods and attributes to
3895 find out what has changed.
3896 </desc>
3897 </method>
3898
3899 <method name="onUSBDeviceStateChange">
3900 <desc>
3901 Notification when a USB device is attached to or detached from
3902 the virtual USB controller.
3903
3904 This notification is sent as a result of the indirect
3905 request to attach the device because it matches one of the
3906 machine USB filters, or as a result of the direct request
3907 issued by <link to="IConsole::attachUSBDevice"/> or
3908 <link to="IConsole::detachUSBDevice"/>.
3909
3910 This notification is sent in case of both a succeeded and a
3911 failed request completion. When the request succeeds, the @a
3912 error parameter is @c null, and the given device has been
3913 already added to (when @a attached is @c true) or removed from
3914 (when @a attached is @c false) the collection represented by
3915 <link to="IConsole::USBDevices"/>. On failure, the collection
3916 doesn't change and the @a error parameter represents the error
3917 message describing the failure.
3918
3919 </desc>
3920 <param name="device" type="IUSBDevice" dir="in">
3921 <desc>Device that is subject to state change.</desc>
3922 </param>
3923 <param name="attached" type="boolean" dir="in">
3924 <desc>
3925 <tt>true</tt> if the device was attached
3926 and <tt>false</tt> otherwise.
3927 </desc>
3928 </param>
3929 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
3930 <desc>
3931 <tt>null</tt> on success or an error message object on
3932 failure.
3933 </desc>
3934 </param>
3935 </method>
3936
3937 <method name="onSharedFolderChange">
3938 <desc>
3939 Notification when a shared folder is added or removed.
3940 The @a scope argument defines one of three scopes:
3941 <link to="IVirtualBox::sharedFolders">global shared folders</link>
3942 (<link to="Scope::Global">Global</link>),
3943 <link to="IMachine::sharedFolders">permanent shared folders</link> of
3944 the machine (<link to="Scope::Machine">Machine</link>) or <link
3945 to="IConsole::sharedFolders">transient shared folders</link> of the
3946 machine (<link to="Scope::Session">Session</link>). Interested callees
3947 should use query the corresponding collections to find out what has
3948 changed.
3949 </desc>
3950 <param name="scope" type="Scope" dir="in">
3951 <desc>Sope of the notification.</desc>
3952 </param>
3953 </method>
3954
3955 <method name="onRuntimeError">
3956 <desc>
3957 Notification when an error happens during the virtual
3958 machine execution.
3959
3960 There are three kinds of runtime errors:
3961 <ul>
3962 <li><i>fatal</i></li>
3963 <li><i>non-fatal with retry</i></li>
3964 <li><i>non-fatal warnings</i></li>
3965 </ul>
3966
3967 <b>Fatal</b> errors are indicated by the @a fatal parameter set
3968 to <tt>true</tt>. In case of fatal errors, the virtual machine
3969 execution is always paused before calling this notification, and
3970 the notification handler is supposed either to immediately save
3971 the virtual machine state using <link to="IConsole::saveState()"/>
3972 or power it off using <link to="IConsole::powerDown()"/>.
3973 Resuming the execution can lead to unpredictable results.
3974
3975 <b>Non-fatal</b> errors and warnings are indicated by the
3976 @a fatal parameter set to <tt>false</tt>. If the virtual machine
3977 is in the Paused state by the time the error notification is
3978 received, it means that the user can <i>try to resume</i> the machine
3979 execution after attempting to solve the problem that caused the
3980 error. In this case, the notification handler is supposed
3981 to show an appropriate message to the user (depending on the
3982 value of the @a id parameter) that offers several actions such
3983 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
3984 wants to retry, the notification handler should continue
3985 the machine execution using the <link to="IConsole::resume()"/>
3986 call. If the machine execution is not Paused during this
3987 notification, then it means this notification is a <i>warning</i>
3988 (for example, about a fatal condition that can happen very soon);
3989 no immediate action is required from the user, the machine
3990 continues its normal execution.
3991
3992 Note that in either case the notification handler
3993 <b>must not</b> perform any action directly on a thread
3994 where this notification is called. Everything it is allowed to
3995 do is to post a message to another thread that will then talk
3996 to the user and take the corresponding action.
3997
3998 Currently, the following error identificators are known:
3999 <ul>
4000 <li><tt>"HostMemoryLow"</tt></li>
4001 <li><tt>"HostAudioNotResponding"</tt></li>
4002 <li><tt>"VDIStorageFull"</tt></li>
4003 </ul>
4004
4005 <note>
4006 This notification is not designed to be implemented by
4007 more than one callback at a time. If you have multiple
4008 IConsoleCallback instances registered on the given
4009 IConsole object, make sure you simply do nothing but
4010 return @c S_OK from all but one of them that does actual
4011 user notification and performs necessary actions.
4012 </note>
4013
4014 </desc>
4015 <param name="fatal" type="boolean" dir="in">
4016 <desc>Whether the error is fatal or not</desc>
4017 </param>
4018 <param name="id" type="wstring" dir="in">
4019 <desc>Error identificator</desc>
4020 </param>
4021 <param name="message" type="wstring" dir="in">
4022 <desc>Optional error message</desc>
4023 </param>
4024 </method>
4025
4026 <method name="onCanShowWindow">
4027 <desc>
4028 Notification when a call to
4029 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4030 front-end to check if a subsequent call to
4031 <link to="IMachine::showConsoleWindow()"/> can succeed.
4032
4033 The callee should give an answer appropriate to the current
4034 machine state in the @a canShow argument. This answer must
4035 remain valid at least until the next
4036 <link to="IConsole::state">machine state</link> change.
4037
4038 <note>
4039 This notification is not designed to be implemented by
4040 more than one callback at a time. If you have multiple
4041 IConsoleCallback instances registered on the given
4042 IConsole object, make sure you simply do nothing but
4043 return @c true and @c S_OK from all but one of them that
4044 actually manages console window activation.
4045 </note>
4046 </desc>
4047 <param name="canShow" type="boolean" dir="return">
4048 <desc>
4049 @c true if the console window can be shown and @c
4050 false otherwise.
4051 </desc>
4052 </param>
4053 </method>
4054
4055 <method name="onShowWindow">
4056 <desc>
4057 Notification when a call to
4058 <link to="IMachine::showConsoleWindow()"/>
4059 requests the console window to be activated and brought to
4060 foreground on the desktop of the host PC.
4061
4062 This notification should cause the VM console process to
4063 perform the requested action as described above. If it is
4064 impossible to do it at a time of this notification, this
4065 method should return a failure.
4066
4067 Note that many modern window managers on many platforms
4068 implement some sort of focus stealing prevention logic, so
4069 that it may be impossible to activate a window without the
4070 help of the currently active application (which is supposedly
4071 an initiator of this notification). In this case, this method
4072 must return a non-zero identifier that represents the
4073 top-level window of the VM console process. The caller, if it
4074 represents a currently active process, is responsible to use
4075 this identifier (in a platform-dependent manner) to perform
4076 actual window activation.
4077
4078 This method must set @a winId to zero if it has performed all
4079 actions necessary to complete the request and the console
4080 window is now active and in foreground, to indicate that no
4081 further action is required on the caller's side.
4082
4083 <note>
4084 This notification is not designed to be implemented by
4085 more than one callback at a time. If you have multiple
4086 IConsoleCallback instances registered on the given
4087 IConsole object, make sure you simply do nothing but
4088 return@c S_OK from all but one of them that actually
4089 manages console window activation.
4090 </note>
4091 </desc>
4092 <param name="winId" type="unsigned long long" dir="return">
4093 <desc>
4094 Platform-dependent identifier of the top-level VM console
4095 window, or zero if this method has performed all actions
4096 necessary to implement the <i>show window</i> semantics for
4097 the given platform and/or this VirtualBox front-end.
4098 </desc>
4099 </param>
4100 </method>
4101
4102 </interface>
4103
4104 <interface
4105 name="IRemoteDisplayInfo" extends="$unknown"
4106 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4107 wsmap="struct"
4108 >
4109 <desc>
4110 Contains information about the remote display (VRDP) capabilities and status.
4111 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4112 </desc>
4113
4114 <attribute name="active" type="boolean" readonly="yes">
4115 <desc>
4116 Whether the remote display connection is active.
4117 </desc>
4118 </attribute>
4119
4120 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4121 <desc>
4122 How many times a client connected.
4123 </desc>
4124 </attribute>
4125
4126 <attribute name="beginTime" type="long long" readonly="yes">
4127 <desc>
4128 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4129 </desc>
4130 </attribute>
4131
4132 <attribute name="endTime" type="long long" readonly="yes">
4133 <desc>
4134 When the last connection was terminated or the current time, if
4135 connection is still active, in milliseconds since 1970-01-01 UTC.
4136 </desc>
4137 </attribute>
4138
4139 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4140 <desc>
4141 How many bytes were sent in last or current, if still active, connection.
4142 </desc>
4143 </attribute>
4144
4145 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4146 <desc>
4147 How many bytes were sent in all connections.
4148 </desc>
4149 </attribute>
4150
4151 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4152 <desc>
4153 How many bytes were received in last or current, if still active, connection.
4154 </desc>
4155 </attribute>
4156
4157 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4158 <desc>
4159 How many bytes were received in all connections.
4160 </desc>
4161 </attribute>
4162
4163 <attribute name="user" type="wstring" readonly="yes">
4164 <desc>
4165 Login user name supplied by the client.
4166 </desc>
4167 </attribute>
4168
4169 <attribute name="domain" type="wstring" readonly="yes">
4170 <desc>
4171 Login domain name supplied by the client.
4172 </desc>
4173 </attribute>
4174
4175 <attribute name="clientName" type="wstring" readonly="yes">
4176 <desc>
4177 The client name supplied by the client.
4178 </desc>
4179 </attribute>
4180
4181 <attribute name="clientIP" type="wstring" readonly="yes">
4182 <desc>
4183 The IP address of the client.
4184 </desc>
4185 </attribute>
4186
4187 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4188 <desc>
4189 The client software version number.
4190 </desc>
4191 </attribute>
4192
4193 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
4194 <desc>
4195 Public key exchange method used when connection was established.
4196 Values: 0 - RDP4 public key exchange scheme.
4197 1 - X509 certificates were sent to client.
4198 </desc>
4199 </attribute>
4200
4201 </interface>
4202
4203 <interface
4204 name="IConsole" extends="$unknown"
4205 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
4206 wsmap="managed"
4207 >
4208 <desc>
4209 The IConsole interface represents an interface to control virtual
4210 machine execution.
4211
4212 The console object that implements the IConsole interface is obtained
4213 from a session object after the session for the given machine has been
4214 opened using one of <link to="IVirtualBox::openSession"/>,
4215 <link to="IVirtualBox::openRemoteSession"/> or
4216 <link to="IVirtualBox::openExistingSession"/> methods.
4217
4218 Methods of the IConsole interface allow the caller to query the current
4219 virtual machine execution state, pause the machine or power it down, save
4220 the machine state or take a snapshot, attach and detach removable media
4221 and so on.
4222
4223 <see>ISession</see>
4224 </desc>
4225
4226 <attribute name="machine" type="IMachine" readonly="yes">
4227 <desc>
4228 Machine object this console is sessioned with.
4229 <note>
4230 This is a convenience property, it has the same value as
4231 <link to="ISession::machine"/> of the corresponding session
4232 object.
4233 </note>
4234 </desc>
4235 </attribute>
4236
4237 <attribute name="state" type="MachineState" readonly="yes">
4238 <desc>
4239 Current execution state of the machine.
4240 <note>
4241 This property always returns the same value as the corresponding
4242 property of the IMachine object this console is sessioned with.
4243 For the process that owns (executes) the VM, this is the
4244 preferable way of querying the VM state, because no IPC
4245 calls are made.
4246 </note>
4247 </desc>
4248 </attribute>
4249
4250 <attribute name="guest" type="IGuest" readonly="yes">
4251 <desc>Guest object.</desc>
4252 </attribute>
4253
4254 <attribute name="keyboard" type="IKeyboard" readonly="yes">
4255 <desc>
4256 Virtual keyboard object.
4257 <note>
4258 If the machine is not running, any attempt to use
4259 the returned object will result in an error.
4260 </note>
4261 </desc>
4262 </attribute>
4263
4264 <attribute name="mouse" type="IMouse" readonly="yes">
4265 <desc>
4266 Virtual mouse object.
4267 <note>
4268 If the machine is not running, any attempt to use
4269 the returned object will result in an error.
4270 </note>
4271 </desc>
4272 </attribute>
4273
4274 <attribute name="display" type="IDisplay" readonly="yes">
4275 <desc>Virtual display object.
4276 <note>
4277 If the machine is not running, any attempt to use
4278 the returned object will result in an error.
4279 </note>
4280 </desc>
4281 </attribute>
4282
4283 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
4284 <desc>Debugging interface.</desc>
4285 </attribute>
4286
4287 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
4288 <desc>
4289 Collection of USB devices currently attached to the virtual
4290 USB controller.
4291 <note>
4292 The collection is empty if the machine is not running.
4293 </note>
4294 </desc>
4295 </attribute>
4296
4297 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
4298 <desc>
4299 List of USB devices currently attached to the remote VRDP client.
4300 Once a new device is physically attached to the remote host computer,
4301 it appears in this list and remains there until detached.
4302 </desc>
4303 </attribute>
4304
4305 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4306 <desc>
4307 Collection of shared folders for the current session. These folders
4308 are called transient shared folders because they are available to the
4309 guest OS running inside the associated virtual machine only for the
4310 duration of the session (as opposed to
4311 <link to="IMachine::sharedFolders"/> which represent permanent shared
4312 folders). When the session is closed (e.g. the machine is powered down),
4313 these folders are automatically discarded.
4314
4315 New shared folders are added to the collection using
4316 <link to="#createSharedFolder"/>. Existing shared folders can be
4317 removed using <link to="#removeSharedFolder"/>.
4318 </desc>
4319 </attribute>
4320
4321 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
4322 <desc>
4323 Interface that provides information on Remote Display (VRDP) connection.
4324 </desc>
4325 </attribute>
4326
4327 <method name="powerUp">
4328 <desc>
4329 Starts the virtual machine execution using the current machine
4330 state (i.e. its current execution state, current settings and
4331 current hard disks).
4332
4333 If the machine is powered off or aborted, the execution will
4334 start from the beginning (as if the real hardware were just
4335 powered on).
4336
4337 If the machine is in the <link to="MachineState::Saved"/> state,
4338 it will continue its execution the point where the state has
4339 been saved.
4340
4341 <note>
4342 Unless you are trying to write a new VirtualBox front-end that
4343 performs direct machine execution (like the VirtualBox or VBoxSDL
4344 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
4345 session opened by <link to="IVirtualBox::openSession"/> and use this
4346 session only to change virtual machine settings. If you simply want to
4347 start virtual machine execution using one of the existing front-ends
4348 (for example the VirtualBox GUI or headless server), simply use
4349 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
4350 power up the machine automatically for you.
4351 </note>
4352
4353 <see>#saveState</see>
4354 </desc>
4355 <param name="progress" type="IProgress" dir="return">
4356 <desc>Progress object to track the operation completion.</desc>
4357 </param>
4358 </method>
4359
4360 <method name="powerUpPaused">
4361 <desc>
4362 Identical to powerUp except that the VM will enter the
4363 <link to="MachineState::Paused"/> state, instead of
4364 <link to="MachineState::Running"/>.
4365
4366 <see>#powerUp</see>
4367 </desc>
4368 <param name="progress" type="IProgress" dir="return">
4369 <desc>Progress object to track the operation completion.</desc>
4370 </param>
4371 </method>
4372
4373 <method name="powerDown">
4374 <desc>
4375 Stops the virtual machine execution.
4376 After this operation completes, the machine will go to the
4377 PoweredOff state.
4378
4379 @deprecated This method will be removed in VirtualBox 2.1 where the
4380 powerDownAsync() method will take its name. Do not use this method in
4381 the code.
4382 </desc>
4383 </method>
4384
4385 <method name="powerDownAsync">
4386 <desc>
4387 Initiates the power down procedure to stop the virtual machine
4388 execution.
4389
4390 The completion of the power down procedure is tracked using the returned
4391 IProgress object. After the operation is complete, the machine will go
4392 to the PoweredOff state.
4393
4394 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
4395 where the original powerDown() method will be removed. You will need to
4396 rename "powerDownAsync" to "powerDown" in your sources to make them
4397 build with version 2.1.
4398 </desc>
4399 <param name="progress" type="IProgress" dir="return">
4400 <desc>Progress object to track the operation completion.</desc>
4401 </param>
4402 </method>
4403
4404 <method name="reset">
4405 <desc>Resets the virtual machine.</desc>
4406 </method>
4407
4408 <method name="pause">
4409 <desc>Pauses the virtual machine execution.</desc>
4410 </method>
4411
4412 <method name="resume">
4413 <desc>Resumes the virtual machine execution.</desc>
4414 </method>
4415
4416 <method name="powerButton">
4417 <desc>Send the ACPI power button event to the guest.</desc>
4418 </method>
4419
4420 <method name="sleepButton">
4421 <desc>Send the ACPI sleep button event to the guest.</desc>
4422 </method>
4423
4424 <method name="getPowerButtonHandled">
4425 <desc>Check if the last power button event was handled by guest.</desc>
4426 <param name="handled" type="boolean" dir="return"/>
4427 </method>
4428
4429 <method name="getGuestEnteredACPIMode">
4430 <desc>Check if the guest entered the ACPI mode G0 (working) or
4431 G1 (sleeping). If this method returns false, the guest will
4432 most likely not respond to external ACPI events.</desc>
4433 <param name="entered" type="boolean" dir="return"/>
4434 </method>
4435
4436 <method name="saveState">
4437 <desc>
4438 Saves the current execution state of a running virtual machine
4439 and stops its execution.
4440
4441 After this operation completes, the machine will go to the
4442 Saved state. Next time it is powered up, this state will
4443 be restored and the machine will continue its execution from
4444 the place where it was saved.
4445
4446 This operation differs from taking a snapshot to the effect
4447 that it doesn't create new differencing hard disks. Also, once
4448 the machine is powered up from the state saved using this method,
4449 the saved state is deleted, so it will be impossible to return
4450 to this state later.
4451
4452 <note>
4453 On success, this method implicitly calls
4454 <link to="IMachine::saveSettings()"/> to save all current machine
4455 settings (including runtime changes to the DVD drive, etc.).
4456 Together with the impossibility to change any VM settings when it is
4457 in the Saved state, this guarantees the adequate hardware
4458 configuration of the machine when it is restored from the saved
4459 state file.
4460 </note>
4461
4462 <note>
4463 The machine must be in the Running or Paused state, otherwise
4464 the operation will fail.
4465 </note>
4466
4467 <see><link to="#takeSnapshot"/></see>
4468 </desc>
4469 <param name="progress" type="IProgress" dir="return">
4470 <desc>Progress object to track the operation completion.</desc>
4471 </param>
4472 </method>
4473
4474 <method name="adoptSavedState">
4475 <desc>
4476 Associates the given saved state file to the virtual machine.
4477
4478 On success, the machine will go to the Saved state. Next time it is
4479 powered up, it will be restored from the adopted saved state and
4480 continue execution from the place where the saved state file was
4481 created.
4482
4483 The specified saved state file path may be full or relative to the
4484 folder the VM normally saves the state to (usually,
4485 <link to="IMachine::snapshotFolder"/>).
4486
4487 <note>
4488 It's a caller's responsibility to make sure the given saved state
4489 file is compatible with the settings of this virtual machine that
4490 represent its virtual hardware (memory size, hard disk configuration
4491 etc.). If there is a mismatch, the behavior of the virtual machine
4492 is undefined.
4493 </note>
4494 </desc>
4495 <param name="savedStateFile" type="wstring" dir="in">
4496 <desc>Path to the saved state file to adopt.</desc>
4497 </param>
4498 </method>
4499
4500 <method name="discardSavedState">
4501 <desc>
4502 Discards (deletes) the saved state of the virtual machine
4503 previously created by <link to="#saveState"/>. Next time the
4504 machine is powered up, a clean boot will occur.
4505 <note>
4506 This operation is equivalent to resetting or powering off
4507 the machine without doing a proper shutdown in the guest OS.
4508 </note>
4509 </desc>
4510 </method>
4511
4512 <method name="getDeviceActivity">
4513 <desc>
4514 Gets the current activity type of a given device or device group.
4515 </desc>
4516 <param name="type" type="DeviceType" dir="in"/>
4517 <param name="activity" type="DeviceActivity" dir="return"/>
4518 </method>
4519
4520 <method name="attachUSBDevice">
4521 <desc>
4522 Attaches a host USB device with the given UUID to the
4523 USB controller of the virtual machine.
4524
4525 The device needs to be in one of the following states:
4526 <link to="USBDeviceState::Busy">Busy</link>,
4527 <link to="USBDeviceState::Available">Available</link> or
4528 <link to="USBDeviceState::Held">Held</link>,
4529 otherwise an error is immediately returned.
4530
4531 When the device state is
4532 <link to="USBDeviceState::Busy">Busy</link>, an error may also
4533 be returned if the host computer refuses to release it for some reason.
4534
4535 <see>IUSBController::deviceFilters, USBDeviceState</see>
4536 </desc>
4537 <param name="id" type="uuid" dir="in">
4538 <desc>UUID of the host USB device to attach.</desc>
4539 </param>
4540 </method>
4541
4542 <method name="detachUSBDevice">
4543 <desc>
4544 Detaches an USB device with the given UUID from the USB controller
4545 of the virtual machine.
4546
4547 After this method succeeds, the VirtualBox server reinitiates
4548 all USB filters as if the device were just physically attached
4549 to the host, but filters of this machine are ignored to avoid
4550 a possible automatic reattachment.
4551
4552 <see>IUSBController::deviceFilters, USBDeviceState</see>
4553 </desc>
4554 <param name="id" type="uuid" dir="in">
4555 <desc>UUID of the USB device to detach.</desc>
4556 </param>
4557 <param name="device" type="IUSBDevice" dir="return">
4558 <desc>Detached USB device.</desc>
4559 </param>
4560 </method>
4561
4562 <method name="createSharedFolder">
4563 <desc>
4564 Creates a transient new shared folder by associating the given logical
4565 name with the given host path, adds it to the collection of shared
4566 folders and starts sharing it. Refer to the description of
4567 <link to="ISharedFolder"/> to read more about logical names.
4568 </desc>
4569 <param name="name" type="wstring" dir="in">
4570 <desc>Unique logical name of the shared folder.</desc>
4571 </param>
4572 <param name="hostPath" type="wstring" dir="in">
4573 <desc>Full path to the shared folder in the host file system.</desc>
4574 </param>
4575 <param name="writable" type="boolean" dir="in">
4576 <desc>Whether the share is writable or readonly</desc>
4577 </param>
4578 </method>
4579
4580 <method name="removeSharedFolder">
4581 <desc>
4582 Removes a transient shared folder with the given name previously
4583 created by <link to="#createSharedFolder"/> from the collection of
4584 shared folders and stops sharing it.
4585 </desc>
4586 <param name="name" type="wstring" dir="in">
4587 <desc>Logical name of the shared folder to remove.</desc>
4588 </param>
4589 </method>
4590
4591 <method name="takeSnapshot">
4592 <desc>
4593 Saves the current execution state and all settings of the
4594 machine and creates differencing images for all
4595 normal (non-independent) hard disks.
4596
4597 This method can be called for a PoweredOff, Saved, Running or
4598 Paused virtual machine. When the machine is PoweredOff, an
4599 offline <link to="ISnapshot">snapshot</link> is created,
4600 in all other cases -- an online snapshot.
4601
4602 The taken snapshot is always based on the
4603 <link to="IMachine::currentSnapshot">current
4604 snapshot</link> of the associated virtual machine and becomes
4605 a new current snapshot.
4606
4607 <note>
4608 This method implicitly calls <link to="IMachine::saveSettings()"/> to
4609 save all current machine settings before taking an offline snapshot.
4610 </note>
4611
4612 <see>ISnapshot, <link to="#saveState"/></see>
4613 </desc>
4614 <param name="name" type="wstring" dir="in">
4615 <desc>Short name for the snapshot.</desc>
4616 </param>
4617 <param name="description" type="wstring" dir="in">
4618 <desc>Optional description of the snapshot.</desc>
4619 </param>
4620 <param name="progress" type="IProgress" dir="return">
4621 <desc>Progress object to track the operation completion.</desc>
4622 </param>
4623 </method>
4624
4625 <method name="discardSnapshot">
4626 <desc>
4627
4628 Starts discarding the specified snapshot. The execution state
4629 and settings of the associated machine stored in the snapshot
4630 will be deleted. The contents of all differencing hard disks of
4631 this snapshot will be merged with the contents of their
4632 dependent child hard disks to keep the, disks valid (in other
4633 words, all changes represented by hard disks being discarded
4634 will be propagated to their child hard disks). After that, this
4635 snapshot's differencing hard disks will be deleted. The parent
4636 of this snapshot will become a new parent for all its child
4637 snapshots.
4638
4639 If the discarded snapshot is the current one, its parent
4640 snapshot will become a new current snapshot. The current machine
4641 state is not directly affected in this case, except that
4642 currently attached differencing hard disks based on hard disks
4643 of the discarded snapshot will be also merged as described
4644 above.
4645
4646 If the discarded snapshot is the first one (the root snapshot)
4647 and it has exactly one child snapshot, this child snapshot will
4648 become the first snapshot after discarding. If there are no
4649 children at all (i.e. the first snapshot is the only snapshot of
4650 the machine), both the current and the first snapshot of the
4651 machine will be set to null. In all other cases, the first
4652 snapshot cannot be discarded.
4653
4654 You cannot discard the snapshot if it
4655 stores <link to="HardDiskType::Normal">normal</link> (non-differencing)
4656 hard disks that have differencing hard disks based on them. Snapshots of
4657 such kind can be discarded only when every normal hard disk has either
4658 no children at all or exactly one child. In the former case, the normal
4659 hard disk simply becomes unused (i.e. not attached to any VM). In the
4660 latter case, it receives all the changes stored in the child hard disk,
4661 and then it replaces the child hard disk in the configuration of the
4662 corresponding snapshot or machine.
4663
4664 Also, you cannot discard the snapshot if it stores hard disks
4665 (of any type) having differencing child hard disks that belong
4666 to other machines. Such snapshots can be only discarded after
4667 you discard all snapshots of other machines containing "foreign"
4668 child disks, or detach these "foreign" child disks from machines
4669 they are attached to.
4670
4671 One particular example of the snapshot storing normal hard disks
4672 is the first snapshot of a virtual machine that had normal hard
4673 disks attached when taking the snapshot. Be careful when
4674 discarding such snapshots because this implicitly commits
4675 changes (made since the snapshot being discarded has been taken)
4676 to normal hard disks (as described above), which may be not what
4677 you want.
4678
4679 The virtual machine is put to
4680 the <link to="MachineState::Discarding">Discarding</link> state until
4681 the discard operation is completed.
4682
4683 <note>
4684 The machine must not be running, otherwise the operation
4685 will fail.
4686 </note>
4687
4688 <note>
4689 Child hard disks of all normal hard disks of the discarded snapshot
4690 must be accessible (see <link to="IMedium::state"/>) for this
4691 operation to succeed. In particular, this means that all virtual
4692 machines, whose hard disks are directly or indirectly based on the
4693 hard disks of discarded snapshot, must be powered off.
4694 </note>
4695 <note>
4696 Merging hard disk contents can be very time and disk space
4697 consuming, if these disks are big in size and have many
4698 children. However, if the snapshot being discarded is the last
4699 (head) snapshot on the branch, the operation will be rather
4700 quick.
4701 </note>
4702 <note>
4703 Note that discarding the current snapshot
4704 will implicitly call <link to="IMachine::saveSettings()"/> to
4705 make all current machine settings permanent.
4706 </note>
4707 </desc>
4708 <param name="id" type="uuid" dir="in">
4709 <desc>UUID of the snapshot to discard.</desc>
4710 </param>
4711 <param name="progress" type="IProgress" dir="return">
4712 <desc>Progress object to track the operation completion.</desc>
4713 </param>
4714 </method>
4715
4716 <method name="discardCurrentState">
4717 <desc>
4718 This operation is similar to <link to="#discardSnapshot()"/> but
4719 affects the current machine state. This means that the state stored in
4720 the current snapshot will become a new current state, and all current
4721 settings of the machine and changes stored in differencing hard disks
4722 will be lost.
4723
4724 After this operation is successfully completed, new empty differencing
4725 hard disks are created for all normal hard disks of the machine.
4726
4727 If the current snapshot of the machine is an online snapshot, the
4728 machine will go to the <link to="MachineState::Saved"> saved
4729 state</link>, so that the next time it is powered on, the execution
4730 state will be restored from the current snapshot.
4731
4732 <note>
4733 The machine must not be running, otherwise the operation will fail.
4734 </note>
4735
4736 <note>
4737 If the machine state is <link to="MachineState::Saved">Saved</link>
4738 prior to this operation, the saved state file will be implicitly
4739 discarded (as if <link to="IConsole::discardSavedState()"/> were
4740 called).
4741 </note>
4742
4743 </desc>
4744 <param name="progress" type="IProgress" dir="return">
4745 <desc>Progress object to track the operation completion.</desc>
4746 </param>
4747 </method>
4748
4749 <method name="discardCurrentSnapshotAndState">
4750 <desc>
4751
4752 This method is equivalent to
4753 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
4754 (currentSnapshot.id(), progress) followed by
4755 <link to="#discardCurrentState()"/>.
4756
4757 As a result, the machine will be fully restored from the
4758 snapshot preceding the current snapshot, while both the current
4759 snapshot and the current machine state will be discarded.
4760
4761 If the current snapshot is the first snapshot of the machine (i.e. it
4762 has the only snapshot), the current machine state will be
4763 discarded <b>before</b> discarding the snapshot. In other words, the
4764 machine will be restored from its last snapshot, before discarding
4765 it. This differs from performing a single
4766 <link to="#discardSnapshot()"/> call (note that no
4767 <link to="#discardCurrentState()"/> will be possible after it)
4768 to the effect that the latter will preserve the current state instead of
4769 discarding it.
4770
4771 Unless explicitly mentioned otherwise, all remarks and
4772 limitations of the above two methods also apply to this method.
4773
4774 <note>
4775 The machine must not be running, otherwise the operation
4776 will fail.
4777 </note>
4778
4779 <note>
4780 If the machine state is <link to="MachineState::Saved">Saved</link>
4781 prior to this operation, the saved state file will be implicitly
4782 discarded (as if <link to="#discardSavedState()"/> were
4783 called).
4784 </note>
4785
4786 <note>
4787 This method is more efficient than calling two above
4788 methods separately: it requires less IPC calls and provides
4789 a single progress object.
4790 </note>
4791
4792 </desc>
4793 <param name="progress" type="IProgress" dir="return">
4794 <desc>Progress object to track the operation completion.</desc>
4795 </param>
4796 </method>
4797
4798 <method name="registerCallback">
4799 <desc>
4800 Registers a new console callback on this instance. The methods of the
4801 callback interface will be called by this instance when the appropriate
4802 event occurs.
4803 </desc>
4804 <param name="callback" type="IConsoleCallback" dir="in"/>
4805 </method>
4806
4807 <method name="unregisterCallback">
4808 <desc>
4809 Unregisters the console callback previously registered using
4810 <link to="#registerCallback"/>.
4811 </desc>
4812 <param name="callback" type="IConsoleCallback" dir="in"/>
4813 </method>
4814 </interface>
4815
4816 <!--
4817 // IHost
4818 /////////////////////////////////////////////////////////////////////////
4819 -->
4820
4821 <interface
4822 name="IHostDVDDrive" extends="$unknown"
4823 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
4824 wsmap="managed"
4825 >
4826 <desc>
4827 The IHostDVDDrive interface represents the physical CD/DVD drive
4828 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
4829 </desc>
4830
4831 <attribute name="name" type="wstring" readonly="yes">
4832 <desc>
4833 Returns the platform-specific device identifier.
4834 On DOS-like platforms, it is a drive name (e.g. R:).
4835 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
4836 </desc>
4837 </attribute>
4838 <attribute name="description" type="wstring" readonly="yes">
4839 <desc>
4840 Returns a human readable description for the drive. This
4841 description usually contains the product and vendor name. A
4842 @c null string is returned if the description is not available.
4843 </desc>
4844 </attribute>
4845 <attribute name="udi" type="wstring" readonly="yes">
4846 <desc>
4847 Returns the unique device identifier for the drive. This
4848 attribute is reserved for future use instead of
4849 <link to="#name"/>. Currently it is not used and may return
4850 @c null on some platforms.
4851 </desc>
4852 </attribute>
4853
4854 </interface>
4855
4856 <enumerator
4857 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
4858 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
4859 />
4860
4861 <collection
4862 name="IHostDVDDriveCollection" type="IHostDVDDrive"
4863 enumerator="IHostDVDDriveEnumerator"
4864 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
4865 readonly="yes"
4866 >
4867 <method name="findByName">
4868 <desc>
4869 Searches this collection for a host drive with the given name.
4870 <note>
4871 The method returns an error if the given name does not
4872 correspond to any host drive in the collection.
4873 </note>
4874 </desc>
4875 <param name="name" type="wstring" dir="in">
4876 <desc>Name of the host drive to search for</desc>
4877 </param>
4878 <param name="drive" type="IHostDVDDrive" dir="return">
4879 <desc>Found host drive object</desc>
4880 </param>
4881 </method>
4882 </collection>
4883
4884 <interface
4885 name="IHostFloppyDrive" extends="$unknown"
4886 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
4887 wsmap="managed"
4888 >
4889 <desc>
4890 The IHostFloppyDrive interface represents the physical floppy drive
4891 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
4892 </desc>
4893 <attribute name="name" type="wstring" readonly="yes">
4894 <desc>
4895 Returns the platform-specific device identifier.
4896 On DOS-like platforms, it is a drive name (e.g. A:).
4897 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
4898 </desc>
4899 </attribute>
4900 <attribute name="description" type="wstring" readonly="yes">
4901 <desc>
4902 Returns a human readable description for the drive. This
4903 description usually contains the product and vendor name. A
4904 @c null string is returned if the description is not available.
4905 </desc>
4906 </attribute>
4907 <attribute name="udi" type="wstring" readonly="yes">
4908 <desc>
4909 Returns the unique device identifier for the drive. This
4910 attribute is reserved for future use instead of
4911 <link to="#name"/>. Currently it is not used and may return
4912 @c null on some platforms.
4913 </desc>
4914 </attribute>
4915 </interface>
4916
4917 <enumerator
4918 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
4919 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
4920 />
4921
4922 <collection
4923 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
4924 enumerator="IHostFloppyDriveEnumerator"
4925 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
4926 readonly="yes"
4927 >
4928 <method name="findByName">
4929 <desc>
4930 Searches this collection for a host drive with the given name.
4931 <note>
4932 The method returns an error if the given name does not
4933 correspond to any host drive in the collection.
4934 </note>
4935 </desc>
4936 <param name="name" type="wstring" dir="in">
4937 <desc>Name of the host drive to search for</desc>
4938 </param>
4939 <param name="drive" type="IHostFloppyDrive" dir="return">
4940 <desc>Found host drive object</desc>
4941 </param>
4942 </method>
4943 </collection>
4944
4945 <interface
4946 name="IHostNetworkInterface" extends="$unknown"
4947 uuid="F4512D7C-B074-4e97-99B8-6D2BD27C3F5A"
4948 wsmap="managed"
4949 >
4950 <attribute name="name" type="wstring" readonly="yes">
4951 <desc>Returns the host network interface name.</desc>
4952 </attribute>
4953
4954 <attribute name="id" type="uuid" readonly="yes">
4955 <desc>Returns the interface UUID.</desc>
4956 </attribute>
4957 </interface>
4958
4959 <enumerator
4960 name="IHostNetworkInterfaceEnumerator" type="IHostNetworkInterface"
4961 uuid="7B52FEF7-56E8-4aec-92F5-15E6D11EC630"
4962 />
4963
4964 <collection
4965 name="IHostNetworkInterfaceCollection" type="IHostNetworkInterface"
4966 enumerator="IHostNetworkInterfaceEnumerator"
4967 uuid="BF1D41F2-B97B-4314-A0FB-D4823AF42FB5"
4968 readonly="yes"
4969 >
4970 <method name="findByName">
4971 <desc>
4972 Searches this collection for a host network interface with the given name.
4973 <note>
4974 The method returns an error if the given name does not
4975 correspond to any host network interface in the collection.
4976 </note>
4977 </desc>
4978 <param name="name" type="wstring" dir="in">
4979 <desc>Name of the host network interface to search for.</desc>
4980 </param>
4981 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
4982 <desc>Found host network interface object.</desc>
4983 </param>
4984 </method>
4985 <method name="findById">
4986 <desc>
4987 Searches this collection for a host network interface with the given GUID.
4988 <note>
4989 The method returns an error if the given GUID does not
4990 correspond to any host network interface in the collection.
4991 </note>
4992 </desc>
4993 <param name="id" type="uuid" dir="in">
4994 <desc>GUID of the host network interface to search for.</desc>
4995 </param>
4996 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
4997 <desc>Found host network interface object.</desc>
4998 </param>
4999 </method>
5000 </collection>
5001
5002 <interface
5003 name="IHost" extends="$unknown"
5004 uuid="489fb370-c227-4d43-9761-ceb28484fd9f"
5005 wsmap="managed"
5006 >
5007 <desc>
5008 The IHost interface represents the physical machine that this VirtualBox
5009 installation runs on.
5010
5011 An object implementing this interface is returned by the
5012 <link to="IVirtualBox::host" /> attribute. This interface contains
5013 read-only information about the host's physical hardware (such as what
5014 processors, and disks are available, what the host operating system is,
5015 and so on) and also allows for manipulating some of the host's hardware,
5016 such as global USB device filters and host interface networking.
5017
5018 </desc>
5019 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
5020 <desc>List of DVD drives available on the host.</desc>
5021 </attribute>
5022
5023 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
5024 <desc>List of floppy drives available on the host.</desc>
5025 </attribute>
5026
5027 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5028 <desc>
5029 List of USB devices currently attached to the host.
5030 Once a new device is physically attached to the host computer,
5031 it appears in this list and remains there until detached.
5032
5033 <note>
5034 This method may set a @ref com_warnings "warning result code".
5035 </note>
5036 <note>
5037 If USB functionality is not available in the given edition of
5038 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5039 </note>
5040 </desc>
5041 </attribute>
5042
5043 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
5044 <desc>
5045 List of USB device filters in action.
5046 When a new device is physically attached to the host computer,
5047 filters from this list are applied to it (in order they are stored
5048 in the list). The first matched filter will determine the
5049 <link to="IHostUSBDeviceFilter::action">action</link>
5050 performed on the device.
5051
5052 Unless the device is ignored by these filters, filters of all
5053 currently running virtual machines
5054 (<link to="IUSBController::deviceFilters"/>) are applied to it.
5055
5056 <note>
5057 This method may set a @ref com_warnings "warning result code".
5058 </note>
5059 <note>
5060 If USB functionality is not available in the given edition of
5061 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5062 </note>
5063
5064 <see>IHostUSBDeviceFilter, USBDeviceState</see>
5065 </desc>
5066 </attribute>
5067
5068 <attribute name="networkInterfaces" type="IHostNetworkInterfaceCollection" readonly="yes">
5069 <desc>List of host network interfaces currently defined on the host.</desc>
5070 </attribute>
5071
5072 <attribute name="processorCount" type="unsigned long" readonly="yes">
5073 <desc>Number of (logical) CPUs installed in the host system.</desc>
5074 </attribute>
5075
5076 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
5077 <desc>Number of (logical) CPUs online in the host system.</desc>
5078 </attribute>
5079
5080 <method name="getProcessorSpeed">
5081 <desc>Query the (approximate) maximum speed of a specified host CPU in Megahertz.</desc>
5082 <param name="cpuId" type="unsigned long" dir="in">
5083 <desc>
5084 Identifier of the CPU.
5085 </desc>
5086 </param>
5087 <param name="speed" type="unsigned long" dir="return">
5088 <desc>
5089 Speed value. 0 is returned if value is not known or @a cpuId is
5090 invalid.
5091 </desc>
5092 </param>
5093 </method>
5094
5095 <method name="getProcessorDescription">
5096 <desc>Query the model string of a specified host CPU.</desc>
5097 <param name="cpuId" type="unsigned long" dir="in">
5098 <desc>
5099 Identifier of the CPU.
5100 </desc>
5101 </param>
5102 <param name="description" type="wstring" dir="return">
5103 <desc>
5104 Model string. A NULL string is returned if value is not known or
5105 @a cpuId is invalid.
5106 </desc>
5107 </param>
5108 </method>
5109
5110 <attribute name="memorySize" type="unsigned long" readonly="yes">
5111 <desc>Amount of system memory in megabytes installed in the host system.</desc>
5112 </attribute>
5113
5114 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
5115 <desc>Available system memory in the host system.</desc>
5116 </attribute>
5117
5118 <attribute name="operatingSystem" type="wstring" readonly="yes">
5119 <desc>Name of the host system's operating system.</desc>
5120 </attribute>
5121
5122 <attribute name="OSVersion" type="wstring" readonly="yes">
5123 <desc>Host operating system's version string.</desc>
5124 </attribute>
5125
5126 <attribute name="UTCTime" type="long long" readonly="yes">
5127 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
5128 </attribute>
5129
5130<if target="midl">
5131 <method name="createHostNetworkInterface">
5132 <desc>
5133 Creates a new adapter for Host Interface Networking.
5134 </desc>
5135 <param name="name" type="wstring" dir="in">
5136 <desc>
5137 Adapter name.
5138 </desc>
5139 </param>
5140 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5141 <desc>
5142 Created host interface object.
5143 </desc>
5144 </param>
5145 <param name="progress" type="IProgress" dir="return">
5146 <desc>
5147 Progress object to track the operation completion.
5148 </desc>
5149 </param>
5150 </method>
5151 <method name="removeHostNetworkInterface">
5152 <desc>
5153 Removes the given host network interface.
5154 </desc>
5155 <param name="id" type="uuid" dir="in">
5156 <desc>
5157 Adapter GUID.
5158 </desc>
5159 </param>
5160 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5161 <desc>
5162 Removed host interface object.
5163 </desc>
5164 </param>
5165 <param name="progress" type="IProgress" dir="return">
5166 <desc>
5167 Progress object to track the operation completion.
5168 </desc>
5169 </param>
5170 </method>
5171</if>
5172
5173 <method name="createUSBDeviceFilter">
5174 <desc>
5175 Creates a new USB device filter. All attributes except
5176 the filter name are set to <tt>null</tt> (any match),
5177 <i>active</i> is <tt>false</tt> (the filter is not active).
5178
5179 The created filter can be added to the list of filters using
5180 <link to="#insertUSBDeviceFilter()"/>.
5181
5182 <see>#USBDeviceFilters</see>
5183 </desc>
5184 <param name="name" type="wstring" dir="in">
5185 <desc>
5186 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
5187 for more info.
5188 </desc>
5189 </param>
5190 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5191 <desc>Created filter object.</desc>
5192 </param>
5193 </method>
5194
5195 <method name="insertUSBDeviceFilter">
5196 <desc>
5197 Inserts the given USB device to the specified position
5198 in the list of filters.
5199
5200 Positions are numbered starting from <tt>0</tt>. If the specified
5201 position is equal to or greater than the number of elements in
5202 the list, the filter is added to the end of the collection.
5203
5204 <note>
5205 Duplicates are not allowed, so an attempt to insert a
5206 filter that is already in the list, will return an
5207 error.
5208 </note>
5209 <note>
5210 This method may set a @ref com_warnings "warning result code".
5211 </note>
5212 <note>
5213 If USB functionality is not available in the given edition of
5214 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5215 </note>
5216
5217 <see>#USBDeviceFilters</see>
5218 </desc>
5219 <param name="position" type="unsigned long" dir="in">
5220 <desc>Position to insert the filter to.</desc>
5221 </param>
5222 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
5223 <desc>USB device filter to insert.</desc>
5224 </param>
5225 </method>
5226
5227 <method name="removeUSBDeviceFilter">
5228 <desc>
5229 Removes a USB device filter from the specified position in the
5230 list of filters.
5231
5232 Positions are numbered starting from <tt>0</tt>. Specifying a
5233 position equal to or greater than the number of elements in
5234 the list will produce an error.
5235
5236 <note>
5237 This method may set a @ref com_warnings "warning result code".
5238 </note>
5239 <note>
5240 If USB functionality is not available in the given edition of
5241 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5242 </note>
5243
5244 <see>#USBDeviceFilters</see>
5245 </desc>
5246 <param name="position" type="unsigned long" dir="in">
5247 <desc>Position to remove the filter from.</desc>
5248 </param>
5249 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5250 <desc>Removed USB device filter.</desc>
5251 </param>
5252 </method>
5253
5254 </interface>
5255
5256 <!--
5257 // ISystemProperties
5258 /////////////////////////////////////////////////////////////////////////
5259 -->
5260
5261 <interface
5262 name="ISystemProperties"
5263 extends="$unknown"
5264 uuid="c7c060a9-91af-4e74-9188-a6b15a725e49"
5265 wsmap="managed"
5266 >
5267 <desc>
5268 The ISystemProperties interface represents global properties of the given
5269 VirtualBox installation.
5270
5271 These properties define limits and default values for various attributes
5272 and parameters. Most of the properties are read-only, but some can be
5273 changed by a user.
5274 </desc>
5275
5276 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
5277 <desc>Minium guest system memory in Megabytes.</desc>
5278 </attribute>
5279
5280 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
5281 <desc>Maximum guest system memory in Megabytes.</desc>
5282 </attribute>
5283
5284 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
5285 <desc>Minimum guest video memory in Megabytes.</desc>
5286 </attribute>
5287
5288 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
5289 <desc>Maximum guest video memory in Megabytes.</desc>
5290 </attribute>
5291
5292 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
5293 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
5294 </attribute>
5295
5296 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
5297 <desc>
5298 Number of network adapters associated with every
5299 <link to="IMachine"/> instance.
5300 </desc>
5301 </attribute>
5302
5303 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
5304 <desc>
5305 Number of serial ports associated with every
5306 <link to="IMachine"/> instance.
5307 </desc>
5308 </attribute>
5309
5310 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
5311 <desc>
5312 Number of parallel ports associated with every
5313 <link to="IMachine"/> instance.
5314 </desc>
5315 </attribute>
5316
5317 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
5318 <desc>
5319 Maximum device position in the boot order. This value corresponds
5320 to the total number of devices a machine can boot from, to make it
5321 possible to include all possible devices to the boot list.
5322 <see><link to="IMachine::setBootOrder()"/></see>
5323 </desc>
5324 </attribute>
5325
5326 <attribute name="defaultMachineFolder" type="wstring">
5327 <desc>
5328 Full path to the default directory used to create new or open
5329 existing machines when a settings file name contains no
5330 path.
5331
5332 The initial value of this property is
5333 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
5334 VirtualBox_home</link><tt>&gt;/Machines</tt>.
5335
5336 <note>
5337 Setting this property to <tt>null</tt> will restore the
5338 initial value.
5339 </note>
5340 <note>
5341 When settings this property, the specified path can be
5342 absolute (full path) or relative
5343 to the <link to="IVirtualBox::homeFolder">
5344 VirtualBox home directory</link>.
5345 When reading this property, a full path is
5346 always returned.
5347 </note>
5348 <note>
5349 The specified path may not exist, it will be created
5350 when necessary.
5351 </note>
5352
5353 <see>
5354 <link to="IVirtualBox::createMachine()"/>,
5355 <link to="IVirtualBox::openMachine()"/>
5356 </see>
5357 </desc>
5358 </attribute>
5359
5360 <attribute name="defaultHardDiskFolder" type="wstring">
5361 <desc>
5362 Full path to the default directory used to create new or open existing
5363 virtual disks.
5364
5365 This path is used when the storage unit of a hard disk is a regular file
5366 in the host's filesystem and only a file name that contains no path is
5367 given.
5368
5369 The initial value of this property is
5370 <tt>&lt;</tt>
5371 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
5372 <tt>&gt;/HardDisks</tt>.
5373
5374 <note>
5375 Setting this property to <tt>null</tt> will restore the
5376 initial value.
5377 </note>
5378 <note>
5379 When settings this property, the specified path can be relative
5380 to the
5381 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
5382 absolute. When reading this property, a full path is
5383 always returned.
5384 </note>
5385 <note>
5386 The specified path may not exist, it will be created
5387 when necessary.
5388 </note>
5389
5390 <see>
5391 IHardDisk2,
5392 <link to="IVirtualBox::createHardDisk2()"/>,
5393 <link to="IVirtualBox::openHardDisk2()"/>,
5394 <link to="IMedium::location"/>
5395 </see>
5396 </desc>
5397 </attribute>
5398
5399 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
5400 <desc>
5401 List of all hard disk storage formats supported by this VirtualBox
5402 installation.
5403
5404 Note that the virtual hard disk framework is backend-based, therefore
5405 the list of supported formats depends on what backends are currently
5406 installed.
5407
5408 <see>
5409 <link to="IHardDiskFormat"/>,
5410 </see>
5411 </desc>
5412 </attribute>
5413
5414 <attribute name="remoteDisplayAuthLibrary" type="wstring">
5415 <desc>
5416 Library that provides authentication for VRDP clients. The library
5417 is used if a virtual machine's authentication type is set to "external"
5418 in the VM RemoteDisplay configuration.
5419
5420 The system library extension (".DLL" or ".so") must be omitted.
5421 A full path can be specified; if not, then the library must reside on the
5422 system's default library path.
5423
5424 The default value of this property is <tt>VRDPAuth</tt>. There is a library
5425 of that name in one of the default VirtualBox library directories.
5426
5427 For details about VirtualBox authentication libraries and how to implement
5428 them, please refer to the VirtualBox manual.
5429
5430 <note>
5431 Setting this property to <tt>null</tt> will restore the
5432 initial value.
5433 </note>
5434 </desc>
5435 </attribute>
5436
5437 <attribute name="webServiceAuthLibrary" type="wstring">
5438 <desc>
5439 Library that provides authentication for webservice clients. The library
5440 is used if a virtual machine's authentication type is set to "external"
5441 in the VM RemoteDisplay configuration and will be called from
5442 within the <link to="IWebsessionManager::logon" /> implementation.
5443
5444 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
5445 there is no per-VM setting for this, as the webservice is a global
5446 resource (if it is running). Only for this setting (for the webservice),
5447 setting this value to a literal "null" string disables authentication,
5448 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
5449 no matter what user name and password are supplied.
5450
5451 The initial value of this property is <tt>VRDPAuth</tt>,
5452 meaning that the webservice will use the same authentication
5453 library that is used by default for VBoxVRDP (again, see
5454 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
5455 The format and calling convetion of authentication libraries
5456 is the same for the webservice as it is for VBoxVRDP.
5457
5458 </desc>
5459 </attribute>
5460
5461 <attribute name="HWVirtExEnabled" type="boolean">
5462 <desc>
5463 This specifies the default value for hardware virtualization
5464 extensions. If enabled, virtual machines will make use of
5465 hardware virtualization extensions such as Intel VT-x and
5466 AMD-V by default. This value can be overridden by each VM
5467 using their <link to="IMachine::HWVirtExEnabled" /> property.
5468 </desc>
5469 </attribute>
5470
5471 <attribute name="LogHistoryCount" type="unsigned long">
5472 <desc>
5473 This value specifies how many old release log files are kept.
5474 </desc>
5475 </attribute>
5476 </interface>
5477
5478 <!--
5479 // IGuest
5480 /////////////////////////////////////////////////////////////////////////
5481 -->
5482
5483 <interface
5484 name="IGuestOSType" extends="$unknown"
5485 uuid="da94f478-1f37-4726-b750-2235950dc2fe"
5486 wsmap="struct"
5487 >
5488 <desc>
5489 </desc>
5490
5491 <attribute name="id" type="wstring" readonly="yes">
5492 <desc>Guest OS identifier string.</desc>
5493 </attribute>
5494
5495 <attribute name="description" type="wstring" readonly="yes">
5496 <desc>Human readable description of the guest OS.</desc>
5497 </attribute>
5498
5499 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
5500 <desc>Recommended RAM size in Megabytes.</desc>
5501 </attribute>
5502
5503 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
5504 <desc>Recommended video RAM size in Megabytes.</desc>
5505 </attribute>
5506
5507 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
5508 <desc>Recommended hard disk size in Megabytes.</desc>
5509 </attribute>
5510 </interface>
5511
5512
5513 <enumerator
5514 name="IGuestOSTypeEnumerator" type="IGuestOSType"
5515 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
5516 />
5517
5518 <collection
5519 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
5520 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
5521 readonly="yes"
5522 />
5523
5524 <interface
5525 name="IGuest" extends="$unknown"
5526 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
5527
5528 wsmap="suppress"
5529 >
5530 <desc>
5531 The IGuest interface represents information about the operating system
5532 running inside the virtual machine. Used in
5533 <link to="IConsole::guest"/>.
5534
5535 IGuest provides information about the guest operating system, whether
5536 Guest Additions are installed and other OS-specific virtual machine
5537 properties.
5538 </desc>
5539
5540 <attribute name="OSTypeId" type="wstring" readonly="yes">
5541 <desc>
5542 Identifier of the Guest OS type as reported by the Guest
5543 Additions.
5544 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
5545 an IGuestOSType object representing details about the given
5546 Guest OS type.
5547 <note>
5548 If Guest Additions are not installed, this value will be
5549 the same as <link to="IMachine::OSTypeId"/>.
5550 </note>
5551 </desc>
5552 </attribute>
5553
5554 <attribute name="additionsActive" type="boolean" readonly="yes">
5555 <desc>
5556 Flag whether the Guest Additions are installed and active
5557 in which case their version will be returned by the
5558 <link to="#additionsVersion"/> property.
5559 </desc>
5560 </attribute>
5561
5562 <attribute name="additionsVersion" type="wstring" readonly="yes">
5563 <desc>
5564 Version of the Guest Additions (3 decimal numbers separated
5565 by dots) or empty when the Additions are not installed. The
5566 Additions may also report a version but yet not be active as
5567 the version might be refused by VirtualBox (incompatible) or
5568 other failures occurred.
5569 </desc>
5570 </attribute>
5571
5572 <attribute name="supportsSeamless" type="boolean" readonly="yes">
5573 <desc>
5574 Flag whether seamless guest display rendering (seamless desktop
5575 integration) is supported.
5576 </desc>
5577 </attribute>
5578
5579 <attribute name="supportsGraphics" type="boolean" readonly="yes">
5580 <desc>
5581 Flag whether the guest is in graphics mode. If it is not, then
5582 seamless rendering will not work, resize hints are not immediately
5583 acted on and guest display resizes are probably not initiated by
5584 the guest additions.
5585 </desc>
5586 </attribute>
5587
5588 <attribute name="memoryBalloonSize" type="unsigned long">
5589 <desc>Guest system memory balloon size in megabytes.</desc>
5590 </attribute>
5591
5592 <attribute name="statisticsUpdateInterval" type="unsigned long">
5593 <desc>Interval to update guest statistics in seconds.</desc>
5594 </attribute>
5595
5596 <method name="setCredentials">
5597 <desc>
5598 Store login credentials that can be queried by guest operating
5599 systems with Additions installed. The credentials are transient
5600 to the session and the guest may also choose to erase them. Note
5601 that the caller cannot determine whether the guest operating system
5602 has queried or made use of the credentials.
5603 </desc>
5604 <param name="userName" type="wstring" dir="in">
5605 <desc>User name string, can be empty</desc>
5606 </param>
5607 <param name="password" type="wstring" dir="in">
5608 <desc>Password string, can be empty</desc>
5609 </param>
5610 <param name="domain" type="wstring" dir="in">
5611 <desc>Domain name (guest logon scheme specific), can be emtpy</desc>
5612 </param>
5613 <param name="allowInteractiveLogon" type="boolean" dir="in">
5614 <desc>
5615 Flag whether the guest should alternatively allow the user to
5616 interactively specify different credentials. This flag might
5617 not be supported by all versions of the Additions.
5618 </desc>
5619 </param>
5620 </method>
5621
5622 <method name="getStatistic">
5623 <desc>
5624 Query specified guest statistics as reported by the VirtualBox Additions.
5625 </desc>
5626 <param name="cpuId" type="unsigned long" dir="in">
5627 <desc>Virtual CPU id; not relevant for all statistic types</desc>
5628 </param>
5629 <param name="statistic" type="GuestStatisticType" dir="in">
5630 <desc>Statistic type.</desc>
5631 </param>
5632 <param name="statVal" type="unsigned long" dir="out">
5633 <desc>Statistics value</desc>
5634 </param>
5635 </method>
5636
5637 </interface>
5638
5639
5640 <!--
5641 // IProgress
5642 /////////////////////////////////////////////////////////////////////////
5643 -->
5644
5645 <enumerator
5646 name="IProgressEnumerator" type="IProgress"
5647 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
5648 />
5649
5650 <collection
5651 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
5652 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
5653 readonly="yes"
5654 />
5655
5656 <interface
5657 name="IProgress" extends="$unknown"
5658 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
5659 wsmap="managed"
5660 >
5661 <desc>
5662 The IProgress interface represents a task progress object that allows
5663 to wait for the completion of some asynchronous task.
5664
5665 The task consists of one or more operations that run sequentially,
5666 one after one. There is an individual percent of completion of the
5667 current operation and the percent of completion of the task as a
5668 whole. Similarly, you can wait for the completion of a particular
5669 operation or for the completion of the whole task.
5670
5671 Every operation is identified by a number (starting from 0)
5672 and has a separate description.
5673 </desc>
5674
5675 <attribute name="id" type="uuid" readonly="yes">
5676 <desc>ID of the task.</desc>
5677 </attribute>
5678
5679 <attribute name="description" type="wstring" readonly="yes">
5680 <desc>Description of the task.</desc>
5681 </attribute>
5682
5683 <attribute name="initiator" type="$unknown" readonly="yes">
5684 <desc>Initiator of the task.</desc>
5685 </attribute>
5686
5687 <attribute name="cancelable" type="boolean" readonly="yes">
5688 <desc>Whether the task can be interrupted.</desc>
5689 </attribute>
5690
5691 <attribute name="percent" type="long" readonly="yes">
5692 <desc>
5693 Current task progress value in percent.
5694 This value depends on how many operations are already complete.
5695 </desc>
5696 </attribute>
5697
5698 <attribute name="completed" type="boolean" readonly="yes">
5699 <desc>Whether the task has been completed.</desc>
5700 </attribute>
5701
5702 <attribute name="canceled" type="boolean" readonly="yes">
5703 <desc>Whether the task has been canceled.</desc>
5704 </attribute>
5705
5706 <attribute name="resultCode" type="result" readonly="yes">
5707 <desc>
5708 Result code of the progress task.
5709 Valid only if <link to="#completed"/> is true.
5710 </desc>
5711 </attribute>
5712
5713 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
5714 <desc>
5715 Extended information about the unsuccessful result of the
5716 progress operation. May be NULL when no extended information
5717 is available.
5718 Valid only if <link to="#completed"/> is true and
5719 <link to="#resultCode"/> indicates a failure.
5720 </desc>
5721 </attribute>
5722
5723 <attribute name="operationCount" type="unsigned long" readonly="yes">
5724 <desc>
5725 Number of operations this task is divided into.
5726 Every task consists of at least one operation.
5727 </desc>
5728 </attribute>
5729
5730 <attribute name="operation" type="unsigned long" readonly="yes">
5731 <desc>Number of the operation being currently executed.</desc>
5732 </attribute>
5733
5734 <attribute name="operationDescription" type="wstring" readonly="yes">
5735 <desc>
5736 Description of the operation being currently executed.
5737 </desc>
5738 </attribute>
5739
5740 <attribute name="operationPercent" type="long" readonly="yes">
5741 <desc>Current operation progress value in percent.</desc>
5742 </attribute>
5743
5744 <method name="waitForCompletion">
5745 <desc>
5746 Waits until the task is done (including all operations) with a
5747 given timeout.
5748 </desc>
5749 <param name="timeout" type="long" dir="in">
5750 <desc>
5751 Timeout value in milliseconds.
5752 Specify -1 for an indefinite wait.
5753 </desc>
5754 </param>
5755 </method>
5756
5757 <method name="waitForOperationCompletion">
5758 <desc>
5759 Waits until the given operation is done with a given timeout.
5760 </desc>
5761 <param name="operation" type="unsigned long" dir="in">
5762 <desc>
5763 Number of the operation to wait for.
5764 Must be less than <link to="#operationCount"/>.
5765 </desc>
5766 </param>
5767 <param name="timeout" type="long" dir="in">
5768 <desc>
5769 Timeout value in milliseconds.
5770 Specify -1 for an indefinite wait.
5771 </desc>
5772 </param>
5773 </method>
5774
5775 <method name="cancel">
5776 <desc>
5777 Cancels the task.
5778 <note>
5779 If <link to="#cancelable"/> is <tt>false</tt>, then
5780 this method will fail.
5781 </note>
5782 </desc>
5783 </method>
5784
5785 </interface>
5786
5787
5788 <!--
5789 // ISnapshot
5790 /////////////////////////////////////////////////////////////////////////
5791 -->
5792
5793 <enumerator
5794 name="ISnapshotEnumerator" type="ISnapshot"
5795 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
5796 />
5797
5798 <collection
5799 name="ISnapshotCollection" type="ISnapshot"
5800 enumerator="ISnapshotEnumerator"
5801 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
5802 readonly="yes"
5803 />
5804
5805 <interface
5806 name="ISnapshot" extends="$unknown"
5807 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
5808 wsmap="managed"
5809 >
5810 <desc>
5811 The ISnapshot interface represents a snapshot of the virtual
5812 machine.
5813
5814 The <i>snapshot</i> stores all the information about a virtual
5815 machine necessary to bring it to exactly the same state as it was at
5816 the time of taking the snapshot. The snapshot includes:
5817
5818 <ul>
5819 <li>all settings of the virtual machine (i.e. its hardware
5820 configuration: RAM size, attached hard disks, etc.)
5821 </li>
5822 <li>the execution state of the virtual machine (memory contents,
5823 CPU state, etc.).
5824 </li>
5825 </ul>
5826
5827 Snapshots can be <i>offline</i> (taken when the VM is powered off)
5828 or <i>online</i> (taken when the VM is running). The execution
5829 state of the offline snapshot is called a <i>zero execution state</i>
5830 (it doesn't actually contain any information about memory contents
5831 or the CPU state, assuming that all hardware is just powered off).
5832
5833 <h3>Snapshot branches</h3>
5834
5835 Snapshots can be chained. Chained snapshots form a branch where
5836 every next snapshot is based on the previous one. This chaining is
5837 mostly related to hard disk branching (see <link to="IHardDisk2"/>
5838 description). This means that every time a new snapshot is created,
5839 a new differencing hard disk is implicitly created for all normal
5840 hard disks attached to the given virtual machine. This allows to
5841 fully restore hard disk contents when the machine is later reverted
5842 to a particular snapshot.
5843
5844 In the current implementation, multiple snapshot branches within one
5845 virtual machine are not allowed. Every machine has a single branch,
5846 and <link to="IConsole::takeSnapshot()"/> operation adds a new
5847 snapshot to the top of that branch.
5848
5849 Existings snapshots can be discarded using
5850 <link to="IConsole::discardSnapshot()"/>.
5851
5852 <h3>Current snapshot</h3>
5853
5854 Every virtual machine has a current snapshot, identified by
5855 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
5856 a base for the <i>current machine state</i> (see below), to the effect
5857 that all normal hard disks of the machine and its execution
5858 state are based on this snapshot.
5859
5860 In the current implementation, the current snapshot is always the
5861 last taken snapshot (i.e. the head snapshot on the branch) and it
5862 cannot be changed.
5863
5864 The current snapshot is <tt>null</tt> if the machine doesn't have
5865 snapshots at all; in this case the current machine state is just
5866 current settings of this machine plus its current execution state.
5867
5868 <h3>Current machine state</h3>
5869
5870 The current machine state is what represented by IMachine instances got
5871 directly from IVirtualBox
5872 using <link
5873 to="IVirtualBox::getMachine()">getMachine()</link>, <link
5874 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
5875 to instances returned by <link to="ISnapshot::machine"/>). This state
5876 is always used when the machine is <link to="IConsole::powerUp"> powered
5877 on</link>.
5878
5879 The current machine state also includes the current execution state.
5880 If the machine is being currently executed
5881 (<link to="IMachine::state"/> is <link to="MachineState::Running"/>
5882 and above), its execution state is just what's happening now.
5883 If it is powered off (<link to="MachineState::PoweredOff"/> or
5884 <link to="MachineState::Aborted"/>), it has a zero execution state.
5885 If the machine is saved (<link to="MachineState::Saved"/>), its
5886 execution state is what saved in the execution state file
5887 (<link to="IMachine::stateFilePath"/>).
5888
5889 If the machine is in the saved state, then, next time it is powered
5890 on, its execution state will be fully restored from the saved state
5891 file and the execution will continue from the point where the state
5892 was saved.
5893
5894 Similarly to snapshots, the current machine state can be discarded
5895 using <link to="IConsole::discardCurrentState()"/>.
5896
5897 <h3>Taking and discarding snapshots</h3>
5898
5899 The table below briefly explains the meaning of every snapshot
5900 operation:
5901
5902 <table>
5903 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
5904
5905 <tr><td><link to="IConsole::takeSnapshot()"/></td>
5906
5907 <td>Save the current state of the virtual machine, including all
5908 settings, contents of normal hard disks and the current modifications
5909 to immutable hard disks (for online snapshots)</td>
5910
5911 <td>The current state is not changed (the machine will continue
5912 execution if it is being executed when the snapshot is
5913 taken)</td></tr>
5914
5915 <tr><td><link to="IConsole::discardSnapshot()"/></td>
5916
5917 <td>Forget the state of the virtual machine stored in the snapshot:
5918 dismiss all saved settings and delete the saved execution state (for
5919 online snapshots)</td>
5920
5921 <td>Other snapshots (including child snapshots, if any) and the
5922 current state are not directly affected</td></tr>
5923
5924 <tr><td><link to="IConsole::discardCurrentState()"/></td>
5925
5926 <td>Restore the current state of the virtual machine from the state
5927 stored in the current snapshot, including all settings and hard disk
5928 contents</td>
5929
5930 <td>The current state of the machine existed prior to this operation
5931 is lost</td></tr>
5932
5933 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
5934
5935 <td>Completely revert the virtual machine to the state it was in
5936 before the current snapshot has been taken</td>
5937
5938 <td>The current state, as well as the current snapshot, are
5939 lost</td></tr>
5940
5941 </table>
5942
5943 </desc>
5944
5945 <attribute name="id" type="uuid" readonly="yes">
5946 <desc>UUID of the snapshot.</desc>
5947 </attribute>
5948
5949 <attribute name="name" type="wstring">
5950 <desc>Short name of the snapshot.</desc>
5951 </attribute>
5952
5953 <attribute name="description" type="wstring">
5954 <desc>Optional description of the snapshot.</desc>
5955 </attribute>
5956
5957 <attribute name="timeStamp" type="long long" readonly="yes">
5958 <desc>
5959 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
5960 </desc>
5961 </attribute>
5962
5963 <attribute name="online" type="boolean" readonly="yes">
5964 <desc>
5965 <tt>true</tt> if this snapshot is an online snapshot and
5966 <tt>false</tt> otherwise.
5967
5968 <note>
5969 When this attribute is <tt>true</tt>, the
5970 <link to="IMachine::stateFilePath"/> attribute of the
5971 <link to="#machine"/> object associated with this snapshot
5972 will point to the saved state file. Otherwise, it will be
5973 <tt>null</tt>.
5974 </note>
5975 </desc>
5976 </attribute>
5977
5978 <attribute name="machine" type="IMachine" readonly="yes">
5979 <desc>
5980 Virtual machine this snapshot is taken on. This object
5981 stores all settings the machine had when taking this snapshot.
5982 <note>
5983 The returned machine object is immutable, i.e. no
5984 any settings can be changed.
5985 </note>
5986 </desc>
5987 </attribute>
5988
5989 <attribute name="parent" type="ISnapshot" readonly="yes">
5990 <desc>
5991 Parent snapshot (a snapshot this one is based on).
5992 <note>
5993 It's not an error to read this attribute on a snapshot
5994 that doesn't have a parent -- a null object will be
5995 returned to indicate this.
5996 </note>
5997 </desc>
5998 </attribute>
5999
6000 <attribute name="children" type="ISnapshotCollection" readonly="yes">
6001 <desc>
6002 Child snapshots (all snapshots having this one as a parent).
6003 <note>
6004 In the current implementation, there can be only one
6005 child snapshot, or no children at all, meaning this is the
6006 last (head) snapshot.
6007 </note>
6008 </desc>
6009 </attribute>
6010
6011 </interface>
6012
6013
6014 <!--
6015 // IMedia
6016 /////////////////////////////////////////////////////////////////////////
6017 -->
6018
6019 <enum
6020 name="MediaState"
6021 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
6022 >
6023 <desc>
6024 Virtual media state.
6025 <see>IMedia</see>
6026 </desc>
6027
6028 <const name="NotCreated" value="0">
6029 <desc>
6030 Associated media storage does not exist (either was not created yet or
6031 was deleted).
6032 </desc>
6033 </const>
6034 <const name="Created" value="1">
6035 <desc>
6036 Associated storage exists and accessible.
6037 </desc>
6038 </const>
6039 <const name="LockedRead" value="2">
6040 <desc>
6041 Media is locked for reading, no data modification is possible.
6042 </desc>
6043 </const>
6044 <const name="LockedWrite" value="3">
6045 <desc>
6046 Media is locked for writing, no concurrent data reading or modification
6047 is possible.
6048 </desc>
6049 </const>
6050 <const name="Inaccessible" value="4">
6051 <desc>
6052 Associated media storage is not accessible.
6053 </desc>
6054 </const>
6055 <const name="Creating" value="5">
6056 <desc>
6057 Associated media storage is being created.
6058 </desc>
6059 </const>
6060 <const name="Deleting" value="6">
6061 <desc>
6062 Associated media storage is being deleted.
6063 </desc>
6064 </const>
6065 </enum>
6066
6067 <interface
6068 name="IMedium" extends="$unknown"
6069 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
6070 wsmap="managed"
6071 >
6072 <desc>
6073 The IMedium interface is a common interface for all objects representing
6074 virtual media such as hard disks, DVD images.
6075
6076 Each medium is associated with a storage unit (such as a file on the host
6077 computer or a network resource) that holds actual data. The location of
6078 the storage unit is represented by the #location attribute. The value of
6079 this attribute is media type dependent.
6080
6081 The exact media type may be determined by querying the appropriate
6082 interface such as:
6083 <ul>
6084 <li>IHardDisk2 (virtual hard disks)</li>
6085 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
6086 <li>IFloppyImage2 (raw floppy image files)</li>
6087 </ul>
6088
6089 Existing media are opened using the following methods, depending on the
6090 media type:
6091 <ul>
6092 <li><link to="IVirtualBox::openHardDisk2()"/></li>
6093 <li><link to="IVirtualBox::openDVDImage()"/></li>
6094 <li><link to="IVirtualBox::openFloppyImage()"/></li>
6095 </ul>
6096
6097 New hard disk media are created using the
6098 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
6099 images are created outside VirtualBox, usually by storing a copy
6100 of the real medium of the corresponding type in a regular file.
6101
6102 <h3>Known Media</h3>
6103
6104 When an existing medium gets opened for the first time, it gets
6105 automatically remembered by the given VirtualBox installation or, in other
6106 words, becomes a <i>known medium</i>. Known media are stored in the media
6107 registry transparently maintaned by VirtualBox and stored in settings
6108 files so that this registry is preserved when VirtualBox is not running.
6109
6110 Newly created virtual hard disks get remembered only when the associated
6111 storage unit is actually created (see IHardDisk2 for more details).
6112
6113 All known media can be enumerated using
6114 <link to="IVirtualBox::hardDisks2"/>,
6115 <link to="IVirtualBox::DVDImages"/> and
6116 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
6117 quickly found by by UUID using <link to="IVirtualBox::getHardDisk2()"/>
6118 and similar methods or by location using
6119 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
6120
6121 Only known media can be attached to virtual machines.
6122
6123 Removing known media from the media registry is performed when the given
6124 medium is closed using the <link to="#close()"/> method or when its
6125 associated storage unit is deleted (only for hard disks).
6126
6127 <h3>Accessibility Checks</h3>
6128
6129 The given medium (with the created storage unit) is considered to be
6130 <i>accessible</i> when its storage unit can be successfully read from.
6131 Accessible media are indicated by the <link to="MediaState::Created"/>
6132 value of the <link to="#state"/> attribute. When the storage unit cannot
6133 be read (for example, because it is located on a disconnected network
6134 resource, or was accidentially deleted outside VirtualBox), the medium is
6135 considered to be <i>inaccessible</i> which is indicated by the
6136 <link to="MediaState::Inaccessible"/> state. The details about the reason
6137 of being inaccessible can be obtained using the
6138 <link to="#lastAccessError"/> attribute.
6139
6140 A new accessiblity check is performed each time the <link to="#state"/>
6141 attribute is read. Please note that this check may take long time (several
6142 seconds or even minutes, depending on the storage unit location and
6143 format), and will block the calling thread until finished. For this
6144 reason, it is recommended to never read this attribute on the main UI
6145 thread to avoid making the UI unresponsive.
6146
6147 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
6148 created for the first time), all known media are in the
6149 <link to="MediaState::Inaccessible"/> state but the value of the <link
6150 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
6151 accessibility check is made on startup. This is done to make the
6152 VirtualBox object ready for serving requests as
6153 fast as possible and let the end-user application decide if it needs to
6154 check media accessibility right away or not.
6155 </desc>
6156
6157 <attribute name="id" type="uuid" readonly="yes">
6158 <desc>
6159 UUID of the medium. For a newly created medium, this value is a randomly
6160 generated UUID.
6161 </desc>
6162 </attribute>
6163
6164 <attribute name="description" type="wstring">
6165 <desc>
6166 Optional description of the medium. For newly created media, the value
6167 of this attribute value is <tt>null</tt>.
6168
6169 Media types that don't support this attribute will return E_NOTIMPL in
6170 attempt to get or set this attribute's value.
6171
6172 <note>
6173 For some storage types, reading this attribute may return an outdated
6174 (last known) value when <link to="#state"/> is <link
6175 to="MediaState::Inaccessible"/> or <link
6176 to="MediaState::LockedWrite"/> because the value of this attribute is
6177 stored within the storage unit itself. Also note that changing the
6178 attribute value is not possible in such case, as well as when the
6179 medium is the <link to="MediaState::LockedRead"/> state.
6180 </note>
6181 </desc>
6182 </attribute>
6183
6184 <attribute name="state" type="MediaState" readonly="yes">
6185 <desc>
6186 Current media state. Inspect <link to="MediaState"/> values for details.
6187
6188 Reading this attribute may take long time because a new accessibility
6189 check of the storage unit is performed every time the attribute is read.
6190 This check may cause a significant delay if the storage unit of the
6191 given medium is, for example, a file located on a network share which is
6192 not currently accessible due to connectivity problems -- the call will
6193 not return until a timeout interval defined by the host OS for this
6194 operation expires.
6195
6196 If the last known state of the medium is <link to="MediaState::Created"/>
6197 and the accessibility check fails then the state wull be set to
6198 <link to="MediaState::Inaccessible"/> and <link to="#lastAccessError"/>
6199 may be used to get more details about the failure. If the state of the
6200 medium is <link to="MediaState::LockedRead"/> or
6201 <link to="MediaState::LockedWrite"/> then it remains the same, and a
6202 non-null value of <link to="#lastAccessError"/> will indicate a failed
6203 accessibility check in this case.
6204
6205 Note that not all media states are applicable to certain media types.
6206 For example, states <link to="MediaState::NotCreated"/>,
6207 <link to="MediaState::LockedWrite"/>, <link to="MediaState::Creating"/>,
6208 <link to="MediaState::Deleting"/> are meaningless for IDVDImage2 and
6209 IFloppyImage2 media.
6210 </desc>
6211 </attribute>
6212
6213 <attribute name="location" type="wstring">
6214 <desc>
6215 Location of the storage unit holding media data.
6216
6217 The format of the loocation string is media type specific. For media
6218 types that use regular files in a host's file system, the location
6219 string is just a full file name.
6220
6221 Some media types may support changing the storage unit location by
6222 simply changing the value of this property. If this operation is not
6223 supported, the implementation will return E_NOTIMPL in attempt to set
6224 this attribute's value.
6225
6226 When setting a value of the location attribute which is a regular file
6227 in the host's file system, the given file name may be either relative to
6228 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
6229 absolute. Note that if the given location specification does not contain
6230 the file extension part then a proper default extension will be
6231 automatically appended by the implementation depending on the media type.
6232 </desc>
6233 </attribute>
6234
6235 <attribute name="name" type="wstring" readonly="yes">
6236 <desc>
6237 Name of the storage unit holding media data.
6238
6239 The returned string is a short version of the <link to="#location"/>
6240 attribute that is suitable for representing the medium in situations
6241 where the full location specification is too long (such as lists
6242 and comboboxes in GUI frontends). This string is also used by frontends
6243 to sort the media list alphabetically when needed.
6244
6245 For example, for locations that are regular files in the host's file
6246 system, the value of this attribute is just a file name (+ extension),
6247 without the path specification.
6248
6249 Note that as opposed to the <link to="#location"/> attribute, the name
6250 name attribute will not necessary be unique for a list of media of the
6251 given type and format.
6252 </desc>
6253 </attribute>
6254
6255 <attribute name="size" type="unsigned long long" readonly="yes">
6256 <desc>
6257 Physical size of the storage unit used to hold media data (in bytes).
6258
6259 <note>
6260 For media whose <link to="#state"/> is <link
6261 to="MediaState::Inaccessible"/>, the value of this property is the
6262 last known size. For <link to="MediaState::NotCreated"/> media,
6263 the returned value is zero.
6264 </note>
6265 </desc>
6266 </attribute>
6267
6268 <attribute name="lastAccessError" type="wstring" readonly="yes">
6269 <desc>
6270 Text message that represents the result of the last acccessibility
6271 check.
6272
6273 Accessibility checks are performed each time the <link to="#state"/>
6274 attribute is read. A @c null string is returned if the last
6275 accessibility check was succeessful. A non-null string indicates a
6276 failure and should normally describe a reason of the failure (for
6277 example, a file read error).
6278 </desc>
6279 </attribute>
6280
6281 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
6282 <desc>
6283 Array of UUIDs of all machines this medium is attached to.
6284
6285 A <tt>null</tt> array is returned if this medium is not attached to any
6286 machine or to any machine's snapshot.
6287
6288 <note>
6289 The returned array will include a machine even if this medium is not
6290 attached to that machine in the current state but attached to it in
6291 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
6292 details.
6293 </note>
6294 </desc>
6295 </attribute>
6296
6297 <method name="getSnapshotIds">
6298 <desc>
6299 Returns an array of UUIDs of all snapshots of the given machine where
6300 this medium is attached to it.
6301
6302 If the medium is attached to the machine in the current state, then the
6303 first element in the array will always be the ID of the queried machine
6304 (i.e. the value equal to the @c machineId argument), followed by
6305 snapshit IDs (if any).
6306
6307 If the medium is not attached to the machine in the current state, then
6308 the array will contain only snapshot IDs.
6309
6310 The returned array may be <tt>null</tt> if this medium is not attached
6311 to the given machine at all, neither in the current state nor in one of
6312 snapshots.
6313 </desc>
6314 <param name="machineId" type="uuid" dir="in">
6315 <desc>
6316 UUID of the machine to query.
6317 </desc>
6318 </param>
6319 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
6320 <desc>
6321 Array of snapshot UUIDs of the given machine using this medium.
6322 </desc>
6323 </param>
6324 </method>
6325
6326 <method name="lockRead">
6327 <desc>
6328 Locks this medium for reading.
6329
6330 The read lock is shared: many clients can simultaneously lock the
6331 same media for reading unless it is already locked for writing (see
6332 <link to="#lockWrite()"/>) in which case an error is returned.
6333
6334 When the medium is locked for reading, it cannot be modified from within
6335 VirtualBox. This means that any method that changes the properties of
6336 this medium or contents of the storage unit will return an error (unless
6337 explicitly stated otherwise) and that an attempt to start a virtual
6338 machine that wants to modify the medium will also fail.
6339
6340 When the virtual machine is started up, it locks for reading all media
6341 it uses in read-only mode. If some media cannot be locked for reading,
6342 the startup procedure will fail.
6343
6344 The medium locked for reading must be unlocked using the
6345 <link to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/> can
6346 be nested and must be followed by the same number of paired
6347 <link to="#unlockRead()"/> calls.
6348
6349 This method sets the media state to <link to="MediaState::LockedRead"/>
6350 on success. The state proir to this call must be
6351 <link to="MediaState::Created"/>,
6352 <link to="MediaState::Inaccessible"/> or
6353 <link to="MediaState::LockedRead"/>. As you can see, inacessible media
6354 can be locked too. This is not an error; this method performs a logical
6355 lock that prevents modifications of this media through the VirtualBox
6356 API, not a physical lock of the underlying storage unit.
6357
6358 Either on success or on failure, this method returns the current state
6359 of the medium <b>before</b> the operation.
6360 </desc>
6361 <param name="state" type="MediaState" dir="return">
6362 <desc>
6363 State of the medium after the operation.
6364 </desc>
6365 </param>
6366 </method>
6367
6368 <method name="unlockRead">
6369 <desc>
6370 Cancels the read lock previously set by <link to="#lockRead()"/>.
6371
6372 Either on success or on failure, this method returns the current state
6373 of the medium <b>after</b> the operation.
6374
6375 See <link to="#lockRead()"/> for more details.
6376 </desc>
6377 <param name="state" type="MediaState" dir="return">
6378 <desc>
6379 State of the medium after the operation.
6380 </desc>
6381 </param>
6382 </method>
6383
6384 <method name="lockWrite">
6385 <desc>
6386 Locks this medium for writing.
6387
6388 The write lock, as opposed to <link to="#lockRead()"/>, is exclusive:
6389 there may be only one client that holds a write lock and there may be no
6390 read locks while the write lock is held.
6391
6392 When the medium is locked for writing, it cannot be modified from within
6393 VirtualBox and it is not guaranteed that the values of its properties
6394 are up-to-date. Any method that changes the properties of this medium or
6395 contents of the storage unit will return an error ((unless explicitly
6396 stated otherwise) and an attempt to start a virtual machine that wants
6397 to modify or to read the medium will also fail.
6398
6399 When the virtual machine is started up, it locks for writing all media
6400 it uses to write data to. If some media cannot be locked for writing,
6401 the startup procedure will fail.
6402
6403 The medium locked for writing must be unlocked using the
6404 <link to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
6405 can <b>not</b> be nested and must be followed by a paired
6406 <link to="#unlockWrite()"/> call.
6407
6408 This method sets the media state to <link to="MediaState::LockedWrite"/>
6409 on success. The state proir to this call must be
6410 <link to="MediaState::Created"/> or
6411 <link to="MediaState::Inaccessible"/>. As you can see, inacessible media
6412 can be locked too. This is not an error; this method performs a logical
6413 lock that prevents modifications of this media through the VirtualBox
6414 API, not a physical lock of the underlying storage unit.
6415
6416 Either on success or on failure, this method returns the current state
6417 of the medium <b>before</b> the operation.
6418 </desc>
6419 <param name="state" type="MediaState" dir="return">
6420 <desc>
6421 State of the medium after the operation.
6422 </desc>
6423 </param>
6424 </method>
6425
6426 <method name="unlockWrite">
6427 <desc>
6428 Cancels the write lock previously set by <link to="#lockWrite()"/>.
6429
6430 Either on success or on failure, this method returns the current state
6431 of the medium <b>after</b> the operation.
6432
6433 See <link to="#lockWrite()"/> for more details.
6434 </desc>
6435 <param name="state" type="MediaState" dir="return">
6436 <desc>
6437 State of the medium after the operation.
6438 </desc>
6439 </param>
6440 </method>
6441
6442 <method name="close">
6443 <desc>
6444 Closes this media.
6445
6446 The hard disk must not be attahced to any known virtual machine and must
6447 not have any known child hard disks, otherwise the operation will fail.
6448
6449 When the hard disk is successfully closed, it gets removed from the list
6450 of remembered hard disks, but its storage unit is not deleted. In
6451 particular, this means that this hard disk can be later opened again
6452 using the <link to="IVirtualBox::openHardDisk2"/> call.
6453
6454 Note that after this method successfully returns, the given hard disk
6455 object becomes uninitialized. This means that any attempt to call any of
6456 its methods or attributes will fail with the <tt>"Object not ready"
6457 (E_ACCESSDENIED)</tt> error.
6458 </desc>
6459 </method>
6460
6461 </interface>
6462
6463
6464 <!--
6465 // IHardDisk2
6466 /////////////////////////////////////////////////////////////////////////
6467 -->
6468
6469 <enum
6470 name="HardDiskType"
6471 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
6472 >
6473 <desc>
6474 Virtual hard disk type.
6475 <see>IHardDisk</see>
6476 </desc>
6477
6478 <const name="Normal" value="0">
6479 <desc>
6480 Normal hard disk (attached directly or indirectly, preserved
6481 when taking snapshots).
6482 </desc>
6483 </const>
6484 <const name="Immutable" value="1">
6485 <desc>
6486 Immutable hard disk (attached indirectly, changes are wiped out
6487 after powering off the virtual machine).
6488 </desc>
6489 </const>
6490 <const name="Writethrough" value="2">
6491 <desc>
6492 Write through hard disk (attached directly, ignored when
6493 taking snapshots).
6494 </desc>
6495 </const>
6496 </enum>
6497
6498 <interface
6499 name="IHardDisk2Attachment" extends="$unknown"
6500 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
6501 wsmap="struct"
6502 >
6503 <desc>
6504 The IHardDisk2Attachment interface represents a hard disk attachment of a
6505 virtual machine.
6506
6507 Every hard disk attachments specifies a slot of the virtual hard disk
6508 controller and a virtual virtual hard disk attached to this slot.
6509
6510 The array of hard disk attachments is returned by
6511 <link to="IMachine::hardDisk2Attachments"/>.
6512
6513 <note>
6514 With the COM API, this is an interface like all the others. With the
6515 webservice, this is mapped to a structure, so querying the attribute
6516 will not return an object, but a complete structure.
6517 </note>
6518 </desc>
6519 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
6520 <desc>Hard disk object associated with this attachment.</desc>
6521 </attribute>
6522
6523 <attribute name="bus" type="StorageBus" readonly="yes">
6524 <desc>Interface bus of this attachment.</desc>
6525 </attribute>
6526
6527 <attribute name="channel" type="long" readonly="yes">
6528 <desc>Channel number of this attachment.</desc>
6529 </attribute>
6530
6531 <attribute name="device" type="long" readonly="yes">
6532 <desc>Device slot number of this attachment.</desc>
6533 </attribute>
6534
6535 </interface>
6536
6537 <interface
6538 name="IHardDisk2" extends="IMedium"
6539 uuid="be30c487-3071-4067-8a03-8fed74a80708"
6540 wsmap="managed"
6541 >
6542 <desc>
6543 The IHardDisk2 interface represents a virtual hard disk drive
6544 used by a virtual machine.
6545
6546 Virtual hard disk objects virtualize the hard disk hardware and look like
6547 regular hard disks for the guest OS running inside the virtual machine.
6548
6549 <h3>Hard Disk Types</h3>
6550
6551 There are three types of hard disks:
6552 <link to="HardDiskType::Normal">Normal</link>,
6553 <link to="HardDiskType::Immutable">Immutable</link> and
6554 <link to="HardDiskType::Writethrough">Writethrough</link>. The type of the
6555 hard disk defines how the hard disk is attached to a virtual machine and
6556 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
6557 machine with the attached hard disk is taken. The type of the hard disk is
6558 defined by the <link to="#type"/> attribute.
6559
6560 All hard disks can be also divided in two big groups: <i>base</i> hard
6561 disks and <i>differencing</i> hard disks. A base hard disk contains all
6562 sectors of the hard disk data in its storage unit and therefore can be
6563 used independently. On the contrary, a differencing hard disk contains
6564 only some part of the hard disk data (a subset of sectors) and needs
6565 another hard disk to get access to the missing sectors of data. This
6566 another hard disk is called a <i>parent</i> hard disk and defines a hard
6567 disk to which this differencing hard disk is known to be <i>linked to</i>.
6568 The parent hard disk may be itself a differencing hard disk. This
6569 way, differencing hard disks form a linked hard disk chain. This chain
6570 always ends with the base hard disk which is sometimes referred to as the
6571 root hard disk of this chain. Note that several differencing hard disks
6572 may be linked to the same parent hard disk. This way, all known hard disks
6573 form a hard disk tree which is based on their parent-child relationship.
6574
6575 Differencing hard disks can be distinguished from base hard disks by
6576 querying the <link to="#parent"/> attribute: base hard disks do not have
6577 parents they would depend on, so the value of this attribute is always
6578 <tt>null</tt> for them. Using this attribute, it is possible to walk up
6579 the hard disk tree (from the child hard disk to its parent). It is also
6580 possible to walk down the tree using the <link to="#children"/>
6581 attribute.
6582
6583 Note that the type of all differencing hard disks is
6584 <link to="HardDiskType::Normal">Normal</link>; all other values are
6585 meaningless for them. Base hard disks may be of any type.
6586
6587 <h3>Creating Hard Disks</h3>
6588
6589 New base hard disks are created using
6590 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
6591 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
6592 disks are usually implicitly created by VirtualBox when needed but may
6593 also be created explicitly using <link to="#createDiffStorage()"/>.
6594
6595 After the hard disk is successfully created (including the storage unit)
6596 or opened, it becomes a known hard disk (remembered in the internal media
6597 registry). Known hard disks can be attached to a virtual machine, accessed
6598 through <link to="IVirtualBox::getHardDisk2()"/> and
6599 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
6600 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
6601
6602 The following methods, besides <link to="IMedium::close()"/>,
6603 automatically remove the hard disk from the media registry:
6604 <ul>
6605 <li><link to="#deleteStorage()"/></li>
6606 <li><link to="#mergeTo()"/></li>
6607 </ul>
6608
6609 If the storage unit of the hard disk is a regular file in the host's
6610 filesystem then the rules stated in the description of the
6611 <link to="IMedium::location"/> attribute apply when setting its value. In
6612 addition, a plain file name without any path may be given, in which case
6613 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
6614 folder</link> will be prepended to it.
6615
6616 <h4>Automatic composition of the file name part</h4>
6617
6618 Another extension to the <link to="IMedium::location"/> attribute is that
6619 there is a possibility to cause VirtualBox to compose a unique value for
6620 the file name part of the location using the UUID of the hard disk. This
6621 applies only to hard disks in <link to="MediaState::NotCreated"/> state,
6622 e.g. before the storage unit is created, and works as follows. You set the
6623 value of the <link to="IMedium::location"/> attribute to a location
6624 specification which only contains the path specification but not the file
6625 name part and ends with either a forward slash or a backslash character.
6626 In response, VirtualBox will genereate a new UUID for the hard disk and
6627 compose the file name using the following pattern:
6628 <pre>
6629 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
6630 </pre>
6631 where <tt>&lt;path&gt;</tt> is the supplied path specification,
6632 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
6633 is the default extension for the storage format of this hard disk. After
6634 that, you may call any of the metods that create a new hard disk storage
6635 unit and they will use the generated UUID and file name.
6636
6637 <h3>Attaching Hard Disks</h3>
6638
6639 Hard disks are attached to virtual machines using the
6640 <link to="IMachine::attachHardDisk2()"/> method and detached using the
6641 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
6642 <link to="#type"/>, hard disks are attached either
6643 <i>directly</i> or <i>indirectly</i>.
6644
6645 When a hard disk is being attached directly, it is associated with the
6646 virtual machine and used for hard disk operations when the machine is
6647 running. When a hard disk is being attached indirectly, a new differencing
6648 hard disk linked to it is implicitly created and this differencing hard
6649 disk is associated with the machine and used for hard disk operations.
6650 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
6651 a direct attachment then the same hard disk will be returned in response
6652 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
6653 an indirect attachment is performed then
6654 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
6655 differencing hard disk, not the original one passed to <link
6656 to="IMachine::attachHardDisk2()"/>. The following table shows the
6657 dependency of the attachment type on the hard disk type:
6658
6659 <table>
6660 <tr>
6661 <th>Hard Disk Type</th>
6662 <th>Direct or Indirect?</th>
6663 </tr>
6664 <tr>
6665 <td>Normal (Base)</td>
6666 <td>
6667 Normal base hard disks that do not have children (i.e. differencing
6668 hard disks linked to them) and that are not already attached to
6669 virtual machines in snapshots are attached <b>directly</b>.
6670 Otherwise, they are attached <b>indirectly</b> because having
6671 dependent children or being part of the snapshot makes it impossible
6672 to modify hard disk contents without breaking the integrity of the
6673 dependent party. The <link to="#readOnly"/> attribute allows to
6674 quickly determine the kind of the attachment for the given hard
6675 disk. Note that if a normal base hard disk is to be indirectly
6676 attached to a virtual machine with snapshots then a special
6677 procedure called <i>smart attachment</i> is performed (see below).
6678 </td>
6679 </tr>
6680 <tr>
6681 <td>Normal (Differencing)</td>
6682 <td>
6683 Differencing hard disks are like normal base hard disks: attached
6684 <b>directly</b> if they do not have children and are not attached to
6685 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
6686 that the smart attachment procedure is never performed for
6687 differencing hard disks.
6688 </td>
6689 </tr>
6690 <tr>
6691 <td>Immutable</td>
6692 <td>
6693 Immutabe hard disks are always attached <b>indirectly</b> because
6694 they are designed to be non-writable. If an immutable hard disk is
6695 attached to a virtual machine with snapshots then a special
6696 procedure called smart attachment is performed (see below).
6697 </td>
6698 </tr>
6699 <tr>
6700 <td>Writethrough</td>
6701 <td>
6702 Writethrough hard disks are always attached <b>directly</b>, also as
6703 designed. This also means that writethrough hard disks cannot have
6704 other hard disks linked to them at all.
6705 </td>
6706 </tr>
6707 </table>
6708
6709 Note that the same hard disk, regardless of its type, may be attached to
6710 more than one virtual machine at a time. In this case, the machine that is
6711 started first gains exclusive access to the hard disk and attempts to
6712 start other machines having this hard disk attached will fail until the
6713 first machine is powered down.
6714
6715 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
6716 that the given hard disk remains associated with the given machine after a
6717 successful <link to="IMachine::detachHardDisk2()"/> call until
6718 <link to="IMachine::saveSettings()"/> is called to save all changes to
6719 machine settings to disk. This deferring is necessary to guarantee that
6720 the hard disk configuration may be restored at any time by a call to
6721 <link to="IMachine::discardSettings()"/> before the settings
6722 are saved (committed).
6723
6724 Note that if <link to="IMachine::discardSettings()"/> is called after
6725 indirectly attaching some hard disks to the machine but before a call to
6726 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
6727 all differencing hard disks implicitly created by
6728 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
6729 Such implicitly created hard disks will also be immediately deleted when
6730 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
6731 call if it is made before <link to="IMachine::saveSettings()"/>. This
6732 implicit deletion is safe because newly created differencing hard
6733 disks do not contain any user data.
6734
6735 However, keep in mind that detaching differencing hard disks that were
6736 implicitly created by <link to="IMachine::attachHardDisk2()"/>
6737 before the last <link to="IMachine::saveSettings()"/> call will
6738 <b>not</b> implicitly delete them as they may already contain some data
6739 (for example, as a result of virtual machine execution). If these hard
6740 disks are no more necessary, the caller can always delete them explicitly
6741 using <link to="#deleteStorage()"/> after they are actually de-associated
6742 from this machine by the <link to="IMachine::saveSettings()"/> call.
6743
6744 <h3>Smart Attachment</h3>
6745
6746 When normal base or immutable hard disks are indirectly attached to a
6747 virtual machine then some additionals steps are performed to make sure the
6748 virtual machine will have the most recent "view" of the hard disk being
6749 attached. These steps include walking through the machine's snapshots
6750 starting from the current one and going through ancestors up to the first
6751 snapshot. Hard disks attached to the virtual machine in all
6752 of the encountered snapshots are checked whether they are descendants of
6753 the given normal base or immutable hard disk. The first found child (which
6754 is the differencing hard disk) will be used instead of the normal base or
6755 immutable hard disk as a parent for creating a new differencing hard disk
6756 that will be actually attached to the machine. And only if no descendants
6757 are found or if the virtual machine does not have any snapshots then the
6758 normal base or immutable hard disk will be used itself as a parent for
6759 this differencing hard disk.
6760
6761 It is easier to explain what smart attachment does using the
6762 following example:
6763 <pre>
6764BEFORE attaching B.vdi: AFTER attaching B.vdi:
6765
6766Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
6767 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
6768 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
6769 Snapshot 4 (none) Snapshot 4 (none)
6770 CurState (none) CurState (D3->D2.vdi)
6771
6772 NOT
6773 ...
6774 CurState (D3->B.vdi)
6775 </pre>
6776 The first column is the virtual machine configuration before the base hard
6777 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
6778 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
6779 mean that the hard disk that is actually attached to the machine is a
6780 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
6781 another hard disk, <tt>B.vdi</tt>.
6782
6783 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
6784 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
6785 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
6786 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
6787 it cannot be attached directly and needs an indirect attachment (i.e.
6788 implicit creation of a new differencing hard disk). Due to the smart
6789 attachment procedure, the new differencing hard disk
6790 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
6791 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
6792 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
6793 machine.
6794
6795 Note that if there is more than one descendant hard disk of the given base
6796 hard disk found in a snapshot, and there is an exact device, channel and
6797 bus match, then this exact match will be used. Otherwise, the youngest
6798 descendant will be picked up.
6799
6800 There is one more important aspect of the smart attachment procedure which
6801 is not related to snapshots at all. Before walking through the snapshots
6802 as described above, the backup copy of the current list of hard disk
6803 attachment is searched for descendants. This backup copy is created when
6804 the hard disk configuartion is changed for the first time after the last
6805 <link to="IMachine::saveSettings()"/> call and used by
6806 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
6807 changes. When such a descendant is found in this backup copy, it will be
6808 simply reattached back, without creating a new differencing hard disk for
6809 it. This optimization is necessary to make it possible to re-attach the
6810 base or immutable hard disk to a different bus, channel or device slot
6811 without losing the contents of the differencing hard disk actually
6812 attached to the machine in place of it.
6813 </desc>
6814
6815 <attribute name="format" type="wstring" readonly="yes">
6816 <desc>
6817 Storage format of this hard disk.
6818
6819 The value of this attribute is a string that specifies a backend used to
6820 store hard disk data. The storage format is defined when you create a
6821 new hard disk or automatically detected when you open an existing hard
6822 disk medium, and cannot be changed later.
6823
6824 The list of all storage formats supported by this VirtualBox
6825 installation can be obtained using
6826 <link to="ISystemProperties::hardDiskFormats"/>.
6827 </desc>
6828 </attribute>
6829
6830 <attribute name="type" type="HardDiskType">
6831 <desc>
6832 Type (role) of this hard disk.
6833
6834 The following constraints apply when changing the value of this
6835 attribute:
6836 <ul>
6837 <li>If a hard disk is attached to a virtual machine (either in the
6838 current state or in one of the snapshots), its type cannot be
6839 changed.
6840 </li>
6841 <li>As long as the hard disk has children, its type cannot be set
6842 to <link to="HardDiskType::Writethrough"/>.
6843 </li>
6844 <li>The type of all differencing hard disks is
6845 <link to="HardDiskType::Normal"/> and cannot be changed.
6846 </li>
6847 </ul>
6848
6849 The type of a newly created or opened hard disk is set to
6850 <link to="HardDiskType::Normal"/>.
6851 </desc>
6852 </attribute>
6853
6854 <attribute name="parent" type="IHardDisk2" readonly="yes">
6855 <desc>
6856 Parent of this hard disk (a hard disk this hard disk is directly based
6857 on).
6858
6859 Only differencing hard disks have parents. For base (non-differencing)
6860 hard disks, <tt>null</tt> is returned.
6861 </desc>
6862 </attribute>
6863
6864 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
6865 <desc>
6866 Children of this hard disk (all differencing hard disks directly based
6867 on this hard disk). A <tt>null</tt> array is returned if this hard disk
6868 does not have any children.
6869 </desc>
6870 </attribute>
6871
6872 <attribute name="root" type="IHardDisk2" readonly="yes">
6873 <desc>
6874 Root hard disk of this hard disk.
6875
6876 If this is a differencing hard disk, its root hard disk is the base hard
6877 disk the given hard disk branch starts from. For all other types of hard
6878 disks, this property returns the hard disk object itself (i.e. the same
6879 object this property is read on).
6880 </desc>
6881 </attribute>
6882
6883 <attribute name="readOnly" type="boolean" readonly="yes">
6884 <desc>
6885 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
6886 otherwise.
6887
6888 A hard disk is considered to be read-only when its contents cannot be
6889 modified without breaking the integrity of other parties that depednd on
6890 this hard disk such as its child hard disks or snapshots of virtual
6891 machines where this hard disk is attached to these machines. If there
6892 are no children and no such snapshots then there is no dependency and
6893 the hard disk is not read-only.
6894
6895 The value of this attribute can be used to determine the kind of the
6896 attachment that will take place when attaching this hard disk to a
6897 virtual machine. If the value is <tt>false</tt> then the hard disk will
6898 be attached directly. If the value is <tt>true</tt> then the hard disk
6899 will be attached indirectly by creating a new differencing child hard
6900 disk for that. See the interface description for more information.
6901
6902 Note that all <link to="HardDiskType::Immutable">Immutable</link> hard
6903 disks are always read-only while all
6904 <link to="HardDiskType::Writethrough">Writethrough</link> hard disks are
6905 always not.
6906
6907 <note>
6908 The read-only condition represented by this attribute is related to
6909 the hard disk type and usage, not to the current
6910 <link to="IMedium::state">media state</link> and not to the read-only
6911 state of the storage unit.
6912 </note>
6913 </desc>
6914 </attribute>
6915
6916 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
6917 <desc>
6918 Logical size of this hard disk (in megabytes), as reported to the
6919 guest OS running inside the vurtual machine this disk is
6920 attached to. The logical size is defined when the hard disk is created
6921 and cannot be changed later.
6922
6923 <note>
6924 Reading this property on a differencing hard disk will return the size
6925 of its <link to="#root"/> hard disk.
6926 </note>
6927 <note>
6928 For hard disks whose state is <link to="#state"/> is <link
6929 to="MediaState::Inaccessible"/>, the value of this property is the
6930 last known logical size. For <link to="MediaState::NotCreated"/> hard
6931 disks, the returned value is zero.
6932 </note>
6933 </desc>
6934 </attribute>
6935
6936 <!-- storage methods -->
6937
6938 <method name="createDynamicStorage">
6939 <desc>
6940 Starts creating a dymically expanding hard disk storage unit in the
6941 background. The previous storage unit created for this this object, if
6942 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
6943 the operation will fail.
6944
6945 Before the operation starts, the hard disk is placed to
6946 <link to="MediaState::Creating"/> state. If the create operation
6947 fails, the media will placed back to <link to="MediaState::NotCreated"/>
6948 state.
6949
6950 After the returned progress object reports that the operation is
6951 successfully complete, the media state will be set to <link
6952 to="MediaState::Created"/>, the hard disk will be remembered by this
6953 VirtualBox installation and may be attached to virtual machines.
6954 </desc>
6955 <param name="logicalSize" type="unsigned long long" dir="in">
6956 <desc>Maximum logical size of the hard disk in megabytes.</desc>
6957 </param>
6958 <param name="progress" type="IProgress" dir="return">
6959 <desc>Progress object to track the operation completion.</desc>
6960 </param>
6961 </method>
6962
6963 <method name="createFixedStorage">
6964 <desc>
6965 Starts creating a fixed-size hard disk storage unit in the background.
6966 The previous storage unit created for this this object, if
6967 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
6968 the operation will fail.
6969
6970 Before the operation starts, the hard disk is placed to
6971 <link to="MediaState::Creating"/> state. If the create operation
6972 fails, the media will placed back to <link to="MediaState::NotCreated"/>
6973 state.
6974
6975 After the returned progress object reports that the operation is
6976 successfully complete, the media state will be set to <link
6977 to="MediaState::Created"/>, the hard disk will be remembered by this
6978 VirtualBox installation and may be attached to virtual machines.
6979 </desc>
6980 <param name="logicalSize" type="unsigned long long" dir="in">
6981 <desc>Logical size of the hard disk in megabytes.</desc>
6982 </param>
6983 <param name="progress" type="IProgress" dir="return">
6984 <desc>Progress object to track the operation completion.</desc>
6985 </param>
6986 </method>
6987
6988 <method name="deleteStorage">
6989 <desc>
6990 Starts deleting the storage unit of this hard disk.
6991
6992 The hard disk must not be attahced to any known virtual machine and must
6993 not have any known child hard disks, otherwise the operation will fail.
6994 It will also fail if there is no storage unit to delete or if deletion
6995 is already in progress, or if the hard disk is being in use (locked for
6996 read or for write) or inaccessible. Therefore, the only valid state for
6997 this operation to succeed is <link to="MediaState::Created"/>.
6998
6999 Before the operation starts, the hard disk is placed to
7000 <link to="MediaState::Deleting"/> state and gets removed from the list
7001 of remembered hard disks (media registry). If the delete operation
7002 fails, the media will be remembered again and placed back to
7003 <link to="MediaState::Created"/> state.
7004
7005 After the returned progress object reports that the operation is
7006 complete, the media state will be set to
7007 <link to="MediaState::NotCreated"/> and you will be able to use one of
7008 the storage creation methods to create it again.
7009
7010 <see>#close()</see>
7011 </desc>
7012 <param name="progress" type="IProgress" dir="return">
7013 <desc>Progress object to track the operation completion.</desc>
7014 </param>
7015 </method>
7016
7017 <!-- diff methods -->
7018
7019 <method name="createDiffStorage">
7020 <desc>
7021 Starts creating an empty differencing storage unit based on this hard
7022 disk in the format and at the location defined by the @a target
7023 argument.
7024
7025 The target hard disk must be in <link to="MediaState::NotCreated"/>
7026 state (i.e. must not have an existing storage unit). Upon successful
7027 completion, this operation will set the type of the target hard disk to
7028 <link to="HardDiskType::Normal"/> and create a storage unit necessary to
7029 represent the differencing hard disk data in the given format (according
7030 to the storage format of the target object).
7031
7032 After the returned progress object reports that the operation is
7033 successfully complete, the target hard disk gets remembered by this
7034 VirtualBox installation and may be attached to virtual machines.
7035
7036 <note>
7037 The hard disk will be placed to <link to="MediaState::LockedRead"/>
7038 state for the duration of this operation.
7039 </note>
7040 </desc> <param name="target" type="IHardDisk2" dir="in">
7041 <desc>Target hard disk.</desc>
7042 </param>
7043 <param name="progress" type="IProgress" dir="return">
7044 <desc>Progress object to track the operation completion.</desc>
7045 </param>
7046 </method>
7047
7048 <method name="mergeTo">
7049 <desc>
7050 Starts merging the contents of this hard disk and all intermediate
7051 differencing hard disks in the chain to the given target hard disk.
7052
7053 The target hard disk must be either a descendant of this hard disk or
7054 its ancestor (otherwise this method will immediately return a failure).
7055 It follows that there are two logical directions of the merge operation:
7056 from ancestor to descendant (<i>forward merge</i>) and from descendant to
7057 ancestor (<i>backward merge</i>). Let us consider the following hard disk
7058 chain:
7059
7060 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
7061
7062 Here, calling this method on the <tt>Base</tt> hard disk object with
7063 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
7064 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
7065 merge. Note that in both cases the contents of the resulting hard disk
7066 will be the same, the only difference is the hard disk object that takes
7067 the result of the merge operation. In case of the forward merge in the
7068 above example, the result will be written to <tt>Diff_2</tt>; in case of
7069 the backward merge, the result will be written to <tt>Base</tt>. In
7070 other words, the result of the operation is always stored in the target
7071 hard disk.
7072
7073 Upon successful operation completion, the storage units of all hard
7074 disks in the chain between this (source) hard disk and the target hard
7075 disk, including the source hard disk itself, will be automatically
7076 deleted and the relevant hard disk objects (including this hard disk)
7077 will become uninitialized. This means that any attempt to call any of
7078 their methods or attributes will fail with the
7079 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
7080 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
7081 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
7082 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
7083 disk itself since it will no longer be based on any other hard disk.
7084
7085 Considering the above, all of the following condtions must be met in
7086 order for the merge operation to succeed:
7087 <ul>
7088 <li>
7089 Neither this (source) hard disk nor any intermediate
7090 differencing hard disk in the chain between it and the target
7091 hard disk is attached to any virtual machine.
7092 </li>
7093 <li>
7094 Neither the source hard disk nor the target hard disk is an
7095 <link to="HardDiskType::Immutable"/> hard disk.
7096 </li>
7097 <li>
7098 The part of the hard disk tree from the source hard disk to the
7099 target hard disk is a linear chain, i.e. all hard disks in this
7100 chain have exactly one child which is the next hard disk in this
7101 chain. The only exception from this rule is the target hard disk in
7102 the forward merge operation; it is allowed to have any number of
7103 child hard disks because the merge operation will hot change its
7104 logical contents (as it is seen by the guest OS or by children).
7105 </li>
7106 <li>
7107 None of the involved hard disks are in
7108 <link to="MediaState::LockedRead"/> or
7109 <link to="MediaState::LockedWrite"/> state.
7110 </li>
7111 </ul>
7112
7113 <note>
7114 This (source) hard disk and all intermediates will be placed to <link
7115 to="MediaState::Deleting"/> state and the target hard disk will be
7116 placed to <link to="MediaState::LockedWrite"/> state and for the
7117 duration of this operation.
7118 </note>
7119 </desc>
7120 <param name="targetId" type="uuid" dir="in">
7121 <desc>UUID of the target ancestor or descendant hard disk.</desc>
7122 </param>
7123 <param name="progress" type="IProgress" dir="return">
7124 <desc>Progress object to track the operation completion.</desc>
7125 </param>
7126 </method>
7127
7128 <!-- clone methods -->
7129
7130 <method name="cloneTo">
7131 <desc>
7132 Starts creating a clone of this hard disk in the format and at the
7133 location defined by the @a target argument.
7134
7135 The target hard disk must be in <link to="MediaState::NotCreated"/>
7136 state (i.e. must not have an existing storage unit). Upon successful
7137 completion, the cloned hard disk will contain exactly the same sector
7138 data as the hard disk being cloned, except that a new UUID for the clone
7139 will be randomly generated.
7140
7141 After the returned progress object reports that the operation is
7142 successfully complete, the target hard disk gets remembered by this
7143 VirtualBox installation and may be attached to virtual machines.
7144
7145 <note>
7146 If the cloned hard disk is a differencing hard disk, it will inherit
7147 parent dependency of the original hard disk.
7148 </note>
7149 <note>
7150 This hard disk will be placed to <link to="MediaState::LockedRead"/>
7151 state for the duration of this operation.
7152 </note>
7153 </desc>
7154 <param name="target" type="IHardDisk2" dir="in">
7155 <desc>Target hard disk.</desc>
7156 </param>
7157 <param name="progress" type="IProgress" dir="return">
7158 <desc>Progress object to track the operation completion.</desc>
7159 </param>
7160 </method>
7161
7162 <method name="flattenTo">
7163 <desc>
7164 Starts creating a deep (independent) clone of this hard disk in the
7165 format and at the location defined by the @a target argument.
7166
7167 This operation is similar to <link to="#cloneTo()"/> except that when
7168 applied to a differencing hard disk, it will also copy missing hard disk
7169 data from all parent hard disks it is linked to. This will make the
7170 created clone an independent base hard disk that contains all hard disk
7171 data and does not need any other hard disks to operate.
7172
7173 After the returned progress object reports that the operation is
7174 successfully complete, the target hard disk gets remembered by this
7175 VirtualBox installation and may be attached to virtual machines.
7176
7177 <note>
7178 For base hard disks, this operation is identical to
7179 <link to="#cloneTo()"/>.
7180 </note>
7181 <note>
7182 This hard disk and all its parent hard disks will be placed to <link
7183 to="MediaState::LockedRead"/> state for the duration of this
7184 operation.
7185 </note>
7186 </desc>
7187 <param name="target" type="IHardDisk2" dir="in">
7188 <desc>Target hard disk.</desc>
7189 </param>
7190 <param name="progress" type="IProgress" dir="return">
7191 <desc>Progress object to track the operation completion.</desc>
7192 </param>
7193 </method>
7194
7195 </interface>
7196
7197
7198 <!--
7199 // IHardDiskFormat
7200 /////////////////////////////////////////////////////////////////////////
7201 -->
7202
7203 <enum
7204 name="DataType"
7205 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
7206 >
7207 <const name="Int32" value="0"/>
7208 <const name="Int8" value="1"/>
7209 <const name="String" value="2"/>
7210 </enum>
7211
7212 <enum
7213 name="DataFlags"
7214 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
7215 >
7216 <const name="None" value="0x00"/>
7217 <const name="Mandatory" value="0x01"/>
7218 <const name="Expert" value="0x02"/>
7219 <const name="FlagMask" value="0x03"/>
7220 </enum>
7221
7222 <enum
7223 name="HardDiskFormatCapabilities"
7224 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
7225 >
7226 <desc>
7227 Hard disk format capability flags.
7228 </desc>
7229
7230 <const name="Uuid" value="0x01">
7231 <desc>
7232 Supports UUIDs as expected by VirtualBox code.
7233 </desc>
7234 </const>
7235
7236 <const name="CreateFixed" value="0x02">
7237 <desc>
7238 Supports creating fixed size images, allocating all space instantly.
7239 </desc>
7240 </const>
7241
7242 <const name="CreateDynamic" value="0x04">
7243 <desc>
7244 Supports creating dynamically growing images, allocating space on
7245 demand.
7246 </desc>
7247 </const>
7248
7249 <const name="CreateSplit2G" value="0x08">
7250 <desc>
7251 Supports creating images split in chunks of a bit less than 2 GBytes.
7252 </desc>
7253 </const>
7254
7255 <const name="Differencing" value="0x10">
7256 <desc>
7257 Supports being used as a format for differencing hard disks (see <link
7258 to="IHardDisk2::createDiffStorage"/>).
7259 </desc>
7260 </const>
7261
7262 <const name="Asynchronous" value="0x20">
7263 <desc>
7264 Supports asynchronous I/O operations for at least some configurations.
7265 </desc>
7266 </const>
7267
7268 <const name="File" value="0x40">
7269 <desc>
7270 The format backend operates on files. The <link to="IMedium::location"/>
7271 attribute of the hard disk specifies a file used to store hard disk
7272 data. For a list of supported file extentions see
7273 <link to="IHardDiskFormat::fileExtensions"/>.
7274 </desc>
7275 </const>
7276
7277 <const name="Properties" value="0x80">
7278 <desc>
7279 The format backend uses the property interface to configure the storage
7280 location and properties. The <link to="IHardDiskFormat::describeProperties"/>
7281 method is used to get access to poperties supported by the given hard
7282 disk format.
7283 </desc>
7284 </const>
7285
7286 <const name="CapabilityMask" value="0xFF"/>
7287 </enum>
7288
7289 <interface
7290 name="IHardDiskFormat" extends="$unknown"
7291 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
7292 wsmap="managed"
7293 >
7294 <desc>
7295 The IHardDiskFormat interface represents a virtual hard disk format.
7296
7297 Each hard disk format has an associated backend which is used to handle
7298 hard disks stored in this format. This interface provides information
7299 about the properties of the associated backend.
7300
7301 Each hard disk format is identified by a string represented by the
7302 <link to="#id"/> attribute. This string is used in calls like
7303 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
7304 format.
7305
7306 The list of all supported hard disk formats can be obtained using
7307 <link to="ISystemProperties::hardDiskFormats"/>.
7308
7309 <see>IHardDisk2</see>
7310 </desc>
7311
7312 <attribute name="id" type="wstring" readonly="yes">
7313 <desc>
7314 Identifier of this format.
7315
7316 This string is used in methods of other interfaces where it is necessary
7317 to specify a hard disk format, such as
7318 <link to="IVirtualBox::createHardDisk2()"/>.
7319 </desc>
7320 </attribute>
7321
7322 <attribute name="name" type="wstring" readonly="yes">
7323 <desc>
7324 Human readable description of this format.
7325
7326 Mainly for use in file open dialogs.
7327 </desc>
7328 </attribute>
7329
7330 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
7331 <desc>
7332 Array of strings containing the supported file extensions.
7333
7334 The first extension in the array is the extension preferred by the
7335 backend. It is recommended to use this extension when specifyng a
7336 location of the storage unit for a new hard disk.
7337
7338 Note that some backends do not work on files, so this array may be
7339 empty.
7340
7341 <see>IHardDiskFormat::capabilities</see>
7342 </desc>
7343 </attribute>
7344
7345 <attribute name="capabilities" type="unsigned long" readonly="yes">
7346 <desc>
7347 Capabilities of the format as a set of bit flags.
7348
7349 For the meaning of individual capabilitiy flags see
7350 <link to="HardDiskFormatCapabilities"/>.
7351 </desc>
7352 </attribute>
7353
7354 <method name="describeProperties">
7355 <desc>
7356 Returns several arrays describing the properties supported by this
7357 format.
7358
7359 An element with the given index in each array describes one
7360 property. Thus, the number of elements in each returned array is the
7361 same and corresponds to the number of supported properties.
7362
7363 The returned arrays are not empty only if the
7364 <link to="HardDiskFormatCapabilities::Properties"/> flag is set.
7365
7366 <see>DataType</see>
7367 <see>DataFlags</see>
7368 </desc>
7369
7370 <param name="names" type="wstring" safearray="yes" dir="out">
7371 <desc>Array of property names.</desc>
7372 </param>
7373 <param name="description" type="wstring" safearray="yes" dir="out">
7374 <desc>Array of property descriptions.</desc>
7375 </param>
7376 <param name="types" type="unsigned long" safearray="yes" dir="out">
7377 <desc>Array of property types.</desc>
7378 </param>
7379 <param name="flags" type="unsigned long" safearray="yes" dir="out">
7380 <desc>Array of property flags.</desc>
7381 </param>
7382 <param name="defaults" type="wstring" safearray="yes" dir="out">
7383 <desc>Array of default property values.</desc>
7384 </param>
7385 </method>
7386
7387 </interface>
7388
7389
7390 <!--
7391 // IFloppyImage2
7392 /////////////////////////////////////////////////////////////////////////
7393 -->
7394
7395 <interface
7396 name="IFloppyImage2" extends="IMedium"
7397 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
7398 wsmap="managed"
7399 >
7400 <desc>
7401 The IFloppyImage2 interface represents a medium containing the image
7402 of a floppy disk.
7403 </desc>
7404
7405 </interface>
7406
7407
7408 <!--
7409 // IDVDImage2
7410 /////////////////////////////////////////////////////////////////////////
7411 -->
7412
7413 <interface
7414 name="IDVDImage2" extends="IMedium"
7415 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
7416 wsmap="managed"
7417 >
7418 <desc>
7419 The IDVDImage2 interface represents a medium containing the image
7420 of a CD or DVD disk in the ISO format.
7421 </desc>
7422
7423 </interface>
7424
7425
7426 <!--
7427 // IDVDDrive
7428 /////////////////////////////////////////////////////////////////////////
7429 -->
7430
7431 <interface
7432 name="IDVDDrive" extends="$unknown"
7433 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
7434 wsmap="managed"
7435 >
7436 <desc>
7437 The IDVDDrive interface represents the virtual CD/DVD drive of the
7438 virtual machine. An object of this type is returned by
7439 <link to="IMachine::DVDDrive"/>.
7440 </desc>
7441
7442 <attribute name="state" type="DriveState" readonly="yes">
7443 <desc>Current drive state.</desc>
7444 </attribute>
7445
7446 <attribute name="passthrough" type="boolean">
7447 <desc>
7448 When a host drive is mounted and passthrough is enabled
7449 the guest OS will be able to directly send SCSI commands to
7450 the host drive. This enables the guest OS to use CD/DVD writers
7451 but is potentially dangerous.
7452 </desc>
7453 </attribute>
7454
7455 <method name="mountImage">
7456 <desc>Mounts a CD/DVD image with the specified UUID.</desc>
7457 <param name="imageId" type="uuid" dir="in"/>
7458 </method>
7459
7460 <method name="captureHostDrive">
7461 <desc>Captures the specified host CD/DVD drive.</desc>
7462 <param name="drive" type="IHostDVDDrive" dir="in"/>
7463 </method>
7464
7465 <method name="unmount">
7466 <desc>Unmounts the currently mounted image or host drive.</desc>
7467 </method>
7468
7469 <method name="getImage">
7470 <desc>Returns the currently mounted CD/DVD image.</desc>
7471 <param name="image" type="IDVDImage2" dir="return"/>
7472 </method>
7473
7474 <method name="getHostDrive">
7475 <desc>Returns the currently mounted host CD/DVD drive.</desc>
7476 <param name="drive" type="IHostDVDDrive" dir="return"/>
7477 </method>
7478
7479 </interface>
7480
7481
7482 <!--
7483 // IFloppyDrive
7484 /////////////////////////////////////////////////////////////////////////
7485 -->
7486
7487 <interface
7488 name="IFloppyDrive" extends="$unknown"
7489 uuid="159412cd-bab8-452e-8097-218a020825a6"
7490 wsmap="managed"
7491 >
7492 <desc>
7493 The IFloppyDrive interface represents the virtual floppy drive of the
7494 virtual machine. An object of this type is returned by
7495 <link to="IMachine::floppyDrive" />.
7496 </desc>
7497
7498 <attribute name="enabled" type="boolean">
7499 <desc>
7500 Flag whether the floppy drive is enabled. If it is disabled,
7501 the floppy drive will not be reported to the guest OS.
7502 </desc>
7503 </attribute>
7504
7505 <attribute name="state" type="DriveState" readonly="yes">
7506 <desc>Current drive state.</desc>
7507 </attribute>
7508
7509 <method name="mountImage">
7510 <desc>Mounts a floppy image with the specified UUID.</desc>
7511 <param name="imageId" type="uuid" dir="in"/>
7512 </method>
7513
7514 <method name="captureHostDrive">
7515 <desc>Captures the specified host floppy drive.</desc>
7516 <param name="drive" type="IHostFloppyDrive" dir="in"/>
7517 </method>
7518
7519 <method name="unmount">
7520 <desc>Unmounts the currently mounted image or host drive.</desc>
7521 </method>
7522
7523 <method name="getImage">
7524 <desc>Returns the currently mounted floppy image.</desc>
7525 <param name="image" type="IFloppyImage2" dir="return"/>
7526 </method>
7527
7528 <method name="getHostDrive">
7529 <desc>Returns the currently mounted host floppy drive.</desc>
7530 <param name="drive" type="IHostFloppyDrive" dir="return"/>
7531 </method>
7532
7533 </interface>
7534
7535
7536 <!--
7537 // IKeyboard
7538 /////////////////////////////////////////////////////////////////////////
7539 -->
7540
7541 <interface
7542 name="IKeyboard" extends="$unknown"
7543 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
7544 wsmap="managed"
7545 >
7546 <desc>
7547 The IKeyboard interface represents the virtual machine's keyboard. Used
7548 in <link to="IConsole::keyboard"/>.
7549
7550 Through this interface, the virtual machine's virtual keyboard can be controlled. One
7551 can send keystrokes to the virtual machine and send the Ctrl-Alt-Del sequence to it.
7552 </desc>
7553 <method name="putScancode">
7554 <desc>Sends a scancode to the keyboard.</desc>
7555 <param name="scancode" type="long" dir="in"/>
7556 </method>
7557
7558 <method name="putScancodes">
7559 <desc>Sends an array of scancode to the keyboard.</desc>
7560 <param name="scancodes" type="long" dir="in" safearray="yes"/>
7561 <param name="codesStored" type="unsigned long" dir="return"/>
7562 </method>
7563
7564 <method name="putCAD">
7565 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard.</desc>
7566 </method>
7567
7568 </interface>
7569
7570
7571 <!--
7572 // IMouse
7573 /////////////////////////////////////////////////////////////////////////
7574 -->
7575
7576 <enum
7577 name="MouseButtonState"
7578 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
7579 >
7580 <desc>
7581 Mouse button state.
7582 </desc>
7583
7584 <const name="LeftButton" value="0x01"/>
7585 <const name="RightButton" value="0x02"/>
7586 <const name="MiddleButton" value="0x04"/>
7587 <const name="WheelUp" value="0x08"/>
7588 <const name="WheelDown" value="0x10"/>
7589 <const name="MouseStateMask" value="0x1F"/>
7590 </enum>
7591
7592 <interface
7593 name="IMouse" extends="$unknown"
7594 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
7595 wsmap="managed"
7596 >
7597 <desc>
7598 The IMouse interface represents the virtual machine's mouse. Used in
7599 <link to="IConsole::mouse"/>.
7600
7601 Through this interface, the virtual machine's virtual mouse can be
7602 controlled.
7603 </desc>
7604
7605 <attribute name="absoluteSupported" type="boolean" readonly="yes">
7606 <desc>
7607 Whether the guest OS supports absolute mouse pointer positioning
7608 or not.
7609 <note>
7610 VirtualBox Guest Tools need to be installed to the guest OS
7611 in order to enable absolute mouse positioning support.
7612 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
7613 callback to be instantly informed about changes of this attribute
7614 during virtual machine execution.
7615 </note>
7616 <see><link to="#putMouseEventAbsolute"/></see>
7617 </desc>
7618 </attribute>
7619
7620 <method name="putMouseEvent">
7621 <desc>
7622 Initiates a mouse event using relative pointer movements
7623 along x and y axis.
7624 </desc>
7625
7626 <param name="dx" type="long" dir="in">
7627 <desc>
7628 Amout of pixels the mouse should move to the right.
7629 Negative values move the mouse to the left.
7630 </desc>
7631 </param>
7632 <param name="dy" type="long" dir="in">
7633 <desc>
7634 Amout of pixels the mouse should move downwards.
7635 Negative values move the mouse upwards.
7636 </desc>
7637 </param>
7638 <param name="dz" type="long" dir="in">
7639 <desc>
7640 Amount of mouse wheel moves.
7641 Positive values describe clockwise wheel rotations,
7642 negative values describe counterclockwise rotations.
7643 </desc>
7644 </param>
7645 <param name="buttonState" type="long" dir="in">
7646 <desc>
7647 The current state of mouse buttons. Every bit represents
7648 a mouse button as follows:
7649 <table>
7650 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
7651 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
7652 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
7653 </table>
7654 A value of <tt>1</tt> means the corresponding button is pressed.
7655 otherwise it is released.
7656 </desc>
7657 </param>
7658 </method>
7659
7660 <method name="putMouseEventAbsolute">
7661 <desc>
7662 Positions the mouse pointer using absolute x and y coordinates.
7663 These coordinates are expressed in pixels and
7664 start from <tt>[1,1]</tt> which corresponds to the top left
7665 corner of the virtual display.
7666
7667 <note>
7668 This method will have effect only if absolute mouse
7669 positioning is supported by the guest OS.
7670 </note>
7671
7672 <see><link to="#absoluteSupported"/></see>
7673 </desc>
7674
7675 <param name="x" type="long" dir="in">
7676 <desc>
7677 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
7678 </desc>
7679 </param>
7680 <param name="y" type="long" dir="in">
7681 <desc>
7682 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
7683 </desc>
7684 </param>
7685 <param name="dz" type="long" dir="in">
7686 <desc>
7687 Amout of mouse wheel moves.
7688 Positive values describe clockwise wheel rotations,
7689 negative values describe counterclockwise rotations.
7690 </desc>
7691 </param>
7692 <param name="buttonState" type="long" dir="in">
7693 <desc>
7694 The current state of mouse buttons. Every bit represents
7695 a mouse button as follows:
7696 <table>
7697 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
7698 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
7699 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
7700 </table>
7701 A value of <tt>1</tt> means the corresponding button is pressed.
7702 otherwise it is released.
7703 </desc>
7704 </param>
7705 </method>
7706
7707 </interface>
7708
7709 <!--
7710 // IDisplay
7711 /////////////////////////////////////////////////////////////////////////
7712 -->
7713
7714 <enum
7715 name="FramebufferAccelerationOperation"
7716 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
7717 >
7718 <desc>
7719 Framebuffer acceleration operation.
7720 </desc>
7721
7722 <const name="SolidFillAcceleration" value="1"/>
7723 <const name="ScreenCopyAcceleration" value="2"/>
7724 </enum>
7725
7726 <enum
7727 name="FramebufferPixelFormat"
7728 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
7729 >
7730 <desc>
7731 Format of the video memory buffer. Constants represented by this enum can
7732 be used to test for particular values of <link
7733 to="IFramebuffer::pixelFormat"/>. See also <link
7734 to="IFramebuffer::requestResize()"/>.
7735
7736 See also www.fourcc.org for more information about FOURCC pixel formats.
7737 </desc>
7738
7739 <const name="Opaque" value="0xFFFFFFFF">
7740 <desc>
7741 Unknown buffer format. The user may not assume any particular
7742 format of the buffer.
7743 </desc>
7744 </const>
7745 <const name="FOURCC_RGB" value="0x32424752">
7746 <desc>
7747 Basic RGB format. <link to="IFramebuffer::bitsPerPixel"/> determines
7748 the bit layout.
7749 </desc>
7750 </const>
7751 </enum>
7752
7753 <interface
7754 name="IFramebuffer" extends="$unknown"
7755 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
7756 wsmap="suppress"
7757 >
7758 <attribute name="address" type="octet" mod="ptr" readonly="yes">
7759 <desc>Address of the start byte of the framebuffer.</desc>
7760 </attribute>
7761
7762 <attribute name="width" type="unsigned long" readonly="yes">
7763 <desc>Framebuffer width, in pixels.</desc>
7764 </attribute>
7765
7766 <attribute name="height" type="unsigned long" readonly="yes">
7767 <desc>Framebuffer height, in pixels.</desc>
7768 </attribute>
7769
7770 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
7771 <desc>
7772 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
7773 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
7774 are: 8, 15, 16, 24 and 32.
7775 </desc>
7776 </attribute>
7777
7778 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
7779 <desc>
7780 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
7781 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
7782 size of the scan line must be aligned to 32 bits.
7783 </desc>
7784 </attribute>
7785
7786 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
7787 <desc>
7788 Framebuffer pixel format. It's either one of the values defined by <link
7789 to="FramebufferPixelFormat"/> or a raw FOURCC code.
7790 <note>
7791 This attribute must never return <link
7792 to="PixelFormat::Opaque"/> -- the format of the buffer
7793 <link to="#address"/> points to must be always known.
7794 </note>
7795 </desc>
7796 </attribute>
7797
7798 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
7799 <desc>
7800 Defines whether this framebuffer uses the virtual video card's memory
7801 buffer (guest VRAM) directly or not. See <link
7802 to="IFramebuffer::requestResize()"/> for more information.
7803 </desc>
7804 </attribute>
7805
7806 <attribute name="heightReduction" type="unsigned long" readonly="yes">
7807 <desc>
7808 Hint from the framebuffer about how much of the standard
7809 screen height it wants to use for itself. This information is
7810 exposed to the guest through the VESA BIOS and VMMDev interface
7811 so that it can use it for determining its video mode table. It
7812 is not guaranteed that the guest respects the value.
7813 </desc>
7814 </attribute>
7815
7816 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
7817 <desc>
7818 An alpha-blended overlay which is superposed over the framebuffer.
7819 The initial purpose is to allow the display of icons providing
7820 information about the VM state, including disk activity, in front
7821 ends which do not have other means of doing that. The overlay is
7822 designed to controlled exclusively by IDisplay. It has no locking
7823 of its own, and any changes made to it are not guaranteed to be
7824 visible until the affected portion of IFramebuffer is updated. The
7825 overlay can be created lazily the first time it is requested. This
7826 attribute can also return NULL to signal that the overlay is not
7827 implemented.
7828 </desc>
7829 </attribute>
7830
7831 <attribute name="winId" type="unsigned long long" readonly="yes">
7832 <desc>
7833 Platform-dependent identifier of the window where context of this
7834 framebuffer is drawn, or zero if there's no such window.
7835 </desc>
7836 </attribute>
7837
7838 <method name="lock">
7839 <desc>
7840 Locks the framebuffer.
7841 Gets called by the IDisplay object where this framebuffer is
7842 bound to.
7843 </desc>
7844 </method>
7845
7846 <method name="unlock">
7847 <desc>
7848 Unlocks the framebuffer.
7849 Gets called by the IDisplay object where this framebuffer is
7850 bound to.
7851 </desc>
7852 </method>
7853
7854 <method name="notifyUpdate">
7855 <desc>
7856 Informs about an update.
7857 Gets called by the display object where this buffer is
7858 registered.
7859 </desc>
7860 <param name="x" type="unsigned long" dir="in"/>
7861 <param name="y" type="unsigned long" dir="in"/>
7862 <param name="width" type="unsigned long" dir="in"/>
7863 <param name="height" type="unsigned long" dir="in"/>
7864 <param name="finished" type="boolean" dir="return"/>
7865 </method>
7866
7867 <method name="requestResize">
7868 <desc>
7869 Requests a size and pixel format change.
7870
7871 There are two modes of working with the video buffer of the virtual
7872 machine. The <i>indirect</i> mode implies that the IFramebuffer
7873 implementation allocates a memory buffer for the requested display mode
7874 and provides it to the virtual machine. In <i>direct</i> mode, the
7875 IFramebuffer implementation uses the memory buffer allocated and owned
7876 by the virtual machine. This buffer represents the video memory of the
7877 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
7878 usually faster because the implementation gets a raw pointer to the
7879 guest VRAM buffer which it can directly use for visualizing the contents
7880 of the virtual display, as opposed to the indirect mode where the
7881 contents of guest VRAM are copied to the memory buffer provided by
7882 the implementation every time a display update occurs.
7883
7884 It is important to note that the direct mode is really fast only when
7885 the implementation uses the given guest VRAM buffer directly, for
7886 example, by blitting it to the window representing the virtual machine's
7887 display, which saves at least one copy operation comparing to the
7888 indirect mode. However, using the guest VRAM buffer directly is not
7889 always possible: the format and the color depth of this buffer may be
7890 not supported by the target window, or it may be unknown (opaque) as in
7891 case of text or non-linear multi-plane VGA video modes. In this case,
7892 the indirect mode (that is always available) should be used as a
7893 fallback: when the guest VRAM contents are copied to the
7894 implementation-provided memory buffer, color and format conversion is
7895 done automatically by the underlying code.
7896
7897 The @a pixelFormat parameter defines whether the direct mode is
7898 available or not. If @a pixelFormat is <link
7899 to="PixelFormat::Opaque"/> then direct access to the guest
7900 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
7901 bytesPerLine parameters must be ignored and the implementation must use
7902 the indirect mode (where it provides its own buffer in one of the
7903 supported formats). In all other cases, @a pixelFormat together with @a
7904 bitsPerPixel and @a bytesPerLine define the format of the video memory
7905 buffer pointed to by the @a VRAM parameter and the implementation is
7906 free to choose which mode to use. To indicate that this framebuffer uses
7907 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
7908 attribute must return <tt>true</tt> and <link to="#address"/> must
7909 return exactly the same address that is passed in the @a VRAM parameter
7910 of this method; otherwise it is assumed that the indirect strategy is
7911 chosen.
7912
7913 The @a width and @a height parameters represent the size of the
7914 requested display mode in both modes. In case of indirect mode, the
7915 provided memory buffer should be big enough to store data of the given
7916 display mode. In case of direct mode, it is guaranteed that the given @a
7917 VRAM buffer contains enough space to represent the display mode of the
7918 given size. Note that this framebuffer's <link to="#width"/> and <link
7919 to="#height"/> attributes must return exactly the same values as
7920 passed to this method after the resize is completed (see below).
7921
7922 The @a finished output parameter determines if the implementation has
7923 finished resizing the framebuffer or not. If, for some reason, the
7924 resize cannot be finished immediately during this call, @a finished
7925 must be set to @c false, and the implementation must call
7926 <link to="IDisplay::resizeCompleted()"/> after it has returned from
7927 this method as soon as possible. If @a finished is @c false, the
7928 machine will not call any framebuffer methods until
7929 <link to="IDisplay::resizeCompleted()"/> is called.
7930
7931 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
7932 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
7933 this framebuffer must return exactly the same values as specified in the
7934 parameters of this method, after the resize is completed. If the
7935 indirect mode is chosen, these attributes must return values describing
7936 the format of the implementation's own memory buffer <link
7937 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
7938 value must always correlate with <link to="#pixelFormat"/>. Note that
7939 the <link to="#pixelFormat"/> attribute must never return <link
7940 to="PixelFormat::Opaque"/> regardless of the selected mode.
7941
7942 <note>
7943 This method is called by the IDisplay object under the
7944 <link to="#lock()"/> provided by this IFramebuffer
7945 implementation. If this method returns @c false in @a finished, then
7946 this lock is not released until
7947 <link to="IDisplay::resizeCompleted()"/> is called.
7948 </note>
7949 </desc>
7950 <param name="screenId" type="unsigned long" dir="in">
7951 <desc>
7952 Logical screen number. Must be used in the corresponding call to
7953 <link to="IDisplay::resizeCompleted()"/> if this call is made.
7954 </desc>
7955 </param>
7956 <param name="pixelFormat" type="unsigned long" dir="in">
7957 <desc>
7958 Pixel format of the memory buffer pointed to by @a VRAM.
7959 See also <link to="FramebufferPixelFormat"/>.
7960 </desc>
7961 </param>
7962 <param name="VRAM" type="octet" mod="ptr" dir="in">
7963 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
7964 </param>
7965 <param name="bitsPerPixel" type="unsigned long" dir="in">
7966 <desc>Color depth, bits per pixel.</desc>
7967 </param>
7968 <param name="bytesPerLine" type="unsigned long" dir="in">
7969 <desc>Size of one scan line, in bytes.</desc>
7970 </param>
7971 <param name="width" type="unsigned long" dir="in">
7972 <desc>Width of the guest display, in pixels.</desc>
7973 </param>
7974 <param name="height" type="unsigned long" dir="in">
7975 <desc>Height of the guest display, in pixels.</desc>
7976 </param>
7977 <param name="finished" type="boolean" dir="return">
7978 <desc>
7979 Can the VM start using the new framebuffer immediately
7980 after this method returns or it should wait for
7981 <link to="IDisplay::resizeCompleted()"/>.
7982 </desc>
7983 </param>
7984 </method>
7985
7986 <method name="operationSupported">
7987 <desc>
7988 Returns whether the given acceleration operation is supported
7989 by the IFramebuffer implementation. If not, the display object
7990 will not attempt to call the corresponding IFramebuffer entry
7991 point. Even if an operation is indicated to supported, the
7992 IFramebuffer implementation always has the option to return non
7993 supported from the corresponding acceleration method in which
7994 case the operation will be performed by the display engine. This
7995 allows for reduced IFramebuffer implementation complexity where
7996 only common cases are handled.
7997 </desc>
7998 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
7999 <param name="supported" type="boolean" dir="return"/>
8000 </method>
8001
8002 <method name="videoModeSupported">
8003 <desc>
8004 Returns whether the framebuffer implementation is willing to
8005 support a given video mode. In case it is not able to render
8006 the video mode (or for some reason not willing), it should
8007 return false. Usually this method is called when the guest
8008 asks the VMM device whether a given video mode is supported
8009 so the information returned is directly exposed to the guest.
8010 It is important that this method returns very quickly.
8011 </desc>
8012 <param name="width" type="unsigned long" dir="in"/>
8013 <param name="height" type="unsigned long" dir="in"/>
8014 <param name="bpp" type="unsigned long" dir="in"/>
8015 <param name="supported" type="boolean" dir="return"/>
8016 </method>
8017
8018 <method name="solidFill">
8019 <desc>
8020 Fills the specified rectangle on screen with a solid color.
8021 </desc>
8022 <param name="x" type="unsigned long" dir="in"/>
8023 <param name="y" type="unsigned long" dir="in"/>
8024 <param name="width" type="unsigned long" dir="in"/>
8025 <param name="height" type="unsigned long" dir="in"/>
8026 <param name="color" type="unsigned long" dir="in"/>
8027 <param name="handled" type="boolean" dir="return"/>
8028 </method>
8029
8030 <method name="copyScreenBits">
8031 <desc>
8032 Copies specified rectangle on the screen.
8033 </desc>
8034 <param name="xDst" type="unsigned long" dir="in"/>
8035 <param name="yDst" type="unsigned long" dir="in"/>
8036 <param name="xSrc" type="unsigned long" dir="in"/>
8037 <param name="ySrc" type="unsigned long" dir="in"/>
8038 <param name="width" type="unsigned long" dir="in"/>
8039 <param name="height" type="unsigned long" dir="in"/>
8040 <param name="handled" type="boolean" dir="return"/>
8041 </method>
8042
8043 <method name="getVisibleRegion">
8044 <desc>
8045 Returns the visible region of this framebuffer.
8046
8047 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
8048 @a count parameter is ignored and the number of elements necessary to
8049 describe the current visible region is returned in @a countCopied.
8050
8051 If @a rectangles is not <tt>NULL</tt> but @a count is less
8052 than the required number of elements to store region data, the method
8053 will report a failure. If @a count is equal or greater than the
8054 required number of elements, then the actual number of elements copied
8055 to the provided array will be returned in @a countCopied.
8056
8057 <note>
8058 The address of the provided array must be in the process space of
8059 this IFramebuffer object.
8060 </note>
8061 </desc>
8062 <param name="rectangles" type="octet" mod="ptr" dir="in">
8063 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
8064 </param>
8065 <param name="count" type="unsigned long" dir="in">
8066 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8067 </param>
8068 <param name="countCopied" type="unsigned long" dir="return">
8069 <desc>Number of elements copied to the @a rectangles array.</desc>
8070 </param>
8071 </method>
8072
8073 <method name="setVisibleRegion">
8074 <desc>
8075 Suggests a new visible region to this framebuffer. This region
8076 represents the area of the VM display which is a union of regions of
8077 all top-level windows of the guest operating system running inside the
8078 VM (if the Guest Additions for this system support this
8079 functionality). This information may be used by the frontends to
8080 implement the seamless desktop integration feature.
8081
8082 <note>
8083 The address of the provided array must be in the process space of
8084 this IFramebuffer object.
8085 </note>
8086 <note>
8087 The IFramebuffer implementation must make a copy of the provided
8088 array of rectangles.
8089 </note>
8090 </desc>
8091 <param name="rectangles" type="octet" mod="ptr" dir="in">
8092 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
8093 </param>
8094 <param name="count" type="unsigned long" dir="in">
8095 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8096 </param>
8097 </method>
8098
8099 </interface>
8100
8101 <interface
8102 name="IFramebufferOverlay" extends="IFrameBuffer"
8103 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
8104 wsmap="suppress"
8105 >
8106 <desc>
8107 The IFramebufferOverlay interface represents an alpha blended overlay
8108 for displaying status icons above an IFramebuffer. It is always created
8109 not visible, so that it must be explicitly shown. It only covers a
8110 portion of the IFramebuffer, determined by its width, height and
8111 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
8112 that order) format, and may be written to directly. Do re-read the
8113 width though, after setting it, as it may be adjusted (increased) to
8114 make it more suitable for the front end.
8115 </desc>
8116 <attribute name="x" type="unsigned long" readonly="yes">
8117 <desc>X position of the overlay, relative to the framebuffer.</desc>
8118 </attribute>
8119
8120 <attribute name="y" type="unsigned long" readonly="yes">
8121 <desc>Y position of the overlay, relative to the framebuffer.</desc>
8122 </attribute>
8123
8124 <attribute name="visible" type="boolean" readonly="no">
8125 <desc>
8126 Whether the overlay is currently visible.
8127 </desc>
8128 </attribute>
8129
8130 <attribute name="alpha" type="unsigned long" readonly="no">
8131 <desc>
8132 The global alpha value for the overlay. This may or may not be
8133 supported by a given front end.
8134 </desc>
8135 </attribute>
8136
8137 <method name="move">
8138 <desc>
8139 Changes the overlay's position relative to the IFramebuffer.
8140 </desc>
8141 <param name="x" type="unsigned long" dir="in"/>
8142 <param name="y" type="unsigned long" dir="in"/>
8143 </method>
8144
8145 </interface>
8146
8147 <interface
8148 name="IDisplay" extends="$unknown"
8149 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
8150 wsmap="suppress"
8151 >
8152 <desc>
8153 The IDisplay interface represents the virtual machine's display.
8154
8155 The object implementing this interface is contained in each
8156 <link to="IConsole::display"/> attribute and represents the visual
8157 output of the virtual machine.
8158
8159 The virtual display supports pluggable output targets represented by the
8160 IFramebuffer interface. Examples of the output target are a window on
8161 the host computer or an RDP session's display on a remote computer.
8162 </desc>
8163 <attribute name="width" type="unsigned long" readonly="yes">
8164 <desc>Current display width.</desc>
8165 </attribute>
8166
8167 <attribute name="height" type="unsigned long" readonly="yes">
8168 <desc>Current display height.</desc>
8169 </attribute>
8170
8171 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8172 <desc>
8173 Current guest display color depth. Note that this may differ
8174 from <link to="IFramebuffer::bitsPerPixel"/>.
8175 </desc>
8176 </attribute>
8177
8178 <method name="setupInternalFramebuffer">
8179 <desc>
8180 Prepares an internally managed framebuffer.
8181 </desc>
8182 <param name="depth" type="unsigned long" dir="in"/>
8183 </method>
8184
8185 <method name="lockFramebuffer">
8186 <desc>
8187 Requests access to the internal framebuffer.
8188 </desc>
8189 <param name="address" type="octet" mod="ptr" dir="return"/>
8190 </method>
8191
8192 <method name="unlockFramebuffer">
8193 <desc>
8194 Releases access to the internal framebuffer.
8195 </desc>
8196 </method>
8197
8198 <method name="registerExternalFramebuffer">
8199 <desc>
8200 Registers an external framebuffer.
8201 </desc>
8202 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8203 </method>
8204
8205 <method name="setFramebuffer">
8206 <desc>
8207 Sets the framebuffer for given screen.
8208 </desc>
8209 <param name="screenId" type="unsigned long" dir="in"/>
8210 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8211 </method>
8212
8213 <method name="getFramebuffer">
8214 <desc>
8215 Queries the framebuffer for given screen.
8216 </desc>
8217 <param name="screenId" type="unsigned long" dir="in"/>
8218 <param name="framebuffer" type="IFramebuffer" dir="out"/>
8219 <param name="xOrigin" type="long" dir="out"/>
8220 <param name="yOrigin" type="long" dir="out"/>
8221 </method>
8222
8223 <method name="setVideoModeHint">
8224 <desc>
8225 Asks VirtualBox to request the given video mode from
8226 the guest. This is just a hint and it cannot be guaranteed
8227 that the requested resolution will be used. Guest Additions
8228 are required for the request to be seen by guests. The caller
8229 should issue the request and wait for a resolution change and
8230 after a timeout retry.
8231
8232 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
8233 parameters means that the corresponding values should be taken from the
8234 current video mode (i.e. left unchanged).
8235
8236 If the guest OS supports multi-monitor configuration then the @a display
8237 parameter specifies the number of the guest display to send the hint to:
8238 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
8239 so on. If the multi-monitor configuration is not supported, @a display
8240 must be <tt>0</tt>.
8241
8242 </desc>
8243 <param name="width" type="unsigned long" dir="in"/>
8244 <param name="height" type="unsigned long" dir="in"/>
8245 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
8246 <param name="display" type="unsigned long" dir="in"/>
8247 </method>
8248
8249 <method name="setSeamlessMode">
8250 <desc>
8251 Enables or disables seamless guest display rendering (seamless desktop
8252 integration) mode.
8253 <note>
8254 Calling this method has no effect if <link
8255 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
8256 </note>
8257 </desc>
8258 <param name="enabled" type="boolean" dir="in"/>
8259 </method>
8260
8261 <method name="takeScreenShot">
8262 <desc>
8263 Takes a screen shot of the requested size and copies it to the
8264 32-bpp buffer allocated by the caller.
8265 </desc>
8266 <param name="address" type="octet" mod="ptr" dir="in"/>
8267 <param name="width" type="unsigned long" dir="in"/>
8268 <param name="height" type="unsigned long" dir="in"/>
8269 </method>
8270
8271 <method name="drawToScreen">
8272 <desc>
8273 Draws a 32-bpp image of the specified size from the given buffer
8274 to the given point on the VM display.
8275 </desc>
8276 <param name="address" type="octet" mod="ptr" dir="in"/>
8277 <param name="x" type="unsigned long" dir="in"/>
8278 <param name="y" type="unsigned long" dir="in"/>
8279 <param name="width" type="unsigned long" dir="in"/>
8280 <param name="height" type="unsigned long" dir="in"/>
8281 </method>
8282
8283 <method name="invalidateAndUpdate">
8284 <desc>
8285 Does a full invalidation of the VM display and instructs the VM
8286 to update it.
8287 </desc>
8288 </method>
8289
8290 <method name="resizeCompleted">
8291 <desc>
8292 Signals that a framebuffer has completed the resize operation.
8293 </desc>
8294 <param name="screenId" type="unsigned long" dir="in"/>
8295 </method>
8296
8297 <method name="updateCompleted">
8298 <desc>
8299 Signals that a framebuffer has completed the update operation.
8300 </desc>
8301 </method>
8302
8303 </interface>
8304
8305 <!--
8306 // INetworkAdapter
8307 /////////////////////////////////////////////////////////////////////////
8308 -->
8309
8310 <enum
8311 name="NetworkAttachmentType"
8312 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
8313 >
8314 <desc>
8315 Network attachment type.
8316 </desc>
8317
8318 <const name="Null" value="0">
8319 <desc><tt>null</tt> value. Also means "not attached".</desc>
8320 </const>
8321 <const name="NAT" value="1"/>
8322 <const name="HostInterface" value="2"/>
8323 <const name="Internal" value="3"/>
8324 </enum>
8325
8326 <enum
8327 name="NetworkAdapterType"
8328 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
8329 >
8330 <desc>
8331 Network adapter type.
8332 </desc>
8333
8334 <const name="Null" value="0">
8335 <desc><tt>null</tt> value. Never used by the API.</desc>
8336 </const>
8337 <const name="Am79C970A" value="1"/>
8338 <const name="Am79C973" value="2"/>
8339 <const name="I82540EM" value="3"/>
8340 <const name="I82543GC" value="4"/>
8341 </enum>
8342
8343 <interface
8344 name="INetworkAdapter" extends="$unknown"
8345 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
8346 wsmap="managed"
8347 >
8348 <attribute name="adapterType" type="NetworkAdapterType">
8349 <desc>
8350 Type of the virtual network adapter. Depending on this value,
8351 VirtualBox will provide a different virtual network hardware
8352 to the guest.
8353 </desc>
8354 </attribute>
8355
8356 <attribute name="slot" type="unsigned long" readonly="yes">
8357 <desc>
8358 Slot number this adapter is plugged into. Corresponds to
8359 the value you pass to <link to="IMachine::getNetworkAdapter"/>
8360 to obtain this instance.
8361 </desc>
8362 </attribute>
8363
8364 <attribute name="enabled" type="boolean">
8365 <desc>
8366 Flag whether the network adapter is present in the
8367 guest system. If disabled, the virtual guest hardware will
8368 not contain this network adapter. Can only be changed when
8369 the VM is not running.
8370 </desc>
8371 </attribute>
8372
8373 <attribute name="MACAddress" type="wstring">
8374 <desc>
8375 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
8376 it to NULL, VirtualBox will generate a unique MAC address.
8377 </desc>
8378 </attribute>
8379
8380 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
8381
8382 <attribute name="hostInterface" type="wstring">
8383 <desc>
8384 Name of the Host Network Interface that is currently in use. NULL will be returned
8385 if no device has been allocated. On Linux, setting this refers to a permanent TAP
8386 device. However, a file descriptor has precedence over the interface name on Linux.
8387 Note that when VirtualBox allocates a TAP device, this property will not be set, i.e. the
8388 interface name would have to be determined using the file descriptor and /proc/self/fd.
8389 </desc>
8390 </attribute>
8391
8392<if target="xpidl">
8393 <attribute name="TAPFileDescriptor" type="long">
8394 <desc>
8395 File descriptor of the TAP device. It can either be setup by the caller
8396 which has to supply an existing valid file handle allocated in the parent
8397 process of the VM process or allocated by VirtualBox. The value is -1 if it
8398 has not been defined. This property is non persistent, i.e. it will not be
8399 stored in the VM's configuration data and thus has to be set at each startup.
8400 </desc>
8401 </attribute>
8402 <attribute name="TAPSetupApplication" type="wstring">
8403 <desc>
8404 Application to start to configure the TAP device.
8405 It is being passed two parameters, 1) the file handle (as ASCII),
8406 2) the TAP device name if it is available.
8407 </desc>
8408 </attribute>
8409 <attribute name="TAPTerminateApplication" type="wstring">
8410 <desc>
8411 Application to start before closing a TAP device.
8412 It is being passed two parameters, 1) the file handle (as ASCII),
8413 2) the TAP device name if it is available.
8414 </desc>
8415 </attribute>
8416</if>
8417
8418 <attribute name="internalNetwork" type="wstring">
8419 <desc>
8420 Name of the internal network the VM is attached to.
8421 </desc>
8422 </attribute>
8423
8424 <attribute name="NATNetwork" type="wstring">
8425 <desc>
8426 Name of the NAT network the VM is attached to.
8427 </desc>
8428 </attribute>
8429
8430 <attribute name="cableConnected" type="boolean">
8431 <desc>
8432 Flag whether the adapter reports the cable as connected or not.
8433 It can be used to report offline situations to a VM.
8434 </desc>
8435 </attribute>
8436
8437 <attribute name="lineSpeed" type="unsigned long">
8438 <desc>
8439 Line speed reported by custom drivers, in units of 1 kbps.
8440 </desc>
8441 </attribute>
8442
8443 <attribute name="traceEnabled" type="boolean">
8444 <desc>
8445 Flag whether network traffic from/to the network card should be traced.
8446 Can only be toggled when the VM is turned off.
8447 </desc>
8448 </attribute>
8449
8450 <attribute name="traceFile" type="wstring">
8451 <desc>
8452 Filename where a network trace will be stored. If not set, VBox-pid.pcap
8453 will be used.
8454 </desc>
8455 </attribute>
8456
8457 <method name="attachToNAT">
8458 <desc>
8459 Attach the network adapter to the Network Address Translation (NAT) interface.
8460 </desc>
8461 </method>
8462
8463 <method name="attachToHostInterface">
8464 <desc>
8465 Attach the network adapter to a host interface. On Linux, the TAP
8466 setup application will be executed if configured and unless a device
8467 name and/or file descriptor has been set, a new TAP interface will be
8468 created.
8469 </desc>
8470 </method>
8471
8472 <method name="attachToInternalNetwork">
8473 <desc>
8474 Attach the network adapter to an internal network.
8475 </desc>
8476 </method>
8477
8478 <method name="detach">
8479 <desc>
8480 Detach the network adapter
8481 </desc>
8482 </method>
8483 </interface>
8484
8485
8486 <!--
8487 // ISerialPort
8488 /////////////////////////////////////////////////////////////////////////
8489 -->
8490
8491 <enum
8492 name="PortMode"
8493 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
8494 >
8495 <desc>
8496 The PortMode enumeration represents possible communication modes for
8497 the virtual serial port device.
8498 </desc>
8499
8500 <const name="Disconnected" value="0">
8501 <desc>Virtual device is not attached to any real host device.</desc>
8502 </const>
8503 <const name="HostPipe" value="1">
8504 <desc>Virtual device is attached to a host pipe.</desc>
8505 </const>
8506 <const name="HostDevice" value="2">
8507 <desc>Virtual device is attached to a host device.</desc>
8508 </const>
8509 </enum>
8510
8511 <interface
8512 name="ISerialPort" extends="$unknown"
8513 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
8514 wsmap="managed"
8515 >
8516
8517 <desc>
8518 The ISerialPort interface represents the virtual serial port device.
8519
8520 The virtual serial port device acts like an ordinary serial port
8521 inside the virtual machine. This device communicates to the real
8522 serial port hardware in one of two modes: host pipe or host device.
8523
8524 In host pipe mode, the #path attribute specifies the path to the pipe on
8525 the host computer that represents a serial port. The #server attribute
8526 determines if this pipe is created by the virtual machine process at
8527 machine startup or it must already exist before starting machine
8528 execution.
8529
8530 In host device mode, the #path attribute specifies the name of the
8531 serial port device on the host computer.
8532
8533 There is also a third communication mode: the disconnected mode. In this
8534 mode, the guest OS running inside the virtual machine will be able to
8535 detect the serial port, but all port write operations will be discarded
8536 and all port read operations will return no data.
8537
8538 <see>IMachine::getSerialPort</see>
8539 </desc>
8540
8541 <attribute name="slot" type="unsigned long" readonly="yes">
8542 <desc>
8543 Slot number this serial port is plugged into. Corresponds to
8544 the value you pass to <link to="IMachine::getSerialPort"/>
8545 to obtain this instance.
8546 </desc>
8547 </attribute>
8548
8549 <attribute name="enabled" type="boolean">
8550 <desc>
8551 Flag whether the serial port is enabled. If disabled,
8552 the serial port will not be reported to the guest OS.
8553 </desc>
8554 </attribute>
8555
8556 <attribute name="IOBase" type="unsigned long">
8557 <desc>Base I/O address of the serial port.</desc>
8558 </attribute>
8559
8560 <attribute name="IRQ" type="unsigned long">
8561 <desc>IRQ number of the serial port.</desc>
8562 </attribute>
8563
8564 <attribute name="hostMode" type="PortMode">
8565 <desc>How is this port connected to the host.</desc>
8566 </attribute>
8567
8568 <attribute name="server" type="boolean">
8569 <desc>
8570 Flag whether this serial port acts as a server (creates a new pipe on
8571 the host) or as a client (uses the existing pipe). This attribute is
8572 used only when <link to="#hostMode"/> is PortMode::HostPipe.
8573 </desc>
8574 </attribute>
8575
8576 <attribute name="path" type="wstring">
8577 <desc>
8578 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
8579 PortMode::HostPipe, or the host serial device name when
8580 <link to="#hostMode"/> is PortMode::HostDevice. In either of the above
8581 cases, setting a @c null or an empty string as the attribute's value
8582 will result into an error. Otherwise, the value of this property is
8583 ignored.
8584 </desc>
8585 </attribute>
8586
8587 </interface>
8588
8589 <!--
8590 // IParallelPort
8591 /////////////////////////////////////////////////////////////////////////
8592 -->
8593
8594 <interface
8595 name="IParallelPort" extends="$unknown"
8596 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
8597 wsmap="managed"
8598 >
8599
8600 <desc>
8601 The IParallelPort interface represents the virtual parallel port device.
8602
8603 The virtual parallel port device acts like an ordinary parallel port
8604 inside the virtual machine. This device communicates to the real
8605 parallel port hardware using the name of the parallel device on the host
8606 computer specified in the #path attribute.
8607
8608 Each virtual parallel port device is assigned a base I/O address and an
8609 IRQ number that will be reported to the guest operating system and used
8610 to operate the given parallel port from within the virtual machine.
8611
8612 <see>IMachine::getParallelPort</see>
8613 </desc>
8614
8615 <attribute name="slot" type="unsigned long" readonly="yes">
8616 <desc>
8617 Slot number this parallel port is plugged into. Corresponds to
8618 the value you pass to <link to="IMachine::getParallelPort"/>
8619 to obtain this instance.
8620 </desc>
8621 </attribute>
8622
8623 <attribute name="enabled" type="boolean">
8624 <desc>
8625 Flag whether the parallel port is enabled. If disabled,
8626 the parallel port will not be reported to the guest OS.
8627 </desc>
8628 </attribute>
8629
8630 <attribute name="IOBase" type="unsigned long">
8631 <desc>Base I/O address of the parallel port.</desc>
8632 </attribute>
8633
8634 <attribute name="IRQ" type="unsigned long">
8635 <desc>IRQ number of the parallel port.</desc>
8636 </attribute>
8637
8638 <attribute name="path" type="wstring">
8639 <desc>
8640 Host parallel device name. If this parallel port is enabled, setting a
8641 @c null or an empty string as this attribute's value will result into
8642 an error.
8643 </desc>
8644 </attribute>
8645
8646 </interface>
8647
8648
8649 <!--
8650 // IMachineDebugger
8651 /////////////////////////////////////////////////////////////////////////
8652 -->
8653
8654 <interface
8655 name="IMachineDebugger" extends="$unknown"
8656 uuid="0de52346-938b-4020-a33b-471be542f3ff"
8657 wsmap="suppress"
8658 >
8659 <method name="resetStats">
8660 <desc>
8661 Reset VM statistics.
8662 </desc>
8663 <param name="pattern" type="wstring" dir="in">
8664 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8665 </param>
8666 </method>
8667
8668 <method name="dumpStats">
8669 <desc>
8670 Dumps VM statistics.
8671 </desc>
8672 <param name="pattern" type="wstring" dir="in">
8673 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8674 </param>
8675 </method>
8676
8677 <method name="getStats">
8678 <desc>
8679 Get the VM statistics in a XMLish format.
8680 </desc>
8681 <param name="pattern" type="wstring" dir="in">
8682 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8683 </param>
8684 <param name="withDescriptions" type="boolean" dir="in">
8685 <desc>Whether to include the descriptions.</desc>
8686 </param>
8687 <param name="stats" type="wstring" dir="out">
8688 <desc>The XML document containing the statistics.</desc>
8689 </param>
8690 </method>
8691
8692 <attribute name="singlestep" type="boolean">
8693 <desc>Switch for enabling singlestepping.</desc>
8694 </attribute>
8695
8696 <attribute name="recompileUser" type="boolean">
8697 <desc>Switch for forcing code recompilation for user mode code.</desc>
8698 </attribute>
8699
8700 <attribute name="recompileSupervisor" type="boolean">
8701 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
8702 </attribute>
8703
8704 <attribute name="PATMEnabled" type="boolean">
8705 <desc>Switch for enabling and disabling the PATM component.</desc>
8706 </attribute>
8707
8708 <attribute name="CSAMEnabled" type="boolean">
8709 <desc>Switch for enabling and disabling the CSAM component.</desc>
8710 </attribute>
8711
8712 <attribute name="logEnabled" type="boolean">
8713 <desc>Switch for enabling and disabling logging.</desc>
8714 </attribute>
8715
8716 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
8717 <desc>
8718 Flag indicating whether the VM is currently making use of CPU hardware
8719 virtualization extensions.
8720 </desc>
8721 </attribute>
8722
8723 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
8724 <desc>
8725 Flag indicating whether the VM is currently making use of the nested paging
8726 CPU hardware virtualization extension.
8727 </desc>
8728 </attribute>
8729
8730 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
8731 <desc>
8732 Flag indicating whether the VM is currently making use of the VPID
8733 VT-x extension.
8734 </desc>
8735 </attribute>
8736
8737 <attribute name="PAEEnabled" type="boolean" readonly="yes">
8738 <desc>
8739 Flag indicating whether the VM is currently making use of the Physical
8740 Address Extension CPU feature.
8741 </desc>
8742 </attribute>
8743
8744 <attribute name="virtualTimeRate" type="unsigned long">
8745 <desc>
8746 The rate at which the virtual time runs expressed as a percentage.
8747 The accepted range is 2% to 20000%.
8748 </desc>
8749 </attribute>
8750
8751 <!-- @todo method for setting log flags, groups and destination! -->
8752
8753 <attribute name="VM" type="unsigned long long" readonly="yes">
8754 <desc>
8755 Gets the VM handle. This is only for internal use while
8756 we carve the details of this interface.
8757 </desc>
8758 </attribute>
8759
8760 </interface>
8761
8762 <!--
8763 // IUSBController
8764 /////////////////////////////////////////////////////////////////////////
8765 -->
8766
8767 <interface
8768 name="IUSBController" extends="$unknown"
8769 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
8770 wsmap="managed"
8771 >
8772 <attribute name="enabled" type="boolean">
8773 <desc>
8774 Flag whether the USB controller is present in the
8775 guest system. If disabled, the virtual guest hardware will
8776 not contain any USB controller. Can only be changed when
8777 the VM is powered off.
8778 </desc>
8779 </attribute>
8780
8781 <attribute name="enabledEhci" type="boolean">
8782 <desc>
8783 Flag whether the USB EHCI controller is present in the
8784 guest system. If disabled, the virtual guest hardware will
8785 not contain a USB EHCI controller. Can only be changed when
8786 the VM is powered off.
8787 </desc>
8788 </attribute>
8789
8790 <attribute name="USBStandard" type="unsigned short" readonly="yes">
8791 <desc>
8792 USB standard version which the controller implements.
8793 This is a BCD which means that the major version is in the
8794 high byte and minor version is in the low byte.
8795 </desc>
8796 </attribute>
8797
8798 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
8799 <desc>
8800 List of USB device filters associated with the machine.
8801
8802 If the machine is currently running, these filters are activated
8803 every time a new (supported) USB device is attached to the host
8804 computer that was not ignored by global filters
8805 (<link to="IHost::USBDeviceFilters"/>).
8806
8807 These filters are also activated when the machine is powered up.
8808 They are run against a list of all currently available USB
8809 devices (in states
8810 <link to="USBDeviceState::Available">Available</link>,
8811 <link to="USBDeviceState::Busy">Busy</link>,
8812 <link to="USBDeviceState::Held">Held</link>) that were not previously
8813 ignored by global filters.
8814
8815 If at least one filter matches the USB device in question, this
8816 device is automatically captured (attached to) the virtual USB
8817 controller of this machine.
8818
8819 <see>IUSBDeviceFilter, ::IUSBController</see>
8820 </desc>
8821 </attribute>
8822
8823 <method name="createDeviceFilter">
8824 <desc>
8825 Creates a new USB device filter. All attributes except
8826 the filter name are set to <tt>null</tt> (any match),
8827 <i>active</i> is <tt>false</tt> (the filter is not active).
8828
8829 The created filter can then be added to the list of filters using
8830 <link to="#insertDeviceFilter()"/>.
8831
8832 <see>#deviceFilters</see>
8833 </desc>
8834 <param name="name" type="wstring" dir="in">
8835 <desc>
8836 Filter name. See <link to="IUSBDeviceFilter::name"/>
8837 for more info.
8838 </desc>
8839 </param>
8840 <param name="filter" type="IUSBDeviceFilter" dir="return">
8841 <desc>Created filter object.</desc>
8842 </param>
8843 </method>
8844
8845 <method name="insertDeviceFilter">
8846 <desc>
8847 Inserts the given USB device to the specified position
8848 in the list of filters.
8849
8850 Positions are numbered starting from <tt>0</tt>. If the specified
8851 position is equal to or greater than the number of elements in
8852 the list, the filter is added to the end of the collection.
8853
8854 <note>
8855 Duplicates are not allowed, so an attempt to insert a
8856 filter that is already in the collection, will return an
8857 error.
8858 </note>
8859
8860 <see>#deviceFilters</see>
8861 </desc>
8862 <param name="position" type="unsigned long" dir="in">
8863 <desc>Position to insert the filter to.</desc>
8864 </param>
8865 <param name="filter" type="IUSBDeviceFilter" dir="in">
8866 <desc>USB device filter to insert.</desc>
8867 </param>
8868 </method>
8869
8870 <method name="removeDeviceFilter">
8871 <desc>
8872 Removes a USB device filter from the specified position in the
8873 list of filters.
8874
8875 Positions are numbered starting from <tt>0</tt>. Specifying a
8876 position equal to or greater than the number of elements in
8877 the list will produce an error.
8878
8879 <see>#deviceFilters</see>
8880 </desc>
8881 <param name="position" type="unsigned long" dir="in">
8882 <desc>Position to remove the filter from.</desc>
8883 </param>
8884 <param name="filter" type="IUSBDeviceFilter" dir="return">
8885 <desc>Removed USB device filter.</desc>
8886 </param>
8887 </method>
8888
8889 </interface>
8890
8891
8892 <!--
8893 // IUSBDevice
8894 /////////////////////////////////////////////////////////////////////////
8895 -->
8896
8897 <enumerator
8898 name="IUSBDeviceEnumerator" type="IUSBDevice"
8899 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
8900 />
8901
8902 <collection
8903 name="IUSBDeviceCollection" type="IUSBDevice"
8904 enumerator="IUSBDeviceEnumerator"
8905 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
8906 readonly="yes"
8907 >
8908 <method name="findById">
8909 <desc>
8910 Searches this collection for a USB device with the given UUID.
8911 <note>
8912 The method returns an error if the given UUID does not
8913 correspond to any USB device in the collection.
8914 </note>
8915 <see>IUSBDevice::id</see>
8916 </desc>
8917 <param name="id" type="uuid" dir="in">
8918 <desc>UUID of the USB device to search for.</desc>
8919 </param>
8920 <param name="device" type="IUSBDevice" dir="return">
8921 <desc>Found USB device object.</desc>
8922 </param>
8923 </method>
8924
8925 <method name="findByAddress">
8926 <desc>
8927 Searches this collection for a USB device with the given
8928 host address.
8929 <note>
8930 The method returns an error if the given address does not
8931 correspond to any USB device in the collection.
8932 </note>
8933 <see>IUSBDevice::address</see>
8934 </desc>
8935 <param name="name" type="wstring" dir="in">
8936 <desc>
8937 Address of the USB device (as assigned by the host) to
8938 search for.
8939 </desc>
8940 </param>
8941 <param name="device" type="IUSBDevice" dir="return">
8942 <desc>Found USB device object.</desc>
8943 </param>
8944 </method>
8945
8946 </collection>
8947
8948 <interface
8949 name="IUSBDevice" extends="$unknown"
8950 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
8951 wsmap="managed"
8952 >
8953 <desc>
8954 The IUSBDevice interface represents a virtual USB device attached to the
8955 virtual machine.
8956
8957 A collection of objects implementing this interface is stored in the
8958 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
8959 attached to a running virtual machine's USB controller.
8960 </desc>
8961
8962 <attribute name="id" type="uuid" readonly="yes">
8963 <desc>
8964 Unique USB device ID. This ID is built from #vendorId,
8965 #productId, #revision and #serialNumber.
8966 </desc>
8967 </attribute>
8968
8969 <attribute name="vendorId" type="unsigned short" readonly="yes">
8970 <desc>Vendor ID.</desc>
8971 </attribute>
8972
8973 <attribute name="productId" type="unsigned short" readonly="yes">
8974 <desc>Product ID.</desc>
8975 </attribute>
8976
8977 <attribute name="revision" type="unsigned short" readonly="yes">
8978 <desc>
8979 Product revision number. This is a packed BCD represented as
8980 unsigned short. The high byte is the integer part and the low
8981 byte is the decimal.
8982 </desc>
8983 </attribute>
8984
8985 <attribute name="manufacturer" type="wstring" readonly="yes">
8986 <desc>Manufacturer string.</desc>
8987 </attribute>
8988
8989 <attribute name="product" type="wstring" readonly="yes">
8990 <desc>Product string.</desc>
8991 </attribute>
8992
8993 <attribute name="serialNumber" type="wstring" readonly="yes">
8994 <desc>Serial number string.</desc>
8995 </attribute>
8996
8997 <attribute name="address" type="wstring" readonly="yes">
8998 <desc>Host specific address of the device.</desc>
8999 </attribute>
9000
9001 <attribute name="port" type="unsigned short" readonly="yes">
9002 <desc>
9003 Host USB port number the device is physically
9004 coonected to.
9005 </desc>
9006 </attribute>
9007
9008 <attribute name="version" type="unsigned short" readonly="yes">
9009 <desc>
9010 The major USB version of the device - 1 or 2.
9011 </desc>
9012 </attribute>
9013
9014 <attribute name="portVersion" type="unsigned short" readonly="yes">
9015 <desc>
9016 The major USB version of the host USB port the device is
9017 physically connected to - 1 or 2. For devices not connected to
9018 anything this will have the same value as the version attribute.
9019 </desc>
9020 </attribute>
9021
9022 <attribute name="remote" type="boolean" readonly="yes">
9023 <desc>
9024 Whether the device is physically connected to a remote VRDP
9025 client or to a local host machine.
9026 </desc>
9027 </attribute>
9028
9029 </interface>
9030
9031
9032 <!--
9033 // IUSBDeviceFilter
9034 /////////////////////////////////////////////////////////////////////////
9035 -->
9036
9037 <enumerator
9038 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
9039 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
9040 />
9041
9042 <collection
9043 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
9044 enumerator="IUSBDeviceFilterEnumerator"
9045 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
9046 readonly="yes"
9047 />
9048
9049 <interface
9050 name="IUSBDeviceFilter" extends="$unknown"
9051 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
9052 wsmap="managed"
9053 >
9054 <desc>
9055 The IUSBDeviceFilter interface represents an USB device filter used
9056 to perform actions on a group of USB devices.
9057
9058 This type of filters is used by running virtual machines to
9059 automatically capture selected USB devices once they are physically
9060 attached to the host computer.
9061
9062 A USB device is matched to the given device filter if and only if all
9063 attributes of the device match the corresponding attributes of the
9064 filter (that is, attributes are joined together using the logical AND
9065 operation). On the other hand, all together, filters in the list of
9066 filters carry the semantics of the logical OR operation. So if it is
9067 desirable to create a match like "this vendor id OR this product id",
9068 one needs to create two filters and specify "any match" (see below)
9069 for unused attributes.
9070
9071 All filter attributes used for matching are strings. Each string
9072 is an expression representing a set of values of the corresponding
9073 device attribute, that will match the given filter. Currently, the
9074 following filtering expressions are supported:
9075
9076 <ul>
9077 <li><i>Interval filters</i>. Used to specify valid intervals for
9078 integer device attributes (Vendor ID, Product ID and Revision).
9079 The format of the string is:
9080
9081 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
9082
9083 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
9084 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
9085 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
9086 is omitted before a dash (<tt>-</tt>), the minimum possible integer
9087 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
9088 possible integer is assumed.
9089 </li>
9090 <li><i>Boolean filters</i>. Used to specify acceptable values for
9091 boolean device attributes. The format of the string is:
9092
9093 <tt>true|false|yes|no|0|1</tt>
9094
9095 </li>
9096 <li><i>Exact match</i>. Used to specify a single value for the given
9097 device attribute. Any string that does't start with <tt>int:</tt>
9098 represents the exact match. String device attributes are compared to
9099 this string including case of symbols. Integer attributes are first
9100 converted to a string (see individual filter attributes) and then
9101 compared ignoring case.
9102
9103 </li>
9104 <li><i>Any match</i>. Any value of the corresponding device attribute
9105 will match the given filter. An empty or <tt>null</tt> string is
9106 used to construct this type of filtering expressions.
9107
9108 </li>
9109 </ul>
9110
9111 <note>
9112 On the Windows host platform, interval filters are not currently
9113 available. Also all string filter attributes
9114 (<link to="#manufacturer"/>, <link to="#product"/>,
9115 <link to="#serialNumber"/>) are ignored, so they behave as
9116 <i>any match</i> no matter what string expression is specified.
9117 </note>
9118
9119 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
9120 </desc>
9121
9122 <attribute name="name" type="wstring">
9123 <desc>
9124 Visible name for this filter.
9125 This name is used to visually distinguish one filter from another,
9126 so it can neither be <tt>null</tt> nor an empty string.
9127 </desc>
9128 </attribute>
9129
9130 <attribute name="active" type="boolean">
9131 <desc>Whether this filter active or has been temporarily disabled.</desc>
9132 </attribute>
9133
9134 <attribute name="vendorId" type="wstring">
9135 <desc>
9136 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
9137 The string representation for the <i>exact matching</i>
9138 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9139 (including leading zeroes).
9140 </desc>
9141 </attribute>
9142
9143 <attribute name="productId" type="wstring">
9144 <desc>
9145 <link to="IUSBDevice::productId">Product ID</link> filter.
9146 The string representation for the <i>exact matching</i>
9147 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9148 (including leading zeroes).
9149 </desc>
9150 </attribute>
9151
9152 <attribute name="revision" type="wstring">
9153 <desc>
9154 <link to="IUSBDevice::productId">Product revision number</link>
9155 filter. The string representation for the <i>exact matching</i>
9156 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
9157 of the integer part of the revision, and <tt>F</tt> is the
9158 decimal digit of its fractional part (including leading and
9159 trailing zeros).
9160 Note that for interval filters, it's best to use the hexadecimal
9161 form, because the revision is stored as a 16 bit packed BCD value;
9162 so the expression <tt>int:0x0100-0x0199</tt> will match any
9163 revision from <tt>1.0</tt> to <tt>1.99</tt>.
9164 </desc>
9165 </attribute>
9166
9167 <attribute name="manufacturer" type="wstring">
9168 <desc>
9169 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
9170 </desc>
9171 </attribute>
9172
9173 <attribute name="product" type="wstring">
9174 <desc>
9175 <link to="IUSBDevice::product">Product</link> filter.
9176 </desc>
9177 </attribute>
9178
9179 <attribute name="serialNumber" type="wstring">
9180 <desc>
9181 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
9182 </desc>
9183 </attribute>
9184
9185 <attribute name="port" type="wstring">
9186 <desc>
9187 <link to="IUSBDevice::port">Host USB port</link> filter.
9188 </desc>
9189 </attribute>
9190
9191 <attribute name="remote" type="wstring">
9192 <desc>
9193 <link to="IUSBDevice::remote">Remote state</link> filter.
9194 <note>
9195 This filter makes sense only for machine USB filters,
9196 i.e. it is ignored by IHostUSBDeviceFilter objects.
9197 </note>
9198 </desc>
9199 </attribute>
9200
9201 <attribute name="maskedInterfaces" type="unsigned long">
9202 <desc>
9203 This is an advanced option for hiding one or more USB interfaces
9204 from the guest. The value is a bitmask where the bits that are set
9205 means the corresponding USB interface should be hidden, masked off
9206 if you like.
9207 This feature only works on Linux hosts.
9208 </desc>
9209 </attribute>
9210
9211 </interface>
9212
9213
9214 <!--
9215 // IHostUSBDevice
9216 /////////////////////////////////////////////////////////////////////////
9217 -->
9218
9219 <enum
9220 name="USBDeviceState"
9221 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
9222 >
9223 <desc>
9224 USB device state. This enumeration represents all possible states
9225 of the USB device physically attached to the host computer regarding
9226 its state on the host computer and availability to guest computers
9227 (all currently running virtual machines).
9228
9229 Once a supported USB device is attached to the host, global USB
9230 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
9231 either ignore the device, or put ot to #Held state, or do nothing. Unless
9232 the device is ignored by global filters, filters of all currently running
9233 guests (<link to="IUSBController::deviceFilters"/>) are activated that can
9234 put it to #Captured state.
9235
9236 If the device was ignored by global filters, or didn't match
9237 any filters at all (including guest ones), it is handled by the host
9238 in a normal way. In this case, the device state is determined by
9239 the host and can be one of #Unavailable, #Busy or #Available, depending on
9240 the current device usage.
9241
9242 Besides auto-capturing based on filters, the device can be manually
9243 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
9244 state is #Busy, #Available or #Held.
9245
9246 <note>
9247 Due to differences in USB stack implementations in Linux and Win32,
9248 states #Busy and #Available are applicable only to the Linux version of
9249 the product. This also means that (<link
9250 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if
9251 the device state is #Held.
9252 </note>
9253
9254 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
9255 </desc>
9256
9257 <const name="NotSupported" value="0">
9258 <desc>
9259 Not supported by the VirtualBox server, not available to guests.
9260 </desc>
9261 </const>
9262 <const name="Unavailable" value="1">
9263 <desc>
9264 Being used by the host computer exclusively,
9265 not available to guests.
9266 </desc>
9267 </const>
9268 <const name="Busy" value="2">
9269 <desc>
9270 Being used by the host computer, potentially available to guests.
9271 </desc>
9272 </const>
9273 <const name="Available" value="3">
9274 <desc>
9275 Not used by the host computer, available to guests.
9276 The host computer can also start using the device at any time.
9277 </desc>
9278 </const>
9279 <const name="Held" value="4">
9280 <desc>
9281 Held by the VirtualBox server (ignored by the host computer),
9282 available to guests.
9283 </desc>
9284 </const>
9285 <const name="Captured" value="5">
9286 <desc>
9287 Captured by one of the guest computers, not available
9288 to anybody else.
9289 </desc>
9290 </const>
9291 </enum>
9292
9293 <enumerator
9294 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
9295 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
9296 />
9297
9298 <collection
9299 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
9300 enumerator="IHostUSBDeviceEnumerator"
9301 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
9302 readonly="yes"
9303 >
9304 <method name="findById">
9305 <desc>
9306 Searches this collection for a USB device with the given UUID.
9307 <note>
9308 The method returns an error if the given UUID does not
9309 correspond to any USB device in the collection.
9310 </note>
9311 <see>IHostUSBDevice::id</see>
9312 </desc>
9313 <param name="id" type="uuid" dir="in">
9314 <desc>UUID of the USB device to search for.</desc>
9315 </param>
9316 <param name="device" type="IHostUSBDevice" dir="return">
9317 <desc>Found USB device object.</desc>
9318 </param>
9319 </method>
9320
9321 <method name="findByAddress">
9322 <desc>
9323 Searches this collection for a USB device with the given
9324 host address.
9325 <note>
9326 The method returns an error if the given address does not
9327 correspond to any USB device in the collection.
9328 </note>
9329 <see>IHostUSBDevice::address</see>
9330 </desc>
9331 <param name="name" type="wstring" dir="in">
9332 <desc>
9333 Address of the USB device (as assigned by the host) to
9334 search for.
9335 </desc>
9336 </param>
9337 <param name="device" type="IHostUSBDevice" dir="return">
9338 <desc>Found USB device object.</desc>
9339 </param>
9340 </method>
9341
9342 </collection>
9343
9344 <interface
9345 name="IHostUSBDevice" extends="IUSBDevice"
9346 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
9347 wsmap="managed"
9348 >
9349 <desc>
9350 The IHostUSBDevice interface represents a physical USB device attached
9351 to the host computer.
9352
9353 Besides properties inherited from IUSBDevice, this interface adds the
9354 <link to="#state"/> property that holds the current state of the USB
9355 device.
9356
9357 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
9358 </desc>
9359
9360 <attribute name="state" type="USBDeviceState" readonly="yes">
9361 <desc>
9362 Current state of the device.
9363 </desc>
9364 </attribute>
9365
9366 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
9367
9368 </interface>
9369
9370
9371 <!--
9372 // IHostUSBDeviceFilter
9373 /////////////////////////////////////////////////////////////////////////
9374 -->
9375
9376 <enum
9377 name="USBDeviceFilterAction"
9378 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
9379 >
9380 <desc>
9381 Actions for host USB device filters.
9382 <see>IHostUSBDeviceFilter, USBDeviceState</see>
9383 </desc>
9384
9385 <const name="Null" value="0">
9386 <desc><tt>null</tt> value. Never used by the API.</desc>
9387 </const>
9388 <const name="Ignore" value="1">
9389 <desc>Ignore the matched USB device.</desc>
9390 </const>
9391 <const name="Hold" value="2">
9392 <desc>Hold the matched USB device.</desc>
9393 </const>
9394 </enum>
9395
9396 <enumerator
9397 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
9398 uuid="ff735211-903e-4642-9c37-189eb44579fe"
9399 />
9400
9401 <collection
9402 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
9403 enumerator="IHostUSBDeviceFilterEnumerator"
9404 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
9405 readonly="yes"
9406 />
9407
9408 <interface
9409 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
9410 uuid="4cc70246-d74a-400f-8222-3900489c0374"
9411 wsmap="managed"
9412 >
9413 <desc>
9414 The IHostUSBDeviceFilter interface represents a global filter for a
9415 physical USB device used by the host computer. Used indirectly in
9416 <link to="IHost::USBDeviceFilters"/>.
9417
9418 Using filters of this type, the host computer determines the initial
9419 state of the USB device after it is physically attached to the
9420 host's USB controller.
9421
9422 <note>
9423 The <link to="#remote"/> attribute is ignored by this type of
9424 filters, because it makes sense only for
9425 <link to="IUSBController::deviceFilters">machine USB filters</link>.
9426 </note>
9427
9428 <see>IHost::USBDeviceFilters</see>
9429 </desc>
9430
9431 <attribute name="action" type="USBDeviceFilterAction">
9432 <desc>
9433 Action performed by the host when an attached USB device
9434 matches this filter.
9435 </desc>
9436 </attribute>
9437
9438 </interface>
9439
9440 <!--
9441 // IAudioAdapter
9442 /////////////////////////////////////////////////////////////////////////
9443 -->
9444
9445 <enum
9446 name="AudioDriverType"
9447 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
9448 >
9449 <desc>
9450 Host audio driver type.
9451 </desc>
9452
9453 <const name="Null" value="0">
9454 <desc><tt>null</tt> value. Also means "dummy audio driver".</desc>
9455 </const>
9456 <const name="WinMM" value="1"/>
9457 <const name="OSS" value="2"/>
9458 <const name="ALSA" value="3"/>
9459 <const name="DirectSound" value="4"/>
9460 <const name="CoreAudio" value="5"/>
9461 <const name="MMPM" value="6"/>
9462 <const name="Pulse" value="7"/>
9463 <const name="SolAudio" value="8"/>
9464 </enum>
9465
9466 <enum
9467 name="AudioControllerType"
9468 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
9469 >
9470 <desc>
9471 Virtual audio controller type.
9472 </desc>
9473
9474 <const name="AC97" value="0"/>
9475 <const name="SB16" value="1"/>
9476 </enum>
9477
9478 <interface
9479 name="IAudioAdapter" extends="$unknown"
9480 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
9481 wsmap="managed"
9482 >
9483 <desc>
9484 The IAudioAdapter interface represents the virtual audio adapter of
9485 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
9486 </desc>
9487 <attribute name="enabled" type="boolean">
9488 <desc>
9489 Flag whether the audio adapter is present in the
9490 guest system. If disabled, the virtual guest hardware will
9491 not contain any audio adapter. Can only be changed when
9492 the VM is not running.
9493 </desc>
9494 </attribute>
9495 <attribute name="audioController" type="AudioControllerType">
9496 <desc>
9497 The audio hardware we emulate.
9498 </desc>
9499 </attribute>
9500 <attribute name="audioDriver" type="AudioDriverType">
9501 <desc>
9502 Audio driver the adapter is connected to. This setting
9503 can only be changed when the VM is not running.
9504 </desc>
9505 </attribute>
9506 </interface>
9507
9508 <!--
9509 // IVRDPServer
9510 /////////////////////////////////////////////////////////////////////////
9511 -->
9512
9513 <enum
9514 name="VRDPAuthType"
9515 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
9516 >
9517 <desc>
9518 VRDP authentication type.
9519 </desc>
9520
9521 <const name="Null" value="0">
9522 <desc><tt>null</tt> value. Also means "no authentication".</desc>
9523 </const>
9524 <const name="External" value="1"/>
9525 <const name="Guest" value="2"/>
9526 </enum>
9527
9528 <interface
9529 name="IVRDPServer" extends="$unknown"
9530 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
9531 wsmap="managed"
9532 >
9533 <attribute name="enabled" type="boolean">
9534 <desc>VRDP server status.</desc>
9535 </attribute>
9536
9537 <attribute name="port" type="unsigned long">
9538 <desc>
9539 VRDP server port number.
9540 <note>
9541 Setting the value of this property to <tt>0</tt> will reset the port
9542 number to the default value which is
9543 currently <tt>3389</tt>. Reading this property will always return a
9544 real port number, even after it has been set to <tt>0</tt> (in which
9545 case the default port is returned).
9546 </note>
9547 </desc>
9548 </attribute>
9549
9550 <attribute name="netAddress" type="wstring">
9551 <desc>VRDP server address.</desc>
9552 </attribute>
9553
9554 <attribute name="authType" type="VRDPAuthType">
9555 <desc>VRDP authentication method.</desc>
9556 </attribute>
9557
9558 <attribute name="authTimeout" type="unsigned long">
9559 <desc>Timeout for guest authentication. Milliseconds.</desc>
9560 </attribute>
9561
9562 <attribute name="allowMultiConnection" type="boolean">
9563 <desc>
9564 Flag whether multiple simultaneous connections to the VM are permitted.
9565 Note that this will be replaced by a more powerful mechanism in the future.
9566 </desc>
9567 </attribute>
9568
9569 <attribute name="reuseSingleConnection" type="boolean">
9570 <desc>
9571 Flag whether the existing connection must be dropped and a new connection
9572 must be established by the VRDP server, when a new client connects in single
9573 connection mode.
9574 </desc>
9575 </attribute>
9576
9577 </interface>
9578
9579
9580 <!--
9581 // ISharedFolder
9582 /////////////////////////////////////////////////////////////////////////
9583 -->
9584
9585 <enumerator
9586 name="ISharedFolderEnumerator" type="ISharedFolder"
9587 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
9588 />
9589
9590 <collection
9591 name="ISharedFolderCollection" type="ISharedFolder"
9592 enumerator="ISharedFolderEnumerator"
9593 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
9594 readonly="yes">
9595
9596 <method name="findByName">
9597 <desc>
9598 Searches this collection for a shared folder with the given logical
9599 name.
9600 <note>
9601 The method returns an error if the given name does not correspond to
9602 any shared folder in the collection.
9603 </note>
9604 </desc>
9605 <param name="name" type="wstring" dir="in">
9606 <desc>Logical name of the shared folder to search for</desc>
9607 </param>
9608 <param name="sharedFolder" type="ISharedFolder" dir="return">
9609 <desc>Found shared folder object</desc>
9610 </param>
9611 </method>
9612
9613 </collection>
9614
9615 <interface
9616 name="ISharedFolder" extends="$unknown"
9617 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
9618 wsmap="struct"
9619 >
9620 <desc>
9621 The ISharedFolder interface represents a folder in the host computer's
9622 file system accessible from the guest OS running inside a virtual
9623 machine using an associated logical name.
9624
9625 There are three types of shared folders:
9626 <ul>
9627 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
9628 folders available to all virtual machines.</li>
9629 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
9630 VM-specific shared folders available to the given virtual machine at
9631 startup.</li>
9632 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
9633 VM-specific shared folders created in the session context (for
9634 example, when the virtual machine is running) and automatically
9635 discarded when the session is closed (the VM is powered off).</li>
9636 </ul>
9637
9638 Logical names of shared folders must be unique within the given scope
9639 (global, permanent or transient). However, they do not need to be unique
9640 across scopes. In this case, the definition of the shared folder in a
9641 more specific scope takes precedence over definitions in all other
9642 scopes. The order of precedence is (more specific to more general):
9643 <ol>
9644 <li>Transient definitions</li>
9645 <li>Permanent definitions</li>
9646 <li>Global definitions</li>
9647 </ol>
9648
9649 For example, if MyMachine has a shared folder named
9650 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
9651 transient shared folder named <tt>C_DRIVE</tt> (that points
9652 to <tt>C:\\\\WINDOWS</tt>) will change the definition
9653 of <tt>C_DRIVE</tt> in the guest OS so
9654 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
9655 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
9656 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
9657 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
9658 to <tt>C:\\</tt> if it still exists.
9659
9660 Note that permanent and transient shared folders of different machines
9661 are in different name spaces, so they don't overlap and don't need to
9662 have unique logical names.
9663
9664 <note>
9665 Global shared folders are not implemented in the current version of the
9666 product.
9667 </note>
9668 </desc>
9669
9670 <attribute name="name" type="wstring" readonly="yes">
9671 <desc>Logical name of the shared folder.</desc>
9672 </attribute>
9673
9674 <attribute name="hostPath" type="wstring" readonly="yes">
9675 <desc>Full path to the shared folder in the host file system.</desc>
9676 </attribute>
9677
9678 <attribute name="accessible" type="boolean" readonly="yes">
9679 <desc>
9680 Whether the folder defined by the host path is currently
9681 accessible or not.
9682 For example, the folder can be unaccessible if it is placed
9683 on the network share that is not available by the time
9684 this property is read.
9685 </desc>
9686 </attribute>
9687
9688 <attribute name="writable" type="boolean" readonly="yes">
9689 <desc>
9690 Whether the folder defined by the host path is writable or
9691 not.
9692 </desc>
9693 </attribute>
9694
9695 </interface>
9696
9697 <!--
9698 // ISession
9699 /////////////////////////////////////////////////////////////////////////
9700 -->
9701
9702 <interface
9703 name="IInternalSessionControl" extends="$unknown"
9704 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
9705 internal="yes"
9706 wsmap="suppress"
9707 >
9708 <method name="getPID">
9709 <desc>PID of the process that has created this Session object.
9710 </desc>
9711 <param name="pid" type="unsigned long" dir="return"/>
9712 </method>
9713
9714 <method name="getRemoteConsole">
9715 <desc>Returns the console object suitable for remote control.</desc>
9716 <param name="console" type="IConsole" dir="return"/>
9717 </method>
9718
9719 <method name="assignMachine">
9720 <desc>
9721 Assigns the machine object associated with this direct-type
9722 session or informs the session that it will be a remote one
9723 (if machine = NULL).
9724 </desc>
9725 <param name="machine" type="IMachine" dir="in"/>
9726 </method>
9727
9728 <method name="assignRemoteMachine">
9729 <desc>
9730 Assigns the machine and the (remote) console object associated with
9731 this remote-type session.
9732 </desc>
9733 <param name="machine" type="IMachine" dir="in"/>
9734 <param name="console" type="IConsole" dir="in"/>
9735 </method>
9736
9737 <method name="updateMachineState">
9738 <desc>
9739 Updates the machine state in the VM process.
9740 Must be called only in certain cases
9741 (see the method implementation).
9742 </desc>
9743 <param name="aMachineState" type="MachineState" dir="in"/>
9744 </method>
9745
9746 <method name="uninitialize">
9747 <desc>
9748 Uninitializes (closes) this session. Used by VirtualBox to close
9749 the corresponding remote session when the direct session dies
9750 or gets closed.
9751 </desc>
9752 </method>
9753
9754 <method name="onDVDDriveChange">
9755 <desc>
9756 Triggered when settings of the DVD drive object of the
9757 associated virtual machine have changed.
9758 </desc>
9759 </method>
9760
9761 <method name="onFloppyDriveChange">
9762 <desc>
9763 Triggered when settings of the floppy drive object of the
9764 associated virtual machine have changed.
9765 </desc>
9766 </method>
9767
9768 <method name="onNetworkAdapterChange">
9769 <desc>
9770 Triggered when settings of a network adapter of the
9771 associated virtual machine have changed.
9772 </desc>
9773 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
9774 </method>
9775
9776 <method name="onSerialPortChange">
9777 <desc>
9778 Triggered when settions of a serial port of the
9779 associated virtual machine have changed.
9780 </desc>
9781 <param name="serialPort" type="ISerialPort" dir="in"/>
9782 </method>
9783
9784 <method name="onParallelPortChange">
9785 <desc>
9786 Triggered when settings of a parallel port of the
9787 associated virtual machine have changed.
9788 </desc>
9789 <param name="parallelPort" type="IParallelPort" dir="in"/>
9790 </method>
9791
9792 <method name="onVRDPServerChange">
9793 <desc>
9794 Triggered when settings of the VRDP server object of the
9795 associated virtual machine have changed.
9796 </desc>
9797 </method>
9798
9799 <method name="onUSBControllerChange">
9800 <desc>
9801 Triggered when settings of the USB controller object of the
9802 associated virtual machine have changed.
9803 </desc>
9804 </method>
9805
9806 <method name="onSharedFolderChange">
9807 <desc>
9808 Triggered when a permanent (global or machine) shared folder has been
9809 created or removed.
9810 <note>
9811 We don't pass shared folder parameters in this notification because
9812 the order in which parallel notifications are delivered is not defined,
9813 therefore it could happen that these parameters were outdated by the
9814 time of processing this notification.
9815 </note>
9816 </desc>
9817 <param name="global" type="boolean" dir="in"/>
9818 </method>
9819
9820 <method name="onUSBDeviceAttach">
9821 <desc>
9822 Triggered when a request to capture a USB device (as a result
9823 of matched USB filters or direct call to
9824 <link to="IConsole::attachUSBDevice"/>) has completed.
9825 A @c null @a error object means success, otherwise it
9826 describes a failure.
9827 </desc>
9828 <param name="device" type="IUSBDevice" dir="in"/>
9829 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
9830 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
9831 </method>
9832
9833 <method name="onUSBDeviceDetach">
9834 <desc>
9835 Triggered when a request to release the USB device (as a result
9836 of machine termination or direct call to
9837 <link to="IConsole::detachUSBDevice"/>) has completed.
9838 A @c null @a error object means success, otherwise it
9839 </desc>
9840 <param name="id" type="uuid" dir="in"/>
9841 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
9842 </method>
9843
9844 <method name="onShowWindow">
9845 <desc>
9846 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
9847 <link to="IMachine::showConsoleWindow()"/> in order to notify
9848 console callbacks
9849 <link to="IConsoleCallback::onCanShowWindow()"/>
9850 and <link to="IConsoleCallback::onShowWindow()"/>.
9851 </desc>
9852 <param name="check" type="boolean" dir="in"/>
9853 <param name="canShow" type="boolean" dir="out"/>
9854 <param name="winId" type="unsigned long long" dir="out"/>
9855 </method>
9856
9857 <method name="accessGuestProperty">
9858 <desc>
9859 Called by <link to="IMachine::getGuestProperty()"/> and by
9860 <link to="IMachine::setGuestProperty()"/> in order to read and
9861 modify guest properties.
9862 </desc>
9863 <param name="name" type="wstring" dir="in"/>
9864 <param name="value" type="wstring" dir="in"/>
9865 <param name="flags" type="wstring" dir="in"/>
9866 <param name="isSetter" type="boolean" dir="in"/>
9867 <param name="retValue" type="wstring" dir="out"/>
9868 <param name="retTimestamp" type="unsigned long long" dir="out"/>
9869 <param name="retFlags" type="wstring" dir="out"/>
9870 </method>
9871
9872 <method name="enumerateGuestProperties">
9873 <desc>
9874 Return a list of the guest properties matching a set of patterns along
9875 with their values, timestamps and flags.
9876 </desc>
9877 <param name="patterns" type="wstring" dir="in">
9878 <desc>
9879 The patterns to match the properties against as a comma-separated
9880 string. If this is empty, all properties currently set will be
9881 returned.
9882 </desc>
9883 </param>
9884 <param name="key" type="wstring" dir="out" safearray="yes">
9885 <desc>
9886 The key names of the properties returned.
9887 </desc>
9888 </param>
9889 <param name="value" type="wstring" dir="out" safearray="yes">
9890 <desc>
9891 The values of the properties returned. The array entries match the
9892 corresponding entries in the @a key array.
9893 </desc>
9894 </param>
9895 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
9896 <desc>
9897 The timestamps of the properties returned. The array entries match
9898 the corresponding entries in the @a key array.
9899 </desc>
9900 </param>
9901 <param name="flags" type="wstring" dir="out" safearray="yes">
9902 <desc>
9903 The flags of the properties returned. The array entries match the
9904 corresponding entries in the @a key array.
9905 </desc>
9906 </param>
9907 </method>
9908
9909 </interface>
9910
9911 <interface
9912 name="ISession" extends="$dispatched"
9913 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
9914 wsmap="managed"
9915 >
9916 <desc>
9917 The ISession interface represents a serialization primitive for virtual
9918 machines.
9919
9920 With VirtualBox, every time one wishes to manipulate a virtual machine
9921 (e.g. change its settings or start execution), a session object is
9922 required. Such an object must be passed to one of the session methods
9923 that open the given session, which then initiates the machine manipulation.
9924
9925 A session serves several purposes: it identifies to the inter-process VirtualBox
9926 code which process is currently working with the virtual machine, and it ensures
9927 that there are no incompatible requests from several processes for the
9928 same virtual machine. Session objects can therefore be thought of as mutex
9929 semaphores that lock virtual machines to prevent conflicting accesses from
9930 several processes.
9931
9932 How sessions objects are used depends on whether you use the Main API
9933 via COM or via the webservice:
9934
9935 <ul>
9936 <li>When using the COM API directly, an object of the Session class from the
9937 VirtualBox type library needs to be created. In regular COM C++ client code,
9938 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
9939 This object will then act as a local session object in further calls to open
9940 a session.
9941 </li>
9942
9943 <li>In the webservice, the session manager (IWebsessionManager) instead creates
9944 one session object automatically when <link to="IWebsessionManager::logon" />
9945 is called. A managed object reference to that session object can be retrieved by
9946 calling <link to="IWebsessionManager::getSessionObject" />. This session object
9947 reference can then be used to open sessions.
9948 </li>
9949 </ul>
9950
9951 Sessions are mainly used in two variations:
9952
9953 <ul>
9954 <li>
9955 To start a virtual machine in a separate process, one would call
9956 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
9957 object as its first parameter. This session then identifies the caller
9958 and lets him control the started machine (for example, pause machine
9959 execution or power it down) as well as be notified about machine
9960 execution state changes.
9961 </li>
9962
9963 <li>To alter machine settings, or to start machine execution within the
9964 current process, one needs to open a direct session for the machine first by
9965 calling <link to="IVirtualBox::openSession"/>. While a direct session
9966 is open within one process, no any other process may open another direct
9967 session for the same machine. This prevents the machine from being changed
9968 by other processes while it is running or while the machine is being configured.
9969 </li>
9970 </ul>
9971
9972 One also can attach to an existing direct session already opened by
9973 another process (for example, in order to send a control request to the
9974 virtual machine such as the pause or the reset request). This is done by
9975 calling <link to="IVirtualBox::openExistingSession"/>.
9976
9977 <note>
9978 Unless you are trying to write a new VirtualBox front-end that
9979 performs direct machine execution (like the VirtualBox or VBoxSDL
9980 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
9981 session opened by <link to="IVirtualBox::openSession"/> and use this
9982 session only to change virtual machine settings. If you simply want to
9983 start virtual machine execution using one of the existing front-ends
9984 (for example the VirtualBox GUI or headless server), simply use
9985 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
9986 will power up the machine automatically for you.
9987 </note>
9988 </desc>
9989
9990 <attribute name="state" type="SessionState" readonly="yes">
9991 <desc>Current state of this session.</desc>
9992 </attribute>
9993
9994 <attribute name="type" type="SessionType" readonly="yes">
9995 <desc>
9996 Type of this session. The value of this attribute is valid only
9997 if the session is currently open (i.e. its #state is SessionType::SessionOpen),
9998 otherwise an error will be returned.
9999 </desc>
10000 </attribute>
10001
10002 <attribute name="machine" type="IMachine" readonly="yes">
10003 <desc>Machine object associated with this session.</desc>
10004 </attribute>
10005
10006 <attribute name="console" type="IConsole" readonly="yes">
10007 <desc>Console object associated with this session.</desc>
10008 </attribute>
10009
10010 <method name="close">
10011 <desc>
10012 Closes a session that was previously opened.
10013
10014 It is recommended that every time an "open session" method (such as
10015 <link to="IVirtualBox::openRemoteSession" /> or
10016 <link to="IVirtualBox::openSession" />) has been called to
10017 manipulate a virtual machine, the caller invoke
10018 ISession::close() when it's done doing so. Since sessions are
10019 serialization primitives much like ordinary mutexes, they are
10020 best used the same way: for each "open" call, there should be
10021 a matching "close" call, even when errors occur.
10022
10023 Otherwise, if a direct session for a machine opened with
10024 <link to="IVirtualBox::openSession()"/> is not explicitly closed
10025 when the application terminates, the state of the machine will
10026 be set to <link to="MachineState::Aborted" /> on the server.
10027
10028 Generally, it is recommended to close all open sessions explicitly
10029 before terminating the application (no matter what is the reason of
10030 the termination).
10031
10032 <note>
10033 Do not expect the session state (<link to="ISession::state" />
10034 to return to "Closed" immediately after you invoke
10035 ISession::close(), particularly if you have started a remote
10036 session to execute the VM in a new process. The session state will
10037 automatically return to "Closed" once the VM is no longer executing,
10038 which can of course take a very long time.
10039 </note>
10040 </desc>
10041 </method>
10042
10043 </interface>
10044
10045 <!--
10046 // ISATAController
10047 /////////////////////////////////////////////////////////////////////////
10048 -->
10049
10050 <interface
10051 name="ISATAController" extends="$unknown"
10052 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
10053 wsmap="managed"
10054 >
10055 <attribute name="enabled" type="boolean">
10056 <desc>
10057 Flag whether the SATA controller is present in the
10058 guest system. If disabled, the virtual guest hardware will
10059 not contain any SATA controller. Can only be changed when
10060 the VM is powered off.
10061 </desc>
10062 </attribute>
10063
10064 <attribute name="portCount" type="unsigned long">
10065 <desc>
10066 The number of usable ports on the SATA controller.
10067 It ranges from 1 to 30.
10068 </desc>
10069 </attribute>
10070
10071 <method name="GetIDEEmulationPort">
10072 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc>
10073 <param name="devicePosition" type="long" dir="in"/>
10074 <param name="portNumber" type="long" dir="return"/>
10075 </method>
10076
10077 <method name="SetIDEEmulationPort">
10078 <desc>Sets the port number which is emulated as an IDE device.</desc>
10079 <param name="devicePosition" type="long" dir="in"/>
10080 <param name="portNumber" type="long" dir="in"/>
10081 </method>
10082
10083 </interface>
10084
10085<if target="wsdl">
10086
10087 <!--
10088 // IManagedObjectRef
10089 /////////////////////////////////////////////////////////////////////////
10090 -->
10091
10092 <interface
10093 name="IManagedObjectRef" extends="$unknown"
10094 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
10095 internal="yes"
10096 wsmap="managed"
10097 wscpp="hardcoded"
10098 >
10099 <desc>
10100 Managed object reference.
10101
10102 Only within the webservice, a managed object reference (which is really
10103 an opaque number) allows a webservice client to address an object
10104 that lives in the address space of the webservice server.
10105
10106 Behind each managed object reference, there is a COM object that lives
10107 in the webservice server's address space. The COM object is not freed
10108 until the managed object reference is released, either by an explicit
10109 call to <link to="IManagedObjectRef::release" /> or by logging off from
10110 the webservice (<link to="IWebsessionManager::logoff" />), which releases
10111 all objects created during the webservice session.
10112
10113 Whenever a method call of the VirtualBox API returns a COM object, the
10114 webservice representation of that method will instead return a
10115 managed object reference, which can then be used to invoke methods
10116 on that object.
10117 </desc>
10118
10119 <method name="getInterfaceName">
10120 <desc>
10121 Returns the name of the interface that this managed object represents,
10122 for example, "IMachine", as a string.
10123 </desc>
10124 <param name="return" type="wstring" dir="return"/>
10125 </method>
10126
10127 <method name="release">
10128 <desc>
10129 Releases this managed object reference and frees the resources that
10130 were allocated for it in the webservice server process. After calling
10131 this method, the identifier of the reference can no longer be used.
10132 </desc>
10133 </method>
10134
10135 </interface>
10136
10137 <!--
10138 // IWebsessionManager
10139 /////////////////////////////////////////////////////////////////////////
10140 -->
10141
10142 <interface
10143 name="IWebsessionManager" extends="$unknown"
10144 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
10145 internal="yes"
10146 wsmap="global"
10147 wscpp="hardcoded"
10148 >
10149 <desc>
10150 Websession manager. This provides essential services
10151 to webservice clients.
10152 </desc>
10153 <method name="logon">
10154 <desc>
10155 Logs a new client onto the webservice and returns a managed object reference to
10156 the IVirtualBox instance, which the client can then use as a basis to further
10157 queries, since all calls to the VirtualBox API are based on the IVirtualBox
10158 interface, in one way or the other.
10159 </desc>
10160 <param name="username" type="wstring" dir="in"/>
10161 <param name="password" type="wstring" dir="in"/>
10162 <param name="return" type="IVirtualBox" dir="return"/>
10163 </method>
10164
10165 <method name="getSessionObject">
10166 <desc>
10167 Returns a managed object reference to the internal ISession object that was created
10168 for this web service session when the client logged on.
10169
10170 <see>ISession</see>
10171 </desc>
10172 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10173 <param name="return" type="ISession" dir="return"/>
10174 </method>
10175
10176 <method name="logoff">
10177 <desc>
10178 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
10179 and destroys all resources associated with the session (most importantly, all
10180 managed objects created in the server while the session was active).
10181 </desc>
10182 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10183 </method>
10184
10185 </interface>
10186
10187</if>
10188
10189 <!--
10190 // IPerformanceCollector & friends
10191 /////////////////////////////////////////////////////////////////////////
10192 -->
10193
10194 <interface
10195 name="IPerformanceMetric" extends="$unknown"
10196 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
10197 >
10198 <desc>
10199 The IPerformanceMetric interface represents parameters of the given
10200 performance metric.
10201 </desc>
10202
10203 <attribute name="metricName" type="wstring" readonly="yes">
10204 <desc>
10205 Name of the metric.
10206 </desc>
10207 </attribute>
10208
10209 <attribute name="object" type="$unknown" readonly="yes">
10210 <desc>
10211 Object this metric belongs to.
10212 </desc>
10213 </attribute>
10214
10215 <attribute name="description" type="wstring" readonly="yes">
10216 <desc>
10217 Textual description of the metric.
10218 </desc>
10219 </attribute>
10220
10221 <attribute name="period" type="unsigned long" readonly="yes">
10222 <desc>
10223 Time interval between samples, measured in seconds.
10224 </desc>
10225 </attribute>
10226
10227 <attribute name="count" type="unsigned long" readonly="yes">
10228 <desc>
10229 Number of recent samples retained by the performance collector for this
10230 metric.
10231
10232 When the collected sample count exceeds this number, older samples
10233 are discarded.
10234 </desc>
10235 </attribute>
10236
10237 <attribute name="unit" type="wstring" readonly="yes">
10238 <desc>
10239 Unit of measurement.
10240 </desc>
10241 </attribute>
10242
10243 <attribute name="minimumValue" type="long" readonly="yes">
10244 <desc>
10245 Minimum possible value of this metric.
10246 </desc>
10247 </attribute>
10248
10249 <attribute name="maximumValue" type="long" readonly="yes">
10250 <desc>
10251 Maximum possible value of this metric.
10252 </desc>
10253 </attribute>
10254 </interface>
10255
10256 <interface
10257 name="IPerformanceCollector" extends="$unknown"
10258 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
10259 wsmap="managed"
10260 >
10261 <desc>
10262 The IPerformanceCollector interface represents a service that collects and
10263 stores performance metrics data.
10264
10265 Performance metrics are associated with objects like IHost and
10266 IMachine. Each object has a distinct set of performance metrics.
10267 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
10268
10269 Metric data are collected at the specified intervals and are retained
10270 internally. The interval and the number of samples retained can be set
10271 with <link to="IPerformanceCollector::setupMetrics" />.
10272
10273 Metrics are organized hierarchically, each level separated by slash (/).
10274 General scheme for metric name is
10275 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
10276 metric name stands for: CPU category, Load metric, User submetric, average
10277 aggregate. An aggregate function is computed over all retained data. Valid
10278 aggregate functions are:
10279
10280 <ul>
10281 <li>avg -- average</li>
10282 <li>min -- minimum</li>
10283 <li>max -- maximum</li>
10284 </ul>
10285
10286 "Category/Metric" together form base metric name. A base metric is the
10287 smallest unit for which a sampling interval and the number of retained
10288 samples can be set. Only base metrics can be enabled and disabled. All
10289 sub-metrics are collected when their base metric is collected.
10290 Collected values for any set of sub-metrics can be queried with
10291 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
10292 metric parameters, querying metric data, enabling or disabling metrics
10293 wildcards can be used in metric names to specify a subset of metrics. For
10294 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
10295 averages can be queried using <tt>*:avg</tt> and so on. To query metric
10296 values without aggregates <tt>*:</tt> can be used.
10297
10298 The valid names for base metrics are:
10299
10300 <ul>
10301 <li>CPU/Load</li>
10302 <li>CPU/MHz</li>
10303 <li>RAM/Usage</li>
10304 </ul>
10305
10306 The general sequence for collecting and retrieving the metrics is:
10307 <ul>
10308 <li>
10309 Obtain an instance of IPerfromanceCollector with
10310 <link to="IVirtualBox::performanceCollector" />
10311 </li>
10312 <li>
10313 Allocate and populate an array with references to objects the metrics
10314 will be collected for. Use references to IHost and IMachine objects.
10315 </li>
10316 <li>
10317 Allocate and populate an array with base metric names the data will be
10318 collected for.
10319 </li>
10320 <li>
10321 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
10322 metric data will be collected and stored.
10323 </li>
10324 <li>
10325 Wait for the data to get collected.
10326 </li>
10327 <li>
10328 Allocate and populate an array with references to objects the metric
10329 values will be queried for. You can re-use the object array used for
10330 setting base metrics.
10331 </li>
10332 <li>
10333 Allocate and populate an array with metric names the data will be
10334 collected for. Note that metric names differ from base metric names.
10335 </li>
10336 <li>
10337 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
10338 have been collected so far are returned. Note that the values are still
10339 retained internally and data collection continues.
10340 </li>
10341 </ul>
10342
10343 For an example of usage refer to the following files in VirtualBox SDK:
10344 <ul>
10345 <li>
10346 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
10347 </li>
10348 <li>
10349 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
10350 </li>
10351 </ul>
10352 </desc>
10353
10354 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
10355 <desc>
10356 Array of unique names of metrics.
10357
10358 This array represents all metrics supported by the performance
10359 collector. Individual objects do not necessarily support all of them.
10360 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
10361 list of supported metrics for a particular object.
10362 </desc>
10363 </attribute>
10364
10365 <method name="getMetrics">
10366 <desc>
10367 Returns parameters of specified metrics for a set of objects.
10368 <note>
10369 @c Null metrics array means all metrics. @c Null object array means
10370 all existing objects.
10371 </note>
10372 </desc>
10373 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10374 <desc>
10375 Metric name filter. Currently, only a comma-separated list of metrics
10376 is supported.
10377 </desc>
10378 </param>
10379 <param name="objects" type="$unknown" dir="in" safearray="yes">
10380 <desc>
10381 Set of objects to return metric parameters for.
10382 </desc>
10383 </param>
10384 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
10385 <desc>
10386 Array of returned metric parameters.
10387 </desc>
10388 </param>
10389 </method>
10390
10391 <method name="setupMetrics">
10392 <desc>
10393 Sets parameters of specified base metrics for a set of objects. Returns
10394 an array of <link to="IPerformanceMetric" /> describing the metrics have
10395 been affected.
10396 <note>
10397 @c Null or empty metric name array means all metrics. @c Null or empty
10398 object array means all existing objects. If metric name array contains
10399 a single element and object array contains many, the single metric
10400 name array element is applied to each object array element to form
10401 metric/object pairs.
10402 </note>
10403 </desc>
10404 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10405 <desc>
10406 Metric name filter. Comma-separated list of metrics with wildcard
10407 support.
10408 </desc>
10409 </param>
10410 <param name="objects" type="$unknown" dir="in" safearray="yes">
10411 <desc>
10412 Set of objects to setup metric parameters for.
10413 </desc>
10414 </param>
10415 <param name="period" type="unsigned long" dir="in">
10416 <desc>
10417 Time interval in seconds between two consecutive samples of performance
10418 data.
10419 </desc>
10420 </param>
10421 <param name="count" type="unsigned long" dir="in">
10422 <desc>
10423 Number of samples to retain in performance data history. Older samples
10424 get discarded.
10425 </desc>
10426 </param>
10427 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10428 <desc>
10429 Array of metrics that have been modified by the call to this method.
10430 </desc>
10431 </param>
10432 </method>
10433
10434 <method name="enableMetrics">
10435 <desc>
10436 Turns on collecting specified base metrics. Returns an array of
10437 <link to="IPerformanceMetric" /> describing the metrics have been
10438 affected.
10439 <note>
10440 @c Null or empty metric name array means all metrics. @c Null or empty
10441 object array means all existing objects. If metric name array contains
10442 a single element and object array contains many, the single metric
10443 name array element is applied to each object array element to form
10444 metric/object pairs.
10445 </note>
10446 </desc>
10447 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10448 <desc>
10449 Metric name filter. Comma-separated list of metrics with wildcard
10450 support.
10451 </desc>
10452 </param>
10453 <param name="objects" type="$unknown" dir="in" safearray="yes">
10454 <desc>
10455 Set of objects to enable metrics for.
10456 </desc>
10457 </param>
10458 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10459 <desc>
10460 Array of metrics that have been modified by the call to this method.
10461 </desc>
10462 </param>
10463 </method>
10464
10465 <method name="disableMetrics">
10466 <desc>
10467 Turns off collecting specified base metrics. Returns an array of
10468 <link to="IPerformanceMetric" /> describing the metrics have been
10469 affected.
10470 <note>
10471 @c Null or empty metric name array means all metrics. @c Null or empty
10472 object array means all existing objects. If metric name array contains
10473 a single element and object array contains many, the single metric
10474 name array element is applied to each object array element to form
10475 metric/object pairs.
10476 </note>
10477 </desc>
10478 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10479 <desc>
10480 Metric name filter. Comma-separated list of metrics with wildcard
10481 support.
10482 </desc>
10483 </param>
10484 <param name="objects" type="$unknown" dir="in" safearray="yes">
10485 <desc>
10486 Set of objects to disable metrics for.
10487 </desc>
10488 </param>
10489 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10490 <desc>
10491 Array of metrics that have been modified by the call to this method.
10492 </desc>
10493 </param>
10494 </method>
10495
10496 <method name="queryMetricsData">
10497 <desc>
10498 Queries collected metrics data for a set of objects.
10499
10500 The data itself and related metric information are returned in seven
10501 parallel and one flattened array of arrays. Elements of
10502 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
10503 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
10504 the same index describe one set of values corresponding to a single
10505 metric.
10506
10507 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
10508 start and length of a sub-array is indicated by
10509 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
10510 value for metric <tt>metricNames[i]</tt> is at
10511 <tt>returnData[returnIndices[i]]</tt>.
10512
10513 <note>
10514 @c Null or empty metric name array means all metrics. @c Null or empty
10515 object array means all existing objects. If metric name array contains
10516 a single element and object array contains many, the single metric
10517 name array element is applied to each object array element to form
10518 metric/object pairs.
10519 </note>
10520 <note>
10521 Data collection continues behind the scenes after call to @c
10522 queryMetricsData. The return data can be seen as the snapshot of
10523 the current state at the time of @c queryMetricsData call. The
10524 internally kept metric values are not cleared by the call. This makes
10525 possible querying different subsets of metrics or aggregates with
10526 subsequent calls. If periodic querying is needed it is highly
10527 suggested to query the values with @c interval*count period to avoid
10528 confusion. This way a completely new set of data values will be
10529 provided by each query.
10530 </note>
10531 </desc>
10532 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10533 <desc>
10534 Metric name filter. Comma-separated list of metrics with wildcard
10535 support.
10536 </desc>
10537 </param>
10538 <param name="objects" type="$unknown" dir="in" safearray="yes">
10539 <desc>
10540 Set of objects to query metrics for.
10541 </desc>
10542 </param>
10543 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
10544 <desc>
10545 Names of metrics returned in @c returnData.
10546 </desc>
10547 </param>
10548 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
10549 <desc>
10550 Objects associated with metrics returned in @c returnData.
10551 </desc>
10552 </param>
10553 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
10554 <desc>
10555 Units of measurement for each returned metric.
10556 </desc>
10557 </param>
10558 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
10559 <desc>
10560 Divisor that should be applied to return values in order to get
10561 floating point values. For example:
10562 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
10563 will retrieve the floating point value of i-th sample of the first
10564 metric.
10565 </desc>
10566 </param>
10567 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
10568 <desc>
10569 Sequence numbers of the first elements of value sequences of particular metrics
10570 returned in @c returnData. For aggregate metrics it is the sequence number of
10571 the sample the aggregate started calculation from.
10572 </desc>
10573 </param>
10574 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
10575 <desc>
10576 Indices of the first elements of value sequences of particular metrics
10577 returned in @c returnData.
10578 </desc>
10579 </param>
10580 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
10581 <desc>
10582 Lengths of value sequences of particular metrics.
10583 </desc>
10584 </param>
10585 <param name="returnData" type="long" dir="return" safearray="yes">
10586 <desc>
10587 Flattened array of all metric data containing sequences of values for
10588 each metric.
10589 </desc>
10590 </param>
10591 </method>
10592
10593 </interface>
10594
10595 <module name="VBoxSVC" context="LocalServer">
10596 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
10597 namespace="virtualbox.org">
10598 <interface name="IVirtualBox" default="yes"/>
10599 </class>
10600 </module>
10601
10602 <module name="VBoxC" context="InprocServer" threadingModel="Free">
10603 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
10604 namespace="virtualbox.org">
10605 <interface name="ISession" default="yes"/>
10606 </class>
10607 </module>
10608
10609</library>
10610
10611</idl>
Note: See TracBrowser for help on using the repository browser.

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