VirtualBox

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

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

Main: XIDL: Added support for <result> tags in <library> (MIDL, XPIDL, Doxygen). Added a couple of exemplary VBOX_E_ result codes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 395.0 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 14469 2008-11-21 15:44:45Z 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/* currently, 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_AMBIGUOUS_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 <!--
153 // COM result codes for VirtualBox
154 /////////////////////////////////////////////////////////////////////////
155 -->
156
157 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
158 <desc>
159 Object corresponding to the supplied arguments does not exist.
160 </desc>
161 </result>
162
163 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
164 <desc>
165 Current virtual machine state prevents the operation.
166 </desc>
167 </result>
168
169
170 <!--
171 // all common enums
172 /////////////////////////////////////////////////////////////////////////
173 -->
174
175 <enum
176 name="TSBool"
177 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
178 >
179 <desc>
180 Boolean variable having a third state, default.
181 </desc>
182
183 <const name="False" value="0"/>
184 <const name="True" value="1"/>
185 <const name="Default" value="2"/>
186 </enum>
187
188 <enum
189 name="MachineState"
190 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
191 >
192 <desc>
193 Virtual machine execution state. This enumeration represents possible
194 values of the <link to="IMachine::state"/> attribute.
195 </desc>
196
197 <const name="Null" value="0">
198 <desc><tt>null</tt> value. Never used by the API.</desc>
199 </const>
200 <const name="PoweredOff" value="1">
201 <desc>
202 The machine is not running.
203 </desc>
204 </const>
205 <const name="Saved" value="2">
206 <desc>
207 The machine is not currently running, but the execution state
208 of the machine has been saved to an external file when it
209 was running.
210 <note>
211 Only a few machine settings can be altered when the machine
212 is in this state.
213 </note>
214 </desc>
215 </const>
216 <const name="Aborted" value="3">
217 <desc>
218 A process running the machine has terminated abnormally.
219 Other than that, this value is equivalent to #PoweredOff.
220 </desc>
221 </const>
222 <const name="Running" value="4">
223 <desc>
224 The machine is currently being executed.
225 <note>
226 This value can be used in relational expressions:
227 all state values less than Running describe a virtual machine that is
228 not currently being executed (i.e., it is completely out of
229 action).
230 </note>
231 <note internal="yes">
232 For whoever decides to touch this enum: In order to keep the
233 aforementioned comparisons valid, this state must immediately
234 precede the Paused state.
235 </note>
236 </desc>
237 </const>
238 <const name="Paused" value="5">
239 <desc>
240 Execution of the machine has been paused.
241 <note>
242 This value can be used in relational expressions: all state values
243 greater than Paused represent unstable states of the running virtual
244 machine. Unless explicitly stated otherwise, no machine settings can
245 be altered when it is in one of the unstable states.
246 </note>
247 <note internal="yes">
248 For whoever decides to touch this enum: In order to keep the
249 aforementioned comparisons valid, this state must immediately
250 follow the Running state.
251 </note>
252 </desc>
253 </const>
254 <const name="Stuck" value="6">
255 <desc>
256 Execution of the machine has reached the "Guru Meditation"
257 condition. This condition indicates an internal VMM failure which may
258 happen as a result of either an unhandled low-level virtual hardware
259 exception or one of the recompiler exceptions (such as
260 the <i>too-many-traps</i> condition).
261 </desc>
262 </const>
263 <const name="Starting" value="7">
264 <desc>
265 Machine is being started after
266 <link to="IConsole::powerUp">powering it on</link> from a
267 zero execution state.
268 </desc>
269 </const>
270 <const name="Stopping" value="8">
271 <desc>
272 Machine is being normally stopped
273 (after explicitly <link to="IConsole::powerDown">powering it off</link>,
274 or after the guest OS has initiated a shutdown sequence).
275 </desc>
276 </const>
277 <const name="Saving" value="9">
278 <desc>
279 Machine is saving its execution state to a file as a
280 result of calling <link to="IConsole::saveState"/> or an online
281 snapshot of the machine is being taken using
282 <link to="IConsole::takeSnapshot"/>.
283 </desc>
284 </const>
285 <const name="Restoring" value="10">
286 <desc>
287 Execution state of the machine is being restored from a file
288 after <link to="IConsole::powerUp">powering it on</link> from
289 a saved execution state.
290 </desc>
291 </const>
292 <const name="Discarding" value="11">
293 <desc>
294 Snapshot of the machine is being discarded after calling
295 <link to="IConsole::discardSnapshot"/> or its current state is
296 being discarded after <link to="IConsole::discardCurrentState"/>.
297 </desc>
298 </const>
299 <const name="SettingUp" value="12">
300 <desc>
301 Lengthy setup operation is in progress (e.g.
302 <link to="IMachine::attachHardDisk2"/>).
303 </desc>
304 </const>
305 </enum>
306
307 <enum
308 name="SessionState"
309 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
310 >
311 <desc>
312 Session state. This enumeration represents possible values of
313 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
314 attributes. Individual value descriptions contain the appropriate
315 meaning for every case.
316 </desc>
317
318 <const name="Null" value="0">
319 <desc><tt>null</tt> value. Never used by the API.</desc>
320 </const>
321 <const name="Closed" value="1">
322 <desc>
323 The machine has no open sessions (<link to="IMachine::sessionState"/>);
324 the session is closed (<link to="ISession::state"/>)
325 </desc>
326 </const>
327 <const name="Open" value="2">
328 <desc>
329 The machine has an open direct session (<link to="IMachine::sessionState"/>);
330 the session is open (<link to="ISession::state"/>)
331 </desc>
332 </const>
333 <const name="Spawning" value="3">
334 <desc>
335 A new (direct) session is being opened for the machine
336 as a result of <link to="IVirtualBox::openRemoteSession()"/>
337 call (<link to="IMachine::sessionState"/>);
338 the session is currently being opened
339 as a result of <link to="IVirtualBox::openRemoteSession()"/>
340 call (<link to="ISession::state"/>)
341 </desc>
342 </const>
343 <const name="Closing" value="4">
344 <desc>
345 The direct session is being closed (<link to="IMachine::sessionState"/>);
346 the session is being closed (<link to="ISession::state"/>)
347 </desc>
348 </const>
349 </enum>
350
351 <enum
352 name="SessionType"
353 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
354 >
355 <desc>
356 Session type. This enumeration represents possible values of the
357 <link to="ISession::type"/> attribute.
358 </desc>
359
360 <const name="Null" value="0">
361 <desc><tt>null</tt> value. Never used by the API.</desc>
362 </const>
363 <const name="Direct" value="1">
364 <desc>
365 Direct session
366 (opened by <link to="IVirtualBox::openSession()"/>)
367 </desc>
368 </const>
369 <const name="Remote" value="2">
370 <desc>
371 Remote session
372 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
373 </desc>
374 </const>
375 <const name="Existing" value="3">
376 <desc>
377 Existing session
378 (opened by <link to="IVirtualBox::openExistingSession()"/>)
379 </desc>
380 </const>
381 </enum>
382
383 <enum
384 name="DeviceType"
385 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
386 >
387 <desc>
388 Device type.
389 </desc>
390 <const name="Null" value="0">
391 <desc>
392 <tt>null</tt> value which may also mean "no device".
393 <note>
394 This value is not allowed for
395 <link to="IConsole::getDeviceActivity"/>
396 </note>
397 </desc>
398 </const>
399 <const name="Floppy" value="1">
400 <desc>Floppy device.</desc>
401 </const>
402 <const name="DVD" value="2">
403 <desc>CD/DVD-ROM device.</desc>
404 </const>
405 <const name="HardDisk" value="3">
406 <desc>Hard disk device.</desc>
407 </const>
408 <const name="Network" value="4">
409 <desc>Network device.</desc>
410 </const>
411 <const name="USB" value="5">
412 <desc>USB device.</desc>
413 </const>
414 <const name="SharedFolder" value="6">
415 <desc>Shared folder device.</desc>
416 </const>
417 </enum>
418
419 <enum
420 name="DeviceActivity"
421 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
422 >
423 <desc>
424 Device activity for <link to="IConsole::getDeviceActivity"/>.
425 </desc>
426
427 <const name="Null" value="0"/>
428 <const name="Idle" value="1"/>
429 <const name="Reading" value="2"/>
430 <const name="Writing" value="3"/>
431 </enum>
432
433 <enum
434 name="StorageBus"
435 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
436 >
437 <desc>Interface bus type for storage devices.</desc>
438
439 <const name="Null" value="0">
440 <desc><tt>null</tt> value. Never used by the API.</desc>
441 </const>
442
443 <const name="IDE" value="1"/>
444 <const name="SATA" value="2"/>
445 </enum>
446
447 <enum
448 name="ClipboardMode"
449 uuid="33364716-4008-4701-8f14-be0fa3d62950"
450 >
451 <desc>
452 Host-Guest clipboard interchange mode.
453 </desc>
454
455 <const name="Disabled" value="0"/>
456 <const name="HostToGuest" value="1"/>
457 <const name="GuestToHost" value="2"/>
458 <const name="Bidirectional" value="3"/>
459 </enum>
460
461 <enum
462 name="Scope"
463 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
464 >
465 <desc>
466 Scope of the operation.
467
468 A generic enumeration used in various methods to define the action or
469 argument scope.
470 </desc>
471
472 <const name="Global" value="0"/>
473 <const name="Machine" value="1"/>
474 <const name="Session" value="2"/>
475 </enum>
476
477 <enum
478 name="GuestStatisticType"
479 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
480 >
481 <desc>
482 Statistics type for <link to="IGuest::getStatistic"/>.
483 </desc>
484
485 <const name="CPULoad_Idle" value="0">
486 <desc>
487 Idle CPU load (0-100%) for last interval.
488 </desc>
489 </const>
490 <const name="CPULoad_Kernel" value="1">
491 <desc>
492 Kernel CPU load (0-100%) for last interval.
493 </desc>
494 </const>
495 <const name="CPULoad_User" value="2">
496 <desc>
497 User CPU load (0-100%) for last interval.
498 </desc>
499 </const>
500 <const name="Threads" value="3">
501 <desc>
502 Total number of threads in the system.
503 </desc>
504 </const>
505 <const name="Processes" value="4">
506 <desc>
507 Total number of processes in the system.
508 </desc>
509 </const>
510 <const name="Handles" value="5">
511 <desc>
512 Total number of handles in the system.
513 </desc>
514 </const>
515 <const name="MemoryLoad" value="6">
516 <desc>
517 Memory load (0-100%).
518 </desc>
519 </const>
520 <const name="PhysMemTotal" value="7">
521 <desc>
522 Total physical memory in megabytes.
523 </desc>
524 </const>
525 <const name="PhysMemAvailable" value="8">
526 <desc>
527 Free physical memory in megabytes.
528 </desc>
529 </const>
530 <const name="PhysMemBalloon" value="9">
531 <desc>
532 Ballooned physical memory in megabytes.
533 </desc>
534 </const>
535 <const name="MemCommitTotal" value="10">
536 <desc>
537 Total amount of memory in the committed state in megabytes.
538 </desc>
539 </const>
540 <const name="MemKernelTotal" value="11">
541 <desc>
542 Total amount of memory used by the guest OS's kernel in megabytes.
543 </desc>
544 </const>
545 <const name="MemKernelPaged" value="12">
546 <desc>
547 Total amount of paged memory used by the guest OS's kernel in megabytes.
548 </desc>
549 </const>
550 <const name="MemKernelNonpaged" value="13">
551 <desc>
552 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
553 </desc>
554 </const>
555 <const name="MemSystemCache" value="14">
556 <desc>
557 Total amount of memory used by the guest OS's system cache in megabytes.
558 </desc>
559 </const>
560 <const name="PageFileSize" value="15">
561 <desc>
562 Pagefile size in megabytes.
563 </desc>
564 </const>
565 <const name="SampleNumber" value="16">
566 <desc>
567 Statistics sample number
568 </desc>
569 </const>
570 <const name="MaxVal" value="17"/>
571 </enum>
572
573 <enum
574 name="BIOSBootMenuMode"
575 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
576 >
577 <desc>
578 BIOS boot menu mode.
579 </desc>
580
581 <const name="Disabled" value="0"/>
582 <const name="MenuOnly" value="1"/>
583 <const name="MessageAndMenu" value="2"/>
584 </enum>
585
586 <enum
587 name="IDEControllerType"
588 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
589 >
590 <desc>
591 IDE controller type.
592 </desc>
593
594 <const name="Null" value="0">
595 <desc><tt>null</tt> value. Never used by the API.</desc>
596 </const>
597 <const name="PIIX3" value="1"/>
598 <const name="PIIX4" value="2"/>
599 </enum>
600
601 <enum
602 name="DriveState"
603 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
604 >
605 <const name="Null" value="0">
606 <desc><tt>null</tt> value. Never used by the API.</desc>
607 </const>
608 <const name="NotMounted" value="1"/>
609 <const name="ImageMounted" value="2"/>
610 <const name="HostDriveCaptured" value="3"/>
611 </enum>
612
613
614 <!--
615 // IVirtualBoxErrorInfo
616 /////////////////////////////////////////////////////////////////////////
617 -->
618
619 <interface
620 name="IVirtualBoxErrorInfo" extends="$errorinfo"
621 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
622 supportsErrorInfo="no"
623 wsmap="suppress"
624 >
625 <desc>
626 The IVirtualBoxErrorInfo interface represents extended error information.
627
628 Extended error information can be set by VirtualBox components after
629 unsuccessful or partially successful method invocation. This information
630 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
631 and then shown to the client in addition to the plain 32-bit result code.
632
633 In MS COM, this interface extends the IErrorInfo interface,
634 in XPCOM, it extends the nsIException interface. In both cases,
635 it provides a set of common attributes to retrieve error
636 information.
637
638 Sometimes invocation of some component's method may involve methods of
639 other components that may also fail (independently of this method's
640 failure), or a series of non-fatal errors may precede a fatal error that
641 causes method failure. In cases like that, it may be desirable to preserve
642 information about all errors happened during method invocation and deliver
643 it to the caller. The <link to="#next"/> attribute is intended
644 specifically for this purpose and allows to represent a chain of errors
645 through a single IVirtualBoxErrorInfo object set after method invocation.
646
647 Note that errors are stored to a chain in the reverse order, i.e. the
648 initial error object you query right after method invocation is the last
649 error set by the callee, the object it points to in the @a next attribute
650 is the previous error and so on, up to the first error (which is the last
651 in the chain).
652 </desc>
653
654 <attribute name="resultCode" type="result" readonly="yes">
655 <desc>
656 Result code of the error.
657 Usually, it will be the same as the result code returned
658 by the method that provided this error information, but not
659 always. For example, on Win32, CoCreateInstance() will most
660 likely return E_NOINTERFACE upon unsuccessful component
661 instantiation attempt, but not the value the component factory
662 returned.
663 <note>
664 In MS COM, there is no equivalent.
665 In XPCOM, it is the same as nsIException::result.
666 </note>
667 </desc>
668 </attribute>
669
670 <attribute name="interfaceID" type="uuid" readonly="yes">
671 <desc>
672 UUID of the interface that defined the error.
673 <note>
674 In MS COM, it is the same as IErrorInfo::GetGUID.
675 In XPCOM, there is no equivalent.
676 </note>
677 </desc>
678 </attribute>
679
680 <attribute name="component" type="wstring" readonly="yes">
681 <desc>
682 Name of the component that generated the error.
683 <note>
684 In MS COM, it is the same as IErrorInfo::GetSource.
685 In XPCOM, there is no equivalent.
686 </note>
687 </desc>
688 </attribute>
689
690 <attribute name="text" type="wstring" readonly="yes">
691 <desc>
692 Text description of the error.
693 <note>
694 In MS COM, it is the same as IErrorInfo::GetDescription.
695 In XPCOM, it is the same as nsIException::message.
696 </note>
697 </desc>
698 </attribute>
699
700 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
701 <desc>
702 Next error object if there is any, or @c null otherwise.
703 <note>
704 In MS COM, there is no equivalent.
705 In XPCOM, it is the same as nsIException::inner.
706 </note>
707 </desc>
708 </attribute>
709
710 </interface>
711
712
713 <!--
714 // IVirtualBox
715 /////////////////////////////////////////////////////////////////////////
716 -->
717
718 <interface
719 name="IVirtualBoxCallback" extends="$unknown"
720 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
721 wsmap="suppress"
722 >
723 <method name="onMachineStateChange">
724 <desc>
725 The execution state of the given machine has changed.
726 <see>IMachine::state</see>
727 </desc>
728 <param name="machineId" type="uuid" dir="in">
729 <desc>ID of the machine this event relates to.</desc>
730 </param>
731 <param name="state" type="MachineState" dir="in">
732 <desc>New execution state.</desc>
733 </param>
734 </method>
735
736 <method name="onMachineDataChange">
737 <desc>
738 Any of the settings of the given machine has changed.
739 </desc>
740 <param name="machineId" type="uuid" dir="in">
741 <desc>ID of the machine this event relates to.</desc>
742 </param>
743 </method>
744
745 <method name="onExtraDataCanChange">
746 <desc>
747 Notification when someone tries to change extra data for
748 either the given machine or (if null) global extra data.
749 This gives the chance to veto against changes.
750 </desc>
751 <param name="machineId" type="uuid" dir="in">
752 <desc>
753 ID of the machine this event relates to
754 (null ID for global extra data change requests).
755 </desc>
756 </param>
757 <param name="key" type="wstring" dir="in">
758 <desc>
759 Extra data key for the attempted write.
760 </desc>
761 </param>
762 <param name="value" type="wstring" dir="in">
763 <desc>
764 Extra data value for the given key.
765 </desc>
766 </param>
767 <param name="error" type="wstring" dir="out">
768 <desc>
769 Optional error message describing the reason of the
770 veto (ignored if this notification returns @c true).
771 </desc>
772 </param>
773 <param name="allowChange" type="boolean" dir="return">
774 <desc>
775 Flag to indicate whether the callee agrees (@c true)
776 or vetoes against the change (@c false).
777 </desc>
778 </param>
779 </method>
780
781 <method name="onExtraDataChange">
782 <desc>
783 Notification when machine specific or global extra data
784 has changed.
785 </desc>
786 <param name="machineId" type="uuid" dir="in">
787 <desc>
788 ID of the machine this event relates to.
789 Null for global extra data changes.
790 </desc>
791 </param>
792 <param name="key" type="wstring" dir="in">
793 <desc>
794 Extra data key that has changed.
795 </desc>
796 </param>
797 <param name="value" type="wstring" dir="in">
798 <desc>
799 Extra data value for the given key.
800 </desc>
801 </param>
802 </method>
803
804 <method name="onMediaRegistered">
805 <desc>
806 The given media was registered or unregistered
807 within this VirtualBox installation.
808
809 The @a mediaType parameter describes what type of
810 media the specified @a mediaId refers to. Possible
811 values are:
812
813 <ul>
814 <li><link to="DeviceType::HardDisk"/>: the media is a hard disk
815 that, if registered, can be obtained using the
816 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
817 <li><link to="DeviceType::DVD"/>: the media is a CD/DVD image
818 that, if registered, can be obtained using the
819 <link to="IVirtualBox::getDVDImage()"/> call.</li>
820 <li><link to="DeviceType::Floppy"/>: the media is a Floppy image
821 that, if registered, can be obtained using the
822 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
823 </ul>
824
825 Note that if this is a deregistration notification,
826 there is no way to access the object representing the
827 unregistered media. It is supposed that the
828 application will do required cleanup based on the @a
829 mediaId value.
830 </desc>
831 <param name="mediaId" type="uuid" dir="in">
832 <desc>ID of the media this event relates to.</desc>
833 </param>
834 <param name="mediaType" type="DeviceType" dir="in">
835 <desc>Type of the media this event relates to.</desc>
836 </param>
837 <param name="registered" type="boolean" dir="in">
838 <desc>
839 If true, the media was registered, otherwise it was
840 unregistered.
841 </desc>
842 </param>
843 </method>
844
845 <method name="onMachineRegistered">
846 <desc>
847 The given machine was registered or unregistered
848 within this VirtualBox installation.
849 </desc>
850 <param name="machineId" type="uuid" dir="in">
851 <desc>ID of the machine this event relates to.</desc>
852 </param>
853 <param name="registered" type="boolean" dir="in">
854 <desc>
855 If true, the machine was registered, otherwise it was
856 unregistered.
857 </desc>
858 </param>
859 </method>
860
861 <method name="onSessionStateChange">
862 <desc>
863 The state of the session for the given machine was changed.
864 <see>IMachine::sessionState</see>
865 </desc>
866 <param name="machineId" type="uuid" dir="in">
867 <desc>ID of the machine this event relates to.</desc>
868 </param>
869 <param name="state" type="SessionState" dir="in">
870 <desc>New session state.</desc>
871 </param>
872 </method>
873
874 <method name="onSnapshotTaken">
875 <desc>
876 A new snapshot of the machine has been taken.
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>ID of the new snapshot.</desc>
884 </param>
885 </method>
886
887 <method name="onSnapshotDiscarded">
888 <desc>
889 Snapshot of the given machine has been discarded.
890
891 <note>
892 This notification is delivered <b>after</b> the snapshot
893 object has been uninitialized on the server (so that any
894 attempt to call its methods will return an error).
895 </note>
896
897 <see>ISnapshot</see>
898 </desc>
899 <param name="machineId" type="uuid" dir="in">
900 <desc>ID of the machine this event relates to.</desc>
901 </param>
902 <param name="snapshotId" type="uuid" dir="in">
903 <desc>
904 ID of the discarded snapshot. <tt>null</tt> means the
905 current machine state has been discarded (restored from
906 the current snapshot).
907 </desc>
908 </param>
909 </method>
910
911 <method name="onSnapshotChange">
912 <desc>
913 Snapshot properties (name and/or description) have been changed.
914 <see>ISnapshot</see>
915 </desc>
916 <param name="machineId" type="uuid" dir="in">
917 <desc>ID of the machine this event relates to.</desc>
918 </param>
919 <param name="snapshotId" type="uuid" dir="in">
920 <desc>ID of the changed snapshot.</desc>
921 </param>
922 </method>
923
924 <method name="onGuestPropertyChange">
925 <desc>
926 Notification when a guest property has changed.
927 </desc>
928 <param name="machineId" type="uuid" dir="in">
929 <desc>
930 ID of the machine this event relates to.
931 </desc>
932 </param>
933 <param name="name" type="wstring" dir="in">
934 <desc>
935 The name of the property that has changed.
936 </desc>
937 </param>
938 <param name="value" type="wstring" dir="in">
939 <desc>
940 The new property value.
941 </desc>
942 </param>
943 <param name="flags" type="wstring" dir="in">
944 <desc>
945 The new property flags.
946 </desc>
947 </param>
948 </method>
949
950 </interface>
951
952 <interface
953 name="IVirtualBox" extends="$dispatched"
954 uuid="2aa11223-ba64-4610-84b8-066d2a89384f"
955 wsmap="managed"
956 >
957 <desc>
958 The IVirtualBox interface represents the main interface exposed by the
959 product that provides virtual machine management.
960
961 An instance of IVirtualBox is required for the product to do anything
962 useful. Even though the interface does not expose this, internally,
963 IVirtualBox is implemented as a singleton and actually lives in the
964 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
965 IVirtualBox can track the state of all virtual machines on a particular
966 host, regardless of which frontend started them.
967
968 To enumerate all the virtual machines on the host, use the
969 <link to="IVirtualBox::machines2"/> attribute.
970 </desc>
971
972 <attribute name="version" type="wstring" readonly="yes">
973 <desc>
974 A string representing the version number of the product. The
975 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
976 last number represents the build number and will frequently change.
977 </desc>
978 </attribute>
979
980 <attribute name="revision" type="unsigned long" readonly="yes">
981 <desc>
982 The internal build revision number of the product.
983 </desc>
984 </attribute>
985
986 <attribute name="packageType" type="wstring" readonly="yes">
987 <desc>
988 A string representing the package type of this product. The
989 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
990 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
991 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
992 this.
993 </desc>
994 </attribute>
995
996 <attribute name="homeFolder" type="wstring" readonly="yes">
997 <desc>
998 Full path to the directory where the global settings file,
999 <tt>VirtualBox.xml</tt>, is stored.
1000
1001 In this version of VirtualBox, the value of this property is
1002 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1003 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1004 as determined by the host OS), and cannot be changed.
1005
1006 This path is also used as the base to resolve relative paths in
1007 places where relative paths are allowed (unless otherwise
1008 expressly indicated).
1009 </desc>
1010 </attribute>
1011
1012 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1013 <desc>
1014 Full name of the global settings file.
1015 The value of this property corresponds to the value of
1016 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1017 </desc>
1018 </attribute>
1019
1020 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1021 <desc>
1022 Current version of the format of the global VirtualBox settings file
1023 (<tt>VirtualBox.xml</tt>).
1024
1025 The version string has the following format:
1026 <pre>
1027 x.y-platform
1028 </pre>
1029 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1030 versions, and <tt>platform</tt> is the platform identifier.
1031
1032 The current version usually matches the value of the
1033 <link to="#settingsFormatVersion"/> attribute unless the
1034 settings file was created by an older version of VirtualBox and there
1035 was a change of the settings file format since then.
1036
1037 Note that VirtualBox automatically converts settings files from older
1038 versions to the most recent version when reading them (usually at
1039 VirtualBox startup) but it doesn't save the changes back until
1040 you call a method that implicitly saves settings (such as
1041 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1042 explicitly. Therefore, if the value of this attribute differs from the
1043 value of <link to="#settingsFormatVersion"/>, then it
1044 means that the settings file was converted but the result of the
1045 conversion is not yet saved to disk.
1046
1047 The above feature may be used by interactive front-ends to inform users
1048 about the settings file format change and offer them to explicitly save
1049 all converted settings files (the global and VM-specific ones),
1050 optionally create backup copies of the old settings files before saving,
1051 etc.
1052
1053 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1054 </desc>
1055 </attribute>
1056
1057 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1058 <desc>
1059 Most recent version of the settings file format.
1060
1061 The version string has the following format:
1062 <pre>
1063 x.y-platform
1064 </pre>
1065 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1066 versions, and <tt>platform</tt> is the platform identifier.
1067
1068 VirtualBox uses this version of the format when saving settings files
1069 (either as a result of method calls that require to save settings or as
1070 a result of an explicit call to <link to="#saveSettings()"/>).
1071
1072 <see>settingsFileVersion</see>
1073 </desc>
1074 </attribute>
1075
1076 <attribute name="host" type="IHost" readonly="yes">
1077 <desc>Associated host object.</desc>
1078 </attribute>
1079
1080 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1081 <desc>Associated system information object.</desc>
1082 </attribute>
1083
1084 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1085 <desc>
1086 Array of machine objects registered within this VirtualBox instance.
1087 </desc>
1088 </attribute>
1089
1090 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1091 <desc>
1092 Array of hard disk objects known to this VirtualBox installation.
1093
1094 This array contains only base (root) hard disks. All differencing
1095 hard disks of the given base hard disk can be enumerated using
1096 <link to="IHardDisk2::children"/>.
1097 </desc>
1098 </attribute>
1099
1100 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1101 <desc>
1102 Array of CD/DVD image objects registered with this VirtualBox instance.
1103 </desc>
1104 </attribute>
1105
1106 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1107 <desc>
1108 Array of floppy image objects registered with this VirtualBox instance.
1109 </desc>
1110 </attribute>
1111
1112 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1113
1114 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1115
1116 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1117 <desc>
1118 Collection of global shared folders. Global shared folders are
1119 available to all virtual machines.
1120
1121 New shared folders are added to the collection using
1122 <link to="#createSharedFolder"/>. Existing shared folders can be
1123 removed using <link to="#removeSharedFolder"/>.
1124
1125 <note>
1126 In the current version of the product, global shared folders are not
1127 implemented and therefore this collection is always empty.
1128 </note>
1129 </desc>
1130 </attribute>
1131
1132 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1133 <desc>
1134 Associated performance collector object.
1135 </desc>
1136 </attribute>
1137
1138 <method name="createMachine">
1139 <desc>
1140 Creates a new virtual machine.
1141
1142 The new machine will have "empty" default settings and will not
1143 yet be registered. The typical sequence to create a virtual machine
1144 is therefore something like this:
1145
1146 <ol>
1147 <li>Call this method (IVirtualBox::createMachine) to have a new
1148 machine created. The machine object returned is "mutable", i.e.
1149 automatically locked for the current session, as if
1150 <link to="#openSession" /> had been called on it.</li>
1151
1152 <li>Assign meaningful settings to the new machine by calling the
1153 respective methods.</li>
1154
1155 <li>Call <link to="IMachine::saveSettings" /> to have the settings written
1156 to the machine's XML settings file. The configuration of the newly
1157 created machine will not be saved to disk (and the settings subfolder
1158 and file, as described below, will not be created) until this method
1159 is called.</li>
1160
1161 <li>Call <link to="#registerMachine" /> to have the
1162 machine show up in the list of machines registered with VirtualBox.</li>
1163 </ol>
1164
1165 Every machine has a <i>settings file</i> that is used to store
1166 the machine configuration. This file is stored in the directory
1167 called <i>machine settings subfolder</i>. Unless specified otherwise,
1168 both the subfolder and the settings file will have a name that
1169 corresponds to the name of the virtual machine. You can specify
1170 where to create the machine settings subfolder using the @a
1171 baseFolder argument. The base folder can be absolute (full path)
1172 or relative to the <link to="IVirtualBox::homeFolder">
1173 VirtualBox home directory</link>.
1174
1175 If a null or empty string is given as the base folder (which is
1176 recommended), the <link to="ISystemProperties::defaultMachineFolder">
1177 default machine settings folder</link> will be used as the base
1178 folder to create the machine settings subfolder and file. In
1179 any case, the full path to the settings file will look like:
1180 <pre>
1181 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1182 </pre>
1183
1184 Optionally the UUID of the machine can be predefined. If this is
1185 not desired (i.e. a new UUID should be generated), pass just an
1186 empty or null UUID.
1187
1188 You should also specify a valid name for the machine.
1189 See the <link to="IMachine::name"/> property
1190 description for more details about the machine name.
1191
1192 The created machine remains
1193 unregistered until you call <link to="#registerMachine()"/>.
1194
1195 <note>
1196 There is no way to change the name of the settings file or
1197 subfolder of the created machine directly.
1198 </note>
1199 </desc>
1200 <param name="baseFolder" type="wstring" dir="in">
1201 <desc>
1202 Name of the folder where to create the machine settings
1203 subfolder containing the settings file.
1204 </desc>
1205 </param>
1206 <param name="name" type="wstring" dir="in">
1207 <desc>Machine name.</desc>
1208 </param>
1209 <param name="id" type="uuid" dir="in">
1210 <desc>
1211 UUID of the newly created VM, when non-null or non-empty.
1212 Otherwise a UUID is automatically generated.
1213 </desc>
1214 </param>
1215 <param name="machine" type="IMachine" dir="return">
1216 <desc>Created machine object.</desc>
1217 </param>
1218 </method>
1219
1220 <method name="createLegacyMachine">
1221 <desc>
1222 Creates a new virtual machine in "legacy" mode, using the
1223 specified settings file to store machine settings.
1224
1225 As opposed to machines created by <link to="#createMachine()"/>,
1226 the settings file of the machine created in "legacy" mode
1227 is not automatically renamed when the machine name is
1228 changed -- it will always remain the same as specified in this
1229 method call.
1230
1231 The specified settings file name can be absolute
1232 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1233 VirtualBox home directory</link>. If the file name doesn't
1234 contain an extension, the default extension (.xml) will be
1235 appended.
1236
1237 Optionally the UUID of the machine can be predefined. If this is
1238 not desired (i.e. a new UUID should be generated), pass just an
1239 empty or null UUID.
1240
1241 Note that the configuration of the newly created machine is not
1242 saved to disk (and therefore no settings file is created)
1243 until <link to="IMachine::saveSettings()"/> is called. If the
1244 specified settings file already exists,
1245 <link to="IMachine::saveSettings()"/> will return an error.
1246
1247 You should also specify a valid name for the machine.
1248 See the <link to="IMachine::name"/> property
1249 description for more details about the machine name.
1250
1251 The created machine remains
1252 unregistered until you call <link to="#registerMachine()"/>.
1253
1254 @deprecated This method may be removed later. It is better
1255 to use <link to="IVirtualBox::createMachine()"/>.
1256
1257 <note>
1258 There is no way to change the name of the settings file
1259 of the created machine.
1260 </note>
1261 </desc>
1262 <param name="settingsFile" type="wstring" dir="in">
1263 <desc>
1264 Name of the file where to store machine settings.
1265 </desc>
1266 </param>
1267 <param name="name" type="wstring" dir="in">
1268 <desc>Machine name.</desc>
1269 </param>
1270 <param name="id" type="uuid" dir="in">
1271 <desc>
1272 UUID of the newly created VM, when non-null or non-empty.
1273 Otherwise a UUID is automatically generated.
1274 </desc>
1275 </param>
1276 <param name="machine" type="IMachine" dir="return">
1277 <desc>Created machine object.</desc>
1278 </param>
1279 </method>
1280
1281 <method name="openMachine">
1282 <desc>
1283 Opens a virtual machine from the existing settings file.
1284 The opened machine remains unregistered until you call
1285 <link to="#registerMachine()"/>.
1286
1287 The specified settings file name can be absolute
1288 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1289 VirtualBox home directory</link>. This file must exist
1290 and must be a valid machine settings file whose contents
1291 will be used to construct the machine object.
1292
1293 @deprecated Will be removed soon.
1294 </desc>
1295 <param name="settingsFile" type="wstring" dir="in">
1296 <desc>
1297 Name of the machine settings file.
1298 </desc>
1299 </param>
1300 <param name="machine" type="IMachine" dir="return">
1301 <desc>Opened machine object.</desc>
1302 </param>
1303 <note>
1304 <link to="IMachine::settingsModified"/> will return
1305 false for the created machine, until any of machine settings
1306 are changed.
1307 </note>
1308 </method>
1309
1310 <method name="registerMachine">
1311 <desc>
1312
1313 Registers the machine previously created using
1314 <link to="#createMachine()"/> or opened using
1315 <link to="#openMachine()"/> within this VirtualBox installation. After
1316 successful method invocation, the
1317 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1318 to all registered callbacks.
1319
1320 <note>
1321 This method implicitly calls <link to="IMachine::saveSettings"/>
1322 to save all current machine settings before registering it.
1323 </note>
1324
1325 </desc>
1326 <param name="machine" type="IMachine" dir="in"/>
1327 </method>
1328
1329 <method name="getMachine">
1330 <desc>
1331 Attempts to find a virtual machine given its UUID.
1332 To look up a machine by name, use <link to="IVirtualBox::findMachine" /> instead.
1333 </desc>
1334 <param name="id" type="uuid" dir="in"/>
1335 <param name="machine" type="IMachine" dir="return"/>
1336 </method>
1337
1338 <method name="findMachine">
1339 <desc>
1340 Attempts to find a virtual machine given its name.
1341 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" /> instead.
1342 </desc>
1343 <param name="name" type="wstring" dir="in"/>
1344 <param name="machine" type="IMachine" dir="return"/>
1345 </method>
1346
1347 <method name="unregisterMachine">
1348 <desc>
1349
1350 Unregisters the machine previously registered using
1351 <link to="#registerMachine"/>. After successful method invocation, the
1352 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1353 to all registered callbacks.
1354
1355 <note>
1356 The specified machine must not be in the Saved state, have an open
1357 (or a spawning) direct session associated with it, have snapshots or
1358 have hard disks attached.
1359 </note>
1360
1361 <note>
1362 This method implicitly calls <link to="IMachine::saveSettings"/> to
1363 save all current machine settings before unregistering it.
1364 </note>
1365
1366 <note>
1367 If the given machine is inaccessible (see
1368 <link to="IMachine::accessible"/>), it will be unregistered and
1369 fully uninitialized right afterwards. As a result, the returned
1370 machine object will be unusable and an attempt to call
1371 <b>any</b> method will return the "Object not ready" error.
1372 </note>
1373
1374 </desc>
1375 <param name="id" type="uuid" dir="in">
1376 <desc>UUID of the machine to unregister.</desc>
1377 </param>
1378 <param name="machine" type="IMachine" dir="return">
1379 <desc>Unregistered machine object.</desc>
1380 </param>
1381 </method>
1382
1383 <method name="createHardDisk2">
1384 <desc>
1385 Creates a new base hard disk object that will use the given storage
1386 format and location for hard disk data.
1387
1388 Note that the actual storage unit is not created by this method. In
1389 order to do it, and before you are able to attach the created hard disk
1390 to virtual machines, you must call one of the following methods to
1391 allocate a format-specific storage unit at the specified location:
1392 <ul>
1393 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1394 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1395 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1396 </ul>
1397
1398 Some hard disk attributes, such as <link to="#id"/>, may remain
1399 uninitialized until the hard disk storage unit is successfully created
1400 by one of the above methods.
1401
1402 After the storage unit is successfully created, the hard disk gets
1403 remembered by this VirtualBox installation and will be accessible
1404 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1405 methods. Remembered root (base) hard disks are also returned as part of
1406 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1407
1408 The list of all storage formats supported by this VirtualBox
1409 installation can be obtained using
1410 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1411 attribute is empty or <tt>null</tt> then the default storage format
1412 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1413 be used for creating a storage unit of the hard disk.
1414
1415 Note that the format of the location string is storage format specific.
1416 See <link to="IMedium::location"/>, IHardDisk2 and
1417 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1418 </desc>
1419 <param name="format" type="wstring" dir="in">
1420 <desc>
1421 Identifier of the storage format to use for the new hard disk.
1422 </desc>
1423 </param>
1424 <param name="location" type="wstring" dir="in">
1425 <desc>
1426 Location of the storage unit for the new hard disk.
1427 </desc>
1428 </param>
1429 <param name="hardDisk" type="IHardDisk2" dir="return">
1430 <desc>Created hard disk object.</desc>
1431 </param>
1432 </method>
1433
1434 <method name="openHardDisk2">
1435 <desc>
1436 Opens a hard disk from an existing location.
1437
1438 After the hard disk is successfully opened by this method, it gets
1439 remembered by (known to) this VirtualBox installation and will be
1440 accessible through <link to="#getHardDisk2()"/> and
1441 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1442 are also returned as part of the <link to="#hardDisks2"/> array and can
1443 be attached to virtual machines. See IHardDisk2 for more details.
1444
1445 If a differencing hard disk is to be opened by this method, the
1446 operation will succeed only if its parent hard disk and all ancestors,
1447 if any, are already known to this VirtualBox installation (for example,
1448 were opened by this method before).
1449
1450 This method tries to guess the storage format of the specified hard disk
1451 by reading hard disk data at the specified location.
1452
1453 Note that the format of the location string is storage format specific.
1454 See <link to="IMedium::location"/>, IHardDisk2 and
1455 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1456 </desc>
1457 <param name="location" type="wstring" dir="in">
1458 <desc>
1459 Location of the storage unit that contains hard disk data in one of
1460 the supported storage formats.
1461 </desc>
1462 </param>
1463 <param name="hardDisk" type="IHardDisk2" dir="return">
1464 <desc>Opened hard disk object.</desc>
1465 </param>
1466 </method>
1467
1468 <method name="getHardDisk2" const="yes">
1469 <desc>
1470 Returns a hard disk with the given UUID.
1471
1472 The hard disk with the given UUID must be known to this VirtualBox
1473 installation, i.e. it must be previously created by
1474 <link to="#createHardDisk2()"/> or opened by <link
1475 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1476 </desc>
1477 <param name="id" type="uuid" dir="in">
1478 <desc>UUID of the hard disk to look for.</desc>
1479 </param>
1480 <param name="hardDisk" type="IHardDisk2" dir="return">
1481 <desc>Found hard disk object.</desc>
1482 </param>
1483 </method>
1484
1485 <method name="findHardDisk2">
1486 <desc>
1487 Returns a hard disk that uses the given location to store hard
1488 disk data.
1489
1490 The given hard disk must be known to this VirtualBox installation, i.e.
1491 it must be previously created by
1492 <link to="#createHardDisk2()"/> or opened by <link
1493 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1494
1495 The search is done by comparing the value of the @a location argument to
1496 the <link to="IHardDisk2::location"/> attribute of each known hard
1497 disk.
1498
1499 For locations represented by file names in the host's file system, the
1500 requested location can be a path relative to the
1501 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1502 only a file name without any path is given, the
1503 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1504 folder</link> will be prepended to the file name before searching. Note
1505 that on case sensitive file systems, a case sensitive comparison is
1506 performed, otherwise the case of symbols in the file path is ignored.
1507 </desc>
1508 <param name="location" type="wstring" dir="in">
1509 <desc>Location string to search for.</desc>
1510 </param>
1511 <param name="hardDisk" type="IHardDisk2" dir="return">
1512 <desc>Found hard disk object.</desc>
1513 </param>
1514 </method>
1515
1516 <method name="openDVDImage">
1517 <desc>
1518 Opens a CD/DVD image contained in the specified file of the supported
1519 format and assigns it the given UUID.
1520
1521 After the image is successfully opened by this method, it gets
1522 remembered by (known to) this VirtualBox installation and will be
1523 accessible through <link to="#getDVDImage()"/> and
1524 <link to="#findDVDImage()"/> methods. Remembered images are also
1525 returned as part of the <link to="#DVDImages"/> array and can be mounted
1526 to virtual machines. See IMedium for more details.
1527
1528 See <link to="IMedium::location"/> to get more details about the format
1529 of the location string.
1530
1531 <note>
1532 Currently, only ISO CD/DVD images are supported by VirtualBox.
1533 </note>
1534 </desc>
1535 <param name="location" type="wstring" dir="in">
1536 <desc>
1537 Full path to the file that contains a valid CD/DVD image.
1538 </desc>
1539 </param>
1540 <param name="id" type="uuid" dir="in">
1541 <desc>
1542 UUID to assign to the given image within this VirtualBox installation.
1543 If an empty (null) UUID is specified, the system will randomly
1544 generate a new UUID.
1545 </desc>
1546 </param>
1547 <param name="image" type="IDVDImage2" dir="return">
1548 <desc>Opened CD/DVD image object.</desc>
1549 </param>
1550 </method>
1551
1552 <method name="getDVDImage">
1553 <desc>
1554 Returns a CD/DVD image with the given UUID.
1555
1556 The image with the given UUID must be known to this VirtualBox
1557 installation, i.e. it must be previously opened by <link
1558 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1559 </desc>
1560 <param name="id" type="uuid" dir="in">
1561 <desc>UUID of the image to look for.</desc>
1562 </param>
1563 <param name="image" type="IDVDImage2" dir="return">
1564 <desc>Found CD/DVD image object.</desc>
1565 </param>
1566 </method>
1567
1568 <method name="findDVDImage">
1569 <desc>
1570 Returns a CD/DVD image with the given image location.
1571
1572 The image with the given UUID must be known to this VirtualBox
1573 installation, i.e. it must be previously opened by <link
1574 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1575
1576 The search is done by comparing the value of the @a location argument to
1577 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1578
1579 The requested location can be a path relative to the
1580 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1581 only a file name without any path is given, the
1582 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1583 folder</link> will be prepended to the file name before searching. Note
1584 that on case sensitive file systems, a case sensitive comparison is
1585 performed, otherwise the case of symbols in the file path is ignored.
1586 </desc>
1587 <param name="location" type="wstring" dir="in">
1588 <desc>CD/DVD image file path to look for.</desc>
1589 </param>
1590 <param name="image" type="IDVDImage2" dir="return">
1591 <desc>Found CD/DVD image object.</desc>
1592 </param>
1593 </method>
1594
1595 <method name="openFloppyImage">
1596 <desc>
1597 Opens a floppy image contained in the specified file of the supported
1598 format and assigns it the given UUID.
1599
1600 After the image is successfully opened by this method, it gets
1601 remembered by (known to) this VirtualBox installation and will be
1602 accessible through <link to="#getFloppyImage()"/> and
1603 <link to="#findFloppyImage()"/> methods. Remembered images are also
1604 returned as part of the <link to="#floppyImages"/> array and can be
1605 mounted to virtual machines. See IMedium for more details.
1606
1607 See <link to="IMedium::location"/> to get more details about the format
1608 of the location string.
1609
1610 <note>
1611 Currently, only raw floppy images are supported by VirtualBox.
1612 </note>
1613 </desc>
1614 <param name="location" type="wstring" dir="in">
1615 <desc>
1616 Full path to the file that contains a valid floppy image.
1617 </desc>
1618 </param>
1619 <param name="id" type="uuid" dir="in">
1620 <desc>
1621 UUID to assign to the given image file within this VirtualBox
1622 installation. If an empty (null) UUID is specified, the system will
1623 randomly generate a new UUID.
1624 </desc>
1625 </param>
1626 <param name="image" type="IFloppyImage2" dir="return">
1627 <desc>Opened floppy image object.</desc>
1628 </param>
1629 </method>
1630
1631 <method name="getFloppyImage">
1632 <desc>
1633 Returns a floppy image with the given UUID.
1634
1635 The image with the given UUID must be known to this VirtualBox
1636 installation, i.e. it must be previously opened by <link
1637 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1638 </desc>
1639 <param name="id" type="uuid" dir="in">
1640 <desc>UUID of the image to look for.</desc>
1641 </param>
1642 <param name="image" type="IFloppyImage2" dir="return">
1643 <desc>Found floppy image object.</desc>
1644 </param>
1645 </method>
1646
1647 <method name="findFloppyImage">
1648 <desc>
1649 Returns a floppy image with the given image location.
1650
1651 The image with the given UUID must be known to this VirtualBox
1652 installation, i.e. it must be previously opened by <link
1653 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
1654
1655 The search is done by comparing the value of the @a location argument to
1656 the <link to="IMedium::location"/> attribute of each known floppy image.
1657
1658 The requested location can be a path relative to the
1659 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1660 only a file name without any path is given, the
1661 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1662 folder</link> will be prepended to the file name before searching. Note
1663 that on case sensitive file systems, a case sensitive comparison is
1664 performed, otherwise the case of symbols in the file path is ignored.
1665 </desc>
1666 <param name="location" type="wstring" dir="in">
1667 <desc>Floppy image file path to look for.</desc>
1668 </param>
1669 <param name="image" type="IFloppyImage2" dir="return">
1670 <desc>Found floppy image object.</desc>
1671 </param>
1672 </method>
1673
1674 <method name="getGuestOSType">
1675 <desc>
1676 Returns an object describing the specified guest OS type.
1677
1678 The requested guest OS type is specified using a string which is a
1679 mnemonic identifier of the guest operating system, such as
1680 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1681 particular virtual machine can be read or set using the
1682 <link to="IMachine::OSTypeId"/> attribute.
1683
1684 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1685 available guest OS type objects. Each object has an
1686 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1687 the guest OS this object describes.
1688 </desc>
1689 <param name="id" type="wstring" dir="in">
1690 <desc>Guest OS type ID string.</desc>
1691 </param>
1692 <param name="type" type="IGuestOSType" dir="return">
1693 <desc>Guest OS type object.</desc>
1694 </param>
1695 </method>
1696
1697 <method name="createSharedFolder">
1698 <desc>
1699 Creates a new global shared folder by associating the given logical
1700 name with the given host path, adds it to the collection of shared
1701 folders and starts sharing it. Refer to the description of
1702 <link to="ISharedFolder"/> to read more about logical names.
1703 </desc>
1704 <param name="name" type="wstring" dir="in">
1705 <desc>Unique logical name of the shared folder.</desc>
1706 </param>
1707 <param name="hostPath" type="wstring" dir="in">
1708 <desc>Full path to the shared folder in the host file system.</desc>
1709 </param>
1710 <param name="writable" type="boolean" dir="in">
1711 <desc>Whether the share is writable or readonly</desc>
1712 </param>
1713 </method>
1714
1715 <method name="removeSharedFolder">
1716 <desc>
1717 Removes the global shared folder with the given name previously
1718 created by <link to="#createSharedFolder"/> from the collection of
1719 shared folders and stops sharing it.
1720 </desc>
1721 <param name="name" type="wstring" dir="in">
1722 <desc>Logical name of the shared folder to remove.</desc>
1723 </param>
1724 </method>
1725
1726 <method name="getNextExtraDataKey">
1727 <desc>
1728 Returns the global extra data key name following the supplied key.
1729
1730 An error is returned if the supplied @a key does not exist. @c NULL is
1731 returned in @a nextKey if the supplied key is the last key. When
1732 supplying @c NULL for the @a key, the first key item is returned in @a
1733 nextKey (if there is any). @a nextValue is an optional parameter and
1734 if supplied, the next key's value is returned in it.
1735 </desc>
1736 <param name="key" type="wstring" dir="in">
1737 <desc>Name of the data key to follow.</desc>
1738 </param>
1739 <param name="nextKey" type="wstring" dir="out">
1740 <desc>Name of the next data key.</desc>
1741 </param>
1742 <param name="nextValue" type="wstring" dir="out">
1743 <desc>Value of the next data key.</desc>
1744 </param>
1745 </method>
1746
1747 <method name="getExtraData">
1748 <desc>
1749 Returns associated global extra data.
1750
1751 If the requested data @a key does not exist, this function will
1752 succeed and return @c NULL in the @a value argument.
1753 </desc>
1754 <param name="key" type="wstring" dir="in">
1755 <desc>Name of the data key to get.</desc>
1756 </param>
1757 <param name="value" type="wstring" dir="return">
1758 <desc>Value of the requested data key.</desc>
1759 </param>
1760 </method>
1761
1762 <method name="setExtraData">
1763 <desc>
1764 Sets associated global extra data.
1765
1766 If you pass @c NULL as a key @a value, the given @a key will be
1767 deleted.
1768
1769 <note>
1770 Before performing the actual data change, this method will ask all
1771 registered callbacks using the
1772 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
1773 notification for a permission. If one of the callbacks refuses the
1774 new value, the change will not be performed.
1775 </note>
1776 <note>
1777 On success, the
1778 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
1779 is called to inform all registered callbacks about a successful data
1780 change.
1781 </note>
1782 </desc>
1783 <param name="key" type="wstring" dir="in">
1784 <desc>Name of the data key to set.</desc>
1785 </param>
1786 <param name="value" type="wstring" dir="in">
1787 <desc>Value to assign to the key.</desc>
1788 </param>
1789 </method>
1790
1791 <method name="openSession">
1792 <desc>
1793 Opens a new direct session with the given virtual machine.
1794
1795 A direct session acts as a local lock on the given VM.
1796 There can be only one direct session open at a time for every
1797 virtual machine, protecting the VM from being manipulated by
1798 conflicting actions from different processes. Only after a
1799 direct session has been opened, one can change all VM settings
1800 and execute the VM in the process space of the session object.
1801
1802 Sessions therefore can be compared to mutex semaphores that
1803 lock a given VM for modification and execution.
1804 See <link to="ISession">ISession</link> for details.
1805
1806 <note>Unless you are writing a new VM frontend, you will not
1807 want to execute a VM in the current process. To spawn a new
1808 process that executes a VM, use
1809 <link to="IVirtualBox::openRemoteSession" />
1810 instead.</note>
1811
1812 Upon successful return, the session object can be used to
1813 get access to the machine and to the VM console.
1814
1815 In VirtualBox terminology, the machine becomes "mutable" after
1816 a session has been opened. Note that the "mutable" machine
1817 object, on which you may invoke IMachine methods to change its
1818 settings, will be a different object from the immutable IMachine
1819 objects returned by various IVirtualBox methods. To obtain a
1820 mutable IMachine object (upon which you can invoke settings methods),
1821 use the <link to="ISession::machine" /> attribute.
1822
1823 One must always call <link to="ISession::close" /> to release the
1824 lock on the machine, or the machine's state will eventually be
1825 set to "Aborted".
1826
1827 In other words, to change settings on a machine, the following
1828 sequence is typically performed:
1829
1830 <ol>
1831 <li>Call this method (openSession) to have a machine locked for
1832 the current session.</li>
1833
1834 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
1835
1836 <li>Change the settings of the machine.</li>
1837
1838 <li>Call <link to="IMachine::saveSettings" />.</li>
1839
1840 <li>Close the session by calling <link to="ISession::close()"/>.</li>
1841 </ol>
1842 </desc>
1843 <param name="session" type="ISession" dir="in">
1844 <desc>
1845 Session object that will represent the opened session after
1846 successful method invocation. This object must not represent
1847 the already open session.
1848 <note>
1849 This session will be automatically closed if the
1850 VirtualBox server is terminated for some reason.
1851 </note>
1852 </desc>
1853 </param>
1854 <param name="machineId" type="uuid" dir="in">
1855 <desc>ID of the virtual machine to open a session with.</desc>
1856 </param>
1857 </method>
1858
1859 <method name="openRemoteSession">
1860 <desc>
1861 Spawns a new process that executes a virtual machine (called a
1862 "remote session").
1863
1864 Opening a remote session causes the VirtualBox server to start a new
1865 process that opens a direct session with the given VM. As a result, the
1866 VM is locked by that direct session in the new process, preventing
1867 conflicting changes from other processes. Since sessions act as locks
1868 that such prevent conflicting changes, one cannot open a remote session
1869 for a VM that already has another open session (direct or remote), or
1870 is currently in the process of opening one (see <link to="IMachine::sessionState"/>).
1871
1872 While the remote session still provides some level of control over the
1873 VM execution to the caller (using the <link to="IConsole" /> interface),
1874 not all VM settings are available for modification within the remote
1875 session context.
1876
1877 This operation can take some time (a new VM is started in a new process,
1878 for which memory and other resources need to be set up). Because of this,
1879 an <link to="IProgress" /> is returned to allow the caller to wait for this
1880 asynchronous operation to be completed. Until then, the remote session
1881 object remains in the closed state, and accessing the machine or its
1882 console through it is invalid. It is recommended to use
1883 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
1884 completion.
1885
1886 As with all <link to="ISession" /> objects, it is recommended to call
1887 <link to="ISession::close" /> on the local session object once openRemoteSession()
1888 has been called. However, the session's state (see <link to="ISession::state" />)
1889 will not return to "Closed" until the remote session has also closed (i.e.
1890 until the VM is no longer running). In that case, however, the state of
1891 the session will automatically change back to "Closed".
1892
1893 Currently supported session types (values of the @a type
1894 argument) are:
1895 <ul>
1896 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
1897 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
1898 </ul>
1899
1900 The @a environment argument is a string containing definitions of
1901 environment variables in the following format:
1902 @code
1903 NAME[=VALUE]\n
1904 NAME[=VALUE]\n
1905 ...
1906 @endcode
1907 where <tt>\\n</tt> is the new line character. These environment
1908 variables will be appended to the environment of the VirtualBox server
1909 process. If an environment variable exists both in the server process
1910 and in this list, the value from this list takes precedence over the
1911 server's variable. If the value of the environment variable is
1912 omitted, this variable will be removed from the resulting environment.
1913 If the environment string is @c null, the server environment is
1914 inherited by the started process as is.
1915
1916 <see>openExistingSession</see>
1917 </desc>
1918 <param name="session" type="ISession" dir="in">
1919 <desc>
1920 Session object that will represent the opened remote session
1921 after successful method invocation (this object must not
1922 represent an already open session).
1923 </desc>
1924 </param>
1925 <param name="machineId" type="uuid" dir="in">
1926 <desc>ID of the virtual machine to open a session with.</desc>
1927 </param>
1928 <param name="type" type="wstring" dir="in">
1929 <desc>
1930 Type of the remote session (case sensitive).
1931 </desc>
1932 </param>
1933 <param name="environment" type="wstring" dir="in">
1934 <desc>
1935 Environment to pass to the opened session (may be @c null).
1936 </desc>
1937 </param>
1938 <param name="progress" type="IProgress" dir="return">
1939 <desc>Progress object to track the operation completion.</desc>
1940 </param>
1941 </method>
1942
1943 <method name="openExistingSession">
1944 <desc>
1945 Opens a new remote session with the virtual machine for
1946 which a direct session is already open.
1947
1948 The remote session provides some level of control over the VM
1949 execution (using the IConsole interface) to the caller; however,
1950 within the remote session context, not all VM settings are available
1951 for modification.
1952
1953 As opposed to <link to="#openRemoteSession()"/>, the number of
1954 remote sessions opened this way is not limited by the API
1955
1956 <note>
1957 It is an error to open a remote session with the machine that
1958 doesn't have an open direct session.
1959 </note>
1960
1961 <see>openRemoteSession</see>
1962 </desc>
1963 <param name="session" type="ISession" dir="in">
1964 <desc>
1965 Session object that will represent the open remote session
1966 after successful method invocation. This object must not
1967 represent an already open session.
1968 <note>
1969 This session will be automatically closed when the peer
1970 (direct) session dies or gets closed.
1971 </note>
1972 </desc>
1973 </param>
1974 <param name="machineId" type="uuid" dir="in">
1975 <desc>ID of the virtual machine to open a session with.</desc>
1976 </param>
1977 </method>
1978
1979 <method name="registerCallback">
1980 <desc>
1981 Registers a new global VirtualBox callback. The methods of the given
1982 callback object will be called by VirtualBox when an appropriate
1983 event occurs.
1984 </desc>
1985 <param name="callback" type="IVirtualBoxCallback" dir="in">
1986 <desc>Callback object to register.</desc>
1987 </param>
1988 </method>
1989
1990 <method name="unregisterCallback">
1991 <desc>
1992 Unregisters the previously registered global VirtualBox callback.
1993 </desc>
1994 <param name="callback" type="IVirtualBoxCallback" dir="in">
1995 <desc>Callback object to unregister.</desc>
1996 </param>
1997 </method>
1998
1999 <method name="waitForPropertyChange">
2000 <desc>
2001 Blocks the caller until any of the properties represented by the @a
2002 what argument changes the value or until the given timeout interval
2003 expires.
2004
2005 The @a what argument is a comma separated list of property masks that
2006 describe properties the caller is interested in. The property mask is
2007 a string in the following format:
2008
2009 <pre>
2010 [[group.]subgroup.]name
2011 </pre>
2012
2013 where @c name is the property name and @c group, @c subgroup are zero
2014 or or more property group specifiers. Each element (group or name) in
2015 the property mask may be either a Latin string or an asterisk symbol
2016 (@c "*") which is used to match any string for the given element. A
2017 property mask that doesn't contain asterisk symbols represents a
2018 single fully qualified property name.
2019
2020 Groups in the fully qualified property name go from more generic (the
2021 left-most part) to more specific (the right-most part). The first
2022 element is usually a name of the object the property belongs to. The
2023 second element may be either a property name, or a child object name,
2024 or an index if the preceding element names an object which is one of
2025 many objects of the same type. This way, property names form a
2026 hierarchy of properties. Here are some examples of property names:
2027
2028 <table>
2029 <tr>
2030 <td><tt>VirtualBox.version</tt></td>
2031 <td><link to="IVirtualBox::version"/> property</td>
2032 </tr>
2033 <tr>
2034 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2035 <td><link to="IMachine::name"/> property of the machine with the
2036 given UUID</td>
2037 </tr>
2038 </table>
2039
2040 Most property names directly correspond to the properties of objects
2041 (components) provided by the VirtualBox library and may be used to
2042 track changes to these properties. However, there may be
2043 pseudo-property names that don't correspond to any existing object's
2044 property directly, as well as there may be object properties that
2045 don't have a corresponding property name that is understood by this
2046 method, and therefore changes to such properties cannot be
2047 tracked. See individual object's property descriptions to get a
2048 fully qualified property name that can be used with this method (if
2049 any).
2050
2051 There is a special property mask @c "*" (i.e. a string consisting of a
2052 single asterisk symbol) that can be used to match all properties.
2053 Below are more examples of property masks:
2054
2055 <table>
2056 <tr>
2057 <td><tt>VirtualBox.*</tt></td>
2058 <td>Track all properties of the VirtualBox object</td>
2059 </tr>
2060 <tr>
2061 <td><tt>Machine.*.name</tt></td>
2062 <td>Track changes to the <link to="IMachine::name"/> property of
2063 all registered virtual machines</td>
2064 </tr>
2065 </table>
2066
2067 </desc>
2068 <param name="what" type="wstring" dir="in">
2069 <desc>Comma separated list of property masks.</desc>
2070 </param>
2071 <param name="timeout" type="unsigned long" dir="in">
2072 <desc>
2073 Wait timeout in milliseconds.
2074 Specify -1 for an indefinite wait.
2075 </desc>
2076 </param>
2077 <param name="changed" type="wstring" dir="out">
2078 <desc>
2079 Comma separated list of properties that have been changed and caused
2080 this method to return to the caller.
2081 </desc>
2082 </param>
2083 <param name="values" type="wstring" dir="out">
2084 <desc>Reserved, not currently used.</desc>
2085 </param>
2086 </method>
2087
2088 <method name="saveSettings">
2089 <desc>
2090 Saves the global settings to the global settings file
2091 (<link to="#settingsFilePath"/>).
2092
2093 This method is only useful for explicitly saving the global settings
2094 file after it has been auto-converted from the old format to the most
2095 recent format (see <link to="#settingsFileVersion"/> for details).
2096 Normally, the global settings file is implicitly saved when a global
2097 setting is changed.
2098 </desc>
2099 </method>
2100
2101 <method name="saveSettingsWithBackup">
2102 <desc>
2103 Creates a backup copy of the global settings file
2104 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2105 calls <link to="#saveSettings()"/>.
2106
2107 Note that the backup copy is created <b>only</b> if the settings file
2108 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2109 details). Otherwise, this call is fully equivalent to
2110 <link to="#saveSettings()"/> and no backup copying is done.
2111
2112 The backup copy is created in the same directory where the original
2113 settings file is located. It is given the following file name:
2114 <pre>
2115 original.xml.x.y-platform.bak
2116 </pre>
2117 where <tt>original.xml</tt> is the original settings file name
2118 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2119 format of the settings file (before auto-conversion).
2120
2121 If the given backup file already exists, this method will try to add the
2122 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2123 0 to 9) and copy it again until it succeeds. If all suffixes are
2124 occupied, or if any other copy error occurs, this method will return a
2125 failure.
2126
2127 If the copy operation succeeds, the @a bakFileName return argument will
2128 receive a full path to the created backup file (for informational
2129 purposes). Note that this will happen even if the subsequent
2130 <link to="#saveSettings()"/> call performed by this method after the
2131 copy operation, fails.
2132
2133 <note>
2134 The VirtualBox API never calls this method. It is intended purely for
2135 the purposes of creating backup copies of the settings files by
2136 front-ends before saving the results of the automatically performed
2137 settings conversion to disk.
2138 </note>
2139
2140 <see>settingsFileVersion</see>
2141 </desc>
2142 <param name="bakFileName" type="wstring" dir="return">
2143 <desc>Full path to the created backup copy.</desc>
2144 </param>
2145 </method>
2146
2147 </interface>
2148
2149 <!--
2150 // IMachine
2151 /////////////////////////////////////////////////////////////////////////
2152 -->
2153
2154 <enumerator
2155 name="IMachineEnumerator" type="IMachine"
2156 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
2157 />
2158
2159 <collection
2160 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
2161 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
2162 readonly="yes"
2163 />
2164
2165 <interface
2166 name="IInternalMachineControl" extends="$unknown"
2167 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
2168 internal="yes"
2169 wsmap="suppress"
2170 >
2171 <method name="updateState">
2172 <desc>
2173 Updates the VM state.
2174 <note>
2175 This operation will also update the settings file with
2176 the correct information about the saved state file
2177 and delete this file from disk when appropriate.
2178 </note>
2179 </desc>
2180 <param name="state" type="MachineState" dir="in"/>
2181 </method>
2182
2183 <method name="getIPCId">
2184 <param name="id" type="wstring" dir="return"/>
2185 </method>
2186
2187 <method name="runUSBDeviceFilters">
2188 <desc>
2189 Asks the server to run USB devices filters of the associated
2190 machine against the given USB device and tell if there is
2191 a match.
2192 <note>
2193 Intended to be used only for remote USB devices. Local
2194 ones don't require to call this method (this is done
2195 implicitly by the Host and USBProxyService).
2196 </note>
2197 </desc>
2198 <param name="device" type="IUSBDevice" dir="in"/>
2199 <param name="matched" type="boolean" dir="out"/>
2200 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2201 </method>
2202
2203 <method name="captureUSBDevice">
2204 <desc>
2205 Requests a capture of the given host USB device.
2206 When the request is completed, the VM process will
2207 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2208 notification.
2209 </desc>
2210 <param name="id" type="uuid" dir="in"/>
2211 </method>
2212
2213 <method name="detachUSBDevice">
2214 <desc>
2215 Notification that a VM is going to detach (done = false) or has
2216 already detached (done = true) the given USB device.
2217 When the done = true request is completed, the VM process will
2218 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2219 notification.
2220 <note>
2221 In the done = true case, the server must run its own filters
2222 and filters of all VMs but this one on the detached device
2223 as if it were just attached to the host computer.
2224 </note>
2225 </desc>
2226 <param name="id" type="uuid" dir="in"/>
2227 <param name="done" type="boolean" dir="in"/>
2228 </method>
2229
2230 <method name="autoCaptureUSBDevices">
2231 <desc>
2232 Requests a capture all matching USB devices attached to the host.
2233 When the request is completed, the VM process will
2234 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2235 notification per every captured device.
2236 </desc>
2237 </method>
2238
2239 <method name="detachAllUSBDevices">
2240 <desc>
2241 Notification that a VM that is being powered down. The done
2242 parameter indicates whether which stage of the power down
2243 we're at. When done = false the VM is announcing its
2244 intentions, while when done = true the VM is reporting
2245 what it has done.
2246 <note>
2247 In the done = true case, the server must run its own filters
2248 and filters of all VMs but this one on all detach devices as
2249 if they were just attached to the host computer.
2250 </note>
2251 </desc>
2252 <param name="done" type="boolean" dir="in"/>
2253 </method>
2254
2255 <method name="onSessionEnd">
2256 <desc>
2257 Triggered by the given session object when the session is about
2258 to close normally.
2259 </desc>
2260 <param name="session" type="ISession" dir="in">
2261 <desc>Session that is being closed</desc>
2262 </param>
2263 <param name="progress" type="IProgress" dir="return">
2264 <desc>
2265 Used to wait until the corresponding machine is actually
2266 dissociated from the given session on the server.
2267 Returned only when this session is a direct one.
2268 </desc>
2269 </param>
2270 </method>
2271
2272 <method name="beginSavingState">
2273 <desc>
2274 Called by the VM process to inform the server it wants to
2275 save the current state and stop the VM execution.
2276 </desc>
2277 <param name="progress" type="IProgress" dir="in">
2278 <desc>
2279 Progress object created by the VM process to wait until
2280 the state is saved.
2281 </desc>
2282 </param>
2283 <param name="stateFilePath" type="wstring" dir="out">
2284 <desc>
2285 File path the VM process must save the execution state to.
2286 </desc>
2287 </param>
2288 </method>
2289
2290 <method name="endSavingState">
2291 <desc>
2292 Called by the VM process to inform the server that saving
2293 the state previously requested by #beginSavingState is either
2294 successfully finished or there was a failure.
2295 </desc>
2296
2297 <param name="success" type="boolean" dir="in">
2298 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2299 </param>
2300 </method>
2301
2302 <method name="adoptSavedState">
2303 <desc>
2304 Gets called by IConsole::adoptSavedState.
2305 </desc>
2306 <param name="savedStateFile" type="wstring" dir="in">
2307 <desc>Path to the saved state file to adopt.</desc>
2308 </param>
2309 </method>
2310
2311 <method name="beginTakingSnapshot">
2312 <desc>
2313 Called by the VM process to inform the server it wants to
2314 take a snapshot.
2315 </desc>
2316 <param name="initiator" type="IConsole" dir="in">
2317 <desc>The console object that initiated this call.</desc>
2318 </param>
2319 <param name="name" type="wstring" dir="in">
2320 <desc>Snapshot name</desc>
2321 </param>
2322 <param name="description" type="wstring" dir="in">
2323 <desc>Snapshot description</desc>
2324 </param>
2325 <param name="progress" type="IProgress" dir="in">
2326 <desc>
2327 Progress object created by the VM process to wait until
2328 the state is saved (only for online snapshots).
2329 </desc>
2330 </param>
2331 <param name="stateFilePath" type="wstring" dir="out">
2332 <desc>
2333 File path the VM process must save the execution state to.
2334 </desc>
2335 </param>
2336 <param name="serverProgress" type="IProgress" dir="out">
2337 <desc>
2338 Progress object created by the server process to wait until
2339 the snapshot is taken (VDI diff creation, etc.).
2340 </desc>
2341 </param>
2342 </method>
2343
2344 <method name="endTakingSnapshot">
2345 <desc>
2346 Called by the VM process to inform the server that the snapshot
2347 previously requested by #beginTakingSnapshot is either
2348 successfully taken or there was a failure.
2349 </desc>
2350
2351 <param name="success" type="boolean" dir="in">
2352 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2353 </param>
2354 </method>
2355
2356 <method name="discardSnapshot">
2357 <desc>
2358 Gets called by IConsole::discardSnapshot.
2359 </desc>
2360 <param name="initiator" type="IConsole" dir="in">
2361 <desc>The console object that initiated this call.</desc>
2362 </param>
2363 <param name="id" type="uuid" dir="in">
2364 <desc>UUID of the snapshot to discard.</desc>
2365 </param>
2366 <param name="machineState" type="MachineState" dir="out">
2367 <desc>New machine state after this operation is started.</desc>
2368 </param>
2369 <param name="progress" type="IProgress" dir="return">
2370 <desc>Progress object to track the operation completion.</desc>
2371 </param>
2372 </method>
2373
2374 <method name="discardCurrentState">
2375 <desc>
2376 Gets called by IConsole::discardCurrentState.
2377 </desc>
2378 <param name="initiator" type="IConsole" dir="in">
2379 <desc>The console object that initiated this call.</desc>
2380 </param>
2381 <param name="machineState" type="MachineState" dir="out">
2382 <desc>New machine state after this operation is started.</desc>
2383 </param>
2384 <param name="progress" type="IProgress" dir="return">
2385 <desc>Progress object to track the operation completion.</desc>
2386 </param>
2387 </method>
2388
2389 <method name="discardCurrentSnapshotAndState">
2390 <desc>
2391 Gets called by IConsole::discardCurrentSnapshotAndState.
2392 </desc>
2393 <param name="initiator" type="IConsole" dir="in">
2394 <desc>The console object that initiated this call.</desc>
2395 </param>
2396 <param name="machineState" type="MachineState" dir="out">
2397 <desc>New machine state after this operation is started.</desc>
2398 </param>
2399 <param name="progress" type="IProgress" dir="return">
2400 <desc>Progress object to track the operation completion.</desc>
2401 </param>
2402 </method>
2403
2404 <method name="pullGuestProperties">
2405 <desc>
2406 Get the list of the guest properties matching a set of patterns along
2407 with their values, time stamps and flags and give responsibility for
2408 managing properties to the console.
2409 </desc>
2410 <param name="name" type="wstring" dir="out" safearray="yes">
2411 <desc>
2412 The names of the properties returned.
2413 </desc>
2414 </param>
2415 <param name="value" type="wstring" dir="out" safearray="yes">
2416 <desc>
2417 The values of the properties returned. The array entries match the
2418 corresponding entries in the @a name array.
2419 </desc>
2420 </param>
2421 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
2422 <desc>
2423 The time stamps of the properties returned. The array entries match
2424 the corresponding entries in the @a name array.
2425 </desc>
2426 </param>
2427 <param name="flags" type="wstring" dir="out" safearray="yes">
2428 <desc>
2429 The flags of the properties returned. The array entries match the
2430 corresponding entries in the @a name array.
2431 </desc>
2432 </param>
2433 </method>
2434
2435 <method name="pushGuestProperties">
2436 <desc>
2437 Set the list of the guest properties matching a set of patterns along
2438 with their values, time stamps and flags and return responsibility for
2439 managing properties to IMachine.
2440 </desc>
2441 <param name="name" type="wstring" dir="in" safearray="yes">
2442 <desc>
2443 The names of the properties.
2444 </desc>
2445 </param>
2446 <param name="value" type="wstring" dir="in" safearray="yes">
2447 <desc>
2448 The values of the properties. The array entries match the
2449 corresponding entries in the @a name array.
2450 </desc>
2451 </param>
2452 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
2453 <desc>
2454 The time stamps of the properties. The array entries match
2455 the corresponding entries in the @a name array.
2456 </desc>
2457 </param>
2458 <param name="flags" type="wstring" dir="in" safearray="yes">
2459 <desc>
2460 The flags of the properties. The array entries match the
2461 corresponding entries in the @a name array.
2462 </desc>
2463 </param>
2464 </method>
2465 <method name="pushGuestProperty">
2466 <desc>
2467 Update a single guest property in IMachine.
2468 </desc>
2469 <param name="name" type="wstring" dir="in">
2470 <desc>
2471 The name of the property to be updated.
2472 </desc>
2473 </param>
2474 <param name="value" type="wstring" dir="in">
2475 <desc>
2476 The value of the property.
2477 </desc>
2478 </param>
2479 <param name="timestamp" type="unsigned long long" dir="in">
2480 <desc>
2481 The timestamp of the property.
2482 </desc>
2483 </param>
2484 <param name="flags" type="wstring" dir="in">
2485 <desc>
2486 The flags of the property.
2487 </desc>
2488 </param>
2489 </method>
2490 </interface>
2491
2492 <interface
2493 name="IBIOSSettings" extends="$unknown"
2494 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
2495 wsmap="managed"
2496 >
2497 <desc>
2498 The IBIOSSettings interface represents BIOS settings of the virtual
2499 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
2500 </desc>
2501 <attribute name="logoFadeIn" type="boolean">
2502 <desc>Fade in flag for BIOS logo animation.</desc>
2503 </attribute>
2504
2505 <attribute name="logoFadeOut" type="boolean">
2506 <desc>Fade out flag for BIOS logo animation.</desc>
2507 </attribute>
2508
2509 <attribute name="logoDisplayTime" type="unsigned long">
2510 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
2511 </attribute>
2512
2513 <attribute name="logoImagePath" type="wstring">
2514 <desc>Local file system path for external BIOS image.</desc>
2515 </attribute>
2516
2517 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
2518 <desc>Mode of the BIOS boot device menu.</desc>
2519 </attribute>
2520
2521 <attribute name="ACPIEnabled" type="boolean">
2522 <desc>ACPI support flag.</desc>
2523 </attribute>
2524
2525 <attribute name="IOAPICEnabled" type="boolean">
2526 <desc>
2527 IO APIC support flag. If set, VirtualBox will provide an IO APIC
2528 and support IRQs above 15.
2529 </desc>
2530 </attribute>
2531
2532 <attribute name="timeOffset" type="long long">
2533 <desc>
2534 Offset in milliseconds from the host system time. This allows for
2535 guests running with a different system date/time than the host.
2536 It is equivalent to setting the system date/time in the BIOS other
2537 than it's not an absolute value but a relative one. Guest Additions
2538 time synchronization also honors this offset.
2539 </desc>
2540 </attribute>
2541
2542 <attribute name="PXEDebugEnabled" type="boolean">
2543 <desc>
2544 PXE debug logging flag. If set, VirtualBox will write extensive
2545 PXE trace information to the release log.
2546 </desc>
2547 </attribute>
2548
2549 <attribute name="IDEControllerType" type="IDEControllerType">
2550 <desc>
2551 Type of the virtual IDE controller. Depending on this value,
2552 VirtualBox will provide different virtual IDE hardware
2553 devices to the guest.
2554 </desc>
2555 </attribute>
2556
2557 </interface>
2558
2559 <interface
2560 name="IMachine" extends="$unknown"
2561 uuid="a744b229-3457-422f-8550-649c40346c55"
2562 wsmap="managed"
2563 >
2564 <desc>
2565 The IMachine interface represents a virtual machine, or guest, created
2566 in VirtualBox.
2567
2568 This interface is used in two contexts. First of all, a collection of
2569 objects implementing this interface is stored in the
2570 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
2571 machines that are currently registered with this VirtualBox
2572 installation. Also, once a session has been opened for the given virtual
2573 machine (e.g. the virtual machine is running), the machine object
2574 associated with the open session can be queried from the session object;
2575 see <link to="ISession"/> for details.
2576
2577 The main role of this interface is to expose the settings of the virtual
2578 machine and provide methods to change various aspects of the virtual
2579 machine's configuration. For machine objects stored in the
2580 <link to="IVirtualBox::machines2"/> collection, all attributes are
2581 read-only unless explicitly stated otherwise in individual attribute
2582 and method descriptions. In order to change a machine setting, a session
2583 for this machine must be opened using one of
2584 <link to="IVirtualBox::openSession"/>,
2585 <link to="IVirtualBox::openRemoteSession"/> or
2586 <link to="IVirtualBox::openExistingSession"/> methods. After the
2587 session has been successfully opened, a mutable machine object needs to
2588 be queried from the session object and then the desired settings changes
2589 can be applied to the returned object using IMachine attributes and
2590 methods. See the ISession interface description for more information
2591 about sessions.
2592
2593 Note that the IMachine interface does not provide methods to control
2594 virtual machine execution (such as start the machine, or power it
2595 down) -- these methods are grouped in a separate IConsole
2596 interface. Refer to the IConsole interface description to get more
2597 information about this topic.
2598
2599 <see>ISession, IConsole</see>
2600 </desc>
2601
2602 <attribute name="parent" type="IVirtualBox" readonly="yes">
2603 <desc>Associated parent object.</desc>
2604 </attribute>
2605
2606 <attribute name="accessible" type="boolean" readonly="yes">
2607 <desc>
2608 Whether this virtual machine is currently accessible or not.
2609
2610 The machine is considered to be inaccessible when:
2611 <ul>
2612 <li>It is a registered virtual machine, and
2613 </li>
2614 <li>Its settings file is inaccessible (for example, it is
2615 located on a network share that is not accessible during
2616 VirtualBox startup, or becomes inaccessible later, or if
2617 the settings file can be read but is invalid).
2618 </li>
2619 </ul>
2620
2621 Otherwise, the value of this property is always <tt>true</tt>.
2622
2623 Every time this property is read, the accessibility state of
2624 this machine is re-evaluated. If the returned value is |false|,
2625 the <link to="#accessError"/> property may be used to get the
2626 detailed error information describing the reason of
2627 inaccessibility.
2628
2629 When the machine is inaccessible, only the following properties
2630 can be used on it:
2631 <ul>
2632 <li><link to="#parent"/></li>
2633 <li><link to="#id"/></li>
2634 <li><link to="#settingsFilePath"/></li>
2635 <li><link to="#accessible"/></li>
2636 <li><link to="#accessError"/></li>
2637 </ul>
2638
2639 An attempt to access any other property or method will return
2640 an error.
2641
2642 The only possible action you can perform on an inaccessible
2643 machine is to unregister it using the
2644 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
2645 for the accessibility state once more by querying this
2646 property).
2647
2648 <note>
2649 In the current implementation, once this property returns
2650 <tt>true</tt>, the machine will never become inaccessible
2651 later, even if its settings file cannot be successfully
2652 read/written any more (at least, until the VirtualBox
2653 server is restarted). This limitation may be removed in
2654 future releases.
2655 </note>
2656 </desc>
2657 </attribute>
2658
2659 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
2660 <desc>
2661 Error information describing the reason of machine
2662 inaccessibility.
2663
2664 Reading this property is only valid after the last call to
2665 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
2666 machine is currently unaccessible). Otherwise, a null
2667 IVirtualBoxErrorInfo object will be returned.
2668 </desc>
2669 </attribute>
2670
2671 <attribute name="name" type="wstring">
2672 <desc>
2673 Name of the virtual machine.
2674
2675 Besides being used for human-readable identification purposes
2676 everywhere in VirtualBox, the virtual machine name is also used
2677 as a name of the machine's settings file and as a name of the
2678 subdirectory this settings file resides in. Thus, every time you
2679 change the value of this property, the settings file will be
2680 renamed once you call <link to="#saveSettings()"/> to confirm the
2681 change. The containing subdirectory will be also renamed, but
2682 only if it has exactly the same name as the settings file
2683 itself prior to changing this property (for backward compatibility
2684 with previous API releases). The above implies the following
2685 limitations:
2686 <ul>
2687 <li>The machine name cannot be empty.</li>
2688 <li>The machine name can contain only characters that are valid
2689 file name characters according to the rules of the file
2690 system used to store VirtualBox configuration.</li>
2691 <li>You cannot have two or more machines with the same name
2692 if they use the same subdirectory for storing the machine
2693 settings files.</li>
2694 <li>You cannot change the name of the machine if it is running,
2695 or if any file in the directory containing the settings file
2696 is being used by another running machine or by any other
2697 process in the host operating system at a time when
2698 <link to="#saveSettings()"/> is called.
2699 </li>
2700 </ul>
2701 If any of the above limitations are hit, <link to="#saveSettings()"/>
2702 will return an appropriate error message explaining the exact
2703 reason and the changes you made to this machine will not be
2704 saved.
2705 <note>
2706 For "legacy" machines created using the
2707 <link to="IVirtualBox::createLegacyMachine()"/> call,
2708 the above naming limitations do not apply because the
2709 machine name does not affect the settings file name.
2710 The settings file name remains the same as it was specified
2711 during machine creation and never changes.
2712 </note>
2713 </desc>
2714 </attribute>
2715
2716 <attribute name="description" type="wstring">
2717 <desc>
2718 Description of the virtual machine.
2719
2720 The description attribute can contain any text and is
2721 typically used to describe the hardware and software
2722 configuration of the virtual machine in detail (i.e. network
2723 settings, versions of the installed software and so on).
2724 </desc>
2725 </attribute>
2726
2727 <attribute name="id" type="uuid" readonly="yes">
2728 <desc>UUID of the virtual machine.</desc>
2729 </attribute>
2730
2731 <attribute name="OSTypeId" type="wstring">
2732 <desc>
2733 User-defined identifier of the Guest OS type.
2734 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
2735 an IGuestOSType object representing details about the given
2736 Guest OS type.
2737 <note>
2738 This value may differ from the value returned by
2739 <link to="IGuest::OSTypeId"/> if Guest Additions are
2740 installed to the guest OS.
2741 </note>
2742 </desc>
2743 </attribute>
2744
2745 <attribute name="CPUCount" type="unsigned long">
2746 <desc>Number of virtual CPUs in the VM.</desc>
2747 </attribute>
2748
2749 <attribute name="memorySize" type="unsigned long">
2750 <desc>System memory size in megabytes.</desc>
2751 </attribute>
2752
2753 <attribute name="memoryBalloonSize" type="unsigned long">
2754 <desc>Initial memory balloon size in megabytes.</desc>
2755 </attribute>
2756
2757 <attribute name="statisticsUpdateInterval" type="unsigned long">
2758 <desc>Initial interval to update guest statistics in seconds.</desc>
2759 </attribute>
2760
2761 <attribute name="VRAMSize" type="unsigned long">
2762 <desc>Video memory size in megabytes.</desc>
2763 </attribute>
2764
2765 <attribute name="accelerate3DEnabled" type="boolean" default="false">
2766 <desc>
2767 This setting determines whether VirtualBox allows guests to make use
2768 of the 3D graphics support available on the host. Currently limited
2769 to OpenGL only. </desc>
2770 </attribute>
2771
2772 <attribute name="monitorCount" type="unsigned long">
2773 <desc>
2774 Number of virtual monitors.
2775 <note>
2776 Only effective on Windows XP and later guests with
2777 Guest Additions installed.
2778 </note>
2779 </desc>
2780 </attribute>
2781
2782 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
2783 <desc>Object containing all BIOS settings.</desc>
2784 </attribute>
2785
2786 <attribute name="HWVirtExEnabled" type="TSBool">
2787 <desc>
2788 This setting determines whether VirtualBox will try to make use of
2789 the host CPU's hardware virtualization extensions such as Intel VT-x
2790 and AMD-V. Note that in case such extensions are not available,
2791 they will not be used.
2792 </desc>
2793 </attribute>
2794
2795 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
2796 <desc>
2797 This setting determines whether VirtualBox will try to make use of
2798 the nested paging extension of Intel VT-x and AMD-V. Note that in case
2799 such extensions are not available, they will not be used.
2800 </desc>
2801 </attribute>
2802
2803 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
2804 <desc>
2805 This setting determines whether VirtualBox will try to make use of
2806 the VPID extension of Intel VT-x. Note that in case such extensions are
2807 not available, they will not be used.
2808 </desc>
2809 </attribute>
2810
2811 <attribute name="PAEEnabled" type="boolean" default="false">
2812 <desc>
2813 This setting determines whether VirtualBox will expose the Physical Address
2814 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
2815 is not available, it will not be reported.
2816 </desc>
2817 </attribute>
2818
2819 <attribute name="snapshotFolder" type="wstring">
2820 <desc>
2821 Full path to the directory used to store snapshot data
2822 (differencing hard disks and saved state files) of this machine.
2823
2824 The initial value of this property is
2825 <tt>&lt;</tt><link to="#settingsFilePath">
2826 path_to_settings_file</link><tt>&gt;/&lt;</tt>
2827 <link to="#id">machine_uuid</link>
2828 <tt>&gt;</tt>.
2829
2830 Currently, it is an error to try to change this property on
2831 a machine that has snapshots (because this would require to
2832 move possibly large files to a different location).
2833 A separate method will be available for this purpose later.
2834
2835 <note>
2836 Setting this property to <tt>null</tt> will restore the
2837 initial value.
2838 </note>
2839 <note>
2840 When setting this property, the specified path can be
2841 absolute (full path) or relative to the directory where the
2842 <link to="#settingsFilePath">machine settings file</link>
2843 is located. When reading this property, a full path is
2844 always returned.
2845 </note>
2846 <note>
2847 The specified path may not exist, it will be created
2848 when necessary.
2849 </note>
2850 </desc>
2851 </attribute>
2852
2853 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
2854 <desc>VRDP server object.</desc>
2855 </attribute>
2856
2857 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
2858 <desc>Array of hard disks attached to this machine.</desc>
2859 </attribute>
2860
2861 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
2862 <desc>Associated DVD drive object.</desc>
2863 </attribute>
2864
2865 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
2866 <desc>Associated floppy drive object.</desc>
2867 </attribute>
2868
2869 <attribute name="USBController" type="IUSBController" readonly="yes">
2870 <desc>
2871 Associated USB controller object.
2872
2873 <note>
2874 This method may set a @ref com_warnings "warning result code".
2875 </note>
2876 <note>
2877 If USB functionality is not available in the given edition of
2878 VirtualBox, this method will set the result code to @c E_NOTIMPL.
2879 </note>
2880 </desc>
2881 </attribute>
2882
2883 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
2884 <desc>Associated audio adapter, always present.</desc>
2885 </attribute>
2886
2887 <attribute name="SATAController" type="ISATAController" readonly="yes">
2888 <desc>
2889 Associated SATA controller object.
2890 </desc>
2891 </attribute>
2892
2893 <attribute name="settingsFilePath" type="wstring" readonly="yes">
2894 <desc>
2895 Full name of the file containing machine settings data.
2896 </desc>
2897 </attribute>
2898
2899 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
2900 <desc>
2901 Current version of the format of the settings file of this machine
2902 (<link to="#settingsFilePath"/>).
2903
2904 The version string has the following format:
2905 <pre>
2906 x.y-platform
2907 </pre>
2908 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
2909 versions, and <tt>platform</tt> is the platform identifier.
2910
2911 The current version usually matches the value of the
2912 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
2913 settings file was created by an older version of VirtualBox and there
2914 was a change of the settings file format since then.
2915
2916 Note that VirtualBox automatically converts settings files from older
2917 versions to the most recent version when reading them (usually at
2918 VirtualBox startup) but it doesn't save the changes back until
2919 you call a method that implicitly saves settings (such as
2920 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
2921 explicitly. Therefore, if the value of this attribute differs from the
2922 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
2923 means that the settings file was converted but the result of the
2924 conversion is not yet saved to disk.
2925
2926 The above feature may be used by interactive front-ends to inform users
2927 about the settings file format change and offer them to explicitly save
2928 all converted settings files (the global and VM-specific ones),
2929 optionally create backup copies of the old settings files before saving,
2930 etc.
2931
2932 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
2933 </desc>
2934 </attribute>
2935
2936 <attribute name="settingsModified" type="boolean" readonly="yes">
2937 <desc>
2938 Whether the settings of this machine have been modified
2939 (but neither yet saved nor discarded).
2940 <note>
2941 Reading this property is only valid on instances returned
2942 by <link to="ISession::machine"/> and on new machines
2943 created by <link to="IVirtualBox::createMachine"/> or opened
2944 by <link to="IVirtualBox::openMachine"/> but not
2945 yet registered, or on unregistered machines after calling
2946 <link to="IVirtualBox::unregisterMachine"/>. For all other
2947 cases, the settings can never be modified.
2948 </note>
2949 <note>
2950 For newly created unregistered machines, the value of this
2951 property is always TRUE until <link to="#saveSettings()"/>
2952 is called (no matter if any machine settings have been
2953 changed after the creation or not). For opened machines
2954 the value is set to FALSE (and then follows to normal rules).
2955 </note>
2956 </desc>
2957 </attribute>
2958
2959 <attribute name="sessionState" type="SessionState" readonly="yes">
2960 <desc>Current session state for this machine.</desc>
2961 </attribute>
2962
2963 <attribute name="sessionType" type="wstring" readonly="yes">
2964 <desc>
2965 Type of the session. If <link to="#sessionState"/> is
2966 SessionSpawning or SessionOpen, this attribute contains the
2967 same value as passed to the
2968 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
2969 type parameter. If the session was opened directly using
2970 <link to="IVirtualBox::openSession()"/>, or if
2971 <link to="#sessionState"/> is SessionClosed, the value of this
2972 attribute is @c null.
2973 </desc>
2974 </attribute>
2975
2976 <attribute name="sessionPid" type="unsigned long" readonly="yes">
2977 <desc>
2978 Identifier of the session process. This attribute contains the
2979 platform-dependent identifier of the process that has opened a
2980 direct session for this machine using the
2981 <link to="IVirtualBox::openSession()"/> call. The returned value
2982 is only valid if <link to="#sessionState"/> is SessionOpen or
2983 SessionClosing (i.e. a session is currently open or being
2984 closed) by the time this property is read.
2985 </desc>
2986 </attribute>
2987
2988 <attribute name="state" type="MachineState" readonly="yes">
2989 <desc>Current execution state of this machine.</desc>
2990 </attribute>
2991
2992 <attribute name="lastStateChange" type="long long" readonly="yes">
2993 <desc>
2994 Time stamp of the last execution state change,
2995 in milliseconds since 1970-01-01 UTC.
2996 </desc>
2997 </attribute>
2998
2999 <attribute name="stateFilePath" type="wstring" readonly="yes">
3000 <desc>
3001 Full path to the file that stores the execution state of
3002 the machine when it is in the <link to="MachineState::Saved"/>
3003 state.
3004 <note>
3005 When the machine is not in the Saved state, this attribute
3006 <tt>null</tt>.
3007 </note>
3008 </desc>
3009 </attribute>
3010
3011 <attribute name="logFolder" type="wstring" readonly="yes">
3012 <desc>
3013 Full path to the folder that stores a set of rotated log files
3014 recorded during machine execution. The most recent log file is
3015 named <tt>VBox.log</tt>, the previous log file is
3016 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3017 in the current version).
3018 </desc>
3019 </attribute>
3020
3021 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3022 <desc>
3023 Current snapshot of this machine.
3024 <note>
3025 A <tt>null</tt> object is returned if the machine doesn't
3026 have snapshots.
3027 </note>
3028 <see><link to="ISnapshot"/></see>
3029 </desc>
3030 </attribute>
3031
3032 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3033 <desc>
3034 Number of snapshots taken on this machine. Zero means the
3035 machine doesn't have any snapshots.
3036 </desc>
3037 </attribute>
3038
3039 <attribute name="currentStateModified" type="boolean" readonly="yes">
3040 <desc>
3041 Returns <tt>true</tt> if the current state of the machine is not
3042 identical to the state stored in the current snapshot.
3043
3044 The current state is identical to the current snapshot right
3045 after one of the following calls are made:
3046 <ul>
3047 <li><link to="IConsole::discardCurrentState"/> or
3048 <link to="IConsole::discardCurrentSnapshotAndState"/>
3049 </li>
3050 <li><link to="IConsole::takeSnapshot"/> (issued on a
3051 powered off or saved machine, for which
3052 <link to="#settingsModified"/> returns <tt>false</tt>)
3053 </li>
3054 <li><link to="IMachine::setCurrentSnapshot"/>
3055 </li>
3056 </ul>
3057
3058 The current state remains identical until one of the following
3059 happens:
3060 <ul>
3061 <li>settings of the machine are changed</li>
3062 <li>the saved state is discarded</li>
3063 <li>the current snapshot is discarded</li>
3064 <li>an attempt to execute the machine is made</li>
3065 </ul>
3066
3067 <note>
3068 For machines that don't have snapshots, this property is
3069 always <tt>false</tt>.
3070 </note>
3071 </desc>
3072 </attribute>
3073
3074 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3075 <desc>
3076 Collection of shared folders for this machine (permanent shared
3077 folders). These folders are shared automatically at machine startup
3078 and available only to the guest OS installed within this machine.
3079
3080 New shared folders are added to the collection using
3081 <link to="#createSharedFolder"/>. Existing shared folders can be
3082 removed using <link to="#removeSharedFolder"/>.
3083 </desc>
3084 </attribute>
3085
3086 <attribute name="clipboardMode" type="ClipboardMode">
3087 <desc>
3088 Synchronization mode between the host OS clipboard
3089 and the guest OS clipboard.
3090 </desc>
3091 </attribute>
3092
3093 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3094 <desc>
3095 A comma-separated list of simple glob patterns. Changes to guest
3096 properties whose name matches one of the patterns will generate an
3097 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3098 </desc>
3099 </attribute>
3100
3101 <method name="setBootOrder">
3102 <desc>
3103 Puts the given device to the specified position in
3104 the boot order.
3105
3106 To indicate that no device is associated with the given position,
3107 <link to="DeviceType::Null"/> should be used.
3108
3109 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3110 </desc>
3111 <param name="position" type="unsigned long" dir="in">
3112 <desc>
3113 Position in the boot order (<tt>1</tt> to the total number of
3114 devices the machine can boot from, as returned by
3115 <link to="ISystemProperties::maxBootPosition"/>).
3116 </desc>
3117 </param>
3118 <param name="device" type="DeviceType" dir="in">
3119 <desc>
3120 The type of the device used to boot at the given position.
3121 </desc>
3122 </param>
3123 </method>
3124
3125 <method name="getBootOrder" const="yes">
3126 <desc>
3127 Returns the device type that occupies the specified
3128 position in the boot order.
3129
3130 @todo [remove?]
3131 If the machine can have more than one device of the returned type
3132 (such as hard disks), then a separate method should be used to
3133 retrieve the individual device that occupies the given position.
3134
3135 If here are no devices at the given position, then
3136 <link to="DeviceType::Null"/> is returned.
3137
3138 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3139 </desc>
3140 <param name="order" type="unsigned long" dir="in">
3141 <desc>
3142 Position in the boot order (<tt>1</tt> to the total number of
3143 devices the machine can boot from, as returned by
3144 <link to="ISystemProperties::maxBootPosition"/>).
3145 </desc>
3146 </param>
3147 <param name="device" type="DeviceType" dir="return">
3148 <desc>
3149 Device at the given position.
3150 </desc>
3151 </param>
3152 </method>
3153
3154 <method name="attachHardDisk2">
3155 <desc>
3156 Attaches a virtual hard disk identified by the given UUID to a device
3157 slot of the specified bus.
3158
3159 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3160 specify the primary or secondary IDE controller, respectively. The
3161 SATA bus supports 30 channels, so this parameter can be a number in
3162 range from @c 0 to @c 29.
3163
3164 For the primary controller of the IDE bus, the @a device number can be
3165 either @c 0 or @c 1, to specify the master or the slave device,
3166 respectively. For the secondary IDE controller, the device number is
3167 always @c 1 because the master device is reserved for the CD-ROM drive.
3168
3169 For the SATA bus, the @a device parameter is not currently used and
3170 must always be @c 0.
3171
3172 The specified device slot must not have another disk attached to it, or
3173 this method will fail.
3174
3175 See <link to="IHardDisk2"/> for more detailed information about
3176 attaching hard disks.
3177
3178 <note>
3179 You cannot attach a hard disk to a running machine. Also, you cannot
3180 attach a hard disk to a newly created machine until this machine's
3181 settings are saved to disk using <link to="#saveSettings()"/>.
3182 </note>
3183 <note>
3184 If the hard disk is being attached indirectly, a new differencing hard
3185 disk will be implicitly created for it and attached instead. If the
3186 changes made to the machine settings (including this indirect
3187 attachment) are later cancelled using <link to="#discardSettings()"/>,
3188 this implicitly created differencing hard disk will be implicitly
3189 deleted.
3190 </note>
3191 </desc>
3192 <param name="id" type="uuid" dir="in">
3193 <desc>UUID of the hard disk to attach.</desc>
3194 </param>
3195 <param name="bus" type="StorageBus" dir="in">
3196 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3197 </param>
3198 <param name="channel" type="long" dir="in">
3199 <desc>Channel to attach the hard disk to.</desc>
3200 </param>
3201 <param name="device" type="long" dir="in">
3202 <desc>
3203 Device slot in the given channel to attach the hard disk to.
3204 </desc>
3205 </param>
3206 </method>
3207
3208 <method name="getHardDisk2" const="yes">
3209 <desc>
3210 Returns the virtual hard disk attached to a device slot of the specified
3211 bus.
3212
3213 Note that if the hard disk was indirectly attached by
3214 <link to="#attachHardDisk2()"/> to the given device slot then this
3215 method will return not the same object as passed to the
3216 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3217 more detailed information about attaching hard disks.
3218 </desc>
3219 <param name="bus" type="StorageBus" dir="in">
3220 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3221 </param>
3222 <param name="channel" type="long" dir="in">
3223 <desc>Channel to query.</desc>
3224 </param>
3225 <param name="device" type="long" dir="in">
3226 <desc>Device slot in the given channel to query.</desc>
3227 </param>
3228 <param name="hardDisk" type="IHardDisk2" dir="return">
3229 <desc>Attached hard disk object.</desc>
3230 </param>
3231 </method>
3232
3233 <method name="detachHardDisk2">
3234 <desc>
3235 Detaches the virtual hard disk attached to a device slot of the
3236 specified bus.
3237
3238 Detaching the hard disk from the virtual machine is deferred. This means
3239 that the hard disk remains associated with the machine when this method
3240 returns and gets actually de-associated only after a successful
3241 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3242 for more detailed information about attaching hard disks.
3243
3244 <note>
3245 You cannot detach the hard disk from a running machine.
3246 </note>
3247 <note>
3248 Detaching differencing hard disks implicitly created by <link
3249 to="#attachHardDisk2()"/> for the indirect attachment using this
3250 method will <b>not</b> implicitly delete them. The
3251 <link to="IHardDisk2::deleteStorage()"/> operation should be
3252 explicitly performed by the caller after the hard disk is successfully
3253 detached and the settings are saved with
3254 <link to="#saveSettings()"/>, if it is the desired action.
3255 </note>
3256
3257 </desc>
3258 <param name="bus" type="StorageBus" dir="in">
3259 <desc>Bus to detach the hard disk from.</desc>
3260 </param>
3261 <param name="channel" type="long" dir="in">
3262 <desc>Channel number to detach the hard disk from.</desc>
3263 </param>
3264 <param name="device" type="long" dir="in">
3265 <desc>Device slot number to detach the hard disk from.</desc>
3266 </param>
3267 </method>
3268
3269 <method name="getNetworkAdapter" const="yes">
3270 <desc>
3271 Returns the network adapter associated with the given slot.
3272 Slots are numbered sequentially, starting with zero. The total
3273 number of adapters per every machine is defined by the
3274 <link to="ISystemProperties::networkAdapterCount"/> property,
3275 so the maximum slot number is one less than that property's value.
3276 </desc>
3277 <param name="slot" type="unsigned long" dir="in"/>
3278 <param name="adapter" type="INetworkAdapter" dir="return"/>
3279 </method>
3280
3281 <method name="getSerialPort" const="yes">
3282 <desc>
3283 Returns the serial port associated with the given slot.
3284 Slots are numbered sequentially, starting with zero. The total
3285 number of serial ports per every machine is defined by the
3286 <link to="ISystemProperties::serialPortCount"/> property,
3287 so the maximum slot number is one less than that property's value.
3288 </desc>
3289 <param name="slot" type="unsigned long" dir="in"/>
3290 <param name="port" type="ISerialPort" dir="return"/>
3291 </method>
3292
3293 <method name="getParallelPort" const="yes">
3294 <desc>
3295 Returns the parallel port associated with the given slot.
3296 Slots are numbered sequentially, starting with zero. The total
3297 number of parallel ports per every machine is defined by the
3298 <link to="ISystemProperties::parallelPortCount"/> property,
3299 so the maximum slot number is one less than that property's value.
3300 </desc>
3301 <param name="slot" type="unsigned long" dir="in"/>
3302 <param name="port" type="IParallelPort" dir="return"/>
3303 </method>
3304
3305 <method name="getNextExtraDataKey">
3306 <desc>
3307 Returns the machine-specific extra data key name following the
3308 supplied key.
3309
3310 An error is returned if the supplied @a key does not exist. @c NULL is
3311 returned in @a nextKey if the supplied key is the last key. When
3312 supplying @c NULL for the @a key, the first key item is returned in @a
3313 nextKey (if there is any). @a nextValue is an optional parameter and
3314 if supplied, the next key's value is returned in it.
3315 </desc>
3316 <param name="key" type="wstring" dir="in">
3317 <desc>Name of the data key to follow.</desc>
3318 </param>
3319 <param name="nextKey" type="wstring" dir="out">
3320 <desc>Name of the next data key.</desc>
3321 </param>
3322 <param name="nextValue" type="wstring" dir="out">
3323 <desc>Value of the next data key.</desc>
3324 </param>
3325 </method>
3326
3327 <method name="getExtraData">
3328 <desc>
3329 Returns associated machine-specific extra data.
3330
3331 If the requested data @a key does not exist, this function will
3332 succeed and return @c NULL in the @a value argument.
3333 </desc>
3334 <param name="key" type="wstring" dir="in">
3335 <desc>Name of the data key to get.</desc>
3336 </param>
3337 <param name="value" type="wstring" dir="return">
3338 <desc>Value of the requested data key.</desc>
3339 </param>
3340 </method>
3341
3342 <method name="setExtraData">
3343 <desc>
3344 Sets associated machine-specific extra data.
3345
3346 If you pass @c NULL as a key @a value, the given @a key will be
3347 deleted.
3348
3349 <note>
3350 Before performing the actual data change, this method will ask all
3351 registered callbacks using the
3352 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
3353 notification for a permission. If one of the callbacks refuses the
3354 new value, the change will not be performed.
3355 </note>
3356 <note>
3357 On success, the
3358 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
3359 is called to inform all registered callbacks about a successful data
3360 change.
3361 </note>
3362 <note>
3363 This method can be called outside the machine session and therefore
3364 it's a caller's responsibility to handle possible race conditions
3365 when several clients change the same key at the same time.
3366 </note>
3367 </desc>
3368 <param name="key" type="wstring" dir="in">
3369 <desc>Name of the data key to set.</desc>
3370 </param>
3371 <param name="value" type="wstring" dir="in">
3372 <desc>Value to assign to the key.</desc>
3373 </param>
3374 </method>
3375
3376 <method name="saveSettings">
3377 <desc>
3378 Saves any changes to machine settings made since the session
3379 has been opened or a new machine has been created, or since the
3380 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
3381 For registered machines, new settings become visible to all
3382 other VirtualBox clients after successful invocation of this
3383 method.
3384 <note>
3385 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
3386 notification event after the configuration has been successfully
3387 saved (only for registered machines).
3388 </note>
3389 <note>
3390 Calling this method is only valid on instances returned
3391 by <link to="ISession::machine"/> and on new machines
3392 created by <link to="IVirtualBox::createMachine"/> but not
3393 yet registered, or on unregistered machines after calling
3394 <link to="IVirtualBox::unregisterMachine"/>.
3395 </note>
3396 </desc>
3397 </method>
3398
3399 <method name="saveSettingsWithBackup">
3400 <desc>
3401 Creates a backup copy of the machine settings file (<link
3402 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
3403 <link to="#saveSettings()"/>.
3404
3405 Note that the backup copy is created <b>only</b> if the settings file
3406 auto-conversion took place (see <link to="#settingsFileVersion"/> for
3407 details). Otherwise, this call is fully equivalent to
3408 <link to="#saveSettings()"/> and no backup copying is done.
3409
3410 The backup copy is created in the same directory where the original
3411 settings file is located. It is given the following file name:
3412 <pre>
3413 original.xml.x.y-platform.bak
3414 </pre>
3415 where <tt>original.xml</tt> is the original settings file name
3416 (excluding path), and <tt>x.y-platform</tt> is the version of the old
3417 format of the settings file (before auto-conversion).
3418
3419 If the given backup file already exists, this method will try to add the
3420 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
3421 0 to 9) and copy it again until it succeeds. If all suffixes are
3422 occupied, or if any other copy error occurs, this method will return a
3423 failure.
3424
3425 If the copy operation succeeds, the @a bakFileName return argument will
3426 receive a full path to the created backup file (for informational
3427 purposes). Note that this will happen even if the subsequent
3428 <link to="#saveSettings()"/> call performed by this method after the
3429 copy operation, fails.
3430
3431 <note>
3432 The VirtualBox API never calls this method. It is intended purely for
3433 the purposes of creating backup copies of the settings files by
3434 front-ends before saving the results of the automatically performed
3435 settings conversion to disk.
3436 </note>
3437
3438 <see>settingsFileVersion</see>
3439 </desc>
3440 <param name="bakFileName" type="wstring" dir="return">
3441 <desc>Full path to the created backup copy.</desc>
3442 </param>
3443 </method>
3444
3445 <method name="discardSettings">
3446 <desc>
3447 Discards any changes to the machine settings made since the session
3448 has been opened or since the last call to <link to="#saveSettings()"/>
3449 or <link to="#discardSettings"/>.
3450 <note>
3451 Calling this method is only valid on instances returned
3452 by <link to="ISession::machine"/> and on new machines
3453 created by <link to="IVirtualBox::createMachine"/> or
3454 opened by <link to="IVirtualBox::openMachine"/> but not
3455 yet registered, or on unregistered machines after calling
3456 <link to="IVirtualBox::unregisterMachine"/>.
3457 </note>
3458 </desc>
3459 </method>
3460
3461 <method name="deleteSettings">
3462 <desc>
3463 Deletes the settings file of this machine from disk.
3464 The machine must not be registered in order for this operation
3465 to succeed.
3466 <note>
3467 <link to="#settingsModified"/> will return TRUE after this
3468 method successfully returns.
3469 </note>
3470 <note>
3471 Calling this method is only valid on instances returned
3472 by <link to="ISession::machine"/> and on new machines
3473 created by <link to="IVirtualBox::createMachine"/> or
3474 opened by <link to="IVirtualBox::openMachine"/> but not
3475 yet registered, or on unregistered machines after calling
3476 <link to="IVirtualBox::unregisterMachine"/>.
3477 </note>
3478 <note>
3479 The deleted machine settings file can be restored (saved again)
3480 by calling <link to="#saveSettings()"/>.
3481 </note>
3482 </desc>
3483 </method>
3484
3485 <method name="getSnapshot">
3486 <desc>
3487 Returns a snapshot of this machine with the given UUID.
3488 A <tt>null</tt> UUID can be used to obtain the first snapshot
3489 taken on this machine. This is useful if you want to traverse
3490 the whole tree of snapshots starting from the root.
3491 </desc>
3492 <param name="id" type="uuid" dir="in">
3493 <desc>UUID of the snapshot to get</desc>
3494 </param>
3495 <param name="snapshot" type="ISnapshot" dir="return">
3496 <desc>Snapshot object with the given UUID.</desc>
3497 </param>
3498 </method>
3499
3500 <method name="findSnapshot">
3501 <desc>
3502 Returns a snapshot of this machine with the given name.
3503 </desc>
3504 <param name="name" type="wstring" dir="in">
3505 <desc>Name of the snapshot to find</desc>
3506 </param>
3507 <param name="snapshot" type="ISnapshot" dir="return">
3508 <desc>Snapshot object with the given name.</desc>
3509 </param>
3510 </method>
3511
3512 <method name="setCurrentSnapshot">
3513 <desc>
3514 Sets the current snapshot of this machine.
3515 <note>
3516 In the current implementation, this operation is not
3517 implemented.
3518 </note>
3519 </desc>
3520 <param name="id" type="uuid" dir="in">
3521 <desc>UUID of the snapshot to set as the current snapshot.</desc>
3522 </param>
3523 </method>
3524
3525 <method name="createSharedFolder">
3526 <desc>
3527 Creates a new permanent shared folder by associating the given logical
3528 name with the given host path, adds it to the collection of shared
3529 folders and starts sharing it. Refer to the description of
3530 <link to="ISharedFolder"/> to read more about logical names.
3531 </desc>
3532 <param name="name" type="wstring" dir="in">
3533 <desc>Unique logical name of the shared folder.</desc>
3534 </param>
3535 <param name="hostPath" type="wstring" dir="in">
3536 <desc>Full path to the shared folder in the host file system.</desc>
3537 </param>
3538 <param name="writable" type="boolean" dir="in">
3539 <desc>Whether the share is writable or readonly</desc>
3540 </param>
3541 </method>
3542
3543 <method name="removeSharedFolder">
3544 <desc>
3545 Removes the permanent shared folder with the given name previously
3546 created by <link to="#createSharedFolder"/> from the collection of
3547 shared folders and stops sharing it.
3548 </desc>
3549 <param name="name" type="wstring" dir="in">
3550 <desc>Logical name of the shared folder to remove.</desc>
3551 </param>
3552 </method>
3553
3554 <method name="canShowConsoleWindow">
3555 <desc>
3556 Returns @c true if the VM console process can activate the
3557 console window and bring it to foreground on the desktop of
3558 the host PC.
3559 <note>
3560 This method will fail if a session for this machine is not
3561 currently open.
3562 </note>
3563 </desc>
3564 <param name="canShow" type="boolean" dir="return">
3565 <desc>
3566 @c true if the console window can be shown and @c
3567 false otherwise.
3568 </desc>
3569 </param>
3570 </method>
3571
3572 <method name="showConsoleWindow">
3573 <desc>
3574 Activates the console window and brings it to foreground on
3575 the desktop of the host PC. Many modern window managers on
3576 many platforms implement some sort of focus stealing
3577 prevention logic, so that it may be impossible to activate
3578 a window without the help of the currently active
3579 application. In this case, this method will return a non-zero
3580 identifier that represents the top-level window of the VM
3581 console process. The caller, if it represents a currently
3582 active process, is responsible to use this identifier (in a
3583 platform-dependent manner) to perform actual window
3584 activation.
3585 <note>
3586 This method will fail if a session for this machine is not
3587 currently open.
3588 </note>
3589 </desc>
3590 <param name="winId" type="unsigned long long" dir="return">
3591 <desc>
3592 Platform-dependent identifier of the top-level VM console
3593 window, or zero if this method has performed all actions
3594 necessary to implement the <i>show window</i> semantics for
3595 the given platform and/or VirtualBox front-end.
3596 </desc>
3597 </param>
3598 </method>
3599
3600 <method name="getGuestProperty">
3601 <desc>
3602 Reads an entry from the machine's guest property store.
3603 </desc>
3604 <param name="name" type="wstring" dir="in">
3605 <desc>
3606 The name of the property to read.
3607 </desc>
3608 </param>
3609 <param name="value" type="wstring" dir="out">
3610 <desc>
3611 The value of the property. If the property does not exist then this
3612 will be empty.
3613 </desc>
3614 </param>
3615 <param name="timestamp" type="unsigned long long" dir="out">
3616 <desc>
3617 The time at which the property was last modified, as seen by the
3618 server process.
3619 </desc>
3620 </param>
3621 <param name="flags" type="wstring" dir="out">
3622 <desc>
3623 Additional property parameters, passed as a comma-separated list of
3624 "name=value" type entries.
3625 </desc>
3626 </param>
3627 </method>
3628
3629 <method name="getGuestPropertyValue">
3630 <desc>
3631 Reads a value from the machine's guest property store.
3632 </desc>
3633 <param name="property" type="wstring" dir="in">
3634 <desc>
3635 The name of the property to read.
3636 </desc>
3637 </param>
3638 <param name="value" type="wstring" dir="return">
3639 <desc>
3640 The value of the property. If the property does not exist then this
3641 will be empty.
3642 </desc>
3643 </param>
3644 </method>
3645
3646 <method name="getGuestPropertyTimestamp">
3647 <desc>
3648 Reads a property timestamp from the machine's guest property store.
3649 </desc>
3650 <param name="property" type="wstring" dir="in">
3651 <desc>
3652 The name of the property to read.
3653 </desc>
3654 </param>
3655 <param name="value" type="unsigned long long" dir="return">
3656 <desc>
3657 The timestamp. If the property does not exist then this will be
3658 empty.
3659 </desc>
3660 </param>
3661 </method>
3662
3663 <method name="setGuestProperty">
3664 <desc>
3665 Sets, changes or deletes an entry in the machine's guest property
3666 store.
3667 </desc>
3668 <param name="property" type="wstring" dir="in">
3669 <desc>
3670 The name of the property to set, change or delete.
3671 </desc>
3672 </param>
3673 <param name="value" type="wstring" dir="in">
3674 <desc>
3675 The new value of the property to set, change or delete. If the
3676 property does not yet exist and value is non-empty, it will be
3677 created. If the value is empty, the key will be deleted if it
3678 exists.
3679 </desc>
3680 </param>
3681 <param name="flags" type="wstring" dir="in">
3682 <desc>
3683 Additional property parameters, passed as a comma-separated list of
3684 "name=value" type entries.
3685 </desc>
3686 </param>
3687 </method>
3688
3689 <method name="setGuestPropertyValue">
3690 <desc>
3691 Sets, changes or deletes a value in the machine's guest property
3692 store. The flags field will be left unchanged or created empty for a
3693 new property.
3694 </desc>
3695 <param name="property" type="wstring" dir="in">
3696 <desc>
3697 The name of the property to set, change or delete.
3698 </desc>
3699 </param>
3700 <param name="value" type="wstring" dir="in">
3701 <desc>
3702 The new value of the property to set, change or delete. If the
3703 property does not yet exist and value is non-empty, it will be
3704 created. If value is empty, the property will be deleted if it
3705 exists.
3706 </desc>
3707 </param>
3708 </method>
3709
3710 <method name="enumerateGuestProperties">
3711 <desc>
3712 Return a list of the guest properties matching a set of patterns along
3713 with their values, time stamps and flags.
3714 </desc>
3715 <param name="patterns" type="wstring" dir="in">
3716 <desc>
3717 The patterns to match the properties against, separated by '|'
3718 characters. If this is empty or NULL, all properties will match.
3719 </desc>
3720 </param>
3721 <param name="name" type="wstring" dir="out" safearray="yes">
3722 <desc>
3723 The names of the properties returned.
3724 </desc>
3725 </param>
3726 <param name="value" type="wstring" dir="out" safearray="yes">
3727 <desc>
3728 The values of the properties returned. The array entries match the
3729 corresponding entries in the @a name array.
3730 </desc>
3731 </param>
3732 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3733 <desc>
3734 The time stamps of the properties returned. The array entries match
3735 the corresponding entries in the @a name array.
3736 </desc>
3737 </param>
3738 <param name="flags" type="wstring" dir="out" safearray="yes">
3739 <desc>
3740 The flags of the properties returned. The array entries match the
3741 corresponding entries in the @a name array.
3742 </desc>
3743 </param>
3744 </method>
3745</interface>
3746
3747 <!--
3748 // IConsole
3749 /////////////////////////////////////////////////////////////////////////
3750 -->
3751
3752 <interface
3753 name="IConsoleCallback" extends="$unknown"
3754 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
3755 wsmap="suppress"
3756 >
3757
3758 <method name="onMousePointerShapeChange">
3759 <desc>
3760 Notification when the guest mouse pointer shape has
3761 changed. The new shape data is given.
3762 </desc>
3763 <param name="visible" type="boolean" dir="in">
3764 <desc>
3765 Flag whether the pointer is visible.
3766 </desc>
3767 </param>
3768 <param name="alpha" type="boolean" dir="in">
3769 <desc>
3770 Flag whether the pointer has an alpha channel.
3771 </desc>
3772 </param>
3773 <param name="xHot" type="unsigned long" dir="in">
3774 <desc>
3775 The pointer hot spot x coordinate.
3776 </desc>
3777 </param>
3778 <param name="yHot" type="unsigned long" dir="in">
3779 <desc>
3780 The pointer hot spot y coordinate.
3781 </desc>
3782 </param>
3783 <param name="width" type="unsigned long" dir="in">
3784 <desc>
3785 Width of the pointer shape in pixels.
3786 </desc>
3787 </param>
3788 <param name="height" type="unsigned long" dir="in">
3789 <desc>
3790 Height of the pointer shape in pixels.
3791 </desc>
3792 </param>
3793 <param name="shape" type="octet" mod="ptr" dir="in">
3794 <desc>
3795 Address of the shape buffer.
3796
3797 The buffer contains 1 bpp (bits per pixel) AND mask followed by 32 bpp XOR (color) mask.
3798
3799 For pointers without alpha channel the XOR mask pixels are 32 bit values: (lsb)BGR0(msb).
3800 For pointers with alpha channel the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
3801
3802 AND mask presents for pointers with alpha channel, so if the callback does not
3803 support alpha, the pointer could be displayed as a normal color pointer.
3804
3805 The AND mask is 1 bpp bitmap with byte aligned scanlines. Size of AND mask,
3806 therefore, is <tt>cbAnd = (width + 7) / 8 * height</tt>. The padding bits at the
3807 end of any scanline are undefined.
3808
3809 The XOR mask follows the AND mask on the next 4 bytes aligned offset:
3810 <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>
3811 Bytes in the gap between the AND and the XOR mask are undefined.
3812 XOR mask scanlines have no gap between them and size of XOR mask is:
3813 <tt>cXor = width * 4 * height</tt>.
3814
3815 <note>
3816 If 'shape' is equal to 0, only pointer visibility is being changed.
3817 </note>
3818 </desc>
3819 </param>
3820 </method>
3821
3822 <method name="onMouseCapabilityChange">
3823 <desc>
3824 Notification when the mouse capabilities reported by the
3825 guest have changed. The new capabilities are passed.
3826 </desc>
3827 <param name="supportsAbsolute" type="boolean" dir="in"/>
3828 <param name="needsHostCursor" type="boolean" dir="in"/>
3829 </method>
3830
3831 <method name="onKeyboardLedsChange">
3832 <desc>
3833 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
3834 to alter the state of the keyboard LEDs.
3835 </desc>
3836 <param name="numLock" type="boolean" dir="in"/>
3837 <param name="capsLock" type="boolean" dir="in"/>
3838 <param name="scrollLock" type="boolean" dir="in"/>
3839 </method>
3840
3841 <method name="onStateChange">
3842 <desc>
3843 Notification when the execution state of the machine has changed.
3844 The new state will be given.
3845 </desc>
3846 <param name="state" type="MachineState" dir="in"/>
3847 </method>
3848
3849 <method name="onAdditionsStateChange">
3850 <desc>
3851 Notification when a Guest Additions property changes.
3852 Interested callees should query IGuest attributes to
3853 find out what has changed.
3854 </desc>
3855 </method>
3856
3857 <method name="onDVDDriveChange">
3858 <desc>
3859 Notification when a property of the
3860 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
3861 Interested callees should use IDVDDrive methods to find out what has
3862 changed.
3863 </desc>
3864 </method>
3865
3866 <method name="onFloppyDriveChange">
3867 <desc>
3868 Notification when a property of the
3869 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
3870 Interested callees should use IFloppyDrive methods to find out what
3871 has changed.
3872 </desc>
3873 </method>
3874
3875 <method name="onNetworkAdapterChange">
3876 <desc>
3877 Notification when a property of one of the
3878 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
3879 changes. Interested callees should use INetworkAdapter methods and
3880 attributes to find out what has changed.
3881 </desc>
3882 <param name="networkAdapter" type="INetworkAdapter" dir="in">
3883 <desc>Network adapter that is subject to change.</desc>
3884 </param>
3885 </method>
3886
3887 <method name="onSerialPortChange">
3888 <desc>
3889 Notification when a property of one of the
3890 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
3891 Interested callees should use ISerialPort methods and attributes
3892 to find out what has changed.
3893 </desc>
3894 <param name="serialPort" type="ISerialPort" dir="in">
3895 <desc>Serial port that is subject to change.</desc>
3896 </param>
3897 </method>
3898
3899 <method name="onParallelPortChange">
3900 <desc>
3901 Notification when a property of one of the
3902 virtual <link to="IMachine::getParallelPort">parallel ports</link>
3903 changes. Interested callees should use ISerialPort methods and
3904 attributes to find out what has changed.
3905 </desc>
3906 <param name="parallelPort" type="IParallelPort" dir="in">
3907 <desc>Parallel port that is subject to change.</desc>
3908 </param>
3909 </method>
3910
3911 <method name="onVRDPServerChange">
3912 <desc>
3913 Notification when a property of the
3914 <link to="IMachine::VRDPServer">VRDP server</link> changes.
3915 Interested callees should use IVRDPServer methods and attributes to
3916 find out what has changed.
3917 </desc>
3918 </method>
3919
3920 <method name="onUSBControllerChange">
3921 <desc>
3922 Notification when a property of the virtual
3923 <link to="IMachine::USBController">USB controller</link> changes.
3924 Interested callees should use IUSBController methods and attributes to
3925 find out what has changed.
3926 </desc>
3927 </method>
3928
3929 <method name="onUSBDeviceStateChange">
3930 <desc>
3931 Notification when a USB device is attached to or detached from
3932 the virtual USB controller.
3933
3934 This notification is sent as a result of the indirect
3935 request to attach the device because it matches one of the
3936 machine USB filters, or as a result of the direct request
3937 issued by <link to="IConsole::attachUSBDevice"/> or
3938 <link to="IConsole::detachUSBDevice"/>.
3939
3940 This notification is sent in case of both a succeeded and a
3941 failed request completion. When the request succeeds, the @a
3942 error parameter is @c null, and the given device has been
3943 already added to (when @a attached is @c true) or removed from
3944 (when @a attached is @c false) the collection represented by
3945 <link to="IConsole::USBDevices"/>. On failure, the collection
3946 doesn't change and the @a error parameter represents the error
3947 message describing the failure.
3948
3949 </desc>
3950 <param name="device" type="IUSBDevice" dir="in">
3951 <desc>Device that is subject to state change.</desc>
3952 </param>
3953 <param name="attached" type="boolean" dir="in">
3954 <desc>
3955 <tt>true</tt> if the device was attached
3956 and <tt>false</tt> otherwise.
3957 </desc>
3958 </param>
3959 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
3960 <desc>
3961 <tt>null</tt> on success or an error message object on
3962 failure.
3963 </desc>
3964 </param>
3965 </method>
3966
3967 <method name="onSharedFolderChange">
3968 <desc>
3969 Notification when a shared folder is added or removed.
3970 The @a scope argument defines one of three scopes:
3971 <link to="IVirtualBox::sharedFolders">global shared folders</link>
3972 (<link to="Scope::Global">Global</link>),
3973 <link to="IMachine::sharedFolders">permanent shared folders</link> of
3974 the machine (<link to="Scope::Machine">Machine</link>) or <link
3975 to="IConsole::sharedFolders">transient shared folders</link> of the
3976 machine (<link to="Scope::Session">Session</link>). Interested callees
3977 should use query the corresponding collections to find out what has
3978 changed.
3979 </desc>
3980 <param name="scope" type="Scope" dir="in">
3981 <desc>Scope of the notification.</desc>
3982 </param>
3983 </method>
3984
3985 <method name="onRuntimeError">
3986 <desc>
3987 Notification when an error happens during the virtual
3988 machine execution.
3989
3990 There are three kinds of runtime errors:
3991 <ul>
3992 <li><i>fatal</i></li>
3993 <li><i>non-fatal with retry</i></li>
3994 <li><i>non-fatal warnings</i></li>
3995 </ul>
3996
3997 <b>Fatal</b> errors are indicated by the @a fatal parameter set
3998 to <tt>true</tt>. In case of fatal errors, the virtual machine
3999 execution is always paused before calling this notification, and
4000 the notification handler is supposed either to immediately save
4001 the virtual machine state using <link to="IConsole::saveState()"/>
4002 or power it off using <link to="IConsole::powerDown()"/>.
4003 Resuming the execution can lead to unpredictable results.
4004
4005 <b>Non-fatal</b> errors and warnings are indicated by the
4006 @a fatal parameter set to <tt>false</tt>. If the virtual machine
4007 is in the Paused state by the time the error notification is
4008 received, it means that the user can <i>try to resume</i> the machine
4009 execution after attempting to solve the problem that caused the
4010 error. In this case, the notification handler is supposed
4011 to show an appropriate message to the user (depending on the
4012 value of the @a id parameter) that offers several actions such
4013 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
4014 wants to retry, the notification handler should continue
4015 the machine execution using the <link to="IConsole::resume()"/>
4016 call. If the machine execution is not Paused during this
4017 notification, then it means this notification is a <i>warning</i>
4018 (for example, about a fatal condition that can happen very soon);
4019 no immediate action is required from the user, the machine
4020 continues its normal execution.
4021
4022 Note that in either case the notification handler
4023 <b>must not</b> perform any action directly on a thread
4024 where this notification is called. Everything it is allowed to
4025 do is to post a message to another thread that will then talk
4026 to the user and take the corresponding action.
4027
4028 Currently, the following error identifiers are known:
4029 <ul>
4030 <li><tt>"HostMemoryLow"</tt></li>
4031 <li><tt>"HostAudioNotResponding"</tt></li>
4032 <li><tt>"VDIStorageFull"</tt></li>
4033 </ul>
4034
4035 <note>
4036 This notification is not designed to be implemented by
4037 more than one callback at a time. If you have multiple
4038 IConsoleCallback instances registered on the given
4039 IConsole object, make sure you simply do nothing but
4040 return @c S_OK from all but one of them that does actual
4041 user notification and performs necessary actions.
4042 </note>
4043
4044 </desc>
4045 <param name="fatal" type="boolean" dir="in">
4046 <desc>Whether the error is fatal or not</desc>
4047 </param>
4048 <param name="id" type="wstring" dir="in">
4049 <desc>Error identifier</desc>
4050 </param>
4051 <param name="message" type="wstring" dir="in">
4052 <desc>Optional error message</desc>
4053 </param>
4054 </method>
4055
4056 <method name="onCanShowWindow">
4057 <desc>
4058 Notification when a call to
4059 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4060 front-end to check if a subsequent call to
4061 <link to="IMachine::showConsoleWindow()"/> can succeed.
4062
4063 The callee should give an answer appropriate to the current
4064 machine state in the @a canShow argument. This answer must
4065 remain valid at least until the next
4066 <link to="IConsole::state">machine state</link> change.
4067
4068 <note>
4069 This notification is not designed to be implemented by
4070 more than one callback at a time. If you have multiple
4071 IConsoleCallback instances registered on the given
4072 IConsole object, make sure you simply do nothing but
4073 return @c true and @c S_OK from all but one of them that
4074 actually manages console window activation.
4075 </note>
4076 </desc>
4077 <param name="canShow" type="boolean" dir="return">
4078 <desc>
4079 @c true if the console window can be shown and @c
4080 false otherwise.
4081 </desc>
4082 </param>
4083 </method>
4084
4085 <method name="onShowWindow">
4086 <desc>
4087 Notification when a call to
4088 <link to="IMachine::showConsoleWindow()"/>
4089 requests the console window to be activated and brought to
4090 foreground on the desktop of the host PC.
4091
4092 This notification should cause the VM console process to
4093 perform the requested action as described above. If it is
4094 impossible to do it at a time of this notification, this
4095 method should return a failure.
4096
4097 Note that many modern window managers on many platforms
4098 implement some sort of focus stealing prevention logic, so
4099 that it may be impossible to activate a window without the
4100 help of the currently active application (which is supposedly
4101 an initiator of this notification). In this case, this method
4102 must return a non-zero identifier that represents the
4103 top-level window of the VM console process. The caller, if it
4104 represents a currently active process, is responsible to use
4105 this identifier (in a platform-dependent manner) to perform
4106 actual window activation.
4107
4108 This method must set @a winId to zero if it has performed all
4109 actions necessary to complete the request and the console
4110 window is now active and in foreground, to indicate that no
4111 further action is required on the caller's side.
4112
4113 <note>
4114 This notification is not designed to be implemented by
4115 more than one callback at a time. If you have multiple
4116 IConsoleCallback instances registered on the given
4117 IConsole object, make sure you simply do nothing but
4118 return @c S_OK from all but one of them that actually
4119 manages console window activation.
4120 </note>
4121 </desc>
4122 <param name="winId" type="unsigned long long" dir="return">
4123 <desc>
4124 Platform-dependent identifier of the top-level VM console
4125 window, or zero if this method has performed all actions
4126 necessary to implement the <i>show window</i> semantics for
4127 the given platform and/or this VirtualBox front-end.
4128 </desc>
4129 </param>
4130 </method>
4131
4132 </interface>
4133
4134 <interface
4135 name="IRemoteDisplayInfo" extends="$unknown"
4136 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4137 wsmap="struct"
4138 >
4139 <desc>
4140 Contains information about the remote display (VRDP) capabilities and status.
4141 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4142 </desc>
4143
4144 <attribute name="active" type="boolean" readonly="yes">
4145 <desc>
4146 Whether the remote display connection is active.
4147 </desc>
4148 </attribute>
4149
4150 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4151 <desc>
4152 How many times a client connected.
4153 </desc>
4154 </attribute>
4155
4156 <attribute name="beginTime" type="long long" readonly="yes">
4157 <desc>
4158 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4159 </desc>
4160 </attribute>
4161
4162 <attribute name="endTime" type="long long" readonly="yes">
4163 <desc>
4164 When the last connection was terminated or the current time, if
4165 connection is still active, in milliseconds since 1970-01-01 UTC.
4166 </desc>
4167 </attribute>
4168
4169 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4170 <desc>
4171 How many bytes were sent in last or current, if still active, connection.
4172 </desc>
4173 </attribute>
4174
4175 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4176 <desc>
4177 How many bytes were sent in all connections.
4178 </desc>
4179 </attribute>
4180
4181 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4182 <desc>
4183 How many bytes were received in last or current, if still active, connection.
4184 </desc>
4185 </attribute>
4186
4187 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4188 <desc>
4189 How many bytes were received in all connections.
4190 </desc>
4191 </attribute>
4192
4193 <attribute name="user" type="wstring" readonly="yes">
4194 <desc>
4195 Login user name supplied by the client.
4196 </desc>
4197 </attribute>
4198
4199 <attribute name="domain" type="wstring" readonly="yes">
4200 <desc>
4201 Login domain name supplied by the client.
4202 </desc>
4203 </attribute>
4204
4205 <attribute name="clientName" type="wstring" readonly="yes">
4206 <desc>
4207 The client name supplied by the client.
4208 </desc>
4209 </attribute>
4210
4211 <attribute name="clientIP" type="wstring" readonly="yes">
4212 <desc>
4213 The IP address of the client.
4214 </desc>
4215 </attribute>
4216
4217 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4218 <desc>
4219 The client software version number.
4220 </desc>
4221 </attribute>
4222
4223 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
4224 <desc>
4225 Public key exchange method used when connection was established.
4226 Values: 0 - RDP4 public key exchange scheme.
4227 1 - X509 certificates were sent to client.
4228 </desc>
4229 </attribute>
4230
4231 </interface>
4232
4233 <interface
4234 name="IConsole" extends="$unknown"
4235 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
4236 wsmap="managed"
4237 >
4238 <desc>
4239 The IConsole interface represents an interface to control virtual
4240 machine execution.
4241
4242 The console object that implements the IConsole interface is obtained
4243 from a session object after the session for the given machine has been
4244 opened using one of <link to="IVirtualBox::openSession"/>,
4245 <link to="IVirtualBox::openRemoteSession"/> or
4246 <link to="IVirtualBox::openExistingSession"/> methods.
4247
4248 Methods of the IConsole interface allow the caller to query the current
4249 virtual machine execution state, pause the machine or power it down, save
4250 the machine state or take a snapshot, attach and detach removable media
4251 and so on.
4252
4253 <see>ISession</see>
4254 </desc>
4255
4256 <attribute name="machine" type="IMachine" readonly="yes">
4257 <desc>
4258 Machine object this console is sessioned with.
4259 <note>
4260 This is a convenience property, it has the same value as
4261 <link to="ISession::machine"/> of the corresponding session
4262 object.
4263 </note>
4264 </desc>
4265 </attribute>
4266
4267 <attribute name="state" type="MachineState" readonly="yes">
4268 <desc>
4269 Current execution state of the machine.
4270 <note>
4271 This property always returns the same value as the corresponding
4272 property of the IMachine object this console is sessioned with.
4273 For the process that owns (executes) the VM, this is the
4274 preferable way of querying the VM state, because no IPC
4275 calls are made.
4276 </note>
4277 </desc>
4278 </attribute>
4279
4280 <attribute name="guest" type="IGuest" readonly="yes">
4281 <desc>Guest object.</desc>
4282 </attribute>
4283
4284 <attribute name="keyboard" type="IKeyboard" readonly="yes">
4285 <desc>
4286 Virtual keyboard object.
4287 <note>
4288 If the machine is not running, any attempt to use
4289 the returned object will result in an error.
4290 </note>
4291 </desc>
4292 </attribute>
4293
4294 <attribute name="mouse" type="IMouse" readonly="yes">
4295 <desc>
4296 Virtual mouse object.
4297 <note>
4298 If the machine is not running, any attempt to use
4299 the returned object will result in an error.
4300 </note>
4301 </desc>
4302 </attribute>
4303
4304 <attribute name="display" type="IDisplay" readonly="yes">
4305 <desc>Virtual display object.
4306 <note>
4307 If the machine is not running, any attempt to use
4308 the returned object will result in an error.
4309 </note>
4310 </desc>
4311 </attribute>
4312
4313 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
4314 <desc>Debugging interface.</desc>
4315 </attribute>
4316
4317 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
4318 <desc>
4319 Collection of USB devices currently attached to the virtual
4320 USB controller.
4321 <note>
4322 The collection is empty if the machine is not running.
4323 </note>
4324 </desc>
4325 </attribute>
4326
4327 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
4328 <desc>
4329 List of USB devices currently attached to the remote VRDP client.
4330 Once a new device is physically attached to the remote host computer,
4331 it appears in this list and remains there until detached.
4332 </desc>
4333 </attribute>
4334
4335 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4336 <desc>
4337 Collection of shared folders for the current session. These folders
4338 are called transient shared folders because they are available to the
4339 guest OS running inside the associated virtual machine only for the
4340 duration of the session (as opposed to
4341 <link to="IMachine::sharedFolders"/> which represent permanent shared
4342 folders). When the session is closed (e.g. the machine is powered down),
4343 these folders are automatically discarded.
4344
4345 New shared folders are added to the collection using
4346 <link to="#createSharedFolder"/>. Existing shared folders can be
4347 removed using <link to="#removeSharedFolder"/>.
4348 </desc>
4349 </attribute>
4350
4351 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
4352 <desc>
4353 Interface that provides information on Remote Display (VRDP) connection.
4354 </desc>
4355 </attribute>
4356
4357 <method name="powerUp">
4358 <desc>
4359 Starts the virtual machine execution using the current machine
4360 state (i.e. its current execution state, current settings and
4361 current hard disks).
4362
4363 If the machine is powered off or aborted, the execution will
4364 start from the beginning (as if the real hardware were just
4365 powered on).
4366
4367 If the machine is in the <link to="MachineState::Saved"/> state,
4368 it will continue its execution the point where the state has
4369 been saved.
4370
4371 <note>
4372 Unless you are trying to write a new VirtualBox front-end that
4373 performs direct machine execution (like the VirtualBox or VBoxSDL
4374 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
4375 session opened by <link to="IVirtualBox::openSession"/> and use this
4376 session only to change virtual machine settings. If you simply want to
4377 start virtual machine execution using one of the existing front-ends
4378 (for example the VirtualBox GUI or headless server), simply use
4379 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
4380 power up the machine automatically for you.
4381 </note>
4382
4383 <see>#saveState</see>
4384 </desc>
4385 <param name="progress" type="IProgress" dir="return">
4386 <desc>Progress object to track the operation completion.</desc>
4387 </param>
4388 </method>
4389
4390 <method name="powerUpPaused">
4391 <desc>
4392 Identical to powerUp except that the VM will enter the
4393 <link to="MachineState::Paused"/> state, instead of
4394 <link to="MachineState::Running"/>.
4395
4396 <see>#powerUp</see>
4397 </desc>
4398 <param name="progress" type="IProgress" dir="return">
4399 <desc>Progress object to track the operation completion.</desc>
4400 </param>
4401 </method>
4402
4403 <method name="powerDown">
4404 <desc>
4405 Stops the virtual machine execution.
4406 After this operation completes, the machine will go to the
4407 PoweredOff state.
4408
4409 @deprecated This method will be removed in VirtualBox 2.1 where the
4410 powerDownAsync() method will take its name. Do not use this method in
4411 the code.
4412 </desc>
4413 </method>
4414
4415 <method name="powerDownAsync">
4416 <desc>
4417 Initiates the power down procedure to stop the virtual machine
4418 execution.
4419
4420 The completion of the power down procedure is tracked using the returned
4421 IProgress object. After the operation is complete, the machine will go
4422 to the PoweredOff state.
4423
4424 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
4425 where the original powerDown() method will be removed. You will need to
4426 rename "powerDownAsync" to "powerDown" in your sources to make them
4427 build with version 2.1.
4428 </desc>
4429 <param name="progress" type="IProgress" dir="return">
4430 <desc>Progress object to track the operation completion.</desc>
4431 </param>
4432 </method>
4433
4434 <method name="reset">
4435 <desc>Resets the virtual machine.</desc>
4436 </method>
4437
4438 <method name="pause">
4439 <desc>Pauses the virtual machine execution.</desc>
4440 </method>
4441
4442 <method name="resume">
4443 <desc>Resumes the virtual machine execution.</desc>
4444 </method>
4445
4446 <method name="powerButton">
4447 <desc>Send the ACPI power button event to the guest.</desc>
4448 </method>
4449
4450 <method name="sleepButton">
4451 <desc>Send the ACPI sleep button event to the guest.</desc>
4452 </method>
4453
4454 <method name="getPowerButtonHandled">
4455 <desc>Check if the last power button event was handled by guest.</desc>
4456 <param name="handled" type="boolean" dir="return"/>
4457 </method>
4458
4459 <method name="getGuestEnteredACPIMode">
4460 <desc>Check if the guest entered the ACPI mode G0 (working) or
4461 G1 (sleeping). If this method returns false, the guest will
4462 most likely not respond to external ACPI events.</desc>
4463 <param name="entered" type="boolean" dir="return"/>
4464 </method>
4465
4466 <method name="saveState">
4467 <desc>
4468 Saves the current execution state of a running virtual machine
4469 and stops its execution.
4470
4471 After this operation completes, the machine will go to the
4472 Saved state. Next time it is powered up, this state will
4473 be restored and the machine will continue its execution from
4474 the place where it was saved.
4475
4476 This operation differs from taking a snapshot to the effect
4477 that it doesn't create new differencing hard disks. Also, once
4478 the machine is powered up from the state saved using this method,
4479 the saved state is deleted, so it will be impossible to return
4480 to this state later.
4481
4482 <note>
4483 On success, this method implicitly calls
4484 <link to="IMachine::saveSettings()"/> to save all current machine
4485 settings (including runtime changes to the DVD drive, etc.).
4486 Together with the impossibility to change any VM settings when it is
4487 in the Saved state, this guarantees the adequate hardware
4488 configuration of the machine when it is restored from the saved
4489 state file.
4490 </note>
4491
4492 <note>
4493 The machine must be in the Running or Paused state, otherwise
4494 the operation will fail.
4495 </note>
4496
4497 <see><link to="#takeSnapshot"/></see>
4498 </desc>
4499 <param name="progress" type="IProgress" dir="return">
4500 <desc>Progress object to track the operation completion.</desc>
4501 </param>
4502 </method>
4503
4504 <method name="adoptSavedState">
4505 <desc>
4506 Associates the given saved state file to the virtual machine.
4507
4508 On success, the machine will go to the Saved state. Next time it is
4509 powered up, it will be restored from the adopted saved state and
4510 continue execution from the place where the saved state file was
4511 created.
4512
4513 The specified saved state file path may be full or relative to the
4514 folder the VM normally saves the state to (usually,
4515 <link to="IMachine::snapshotFolder"/>).
4516
4517 <note>
4518 It's a caller's responsibility to make sure the given saved state
4519 file is compatible with the settings of this virtual machine that
4520 represent its virtual hardware (memory size, hard disk configuration
4521 etc.). If there is a mismatch, the behavior of the virtual machine
4522 is undefined.
4523 </note>
4524 </desc>
4525 <param name="savedStateFile" type="wstring" dir="in">
4526 <desc>Path to the saved state file to adopt.</desc>
4527 </param>
4528 </method>
4529
4530 <method name="discardSavedState">
4531 <desc>
4532 Discards (deletes) the saved state of the virtual machine
4533 previously created by <link to="#saveState"/>. Next time the
4534 machine is powered up, a clean boot will occur.
4535 <note>
4536 This operation is equivalent to resetting or powering off
4537 the machine without doing a proper shutdown in the guest OS.
4538 </note>
4539 </desc>
4540 </method>
4541
4542 <method name="getDeviceActivity">
4543 <desc>
4544 Gets the current activity type of a given device or device group.
4545 </desc>
4546 <param name="type" type="DeviceType" dir="in"/>
4547 <param name="activity" type="DeviceActivity" dir="return"/>
4548 </method>
4549
4550 <method name="attachUSBDevice">
4551 <desc>
4552 Attaches a host USB device with the given UUID to the
4553 USB controller of the virtual machine.
4554
4555 The device needs to be in one of the following states:
4556 <link to="USBDeviceState::Busy">Busy</link>,
4557 <link to="USBDeviceState::Available">Available</link> or
4558 <link to="USBDeviceState::Held">Held</link>,
4559 otherwise an error is immediately returned.
4560
4561 When the device state is
4562 <link to="USBDeviceState::Busy">Busy</link>, an error may also
4563 be returned if the host computer refuses to release it for some reason.
4564
4565 <see>IUSBController::deviceFilters, USBDeviceState</see>
4566 </desc>
4567 <param name="id" type="uuid" dir="in">
4568 <desc>UUID of the host USB device to attach.</desc>
4569 </param>
4570 </method>
4571
4572 <method name="detachUSBDevice">
4573 <desc>
4574 Detaches an USB device with the given UUID from the USB controller
4575 of the virtual machine.
4576
4577 After this method succeeds, the VirtualBox server re-initiates
4578 all USB filters as if the device were just physically attached
4579 to the host, but filters of this machine are ignored to avoid
4580 a possible automatic re-attachment.
4581
4582 <see>IUSBController::deviceFilters, USBDeviceState</see>
4583 </desc>
4584 <param name="id" type="uuid" dir="in">
4585 <desc>UUID of the USB device to detach.</desc>
4586 </param>
4587 <param name="device" type="IUSBDevice" dir="return">
4588 <desc>Detached USB device.</desc>
4589 </param>
4590 </method>
4591
4592 <method name="createSharedFolder">
4593 <desc>
4594 Creates a transient new shared folder by associating the given logical
4595 name with the given host path, adds it to the collection of shared
4596 folders and starts sharing it. Refer to the description of
4597 <link to="ISharedFolder"/> to read more about logical names.
4598 </desc>
4599 <param name="name" type="wstring" dir="in">
4600 <desc>Unique logical name of the shared folder.</desc>
4601 </param>
4602 <param name="hostPath" type="wstring" dir="in">
4603 <desc>Full path to the shared folder in the host file system.</desc>
4604 </param>
4605 <param name="writable" type="boolean" dir="in">
4606 <desc>Whether the share is writable or readonly</desc>
4607 </param>
4608 </method>
4609
4610 <method name="removeSharedFolder">
4611 <desc>
4612 Removes a transient shared folder with the given name previously
4613 created by <link to="#createSharedFolder"/> from the collection of
4614 shared folders and stops sharing it.
4615 </desc>
4616 <param name="name" type="wstring" dir="in">
4617 <desc>Logical name of the shared folder to remove.</desc>
4618 </param>
4619 </method>
4620
4621 <method name="takeSnapshot">
4622 <desc>
4623 Saves the current execution state and all settings of the
4624 machine and creates differencing images for all
4625 normal (non-independent) hard disks.
4626
4627 This method can be called for a PoweredOff, Saved, Running or
4628 Paused virtual machine. When the machine is PoweredOff, an
4629 offline <link to="ISnapshot">snapshot</link> is created,
4630 in all other cases -- an online snapshot.
4631
4632 The taken snapshot is always based on the
4633 <link to="IMachine::currentSnapshot">current
4634 snapshot</link> of the associated virtual machine and becomes
4635 a new current snapshot.
4636
4637 <note>
4638 This method implicitly calls <link to="IMachine::saveSettings()"/> to
4639 save all current machine settings before taking an offline snapshot.
4640 </note>
4641
4642 <see>ISnapshot, <link to="#saveState"/></see>
4643 </desc>
4644 <param name="name" type="wstring" dir="in">
4645 <desc>Short name for the snapshot.</desc>
4646 </param>
4647 <param name="description" type="wstring" dir="in">
4648 <desc>Optional description of the snapshot.</desc>
4649 </param>
4650 <param name="progress" type="IProgress" dir="return">
4651 <desc>Progress object to track the operation completion.</desc>
4652 </param>
4653 </method>
4654
4655 <method name="discardSnapshot">
4656 <desc>
4657
4658 Starts discarding the specified snapshot. The execution state
4659 and settings of the associated machine stored in the snapshot
4660 will be deleted. The contents of all differencing hard disks of
4661 this snapshot will be merged with the contents of their
4662 dependent child hard disks to keep the, disks valid (in other
4663 words, all changes represented by hard disks being discarded
4664 will be propagated to their child hard disks). After that, this
4665 snapshot's differencing hard disks will be deleted. The parent
4666 of this snapshot will become a new parent for all its child
4667 snapshots.
4668
4669 If the discarded snapshot is the current one, its parent
4670 snapshot will become a new current snapshot. The current machine
4671 state is not directly affected in this case, except that
4672 currently attached differencing hard disks based on hard disks
4673 of the discarded snapshot will be also merged as described
4674 above.
4675
4676 If the discarded snapshot is the first one (the root snapshot)
4677 and it has exactly one child snapshot, this child snapshot will
4678 become the first snapshot after discarding. If there are no
4679 children at all (i.e. the first snapshot is the only snapshot of
4680 the machine), both the current and the first snapshot of the
4681 machine will be set to null. In all other cases, the first
4682 snapshot cannot be discarded.
4683
4684 You cannot discard the snapshot if it
4685 stores <link to="HardDiskType::Normal">normal</link> (non-differencing)
4686 hard disks that have differencing hard disks based on them. Snapshots of
4687 such kind can be discarded only when every normal hard disk has either
4688 no children at all or exactly one child. In the former case, the normal
4689 hard disk simply becomes unused (i.e. not attached to any VM). In the
4690 latter case, it receives all the changes stored in the child hard disk,
4691 and then it replaces the child hard disk in the configuration of the
4692 corresponding snapshot or machine.
4693
4694 Also, you cannot discard the snapshot if it stores hard disks
4695 (of any type) having differencing child hard disks that belong
4696 to other machines. Such snapshots can be only discarded after
4697 you discard all snapshots of other machines containing "foreign"
4698 child disks, or detach these "foreign" child disks from machines
4699 they are attached to.
4700
4701 One particular example of the snapshot storing normal hard disks
4702 is the first snapshot of a virtual machine that had normal hard
4703 disks attached when taking the snapshot. Be careful when
4704 discarding such snapshots because this implicitly commits
4705 changes (made since the snapshot being discarded has been taken)
4706 to normal hard disks (as described above), which may be not what
4707 you want.
4708
4709 The virtual machine is put to
4710 the <link to="MachineState::Discarding">Discarding</link> state until
4711 the discard operation is completed.
4712
4713 <note>
4714 The machine must not be running, otherwise the operation
4715 will fail.
4716 </note>
4717
4718 <note>
4719 Child hard disks of all normal hard disks of the discarded snapshot
4720 must be accessible (see <link to="IMedium::state"/>) for this
4721 operation to succeed. In particular, this means that all virtual
4722 machines, whose hard disks are directly or indirectly based on the
4723 hard disks of discarded snapshot, must be powered off.
4724 </note>
4725 <note>
4726 Merging hard disk contents can be very time and disk space
4727 consuming, if these disks are big in size and have many
4728 children. However, if the snapshot being discarded is the last
4729 (head) snapshot on the branch, the operation will be rather
4730 quick.
4731 </note>
4732 <note>
4733 Note that discarding the current snapshot
4734 will implicitly call <link to="IMachine::saveSettings()"/> to
4735 make all current machine settings permanent.
4736 </note>
4737 </desc>
4738 <param name="id" type="uuid" dir="in">
4739 <desc>UUID of the snapshot to discard.</desc>
4740 </param>
4741 <param name="progress" type="IProgress" dir="return">
4742 <desc>Progress object to track the operation completion.</desc>
4743 </param>
4744 </method>
4745
4746 <method name="discardCurrentState">
4747 <desc>
4748 This operation is similar to <link to="#discardSnapshot()"/> but
4749 affects the current machine state. This means that the state stored in
4750 the current snapshot will become a new current state, and all current
4751 settings of the machine and changes stored in differencing hard disks
4752 will be lost.
4753
4754 After this operation is successfully completed, new empty differencing
4755 hard disks are created for all normal hard disks of the machine.
4756
4757 If the current snapshot of the machine is an online snapshot, the
4758 machine will go to the <link to="MachineState::Saved"> saved
4759 state</link>, so that the next time it is powered on, the execution
4760 state will be restored from the current snapshot.
4761
4762 <note>
4763 The machine must not be running, otherwise the operation will fail.
4764 </note>
4765
4766 <note>
4767 If the machine state is <link to="MachineState::Saved">Saved</link>
4768 prior to this operation, the saved state file will be implicitly
4769 discarded (as if <link to="IConsole::discardSavedState()"/> were
4770 called).
4771 </note>
4772
4773 </desc>
4774 <param name="progress" type="IProgress" dir="return">
4775 <desc>Progress object to track the operation completion.</desc>
4776 </param>
4777 </method>
4778
4779 <method name="discardCurrentSnapshotAndState">
4780 <desc>
4781
4782 This method is equivalent to
4783 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
4784 (currentSnapshot.id(), progress) followed by
4785 <link to="#discardCurrentState()"/>.
4786
4787 As a result, the machine will be fully restored from the
4788 snapshot preceding the current snapshot, while both the current
4789 snapshot and the current machine state will be discarded.
4790
4791 If the current snapshot is the first snapshot of the machine (i.e. it
4792 has the only snapshot), the current machine state will be
4793 discarded <b>before</b> discarding the snapshot. In other words, the
4794 machine will be restored from its last snapshot, before discarding
4795 it. This differs from performing a single
4796 <link to="#discardSnapshot()"/> call (note that no
4797 <link to="#discardCurrentState()"/> will be possible after it)
4798 to the effect that the latter will preserve the current state instead of
4799 discarding it.
4800
4801 Unless explicitly mentioned otherwise, all remarks and
4802 limitations of the above two methods also apply to this method.
4803
4804 <note>
4805 The machine must not be running, otherwise the operation
4806 will fail.
4807 </note>
4808
4809 <note>
4810 If the machine state is <link to="MachineState::Saved">Saved</link>
4811 prior to this operation, the saved state file will be implicitly
4812 discarded (as if <link to="#discardSavedState()"/> were
4813 called).
4814 </note>
4815
4816 <note>
4817 This method is more efficient than calling two above
4818 methods separately: it requires less IPC calls and provides
4819 a single progress object.
4820 </note>
4821
4822 </desc>
4823 <param name="progress" type="IProgress" dir="return">
4824 <desc>Progress object to track the operation completion.</desc>
4825 </param>
4826 </method>
4827
4828 <method name="registerCallback">
4829 <desc>
4830 Registers a new console callback on this instance. The methods of the
4831 callback interface will be called by this instance when the appropriate
4832 event occurs.
4833 </desc>
4834 <param name="callback" type="IConsoleCallback" dir="in"/>
4835 </method>
4836
4837 <method name="unregisterCallback">
4838 <desc>
4839 Unregisters the console callback previously registered using
4840 <link to="#registerCallback"/>.
4841 </desc>
4842 <param name="callback" type="IConsoleCallback" dir="in"/>
4843 </method>
4844 </interface>
4845
4846 <!--
4847 // IHost
4848 /////////////////////////////////////////////////////////////////////////
4849 -->
4850
4851 <interface
4852 name="IHostDVDDrive" extends="$unknown"
4853 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
4854 wsmap="managed"
4855 >
4856 <desc>
4857 The IHostDVDDrive interface represents the physical CD/DVD drive
4858 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
4859 </desc>
4860
4861 <attribute name="name" type="wstring" readonly="yes">
4862 <desc>
4863 Returns the platform-specific device identifier.
4864 On DOS-like platforms, it is a drive name (e.g. R:).
4865 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
4866 </desc>
4867 </attribute>
4868 <attribute name="description" type="wstring" readonly="yes">
4869 <desc>
4870 Returns a human readable description for the drive. This
4871 description usually contains the product and vendor name. A
4872 @c null string is returned if the description is not available.
4873 </desc>
4874 </attribute>
4875 <attribute name="udi" type="wstring" readonly="yes">
4876 <desc>
4877 Returns the unique device identifier for the drive. This
4878 attribute is reserved for future use instead of
4879 <link to="#name"/>. Currently it is not used and may return
4880 @c null on some platforms.
4881 </desc>
4882 </attribute>
4883
4884 </interface>
4885
4886 <enumerator
4887 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
4888 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
4889 />
4890
4891 <collection
4892 name="IHostDVDDriveCollection" type="IHostDVDDrive"
4893 enumerator="IHostDVDDriveEnumerator"
4894 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
4895 readonly="yes"
4896 >
4897 <method name="findByName">
4898 <desc>
4899 Searches this collection for a host drive with the given name.
4900 <note>
4901 The method returns an error if the given name does not
4902 correspond to any host drive in the collection.
4903 </note>
4904 </desc>
4905 <param name="name" type="wstring" dir="in">
4906 <desc>Name of the host drive to search for</desc>
4907 </param>
4908 <param name="drive" type="IHostDVDDrive" dir="return">
4909 <desc>Found host drive object</desc>
4910 </param>
4911 </method>
4912 </collection>
4913
4914 <interface
4915 name="IHostFloppyDrive" extends="$unknown"
4916 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
4917 wsmap="managed"
4918 >
4919 <desc>
4920 The IHostFloppyDrive interface represents the physical floppy drive
4921 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
4922 </desc>
4923 <attribute name="name" type="wstring" readonly="yes">
4924 <desc>
4925 Returns the platform-specific device identifier.
4926 On DOS-like platforms, it is a drive name (e.g. A:).
4927 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
4928 </desc>
4929 </attribute>
4930 <attribute name="description" type="wstring" readonly="yes">
4931 <desc>
4932 Returns a human readable description for the drive. This
4933 description usually contains the product and vendor name. A
4934 @c null string is returned if the description is not available.
4935 </desc>
4936 </attribute>
4937 <attribute name="udi" type="wstring" readonly="yes">
4938 <desc>
4939 Returns the unique device identifier for the drive. This
4940 attribute is reserved for future use instead of
4941 <link to="#name"/>. Currently it is not used and may return
4942 @c null on some platforms.
4943 </desc>
4944 </attribute>
4945 </interface>
4946
4947 <enumerator
4948 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
4949 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
4950 />
4951
4952 <collection
4953 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
4954 enumerator="IHostFloppyDriveEnumerator"
4955 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
4956 readonly="yes"
4957 >
4958 <method name="findByName">
4959 <desc>
4960 Searches this collection for a host drive with the given name.
4961 <note>
4962 The method returns an error if the given name does not
4963 correspond to any host drive in the collection.
4964 </note>
4965 </desc>
4966 <param name="name" type="wstring" dir="in">
4967 <desc>Name of the host drive to search for</desc>
4968 </param>
4969 <param name="drive" type="IHostFloppyDrive" dir="return">
4970 <desc>Found host drive object</desc>
4971 </param>
4972 </method>
4973 </collection>
4974
4975 <interface
4976 name="IHostNetworkInterface" extends="$unknown"
4977 uuid="F4512D7C-B074-4e97-99B8-6D2BD27C3F5A"
4978 wsmap="managed"
4979 >
4980 <attribute name="name" type="wstring" readonly="yes">
4981 <desc>Returns the host network interface name.</desc>
4982 </attribute>
4983
4984 <attribute name="id" type="uuid" readonly="yes">
4985 <desc>Returns the interface UUID.</desc>
4986 </attribute>
4987 </interface>
4988
4989 <enumerator
4990 name="IHostNetworkInterfaceEnumerator" type="IHostNetworkInterface"
4991 uuid="7B52FEF7-56E8-4aec-92F5-15E6D11EC630"
4992 />
4993
4994 <collection
4995 name="IHostNetworkInterfaceCollection" type="IHostNetworkInterface"
4996 enumerator="IHostNetworkInterfaceEnumerator"
4997 uuid="BF1D41F2-B97B-4314-A0FB-D4823AF42FB5"
4998 readonly="yes"
4999 >
5000 <method name="findByName">
5001 <desc>
5002 Searches this collection for a host network interface with the given name.
5003 <note>
5004 The method returns an error if the given name does not
5005 correspond to any host network interface in the collection.
5006 </note>
5007 </desc>
5008 <param name="name" type="wstring" dir="in">
5009 <desc>Name of the host network interface to search for.</desc>
5010 </param>
5011 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5012 <desc>Found host network interface object.</desc>
5013 </param>
5014 </method>
5015 <method name="findById">
5016 <desc>
5017 Searches this collection for a host network interface with the given GUID.
5018 <note>
5019 The method returns an error if the given GUID does not
5020 correspond to any host network interface in the collection.
5021 </note>
5022 </desc>
5023 <param name="id" type="uuid" dir="in">
5024 <desc>GUID of the host network interface to search for.</desc>
5025 </param>
5026 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5027 <desc>Found host network interface object.</desc>
5028 </param>
5029 </method>
5030 </collection>
5031
5032 <interface
5033 name="IHost" extends="$unknown"
5034 uuid="489fb370-c227-4d43-9761-ceb28484fd9f"
5035 wsmap="managed"
5036 >
5037 <desc>
5038 The IHost interface represents the physical machine that this VirtualBox
5039 installation runs on.
5040
5041 An object implementing this interface is returned by the
5042 <link to="IVirtualBox::host" /> attribute. This interface contains
5043 read-only information about the host's physical hardware (such as what
5044 processors, and disks are available, what the host operating system is,
5045 and so on) and also allows for manipulating some of the host's hardware,
5046 such as global USB device filters and host interface networking.
5047
5048 </desc>
5049 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
5050 <desc>List of DVD drives available on the host.</desc>
5051 </attribute>
5052
5053 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
5054 <desc>List of floppy drives available on the host.</desc>
5055 </attribute>
5056
5057 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5058 <desc>
5059 List of USB devices currently attached to the host.
5060 Once a new device is physically attached to the host computer,
5061 it appears in this list and remains there until detached.
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 </desc>
5071 </attribute>
5072
5073 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
5074 <desc>
5075 List of USB device filters in action.
5076 When a new device is physically attached to the host computer,
5077 filters from this list are applied to it (in order they are stored
5078 in the list). The first matched filter will determine the
5079 <link to="IHostUSBDeviceFilter::action">action</link>
5080 performed on the device.
5081
5082 Unless the device is ignored by these filters, filters of all
5083 currently running virtual machines
5084 (<link to="IUSBController::deviceFilters"/>) are applied to it.
5085
5086 <note>
5087 This method may set a @ref com_warnings "warning result code".
5088 </note>
5089 <note>
5090 If USB functionality is not available in the given edition of
5091 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5092 </note>
5093
5094 <see>IHostUSBDeviceFilter, USBDeviceState</see>
5095 </desc>
5096 </attribute>
5097
5098 <attribute name="networkInterfaces" type="IHostNetworkInterfaceCollection" readonly="yes">
5099 <desc>List of host network interfaces currently defined on the host.</desc>
5100 </attribute>
5101
5102 <attribute name="processorCount" type="unsigned long" readonly="yes">
5103 <desc>Number of (logical) CPUs installed in the host system.</desc>
5104 </attribute>
5105
5106 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
5107 <desc>Number of (logical) CPUs online in the host system.</desc>
5108 </attribute>
5109
5110 <method name="getProcessorSpeed">
5111 <desc>Query the (approximate) maximum speed of a specified host CPU in Megahertz.</desc>
5112 <param name="cpuId" type="unsigned long" dir="in">
5113 <desc>
5114 Identifier of the CPU.
5115 </desc>
5116 </param>
5117 <param name="speed" type="unsigned long" dir="return">
5118 <desc>
5119 Speed value. 0 is returned if value is not known or @a cpuId is
5120 invalid.
5121 </desc>
5122 </param>
5123 </method>
5124
5125 <method name="getProcessorDescription">
5126 <desc>Query the model string of a specified host CPU.</desc>
5127 <param name="cpuId" type="unsigned long" dir="in">
5128 <desc>
5129 Identifier of the CPU.
5130 </desc>
5131 </param>
5132 <param name="description" type="wstring" dir="return">
5133 <desc>
5134 Model string. A NULL string is returned if value is not known or
5135 @a cpuId is invalid.
5136 </desc>
5137 </param>
5138 </method>
5139
5140 <attribute name="memorySize" type="unsigned long" readonly="yes">
5141 <desc>Amount of system memory in megabytes installed in the host system.</desc>
5142 </attribute>
5143
5144 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
5145 <desc>Available system memory in the host system.</desc>
5146 </attribute>
5147
5148 <attribute name="operatingSystem" type="wstring" readonly="yes">
5149 <desc>Name of the host system's operating system.</desc>
5150 </attribute>
5151
5152 <attribute name="OSVersion" type="wstring" readonly="yes">
5153 <desc>Host operating system's version string.</desc>
5154 </attribute>
5155
5156 <attribute name="UTCTime" type="long long" readonly="yes">
5157 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
5158 </attribute>
5159
5160<if target="midl">
5161 <method name="createHostNetworkInterface">
5162 <desc>
5163 Creates a new adapter for Host Interface Networking.
5164 </desc>
5165 <param name="name" type="wstring" dir="in">
5166 <desc>
5167 Adapter name.
5168 </desc>
5169 </param>
5170 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5171 <desc>
5172 Created host interface object.
5173 </desc>
5174 </param>
5175 <param name="progress" type="IProgress" dir="return">
5176 <desc>
5177 Progress object to track the operation completion.
5178 </desc>
5179 </param>
5180 </method>
5181 <method name="removeHostNetworkInterface">
5182 <desc>
5183 Removes the given host network interface.
5184 </desc>
5185 <param name="id" type="uuid" dir="in">
5186 <desc>
5187 Adapter GUID.
5188 </desc>
5189 </param>
5190 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
5191 <desc>
5192 Removed host interface object.
5193 </desc>
5194 </param>
5195 <param name="progress" type="IProgress" dir="return">
5196 <desc>
5197 Progress object to track the operation completion.
5198 </desc>
5199 </param>
5200 </method>
5201</if>
5202
5203 <method name="createUSBDeviceFilter">
5204 <desc>
5205 Creates a new USB device filter. All attributes except
5206 the filter name are set to <tt>null</tt> (any match),
5207 <i>active</i> is <tt>false</tt> (the filter is not active).
5208
5209 The created filter can be added to the list of filters using
5210 <link to="#insertUSBDeviceFilter()"/>.
5211
5212 <see>#USBDeviceFilters</see>
5213 </desc>
5214 <param name="name" type="wstring" dir="in">
5215 <desc>
5216 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
5217 for more info.
5218 </desc>
5219 </param>
5220 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5221 <desc>Created filter object.</desc>
5222 </param>
5223 </method>
5224
5225 <method name="insertUSBDeviceFilter">
5226 <desc>
5227 Inserts the given USB device to the specified position
5228 in the list of filters.
5229
5230 Positions are numbered starting from <tt>0</tt>. If the specified
5231 position is equal to or greater than the number of elements in
5232 the list, the filter is added to the end of the collection.
5233
5234 <note>
5235 Duplicates are not allowed, so an attempt to insert a
5236 filter that is already in the list, will return an
5237 error.
5238 </note>
5239 <note>
5240 This method may set a @ref com_warnings "warning result code".
5241 </note>
5242 <note>
5243 If USB functionality is not available in the given edition of
5244 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5245 </note>
5246
5247 <see>#USBDeviceFilters</see>
5248 </desc>
5249 <param name="position" type="unsigned long" dir="in">
5250 <desc>Position to insert the filter to.</desc>
5251 </param>
5252 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
5253 <desc>USB device filter to insert.</desc>
5254 </param>
5255 </method>
5256
5257 <method name="removeUSBDeviceFilter">
5258 <desc>
5259 Removes a USB device filter from the specified position in the
5260 list of filters.
5261
5262 Positions are numbered starting from <tt>0</tt>. Specifying a
5263 position equal to or greater than the number of elements in
5264 the list will produce an error.
5265
5266 <note>
5267 This method may set a @ref com_warnings "warning result code".
5268 </note>
5269 <note>
5270 If USB functionality is not available in the given edition of
5271 VirtualBox, this method will set the result code to @c E_NOTIMPL.
5272 </note>
5273
5274 <see>#USBDeviceFilters</see>
5275 </desc>
5276 <param name="position" type="unsigned long" dir="in">
5277 <desc>Position to remove the filter from.</desc>
5278 </param>
5279 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
5280 <desc>Removed USB device filter.</desc>
5281 </param>
5282 </method>
5283
5284 </interface>
5285
5286 <!--
5287 // ISystemProperties
5288 /////////////////////////////////////////////////////////////////////////
5289 -->
5290
5291 <interface
5292 name="ISystemProperties"
5293 extends="$unknown"
5294 uuid="604afeba-5963-4d12-a577-902ffb96352a"
5295 wsmap="managed"
5296 >
5297 <desc>
5298 The ISystemProperties interface represents global properties of the given
5299 VirtualBox installation.
5300
5301 These properties define limits and default values for various attributes
5302 and parameters. Most of the properties are read-only, but some can be
5303 changed by a user.
5304 </desc>
5305
5306 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
5307 <desc>Minimum guest system memory in Megabytes.</desc>
5308 </attribute>
5309
5310 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
5311 <desc>Maximum guest system memory in Megabytes.</desc>
5312 </attribute>
5313
5314 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
5315 <desc>Minimum guest video memory in Megabytes.</desc>
5316 </attribute>
5317
5318 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
5319 <desc>Maximum guest video memory in Megabytes.</desc>
5320 </attribute>
5321
5322 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
5323 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
5324 </attribute>
5325
5326 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
5327 <desc>
5328 Number of network adapters associated with every
5329 <link to="IMachine"/> instance.
5330 </desc>
5331 </attribute>
5332
5333 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
5334 <desc>
5335 Number of serial ports associated with every
5336 <link to="IMachine"/> instance.
5337 </desc>
5338 </attribute>
5339
5340 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
5341 <desc>
5342 Number of parallel ports associated with every
5343 <link to="IMachine"/> instance.
5344 </desc>
5345 </attribute>
5346
5347 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
5348 <desc>
5349 Maximum device position in the boot order. This value corresponds
5350 to the total number of devices a machine can boot from, to make it
5351 possible to include all possible devices to the boot list.
5352 <see><link to="IMachine::setBootOrder()"/></see>
5353 </desc>
5354 </attribute>
5355
5356 <attribute name="defaultMachineFolder" type="wstring">
5357 <desc>
5358 Full path to the default directory used to create new or open
5359 existing machines when a settings file name contains no
5360 path.
5361
5362 The initial value of this property is
5363 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
5364 VirtualBox_home</link><tt>&gt;/Machines</tt>.
5365
5366 <note>
5367 Setting this property to <tt>null</tt> will restore the
5368 initial value.
5369 </note>
5370 <note>
5371 When settings this property, the specified path can be
5372 absolute (full path) or relative
5373 to the <link to="IVirtualBox::homeFolder">
5374 VirtualBox home directory</link>.
5375 When reading this property, a full path is
5376 always returned.
5377 </note>
5378 <note>
5379 The specified path may not exist, it will be created
5380 when necessary.
5381 </note>
5382
5383 <see>
5384 <link to="IVirtualBox::createMachine()"/>,
5385 <link to="IVirtualBox::openMachine()"/>
5386 </see>
5387 </desc>
5388 </attribute>
5389
5390 <attribute name="defaultHardDiskFolder" type="wstring">
5391 <desc>
5392 Full path to the default directory used to create new or open existing
5393 virtual disks.
5394
5395 This path is used when the storage unit of a hard disk is a regular file
5396 in the host's file system and only a file name that contains no path is
5397 given.
5398
5399 The initial value of this property is
5400 <tt>&lt;</tt>
5401 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
5402 <tt>&gt;/HardDisks</tt>.
5403
5404 <note>
5405 Setting this property to <tt>null</tt> will restore the
5406 initial value.
5407 </note>
5408 <note>
5409 When settings this property, the specified path can be relative
5410 to the
5411 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
5412 absolute. When reading this property, a full path is
5413 always returned.
5414 </note>
5415 <note>
5416 The specified path may not exist, it will be created
5417 when necessary.
5418 </note>
5419
5420 <see>
5421 IHardDisk2,
5422 <link to="IVirtualBox::createHardDisk2()"/>,
5423 <link to="IVirtualBox::openHardDisk2()"/>,
5424 <link to="IMedium::location"/>
5425 </see>
5426 </desc>
5427 </attribute>
5428
5429 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
5430 <desc>
5431 List of all hard disk storage formats supported by this VirtualBox
5432 installation.
5433
5434 Note that the virtual hard disk framework is backend-based, therefore
5435 the list of supported formats depends on what backends are currently
5436 installed.
5437
5438 <see>
5439 <link to="IHardDiskFormat"/>,
5440 </see>
5441 </desc>
5442 </attribute>
5443
5444 <attribute name="defaultHardDiskFormat" type="wstring">
5445 <desc>
5446 Identifier of the default hard disk format used by VirtualBox.
5447
5448 The hard disk format set by this attribute is used by VirtualBox
5449 when the hard disk format was not specified explicitly. One example is
5450 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
5451 format argument. A more complex example is implicit creation of
5452 differencing hard disks when taking a snapshot of a virtual machine:
5453 this operation will try to use a format of the parent hard disk first
5454 and if this format does not support differencing hard disks the default
5455 format specified by this argument will be used.
5456
5457 The list of supported hard disk formats may be obtained by the
5458 <link to="#defaultHardDiskFormats"/> call. Note that the default
5459 hard disk format must have a capability to create differencing hard
5460 disks; otherwise opeartions that create hard disks implicitly may fail
5461 unexpectedly.
5462
5463 The initial value of this property is <tt>VDI</tt> in the current
5464 version of the VirtualBox product, but may change in the future.
5465
5466 <note>
5467 Setting this property to <tt>null</tt> will restore the
5468 initial value.
5469 </note>
5470
5471 <see>
5472 <link to="#hardDiskFormats"/>,
5473 <link to="IHardDiskFormat:id"/>,
5474 <link to="IVirtualBox::createHardDisk2()"/>
5475 </see>
5476 </desc>
5477 </attribute>
5478
5479 <attribute name="remoteDisplayAuthLibrary" type="wstring">
5480 <desc>
5481 Library that provides authentication for VRDP clients. The library
5482 is used if a virtual machine's authentication type is set to "external"
5483 in the VM RemoteDisplay configuration.
5484
5485 The system library extension (".DLL" or ".so") must be omitted.
5486 A full path can be specified; if not, then the library must reside on the
5487 system's default library path.
5488
5489 The default value of this property is <tt>VRDPAuth</tt>. There is a library
5490 of that name in one of the default VirtualBox library directories.
5491
5492 For details about VirtualBox authentication libraries and how to implement
5493 them, please refer to the VirtualBox manual.
5494
5495 <note>
5496 Setting this property to <tt>null</tt> will restore the
5497 initial value.
5498 </note>
5499 </desc>
5500 </attribute>
5501
5502 <attribute name="webServiceAuthLibrary" type="wstring">
5503 <desc>
5504 Library that provides authentication for webservice clients. The library
5505 is used if a virtual machine's authentication type is set to "external"
5506 in the VM RemoteDisplay configuration and will be called from
5507 within the <link to="IWebsessionManager::logon" /> implementation.
5508
5509 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
5510 there is no per-VM setting for this, as the webservice is a global
5511 resource (if it is running). Only for this setting (for the webservice),
5512 setting this value to a literal "null" string disables authentication,
5513 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
5514 no matter what user name and password are supplied.
5515
5516 The initial value of this property is <tt>VRDPAuth</tt>,
5517 meaning that the webservice will use the same authentication
5518 library that is used by default for VBoxVRDP (again, see
5519 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
5520 The format and calling convention of authentication libraries
5521 is the same for the webservice as it is for VBoxVRDP.
5522
5523 </desc>
5524 </attribute>
5525
5526 <attribute name="HWVirtExEnabled" type="boolean">
5527 <desc>
5528 This specifies the default value for hardware virtualization
5529 extensions. If enabled, virtual machines will make use of
5530 hardware virtualization extensions such as Intel VT-x and
5531 AMD-V by default. This value can be overridden by each VM
5532 using their <link to="IMachine::HWVirtExEnabled" /> property.
5533 </desc>
5534 </attribute>
5535
5536 <attribute name="LogHistoryCount" type="unsigned long">
5537 <desc>
5538 This value specifies how many old release log files are kept.
5539 </desc>
5540 </attribute>
5541 </interface>
5542
5543 <!--
5544 // IGuest
5545 /////////////////////////////////////////////////////////////////////////
5546 -->
5547
5548 <interface
5549 name="IGuestOSType" extends="$unknown"
5550 uuid="da94f478-1f37-4726-b750-2235950dc2fe"
5551 wsmap="struct"
5552 >
5553 <desc>
5554 </desc>
5555
5556 <attribute name="familyId" type="wstring" readonly="yes">
5557 <desc>Guest OS family identifier string.</desc>
5558 </attribute>
5559
5560 <attribute name="familyDescription" type="wstring" readonly="yes">
5561 <desc>Human readable description of the guest OS family.</desc>
5562 </attribute>
5563
5564 <attribute name="id" type="wstring" readonly="yes">
5565 <desc>Guest OS identifier string.</desc>
5566 </attribute>
5567
5568 <attribute name="description" type="wstring" readonly="yes">
5569 <desc>Human readable description of the guest OS.</desc>
5570 </attribute>
5571
5572 <attribute name="is64Bit" type="boolean" readonly="yes">
5573 <desc>Returns @c true if the given OS is 64-bit</desc>
5574 </attribute>
5575
5576 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
5577 <desc>Recommended RAM size in Megabytes.</desc>
5578 </attribute>
5579
5580 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
5581 <desc>Recommended video RAM size in Megabytes.</desc>
5582 </attribute>
5583
5584 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
5585 <desc>Recommended hard disk size in Megabytes.</desc>
5586 </attribute>
5587 </interface>
5588
5589
5590 <enumerator
5591 name="IGuestOSTypeEnumerator" type="IGuestOSType"
5592 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
5593 />
5594
5595 <collection
5596 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
5597 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
5598 readonly="yes"
5599 />
5600
5601 <interface
5602 name="IGuest" extends="$unknown"
5603 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
5604
5605 wsmap="suppress"
5606 >
5607 <desc>
5608 The IGuest interface represents information about the operating system
5609 running inside the virtual machine. Used in
5610 <link to="IConsole::guest"/>.
5611
5612 IGuest provides information about the guest operating system, whether
5613 Guest Additions are installed and other OS-specific virtual machine
5614 properties.
5615 </desc>
5616
5617 <attribute name="OSTypeId" type="wstring" readonly="yes">
5618 <desc>
5619 Identifier of the Guest OS type as reported by the Guest
5620 Additions.
5621 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
5622 an IGuestOSType object representing details about the given
5623 Guest OS type.
5624 <note>
5625 If Guest Additions are not installed, this value will be
5626 the same as <link to="IMachine::OSTypeId"/>.
5627 </note>
5628 </desc>
5629 </attribute>
5630
5631 <attribute name="additionsActive" type="boolean" readonly="yes">
5632 <desc>
5633 Flag whether the Guest Additions are installed and active
5634 in which case their version will be returned by the
5635 <link to="#additionsVersion"/> property.
5636 </desc>
5637 </attribute>
5638
5639 <attribute name="additionsVersion" type="wstring" readonly="yes">
5640 <desc>
5641 Version of the Guest Additions (3 decimal numbers separated
5642 by dots) or empty when the Additions are not installed. The
5643 Additions may also report a version but yet not be active as
5644 the version might be refused by VirtualBox (incompatible) or
5645 other failures occurred.
5646 </desc>
5647 </attribute>
5648
5649 <attribute name="supportsSeamless" type="boolean" readonly="yes">
5650 <desc>
5651 Flag whether seamless guest display rendering (seamless desktop
5652 integration) is supported.
5653 </desc>
5654 </attribute>
5655
5656 <attribute name="supportsGraphics" type="boolean" readonly="yes">
5657 <desc>
5658 Flag whether the guest is in graphics mode. If it is not, then
5659 seamless rendering will not work, resize hints are not immediately
5660 acted on and guest display resizes are probably not initiated by
5661 the guest additions.
5662 </desc>
5663 </attribute>
5664
5665 <attribute name="memoryBalloonSize" type="unsigned long">
5666 <desc>Guest system memory balloon size in megabytes.</desc>
5667 </attribute>
5668
5669 <attribute name="statisticsUpdateInterval" type="unsigned long">
5670 <desc>Interval to update guest statistics in seconds.</desc>
5671 </attribute>
5672
5673 <method name="setCredentials">
5674 <desc>
5675 Store login credentials that can be queried by guest operating
5676 systems with Additions installed. The credentials are transient
5677 to the session and the guest may also choose to erase them. Note
5678 that the caller cannot determine whether the guest operating system
5679 has queried or made use of the credentials.
5680 </desc>
5681 <param name="userName" type="wstring" dir="in">
5682 <desc>User name string, can be empty</desc>
5683 </param>
5684 <param name="password" type="wstring" dir="in">
5685 <desc>Password string, can be empty</desc>
5686 </param>
5687 <param name="domain" type="wstring" dir="in">
5688 <desc>Domain name (guest logon scheme specific), can be empty</desc>
5689 </param>
5690 <param name="allowInteractiveLogon" type="boolean" dir="in">
5691 <desc>
5692 Flag whether the guest should alternatively allow the user to
5693 interactively specify different credentials. This flag might
5694 not be supported by all versions of the Additions.
5695 </desc>
5696 </param>
5697 </method>
5698
5699 <method name="getStatistic">
5700 <desc>
5701 Query specified guest statistics as reported by the VirtualBox Additions.
5702 </desc>
5703 <param name="cpuId" type="unsigned long" dir="in">
5704 <desc>Virtual CPU id; not relevant for all statistic types</desc>
5705 </param>
5706 <param name="statistic" type="GuestStatisticType" dir="in">
5707 <desc>Statistic type.</desc>
5708 </param>
5709 <param name="statVal" type="unsigned long" dir="out">
5710 <desc>Statistics value</desc>
5711 </param>
5712 </method>
5713
5714 </interface>
5715
5716
5717 <!--
5718 // IProgress
5719 /////////////////////////////////////////////////////////////////////////
5720 -->
5721
5722 <enumerator
5723 name="IProgressEnumerator" type="IProgress"
5724 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
5725 />
5726
5727 <collection
5728 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
5729 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
5730 readonly="yes"
5731 />
5732
5733 <interface
5734 name="IProgress" extends="$unknown"
5735 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
5736 wsmap="managed"
5737 >
5738 <desc>
5739 The IProgress interface represents a task progress object that allows
5740 to wait for the completion of some asynchronous task.
5741
5742 The task consists of one or more operations that run sequentially,
5743 one after one. There is an individual percent of completion of the
5744 current operation and the percent of completion of the task as a
5745 whole. Similarly, you can wait for the completion of a particular
5746 operation or for the completion of the whole task.
5747
5748 Every operation is identified by a number (starting from 0)
5749 and has a separate description.
5750 </desc>
5751
5752 <attribute name="id" type="uuid" readonly="yes">
5753 <desc>ID of the task.</desc>
5754 </attribute>
5755
5756 <attribute name="description" type="wstring" readonly="yes">
5757 <desc>Description of the task.</desc>
5758 </attribute>
5759
5760 <attribute name="initiator" type="$unknown" readonly="yes">
5761 <desc>Initiator of the task.</desc>
5762 </attribute>
5763
5764 <attribute name="cancelable" type="boolean" readonly="yes">
5765 <desc>Whether the task can be interrupted.</desc>
5766 </attribute>
5767
5768 <attribute name="percent" type="long" readonly="yes">
5769 <desc>
5770 Current task progress value in percent.
5771 This value depends on how many operations are already complete.
5772 </desc>
5773 </attribute>
5774
5775 <attribute name="completed" type="boolean" readonly="yes">
5776 <desc>Whether the task has been completed.</desc>
5777 </attribute>
5778
5779 <attribute name="canceled" type="boolean" readonly="yes">
5780 <desc>Whether the task has been canceled.</desc>
5781 </attribute>
5782
5783 <attribute name="resultCode" type="result" readonly="yes">
5784 <desc>
5785 Result code of the progress task.
5786 Valid only if <link to="#completed"/> is true.
5787 </desc>
5788 </attribute>
5789
5790 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
5791 <desc>
5792 Extended information about the unsuccessful result of the
5793 progress operation. May be NULL when no extended information
5794 is available.
5795 Valid only if <link to="#completed"/> is true and
5796 <link to="#resultCode"/> indicates a failure.
5797 </desc>
5798 </attribute>
5799
5800 <attribute name="operationCount" type="unsigned long" readonly="yes">
5801 <desc>
5802 Number of operations this task is divided into.
5803 Every task consists of at least one operation.
5804 </desc>
5805 </attribute>
5806
5807 <attribute name="operation" type="unsigned long" readonly="yes">
5808 <desc>Number of the operation being currently executed.</desc>
5809 </attribute>
5810
5811 <attribute name="operationDescription" type="wstring" readonly="yes">
5812 <desc>
5813 Description of the operation being currently executed.
5814 </desc>
5815 </attribute>
5816
5817 <attribute name="operationPercent" type="long" readonly="yes">
5818 <desc>Current operation progress value in percent.</desc>
5819 </attribute>
5820
5821 <method name="waitForCompletion">
5822 <desc>
5823 Waits until the task is done (including all operations) with a
5824 given timeout.
5825 </desc>
5826 <param name="timeout" type="long" dir="in">
5827 <desc>
5828 Timeout value in milliseconds.
5829 Specify -1 for an indefinite wait.
5830 </desc>
5831 </param>
5832 </method>
5833
5834 <method name="waitForOperationCompletion">
5835 <desc>
5836 Waits until the given operation is done with a given timeout.
5837 </desc>
5838 <param name="operation" type="unsigned long" dir="in">
5839 <desc>
5840 Number of the operation to wait for.
5841 Must be less than <link to="#operationCount"/>.
5842 </desc>
5843 </param>
5844 <param name="timeout" type="long" dir="in">
5845 <desc>
5846 Timeout value in milliseconds.
5847 Specify -1 for an indefinite wait.
5848 </desc>
5849 </param>
5850 </method>
5851
5852 <method name="cancel">
5853 <desc>
5854 Cancels the task.
5855 <note>
5856 If <link to="#cancelable"/> is <tt>false</tt>, then
5857 this method will fail.
5858 </note>
5859 </desc>
5860 </method>
5861
5862 </interface>
5863
5864
5865 <!--
5866 // ISnapshot
5867 /////////////////////////////////////////////////////////////////////////
5868 -->
5869
5870 <enumerator
5871 name="ISnapshotEnumerator" type="ISnapshot"
5872 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
5873 />
5874
5875 <collection
5876 name="ISnapshotCollection" type="ISnapshot"
5877 enumerator="ISnapshotEnumerator"
5878 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
5879 readonly="yes"
5880 />
5881
5882 <interface
5883 name="ISnapshot" extends="$unknown"
5884 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
5885 wsmap="managed"
5886 >
5887 <desc>
5888 The ISnapshot interface represents a snapshot of the virtual
5889 machine.
5890
5891 The <i>snapshot</i> stores all the information about a virtual
5892 machine necessary to bring it to exactly the same state as it was at
5893 the time of taking the snapshot. The snapshot includes:
5894
5895 <ul>
5896 <li>all settings of the virtual machine (i.e. its hardware
5897 configuration: RAM size, attached hard disks, etc.)
5898 </li>
5899 <li>the execution state of the virtual machine (memory contents,
5900 CPU state, etc.).
5901 </li>
5902 </ul>
5903
5904 Snapshots can be <i>offline</i> (taken when the VM is powered off)
5905 or <i>online</i> (taken when the VM is running). The execution
5906 state of the offline snapshot is called a <i>zero execution state</i>
5907 (it doesn't actually contain any information about memory contents
5908 or the CPU state, assuming that all hardware is just powered off).
5909
5910 <h3>Snapshot branches</h3>
5911
5912 Snapshots can be chained. Chained snapshots form a branch where
5913 every next snapshot is based on the previous one. This chaining is
5914 mostly related to hard disk branching (see <link to="IHardDisk2"/>
5915 description). This means that every time a new snapshot is created,
5916 a new differencing hard disk is implicitly created for all normal
5917 hard disks attached to the given virtual machine. This allows to
5918 fully restore hard disk contents when the machine is later reverted
5919 to a particular snapshot.
5920
5921 In the current implementation, multiple snapshot branches within one
5922 virtual machine are not allowed. Every machine has a single branch,
5923 and <link to="IConsole::takeSnapshot()"/> operation adds a new
5924 snapshot to the top of that branch.
5925
5926 Existing snapshots can be discarded using
5927 <link to="IConsole::discardSnapshot()"/>.
5928
5929 <h3>Current snapshot</h3>
5930
5931 Every virtual machine has a current snapshot, identified by
5932 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
5933 a base for the <i>current machine state</i> (see below), to the effect
5934 that all normal hard disks of the machine and its execution
5935 state are based on this snapshot.
5936
5937 In the current implementation, the current snapshot is always the
5938 last taken snapshot (i.e. the head snapshot on the branch) and it
5939 cannot be changed.
5940
5941 The current snapshot is <tt>null</tt> if the machine doesn't have
5942 snapshots at all; in this case the current machine state is just
5943 current settings of this machine plus its current execution state.
5944
5945 <h3>Current machine state</h3>
5946
5947 The current machine state is what represented by IMachine instances got
5948 directly from IVirtualBox
5949 using <link
5950 to="IVirtualBox::getMachine()">getMachine()</link>, <link
5951 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
5952 to instances returned by <link to="ISnapshot::machine"/>). This state
5953 is always used when the machine is <link to="IConsole::powerUp"> powered
5954 on</link>.
5955
5956 The current machine state also includes the current execution state.
5957 If the machine is being currently executed
5958 (<link to="IMachine::state"/> is <link to="MachineState::Running"/>
5959 and above), its execution state is just what's happening now.
5960 If it is powered off (<link to="MachineState::PoweredOff"/> or
5961 <link to="MachineState::Aborted"/>), it has a zero execution state.
5962 If the machine is saved (<link to="MachineState::Saved"/>), its
5963 execution state is what saved in the execution state file
5964 (<link to="IMachine::stateFilePath"/>).
5965
5966 If the machine is in the saved state, then, next time it is powered
5967 on, its execution state will be fully restored from the saved state
5968 file and the execution will continue from the point where the state
5969 was saved.
5970
5971 Similarly to snapshots, the current machine state can be discarded
5972 using <link to="IConsole::discardCurrentState()"/>.
5973
5974 <h3>Taking and discarding snapshots</h3>
5975
5976 The table below briefly explains the meaning of every snapshot
5977 operation:
5978
5979 <table>
5980 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
5981
5982 <tr><td><link to="IConsole::takeSnapshot()"/></td>
5983
5984 <td>Save the current state of the virtual machine, including all
5985 settings, contents of normal hard disks and the current modifications
5986 to immutable hard disks (for online snapshots)</td>
5987
5988 <td>The current state is not changed (the machine will continue
5989 execution if it is being executed when the snapshot is
5990 taken)</td></tr>
5991
5992 <tr><td><link to="IConsole::discardSnapshot()"/></td>
5993
5994 <td>Forget the state of the virtual machine stored in the snapshot:
5995 dismiss all saved settings and delete the saved execution state (for
5996 online snapshots)</td>
5997
5998 <td>Other snapshots (including child snapshots, if any) and the
5999 current state are not directly affected</td></tr>
6000
6001 <tr><td><link to="IConsole::discardCurrentState()"/></td>
6002
6003 <td>Restore the current state of the virtual machine from the state
6004 stored in the current snapshot, including all settings and hard disk
6005 contents</td>
6006
6007 <td>The current state of the machine existed prior to this operation
6008 is lost</td></tr>
6009
6010 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
6011
6012 <td>Completely revert the virtual machine to the state it was in
6013 before the current snapshot has been taken</td>
6014
6015 <td>The current state, as well as the current snapshot, are
6016 lost</td></tr>
6017
6018 </table>
6019
6020 </desc>
6021
6022 <attribute name="id" type="uuid" readonly="yes">
6023 <desc>UUID of the snapshot.</desc>
6024 </attribute>
6025
6026 <attribute name="name" type="wstring">
6027 <desc>Short name of the snapshot.</desc>
6028 </attribute>
6029
6030 <attribute name="description" type="wstring">
6031 <desc>Optional description of the snapshot.</desc>
6032 </attribute>
6033
6034 <attribute name="timeStamp" type="long long" readonly="yes">
6035 <desc>
6036 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
6037 </desc>
6038 </attribute>
6039
6040 <attribute name="online" type="boolean" readonly="yes">
6041 <desc>
6042 <tt>true</tt> if this snapshot is an online snapshot and
6043 <tt>false</tt> otherwise.
6044
6045 <note>
6046 When this attribute is <tt>true</tt>, the
6047 <link to="IMachine::stateFilePath"/> attribute of the
6048 <link to="#machine"/> object associated with this snapshot
6049 will point to the saved state file. Otherwise, it will be
6050 <tt>null</tt>.
6051 </note>
6052 </desc>
6053 </attribute>
6054
6055 <attribute name="machine" type="IMachine" readonly="yes">
6056 <desc>
6057 Virtual machine this snapshot is taken on. This object
6058 stores all settings the machine had when taking this snapshot.
6059 <note>
6060 The returned machine object is immutable, i.e. no
6061 any settings can be changed.
6062 </note>
6063 </desc>
6064 </attribute>
6065
6066 <attribute name="parent" type="ISnapshot" readonly="yes">
6067 <desc>
6068 Parent snapshot (a snapshot this one is based on).
6069 <note>
6070 It's not an error to read this attribute on a snapshot
6071 that doesn't have a parent -- a null object will be
6072 returned to indicate this.
6073 </note>
6074 </desc>
6075 </attribute>
6076
6077 <attribute name="children" type="ISnapshotCollection" readonly="yes">
6078 <desc>
6079 Child snapshots (all snapshots having this one as a parent).
6080 <note>
6081 In the current implementation, there can be only one
6082 child snapshot, or no children at all, meaning this is the
6083 last (head) snapshot.
6084 </note>
6085 </desc>
6086 </attribute>
6087
6088 </interface>
6089
6090
6091 <!--
6092 // IMedia
6093 /////////////////////////////////////////////////////////////////////////
6094 -->
6095
6096 <enum
6097 name="MediaState"
6098 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
6099 >
6100 <desc>
6101 Virtual media state.
6102 <see>IMedia</see>
6103 </desc>
6104
6105 <const name="NotCreated" value="0">
6106 <desc>
6107 Associated media storage does not exist (either was not created yet or
6108 was deleted).
6109 </desc>
6110 </const>
6111 <const name="Created" value="1">
6112 <desc>
6113 Associated storage exists and accessible.
6114 </desc>
6115 </const>
6116 <const name="LockedRead" value="2">
6117 <desc>
6118 Media is locked for reading, no data modification is possible.
6119 </desc>
6120 </const>
6121 <const name="LockedWrite" value="3">
6122 <desc>
6123 Media is locked for writing, no concurrent data reading or modification
6124 is possible.
6125 </desc>
6126 </const>
6127 <const name="Inaccessible" value="4">
6128 <desc>
6129 Associated media storage is not accessible.
6130 </desc>
6131 </const>
6132 <const name="Creating" value="5">
6133 <desc>
6134 Associated media storage is being created.
6135 </desc>
6136 </const>
6137 <const name="Deleting" value="6">
6138 <desc>
6139 Associated media storage is being deleted.
6140 </desc>
6141 </const>
6142 </enum>
6143
6144 <interface
6145 name="IMedium" extends="$unknown"
6146 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
6147 wsmap="managed"
6148 >
6149 <desc>
6150 The IMedium interface is a common interface for all objects representing
6151 virtual media such as hard disks, DVD images.
6152
6153 Each medium is associated with a storage unit (such as a file on the host
6154 computer or a network resource) that holds actual data. The location of
6155 the storage unit is represented by the #location attribute. The value of
6156 this attribute is media type dependent.
6157
6158 The exact media type may be determined by querying the appropriate
6159 interface such as:
6160 <ul>
6161 <li>IHardDisk2 (virtual hard disks)</li>
6162 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
6163 <li>IFloppyImage2 (raw floppy image files)</li>
6164 </ul>
6165
6166 Existing media are opened using the following methods, depending on the
6167 media type:
6168 <ul>
6169 <li><link to="IVirtualBox::openHardDisk2()"/></li>
6170 <li><link to="IVirtualBox::openDVDImage()"/></li>
6171 <li><link to="IVirtualBox::openFloppyImage()"/></li>
6172 </ul>
6173
6174 New hard disk media are created using the
6175 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
6176 images are created outside VirtualBox, usually by storing a copy
6177 of the real medium of the corresponding type in a regular file.
6178
6179 <h3>Known Media</h3>
6180
6181 When an existing medium gets opened for the first time, it gets
6182 automatically remembered by the given VirtualBox installation or, in other
6183 words, becomes a <i>known medium</i>. Known media are stored in the media
6184 registry transparently maintained by VirtualBox and stored in settings
6185 files so that this registry is preserved when VirtualBox is not running.
6186
6187 Newly created virtual hard disks get remembered only when the associated
6188 storage unit is actually created (see IHardDisk2 for more details).
6189
6190 All known media can be enumerated using
6191 <link to="IVirtualBox::hardDisks2"/>,
6192 <link to="IVirtualBox::DVDImages"/> and
6193 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
6194 quickly found by by UUID using <link to="IVirtualBox::getHardDisk2()"/>
6195 and similar methods or by location using
6196 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
6197
6198 Only known media can be attached to virtual machines.
6199
6200 Removing known media from the media registry is performed when the given
6201 medium is closed using the <link to="#close()"/> method or when its
6202 associated storage unit is deleted (only for hard disks).
6203
6204 <h3>Accessibility Checks</h3>
6205
6206 The given medium (with the created storage unit) is considered to be
6207 <i>accessible</i> when its storage unit can be successfully read from.
6208 Accessible media are indicated by the <link to="MediaState::Created"/>
6209 value of the <link to="#state"/> attribute. When the storage unit cannot
6210 be read (for example, because it is located on a disconnected network
6211 resource, or was accidentally deleted outside VirtualBox), the medium is
6212 considered to be <i>inaccessible</i> which is indicated by the
6213 <link to="MediaState::Inaccessible"/> state. The details about the reason
6214 of being inaccessible can be obtained using the
6215 <link to="#lastAccessError"/> attribute.
6216
6217 A new accessibility check is performed each time the <link to="#state"/>
6218 attribute is read. Please note that this check may take long time (several
6219 seconds or even minutes, depending on the storage unit location and
6220 format), and will block the calling thread until finished. For this
6221 reason, it is recommended to never read this attribute on the main UI
6222 thread to avoid making the UI unresponsive.
6223
6224 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
6225 created for the first time), all known media are in the
6226 <link to="MediaState::Inaccessible"/> state but the value of the <link
6227 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
6228 accessibility check is made on startup. This is done to make the
6229 VirtualBox object ready for serving requests as
6230 fast as possible and let the end-user application decide if it needs to
6231 check media accessibility right away or not.
6232 </desc>
6233
6234 <attribute name="id" type="uuid" readonly="yes">
6235 <desc>
6236 UUID of the medium. For a newly created medium, this value is a randomly
6237 generated UUID.
6238 </desc>
6239 </attribute>
6240
6241 <attribute name="description" type="wstring">
6242 <desc>
6243 Optional description of the medium. For newly created media, the value
6244 of this attribute value is <tt>null</tt>.
6245
6246 Media types that don't support this attribute will return E_NOTIMPL in
6247 attempt to get or set this attribute's value.
6248
6249 <note>
6250 For some storage types, reading this attribute may return an outdated
6251 (last known) value when <link to="#state"/> is <link
6252 to="MediaState::Inaccessible"/> or <link
6253 to="MediaState::LockedWrite"/> because the value of this attribute is
6254 stored within the storage unit itself. Also note that changing the
6255 attribute value is not possible in such case, as well as when the
6256 medium is the <link to="MediaState::LockedRead"/> state.
6257 </note>
6258 </desc>
6259 </attribute>
6260
6261 <attribute name="state" type="MediaState" readonly="yes">
6262 <desc>
6263 Current media state. Inspect <link to="MediaState"/> values for details.
6264
6265 Reading this attribute may take long time because a new accessibility
6266 check of the storage unit is performed every time the attribute is read.
6267 This check may cause a significant delay if the storage unit of the
6268 given medium is, for example, a file located on a network share which is
6269 not currently accessible due to connectivity problems -- the call will
6270 not return until a timeout interval defined by the host OS for this
6271 operation expires.
6272
6273 If the last known state of the medium is <link to="MediaState::Created"/>
6274 and the accessibility check fails then the state would be set to
6275 <link to="MediaState::Inaccessible"/> and <link to="#lastAccessError"/>
6276 may be used to get more details about the failure. If the state of the
6277 medium is <link to="MediaState::LockedRead"/> or
6278 <link to="MediaState::LockedWrite"/> then it remains the same, and a
6279 non-null value of <link to="#lastAccessError"/> will indicate a failed
6280 accessibility check in this case.
6281
6282 Note that not all media states are applicable to certain media types.
6283 For example, states <link to="MediaState::NotCreated"/>,
6284 <link to="MediaState::LockedWrite"/>, <link to="MediaState::Creating"/>,
6285 <link to="MediaState::Deleting"/> are meaningless for IDVDImage2 and
6286 IFloppyImage2 media.
6287 </desc>
6288 </attribute>
6289
6290 <attribute name="location" type="wstring">
6291 <desc>
6292 Location of the storage unit holding media data.
6293
6294 The format of the location string is media type specific. For media
6295 types that use regular files in a host's file system, the location
6296 string is just a full file name.
6297
6298 Some media types may support changing the storage unit location by
6299 simply changing the value of this property. If this operation is not
6300 supported, the implementation will return E_NOTIMPL in attempt to set
6301 this attribute's value.
6302
6303 When setting a value of the location attribute which is a regular file
6304 in the host's file system, the given file name may be either relative to
6305 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
6306 absolute. Note that if the given location specification does not contain
6307 the file extension part then a proper default extension will be
6308 automatically appended by the implementation depending on the media type.
6309 </desc>
6310 </attribute>
6311
6312 <attribute name="name" type="wstring" readonly="yes">
6313 <desc>
6314 Name of the storage unit holding media data.
6315
6316 The returned string is a short version of the <link to="#location"/>
6317 attribute that is suitable for representing the medium in situations
6318 where the full location specification is too long (such as lists
6319 and comboboxes in GUI frontends). This string is also used by frontends
6320 to sort the media list alphabetically when needed.
6321
6322 For example, for locations that are regular files in the host's file
6323 system, the value of this attribute is just a file name (+ extension),
6324 without the path specification.
6325
6326 Note that as opposed to the <link to="#location"/> attribute, the name
6327 name attribute will not necessary be unique for a list of media of the
6328 given type and format.
6329 </desc>
6330 </attribute>
6331
6332 <attribute name="size" type="unsigned long long" readonly="yes">
6333 <desc>
6334 Physical size of the storage unit used to hold media data (in bytes).
6335
6336 <note>
6337 For media whose <link to="#state"/> is <link
6338 to="MediaState::Inaccessible"/>, the value of this property is the
6339 last known size. For <link to="MediaState::NotCreated"/> media,
6340 the returned value is zero.
6341 </note>
6342 </desc>
6343 </attribute>
6344
6345 <attribute name="lastAccessError" type="wstring" readonly="yes">
6346 <desc>
6347 Text message that represents the result of the last accessibility
6348 check.
6349
6350 Accessibility checks are performed each time the <link to="#state"/>
6351 attribute is read. A @c null string is returned if the last
6352 accessibility check was successful. A non-null string indicates a
6353 failure and should normally describe a reason of the failure (for
6354 example, a file read error).
6355 </desc>
6356 </attribute>
6357
6358 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
6359 <desc>
6360 Array of UUIDs of all machines this medium is attached to.
6361
6362 A <tt>null</tt> array is returned if this medium is not attached to any
6363 machine or to any machine's snapshot.
6364
6365 <note>
6366 The returned array will include a machine even if this medium is not
6367 attached to that machine in the current state but attached to it in
6368 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
6369 details.
6370 </note>
6371 </desc>
6372 </attribute>
6373
6374 <method name="getSnapshotIds">
6375 <desc>
6376 Returns an array of UUIDs of all snapshots of the given machine where
6377 this medium is attached to it.
6378
6379 If the medium is attached to the machine in the current state, then the
6380 first element in the array will always be the ID of the queried machine
6381 (i.e. the value equal to the @c machineId argument), followed by
6382 snapshot IDs (if any).
6383
6384 If the medium is not attached to the machine in the current state, then
6385 the array will contain only snapshot IDs.
6386
6387 The returned array may be <tt>null</tt> if this medium is not attached
6388 to the given machine at all, neither in the current state nor in one of
6389 snapshots.
6390 </desc>
6391 <param name="machineId" type="uuid" dir="in">
6392 <desc>
6393 UUID of the machine to query.
6394 </desc>
6395 </param>
6396 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
6397 <desc>
6398 Array of snapshot UUIDs of the given machine using this medium.
6399 </desc>
6400 </param>
6401 </method>
6402
6403 <method name="lockRead">
6404 <desc>
6405 Locks this medium for reading.
6406
6407 The read lock is shared: many clients can simultaneously lock the
6408 same media for reading unless it is already locked for writing (see
6409 <link to="#lockWrite()"/>) in which case an error is returned.
6410
6411 When the medium is locked for reading, it cannot be modified from within
6412 VirtualBox. This means that any method that changes the properties of
6413 this medium or contents of the storage unit will return an error (unless
6414 explicitly stated otherwise) and that an attempt to start a virtual
6415 machine that wants to modify the medium will also fail.
6416
6417 When the virtual machine is started up, it locks for reading all media
6418 it uses in read-only mode. If some media cannot be locked for reading,
6419 the startup procedure will fail.
6420
6421 The medium locked for reading must be unlocked using the
6422 <link to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/> can
6423 be nested and must be followed by the same number of paired
6424 <link to="#unlockRead()"/> calls.
6425
6426 This method sets the media state to <link to="MediaState::LockedRead"/>
6427 on success. The state prior to this call must be
6428 <link to="MediaState::Created"/>,
6429 <link to="MediaState::Inaccessible"/> or
6430 <link to="MediaState::LockedRead"/>. As you can see, inaccessible media
6431 can be locked too. This is not an error; this method performs a logical
6432 lock that prevents modifications of this media through the VirtualBox
6433 API, not a physical lock of the underlying storage unit.
6434
6435 Either on success or on failure, this method returns the current state
6436 of the medium <b>before</b> the operation.
6437 </desc>
6438 <param name="state" type="MediaState" dir="return">
6439 <desc>
6440 State of the medium after the operation.
6441 </desc>
6442 </param>
6443 </method>
6444
6445 <method name="unlockRead">
6446 <desc>
6447 Cancels the read lock previously set by <link to="#lockRead()"/>.
6448
6449 Either on success or on failure, this method returns the current state
6450 of the medium <b>after</b> the operation.
6451
6452 See <link to="#lockRead()"/> for more details.
6453 </desc>
6454 <param name="state" type="MediaState" dir="return">
6455 <desc>
6456 State of the medium after the operation.
6457 </desc>
6458 </param>
6459 </method>
6460
6461 <method name="lockWrite">
6462 <desc>
6463 Locks this medium for writing.
6464
6465 The write lock, as opposed to <link to="#lockRead()"/>, is exclusive:
6466 there may be only one client that holds a write lock and there may be no
6467 read locks while the write lock is held.
6468
6469 When the medium is locked for writing, it cannot be modified from within
6470 VirtualBox and it is not guaranteed that the values of its properties
6471 are up-to-date. Any method that changes the properties of this medium or
6472 contents of the storage unit will return an error ((unless explicitly
6473 stated otherwise) and an attempt to start a virtual machine that wants
6474 to modify or to read the medium will also fail.
6475
6476 When the virtual machine is started up, it locks for writing all media
6477 it uses to write data to. If some media cannot be locked for writing,
6478 the startup procedure will fail.
6479
6480 The medium locked for writing must be unlocked using the
6481 <link to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
6482 can <b>not</b> be nested and must be followed by a paired
6483 <link to="#unlockWrite()"/> call.
6484
6485 This method sets the media state to <link to="MediaState::LockedWrite"/>
6486 on success. The state prior to this call must be
6487 <link to="MediaState::Created"/> or
6488 <link to="MediaState::Inaccessible"/>. As you can see, inaccessible media
6489 can be locked too. This is not an error; this method performs a logical
6490 lock that prevents modifications of this media through the VirtualBox
6491 API, not a physical lock of the underlying storage unit.
6492
6493 Either on success or on failure, this method returns the current state
6494 of the medium <b>before</b> the operation.
6495 </desc>
6496 <param name="state" type="MediaState" dir="return">
6497 <desc>
6498 State of the medium after the operation.
6499 </desc>
6500 </param>
6501 </method>
6502
6503 <method name="unlockWrite">
6504 <desc>
6505 Cancels the write lock previously set by <link to="#lockWrite()"/>.
6506
6507 Either on success or on failure, this method returns the current state
6508 of the medium <b>after</b> the operation.
6509
6510 See <link to="#lockWrite()"/> for more details.
6511 </desc>
6512 <param name="state" type="MediaState" dir="return">
6513 <desc>
6514 State of the medium after the operation.
6515 </desc>
6516 </param>
6517 </method>
6518
6519 <method name="close">
6520 <desc>
6521 Closes this media.
6522
6523 The hard disk must not be attached to any known virtual machine and must
6524 not have any known child hard disks, otherwise the operation will fail.
6525
6526 When the hard disk is successfully closed, it gets removed from the list
6527 of remembered hard disks, but its storage unit is not deleted. In
6528 particular, this means that this hard disk can be later opened again
6529 using the <link to="IVirtualBox::openHardDisk2"/> call.
6530
6531 Note that after this method successfully returns, the given hard disk
6532 object becomes uninitialized. This means that any attempt to call any of
6533 its methods or attributes will fail with the <tt>"Object not ready"
6534 (E_ACCESSDENIED)</tt> error.
6535 </desc>
6536 </method>
6537
6538 </interface>
6539
6540
6541 <!--
6542 // IHardDisk2
6543 /////////////////////////////////////////////////////////////////////////
6544 -->
6545
6546 <enum
6547 name="HardDiskType"
6548 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
6549 >
6550 <desc>
6551 Virtual hard disk type.
6552 <see>IHardDisk</see>
6553 </desc>
6554
6555 <const name="Normal" value="0">
6556 <desc>
6557 Normal hard disk (attached directly or indirectly, preserved
6558 when taking snapshots).
6559 </desc>
6560 </const>
6561 <const name="Immutable" value="1">
6562 <desc>
6563 Immutable hard disk (attached indirectly, changes are wiped out
6564 after powering off the virtual machine).
6565 </desc>
6566 </const>
6567 <const name="Writethrough" value="2">
6568 <desc>
6569 Write through hard disk (attached directly, ignored when
6570 taking snapshots).
6571 </desc>
6572 </const>
6573 </enum>
6574
6575 <interface
6576 name="IHardDisk2Attachment" extends="$unknown"
6577 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
6578 wsmap="struct"
6579 >
6580 <desc>
6581 The IHardDisk2Attachment interface represents a hard disk attachment of a
6582 virtual machine.
6583
6584 Every hard disk attachments specifies a slot of the virtual hard disk
6585 controller and a virtual virtual hard disk attached to this slot.
6586
6587 The array of hard disk attachments is returned by
6588 <link to="IMachine::hardDisk2Attachments"/>.
6589
6590 <note>
6591 With the COM API, this is an interface like all the others. With the
6592 webservice, this is mapped to a structure, so querying the attribute
6593 will not return an object, but a complete structure.
6594 </note>
6595 </desc>
6596 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
6597 <desc>Hard disk object associated with this attachment.</desc>
6598 </attribute>
6599
6600 <attribute name="bus" type="StorageBus" readonly="yes">
6601 <desc>Interface bus of this attachment.</desc>
6602 </attribute>
6603
6604 <attribute name="channel" type="long" readonly="yes">
6605 <desc>Channel number of this attachment.</desc>
6606 </attribute>
6607
6608 <attribute name="device" type="long" readonly="yes">
6609 <desc>Device slot number of this attachment.</desc>
6610 </attribute>
6611
6612 </interface>
6613
6614 <interface
6615 name="IHardDisk2" extends="IMedium"
6616 uuid="be30c487-3071-4067-8a03-8fed74a80708"
6617 wsmap="managed"
6618 >
6619 <desc>
6620 The IHardDisk2 interface represents a virtual hard disk drive
6621 used by a virtual machine.
6622
6623 Virtual hard disk objects virtualize the hard disk hardware and look like
6624 regular hard disks for the guest OS running inside the virtual machine.
6625
6626 <h3>Hard Disk Types</h3>
6627
6628 There are three types of hard disks:
6629 <link to="HardDiskType::Normal">Normal</link>,
6630 <link to="HardDiskType::Immutable">Immutable</link> and
6631 <link to="HardDiskType::Writethrough">Writethrough</link>. The type of the
6632 hard disk defines how the hard disk is attached to a virtual machine and
6633 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
6634 machine with the attached hard disk is taken. The type of the hard disk is
6635 defined by the <link to="#type"/> attribute.
6636
6637 All hard disks can be also divided in two big groups: <i>base</i> hard
6638 disks and <i>differencing</i> hard disks. A base hard disk contains all
6639 sectors of the hard disk data in its storage unit and therefore can be
6640 used independently. On the contrary, a differencing hard disk contains
6641 only some part of the hard disk data (a subset of sectors) and needs
6642 another hard disk to get access to the missing sectors of data. This
6643 another hard disk is called a <i>parent</i> hard disk and defines a hard
6644 disk to which this differencing hard disk is known to be <i>linked to</i>.
6645 The parent hard disk may be itself a differencing hard disk. This
6646 way, differencing hard disks form a linked hard disk chain. This chain
6647 always ends with the base hard disk which is sometimes referred to as the
6648 root hard disk of this chain. Note that several differencing hard disks
6649 may be linked to the same parent hard disk. This way, all known hard disks
6650 form a hard disk tree which is based on their parent-child relationship.
6651
6652 Differencing hard disks can be distinguished from base hard disks by
6653 querying the <link to="#parent"/> attribute: base hard disks do not have
6654 parents they would depend on, so the value of this attribute is always
6655 <tt>null</tt> for them. Using this attribute, it is possible to walk up
6656 the hard disk tree (from the child hard disk to its parent). It is also
6657 possible to walk down the tree using the <link to="#children"/>
6658 attribute.
6659
6660 Note that the type of all differencing hard disks is
6661 <link to="HardDiskType::Normal">Normal</link>; all other values are
6662 meaningless for them. Base hard disks may be of any type.
6663
6664 <h3>Creating Hard Disks</h3>
6665
6666 New base hard disks are created using
6667 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
6668 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
6669 disks are usually implicitly created by VirtualBox when needed but may
6670 also be created explicitly using <link to="#createDiffStorage()"/>.
6671
6672 After the hard disk is successfully created (including the storage unit)
6673 or opened, it becomes a known hard disk (remembered in the internal media
6674 registry). Known hard disks can be attached to a virtual machine, accessed
6675 through <link to="IVirtualBox::getHardDisk2()"/> and
6676 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
6677 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
6678
6679 The following methods, besides <link to="IMedium::close()"/>,
6680 automatically remove the hard disk from the media registry:
6681 <ul>
6682 <li><link to="#deleteStorage()"/></li>
6683 <li><link to="#mergeTo()"/></li>
6684 </ul>
6685
6686 If the storage unit of the hard disk is a regular file in the host's
6687 file system then the rules stated in the description of the
6688 <link to="IMedium::location"/> attribute apply when setting its value. In
6689 addition, a plain file name without any path may be given, in which case
6690 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
6691 folder</link> will be prepended to it.
6692
6693 <h4>Automatic composition of the file name part</h4>
6694
6695 Another extension to the <link to="IMedium::location"/> attribute is that
6696 there is a possibility to cause VirtualBox to compose a unique value for
6697 the file name part of the location using the UUID of the hard disk. This
6698 applies only to hard disks in <link to="MediaState::NotCreated"/> state,
6699 e.g. before the storage unit is created, and works as follows. You set the
6700 value of the <link to="IMedium::location"/> attribute to a location
6701 specification which only contains the path specification but not the file
6702 name part and ends with either a forward slash or a backslash character.
6703 In response, VirtualBox will generate a new UUID for the hard disk and
6704 compose the file name using the following pattern:
6705 <pre>
6706 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
6707 </pre>
6708 where <tt>&lt;path&gt;</tt> is the supplied path specification,
6709 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
6710 is the default extension for the storage format of this hard disk. After
6711 that, you may call any of the methods that create a new hard disk storage
6712 unit and they will use the generated UUID and file name.
6713
6714 <h3>Attaching Hard Disks</h3>
6715
6716 Hard disks are attached to virtual machines using the
6717 <link to="IMachine::attachHardDisk2()"/> method and detached using the
6718 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
6719 <link to="#type"/>, hard disks are attached either
6720 <i>directly</i> or <i>indirectly</i>.
6721
6722 When a hard disk is being attached directly, it is associated with the
6723 virtual machine and used for hard disk operations when the machine is
6724 running. When a hard disk is being attached indirectly, a new differencing
6725 hard disk linked to it is implicitly created and this differencing hard
6726 disk is associated with the machine and used for hard disk operations.
6727 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
6728 a direct attachment then the same hard disk will be returned in response
6729 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
6730 an indirect attachment is performed then
6731 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
6732 differencing hard disk, not the original one passed to <link
6733 to="IMachine::attachHardDisk2()"/>. The following table shows the
6734 dependency of the attachment type on the hard disk type:
6735
6736 <table>
6737 <tr>
6738 <th>Hard Disk Type</th>
6739 <th>Direct or Indirect?</th>
6740 </tr>
6741 <tr>
6742 <td>Normal (Base)</td>
6743 <td>
6744 Normal base hard disks that do not have children (i.e. differencing
6745 hard disks linked to them) and that are not already attached to
6746 virtual machines in snapshots are attached <b>directly</b>.
6747 Otherwise, they are attached <b>indirectly</b> because having
6748 dependent children or being part of the snapshot makes it impossible
6749 to modify hard disk contents without breaking the integrity of the
6750 dependent party. The <link to="#readOnly"/> attribute allows to
6751 quickly determine the kind of the attachment for the given hard
6752 disk. Note that if a normal base hard disk is to be indirectly
6753 attached to a virtual machine with snapshots then a special
6754 procedure called <i>smart attachment</i> is performed (see below).
6755 </td>
6756 </tr>
6757 <tr>
6758 <td>Normal (Differencing)</td>
6759 <td>
6760 Differencing hard disks are like normal base hard disks: attached
6761 <b>directly</b> if they do not have children and are not attached to
6762 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
6763 that the smart attachment procedure is never performed for
6764 differencing hard disks.
6765 </td>
6766 </tr>
6767 <tr>
6768 <td>Immutable</td>
6769 <td>
6770 Immutable hard disks are always attached <b>indirectly</b> because
6771 they are designed to be non-writable. If an immutable hard disk is
6772 attached to a virtual machine with snapshots then a special
6773 procedure called smart attachment is performed (see below).
6774 </td>
6775 </tr>
6776 <tr>
6777 <td>Writethrough</td>
6778 <td>
6779 Writethrough hard disks are always attached <b>directly</b>, also as
6780 designed. This also means that writethrough hard disks cannot have
6781 other hard disks linked to them at all.
6782 </td>
6783 </tr>
6784 </table>
6785
6786 Note that the same hard disk, regardless of its type, may be attached to
6787 more than one virtual machine at a time. In this case, the machine that is
6788 started first gains exclusive access to the hard disk and attempts to
6789 start other machines having this hard disk attached will fail until the
6790 first machine is powered down.
6791
6792 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
6793 that the given hard disk remains associated with the given machine after a
6794 successful <link to="IMachine::detachHardDisk2()"/> call until
6795 <link to="IMachine::saveSettings()"/> is called to save all changes to
6796 machine settings to disk. This deferring is necessary to guarantee that
6797 the hard disk configuration may be restored at any time by a call to
6798 <link to="IMachine::discardSettings()"/> before the settings
6799 are saved (committed).
6800
6801 Note that if <link to="IMachine::discardSettings()"/> is called after
6802 indirectly attaching some hard disks to the machine but before a call to
6803 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
6804 all differencing hard disks implicitly created by
6805 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
6806 Such implicitly created hard disks will also be immediately deleted when
6807 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
6808 call if it is made before <link to="IMachine::saveSettings()"/>. This
6809 implicit deletion is safe because newly created differencing hard
6810 disks do not contain any user data.
6811
6812 However, keep in mind that detaching differencing hard disks that were
6813 implicitly created by <link to="IMachine::attachHardDisk2()"/>
6814 before the last <link to="IMachine::saveSettings()"/> call will
6815 <b>not</b> implicitly delete them as they may already contain some data
6816 (for example, as a result of virtual machine execution). If these hard
6817 disks are no more necessary, the caller can always delete them explicitly
6818 using <link to="#deleteStorage()"/> after they are actually de-associated
6819 from this machine by the <link to="IMachine::saveSettings()"/> call.
6820
6821 <h3>Smart Attachment</h3>
6822
6823 When normal base or immutable hard disks are indirectly attached to a
6824 virtual machine then some additional steps are performed to make sure the
6825 virtual machine will have the most recent "view" of the hard disk being
6826 attached. These steps include walking through the machine's snapshots
6827 starting from the current one and going through ancestors up to the first
6828 snapshot. Hard disks attached to the virtual machine in all
6829 of the encountered snapshots are checked whether they are descendants of
6830 the given normal base or immutable hard disk. The first found child (which
6831 is the differencing hard disk) will be used instead of the normal base or
6832 immutable hard disk as a parent for creating a new differencing hard disk
6833 that will be actually attached to the machine. And only if no descendants
6834 are found or if the virtual machine does not have any snapshots then the
6835 normal base or immutable hard disk will be used itself as a parent for
6836 this differencing hard disk.
6837
6838 It is easier to explain what smart attachment does using the
6839 following example:
6840 <pre>
6841BEFORE attaching B.vdi: AFTER attaching B.vdi:
6842
6843Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
6844 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
6845 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
6846 Snapshot 4 (none) Snapshot 4 (none)
6847 CurState (none) CurState (D3->D2.vdi)
6848
6849 NOT
6850 ...
6851 CurState (D3->B.vdi)
6852 </pre>
6853 The first column is the virtual machine configuration before the base hard
6854 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
6855 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
6856 mean that the hard disk that is actually attached to the machine is a
6857 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
6858 another hard disk, <tt>B.vdi</tt>.
6859
6860 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
6861 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
6862 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
6863 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
6864 it cannot be attached directly and needs an indirect attachment (i.e.
6865 implicit creation of a new differencing hard disk). Due to the smart
6866 attachment procedure, the new differencing hard disk
6867 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
6868 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
6869 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
6870 machine.
6871
6872 Note that if there is more than one descendant hard disk of the given base
6873 hard disk found in a snapshot, and there is an exact device, channel and
6874 bus match, then this exact match will be used. Otherwise, the youngest
6875 descendant will be picked up.
6876
6877 There is one more important aspect of the smart attachment procedure which
6878 is not related to snapshots at all. Before walking through the snapshots
6879 as described above, the backup copy of the current list of hard disk
6880 attachment is searched for descendants. This backup copy is created when
6881 the hard disk configuration is changed for the first time after the last
6882 <link to="IMachine::saveSettings()"/> call and used by
6883 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
6884 changes. When such a descendant is found in this backup copy, it will be
6885 simply re-attached back, without creating a new differencing hard disk for
6886 it. This optimization is necessary to make it possible to re-attach the
6887 base or immutable hard disk to a different bus, channel or device slot
6888 without losing the contents of the differencing hard disk actually
6889 attached to the machine in place of it.
6890 </desc>
6891
6892 <attribute name="format" type="wstring" readonly="yes">
6893 <desc>
6894 Storage format of this hard disk.
6895
6896 The value of this attribute is a string that specifies a backend used to
6897 store hard disk data. The storage format is defined when you create a
6898 new hard disk or automatically detected when you open an existing hard
6899 disk medium, and cannot be changed later.
6900
6901 The list of all storage formats supported by this VirtualBox
6902 installation can be obtained using
6903 <link to="ISystemProperties::hardDiskFormats"/>.
6904 </desc>
6905 </attribute>
6906
6907 <attribute name="type" type="HardDiskType">
6908 <desc>
6909 Type (role) of this hard disk.
6910
6911 The following constraints apply when changing the value of this
6912 attribute:
6913 <ul>
6914 <li>If a hard disk is attached to a virtual machine (either in the
6915 current state or in one of the snapshots), its type cannot be
6916 changed.
6917 </li>
6918 <li>As long as the hard disk has children, its type cannot be set
6919 to <link to="HardDiskType::Writethrough"/>.
6920 </li>
6921 <li>The type of all differencing hard disks is
6922 <link to="HardDiskType::Normal"/> and cannot be changed.
6923 </li>
6924 </ul>
6925
6926 The type of a newly created or opened hard disk is set to
6927 <link to="HardDiskType::Normal"/>.
6928 </desc>
6929 </attribute>
6930
6931 <attribute name="parent" type="IHardDisk2" readonly="yes">
6932 <desc>
6933 Parent of this hard disk (a hard disk this hard disk is directly based
6934 on).
6935
6936 Only differencing hard disks have parents. For base (non-differencing)
6937 hard disks, <tt>null</tt> is returned.
6938 </desc>
6939 </attribute>
6940
6941 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
6942 <desc>
6943 Children of this hard disk (all differencing hard disks directly based
6944 on this hard disk). A <tt>null</tt> array is returned if this hard disk
6945 does not have any children.
6946 </desc>
6947 </attribute>
6948
6949 <attribute name="root" type="IHardDisk2" readonly="yes">
6950 <desc>
6951 Root hard disk of this hard disk.
6952
6953 If this is a differencing hard disk, its root hard disk is the base hard
6954 disk the given hard disk branch starts from. For all other types of hard
6955 disks, this property returns the hard disk object itself (i.e. the same
6956 object this property is read on).
6957 </desc>
6958 </attribute>
6959
6960 <attribute name="readOnly" type="boolean" readonly="yes">
6961 <desc>
6962 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
6963 otherwise.
6964
6965 A hard disk is considered to be read-only when its contents cannot be
6966 modified without breaking the integrity of other parties that depend on
6967 this hard disk such as its child hard disks or snapshots of virtual
6968 machines where this hard disk is attached to these machines. If there
6969 are no children and no such snapshots then there is no dependency and
6970 the hard disk is not read-only.
6971
6972 The value of this attribute can be used to determine the kind of the
6973 attachment that will take place when attaching this hard disk to a
6974 virtual machine. If the value is <tt>false</tt> then the hard disk will
6975 be attached directly. If the value is <tt>true</tt> then the hard disk
6976 will be attached indirectly by creating a new differencing child hard
6977 disk for that. See the interface description for more information.
6978
6979 Note that all <link to="HardDiskType::Immutable">Immutable</link> hard
6980 disks are always read-only while all
6981 <link to="HardDiskType::Writethrough">Writethrough</link> hard disks are
6982 always not.
6983
6984 <note>
6985 The read-only condition represented by this attribute is related to
6986 the hard disk type and usage, not to the current
6987 <link to="IMedium::state">media state</link> and not to the read-only
6988 state of the storage unit.
6989 </note>
6990 </desc>
6991 </attribute>
6992
6993 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
6994 <desc>
6995 Logical size of this hard disk (in megabytes), as reported to the
6996 guest OS running inside the virtual machine this disk is
6997 attached to. The logical size is defined when the hard disk is created
6998 and cannot be changed later.
6999
7000 <note>
7001 Reading this property on a differencing hard disk will return the size
7002 of its <link to="#root"/> hard disk.
7003 </note>
7004 <note>
7005 For hard disks whose state is <link to="#state"/> is <link
7006 to="MediaState::Inaccessible"/>, the value of this property is the
7007 last known logical size. For <link to="MediaState::NotCreated"/> hard
7008 disks, the returned value is zero.
7009 </note>
7010 </desc>
7011 </attribute>
7012
7013 <!-- storage methods -->
7014
7015 <method name="createDynamicStorage">
7016 <desc>
7017 Starts creating a dynamically expanding hard disk storage unit in the
7018 background. The previous storage unit created for this this object, if
7019 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
7020 the operation will fail.
7021
7022 Before the operation starts, the hard disk is placed to
7023 <link to="MediaState::Creating"/> state. If the create operation
7024 fails, the media will placed back to <link to="MediaState::NotCreated"/>
7025 state.
7026
7027 After the returned progress object reports that the operation is
7028 successfully complete, the media state will be set to <link
7029 to="MediaState::Created"/>, the hard disk will be remembered by this
7030 VirtualBox installation and may be attached to virtual machines.
7031 </desc>
7032 <param name="logicalSize" type="unsigned long long" dir="in">
7033 <desc>Maximum logical size of the hard disk in megabytes.</desc>
7034 </param>
7035 <param name="progress" type="IProgress" dir="return">
7036 <desc>Progress object to track the operation completion.</desc>
7037 </param>
7038 </method>
7039
7040 <method name="createFixedStorage">
7041 <desc>
7042 Starts creating a fixed-size hard disk storage unit in the background.
7043 The previous storage unit created for this this object, if
7044 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
7045 the operation will fail.
7046
7047 Before the operation starts, the hard disk is placed to
7048 <link to="MediaState::Creating"/> state. If the create operation
7049 fails, the media will placed back to <link to="MediaState::NotCreated"/>
7050 state.
7051
7052 After the returned progress object reports that the operation is
7053 successfully complete, the media state will be set to <link
7054 to="MediaState::Created"/>, the hard disk will be remembered by this
7055 VirtualBox installation and may be attached to virtual machines.
7056 </desc>
7057 <param name="logicalSize" type="unsigned long long" dir="in">
7058 <desc>Logical size of the hard disk in megabytes.</desc>
7059 </param>
7060 <param name="progress" type="IProgress" dir="return">
7061 <desc>Progress object to track the operation completion.</desc>
7062 </param>
7063 </method>
7064
7065 <method name="deleteStorage">
7066 <desc>
7067 Starts deleting the storage unit of this hard disk.
7068
7069 The hard disk must not be attached to any known virtual machine and must
7070 not have any known child hard disks, otherwise the operation will fail.
7071 It will also fail if there is no storage unit to delete or if deletion
7072 is already in progress, or if the hard disk is being in use (locked for
7073 read or for write) or inaccessible. Therefore, the only valid state for
7074 this operation to succeed is <link to="MediaState::Created"/>.
7075
7076 Before the operation starts, the hard disk is placed to
7077 <link to="MediaState::Deleting"/> state and gets removed from the list
7078 of remembered hard disks (media registry). If the delete operation
7079 fails, the media will be remembered again and placed back to
7080 <link to="MediaState::Created"/> state.
7081
7082 After the returned progress object reports that the operation is
7083 complete, the media state will be set to
7084 <link to="MediaState::NotCreated"/> and you will be able to use one of
7085 the storage creation methods to create it again.
7086
7087 <see>#close()</see>
7088 </desc>
7089 <param name="progress" type="IProgress" dir="return">
7090 <desc>Progress object to track the operation completion.</desc>
7091 </param>
7092 </method>
7093
7094 <!-- diff methods -->
7095
7096 <method name="createDiffStorage">
7097 <desc>
7098 Starts creating an empty differencing storage unit based on this hard
7099 disk in the format and at the location defined by the @a target
7100 argument.
7101
7102 The target hard disk must be in <link to="MediaState::NotCreated"/>
7103 state (i.e. must not have an existing storage unit). Upon successful
7104 completion, this operation will set the type of the target hard disk to
7105 <link to="HardDiskType::Normal"/> and create a storage unit necessary to
7106 represent the differencing hard disk data in the given format (according
7107 to the storage format of the target object).
7108
7109 After the returned progress object reports that the operation is
7110 successfully complete, the target hard disk gets remembered by this
7111 VirtualBox installation and may be attached to virtual machines.
7112
7113 <note>
7114 The hard disk will be placed to <link to="MediaState::LockedRead"/>
7115 state for the duration of this operation.
7116 </note>
7117 </desc> <param name="target" type="IHardDisk2" dir="in">
7118 <desc>Target hard disk.</desc>
7119 </param>
7120 <param name="progress" type="IProgress" dir="return">
7121 <desc>Progress object to track the operation completion.</desc>
7122 </param>
7123 </method>
7124
7125 <method name="mergeTo">
7126 <desc>
7127 Starts merging the contents of this hard disk and all intermediate
7128 differencing hard disks in the chain to the given target hard disk.
7129
7130 The target hard disk must be either a descendant of this hard disk or
7131 its ancestor (otherwise this method will immediately return a failure).
7132 It follows that there are two logical directions of the merge operation:
7133 from ancestor to descendant (<i>forward merge</i>) and from descendant to
7134 ancestor (<i>backward merge</i>). Let us consider the following hard disk
7135 chain:
7136
7137 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
7138
7139 Here, calling this method on the <tt>Base</tt> hard disk object with
7140 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
7141 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
7142 merge. Note that in both cases the contents of the resulting hard disk
7143 will be the same, the only difference is the hard disk object that takes
7144 the result of the merge operation. In case of the forward merge in the
7145 above example, the result will be written to <tt>Diff_2</tt>; in case of
7146 the backward merge, the result will be written to <tt>Base</tt>. In
7147 other words, the result of the operation is always stored in the target
7148 hard disk.
7149
7150 Upon successful operation completion, the storage units of all hard
7151 disks in the chain between this (source) hard disk and the target hard
7152 disk, including the source hard disk itself, will be automatically
7153 deleted and the relevant hard disk objects (including this hard disk)
7154 will become uninitialized. This means that any attempt to call any of
7155 their methods or attributes will fail with the
7156 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
7157 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
7158 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
7159 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
7160 disk itself since it will no longer be based on any other hard disk.
7161
7162 Considering the above, all of the following conditions must be met in
7163 order for the merge operation to succeed:
7164 <ul>
7165 <li>
7166 Neither this (source) hard disk nor any intermediate
7167 differencing hard disk in the chain between it and the target
7168 hard disk is attached to any virtual machine.
7169 </li>
7170 <li>
7171 Neither the source hard disk nor the target hard disk is an
7172 <link to="HardDiskType::Immutable"/> hard disk.
7173 </li>
7174 <li>
7175 The part of the hard disk tree from the source hard disk to the
7176 target hard disk is a linear chain, i.e. all hard disks in this
7177 chain have exactly one child which is the next hard disk in this
7178 chain. The only exception from this rule is the target hard disk in
7179 the forward merge operation; it is allowed to have any number of
7180 child hard disks because the merge operation will hot change its
7181 logical contents (as it is seen by the guest OS or by children).
7182 </li>
7183 <li>
7184 None of the involved hard disks are in
7185 <link to="MediaState::LockedRead"/> or
7186 <link to="MediaState::LockedWrite"/> state.
7187 </li>
7188 </ul>
7189
7190 <note>
7191 This (source) hard disk and all intermediates will be placed to <link
7192 to="MediaState::Deleting"/> state and the target hard disk will be
7193 placed to <link to="MediaState::LockedWrite"/> state and for the
7194 duration of this operation.
7195 </note>
7196 </desc>
7197 <param name="targetId" type="uuid" dir="in">
7198 <desc>UUID of the target ancestor or descendant hard disk.</desc>
7199 </param>
7200 <param name="progress" type="IProgress" dir="return">
7201 <desc>Progress object to track the operation completion.</desc>
7202 </param>
7203 </method>
7204
7205 <!-- clone methods -->
7206
7207 <method name="cloneTo">
7208 <desc>
7209 Starts creating a clone of this hard disk in the format and at the
7210 location defined by the @a target argument.
7211
7212 The target hard disk must be in <link to="MediaState::NotCreated"/>
7213 state (i.e. must not have an existing storage unit). Upon successful
7214 completion, the cloned hard disk will contain exactly the same sector
7215 data as the hard disk being cloned, except that a new UUID for the clone
7216 will be randomly generated.
7217
7218 After the returned progress object reports that the operation is
7219 successfully complete, the target hard disk gets remembered by this
7220 VirtualBox installation and may be attached to virtual machines.
7221
7222 <note>
7223 If the cloned hard disk is a differencing hard disk, it will inherit
7224 parent dependency of the original hard disk.
7225 </note>
7226 <note>
7227 This hard disk will be placed to <link to="MediaState::LockedRead"/>
7228 state for the duration of this operation.
7229 </note>
7230 </desc>
7231 <param name="target" type="IHardDisk2" dir="in">
7232 <desc>Target hard disk.</desc>
7233 </param>
7234 <param name="progress" type="IProgress" dir="return">
7235 <desc>Progress object to track the operation completion.</desc>
7236 </param>
7237 </method>
7238
7239 <method name="flattenTo">
7240 <desc>
7241 Starts creating a deep (independent) clone of this hard disk in the
7242 format and at the location defined by the @a target argument.
7243
7244 This operation is similar to <link to="#cloneTo()"/> except that when
7245 applied to a differencing hard disk, it will also copy missing hard disk
7246 data from all parent hard disks it is linked to. This will make the
7247 created clone an independent base hard disk that contains all hard disk
7248 data and does not need any other hard disks to operate.
7249
7250 After the returned progress object reports that the operation is
7251 successfully complete, the target hard disk gets remembered by this
7252 VirtualBox installation and may be attached to virtual machines.
7253
7254 <note>
7255 For base hard disks, this operation is identical to
7256 <link to="#cloneTo()"/>.
7257 </note>
7258 <note>
7259 This hard disk and all its parent hard disks will be placed to <link
7260 to="MediaState::LockedRead"/> state for the duration of this
7261 operation.
7262 </note>
7263 </desc>
7264 <param name="target" type="IHardDisk2" dir="in">
7265 <desc>Target hard disk.</desc>
7266 </param>
7267 <param name="progress" type="IProgress" dir="return">
7268 <desc>Progress object to track the operation completion.</desc>
7269 </param>
7270 </method>
7271
7272 </interface>
7273
7274
7275 <!--
7276 // IHardDiskFormat
7277 /////////////////////////////////////////////////////////////////////////
7278 -->
7279
7280 <enum
7281 name="DataType"
7282 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
7283 >
7284 <const name="Int32" value="0"/>
7285 <const name="Int8" value="1"/>
7286 <const name="String" value="2"/>
7287 </enum>
7288
7289 <enum
7290 name="DataFlags"
7291 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
7292 >
7293 <const name="None" value="0x00"/>
7294 <const name="Mandatory" value="0x01"/>
7295 <const name="Expert" value="0x02"/>
7296 <const name="Array" value="0x04"/>
7297 <const name="FlagMask" value="0x07"/>
7298 </enum>
7299
7300 <enum
7301 name="HardDiskFormatCapabilities"
7302 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
7303 >
7304 <desc>
7305 Hard disk format capability flags.
7306 </desc>
7307
7308 <const name="Uuid" value="0x01">
7309 <desc>
7310 Supports UUIDs as expected by VirtualBox code.
7311 </desc>
7312 </const>
7313
7314 <const name="CreateFixed" value="0x02">
7315 <desc>
7316 Supports creating fixed size images, allocating all space instantly.
7317 </desc>
7318 </const>
7319
7320 <const name="CreateDynamic" value="0x04">
7321 <desc>
7322 Supports creating dynamically growing images, allocating space on
7323 demand.
7324 </desc>
7325 </const>
7326
7327 <const name="CreateSplit2G" value="0x08">
7328 <desc>
7329 Supports creating images split in chunks of a bit less than 2 GBytes.
7330 </desc>
7331 </const>
7332
7333 <const name="Differencing" value="0x10">
7334 <desc>
7335 Supports being used as a format for differencing hard disks (see <link
7336 to="IHardDisk2::createDiffStorage"/>).
7337 </desc>
7338 </const>
7339
7340 <const name="Asynchronous" value="0x20">
7341 <desc>
7342 Supports asynchronous I/O operations for at least some configurations.
7343 </desc>
7344 </const>
7345
7346 <const name="File" value="0x40">
7347 <desc>
7348 The format backend operates on files. The <link to="IMedium::location"/>
7349 attribute of the hard disk specifies a file used to store hard disk
7350 data. For a list of supported file extensions see
7351 <link to="IHardDiskFormat::fileExtensions"/>.
7352 </desc>
7353 </const>
7354
7355 <const name="Properties" value="0x80">
7356 <desc>
7357 The format backend uses the property interface to configure the storage
7358 location and properties. The <link to="IHardDiskFormat::describeProperties"/>
7359 method is used to get access to properties supported by the given hard
7360 disk format.
7361 </desc>
7362 </const>
7363
7364 <const name="CapabilityMask" value="0xFF"/>
7365 </enum>
7366
7367 <interface
7368 name="IHardDiskFormat" extends="$unknown"
7369 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
7370 wsmap="managed"
7371 >
7372 <desc>
7373 The IHardDiskFormat interface represents a virtual hard disk format.
7374
7375 Each hard disk format has an associated backend which is used to handle
7376 hard disks stored in this format. This interface provides information
7377 about the properties of the associated backend.
7378
7379 Each hard disk format is identified by a string represented by the
7380 <link to="#id"/> attribute. This string is used in calls like
7381 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
7382 format.
7383
7384 The list of all supported hard disk formats can be obtained using
7385 <link to="ISystemProperties::hardDiskFormats"/>.
7386
7387 <see>IHardDisk2</see>
7388 </desc>
7389
7390 <attribute name="id" type="wstring" readonly="yes">
7391 <desc>
7392 Identifier of this format.
7393
7394 This string is used in methods of other interfaces where it is necessary
7395 to specify a hard disk format, such as
7396 <link to="IVirtualBox::createHardDisk2()"/>.
7397 </desc>
7398 </attribute>
7399
7400 <attribute name="name" type="wstring" readonly="yes">
7401 <desc>
7402 Human readable description of this format.
7403
7404 Mainly for use in file open dialogs.
7405 </desc>
7406 </attribute>
7407
7408 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
7409 <desc>
7410 Array of strings containing the supported file extensions.
7411
7412 The first extension in the array is the extension preferred by the
7413 backend. It is recommended to use this extension when specifying a
7414 location of the storage unit for a new hard disk.
7415
7416 Note that some backends do not work on files, so this array may be
7417 empty.
7418
7419 <see>IHardDiskFormat::capabilities</see>
7420 </desc>
7421 </attribute>
7422
7423 <attribute name="capabilities" type="unsigned long" readonly="yes">
7424 <desc>
7425 Capabilities of the format as a set of bit flags.
7426
7427 For the meaning of individual capability flags see
7428 <link to="HardDiskFormatCapabilities"/>.
7429 </desc>
7430 </attribute>
7431
7432 <method name="describeProperties">
7433 <desc>
7434 Returns several arrays describing the properties supported by this
7435 format.
7436
7437 An element with the given index in each array describes one
7438 property. Thus, the number of elements in each returned array is the
7439 same and corresponds to the number of supported properties.
7440
7441 The returned arrays are not empty only if the
7442 <link to="HardDiskFormatCapabilities::Properties"/> flag is set.
7443
7444 <see>DataType</see>
7445 <see>DataFlags</see>
7446 </desc>
7447
7448 <param name="names" type="wstring" safearray="yes" dir="out">
7449 <desc>Array of property names.</desc>
7450 </param>
7451 <param name="description" type="wstring" safearray="yes" dir="out">
7452 <desc>Array of property descriptions.</desc>
7453 </param>
7454 <param name="types" type="DataType" safearray="yes" dir="out">
7455 <desc>Array of property types.</desc>
7456 </param>
7457 <param name="flags" type="unsigned long" safearray="yes" dir="out">
7458 <desc>Array of property flags.</desc>
7459 </param>
7460 <param name="defaults" type="wstring" safearray="yes" dir="out">
7461 <desc>Array of default property values.</desc>
7462 </param>
7463 </method>
7464
7465 </interface>
7466
7467
7468 <!--
7469 // IFloppyImage2
7470 /////////////////////////////////////////////////////////////////////////
7471 -->
7472
7473 <interface
7474 name="IFloppyImage2" extends="IMedium"
7475 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
7476 wsmap="managed"
7477 >
7478 <desc>
7479 The IFloppyImage2 interface represents a medium containing the image
7480 of a floppy disk.
7481 </desc>
7482
7483 </interface>
7484
7485
7486 <!--
7487 // IDVDImage2
7488 /////////////////////////////////////////////////////////////////////////
7489 -->
7490
7491 <interface
7492 name="IDVDImage2" extends="IMedium"
7493 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
7494 wsmap="managed"
7495 >
7496 <desc>
7497 The IDVDImage2 interface represents a medium containing the image
7498 of a CD or DVD disk in the ISO format.
7499 </desc>
7500
7501 </interface>
7502
7503
7504 <!--
7505 // IDVDDrive
7506 /////////////////////////////////////////////////////////////////////////
7507 -->
7508
7509 <interface
7510 name="IDVDDrive" extends="$unknown"
7511 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
7512 wsmap="managed"
7513 >
7514 <desc>
7515 The IDVDDrive interface represents the virtual CD/DVD drive of the
7516 virtual machine. An object of this type is returned by
7517 <link to="IMachine::DVDDrive"/>.
7518 </desc>
7519
7520 <attribute name="state" type="DriveState" readonly="yes">
7521 <desc>Current drive state.</desc>
7522 </attribute>
7523
7524 <attribute name="passthrough" type="boolean">
7525 <desc>
7526 When a host drive is mounted and passthrough is enabled
7527 the guest OS will be able to directly send SCSI commands to
7528 the host drive. This enables the guest OS to use CD/DVD writers
7529 but is potentially dangerous.
7530 </desc>
7531 </attribute>
7532
7533 <method name="mountImage">
7534 <desc>Mounts a CD/DVD image with the specified UUID.</desc>
7535 <param name="imageId" type="uuid" dir="in"/>
7536 </method>
7537
7538 <method name="captureHostDrive">
7539 <desc>Captures the specified host CD/DVD drive.</desc>
7540 <param name="drive" type="IHostDVDDrive" dir="in"/>
7541 </method>
7542
7543 <method name="unmount">
7544 <desc>Unmounts the currently mounted image or host drive.</desc>
7545 </method>
7546
7547 <method name="getImage">
7548 <desc>Returns the currently mounted CD/DVD image.</desc>
7549 <param name="image" type="IDVDImage2" dir="return"/>
7550 </method>
7551
7552 <method name="getHostDrive">
7553 <desc>Returns the currently mounted host CD/DVD drive.</desc>
7554 <param name="drive" type="IHostDVDDrive" dir="return"/>
7555 </method>
7556
7557 </interface>
7558
7559
7560 <!--
7561 // IFloppyDrive
7562 /////////////////////////////////////////////////////////////////////////
7563 -->
7564
7565 <interface
7566 name="IFloppyDrive" extends="$unknown"
7567 uuid="159412cd-bab8-452e-8097-218a020825a6"
7568 wsmap="managed"
7569 >
7570 <desc>
7571 The IFloppyDrive interface represents the virtual floppy drive of the
7572 virtual machine. An object of this type is returned by
7573 <link to="IMachine::floppyDrive" />.
7574 </desc>
7575
7576 <attribute name="enabled" type="boolean">
7577 <desc>
7578 Flag whether the floppy drive is enabled. If it is disabled,
7579 the floppy drive will not be reported to the guest OS.
7580 </desc>
7581 </attribute>
7582
7583 <attribute name="state" type="DriveState" readonly="yes">
7584 <desc>Current drive state.</desc>
7585 </attribute>
7586
7587 <method name="mountImage">
7588 <desc>Mounts a floppy image with the specified UUID.</desc>
7589 <param name="imageId" type="uuid" dir="in"/>
7590 </method>
7591
7592 <method name="captureHostDrive">
7593 <desc>Captures the specified host floppy drive.</desc>
7594 <param name="drive" type="IHostFloppyDrive" dir="in"/>
7595 </method>
7596
7597 <method name="unmount">
7598 <desc>Unmounts the currently mounted image or host drive.</desc>
7599 </method>
7600
7601 <method name="getImage">
7602 <desc>Returns the currently mounted floppy image.</desc>
7603 <param name="image" type="IFloppyImage2" dir="return"/>
7604 </method>
7605
7606 <method name="getHostDrive">
7607 <desc>Returns the currently mounted host floppy drive.</desc>
7608 <param name="drive" type="IHostFloppyDrive" dir="return"/>
7609 </method>
7610
7611 </interface>
7612
7613
7614 <!--
7615 // IKeyboard
7616 /////////////////////////////////////////////////////////////////////////
7617 -->
7618
7619 <interface
7620 name="IKeyboard" extends="$unknown"
7621 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
7622 wsmap="managed"
7623 >
7624 <desc>
7625 The IKeyboard interface represents the virtual machine's keyboard. Used
7626 in <link to="IConsole::keyboard"/>.
7627
7628 Through this interface, the virtual machine's virtual keyboard can be controlled. One
7629 can send keystrokes to the virtual machine and send the Ctrl-Alt-Del sequence to it.
7630 </desc>
7631 <method name="putScancode">
7632 <desc>Sends a scancode to the keyboard.</desc>
7633 <param name="scancode" type="long" dir="in"/>
7634 </method>
7635
7636 <method name="putScancodes">
7637 <desc>Sends an array of scancode to the keyboard.</desc>
7638 <param name="scancodes" type="long" dir="in" safearray="yes"/>
7639 <param name="codesStored" type="unsigned long" dir="return"/>
7640 </method>
7641
7642 <method name="putCAD">
7643 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard.</desc>
7644 </method>
7645
7646 </interface>
7647
7648
7649 <!--
7650 // IMouse
7651 /////////////////////////////////////////////////////////////////////////
7652 -->
7653
7654 <enum
7655 name="MouseButtonState"
7656 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
7657 >
7658 <desc>
7659 Mouse button state.
7660 </desc>
7661
7662 <const name="LeftButton" value="0x01"/>
7663 <const name="RightButton" value="0x02"/>
7664 <const name="MiddleButton" value="0x04"/>
7665 <const name="WheelUp" value="0x08"/>
7666 <const name="WheelDown" value="0x10"/>
7667 <const name="MouseStateMask" value="0x1F"/>
7668 </enum>
7669
7670 <interface
7671 name="IMouse" extends="$unknown"
7672 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
7673 wsmap="managed"
7674 >
7675 <desc>
7676 The IMouse interface represents the virtual machine's mouse. Used in
7677 <link to="IConsole::mouse"/>.
7678
7679 Through this interface, the virtual machine's virtual mouse can be
7680 controlled.
7681 </desc>
7682
7683 <attribute name="absoluteSupported" type="boolean" readonly="yes">
7684 <desc>
7685 Whether the guest OS supports absolute mouse pointer positioning
7686 or not.
7687 <note>
7688 VirtualBox Guest Tools need to be installed to the guest OS
7689 in order to enable absolute mouse positioning support.
7690 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
7691 callback to be instantly informed about changes of this attribute
7692 during virtual machine execution.
7693 </note>
7694 <see><link to="#putMouseEventAbsolute"/></see>
7695 </desc>
7696 </attribute>
7697
7698 <method name="putMouseEvent">
7699 <desc>
7700 Initiates a mouse event using relative pointer movements
7701 along x and y axis.
7702 </desc>
7703
7704 <param name="dx" type="long" dir="in">
7705 <desc>
7706 Amount of pixels the mouse should move to the right.
7707 Negative values move the mouse to the left.
7708 </desc>
7709 </param>
7710 <param name="dy" type="long" dir="in">
7711 <desc>
7712 Amount of pixels the mouse should move downwards.
7713 Negative values move the mouse upwards.
7714 </desc>
7715 </param>
7716 <param name="dz" type="long" dir="in">
7717 <desc>
7718 Amount of mouse wheel moves.
7719 Positive values describe clockwise wheel rotations,
7720 negative values describe counterclockwise rotations.
7721 </desc>
7722 </param>
7723 <param name="buttonState" type="long" dir="in">
7724 <desc>
7725 The current state of mouse buttons. Every bit represents
7726 a mouse button as follows:
7727 <table>
7728 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
7729 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
7730 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
7731 </table>
7732 A value of <tt>1</tt> means the corresponding button is pressed.
7733 otherwise it is released.
7734 </desc>
7735 </param>
7736 </method>
7737
7738 <method name="putMouseEventAbsolute">
7739 <desc>
7740 Positions the mouse pointer using absolute x and y coordinates.
7741 These coordinates are expressed in pixels and
7742 start from <tt>[1,1]</tt> which corresponds to the top left
7743 corner of the virtual display.
7744
7745 <note>
7746 This method will have effect only if absolute mouse
7747 positioning is supported by the guest OS.
7748 </note>
7749
7750 <see><link to="#absoluteSupported"/></see>
7751 </desc>
7752
7753 <param name="x" type="long" dir="in">
7754 <desc>
7755 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
7756 </desc>
7757 </param>
7758 <param name="y" type="long" dir="in">
7759 <desc>
7760 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
7761 </desc>
7762 </param>
7763 <param name="dz" type="long" dir="in">
7764 <desc>
7765 Amount of mouse wheel moves.
7766 Positive values describe clockwise wheel rotations,
7767 negative values describe counterclockwise rotations.
7768 </desc>
7769 </param>
7770 <param name="buttonState" type="long" dir="in">
7771 <desc>
7772 The current state of mouse buttons. Every bit represents
7773 a mouse button as follows:
7774 <table>
7775 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
7776 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
7777 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
7778 </table>
7779 A value of <tt>1</tt> means the corresponding button is pressed.
7780 otherwise it is released.
7781 </desc>
7782 </param>
7783 </method>
7784
7785 </interface>
7786
7787 <!--
7788 // IDisplay
7789 /////////////////////////////////////////////////////////////////////////
7790 -->
7791
7792 <enum
7793 name="FramebufferAccelerationOperation"
7794 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
7795 >
7796 <desc>
7797 Frame buffer acceleration operation.
7798 </desc>
7799
7800 <const name="SolidFillAcceleration" value="1"/>
7801 <const name="ScreenCopyAcceleration" value="2"/>
7802 </enum>
7803
7804 <enum
7805 name="FramebufferPixelFormat"
7806 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
7807 >
7808 <desc>
7809 Format of the video memory buffer. Constants represented by this enum can
7810 be used to test for particular values of <link
7811 to="IFramebuffer::pixelFormat"/>. See also <link
7812 to="IFramebuffer::requestResize()"/>.
7813
7814 See also www.fourcc.org for more information about FOURCC pixel formats.
7815 </desc>
7816
7817 <const name="Opaque" value="0xFFFFFFFF">
7818 <desc>
7819 Unknown buffer format. The user may not assume any particular
7820 format of the buffer.
7821 </desc>
7822 </const>
7823 <const name="FOURCC_RGB" value="0x32424752">
7824 <desc>
7825 Basic RGB format. <link to="IFramebuffer::bitsPerPixel"/> determines
7826 the bit layout.
7827 </desc>
7828 </const>
7829 </enum>
7830
7831 <interface
7832 name="IFramebuffer" extends="$unknown"
7833 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
7834 wsmap="suppress"
7835 >
7836 <attribute name="address" type="octet" mod="ptr" readonly="yes">
7837 <desc>Address of the start byte of the frame buffer.</desc>
7838 </attribute>
7839
7840 <attribute name="width" type="unsigned long" readonly="yes">
7841 <desc>Frame buffer width, in pixels.</desc>
7842 </attribute>
7843
7844 <attribute name="height" type="unsigned long" readonly="yes">
7845 <desc>Frame buffer height, in pixels.</desc>
7846 </attribute>
7847
7848 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
7849 <desc>
7850 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
7851 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
7852 are: 8, 15, 16, 24 and 32.
7853 </desc>
7854 </attribute>
7855
7856 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
7857 <desc>
7858 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
7859 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
7860 size of the scan line must be aligned to 32 bits.
7861 </desc>
7862 </attribute>
7863
7864 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
7865 <desc>
7866 Frame buffer pixel format. It's either one of the values defined by <link
7867 to="FramebufferPixelFormat"/> or a raw FOURCC code.
7868 <note>
7869 This attribute must never return <link
7870 to="PixelFormat::Opaque"/> -- the format of the buffer
7871 <link to="#address"/> points to must be always known.
7872 </note>
7873 </desc>
7874 </attribute>
7875
7876 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
7877 <desc>
7878 Defines whether this frame buffer uses the virtual video card's memory
7879 buffer (guest VRAM) directly or not. See <link
7880 to="IFramebuffer::requestResize()"/> for more information.
7881 </desc>
7882 </attribute>
7883
7884 <attribute name="heightReduction" type="unsigned long" readonly="yes">
7885 <desc>
7886 Hint from the frame buffer about how much of the standard
7887 screen height it wants to use for itself. This information is
7888 exposed to the guest through the VESA BIOS and VMMDev interface
7889 so that it can use it for determining its video mode table. It
7890 is not guaranteed that the guest respects the value.
7891 </desc>
7892 </attribute>
7893
7894 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
7895 <desc>
7896 An alpha-blended overlay which is superposed over the frame buffer.
7897 The initial purpose is to allow the display of icons providing
7898 information about the VM state, including disk activity, in front
7899 ends which do not have other means of doing that. The overlay is
7900 designed to controlled exclusively by IDisplay. It has no locking
7901 of its own, and any changes made to it are not guaranteed to be
7902 visible until the affected portion of IFramebuffer is updated. The
7903 overlay can be created lazily the first time it is requested. This
7904 attribute can also return NULL to signal that the overlay is not
7905 implemented.
7906 </desc>
7907 </attribute>
7908
7909 <attribute name="winId" type="unsigned long long" readonly="yes">
7910 <desc>
7911 Platform-dependent identifier of the window where context of this
7912 frame buffer is drawn, or zero if there's no such window.
7913 </desc>
7914 </attribute>
7915
7916 <method name="lock">
7917 <desc>
7918 Locks the frame buffer.
7919 Gets called by the IDisplay object where this frame buffer is
7920 bound to.
7921 </desc>
7922 </method>
7923
7924 <method name="unlock">
7925 <desc>
7926 Unlocks the frame buffer.
7927 Gets called by the IDisplay object where this frame buffer is
7928 bound to.
7929 </desc>
7930 </method>
7931
7932 <method name="notifyUpdate">
7933 <desc>
7934 Informs about an update.
7935 Gets called by the display object where this buffer is
7936 registered.
7937 </desc>
7938 <param name="x" type="unsigned long" dir="in"/>
7939 <param name="y" type="unsigned long" dir="in"/>
7940 <param name="width" type="unsigned long" dir="in"/>
7941 <param name="height" type="unsigned long" dir="in"/>
7942 <param name="finished" type="boolean" dir="return"/>
7943 </method>
7944
7945 <method name="requestResize">
7946 <desc>
7947 Requests a size and pixel format change.
7948
7949 There are two modes of working with the video buffer of the virtual
7950 machine. The <i>indirect</i> mode implies that the IFramebuffer
7951 implementation allocates a memory buffer for the requested display mode
7952 and provides it to the virtual machine. In <i>direct</i> mode, the
7953 IFramebuffer implementation uses the memory buffer allocated and owned
7954 by the virtual machine. This buffer represents the video memory of the
7955 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
7956 usually faster because the implementation gets a raw pointer to the
7957 guest VRAM buffer which it can directly use for visualizing the contents
7958 of the virtual display, as opposed to the indirect mode where the
7959 contents of guest VRAM are copied to the memory buffer provided by
7960 the implementation every time a display update occurs.
7961
7962 It is important to note that the direct mode is really fast only when
7963 the implementation uses the given guest VRAM buffer directly, for
7964 example, by blitting it to the window representing the virtual machine's
7965 display, which saves at least one copy operation comparing to the
7966 indirect mode. However, using the guest VRAM buffer directly is not
7967 always possible: the format and the color depth of this buffer may be
7968 not supported by the target window, or it may be unknown (opaque) as in
7969 case of text or non-linear multi-plane VGA video modes. In this case,
7970 the indirect mode (that is always available) should be used as a
7971 fallback: when the guest VRAM contents are copied to the
7972 implementation-provided memory buffer, color and format conversion is
7973 done automatically by the underlying code.
7974
7975 The @a pixelFormat parameter defines whether the direct mode is
7976 available or not. If @a pixelFormat is <link
7977 to="PixelFormat::Opaque"/> then direct access to the guest
7978 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
7979 bytesPerLine parameters must be ignored and the implementation must use
7980 the indirect mode (where it provides its own buffer in one of the
7981 supported formats). In all other cases, @a pixelFormat together with @a
7982 bitsPerPixel and @a bytesPerLine define the format of the video memory
7983 buffer pointed to by the @a VRAM parameter and the implementation is
7984 free to choose which mode to use. To indicate that this frame buffer uses
7985 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
7986 attribute must return <tt>true</tt> and <link to="#address"/> must
7987 return exactly the same address that is passed in the @a VRAM parameter
7988 of this method; otherwise it is assumed that the indirect strategy is
7989 chosen.
7990
7991 The @a width and @a height parameters represent the size of the
7992 requested display mode in both modes. In case of indirect mode, the
7993 provided memory buffer should be big enough to store data of the given
7994 display mode. In case of direct mode, it is guaranteed that the given @a
7995 VRAM buffer contains enough space to represent the display mode of the
7996 given size. Note that this frame buffer's <link to="#width"/> and <link
7997 to="#height"/> attributes must return exactly the same values as
7998 passed to this method after the resize is completed (see below).
7999
8000 The @a finished output parameter determines if the implementation has
8001 finished resizing the frame buffer or not. If, for some reason, the
8002 resize cannot be finished immediately during this call, @a finished
8003 must be set to @c false, and the implementation must call
8004 <link to="IDisplay::resizeCompleted()"/> after it has returned from
8005 this method as soon as possible. If @a finished is @c false, the
8006 machine will not call any frame buffer methods until
8007 <link to="IDisplay::resizeCompleted()"/> is called.
8008
8009 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
8010 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
8011 this frame buffer must return exactly the same values as specified in the
8012 parameters of this method, after the resize is completed. If the
8013 indirect mode is chosen, these attributes must return values describing
8014 the format of the implementation's own memory buffer <link
8015 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
8016 value must always correlate with <link to="#pixelFormat"/>. Note that
8017 the <link to="#pixelFormat"/> attribute must never return <link
8018 to="PixelFormat::Opaque"/> regardless of the selected mode.
8019
8020 <note>
8021 This method is called by the IDisplay object under the
8022 <link to="#lock()"/> provided by this IFramebuffer
8023 implementation. If this method returns @c false in @a finished, then
8024 this lock is not released until
8025 <link to="IDisplay::resizeCompleted()"/> is called.
8026 </note>
8027 </desc>
8028 <param name="screenId" type="unsigned long" dir="in">
8029 <desc>
8030 Logical screen number. Must be used in the corresponding call to
8031 <link to="IDisplay::resizeCompleted()"/> if this call is made.
8032 </desc>
8033 </param>
8034 <param name="pixelFormat" type="unsigned long" dir="in">
8035 <desc>
8036 Pixel format of the memory buffer pointed to by @a VRAM.
8037 See also <link to="FramebufferPixelFormat"/>.
8038 </desc>
8039 </param>
8040 <param name="VRAM" type="octet" mod="ptr" dir="in">
8041 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
8042 </param>
8043 <param name="bitsPerPixel" type="unsigned long" dir="in">
8044 <desc>Color depth, bits per pixel.</desc>
8045 </param>
8046 <param name="bytesPerLine" type="unsigned long" dir="in">
8047 <desc>Size of one scan line, in bytes.</desc>
8048 </param>
8049 <param name="width" type="unsigned long" dir="in">
8050 <desc>Width of the guest display, in pixels.</desc>
8051 </param>
8052 <param name="height" type="unsigned long" dir="in">
8053 <desc>Height of the guest display, in pixels.</desc>
8054 </param>
8055 <param name="finished" type="boolean" dir="return">
8056 <desc>
8057 Can the VM start using the new frame buffer immediately
8058 after this method returns or it should wait for
8059 <link to="IDisplay::resizeCompleted()"/>.
8060 </desc>
8061 </param>
8062 </method>
8063
8064 <method name="operationSupported">
8065 <desc>
8066 Returns whether the given acceleration operation is supported
8067 by the IFramebuffer implementation. If not, the display object
8068 will not attempt to call the corresponding IFramebuffer entry
8069 point. Even if an operation is indicated to supported, the
8070 IFramebuffer implementation always has the option to return non
8071 supported from the corresponding acceleration method in which
8072 case the operation will be performed by the display engine. This
8073 allows for reduced IFramebuffer implementation complexity where
8074 only common cases are handled.
8075 </desc>
8076 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
8077 <param name="supported" type="boolean" dir="return"/>
8078 </method>
8079
8080 <method name="videoModeSupported">
8081 <desc>
8082 Returns whether the frame buffer implementation is willing to
8083 support a given video mode. In case it is not able to render
8084 the video mode (or for some reason not willing), it should
8085 return false. Usually this method is called when the guest
8086 asks the VMM device whether a given video mode is supported
8087 so the information returned is directly exposed to the guest.
8088 It is important that this method returns very quickly.
8089 </desc>
8090 <param name="width" type="unsigned long" dir="in"/>
8091 <param name="height" type="unsigned long" dir="in"/>
8092 <param name="bpp" type="unsigned long" dir="in"/>
8093 <param name="supported" type="boolean" dir="return"/>
8094 </method>
8095
8096 <method name="solidFill">
8097 <desc>
8098 Fills the specified rectangle on screen with a solid color.
8099 </desc>
8100 <param name="x" type="unsigned long" dir="in"/>
8101 <param name="y" type="unsigned long" dir="in"/>
8102 <param name="width" type="unsigned long" dir="in"/>
8103 <param name="height" type="unsigned long" dir="in"/>
8104 <param name="color" type="unsigned long" dir="in"/>
8105 <param name="handled" type="boolean" dir="return"/>
8106 </method>
8107
8108 <method name="copyScreenBits">
8109 <desc>
8110 Copies specified rectangle on the screen.
8111 </desc>
8112 <param name="xDst" type="unsigned long" dir="in"/>
8113 <param name="yDst" type="unsigned long" dir="in"/>
8114 <param name="xSrc" type="unsigned long" dir="in"/>
8115 <param name="ySrc" type="unsigned long" dir="in"/>
8116 <param name="width" type="unsigned long" dir="in"/>
8117 <param name="height" type="unsigned long" dir="in"/>
8118 <param name="handled" type="boolean" dir="return"/>
8119 </method>
8120
8121 <method name="getVisibleRegion">
8122 <desc>
8123 Returns the visible region of this frame buffer.
8124
8125 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
8126 @a count parameter is ignored and the number of elements necessary to
8127 describe the current visible region is returned in @a countCopied.
8128
8129 If @a rectangles is not <tt>NULL</tt> but @a count is less
8130 than the required number of elements to store region data, the method
8131 will report a failure. If @a count is equal or greater than the
8132 required number of elements, then the actual number of elements copied
8133 to the provided array will be returned in @a countCopied.
8134
8135 <note>
8136 The address of the provided array must be in the process space of
8137 this IFramebuffer object.
8138 </note>
8139 </desc>
8140 <param name="rectangles" type="octet" mod="ptr" dir="in">
8141 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
8142 </param>
8143 <param name="count" type="unsigned long" dir="in">
8144 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8145 </param>
8146 <param name="countCopied" type="unsigned long" dir="return">
8147 <desc>Number of elements copied to the @a rectangles array.</desc>
8148 </param>
8149 </method>
8150
8151 <method name="setVisibleRegion">
8152 <desc>
8153 Suggests a new visible region to this frame buffer. This region
8154 represents the area of the VM display which is a union of regions of
8155 all top-level windows of the guest operating system running inside the
8156 VM (if the Guest Additions for this system support this
8157 functionality). This information may be used by the frontends to
8158 implement the seamless desktop integration feature.
8159
8160 <note>
8161 The address of the provided array must be in the process space of
8162 this IFramebuffer object.
8163 </note>
8164 <note>
8165 The IFramebuffer implementation must make a copy of the provided
8166 array of rectangles.
8167 </note>
8168 </desc>
8169 <param name="rectangles" type="octet" mod="ptr" dir="in">
8170 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
8171 </param>
8172 <param name="count" type="unsigned long" dir="in">
8173 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
8174 </param>
8175 </method>
8176
8177 </interface>
8178
8179 <interface
8180 name="IFramebufferOverlay" extends="IFrameBuffer"
8181 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
8182 wsmap="suppress"
8183 >
8184 <desc>
8185 The IFramebufferOverlay interface represents an alpha blended overlay
8186 for displaying status icons above an IFramebuffer. It is always created
8187 not visible, so that it must be explicitly shown. It only covers a
8188 portion of the IFramebuffer, determined by its width, height and
8189 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
8190 that order) format, and may be written to directly. Do re-read the
8191 width though, after setting it, as it may be adjusted (increased) to
8192 make it more suitable for the front end.
8193 </desc>
8194 <attribute name="x" type="unsigned long" readonly="yes">
8195 <desc>X position of the overlay, relative to the frame buffer.</desc>
8196 </attribute>
8197
8198 <attribute name="y" type="unsigned long" readonly="yes">
8199 <desc>Y position of the overlay, relative to the frame buffer.</desc>
8200 </attribute>
8201
8202 <attribute name="visible" type="boolean" readonly="no">
8203 <desc>
8204 Whether the overlay is currently visible.
8205 </desc>
8206 </attribute>
8207
8208 <attribute name="alpha" type="unsigned long" readonly="no">
8209 <desc>
8210 The global alpha value for the overlay. This may or may not be
8211 supported by a given front end.
8212 </desc>
8213 </attribute>
8214
8215 <method name="move">
8216 <desc>
8217 Changes the overlay's position relative to the IFramebuffer.
8218 </desc>
8219 <param name="x" type="unsigned long" dir="in"/>
8220 <param name="y" type="unsigned long" dir="in"/>
8221 </method>
8222
8223 </interface>
8224
8225 <interface
8226 name="IDisplay" extends="$unknown"
8227 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
8228 wsmap="suppress"
8229 >
8230 <desc>
8231 The IDisplay interface represents the virtual machine's display.
8232
8233 The object implementing this interface is contained in each
8234 <link to="IConsole::display"/> attribute and represents the visual
8235 output of the virtual machine.
8236
8237 The virtual display supports pluggable output targets represented by the
8238 IFramebuffer interface. Examples of the output target are a window on
8239 the host computer or an RDP session's display on a remote computer.
8240 </desc>
8241 <attribute name="width" type="unsigned long" readonly="yes">
8242 <desc>Current display width.</desc>
8243 </attribute>
8244
8245 <attribute name="height" type="unsigned long" readonly="yes">
8246 <desc>Current display height.</desc>
8247 </attribute>
8248
8249 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8250 <desc>
8251 Current guest display color depth. Note that this may differ
8252 from <link to="IFramebuffer::bitsPerPixel"/>.
8253 </desc>
8254 </attribute>
8255
8256 <method name="setupInternalFramebuffer">
8257 <desc>
8258 Prepares an internally managed frame buffer.
8259 </desc>
8260 <param name="depth" type="unsigned long" dir="in"/>
8261 </method>
8262
8263 <method name="lockFramebuffer">
8264 <desc>
8265 Requests access to the internal frame buffer.
8266 </desc>
8267 <param name="address" type="octet" mod="ptr" dir="return"/>
8268 </method>
8269
8270 <method name="unlockFramebuffer">
8271 <desc>
8272 Releases access to the internal frame buffer.
8273 </desc>
8274 </method>
8275
8276 <method name="registerExternalFramebuffer">
8277 <desc>
8278 Registers an external frame buffer.
8279 </desc>
8280 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8281 </method>
8282
8283 <method name="setFramebuffer">
8284 <desc>
8285 Sets the framebuffer for given screen.
8286 </desc>
8287 <param name="screenId" type="unsigned long" dir="in"/>
8288 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8289 </method>
8290
8291 <method name="getFramebuffer">
8292 <desc>
8293 Queries the framebuffer for given screen.
8294 </desc>
8295 <param name="screenId" type="unsigned long" dir="in"/>
8296 <param name="framebuffer" type="IFramebuffer" dir="out"/>
8297 <param name="xOrigin" type="long" dir="out"/>
8298 <param name="yOrigin" type="long" dir="out"/>
8299 </method>
8300
8301 <method name="setVideoModeHint">
8302 <desc>
8303 Asks VirtualBox to request the given video mode from
8304 the guest. This is just a hint and it cannot be guaranteed
8305 that the requested resolution will be used. Guest Additions
8306 are required for the request to be seen by guests. The caller
8307 should issue the request and wait for a resolution change and
8308 after a timeout retry.
8309
8310 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
8311 parameters means that the corresponding values should be taken from the
8312 current video mode (i.e. left unchanged).
8313
8314 If the guest OS supports multi-monitor configuration then the @a display
8315 parameter specifies the number of the guest display to send the hint to:
8316 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
8317 so on. If the multi-monitor configuration is not supported, @a display
8318 must be <tt>0</tt>.
8319
8320 </desc>
8321 <param name="width" type="unsigned long" dir="in"/>
8322 <param name="height" type="unsigned long" dir="in"/>
8323 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
8324 <param name="display" type="unsigned long" dir="in"/>
8325 </method>
8326
8327 <method name="setSeamlessMode">
8328 <desc>
8329 Enables or disables seamless guest display rendering (seamless desktop
8330 integration) mode.
8331 <note>
8332 Calling this method has no effect if <link
8333 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
8334 </note>
8335 </desc>
8336 <param name="enabled" type="boolean" dir="in"/>
8337 </method>
8338
8339 <method name="takeScreenShot">
8340 <desc>
8341 Takes a screen shot of the requested size and copies it to the
8342 32-bpp buffer allocated by the caller.
8343 </desc>
8344 <param name="address" type="octet" mod="ptr" dir="in"/>
8345 <param name="width" type="unsigned long" dir="in"/>
8346 <param name="height" type="unsigned long" dir="in"/>
8347 </method>
8348
8349 <method name="drawToScreen">
8350 <desc>
8351 Draws a 32-bpp image of the specified size from the given buffer
8352 to the given point on the VM display.
8353 </desc>
8354 <param name="address" type="octet" mod="ptr" dir="in"/>
8355 <param name="x" type="unsigned long" dir="in"/>
8356 <param name="y" type="unsigned long" dir="in"/>
8357 <param name="width" type="unsigned long" dir="in"/>
8358 <param name="height" type="unsigned long" dir="in"/>
8359 </method>
8360
8361 <method name="invalidateAndUpdate">
8362 <desc>
8363 Does a full invalidation of the VM display and instructs the VM
8364 to update it.
8365 </desc>
8366 </method>
8367
8368 <method name="resizeCompleted">
8369 <desc>
8370 Signals that a framebuffer has completed the resize operation.
8371 </desc>
8372 <param name="screenId" type="unsigned long" dir="in"/>
8373 </method>
8374
8375 <method name="updateCompleted">
8376 <desc>
8377 Signals that a framebuffer has completed the update operation.
8378 </desc>
8379 </method>
8380
8381 </interface>
8382
8383 <!--
8384 // INetworkAdapter
8385 /////////////////////////////////////////////////////////////////////////
8386 -->
8387
8388 <enum
8389 name="NetworkAttachmentType"
8390 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
8391 >
8392 <desc>
8393 Network attachment type.
8394 </desc>
8395
8396 <const name="Null" value="0">
8397 <desc><tt>null</tt> value. Also means "not attached".</desc>
8398 </const>
8399 <const name="NAT" value="1"/>
8400 <const name="HostInterface" value="2"/>
8401 <const name="Internal" value="3"/>
8402 </enum>
8403
8404 <enum
8405 name="NetworkAdapterType"
8406 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
8407 >
8408 <desc>
8409 Network adapter type.
8410 </desc>
8411
8412 <const name="Null" value="0">
8413 <desc><tt>null</tt> value. Never used by the API.</desc>
8414 </const>
8415 <const name="Am79C970A" value="1"/>
8416 <const name="Am79C973" value="2"/>
8417 <const name="I82540EM" value="3"/>
8418 <const name="I82543GC" value="4"/>
8419 </enum>
8420
8421 <interface
8422 name="INetworkAdapter" extends="$unknown"
8423 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
8424 wsmap="managed"
8425 >
8426 <attribute name="adapterType" type="NetworkAdapterType">
8427 <desc>
8428 Type of the virtual network adapter. Depending on this value,
8429 VirtualBox will provide a different virtual network hardware
8430 to the guest.
8431 </desc>
8432 </attribute>
8433
8434 <attribute name="slot" type="unsigned long" readonly="yes">
8435 <desc>
8436 Slot number this adapter is plugged into. Corresponds to
8437 the value you pass to <link to="IMachine::getNetworkAdapter"/>
8438 to obtain this instance.
8439 </desc>
8440 </attribute>
8441
8442 <attribute name="enabled" type="boolean">
8443 <desc>
8444 Flag whether the network adapter is present in the
8445 guest system. If disabled, the virtual guest hardware will
8446 not contain this network adapter. Can only be changed when
8447 the VM is not running.
8448 </desc>
8449 </attribute>
8450
8451 <attribute name="MACAddress" type="wstring">
8452 <desc>
8453 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
8454 it to NULL, VirtualBox will generate a unique MAC address.
8455 </desc>
8456 </attribute>
8457
8458 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
8459
8460 <attribute name="hostInterface" type="wstring">
8461 <desc>
8462 Name of the Host Network Interface that is currently in use. NULL will be returned
8463 if no device has been allocated. On Linux, setting this refers to a permanent TAP
8464 device. However, a file descriptor has precedence over the interface name on Linux.
8465 Note that when VirtualBox allocates a TAP device, this property will not be set, i.e. the
8466 interface name would have to be determined using the file descriptor and /proc/self/fd.
8467 </desc>
8468 </attribute>
8469
8470<if target="xpidl">
8471 <attribute name="TAPFileDescriptor" type="long">
8472 <desc>
8473 File descriptor of the TAP device. It can either be setup by the caller
8474 which has to supply an existing valid file handle allocated in the parent
8475 process of the VM process or allocated by VirtualBox. The value is -1 if it
8476 has not been defined. This property is non persistent, i.e. it will not be
8477 stored in the VM's configuration data and thus has to be set at each startup.
8478 </desc>
8479 </attribute>
8480 <attribute name="TAPSetupApplication" type="wstring">
8481 <desc>
8482 Application to start to configure the TAP device.
8483 It is being passed two parameters, 1) the file handle (as ASCII),
8484 2) the TAP device name if it is available.
8485 </desc>
8486 </attribute>
8487 <attribute name="TAPTerminateApplication" type="wstring">
8488 <desc>
8489 Application to start before closing a TAP device.
8490 It is being passed two parameters, 1) the file handle (as ASCII),
8491 2) the TAP device name if it is available.
8492 </desc>
8493 </attribute>
8494</if>
8495
8496 <attribute name="internalNetwork" type="wstring">
8497 <desc>
8498 Name of the internal network the VM is attached to.
8499 </desc>
8500 </attribute>
8501
8502 <attribute name="NATNetwork" type="wstring">
8503 <desc>
8504 Name of the NAT network the VM is attached to.
8505 </desc>
8506 </attribute>
8507
8508 <attribute name="cableConnected" type="boolean">
8509 <desc>
8510 Flag whether the adapter reports the cable as connected or not.
8511 It can be used to report offline situations to a VM.
8512 </desc>
8513 </attribute>
8514
8515 <attribute name="lineSpeed" type="unsigned long">
8516 <desc>
8517 Line speed reported by custom drivers, in units of 1 kbps.
8518 </desc>
8519 </attribute>
8520
8521 <attribute name="traceEnabled" type="boolean">
8522 <desc>
8523 Flag whether network traffic from/to the network card should be traced.
8524 Can only be toggled when the VM is turned off.
8525 </desc>
8526 </attribute>
8527
8528 <attribute name="traceFile" type="wstring">
8529 <desc>
8530 Filename where a network trace will be stored. If not set, VBox-pid.pcap
8531 will be used.
8532 </desc>
8533 </attribute>
8534
8535 <method name="attachToNAT">
8536 <desc>
8537 Attach the network adapter to the Network Address Translation (NAT) interface.
8538 </desc>
8539 </method>
8540
8541 <method name="attachToHostInterface">
8542 <desc>
8543 Attach the network adapter to a host interface. On Linux, the TAP
8544 setup application will be executed if configured and unless a device
8545 name and/or file descriptor has been set, a new TAP interface will be
8546 created.
8547 </desc>
8548 </method>
8549
8550 <method name="attachToInternalNetwork">
8551 <desc>
8552 Attach the network adapter to an internal network.
8553 </desc>
8554 </method>
8555
8556 <method name="detach">
8557 <desc>
8558 Detach the network adapter
8559 </desc>
8560 </method>
8561 </interface>
8562
8563
8564 <!--
8565 // ISerialPort
8566 /////////////////////////////////////////////////////////////////////////
8567 -->
8568
8569 <enum
8570 name="PortMode"
8571 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
8572 >
8573 <desc>
8574 The PortMode enumeration represents possible communication modes for
8575 the virtual serial port device.
8576 </desc>
8577
8578 <const name="Disconnected" value="0">
8579 <desc>Virtual device is not attached to any real host device.</desc>
8580 </const>
8581 <const name="HostPipe" value="1">
8582 <desc>Virtual device is attached to a host pipe.</desc>
8583 </const>
8584 <const name="HostDevice" value="2">
8585 <desc>Virtual device is attached to a host device.</desc>
8586 </const>
8587 </enum>
8588
8589 <interface
8590 name="ISerialPort" extends="$unknown"
8591 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
8592 wsmap="managed"
8593 >
8594
8595 <desc>
8596 The ISerialPort interface represents the virtual serial port device.
8597
8598 The virtual serial port device acts like an ordinary serial port
8599 inside the virtual machine. This device communicates to the real
8600 serial port hardware in one of two modes: host pipe or host device.
8601
8602 In host pipe mode, the #path attribute specifies the path to the pipe on
8603 the host computer that represents a serial port. The #server attribute
8604 determines if this pipe is created by the virtual machine process at
8605 machine startup or it must already exist before starting machine
8606 execution.
8607
8608 In host device mode, the #path attribute specifies the name of the
8609 serial port device on the host computer.
8610
8611 There is also a third communication mode: the disconnected mode. In this
8612 mode, the guest OS running inside the virtual machine will be able to
8613 detect the serial port, but all port write operations will be discarded
8614 and all port read operations will return no data.
8615
8616 <see>IMachine::getSerialPort</see>
8617 </desc>
8618
8619 <attribute name="slot" type="unsigned long" readonly="yes">
8620 <desc>
8621 Slot number this serial port is plugged into. Corresponds to
8622 the value you pass to <link to="IMachine::getSerialPort"/>
8623 to obtain this instance.
8624 </desc>
8625 </attribute>
8626
8627 <attribute name="enabled" type="boolean">
8628 <desc>
8629 Flag whether the serial port is enabled. If disabled,
8630 the serial port will not be reported to the guest OS.
8631 </desc>
8632 </attribute>
8633
8634 <attribute name="IOBase" type="unsigned long">
8635 <desc>Base I/O address of the serial port.</desc>
8636 </attribute>
8637
8638 <attribute name="IRQ" type="unsigned long">
8639 <desc>IRQ number of the serial port.</desc>
8640 </attribute>
8641
8642 <attribute name="hostMode" type="PortMode">
8643 <desc>How is this port connected to the host.</desc>
8644 </attribute>
8645
8646 <attribute name="server" type="boolean">
8647 <desc>
8648 Flag whether this serial port acts as a server (creates a new pipe on
8649 the host) or as a client (uses the existing pipe). This attribute is
8650 used only when <link to="#hostMode"/> is PortMode::HostPipe.
8651 </desc>
8652 </attribute>
8653
8654 <attribute name="path" type="wstring">
8655 <desc>
8656 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
8657 PortMode::HostPipe, or the host serial device name when
8658 <link to="#hostMode"/> is PortMode::HostDevice. In either of the above
8659 cases, setting a @c null or an empty string as the attribute's value
8660 will result into an error. Otherwise, the value of this property is
8661 ignored.
8662 </desc>
8663 </attribute>
8664
8665 </interface>
8666
8667 <!--
8668 // IParallelPort
8669 /////////////////////////////////////////////////////////////////////////
8670 -->
8671
8672 <interface
8673 name="IParallelPort" extends="$unknown"
8674 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
8675 wsmap="managed"
8676 >
8677
8678 <desc>
8679 The IParallelPort interface represents the virtual parallel port device.
8680
8681 The virtual parallel port device acts like an ordinary parallel port
8682 inside the virtual machine. This device communicates to the real
8683 parallel port hardware using the name of the parallel device on the host
8684 computer specified in the #path attribute.
8685
8686 Each virtual parallel port device is assigned a base I/O address and an
8687 IRQ number that will be reported to the guest operating system and used
8688 to operate the given parallel port from within the virtual machine.
8689
8690 <see>IMachine::getParallelPort</see>
8691 </desc>
8692
8693 <attribute name="slot" type="unsigned long" readonly="yes">
8694 <desc>
8695 Slot number this parallel port is plugged into. Corresponds to
8696 the value you pass to <link to="IMachine::getParallelPort"/>
8697 to obtain this instance.
8698 </desc>
8699 </attribute>
8700
8701 <attribute name="enabled" type="boolean">
8702 <desc>
8703 Flag whether the parallel port is enabled. If disabled,
8704 the parallel port will not be reported to the guest OS.
8705 </desc>
8706 </attribute>
8707
8708 <attribute name="IOBase" type="unsigned long">
8709 <desc>Base I/O address of the parallel port.</desc>
8710 </attribute>
8711
8712 <attribute name="IRQ" type="unsigned long">
8713 <desc>IRQ number of the parallel port.</desc>
8714 </attribute>
8715
8716 <attribute name="path" type="wstring">
8717 <desc>
8718 Host parallel device name. If this parallel port is enabled, setting a
8719 @c null or an empty string as this attribute's value will result into
8720 an error.
8721 </desc>
8722 </attribute>
8723
8724 </interface>
8725
8726
8727 <!--
8728 // IMachineDebugger
8729 /////////////////////////////////////////////////////////////////////////
8730 -->
8731
8732 <interface
8733 name="IMachineDebugger" extends="$unknown"
8734 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
8735 wsmap="suppress"
8736 >
8737 <method name="resetStats">
8738 <desc>
8739 Reset VM statistics.
8740 </desc>
8741 <param name="pattern" type="wstring" dir="in">
8742 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8743 </param>
8744 </method>
8745
8746 <method name="dumpStats">
8747 <desc>
8748 Dumps VM statistics.
8749 </desc>
8750 <param name="pattern" type="wstring" dir="in">
8751 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8752 </param>
8753 </method>
8754
8755 <method name="getStats">
8756 <desc>
8757 Get the VM statistics in a XMLish format.
8758 </desc>
8759 <param name="pattern" type="wstring" dir="in">
8760 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8761 </param>
8762 <param name="withDescriptions" type="boolean" dir="in">
8763 <desc>Whether to include the descriptions.</desc>
8764 </param>
8765 <param name="stats" type="wstring" dir="out">
8766 <desc>The XML document containing the statistics.</desc>
8767 </param>
8768 </method>
8769
8770 <method name="injectNMI">
8771 <desc>
8772 Inject an NMI into a running VT-x/AMD-V VM.
8773 </desc>
8774 </method>
8775
8776 <attribute name="singlestep" type="boolean">
8777 <desc>Switch for enabling singlestepping.</desc>
8778 </attribute>
8779
8780 <attribute name="recompileUser" type="boolean">
8781 <desc>Switch for forcing code recompilation for user mode code.</desc>
8782 </attribute>
8783
8784 <attribute name="recompileSupervisor" type="boolean">
8785 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
8786 </attribute>
8787
8788 <attribute name="PATMEnabled" type="boolean">
8789 <desc>Switch for enabling and disabling the PATM component.</desc>
8790 </attribute>
8791
8792 <attribute name="CSAMEnabled" type="boolean">
8793 <desc>Switch for enabling and disabling the CSAM component.</desc>
8794 </attribute>
8795
8796 <attribute name="logEnabled" type="boolean">
8797 <desc>Switch for enabling and disabling logging.</desc>
8798 </attribute>
8799
8800 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
8801 <desc>
8802 Flag indicating whether the VM is currently making use of CPU hardware
8803 virtualization extensions.
8804 </desc>
8805 </attribute>
8806
8807 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
8808 <desc>
8809 Flag indicating whether the VM is currently making use of the nested paging
8810 CPU hardware virtualization extension.
8811 </desc>
8812 </attribute>
8813
8814 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
8815 <desc>
8816 Flag indicating whether the VM is currently making use of the VPID
8817 VT-x extension.
8818 </desc>
8819 </attribute>
8820
8821 <attribute name="PAEEnabled" type="boolean" readonly="yes">
8822 <desc>
8823 Flag indicating whether the VM is currently making use of the Physical
8824 Address Extension CPU feature.
8825 </desc>
8826 </attribute>
8827
8828 <attribute name="virtualTimeRate" type="unsigned long">
8829 <desc>
8830 The rate at which the virtual time runs expressed as a percentage.
8831 The accepted range is 2% to 20000%.
8832 </desc>
8833 </attribute>
8834
8835 <!-- @todo method for setting log flags, groups and destination! -->
8836
8837 <attribute name="VM" type="unsigned long long" readonly="yes">
8838 <desc>
8839 Gets the VM handle. This is only for internal use while
8840 we carve the details of this interface.
8841 </desc>
8842 </attribute>
8843
8844 </interface>
8845
8846 <!--
8847 // IUSBController
8848 /////////////////////////////////////////////////////////////////////////
8849 -->
8850
8851 <interface
8852 name="IUSBController" extends="$unknown"
8853 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
8854 wsmap="managed"
8855 >
8856 <attribute name="enabled" type="boolean">
8857 <desc>
8858 Flag whether the USB controller is present in the
8859 guest system. If disabled, the virtual guest hardware will
8860 not contain any USB controller. Can only be changed when
8861 the VM is powered off.
8862 </desc>
8863 </attribute>
8864
8865 <attribute name="enabledEhci" type="boolean">
8866 <desc>
8867 Flag whether the USB EHCI controller is present in the
8868 guest system. If disabled, the virtual guest hardware will
8869 not contain a USB EHCI controller. Can only be changed when
8870 the VM is powered off.
8871 </desc>
8872 </attribute>
8873
8874 <attribute name="USBStandard" type="unsigned short" readonly="yes">
8875 <desc>
8876 USB standard version which the controller implements.
8877 This is a BCD which means that the major version is in the
8878 high byte and minor version is in the low byte.
8879 </desc>
8880 </attribute>
8881
8882 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
8883 <desc>
8884 List of USB device filters associated with the machine.
8885
8886 If the machine is currently running, these filters are activated
8887 every time a new (supported) USB device is attached to the host
8888 computer that was not ignored by global filters
8889 (<link to="IHost::USBDeviceFilters"/>).
8890
8891 These filters are also activated when the machine is powered up.
8892 They are run against a list of all currently available USB
8893 devices (in states
8894 <link to="USBDeviceState::Available">Available</link>,
8895 <link to="USBDeviceState::Busy">Busy</link>,
8896 <link to="USBDeviceState::Held">Held</link>) that were not previously
8897 ignored by global filters.
8898
8899 If at least one filter matches the USB device in question, this
8900 device is automatically captured (attached to) the virtual USB
8901 controller of this machine.
8902
8903 <see>IUSBDeviceFilter, ::IUSBController</see>
8904 </desc>
8905 </attribute>
8906
8907 <method name="createDeviceFilter">
8908 <desc>
8909 Creates a new USB device filter. All attributes except
8910 the filter name are set to <tt>null</tt> (any match),
8911 <i>active</i> is <tt>false</tt> (the filter is not active).
8912
8913 The created filter can then be added to the list of filters using
8914 <link to="#insertDeviceFilter()"/>.
8915
8916 <see>#deviceFilters</see>
8917 </desc>
8918 <param name="name" type="wstring" dir="in">
8919 <desc>
8920 Filter name. See <link to="IUSBDeviceFilter::name"/>
8921 for more info.
8922 </desc>
8923 </param>
8924 <param name="filter" type="IUSBDeviceFilter" dir="return">
8925 <desc>Created filter object.</desc>
8926 </param>
8927 </method>
8928
8929 <method name="insertDeviceFilter">
8930 <desc>
8931 Inserts the given USB device to the specified position
8932 in the list of filters.
8933
8934 Positions are numbered starting from <tt>0</tt>. If the specified
8935 position is equal to or greater than the number of elements in
8936 the list, the filter is added to the end of the collection.
8937
8938 <note>
8939 Duplicates are not allowed, so an attempt to insert a
8940 filter that is already in the collection, will return an
8941 error.
8942 </note>
8943
8944 <see>#deviceFilters</see>
8945 </desc>
8946 <param name="position" type="unsigned long" dir="in">
8947 <desc>Position to insert the filter to.</desc>
8948 </param>
8949 <param name="filter" type="IUSBDeviceFilter" dir="in">
8950 <desc>USB device filter to insert.</desc>
8951 </param>
8952 </method>
8953
8954 <method name="removeDeviceFilter">
8955 <desc>
8956 Removes a USB device filter from the specified position in the
8957 list of filters.
8958
8959 Positions are numbered starting from <tt>0</tt>. Specifying a
8960 position equal to or greater than the number of elements in
8961 the list will produce an error.
8962
8963 <see>#deviceFilters</see>
8964 </desc>
8965 <param name="position" type="unsigned long" dir="in">
8966 <desc>Position to remove the filter from.</desc>
8967 </param>
8968 <param name="filter" type="IUSBDeviceFilter" dir="return">
8969 <desc>Removed USB device filter.</desc>
8970 </param>
8971 </method>
8972
8973 </interface>
8974
8975
8976 <!--
8977 // IUSBDevice
8978 /////////////////////////////////////////////////////////////////////////
8979 -->
8980
8981 <enumerator
8982 name="IUSBDeviceEnumerator" type="IUSBDevice"
8983 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
8984 />
8985
8986 <collection
8987 name="IUSBDeviceCollection" type="IUSBDevice"
8988 enumerator="IUSBDeviceEnumerator"
8989 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
8990 readonly="yes"
8991 >
8992 <method name="findById">
8993 <desc>
8994 Searches this collection for a USB device with the given UUID.
8995 <note>
8996 The method returns an error if the given UUID does not
8997 correspond to any USB device in the collection.
8998 </note>
8999 <see>IUSBDevice::id</see>
9000 </desc>
9001 <param name="id" type="uuid" dir="in">
9002 <desc>UUID of the USB device to search for.</desc>
9003 </param>
9004 <param name="device" type="IUSBDevice" dir="return">
9005 <desc>Found USB device object.</desc>
9006 </param>
9007 </method>
9008
9009 <method name="findByAddress">
9010 <desc>
9011 Searches this collection for a USB device with the given
9012 host address.
9013 <note>
9014 The method returns an error if the given address does not
9015 correspond to any USB device in the collection.
9016 </note>
9017 <see>IUSBDevice::address</see>
9018 </desc>
9019 <param name="name" type="wstring" dir="in">
9020 <desc>
9021 Address of the USB device (as assigned by the host) to
9022 search for.
9023 </desc>
9024 </param>
9025 <param name="device" type="IUSBDevice" dir="return">
9026 <desc>Found USB device object.</desc>
9027 </param>
9028 </method>
9029
9030 </collection>
9031
9032 <interface
9033 name="IUSBDevice" extends="$unknown"
9034 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
9035 wsmap="managed"
9036 >
9037 <desc>
9038 The IUSBDevice interface represents a virtual USB device attached to the
9039 virtual machine.
9040
9041 A collection of objects implementing this interface is stored in the
9042 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
9043 attached to a running virtual machine's USB controller.
9044 </desc>
9045
9046 <attribute name="id" type="uuid" readonly="yes">
9047 <desc>
9048 Unique USB device ID. This ID is built from #vendorId,
9049 #productId, #revision and #serialNumber.
9050 </desc>
9051 </attribute>
9052
9053 <attribute name="vendorId" type="unsigned short" readonly="yes">
9054 <desc>Vendor ID.</desc>
9055 </attribute>
9056
9057 <attribute name="productId" type="unsigned short" readonly="yes">
9058 <desc>Product ID.</desc>
9059 </attribute>
9060
9061 <attribute name="revision" type="unsigned short" readonly="yes">
9062 <desc>
9063 Product revision number. This is a packed BCD represented as
9064 unsigned short. The high byte is the integer part and the low
9065 byte is the decimal.
9066 </desc>
9067 </attribute>
9068
9069 <attribute name="manufacturer" type="wstring" readonly="yes">
9070 <desc>Manufacturer string.</desc>
9071 </attribute>
9072
9073 <attribute name="product" type="wstring" readonly="yes">
9074 <desc>Product string.</desc>
9075 </attribute>
9076
9077 <attribute name="serialNumber" type="wstring" readonly="yes">
9078 <desc>Serial number string.</desc>
9079 </attribute>
9080
9081 <attribute name="address" type="wstring" readonly="yes">
9082 <desc>Host specific address of the device.</desc>
9083 </attribute>
9084
9085 <attribute name="port" type="unsigned short" readonly="yes">
9086 <desc>
9087 Host USB port number the device is physically
9088 connected to.
9089 </desc>
9090 </attribute>
9091
9092 <attribute name="version" type="unsigned short" readonly="yes">
9093 <desc>
9094 The major USB version of the device - 1 or 2.
9095 </desc>
9096 </attribute>
9097
9098 <attribute name="portVersion" type="unsigned short" readonly="yes">
9099 <desc>
9100 The major USB version of the host USB port the device is
9101 physically connected to - 1 or 2. For devices not connected to
9102 anything this will have the same value as the version attribute.
9103 </desc>
9104 </attribute>
9105
9106 <attribute name="remote" type="boolean" readonly="yes">
9107 <desc>
9108 Whether the device is physically connected to a remote VRDP
9109 client or to a local host machine.
9110 </desc>
9111 </attribute>
9112
9113 </interface>
9114
9115
9116 <!--
9117 // IUSBDeviceFilter
9118 /////////////////////////////////////////////////////////////////////////
9119 -->
9120
9121 <enumerator
9122 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
9123 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
9124 />
9125
9126 <collection
9127 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
9128 enumerator="IUSBDeviceFilterEnumerator"
9129 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
9130 readonly="yes"
9131 />
9132
9133 <interface
9134 name="IUSBDeviceFilter" extends="$unknown"
9135 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
9136 wsmap="managed"
9137 >
9138 <desc>
9139 The IUSBDeviceFilter interface represents an USB device filter used
9140 to perform actions on a group of USB devices.
9141
9142 This type of filters is used by running virtual machines to
9143 automatically capture selected USB devices once they are physically
9144 attached to the host computer.
9145
9146 A USB device is matched to the given device filter if and only if all
9147 attributes of the device match the corresponding attributes of the
9148 filter (that is, attributes are joined together using the logical AND
9149 operation). On the other hand, all together, filters in the list of
9150 filters carry the semantics of the logical OR operation. So if it is
9151 desirable to create a match like "this vendor id OR this product id",
9152 one needs to create two filters and specify "any match" (see below)
9153 for unused attributes.
9154
9155 All filter attributes used for matching are strings. Each string
9156 is an expression representing a set of values of the corresponding
9157 device attribute, that will match the given filter. Currently, the
9158 following filtering expressions are supported:
9159
9160 <ul>
9161 <li><i>Interval filters</i>. Used to specify valid intervals for
9162 integer device attributes (Vendor ID, Product ID and Revision).
9163 The format of the string is:
9164
9165 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
9166
9167 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
9168 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
9169 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
9170 is omitted before a dash (<tt>-</tt>), the minimum possible integer
9171 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
9172 possible integer is assumed.
9173 </li>
9174 <li><i>Boolean filters</i>. Used to specify acceptable values for
9175 boolean device attributes. The format of the string is:
9176
9177 <tt>true|false|yes|no|0|1</tt>
9178
9179 </li>
9180 <li><i>Exact match</i>. Used to specify a single value for the given
9181 device attribute. Any string that doesn't start with <tt>int:</tt>
9182 represents the exact match. String device attributes are compared to
9183 this string including case of symbols. Integer attributes are first
9184 converted to a string (see individual filter attributes) and then
9185 compared ignoring case.
9186
9187 </li>
9188 <li><i>Any match</i>. Any value of the corresponding device attribute
9189 will match the given filter. An empty or <tt>null</tt> string is
9190 used to construct this type of filtering expressions.
9191
9192 </li>
9193 </ul>
9194
9195 <note>
9196 On the Windows host platform, interval filters are not currently
9197 available. Also all string filter attributes
9198 (<link to="#manufacturer"/>, <link to="#product"/>,
9199 <link to="#serialNumber"/>) are ignored, so they behave as
9200 <i>any match</i> no matter what string expression is specified.
9201 </note>
9202
9203 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
9204 </desc>
9205
9206 <attribute name="name" type="wstring">
9207 <desc>
9208 Visible name for this filter.
9209 This name is used to visually distinguish one filter from another,
9210 so it can neither be <tt>null</tt> nor an empty string.
9211 </desc>
9212 </attribute>
9213
9214 <attribute name="active" type="boolean">
9215 <desc>Whether this filter active or has been temporarily disabled.</desc>
9216 </attribute>
9217
9218 <attribute name="vendorId" type="wstring">
9219 <desc>
9220 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
9221 The string representation for the <i>exact matching</i>
9222 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9223 (including leading zeroes).
9224 </desc>
9225 </attribute>
9226
9227 <attribute name="productId" type="wstring">
9228 <desc>
9229 <link to="IUSBDevice::productId">Product ID</link> filter.
9230 The string representation for the <i>exact matching</i>
9231 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
9232 (including leading zeroes).
9233 </desc>
9234 </attribute>
9235
9236 <attribute name="revision" type="wstring">
9237 <desc>
9238 <link to="IUSBDevice::productId">Product revision number</link>
9239 filter. The string representation for the <i>exact matching</i>
9240 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
9241 of the integer part of the revision, and <tt>F</tt> is the
9242 decimal digit of its fractional part (including leading and
9243 trailing zeros).
9244 Note that for interval filters, it's best to use the hexadecimal
9245 form, because the revision is stored as a 16 bit packed BCD value;
9246 so the expression <tt>int:0x0100-0x0199</tt> will match any
9247 revision from <tt>1.0</tt> to <tt>1.99</tt>.
9248 </desc>
9249 </attribute>
9250
9251 <attribute name="manufacturer" type="wstring">
9252 <desc>
9253 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
9254 </desc>
9255 </attribute>
9256
9257 <attribute name="product" type="wstring">
9258 <desc>
9259 <link to="IUSBDevice::product">Product</link> filter.
9260 </desc>
9261 </attribute>
9262
9263 <attribute name="serialNumber" type="wstring">
9264 <desc>
9265 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
9266 </desc>
9267 </attribute>
9268
9269 <attribute name="port" type="wstring">
9270 <desc>
9271 <link to="IUSBDevice::port">Host USB port</link> filter.
9272 </desc>
9273 </attribute>
9274
9275 <attribute name="remote" type="wstring">
9276 <desc>
9277 <link to="IUSBDevice::remote">Remote state</link> filter.
9278 <note>
9279 This filter makes sense only for machine USB filters,
9280 i.e. it is ignored by IHostUSBDeviceFilter objects.
9281 </note>
9282 </desc>
9283 </attribute>
9284
9285 <attribute name="maskedInterfaces" type="unsigned long">
9286 <desc>
9287 This is an advanced option for hiding one or more USB interfaces
9288 from the guest. The value is a bit mask where the bits that are set
9289 means the corresponding USB interface should be hidden, masked off
9290 if you like.
9291 This feature only works on Linux hosts.
9292 </desc>
9293 </attribute>
9294
9295 </interface>
9296
9297
9298 <!--
9299 // IHostUSBDevice
9300 /////////////////////////////////////////////////////////////////////////
9301 -->
9302
9303 <enum
9304 name="USBDeviceState"
9305 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
9306 >
9307 <desc>
9308 USB device state. This enumeration represents all possible states
9309 of the USB device physically attached to the host computer regarding
9310 its state on the host computer and availability to guest computers
9311 (all currently running virtual machines).
9312
9313 Once a supported USB device is attached to the host, global USB
9314 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
9315 either ignore the device, or put it to #Held state, or do nothing. Unless
9316 the device is ignored by global filters, filters of all currently running
9317 guests (<link to="IUSBController::deviceFilters"/>) are activated that can
9318 put it to #Captured state.
9319
9320 If the device was ignored by global filters, or didn't match
9321 any filters at all (including guest ones), it is handled by the host
9322 in a normal way. In this case, the device state is determined by
9323 the host and can be one of #Unavailable, #Busy or #Available, depending on
9324 the current device usage.
9325
9326 Besides auto-capturing based on filters, the device can be manually
9327 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
9328 state is #Busy, #Available or #Held.
9329
9330 <note>
9331 Due to differences in USB stack implementations in Linux and Win32,
9332 states #Busy and #Available are applicable only to the Linux version of
9333 the product. This also means that (<link
9334 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if
9335 the device state is #Held.
9336 </note>
9337
9338 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
9339 </desc>
9340
9341 <const name="NotSupported" value="0">
9342 <desc>
9343 Not supported by the VirtualBox server, not available to guests.
9344 </desc>
9345 </const>
9346 <const name="Unavailable" value="1">
9347 <desc>
9348 Being used by the host computer exclusively,
9349 not available to guests.
9350 </desc>
9351 </const>
9352 <const name="Busy" value="2">
9353 <desc>
9354 Being used by the host computer, potentially available to guests.
9355 </desc>
9356 </const>
9357 <const name="Available" value="3">
9358 <desc>
9359 Not used by the host computer, available to guests.
9360 The host computer can also start using the device at any time.
9361 </desc>
9362 </const>
9363 <const name="Held" value="4">
9364 <desc>
9365 Held by the VirtualBox server (ignored by the host computer),
9366 available to guests.
9367 </desc>
9368 </const>
9369 <const name="Captured" value="5">
9370 <desc>
9371 Captured by one of the guest computers, not available
9372 to anybody else.
9373 </desc>
9374 </const>
9375 </enum>
9376
9377 <enumerator
9378 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
9379 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
9380 />
9381
9382 <collection
9383 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
9384 enumerator="IHostUSBDeviceEnumerator"
9385 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
9386 readonly="yes"
9387 >
9388 <method name="findById">
9389 <desc>
9390 Searches this collection for a USB device with the given UUID.
9391 <note>
9392 The method returns an error if the given UUID does not
9393 correspond to any USB device in the collection.
9394 </note>
9395 <see>IHostUSBDevice::id</see>
9396 </desc>
9397 <param name="id" type="uuid" dir="in">
9398 <desc>UUID of the USB device to search for.</desc>
9399 </param>
9400 <param name="device" type="IHostUSBDevice" dir="return">
9401 <desc>Found USB device object.</desc>
9402 </param>
9403 </method>
9404
9405 <method name="findByAddress">
9406 <desc>
9407 Searches this collection for a USB device with the given
9408 host address.
9409 <note>
9410 The method returns an error if the given address does not
9411 correspond to any USB device in the collection.
9412 </note>
9413 <see>IHostUSBDevice::address</see>
9414 </desc>
9415 <param name="name" type="wstring" dir="in">
9416 <desc>
9417 Address of the USB device (as assigned by the host) to
9418 search for.
9419 </desc>
9420 </param>
9421 <param name="device" type="IHostUSBDevice" dir="return">
9422 <desc>Found USB device object.</desc>
9423 </param>
9424 </method>
9425
9426 </collection>
9427
9428 <interface
9429 name="IHostUSBDevice" extends="IUSBDevice"
9430 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
9431 wsmap="managed"
9432 >
9433 <desc>
9434 The IHostUSBDevice interface represents a physical USB device attached
9435 to the host computer.
9436
9437 Besides properties inherited from IUSBDevice, this interface adds the
9438 <link to="#state"/> property that holds the current state of the USB
9439 device.
9440
9441 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
9442 </desc>
9443
9444 <attribute name="state" type="USBDeviceState" readonly="yes">
9445 <desc>
9446 Current state of the device.
9447 </desc>
9448 </attribute>
9449
9450 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
9451
9452 </interface>
9453
9454
9455 <!--
9456 // IHostUSBDeviceFilter
9457 /////////////////////////////////////////////////////////////////////////
9458 -->
9459
9460 <enum
9461 name="USBDeviceFilterAction"
9462 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
9463 >
9464 <desc>
9465 Actions for host USB device filters.
9466 <see>IHostUSBDeviceFilter, USBDeviceState</see>
9467 </desc>
9468
9469 <const name="Null" value="0">
9470 <desc><tt>null</tt> value. Never used by the API.</desc>
9471 </const>
9472 <const name="Ignore" value="1">
9473 <desc>Ignore the matched USB device.</desc>
9474 </const>
9475 <const name="Hold" value="2">
9476 <desc>Hold the matched USB device.</desc>
9477 </const>
9478 </enum>
9479
9480 <enumerator
9481 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
9482 uuid="ff735211-903e-4642-9c37-189eb44579fe"
9483 />
9484
9485 <collection
9486 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
9487 enumerator="IHostUSBDeviceFilterEnumerator"
9488 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
9489 readonly="yes"
9490 />
9491
9492 <interface
9493 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
9494 uuid="4cc70246-d74a-400f-8222-3900489c0374"
9495 wsmap="managed"
9496 >
9497 <desc>
9498 The IHostUSBDeviceFilter interface represents a global filter for a
9499 physical USB device used by the host computer. Used indirectly in
9500 <link to="IHost::USBDeviceFilters"/>.
9501
9502 Using filters of this type, the host computer determines the initial
9503 state of the USB device after it is physically attached to the
9504 host's USB controller.
9505
9506 <note>
9507 The <link to="#remote"/> attribute is ignored by this type of
9508 filters, because it makes sense only for
9509 <link to="IUSBController::deviceFilters">machine USB filters</link>.
9510 </note>
9511
9512 <see>IHost::USBDeviceFilters</see>
9513 </desc>
9514
9515 <attribute name="action" type="USBDeviceFilterAction">
9516 <desc>
9517 Action performed by the host when an attached USB device
9518 matches this filter.
9519 </desc>
9520 </attribute>
9521
9522 </interface>
9523
9524 <!--
9525 // IAudioAdapter
9526 /////////////////////////////////////////////////////////////////////////
9527 -->
9528
9529 <enum
9530 name="AudioDriverType"
9531 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
9532 >
9533 <desc>
9534 Host audio driver type.
9535 </desc>
9536
9537 <const name="Null" value="0">
9538 <desc><tt>null</tt> value. Also means "dummy audio driver".</desc>
9539 </const>
9540 <const name="WinMM" value="1"/>
9541 <const name="OSS" value="2"/>
9542 <const name="ALSA" value="3"/>
9543 <const name="DirectSound" value="4"/>
9544 <const name="CoreAudio" value="5"/>
9545 <const name="MMPM" value="6"/>
9546 <const name="Pulse" value="7"/>
9547 <const name="SolAudio" value="8"/>
9548 </enum>
9549
9550 <enum
9551 name="AudioControllerType"
9552 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
9553 >
9554 <desc>
9555 Virtual audio controller type.
9556 </desc>
9557
9558 <const name="AC97" value="0"/>
9559 <const name="SB16" value="1"/>
9560 </enum>
9561
9562 <interface
9563 name="IAudioAdapter" extends="$unknown"
9564 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
9565 wsmap="managed"
9566 >
9567 <desc>
9568 The IAudioAdapter interface represents the virtual audio adapter of
9569 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
9570 </desc>
9571 <attribute name="enabled" type="boolean">
9572 <desc>
9573 Flag whether the audio adapter is present in the
9574 guest system. If disabled, the virtual guest hardware will
9575 not contain any audio adapter. Can only be changed when
9576 the VM is not running.
9577 </desc>
9578 </attribute>
9579 <attribute name="audioController" type="AudioControllerType">
9580 <desc>
9581 The audio hardware we emulate.
9582 </desc>
9583 </attribute>
9584 <attribute name="audioDriver" type="AudioDriverType">
9585 <desc>
9586 Audio driver the adapter is connected to. This setting
9587 can only be changed when the VM is not running.
9588 </desc>
9589 </attribute>
9590 </interface>
9591
9592 <!--
9593 // IVRDPServer
9594 /////////////////////////////////////////////////////////////////////////
9595 -->
9596
9597 <enum
9598 name="VRDPAuthType"
9599 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
9600 >
9601 <desc>
9602 VRDP authentication type.
9603 </desc>
9604
9605 <const name="Null" value="0">
9606 <desc><tt>null</tt> value. Also means "no authentication".</desc>
9607 </const>
9608 <const name="External" value="1"/>
9609 <const name="Guest" value="2"/>
9610 </enum>
9611
9612 <interface
9613 name="IVRDPServer" extends="$unknown"
9614 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
9615 wsmap="managed"
9616 >
9617 <attribute name="enabled" type="boolean">
9618 <desc>VRDP server status.</desc>
9619 </attribute>
9620
9621 <attribute name="port" type="unsigned long">
9622 <desc>
9623 VRDP server port number.
9624 <note>
9625 Setting the value of this property to <tt>0</tt> will reset the port
9626 number to the default value which is
9627 currently <tt>3389</tt>. Reading this property will always return a
9628 real port number, even after it has been set to <tt>0</tt> (in which
9629 case the default port is returned).
9630 </note>
9631 </desc>
9632 </attribute>
9633
9634 <attribute name="netAddress" type="wstring">
9635 <desc>VRDP server address.</desc>
9636 </attribute>
9637
9638 <attribute name="authType" type="VRDPAuthType">
9639 <desc>VRDP authentication method.</desc>
9640 </attribute>
9641
9642 <attribute name="authTimeout" type="unsigned long">
9643 <desc>Timeout for guest authentication. Milliseconds.</desc>
9644 </attribute>
9645
9646 <attribute name="allowMultiConnection" type="boolean">
9647 <desc>
9648 Flag whether multiple simultaneous connections to the VM are permitted.
9649 Note that this will be replaced by a more powerful mechanism in the future.
9650 </desc>
9651 </attribute>
9652
9653 <attribute name="reuseSingleConnection" type="boolean">
9654 <desc>
9655 Flag whether the existing connection must be dropped and a new connection
9656 must be established by the VRDP server, when a new client connects in single
9657 connection mode.
9658 </desc>
9659 </attribute>
9660
9661 </interface>
9662
9663
9664 <!--
9665 // ISharedFolder
9666 /////////////////////////////////////////////////////////////////////////
9667 -->
9668
9669 <enumerator
9670 name="ISharedFolderEnumerator" type="ISharedFolder"
9671 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
9672 />
9673
9674 <collection
9675 name="ISharedFolderCollection" type="ISharedFolder"
9676 enumerator="ISharedFolderEnumerator"
9677 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
9678 readonly="yes">
9679
9680 <method name="findByName">
9681 <desc>
9682 Searches this collection for a shared folder with the given logical
9683 name.
9684 <note>
9685 The method returns an error if the given name does not correspond to
9686 any shared folder in the collection.
9687 </note>
9688 </desc>
9689 <param name="name" type="wstring" dir="in">
9690 <desc>Logical name of the shared folder to search for</desc>
9691 </param>
9692 <param name="sharedFolder" type="ISharedFolder" dir="return">
9693 <desc>Found shared folder object</desc>
9694 </param>
9695 </method>
9696
9697 </collection>
9698
9699 <interface
9700 name="ISharedFolder" extends="$unknown"
9701 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
9702 wsmap="struct"
9703 >
9704 <desc>
9705 The ISharedFolder interface represents a folder in the host computer's
9706 file system accessible from the guest OS running inside a virtual
9707 machine using an associated logical name.
9708
9709 There are three types of shared folders:
9710 <ul>
9711 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
9712 folders available to all virtual machines.</li>
9713 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
9714 VM-specific shared folders available to the given virtual machine at
9715 startup.</li>
9716 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
9717 VM-specific shared folders created in the session context (for
9718 example, when the virtual machine is running) and automatically
9719 discarded when the session is closed (the VM is powered off).</li>
9720 </ul>
9721
9722 Logical names of shared folders must be unique within the given scope
9723 (global, permanent or transient). However, they do not need to be unique
9724 across scopes. In this case, the definition of the shared folder in a
9725 more specific scope takes precedence over definitions in all other
9726 scopes. The order of precedence is (more specific to more general):
9727 <ol>
9728 <li>Transient definitions</li>
9729 <li>Permanent definitions</li>
9730 <li>Global definitions</li>
9731 </ol>
9732
9733 For example, if MyMachine has a shared folder named
9734 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
9735 transient shared folder named <tt>C_DRIVE</tt> (that points
9736 to <tt>C:\\\\WINDOWS</tt>) will change the definition
9737 of <tt>C_DRIVE</tt> in the guest OS so
9738 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
9739 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
9740 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
9741 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
9742 to <tt>C:\\</tt> if it still exists.
9743
9744 Note that permanent and transient shared folders of different machines
9745 are in different name spaces, so they don't overlap and don't need to
9746 have unique logical names.
9747
9748 <note>
9749 Global shared folders are not implemented in the current version of the
9750 product.
9751 </note>
9752 </desc>
9753
9754 <attribute name="name" type="wstring" readonly="yes">
9755 <desc>Logical name of the shared folder.</desc>
9756 </attribute>
9757
9758 <attribute name="hostPath" type="wstring" readonly="yes">
9759 <desc>Full path to the shared folder in the host file system.</desc>
9760 </attribute>
9761
9762 <attribute name="accessible" type="boolean" readonly="yes">
9763 <desc>
9764 Whether the folder defined by the host path is currently
9765 accessible or not.
9766 For example, the folder can be unaccessible if it is placed
9767 on the network share that is not available by the time
9768 this property is read.
9769 </desc>
9770 </attribute>
9771
9772 <attribute name="writable" type="boolean" readonly="yes">
9773 <desc>
9774 Whether the folder defined by the host path is writable or
9775 not.
9776 </desc>
9777 </attribute>
9778
9779 </interface>
9780
9781 <!--
9782 // ISession
9783 /////////////////////////////////////////////////////////////////////////
9784 -->
9785
9786 <interface
9787 name="IInternalSessionControl" extends="$unknown"
9788 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
9789 internal="yes"
9790 wsmap="suppress"
9791 >
9792 <method name="getPID">
9793 <desc>PID of the process that has created this Session object.
9794 </desc>
9795 <param name="pid" type="unsigned long" dir="return"/>
9796 </method>
9797
9798 <method name="getRemoteConsole">
9799 <desc>Returns the console object suitable for remote control.</desc>
9800 <param name="console" type="IConsole" dir="return"/>
9801 </method>
9802
9803 <method name="assignMachine">
9804 <desc>
9805 Assigns the machine object associated with this direct-type
9806 session or informs the session that it will be a remote one
9807 (if machine = NULL).
9808 </desc>
9809 <param name="machine" type="IMachine" dir="in"/>
9810 </method>
9811
9812 <method name="assignRemoteMachine">
9813 <desc>
9814 Assigns the machine and the (remote) console object associated with
9815 this remote-type session.
9816 </desc>
9817 <param name="machine" type="IMachine" dir="in"/>
9818 <param name="console" type="IConsole" dir="in"/>
9819 </method>
9820
9821 <method name="updateMachineState">
9822 <desc>
9823 Updates the machine state in the VM process.
9824 Must be called only in certain cases
9825 (see the method implementation).
9826 </desc>
9827 <param name="aMachineState" type="MachineState" dir="in"/>
9828 </method>
9829
9830 <method name="uninitialize">
9831 <desc>
9832 Uninitializes (closes) this session. Used by VirtualBox to close
9833 the corresponding remote session when the direct session dies
9834 or gets closed.
9835 </desc>
9836 </method>
9837
9838 <method name="onDVDDriveChange">
9839 <desc>
9840 Triggered when settings of the DVD drive object of the
9841 associated virtual machine have changed.
9842 </desc>
9843 </method>
9844
9845 <method name="onFloppyDriveChange">
9846 <desc>
9847 Triggered when settings of the floppy drive object of the
9848 associated virtual machine have changed.
9849 </desc>
9850 </method>
9851
9852 <method name="onNetworkAdapterChange">
9853 <desc>
9854 Triggered when settings of a network adapter of the
9855 associated virtual machine have changed.
9856 </desc>
9857 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
9858 </method>
9859
9860 <method name="onSerialPortChange">
9861 <desc>
9862 Triggered when settings of a serial port of the
9863 associated virtual machine have changed.
9864 </desc>
9865 <param name="serialPort" type="ISerialPort" dir="in"/>
9866 </method>
9867
9868 <method name="onParallelPortChange">
9869 <desc>
9870 Triggered when settings of a parallel port of the
9871 associated virtual machine have changed.
9872 </desc>
9873 <param name="parallelPort" type="IParallelPort" dir="in"/>
9874 </method>
9875
9876 <method name="onVRDPServerChange">
9877 <desc>
9878 Triggered when settings of the VRDP server object of the
9879 associated virtual machine have changed.
9880 </desc>
9881 </method>
9882
9883 <method name="onUSBControllerChange">
9884 <desc>
9885 Triggered when settings of the USB controller object of the
9886 associated virtual machine have changed.
9887 </desc>
9888 </method>
9889
9890 <method name="onSharedFolderChange">
9891 <desc>
9892 Triggered when a permanent (global or machine) shared folder has been
9893 created or removed.
9894 <note>
9895 We don't pass shared folder parameters in this notification because
9896 the order in which parallel notifications are delivered is not defined,
9897 therefore it could happen that these parameters were outdated by the
9898 time of processing this notification.
9899 </note>
9900 </desc>
9901 <param name="global" type="boolean" dir="in"/>
9902 </method>
9903
9904 <method name="onUSBDeviceAttach">
9905 <desc>
9906 Triggered when a request to capture a USB device (as a result
9907 of matched USB filters or direct call to
9908 <link to="IConsole::attachUSBDevice"/>) has completed.
9909 A @c null @a error object means success, otherwise it
9910 describes a failure.
9911 </desc>
9912 <param name="device" type="IUSBDevice" dir="in"/>
9913 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
9914 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
9915 </method>
9916
9917 <method name="onUSBDeviceDetach">
9918 <desc>
9919 Triggered when a request to release the USB device (as a result
9920 of machine termination or direct call to
9921 <link to="IConsole::detachUSBDevice"/>) has completed.
9922 A @c null @a error object means success, otherwise it
9923 </desc>
9924 <param name="id" type="uuid" dir="in"/>
9925 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
9926 </method>
9927
9928 <method name="onShowWindow">
9929 <desc>
9930 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
9931 <link to="IMachine::showConsoleWindow()"/> in order to notify
9932 console callbacks
9933 <link to="IConsoleCallback::onCanShowWindow()"/>
9934 and <link to="IConsoleCallback::onShowWindow()"/>.
9935 </desc>
9936 <param name="check" type="boolean" dir="in"/>
9937 <param name="canShow" type="boolean" dir="out"/>
9938 <param name="winId" type="unsigned long long" dir="out"/>
9939 </method>
9940
9941 <method name="accessGuestProperty">
9942 <desc>
9943 Called by <link to="IMachine::getGuestProperty()"/> and by
9944 <link to="IMachine::setGuestProperty()"/> in order to read and
9945 modify guest properties.
9946 </desc>
9947 <param name="name" type="wstring" dir="in"/>
9948 <param name="value" type="wstring" dir="in"/>
9949 <param name="flags" type="wstring" dir="in"/>
9950 <param name="isSetter" type="boolean" dir="in"/>
9951 <param name="retValue" type="wstring" dir="out"/>
9952 <param name="retTimestamp" type="unsigned long long" dir="out"/>
9953 <param name="retFlags" type="wstring" dir="out"/>
9954 </method>
9955
9956 <method name="enumerateGuestProperties">
9957 <desc>
9958 Return a list of the guest properties matching a set of patterns along
9959 with their values, time stamps and flags.
9960 </desc>
9961 <param name="patterns" type="wstring" dir="in">
9962 <desc>
9963 The patterns to match the properties against as a comma-separated
9964 string. If this is empty, all properties currently set will be
9965 returned.
9966 </desc>
9967 </param>
9968 <param name="key" type="wstring" dir="out" safearray="yes">
9969 <desc>
9970 The key names of the properties returned.
9971 </desc>
9972 </param>
9973 <param name="value" type="wstring" dir="out" safearray="yes">
9974 <desc>
9975 The values of the properties returned. The array entries match the
9976 corresponding entries in the @a key array.
9977 </desc>
9978 </param>
9979 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
9980 <desc>
9981 The time stamps of the properties returned. The array entries match
9982 the corresponding entries in the @a key array.
9983 </desc>
9984 </param>
9985 <param name="flags" type="wstring" dir="out" safearray="yes">
9986 <desc>
9987 The flags of the properties returned. The array entries match the
9988 corresponding entries in the @a key array.
9989 </desc>
9990 </param>
9991 </method>
9992
9993 </interface>
9994
9995 <interface
9996 name="ISession" extends="$dispatched"
9997 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
9998 wsmap="managed"
9999 >
10000 <desc>
10001 The ISession interface represents a serialization primitive for virtual
10002 machines.
10003
10004 With VirtualBox, every time one wishes to manipulate a virtual machine
10005 (e.g. change its settings or start execution), a session object is
10006 required. Such an object must be passed to one of the session methods
10007 that open the given session, which then initiates the machine manipulation.
10008
10009 A session serves several purposes: it identifies to the inter-process VirtualBox
10010 code which process is currently working with the virtual machine, and it ensures
10011 that there are no incompatible requests from several processes for the
10012 same virtual machine. Session objects can therefore be thought of as mutex
10013 semaphores that lock virtual machines to prevent conflicting accesses from
10014 several processes.
10015
10016 How sessions objects are used depends on whether you use the Main API
10017 via COM or via the webservice:
10018
10019 <ul>
10020 <li>When using the COM API directly, an object of the Session class from the
10021 VirtualBox type library needs to be created. In regular COM C++ client code,
10022 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
10023 This object will then act as a local session object in further calls to open
10024 a session.
10025 </li>
10026
10027 <li>In the webservice, the session manager (IWebsessionManager) instead creates
10028 one session object automatically when <link to="IWebsessionManager::logon" />
10029 is called. A managed object reference to that session object can be retrieved by
10030 calling <link to="IWebsessionManager::getSessionObject" />. This session object
10031 reference can then be used to open sessions.
10032 </li>
10033 </ul>
10034
10035 Sessions are mainly used in two variations:
10036
10037 <ul>
10038 <li>
10039 To start a virtual machine in a separate process, one would call
10040 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
10041 object as its first parameter. This session then identifies the caller
10042 and lets him control the started machine (for example, pause machine
10043 execution or power it down) as well as be notified about machine
10044 execution state changes.
10045 </li>
10046
10047 <li>To alter machine settings, or to start machine execution within the
10048 current process, one needs to open a direct session for the machine first by
10049 calling <link to="IVirtualBox::openSession"/>. While a direct session
10050 is open within one process, no any other process may open another direct
10051 session for the same machine. This prevents the machine from being changed
10052 by other processes while it is running or while the machine is being configured.
10053 </li>
10054 </ul>
10055
10056 One also can attach to an existing direct session already opened by
10057 another process (for example, in order to send a control request to the
10058 virtual machine such as the pause or the reset request). This is done by
10059 calling <link to="IVirtualBox::openExistingSession"/>.
10060
10061 <note>
10062 Unless you are trying to write a new VirtualBox front-end that
10063 performs direct machine execution (like the VirtualBox or VBoxSDL
10064 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
10065 session opened by <link to="IVirtualBox::openSession"/> and use this
10066 session only to change virtual machine settings. If you simply want to
10067 start virtual machine execution using one of the existing front-ends
10068 (for example the VirtualBox GUI or headless server), simply use
10069 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
10070 will power up the machine automatically for you.
10071 </note>
10072 </desc>
10073
10074 <attribute name="state" type="SessionState" readonly="yes">
10075 <desc>Current state of this session.</desc>
10076 </attribute>
10077
10078 <attribute name="type" type="SessionType" readonly="yes">
10079 <desc>
10080 Type of this session. The value of this attribute is valid only
10081 if the session is currently open (i.e. its #state is SessionType::SessionOpen),
10082 otherwise an error will be returned.
10083 </desc>
10084 </attribute>
10085
10086 <attribute name="machine" type="IMachine" readonly="yes">
10087 <desc>Machine object associated with this session.</desc>
10088 </attribute>
10089
10090 <attribute name="console" type="IConsole" readonly="yes">
10091 <desc>Console object associated with this session.</desc>
10092 </attribute>
10093
10094 <method name="close">
10095 <desc>
10096 Closes a session that was previously opened.
10097
10098 It is recommended that every time an "open session" method (such as
10099 <link to="IVirtualBox::openRemoteSession" /> or
10100 <link to="IVirtualBox::openSession" />) has been called to
10101 manipulate a virtual machine, the caller invoke
10102 ISession::close() when it's done doing so. Since sessions are
10103 serialization primitives much like ordinary mutexes, they are
10104 best used the same way: for each "open" call, there should be
10105 a matching "close" call, even when errors occur.
10106
10107 Otherwise, if a direct session for a machine opened with
10108 <link to="IVirtualBox::openSession()"/> is not explicitly closed
10109 when the application terminates, the state of the machine will
10110 be set to <link to="MachineState::Aborted" /> on the server.
10111
10112 Generally, it is recommended to close all open sessions explicitly
10113 before terminating the application (no matter what is the reason of
10114 the termination).
10115
10116 <note>
10117 Do not expect the session state (<link to="ISession::state" />
10118 to return to "Closed" immediately after you invoke
10119 ISession::close(), particularly if you have started a remote
10120 session to execute the VM in a new process. The session state will
10121 automatically return to "Closed" once the VM is no longer executing,
10122 which can of course take a very long time.
10123 </note>
10124 </desc>
10125 </method>
10126
10127 </interface>
10128
10129 <!--
10130 // ISATAController
10131 /////////////////////////////////////////////////////////////////////////
10132 -->
10133
10134 <interface
10135 name="ISATAController" extends="$unknown"
10136 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
10137 wsmap="managed"
10138 >
10139 <attribute name="enabled" type="boolean">
10140 <desc>
10141 Flag whether the SATA controller is present in the
10142 guest system. If disabled, the virtual guest hardware will
10143 not contain any SATA controller. Can only be changed when
10144 the VM is powered off.
10145 </desc>
10146 </attribute>
10147
10148 <attribute name="portCount" type="unsigned long">
10149 <desc>
10150 The number of usable ports on the SATA controller.
10151 It ranges from 1 to 30.
10152 </desc>
10153 </attribute>
10154
10155 <method name="GetIDEEmulationPort">
10156 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc>
10157 <param name="devicePosition" type="long" dir="in"/>
10158 <param name="portNumber" type="long" dir="return"/>
10159 </method>
10160
10161 <method name="SetIDEEmulationPort">
10162 <desc>Sets the port number which is emulated as an IDE device.</desc>
10163 <param name="devicePosition" type="long" dir="in"/>
10164 <param name="portNumber" type="long" dir="in"/>
10165 </method>
10166
10167 </interface>
10168
10169<if target="wsdl">
10170
10171 <!--
10172 // IManagedObjectRef
10173 /////////////////////////////////////////////////////////////////////////
10174 -->
10175
10176 <interface
10177 name="IManagedObjectRef" extends="$unknown"
10178 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
10179 internal="yes"
10180 wsmap="managed"
10181 wscpp="hardcoded"
10182 >
10183 <desc>
10184 Managed object reference.
10185
10186 Only within the webservice, a managed object reference (which is really
10187 an opaque number) allows a webservice client to address an object
10188 that lives in the address space of the webservice server.
10189
10190 Behind each managed object reference, there is a COM object that lives
10191 in the webservice server's address space. The COM object is not freed
10192 until the managed object reference is released, either by an explicit
10193 call to <link to="IManagedObjectRef::release" /> or by logging off from
10194 the webservice (<link to="IWebsessionManager::logoff" />), which releases
10195 all objects created during the webservice session.
10196
10197 Whenever a method call of the VirtualBox API returns a COM object, the
10198 webservice representation of that method will instead return a
10199 managed object reference, which can then be used to invoke methods
10200 on that object.
10201 </desc>
10202
10203 <method name="getInterfaceName">
10204 <desc>
10205 Returns the name of the interface that this managed object represents,
10206 for example, "IMachine", as a string.
10207 </desc>
10208 <param name="return" type="wstring" dir="return"/>
10209 </method>
10210
10211 <method name="release">
10212 <desc>
10213 Releases this managed object reference and frees the resources that
10214 were allocated for it in the webservice server process. After calling
10215 this method, the identifier of the reference can no longer be used.
10216 </desc>
10217 </method>
10218
10219 </interface>
10220
10221 <!--
10222 // IWebsessionManager
10223 /////////////////////////////////////////////////////////////////////////
10224 -->
10225
10226 <interface
10227 name="IWebsessionManager" extends="$unknown"
10228 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
10229 internal="yes"
10230 wsmap="global"
10231 wscpp="hardcoded"
10232 >
10233 <desc>
10234 Websession manager. This provides essential services
10235 to webservice clients.
10236 </desc>
10237 <method name="logon">
10238 <desc>
10239 Logs a new client onto the webservice and returns a managed object reference to
10240 the IVirtualBox instance, which the client can then use as a basis to further
10241 queries, since all calls to the VirtualBox API are based on the IVirtualBox
10242 interface, in one way or the other.
10243 </desc>
10244 <param name="username" type="wstring" dir="in"/>
10245 <param name="password" type="wstring" dir="in"/>
10246 <param name="return" type="IVirtualBox" dir="return"/>
10247 </method>
10248
10249 <method name="getSessionObject">
10250 <desc>
10251 Returns a managed object reference to the internal ISession object that was created
10252 for this web service session when the client logged on.
10253
10254 <see>ISession</see>
10255 </desc>
10256 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10257 <param name="return" type="ISession" dir="return"/>
10258 </method>
10259
10260 <method name="logoff">
10261 <desc>
10262 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
10263 and destroys all resources associated with the session (most importantly, all
10264 managed objects created in the server while the session was active).
10265 </desc>
10266 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
10267 </method>
10268
10269 </interface>
10270
10271</if>
10272
10273 <!--
10274 // IPerformanceCollector & friends
10275 /////////////////////////////////////////////////////////////////////////
10276 -->
10277
10278 <interface
10279 name="IPerformanceMetric" extends="$unknown"
10280 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
10281 >
10282 <desc>
10283 The IPerformanceMetric interface represents parameters of the given
10284 performance metric.
10285 </desc>
10286
10287 <attribute name="metricName" type="wstring" readonly="yes">
10288 <desc>
10289 Name of the metric.
10290 </desc>
10291 </attribute>
10292
10293 <attribute name="object" type="$unknown" readonly="yes">
10294 <desc>
10295 Object this metric belongs to.
10296 </desc>
10297 </attribute>
10298
10299 <attribute name="description" type="wstring" readonly="yes">
10300 <desc>
10301 Textual description of the metric.
10302 </desc>
10303 </attribute>
10304
10305 <attribute name="period" type="unsigned long" readonly="yes">
10306 <desc>
10307 Time interval between samples, measured in seconds.
10308 </desc>
10309 </attribute>
10310
10311 <attribute name="count" type="unsigned long" readonly="yes">
10312 <desc>
10313 Number of recent samples retained by the performance collector for this
10314 metric.
10315
10316 When the collected sample count exceeds this number, older samples
10317 are discarded.
10318 </desc>
10319 </attribute>
10320
10321 <attribute name="unit" type="wstring" readonly="yes">
10322 <desc>
10323 Unit of measurement.
10324 </desc>
10325 </attribute>
10326
10327 <attribute name="minimumValue" type="long" readonly="yes">
10328 <desc>
10329 Minimum possible value of this metric.
10330 </desc>
10331 </attribute>
10332
10333 <attribute name="maximumValue" type="long" readonly="yes">
10334 <desc>
10335 Maximum possible value of this metric.
10336 </desc>
10337 </attribute>
10338 </interface>
10339
10340 <interface
10341 name="IPerformanceCollector" extends="$unknown"
10342 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
10343 wsmap="managed"
10344 >
10345 <desc>
10346 The IPerformanceCollector interface represents a service that collects and
10347 stores performance metrics data.
10348
10349 Performance metrics are associated with objects like IHost and
10350 IMachine. Each object has a distinct set of performance metrics.
10351 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
10352
10353 Metric data are collected at the specified intervals and are retained
10354 internally. The interval and the number of samples retained can be set
10355 with <link to="IPerformanceCollector::setupMetrics" />.
10356
10357 Metrics are organized hierarchically, each level separated by slash (/).
10358 General scheme for metric name is
10359 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
10360 metric name stands for: CPU category, Load metric, User submetric, average
10361 aggregate. An aggregate function is computed over all retained data. Valid
10362 aggregate functions are:
10363
10364 <ul>
10365 <li>avg -- average</li>
10366 <li>min -- minimum</li>
10367 <li>max -- maximum</li>
10368 </ul>
10369
10370 "Category/Metric" together form base metric name. A base metric is the
10371 smallest unit for which a sampling interval and the number of retained
10372 samples can be set. Only base metrics can be enabled and disabled. All
10373 sub-metrics are collected when their base metric is collected.
10374 Collected values for any set of sub-metrics can be queried with
10375 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
10376 metric parameters, querying metric data, enabling or disabling metrics
10377 wildcards can be used in metric names to specify a subset of metrics. For
10378 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
10379 averages can be queried using <tt>*:avg</tt> and so on. To query metric
10380 values without aggregates <tt>*:</tt> can be used.
10381
10382 The valid names for base metrics are:
10383
10384 <ul>
10385 <li>CPU/Load</li>
10386 <li>CPU/MHz</li>
10387 <li>RAM/Usage</li>
10388 </ul>
10389
10390 The general sequence for collecting and retrieving the metrics is:
10391 <ul>
10392 <li>
10393 Obtain an instance of IPerformanceCollector with
10394 <link to="IVirtualBox::performanceCollector" />
10395 </li>
10396 <li>
10397 Allocate and populate an array with references to objects the metrics
10398 will be collected for. Use references to IHost and IMachine objects.
10399 </li>
10400 <li>
10401 Allocate and populate an array with base metric names the data will be
10402 collected for.
10403 </li>
10404 <li>
10405 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
10406 metric data will be collected and stored.
10407 </li>
10408 <li>
10409 Wait for the data to get collected.
10410 </li>
10411 <li>
10412 Allocate and populate an array with references to objects the metric
10413 values will be queried for. You can re-use the object array used for
10414 setting base metrics.
10415 </li>
10416 <li>
10417 Allocate and populate an array with metric names the data will be
10418 collected for. Note that metric names differ from base metric names.
10419 </li>
10420 <li>
10421 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
10422 have been collected so far are returned. Note that the values are still
10423 retained internally and data collection continues.
10424 </li>
10425 </ul>
10426
10427 For an example of usage refer to the following files in VirtualBox SDK:
10428 <ul>
10429 <li>
10430 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
10431 </li>
10432 <li>
10433 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
10434 </li>
10435 </ul>
10436 </desc>
10437
10438 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
10439 <desc>
10440 Array of unique names of metrics.
10441
10442 This array represents all metrics supported by the performance
10443 collector. Individual objects do not necessarily support all of them.
10444 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
10445 list of supported metrics for a particular object.
10446 </desc>
10447 </attribute>
10448
10449 <method name="getMetrics">
10450 <desc>
10451 Returns parameters of specified metrics for a set of objects.
10452 <note>
10453 @c Null metrics array means all metrics. @c Null object array means
10454 all existing objects.
10455 </note>
10456 </desc>
10457 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10458 <desc>
10459 Metric name filter. Currently, only a comma-separated list of metrics
10460 is supported.
10461 </desc>
10462 </param>
10463 <param name="objects" type="$unknown" dir="in" safearray="yes">
10464 <desc>
10465 Set of objects to return metric parameters for.
10466 </desc>
10467 </param>
10468 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
10469 <desc>
10470 Array of returned metric parameters.
10471 </desc>
10472 </param>
10473 </method>
10474
10475 <method name="setupMetrics">
10476 <desc>
10477 Sets parameters of specified base metrics for a set of objects. Returns
10478 an array of <link to="IPerformanceMetric" /> describing the metrics have
10479 been affected.
10480 <note>
10481 @c Null or empty metric name array means all metrics. @c Null or empty
10482 object array means all existing objects. If metric name array contains
10483 a single element and object array contains many, the single metric
10484 name array element is applied to each object array element to form
10485 metric/object pairs.
10486 </note>
10487 </desc>
10488 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10489 <desc>
10490 Metric name filter. Comma-separated list of metrics with wildcard
10491 support.
10492 </desc>
10493 </param>
10494 <param name="objects" type="$unknown" dir="in" safearray="yes">
10495 <desc>
10496 Set of objects to setup metric parameters for.
10497 </desc>
10498 </param>
10499 <param name="period" type="unsigned long" dir="in">
10500 <desc>
10501 Time interval in seconds between two consecutive samples of performance
10502 data.
10503 </desc>
10504 </param>
10505 <param name="count" type="unsigned long" dir="in">
10506 <desc>
10507 Number of samples to retain in performance data history. Older samples
10508 get discarded.
10509 </desc>
10510 </param>
10511 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10512 <desc>
10513 Array of metrics that have been modified by the call to this method.
10514 </desc>
10515 </param>
10516 </method>
10517
10518 <method name="enableMetrics">
10519 <desc>
10520 Turns on collecting specified base metrics. Returns an array of
10521 <link to="IPerformanceMetric" /> describing the metrics have been
10522 affected.
10523 <note>
10524 @c Null or empty metric name array means all metrics. @c Null or empty
10525 object array means all existing objects. If metric name array contains
10526 a single element and object array contains many, the single metric
10527 name array element is applied to each object array element to form
10528 metric/object pairs.
10529 </note>
10530 </desc>
10531 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10532 <desc>
10533 Metric name filter. Comma-separated list of metrics with wildcard
10534 support.
10535 </desc>
10536 </param>
10537 <param name="objects" type="$unknown" dir="in" safearray="yes">
10538 <desc>
10539 Set of objects to enable metrics for.
10540 </desc>
10541 </param>
10542 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10543 <desc>
10544 Array of metrics that have been modified by the call to this method.
10545 </desc>
10546 </param>
10547 </method>
10548
10549 <method name="disableMetrics">
10550 <desc>
10551 Turns off collecting specified base metrics. Returns an array of
10552 <link to="IPerformanceMetric" /> describing the metrics have been
10553 affected.
10554 <note>
10555 @c Null or empty metric name array means all metrics. @c Null or empty
10556 object array means all existing objects. If metric name array contains
10557 a single element and object array contains many, the single metric
10558 name array element is applied to each object array element to form
10559 metric/object pairs.
10560 </note>
10561 </desc>
10562 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10563 <desc>
10564 Metric name filter. Comma-separated list of metrics with wildcard
10565 support.
10566 </desc>
10567 </param>
10568 <param name="objects" type="$unknown" dir="in" safearray="yes">
10569 <desc>
10570 Set of objects to disable metrics for.
10571 </desc>
10572 </param>
10573 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
10574 <desc>
10575 Array of metrics that have been modified by the call to this method.
10576 </desc>
10577 </param>
10578 </method>
10579
10580 <method name="queryMetricsData">
10581 <desc>
10582 Queries collected metrics data for a set of objects.
10583
10584 The data itself and related metric information are returned in seven
10585 parallel and one flattened array of arrays. Elements of
10586 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
10587 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
10588 the same index describe one set of values corresponding to a single
10589 metric.
10590
10591 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
10592 start and length of a sub-array is indicated by
10593 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
10594 value for metric <tt>metricNames[i]</tt> is at
10595 <tt>returnData[returnIndices[i]]</tt>.
10596
10597 <note>
10598 @c Null or empty metric name array means all metrics. @c Null or empty
10599 object array means all existing objects. If metric name array contains
10600 a single element and object array contains many, the single metric
10601 name array element is applied to each object array element to form
10602 metric/object pairs.
10603 </note>
10604 <note>
10605 Data collection continues behind the scenes after call to @c
10606 queryMetricsData. The return data can be seen as the snapshot of
10607 the current state at the time of @c queryMetricsData call. The
10608 internally kept metric values are not cleared by the call. This makes
10609 possible querying different subsets of metrics or aggregates with
10610 subsequent calls. If periodic querying is needed it is highly
10611 suggested to query the values with @c interval*count period to avoid
10612 confusion. This way a completely new set of data values will be
10613 provided by each query.
10614 </note>
10615 </desc>
10616 <param name="metricNames" type="wstring" dir="in" safearray="yes">
10617 <desc>
10618 Metric name filter. Comma-separated list of metrics with wildcard
10619 support.
10620 </desc>
10621 </param>
10622 <param name="objects" type="$unknown" dir="in" safearray="yes">
10623 <desc>
10624 Set of objects to query metrics for.
10625 </desc>
10626 </param>
10627 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
10628 <desc>
10629 Names of metrics returned in @c returnData.
10630 </desc>
10631 </param>
10632 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
10633 <desc>
10634 Objects associated with metrics returned in @c returnData.
10635 </desc>
10636 </param>
10637 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
10638 <desc>
10639 Units of measurement for each returned metric.
10640 </desc>
10641 </param>
10642 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
10643 <desc>
10644 Divisor that should be applied to return values in order to get
10645 floating point values. For example:
10646 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
10647 will retrieve the floating point value of i-th sample of the first
10648 metric.
10649 </desc>
10650 </param>
10651 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
10652 <desc>
10653 Sequence numbers of the first elements of value sequences of particular metrics
10654 returned in @c returnData. For aggregate metrics it is the sequence number of
10655 the sample the aggregate started calculation from.
10656 </desc>
10657 </param>
10658 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
10659 <desc>
10660 Indices of the first elements of value sequences of particular metrics
10661 returned in @c returnData.
10662 </desc>
10663 </param>
10664 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
10665 <desc>
10666 Lengths of value sequences of particular metrics.
10667 </desc>
10668 </param>
10669 <param name="returnData" type="long" dir="return" safearray="yes">
10670 <desc>
10671 Flattened array of all metric data containing sequences of values for
10672 each metric.
10673 </desc>
10674 </param>
10675 </method>
10676
10677 </interface>
10678
10679 <module name="VBoxSVC" context="LocalServer">
10680 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
10681 namespace="virtualbox.org">
10682 <interface name="IVirtualBox" default="yes"/>
10683 </class>
10684 </module>
10685
10686 <module name="VBoxC" context="InprocServer" threadingModel="Free">
10687 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
10688 namespace="virtualbox.org">
10689 <interface name="ISession" default="yes"/>
10690 </class>
10691 </module>
10692
10693</library>
10694
10695</idl>
10696<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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