VirtualBox

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

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

Frontends/VirtualBox3/4, Main: only switch to seamless mode if the host resolution is less than the maximum currently supported by the additions

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

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