VirtualBox

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

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

Added a modeline for vim in a comment (matching the settings specified
in the comment at the top of the file).

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

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