VirtualBox

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

Last change on this file since 9883 was 9883, checked in by vboxsync, 17 years ago

Main: add the Main part of the guest/host configuration registry

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

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