VirtualBox

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

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

Added Accelerate3D xml setting and IMachine property.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 392.2 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 13962 2008-11-07 14:53:32Z 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="a744b229-3457-422f-8550-649c40346c55"
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="Accelerate3DEnabled" type="boolean" default="false">
2743 <desc>
2744 This setting determines whether VirtualBox allows guests make use
2745 of the 3D graphics support available on the host. Currently limited
2746 to OpenGL only. </desc>
2747 </attribute>
2748
2749 <attribute name="MonitorCount" type="unsigned long">
2750 <desc>
2751 Number of virtual monitors.
2752 <note>
2753 Only effective on Windows XP and later guests with
2754 Guest Additions installed.
2755 </note>
2756 </desc>
2757 </attribute>
2758
2759 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
2760 <desc>Object containing all BIOS settings.</desc>
2761 </attribute>
2762
2763 <attribute name="HWVirtExEnabled" type="TSBool">
2764 <desc>
2765 This setting determines whether VirtualBox will try to make use of
2766 the host CPU's hardware virtualization extensions such as Intel VT-x
2767 and AMD-V. Note that in case such extensions are not available,
2768 they will not be used.
2769 </desc>
2770 </attribute>
2771
2772 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
2773 <desc>
2774 This setting determines whether VirtualBox will try to make use of
2775 the nested paging extension of Intel VT-x and AMD-V. Note that in case
2776 such extensions are not available, they will not be used.
2777 </desc>
2778 </attribute>
2779
2780 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
2781 <desc>
2782 This setting determines whether VirtualBox will try to make use of
2783 the VPID extension of Intel VT-x. Note that in case such extensions are
2784 not available, they will not be used.
2785 </desc>
2786 </attribute>
2787
2788 <attribute name="PAEEnabled" type="boolean" default="false">
2789 <desc>
2790 This setting determines whether VirtualBox will expose the Physical Address
2791 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
2792 is not available, it will not be reported.
2793 </desc>
2794 </attribute>
2795
2796 <attribute name="snapshotFolder" type="wstring">
2797 <desc>
2798 Full path to the directory used to store snapshot data
2799 (differencing hard disks and saved state files) of this machine.
2800
2801 The initial value of this property is
2802 <tt>&lt;</tt><link to="#settingsFilePath">
2803 path_to_settings_file</link><tt>&gt;/&lt;</tt>
2804 <link to="#id">machine_uuid</link>
2805 <tt>&gt;</tt>.
2806
2807 Currently, it is an error to try to change this property on
2808 a machine that has snapshots (because this would require to
2809 move possibly large files to a different location).
2810 A separate method will be available for this purpose later.
2811
2812 <note>
2813 Setting this property to <tt>null</tt> will restore the
2814 initial value.
2815 </note>
2816 <note>
2817 When setting this property, the specified path can be
2818 absolute (full path) or relative to the directory where the
2819 <link to="#settingsFilePath">machine settings file</link>
2820 is located. When reading this property, a full path is
2821 always returned.
2822 </note>
2823 <note>
2824 The specified path may not exist, it will be created
2825 when necessary.
2826 </note>
2827 </desc>
2828 </attribute>
2829
2830 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
2831 <desc>VRDP server object.</desc>
2832 </attribute>
2833
2834 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
2835 <desc>Array of hard disks attached to this machine.</desc>
2836 </attribute>
2837
2838 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
2839 <desc>Associated DVD drive object.</desc>
2840 </attribute>
2841
2842 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
2843 <desc>Associated floppy drive object.</desc>
2844 </attribute>
2845
2846 <attribute name="USBController" type="IUSBController" readonly="yes">
2847 <desc>
2848 Associated USB controller object.
2849
2850 <note>
2851 This method may set a @ref com_warnings "warning result code".
2852 </note>
2853 <note>
2854 If USB functionality is not available in the given edition of
2855 VirtualBox, this method will set the result code to @c E_NOTIMPL.
2856 </note>
2857 </desc>
2858 </attribute>
2859
2860 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
2861 <desc>Associated audio adapter, always present.</desc>
2862 </attribute>
2863
2864 <attribute name="SATAController" type="ISATAController" readonly="yes">
2865 <desc>
2866 Associated SATA controller object.
2867 </desc>
2868 </attribute>
2869
2870 <attribute name="settingsFilePath" type="wstring" readonly="yes">
2871 <desc>
2872 Full name of the file containing machine settings data.
2873 </desc>
2874 </attribute>
2875
2876 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
2877 <desc>
2878 Current version of the format of the settings file of this machine
2879 (<link to="#settingsFilePath"/>).
2880
2881 The version string has the following format:
2882 <pre>
2883 x.y-platform
2884 </pre>
2885 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
2886 versions, and <tt>platform</tt> is the platform identifier.
2887
2888 The current version usually matches the value of the
2889 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
2890 settings file was created by an older version of VirtualBox and there
2891 was a change of the settings file format since then.
2892
2893 Note that VirtualBox automatically converts settings files from older
2894 versions to the most recent version when reading them (usually at
2895 VirtualBox startup) but it doesn't save the changes back until
2896 you call a method that implicitly saves settings (such as
2897 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
2898 explicitly. Therefore, if the value of this attribute differs from the
2899 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
2900 means that the settings file was converted but the result of the
2901 conversion is not yet saved to disk.
2902
2903 The above feature may be used by interactive front-ends to inform users
2904 about the settings file format change and offer them to explicitly save
2905 all converted settings files (the global and VM-specific ones),
2906 optionally create backup copies of the old settings files before saving,
2907 etc.
2908
2909 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
2910 </desc>
2911 </attribute>
2912
2913 <attribute name="settingsModified" type="boolean" readonly="yes">
2914 <desc>
2915 Whether the settings of this machine have been modified
2916 (but neither yet saved nor discarded).
2917 <note>
2918 Reading this property is only valid on instances returned
2919 by <link to="ISession::machine"/> and on new machines
2920 created by <link to="IVirtualBox::createMachine"/> or opened
2921 by <link to="IVirtualBox::openMachine"/> but not
2922 yet registered, or on unregistered machines after calling
2923 <link to="IVirtualBox::unregisterMachine"/>. For all other
2924 cases, the settings can never be modified.
2925 </note>
2926 <note>
2927 For newly created unregistered machines, the value of this
2928 property is always TRUE until <link to="#saveSettings()"/>
2929 is called (no matter if any machine settings have been
2930 changed after the creation or not). For opened machines
2931 the value is set to FALSE (and then follows to normal rules).
2932 </note>
2933 </desc>
2934 </attribute>
2935
2936 <attribute name="sessionState" type="SessionState" readonly="yes">
2937 <desc>Current session state for this machine.</desc>
2938 </attribute>
2939
2940 <attribute name="sessionType" type="wstring" readonly="yes">
2941 <desc>
2942 Type of the session. If <link to="#sessionState"/> is
2943 SessionSpawning or SessionOpen, this attribute contains the
2944 same value as passed to the
2945 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
2946 type parameter. If the session was opened directly using
2947 <link to="IVirtualBox::openSession()"/>, or if
2948 <link to="#sessionState"/> is SessionClosed, the value of this
2949 attribute is @c null.
2950 </desc>
2951 </attribute>
2952
2953 <attribute name="sessionPid" type="unsigned long" readonly="yes">
2954 <desc>
2955 Identifier of the session process. This attribute contains the
2956 platform-dependent identifier of the process that has opened a
2957 direct session for this machine using the
2958 <link to="IVirtualBox::openSession()"/> call. The returned value
2959 is only valid if <link to="#sessionState"/> is SessionOpen or
2960 SessionClosing (i.e. a session is currently open or being
2961 closed) by the time this property is read.
2962 </desc>
2963 </attribute>
2964
2965 <attribute name="state" type="MachineState" readonly="yes">
2966 <desc>Current execution state of this machine.</desc>
2967 </attribute>
2968
2969 <attribute name="lastStateChange" type="long long" readonly="yes">
2970 <desc>
2971 Time stamp of the last execution state change,
2972 in milliseconds since 1970-01-01 UTC.
2973 </desc>
2974 </attribute>
2975
2976 <attribute name="stateFilePath" type="wstring" readonly="yes">
2977 <desc>
2978 Full path to the file that stores the execution state of
2979 the machine when it is in the <link to="MachineState::Saved"/>
2980 state.
2981 <note>
2982 When the machine is not in the Saved state, this attribute
2983 <tt>null</tt>.
2984 </note>
2985 </desc>
2986 </attribute>
2987
2988 <attribute name="logFolder" type="wstring" readonly="yes">
2989 <desc>
2990 Full path to the folder that stores a set of rotated log files
2991 recorded during machine execution. The most recent log file is
2992 named <tt>VBox.log</tt>, the previous log file is
2993 named <tt>VBox.log.1</tt> and so on (upto <tt>VBox.log.3</tt>
2994 in the current version).
2995 </desc>
2996 </attribute>
2997
2998 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
2999 <desc>
3000 Current snapshot of this machine.
3001 <note>
3002 A <tt>null</tt> object is returned if the machine doesn't
3003 have snapshots.
3004 </note>
3005 <see><link to="ISnapshot"/></see>
3006 </desc>
3007 </attribute>
3008
3009 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3010 <desc>
3011 Number of snapshots taken on this machine. Zero means the
3012 machine doesn't have any snapshots.
3013 </desc>
3014 </attribute>
3015
3016 <attribute name="currentStateModified" type="boolean" readonly="yes">
3017 <desc>
3018 Returns <tt>true</tt> if the current state of the machine is not
3019 identical to the state stored in the current snapshot.
3020
3021 The current state is identical to the current snapshot right
3022 after one of the following calls are made:
3023 <ul>
3024 <li><link to="IConsole::discardCurrentState"/> or
3025 <link to="IConsole::discardCurrentSnapshotAndState"/>
3026 </li>
3027 <li><link to="IConsole::takeSnapshot"/> (issued on a
3028 powered off or saved machine, for which
3029 <link to="#settingsModified"/> returns <tt>false</tt>)
3030 </li>
3031 <li><link to="IMachine::setCurrentSnapshot"/>
3032 </li>
3033 </ul>
3034
3035 The current state remains identical until one of the following
3036 happens:
3037 <ul>
3038 <li>settings of the machine are changed</li>
3039 <li>the saved state is discarded</li>
3040 <li>the current snapshot is discarded</li>
3041 <li>an attempt to execute the machine is made</li>
3042 </ul>
3043
3044 <note>
3045 For machines that don't have snapshots, this property is
3046 always <tt>false</tt>.
3047 </note>
3048 </desc>
3049 </attribute>
3050
3051 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3052 <desc>
3053 Collection of shared folders for this machine (permanent shared
3054 folders). These folders are shared automatically at machine startup
3055 and available only to the guest OS installed within this machine.
3056
3057 New shared folders are added to the collection using
3058 <link to="#createSharedFolder"/>. Existing shared folders can be
3059 removed using <link to="#removeSharedFolder"/>.
3060 </desc>
3061 </attribute>
3062
3063 <attribute name="clipboardMode" type="ClipboardMode">
3064 <desc>
3065 Synchronization mode between the host OS clipboard
3066 and the guest OS clipboard.
3067 </desc>
3068 </attribute>
3069
3070 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3071 <desc>
3072 A comma-separated list of simple glob patterns. Changes to guest
3073 properties whose name matches one of the patterns will generate an
3074 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3075 </desc>
3076 </attribute>
3077
3078 <method name="setBootOrder">
3079 <desc>
3080 Puts the given device to the specified position in
3081 the boot order.
3082
3083 To indicate that no device is associated with the given position,
3084 <link to="DeviceType::Null"/> should be used.
3085
3086 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3087 </desc>
3088 <param name="position" type="unsigned long" dir="in">
3089 <desc>
3090 Position in the boot order (<tt>1</tt> to the total number of
3091 devices the machine can boot from, as returned by
3092 <link to="ISystemProperties::maxBootPosition"/>).
3093 </desc>
3094 </param>
3095 <param name="device" type="DeviceType" dir="in">
3096 <desc>
3097 The type of the device used to boot at the given position.
3098 </desc>
3099 </param>
3100 </method>
3101
3102 <method name="getBootOrder" const="yes">
3103 <desc>
3104 Returns the device type that occupies the specified
3105 position in the boot order.
3106
3107 @todo [remove?]
3108 If the machine can have more than one device of the returned type
3109 (such as hard disks), then a separate method should be used to
3110 retrieve the individual device that occupies the given position.
3111
3112 If here are no devices at the given position, then
3113 <link to="DeviceType::Null"/> is returned.
3114
3115 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3116 </desc>
3117 <param name="order" type="unsigned long" dir="in">
3118 <desc>
3119 Position in the boot order (<tt>1</tt> to the total number of
3120 devices the machine can boot from, as returned by
3121 <link to="ISystemProperties::maxBootPosition"/>).
3122 </desc>
3123 </param>
3124 <param name="device" type="DeviceType" dir="return">
3125 <desc>
3126 Device at the given position.
3127 </desc>
3128 </param>
3129 </method>
3130
3131 <method name="attachHardDisk2">
3132 <desc>
3133 Attaches a virtual hard disk identified by the given UUID to a device
3134 slot of the specified bus.
3135
3136 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3137 specify the primary or secondary IDE controller, respectively. The
3138 SATA bus supports 30 channels, so this parameter can be a number in
3139 range from @c 0 to @c 29.
3140
3141 For the primary controller of the IDE bus, the @a device number can be
3142 either @c 0 or @c 1, to specify the master or the slave device,
3143 respectively. For the scondary IDE controller, the device number is
3144 always @c 1 because the master device is reserved for the CD-ROM drive.
3145
3146 For the SATA bus, the @a device parameter is not currently used and
3147 must always be @c 0.
3148
3149 The specified device slot must not have another disk attached to it, or
3150 this method will fail.
3151
3152 See <link to="IHardDisk2"/> for more detailed information about
3153 attaching hard disks.
3154
3155 <note>
3156 You cannot attach a hard disk to a running machine. Also, you cannot
3157 attach a hard disk to a newly created machine until this machine's
3158 settings are saved to disk using <link to="#saveSettings()"/>.
3159 </note>
3160 <note>
3161 If the hard disk is being attached indirectly, a new differencing hard
3162 disk will be implicitly created for it and attached instead. If the
3163 changes made to the machine settings (icluding this indirect
3164 attachment) are later cancelled using <link to="#discardSettings()"/>,
3165 this implicitly created diffrerencing hard disk will be implicitly
3166 deleted.
3167 </note>
3168 </desc>
3169 <param name="id" type="uuid" dir="in">
3170 <desc>UUID of the hard disk to attach.</desc>
3171 </param>
3172 <param name="bus" type="StorageBus" dir="in">
3173 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3174 </param>
3175 <param name="channel" type="long" dir="in">
3176 <desc>Channel to attach the hard disk to.</desc>
3177 </param>
3178 <param name="device" type="long" dir="in">
3179 <desc>
3180 Device slot in the given channel to attach the hard disk to.
3181 </desc>
3182 </param>
3183 </method>
3184
3185 <method name="getHardDisk2" const="yes">
3186 <desc>
3187 Returns the virtual hard disk attached to a device slot of the specified
3188 bus.
3189
3190 Note that if the hard disk was indirectly attached by
3191 <link to="#attachHardDisk2()"/> to the given device slot then this
3192 method will return not the same object as passed to the
3193 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3194 more detailed information about attaching hard disks.
3195 </desc>
3196 <param name="bus" type="StorageBus" dir="in">
3197 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3198 </param>
3199 <param name="channel" type="long" dir="in">
3200 <desc>Channel to query.</desc>
3201 </param>
3202 <param name="device" type="long" dir="in">
3203 <desc>Device slot in the given channel to query.</desc>
3204 </param>
3205 <param name="hardDisk" type="IHardDisk2" dir="return">
3206 <desc>Attached hard disk object.</desc>
3207 </param>
3208 </method>
3209
3210 <method name="detachHardDisk2">
3211 <desc>
3212 Detaches the virtual hard disk attached to a device slot of the
3213 specified bus.
3214
3215 Detaching the hard disk from the virtual machine is deferred. This means
3216 that the hard disk remains associated with the machine when this methor
3217 returns and gets actually de-associated only after a successful
3218 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3219 for more detailed information about attaching hard disks.
3220
3221 <note>
3222 You cannot detach the hard disk from a running machine.
3223 </note>
3224 <note>
3225 Detaching differencing hard disks implicitly created by <link
3226 to="#attachHardDisk2()"/> for the indirect attachment using this
3227 method will <b>not</b> implicitly delete them. The
3228 <link to="IHardDisk2::deleteStorage()"/> operation should be
3229 explicitly performed by the caller after the hard disk is successfully
3230 detached and the settings are saved with
3231 <link to="#saveSettings()"/>, if it is the desired action.
3232 </note>
3233
3234 </desc>
3235 <param name="bus" type="StorageBus" dir="in">
3236 <desc>Bus to detach the hard disk from.</desc>
3237 </param>
3238 <param name="channel" type="long" dir="in">
3239 <desc>Channel number to detach the hard disk from.</desc>
3240 </param>
3241 <param name="device" type="long" dir="in">
3242 <desc>Device slot number to detach the hard disk from.</desc>
3243 </param>
3244 </method>
3245
3246 <method name="getNetworkAdapter" const="yes">
3247 <desc>
3248 Returns the network adapter associated with the given slot.
3249 Slots are numbered sequentially, starting with zero. The total
3250 number of adapters per every machine is defined by the
3251 <link to="ISystemProperties::networkAdapterCount"/> property,
3252 so the maximum slot number is one less than that property's value.
3253 </desc>
3254 <param name="slot" type="unsigned long" dir="in"/>
3255 <param name="adapter" type="INetworkAdapter" dir="return"/>
3256 </method>
3257
3258 <method name="getSerialPort" const="yes">
3259 <desc>
3260 Returns the serial port associated with the given slot.
3261 Slots are numbered sequentially, starting with zero. The total
3262 number of serial ports per every machine is defined by the
3263 <link to="ISystemProperties::serialPortCount"/> property,
3264 so the maximum slot number is one less than that property's value.
3265 </desc>
3266 <param name="slot" type="unsigned long" dir="in"/>
3267 <param name="port" type="ISerialPort" dir="return"/>
3268 </method>
3269
3270 <method name="getParallelPort" const="yes">
3271 <desc>
3272 Returns the parallel port associated with the given slot.
3273 Slots are numbered sequentially, starting with zero. The total
3274 number of parallel ports per every machine is defined by the
3275 <link to="ISystemProperties::parallelPortCount"/> property,
3276 so the maximum slot number is one less than that property's value.
3277 </desc>
3278 <param name="slot" type="unsigned long" dir="in"/>
3279 <param name="port" type="IParallelPort" dir="return"/>
3280 </method>
3281
3282 <method name="getNextExtraDataKey">
3283 <desc>
3284 Returns the machine-specific extra data key name following the
3285 supplied key.
3286
3287 An error is returned if the supplied @a key does not exist. @c NULL is
3288 returned in @a nextKey if the supplied key is the last key. When
3289 supplying @c NULL for the @a key, the first key item is returned in @a
3290 nextKey (if there is any). @a nextValue is an optional parameter and
3291 if supplied, the next key's value is returned in it.
3292 </desc>
3293 <param name="key" type="wstring" dir="in">
3294 <desc>Name of the data key to follow.</desc>
3295 </param>
3296 <param name="nextKey" type="wstring" dir="out">
3297 <desc>Name of the next data key.</desc>
3298 </param>
3299 <param name="nextValue" type="wstring" dir="out">
3300 <desc>Value of the next data key.</desc>
3301 </param>
3302 </method>
3303
3304 <method name="getExtraData">
3305 <desc>
3306 Returns associated machine-specific extra data.
3307
3308 If the requested data @a key does not exist, this function will
3309 succeed and return @c NULL in the @a value argument.
3310 </desc>
3311 <param name="key" type="wstring" dir="in">
3312 <desc>Name of the data key to get.</desc>
3313 </param>
3314 <param name="value" type="wstring" dir="return">
3315 <desc>Value of the requested data key.</desc>
3316 </param>
3317 </method>
3318
3319 <method name="setExtraData">
3320 <desc>
3321 Sets associated machine-specific extra data.
3322
3323 If you pass @c NULL as a key @a value, the given @a key will be
3324 deleted.
3325
3326 <note>
3327 Before performing the actual data change, this method will ask all
3328 registered callbacks using the
3329 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
3330 notification for a permission. If one of the callbacks refuses the
3331 new value, the change will not be performed.
3332 </note>
3333 <note>
3334 On success, the
3335 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
3336 is called to inform all registered callbacks about a successful data
3337 change.
3338 </note>
3339 <note>
3340 This method can be called outside the machine session and therefore
3341 it's a caller's responsibility to handle possible race conditions
3342 when several clients change the same key at the same time.
3343 </note>
3344 </desc>
3345 <param name="key" type="wstring" dir="in">
3346 <desc>Name of the data key to set.</desc>
3347 </param>
3348 <param name="value" type="wstring" dir="in">
3349 <desc>Value to assign to the key.</desc>
3350 </param>
3351 </method>
3352
3353 <method name="saveSettings">
3354 <desc>
3355 Saves any changes to machine settings made since the session
3356 has been opened or a new machine has been created, or since the
3357 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
3358 For registered machines, new settings become visible to all
3359 other VirtualBox clients after successful invocation of this
3360 method.
3361 <note>
3362 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
3363 notification event after the configuration has been successfully
3364 saved (only for registered machines).
3365 </note>
3366 <note>
3367 Calling this method is only valid on instances returned
3368 by <link to="ISession::machine"/> and on new machines
3369 created by <link to="IVirtualBox::createMachine"/> but not
3370 yet registered, or on unregistered machines after calling
3371 <link to="IVirtualBox::unregisterMachine"/>.
3372 </note>
3373 </desc>
3374 </method>
3375
3376 <method name="saveSettingsWithBackup">
3377 <desc>
3378 Creates a backup copy of the machine settings file (<link
3379 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
3380 <link to="#saveSettings()"/>.
3381
3382 Note that the backup copy is created <b>only</b> if the settings file
3383 auto-conversion took place (see <link to="#settingsFileVersion"/> for
3384 details). Otherwise, this call is fully equivalent to
3385 <link to="#saveSettings()"/> and no backup copying is done.
3386
3387 The backup copy is created in the same directory where the original
3388 settings file is located. It is given the following file name:
3389 <pre>
3390 original.xml.x.y-platform.bak
3391 </pre>
3392 where <tt>original.xml</tt> is the original settings file name
3393 (excluding path), and <tt>x.y-platform</tt> is the version of the old
3394 format of the settings file (before auto-conversion).
3395
3396 If the given backup file already exists, this method will try to add the
3397 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
3398 0 to 9) and copy it again until it succeeds. If all suffixes are
3399 occupied, or if any other copy error occurs, this method will return a
3400 failure.
3401
3402 If the copy operation succeeds, the @a bakFileName return argument will
3403 receive a full path to the created backup file (for informational
3404 purposes). Note that this will happen even if the subsequent
3405 <link to="#saveSettings()"/> call performed by this method after the
3406 copy operation, fails.
3407
3408 <note>
3409 The VirtualBox API never calls this method. It is intended purely for
3410 the purposes of creating backup copies of the settings files by
3411 front-ends before saving the results of the automatically performed
3412 settings conversion to disk.
3413 </note>
3414
3415 <see>settingsFileVersion</see>
3416 </desc>
3417 <param name="bakFileName" type="wstring" dir="return">
3418 <desc>Full path to the created backup copy.</desc>
3419 </param>
3420 </method>
3421
3422 <method name="discardSettings">
3423 <desc>
3424 Discards any changes to the machine settings made since the session
3425 has been opened or since the last call to <link to="#saveSettings()"/>
3426 or <link to="#discardSettings"/>.
3427 <note>
3428 Calling this method is only valid on instances returned
3429 by <link to="ISession::machine"/> and on new machines
3430 created by <link to="IVirtualBox::createMachine"/> or
3431 opened by <link to="IVirtualBox::openMachine"/> but not
3432 yet registered, or on unregistered machines after calling
3433 <link to="IVirtualBox::unregisterMachine"/>.
3434 </note>
3435 </desc>
3436 </method>
3437
3438 <method name="deleteSettings">
3439 <desc>
3440 Deletes the settings file of this machine from disk.
3441 The machine must not be registered in order for this operation
3442 to succeed.
3443 <note>
3444 <link to="#settingsModified"/> will return TRUE after this
3445 method successfully returns.
3446 </note>
3447 <note>
3448 Calling this method is only valid on instances returned
3449 by <link to="ISession::machine"/> and on new machines
3450 created by <link to="IVirtualBox::createMachine"/> or
3451 opened by <link to="IVirtualBox::openMachine"/> but not
3452 yet registered, or on unregistered machines after calling
3453 <link to="IVirtualBox::unregisterMachine"/>.
3454 </note>
3455 <note>
3456 The deleted machine settings file can be restored (saved again)
3457 by calling <link to="#saveSettings()"/>.
3458 </note>
3459 </desc>
3460 </method>
3461
3462 <method name="getSnapshot">
3463 <desc>
3464 Returns a snapshot of this machine with the given UUID.
3465 A <tt>null</tt> UUID can be used to obtain the first snapshot
3466 taken on this machine. This is useful if you want to traverse
3467 the whole tree of snapshots starting from the root.
3468 </desc>
3469 <param name="id" type="uuid" dir="in">
3470 <desc>UUID of the snapshot to get</desc>
3471 </param>
3472 <param name="snapshot" type="ISnapshot" dir="return">
3473 <desc>Snapshot object with the given UUID.</desc>
3474 </param>
3475 </method>
3476
3477 <method name="findSnapshot">
3478 <desc>
3479 Returns a snapshot of this machine with the given name.
3480 </desc>
3481 <param name="name" type="wstring" dir="in">
3482 <desc>Name of the snapshot to find</desc>
3483 </param>
3484 <param name="snapshot" type="ISnapshot" dir="return">
3485 <desc>Snapshot object with the given name.</desc>
3486 </param>
3487 </method>
3488
3489 <method name="setCurrentSnapshot">
3490 <desc>
3491 Sets the current snapshot of this machine.
3492 <note>
3493 In the current implementation, this operation is not
3494 implemented.
3495 </note>
3496 </desc>
3497 <param name="id" type="uuid" dir="in">
3498 <desc>UUID of the snapshot to set as the current snapshot.</desc>
3499 </param>
3500 </method>
3501
3502 <method name="createSharedFolder">
3503 <desc>
3504 Creates a new permanent shared folder by associating the given logical
3505 name with the given host path, adds it to the collection of shared
3506 folders and starts sharing it. Refer to the description of
3507 <link to="ISharedFolder"/> to read more about logical names.
3508 </desc>
3509 <param name="name" type="wstring" dir="in">
3510 <desc>Unique logical name of the shared folder.</desc>
3511 </param>
3512 <param name="hostPath" type="wstring" dir="in">
3513 <desc>Full path to the shared folder in the host file system.</desc>
3514 </param>
3515 <param name="writable" type="boolean" dir="in">
3516 <desc>Whether the share is writable or readonly</desc>
3517 </param>
3518 </method>
3519
3520 <method name="removeSharedFolder">
3521 <desc>
3522 Removes the permanent shared folder with the given name previously
3523 created by <link to="#createSharedFolder"/> from the collection of
3524 shared folders and stops sharing it.
3525 </desc>
3526 <param name="name" type="wstring" dir="in">
3527 <desc>Logical name of the shared folder to remove.</desc>
3528 </param>
3529 </method>
3530
3531 <method name="canShowConsoleWindow">
3532 <desc>
3533 Returns @c true if the VM console process can activate the
3534 console window and bring it to foreground on the desktop of
3535 the host PC.
3536 <note>
3537 This method will fail if a session for this machine is not
3538 currently open.
3539 </note>
3540 </desc>
3541 <param name="canShow" type="boolean" dir="return">
3542 <desc>
3543 @c true if the console window can be shown and @c
3544 false otherwise.
3545 </desc>
3546 </param>
3547 </method>
3548
3549 <method name="showConsoleWindow">
3550 <desc>
3551 Activates the console window and brings it to foreground on
3552 the desktop of the host PC. Many modern window managers on
3553 many platforms implement some sort of focus stealing
3554 prevention logic, so that it may be impossible to activate
3555 a window without the help of the currently active
3556 application. In this case, this method will return a non-zero
3557 identifier that represents the top-level window of the VM
3558 console process. The caller, if it represents a currently
3559 active process, is responsible to use this identifier (in a
3560 platform-dependent manner) to perform actual window
3561 activation.
3562 <note>
3563 This method will fail if a session for this machine is not
3564 currently open.
3565 </note>
3566 </desc>
3567 <param name="winId" type="unsigned long long" dir="return">
3568 <desc>
3569 Platform-dependent identifier of the top-level VM console
3570 window, or zero if this method has performed all actions
3571 necessary to implement the <i>show window</i> semantics for
3572 the given platform and/or VirtualBox front-end.
3573 </desc>
3574 </param>
3575 </method>
3576
3577 <method name="getGuestProperty">
3578 <desc>
3579 Reads an entry from the machine's guest property store.
3580 </desc>
3581 <param name="name" type="wstring" dir="in">
3582 <desc>
3583 The name of the property to read.
3584 </desc>
3585 </param>
3586 <param name="value" type="wstring" dir="out">
3587 <desc>
3588 The value of the property. If the property does not exist then this
3589 will be empty.
3590 </desc>
3591 </param>
3592 <param name="timestamp" type="unsigned long long" dir="out">
3593 <desc>
3594 The time at which the property was last modified, as seen by the
3595 server process.
3596 </desc>
3597 </param>
3598 <param name="flags" type="wstring" dir="out">
3599 <desc>
3600 Additional property parameters, passed as a comma-separated list of
3601 "name=value" type entries.
3602 </desc>
3603 </param>
3604 </method>
3605
3606 <method name="getGuestPropertyValue">
3607 <desc>
3608 Reads a value from the machine's guest property store.
3609 </desc>
3610 <param name="property" type="wstring" dir="in">
3611 <desc>
3612 The name of the property to read.
3613 </desc>
3614 </param>
3615 <param name="value" type="wstring" dir="return">
3616 <desc>
3617 The value of the property. If the property does not exist then this
3618 will be empty.
3619 </desc>
3620 </param>
3621 </method>
3622
3623 <method name="getGuestPropertyTimestamp">
3624 <desc>
3625 Reads a property timestamp from the machine's guest property store.
3626 </desc>
3627 <param name="property" type="wstring" dir="in">
3628 <desc>
3629 The name of the property to read.
3630 </desc>
3631 </param>
3632 <param name="value" type="unsigned long long" dir="return">
3633 <desc>
3634 The timestamp. If the property does not exist then this will be
3635 empty.
3636 </desc>
3637 </param>
3638 </method>
3639
3640 <method name="setGuestProperty">
3641 <desc>
3642 Sets, changes or deletes an entry in the machine's guest property
3643 store.
3644 </desc>
3645 <param name="property" type="wstring" dir="in">
3646 <desc>
3647 The name of the property to set, change or delete.
3648 </desc>
3649 </param>
3650 <param name="value" type="wstring" dir="in">
3651 <desc>
3652 The new value of the property to set, change or delete. If the
3653 property does not yet exist and value is non-empty, it will be
3654 created. If the value is empty, the key will be deleted if it
3655 exists.
3656 </desc>
3657 </param>
3658 <param name="flags" type="wstring" dir="in">
3659 <desc>
3660 Additional property parameters, passed as a comma-separated list of
3661 "name=value" type entries.
3662 </desc>
3663 </param>
3664 </method>
3665
3666 <method name="setGuestPropertyValue">
3667 <desc>
3668 Sets, changes or deletes a value in the machine's guest property
3669 store. The flags field will be left unchanged or created empty for a
3670 new property.
3671 </desc>
3672 <param name="property" type="wstring" dir="in">
3673 <desc>
3674 The name of the property to set, change or delete.
3675 </desc>
3676 </param>
3677 <param name="value" type="wstring" dir="in">
3678 <desc>
3679 The new value of the property to set, change or delete. If the
3680 property does not yet exist and value is non-empty, it will be
3681 created. If value is empty, the property will be deleted if it
3682 exists.
3683 </desc>
3684 </param>
3685 </method>
3686
3687 <method name="enumerateGuestProperties">
3688 <desc>
3689 Return a list of the guest properties matching a set of patterns along
3690 with their values, timestamps and flags.
3691 </desc>
3692 <param name="patterns" type="wstring" dir="in">
3693 <desc>
3694 The patterns to match the properties against, separated by '|'
3695 characters. If this is empty or NULL, all properties will match.
3696 </desc>
3697 </param>
3698 <param name="name" type="wstring" dir="out" safearray="yes">
3699 <desc>
3700 The names of the properties returned.
3701 </desc>
3702 </param>
3703 <param name="value" type="wstring" dir="out" safearray="yes">
3704 <desc>
3705 The values of the properties returned. The array entries match the
3706 corresponding entries in the @a name array.
3707 </desc>
3708 </param>
3709 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3710 <desc>
3711 The timestamps of the properties returned. The array entries match
3712 the corresponding entries in the @a name array.
3713 </desc>
3714 </param>
3715 <param name="flags" type="wstring" dir="out" safearray="yes">
3716 <desc>
3717 The flags of the properties returned. The array entries match the
3718 corresponding entries in the @a name array.
3719 </desc>
3720 </param>
3721 </method>
3722</interface>
3723
3724 <!--
3725 // IConsole
3726 /////////////////////////////////////////////////////////////////////////
3727 -->
3728
3729 <interface
3730 name="IConsoleCallback" extends="$unknown"
3731 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
3732 wsmap="suppress"
3733 >
3734
3735 <method name="onMousePointerShapeChange">
3736 <desc>
3737 Notification when the guest mouse pointer shape has
3738 changed. The new shape data is given.
3739 </desc>
3740 <param name="visible" type="boolean" dir="in">
3741 <desc>
3742 Flag whether the pointer is visible.
3743 </desc>
3744 </param>
3745 <param name="alpha" type="boolean" dir="in">
3746 <desc>
3747 Flag whether the pointer has an alpha channel.
3748 </desc>
3749 </param>
3750 <param name="xHot" type="unsigned long" dir="in">
3751 <desc>
3752 The pointer hot spot x coordinate.
3753 </desc>
3754 </param>
3755 <param name="yHot" type="unsigned long" dir="in">
3756 <desc>
3757 The pointer hot spot y coordinate.
3758 </desc>
3759 </param>
3760 <param name="width" type="unsigned long" dir="in">
3761 <desc>
3762 Width of the pointer shape in pixels.
3763 </desc>
3764 </param>
3765 <param name="height" type="unsigned long" dir="in">
3766 <desc>
3767 Height of the pointer shape in pixels.
3768 </desc>
3769 </param>
3770 <param name="shape" type="octet" mod="ptr" dir="in">
3771 <desc>
3772 Address of the shape buffer.
3773
3774 The buffer contains 1 bpp (bits per pixel) AND mask followed by 32 bpp XOR (color) mask.
3775
3776 For pointers without alpha channel the XOR mask pixels are 32 bit values: (lsb)BGR0(msb).
3777 For pointers with alpha channel the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
3778
3779 AND mask presents for pointers with alpha channel, so if the callback does not
3780 support alpha, the pointer could be displayed as a normal color pointer.
3781
3782 The AND mask is 1 bpp bitmap with byte aligned scanlines. Size of AND mask,
3783 therefore, is <tt>cbAnd = (width + 7) / 8 * height</tt>. The padding bits at the
3784 end of any scanline are undefined.
3785
3786 The XOR mask follows the AND mask on the next 4 bytes aligned offset:
3787 <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>
3788 Bytes in the gap between the AND and the XOR mask are undefined.
3789 XOR mask scanlines have no gap between them and size of XOR mask is:
3790 <tt>cXor = width * 4 * height</tt>.
3791
3792 <note>
3793 If 'shape' is equal to 0, only pointer visibility is being changed.
3794 </note>
3795 </desc>
3796 </param>
3797 </method>
3798
3799 <method name="onMouseCapabilityChange">
3800 <desc>
3801 Notification when the mouse capabilities reported by the
3802 guest have changed. The new capabilities are passed.
3803 </desc>
3804 <param name="supportsAbsolute" type="boolean" dir="in"/>
3805 <param name="needsHostCursor" type="boolean" dir="in"/>
3806 </method>
3807
3808 <method name="onKeyboardLedsChange">
3809 <desc>
3810 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
3811 to alter the state of the keyboard LEDs.
3812 </desc>
3813 <param name="numLock" type="boolean" dir="in"/>
3814 <param name="capsLock" type="boolean" dir="in"/>
3815 <param name="scrollLock" type="boolean" dir="in"/>
3816 </method>
3817
3818 <method name="onStateChange">
3819 <desc>
3820 Notification when the execution state of the machine has changed.
3821 The new state will be given.
3822 </desc>
3823 <param name="state" type="MachineState" dir="in"/>
3824 </method>
3825
3826 <method name="onAdditionsStateChange">
3827 <desc>
3828 Notification when a Guest Additions property changes.
3829 Interested callees should query IGuest attributes to
3830 find out what has changed.
3831 </desc>
3832 </method>
3833
3834 <method name="onDVDDriveChange">
3835 <desc>
3836 Notification when a property of the
3837 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
3838 Interested callees should use IDVDDrive methods to find out what has
3839 changed.
3840 </desc>
3841 </method>
3842
3843 <method name="onFloppyDriveChange">
3844 <desc>
3845 Notification when a property of the
3846 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
3847 Interested callees should use IFloppyDrive methods to find out what
3848 has changed.
3849 </desc>
3850 </method>
3851
3852 <method name="onNetworkAdapterChange">
3853 <desc>
3854 Notification when a property of one of the
3855 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
3856 changes. Interested callees should use INetworkAdapter methods and
3857 attributes to find out what has changed.
3858 </desc>
3859 <param name="networkAdapter" type="INetworkAdapter" dir="in">
3860 <desc>Network adapter that is subject to change.</desc>
3861 </param>
3862 </method>
3863
3864 <method name="onSerialPortChange">
3865 <desc>
3866 Notification when a property of one of the
3867 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
3868 Interested callees should use ISerialPort methods and attributes
3869 to find out what has changed.
3870 </desc>
3871 <param name="serialPort" type="ISerialPort" dir="in">
3872 <desc>Serial port that is subject to change.</desc>
3873 </param>
3874 </method>
3875
3876 <method name="onParallelPortChange">
3877 <desc>
3878 Notification when a property of one of the
3879 virtual <link to="IMachine::getParallelPort">parallel ports</link>
3880 changes. Interested callees should use ISerialPort methods and
3881 attributes to find out what has changed.
3882 </desc>
3883 <param name="parallelPort" type="IParallelPort" dir="in">
3884 <desc>Parallel port that is subject to change.</desc>
3885 </param>
3886 </method>
3887
3888 <method name="onVRDPServerChange">
3889 <desc>
3890 Notification when a property of the
3891 <link to="IMachine::VRDPServer">VRDP server</link> changes.
3892 Interested callees should use IVRDPServer methods and attributes to
3893 find out what has changed.
3894 </desc>
3895 </method>
3896
3897 <method name="onUSBControllerChange">
3898 <desc>
3899 Notification when a property of the virtual
3900 <link to="IMachine::USBController">USB controller</link> changes.
3901 Interested callees should use IUSBController methods and attributes to
3902 find out what has changed.
3903 </desc>
3904 </method>
3905
3906 <method name="onUSBDeviceStateChange">
3907 <desc>
3908 Notification when a USB device is attached to or detached from
3909 the virtual USB controller.
3910
3911 This notification is sent as a result of the indirect
3912 request to attach the device because it matches one of the
3913 machine USB filters, or as a result of the direct request
3914 issued by <link to="IConsole::attachUSBDevice"/> or
3915 <link to="IConsole::detachUSBDevice"/>.
3916
3917 This notification is sent in case of both a succeeded and a
3918 failed request completion. When the request succeeds, the @a
3919 error parameter is @c null, and the given device has been
3920 already added to (when @a attached is @c true) or removed from
3921 (when @a attached is @c false) the collection represented by
3922 <link to="IConsole::USBDevices"/>. On failure, the collection
3923 doesn't change and the @a error parameter represents the error
3924 message describing the failure.
3925
3926 </desc>
3927 <param name="device" type="IUSBDevice" dir="in">
3928 <desc>Device that is subject to state change.</desc>
3929 </param>
3930 <param name="attached" type="boolean" dir="in">
3931 <desc>
3932 <tt>true</tt> if the device was attached
3933 and <tt>false</tt> otherwise.
3934 </desc>
3935 </param>
3936 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
3937 <desc>
3938 <tt>null</tt> on success or an error message object on
3939 failure.
3940 </desc>
3941 </param>
3942 </method>
3943
3944 <method name="onSharedFolderChange">
3945 <desc>
3946 Notification when a shared folder is added or removed.
3947 The @a scope argument defines one of three scopes:
3948 <link to="IVirtualBox::sharedFolders">global shared folders</link>
3949 (<link to="Scope::Global">Global</link>),
3950 <link to="IMachine::sharedFolders">permanent shared folders</link> of
3951 the machine (<link to="Scope::Machine">Machine</link>) or <link
3952 to="IConsole::sharedFolders">transient shared folders</link> of the
3953 machine (<link to="Scope::Session">Session</link>). Interested callees
3954 should use query the corresponding collections to find out what has
3955 changed.
3956 </desc>
3957 <param name="scope" type="Scope" dir="in">
3958 <desc>Sope of the notification.</desc>
3959 </param>
3960 </method>
3961
3962 <method name="onRuntimeError">
3963 <desc>
3964 Notification when an error happens during the virtual
3965 machine execution.
3966
3967 There are three kinds of runtime errors:
3968 <ul>
3969 <li><i>fatal</i></li>
3970 <li><i>non-fatal with retry</i></li>
3971 <li><i>non-fatal warnings</i></li>
3972 </ul>
3973
3974 <b>Fatal</b> errors are indicated by the @a fatal parameter set
3975 to <tt>true</tt>. In case of fatal errors, the virtual machine
3976 execution is always paused before calling this notification, and
3977 the notification handler is supposed either to immediately save
3978 the virtual machine state using <link to="IConsole::saveState()"/>
3979 or power it off using <link to="IConsole::powerDown()"/>.
3980 Resuming the execution can lead to unpredictable results.
3981
3982 <b>Non-fatal</b> errors and warnings are indicated by the
3983 @a fatal parameter set to <tt>false</tt>. If the virtual machine
3984 is in the Paused state by the time the error notification is
3985 received, it means that the user can <i>try to resume</i> the machine
3986 execution after attempting to solve the problem that caused the
3987 error. In this case, the notification handler is supposed
3988 to show an appropriate message to the user (depending on the
3989 value of the @a id parameter) that offers several actions such
3990 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
3991 wants to retry, the notification handler should continue
3992 the machine execution using the <link to="IConsole::resume()"/>
3993 call. If the machine execution is not Paused during this
3994 notification, then it means this notification is a <i>warning</i>
3995 (for example, about a fatal condition that can happen very soon);
3996 no immediate action is required from the user, the machine
3997 continues its normal execution.
3998
3999 Note that in either case the notification handler
4000 <b>must not</b> perform any action directly on a thread
4001 where this notification is called. Everything it is allowed to
4002 do is to post a message to another thread that will then talk
4003 to the user and take the corresponding action.
4004
4005 Currently, the following error identificators are known:
4006 <ul>
4007 <li><tt>"HostMemoryLow"</tt></li>
4008 <li><tt>"HostAudioNotResponding"</tt></li>
4009 <li><tt>"VDIStorageFull"</tt></li>
4010 </ul>
4011
4012 <note>
4013 This notification is not designed to be implemented by
4014 more than one callback at a time. If you have multiple
4015 IConsoleCallback instances registered on the given
4016 IConsole object, make sure you simply do nothing but
4017 return @c S_OK from all but one of them that does actual
4018 user notification and performs necessary actions.
4019 </note>
4020
4021 </desc>
4022 <param name="fatal" type="boolean" dir="in">
4023 <desc>Whether the error is fatal or not</desc>
4024 </param>
4025 <param name="id" type="wstring" dir="in">
4026 <desc>Error identificator</desc>
4027 </param>
4028 <param name="message" type="wstring" dir="in">
4029 <desc>Optional error message</desc>
4030 </param>
4031 </method>
4032
4033 <method name="onCanShowWindow">
4034 <desc>
4035 Notification when a call to
4036 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4037 front-end to check if a subsequent call to
4038 <link to="IMachine::showConsoleWindow()"/> can succeed.
4039
4040 The callee should give an answer appropriate to the current
4041 machine state in the @a canShow argument. This answer must
4042 remain valid at least until the next
4043 <link to="IConsole::state">machine state</link> change.
4044
4045 <note>
4046 This notification is not designed to be implemented by
4047 more than one callback at a time. If you have multiple
4048 IConsoleCallback instances registered on the given
4049 IConsole object, make sure you simply do nothing but
4050 return @c true and @c S_OK from all but one of them that
4051 actually manages console window activation.
4052 </note>
4053 </desc>
4054 <param name="canShow" type="boolean" dir="return">
4055 <desc>
4056 @c true if the console window can be shown and @c
4057 false otherwise.
4058 </desc>
4059 </param>
4060 </method>
4061
4062 <method name="onShowWindow">
4063 <desc>
4064 Notification when a call to
4065 <link to="IMachine::showConsoleWindow()"/>
4066 requests the console window to be activated and brought to
4067 foreground on the desktop of the host PC.
4068
4069 This notification should cause the VM console process to
4070 perform the requested action as described above. If it is
4071 impossible to do it at a time of this notification, this
4072 method should return a failure.
4073
4074 Note that many modern window managers on many platforms
4075 implement some sort of focus stealing prevention logic, so
4076 that it may be impossible to activate a window without the
4077 help of the currently active application (which is supposedly
4078 an initiator of this notification). In this case, this method
4079 must return a non-zero identifier that represents the
4080 top-level window of the VM console process. The caller, if it
4081 represents a currently active process, is responsible to use
4082 this identifier (in a platform-dependent manner) to perform
4083 actual window activation.
4084
4085 This method must set @a winId to zero if it has performed all
4086 actions necessary to complete the request and the console
4087 window is now active and in foreground, to indicate that no
4088 further action is required on the caller's side.
4089
4090 <note>
4091 This notification is not designed to be implemented by
4092 more than one callback at a time. If you have multiple
4093 IConsoleCallback instances registered on the given
4094 IConsole object, make sure you simply do nothing but
4095 return@c S_OK from all but one of them that actually
4096 manages console window activation.
4097 </note>
4098 </desc>
4099 <param name="winId" type="unsigned long long" dir="return">
4100 <desc>
4101 Platform-dependent identifier of the top-level VM console
4102 window, or zero if this method has performed all actions
4103 necessary to implement the <i>show window</i> semantics for
4104 the given platform and/or this VirtualBox front-end.
4105 </desc>
4106 </param>
4107 </method>
4108
4109 </interface>
4110
4111 <interface
4112 name="IRemoteDisplayInfo" extends="$unknown"
4113 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4114 wsmap="struct"
4115 >
4116 <desc>
4117 Contains information about the remote display (VRDP) capabilities and status.
4118 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4119 </desc>
4120
4121 <attribute name="active" type="boolean" readonly="yes">
4122 <desc>
4123 Whether the remote display connection is active.
4124 </desc>
4125 </attribute>
4126
4127 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4128 <desc>
4129 How many times a client connected.
4130 </desc>
4131 </attribute>
4132
4133 <attribute name="beginTime" type="long long" readonly="yes">
4134 <desc>
4135 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4136 </desc>
4137 </attribute>
4138
4139 <attribute name="endTime" type="long long" readonly="yes">
4140 <desc>
4141 When the last connection was terminated or the current time, if
4142 connection is still active, in milliseconds since 1970-01-01 UTC.
4143 </desc>
4144 </attribute>
4145
4146 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4147 <desc>
4148 How many bytes were sent in last or current, if still active, connection.
4149 </desc>
4150 </attribute>
4151
4152 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4153 <desc>
4154 How many bytes were sent in all connections.
4155 </desc>
4156 </attribute>
4157
4158 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4159 <desc>
4160 How many bytes were received in last or current, if still active, connection.
4161 </desc>
4162 </attribute>
4163
4164 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4165 <desc>
4166 How many bytes were received in all connections.
4167 </desc>
4168 </attribute>
4169
4170 <attribute name="user" type="wstring" readonly="yes">
4171 <desc>
4172 Login user name supplied by the client.
4173 </desc>
4174 </attribute>
4175
4176 <attribute name="domain" type="wstring" readonly="yes">
4177 <desc>
4178 Login domain name supplied by the client.
4179 </desc>
4180 </attribute>
4181
4182 <attribute name="clientName" type="wstring" readonly="yes">
4183 <desc>
4184 The client name supplied by the client.
4185 </desc>
4186 </attribute>
4187
4188 <attribute name="clientIP" type="wstring" readonly="yes">
4189 <desc>
4190 The IP address of the client.
4191 </desc>
4192 </attribute>
4193
4194 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4195 <desc>
4196 The client software version number.
4197 </desc>
4198 </attribute>
4199
4200 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
4201 <desc>
4202 Public key exchange method used when connection was established.
4203 Values: 0 - RDP4 public key exchange scheme.
4204 1 - X509 certificates were sent to client.
4205 </desc>
4206 </attribute>
4207
4208 </interface>
4209
4210 <interface
4211 name="IConsole" extends="$unknown"
4212 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
4213 wsmap="managed"
4214 >
4215 <desc>
4216 The IConsole interface represents an interface to control virtual
4217 machine execution.
4218
4219 The console object that implements the IConsole interface is obtained
4220 from a session object after the session for the given machine has been
4221 opened using one of <link to="IVirtualBox::openSession"/>,
4222 <link to="IVirtualBox::openRemoteSession"/> or
4223 <link to="IVirtualBox::openExistingSession"/> methods.
4224
4225 Methods of the IConsole interface allow the caller to query the current
4226 virtual machine execution state, pause the machine or power it down, save
4227 the machine state or take a snapshot, attach and detach removable media
4228 and so on.
4229
4230 <see>ISession</see>
4231 </desc>
4232
4233 <attribute name="machine" type="IMachine" readonly="yes">
4234 <desc>
4235 Machine object this console is sessioned with.
4236 <note>
4237 This is a convenience property, it has the same value as
4238 <link to="ISession::machine"/> of the corresponding session
4239 object.
4240 </note>
4241 </desc>
4242 </attribute>
4243
4244 <attribute name="state" type="MachineState" readonly="yes">
4245 <desc>
4246 Current execution state of the machine.
4247 <note>
4248 This property always returns the same value as the corresponding
4249 property of the IMachine object this console is sessioned with.
4250 For the process that owns (executes) the VM, this is the
4251 preferable way of querying the VM state, because no IPC
4252 calls are made.
4253 </note>
4254 </desc>
4255 </attribute>
4256
4257 <attribute name="guest" type="IGuest" readonly="yes">
4258 <desc>Guest object.</desc>
4259 </attribute>
4260
4261 <attribute name="keyboard" type="IKeyboard" readonly="yes">
4262 <desc>
4263 Virtual keyboard object.
4264 <note>
4265 If the machine is not running, any attempt to use
4266 the returned object will result in an error.
4267 </note>
4268 </desc>
4269 </attribute>
4270
4271 <attribute name="mouse" type="IMouse" readonly="yes">
4272 <desc>
4273 Virtual mouse object.
4274 <note>
4275 If the machine is not running, any attempt to use
4276 the returned object will result in an error.
4277 </note>
4278 </desc>
4279 </attribute>
4280
4281 <attribute name="display" type="IDisplay" readonly="yes">
4282 <desc>Virtual display object.
4283 <note>
4284 If the machine is not running, any attempt to use
4285 the returned object will result in an error.
4286 </note>
4287 </desc>
4288 </attribute>
4289
4290 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
4291 <desc>Debugging interface.</desc>
4292 </attribute>
4293
4294 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
4295 <desc>
4296 Collection of USB devices currently attached to the virtual
4297 USB controller.
4298 <note>
4299 The collection is empty if the machine is not running.
4300 </note>
4301 </desc>
4302 </attribute>
4303
4304 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
4305 <desc>
4306 List of USB devices currently attached to the remote VRDP client.
4307 Once a new device is physically attached to the remote host computer,
4308 it appears in this list and remains there until detached.
4309 </desc>
4310 </attribute>
4311
4312 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4313 <desc>
4314 Collection of shared folders for the current session. These folders
4315 are called transient shared folders because they are available to the
4316 guest OS running inside the associated virtual machine only for the
4317 duration of the session (as opposed to
4318 <link to="IMachine::sharedFolders"/> which represent permanent shared
4319 folders). When the session is closed (e.g. the machine is powered down),
4320 these folders are automatically discarded.
4321
4322 New shared folders are added to the collection using
4323 <link to="#createSharedFolder"/>. Existing shared folders can be
4324 removed using <link to="#removeSharedFolder"/>.
4325 </desc>
4326 </attribute>
4327
4328 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
4329 <desc>
4330 Interface that provides information on Remote Display (VRDP) connection.
4331 </desc>
4332 </attribute>
4333
4334 <method name="powerUp">
4335 <desc>
4336 Starts the virtual machine execution using the current machine
4337 state (i.e. its current execution state, current settings and
4338 current hard disks).
4339
4340 If the machine is powered off or aborted, the execution will
4341 start from the beginning (as if the real hardware were just
4342 powered on).
4343
4344 If the machine is in the <link to="MachineState::Saved"/> state,
4345 it will continue its execution the point where the state has
4346 been saved.
4347
4348 <note>
4349 Unless you are trying to write a new VirtualBox front-end that
4350 performs direct machine execution (like the VirtualBox or VBoxSDL
4351 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
4352 session opened by <link to="IVirtualBox::openSession"/> and use this
4353 session only to change virtual machine settings. If you simply want to
4354 start virtual machine execution using one of the existing front-ends
4355 (for example the VirtualBox GUI or headless server), simply use
4356 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
4357 power up the machine automatically for you.
4358 </note>
4359
4360 <see>#saveState</see>
4361 </desc>
4362 <param name="progress" type="IProgress" dir="return">
4363 <desc>Progress object to track the operation completion.</desc>
4364 </param>
4365 </method>
4366
4367 <method name="powerUpPaused">
4368 <desc>
4369 Identical to powerUp except that the VM will enter the
4370 <link to="MachineState::Paused"/> state, instead of
4371 <link to="MachineState::Running"/>.
4372
4373 <see>#powerUp</see>
4374 </desc>
4375 <param name="progress" type="IProgress" dir="return">
4376 <desc>Progress object to track the operation completion.</desc>
4377 </param>
4378 </method>
4379
4380 <method name="powerDown">
4381 <desc>
4382 Stops the virtual machine execution.
4383 After this operation completes, the machine will go to the
4384 PoweredOff state.
4385
4386 @deprecated This method will be removed in VirtualBox 2.1 where the
4387 powerDownAsync() method will take its name. Do not use this method in
4388 the code.
4389 </desc>
4390 </method>
4391
4392 <method name="powerDownAsync">
4393 <desc>
4394 Initiates the power down procedure to stop the virtual machine
4395 execution.
4396
4397 The completion of the power down procedure is tracked using the returned
4398 IProgress object. After the operation is complete, the machine will go
4399 to the PoweredOff state.
4400
4401 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
4402 where the original powerDown() method will be removed. You will need to
4403 rename "powerDownAsync" to "powerDown" in your sources to make them
4404 build with version 2.1.
4405 </desc>
4406 <param name="progress" type="IProgress" dir="return">
4407 <desc>Progress object to track the operation completion.</desc>
4408 </param>
4409 </method>
4410
4411 <method name="reset">
4412 <desc>Resets the virtual machine.</desc>
4413 </method>
4414
4415 <method name="pause">
4416 <desc>Pauses the virtual machine execution.</desc>
4417 </method>
4418
4419 <method name="resume">
4420 <desc>Resumes the virtual machine execution.</desc>
4421 </method>
4422
4423 <method name="powerButton">
4424 <desc>Send the ACPI power button event to the guest.</desc>
4425 </method>
4426
4427 <method name="sleepButton">
4428 <desc>Send the ACPI sleep button event to the guest.</desc>
4429 </method>
4430
4431 <method name="getPowerButtonHandled">
4432 <desc>Check if the last power button event was handled by guest.</desc>
4433 <param name="handled" type="boolean" dir="return"/>
4434 </method>
4435
4436 <method name="getGuestEnteredACPIMode">
4437 <desc>Check if the guest entered the ACPI mode G0 (working) or
4438 G1 (sleeping). If this method returns false, the guest will
4439 most likely not respond to external ACPI events.</desc>
4440 <param name="entered" type="boolean" dir="return"/>
4441 </method>
4442
4443 <method name="saveState">
4444 <desc>
4445 Saves the current execution state of a running virtual machine
4446 and stops its execution.
4447
4448 After this operation completes, the machine will go to the
4449 Saved state. Next time it is powered up, this state will
4450 be restored and the machine will continue its execution from
4451 the place where it was saved.
4452
4453 This operation differs from taking a snapshot to the effect
4454 that it doesn't create new differencing hard disks. Also, once
4455 the machine is powered up from the state saved using this method,
4456 the saved state is deleted, so it will be impossible to return
4457 to this state later.
4458
4459 <note>
4460 On success, this method implicitly calls
4461 <link to="IMachine::saveSettings()"/> to save all current machine
4462 settings (including runtime changes to the DVD drive, etc.).
4463 Together with the impossibility to change any VM settings when it is
4464 in the Saved state, this guarantees the adequate hardware
4465 configuration of the machine when it is restored from the saved
4466 state file.
4467 </note>
4468
4469 <note>
4470 The machine must be in the Running or Paused state, otherwise
4471 the operation will fail.
4472 </note>
4473
4474 <see><link to="#takeSnapshot"/></see>
4475 </desc>
4476 <param name="progress" type="IProgress" dir="return">
4477 <desc>Progress object to track the operation completion.</desc>
4478 </param>
4479 </method>
4480
4481 <method name="adoptSavedState">
4482 <desc>
4483 Associates the given saved state file to the virtual machine.
4484
4485 On success, the machine will go to the Saved state. Next time it is
4486 powered up, it will be restored from the adopted saved state and
4487 continue execution from the place where the saved state file was
4488 created.
4489
4490 The specified saved state file path may be full or relative to the
4491 folder the VM normally saves the state to (usually,
4492 <link to="IMachine::snapshotFolder"/>).
4493
4494 <note>
4495 It's a caller's responsibility to make sure the given saved state
4496 file is compatible with the settings of this virtual machine that
4497 represent its virtual hardware (memory size, hard disk configuration
4498 etc.). If there is a mismatch, the behavior of the virtual machine
4499 is undefined.
4500 </note>
4501 </desc>
4502 <param name="savedStateFile" type="wstring" dir="in">
4503 <desc>Path to the saved state file to adopt.</desc>
4504 </param>
4505 </method>
4506
4507 <method name="discardSavedState">
4508 <desc>
4509 Discards (deletes) the saved state of the virtual machine
4510 previously created by <link to="#saveState"/>. Next time the
4511 machine is powered up, a clean boot will occur.
4512 <note>
4513 This operation is equivalent to resetting or powering off
4514 the machine without doing a proper shutdown in the guest OS.
4515 </note>
4516 </desc>
4517 </method>
4518
4519 <method name="getDeviceActivity">
4520 <desc>
4521 Gets the current activity type of a given device or device group.
4522 </desc>
4523 <param name="type" type="DeviceType" dir="in"/>
4524 <param name="activity" type="DeviceActivity" dir="return"/>
4525 </method>
4526
4527 <method name="attachUSBDevice">
4528 <desc>
4529 Attaches a host USB device with the given UUID to the
4530 USB controller of the virtual machine.
4531
4532 The device needs to be in one of the following states:
4533 <link to="USBDeviceState::Busy">Busy</link>,
4534 <link to="USBDeviceState::Available">Available</link> or
4535 <link to="USBDeviceState::Held">Held</link>,
4536 otherwise an error is immediately returned.
4537
4538 When the device state is
4539 <link to="USBDeviceState::Busy">Busy</link>, an error may also
4540 be returned if the host computer refuses to release it for some reason.
4541
4542 <see>IUSBController::deviceFilters, USBDeviceState</see>
4543 </desc>
4544 <param name="id" type="uuid" dir="in">
4545 <desc>UUID of the host USB device to attach.</desc>
4546 </param>
4547 </method>
4548
4549 <method name="detachUSBDevice">
4550 <desc>
4551 Detaches an USB device with the given UUID from the USB controller
4552 of the virtual machine.
4553
4554 After this method succeeds, the VirtualBox server reinitiates
4555 all USB filters as if the device were just physically attached
4556 to the host, but filters of this machine are ignored to avoid
4557 a possible automatic reattachment.
4558
4559 <see>IUSBController::deviceFilters, USBDeviceState</see>
4560 </desc>
4561 <param name="id" type="uuid" dir="in">
4562 <desc>UUID of the USB device to detach.</desc>
4563 </param>
4564 <param name="device" type="IUSBDevice" dir="return">
4565 <desc>Detached USB device.</desc>
4566 </param>
4567 </method>
4568
4569 <method name="createSharedFolder">
4570 <desc>
4571 Creates a transient new shared folder by associating the given logical
4572 name with the given host path, adds it to the collection of shared
4573 folders and starts sharing it. Refer to the description of
4574 <link to="ISharedFolder"/> to read more about logical names.
4575 </desc>
4576 <param name="name" type="wstring" dir="in">
4577 <desc>Unique logical name of the shared folder.</desc>
4578 </param>
4579 <param name="hostPath" type="wstring" dir="in">
4580 <desc>Full path to the shared folder in the host file system.</desc>
4581 </param>
4582 <param name="writable" type="boolean" dir="in">
4583 <desc>Whether the share is writable or readonly</desc>
4584 </param>
4585 </method>
4586
4587 <method name="removeSharedFolder">
4588 <desc>
4589 Removes a transient shared folder with the given name previously
4590 created by <link to="#createSharedFolder"/> from the collection of
4591 shared folders and stops sharing it.
4592 </desc>
4593 <param name="name" type="wstring" dir="in">
4594 <desc>Logical name of the shared folder to remove.</desc>
4595 </param>
4596 </method>
4597
4598 <method name="takeSnapshot">
4599 <desc>
4600 Saves the current execution state and all settings of the
4601 machine and creates differencing images for all
4602 normal (non-independent) hard disks.
4603
4604 This method can be called for a PoweredOff, Saved, Running or
4605 Paused virtual machine. When the machine is PoweredOff, an
4606 offline <link to="ISnapshot">snapshot</link> is created,
4607 in all other cases -- an online snapshot.
4608
4609 The taken snapshot is always based on the
4610 <link to="IMachine::currentSnapshot">current
4611 snapshot</link> of the associated virtual machine and becomes
4612 a new current snapshot.
4613
4614 <note>
4615 This method implicitly calls <link to="IMachine::saveSettings()"/> to
4616 save all current machine settings before taking an offline snapshot.
4617 </note>
4618
4619 <see>ISnapshot, <link to="#saveState"/></see>
4620 </desc>
4621 <param name="name" type="wstring" dir="in">
4622 <desc>Short name for the snapshot.</desc>
4623 </param>
4624 <param name="description" type="wstring" dir="in">
4625 <desc>Optional description of the snapshot.</desc>
4626 </param>
4627 <param name="progress" type="IProgress" dir="return">
4628 <desc>Progress object to track the operation completion.</desc>
4629 </param>
4630 </method>
4631
4632 <method name="discardSnapshot">
4633 <desc>
4634
4635 Starts discarding the specified snapshot. The execution state
4636 and settings of the associated machine stored in the snapshot
4637 will be deleted. The contents of all differencing hard disks of
4638 this snapshot will be merged with the contents of their
4639 dependent child hard disks to keep the, disks valid (in other
4640 words, all changes represented by hard disks being discarded
4641 will be propagated to their child hard disks). After that, this
4642 snapshot's differencing hard disks will be deleted. The parent
4643 of this snapshot will become a new parent for all its child
4644 snapshots.
4645
4646 If the discarded snapshot is the current one, its parent
4647 snapshot will become a new current snapshot. The current machine
4648 state is not directly affected in this case, except that
4649 currently attached differencing hard disks based on hard disks
4650 of the discarded snapshot will be also merged as described
4651 above.
4652
4653 If the discarded snapshot is the first one (the root snapshot)
4654 and it has exactly one child snapshot, this child snapshot will
4655 become the first snapshot after discarding. If there are no
4656 children at all (i.e. the first snapshot is the only snapshot of
4657 the machine), both the current and the first snapshot of the
4658 machine will be set to null. In all other cases, the first
4659 snapshot cannot be discarded.
4660
4661 You cannot discard the snapshot if it
4662 stores <link to="HardDiskType::Normal">normal</link> (non-differencing)
4663 hard disks that have differencing hard disks based on them. Snapshots of
4664 such kind can be discarded only when every normal hard disk has either
4665 no children at all or exactly one child. In the former case, the normal
4666 hard disk simply becomes unused (i.e. not attached to any VM). In the
4667 latter case, it receives all the changes stored in the child hard disk,
4668 and then it replaces the child hard disk in the configuration of the
4669 corresponding snapshot or machine.
4670
4671 Also, you cannot discard the snapshot if it stores hard disks
4672 (of any type) having differencing child hard disks that belong
4673 to other machines. Such snapshots can be only discarded after
4674 you discard all snapshots of other machines containing "foreign"
4675 child disks, or detach these "foreign" child disks from machines
4676 they are attached to.
4677
4678 One particular example of the snapshot storing normal hard disks
4679 is the first snapshot of a virtual machine that had normal hard
4680 disks attached when taking the snapshot. Be careful when
4681 discarding such snapshots because this implicitly commits
4682 changes (made since the snapshot being discarded has been taken)
4683 to normal hard disks (as described above), which may be not what
4684 you want.
4685
4686 The virtual machine is put to
4687 the <link to="MachineState::Discarding">Discarding</link> state until
4688 the discard operation is completed.
4689
4690 <note>
4691 The machine must not be running, otherwise the operation
4692 will fail.
4693 </note>
4694
4695 <note>
4696 Child hard disks of all normal hard disks of the discarded snapshot
4697 must be accessible (see <link to="IMedium::state"/>) for this
4698 operation to succeed. In particular, this means that all virtual
4699 machines, whose hard disks are directly or indirectly based on the
4700 hard disks of discarded snapshot, must be powered off.
4701 </note>
4702 <note>
4703 Merging hard disk contents can be very time and disk space
4704 consuming, if these disks are big in size and have many
4705 children. However, if the snapshot being discarded is the last
4706 (head) snapshot on the branch, the operation will be rather
4707 quick.
4708 </note>
4709 <note>
4710 Note that discarding the current snapshot
4711 will implicitly call <link to="IMachine::saveSettings()"/> to
4712 make all current machine settings permanent.
4713 </note>
4714 </desc>
4715 <param name="id" type="uuid" dir="in">
4716 <desc>UUID of the snapshot to discard.</desc>
4717 </param>
4718 <param name="progress" type="IProgress" dir="return">
4719 <desc>Progress object to track the operation completion.</desc>
4720 </param>
4721 </method>
4722
4723 <method name="discardCurrentState">
4724 <desc>
4725 This operation is similar to <link to="#discardSnapshot()"/> but
4726 affects the current machine state. This means that the state stored in
4727 the current snapshot will become a new current state, and all current
4728 settings of the machine and changes stored in differencing hard disks
4729 will be lost.
4730
4731 After this operation is successfully completed, new empty differencing
4732 hard disks are created for all normal hard disks of the machine.
4733
4734 If the current snapshot of the machine is an online snapshot, the
4735 machine will go to the <link to="MachineState::Saved"> saved
4736 state</link>, so that the next time it is powered on, the execution
4737 state will be restored from the current snapshot.
4738
4739 <note>
4740 The machine must not be running, otherwise the operation will fail.
4741 </note>
4742
4743 <note>
4744 If the machine state is <link to="MachineState::Saved">Saved</link>
4745 prior to this operation, the saved state file will be implicitly
4746 discarded (as if <link to="IConsole::discardSavedState()"/> were
4747 called).
4748 </note>
4749
4750 </desc>
4751 <param name="progress" type="IProgress" dir="return">
4752 <desc>Progress object to track the operation completion.</desc>
4753 </param>
4754 </method>
4755
4756 <method name="discardCurrentSnapshotAndState">
4757 <desc>
4758
4759 This method is equivalent to
4760 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
4761 (currentSnapshot.id(), progress) followed by
4762 <link to="#discardCurrentState()"/>.
4763
4764 As a result, the machine will be fully restored from the
4765 snapshot preceding the current snapshot, while both the current
4766 snapshot and the current machine state will be discarded.
4767
4768 If the current snapshot is the first snapshot of the machine (i.e. it
4769 has the only snapshot), the current machine state will be
4770 discarded <b>before</b> discarding the snapshot. In other words, the
4771 machine will be restored from its last snapshot, before discarding
4772 it. This differs from performing a single
4773 <link to="#discardSnapshot()"/> call (note that no
4774 <link to="#discardCurrentState()"/> will be possible after it)
4775 to the effect that the latter will preserve the current state instead of
4776 discarding it.
4777
4778 Unless explicitly mentioned otherwise, all remarks and
4779 limitations of the above two methods also apply to this method.
4780
4781 <note>
4782 The machine must not be running, otherwise the operation
4783 will fail.
4784 </note>
4785
4786 <note>
4787 If the machine state is <link to="MachineState::Saved">Saved</link>
4788 prior to this operation, the saved state file will be implicitly
4789 discarded (as if <link to="#discardSavedState()"/> were
4790 called).
4791 </note>
4792
4793 <note>
4794 This method is more efficient than calling two above
4795 methods separately: it requires less IPC calls and provides
4796 a single progress object.
4797 </note>
4798
4799 </desc>
4800 <param name="progress" type="IProgress" dir="return">
4801 <desc>Progress object to track the operation completion.</desc>
4802 </param>
4803 </method>
4804
4805 <method name="registerCallback">
4806 <desc>
4807 Registers a new console callback on this instance. The methods of the
4808 callback interface will be called by this instance when the appropriate
4809 event occurs.
4810 </desc>
4811 <param name="callback" type="IConsoleCallback" dir="in"/>
4812 </method>
4813
4814 <method name="unregisterCallback">
4815 <desc>
4816 Unregisters the console callback previously registered using
4817 <link to="#registerCallback"/>.
4818 </desc>
4819 <param name="callback" type="IConsoleCallback" dir="in"/>
4820 </method>
4821 </interface>
4822
4823 <!--
4824 // IHost
4825 /////////////////////////////////////////////////////////////////////////
4826 -->
4827
4828 <interface
4829 name="IHostDVDDrive" extends="$unknown"
4830 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
4831 wsmap="managed"
4832 >
4833 <desc>
4834 The IHostDVDDrive interface represents the physical CD/DVD drive
4835 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
4836 </desc>
4837
4838 <attribute name="name" type="wstring" readonly="yes">
4839 <desc>
4840 Returns the platform-specific device identifier.
4841 On DOS-like platforms, it is a drive name (e.g. R:).
4842 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
4843 </desc>
4844 </attribute>
4845 <attribute name="description" type="wstring" readonly="yes">
4846 <desc>
4847 Returns a human readable description for the drive. This
4848 description usually contains the product and vendor name. A
4849 @c null string is returned if the description is not available.
4850 </desc>
4851 </attribute>
4852 <attribute name="udi" type="wstring" readonly="yes">
4853 <desc>
4854 Returns the unique device identifier for the drive. This
4855 attribute is reserved for future use instead of
4856 <link to="#name"/>. Currently it is not used and may return
4857 @c null on some platforms.
4858 </desc>
4859 </attribute>
4860
4861 </interface>
4862
4863 <enumerator
4864 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
4865 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
4866 />
4867
4868 <collection
4869 name="IHostDVDDriveCollection" type="IHostDVDDrive"
4870 enumerator="IHostDVDDriveEnumerator"
4871 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
4872 readonly="yes"
4873 >
4874 <method name="findByName">
4875 <desc>
4876 Searches this collection for a host drive with the given name.
4877 <note>
4878 The method returns an error if the given name does not
4879 correspond to any host drive in the collection.
4880 </note>
4881 </desc>
4882 <param name="name" type="wstring" dir="in">
4883 <desc>Name of the host drive to search for</desc>
4884 </param>
4885 <param name="drive" type="IHostDVDDrive" dir="return">
4886 <desc>Found host drive object</desc>
4887 </param>
4888 </method>
4889 </collection>
4890
4891 <interface
4892 name="IHostFloppyDrive" extends="$unknown"
4893 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
4894 wsmap="managed"
4895 >
4896 <desc>
4897 The IHostFloppyDrive interface represents the physical floppy drive
4898 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
4899 </desc>
4900 <attribute name="name" type="wstring" readonly="yes">
4901 <desc>
4902 Returns the platform-specific device identifier.
4903 On DOS-like platforms, it is a drive name (e.g. A:).
4904 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
4905 </desc>
4906 </attribute>
4907 <attribute name="description" type="wstring" readonly="yes">
4908 <desc>
4909 Returns a human readable description for the drive. This
4910 description usually contains the product and vendor name. A
4911 @c null string is returned if the description is not available.
4912 </desc>
4913 </attribute>
4914 <attribute name="udi" type="wstring" readonly="yes">
4915 <desc>
4916 Returns the unique device identifier for the drive. This
4917 attribute is reserved for future use instead of
4918 <link to="#name"/>. Currently it is not used and may return
4919 @c null on some platforms.
4920 </desc>
4921 </attribute>
4922 </interface>
4923
4924 <enumerator
4925 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
4926 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
4927 />
4928
4929 <collection
4930 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
4931 enumerator="IHostFloppyDriveEnumerator"
4932 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
4933 readonly="yes"
4934 >
4935 <method name="findByName">
4936 <desc>
4937 Searches this collection for a host drive with the given name.
4938 <note>
4939 The method returns an error if the given name does not
4940 correspond to any host drive in the collection.
4941 </note>
4942 </desc>
4943 <param name="name" type="wstring" dir="in">
4944 <desc>Name of the host drive to search for</desc>
4945 </param>
4946 <param name="drive" type="IHostFloppyDrive" dir="return">
4947 <desc>Found host drive object</desc>
4948 </param>
4949 </method>
4950 </collection>
4951
4952 <interface
4953 name="IHostNetworkInterface" extends="$unknown"
4954 uuid="F4512D7C-B074-4e97-99B8-6D2BD27C3F5A"
4955 wsmap="managed"
4956 >
4957 <attribute name="name" type="wstring" readonly="yes">
4958 <desc>Returns the host network interface name.</desc>
4959 </attribute>
4960
4961 <attribute name="id" type="uuid" readonly="yes">
4962 <desc>Returns the interface UUID.</desc>
4963 </attribute>
4964 </interface>
4965
4966 <enumerator
4967 name="IHostNetworkInterfaceEnumerator" type="IHostNetworkInterface"
4968 uuid="7B52FEF7-56E8-4aec-92F5-15E6D11EC630"
4969 />
4970
4971 <collection
4972 name="IHostNetworkInterfaceCollection" type="IHostNetworkInterface"
4973 enumerator="IHostNetworkInterfaceEnumerator"
4974 uuid="BF1D41F2-B97B-4314-A0FB-D4823AF42FB5"
4975 readonly="yes"
4976 >
4977 <method name="findByName">
4978 <desc>
4979 Searches this collection for a host network interface with the given name.
4980 <note>
4981 The method returns an error if the given name does not
4982 correspond to any host network interface in the collection.
4983 </note>
4984 </desc>
4985 <param name="name" type="wstring" dir="in">
4986 <desc>Name of the host network interface to search for.</desc>
4987 </param>
4988 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
4989 <desc>Found host network interface object.</desc>
4990 </param>
4991 </method>
4992 <method name="findById">
4993 <desc>
4994 Searches this collection for a host network interface with the given GUID.
4995 <note>
4996 The method returns an error if the given GUID does not
4997 correspond to any host network interface in the collection.
4998 </note>
4999 </desc>
5000 <param name="id" type="uuid" dir="in">
5001 <desc>GUID of the host network interface to search for.</desc>
5002 </param>
5003 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5004 <desc>Found host network interface object.</desc>
5005 </param>
5006 </method>
5007 </collection>
5008
5009 <interface
5010 name="IHost" extends="$unknown"
5011 uuid="489fb370-c227-4d43-9761-ceb28484fd9f"
5012 wsmap="managed"
5013 >
5014 <desc>
5015 The IHost interface represents the physical machine that this VirtualBox
5016 installation runs on.
5017
5018 An object implementing this interface is returned by the
5019 <link to="IVirtualBox::host" /> attribute. This interface contains
5020 read-only information about the host's physical hardware (such as what
5021 processors, and disks are available, what the host operating system is,
5022 and so on) and also allows for manipulating some of the host's hardware,
5023 such as global USB device filters and host interface networking.
5024
5025 </desc>
5026 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
5027 <desc>List of DVD drives available on the host.</desc>
5028 </attribute>
5029
5030 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
5031 <desc>List of floppy drives available on the host.</desc>
5032 </attribute>
5033
5034 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5035 <desc>
5036 List of USB devices currently attached to the host.
5037 Once a new device is physically attached to the host computer,
5038 it appears in this list and remains there until detached.
5039
5040 <note>
5041 This method may set a @ref com_warnings "warning result code".
5042 </note>
5043 <note>
5044 If USB functionality is not available in the given edition of
5045 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5046 </note>
5047 </desc>
5048 </attribute>
5049
5050 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
5051 <desc>
5052 List of USB device filters in action.
5053 When a new device is physically attached to the host computer,
5054 filters from this list are applied to it (in order they are stored
5055 in the list). The first matched filter will determine the
5056 <link to="IHostUSBDeviceFilter::action">action</link>
5057 performed on the device.
5058
5059 Unless the device is ignored by these filters, filters of all
5060 currently running virtual machines
5061 (<link to="IUSBController::deviceFilters"/>) are applied to it.
5062
5063 <note>
5064 This method may set a @ref com_warnings "warning result code".
5065 </note>
5066 <note>
5067 If USB functionality is not available in the given edition of
5068 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5069 </note>
5070
5071 <see>IHostUSBDeviceFilter, USBDeviceState</see>
5072 </desc>
5073 </attribute>
5074
5075 <attribute name="networkInterfaces" type="IHostNetworkInterfaceCollection" readonly="yes">
5076 <desc>List of host network interfaces currently defined on the host.</desc>
5077 </attribute>
5078
5079 <attribute name="processorCount" type="unsigned long" readonly="yes">
5080 <desc>Number of (logical) CPUs installed in the host system.</desc>
5081 </attribute>
5082
5083 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
5084 <desc>Number of (logical) CPUs online in the host system.</desc>
5085 </attribute>
5086
5087 <method name="getProcessorSpeed">
5088 <desc>Query the (approximate) maximum speed of a specified host CPU in Megahertz.</desc>
5089 <param name="cpuId" type="unsigned long" dir="in">
5090 <desc>
5091 Identifier of the CPU.
5092 </desc>
5093 </param>
5094 <param name="speed" type="unsigned long" dir="return">
5095 <desc>
5096 Speed value. 0 is returned if value is not known or @a cpuId is
5097 invalid.
5098 </desc>
5099 </param>
5100 </method>
5101
5102 <method name="getProcessorDescription">
5103 <desc>Query the model string of a specified host CPU.</desc>
5104 <param name="cpuId" type="unsigned long" dir="in">
5105 <desc>
5106 Identifier of the CPU.
5107 </desc>
5108 </param>
5109 <param name="description" type="wstring" dir="return">
5110 <desc>
5111 Model string. A NULL string is returned if value is not known or
5112 @a cpuId is invalid.
5113 </desc>
5114 </param>
5115 </method>
5116
5117 <attribute name="memorySize" type="unsigned long" readonly="yes">
5118 <desc>Amount of system memory in megabytes installed in the host system.</desc>
5119 </attribute>
5120
5121 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
5122 <desc>Available system memory in the host system.</desc>
5123 </attribute>
5124
5125 <attribute name="operatingSystem" type="wstring" readonly="yes">
5126 <desc>Name of the host system's operating system.</desc>
5127 </attribute>
5128
5129 <attribute name="OSVersion" type="wstring" readonly="yes">
5130 <desc>Host operating system's version string.</desc>
5131 </attribute>
5132
5133 <attribute name="UTCTime" type="long long" readonly="yes">
5134 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
5135 </attribute>
5136
5137<if target="midl">
5138 <method name="createHostNetworkInterface">
5139 <desc>
5140 Creates a new adapter for Host Interface Networking.
5141 </desc>
5142 <param name="name" type="wstring" dir="in">
5143 <desc>
5144 Adapter name.
5145 </desc>
5146 </param>
5147 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5148 <desc>
5149 Created host interface object.
5150 </desc>
5151 </param>
5152 <param name="progress" type="IProgress" dir="return">
5153 <desc>
5154 Progress object to track the operation completion.
5155 </desc>
5156 </param>
5157 </method>
5158 <method name="removeHostNetworkInterface">
5159 <desc>
5160 Removes the given host network interface.
5161 </desc>
5162 <param name="id" type="uuid" dir="in">
5163 <desc>
5164 Adapter GUID.
5165 </desc>
5166 </param>
5167 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5168 <desc>
5169 Removed host interface object.
5170 </desc>
5171 </param>
5172 <param name="progress" type="IProgress" dir="return">
5173 <desc>
5174 Progress object to track the operation completion.
5175 </desc>
5176 </param>
5177 </method>
5178</if>
5179
5180 <method name="createUSBDeviceFilter">
5181 <desc>
5182 Creates a new USB device filter. All attributes except
5183 the filter name are set to <tt>null</tt> (any match),
5184 <i>active</i> is <tt>false</tt> (the filter is not active).
5185
5186 The created filter can be added to the list of filters using
5187 <link to="#insertUSBDeviceFilter()"/>.
5188
5189 <see>#USBDeviceFilters</see>
5190 </desc>
5191 <param name="name" type="wstring" dir="in">
5192 <desc>
5193 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
5194 for more info.
5195 </desc>
5196 </param>
5197 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5198 <desc>Created filter object.</desc>
5199 </param>
5200 </method>
5201
5202 <method name="insertUSBDeviceFilter">
5203 <desc>
5204 Inserts the given USB device to the specified position
5205 in the list of filters.
5206
5207 Positions are numbered starting from <tt>0</tt>. If the specified
5208 position is equal to or greater than the number of elements in
5209 the list, the filter is added to the end of the collection.
5210
5211 <note>
5212 Duplicates are not allowed, so an attempt to insert a
5213 filter that is already in the list, will return an
5214 error.
5215 </note>
5216 <note>
5217 This method may set a @ref com_warnings "warning result code".
5218 </note>
5219 <note>
5220 If USB functionality is not available in the given edition of
5221 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5222 </note>
5223
5224 <see>#USBDeviceFilters</see>
5225 </desc>
5226 <param name="position" type="unsigned long" dir="in">
5227 <desc>Position to insert the filter to.</desc>
5228 </param>
5229 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
5230 <desc>USB device filter to insert.</desc>
5231 </param>
5232 </method>
5233
5234 <method name="removeUSBDeviceFilter">
5235 <desc>
5236 Removes a USB device filter from the specified position in the
5237 list of filters.
5238
5239 Positions are numbered starting from <tt>0</tt>. Specifying a
5240 position equal to or greater than the number of elements in
5241 the list will produce an error.
5242
5243 <note>
5244 This method may set a @ref com_warnings "warning result code".
5245 </note>
5246 <note>
5247 If USB functionality is not available in the given edition of
5248 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5249 </note>
5250
5251 <see>#USBDeviceFilters</see>
5252 </desc>
5253 <param name="position" type="unsigned long" dir="in">
5254 <desc>Position to remove the filter from.</desc>
5255 </param>
5256 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5257 <desc>Removed USB device filter.</desc>
5258 </param>
5259 </method>
5260
5261 </interface>
5262
5263 <!--
5264 // ISystemProperties
5265 /////////////////////////////////////////////////////////////////////////
5266 -->
5267
5268 <interface
5269 name="ISystemProperties"
5270 extends="$unknown"
5271 uuid="c7c060a9-91af-4e74-9188-a6b15a725e49"
5272 wsmap="managed"
5273 >
5274 <desc>
5275 The ISystemProperties interface represents global properties of the given
5276 VirtualBox installation.
5277
5278 These properties define limits and default values for various attributes
5279 and parameters. Most of the properties are read-only, but some can be
5280 changed by a user.
5281 </desc>
5282
5283 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
5284 <desc>Minium guest system memory in Megabytes.</desc>
5285 </attribute>
5286
5287 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
5288 <desc>Maximum guest system memory in Megabytes.</desc>
5289 </attribute>
5290
5291 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
5292 <desc>Minimum guest video memory in Megabytes.</desc>
5293 </attribute>
5294
5295 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
5296 <desc>Maximum guest video memory in Megabytes.</desc>
5297 </attribute>
5298
5299 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
5300 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
5301 </attribute>
5302
5303 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
5304 <desc>
5305 Number of network adapters associated with every
5306 <link to="IMachine"/> instance.
5307 </desc>
5308 </attribute>
5309
5310 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
5311 <desc>
5312 Number of serial ports associated with every
5313 <link to="IMachine"/> instance.
5314 </desc>
5315 </attribute>
5316
5317 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
5318 <desc>
5319 Number of parallel ports associated with every
5320 <link to="IMachine"/> instance.
5321 </desc>
5322 </attribute>
5323
5324 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
5325 <desc>
5326 Maximum device position in the boot order. This value corresponds
5327 to the total number of devices a machine can boot from, to make it
5328 possible to include all possible devices to the boot list.
5329 <see><link to="IMachine::setBootOrder()"/></see>
5330 </desc>
5331 </attribute>
5332
5333 <attribute name="defaultMachineFolder" type="wstring">
5334 <desc>
5335 Full path to the default directory used to create new or open
5336 existing machines when a settings file name contains no
5337 path.
5338
5339 The initial value of this property is
5340 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
5341 VirtualBox_home</link><tt>&gt;/Machines</tt>.
5342
5343 <note>
5344 Setting this property to <tt>null</tt> will restore the
5345 initial value.
5346 </note>
5347 <note>
5348 When settings this property, the specified path can be
5349 absolute (full path) or relative
5350 to the <link to="IVirtualBox::homeFolder">
5351 VirtualBox home directory</link>.
5352 When reading this property, a full path is
5353 always returned.
5354 </note>
5355 <note>
5356 The specified path may not exist, it will be created
5357 when necessary.
5358 </note>
5359
5360 <see>
5361 <link to="IVirtualBox::createMachine()"/>,
5362 <link to="IVirtualBox::openMachine()"/>
5363 </see>
5364 </desc>
5365 </attribute>
5366
5367 <attribute name="defaultHardDiskFolder" type="wstring">
5368 <desc>
5369 Full path to the default directory used to create new or open existing
5370 virtual disks.
5371
5372 This path is used when the storage unit of a hard disk is a regular file
5373 in the host's filesystem and only a file name that contains no path is
5374 given.
5375
5376 The initial value of this property is
5377 <tt>&lt;</tt>
5378 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
5379 <tt>&gt;/HardDisks</tt>.
5380
5381 <note>
5382 Setting this property to <tt>null</tt> will restore the
5383 initial value.
5384 </note>
5385 <note>
5386 When settings this property, the specified path can be relative
5387 to the
5388 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
5389 absolute. When reading this property, a full path is
5390 always returned.
5391 </note>
5392 <note>
5393 The specified path may not exist, it will be created
5394 when necessary.
5395 </note>
5396
5397 <see>
5398 IHardDisk2,
5399 <link to="IVirtualBox::createHardDisk2()"/>,
5400 <link to="IVirtualBox::openHardDisk2()"/>,
5401 <link to="IMedium::location"/>
5402 </see>
5403 </desc>
5404 </attribute>
5405
5406 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
5407 <desc>
5408 List of all hard disk storage formats supported by this VirtualBox
5409 installation.
5410
5411 Note that the virtual hard disk framework is backend-based, therefore
5412 the list of supported formats depends on what backends are currently
5413 installed.
5414
5415 <see>
5416 <link to="IHardDiskFormat"/>,
5417 </see>
5418 </desc>
5419 </attribute>
5420
5421 <attribute name="remoteDisplayAuthLibrary" type="wstring">
5422 <desc>
5423 Library that provides authentication for VRDP clients. The library
5424 is used if a virtual machine's authentication type is set to "external"
5425 in the VM RemoteDisplay configuration.
5426
5427 The system library extension (".DLL" or ".so") must be omitted.
5428 A full path can be specified; if not, then the library must reside on the
5429 system's default library path.
5430
5431 The default value of this property is <tt>VRDPAuth</tt>. There is a library
5432 of that name in one of the default VirtualBox library directories.
5433
5434 For details about VirtualBox authentication libraries and how to implement
5435 them, please refer to the VirtualBox manual.
5436
5437 <note>
5438 Setting this property to <tt>null</tt> will restore the
5439 initial value.
5440 </note>
5441 </desc>
5442 </attribute>
5443
5444 <attribute name="webServiceAuthLibrary" type="wstring">
5445 <desc>
5446 Library that provides authentication for webservice clients. The library
5447 is used if a virtual machine's authentication type is set to "external"
5448 in the VM RemoteDisplay configuration and will be called from
5449 within the <link to="IWebsessionManager::logon" /> implementation.
5450
5451 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
5452 there is no per-VM setting for this, as the webservice is a global
5453 resource (if it is running). Only for this setting (for the webservice),
5454 setting this value to a literal "null" string disables authentication,
5455 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
5456 no matter what user name and password are supplied.
5457
5458 The initial value of this property is <tt>VRDPAuth</tt>,
5459 meaning that the webservice will use the same authentication
5460 library that is used by default for VBoxVRDP (again, see
5461 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
5462 The format and calling convetion of authentication libraries
5463 is the same for the webservice as it is for VBoxVRDP.
5464
5465 </desc>
5466 </attribute>
5467
5468 <attribute name="HWVirtExEnabled" type="boolean">
5469 <desc>
5470 This specifies the default value for hardware virtualization
5471 extensions. If enabled, virtual machines will make use of
5472 hardware virtualization extensions such as Intel VT-x and
5473 AMD-V by default. This value can be overridden by each VM
5474 using their <link to="IMachine::HWVirtExEnabled" /> property.
5475 </desc>
5476 </attribute>
5477
5478 <attribute name="LogHistoryCount" type="unsigned long">
5479 <desc>
5480 This value specifies how many old release log files are kept.
5481 </desc>
5482 </attribute>
5483 </interface>
5484
5485 <!--
5486 // IGuest
5487 /////////////////////////////////////////////////////////////////////////
5488 -->
5489
5490 <interface
5491 name="IGuestOSType" extends="$unknown"
5492 uuid="da94f478-1f37-4726-b750-2235950dc2fe"
5493 wsmap="struct"
5494 >
5495 <desc>
5496 </desc>
5497
5498 <attribute name="id" type="wstring" readonly="yes">
5499 <desc>Guest OS identifier string.</desc>
5500 </attribute>
5501
5502 <attribute name="description" type="wstring" readonly="yes">
5503 <desc>Human readable description of the guest OS.</desc>
5504 </attribute>
5505
5506 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
5507 <desc>Recommended RAM size in Megabytes.</desc>
5508 </attribute>
5509
5510 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
5511 <desc>Recommended video RAM size in Megabytes.</desc>
5512 </attribute>
5513
5514 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
5515 <desc>Recommended hard disk size in Megabytes.</desc>
5516 </attribute>
5517 </interface>
5518
5519
5520 <enumerator
5521 name="IGuestOSTypeEnumerator" type="IGuestOSType"
5522 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
5523 />
5524
5525 <collection
5526 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
5527 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
5528 readonly="yes"
5529 />
5530
5531 <interface
5532 name="IGuest" extends="$unknown"
5533 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
5534
5535 wsmap="suppress"
5536 >
5537 <desc>
5538 The IGuest interface represents information about the operating system
5539 running inside the virtual machine. Used in
5540 <link to="IConsole::guest"/>.
5541
5542 IGuest provides information about the guest operating system, whether
5543 Guest Additions are installed and other OS-specific virtual machine
5544 properties.
5545 </desc>
5546
5547 <attribute name="OSTypeId" type="wstring" readonly="yes">
5548 <desc>
5549 Identifier of the Guest OS type as reported by the Guest
5550 Additions.
5551 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
5552 an IGuestOSType object representing details about the given
5553 Guest OS type.
5554 <note>
5555 If Guest Additions are not installed, this value will be
5556 the same as <link to="IMachine::OSTypeId"/>.
5557 </note>
5558 </desc>
5559 </attribute>
5560
5561 <attribute name="additionsActive" type="boolean" readonly="yes">
5562 <desc>
5563 Flag whether the Guest Additions are installed and active
5564 in which case their version will be returned by the
5565 <link to="#additionsVersion"/> property.
5566 </desc>
5567 </attribute>
5568
5569 <attribute name="additionsVersion" type="wstring" readonly="yes">
5570 <desc>
5571 Version of the Guest Additions (3 decimal numbers separated
5572 by dots) or empty when the Additions are not installed. The
5573 Additions may also report a version but yet not be active as
5574 the version might be refused by VirtualBox (incompatible) or
5575 other failures occurred.
5576 </desc>
5577 </attribute>
5578
5579 <attribute name="supportsSeamless" type="boolean" readonly="yes">
5580 <desc>
5581 Flag whether seamless guest display rendering (seamless desktop
5582 integration) is supported.
5583 </desc>
5584 </attribute>
5585
5586 <attribute name="supportsGraphics" type="boolean" readonly="yes">
5587 <desc>
5588 Flag whether the guest is in graphics mode. If it is not, then
5589 seamless rendering will not work, resize hints are not immediately
5590 acted on and guest display resizes are probably not initiated by
5591 the guest additions.
5592 </desc>
5593 </attribute>
5594
5595 <attribute name="memoryBalloonSize" type="unsigned long">
5596 <desc>Guest system memory balloon size in megabytes.</desc>
5597 </attribute>
5598
5599 <attribute name="statisticsUpdateInterval" type="unsigned long">
5600 <desc>Interval to update guest statistics in seconds.</desc>
5601 </attribute>
5602
5603 <method name="setCredentials">
5604 <desc>
5605 Store login credentials that can be queried by guest operating
5606 systems with Additions installed. The credentials are transient
5607 to the session and the guest may also choose to erase them. Note
5608 that the caller cannot determine whether the guest operating system
5609 has queried or made use of the credentials.
5610 </desc>
5611 <param name="userName" type="wstring" dir="in">
5612 <desc>User name string, can be empty</desc>
5613 </param>
5614 <param name="password" type="wstring" dir="in">
5615 <desc>Password string, can be empty</desc>
5616 </param>
5617 <param name="domain" type="wstring" dir="in">
5618 <desc>Domain name (guest logon scheme specific), can be emtpy</desc>
5619 </param>
5620 <param name="allowInteractiveLogon" type="boolean" dir="in">
5621 <desc>
5622 Flag whether the guest should alternatively allow the user to
5623 interactively specify different credentials. This flag might
5624 not be supported by all versions of the Additions.
5625 </desc>
5626 </param>
5627 </method>
5628
5629 <method name="getStatistic">
5630 <desc>
5631 Query specified guest statistics as reported by the VirtualBox Additions.
5632 </desc>
5633 <param name="cpuId" type="unsigned long" dir="in">
5634 <desc>Virtual CPU id; not relevant for all statistic types</desc>
5635 </param>
5636 <param name="statistic" type="GuestStatisticType" dir="in">
5637 <desc>Statistic type.</desc>
5638 </param>
5639 <param name="statVal" type="unsigned long" dir="out">
5640 <desc>Statistics value</desc>
5641 </param>
5642 </method>
5643
5644 </interface>
5645
5646
5647 <!--
5648 // IProgress
5649 /////////////////////////////////////////////////////////////////////////
5650 -->
5651
5652 <enumerator
5653 name="IProgressEnumerator" type="IProgress"
5654 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
5655 />
5656
5657 <collection
5658 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
5659 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
5660 readonly="yes"
5661 />
5662
5663 <interface
5664 name="IProgress" extends="$unknown"
5665 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
5666 wsmap="managed"
5667 >
5668 <desc>
5669 The IProgress interface represents a task progress object that allows
5670 to wait for the completion of some asynchronous task.
5671
5672 The task consists of one or more operations that run sequentially,
5673 one after one. There is an individual percent of completion of the
5674 current operation and the percent of completion of the task as a
5675 whole. Similarly, you can wait for the completion of a particular
5676 operation or for the completion of the whole task.
5677
5678 Every operation is identified by a number (starting from 0)
5679 and has a separate description.
5680 </desc>
5681
5682 <attribute name="id" type="uuid" readonly="yes">
5683 <desc>ID of the task.</desc>
5684 </attribute>
5685
5686 <attribute name="description" type="wstring" readonly="yes">
5687 <desc>Description of the task.</desc>
5688 </attribute>
5689
5690 <attribute name="initiator" type="$unknown" readonly="yes">
5691 <desc>Initiator of the task.</desc>
5692 </attribute>
5693
5694 <attribute name="cancelable" type="boolean" readonly="yes">
5695 <desc>Whether the task can be interrupted.</desc>
5696 </attribute>
5697
5698 <attribute name="percent" type="long" readonly="yes">
5699 <desc>
5700 Current task progress value in percent.
5701 This value depends on how many operations are already complete.
5702 </desc>
5703 </attribute>
5704
5705 <attribute name="completed" type="boolean" readonly="yes">
5706 <desc>Whether the task has been completed.</desc>
5707 </attribute>
5708
5709 <attribute name="canceled" type="boolean" readonly="yes">
5710 <desc>Whether the task has been canceled.</desc>
5711 </attribute>
5712
5713 <attribute name="resultCode" type="result" readonly="yes">
5714 <desc>
5715 Result code of the progress task.
5716 Valid only if <link to="#completed"/> is true.
5717 </desc>
5718 </attribute>
5719
5720 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
5721 <desc>
5722 Extended information about the unsuccessful result of the
5723 progress operation. May be NULL when no extended information
5724 is available.
5725 Valid only if <link to="#completed"/> is true and
5726 <link to="#resultCode"/> indicates a failure.
5727 </desc>
5728 </attribute>
5729
5730 <attribute name="operationCount" type="unsigned long" readonly="yes">
5731 <desc>
5732 Number of operations this task is divided into.
5733 Every task consists of at least one operation.
5734 </desc>
5735 </attribute>
5736
5737 <attribute name="operation" type="unsigned long" readonly="yes">
5738 <desc>Number of the operation being currently executed.</desc>
5739 </attribute>
5740
5741 <attribute name="operationDescription" type="wstring" readonly="yes">
5742 <desc>
5743 Description of the operation being currently executed.
5744 </desc>
5745 </attribute>
5746
5747 <attribute name="operationPercent" type="long" readonly="yes">
5748 <desc>Current operation progress value in percent.</desc>
5749 </attribute>
5750
5751 <method name="waitForCompletion">
5752 <desc>
5753 Waits until the task is done (including all operations) with a
5754 given timeout.
5755 </desc>
5756 <param name="timeout" type="long" dir="in">
5757 <desc>
5758 Timeout value in milliseconds.
5759 Specify -1 for an indefinite wait.
5760 </desc>
5761 </param>
5762 </method>
5763
5764 <method name="waitForOperationCompletion">
5765 <desc>
5766 Waits until the given operation is done with a given timeout.
5767 </desc>
5768 <param name="operation" type="unsigned long" dir="in">
5769 <desc>
5770 Number of the operation to wait for.
5771 Must be less than <link to="#operationCount"/>.
5772 </desc>
5773 </param>
5774 <param name="timeout" type="long" dir="in">
5775 <desc>
5776 Timeout value in milliseconds.
5777 Specify -1 for an indefinite wait.
5778 </desc>
5779 </param>
5780 </method>
5781
5782 <method name="cancel">
5783 <desc>
5784 Cancels the task.
5785 <note>
5786 If <link to="#cancelable"/> is <tt>false</tt>, then
5787 this method will fail.
5788 </note>
5789 </desc>
5790 </method>
5791
5792 </interface>
5793
5794
5795 <!--
5796 // ISnapshot
5797 /////////////////////////////////////////////////////////////////////////
5798 -->
5799
5800 <enumerator
5801 name="ISnapshotEnumerator" type="ISnapshot"
5802 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
5803 />
5804
5805 <collection
5806 name="ISnapshotCollection" type="ISnapshot"
5807 enumerator="ISnapshotEnumerator"
5808 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
5809 readonly="yes"
5810 />
5811
5812 <interface
5813 name="ISnapshot" extends="$unknown"
5814 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
5815 wsmap="managed"
5816 >
5817 <desc>
5818 The ISnapshot interface represents a snapshot of the virtual
5819 machine.
5820
5821 The <i>snapshot</i> stores all the information about a virtual
5822 machine necessary to bring it to exactly the same state as it was at
5823 the time of taking the snapshot. The snapshot includes:
5824
5825 <ul>
5826 <li>all settings of the virtual machine (i.e. its hardware
5827 configuration: RAM size, attached hard disks, etc.)
5828 </li>
5829 <li>the execution state of the virtual machine (memory contents,
5830 CPU state, etc.).
5831 </li>
5832 </ul>
5833
5834 Snapshots can be <i>offline</i> (taken when the VM is powered off)
5835 or <i>online</i> (taken when the VM is running). The execution
5836 state of the offline snapshot is called a <i>zero execution state</i>
5837 (it doesn't actually contain any information about memory contents
5838 or the CPU state, assuming that all hardware is just powered off).
5839
5840 <h3>Snapshot branches</h3>
5841
5842 Snapshots can be chained. Chained snapshots form a branch where
5843 every next snapshot is based on the previous one. This chaining is
5844 mostly related to hard disk branching (see <link to="IHardDisk2"/>
5845 description). This means that every time a new snapshot is created,
5846 a new differencing hard disk is implicitly created for all normal
5847 hard disks attached to the given virtual machine. This allows to
5848 fully restore hard disk contents when the machine is later reverted
5849 to a particular snapshot.
5850
5851 In the current implementation, multiple snapshot branches within one
5852 virtual machine are not allowed. Every machine has a single branch,
5853 and <link to="IConsole::takeSnapshot()"/> operation adds a new
5854 snapshot to the top of that branch.
5855
5856 Existings snapshots can be discarded using
5857 <link to="IConsole::discardSnapshot()"/>.
5858
5859 <h3>Current snapshot</h3>
5860
5861 Every virtual machine has a current snapshot, identified by
5862 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
5863 a base for the <i>current machine state</i> (see below), to the effect
5864 that all normal hard disks of the machine and its execution
5865 state are based on this snapshot.
5866
5867 In the current implementation, the current snapshot is always the
5868 last taken snapshot (i.e. the head snapshot on the branch) and it
5869 cannot be changed.
5870
5871 The current snapshot is <tt>null</tt> if the machine doesn't have
5872 snapshots at all; in this case the current machine state is just
5873 current settings of this machine plus its current execution state.
5874
5875 <h3>Current machine state</h3>
5876
5877 The current machine state is what represented by IMachine instances got
5878 directly from IVirtualBox
5879 using <link
5880 to="IVirtualBox::getMachine()">getMachine()</link>, <link
5881 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
5882 to instances returned by <link to="ISnapshot::machine"/>). This state
5883 is always used when the machine is <link to="IConsole::powerUp"> powered
5884 on</link>.
5885
5886 The current machine state also includes the current execution state.
5887 If the machine is being currently executed
5888 (<link to="IMachine::state"/> is <link to="MachineState::Running"/>
5889 and above), its execution state is just what's happening now.
5890 If it is powered off (<link to="MachineState::PoweredOff"/> or
5891 <link to="MachineState::Aborted"/>), it has a zero execution state.
5892 If the machine is saved (<link to="MachineState::Saved"/>), its
5893 execution state is what saved in the execution state file
5894 (<link to="IMachine::stateFilePath"/>).
5895
5896 If the machine is in the saved state, then, next time it is powered
5897 on, its execution state will be fully restored from the saved state
5898 file and the execution will continue from the point where the state
5899 was saved.
5900
5901 Similarly to snapshots, the current machine state can be discarded
5902 using <link to="IConsole::discardCurrentState()"/>.
5903
5904 <h3>Taking and discarding snapshots</h3>
5905
5906 The table below briefly explains the meaning of every snapshot
5907 operation:
5908
5909 <table>
5910 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
5911
5912 <tr><td><link to="IConsole::takeSnapshot()"/></td>
5913
5914 <td>Save the current state of the virtual machine, including all
5915 settings, contents of normal hard disks and the current modifications
5916 to immutable hard disks (for online snapshots)</td>
5917
5918 <td>The current state is not changed (the machine will continue
5919 execution if it is being executed when the snapshot is
5920 taken)</td></tr>
5921
5922 <tr><td><link to="IConsole::discardSnapshot()"/></td>
5923
5924 <td>Forget the state of the virtual machine stored in the snapshot:
5925 dismiss all saved settings and delete the saved execution state (for
5926 online snapshots)</td>
5927
5928 <td>Other snapshots (including child snapshots, if any) and the
5929 current state are not directly affected</td></tr>
5930
5931 <tr><td><link to="IConsole::discardCurrentState()"/></td>
5932
5933 <td>Restore the current state of the virtual machine from the state
5934 stored in the current snapshot, including all settings and hard disk
5935 contents</td>
5936
5937 <td>The current state of the machine existed prior to this operation
5938 is lost</td></tr>
5939
5940 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
5941
5942 <td>Completely revert the virtual machine to the state it was in
5943 before the current snapshot has been taken</td>
5944
5945 <td>The current state, as well as the current snapshot, are
5946 lost</td></tr>
5947
5948 </table>
5949
5950 </desc>
5951
5952 <attribute name="id" type="uuid" readonly="yes">
5953 <desc>UUID of the snapshot.</desc>
5954 </attribute>
5955
5956 <attribute name="name" type="wstring">
5957 <desc>Short name of the snapshot.</desc>
5958 </attribute>
5959
5960 <attribute name="description" type="wstring">
5961 <desc>Optional description of the snapshot.</desc>
5962 </attribute>
5963
5964 <attribute name="timeStamp" type="long long" readonly="yes">
5965 <desc>
5966 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
5967 </desc>
5968 </attribute>
5969
5970 <attribute name="online" type="boolean" readonly="yes">
5971 <desc>
5972 <tt>true</tt> if this snapshot is an online snapshot and
5973 <tt>false</tt> otherwise.
5974
5975 <note>
5976 When this attribute is <tt>true</tt>, the
5977 <link to="IMachine::stateFilePath"/> attribute of the
5978 <link to="#machine"/> object associated with this snapshot
5979 will point to the saved state file. Otherwise, it will be
5980 <tt>null</tt>.
5981 </note>
5982 </desc>
5983 </attribute>
5984
5985 <attribute name="machine" type="IMachine" readonly="yes">
5986 <desc>
5987 Virtual machine this snapshot is taken on. This object
5988 stores all settings the machine had when taking this snapshot.
5989 <note>
5990 The returned machine object is immutable, i.e. no
5991 any settings can be changed.
5992 </note>
5993 </desc>
5994 </attribute>
5995
5996 <attribute name="parent" type="ISnapshot" readonly="yes">
5997 <desc>
5998 Parent snapshot (a snapshot this one is based on).
5999 <note>
6000 It's not an error to read this attribute on a snapshot
6001 that doesn't have a parent -- a null object will be
6002 returned to indicate this.
6003 </note>
6004 </desc>
6005 </attribute>
6006
6007 <attribute name="children" type="ISnapshotCollection" readonly="yes">
6008 <desc>
6009 Child snapshots (all snapshots having this one as a parent).
6010 <note>
6011 In the current implementation, there can be only one
6012 child snapshot, or no children at all, meaning this is the
6013 last (head) snapshot.
6014 </note>
6015 </desc>
6016 </attribute>
6017
6018 </interface>
6019
6020
6021 <!--
6022 // IMedia
6023 /////////////////////////////////////////////////////////////////////////
6024 -->
6025
6026 <enum
6027 name="MediaState"
6028 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
6029 >
6030 <desc>
6031 Virtual media state.
6032 <see>IMedia</see>
6033 </desc>
6034
6035 <const name="NotCreated" value="0">
6036 <desc>
6037 Associated media storage does not exist (either was not created yet or
6038 was deleted).
6039 </desc>
6040 </const>
6041 <const name="Created" value="1">
6042 <desc>
6043 Associated storage exists and accessible.
6044 </desc>
6045 </const>
6046 <const name="LockedRead" value="2">
6047 <desc>
6048 Media is locked for reading, no data modification is possible.
6049 </desc>
6050 </const>
6051 <const name="LockedWrite" value="3">
6052 <desc>
6053 Media is locked for writing, no concurrent data reading or modification
6054 is possible.
6055 </desc>
6056 </const>
6057 <const name="Inaccessible" value="4">
6058 <desc>
6059 Associated media storage is not accessible.
6060 </desc>
6061 </const>
6062 <const name="Creating" value="5">
6063 <desc>
6064 Associated media storage is being created.
6065 </desc>
6066 </const>
6067 <const name="Deleting" value="6">
6068 <desc>
6069 Associated media storage is being deleted.
6070 </desc>
6071 </const>
6072 </enum>
6073
6074 <interface
6075 name="IMedium" extends="$unknown"
6076 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
6077 wsmap="managed"
6078 >
6079 <desc>
6080 The IMedium interface is a common interface for all objects representing
6081 virtual media such as hard disks, DVD images.
6082
6083 Each medium is associated with a storage unit (such as a file on the host
6084 computer or a network resource) that holds actual data. The location of
6085 the storage unit is represented by the #location attribute. The value of
6086 this attribute is media type dependent.
6087
6088 The exact media type may be determined by querying the appropriate
6089 interface such as:
6090 <ul>
6091 <li>IHardDisk2 (virtual hard disks)</li>
6092 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
6093 <li>IFloppyImage2 (raw floppy image files)</li>
6094 </ul>
6095
6096 Existing media are opened using the following methods, depending on the
6097 media type:
6098 <ul>
6099 <li><link to="IVirtualBox::openHardDisk2()"/></li>
6100 <li><link to="IVirtualBox::openDVDImage()"/></li>
6101 <li><link to="IVirtualBox::openFloppyImage()"/></li>
6102 </ul>
6103
6104 New hard disk media are created using the
6105 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
6106 images are created outside VirtualBox, usually by storing a copy
6107 of the real medium of the corresponding type in a regular file.
6108
6109 <h3>Known Media</h3>
6110
6111 When an existing medium gets opened for the first time, it gets
6112 automatically remembered by the given VirtualBox installation or, in other
6113 words, becomes a <i>known medium</i>. Known media are stored in the media
6114 registry transparently maintaned by VirtualBox and stored in settings
6115 files so that this registry is preserved when VirtualBox is not running.
6116
6117 Newly created virtual hard disks get remembered only when the associated
6118 storage unit is actually created (see IHardDisk2 for more details).
6119
6120 All known media can be enumerated using
6121 <link to="IVirtualBox::hardDisks2"/>,
6122 <link to="IVirtualBox::DVDImages"/> and
6123 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
6124 quickly found by by UUID using <link to="IVirtualBox::getHardDisk2()"/>
6125 and similar methods or by location using
6126 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
6127
6128 Only known media can be attached to virtual machines.
6129
6130 Removing known media from the media registry is performed when the given
6131 medium is closed using the <link to="#close()"/> method or when its
6132 associated storage unit is deleted (only for hard disks).
6133
6134 <h3>Accessibility Checks</h3>
6135
6136 The given medium (with the created storage unit) is considered to be
6137 <i>accessible</i> when its storage unit can be successfully read from.
6138 Accessible media are indicated by the <link to="MediaState::Created"/>
6139 value of the <link to="#state"/> attribute. When the storage unit cannot
6140 be read (for example, because it is located on a disconnected network
6141 resource, or was accidentially deleted outside VirtualBox), the medium is
6142 considered to be <i>inaccessible</i> which is indicated by the
6143 <link to="MediaState::Inaccessible"/> state. The details about the reason
6144 of being inaccessible can be obtained using the
6145 <link to="#lastAccessError"/> attribute.
6146
6147 A new accessiblity check is performed each time the <link to="#state"/>
6148 attribute is read. Please note that this check may take long time (several
6149 seconds or even minutes, depending on the storage unit location and
6150 format), and will block the calling thread until finished. For this
6151 reason, it is recommended to never read this attribute on the main UI
6152 thread to avoid making the UI unresponsive.
6153
6154 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
6155 created for the first time), all known media are in the
6156 <link to="MediaState::Inaccessible"/> state but the value of the <link
6157 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
6158 accessibility check is made on startup. This is done to make the
6159 VirtualBox object ready for serving requests as
6160 fast as possible and let the end-user application decide if it needs to
6161 check media accessibility right away or not.
6162 </desc>
6163
6164 <attribute name="id" type="uuid" readonly="yes">
6165 <desc>
6166 UUID of the medium. For a newly created medium, this value is a randomly
6167 generated UUID.
6168 </desc>
6169 </attribute>
6170
6171 <attribute name="description" type="wstring">
6172 <desc>
6173 Optional description of the medium. For newly created media, the value
6174 of this attribute value is <tt>null</tt>.
6175
6176 Media types that don't support this attribute will return E_NOTIMPL in
6177 attempt to get or set this attribute's value.
6178
6179 <note>
6180 For some storage types, reading this attribute may return an outdated
6181 (last known) value when <link to="#state"/> is <link
6182 to="MediaState::Inaccessible"/> or <link
6183 to="MediaState::LockedWrite"/> because the value of this attribute is
6184 stored within the storage unit itself. Also note that changing the
6185 attribute value is not possible in such case, as well as when the
6186 medium is the <link to="MediaState::LockedRead"/> state.
6187 </note>
6188 </desc>
6189 </attribute>
6190
6191 <attribute name="state" type="MediaState" readonly="yes">
6192 <desc>
6193 Current media state. Inspect <link to="MediaState"/> values for details.
6194
6195 Reading this attribute may take long time because a new accessibility
6196 check of the storage unit is performed every time the attribute is read.
6197 This check may cause a significant delay if the storage unit of the
6198 given medium is, for example, a file located on a network share which is
6199 not currently accessible due to connectivity problems -- the call will
6200 not return until a timeout interval defined by the host OS for this
6201 operation expires.
6202
6203 If the last known state of the medium is <link to="MediaState::Created"/>
6204 and the accessibility check fails then the state wull be set to
6205 <link to="MediaState::Inaccessible"/> and <link to="#lastAccessError"/>
6206 may be used to get more details about the failure. If the state of the
6207 medium is <link to="MediaState::LockedRead"/> or
6208 <link to="MediaState::LockedWrite"/> then it remains the same, and a
6209 non-null value of <link to="#lastAccessError"/> will indicate a failed
6210 accessibility check in this case.
6211
6212 Note that not all media states are applicable to certain media types.
6213 For example, states <link to="MediaState::NotCreated"/>,
6214 <link to="MediaState::LockedWrite"/>, <link to="MediaState::Creating"/>,
6215 <link to="MediaState::Deleting"/> are meaningless for IDVDImage2 and
6216 IFloppyImage2 media.
6217 </desc>
6218 </attribute>
6219
6220 <attribute name="location" type="wstring">
6221 <desc>
6222 Location of the storage unit holding media data.
6223
6224 The format of the loocation string is media type specific. For media
6225 types that use regular files in a host's file system, the location
6226 string is just a full file name.
6227
6228 Some media types may support changing the storage unit location by
6229 simply changing the value of this property. If this operation is not
6230 supported, the implementation will return E_NOTIMPL in attempt to set
6231 this attribute's value.
6232
6233 When setting a value of the location attribute which is a regular file
6234 in the host's file system, the given file name may be either relative to
6235 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
6236 absolute. Note that if the given location specification does not contain
6237 the file extension part then a proper default extension will be
6238 automatically appended by the implementation depending on the media type.
6239 </desc>
6240 </attribute>
6241
6242 <attribute name="name" type="wstring" readonly="yes">
6243 <desc>
6244 Name of the storage unit holding media data.
6245
6246 The returned string is a short version of the <link to="#location"/>
6247 attribute that is suitable for representing the medium in situations
6248 where the full location specification is too long (such as lists
6249 and comboboxes in GUI frontends). This string is also used by frontends
6250 to sort the media list alphabetically when needed.
6251
6252 For example, for locations that are regular files in the host's file
6253 system, the value of this attribute is just a file name (+ extension),
6254 without the path specification.
6255
6256 Note that as opposed to the <link to="#location"/> attribute, the name
6257 name attribute will not necessary be unique for a list of media of the
6258 given type and format.
6259 </desc>
6260 </attribute>
6261
6262 <attribute name="size" type="unsigned long long" readonly="yes">
6263 <desc>
6264 Physical size of the storage unit used to hold media data (in bytes).
6265
6266 <note>
6267 For media whose <link to="#state"/> is <link
6268 to="MediaState::Inaccessible"/>, the value of this property is the
6269 last known size. For <link to="MediaState::NotCreated"/> media,
6270 the returned value is zero.
6271 </note>
6272 </desc>
6273 </attribute>
6274
6275 <attribute name="lastAccessError" type="wstring" readonly="yes">
6276 <desc>
6277 Text message that represents the result of the last acccessibility
6278 check.
6279
6280 Accessibility checks are performed each time the <link to="#state"/>
6281 attribute is read. A @c null string is returned if the last
6282 accessibility check was succeessful. A non-null string indicates a
6283 failure and should normally describe a reason of the failure (for
6284 example, a file read error).
6285 </desc>
6286 </attribute>
6287
6288 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
6289 <desc>
6290 Array of UUIDs of all machines this medium is attached to.
6291
6292 A <tt>null</tt> array is returned if this medium is not attached to any
6293 machine or to any machine's snapshot.
6294
6295 <note>
6296 The returned array will include a machine even if this medium is not
6297 attached to that machine in the current state but attached to it in
6298 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
6299 details.
6300 </note>
6301 </desc>
6302 </attribute>
6303
6304 <method name="getSnapshotIds">
6305 <desc>
6306 Returns an array of UUIDs of all snapshots of the given machine where
6307 this medium is attached to it.
6308
6309 If the medium is attached to the machine in the current state, then the
6310 first element in the array will always be the ID of the queried machine
6311 (i.e. the value equal to the @c machineId argument), followed by
6312 snapshit IDs (if any).
6313
6314 If the medium is not attached to the machine in the current state, then
6315 the array will contain only snapshot IDs.
6316
6317 The returned array may be <tt>null</tt> if this medium is not attached
6318 to the given machine at all, neither in the current state nor in one of
6319 snapshots.
6320 </desc>
6321 <param name="machineId" type="uuid" dir="in">
6322 <desc>
6323 UUID of the machine to query.
6324 </desc>
6325 </param>
6326 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
6327 <desc>
6328 Array of snapshot UUIDs of the given machine using this medium.
6329 </desc>
6330 </param>
6331 </method>
6332
6333 <method name="lockRead">
6334 <desc>
6335 Locks this medium for reading.
6336
6337 The read lock is shared: many clients can simultaneously lock the
6338 same media for reading unless it is already locked for writing (see
6339 <link to="#lockWrite()"/>) in which case an error is returned.
6340
6341 When the medium is locked for reading, it cannot be modified from within
6342 VirtualBox. This means that any method that changes the properties of
6343 this medium or contents of the storage unit will return an error (unless
6344 explicitly stated otherwise) and that an attempt to start a virtual
6345 machine that wants to modify the medium will also fail.
6346
6347 When the virtual machine is started up, it locks for reading all media
6348 it uses in read-only mode. If some media cannot be locked for reading,
6349 the startup procedure will fail.
6350
6351 The medium locked for reading must be unlocked using the
6352 <link to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/> can
6353 be nested and must be followed by the same number of paired
6354 <link to="#unlockRead()"/> calls.
6355
6356 This method sets the media state to <link to="MediaState::LockedRead"/>
6357 on success. The state proir to this call must be
6358 <link to="MediaState::Created"/>,
6359 <link to="MediaState::Inaccessible"/> or
6360 <link to="MediaState::LockedRead"/>. As you can see, inacessible media
6361 can be locked too. This is not an error; this method performs a logical
6362 lock that prevents modifications of this media through the VirtualBox
6363 API, not a physical lock of the underlying storage unit.
6364
6365 Either on success or on failure, this method returns the current state
6366 of the medium <b>before</b> the operation.
6367 </desc>
6368 <param name="state" type="MediaState" dir="return">
6369 <desc>
6370 State of the medium after the operation.
6371 </desc>
6372 </param>
6373 </method>
6374
6375 <method name="unlockRead">
6376 <desc>
6377 Cancels the read lock previously set by <link to="#lockRead()"/>.
6378
6379 Either on success or on failure, this method returns the current state
6380 of the medium <b>after</b> the operation.
6381
6382 See <link to="#lockRead()"/> for more details.
6383 </desc>
6384 <param name="state" type="MediaState" dir="return">
6385 <desc>
6386 State of the medium after the operation.
6387 </desc>
6388 </param>
6389 </method>
6390
6391 <method name="lockWrite">
6392 <desc>
6393 Locks this medium for writing.
6394
6395 The write lock, as opposed to <link to="#lockRead()"/>, is exclusive:
6396 there may be only one client that holds a write lock and there may be no
6397 read locks while the write lock is held.
6398
6399 When the medium is locked for writing, it cannot be modified from within
6400 VirtualBox and it is not guaranteed that the values of its properties
6401 are up-to-date. Any method that changes the properties of this medium or
6402 contents of the storage unit will return an error ((unless explicitly
6403 stated otherwise) and an attempt to start a virtual machine that wants
6404 to modify or to read the medium will also fail.
6405
6406 When the virtual machine is started up, it locks for writing all media
6407 it uses to write data to. If some media cannot be locked for writing,
6408 the startup procedure will fail.
6409
6410 The medium locked for writing must be unlocked using the
6411 <link to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
6412 can <b>not</b> be nested and must be followed by a paired
6413 <link to="#unlockWrite()"/> call.
6414
6415 This method sets the media state to <link to="MediaState::LockedWrite"/>
6416 on success. The state proir to this call must be
6417 <link to="MediaState::Created"/> or
6418 <link to="MediaState::Inaccessible"/>. As you can see, inacessible media
6419 can be locked too. This is not an error; this method performs a logical
6420 lock that prevents modifications of this media through the VirtualBox
6421 API, not a physical lock of the underlying storage unit.
6422
6423 Either on success or on failure, this method returns the current state
6424 of the medium <b>before</b> the operation.
6425 </desc>
6426 <param name="state" type="MediaState" dir="return">
6427 <desc>
6428 State of the medium after the operation.
6429 </desc>
6430 </param>
6431 </method>
6432
6433 <method name="unlockWrite">
6434 <desc>
6435 Cancels the write lock previously set by <link to="#lockWrite()"/>.
6436
6437 Either on success or on failure, this method returns the current state
6438 of the medium <b>after</b> the operation.
6439
6440 See <link to="#lockWrite()"/> for more details.
6441 </desc>
6442 <param name="state" type="MediaState" dir="return">
6443 <desc>
6444 State of the medium after the operation.
6445 </desc>
6446 </param>
6447 </method>
6448
6449 <method name="close">
6450 <desc>
6451 Closes this media.
6452
6453 The hard disk must not be attahced to any known virtual machine and must
6454 not have any known child hard disks, otherwise the operation will fail.
6455
6456 When the hard disk is successfully closed, it gets removed from the list
6457 of remembered hard disks, but its storage unit is not deleted. In
6458 particular, this means that this hard disk can be later opened again
6459 using the <link to="IVirtualBox::openHardDisk2"/> call.
6460
6461 Note that after this method successfully returns, the given hard disk
6462 object becomes uninitialized. This means that any attempt to call any of
6463 its methods or attributes will fail with the <tt>"Object not ready"
6464 (E_ACCESSDENIED)</tt> error.
6465 </desc>
6466 </method>
6467
6468 </interface>
6469
6470
6471 <!--
6472 // IHardDisk2
6473 /////////////////////////////////////////////////////////////////////////
6474 -->
6475
6476 <enum
6477 name="HardDiskType"
6478 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
6479 >
6480 <desc>
6481 Virtual hard disk type.
6482 <see>IHardDisk</see>
6483 </desc>
6484
6485 <const name="Normal" value="0">
6486 <desc>
6487 Normal hard disk (attached directly or indirectly, preserved
6488 when taking snapshots).
6489 </desc>
6490 </const>
6491 <const name="Immutable" value="1">
6492 <desc>
6493 Immutable hard disk (attached indirectly, changes are wiped out
6494 after powering off the virtual machine).
6495 </desc>
6496 </const>
6497 <const name="Writethrough" value="2">
6498 <desc>
6499 Write through hard disk (attached directly, ignored when
6500 taking snapshots).
6501 </desc>
6502 </const>
6503 </enum>
6504
6505 <interface
6506 name="IHardDisk2Attachment" extends="$unknown"
6507 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
6508 wsmap="struct"
6509 >
6510 <desc>
6511 The IHardDisk2Attachment interface represents a hard disk attachment of a
6512 virtual machine.
6513
6514 Every hard disk attachments specifies a slot of the virtual hard disk
6515 controller and a virtual virtual hard disk attached to this slot.
6516
6517 The array of hard disk attachments is returned by
6518 <link to="IMachine::hardDisk2Attachments"/>.
6519
6520 <note>
6521 With the COM API, this is an interface like all the others. With the
6522 webservice, this is mapped to a structure, so querying the attribute
6523 will not return an object, but a complete structure.
6524 </note>
6525 </desc>
6526 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
6527 <desc>Hard disk object associated with this attachment.</desc>
6528 </attribute>
6529
6530 <attribute name="bus" type="StorageBus" readonly="yes">
6531 <desc>Interface bus of this attachment.</desc>
6532 </attribute>
6533
6534 <attribute name="channel" type="long" readonly="yes">
6535 <desc>Channel number of this attachment.</desc>
6536 </attribute>
6537
6538 <attribute name="device" type="long" readonly="yes">
6539 <desc>Device slot number of this attachment.</desc>
6540 </attribute>
6541
6542 </interface>
6543
6544 <interface
6545 name="IHardDisk2" extends="IMedium"
6546 uuid="be30c487-3071-4067-8a03-8fed74a80708"
6547 wsmap="managed"
6548 >
6549 <desc>
6550 The IHardDisk2 interface represents a virtual hard disk drive
6551 used by a virtual machine.
6552
6553 Virtual hard disk objects virtualize the hard disk hardware and look like
6554 regular hard disks for the guest OS running inside the virtual machine.
6555
6556 <h3>Hard Disk Types</h3>
6557
6558 There are three types of hard disks:
6559 <link to="HardDiskType::Normal">Normal</link>,
6560 <link to="HardDiskType::Immutable">Immutable</link> and
6561 <link to="HardDiskType::Writethrough">Writethrough</link>. The type of the
6562 hard disk defines how the hard disk is attached to a virtual machine and
6563 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
6564 machine with the attached hard disk is taken. The type of the hard disk is
6565 defined by the <link to="#type"/> attribute.
6566
6567 All hard disks can be also divided in two big groups: <i>base</i> hard
6568 disks and <i>differencing</i> hard disks. A base hard disk contains all
6569 sectors of the hard disk data in its storage unit and therefore can be
6570 used independently. On the contrary, a differencing hard disk contains
6571 only some part of the hard disk data (a subset of sectors) and needs
6572 another hard disk to get access to the missing sectors of data. This
6573 another hard disk is called a <i>parent</i> hard disk and defines a hard
6574 disk to which this differencing hard disk is known to be <i>linked to</i>.
6575 The parent hard disk may be itself a differencing hard disk. This
6576 way, differencing hard disks form a linked hard disk chain. This chain
6577 always ends with the base hard disk which is sometimes referred to as the
6578 root hard disk of this chain. Note that several differencing hard disks
6579 may be linked to the same parent hard disk. This way, all known hard disks
6580 form a hard disk tree which is based on their parent-child relationship.
6581
6582 Differencing hard disks can be distinguished from base hard disks by
6583 querying the <link to="#parent"/> attribute: base hard disks do not have
6584 parents they would depend on, so the value of this attribute is always
6585 <tt>null</tt> for them. Using this attribute, it is possible to walk up
6586 the hard disk tree (from the child hard disk to its parent). It is also
6587 possible to walk down the tree using the <link to="#children"/>
6588 attribute.
6589
6590 Note that the type of all differencing hard disks is
6591 <link to="HardDiskType::Normal">Normal</link>; all other values are
6592 meaningless for them. Base hard disks may be of any type.
6593
6594 <h3>Creating Hard Disks</h3>
6595
6596 New base hard disks are created using
6597 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
6598 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
6599 disks are usually implicitly created by VirtualBox when needed but may
6600 also be created explicitly using <link to="#createDiffStorage()"/>.
6601
6602 After the hard disk is successfully created (including the storage unit)
6603 or opened, it becomes a known hard disk (remembered in the internal media
6604 registry). Known hard disks can be attached to a virtual machine, accessed
6605 through <link to="IVirtualBox::getHardDisk2()"/> and
6606 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
6607 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
6608
6609 The following methods, besides <link to="IMedium::close()"/>,
6610 automatically remove the hard disk from the media registry:
6611 <ul>
6612 <li><link to="#deleteStorage()"/></li>
6613 <li><link to="#mergeTo()"/></li>
6614 </ul>
6615
6616 If the storage unit of the hard disk is a regular file in the host's
6617 filesystem then the rules stated in the description of the
6618 <link to="IMedium::location"/> attribute apply when setting its value. In
6619 addition, a plain file name without any path may be given, in which case
6620 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
6621 folder</link> will be prepended to it.
6622
6623 <h4>Automatic composition of the file name part</h4>
6624
6625 Another extension to the <link to="IMedium::location"/> attribute is that
6626 there is a possibility to cause VirtualBox to compose a unique value for
6627 the file name part of the location using the UUID of the hard disk. This
6628 applies only to hard disks in <link to="MediaState::NotCreated"/> state,
6629 e.g. before the storage unit is created, and works as follows. You set the
6630 value of the <link to="IMedium::location"/> attribute to a location
6631 specification which only contains the path specification but not the file
6632 name part and ends with either a forward slash or a backslash character.
6633 In response, VirtualBox will genereate a new UUID for the hard disk and
6634 compose the file name using the following pattern:
6635 <pre>
6636 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
6637 </pre>
6638 where <tt>&lt;path&gt;</tt> is the supplied path specification,
6639 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
6640 is the default extension for the storage format of this hard disk. After
6641 that, you may call any of the metods that create a new hard disk storage
6642 unit and they will use the generated UUID and file name.
6643
6644 <h3>Attaching Hard Disks</h3>
6645
6646 Hard disks are attached to virtual machines using the
6647 <link to="IMachine::attachHardDisk2()"/> method and detached using the
6648 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
6649 <link to="#type"/>, hard disks are attached either
6650 <i>directly</i> or <i>indirectly</i>.
6651
6652 When a hard disk is being attached directly, it is associated with the
6653 virtual machine and used for hard disk operations when the machine is
6654 running. When a hard disk is being attached indirectly, a new differencing
6655 hard disk linked to it is implicitly created and this differencing hard
6656 disk is associated with the machine and used for hard disk operations.
6657 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
6658 a direct attachment then the same hard disk will be returned in response
6659 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
6660 an indirect attachment is performed then
6661 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
6662 differencing hard disk, not the original one passed to <link
6663 to="IMachine::attachHardDisk2()"/>. The following table shows the
6664 dependency of the attachment type on the hard disk type:
6665
6666 <table>
6667 <tr>
6668 <th>Hard Disk Type</th>
6669 <th>Direct or Indirect?</th>
6670 </tr>
6671 <tr>
6672 <td>Normal (Base)</td>
6673 <td>
6674 Normal base hard disks that do not have children (i.e. differencing
6675 hard disks linked to them) and that are not already attached to
6676 virtual machines in snapshots are attached <b>directly</b>.
6677 Otherwise, they are attached <b>indirectly</b> because having
6678 dependent children or being part of the snapshot makes it impossible
6679 to modify hard disk contents without breaking the integrity of the
6680 dependent party. The <link to="#readOnly"/> attribute allows to
6681 quickly determine the kind of the attachment for the given hard
6682 disk. Note that if a normal base hard disk is to be indirectly
6683 attached to a virtual machine with snapshots then a special
6684 procedure called <i>smart attachment</i> is performed (see below).
6685 </td>
6686 </tr>
6687 <tr>
6688 <td>Normal (Differencing)</td>
6689 <td>
6690 Differencing hard disks are like normal base hard disks: attached
6691 <b>directly</b> if they do not have children and are not attached to
6692 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
6693 that the smart attachment procedure is never performed for
6694 differencing hard disks.
6695 </td>
6696 </tr>
6697 <tr>
6698 <td>Immutable</td>
6699 <td>
6700 Immutabe hard disks are always attached <b>indirectly</b> because
6701 they are designed to be non-writable. If an immutable hard disk is
6702 attached to a virtual machine with snapshots then a special
6703 procedure called smart attachment is performed (see below).
6704 </td>
6705 </tr>
6706 <tr>
6707 <td>Writethrough</td>
6708 <td>
6709 Writethrough hard disks are always attached <b>directly</b>, also as
6710 designed. This also means that writethrough hard disks cannot have
6711 other hard disks linked to them at all.
6712 </td>
6713 </tr>
6714 </table>
6715
6716 Note that the same hard disk, regardless of its type, may be attached to
6717 more than one virtual machine at a time. In this case, the machine that is
6718 started first gains exclusive access to the hard disk and attempts to
6719 start other machines having this hard disk attached will fail until the
6720 first machine is powered down.
6721
6722 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
6723 that the given hard disk remains associated with the given machine after a
6724 successful <link to="IMachine::detachHardDisk2()"/> call until
6725 <link to="IMachine::saveSettings()"/> is called to save all changes to
6726 machine settings to disk. This deferring is necessary to guarantee that
6727 the hard disk configuration may be restored at any time by a call to
6728 <link to="IMachine::discardSettings()"/> before the settings
6729 are saved (committed).
6730
6731 Note that if <link to="IMachine::discardSettings()"/> is called after
6732 indirectly attaching some hard disks to the machine but before a call to
6733 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
6734 all differencing hard disks implicitly created by
6735 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
6736 Such implicitly created hard disks will also be immediately deleted when
6737 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
6738 call if it is made before <link to="IMachine::saveSettings()"/>. This
6739 implicit deletion is safe because newly created differencing hard
6740 disks do not contain any user data.
6741
6742 However, keep in mind that detaching differencing hard disks that were
6743 implicitly created by <link to="IMachine::attachHardDisk2()"/>
6744 before the last <link to="IMachine::saveSettings()"/> call will
6745 <b>not</b> implicitly delete them as they may already contain some data
6746 (for example, as a result of virtual machine execution). If these hard
6747 disks are no more necessary, the caller can always delete them explicitly
6748 using <link to="#deleteStorage()"/> after they are actually de-associated
6749 from this machine by the <link to="IMachine::saveSettings()"/> call.
6750
6751 <h3>Smart Attachment</h3>
6752
6753 When normal base or immutable hard disks are indirectly attached to a
6754 virtual machine then some additionals steps are performed to make sure the
6755 virtual machine will have the most recent "view" of the hard disk being
6756 attached. These steps include walking through the machine's snapshots
6757 starting from the current one and going through ancestors up to the first
6758 snapshot. Hard disks attached to the virtual machine in all
6759 of the encountered snapshots are checked whether they are descendants of
6760 the given normal base or immutable hard disk. The first found child (which
6761 is the differencing hard disk) will be used instead of the normal base or
6762 immutable hard disk as a parent for creating a new differencing hard disk
6763 that will be actually attached to the machine. And only if no descendants
6764 are found or if the virtual machine does not have any snapshots then the
6765 normal base or immutable hard disk will be used itself as a parent for
6766 this differencing hard disk.
6767
6768 It is easier to explain what smart attachment does using the
6769 following example:
6770 <pre>
6771BEFORE attaching B.vdi: AFTER attaching B.vdi:
6772
6773Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
6774 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
6775 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
6776 Snapshot 4 (none) Snapshot 4 (none)
6777 CurState (none) CurState (D3->D2.vdi)
6778
6779 NOT
6780 ...
6781 CurState (D3->B.vdi)
6782 </pre>
6783 The first column is the virtual machine configuration before the base hard
6784 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
6785 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
6786 mean that the hard disk that is actually attached to the machine is a
6787 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
6788 another hard disk, <tt>B.vdi</tt>.
6789
6790 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
6791 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
6792 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
6793 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
6794 it cannot be attached directly and needs an indirect attachment (i.e.
6795 implicit creation of a new differencing hard disk). Due to the smart
6796 attachment procedure, the new differencing hard disk
6797 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
6798 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
6799 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
6800 machine.
6801
6802 Note that if there is more than one descendant hard disk of the given base
6803 hard disk found in a snapshot, and there is an exact device, channel and
6804 bus match, then this exact match will be used. Otherwise, the youngest
6805 descendant will be picked up.
6806
6807 There is one more important aspect of the smart attachment procedure which
6808 is not related to snapshots at all. Before walking through the snapshots
6809 as described above, the backup copy of the current list of hard disk
6810 attachment is searched for descendants. This backup copy is created when
6811 the hard disk configuartion is changed for the first time after the last
6812 <link to="IMachine::saveSettings()"/> call and used by
6813 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
6814 changes. When such a descendant is found in this backup copy, it will be
6815 simply reattached back, without creating a new differencing hard disk for
6816 it. This optimization is necessary to make it possible to re-attach the
6817 base or immutable hard disk to a different bus, channel or device slot
6818 without losing the contents of the differencing hard disk actually
6819 attached to the machine in place of it.
6820 </desc>
6821
6822 <attribute name="format" type="wstring" readonly="yes">
6823 <desc>
6824 Storage format of this hard disk.
6825
6826 The value of this attribute is a string that specifies a backend used to
6827 store hard disk data. The storage format is defined when you create a
6828 new hard disk or automatically detected when you open an existing hard
6829 disk medium, and cannot be changed later.
6830
6831 The list of all storage formats supported by this VirtualBox
6832 installation can be obtained using
6833 <link to="ISystemProperties::hardDiskFormats"/>.
6834 </desc>
6835 </attribute>
6836
6837 <attribute name="type" type="HardDiskType">
6838 <desc>
6839 Type (role) of this hard disk.
6840
6841 The following constraints apply when changing the value of this
6842 attribute:
6843 <ul>
6844 <li>If a hard disk is attached to a virtual machine (either in the
6845 current state or in one of the snapshots), its type cannot be
6846 changed.
6847 </li>
6848 <li>As long as the hard disk has children, its type cannot be set
6849 to <link to="HardDiskType::Writethrough"/>.
6850 </li>
6851 <li>The type of all differencing hard disks is
6852 <link to="HardDiskType::Normal"/> and cannot be changed.
6853 </li>
6854 </ul>
6855
6856 The type of a newly created or opened hard disk is set to
6857 <link to="HardDiskType::Normal"/>.
6858 </desc>
6859 </attribute>
6860
6861 <attribute name="parent" type="IHardDisk2" readonly="yes">
6862 <desc>
6863 Parent of this hard disk (a hard disk this hard disk is directly based
6864 on).
6865
6866 Only differencing hard disks have parents. For base (non-differencing)
6867 hard disks, <tt>null</tt> is returned.
6868 </desc>
6869 </attribute>
6870
6871 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
6872 <desc>
6873 Children of this hard disk (all differencing hard disks directly based
6874 on this hard disk). A <tt>null</tt> array is returned if this hard disk
6875 does not have any children.
6876 </desc>
6877 </attribute>
6878
6879 <attribute name="root" type="IHardDisk2" readonly="yes">
6880 <desc>
6881 Root hard disk of this hard disk.
6882
6883 If this is a differencing hard disk, its root hard disk is the base hard
6884 disk the given hard disk branch starts from. For all other types of hard
6885 disks, this property returns the hard disk object itself (i.e. the same
6886 object this property is read on).
6887 </desc>
6888 </attribute>
6889
6890 <attribute name="readOnly" type="boolean" readonly="yes">
6891 <desc>
6892 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
6893 otherwise.
6894
6895 A hard disk is considered to be read-only when its contents cannot be
6896 modified without breaking the integrity of other parties that depednd on
6897 this hard disk such as its child hard disks or snapshots of virtual
6898 machines where this hard disk is attached to these machines. If there
6899 are no children and no such snapshots then there is no dependency and
6900 the hard disk is not read-only.
6901
6902 The value of this attribute can be used to determine the kind of the
6903 attachment that will take place when attaching this hard disk to a
6904 virtual machine. If the value is <tt>false</tt> then the hard disk will
6905 be attached directly. If the value is <tt>true</tt> then the hard disk
6906 will be attached indirectly by creating a new differencing child hard
6907 disk for that. See the interface description for more information.
6908
6909 Note that all <link to="HardDiskType::Immutable">Immutable</link> hard
6910 disks are always read-only while all
6911 <link to="HardDiskType::Writethrough">Writethrough</link> hard disks are
6912 always not.
6913
6914 <note>
6915 The read-only condition represented by this attribute is related to
6916 the hard disk type and usage, not to the current
6917 <link to="IMedium::state">media state</link> and not to the read-only
6918 state of the storage unit.
6919 </note>
6920 </desc>
6921 </attribute>
6922
6923 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
6924 <desc>
6925 Logical size of this hard disk (in megabytes), as reported to the
6926 guest OS running inside the vurtual machine this disk is
6927 attached to. The logical size is defined when the hard disk is created
6928 and cannot be changed later.
6929
6930 <note>
6931 Reading this property on a differencing hard disk will return the size
6932 of its <link to="#root"/> hard disk.
6933 </note>
6934 <note>
6935 For hard disks whose state is <link to="#state"/> is <link
6936 to="MediaState::Inaccessible"/>, the value of this property is the
6937 last known logical size. For <link to="MediaState::NotCreated"/> hard
6938 disks, the returned value is zero.
6939 </note>
6940 </desc>
6941 </attribute>
6942
6943 <!-- storage methods -->
6944
6945 <method name="createDynamicStorage">
6946 <desc>
6947 Starts creating a dymically expanding hard disk storage unit in the
6948 background. The previous storage unit created for this this object, if
6949 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
6950 the operation will fail.
6951
6952 Before the operation starts, the hard disk is placed to
6953 <link to="MediaState::Creating"/> state. If the create operation
6954 fails, the media will placed back to <link to="MediaState::NotCreated"/>
6955 state.
6956
6957 After the returned progress object reports that the operation is
6958 successfully complete, the media state will be set to <link
6959 to="MediaState::Created"/>, the hard disk will be remembered by this
6960 VirtualBox installation and may be attached to virtual machines.
6961 </desc>
6962 <param name="logicalSize" type="unsigned long long" dir="in">
6963 <desc>Maximum logical size of the hard disk in megabytes.</desc>
6964 </param>
6965 <param name="progress" type="IProgress" dir="return">
6966 <desc>Progress object to track the operation completion.</desc>
6967 </param>
6968 </method>
6969
6970 <method name="createFixedStorage">
6971 <desc>
6972 Starts creating a fixed-size hard disk storage unit in the background.
6973 The previous storage unit created for this this object, if
6974 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
6975 the operation will fail.
6976
6977 Before the operation starts, the hard disk is placed to
6978 <link to="MediaState::Creating"/> state. If the create operation
6979 fails, the media will placed back to <link to="MediaState::NotCreated"/>
6980 state.
6981
6982 After the returned progress object reports that the operation is
6983 successfully complete, the media state will be set to <link
6984 to="MediaState::Created"/>, the hard disk will be remembered by this
6985 VirtualBox installation and may be attached to virtual machines.
6986 </desc>
6987 <param name="logicalSize" type="unsigned long long" dir="in">
6988 <desc>Logical size of the hard disk in megabytes.</desc>
6989 </param>
6990 <param name="progress" type="IProgress" dir="return">
6991 <desc>Progress object to track the operation completion.</desc>
6992 </param>
6993 </method>
6994
6995 <method name="deleteStorage">
6996 <desc>
6997 Starts deleting the storage unit of this hard disk.
6998
6999 The hard disk must not be attahced to any known virtual machine and must
7000 not have any known child hard disks, otherwise the operation will fail.
7001 It will also fail if there is no storage unit to delete or if deletion
7002 is already in progress, or if the hard disk is being in use (locked for
7003 read or for write) or inaccessible. Therefore, the only valid state for
7004 this operation to succeed is <link to="MediaState::Created"/>.
7005
7006 Before the operation starts, the hard disk is placed to
7007 <link to="MediaState::Deleting"/> state and gets removed from the list
7008 of remembered hard disks (media registry). If the delete operation
7009 fails, the media will be remembered again and placed back to
7010 <link to="MediaState::Created"/> state.
7011
7012 After the returned progress object reports that the operation is
7013 complete, the media state will be set to
7014 <link to="MediaState::NotCreated"/> and you will be able to use one of
7015 the storage creation methods to create it again.
7016
7017 <see>#close()</see>
7018 </desc>
7019 <param name="progress" type="IProgress" dir="return">
7020 <desc>Progress object to track the operation completion.</desc>
7021 </param>
7022 </method>
7023
7024 <!-- diff methods -->
7025
7026 <method name="createDiffStorage">
7027 <desc>
7028 Starts creating an empty differencing storage unit based on this hard
7029 disk in the format and at the location defined by the @a target
7030 argument.
7031
7032 The target hard disk must be in <link to="MediaState::NotCreated"/>
7033 state (i.e. must not have an existing storage unit). Upon successful
7034 completion, this operation will set the type of the target hard disk to
7035 <link to="HardDiskType::Normal"/> and create a storage unit necessary to
7036 represent the differencing hard disk data in the given format (according
7037 to the storage format of the target object).
7038
7039 After the returned progress object reports that the operation is
7040 successfully complete, the target hard disk gets remembered by this
7041 VirtualBox installation and may be attached to virtual machines.
7042
7043 <note>
7044 The hard disk will be placed to <link to="MediaState::LockedRead"/>
7045 state for the duration of this operation.
7046 </note>
7047 </desc> <param name="target" type="IHardDisk2" dir="in">
7048 <desc>Target hard disk.</desc>
7049 </param>
7050 <param name="progress" type="IProgress" dir="return">
7051 <desc>Progress object to track the operation completion.</desc>
7052 </param>
7053 </method>
7054
7055 <method name="mergeTo">
7056 <desc>
7057 Starts merging the contents of this hard disk and all intermediate
7058 differencing hard disks in the chain to the given target hard disk.
7059
7060 The target hard disk must be either a descendant of this hard disk or
7061 its ancestor (otherwise this method will immediately return a failure).
7062 It follows that there are two logical directions of the merge operation:
7063 from ancestor to descendant (<i>forward merge</i>) and from descendant to
7064 ancestor (<i>backward merge</i>). Let us consider the following hard disk
7065 chain:
7066
7067 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
7068
7069 Here, calling this method on the <tt>Base</tt> hard disk object with
7070 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
7071 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
7072 merge. Note that in both cases the contents of the resulting hard disk
7073 will be the same, the only difference is the hard disk object that takes
7074 the result of the merge operation. In case of the forward merge in the
7075 above example, the result will be written to <tt>Diff_2</tt>; in case of
7076 the backward merge, the result will be written to <tt>Base</tt>. In
7077 other words, the result of the operation is always stored in the target
7078 hard disk.
7079
7080 Upon successful operation completion, the storage units of all hard
7081 disks in the chain between this (source) hard disk and the target hard
7082 disk, including the source hard disk itself, will be automatically
7083 deleted and the relevant hard disk objects (including this hard disk)
7084 will become uninitialized. This means that any attempt to call any of
7085 their methods or attributes will fail with the
7086 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
7087 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
7088 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
7089 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
7090 disk itself since it will no longer be based on any other hard disk.
7091
7092 Considering the above, all of the following condtions must be met in
7093 order for the merge operation to succeed:
7094 <ul>
7095 <li>
7096 Neither this (source) hard disk nor any intermediate
7097 differencing hard disk in the chain between it and the target
7098 hard disk is attached to any virtual machine.
7099 </li>
7100 <li>
7101 Neither the source hard disk nor the target hard disk is an
7102 <link to="HardDiskType::Immutable"/> hard disk.
7103 </li>
7104 <li>
7105 The part of the hard disk tree from the source hard disk to the
7106 target hard disk is a linear chain, i.e. all hard disks in this
7107 chain have exactly one child which is the next hard disk in this
7108 chain. The only exception from this rule is the target hard disk in
7109 the forward merge operation; it is allowed to have any number of
7110 child hard disks because the merge operation will hot change its
7111 logical contents (as it is seen by the guest OS or by children).
7112 </li>
7113 <li>
7114 None of the involved hard disks are in
7115 <link to="MediaState::LockedRead"/> or
7116 <link to="MediaState::LockedWrite"/> state.
7117 </li>
7118 </ul>
7119
7120 <note>
7121 This (source) hard disk and all intermediates will be placed to <link
7122 to="MediaState::Deleting"/> state and the target hard disk will be
7123 placed to <link to="MediaState::LockedWrite"/> state and for the
7124 duration of this operation.
7125 </note>
7126 </desc>
7127 <param name="targetId" type="uuid" dir="in">
7128 <desc>UUID of the target ancestor or descendant hard disk.</desc>
7129 </param>
7130 <param name="progress" type="IProgress" dir="return">
7131 <desc>Progress object to track the operation completion.</desc>
7132 </param>
7133 </method>
7134
7135 <!-- clone methods -->
7136
7137 <method name="cloneTo">
7138 <desc>
7139 Starts creating a clone of this hard disk in the format and at the
7140 location defined by the @a target argument.
7141
7142 The target hard disk must be in <link to="MediaState::NotCreated"/>
7143 state (i.e. must not have an existing storage unit). Upon successful
7144 completion, the cloned hard disk will contain exactly the same sector
7145 data as the hard disk being cloned, except that a new UUID for the clone
7146 will be randomly generated.
7147
7148 After the returned progress object reports that the operation is
7149 successfully complete, the target hard disk gets remembered by this
7150 VirtualBox installation and may be attached to virtual machines.
7151
7152 <note>
7153 If the cloned hard disk is a differencing hard disk, it will inherit
7154 parent dependency of the original hard disk.
7155 </note>
7156 <note>
7157 This hard disk will be placed to <link to="MediaState::LockedRead"/>
7158 state for the duration of this operation.
7159 </note>
7160 </desc>
7161 <param name="target" type="IHardDisk2" dir="in">
7162 <desc>Target hard disk.</desc>
7163 </param>
7164 <param name="progress" type="IProgress" dir="return">
7165 <desc>Progress object to track the operation completion.</desc>
7166 </param>
7167 </method>
7168
7169 <method name="flattenTo">
7170 <desc>
7171 Starts creating a deep (independent) clone of this hard disk in the
7172 format and at the location defined by the @a target argument.
7173
7174 This operation is similar to <link to="#cloneTo()"/> except that when
7175 applied to a differencing hard disk, it will also copy missing hard disk
7176 data from all parent hard disks it is linked to. This will make the
7177 created clone an independent base hard disk that contains all hard disk
7178 data and does not need any other hard disks to operate.
7179
7180 After the returned progress object reports that the operation is
7181 successfully complete, the target hard disk gets remembered by this
7182 VirtualBox installation and may be attached to virtual machines.
7183
7184 <note>
7185 For base hard disks, this operation is identical to
7186 <link to="#cloneTo()"/>.
7187 </note>
7188 <note>
7189 This hard disk and all its parent hard disks will be placed to <link
7190 to="MediaState::LockedRead"/> state for the duration of this
7191 operation.
7192 </note>
7193 </desc>
7194 <param name="target" type="IHardDisk2" dir="in">
7195 <desc>Target hard disk.</desc>
7196 </param>
7197 <param name="progress" type="IProgress" dir="return">
7198 <desc>Progress object to track the operation completion.</desc>
7199 </param>
7200 </method>
7201
7202 </interface>
7203
7204
7205 <!--
7206 // IHardDiskFormat
7207 /////////////////////////////////////////////////////////////////////////
7208 -->
7209
7210 <enum
7211 name="DataType"
7212 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
7213 >
7214 <const name="Int32" value="0"/>
7215 <const name="Int8" value="1"/>
7216 <const name="String" value="2"/>
7217 </enum>
7218
7219 <enum
7220 name="DataFlags"
7221 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
7222 >
7223 <const name="None" value="0x00"/>
7224 <const name="Mandatory" value="0x01"/>
7225 <const name="Expert" value="0x02"/>
7226 <const name="FlagMask" value="0x03"/>
7227 </enum>
7228
7229 <enum
7230 name="HardDiskFormatCapabilities"
7231 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
7232 >
7233 <desc>
7234 Hard disk format capability flags.
7235 </desc>
7236
7237 <const name="Uuid" value="0x01">
7238 <desc>
7239 Supports UUIDs as expected by VirtualBox code.
7240 </desc>
7241 </const>
7242
7243 <const name="CreateFixed" value="0x02">
7244 <desc>
7245 Supports creating fixed size images, allocating all space instantly.
7246 </desc>
7247 </const>
7248
7249 <const name="CreateDynamic" value="0x04">
7250 <desc>
7251 Supports creating dynamically growing images, allocating space on
7252 demand.
7253 </desc>
7254 </const>
7255
7256 <const name="CreateSplit2G" value="0x08">
7257 <desc>
7258 Supports creating images split in chunks of a bit less than 2 GBytes.
7259 </desc>
7260 </const>
7261
7262 <const name="Differencing" value="0x10">
7263 <desc>
7264 Supports being used as a format for differencing hard disks (see <link
7265 to="IHardDisk2::createDiffStorage"/>).
7266 </desc>
7267 </const>
7268
7269 <const name="Asynchronous" value="0x20">
7270 <desc>
7271 Supports asynchronous I/O operations for at least some configurations.
7272 </desc>
7273 </const>
7274
7275 <const name="File" value="0x40">
7276 <desc>
7277 The format backend operates on files. The <link to="IMedium::location"/>
7278 attribute of the hard disk specifies a file used to store hard disk
7279 data. For a list of supported file extentions see
7280 <link to="IHardDiskFormat::fileExtensions"/>.
7281 </desc>
7282 </const>
7283
7284 <const name="Properties" value="0x80">
7285 <desc>
7286 The format backend uses the property interface to configure the storage
7287 location and properties. The <link to="IHardDiskFormat::describeProperties"/>
7288 method is used to get access to poperties supported by the given hard
7289 disk format.
7290 </desc>
7291 </const>
7292
7293 <const name="CapabilityMask" value="0xFF"/>
7294 </enum>
7295
7296 <interface
7297 name="IHardDiskFormat" extends="$unknown"
7298 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
7299 wsmap="managed"
7300 >
7301 <desc>
7302 The IHardDiskFormat interface represents a virtual hard disk format.
7303
7304 Each hard disk format has an associated backend which is used to handle
7305 hard disks stored in this format. This interface provides information
7306 about the properties of the associated backend.
7307
7308 Each hard disk format is identified by a string represented by the
7309 <link to="#id"/> attribute. This string is used in calls like
7310 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
7311 format.
7312
7313 The list of all supported hard disk formats can be obtained using
7314 <link to="ISystemProperties::hardDiskFormats"/>.
7315
7316 <see>IHardDisk2</see>
7317 </desc>
7318
7319 <attribute name="id" type="wstring" readonly="yes">
7320 <desc>
7321 Identifier of this format.
7322
7323 This string is used in methods of other interfaces where it is necessary
7324 to specify a hard disk format, such as
7325 <link to="IVirtualBox::createHardDisk2()"/>.
7326 </desc>
7327 </attribute>
7328
7329 <attribute name="name" type="wstring" readonly="yes">
7330 <desc>
7331 Human readable description of this format.
7332
7333 Mainly for use in file open dialogs.
7334 </desc>
7335 </attribute>
7336
7337 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
7338 <desc>
7339 Array of strings containing the supported file extensions.
7340
7341 The first extension in the array is the extension preferred by the
7342 backend. It is recommended to use this extension when specifyng a
7343 location of the storage unit for a new hard disk.
7344
7345 Note that some backends do not work on files, so this array may be
7346 empty.
7347
7348 <see>IHardDiskFormat::capabilities</see>
7349 </desc>
7350 </attribute>
7351
7352 <attribute name="capabilities" type="unsigned long" readonly="yes">
7353 <desc>
7354 Capabilities of the format as a set of bit flags.
7355
7356 For the meaning of individual capabilitiy flags see
7357 <link to="HardDiskFormatCapabilities"/>.
7358 </desc>
7359 </attribute>
7360
7361 <method name="describeProperties">
7362 <desc>
7363 Returns several arrays describing the properties supported by this
7364 format.
7365
7366 An element with the given index in each array describes one
7367 property. Thus, the number of elements in each returned array is the
7368 same and corresponds to the number of supported properties.
7369
7370 The returned arrays are not empty only if the
7371 <link to="HardDiskFormatCapabilities::Properties"/> flag is set.
7372
7373 <see>DataType</see>
7374 <see>DataFlags</see>
7375 </desc>
7376
7377 <param name="names" type="wstring" safearray="yes" dir="out">
7378 <desc>Array of property names.</desc>
7379 </param>
7380 <param name="description" type="wstring" safearray="yes" dir="out">
7381 <desc>Array of property descriptions.</desc>
7382 </param>
7383 <param name="types" type="DataType" safearray="yes" dir="out">
7384 <desc>Array of property types.</desc>
7385 </param>
7386 <param name="flags" type="unsigned long" safearray="yes" dir="out">
7387 <desc>Array of property flags.</desc>
7388 </param>
7389 <param name="defaults" type="wstring" safearray="yes" dir="out">
7390 <desc>Array of default property values.</desc>
7391 </param>
7392 </method>
7393
7394 </interface>
7395
7396
7397 <!--
7398 // IFloppyImage2
7399 /////////////////////////////////////////////////////////////////////////
7400 -->
7401
7402 <interface
7403 name="IFloppyImage2" extends="IMedium"
7404 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
7405 wsmap="managed"
7406 >
7407 <desc>
7408 The IFloppyImage2 interface represents a medium containing the image
7409 of a floppy disk.
7410 </desc>
7411
7412 </interface>
7413
7414
7415 <!--
7416 // IDVDImage2
7417 /////////////////////////////////////////////////////////////////////////
7418 -->
7419
7420 <interface
7421 name="IDVDImage2" extends="IMedium"
7422 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
7423 wsmap="managed"
7424 >
7425 <desc>
7426 The IDVDImage2 interface represents a medium containing the image
7427 of a CD or DVD disk in the ISO format.
7428 </desc>
7429
7430 </interface>
7431
7432
7433 <!--
7434 // IDVDDrive
7435 /////////////////////////////////////////////////////////////////////////
7436 -->
7437
7438 <interface
7439 name="IDVDDrive" extends="$unknown"
7440 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
7441 wsmap="managed"
7442 >
7443 <desc>
7444 The IDVDDrive interface represents the virtual CD/DVD drive of the
7445 virtual machine. An object of this type is returned by
7446 <link to="IMachine::DVDDrive"/>.
7447 </desc>
7448
7449 <attribute name="state" type="DriveState" readonly="yes">
7450 <desc>Current drive state.</desc>
7451 </attribute>
7452
7453 <attribute name="passthrough" type="boolean">
7454 <desc>
7455 When a host drive is mounted and passthrough is enabled
7456 the guest OS will be able to directly send SCSI commands to
7457 the host drive. This enables the guest OS to use CD/DVD writers
7458 but is potentially dangerous.
7459 </desc>
7460 </attribute>
7461
7462 <method name="mountImage">
7463 <desc>Mounts a CD/DVD image with the specified UUID.</desc>
7464 <param name="imageId" type="uuid" dir="in"/>
7465 </method>
7466
7467 <method name="captureHostDrive">
7468 <desc>Captures the specified host CD/DVD drive.</desc>
7469 <param name="drive" type="IHostDVDDrive" dir="in"/>
7470 </method>
7471
7472 <method name="unmount">
7473 <desc>Unmounts the currently mounted image or host drive.</desc>
7474 </method>
7475
7476 <method name="getImage">
7477 <desc>Returns the currently mounted CD/DVD image.</desc>
7478 <param name="image" type="IDVDImage2" dir="return"/>
7479 </method>
7480
7481 <method name="getHostDrive">
7482 <desc>Returns the currently mounted host CD/DVD drive.</desc>
7483 <param name="drive" type="IHostDVDDrive" dir="return"/>
7484 </method>
7485
7486 </interface>
7487
7488
7489 <!--
7490 // IFloppyDrive
7491 /////////////////////////////////////////////////////////////////////////
7492 -->
7493
7494 <interface
7495 name="IFloppyDrive" extends="$unknown"
7496 uuid="159412cd-bab8-452e-8097-218a020825a6"
7497 wsmap="managed"
7498 >
7499 <desc>
7500 The IFloppyDrive interface represents the virtual floppy drive of the
7501 virtual machine. An object of this type is returned by
7502 <link to="IMachine::floppyDrive" />.
7503 </desc>
7504
7505 <attribute name="enabled" type="boolean">
7506 <desc>
7507 Flag whether the floppy drive is enabled. If it is disabled,
7508 the floppy drive will not be reported to the guest OS.
7509 </desc>
7510 </attribute>
7511
7512 <attribute name="state" type="DriveState" readonly="yes">
7513 <desc>Current drive state.</desc>
7514 </attribute>
7515
7516 <method name="mountImage">
7517 <desc>Mounts a floppy image with the specified UUID.</desc>
7518 <param name="imageId" type="uuid" dir="in"/>
7519 </method>
7520
7521 <method name="captureHostDrive">
7522 <desc>Captures the specified host floppy drive.</desc>
7523 <param name="drive" type="IHostFloppyDrive" dir="in"/>
7524 </method>
7525
7526 <method name="unmount">
7527 <desc>Unmounts the currently mounted image or host drive.</desc>
7528 </method>
7529
7530 <method name="getImage">
7531 <desc>Returns the currently mounted floppy image.</desc>
7532 <param name="image" type="IFloppyImage2" dir="return"/>
7533 </method>
7534
7535 <method name="getHostDrive">
7536 <desc>Returns the currently mounted host floppy drive.</desc>
7537 <param name="drive" type="IHostFloppyDrive" dir="return"/>
7538 </method>
7539
7540 </interface>
7541
7542
7543 <!--
7544 // IKeyboard
7545 /////////////////////////////////////////////////////////////////////////
7546 -->
7547
7548 <interface
7549 name="IKeyboard" extends="$unknown"
7550 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
7551 wsmap="managed"
7552 >
7553 <desc>
7554 The IKeyboard interface represents the virtual machine's keyboard. Used
7555 in <link to="IConsole::keyboard"/>.
7556
7557 Through this interface, the virtual machine's virtual keyboard can be controlled. One
7558 can send keystrokes to the virtual machine and send the Ctrl-Alt-Del sequence to it.
7559 </desc>
7560 <method name="putScancode">
7561 <desc>Sends a scancode to the keyboard.</desc>
7562 <param name="scancode" type="long" dir="in"/>
7563 </method>
7564
7565 <method name="putScancodes">
7566 <desc>Sends an array of scancode to the keyboard.</desc>
7567 <param name="scancodes" type="long" dir="in" safearray="yes"/>
7568 <param name="codesStored" type="unsigned long" dir="return"/>
7569 </method>
7570
7571 <method name="putCAD">
7572 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard.</desc>
7573 </method>
7574
7575 </interface>
7576
7577
7578 <!--
7579 // IMouse
7580 /////////////////////////////////////////////////////////////////////////
7581 -->
7582
7583 <enum
7584 name="MouseButtonState"
7585 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
7586 >
7587 <desc>
7588 Mouse button state.
7589 </desc>
7590
7591 <const name="LeftButton" value="0x01"/>
7592 <const name="RightButton" value="0x02"/>
7593 <const name="MiddleButton" value="0x04"/>
7594 <const name="WheelUp" value="0x08"/>
7595 <const name="WheelDown" value="0x10"/>
7596 <const name="MouseStateMask" value="0x1F"/>
7597 </enum>
7598
7599 <interface
7600 name="IMouse" extends="$unknown"
7601 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
7602 wsmap="managed"
7603 >
7604 <desc>
7605 The IMouse interface represents the virtual machine's mouse. Used in
7606 <link to="IConsole::mouse"/>.
7607
7608 Through this interface, the virtual machine's virtual mouse can be
7609 controlled.
7610 </desc>
7611
7612 <attribute name="absoluteSupported" type="boolean" readonly="yes">
7613 <desc>
7614 Whether the guest OS supports absolute mouse pointer positioning
7615 or not.
7616 <note>
7617 VirtualBox Guest Tools need to be installed to the guest OS
7618 in order to enable absolute mouse positioning support.
7619 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
7620 callback to be instantly informed about changes of this attribute
7621 during virtual machine execution.
7622 </note>
7623 <see><link to="#putMouseEventAbsolute"/></see>
7624 </desc>
7625 </attribute>
7626
7627 <method name="putMouseEvent">
7628 <desc>
7629 Initiates a mouse event using relative pointer movements
7630 along x and y axis.
7631 </desc>
7632
7633 <param name="dx" type="long" dir="in">
7634 <desc>
7635 Amout of pixels the mouse should move to the right.
7636 Negative values move the mouse to the left.
7637 </desc>
7638 </param>
7639 <param name="dy" type="long" dir="in">
7640 <desc>
7641 Amout of pixels the mouse should move downwards.
7642 Negative values move the mouse upwards.
7643 </desc>
7644 </param>
7645 <param name="dz" type="long" dir="in">
7646 <desc>
7647 Amount of mouse wheel moves.
7648 Positive values describe clockwise wheel rotations,
7649 negative values describe counterclockwise rotations.
7650 </desc>
7651 </param>
7652 <param name="buttonState" type="long" dir="in">
7653 <desc>
7654 The current state of mouse buttons. Every bit represents
7655 a mouse button as follows:
7656 <table>
7657 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
7658 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
7659 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
7660 </table>
7661 A value of <tt>1</tt> means the corresponding button is pressed.
7662 otherwise it is released.
7663 </desc>
7664 </param>
7665 </method>
7666
7667 <method name="putMouseEventAbsolute">
7668 <desc>
7669 Positions the mouse pointer using absolute x and y coordinates.
7670 These coordinates are expressed in pixels and
7671 start from <tt>[1,1]</tt> which corresponds to the top left
7672 corner of the virtual display.
7673
7674 <note>
7675 This method will have effect only if absolute mouse
7676 positioning is supported by the guest OS.
7677 </note>
7678
7679 <see><link to="#absoluteSupported"/></see>
7680 </desc>
7681
7682 <param name="x" type="long" dir="in">
7683 <desc>
7684 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
7685 </desc>
7686 </param>
7687 <param name="y" type="long" dir="in">
7688 <desc>
7689 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
7690 </desc>
7691 </param>
7692 <param name="dz" type="long" dir="in">
7693 <desc>
7694 Amout of mouse wheel moves.
7695 Positive values describe clockwise wheel rotations,
7696 negative values describe counterclockwise rotations.
7697 </desc>
7698 </param>
7699 <param name="buttonState" type="long" dir="in">
7700 <desc>
7701 The current state of mouse buttons. Every bit represents
7702 a mouse button as follows:
7703 <table>
7704 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
7705 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
7706 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
7707 </table>
7708 A value of <tt>1</tt> means the corresponding button is pressed.
7709 otherwise it is released.
7710 </desc>
7711 </param>
7712 </method>
7713
7714 </interface>
7715
7716 <!--
7717 // IDisplay
7718 /////////////////////////////////////////////////////////////////////////
7719 -->
7720
7721 <enum
7722 name="FramebufferAccelerationOperation"
7723 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
7724 >
7725 <desc>
7726 Framebuffer acceleration operation.
7727 </desc>
7728
7729 <const name="SolidFillAcceleration" value="1"/>
7730 <const name="ScreenCopyAcceleration" value="2"/>
7731 </enum>
7732
7733 <enum
7734 name="FramebufferPixelFormat"
7735 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
7736 >
7737 <desc>
7738 Format of the video memory buffer. Constants represented by this enum can
7739 be used to test for particular values of <link
7740 to="IFramebuffer::pixelFormat"/>. See also <link
7741 to="IFramebuffer::requestResize()"/>.
7742
7743 See also www.fourcc.org for more information about FOURCC pixel formats.
7744 </desc>
7745
7746 <const name="Opaque" value="0xFFFFFFFF">
7747 <desc>
7748 Unknown buffer format. The user may not assume any particular
7749 format of the buffer.
7750 </desc>
7751 </const>
7752 <const name="FOURCC_RGB" value="0x32424752">
7753 <desc>
7754 Basic RGB format. <link to="IFramebuffer::bitsPerPixel"/> determines
7755 the bit layout.
7756 </desc>
7757 </const>
7758 </enum>
7759
7760 <interface
7761 name="IFramebuffer" extends="$unknown"
7762 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
7763 wsmap="suppress"
7764 >
7765 <attribute name="address" type="octet" mod="ptr" readonly="yes">
7766 <desc>Address of the start byte of the framebuffer.</desc>
7767 </attribute>
7768
7769 <attribute name="width" type="unsigned long" readonly="yes">
7770 <desc>Framebuffer width, in pixels.</desc>
7771 </attribute>
7772
7773 <attribute name="height" type="unsigned long" readonly="yes">
7774 <desc>Framebuffer height, in pixels.</desc>
7775 </attribute>
7776
7777 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
7778 <desc>
7779 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
7780 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
7781 are: 8, 15, 16, 24 and 32.
7782 </desc>
7783 </attribute>
7784
7785 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
7786 <desc>
7787 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
7788 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
7789 size of the scan line must be aligned to 32 bits.
7790 </desc>
7791 </attribute>
7792
7793 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
7794 <desc>
7795 Framebuffer pixel format. It's either one of the values defined by <link
7796 to="FramebufferPixelFormat"/> or a raw FOURCC code.
7797 <note>
7798 This attribute must never return <link
7799 to="PixelFormat::Opaque"/> -- the format of the buffer
7800 <link to="#address"/> points to must be always known.
7801 </note>
7802 </desc>
7803 </attribute>
7804
7805 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
7806 <desc>
7807 Defines whether this framebuffer uses the virtual video card's memory
7808 buffer (guest VRAM) directly or not. See <link
7809 to="IFramebuffer::requestResize()"/> for more information.
7810 </desc>
7811 </attribute>
7812
7813 <attribute name="heightReduction" type="unsigned long" readonly="yes">
7814 <desc>
7815 Hint from the framebuffer about how much of the standard
7816 screen height it wants to use for itself. This information is
7817 exposed to the guest through the VESA BIOS and VMMDev interface
7818 so that it can use it for determining its video mode table. It
7819 is not guaranteed that the guest respects the value.
7820 </desc>
7821 </attribute>
7822
7823 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
7824 <desc>
7825 An alpha-blended overlay which is superposed over the framebuffer.
7826 The initial purpose is to allow the display of icons providing
7827 information about the VM state, including disk activity, in front
7828 ends which do not have other means of doing that. The overlay is
7829 designed to controlled exclusively by IDisplay. It has no locking
7830 of its own, and any changes made to it are not guaranteed to be
7831 visible until the affected portion of IFramebuffer is updated. The
7832 overlay can be created lazily the first time it is requested. This
7833 attribute can also return NULL to signal that the overlay is not
7834 implemented.
7835 </desc>
7836 </attribute>
7837
7838 <attribute name="winId" type="unsigned long long" readonly="yes">
7839 <desc>
7840 Platform-dependent identifier of the window where context of this
7841 framebuffer is drawn, or zero if there's no such window.
7842 </desc>
7843 </attribute>
7844
7845 <method name="lock">
7846 <desc>
7847 Locks the framebuffer.
7848 Gets called by the IDisplay object where this framebuffer is
7849 bound to.
7850 </desc>
7851 </method>
7852
7853 <method name="unlock">
7854 <desc>
7855 Unlocks the framebuffer.
7856 Gets called by the IDisplay object where this framebuffer is
7857 bound to.
7858 </desc>
7859 </method>
7860
7861 <method name="notifyUpdate">
7862 <desc>
7863 Informs about an update.
7864 Gets called by the display object where this buffer is
7865 registered.
7866 </desc>
7867 <param name="x" type="unsigned long" dir="in"/>
7868 <param name="y" type="unsigned long" dir="in"/>
7869 <param name="width" type="unsigned long" dir="in"/>
7870 <param name="height" type="unsigned long" dir="in"/>
7871 <param name="finished" type="boolean" dir="return"/>
7872 </method>
7873
7874 <method name="requestResize">
7875 <desc>
7876 Requests a size and pixel format change.
7877
7878 There are two modes of working with the video buffer of the virtual
7879 machine. The <i>indirect</i> mode implies that the IFramebuffer
7880 implementation allocates a memory buffer for the requested display mode
7881 and provides it to the virtual machine. In <i>direct</i> mode, the
7882 IFramebuffer implementation uses the memory buffer allocated and owned
7883 by the virtual machine. This buffer represents the video memory of the
7884 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
7885 usually faster because the implementation gets a raw pointer to the
7886 guest VRAM buffer which it can directly use for visualizing the contents
7887 of the virtual display, as opposed to the indirect mode where the
7888 contents of guest VRAM are copied to the memory buffer provided by
7889 the implementation every time a display update occurs.
7890
7891 It is important to note that the direct mode is really fast only when
7892 the implementation uses the given guest VRAM buffer directly, for
7893 example, by blitting it to the window representing the virtual machine's
7894 display, which saves at least one copy operation comparing to the
7895 indirect mode. However, using the guest VRAM buffer directly is not
7896 always possible: the format and the color depth of this buffer may be
7897 not supported by the target window, or it may be unknown (opaque) as in
7898 case of text or non-linear multi-plane VGA video modes. In this case,
7899 the indirect mode (that is always available) should be used as a
7900 fallback: when the guest VRAM contents are copied to the
7901 implementation-provided memory buffer, color and format conversion is
7902 done automatically by the underlying code.
7903
7904 The @a pixelFormat parameter defines whether the direct mode is
7905 available or not. If @a pixelFormat is <link
7906 to="PixelFormat::Opaque"/> then direct access to the guest
7907 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
7908 bytesPerLine parameters must be ignored and the implementation must use
7909 the indirect mode (where it provides its own buffer in one of the
7910 supported formats). In all other cases, @a pixelFormat together with @a
7911 bitsPerPixel and @a bytesPerLine define the format of the video memory
7912 buffer pointed to by the @a VRAM parameter and the implementation is
7913 free to choose which mode to use. To indicate that this framebuffer uses
7914 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
7915 attribute must return <tt>true</tt> and <link to="#address"/> must
7916 return exactly the same address that is passed in the @a VRAM parameter
7917 of this method; otherwise it is assumed that the indirect strategy is
7918 chosen.
7919
7920 The @a width and @a height parameters represent the size of the
7921 requested display mode in both modes. In case of indirect mode, the
7922 provided memory buffer should be big enough to store data of the given
7923 display mode. In case of direct mode, it is guaranteed that the given @a
7924 VRAM buffer contains enough space to represent the display mode of the
7925 given size. Note that this framebuffer's <link to="#width"/> and <link
7926 to="#height"/> attributes must return exactly the same values as
7927 passed to this method after the resize is completed (see below).
7928
7929 The @a finished output parameter determines if the implementation has
7930 finished resizing the framebuffer or not. If, for some reason, the
7931 resize cannot be finished immediately during this call, @a finished
7932 must be set to @c false, and the implementation must call
7933 <link to="IDisplay::resizeCompleted()"/> after it has returned from
7934 this method as soon as possible. If @a finished is @c false, the
7935 machine will not call any framebuffer methods until
7936 <link to="IDisplay::resizeCompleted()"/> is called.
7937
7938 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
7939 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
7940 this framebuffer must return exactly the same values as specified in the
7941 parameters of this method, after the resize is completed. If the
7942 indirect mode is chosen, these attributes must return values describing
7943 the format of the implementation's own memory buffer <link
7944 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
7945 value must always correlate with <link to="#pixelFormat"/>. Note that
7946 the <link to="#pixelFormat"/> attribute must never return <link
7947 to="PixelFormat::Opaque"/> regardless of the selected mode.
7948
7949 <note>
7950 This method is called by the IDisplay object under the
7951 <link to="#lock()"/> provided by this IFramebuffer
7952 implementation. If this method returns @c false in @a finished, then
7953 this lock is not released until
7954 <link to="IDisplay::resizeCompleted()"/> is called.
7955 </note>
7956 </desc>
7957 <param name="screenId" type="unsigned long" dir="in">
7958 <desc>
7959 Logical screen number. Must be used in the corresponding call to
7960 <link to="IDisplay::resizeCompleted()"/> if this call is made.
7961 </desc>
7962 </param>
7963 <param name="pixelFormat" type="unsigned long" dir="in">
7964 <desc>
7965 Pixel format of the memory buffer pointed to by @a VRAM.
7966 See also <link to="FramebufferPixelFormat"/>.
7967 </desc>
7968 </param>
7969 <param name="VRAM" type="octet" mod="ptr" dir="in">
7970 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
7971 </param>
7972 <param name="bitsPerPixel" type="unsigned long" dir="in">
7973 <desc>Color depth, bits per pixel.</desc>
7974 </param>
7975 <param name="bytesPerLine" type="unsigned long" dir="in">
7976 <desc>Size of one scan line, in bytes.</desc>
7977 </param>
7978 <param name="width" type="unsigned long" dir="in">
7979 <desc>Width of the guest display, in pixels.</desc>
7980 </param>
7981 <param name="height" type="unsigned long" dir="in">
7982 <desc>Height of the guest display, in pixels.</desc>
7983 </param>
7984 <param name="finished" type="boolean" dir="return">
7985 <desc>
7986 Can the VM start using the new framebuffer immediately
7987 after this method returns or it should wait for
7988 <link to="IDisplay::resizeCompleted()"/>.
7989 </desc>
7990 </param>
7991 </method>
7992
7993 <method name="operationSupported">
7994 <desc>
7995 Returns whether the given acceleration operation is supported
7996 by the IFramebuffer implementation. If not, the display object
7997 will not attempt to call the corresponding IFramebuffer entry
7998 point. Even if an operation is indicated to supported, the
7999 IFramebuffer implementation always has the option to return non
8000 supported from the corresponding acceleration method in which
8001 case the operation will be performed by the display engine. This
8002 allows for reduced IFramebuffer implementation complexity where
8003 only common cases are handled.
8004 </desc>
8005 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
8006 <param name="supported" type="boolean" dir="return"/>
8007 </method>
8008
8009 <method name="videoModeSupported">
8010 <desc>
8011 Returns whether the framebuffer implementation is willing to
8012 support a given video mode. In case it is not able to render
8013 the video mode (or for some reason not willing), it should
8014 return false. Usually this method is called when the guest
8015 asks the VMM device whether a given video mode is supported
8016 so the information returned is directly exposed to the guest.
8017 It is important that this method returns very quickly.
8018 </desc>
8019 <param name="width" type="unsigned long" dir="in"/>
8020 <param name="height" type="unsigned long" dir="in"/>
8021 <param name="bpp" type="unsigned long" dir="in"/>
8022 <param name="supported" type="boolean" dir="return"/>
8023 </method>
8024
8025 <method name="solidFill">
8026 <desc>
8027 Fills the specified rectangle on screen with a solid color.
8028 </desc>
8029 <param name="x" type="unsigned long" dir="in"/>
8030 <param name="y" type="unsigned long" dir="in"/>
8031 <param name="width" type="unsigned long" dir="in"/>
8032 <param name="height" type="unsigned long" dir="in"/>
8033 <param name="color" type="unsigned long" dir="in"/>
8034 <param name="handled" type="boolean" dir="return"/>
8035 </method>
8036
8037 <method name="copyScreenBits">
8038 <desc>
8039 Copies specified rectangle on the screen.
8040 </desc>
8041 <param name="xDst" type="unsigned long" dir="in"/>
8042 <param name="yDst" type="unsigned long" dir="in"/>
8043 <param name="xSrc" type="unsigned long" dir="in"/>
8044 <param name="ySrc" type="unsigned long" dir="in"/>
8045 <param name="width" type="unsigned long" dir="in"/>
8046 <param name="height" type="unsigned long" dir="in"/>
8047 <param name="handled" type="boolean" dir="return"/>
8048 </method>
8049
8050 <method name="getVisibleRegion">
8051 <desc>
8052 Returns the visible region of this framebuffer.
8053
8054 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
8055 @a count parameter is ignored and the number of elements necessary to
8056 describe the current visible region is returned in @a countCopied.
8057
8058 If @a rectangles is not <tt>NULL</tt> but @a count is less
8059 than the required number of elements to store region data, the method
8060 will report a failure. If @a count is equal or greater than the
8061 required number of elements, then the actual number of elements copied
8062 to the provided array will be returned in @a countCopied.
8063
8064 <note>
8065 The address of the provided array must be in the process space of
8066 this IFramebuffer object.
8067 </note>
8068 </desc>
8069 <param name="rectangles" type="octet" mod="ptr" dir="in">
8070 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
8071 </param>
8072 <param name="count" type="unsigned long" dir="in">
8073 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8074 </param>
8075 <param name="countCopied" type="unsigned long" dir="return">
8076 <desc>Number of elements copied to the @a rectangles array.</desc>
8077 </param>
8078 </method>
8079
8080 <method name="setVisibleRegion">
8081 <desc>
8082 Suggests a new visible region to this framebuffer. This region
8083 represents the area of the VM display which is a union of regions of
8084 all top-level windows of the guest operating system running inside the
8085 VM (if the Guest Additions for this system support this
8086 functionality). This information may be used by the frontends to
8087 implement the seamless desktop integration feature.
8088
8089 <note>
8090 The address of the provided array must be in the process space of
8091 this IFramebuffer object.
8092 </note>
8093 <note>
8094 The IFramebuffer implementation must make a copy of the provided
8095 array of rectangles.
8096 </note>
8097 </desc>
8098 <param name="rectangles" type="octet" mod="ptr" dir="in">
8099 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
8100 </param>
8101 <param name="count" type="unsigned long" dir="in">
8102 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8103 </param>
8104 </method>
8105
8106 </interface>
8107
8108 <interface
8109 name="IFramebufferOverlay" extends="IFrameBuffer"
8110 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
8111 wsmap="suppress"
8112 >
8113 <desc>
8114 The IFramebufferOverlay interface represents an alpha blended overlay
8115 for displaying status icons above an IFramebuffer. It is always created
8116 not visible, so that it must be explicitly shown. It only covers a
8117 portion of the IFramebuffer, determined by its width, height and
8118 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
8119 that order) format, and may be written to directly. Do re-read the
8120 width though, after setting it, as it may be adjusted (increased) to
8121 make it more suitable for the front end.
8122 </desc>
8123 <attribute name="x" type="unsigned long" readonly="yes">
8124 <desc>X position of the overlay, relative to the framebuffer.</desc>
8125 </attribute>
8126
8127 <attribute name="y" type="unsigned long" readonly="yes">
8128 <desc>Y position of the overlay, relative to the framebuffer.</desc>
8129 </attribute>
8130
8131 <attribute name="visible" type="boolean" readonly="no">
8132 <desc>
8133 Whether the overlay is currently visible.
8134 </desc>
8135 </attribute>
8136
8137 <attribute name="alpha" type="unsigned long" readonly="no">
8138 <desc>
8139 The global alpha value for the overlay. This may or may not be
8140 supported by a given front end.
8141 </desc>
8142 </attribute>
8143
8144 <method name="move">
8145 <desc>
8146 Changes the overlay's position relative to the IFramebuffer.
8147 </desc>
8148 <param name="x" type="unsigned long" dir="in"/>
8149 <param name="y" type="unsigned long" dir="in"/>
8150 </method>
8151
8152 </interface>
8153
8154 <interface
8155 name="IDisplay" extends="$unknown"
8156 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
8157 wsmap="suppress"
8158 >
8159 <desc>
8160 The IDisplay interface represents the virtual machine's display.
8161
8162 The object implementing this interface is contained in each
8163 <link to="IConsole::display"/> attribute and represents the visual
8164 output of the virtual machine.
8165
8166 The virtual display supports pluggable output targets represented by the
8167 IFramebuffer interface. Examples of the output target are a window on
8168 the host computer or an RDP session's display on a remote computer.
8169 </desc>
8170 <attribute name="width" type="unsigned long" readonly="yes">
8171 <desc>Current display width.</desc>
8172 </attribute>
8173
8174 <attribute name="height" type="unsigned long" readonly="yes">
8175 <desc>Current display height.</desc>
8176 </attribute>
8177
8178 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8179 <desc>
8180 Current guest display color depth. Note that this may differ
8181 from <link to="IFramebuffer::bitsPerPixel"/>.
8182 </desc>
8183 </attribute>
8184
8185 <method name="setupInternalFramebuffer">
8186 <desc>
8187 Prepares an internally managed framebuffer.
8188 </desc>
8189 <param name="depth" type="unsigned long" dir="in"/>
8190 </method>
8191
8192 <method name="lockFramebuffer">
8193 <desc>
8194 Requests access to the internal framebuffer.
8195 </desc>
8196 <param name="address" type="octet" mod="ptr" dir="return"/>
8197 </method>
8198
8199 <method name="unlockFramebuffer">
8200 <desc>
8201 Releases access to the internal framebuffer.
8202 </desc>
8203 </method>
8204
8205 <method name="registerExternalFramebuffer">
8206 <desc>
8207 Registers an external framebuffer.
8208 </desc>
8209 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8210 </method>
8211
8212 <method name="setFramebuffer">
8213 <desc>
8214 Sets the framebuffer for given screen.
8215 </desc>
8216 <param name="screenId" type="unsigned long" dir="in"/>
8217 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8218 </method>
8219
8220 <method name="getFramebuffer">
8221 <desc>
8222 Queries the framebuffer for given screen.
8223 </desc>
8224 <param name="screenId" type="unsigned long" dir="in"/>
8225 <param name="framebuffer" type="IFramebuffer" dir="out"/>
8226 <param name="xOrigin" type="long" dir="out"/>
8227 <param name="yOrigin" type="long" dir="out"/>
8228 </method>
8229
8230 <method name="setVideoModeHint">
8231 <desc>
8232 Asks VirtualBox to request the given video mode from
8233 the guest. This is just a hint and it cannot be guaranteed
8234 that the requested resolution will be used. Guest Additions
8235 are required for the request to be seen by guests. The caller
8236 should issue the request and wait for a resolution change and
8237 after a timeout retry.
8238
8239 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
8240 parameters means that the corresponding values should be taken from the
8241 current video mode (i.e. left unchanged).
8242
8243 If the guest OS supports multi-monitor configuration then the @a display
8244 parameter specifies the number of the guest display to send the hint to:
8245 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
8246 so on. If the multi-monitor configuration is not supported, @a display
8247 must be <tt>0</tt>.
8248
8249 </desc>
8250 <param name="width" type="unsigned long" dir="in"/>
8251 <param name="height" type="unsigned long" dir="in"/>
8252 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
8253 <param name="display" type="unsigned long" dir="in"/>
8254 </method>
8255
8256 <method name="setSeamlessMode">
8257 <desc>
8258 Enables or disables seamless guest display rendering (seamless desktop
8259 integration) mode.
8260 <note>
8261 Calling this method has no effect if <link
8262 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
8263 </note>
8264 </desc>
8265 <param name="enabled" type="boolean" dir="in"/>
8266 </method>
8267
8268 <method name="takeScreenShot">
8269 <desc>
8270 Takes a screen shot of the requested size and copies it to the
8271 32-bpp buffer allocated by the caller.
8272 </desc>
8273 <param name="address" type="octet" mod="ptr" dir="in"/>
8274 <param name="width" type="unsigned long" dir="in"/>
8275 <param name="height" type="unsigned long" dir="in"/>
8276 </method>
8277
8278 <method name="drawToScreen">
8279 <desc>
8280 Draws a 32-bpp image of the specified size from the given buffer
8281 to the given point on the VM display.
8282 </desc>
8283 <param name="address" type="octet" mod="ptr" dir="in"/>
8284 <param name="x" type="unsigned long" dir="in"/>
8285 <param name="y" type="unsigned long" dir="in"/>
8286 <param name="width" type="unsigned long" dir="in"/>
8287 <param name="height" type="unsigned long" dir="in"/>
8288 </method>
8289
8290 <method name="invalidateAndUpdate">
8291 <desc>
8292 Does a full invalidation of the VM display and instructs the VM
8293 to update it.
8294 </desc>
8295 </method>
8296
8297 <method name="resizeCompleted">
8298 <desc>
8299 Signals that a framebuffer has completed the resize operation.
8300 </desc>
8301 <param name="screenId" type="unsigned long" dir="in"/>
8302 </method>
8303
8304 <method name="updateCompleted">
8305 <desc>
8306 Signals that a framebuffer has completed the update operation.
8307 </desc>
8308 </method>
8309
8310 </interface>
8311
8312 <!--
8313 // INetworkAdapter
8314 /////////////////////////////////////////////////////////////////////////
8315 -->
8316
8317 <enum
8318 name="NetworkAttachmentType"
8319 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
8320 >
8321 <desc>
8322 Network attachment type.
8323 </desc>
8324
8325 <const name="Null" value="0">
8326 <desc><tt>null</tt> value. Also means "not attached".</desc>
8327 </const>
8328 <const name="NAT" value="1"/>
8329 <const name="HostInterface" value="2"/>
8330 <const name="Internal" value="3"/>
8331 </enum>
8332
8333 <enum
8334 name="NetworkAdapterType"
8335 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
8336 >
8337 <desc>
8338 Network adapter type.
8339 </desc>
8340
8341 <const name="Null" value="0">
8342 <desc><tt>null</tt> value. Never used by the API.</desc>
8343 </const>
8344 <const name="Am79C970A" value="1"/>
8345 <const name="Am79C973" value="2"/>
8346 <const name="I82540EM" value="3"/>
8347 <const name="I82543GC" value="4"/>
8348 </enum>
8349
8350 <interface
8351 name="INetworkAdapter" extends="$unknown"
8352 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
8353 wsmap="managed"
8354 >
8355 <attribute name="adapterType" type="NetworkAdapterType">
8356 <desc>
8357 Type of the virtual network adapter. Depending on this value,
8358 VirtualBox will provide a different virtual network hardware
8359 to the guest.
8360 </desc>
8361 </attribute>
8362
8363 <attribute name="slot" type="unsigned long" readonly="yes">
8364 <desc>
8365 Slot number this adapter is plugged into. Corresponds to
8366 the value you pass to <link to="IMachine::getNetworkAdapter"/>
8367 to obtain this instance.
8368 </desc>
8369 </attribute>
8370
8371 <attribute name="enabled" type="boolean">
8372 <desc>
8373 Flag whether the network adapter is present in the
8374 guest system. If disabled, the virtual guest hardware will
8375 not contain this network adapter. Can only be changed when
8376 the VM is not running.
8377 </desc>
8378 </attribute>
8379
8380 <attribute name="MACAddress" type="wstring">
8381 <desc>
8382 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
8383 it to NULL, VirtualBox will generate a unique MAC address.
8384 </desc>
8385 </attribute>
8386
8387 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
8388
8389 <attribute name="hostInterface" type="wstring">
8390 <desc>
8391 Name of the Host Network Interface that is currently in use. NULL will be returned
8392 if no device has been allocated. On Linux, setting this refers to a permanent TAP
8393 device. However, a file descriptor has precedence over the interface name on Linux.
8394 Note that when VirtualBox allocates a TAP device, this property will not be set, i.e. the
8395 interface name would have to be determined using the file descriptor and /proc/self/fd.
8396 </desc>
8397 </attribute>
8398
8399<if target="xpidl">
8400 <attribute name="TAPFileDescriptor" type="long">
8401 <desc>
8402 File descriptor of the TAP device. It can either be setup by the caller
8403 which has to supply an existing valid file handle allocated in the parent
8404 process of the VM process or allocated by VirtualBox. The value is -1 if it
8405 has not been defined. This property is non persistent, i.e. it will not be
8406 stored in the VM's configuration data and thus has to be set at each startup.
8407 </desc>
8408 </attribute>
8409 <attribute name="TAPSetupApplication" type="wstring">
8410 <desc>
8411 Application to start to configure the 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 <attribute name="TAPTerminateApplication" type="wstring">
8417 <desc>
8418 Application to start before closing a TAP device.
8419 It is being passed two parameters, 1) the file handle (as ASCII),
8420 2) the TAP device name if it is available.
8421 </desc>
8422 </attribute>
8423</if>
8424
8425 <attribute name="internalNetwork" type="wstring">
8426 <desc>
8427 Name of the internal network the VM is attached to.
8428 </desc>
8429 </attribute>
8430
8431 <attribute name="NATNetwork" type="wstring">
8432 <desc>
8433 Name of the NAT network the VM is attached to.
8434 </desc>
8435 </attribute>
8436
8437 <attribute name="cableConnected" type="boolean">
8438 <desc>
8439 Flag whether the adapter reports the cable as connected or not.
8440 It can be used to report offline situations to a VM.
8441 </desc>
8442 </attribute>
8443
8444 <attribute name="lineSpeed" type="unsigned long">
8445 <desc>
8446 Line speed reported by custom drivers, in units of 1 kbps.
8447 </desc>
8448 </attribute>
8449
8450 <attribute name="traceEnabled" type="boolean">
8451 <desc>
8452 Flag whether network traffic from/to the network card should be traced.
8453 Can only be toggled when the VM is turned off.
8454 </desc>
8455 </attribute>
8456
8457 <attribute name="traceFile" type="wstring">
8458 <desc>
8459 Filename where a network trace will be stored. If not set, VBox-pid.pcap
8460 will be used.
8461 </desc>
8462 </attribute>
8463
8464 <method name="attachToNAT">
8465 <desc>
8466 Attach the network adapter to the Network Address Translation (NAT) interface.
8467 </desc>
8468 </method>
8469
8470 <method name="attachToHostInterface">
8471 <desc>
8472 Attach the network adapter to a host interface. On Linux, the TAP
8473 setup application will be executed if configured and unless a device
8474 name and/or file descriptor has been set, a new TAP interface will be
8475 created.
8476 </desc>
8477 </method>
8478
8479 <method name="attachToInternalNetwork">
8480 <desc>
8481 Attach the network adapter to an internal network.
8482 </desc>
8483 </method>
8484
8485 <method name="detach">
8486 <desc>
8487 Detach the network adapter
8488 </desc>
8489 </method>
8490 </interface>
8491
8492
8493 <!--
8494 // ISerialPort
8495 /////////////////////////////////////////////////////////////////////////
8496 -->
8497
8498 <enum
8499 name="PortMode"
8500 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
8501 >
8502 <desc>
8503 The PortMode enumeration represents possible communication modes for
8504 the virtual serial port device.
8505 </desc>
8506
8507 <const name="Disconnected" value="0">
8508 <desc>Virtual device is not attached to any real host device.</desc>
8509 </const>
8510 <const name="HostPipe" value="1">
8511 <desc>Virtual device is attached to a host pipe.</desc>
8512 </const>
8513 <const name="HostDevice" value="2">
8514 <desc>Virtual device is attached to a host device.</desc>
8515 </const>
8516 </enum>
8517
8518 <interface
8519 name="ISerialPort" extends="$unknown"
8520 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
8521 wsmap="managed"
8522 >
8523
8524 <desc>
8525 The ISerialPort interface represents the virtual serial port device.
8526
8527 The virtual serial port device acts like an ordinary serial port
8528 inside the virtual machine. This device communicates to the real
8529 serial port hardware in one of two modes: host pipe or host device.
8530
8531 In host pipe mode, the #path attribute specifies the path to the pipe on
8532 the host computer that represents a serial port. The #server attribute
8533 determines if this pipe is created by the virtual machine process at
8534 machine startup or it must already exist before starting machine
8535 execution.
8536
8537 In host device mode, the #path attribute specifies the name of the
8538 serial port device on the host computer.
8539
8540 There is also a third communication mode: the disconnected mode. In this
8541 mode, the guest OS running inside the virtual machine will be able to
8542 detect the serial port, but all port write operations will be discarded
8543 and all port read operations will return no data.
8544
8545 <see>IMachine::getSerialPort</see>
8546 </desc>
8547
8548 <attribute name="slot" type="unsigned long" readonly="yes">
8549 <desc>
8550 Slot number this serial port is plugged into. Corresponds to
8551 the value you pass to <link to="IMachine::getSerialPort"/>
8552 to obtain this instance.
8553 </desc>
8554 </attribute>
8555
8556 <attribute name="enabled" type="boolean">
8557 <desc>
8558 Flag whether the serial port is enabled. If disabled,
8559 the serial port will not be reported to the guest OS.
8560 </desc>
8561 </attribute>
8562
8563 <attribute name="IOBase" type="unsigned long">
8564 <desc>Base I/O address of the serial port.</desc>
8565 </attribute>
8566
8567 <attribute name="IRQ" type="unsigned long">
8568 <desc>IRQ number of the serial port.</desc>
8569 </attribute>
8570
8571 <attribute name="hostMode" type="PortMode">
8572 <desc>How is this port connected to the host.</desc>
8573 </attribute>
8574
8575 <attribute name="server" type="boolean">
8576 <desc>
8577 Flag whether this serial port acts as a server (creates a new pipe on
8578 the host) or as a client (uses the existing pipe). This attribute is
8579 used only when <link to="#hostMode"/> is PortMode::HostPipe.
8580 </desc>
8581 </attribute>
8582
8583 <attribute name="path" type="wstring">
8584 <desc>
8585 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
8586 PortMode::HostPipe, or the host serial device name when
8587 <link to="#hostMode"/> is PortMode::HostDevice. In either of the above
8588 cases, setting a @c null or an empty string as the attribute's value
8589 will result into an error. Otherwise, the value of this property is
8590 ignored.
8591 </desc>
8592 </attribute>
8593
8594 </interface>
8595
8596 <!--
8597 // IParallelPort
8598 /////////////////////////////////////////////////////////////////////////
8599 -->
8600
8601 <interface
8602 name="IParallelPort" extends="$unknown"
8603 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
8604 wsmap="managed"
8605 >
8606
8607 <desc>
8608 The IParallelPort interface represents the virtual parallel port device.
8609
8610 The virtual parallel port device acts like an ordinary parallel port
8611 inside the virtual machine. This device communicates to the real
8612 parallel port hardware using the name of the parallel device on the host
8613 computer specified in the #path attribute.
8614
8615 Each virtual parallel port device is assigned a base I/O address and an
8616 IRQ number that will be reported to the guest operating system and used
8617 to operate the given parallel port from within the virtual machine.
8618
8619 <see>IMachine::getParallelPort</see>
8620 </desc>
8621
8622 <attribute name="slot" type="unsigned long" readonly="yes">
8623 <desc>
8624 Slot number this parallel port is plugged into. Corresponds to
8625 the value you pass to <link to="IMachine::getParallelPort"/>
8626 to obtain this instance.
8627 </desc>
8628 </attribute>
8629
8630 <attribute name="enabled" type="boolean">
8631 <desc>
8632 Flag whether the parallel port is enabled. If disabled,
8633 the parallel port will not be reported to the guest OS.
8634 </desc>
8635 </attribute>
8636
8637 <attribute name="IOBase" type="unsigned long">
8638 <desc>Base I/O address of the parallel port.</desc>
8639 </attribute>
8640
8641 <attribute name="IRQ" type="unsigned long">
8642 <desc>IRQ number of the parallel port.</desc>
8643 </attribute>
8644
8645 <attribute name="path" type="wstring">
8646 <desc>
8647 Host parallel device name. If this parallel port is enabled, setting a
8648 @c null or an empty string as this attribute's value will result into
8649 an error.
8650 </desc>
8651 </attribute>
8652
8653 </interface>
8654
8655
8656 <!--
8657 // IMachineDebugger
8658 /////////////////////////////////////////////////////////////////////////
8659 -->
8660
8661 <interface
8662 name="IMachineDebugger" extends="$unknown"
8663 uuid="0de52346-938b-4020-a33b-471be542f3ff"
8664 wsmap="suppress"
8665 >
8666 <method name="resetStats">
8667 <desc>
8668 Reset VM statistics.
8669 </desc>
8670 <param name="pattern" type="wstring" dir="in">
8671 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8672 </param>
8673 </method>
8674
8675 <method name="dumpStats">
8676 <desc>
8677 Dumps VM statistics.
8678 </desc>
8679 <param name="pattern" type="wstring" dir="in">
8680 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8681 </param>
8682 </method>
8683
8684 <method name="getStats">
8685 <desc>
8686 Get the VM statistics in a XMLish format.
8687 </desc>
8688 <param name="pattern" type="wstring" dir="in">
8689 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8690 </param>
8691 <param name="withDescriptions" type="boolean" dir="in">
8692 <desc>Whether to include the descriptions.</desc>
8693 </param>
8694 <param name="stats" type="wstring" dir="out">
8695 <desc>The XML document containing the statistics.</desc>
8696 </param>
8697 </method>
8698
8699 <attribute name="singlestep" type="boolean">
8700 <desc>Switch for enabling singlestepping.</desc>
8701 </attribute>
8702
8703 <attribute name="recompileUser" type="boolean">
8704 <desc>Switch for forcing code recompilation for user mode code.</desc>
8705 </attribute>
8706
8707 <attribute name="recompileSupervisor" type="boolean">
8708 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
8709 </attribute>
8710
8711 <attribute name="PATMEnabled" type="boolean">
8712 <desc>Switch for enabling and disabling the PATM component.</desc>
8713 </attribute>
8714
8715 <attribute name="CSAMEnabled" type="boolean">
8716 <desc>Switch for enabling and disabling the CSAM component.</desc>
8717 </attribute>
8718
8719 <attribute name="logEnabled" type="boolean">
8720 <desc>Switch for enabling and disabling logging.</desc>
8721 </attribute>
8722
8723 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
8724 <desc>
8725 Flag indicating whether the VM is currently making use of CPU hardware
8726 virtualization extensions.
8727 </desc>
8728 </attribute>
8729
8730 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
8731 <desc>
8732 Flag indicating whether the VM is currently making use of the nested paging
8733 CPU hardware virtualization extension.
8734 </desc>
8735 </attribute>
8736
8737 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
8738 <desc>
8739 Flag indicating whether the VM is currently making use of the VPID
8740 VT-x extension.
8741 </desc>
8742 </attribute>
8743
8744 <attribute name="PAEEnabled" type="boolean" readonly="yes">
8745 <desc>
8746 Flag indicating whether the VM is currently making use of the Physical
8747 Address Extension CPU feature.
8748 </desc>
8749 </attribute>
8750
8751 <attribute name="virtualTimeRate" type="unsigned long">
8752 <desc>
8753 The rate at which the virtual time runs expressed as a percentage.
8754 The accepted range is 2% to 20000%.
8755 </desc>
8756 </attribute>
8757
8758 <!-- @todo method for setting log flags, groups and destination! -->
8759
8760 <attribute name="VM" type="unsigned long long" readonly="yes">
8761 <desc>
8762 Gets the VM handle. This is only for internal use while
8763 we carve the details of this interface.
8764 </desc>
8765 </attribute>
8766
8767 </interface>
8768
8769 <!--
8770 // IUSBController
8771 /////////////////////////////////////////////////////////////////////////
8772 -->
8773
8774 <interface
8775 name="IUSBController" extends="$unknown"
8776 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
8777 wsmap="managed"
8778 >
8779 <attribute name="enabled" type="boolean">
8780 <desc>
8781 Flag whether the USB controller is present in the
8782 guest system. If disabled, the virtual guest hardware will
8783 not contain any USB controller. Can only be changed when
8784 the VM is powered off.
8785 </desc>
8786 </attribute>
8787
8788 <attribute name="enabledEhci" type="boolean">
8789 <desc>
8790 Flag whether the USB EHCI controller is present in the
8791 guest system. If disabled, the virtual guest hardware will
8792 not contain a USB EHCI controller. Can only be changed when
8793 the VM is powered off.
8794 </desc>
8795 </attribute>
8796
8797 <attribute name="USBStandard" type="unsigned short" readonly="yes">
8798 <desc>
8799 USB standard version which the controller implements.
8800 This is a BCD which means that the major version is in the
8801 high byte and minor version is in the low byte.
8802 </desc>
8803 </attribute>
8804
8805 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
8806 <desc>
8807 List of USB device filters associated with the machine.
8808
8809 If the machine is currently running, these filters are activated
8810 every time a new (supported) USB device is attached to the host
8811 computer that was not ignored by global filters
8812 (<link to="IHost::USBDeviceFilters"/>).
8813
8814 These filters are also activated when the machine is powered up.
8815 They are run against a list of all currently available USB
8816 devices (in states
8817 <link to="USBDeviceState::Available">Available</link>,
8818 <link to="USBDeviceState::Busy">Busy</link>,
8819 <link to="USBDeviceState::Held">Held</link>) that were not previously
8820 ignored by global filters.
8821
8822 If at least one filter matches the USB device in question, this
8823 device is automatically captured (attached to) the virtual USB
8824 controller of this machine.
8825
8826 <see>IUSBDeviceFilter, ::IUSBController</see>
8827 </desc>
8828 </attribute>
8829
8830 <method name="createDeviceFilter">
8831 <desc>
8832 Creates a new USB device filter. All attributes except
8833 the filter name are set to <tt>null</tt> (any match),
8834 <i>active</i> is <tt>false</tt> (the filter is not active).
8835
8836 The created filter can then be added to the list of filters using
8837 <link to="#insertDeviceFilter()"/>.
8838
8839 <see>#deviceFilters</see>
8840 </desc>
8841 <param name="name" type="wstring" dir="in">
8842 <desc>
8843 Filter name. See <link to="IUSBDeviceFilter::name"/>
8844 for more info.
8845 </desc>
8846 </param>
8847 <param name="filter" type="IUSBDeviceFilter" dir="return">
8848 <desc>Created filter object.</desc>
8849 </param>
8850 </method>
8851
8852 <method name="insertDeviceFilter">
8853 <desc>
8854 Inserts the given USB device to the specified position
8855 in the list of filters.
8856
8857 Positions are numbered starting from <tt>0</tt>. If the specified
8858 position is equal to or greater than the number of elements in
8859 the list, the filter is added to the end of the collection.
8860
8861 <note>
8862 Duplicates are not allowed, so an attempt to insert a
8863 filter that is already in the collection, will return an
8864 error.
8865 </note>
8866
8867 <see>#deviceFilters</see>
8868 </desc>
8869 <param name="position" type="unsigned long" dir="in">
8870 <desc>Position to insert the filter to.</desc>
8871 </param>
8872 <param name="filter" type="IUSBDeviceFilter" dir="in">
8873 <desc>USB device filter to insert.</desc>
8874 </param>
8875 </method>
8876
8877 <method name="removeDeviceFilter">
8878 <desc>
8879 Removes a USB device filter from the specified position in the
8880 list of filters.
8881
8882 Positions are numbered starting from <tt>0</tt>. Specifying a
8883 position equal to or greater than the number of elements in
8884 the list will produce an error.
8885
8886 <see>#deviceFilters</see>
8887 </desc>
8888 <param name="position" type="unsigned long" dir="in">
8889 <desc>Position to remove the filter from.</desc>
8890 </param>
8891 <param name="filter" type="IUSBDeviceFilter" dir="return">
8892 <desc>Removed USB device filter.</desc>
8893 </param>
8894 </method>
8895
8896 </interface>
8897
8898
8899 <!--
8900 // IUSBDevice
8901 /////////////////////////////////////////////////////////////////////////
8902 -->
8903
8904 <enumerator
8905 name="IUSBDeviceEnumerator" type="IUSBDevice"
8906 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
8907 />
8908
8909 <collection
8910 name="IUSBDeviceCollection" type="IUSBDevice"
8911 enumerator="IUSBDeviceEnumerator"
8912 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
8913 readonly="yes"
8914 >
8915 <method name="findById">
8916 <desc>
8917 Searches this collection for a USB device with the given UUID.
8918 <note>
8919 The method returns an error if the given UUID does not
8920 correspond to any USB device in the collection.
8921 </note>
8922 <see>IUSBDevice::id</see>
8923 </desc>
8924 <param name="id" type="uuid" dir="in">
8925 <desc>UUID of the USB device to search for.</desc>
8926 </param>
8927 <param name="device" type="IUSBDevice" dir="return">
8928 <desc>Found USB device object.</desc>
8929 </param>
8930 </method>
8931
8932 <method name="findByAddress">
8933 <desc>
8934 Searches this collection for a USB device with the given
8935 host address.
8936 <note>
8937 The method returns an error if the given address does not
8938 correspond to any USB device in the collection.
8939 </note>
8940 <see>IUSBDevice::address</see>
8941 </desc>
8942 <param name="name" type="wstring" dir="in">
8943 <desc>
8944 Address of the USB device (as assigned by the host) to
8945 search for.
8946 </desc>
8947 </param>
8948 <param name="device" type="IUSBDevice" dir="return">
8949 <desc>Found USB device object.</desc>
8950 </param>
8951 </method>
8952
8953 </collection>
8954
8955 <interface
8956 name="IUSBDevice" extends="$unknown"
8957 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
8958 wsmap="managed"
8959 >
8960 <desc>
8961 The IUSBDevice interface represents a virtual USB device attached to the
8962 virtual machine.
8963
8964 A collection of objects implementing this interface is stored in the
8965 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
8966 attached to a running virtual machine's USB controller.
8967 </desc>
8968
8969 <attribute name="id" type="uuid" readonly="yes">
8970 <desc>
8971 Unique USB device ID. This ID is built from #vendorId,
8972 #productId, #revision and #serialNumber.
8973 </desc>
8974 </attribute>
8975
8976 <attribute name="vendorId" type="unsigned short" readonly="yes">
8977 <desc>Vendor ID.</desc>
8978 </attribute>
8979
8980 <attribute name="productId" type="unsigned short" readonly="yes">
8981 <desc>Product ID.</desc>
8982 </attribute>
8983
8984 <attribute name="revision" type="unsigned short" readonly="yes">
8985 <desc>
8986 Product revision number. This is a packed BCD represented as
8987 unsigned short. The high byte is the integer part and the low
8988 byte is the decimal.
8989 </desc>
8990 </attribute>
8991
8992 <attribute name="manufacturer" type="wstring" readonly="yes">
8993 <desc>Manufacturer string.</desc>
8994 </attribute>
8995
8996 <attribute name="product" type="wstring" readonly="yes">
8997 <desc>Product string.</desc>
8998 </attribute>
8999
9000 <attribute name="serialNumber" type="wstring" readonly="yes">
9001 <desc>Serial number string.</desc>
9002 </attribute>
9003
9004 <attribute name="address" type="wstring" readonly="yes">
9005 <desc>Host specific address of the device.</desc>
9006 </attribute>
9007
9008 <attribute name="port" type="unsigned short" readonly="yes">
9009 <desc>
9010 Host USB port number the device is physically
9011 coonected to.
9012 </desc>
9013 </attribute>
9014
9015 <attribute name="version" type="unsigned short" readonly="yes">
9016 <desc>
9017 The major USB version of the device - 1 or 2.
9018 </desc>
9019 </attribute>
9020
9021 <attribute name="portVersion" type="unsigned short" readonly="yes">
9022 <desc>
9023 The major USB version of the host USB port the device is
9024 physically connected to - 1 or 2. For devices not connected to
9025 anything this will have the same value as the version attribute.
9026 </desc>
9027 </attribute>
9028
9029 <attribute name="remote" type="boolean" readonly="yes">
9030 <desc>
9031 Whether the device is physically connected to a remote VRDP
9032 client or to a local host machine.
9033 </desc>
9034 </attribute>
9035
9036 </interface>
9037
9038
9039 <!--
9040 // IUSBDeviceFilter
9041 /////////////////////////////////////////////////////////////////////////
9042 -->
9043
9044 <enumerator
9045 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
9046 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
9047 />
9048
9049 <collection
9050 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
9051 enumerator="IUSBDeviceFilterEnumerator"
9052 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
9053 readonly="yes"
9054 />
9055
9056 <interface
9057 name="IUSBDeviceFilter" extends="$unknown"
9058 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
9059 wsmap="managed"
9060 >
9061 <desc>
9062 The IUSBDeviceFilter interface represents an USB device filter used
9063 to perform actions on a group of USB devices.
9064
9065 This type of filters is used by running virtual machines to
9066 automatically capture selected USB devices once they are physically
9067 attached to the host computer.
9068
9069 A USB device is matched to the given device filter if and only if all
9070 attributes of the device match the corresponding attributes of the
9071 filter (that is, attributes are joined together using the logical AND
9072 operation). On the other hand, all together, filters in the list of
9073 filters carry the semantics of the logical OR operation. So if it is
9074 desirable to create a match like "this vendor id OR this product id",
9075 one needs to create two filters and specify "any match" (see below)
9076 for unused attributes.
9077
9078 All filter attributes used for matching are strings. Each string
9079 is an expression representing a set of values of the corresponding
9080 device attribute, that will match the given filter. Currently, the
9081 following filtering expressions are supported:
9082
9083 <ul>
9084 <li><i>Interval filters</i>. Used to specify valid intervals for
9085 integer device attributes (Vendor ID, Product ID and Revision).
9086 The format of the string is:
9087
9088 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
9089
9090 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
9091 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
9092 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
9093 is omitted before a dash (<tt>-</tt>), the minimum possible integer
9094 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
9095 possible integer is assumed.
9096 </li>
9097 <li><i>Boolean filters</i>. Used to specify acceptable values for
9098 boolean device attributes. The format of the string is:
9099
9100 <tt>true|false|yes|no|0|1</tt>
9101
9102 </li>
9103 <li><i>Exact match</i>. Used to specify a single value for the given
9104 device attribute. Any string that does't start with <tt>int:</tt>
9105 represents the exact match. String device attributes are compared to
9106 this string including case of symbols. Integer attributes are first
9107 converted to a string (see individual filter attributes) and then
9108 compared ignoring case.
9109
9110 </li>
9111 <li><i>Any match</i>. Any value of the corresponding device attribute
9112 will match the given filter. An empty or <tt>null</tt> string is
9113 used to construct this type of filtering expressions.
9114
9115 </li>
9116 </ul>
9117
9118 <note>
9119 On the Windows host platform, interval filters are not currently
9120 available. Also all string filter attributes
9121 (<link to="#manufacturer"/>, <link to="#product"/>,
9122 <link to="#serialNumber"/>) are ignored, so they behave as
9123 <i>any match</i> no matter what string expression is specified.
9124 </note>
9125
9126 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
9127 </desc>
9128
9129 <attribute name="name" type="wstring">
9130 <desc>
9131 Visible name for this filter.
9132 This name is used to visually distinguish one filter from another,
9133 so it can neither be <tt>null</tt> nor an empty string.
9134 </desc>
9135 </attribute>
9136
9137 <attribute name="active" type="boolean">
9138 <desc>Whether this filter active or has been temporarily disabled.</desc>
9139 </attribute>
9140
9141 <attribute name="vendorId" type="wstring">
9142 <desc>
9143 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
9144 The string representation for the <i>exact matching</i>
9145 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9146 (including leading zeroes).
9147 </desc>
9148 </attribute>
9149
9150 <attribute name="productId" type="wstring">
9151 <desc>
9152 <link to="IUSBDevice::productId">Product ID</link> filter.
9153 The string representation for the <i>exact matching</i>
9154 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9155 (including leading zeroes).
9156 </desc>
9157 </attribute>
9158
9159 <attribute name="revision" type="wstring">
9160 <desc>
9161 <link to="IUSBDevice::productId">Product revision number</link>
9162 filter. The string representation for the <i>exact matching</i>
9163 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
9164 of the integer part of the revision, and <tt>F</tt> is the
9165 decimal digit of its fractional part (including leading and
9166 trailing zeros).
9167 Note that for interval filters, it's best to use the hexadecimal
9168 form, because the revision is stored as a 16 bit packed BCD value;
9169 so the expression <tt>int:0x0100-0x0199</tt> will match any
9170 revision from <tt>1.0</tt> to <tt>1.99</tt>.
9171 </desc>
9172 </attribute>
9173
9174 <attribute name="manufacturer" type="wstring">
9175 <desc>
9176 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
9177 </desc>
9178 </attribute>
9179
9180 <attribute name="product" type="wstring">
9181 <desc>
9182 <link to="IUSBDevice::product">Product</link> filter.
9183 </desc>
9184 </attribute>
9185
9186 <attribute name="serialNumber" type="wstring">
9187 <desc>
9188 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
9189 </desc>
9190 </attribute>
9191
9192 <attribute name="port" type="wstring">
9193 <desc>
9194 <link to="IUSBDevice::port">Host USB port</link> filter.
9195 </desc>
9196 </attribute>
9197
9198 <attribute name="remote" type="wstring">
9199 <desc>
9200 <link to="IUSBDevice::remote">Remote state</link> filter.
9201 <note>
9202 This filter makes sense only for machine USB filters,
9203 i.e. it is ignored by IHostUSBDeviceFilter objects.
9204 </note>
9205 </desc>
9206 </attribute>
9207
9208 <attribute name="maskedInterfaces" type="unsigned long">
9209 <desc>
9210 This is an advanced option for hiding one or more USB interfaces
9211 from the guest. The value is a bitmask where the bits that are set
9212 means the corresponding USB interface should be hidden, masked off
9213 if you like.
9214 This feature only works on Linux hosts.
9215 </desc>
9216 </attribute>
9217
9218 </interface>
9219
9220
9221 <!--
9222 // IHostUSBDevice
9223 /////////////////////////////////////////////////////////////////////////
9224 -->
9225
9226 <enum
9227 name="USBDeviceState"
9228 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
9229 >
9230 <desc>
9231 USB device state. This enumeration represents all possible states
9232 of the USB device physically attached to the host computer regarding
9233 its state on the host computer and availability to guest computers
9234 (all currently running virtual machines).
9235
9236 Once a supported USB device is attached to the host, global USB
9237 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
9238 either ignore the device, or put ot to #Held state, or do nothing. Unless
9239 the device is ignored by global filters, filters of all currently running
9240 guests (<link to="IUSBController::deviceFilters"/>) are activated that can
9241 put it to #Captured state.
9242
9243 If the device was ignored by global filters, or didn't match
9244 any filters at all (including guest ones), it is handled by the host
9245 in a normal way. In this case, the device state is determined by
9246 the host and can be one of #Unavailable, #Busy or #Available, depending on
9247 the current device usage.
9248
9249 Besides auto-capturing based on filters, the device can be manually
9250 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
9251 state is #Busy, #Available or #Held.
9252
9253 <note>
9254 Due to differences in USB stack implementations in Linux and Win32,
9255 states #Busy and #Available are applicable only to the Linux version of
9256 the product. This also means that (<link
9257 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if
9258 the device state is #Held.
9259 </note>
9260
9261 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
9262 </desc>
9263
9264 <const name="NotSupported" value="0">
9265 <desc>
9266 Not supported by the VirtualBox server, not available to guests.
9267 </desc>
9268 </const>
9269 <const name="Unavailable" value="1">
9270 <desc>
9271 Being used by the host computer exclusively,
9272 not available to guests.
9273 </desc>
9274 </const>
9275 <const name="Busy" value="2">
9276 <desc>
9277 Being used by the host computer, potentially available to guests.
9278 </desc>
9279 </const>
9280 <const name="Available" value="3">
9281 <desc>
9282 Not used by the host computer, available to guests.
9283 The host computer can also start using the device at any time.
9284 </desc>
9285 </const>
9286 <const name="Held" value="4">
9287 <desc>
9288 Held by the VirtualBox server (ignored by the host computer),
9289 available to guests.
9290 </desc>
9291 </const>
9292 <const name="Captured" value="5">
9293 <desc>
9294 Captured by one of the guest computers, not available
9295 to anybody else.
9296 </desc>
9297 </const>
9298 </enum>
9299
9300 <enumerator
9301 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
9302 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
9303 />
9304
9305 <collection
9306 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
9307 enumerator="IHostUSBDeviceEnumerator"
9308 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
9309 readonly="yes"
9310 >
9311 <method name="findById">
9312 <desc>
9313 Searches this collection for a USB device with the given UUID.
9314 <note>
9315 The method returns an error if the given UUID does not
9316 correspond to any USB device in the collection.
9317 </note>
9318 <see>IHostUSBDevice::id</see>
9319 </desc>
9320 <param name="id" type="uuid" dir="in">
9321 <desc>UUID of the USB device to search for.</desc>
9322 </param>
9323 <param name="device" type="IHostUSBDevice" dir="return">
9324 <desc>Found USB device object.</desc>
9325 </param>
9326 </method>
9327
9328 <method name="findByAddress">
9329 <desc>
9330 Searches this collection for a USB device with the given
9331 host address.
9332 <note>
9333 The method returns an error if the given address does not
9334 correspond to any USB device in the collection.
9335 </note>
9336 <see>IHostUSBDevice::address</see>
9337 </desc>
9338 <param name="name" type="wstring" dir="in">
9339 <desc>
9340 Address of the USB device (as assigned by the host) to
9341 search for.
9342 </desc>
9343 </param>
9344 <param name="device" type="IHostUSBDevice" dir="return">
9345 <desc>Found USB device object.</desc>
9346 </param>
9347 </method>
9348
9349 </collection>
9350
9351 <interface
9352 name="IHostUSBDevice" extends="IUSBDevice"
9353 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
9354 wsmap="managed"
9355 >
9356 <desc>
9357 The IHostUSBDevice interface represents a physical USB device attached
9358 to the host computer.
9359
9360 Besides properties inherited from IUSBDevice, this interface adds the
9361 <link to="#state"/> property that holds the current state of the USB
9362 device.
9363
9364 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
9365 </desc>
9366
9367 <attribute name="state" type="USBDeviceState" readonly="yes">
9368 <desc>
9369 Current state of the device.
9370 </desc>
9371 </attribute>
9372
9373 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
9374
9375 </interface>
9376
9377
9378 <!--
9379 // IHostUSBDeviceFilter
9380 /////////////////////////////////////////////////////////////////////////
9381 -->
9382
9383 <enum
9384 name="USBDeviceFilterAction"
9385 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
9386 >
9387 <desc>
9388 Actions for host USB device filters.
9389 <see>IHostUSBDeviceFilter, USBDeviceState</see>
9390 </desc>
9391
9392 <const name="Null" value="0">
9393 <desc><tt>null</tt> value. Never used by the API.</desc>
9394 </const>
9395 <const name="Ignore" value="1">
9396 <desc>Ignore the matched USB device.</desc>
9397 </const>
9398 <const name="Hold" value="2">
9399 <desc>Hold the matched USB device.</desc>
9400 </const>
9401 </enum>
9402
9403 <enumerator
9404 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
9405 uuid="ff735211-903e-4642-9c37-189eb44579fe"
9406 />
9407
9408 <collection
9409 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
9410 enumerator="IHostUSBDeviceFilterEnumerator"
9411 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
9412 readonly="yes"
9413 />
9414
9415 <interface
9416 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
9417 uuid="4cc70246-d74a-400f-8222-3900489c0374"
9418 wsmap="managed"
9419 >
9420 <desc>
9421 The IHostUSBDeviceFilter interface represents a global filter for a
9422 physical USB device used by the host computer. Used indirectly in
9423 <link to="IHost::USBDeviceFilters"/>.
9424
9425 Using filters of this type, the host computer determines the initial
9426 state of the USB device after it is physically attached to the
9427 host's USB controller.
9428
9429 <note>
9430 The <link to="#remote"/> attribute is ignored by this type of
9431 filters, because it makes sense only for
9432 <link to="IUSBController::deviceFilters">machine USB filters</link>.
9433 </note>
9434
9435 <see>IHost::USBDeviceFilters</see>
9436 </desc>
9437
9438 <attribute name="action" type="USBDeviceFilterAction">
9439 <desc>
9440 Action performed by the host when an attached USB device
9441 matches this filter.
9442 </desc>
9443 </attribute>
9444
9445 </interface>
9446
9447 <!--
9448 // IAudioAdapter
9449 /////////////////////////////////////////////////////////////////////////
9450 -->
9451
9452 <enum
9453 name="AudioDriverType"
9454 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
9455 >
9456 <desc>
9457 Host audio driver type.
9458 </desc>
9459
9460 <const name="Null" value="0">
9461 <desc><tt>null</tt> value. Also means "dummy audio driver".</desc>
9462 </const>
9463 <const name="WinMM" value="1"/>
9464 <const name="OSS" value="2"/>
9465 <const name="ALSA" value="3"/>
9466 <const name="DirectSound" value="4"/>
9467 <const name="CoreAudio" value="5"/>
9468 <const name="MMPM" value="6"/>
9469 <const name="Pulse" value="7"/>
9470 <const name="SolAudio" value="8"/>
9471 </enum>
9472
9473 <enum
9474 name="AudioControllerType"
9475 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
9476 >
9477 <desc>
9478 Virtual audio controller type.
9479 </desc>
9480
9481 <const name="AC97" value="0"/>
9482 <const name="SB16" value="1"/>
9483 </enum>
9484
9485 <interface
9486 name="IAudioAdapter" extends="$unknown"
9487 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
9488 wsmap="managed"
9489 >
9490 <desc>
9491 The IAudioAdapter interface represents the virtual audio adapter of
9492 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
9493 </desc>
9494 <attribute name="enabled" type="boolean">
9495 <desc>
9496 Flag whether the audio adapter is present in the
9497 guest system. If disabled, the virtual guest hardware will
9498 not contain any audio adapter. Can only be changed when
9499 the VM is not running.
9500 </desc>
9501 </attribute>
9502 <attribute name="audioController" type="AudioControllerType">
9503 <desc>
9504 The audio hardware we emulate.
9505 </desc>
9506 </attribute>
9507 <attribute name="audioDriver" type="AudioDriverType">
9508 <desc>
9509 Audio driver the adapter is connected to. This setting
9510 can only be changed when the VM is not running.
9511 </desc>
9512 </attribute>
9513 </interface>
9514
9515 <!--
9516 // IVRDPServer
9517 /////////////////////////////////////////////////////////////////////////
9518 -->
9519
9520 <enum
9521 name="VRDPAuthType"
9522 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
9523 >
9524 <desc>
9525 VRDP authentication type.
9526 </desc>
9527
9528 <const name="Null" value="0">
9529 <desc><tt>null</tt> value. Also means "no authentication".</desc>
9530 </const>
9531 <const name="External" value="1"/>
9532 <const name="Guest" value="2"/>
9533 </enum>
9534
9535 <interface
9536 name="IVRDPServer" extends="$unknown"
9537 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
9538 wsmap="managed"
9539 >
9540 <attribute name="enabled" type="boolean">
9541 <desc>VRDP server status.</desc>
9542 </attribute>
9543
9544 <attribute name="port" type="unsigned long">
9545 <desc>
9546 VRDP server port number.
9547 <note>
9548 Setting the value of this property to <tt>0</tt> will reset the port
9549 number to the default value which is
9550 currently <tt>3389</tt>. Reading this property will always return a
9551 real port number, even after it has been set to <tt>0</tt> (in which
9552 case the default port is returned).
9553 </note>
9554 </desc>
9555 </attribute>
9556
9557 <attribute name="netAddress" type="wstring">
9558 <desc>VRDP server address.</desc>
9559 </attribute>
9560
9561 <attribute name="authType" type="VRDPAuthType">
9562 <desc>VRDP authentication method.</desc>
9563 </attribute>
9564
9565 <attribute name="authTimeout" type="unsigned long">
9566 <desc>Timeout for guest authentication. Milliseconds.</desc>
9567 </attribute>
9568
9569 <attribute name="allowMultiConnection" type="boolean">
9570 <desc>
9571 Flag whether multiple simultaneous connections to the VM are permitted.
9572 Note that this will be replaced by a more powerful mechanism in the future.
9573 </desc>
9574 </attribute>
9575
9576 <attribute name="reuseSingleConnection" type="boolean">
9577 <desc>
9578 Flag whether the existing connection must be dropped and a new connection
9579 must be established by the VRDP server, when a new client connects in single
9580 connection mode.
9581 </desc>
9582 </attribute>
9583
9584 </interface>
9585
9586
9587 <!--
9588 // ISharedFolder
9589 /////////////////////////////////////////////////////////////////////////
9590 -->
9591
9592 <enumerator
9593 name="ISharedFolderEnumerator" type="ISharedFolder"
9594 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
9595 />
9596
9597 <collection
9598 name="ISharedFolderCollection" type="ISharedFolder"
9599 enumerator="ISharedFolderEnumerator"
9600 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
9601 readonly="yes">
9602
9603 <method name="findByName">
9604 <desc>
9605 Searches this collection for a shared folder with the given logical
9606 name.
9607 <note>
9608 The method returns an error if the given name does not correspond to
9609 any shared folder in the collection.
9610 </note>
9611 </desc>
9612 <param name="name" type="wstring" dir="in">
9613 <desc>Logical name of the shared folder to search for</desc>
9614 </param>
9615 <param name="sharedFolder" type="ISharedFolder" dir="return">
9616 <desc>Found shared folder object</desc>
9617 </param>
9618 </method>
9619
9620 </collection>
9621
9622 <interface
9623 name="ISharedFolder" extends="$unknown"
9624 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
9625 wsmap="struct"
9626 >
9627 <desc>
9628 The ISharedFolder interface represents a folder in the host computer's
9629 file system accessible from the guest OS running inside a virtual
9630 machine using an associated logical name.
9631
9632 There are three types of shared folders:
9633 <ul>
9634 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
9635 folders available to all virtual machines.</li>
9636 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
9637 VM-specific shared folders available to the given virtual machine at
9638 startup.</li>
9639 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
9640 VM-specific shared folders created in the session context (for
9641 example, when the virtual machine is running) and automatically
9642 discarded when the session is closed (the VM is powered off).</li>
9643 </ul>
9644
9645 Logical names of shared folders must be unique within the given scope
9646 (global, permanent or transient). However, they do not need to be unique
9647 across scopes. In this case, the definition of the shared folder in a
9648 more specific scope takes precedence over definitions in all other
9649 scopes. The order of precedence is (more specific to more general):
9650 <ol>
9651 <li>Transient definitions</li>
9652 <li>Permanent definitions</li>
9653 <li>Global definitions</li>
9654 </ol>
9655
9656 For example, if MyMachine has a shared folder named
9657 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
9658 transient shared folder named <tt>C_DRIVE</tt> (that points
9659 to <tt>C:\\\\WINDOWS</tt>) will change the definition
9660 of <tt>C_DRIVE</tt> in the guest OS so
9661 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
9662 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
9663 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
9664 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
9665 to <tt>C:\\</tt> if it still exists.
9666
9667 Note that permanent and transient shared folders of different machines
9668 are in different name spaces, so they don't overlap and don't need to
9669 have unique logical names.
9670
9671 <note>
9672 Global shared folders are not implemented in the current version of the
9673 product.
9674 </note>
9675 </desc>
9676
9677 <attribute name="name" type="wstring" readonly="yes">
9678 <desc>Logical name of the shared folder.</desc>
9679 </attribute>
9680
9681 <attribute name="hostPath" type="wstring" readonly="yes">
9682 <desc>Full path to the shared folder in the host file system.</desc>
9683 </attribute>
9684
9685 <attribute name="accessible" type="boolean" readonly="yes">
9686 <desc>
9687 Whether the folder defined by the host path is currently
9688 accessible or not.
9689 For example, the folder can be unaccessible if it is placed
9690 on the network share that is not available by the time
9691 this property is read.
9692 </desc>
9693 </attribute>
9694
9695 <attribute name="writable" type="boolean" readonly="yes">
9696 <desc>
9697 Whether the folder defined by the host path is writable or
9698 not.
9699 </desc>
9700 </attribute>
9701
9702 </interface>
9703
9704 <!--
9705 // ISession
9706 /////////////////////////////////////////////////////////////////////////
9707 -->
9708
9709 <interface
9710 name="IInternalSessionControl" extends="$unknown"
9711 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
9712 internal="yes"
9713 wsmap="suppress"
9714 >
9715 <method name="getPID">
9716 <desc>PID of the process that has created this Session object.
9717 </desc>
9718 <param name="pid" type="unsigned long" dir="return"/>
9719 </method>
9720
9721 <method name="getRemoteConsole">
9722 <desc>Returns the console object suitable for remote control.</desc>
9723 <param name="console" type="IConsole" dir="return"/>
9724 </method>
9725
9726 <method name="assignMachine">
9727 <desc>
9728 Assigns the machine object associated with this direct-type
9729 session or informs the session that it will be a remote one
9730 (if machine = NULL).
9731 </desc>
9732 <param name="machine" type="IMachine" dir="in"/>
9733 </method>
9734
9735 <method name="assignRemoteMachine">
9736 <desc>
9737 Assigns the machine and the (remote) console object associated with
9738 this remote-type session.
9739 </desc>
9740 <param name="machine" type="IMachine" dir="in"/>
9741 <param name="console" type="IConsole" dir="in"/>
9742 </method>
9743
9744 <method name="updateMachineState">
9745 <desc>
9746 Updates the machine state in the VM process.
9747 Must be called only in certain cases
9748 (see the method implementation).
9749 </desc>
9750 <param name="aMachineState" type="MachineState" dir="in"/>
9751 </method>
9752
9753 <method name="uninitialize">
9754 <desc>
9755 Uninitializes (closes) this session. Used by VirtualBox to close
9756 the corresponding remote session when the direct session dies
9757 or gets closed.
9758 </desc>
9759 </method>
9760
9761 <method name="onDVDDriveChange">
9762 <desc>
9763 Triggered when settings of the DVD drive object of the
9764 associated virtual machine have changed.
9765 </desc>
9766 </method>
9767
9768 <method name="onFloppyDriveChange">
9769 <desc>
9770 Triggered when settings of the floppy drive object of the
9771 associated virtual machine have changed.
9772 </desc>
9773 </method>
9774
9775 <method name="onNetworkAdapterChange">
9776 <desc>
9777 Triggered when settings of a network adapter of the
9778 associated virtual machine have changed.
9779 </desc>
9780 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
9781 </method>
9782
9783 <method name="onSerialPortChange">
9784 <desc>
9785 Triggered when settions of a serial port of the
9786 associated virtual machine have changed.
9787 </desc>
9788 <param name="serialPort" type="ISerialPort" dir="in"/>
9789 </method>
9790
9791 <method name="onParallelPortChange">
9792 <desc>
9793 Triggered when settings of a parallel port of the
9794 associated virtual machine have changed.
9795 </desc>
9796 <param name="parallelPort" type="IParallelPort" dir="in"/>
9797 </method>
9798
9799 <method name="onVRDPServerChange">
9800 <desc>
9801 Triggered when settings of the VRDP server object of the
9802 associated virtual machine have changed.
9803 </desc>
9804 </method>
9805
9806 <method name="onUSBControllerChange">
9807 <desc>
9808 Triggered when settings of the USB controller object of the
9809 associated virtual machine have changed.
9810 </desc>
9811 </method>
9812
9813 <method name="onSharedFolderChange">
9814 <desc>
9815 Triggered when a permanent (global or machine) shared folder has been
9816 created or removed.
9817 <note>
9818 We don't pass shared folder parameters in this notification because
9819 the order in which parallel notifications are delivered is not defined,
9820 therefore it could happen that these parameters were outdated by the
9821 time of processing this notification.
9822 </note>
9823 </desc>
9824 <param name="global" type="boolean" dir="in"/>
9825 </method>
9826
9827 <method name="onUSBDeviceAttach">
9828 <desc>
9829 Triggered when a request to capture a USB device (as a result
9830 of matched USB filters or direct call to
9831 <link to="IConsole::attachUSBDevice"/>) has completed.
9832 A @c null @a error object means success, otherwise it
9833 describes a failure.
9834 </desc>
9835 <param name="device" type="IUSBDevice" dir="in"/>
9836 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
9837 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
9838 </method>
9839
9840 <method name="onUSBDeviceDetach">
9841 <desc>
9842 Triggered when a request to release the USB device (as a result
9843 of machine termination or direct call to
9844 <link to="IConsole::detachUSBDevice"/>) has completed.
9845 A @c null @a error object means success, otherwise it
9846 </desc>
9847 <param name="id" type="uuid" dir="in"/>
9848 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
9849 </method>
9850
9851 <method name="onShowWindow">
9852 <desc>
9853 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
9854 <link to="IMachine::showConsoleWindow()"/> in order to notify
9855 console callbacks
9856 <link to="IConsoleCallback::onCanShowWindow()"/>
9857 and <link to="IConsoleCallback::onShowWindow()"/>.
9858 </desc>
9859 <param name="check" type="boolean" dir="in"/>
9860 <param name="canShow" type="boolean" dir="out"/>
9861 <param name="winId" type="unsigned long long" dir="out"/>
9862 </method>
9863
9864 <method name="accessGuestProperty">
9865 <desc>
9866 Called by <link to="IMachine::getGuestProperty()"/> and by
9867 <link to="IMachine::setGuestProperty()"/> in order to read and
9868 modify guest properties.
9869 </desc>
9870 <param name="name" type="wstring" dir="in"/>
9871 <param name="value" type="wstring" dir="in"/>
9872 <param name="flags" type="wstring" dir="in"/>
9873 <param name="isSetter" type="boolean" dir="in"/>
9874 <param name="retValue" type="wstring" dir="out"/>
9875 <param name="retTimestamp" type="unsigned long long" dir="out"/>
9876 <param name="retFlags" type="wstring" dir="out"/>
9877 </method>
9878
9879 <method name="enumerateGuestProperties">
9880 <desc>
9881 Return a list of the guest properties matching a set of patterns along
9882 with their values, timestamps and flags.
9883 </desc>
9884 <param name="patterns" type="wstring" dir="in">
9885 <desc>
9886 The patterns to match the properties against as a comma-separated
9887 string. If this is empty, all properties currently set will be
9888 returned.
9889 </desc>
9890 </param>
9891 <param name="key" type="wstring" dir="out" safearray="yes">
9892 <desc>
9893 The key names of the properties returned.
9894 </desc>
9895 </param>
9896 <param name="value" type="wstring" dir="out" safearray="yes">
9897 <desc>
9898 The values of the properties returned. The array entries match the
9899 corresponding entries in the @a key array.
9900 </desc>
9901 </param>
9902 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
9903 <desc>
9904 The timestamps of the properties returned. The array entries match
9905 the corresponding entries in the @a key array.
9906 </desc>
9907 </param>
9908 <param name="flags" type="wstring" dir="out" safearray="yes">
9909 <desc>
9910 The flags of the properties returned. The array entries match the
9911 corresponding entries in the @a key array.
9912 </desc>
9913 </param>
9914 </method>
9915
9916 </interface>
9917
9918 <interface
9919 name="ISession" extends="$dispatched"
9920 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
9921 wsmap="managed"
9922 >
9923 <desc>
9924 The ISession interface represents a serialization primitive for virtual
9925 machines.
9926
9927 With VirtualBox, every time one wishes to manipulate a virtual machine
9928 (e.g. change its settings or start execution), a session object is
9929 required. Such an object must be passed to one of the session methods
9930 that open the given session, which then initiates the machine manipulation.
9931
9932 A session serves several purposes: it identifies to the inter-process VirtualBox
9933 code which process is currently working with the virtual machine, and it ensures
9934 that there are no incompatible requests from several processes for the
9935 same virtual machine. Session objects can therefore be thought of as mutex
9936 semaphores that lock virtual machines to prevent conflicting accesses from
9937 several processes.
9938
9939 How sessions objects are used depends on whether you use the Main API
9940 via COM or via the webservice:
9941
9942 <ul>
9943 <li>When using the COM API directly, an object of the Session class from the
9944 VirtualBox type library needs to be created. In regular COM C++ client code,
9945 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
9946 This object will then act as a local session object in further calls to open
9947 a session.
9948 </li>
9949
9950 <li>In the webservice, the session manager (IWebsessionManager) instead creates
9951 one session object automatically when <link to="IWebsessionManager::logon" />
9952 is called. A managed object reference to that session object can be retrieved by
9953 calling <link to="IWebsessionManager::getSessionObject" />. This session object
9954 reference can then be used to open sessions.
9955 </li>
9956 </ul>
9957
9958 Sessions are mainly used in two variations:
9959
9960 <ul>
9961 <li>
9962 To start a virtual machine in a separate process, one would call
9963 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
9964 object as its first parameter. This session then identifies the caller
9965 and lets him control the started machine (for example, pause machine
9966 execution or power it down) as well as be notified about machine
9967 execution state changes.
9968 </li>
9969
9970 <li>To alter machine settings, or to start machine execution within the
9971 current process, one needs to open a direct session for the machine first by
9972 calling <link to="IVirtualBox::openSession"/>. While a direct session
9973 is open within one process, no any other process may open another direct
9974 session for the same machine. This prevents the machine from being changed
9975 by other processes while it is running or while the machine is being configured.
9976 </li>
9977 </ul>
9978
9979 One also can attach to an existing direct session already opened by
9980 another process (for example, in order to send a control request to the
9981 virtual machine such as the pause or the reset request). This is done by
9982 calling <link to="IVirtualBox::openExistingSession"/>.
9983
9984 <note>
9985 Unless you are trying to write a new VirtualBox front-end that
9986 performs direct machine execution (like the VirtualBox or VBoxSDL
9987 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
9988 session opened by <link to="IVirtualBox::openSession"/> and use this
9989 session only to change virtual machine settings. If you simply want to
9990 start virtual machine execution using one of the existing front-ends
9991 (for example the VirtualBox GUI or headless server), simply use
9992 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
9993 will power up the machine automatically for you.
9994 </note>
9995 </desc>
9996
9997 <attribute name="state" type="SessionState" readonly="yes">
9998 <desc>Current state of this session.</desc>
9999 </attribute>
10000
10001 <attribute name="type" type="SessionType" readonly="yes">
10002 <desc>
10003 Type of this session. The value of this attribute is valid only
10004 if the session is currently open (i.e. its #state is SessionType::SessionOpen),
10005 otherwise an error will be returned.
10006 </desc>
10007 </attribute>
10008
10009 <attribute name="machine" type="IMachine" readonly="yes">
10010 <desc>Machine object associated with this session.</desc>
10011 </attribute>
10012
10013 <attribute name="console" type="IConsole" readonly="yes">
10014 <desc>Console object associated with this session.</desc>
10015 </attribute>
10016
10017 <method name="close">
10018 <desc>
10019 Closes a session that was previously opened.
10020
10021 It is recommended that every time an "open session" method (such as
10022 <link to="IVirtualBox::openRemoteSession" /> or
10023 <link to="IVirtualBox::openSession" />) has been called to
10024 manipulate a virtual machine, the caller invoke
10025 ISession::close() when it's done doing so. Since sessions are
10026 serialization primitives much like ordinary mutexes, they are
10027 best used the same way: for each "open" call, there should be
10028 a matching "close" call, even when errors occur.
10029
10030 Otherwise, if a direct session for a machine opened with
10031 <link to="IVirtualBox::openSession()"/> is not explicitly closed
10032 when the application terminates, the state of the machine will
10033 be set to <link to="MachineState::Aborted" /> on the server.
10034
10035 Generally, it is recommended to close all open sessions explicitly
10036 before terminating the application (no matter what is the reason of
10037 the termination).
10038
10039 <note>
10040 Do not expect the session state (<link to="ISession::state" />
10041 to return to "Closed" immediately after you invoke
10042 ISession::close(), particularly if you have started a remote
10043 session to execute the VM in a new process. The session state will
10044 automatically return to "Closed" once the VM is no longer executing,
10045 which can of course take a very long time.
10046 </note>
10047 </desc>
10048 </method>
10049
10050 </interface>
10051
10052 <!--
10053 // ISATAController
10054 /////////////////////////////////////////////////////////////////////////
10055 -->
10056
10057 <interface
10058 name="ISATAController" extends="$unknown"
10059 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
10060 wsmap="managed"
10061 >
10062 <attribute name="enabled" type="boolean">
10063 <desc>
10064 Flag whether the SATA controller is present in the
10065 guest system. If disabled, the virtual guest hardware will
10066 not contain any SATA controller. Can only be changed when
10067 the VM is powered off.
10068 </desc>
10069 </attribute>
10070
10071 <attribute name="portCount" type="unsigned long">
10072 <desc>
10073 The number of usable ports on the SATA controller.
10074 It ranges from 1 to 30.
10075 </desc>
10076 </attribute>
10077
10078 <method name="GetIDEEmulationPort">
10079 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc>
10080 <param name="devicePosition" type="long" dir="in"/>
10081 <param name="portNumber" type="long" dir="return"/>
10082 </method>
10083
10084 <method name="SetIDEEmulationPort">
10085 <desc>Sets the port number which is emulated as an IDE device.</desc>
10086 <param name="devicePosition" type="long" dir="in"/>
10087 <param name="portNumber" type="long" dir="in"/>
10088 </method>
10089
10090 </interface>
10091
10092<if target="wsdl">
10093
10094 <!--
10095 // IManagedObjectRef
10096 /////////////////////////////////////////////////////////////////////////
10097 -->
10098
10099 <interface
10100 name="IManagedObjectRef" extends="$unknown"
10101 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
10102 internal="yes"
10103 wsmap="managed"
10104 wscpp="hardcoded"
10105 >
10106 <desc>
10107 Managed object reference.
10108
10109 Only within the webservice, a managed object reference (which is really
10110 an opaque number) allows a webservice client to address an object
10111 that lives in the address space of the webservice server.
10112
10113 Behind each managed object reference, there is a COM object that lives
10114 in the webservice server's address space. The COM object is not freed
10115 until the managed object reference is released, either by an explicit
10116 call to <link to="IManagedObjectRef::release" /> or by logging off from
10117 the webservice (<link to="IWebsessionManager::logoff" />), which releases
10118 all objects created during the webservice session.
10119
10120 Whenever a method call of the VirtualBox API returns a COM object, the
10121 webservice representation of that method will instead return a
10122 managed object reference, which can then be used to invoke methods
10123 on that object.
10124 </desc>
10125
10126 <method name="getInterfaceName">
10127 <desc>
10128 Returns the name of the interface that this managed object represents,
10129 for example, "IMachine", as a string.
10130 </desc>
10131 <param name="return" type="wstring" dir="return"/>
10132 </method>
10133
10134 <method name="release">
10135 <desc>
10136 Releases this managed object reference and frees the resources that
10137 were allocated for it in the webservice server process. After calling
10138 this method, the identifier of the reference can no longer be used.
10139 </desc>
10140 </method>
10141
10142 </interface>
10143
10144 <!--
10145 // IWebsessionManager
10146 /////////////////////////////////////////////////////////////////////////
10147 -->
10148
10149 <interface
10150 name="IWebsessionManager" extends="$unknown"
10151 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
10152 internal="yes"
10153 wsmap="global"
10154 wscpp="hardcoded"
10155 >
10156 <desc>
10157 Websession manager. This provides essential services
10158 to webservice clients.
10159 </desc>
10160 <method name="logon">
10161 <desc>
10162 Logs a new client onto the webservice and returns a managed object reference to
10163 the IVirtualBox instance, which the client can then use as a basis to further
10164 queries, since all calls to the VirtualBox API are based on the IVirtualBox
10165 interface, in one way or the other.
10166 </desc>
10167 <param name="username" type="wstring" dir="in"/>
10168 <param name="password" type="wstring" dir="in"/>
10169 <param name="return" type="IVirtualBox" dir="return"/>
10170 </method>
10171
10172 <method name="getSessionObject">
10173 <desc>
10174 Returns a managed object reference to the internal ISession object that was created
10175 for this web service session when the client logged on.
10176
10177 <see>ISession</see>
10178 </desc>
10179 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10180 <param name="return" type="ISession" dir="return"/>
10181 </method>
10182
10183 <method name="logoff">
10184 <desc>
10185 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
10186 and destroys all resources associated with the session (most importantly, all
10187 managed objects created in the server while the session was active).
10188 </desc>
10189 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10190 </method>
10191
10192 </interface>
10193
10194</if>
10195
10196 <!--
10197 // IPerformanceCollector & friends
10198 /////////////////////////////////////////////////////////////////////////
10199 -->
10200
10201 <interface
10202 name="IPerformanceMetric" extends="$unknown"
10203 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
10204 >
10205 <desc>
10206 The IPerformanceMetric interface represents parameters of the given
10207 performance metric.
10208 </desc>
10209
10210 <attribute name="metricName" type="wstring" readonly="yes">
10211 <desc>
10212 Name of the metric.
10213 </desc>
10214 </attribute>
10215
10216 <attribute name="object" type="$unknown" readonly="yes">
10217 <desc>
10218 Object this metric belongs to.
10219 </desc>
10220 </attribute>
10221
10222 <attribute name="description" type="wstring" readonly="yes">
10223 <desc>
10224 Textual description of the metric.
10225 </desc>
10226 </attribute>
10227
10228 <attribute name="period" type="unsigned long" readonly="yes">
10229 <desc>
10230 Time interval between samples, measured in seconds.
10231 </desc>
10232 </attribute>
10233
10234 <attribute name="count" type="unsigned long" readonly="yes">
10235 <desc>
10236 Number of recent samples retained by the performance collector for this
10237 metric.
10238
10239 When the collected sample count exceeds this number, older samples
10240 are discarded.
10241 </desc>
10242 </attribute>
10243
10244 <attribute name="unit" type="wstring" readonly="yes">
10245 <desc>
10246 Unit of measurement.
10247 </desc>
10248 </attribute>
10249
10250 <attribute name="minimumValue" type="long" readonly="yes">
10251 <desc>
10252 Minimum possible value of this metric.
10253 </desc>
10254 </attribute>
10255
10256 <attribute name="maximumValue" type="long" readonly="yes">
10257 <desc>
10258 Maximum possible value of this metric.
10259 </desc>
10260 </attribute>
10261 </interface>
10262
10263 <interface
10264 name="IPerformanceCollector" extends="$unknown"
10265 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
10266 wsmap="managed"
10267 >
10268 <desc>
10269 The IPerformanceCollector interface represents a service that collects and
10270 stores performance metrics data.
10271
10272 Performance metrics are associated with objects like IHost and
10273 IMachine. Each object has a distinct set of performance metrics.
10274 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
10275
10276 Metric data are collected at the specified intervals and are retained
10277 internally. The interval and the number of samples retained can be set
10278 with <link to="IPerformanceCollector::setupMetrics" />.
10279
10280 Metrics are organized hierarchically, each level separated by slash (/).
10281 General scheme for metric name is
10282 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
10283 metric name stands for: CPU category, Load metric, User submetric, average
10284 aggregate. An aggregate function is computed over all retained data. Valid
10285 aggregate functions are:
10286
10287 <ul>
10288 <li>avg -- average</li>
10289 <li>min -- minimum</li>
10290 <li>max -- maximum</li>
10291 </ul>
10292
10293 "Category/Metric" together form base metric name. A base metric is the
10294 smallest unit for which a sampling interval and the number of retained
10295 samples can be set. Only base metrics can be enabled and disabled. All
10296 sub-metrics are collected when their base metric is collected.
10297 Collected values for any set of sub-metrics can be queried with
10298 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
10299 metric parameters, querying metric data, enabling or disabling metrics
10300 wildcards can be used in metric names to specify a subset of metrics. For
10301 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
10302 averages can be queried using <tt>*:avg</tt> and so on. To query metric
10303 values without aggregates <tt>*:</tt> can be used.
10304
10305 The valid names for base metrics are:
10306
10307 <ul>
10308 <li>CPU/Load</li>
10309 <li>CPU/MHz</li>
10310 <li>RAM/Usage</li>
10311 </ul>
10312
10313 The general sequence for collecting and retrieving the metrics is:
10314 <ul>
10315 <li>
10316 Obtain an instance of IPerfromanceCollector with
10317 <link to="IVirtualBox::performanceCollector" />
10318 </li>
10319 <li>
10320 Allocate and populate an array with references to objects the metrics
10321 will be collected for. Use references to IHost and IMachine objects.
10322 </li>
10323 <li>
10324 Allocate and populate an array with base metric names the data will be
10325 collected for.
10326 </li>
10327 <li>
10328 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
10329 metric data will be collected and stored.
10330 </li>
10331 <li>
10332 Wait for the data to get collected.
10333 </li>
10334 <li>
10335 Allocate and populate an array with references to objects the metric
10336 values will be queried for. You can re-use the object array used for
10337 setting base metrics.
10338 </li>
10339 <li>
10340 Allocate and populate an array with metric names the data will be
10341 collected for. Note that metric names differ from base metric names.
10342 </li>
10343 <li>
10344 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
10345 have been collected so far are returned. Note that the values are still
10346 retained internally and data collection continues.
10347 </li>
10348 </ul>
10349
10350 For an example of usage refer to the following files in VirtualBox SDK:
10351 <ul>
10352 <li>
10353 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
10354 </li>
10355 <li>
10356 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
10357 </li>
10358 </ul>
10359 </desc>
10360
10361 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
10362 <desc>
10363 Array of unique names of metrics.
10364
10365 This array represents all metrics supported by the performance
10366 collector. Individual objects do not necessarily support all of them.
10367 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
10368 list of supported metrics for a particular object.
10369 </desc>
10370 </attribute>
10371
10372 <method name="getMetrics">
10373 <desc>
10374 Returns parameters of specified metrics for a set of objects.
10375 <note>
10376 @c Null metrics array means all metrics. @c Null object array means
10377 all existing objects.
10378 </note>
10379 </desc>
10380 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10381 <desc>
10382 Metric name filter. Currently, only a comma-separated list of metrics
10383 is supported.
10384 </desc>
10385 </param>
10386 <param name="objects" type="$unknown" dir="in" safearray="yes">
10387 <desc>
10388 Set of objects to return metric parameters for.
10389 </desc>
10390 </param>
10391 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
10392 <desc>
10393 Array of returned metric parameters.
10394 </desc>
10395 </param>
10396 </method>
10397
10398 <method name="setupMetrics">
10399 <desc>
10400 Sets parameters of specified base metrics for a set of objects. Returns
10401 an array of <link to="IPerformanceMetric" /> describing the metrics have
10402 been affected.
10403 <note>
10404 @c Null or empty metric name array means all metrics. @c Null or empty
10405 object array means all existing objects. If metric name array contains
10406 a single element and object array contains many, the single metric
10407 name array element is applied to each object array element to form
10408 metric/object pairs.
10409 </note>
10410 </desc>
10411 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10412 <desc>
10413 Metric name filter. Comma-separated list of metrics with wildcard
10414 support.
10415 </desc>
10416 </param>
10417 <param name="objects" type="$unknown" dir="in" safearray="yes">
10418 <desc>
10419 Set of objects to setup metric parameters for.
10420 </desc>
10421 </param>
10422 <param name="period" type="unsigned long" dir="in">
10423 <desc>
10424 Time interval in seconds between two consecutive samples of performance
10425 data.
10426 </desc>
10427 </param>
10428 <param name="count" type="unsigned long" dir="in">
10429 <desc>
10430 Number of samples to retain in performance data history. Older samples
10431 get discarded.
10432 </desc>
10433 </param>
10434 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10435 <desc>
10436 Array of metrics that have been modified by the call to this method.
10437 </desc>
10438 </param>
10439 </method>
10440
10441 <method name="enableMetrics">
10442 <desc>
10443 Turns on collecting specified base metrics. Returns an array of
10444 <link to="IPerformanceMetric" /> describing the metrics have been
10445 affected.
10446 <note>
10447 @c Null or empty metric name array means all metrics. @c Null or empty
10448 object array means all existing objects. If metric name array contains
10449 a single element and object array contains many, the single metric
10450 name array element is applied to each object array element to form
10451 metric/object pairs.
10452 </note>
10453 </desc>
10454 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10455 <desc>
10456 Metric name filter. Comma-separated list of metrics with wildcard
10457 support.
10458 </desc>
10459 </param>
10460 <param name="objects" type="$unknown" dir="in" safearray="yes">
10461 <desc>
10462 Set of objects to enable metrics for.
10463 </desc>
10464 </param>
10465 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10466 <desc>
10467 Array of metrics that have been modified by the call to this method.
10468 </desc>
10469 </param>
10470 </method>
10471
10472 <method name="disableMetrics">
10473 <desc>
10474 Turns off collecting specified base metrics. Returns an array of
10475 <link to="IPerformanceMetric" /> describing the metrics have been
10476 affected.
10477 <note>
10478 @c Null or empty metric name array means all metrics. @c Null or empty
10479 object array means all existing objects. If metric name array contains
10480 a single element and object array contains many, the single metric
10481 name array element is applied to each object array element to form
10482 metric/object pairs.
10483 </note>
10484 </desc>
10485 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10486 <desc>
10487 Metric name filter. Comma-separated list of metrics with wildcard
10488 support.
10489 </desc>
10490 </param>
10491 <param name="objects" type="$unknown" dir="in" safearray="yes">
10492 <desc>
10493 Set of objects to disable metrics for.
10494 </desc>
10495 </param>
10496 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10497 <desc>
10498 Array of metrics that have been modified by the call to this method.
10499 </desc>
10500 </param>
10501 </method>
10502
10503 <method name="queryMetricsData">
10504 <desc>
10505 Queries collected metrics data for a set of objects.
10506
10507 The data itself and related metric information are returned in seven
10508 parallel and one flattened array of arrays. Elements of
10509 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
10510 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
10511 the same index describe one set of values corresponding to a single
10512 metric.
10513
10514 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
10515 start and length of a sub-array is indicated by
10516 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
10517 value for metric <tt>metricNames[i]</tt> is at
10518 <tt>returnData[returnIndices[i]]</tt>.
10519
10520 <note>
10521 @c Null or empty metric name array means all metrics. @c Null or empty
10522 object array means all existing objects. If metric name array contains
10523 a single element and object array contains many, the single metric
10524 name array element is applied to each object array element to form
10525 metric/object pairs.
10526 </note>
10527 <note>
10528 Data collection continues behind the scenes after call to @c
10529 queryMetricsData. The return data can be seen as the snapshot of
10530 the current state at the time of @c queryMetricsData call. The
10531 internally kept metric values are not cleared by the call. This makes
10532 possible querying different subsets of metrics or aggregates with
10533 subsequent calls. If periodic querying is needed it is highly
10534 suggested to query the values with @c interval*count period to avoid
10535 confusion. This way a completely new set of data values will be
10536 provided by each query.
10537 </note>
10538 </desc>
10539 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10540 <desc>
10541 Metric name filter. Comma-separated list of metrics with wildcard
10542 support.
10543 </desc>
10544 </param>
10545 <param name="objects" type="$unknown" dir="in" safearray="yes">
10546 <desc>
10547 Set of objects to query metrics for.
10548 </desc>
10549 </param>
10550 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
10551 <desc>
10552 Names of metrics returned in @c returnData.
10553 </desc>
10554 </param>
10555 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
10556 <desc>
10557 Objects associated with metrics returned in @c returnData.
10558 </desc>
10559 </param>
10560 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
10561 <desc>
10562 Units of measurement for each returned metric.
10563 </desc>
10564 </param>
10565 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
10566 <desc>
10567 Divisor that should be applied to return values in order to get
10568 floating point values. For example:
10569 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
10570 will retrieve the floating point value of i-th sample of the first
10571 metric.
10572 </desc>
10573 </param>
10574 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
10575 <desc>
10576 Sequence numbers of the first elements of value sequences of particular metrics
10577 returned in @c returnData. For aggregate metrics it is the sequence number of
10578 the sample the aggregate started calculation from.
10579 </desc>
10580 </param>
10581 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
10582 <desc>
10583 Indices of the first elements of value sequences of particular metrics
10584 returned in @c returnData.
10585 </desc>
10586 </param>
10587 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
10588 <desc>
10589 Lengths of value sequences of particular metrics.
10590 </desc>
10591 </param>
10592 <param name="returnData" type="long" dir="return" safearray="yes">
10593 <desc>
10594 Flattened array of all metric data containing sequences of values for
10595 each metric.
10596 </desc>
10597 </param>
10598 </method>
10599
10600 </interface>
10601
10602 <module name="VBoxSVC" context="LocalServer">
10603 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
10604 namespace="virtualbox.org">
10605 <interface name="IVirtualBox" default="yes"/>
10606 </class>
10607 </module>
10608
10609 <module name="VBoxC" context="InprocServer" threadingModel="Free">
10610 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
10611 namespace="virtualbox.org">
10612 <interface name="ISession" default="yes"/>
10613 </class>
10614 </module>
10615
10616</library>
10617
10618</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