VirtualBox

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

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

Frontends/VirtualBox3/4, Main, Devices/VMMDev, Frontends/VBoxBFE, Additions/common, Additions/x11: reverted r30152, r30085, r30074 and r30072

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 355.8 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="d8556fca-81bc-12af-fca3-365528fa38ca"
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="supportsSeamless" type="boolean" readonly="yes">
5233 <desc>
5234 Flag whether seamless guest display rendering (seamless desktop
5235 integration) is supported.
5236 </desc>
5237 </attribute>
5238
5239 <attribute name="supportsGraphics" type="boolean" readonly="yes">
5240 <desc>
5241 Flag whether the guest is in graphics mode. If it is not, then
5242 seamless rendering will not work, resize hints are not immediately
5243 acted on and guest display resizes are probably not initiated by
5244 the guest additions.
5245 </desc>
5246 </attribute>
5247
5248 <attribute name="memoryBalloonSize" type="unsigned long">
5249 <desc>Guest system memory balloon size in megabytes.</desc>
5250 </attribute>
5251
5252 <attribute name="statisticsUpdateInterval" type="unsigned long">
5253 <desc>Interval to update guest statistics in seconds.</desc>
5254 </attribute>
5255
5256 <method name="setCredentials">
5257 <desc>
5258 Store login credentials that can be queried by guest operating
5259 systems with Additions installed. The credentials are transient
5260 to the session and the guest may also choose to erase them. Note
5261 that the caller cannot determine whether the guest operating system
5262 has queried or made use of the credentials.
5263 </desc>
5264 <param name="userName" type="wstring" dir="in">
5265 <desc>User name string, can be empty</desc>
5266 </param>
5267 <param name="password" type="wstring" dir="in">
5268 <desc>Password string, can be empty</desc>
5269 </param>
5270 <param name="domain" type="wstring" dir="in">
5271 <desc>Domain name (guest logon scheme specific), can be emtpy</desc>
5272 </param>
5273 <param name="allowInteractiveLogon" type="boolean" dir="in">
5274 <desc>
5275 Flag whether the guest should alternatively allow the user to
5276 interactively specify different credentials. This flag might
5277 not be supported by all versions of the Additions.
5278 </desc>
5279 </param>
5280 </method>
5281
5282 <method name="getStatistic">
5283 <desc>
5284 Query specified guest statistics as reported by the VirtualBox Additions.
5285 </desc>
5286 <param name="cpuId" type="unsigned long" dir="in">
5287 <desc>Virtual CPU id; not relevant for all statistic types</desc>
5288 </param>
5289 <param name="statistic" type="GuestStatisticType" dir="in">
5290 <desc>Statistic type.</desc>
5291 </param>
5292 <param name="statVal" type="unsigned long" dir="out">
5293 <desc>Statistics value</desc>
5294 </param>
5295 </method>
5296
5297 </interface>
5298
5299
5300 <!--
5301 // IProgress
5302 /////////////////////////////////////////////////////////////////////////
5303 -->
5304
5305 <enumerator
5306 name="IProgressEnumerator" type="IProgress"
5307 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
5308 />
5309
5310 <collection
5311 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
5312 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
5313 readonly="yes"
5314 />
5315
5316 <interface
5317 name="IProgress" extends="$unknown"
5318 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
5319 wsmap="managed"
5320 >
5321 <desc>
5322 The IProgress interface represents a task progress object that allows
5323 to wait for the completion of some asynchronous task.
5324
5325 The task consists of one or more operations that run sequentially,
5326 one after one. There is an individual percent of completion of the
5327 current operation and the percent of completion of the task as a
5328 whole. Similarly, you can wait for the completion of a particular
5329 operation or for the completion of the whole task.
5330
5331 Every operation is identified by a number (starting from 0)
5332 and has a separate description.
5333 </desc>
5334
5335 <attribute name="id" type="uuid" readonly="yes">
5336 <desc>ID of the task.</desc>
5337 </attribute>
5338
5339 <attribute name="description" type="wstring" readonly="yes">
5340 <desc>Description of the task.</desc>
5341 </attribute>
5342
5343 <attribute name="initiator" type="$unknown" readonly="yes">
5344 <desc>Initiator of the task.</desc>
5345 </attribute>
5346
5347 <attribute name="cancelable" type="boolean" readonly="yes">
5348 <desc>Whether the task can be interrupted.</desc>
5349 </attribute>
5350
5351 <attribute name="percent" type="long" readonly="yes">
5352 <desc>
5353 Current task progress value in percent.
5354 This value depends on how many operations are already complete.
5355 </desc>
5356 </attribute>
5357
5358 <attribute name="completed" type="boolean" readonly="yes">
5359 <desc>Whether the task has been completed.</desc>
5360 </attribute>
5361
5362 <attribute name="canceled" type="boolean" readonly="yes">
5363 <desc>Whether the task has been canceled.</desc>
5364 </attribute>
5365
5366 <attribute name="resultCode" type="result" readonly="yes">
5367 <desc>
5368 Result code of the progress task.
5369 Valid only if <link to="#completed"/> is true.
5370 </desc>
5371 </attribute>
5372
5373 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
5374 <desc>
5375 Extended information about the unsuccessful result of the
5376 progress operation. May be NULL when no extended information
5377 is available.
5378 Valid only if <link to="#completed"/> is true and
5379 <link to="#resultCode"/> indicates a failure.
5380 </desc>
5381 </attribute>
5382
5383 <attribute name="operationCount" type="unsigned long" readonly="yes">
5384 <desc>
5385 Number of operations this task is divided into.
5386 Every task consists of at least one operation.
5387 </desc>
5388 </attribute>
5389
5390 <attribute name="operation" type="unsigned long" readonly="yes">
5391 <desc>Number of the operation being currently executed.</desc>
5392 </attribute>
5393
5394 <attribute name="operationDescription" type="wstring" readonly="yes">
5395 <desc>
5396 Description of the operation being currently executed.
5397 </desc>
5398 </attribute>
5399
5400 <attribute name="operationPercent" type="long" readonly="yes">
5401 <desc>Current operation progress value in percent.</desc>
5402 </attribute>
5403
5404 <method name="waitForCompletion">
5405 <desc>
5406 Waits until the task is done (including all operations) with a
5407 given timeout.
5408 </desc>
5409 <param name="timeout" type="long" dir="in">
5410 <desc>
5411 Timeout value in milliseconds.
5412 Specify -1 for an indefinite wait.
5413 </desc>
5414 </param>
5415 </method>
5416
5417 <method name="waitForOperationCompletion">
5418 <desc>
5419 Waits until the given operation is done with a given timeout.
5420 </desc>
5421 <param name="operation" type="unsigned long" dir="in">
5422 <desc>
5423 Number of the operation to wait for.
5424 Must be less than <link to="#operationCount"/>.
5425 </desc>
5426 </param>
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="cancel">
5436 <desc>
5437 Cancels the task.
5438 <note>
5439 If <link to="#cancelable"/> is <tt>false</tt>, then
5440 this method will fail.
5441 </note>
5442 </desc>
5443 </method>
5444
5445 </interface>
5446
5447
5448 <!--
5449 // ISnapshot
5450 /////////////////////////////////////////////////////////////////////////
5451 -->
5452
5453 <enumerator
5454 name="ISnapshotEnumerator" type="ISnapshot"
5455 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
5456 />
5457
5458 <collection
5459 name="ISnapshotCollection" type="ISnapshot"
5460 enumerator="ISnapshotEnumerator"
5461 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
5462 readonly="yes"
5463 />
5464
5465 <interface
5466 name="ISnapshot" extends="$unknown"
5467 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
5468 wsmap="managed"
5469 >
5470 <desc>
5471 The ISnapshot interface represents a snapshot of the virtual
5472 machine.
5473
5474 The <i>snapshot</i> stores all the information about a virtual
5475 machine necessary to bring it to exactly the same state as it was at
5476 the time of taking the snapshot. The snapshot includes:
5477
5478 <ul>
5479 <li>all settings of the virtual machine (i.e. its hardware
5480 configuration: RAM size, attached hard disks, etc.)
5481 </li>
5482 <li>the execution state of the virtual machine (memory contents,
5483 CPU state, etc.).
5484 </li>
5485 </ul>
5486
5487 Snapshots can be <i>offline</i> (taken when the VM is powered off)
5488 or <i>online</i> (taken when the VM is running). The execution
5489 state of the offline snapshot is called a <i>zero execution state</i>
5490 (it doesn't actually contain any information about memory contents
5491 or the CPU state, assuming that all hardware is just powered off).
5492
5493 <h3>Snapshot branches</h3>
5494
5495 Snapshots can be chained. Chained snapshots form a branch where
5496 every next snapshot is based on the previous one. This chaining is
5497 mostly related to hard disk branching (see <link to="IHardDisk"/>
5498 description). This means that every time a new snapshot is created,
5499 a new differencing hard disk is implicitly created for all normal
5500 hard disks attached to the given virtual machine. This allows to
5501 fully restore hard disk contents when the machine is later reverted
5502 to a particular snapshot.
5503
5504 In the current implelemtation, multiple snapshot branches within one
5505 virtual machine are not allowed. Every machine has a signle branch,
5506 and <link to="IConsole::takeSnapshot()"/> operation adds a new
5507 snapshot to the top of that branch.
5508
5509 Existings snapshots can be discarded using
5510 <link to="IConsole::discardSnapshot()"/>.
5511
5512 <h3>Current snapshot</h3>
5513
5514 Every virtual machine has a current snapshot, identified by
5515 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
5516 a base for the <i>current machine state</i> (see below), to the effect
5517 that all normal hard disks of the machine and its execution
5518 state are based on this snapshot.
5519
5520 In the current implementation, the current snapshot is always the
5521 last taken snapshot (i.e. the head snapshot on the branch) and it
5522 cannot be changed.
5523
5524 The current snapshot is <tt>null</tt> if the machine doesn't have
5525 snapshots at all; in this case the current machine state is just
5526 current settings of this machine plus its current execution state.
5527
5528 <h3>Current machine state</h3>
5529
5530 The current machine state is what represened by IMachine instances got
5531 directly from IVirtualBox
5532 using <link
5533 to="IVirtualBox::getMachine()">getMachine()</link>, <link
5534 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
5535 to instances returned by <link to="ISnapshot::machine"/>). This state
5536 is always used when the machine is <link to="IConsole::powerUp"> powered
5537 on</link>.
5538
5539 The current machine state also includes the current execution state.
5540 If the machine is being currently executed
5541 (<link to="IMachine::state"/> is <link to="MachineState::Running"/>
5542 and above), its execution state is just what's happening now.
5543 If it is powered off (<link to="MachineState::PoweredOff"/> or
5544 <link to="MachineState::Aborted"/>), it has a zero execution state.
5545 If the machine is saved (<link to="MachineState::Saved"/>), its
5546 execution state is what saved in the execution state file
5547 (<link to="IMachine::stateFilePath"/>).
5548
5549 If the machine is in the saved state, then, next time it is powered
5550 on, its execution state will be fully restored from the saved state
5551 file and the execution will continue from the point where the state
5552 was saved.
5553
5554 Similarly to snapshots, the current machine state can be discarded
5555 using <link to="IConsole::discardCurrentState()"/>.
5556
5557 <h3>Taking and discarding snapshots</h3>
5558
5559 The table below briefly explains the meaning of every snapshot
5560 operation:
5561
5562 <table>
5563 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
5564
5565 <tr><td><link to="IConsole::takeSnapshot()"/></td>
5566
5567 <td>Save the current state of the virtual machine, including all
5568 settings, contents of normal hard disks and the current modifications
5569 to immutable hard disks (for online snapshots)</td>
5570
5571 <td>The current state is not changed (the machine will continue
5572 execution if it is being executed when the snapshot is
5573 taken)</td></tr>
5574
5575 <tr><td><link to="IConsole::discardSnapshot()"/></td>
5576
5577 <td>Forget the state of the virtual machine stored in the snapshot:
5578 dismiss all saved settings and delete the saved execution state (for
5579 online snapshots)</td>
5580
5581 <td>Other snapshots (including child snapshots, if any) and the
5582 current state are not directly affected</td></tr>
5583
5584 <tr><td><link to="IConsole::discardCurrentState()"/></td>
5585
5586 <td>Restore the current state of the virtual machine from the state
5587 stored in the current snapshot, including all settings and hard disk
5588 contents</td>
5589
5590 <td>The current state of the machine existed prior to this operation
5591 is lost</td></tr>
5592
5593 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
5594
5595 <td>Completely revert the virtual machine to the state it was in
5596 before the current snapshot has been taken</td>
5597
5598 <td>The current state, as well as the current snapshot, are
5599 lost</td></tr>
5600
5601 </table>
5602
5603 </desc>
5604
5605 <attribute name="id" type="uuid" readonly="yes">
5606 <desc>UUID of the snapshot.</desc>
5607 </attribute>
5608
5609 <attribute name="name" type="wstring">
5610 <desc>Short name of the snapshot.</desc>
5611 </attribute>
5612
5613 <attribute name="description" type="wstring">
5614 <desc>Optional description of the snapshot.</desc>
5615 </attribute>
5616
5617 <attribute name="timeStamp" type="long long" readonly="yes">
5618 <desc>
5619 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
5620 </desc>
5621 </attribute>
5622
5623 <attribute name="online" type="boolean" readonly="yes">
5624 <desc>
5625 <tt>true</tt> if this snapshot is an online snapshot and
5626 <tt>false</tt> otherwise.
5627
5628 <note>
5629 When this attribute is <tt>true</tt>, the
5630 <link to="IMachine::stateFilePath"/> attribute of the
5631 <link to="#machine"/> object associated with this snapshot
5632 will point to the saved state file. Otherwise, it will be
5633 <tt>null</tt>.
5634 </note>
5635 </desc>
5636 </attribute>
5637
5638 <attribute name="machine" type="IMachine" readonly="yes">
5639 <desc>
5640 Virtual machine this snapshot is taken on. This object
5641 stores all settings the machine had when taking this snapshot.
5642 <note>
5643 The returned machine object is immutable, i.e. no
5644 any settings can be changed.
5645 </note>
5646 </desc>
5647 </attribute>
5648
5649 <attribute name="parent" type="ISnapshot" readonly="yes">
5650 <desc>
5651 Parent snapshot (a snapshot this one is based on).
5652 <note>
5653 It's not an error to read this attribute on a snapshot
5654 that doesn't have a parent -- a null object will be
5655 returned to indicate this.
5656 </note>
5657 </desc>
5658 </attribute>
5659
5660 <attribute name="children" type="ISnapshotCollection" readonly="yes">
5661 <desc>
5662 Child snapshots (all snapshots having this one as a parent).
5663 <note>
5664 In the current implementation, there can be only one
5665 child snapshot, or no children at all, meaning this is the
5666 last (head) snapshot.
5667 </note>
5668 </desc>
5669 </attribute>
5670
5671 </interface>
5672
5673 <!--
5674 // IHardDisk
5675 /////////////////////////////////////////////////////////////////////////
5676 -->
5677
5678 <enum
5679 name="HardDiskStorageType"
5680 uuid="48138584-ad99-479d-a36f-eb82a7663685"
5681 >
5682 <desc>
5683 Virtual hard disk storage type.
5684 <see>IHardDisk</see>
5685 </desc>
5686
5687 <const name="VirtualDiskImage" value="0">
5688 <desc>
5689 Virtual Disk Image, VDI (a regular file in the file
5690 system of the host OS, see <link to="IVirtualDiskImage"/>)
5691 </desc>
5692 </const>
5693 <const name="ISCSIHardDisk" value="1">
5694 <desc>
5695 iSCSI Remote Disk (a disk accessed via the Internet
5696 SCSI protocol over a TCP/IP network, see
5697 <link to="IISCSIHardDisk"/>)
5698 </desc>
5699 </const>
5700 <const name="VMDKImage" value="2">
5701 <desc>
5702 VMware Virtual Machine Disk image (a regular file in the file
5703 system of the host OS, see <link to="IVMDKImage"/>)
5704 </desc>
5705 </const>
5706 <const name="CustomHardDisk" value="3">
5707 <desc>
5708 Disk formats supported through plugins (see
5709 <link to="ICustomHardDisk"/>)
5710 </desc>
5711 </const>
5712 <const name="VHDImage" value="4">
5713 <desc>
5714 Virtual PC Virtual Machine Disk image (a regular file in the file
5715 system of the host OS, see <link to="IVHDImage"/>)
5716 </desc>
5717 </const>
5718 </enum>
5719
5720 <enum
5721 name="HardDiskType"
5722 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
5723 >
5724 <desc>
5725 Virtual hard disk type.
5726 <see>IHardDisk</see>
5727 </desc>
5728
5729 <const name="Normal" value="0">
5730 <desc>
5731 Normal hard disk (attached directly or indirectly, preserved
5732 when taking snapshots).
5733 </desc>
5734 </const>
5735 <const name="Immutable" value="1">
5736 <desc>
5737 Immutable hard disk (attached indirectly, changes are wiped out
5738 after powering off the virtual machine).
5739 </desc>
5740 </const>
5741 <const name="Writethrough" value="2">
5742 <desc>
5743 Write through hard disk (attached directly, ignored when
5744 taking snapshots).
5745 </desc>
5746 </const>
5747 </enum>
5748
5749 <interface
5750 name="IHardDiskAttachment" extends="$unknown"
5751 uuid="c0ffe596-21c6-4797-8d8a-b47b66881e7a"
5752 wsmap="struct"
5753 >
5754 <desc>
5755 <note>With the COM API, this is an interface like all the others. With the webservice,
5756 this is mapped to a structure, so querying the attribute will not return an object,
5757 but a complete structure.</note>
5758 </desc>
5759 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
5760 <desc>Harddisk object this attachment is about.</desc>
5761 </attribute>
5762
5763 <attribute name="bus" type="StorageBus" readonly="yes">
5764 <desc>Disk controller ID of this attachment.</desc>
5765 </attribute>
5766
5767 <attribute name="channel" type="long" readonly="yes">
5768 <desc>Channel number of the attachment.</desc>
5769 </attribute>
5770
5771 <attribute name="device" type="long" readonly="yes">
5772 <desc>Device slot number of the attachment.</desc>
5773 </attribute>
5774
5775 </interface>
5776
5777 <enumerator
5778 name="IHardDiskAttachmentEnumerator" type="IHardDiskAttachment"
5779 uuid="9955e486-2f0b-432a-99e4-0ebbd338875e"
5780 />
5781
5782 <collection
5783 name="IHardDiskAttachmentCollection" type="IHardDiskAttachment"
5784 enumerator="IHardDiskAttachmentEnumerator"
5785 uuid="8f727842-bb77-45d4-92de-4ec14bf613c9"
5786 readonly="yes"
5787 />
5788
5789 <enumerator
5790 name="IHardDiskEnumerator" type="IHardDisk"
5791 uuid="b976f97b-cdb8-47e3-9860-084031cbd533"
5792 />
5793
5794 <collection
5795 name="IHardDiskCollection" type="IHardDisk"
5796 enumerator="IHardDiskEnumerator"
5797 uuid="43EAC2BC-5C61-40fa-BC38-46DE2C7DB6BB"
5798 readonly="yes"
5799 />
5800
5801 <interface
5802 name="IHardDisk" extends="$unknown"
5803 uuid="FD443EC1-000F-4F5B-9282-D72760A66916"
5804 wsmap="managed"
5805 >
5806 <desc>
5807 The IHardDisk interface represents a virtual hard disk drive
5808 used by virtual machines.
5809
5810 The virtual hard disk drive virtualizes the hard disk hardware and
5811 looks like a regular hard disk inside the virtual machine and
5812 the guest OS.
5813
5814 <h3>Storage Types</h3>
5815
5816 The <link to="HardDiskStorageType">storage type</link> of the
5817 virtual hard disk determines where and how it stores its data
5818 (sectors). Currently, the following storage types are supported:
5819
5820 <ul>
5821
5822 <li>
5823 <i>Virtual Disk Image (VDI)</i>, a regular file in the file system
5824 of the host OS (represented by the <link to="IVirtualDiskImage"/>
5825 interface). This file has a special format optimized so that unused
5826 sectors of data occupy much less space than on a physical hard disk.
5827 </li>
5828
5829 <li>
5830 <i>iSCSI Remote Disk</i>, a disk accessed via the Internet SCSI
5831 protocol over a TCP/IP network link (represented by the
5832 <link to="IISCSIHardDisk"/> interface).
5833 </li>
5834
5835 <li>
5836 <i>VMware VMDK image</i>, a regular file in the file system of the
5837 host OS (represented by the <link to="IVMDKImage"/> interface).
5838 Note that the regular file may be just a descriptor referring to
5839 further files, so don't make assumptions about the OS representation
5840 of a VMDK image.
5841 </li>
5842
5843 <li>
5844 <i>Custom HardDisk</i>, a disk accessed via a plugin which is loaded
5845 when the disk is accessed (represented by the
5846 <link to="ICustomHardDisk"/> interface).
5847 </li>
5848
5849 <li>
5850 <i>Virtual PC VHD Image</i>, a regular file in the file system of the
5851 host OS (represented by the <link to="IVHDImage"/> interface).
5852 </li>
5853
5854 </ul>
5855
5856 The storage type of the particular hard disk object is indicated by
5857 the <link to="#storageType"/> property.
5858
5859 Each storage type is represented by its own interface (as shown
5860 above), that allows to query and set properties and perform
5861 operations specific to that storage type. When an IHardDisk object
5862 reports it uses some particular storage type, it also guaranteed to
5863 support the corresponding interface which you can query. And vice
5864 versa, every object that supports a storage-specific interface, also
5865 supports IHardDisk.
5866
5867 <h3>Virtual Hard Disk Types</h3>
5868
5869 The <link to="HardDiskType">type</link> of the virtual hard disk
5870 determines how it is attached to the virtual machine when you call
5871 <link to="IMachine::attachHardDisk()"/> and what happens to it when
5872 a <link to="ISnapshot">snapshot</link> of the virtual machine is
5873 taken.
5874
5875 There are three types of virtual hard disks:
5876
5877 <ul>
5878 <li><i>Normal</i></li>
5879 <li><i>Immutable</i></li>
5880 <li><i>Writethrough</i></li>
5881 </ul>
5882
5883 The virtual disk type is indicated by the <link to="#type"/>
5884 property. Each of the above types is described in detail further
5885 down.
5886
5887 There is also a forth, "hidden" virtual disk type:
5888 <i>Differencing</i>. It is "hidden" because you cannot directly
5889 create hard disks of this type -- they are automatically created by
5890 VirtualBox when necessary.
5891
5892 <b>Differencing Hard Disks</b>
5893
5894 Unlike disks of other types (that are similar to real hard disks),
5895 the differencing hard disk does not store the full range of data
5896 sectors. Instead, it stores only a subset of sectors of some other
5897 disk that were changed since the differencing hard disk has been
5898 created. Thus, every differencing hard disk has a parent hard disk
5899 it is linked to, and represents the difference between the initial
5900 and the current hard disk state. A differencing hard disk can be
5901 linked to another differencing hard disk -- this way, differencing
5902 hard disks can form a branch of changes. More over, a given virtual
5903 hard disk can have more than one differencing hard disk linked to
5904 it.
5905
5906 A disk the differencing hard disk is linked to (or, in other words,
5907 based on) is called a <i>parent</i> hard disk and is accessible through
5908 the <link to="#parent"/> property. Similarly, all existing differencing
5909 hard disks for a given parent hard disk are called its <i>child</i> hard
5910 disks (and accessible through the <link to="#children"/> property).
5911
5912 All differencing hard disks use Virtual Disk Image files to store
5913 changed sectors. They have the <link to="#type"/> property set to
5914 Normal, but can be easily distinguished from normal hard disks using
5915 the <link to="#parent"/> property: all differencing hard disks have
5916 a parent, while all normal hard disks don't.
5917
5918 When the virtual machine makes an attempt to read a sector that is
5919 missing in a differencing hard disk, its parent is accessed to
5920 resolve the sector in question. This process continues until the
5921 sector is found, or until the root hard disk is encountered, which
5922 always contains all sectors. As a consequence,
5923
5924 <ul>
5925
5926 <li>
5927 The virtual hard disk geometry seen by the guest OS is
5928 always defined by the root hard disk.
5929 </li>
5930
5931 <li>
5932 All hard disks on a branch, up to the root, must be
5933 <link to="#accessible"/> for a given differencing hard disk in order
5934 to let it function properly when the virtual machine is
5935 running.
5936 </li>
5937
5938 </ul>
5939
5940 Differencing hard disks can be implicitly created by VirtualBox in
5941 the following cases:
5942
5943 <ul>
5944
5945 <li>
5946 When a hard disk is <i>indirectly</i> attached to the virtual
5947 machine using <link to="IMachine::attachHardDisk()"/>. In this
5948 case, all disk writes performed by the guest OS will go to the
5949 created diffferencing hard disk, as opposed to the
5950 <i>direct</i> attachment, where all changes are written to the
5951 attached hard disk itself.
5952 </li>
5953
5954 <li>
5955 When a <link to="ISnapshot">snapshot</link> of the virtual machine
5956 is taken. After that, disk writes to hard disks the differencing
5957 ones have been created for, will be directed to those differencing
5958 hard disks, to preserve the contents of the original disks.
5959 </li>
5960
5961 </ul>
5962
5963 Whether to create a differencing hard disk or not depends on the
5964 type of the hard disk attached to the virtual machine. This is
5965 explained below.
5966
5967 Note that in the current implementation, only the
5968 <link to="VirtualDiskImage"/> storage type is used to
5969 represent differencing hard disks. In other words, all
5970 differencing hard disks are <link to="IVirtualDiskImage"/>
5971 objects.
5972
5973 <b>Normal Hard Disks</b>
5974
5975 Normal hard disks are the most commonly used virtual hard disk. A
5976 normal hard disk is attached to the machine directly if it is not
5977 already attached to some other machine. Otherwise, an attempt to
5978 make an indirect attachment through a differencing hard disk will be
5979 made. This attempt will fail if the hard disk is attached to a
5980 virtual machine without snapshots (because it's impossible to create
5981 a differencing hard disk based on a hard disk that is subject to
5982 change).
5983
5984 When an indirect attachment takes place, in the simplest case, where
5985 the machine the hard disk is being attached to doesn't have
5986 snapshots, the differencing hard disk will be based on the normal
5987 hard disk being attached. Otherwise, the first (i.e. the most
5988 recent) descendant of the given normal hard disk found in the
5989 current snapshot branch (starting from the current snapshot and
5990 going up to the root) will be actually used as a base.
5991
5992 Note that when you detach an indirectly attached hard disk from the
5993 machine, the created differencing hard disk image is simply
5994 <b>deleted</b>, so <b>all changes are lost</b>. If you attach the
5995 same disk again, a clean differencing disk will be created based on
5996 the most recent child, as described above.
5997
5998 When taking a snapshot, the contents of all normal hard disks (and
5999 all differencing disks whose roots are normal hard disks) currently
6000 attached to the virtual machine is preserved by creating
6001 differencing hard disks based on them.
6002
6003 <b>Immutable Hard Disks</b>
6004
6005 Immutable hard disks can be used to provide a sort of read-only
6006 access. An immutable hard disk is always attached indirectly. The
6007 created differencing hard disk is automatically wiped out (recreated
6008 from scratch) every time you power off the virtual machine. Thus,
6009 the contents of the immutable disk remains unchanged between runs.
6010
6011 Detaching an immutable hard disk deletes the differencing disk
6012 created for it, with the same effect as in case with normal hard
6013 disks.
6014
6015 When taking a snapshot, the differencing part of the immutable
6016 hard disk is cloned (i.e. copied to a separate Virtual Disk Image
6017 file) without any changes. This is necessary to preserve the exact
6018 virtual machine state when you create an online snapshot.
6019
6020 <b>Writethrough Hard Disks</b>
6021
6022 Hard disks of this type are always attached directly. This means
6023 that every given writethrough hard disk can be attached only to one
6024 virtual machine at a time.
6025
6026 It is impossible to take a snapshot of a virtual machine with the
6027 writethrough hard disk attached, because taking a snapshot implies
6028 saving the execution state and preserving the contents of all hard
6029 disks, but writethrough hard disks cannot be preserved. Preserving
6030 hard disk contents is necessary to ensure the guest OS stored in the
6031 snapshot will get the same hard disk state when restored, which is
6032 especially important when it has open file handles or when there are
6033 cached files and directories stored in memory.
6034
6035 <h3>Creating, Opening and Registering Hard Disks</h3>
6036
6037 Non-differencing hard disks are either created from scratch using
6038 <link to="IVirtualBox::createHardDisk()"/> or opened from a VDI file
6039 using <link to="IVirtualBox::openVirtualDiskImage()"/> (only for hard
6040 disks using the VirtualDiskImage storage type). Once a hard disk is
6041 created or opened, it needs to be registered using
6042 <link to="IVirtualBox::registerHardDisk()"/> to make it available for
6043 attaching to virtual machines. See the documentation of individual
6044 interfaces for various storage types to get more information.
6045
6046 Differencing hard disks are never created explicitly and cannot
6047 be registered or unregistered; they are automatically registered
6048 upon creation and deregistered when deleted.
6049
6050 <h3>More about Indirect Hard Disk Attachments</h3>
6051
6052 Normally, when you attach a hard disk to the virtual machine, and then
6053 query the corresponding attachment using
6054 <link to="IMachine::getHardDisk()"/> or
6055 <link to="IMachine::hardDiskAttachments"/> you will get the same hard
6056 disk object, whose UUID you passed earlier to
6057 <link to="IMachine::attachHardDisk()"/>. However, when an indirect
6058 attachment takes place, calling <link to="IMachine::getHardDisk()"/>
6059 will return a differencing hard disk object, that is either based on the
6060 attached hard disk or on another differencing hard disk, the attached
6061 hard disk is eventually a root for (as described above). In both cases
6062 the returned hard disk object is the object the virtual machine actually
6063 uses to perform disk writes to.
6064
6065 Regardless of whether the attachment is direct or indirect, the
6066 <link to="#machineId"/> property of the attached disk will contain an
6067 UUID of the machine object <link to="IMachine::attachHardDisk()"/>
6068 has been called on.
6069
6070 Note that both <link to="IMachine::attachHardDisk()"/> and
6071 <link to="IMachine::detachHardDisk()"/> are <i>lazy</i> operations. In
6072 particular, this means that when an indirect attachment is made,
6073 differencing hard disks are not created until machine settings are
6074 committed using <link to="IMachine::saveSettings()"/>. Similarly, when a
6075 differencing hard disk is detached, it is not deleted until
6076 <link to="IMachine::saveSettings()"/> is called. Calling
6077 <link to="IMachine::discardSettings()"/> cancels all lazy attachments or
6078 detachments made since the last commit and effectively restores the
6079 previous set of hard disks.
6080
6081 <h3>Hard Disk Accessibility</h3>
6082
6083 The <link to="#accessible"/> attribute of the hard disk object
6084 defines the accessibility state of the respective hard disk storage
6085 (for example, the VDI file for IVirtualDiskImage objects). If the
6086 value of this attribute is <tt>false</tt> then some hard disk
6087 attributes may contain invalid or outdated values (for example, the
6088 virtual or the actual hard disk size) until a new accessibility
6089 check is done that returns <tt>true</tt> (see the attribute
6090 description for more details).
6091
6092 <note>
6093 Because of the possible slowness of the accessibility check,
6094 it is not implicitly performed upon the VirtualBox server startup
6095 (to prevent the application freeze). In partcular, this means that
6096 if you try to read hard disk properties that depend on the
6097 accessibility state without first reading the value of the
6098 <link to="#accessible"/> attribute and ensuring it's value is
6099 <tt>true</tt>, you will get wrong (zero) values.
6100 </note>
6101
6102 </desc>
6103
6104 <attribute name="id" type="uuid" readonly="yes">
6105 <desc>
6106
6107 UUID of the hard disk. For newly created hard disk objects,
6108 this value is a randomly generated UUID.
6109
6110 </desc>
6111 </attribute>
6112
6113 <attribute name="description" type="wstring">
6114 <desc>
6115
6116 Optional description of the hard disk. For a newly created hard
6117 disk, this value is <tt>null</tt>.
6118
6119 <note>For some storage types, reading this property is
6120 meaningless when <link to="#accessible"/> is <tt>false</tt>.
6121 Also, you cannot assign it a new value in this case.</note>
6122
6123 </desc>
6124 </attribute>
6125
6126 <attribute name="storageType" type="HardDiskStorageType" readonly="yes">
6127 <desc>
6128
6129 Storage type of this hard disk.
6130
6131 Storage type is defined when you open or create a new hard disk
6132 object.
6133
6134 </desc>
6135 </attribute>
6136
6137 <attribute name="location" type="wstring" readonly="yes">
6138 <desc>
6139
6140 Storage location of this hard disk. The returned string serves
6141 for informational purposes only. To access detailed information
6142 about the storage, query the appropriate storage-specific
6143 interface.
6144
6145 </desc>
6146 </attribute>
6147
6148 <attribute name="type" type="HardDiskType">
6149 <desc>
6150
6151 Type (behavior) of this hard disk. For a newly created or opened hard
6152 disk, this value is <link to="HardDiskType::Normal"/>.
6153
6154 <note>
6155 In the current implementation, this property can be
6156 changed only on an unregistered hard disk object. This may be
6157 changed later.
6158 </note>
6159
6160 </desc>
6161 </attribute>
6162
6163 <attribute name="parent" type="IHardDisk" readonly="yes">
6164 <desc>
6165
6166 Parent of this hard disk (a hard disk this one is directly based
6167 on).
6168
6169 Only differencing hard disks have parents, so a <tt>null</tt>
6170 object is returned for a hard disk of any other type.
6171 </desc>
6172 </attribute>
6173
6174 <attribute name="children" type="IHardDiskCollection" readonly="yes">
6175 <desc>
6176
6177 Children of this hard disk (all differencing hard disks for
6178 those this one is a parent). An empty collection is returned, if
6179 this hard disk doesn't have any children.
6180
6181 </desc>
6182 </attribute>
6183
6184 <attribute name="root" type="IHardDisk" readonly="yes">
6185 <desc>
6186
6187 Root hard disk of this hard disk. If this hard disk is a
6188 differencing hard disk, its root hard disk is the first disk on
6189 the branch. For all other types of hard disks, this property
6190 returns the hard disk object itself (i.e. the same object you
6191 read this property on).
6192
6193 </desc>
6194 </attribute>
6195
6196 <attribute name="accessible" type="boolean" readonly="yes">
6197 <desc>
6198
6199 Whether the hard disk storage is currently accessible or not.
6200 The storage, for example, can be unaccessible if it doesn't exist
6201 or if it is placed on a network resource that is not available
6202 by the time this attribute is read.
6203
6204 In the current implementation, the value of this property is
6205 also <tt>false</tt> if this hard disk is attached to a running
6206 virtual machine.
6207
6208 The accessibility check is performed automatically every time
6209 this attribute is read. You should keep it in mind that this check
6210 may be slow and can block the calling thread for a long time (for
6211 example, if the network resourse where the hard disk storage is
6212 located is down).
6213
6214 The following attributes of the hard disk object are considered
6215 to be invalid when this attribute is <tt>false</tt>:
6216 <ul>
6217 <li><link to="#size"/></li>
6218 <li><link to="#actualSize"/></li>
6219 </ul>
6220 Individual hard disk storage type interfaces may define
6221 additional attributes that depend on the accessibility state.
6222 </desc>
6223 </attribute>
6224
6225 <attribute name="allAccessible" type="boolean" readonly="yes">
6226 <desc>
6227
6228 Whether the whole hard disk branch, starting from this image and
6229 going through its ancestors up to the root, is accessible or
6230 not.
6231
6232 This property makes sense only for differencing hard disks. For
6233 all other types of hard disks it returns the same value as
6234 <link to="#accessible"/>.
6235
6236 </desc>
6237 </attribute>
6238
6239 <attribute name="lastAccessError" type="wstring" readonly="yes">
6240 <desc>
6241
6242 String describing the reason of inaccessibility of this hard
6243 disk after the last call to <link to="#accessible"/> that
6244 returned <tt>false</tt>. A <tt>null</tt> value of this property
6245 means that the last accessibility check returned <tt>true</tt>.
6246
6247 </desc>
6248 </attribute>
6249
6250 <attribute name="size" type="unsigned long long" readonly="yes">
6251 <desc>
6252
6253 Logical size of this hard disk (in megabytes), as reported to the
6254 guest OS running inside the vurtual machine this disk is
6255 attached to. The logical size is defined when the hard disk is
6256 created.
6257
6258 <note>Reading this property on a differencing hard disk will
6259 return the size of its root hard disk.</note>
6260
6261 <note>Reading this property is meaningless when
6262 <link to="#accessible"/> is <tt>false</tt></note>
6263
6264 </desc>
6265 </attribute>
6266
6267 <attribute name="actualSize" type="unsigned long long" readonly="yes">
6268 <desc>
6269
6270 Physical size of the storage used to store hard disk data (in
6271 bytes). This size is usually less than the logical size of the
6272 hard disk, depending on the storage type and on the size
6273 optimization method used for that storage.
6274
6275 <note>Reading this property is meaningless when
6276 <link to="#accessible"/> is <tt>false</tt></note>
6277
6278 </desc>
6279 </attribute>
6280
6281 <attribute name="machineId" type="uuid" readonly="yes">
6282 <desc>
6283
6284 UUID of the machine this hard disk is attached to (or a
6285 <tt>null</tt> UUID if it is not attached).
6286
6287 <note>Immutable hard disks are never attached directly, so this
6288 attribute is always <tt>null</tt> in this case.</note>
6289
6290 </desc>
6291 </attribute>
6292
6293 <attribute name="snapshotId" type="uuid" readonly="yes">
6294 <desc>
6295
6296 UUID of the <link to="ISnapshot">snapshot</link> this hard disk
6297 is associated with (or <tt>null</tt> UUID if it is not
6298 associated with any snapshot).
6299
6300 <note>
6301 This attribute is always <tt>null</tt> if <link to="#machineId"/>
6302 is <tt>null</tt>.
6303 </note>
6304
6305 <note>
6306 Writethrough hard disks are always attached directly and cannot be
6307 involved when taking snapshots, so this attribute is meaningless and
6308 therefore always <tt>null</tt>.
6309 </note>
6310
6311 </desc>
6312 </attribute>
6313
6314 <method name="cloneToImage">
6315
6316 <desc>
6317
6318 Starts creating a clone of this hard disk. The cloned hard disk
6319 will use the specified Virtual Disk Image file as a storage and
6320 will contain exactly the same sector data as the hard disk being
6321 cloned, except that a new UUID for the clone will be randomly
6322 generated.
6323
6324 The specified image file path can be absolute (full path) or
6325 relative to the <link to="IVirtualBox::homeFolder"> VirtualBox
6326 home directory</link>. If only a file name without any path is
6327 given, the <link to="ISystemProperties::defaultVDIFolder">
6328 default VDI folder</link> will be used as a path to the image
6329 file.
6330
6331 It is an error to use the object returned in the @a image
6332 parameter until the returned @a progress object reports success.
6333
6334 <note>In the current implementation, only non-differencing hard
6335 disks can be cloned.</note>
6336
6337 </desc>
6338
6339 <param name="filePath" type="wstring" dir="in">
6340 <desc>Path to a file where to store the cloned hard disk.</desc>
6341 </param>
6342 <param name="image" type="IVirtualDiskImage" dir="out">
6343 <desc>Cloned hard disk object.</desc>
6344 </param>
6345 <param name="progress" type="IProgress" dir="return">
6346 <desc>Progress object to track the operation completion.</desc>
6347 </param>
6348
6349 </method>
6350
6351 </interface>
6352
6353 <!--
6354 // IVirtualDiskImage
6355 /////////////////////////////////////////////////////////////////////////
6356 -->
6357
6358 <interface
6359 name="IVirtualDiskImage" extends="$unknown"
6360 uuid="a8265b5a-0d20-4a46-a02f-65693a4e8239"
6361 wsmap="managed"
6362 >
6363
6364 <desc>
6365 The IVirtualDiskImage interface represent a specific type of
6366 <link to="IHardDisk" /> that uses VDI image files.
6367
6368 The Virtual Disk Image (VDI) format is VirtualBox's native format for
6369 hard disk containers.
6370
6371 Objects that support this interface also support the
6372 <link to="IHardDisk"/> interface.
6373
6374 Hard disks using virtual disk images can be either opened using
6375 <link to="IVirtualBox::openHardDisk()"/> or created from
6376 scratch using <link to="IVirtualBox::createHardDisk()"/>.
6377
6378 When a new hard disk object is created from scratch, an image file for it
6379 is not automatically created. To do it, you need to specify a
6380 valid <link to="#filePath">file path</link>, and call
6381 <link to="#createFixedImage()"/> or <link to="#createDynamicImage()"/>.
6382 When it is done, the hard disk object can be registered by calling
6383 <link to="IVirtualBox::registerHardDisk()"/> and then
6384 <link to="IMachine::attachHardDisk()">attached</link> to
6385 virtual machines.
6386
6387 The <link to="IHardDisk::description">description</link> of the
6388 Virtual Disk Image is stored in the image file. For this reason,
6389 changing the value of this property requires the hard disk to be
6390 <link to="IHardDisk::accessible">accessible</link>. The description
6391 of a registered hard disk can be changed only if a virtual machine
6392 using it is not running.
6393
6394 </desc>
6395
6396 <attribute name="filePath" type="wstring">
6397 <desc>
6398
6399 Full file name of the virtual disk image of this hard disk. For
6400 newly created hard disk objects, this value is <tt>null</tt>.
6401
6402 When assigning a new path, it can be absolute (full path) or relative
6403 to the <link to="IVirtualBox::homeFolder"> VirtualBox home
6404 directory</link>. If only a file name without any path is given,
6405 the <link to="ISystemProperties::defaultVDIFolder"> default VDI
6406 folder</link> will be used as a path to the image file.
6407
6408 When reading this propery, a full path is always returned.
6409
6410 <note>
6411 This property cannot be changed when <link to="#created"/>
6412 returns <tt>true</tt>.
6413 </note>
6414
6415 </desc>
6416 </attribute>
6417
6418 <attribute name="created" type="boolean" readonly="yes">
6419 <desc>
6420
6421 Whether the virual disk image is created or not. For newly
6422 created hard disk objects or after a successful invocation of
6423 <link to="#deleteImage()"/>, this value is <tt>false</tt> until
6424 <link to="#createFixedImage()"/> or <link
6425 to="#createDynamicImage()"/> is called.
6426
6427 </desc>
6428 </attribute>
6429
6430 <method name="createDynamicImage">
6431
6432 <desc>
6433
6434 Starts creating a dymically expanding hard disk image in the
6435 background. The previous image associated with this object, if
6436 any, must be deleted using <link to="#deleteImage"/>, otherwise
6437 the operation will fail.
6438
6439 <note>After the returned progress object reports that the
6440 operation is complete, this hard disk object can be
6441 <link to="IVirtualBox::registerHardDisk()">registered</link>
6442 within this VirtualBox installation.</note>
6443
6444 </desc>
6445
6446 <param name="size" type="unsigned long long" dir="in">
6447 <desc>Maximum logical size of the hard disk in megabytes.</desc>
6448 </param>
6449 <param name="progress" type="IProgress" dir="return">
6450 <desc>Progress object to track the operation completion.</desc>
6451 </param>
6452
6453 </method>
6454
6455 <method name="createFixedImage">
6456 <desc>
6457
6458 Starts creating a fixed-size hard disk image in the background. The
6459 previous image, if any, must be deleted using
6460 <link to="#deleteImage"/>, otherwise the operation will fail.
6461
6462 <note>
6463 After the returned progress object reports that the
6464 operation is complete, this hard disk object can be
6465 <link to="IVirtualBox::registerHardDisk()">registered</link>
6466 within this VirtualBox installation.
6467 </note>
6468
6469 </desc>
6470
6471 <param name="size" type="unsigned long long" dir="in">
6472 <desc>Logical size of the hard disk in megabytes.</desc>
6473 </param>
6474 <param name="progress" type="IProgress" dir="return">
6475 <desc>Progress object to track the operation completion.</desc>
6476 </param>
6477
6478 </method>
6479
6480 <method name="deleteImage">
6481 <desc>
6482
6483 Deletes the existing hard disk image. The hard disk must not be
6484 registered within this VirtualBox installation, otherwise the
6485 operation will fail.
6486
6487 <note>
6488 After this operation succeeds, it will be impossible to
6489 register the hard disk until the image file is created
6490 again.
6491 </note>
6492
6493 <note>
6494 This operation is valid only for non-differencing hard disks, after
6495 they are unregistered using
6496 <link to="IVirtualBox::unregisterHardDisk()"/>.
6497 </note>
6498
6499 </desc>
6500 </method>
6501
6502 </interface>
6503
6504 <!--
6505 // IISCSIHardDisk
6506 /////////////////////////////////////////////////////////////////////////
6507 -->
6508
6509 <interface
6510 name="IISCSIHardDisk" extends="$unknown"
6511 uuid="003f6ca9-3257-4ef9-99c9-c66ce44576cb"
6512 wsmap="managed"
6513 >
6514
6515 <desc>
6516 THe IISCSIHardDisk interface represents a specific type of
6517 <link to="IHardDisk"/> that uses iSCSI.
6518
6519 The IISCSIHardDisk interface represents <link to="IHardDisk">virtual
6520 hard disks</link> that use the Internet SCSI (iSCSI) protocol to store
6521 hard disk data on remote machines.
6522
6523 Objects that support this interface also support the
6524 <link to="IHardDisk"/> interface.
6525
6526 iSCSI hard disks can be created using
6527 <link to="IVirtualBox::createHardDisk()"/>. When a new hard disk object
6528 is created, all its properties are uninitialized. After you assign some
6529 meaningful values to them, the hard disk object can be registered by
6530 calling <link to="IVirtualBox::registerHardDisk()"/> and
6531 then <link to="IMachine::attachHardDisk()">attached</link> to virtual
6532 machines.
6533
6534 The <link to="IHardDisk::description">description</link>
6535 of the iSCSI hard disk is stored in the VirtualBox
6536 configuration file, so it can be changed (at appropriate
6537 times) even when
6538 <link to="IHardDisk::accessible">accessible</link> returns
6539 <tt>false</tt>. However, the hard disk must not be
6540 attached to a running virtual machine.
6541
6542 <note>
6543 In the current imlementation, the type of all iSCSI hard disks
6544 is <link to="HardDiskType::Writethrough">Writethrough</link>
6545 and cannot be changed.
6546 </note>
6547
6548 </desc>
6549
6550 <attribute name="server" type="wstring">
6551 <desc>
6552
6553 iSCSI Server name (either a host name or an IP address). For
6554 newly created hard disk objects, this value is <tt>null</tt>.
6555
6556 </desc>
6557 </attribute>
6558
6559 <attribute name="port" type="unsigned short">
6560 <desc>
6561
6562 iSCSI Server port. For newly created hard disk objects, this
6563 value is <tt>0</tt>, which means the default port.
6564
6565 </desc>
6566 </attribute>
6567
6568 <attribute name="target" type="wstring">
6569 <desc>
6570
6571 iSCSI target name. For newly created hard disk objects, this
6572 value is <tt>null</tt>.
6573
6574 </desc>
6575 </attribute>
6576
6577 <attribute name="lun" type="unsigned long long">
6578 <desc>
6579
6580 Logical unit number for this iSCSI disk. For newly created hard
6581 disk objects, this value is <tt>0</tt>.
6582
6583 </desc>
6584 </attribute>
6585
6586 <attribute name="userName" type="wstring">
6587 <desc>
6588
6589 User name for accessing this iSCSI disk. For newly created hard
6590 disk objects, this value is <tt>null</tt>.
6591
6592 </desc>
6593 </attribute>
6594
6595 <attribute name="password" type="wstring">
6596 <desc>
6597
6598 User password for accessing this iSCSI disk. For newly created
6599 hard disk objects, this value is <tt>null</tt>.
6600
6601 </desc>
6602 </attribute>
6603
6604 </interface>
6605
6606 <!--
6607 // IVMDKImage
6608 /////////////////////////////////////////////////////////////////////////
6609 -->
6610
6611 <interface
6612 name="IVMDKImage" extends="$unknown"
6613 uuid="178398f5-8559-4fee-979e-420af5b53eef"
6614 wsmap="managed"
6615 >
6616 <desc>
6617 The IVMDKImage interface represents a specific type of
6618 <link to="IHardDisk"/> that uses VMDK image files.
6619
6620 The Virtual Machine Disk (VMDK) format is the industry standard format
6621 for virtual hard disk image files, which VirtualBox supports besides its
6622 own native VDI format.
6623
6624 Objects that support this interface also support the
6625 <link to="IHardDisk"/> interface.
6626
6627 Hard disks using VMDK images can be either opened using
6628 <link to="IVirtualBox::openHardDisk()"/> or created from
6629 scratch using <link to="IVirtualBox::createHardDisk()"/>.
6630
6631 When a new hard disk object is created from scratch, an image file for it
6632 is not automatically created. To do it, you need to specify a
6633 valid <link to="#filePath">file path</link>, and call
6634 <link to="#createFixedImage()"/> or <link to="#createDynamicImage()"/>.
6635 When it is done, the hard disk object can be registered by calling
6636 <link to="IVirtualBox::registerHardDisk()"/> and then
6637 <link to="IMachine::attachHardDisk()">attached</link> to
6638 virtual machines.
6639
6640 The <link to="IHardDisk::description">description</link>
6641 of the VMDK hard disk is stored in the VirtualBox
6642 configuration file, so it can be changed (at appropriate
6643 times) even when
6644 <link to="IHardDisk::accessible">accessible</link> returns
6645 <tt>false</tt>. However, the hard disk must not be
6646 attached to a running virtual machine.
6647
6648 <note>
6649 In the current imlementation, the type of all VMDK hard disks
6650 is <link to="HardDiskType::Writethrough">Writethrough</link> and cannot
6651 be changed.
6652 </note>
6653
6654 </desc>
6655
6656 <attribute name="filePath" type="wstring">
6657 <desc>
6658
6659 Full file name of the VMDK image of this hard disk. For
6660 newly created hard disk objects, this value is <tt>null</tt>.
6661
6662 When assigning a new path, it can be absolute (full path) or relative
6663 to the <link to="IVirtualBox::homeFolder"> VirtualBox home
6664 directory</link>. If only a file name without any path is given,
6665 the <link to="ISystemProperties::defaultVDIFolder"> default VDI
6666 folder</link> will be used as a path to the image file.
6667
6668 When reading this propery, a full path is always returned.
6669
6670 <note>
6671 This property cannot be changed when <link to="#created"/>
6672 returns <tt>true</tt>.
6673 </note>
6674
6675 </desc>
6676 </attribute>
6677
6678 <attribute name="created" type="boolean" readonly="yes">
6679 <desc>
6680
6681 Whether the virual disk image is created or not. For newly created
6682 hard disk objects or after a successful invocation of
6683 <link to="#deleteImage()"/>, this value is <tt>false</tt> until
6684 <link to="#createFixedImage()"/> or <link to="#createDynamicImage()"/>
6685 is called.
6686
6687 </desc>
6688 </attribute>
6689
6690 <method name="createDynamicImage">
6691
6692 <desc>
6693
6694 Starts creating a dymically expanding hard disk image in the
6695 background. The previous image associated with this object, if
6696 any, must be deleted using <link to="#deleteImage"/>, otherwise
6697 the operation will fail.
6698
6699 <note>
6700 After the returned progress object reports that the
6701 operation is complete, this hard disk object can be
6702 <link to="IVirtualBox::registerHardDisk()">registered</link> within
6703 this VirtualBox installation.
6704 </note>
6705
6706 </desc>
6707
6708 <param name="size" type="unsigned long long" dir="in">
6709 <desc>Maximum logical size of the hard disk in megabytes.</desc>
6710 </param>
6711 <param name="progress" type="IProgress" dir="return">
6712 <desc>Progress object to track the operation completion.</desc>
6713 </param>
6714
6715 </method>
6716
6717 <method name="createFixedImage">
6718 <desc>
6719
6720 Starts creating a fixed-size hard disk image in the background. The
6721 previous image, if any, must be deleted using
6722 <link to="#deleteImage"/>, otherwise the operation will fail.
6723
6724 <note>
6725 After the returned progress object reports that the
6726 operation is complete, this hard disk object can be
6727 <link to="IVirtualBox::registerHardDisk()">registered</link> within
6728 this VirtualBox installation.
6729 </note>
6730
6731 </desc>
6732
6733 <param name="size" type="unsigned long long" dir="in">
6734 <desc>Logical size of the hard disk in megabytes.</desc>
6735 </param>
6736 <param name="progress" type="IProgress" dir="return">
6737 <desc>Progress object to track the operation completion.</desc>
6738 </param>
6739
6740 </method>
6741
6742 <method name="deleteImage">
6743 <desc>
6744
6745 Deletes the existing hard disk image. The hard disk must not be
6746 registered within this VirtualBox installation, otherwise the
6747 operation will fail.
6748
6749 <note>
6750 After this operation succeeds, it will be impossible to register the
6751 hard disk until the image file is created again.
6752 </note>
6753
6754 <note>
6755 This operation is valid only for non-differencing hard disks, after
6756 they are unregistered using
6757 <link to="IVirtualBox::unregisterHardDisk()"/>.
6758 </note>
6759
6760 </desc>
6761 </method>
6762
6763 </interface>
6764
6765 <!--
6766 // ICustomHardDisk
6767 /////////////////////////////////////////////////////////////////////////
6768 -->
6769
6770 <interface
6771 name="ICustomHardDisk" extends="$unknown"
6772 uuid="a7b0236d-3ff4-47c0-a4aa-ddc4ddc1141a"
6773 wsmap="managed"
6774 >
6775 <desc>
6776 The ICustomHardDisk interface represents a specific type of
6777 <link to="IHardDisk" /> that is supported through a third-party plugin.
6778
6779 This interface allows to add support for custom hard disk formats to
6780 VirtualBox.
6781
6782 Objects that support this interface also support the
6783 <link to="IHardDisk"/> interface.
6784
6785 Hard disks using custom hard disk formats can be either opened using
6786 <link to="IVirtualBox::openHardDisk()"/> or created from scratch using
6787 <link to="IVirtualBox::createHardDisk()"/>.
6788
6789 When a new hard disk object is created from scratch, an image file for
6790 it is not automatically created. To do it, you need to specify a
6791 valid <link to="#location">location</link>, and call
6792 <link to="#createFixedImage()"/> or <link to="#createDynamicImage()"/>.
6793 When it is done, the hard disk object can be registered by calling
6794 <link to="IVirtualBox::registerHardDisk()"/> and then
6795 <link to="IMachine::attachHardDisk()">attached</link> to
6796 virtual machines.
6797
6798 The <link to="IHardDisk::description">description</link>
6799 of the hard disk is stored in the VirtualBox
6800 configuration file, so it can be changed (at appropriate
6801 times) even when
6802 <link to="IHardDisk::accessible">accessible</link> returns
6803 <tt>false</tt>. However, the hard disk must not be
6804 attached to a running virtual machine.
6805
6806 </desc>
6807
6808 <attribute name="location" type="wstring">
6809 <desc>
6810
6811 Location of this custom hard disk. For
6812 newly created hard disk objects, this value is <tt>null</tt>.
6813
6814 The format of the location string is plugin-dependent. In case if the
6815 plugin uses a regular file in the local file system to store hard disk
6816 data, then the location is a file path and the following rules apply:
6817 <ul>
6818 <li>
6819 when assigning a new path, it must be absolute (full path) or
6820 relative to the <link to="IVirtualBox::homeFolder"> VirtualBox
6821 home directory</link>. If only a file name without any path is
6822 given, the <link to="ISystemProperties::defaultVDIFolder"> default
6823 VDI folder</link> will be used as a path to the image file.
6824 </li>
6825 <li>
6826 When reading this propery, a full path is always returned.
6827 </li>
6828 </ul>
6829
6830 <note>
6831 This property cannot be changed when <link to="#created"/>
6832 returns <tt>true</tt>.
6833 </note>
6834
6835 </desc>
6836 </attribute>
6837
6838 <attribute name="format" type="wstring" readonly="yes">
6839 <desc>
6840
6841 The plugin name of the image file.
6842
6843 </desc>
6844 </attribute>
6845
6846 <attribute name="created" type="boolean" readonly="yes">
6847 <desc>
6848
6849 Whether the virual disk image is created or not. For newly created
6850 hard disk objects or after a successful invocation of
6851 <link to="#deleteImage()"/>, this value is <tt>false</tt> until
6852 <link to="#createFixedImage()"/> or <link to="#createDynamicImage()"/>
6853 is called.
6854
6855 </desc>
6856 </attribute>
6857
6858 <method name="createDynamicImage">
6859
6860 <desc>
6861
6862 Starts creating a dymically expanding hard disk image in the
6863 background. The previous image associated with this object, if
6864 any, must be deleted using <link to="#deleteImage"/>, otherwise
6865 the operation will fail.
6866
6867 <note>
6868 After the returned progress object reports that the
6869 operation is complete, this hard disk object can be
6870 <link to="IVirtualBox::registerHardDisk()">registered</link> within
6871 this VirtualBox installation.
6872 </note>
6873
6874 </desc>
6875
6876 <param name="size" type="unsigned long long" dir="in">
6877 <desc>Maximum logical size of the hard disk in megabytes.</desc>
6878 </param>
6879 <param name="progress" type="IProgress" dir="return">
6880 <desc>Progress object to track the operation completion.</desc>
6881 </param>
6882
6883 </method>
6884
6885 <method name="createFixedImage">
6886 <desc>
6887
6888 Starts creating a fixed-size hard disk image in the background. The
6889 previous image, if any, must be deleted using
6890 <link to="#deleteImage"/>, otherwise the operation will fail.
6891
6892 <note>
6893 After the returned progress object reports that the
6894 operation is complete, this hard disk object can be
6895 <link to="IVirtualBox::registerHardDisk()">registered</link> within
6896 this VirtualBox installation.
6897 </note>
6898
6899 </desc>
6900
6901 <param name="size" type="unsigned long long" dir="in">
6902 <desc>Logical size of the hard disk in megabytes.</desc>
6903 </param>
6904 <param name="progress" type="IProgress" dir="return">
6905 <desc>Progress object to track the operation completion.</desc>
6906 </param>
6907
6908 </method>
6909
6910 <method name="deleteImage">
6911 <desc>
6912
6913 Deletes the existing hard disk image. The hard disk must not be
6914 registered within this VirtualBox installation, otherwise the
6915 operation will fail.
6916
6917 <note>
6918 After this operation succeeds, it will be impossible to register the
6919 hard disk until the image file is created again.
6920 </note>
6921
6922 <note>
6923 This operation is valid only for non-differencing hard disks, after
6924 they are unregistered using
6925 <link to="IVirtualBox::unregisterHardDisk()"/>.
6926 </note>
6927
6928 </desc>
6929 </method>
6930
6931 </interface>
6932
6933 <!--
6934 // IVHDImage
6935 /////////////////////////////////////////////////////////////////////////
6936 -->
6937
6938 <interface
6939 name="IVHDImage" extends="$unknown"
6940 uuid="163b88c3-7552-424a-8205-daf17a004747"
6941 wsmap="managed"
6942 >
6943 <desc>
6944
6945 The IVHDImage interface represents <link to="IHardDisk">virtual hard
6946 disks</link> that use Virtual PC Virtual Machine Disk image files to store
6947 hard disk data.
6948
6949 Hard disks using VHD images can be either opened using
6950 <link to="IVirtualBox::openHardDisk()"/> or created from
6951 scratch using <link to="IVirtualBox::createHardDisk()"/>.
6952
6953 Objects that support this interface also support the
6954 <link to="IHardDisk"/> interface.
6955
6956 When a new hard disk object is created from scatch, an image file for it
6957 is not automatically created. To do it, you need to specify a
6958 valid <link to="#filePath">file path</link>, and call
6959 <link to="#createFixedImage()"/> or <link to="#createDynamicImage()"/>.
6960 When it is done, the hard disk object can be registered by calling
6961 <link to="IVirtualBox::registerHardDisk()"/> and then
6962 <link to="IMachine::attachHardDisk()">attached</link> to
6963 virtual machines.
6964
6965 The <link to="IHardDisk::description">description</link>
6966 of the VHD hard disk is stored in the VirtualBox
6967 configuration file, so it can be changed (at appropriate
6968 times) even when
6969 <link to="IHardDisk::accessible">accessible</link> returns
6970 <tt>false</tt>. However, the hard disk must not be
6971 attached to a running virtual machine.
6972
6973 <note>
6974 In the current imlementation, the type of all VHD hard disks
6975 is <link to="HardDiskType::Writethrough">Writethrough</link> and cannot
6976 be changed.
6977 </note>
6978
6979 </desc>
6980
6981 <attribute name="filePath" type="wstring">
6982 <desc>
6983
6984 Full file name of the VHD image of this hard disk. For
6985 newly created hard disk objects, this value is <tt>null</tt>.
6986
6987 When assigning a new path, it can be absolute (full path) or relative
6988 to the <link to="IVirtualBox::homeFolder"> VirtualBox home
6989 directory</link>. If only a file name without any path is given,
6990 the <link to="ISystemProperties::defaultVDIFolder"> default VDI
6991 folder</link> will be used as a path to the image file.
6992
6993 When reading this propery, a full path is always returned.
6994
6995 <note>
6996 This property cannot be changed when <link to="#created"/>
6997 returns <tt>true</tt>. In this case, the specified file name can be
6998 absolute (full path) or relative to
6999 the <link to="IVirtualBox::homeFolder"> VirtualBox home
7000 directory</link>. If only a file name without any path is given,
7001 the <link to="ISystemProperties::defaultVDIFolder"> default VDI
7002 folder</link> will be used as a path to the image file.
7003 </note>
7004
7005 </desc>
7006 </attribute>
7007
7008 <attribute name="created" type="boolean" readonly="yes">
7009 <desc>
7010
7011 Whether the virual disk image is created or not. For newly created
7012 hard disk objects or after a successful invocation of
7013 <link to="#deleteImage()"/>, this value is <tt>false</tt> until
7014 <link to="#createFixedImage()"/> or <link to="#createDynamicImage()"/>
7015 is called.
7016
7017 </desc>
7018 </attribute>
7019
7020 <method name="createDynamicImage">
7021
7022 <desc>
7023
7024 Starts creating a dymically expanding hard disk image in the
7025 background. The previous image associated with this object, if
7026 any, must be deleted using <link to="#deleteImage"/>, otherwise
7027 the operation will fail.
7028
7029 <note>
7030 After the returned progress object reports that the
7031 operation is complete, this hard disk object can be
7032 <link to="IVirtualBox::registerHardDisk()">registered</link> within
7033 this VirtualBox installation.
7034 </note>
7035
7036 </desc>
7037
7038 <param name="size" type="unsigned long long" dir="in">
7039 <desc>Maximum logical size of the hard disk in megabytes.</desc>
7040 </param>
7041 <param name="progress" type="IProgress" dir="return">
7042 <desc>Progress object to track the operation completion.</desc>
7043 </param>
7044
7045 </method>
7046
7047 <method name="createFixedImage">
7048 <desc>
7049
7050 Starts creating a fixed-size hard disk image in the background. The
7051 previous image, if any, must be deleted using
7052 <link to="#deleteImage"/>, otherwise the operation will fail.
7053
7054 <note>
7055 After the returned progress object reports that the
7056 operation is complete, this hard disk object can be
7057 <link to="IVirtualBox::registerHardDisk()">registered</link> within
7058 this VirtualBox installation.
7059 </note>
7060
7061 </desc>
7062
7063 <param name="size" type="unsigned long long" dir="in">
7064 <desc>Logical size of the hard disk in megabytes.</desc>
7065 </param>
7066 <param name="progress" type="IProgress" dir="return">
7067 <desc>Progress object to track the operation completion.</desc>
7068 </param>
7069
7070 </method>
7071
7072 <method name="deleteImage">
7073 <desc>
7074
7075 Deletes the existing hard disk image. The hard disk must not be
7076 registered within this VirtualBox installation, otherwise the
7077 operation will fail.
7078
7079 <note>
7080 After this operation succeeds, it will be impossible to register the
7081 hard disk until the image file is created again.
7082 </note>
7083
7084 <note>
7085 This operation is valid only for non-differencing hard disks, after
7086 they are unregistered using
7087 <link to="IVirtualBox::unregisterHardDisk()"/>.
7088 </note>
7089
7090 </desc>
7091 </method>
7092
7093 </interface>
7094
7095 <!--
7096 // IDVDImage
7097 /////////////////////////////////////////////////////////////////////////
7098 -->
7099
7100 <enumerator
7101 name="IDVDImageEnumerator" type="IDVDImage"
7102 uuid="9BE77C8D-E1BE-4bf2-A67B-B4DD3D2B0F28"
7103 />
7104
7105 <collection
7106 name="IDVDImageCollection" type="IDVDImage"
7107 enumerator="IDVDImageEnumerator"
7108 uuid="AE7053FA-ADD2-4ea4-AFCF-24D5F8DDED64"
7109 readonly="yes"
7110 >
7111 <method name="findByPath">
7112 <desc>
7113 Searches this collection for a DVD image with the given disk path.
7114 <note>
7115 The method returns an error if the given name does not
7116 correspond to any DVD image in the collection.
7117 </note>
7118 </desc>
7119 <param name="path" type="wstring" dir="in">
7120 <desc>Name of the DVD image's file system location.</desc>
7121 </param>
7122 <param name="image" type="IDVDImage" dir="return">
7123 <desc>Found DVD image object</desc>
7124 </param>
7125 </method>
7126 </collection>
7127
7128 <interface
7129 name="IDVDImage" extends="$unknown"
7130 uuid="140FFF03-E479-4194-8562-ABC4F8171009"
7131 wsmap="managed"
7132 >
7133 <desc>
7134
7135 The IDVDImage interface represents a file containing the image
7136 of the DVD or CD disk.
7137
7138 <h3>Image Accessibility</h3>
7139
7140 The <link to="#accessible"/> attribute of the image object
7141 defines the accessibility state of the image file. If the
7142 value of this attribute is <tt>false</tt> then some image
7143 attributes may contain invalid or outdated values (for example, the
7144 the image file size) until a new accessibility
7145 check is done that returns <tt>true</tt>.
7146
7147 <note>
7148 Because of the possible slowness of the accessibility check,
7149 it is not implicitly performed upon the VirtualBox server startup
7150 (to prevent the application freeze). In partcular, this means that
7151 if you try to read image properties that depend on the
7152 accessibility state without first reading the value of the
7153 <link to="#accessible"/> attribute and ensuring it's value is
7154 <tt>true</tt>, you will get wrong (zero) values.
7155 </note>
7156
7157 </desc>
7158 <attribute name="id" type="uuid" readonly="yes">
7159 <desc>UUID of the CD/DVD image.</desc>
7160 </attribute>
7161
7162 <attribute name="filePath" type="wstring" readonly="yes">
7163 <desc>Full file name of the CD/DVD image.</desc>
7164 </attribute>
7165
7166 <attribute name="accessible" type="boolean" readonly="yes">
7167 <desc>
7168
7169 Whether the CD/DVD image is currently accessible or not.
7170 The image, for example, can be unaccessible if it is placed
7171 on a network share that is not available by the time
7172 this property is read.
7173
7174 The accessibility check is performed automatically every time
7175 this attribute is read. You should keep it in mind that this check
7176 may be slow and can block the calling thread for a long time (for
7177 example, if the network share where the image is located is down).
7178
7179 The following attributes of the image object are considered
7180 to be invalid when this attribute is <tt>false</tt>:
7181 <ul>
7182 <li><link to="#size"/></li>
7183 </ul>
7184
7185 </desc>
7186 </attribute>
7187
7188 <attribute name="size" type="unsigned long long" readonly="yes">
7189 <desc>Size of the ISO image in bytes.</desc>
7190 </attribute>
7191
7192 </interface>
7193
7194
7195 <!--
7196 // IDVDDrive
7197 /////////////////////////////////////////////////////////////////////////
7198 -->
7199
7200 <interface
7201 name="IDVDDrive" extends="$unknown"
7202 uuid="d9bd101a-8079-4fb9-bad1-31bf32482b75"
7203 wsmap="managed"
7204 >
7205 <desc>
7206 The IDVDDrive interface represents the virtual CD/DVD drive of the
7207 virtual machine. Used in <link to="IMachine::DVDDrive"/>.
7208 </desc>
7209 <attribute name="state" type="DriveState" readonly="yes">
7210 <desc>Current drive state.</desc>
7211 </attribute>
7212
7213 <attribute name="passthrough" type="boolean">
7214 <desc>
7215 When a host drive is mounted and passthrough is enabled
7216 the guest will be able to directly send SCSI commands to
7217 the host drive. This enables the guest to use CD/DVD writers
7218 but is potentially dangerous.
7219 </desc>
7220 </attribute>
7221
7222 <method name="mountImage">
7223 <desc>Mounts the specified image.</desc>
7224 <param name="imageId" type="uuid" dir="in"/>
7225 </method>
7226
7227 <method name="captureHostDrive">
7228 <desc>Captures the specified host drive.</desc>
7229 <param name="drive" type="IHostDVDDrive" dir="in"/>
7230 </method>
7231
7232 <method name="unmount">
7233 <desc>Unmounts the currently mounted image/device.</desc>
7234 </method>
7235
7236 <method name="getImage">
7237 <desc>Gets the currently mounted image ID.</desc>
7238 <param name="image" type="IDVDImage" dir="return"/>
7239 </method>
7240
7241 <method name="getHostDrive">
7242 <desc>Gets the currently mounted image ID.</desc>
7243 <param name="drive" type="IHostDVDDrive" dir="return"/>
7244 </method>
7245
7246 </interface>
7247
7248 <!--
7249 // IFloppyImage
7250 /////////////////////////////////////////////////////////////////////////
7251 -->
7252
7253 <enumerator
7254 name="IFloppyImageEnumerator" type="IFloppyImage"
7255 uuid="902C4089-76B7-41f1-91E8-49A261A28A2C"
7256 />
7257
7258 <collection
7259 name="IFloppyImageCollection" type="IFloppyImage"
7260 enumerator="IFloppyImageEnumerator"
7261 uuid="327A8928-8572-446e-AD9A-18FE30E81F3F"
7262 readonly="yes">
7263 <method name="findByPath">
7264 <desc>
7265 Searches this collection for a floppy image with the given disk path.
7266 <note>
7267 The method returns an error if the given name does not
7268 correspond to any floppy image in the collection.
7269 </note>
7270 </desc>
7271 <param name="path" type="wstring" dir="in">
7272 <desc>Name of the floppy image's file system location.</desc>
7273 </param>
7274 <param name="image" type="IFloppyImage" dir="return">
7275 <desc>Found Floppy image object</desc>
7276 </param>
7277 </method>
7278 </collection>
7279
7280 <interface
7281 name="IFloppyImage" extends="$unknown"
7282 uuid="CC696755-EA98-4ffe-9DC5-C003047034AB"
7283 wsmap="managed"
7284 >
7285 <desc>
7286
7287 The IFloppyImage interface represents a file containing the image
7288 of a floppy disk.
7289
7290 <h3>Image Accessibility</h3>
7291
7292 The <link to="#accessible"/> attribute of the image object
7293 defines the accessibility state of the image file. If the
7294 value of this attribute is <tt>false</tt> then some image
7295 attributes may contain invalid or outdated values (for example, the
7296 the image file size) until a new accessibility
7297 check is done that returns <tt>true</tt>.
7298
7299 <note>
7300 Because of the possible slowness of the accessibility check,
7301 it is not implicitly performed upon the VirtualBox server startup
7302 (to prevent the application freeze). In partcular, this means that
7303 if you try to read image properties that depend on the
7304 accessibility state without first reading the value of the
7305 <link to="#accessible"/> attribute and ensuring it's value is
7306 <tt>true</tt>, you will get wrong (zero) values.
7307 </note>
7308
7309 </desc>
7310 <attribute name="id" type="uuid" readonly="yes">
7311 <desc>UUID of the floppy image.</desc>
7312 </attribute>
7313
7314 <attribute name="filePath" type="wstring" readonly="yes">
7315 <desc>Full file name of the floppy image.</desc>
7316 </attribute>
7317
7318 <attribute name="accessible" type="boolean" readonly="yes">
7319 <desc>
7320
7321 Whether the floppy image is currently accessible or not.
7322 The image, for example, can be unaccessible if it is placed
7323 on a network share that is not available by the time
7324 this property is read.
7325
7326 The accessibility check is performed automatically every time
7327 this attribute is read. You should keep it in mind that this check
7328 may be slow and can block the calling thread for a long time (for
7329 example, if the network share where the image is located is down).
7330
7331 The following attributes of the image object are considered
7332 to be invalid when this attribute is <tt>false</tt>:
7333 <ul>
7334 <li><link to="#size"/></li>
7335 </ul>
7336
7337 </desc>
7338 </attribute>
7339
7340 <attribute name="size" type="unsigned long" readonly="yes">
7341 <desc>Size of the floppy image in bytes.</desc>
7342 </attribute>
7343
7344 </interface>
7345
7346
7347 <!--
7348 // IFloppyDrive
7349 /////////////////////////////////////////////////////////////////////////
7350 -->
7351
7352 <interface
7353 name="IFloppyDrive" extends="$unknown"
7354 uuid="E9318F71-78D2-4b00-863C-B7CB0030A2D9"
7355 wsmap="managed"
7356 >
7357 <desc>
7358 The IFloppyDrive interface represents the virtual floppy drive of the
7359 virtual machine. Used in <link to="IMachine::FloppyDrive" />.
7360 </desc>
7361
7362 <attribute name="enabled" type="boolean">
7363 <desc>
7364 Flag whether the floppy drive is enabled. If it is disabled,
7365 the floppy drive will not be reported to the guest.
7366 </desc>
7367 </attribute>
7368
7369 <attribute name="state" type="DriveState" readonly="yes">
7370 <desc>Current drive state.</desc>
7371 </attribute>
7372
7373 <method name="mountImage">
7374 <desc>Mounts the specified image.</desc>
7375 <param name="imageId" type="uuid" dir="in"/>
7376 </method>
7377
7378 <method name="captureHostDrive">
7379 <desc>Captures the specified host drive.</desc>
7380 <param name="drive" type="IHostFloppyDrive" dir="in"/>
7381 </method>
7382
7383 <method name="unmount">
7384 <desc>Unmounts the currently mounted image/device.</desc>
7385 </method>
7386
7387 <method name="getImage">
7388 <desc>Gets the currently mounted image ID.</desc>
7389 <param name="image" type="IFloppyImage" dir="return"/>
7390 </method>
7391
7392 <method name="getHostDrive">
7393 <desc>Gets the currently mounted image ID.</desc>
7394 <param name="drive" type="IHostFloppyDrive" dir="return"/>
7395 </method>
7396
7397 </interface>
7398
7399
7400 <!--
7401 // IKeyboard
7402 /////////////////////////////////////////////////////////////////////////
7403 -->
7404
7405 <interface
7406 name="IKeyboard" extends="$unknown"
7407 uuid="FD443EC1-000A-4F5B-9282-D72760A66916"
7408 wsmap="managed"
7409 >
7410 <desc>
7411 The IKeyboard interface represents the virtual machine's keyboard. Used
7412 in <link to="IConsole::keyboard"/>.
7413
7414 Through this interface, the virtual machine's virtual keyboard can be controlled. One
7415 can send keystrokes to the virtual machine and send the Ctrl-Alt-Del sequence to it.
7416 </desc>
7417 <method name="putScancode">
7418 <desc>Sends a scancode to the keyboard.</desc>
7419 <param name="scancode" type="long" dir="in"/>
7420 </method>
7421
7422 <method name="putScancodes">
7423 <desc>Sends an array of scancode to the keyboard.</desc>
7424 <param name="scancodes" type="long" dir="in" array="count"/>
7425 <param name="count" type="unsigned long" dir="in"/>
7426 <param name="codesStored" type="unsigned long" dir="return"/>
7427 </method>
7428
7429 <method name="putCAD">
7430 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard.</desc>
7431 </method>
7432
7433 </interface>
7434
7435
7436 <!--
7437 // IMouse
7438 /////////////////////////////////////////////////////////////////////////
7439 -->
7440
7441 <enum
7442 name="MouseButtonState"
7443 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
7444 >
7445 <desc>
7446 Mouse button state.
7447 </desc>
7448
7449 <const name="LeftButton" value="0x01"/>
7450 <const name="RightButton" value="0x02"/>
7451 <const name="MiddleButton" value="0x04"/>
7452 <const name="WheelUp" value="0x08"/>
7453 <const name="WheelDown" value="0x10"/>
7454 <const name="MouseStateMask" value="0x1F"/>
7455 </enum>
7456
7457 <interface
7458 name="IMouse" extends="$unknown"
7459 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
7460 wsmap="managed"
7461 >
7462 <desc>
7463 The IMouse interface represents the virtual machine's mouse. Used in
7464 <link to="IConsole::mouse"/>.
7465
7466 Through this interface, the virtual machine's virtual mouse can be
7467 controlled.
7468 </desc>
7469
7470 <attribute name="absoluteSupported" type="boolean" readonly="yes">
7471 <desc>
7472 Whether the guest OS supports absolute mouse pointer positioning
7473 or not.
7474 <note>
7475 VirtualBox Guest Tools need to be installed to the guest OS
7476 in order to enable absolute mouse positioning support.
7477 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
7478 callback to be instantly informed about changes of this attribute
7479 during virtual machine execution.
7480 </note>
7481 <see><link to="#putMouseEventAbsolute"/></see>
7482 </desc>
7483 </attribute>
7484
7485 <method name="putMouseEvent">
7486 <desc>
7487 Initiates a mouse event using relative pointer movements
7488 along x and y axis.
7489 </desc>
7490
7491 <param name="dx" type="long" dir="in">
7492 <desc>
7493 Amout of pixels the mouse should move to the right.
7494 Negative values move the mouse to the left.
7495 </desc>
7496 </param>
7497 <param name="dy" type="long" dir="in">
7498 <desc>
7499 Amout of pixels the mouse should move downwards.
7500 Negative values move the mouse upwards.
7501 </desc>
7502 </param>
7503 <param name="dz" type="long" dir="in">
7504 <desc>
7505 Amount of mouse wheel moves.
7506 Positive values describe clockwize wheel rotations,
7507 negative values describe counterclockwise rotations.
7508 </desc>
7509 </param>
7510 <param name="buttonState" type="long" dir="in">
7511 <desc>
7512 The current state of mouse buttons. Every bit represents
7513 a mouse button as follows:
7514 <table>
7515 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
7516 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
7517 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
7518 </table>
7519 A value of <tt>1</tt> means the corresponding button is pressed.
7520 otherwise it is released.
7521 </desc>
7522 </param>
7523 </method>
7524
7525 <method name="putMouseEventAbsolute">
7526 <desc>
7527 Positions the mouse pointer using absolute x and y coordinates.
7528 These coordinates are expressed in pixels and
7529 start from <tt>[1,1]</tt> which corresponds to the top left
7530 corner of the virtual display.
7531
7532 <note>
7533 This method will have effect only if absolute mouse
7534 positioning is supported by the guest OS.
7535 </note>
7536
7537 <see><link to="#absoluteSupported"/></see>
7538 </desc>
7539
7540 <param name="x" type="long" dir="in">
7541 <desc>
7542 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
7543 </desc>
7544 </param>
7545 <param name="y" type="long" dir="in">
7546 <desc>
7547 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
7548 </desc>
7549 </param>
7550 <param name="dz" type="long" dir="in">
7551 <desc>
7552 Amout of mouse wheel moves.
7553 Positive values describe clockwize wheel rotations,
7554 negative values describe counterclockwise rotations.
7555 </desc>
7556 </param>
7557 <param name="buttonState" type="long" dir="in">
7558 <desc>
7559 The current state of mouse buttons. Every bit represents
7560 a mouse button as follows:
7561 <table>
7562 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
7563 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
7564 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
7565 </table>
7566 A value of <tt>1</tt> means the corresponding button is pressed.
7567 otherwise it is released.
7568 </desc>
7569 </param>
7570 </method>
7571
7572 </interface>
7573
7574 <!--
7575 // IDisplay
7576 /////////////////////////////////////////////////////////////////////////
7577 -->
7578
7579 <enum
7580 name="FramebufferAccelerationOperation"
7581 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
7582 >
7583 <desc>
7584 Framebuffer acceleration operation.
7585 </desc>
7586
7587 <const name="SolidFillAcceleration" value="1"/>
7588 <const name="ScreenCopyAcceleration" value="2"/>
7589 </enum>
7590
7591 <enum
7592 name="FramebufferPixelFormat"
7593 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
7594 >
7595 <desc>
7596 Format of the video memory buffer. Constants represented by this enum can
7597 be used to test for particular values of <link
7598 to="IFramebuffer::pixelFormat"/>. See also <link
7599 to="IFramebuffer::requestResize()"/>.
7600
7601 See also www.fourcc.org for more informantion about FOURCC pixel formats.
7602 </desc>
7603
7604 <const name="Opaque" value="0xFFFFFFFF">
7605 <desc>
7606 Unknown buffer format. The user may not assume any particular
7607 format of the buffer.
7608 </desc>
7609 </const>
7610 <const name="FOURCC_RGB" value="0x32424752">
7611 <desc>
7612 Basic RGB format. <link to="IFramebuffer::bitsPerPixel"/> determines
7613 the bit layout.
7614 </desc>
7615 </const>
7616 </enum>
7617
7618 <interface
7619 name="IFramebuffer" extends="$unknown"
7620 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
7621 wsmap="suppress"
7622 >
7623 <attribute name="address" type="octet" mod="ptr" readonly="yes">
7624 <desc>Address of the start byte of the framebuffer.</desc>
7625 </attribute>
7626
7627 <attribute name="width" type="unsigned long" readonly="yes">
7628 <desc>Framebuffer width, in pixels.</desc>
7629 </attribute>
7630
7631 <attribute name="height" type="unsigned long" readonly="yes">
7632 <desc>Framebuffer height, in pixels.</desc>
7633 </attribute>
7634
7635 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
7636 <desc>
7637 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
7638 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
7639 are: 8, 15, 16, 24 and 32.
7640 </desc>
7641 </attribute>
7642
7643 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
7644 <desc>
7645 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
7646 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
7647 size of the scan line must be aligned to 32 bits.
7648 </desc>
7649 </attribute>
7650
7651 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
7652 <desc>
7653 Framebuffer pixel format. It's either one of the values defined by <link
7654 to="FramebufferPixelFormat"/> or a raw FOURCC code.
7655 <note>
7656 This attribute must never return <link
7657 to="PixelFormat::Opaque"/> -- the format of the buffer
7658 <link to="#address"/> points to must be always known.
7659 </note>
7660 </desc>
7661 </attribute>
7662
7663 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
7664 <desc>
7665 Defines whether this framebuffer uses the virtual video card's memory
7666 buffer (guest VRAM) directly or not. See <link
7667 to="IFramebuffer::requestResize()"/> for more information.
7668 </desc>
7669 </attribute>
7670
7671 <attribute name="heightReduction" type="unsigned long" readonly="yes">
7672 <desc>
7673 Hint from the framebuffer about how much of the standard
7674 screen height it wants to use for itself. This information is
7675 exposed to the guest through the VESA BIOS and VMMDev interface
7676 so that it can use it for determining its video mode table. It
7677 is not guaranteed that the guest respects the value.
7678 </desc>
7679 </attribute>
7680
7681 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
7682 <desc>
7683 An alpha-blended overlay which is superposed over the framebuffer.
7684 The initial purpose is to allow the display of icons providing
7685 information about the VM state, including disk activity, in front
7686 ends which do not have other means of doing that. The overlay is
7687 designed to controlled exclusively by IDisplay. It has no locking
7688 of its own, and any changes made to it are not guaranteed to be
7689 visible until the affected portion of IFramebuffer is updated. The
7690 overlay can be created lazily the first time it is requested. This
7691 attribute can also return NULL to signal that the overlay is not
7692 implemented.
7693 </desc>
7694 </attribute>
7695
7696 <method name="lock">
7697 <desc>
7698 Locks the framebuffer.
7699 Gets called by the IDisplay object where this framebuffer is
7700 bound to.
7701 </desc>
7702 </method>
7703
7704 <method name="unlock">
7705 <desc>
7706 Unlocks the framebuffer.
7707 Gets called by the IDisplay object where this framebuffer is
7708 bound to.
7709 </desc>
7710 </method>
7711
7712 <method name="notifyUpdate">
7713 <desc>
7714 Informs about an update.
7715 Gets called by the display object where this buffer is
7716 registered.
7717 </desc>
7718 <param name="x" type="unsigned long" dir="in"/>
7719 <param name="y" type="unsigned long" dir="in"/>
7720 <param name="width" type="unsigned long" dir="in"/>
7721 <param name="height" type="unsigned long" dir="in"/>
7722 <param name="finished" type="boolean" dir="return"/>
7723 </method>
7724
7725 <method name="requestResize">
7726 <desc>
7727 Requests a size and pixel format change.
7728
7729 There are two modes of working with the video buffer of the virtual
7730 machine. The <i>indirect</i> mode implies that the IFramebuffer
7731 implementation allocates a memory buffer for the requested display mode
7732 and provides it to the virtual machine. In <i>direct</i> mode, the
7733 IFramebuffer implementation uses the memory buffer allocated and owned
7734 by the virtual machine. This buffer represents the video memory of the
7735 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
7736 usually faster because the implementation gets a raw pointer to the
7737 guest VRAM buffer which it can directly use for visualising the contents
7738 of the virtual display, as opposed to the indirect mode where the
7739 contents of guest VRAM are copied to the memory buffer provided by
7740 the implementation every time a display update occurs.
7741
7742 It is important to note that the direct mode is really fast only when
7743 the implementation uses the given guest VRAM buffer directly, for
7744 example, by blitting it to the window representing the virtual machine's
7745 display, which saves at least one copy operation comparing to the
7746 indirect mode. However, using the guest VRAM buffer directly is not
7747 always possible: the format and the color depth of this buffer may be
7748 not supported by the target window, or it may be unknown (opaque) as in
7749 case of text or non-linear multi-plane VGA video modes. In this case,
7750 the indirect mode (that is always available) should be used as a
7751 fallback: when the guest VRAM contents are copied to the
7752 implementation-provided memory buffer, color and format conversion is
7753 done authomatically by the underlying code.
7754
7755 The @a pixelFormat parameter defines whether the direct mode is
7756 available or not. If @a pixelFormat is <link
7757 to="PixelFormat::Opaque"/> then direct access to the guest
7758 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
7759 bytesPerLine parameters must be ignored and the implementation must use
7760 the indirect mode (where it provides its own buffer in one of the
7761 supported formats). In all other cases, @a pixelFormat together with @a
7762 bitsPerPixel and @a bytesPerLine define the format of the video memory
7763 buffer pointed to by the @a VRAM parameter and the implementation is
7764 free to choose which mode to use. To indicate that this framebuffer uses
7765 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
7766 attribute must return <tt>true</tt> and <link to="#address"/> must
7767 return exactly the same address that is passed in the @a VRAM parameter
7768 of this method; otherwise it is assumed that the indirect strategy is
7769 chosen.
7770
7771 The @a width and @a height parameters represent the size of the
7772 requested display mode in both modes. In case of indirect mode, the
7773 provided memory buffer should be big enough to store data of the given
7774 display mode. In case of direct mode, it is guaranteed that the given @a
7775 VRAM buffer contains enough space to represent the display mode of the
7776 given size. Note that this framebuffer's <link to="#width"/> and <link
7777 to="#height"/> attributes must return exactly the same values as
7778 passed to this method after the resize is completed (see below).
7779
7780 The @a finished output parameter determines if the implementation has
7781 finished resizing the framebuffer or not. If, for some reason, the
7782 resize cannot be finished immediately during this call, @a finished
7783 must be set to @c false, and the implementation must call
7784 <link to="IDisplay::resizeCompleted()"/> after it has returned from
7785 this method as soon as possible. If @a finished is @c false, the
7786 machine will not call any framebuffer methods until
7787 <link to="IDisplay::resizeCompleted()"/> is called.
7788
7789 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
7790 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
7791 this framebuffer must return exactly the same values as specified in the
7792 parameters of this method, after the resize is completed. If the
7793 indirect mode is chosen, these attributes must return values describing
7794 the format of the implementation's own memory buffer <link
7795 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
7796 value must always correlate with <link to="#pixelFormat"/>. Note that
7797 the <link to="#pixelFormat"/> attribute must never return <link
7798 to="PixelFormat::Opaque"/> regardless of the selected mode.
7799
7800 <note>
7801 This method is called by the IDisplay object under the
7802 <link to="#lock()"/> provided by this IFramebuffer
7803 implementation. If this method returns @c false in @a finished, then
7804 this lock is not released until
7805 <link to="IDisplay::resizeCompleted()"/> is called.
7806 </note>
7807 </desc>
7808 <param name="screenId" type="unsigned long" dir="in">
7809 <desc>
7810 Logical screen number. Must be used in the corresponding call to
7811 <link to="IDisplay::resizeCompleted()"/> if this call is made.
7812 </desc>
7813 </param>
7814 <param name="pixelFormat" type="unsigned long" dir="in">
7815 <desc>
7816 Pixel format of the memory buffer pointed to by @a VRAM.
7817 See also <link to="FramebufferPixelFormat"/>.
7818 </desc>
7819 </param>
7820 <param name="VRAM" type="octet" mod="ptr" dir="in">
7821 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
7822 </param>
7823 <param name="bitsPerPixel" type="unsigned long" dir="in">
7824 <desc>Color depth, bits per pixel.</desc>
7825 </param>
7826 <param name="bytesPerLine" type="unsigned long" dir="in">
7827 <desc>Size of one scan line, in bytes.</desc>
7828 </param>
7829 <param name="width" type="unsigned long" dir="in">
7830 <desc>Width of the guest display, in pixels.</desc>
7831 </param>
7832 <param name="height" type="unsigned long" dir="in">
7833 <desc>Height of the guest display, in pixels.</desc>
7834 </param>
7835 <param name="finished" type="boolean" dir="return">
7836 <desc>
7837 Can the VM start using the new framebuffer immediately
7838 after this method returns or it should wait for
7839 <link to="IDisplay::resizeCompleted()"/>.
7840 </desc>
7841 </param>
7842 </method>
7843
7844 <method name="operationSupported">
7845 <desc>
7846 Returns whether the given acceleration operation is supported
7847 by the IFramebuffer implementation. If not, the display object
7848 will not attempt to call the corresponding IFramebuffer entry
7849 point. Even if an operation is indicated to supported, the
7850 IFramebuffer implementation always has the option to return non
7851 supported from the corresponding acceleration method in which
7852 case the operation will be performed by the display engine. This
7853 allows for reduced IFramebuffer implementation complexity where
7854 only common cases are handled.
7855 </desc>
7856 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
7857 <param name="supported" type="boolean" dir="return"/>
7858 </method>
7859
7860 <method name="videoModeSupported">
7861 <desc>
7862 Returns whether the framebuffer implementation is willing to
7863 support a given video mode. In case it is not able to render
7864 the video mode (or for some reason not willing), it should
7865 return false. Usually this method is called when the guest
7866 asks the VMM device whether a given video mode is supported
7867 so the information returned is directly exposed to the guest.
7868 It is important that this method returns very quickly.
7869 </desc>
7870 <param name="width" type="unsigned long" dir="in"/>
7871 <param name="height" type="unsigned long" dir="in"/>
7872 <param name="bpp" type="unsigned long" dir="in"/>
7873 <param name="supported" type="boolean" dir="return"/>
7874 </method>
7875
7876 <method name="solidFill">
7877 <desc>
7878 Fills the specified rectangle on screen with a solid color.
7879 </desc>
7880 <param name="x" type="unsigned long" dir="in"/>
7881 <param name="y" type="unsigned long" dir="in"/>
7882 <param name="width" type="unsigned long" dir="in"/>
7883 <param name="height" type="unsigned long" dir="in"/>
7884 <param name="color" type="unsigned long" dir="in"/>
7885 <param name="handled" type="boolean" dir="return"/>
7886 </method>
7887
7888 <method name="copyScreenBits">
7889 <desc>
7890 Copies specified rectangle on the screen.
7891 </desc>
7892 <param name="xDst" type="unsigned long" dir="in"/>
7893 <param name="yDst" type="unsigned long" dir="in"/>
7894 <param name="xSrc" type="unsigned long" dir="in"/>
7895 <param name="ySrc" type="unsigned long" dir="in"/>
7896 <param name="width" type="unsigned long" dir="in"/>
7897 <param name="height" type="unsigned long" dir="in"/>
7898 <param name="handled" type="boolean" dir="return"/>
7899 </method>
7900
7901 <method name="getVisibleRegion">
7902 <desc>
7903 Returns the visible region of this framebuffer.
7904
7905 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
7906 @a count parameter is ignored and the number of elements necessary to
7907 describe the current visible region is returned in @a countCopied.
7908
7909 If @a rectangles is not <tt>NULL</tt> but @a count is less
7910 than the required number of elements to store region data, the method
7911 will report a failure. If @a count is equal or greater than the
7912 required number of elements, then the actual number of elements copied
7913 to the provided array will be returned in @a countCopied.
7914
7915 <note>
7916 The address of the provided array must be in the process space of
7917 this IFramebuffer object.
7918 </note>
7919 </desc>
7920 <param name="rectangles" type="octet" mod="ptr" dir="in">
7921 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
7922 </param>
7923 <param name="count" type="unsigned long" dir="in">
7924 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
7925 </param>
7926 <param name="countCopied" type="unsigned long" dir="return">
7927 <desc>Number of elements copied to the @a rectangles array.</desc>
7928 </param>
7929 </method>
7930
7931 <method name="setVisibleRegion">
7932 <desc>
7933 Suggests a new visible region to this framebuffer. This region
7934 represents the area of the VM display which is a union of regions of
7935 all top-level windows of the guest operating system running inside the
7936 VM (if the Guest Additions for this system support this
7937 functionality). This information may be used by the frontends to
7938 implement the seamless desktop integration feature.
7939
7940 <note>
7941 The address of the provided array must be in the process space of
7942 this IFramebuffer object.
7943 </note>
7944 <note>
7945 The IFramebuffer implementation must make a copy of the provided
7946 array of rectangles.
7947 </note>
7948 </desc>
7949 <param name="rectangles" type="octet" mod="ptr" dir="in">
7950 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
7951 </param>
7952 <param name="count" type="unsigned long" dir="in">
7953 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
7954 </param>
7955 </method>
7956
7957 </interface>
7958
7959 <interface
7960 name="IFramebufferOverlay" extends="IFrameBuffer"
7961 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
7962 wsmap="suppress"
7963 >
7964 <desc>
7965 The IFramebufferOverlay interface represents an alpha blended overlay
7966 for displaying status icons above an IFramebuffer. It is always created
7967 not visible, so that it must be explicitly shown. It only covers a
7968 portion of the IFramebuffer, determined by its width, height and
7969 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
7970 that order) format, and may be written to directly. Do re-read the
7971 width though, after setting it, as it may be adjusted (increased) to
7972 make it more suitable for the front end.
7973 </desc>
7974 <attribute name="x" type="unsigned long" readonly="yes">
7975 <desc>X position of the overlay, relative to the framebuffer.</desc>
7976 </attribute>
7977
7978 <attribute name="y" type="unsigned long" readonly="yes">
7979 <desc>Y position of the overlay, relative to the framebuffer.</desc>
7980 </attribute>
7981
7982 <attribute name="visible" type="boolean" readonly="no">
7983 <desc>
7984 Whether the overlay is currently visible.
7985 </desc>
7986 </attribute>
7987
7988 <attribute name="alpha" type="unsigned long" readonly="no">
7989 <desc>
7990 The global alpha value for the overlay. This may or may not be
7991 supported by a given front end.
7992 </desc>
7993 </attribute>
7994
7995 <method name="move">
7996 <desc>
7997 Changes the overlay's position relative to the IFramebuffer.
7998 </desc>
7999 <param name="x" type="unsigned long" dir="in"/>
8000 <param name="y" type="unsigned long" dir="in"/>
8001 </method>
8002
8003 </interface>
8004
8005 <interface
8006 name="IDisplay" extends="$unknown"
8007 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
8008 wsmap="suppress"
8009 >
8010 <desc>
8011 The IDisplay interface represents the virtual machine's display.
8012
8013 The object implementing this interface is contained in each
8014 <link to="IConsole::display"/> attribute and represents the visual
8015 output of the virtual machine.
8016
8017 The virtual display supports pluggable output targets represented by the
8018 IFramebuffer interface. Examples of the output target are a window on
8019 the host computer or an RDP sessoin's display on a remote computer.
8020 </desc>
8021 <attribute name="width" type="unsigned long" readonly="yes">
8022 <desc>Current display width.</desc>
8023 </attribute>
8024
8025 <attribute name="height" type="unsigned long" readonly="yes">
8026 <desc>Current display height.</desc>
8027 </attribute>
8028
8029 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
8030 <desc>
8031 Current guest display color depth. Note that this may differ
8032 from <link to="IFramebuffer::bitsPerPixel"/>.
8033 </desc>
8034 </attribute>
8035
8036 <method name="setupInternalFramebuffer">
8037 <desc>
8038 Prepares an internally managed framebuffer.
8039 </desc>
8040 <param name="depth" type="unsigned long" dir="in"/>
8041 </method>
8042
8043 <method name="lockFramebuffer">
8044 <desc>
8045 Requests access to the internal framebuffer.
8046 </desc>
8047 <param name="address" type="octet" mod="ptr" dir="return"/>
8048 </method>
8049
8050 <method name="unlockFramebuffer">
8051 <desc>
8052 Releases access to the internal framebuffer.
8053 </desc>
8054 </method>
8055
8056 <method name="registerExternalFramebuffer">
8057 <desc>
8058 Registers an external framebuffer.
8059 </desc>
8060 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8061 </method>
8062
8063 <method name="setFramebuffer">
8064 <desc>
8065 Sets the framebuffer for given screen.
8066 </desc>
8067 <param name="screenId" type="unsigned long" dir="in"/>
8068 <param name="framebuffer" type="IFramebuffer" dir="in"/>
8069 </method>
8070
8071 <method name="getFramebuffer">
8072 <desc>
8073 Queries the framebuffer for given screen.
8074 </desc>
8075 <param name="screenId" type="unsigned long" dir="in"/>
8076 <param name="framebuffer" type="IFramebuffer" dir="out"/>
8077 <param name="xOrigin" type="long" dir="out"/>
8078 <param name="yOrigin" type="long" dir="out"/>
8079 </method>
8080
8081 <method name="setVideoModeHint">
8082 <desc>
8083 Asks VirtualBox to request the given video mode from
8084 the guest. This is just a hint and it cannot be guaranteed
8085 that the requested resolution will be used. Guest Additions
8086 are required for the request to be seen by guests. The caller
8087 should issue the request and wait for a resolution change and
8088 after a timeout retry.
8089
8090 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
8091 parameters means that the corresponding values should be taken from the
8092 current video mode (i.e. left unchanged).
8093
8094 If the guest OS supports multi-monitor configuration then the @a display
8095 parameter specifies the number of the guest display to send the hint to:
8096 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
8097 so on. If the multi-monitor configuration is not supported, @a display
8098 must be <tt>0</tt>.
8099
8100 </desc>
8101 <param name="width" type="unsigned long" dir="in"/>
8102 <param name="height" type="unsigned long" dir="in"/>
8103 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
8104 <param name="display" type="unsigned long" dir="in"/>
8105 </method>
8106
8107 <method name="setSeamlessMode">
8108 <desc>
8109 Enables or disables seamless guest display rendering (seamless desktop
8110 integration) mode.
8111 <note>
8112 Calling this method has no effect if <link
8113 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
8114 </note>
8115 </desc>
8116 <param name="enabled" type="boolean" dir="in"/>
8117 </method>
8118
8119 <method name="takeScreenShot">
8120 <desc>
8121 Takes a screen shot of the requested size and copies it to the
8122 32-bpp buffer allocated by the caller.
8123 </desc>
8124 <param name="address" type="octet" mod="ptr" dir="in"/>
8125 <param name="width" type="unsigned long" dir="in"/>
8126 <param name="height" type="unsigned long" dir="in"/>
8127 </method>
8128
8129 <method name="drawToScreen">
8130 <desc>
8131 Draws a 32-bpp image of the specified size from the given buffer
8132 to the given point on the VM display.
8133 </desc>
8134 <param name="address" type="octet" mod="ptr" dir="in"/>
8135 <param name="x" type="unsigned long" dir="in"/>
8136 <param name="y" type="unsigned long" dir="in"/>
8137 <param name="width" type="unsigned long" dir="in"/>
8138 <param name="height" type="unsigned long" dir="in"/>
8139 </method>
8140
8141 <method name="invalidateAndUpdate">
8142 <desc>
8143 Does a full invalidation of the VM display and instructs the VM
8144 to update it.
8145 </desc>
8146 </method>
8147
8148 <method name="resizeCompleted">
8149 <desc>
8150 Signals that a framebuffer has completed the resize operation.
8151 </desc>
8152 <param name="screenId" type="unsigned long" dir="in"/>
8153 </method>
8154
8155 <method name="updateCompleted">
8156 <desc>
8157 Signals that a framebuffer has completed the update operation.
8158 </desc>
8159 </method>
8160
8161 </interface>
8162
8163 <!--
8164 // INetworkAdapter
8165 /////////////////////////////////////////////////////////////////////////
8166 -->
8167
8168 <enum
8169 name="NetworkAttachmentType"
8170 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
8171 >
8172 <desc>
8173 Network attachment type.
8174 </desc>
8175
8176 <const name="Null" value="0">
8177 <desc><tt>null</tt> value. Also means "not attached".</desc>
8178 </const>
8179 <const name="NAT" value="1"/>
8180 <const name="HostInterface" value="2"/>
8181 <const name="Internal" value="3"/>
8182 </enum>
8183
8184 <enum
8185 name="NetworkAdapterType"
8186 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
8187 >
8188 <desc>
8189 Network adapter type.
8190 </desc>
8191
8192 <const name="Null" value="0">
8193 <desc><tt>null</tt> value. Never used by the API.</desc>
8194 </const>
8195 <const name="Am79C970A" value="1"/>
8196 <const name="Am79C973" value="2"/>
8197 <const name="I82540EM" value="3"/>
8198 </enum>
8199
8200 <interface
8201 name="INetworkAdapter" extends="$unknown"
8202 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
8203 wsmap="managed"
8204 >
8205 <attribute name="adapterType" type="NetworkAdapterType">
8206 <desc>
8207 Type of the virtual network adapter. Depending on this value,
8208 VirtualBox will provide a different virtual network hardware
8209 to the guest.
8210 </desc>
8211 </attribute>
8212
8213 <attribute name="slot" type="unsigned long" readonly="yes">
8214 <desc>
8215 Slot number this adapter is plugged into. Corresponds to
8216 the value you pass to <link to="IMachine::getNetworkAdapter"/>
8217 to obtain this instance.
8218 </desc>
8219 </attribute>
8220
8221 <attribute name="enabled" type="boolean">
8222 <desc>
8223 Flag whether the network adapter is present in the
8224 guest system. If disabled, the virtual guest hardware will
8225 not contain this network adapter. Can only be changed when
8226 the VM is not running.
8227 </desc>
8228 </attribute>
8229
8230 <attribute name="MACAddress" type="wstring">
8231 <desc>
8232 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
8233 it to NULL, VirtualBox will generate a unique MAC address.
8234 </desc>
8235 </attribute>
8236
8237 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
8238
8239 <attribute name="hostInterface" type="wstring">
8240 <desc>
8241 Name of the Host Network Interface that is currently in use. NULL will be returned
8242 if no device has been allocated. On Linux, setting this refers to a permanent TAP
8243 device. However, a file descriptor has precedence over the interface name on Linux.
8244 Note that when VBox allocates a TAP device, this property will not be set, i.e. the
8245 interface name would have to be determined using the file descriptor and /proc/self/fd.
8246 </desc>
8247 </attribute>
8248
8249<if target="xpidl">
8250 <attribute name="TAPFileDescriptor" type="long">
8251 <desc>
8252 File descriptor of the TAP device. It can either be setup by the caller
8253 which has to supply an existing valid file handle allocated in the parent
8254 process of the VM process or allocated by VirtualBox. The value is -1 if it
8255 has not been defined. This property is non persistent, i.e. it will not be
8256 stored in the VM's configuration data and thus has to be set at each startup.
8257 </desc>
8258 </attribute>
8259 <attribute name="TAPSetupApplication" type="wstring">
8260 <desc>
8261 Application to start to configure the TAP device.
8262 It is being passed two parameters, 1) the file handle (as ascii),
8263 2) the TAP device name if it is available.
8264 </desc>
8265 </attribute>
8266 <attribute name="TAPTerminateApplication" type="wstring">
8267 <desc>
8268 Application to start before closing a TAP device.
8269 It is being passed two parameters, 1) the file handle (as ascii),
8270 2) the TAP device name if it is available.
8271 </desc>
8272 </attribute>
8273</if>
8274
8275 <attribute name="internalNetwork" type="wstring">
8276 <desc>
8277 Name of the internal network the VM is attached to.
8278 </desc>
8279 </attribute>
8280
8281 <attribute name="NATNetwork" type="wstring">
8282 <desc>
8283 Name of the NAT network the VM is attached to.
8284 </desc>
8285 </attribute>
8286
8287 <attribute name="cableConnected" type="boolean">
8288 <desc>
8289 Flag whether the adapter reports the cable as connected or not.
8290 It can be used to report offline situations to a VM.
8291 </desc>
8292 </attribute>
8293
8294 <attribute name="lineSpeed" type="unsigned long">
8295 <desc>
8296 Line speed reported by custom drivers, in units of 1 kbps.
8297 </desc>
8298 </attribute>
8299
8300 <attribute name="traceEnabled" type="boolean">
8301 <desc>
8302 Flag whether network traffic from/to the network card should be traced.
8303 Can only be toggled when the VM is turned off.
8304 </desc>
8305 </attribute>
8306
8307 <attribute name="traceFile" type="wstring">
8308 <desc>
8309 Filename where a network trace will be stored. If not set, VBox-pid.pcap
8310 will be used.
8311 </desc>
8312 </attribute>
8313
8314 <method name="attachToNAT">
8315 <desc>
8316 Attach the network adapter to the Network Address Translation (NAT) interface.
8317 </desc>
8318 </method>
8319
8320 <method name="attachToHostInterface">
8321 <desc>
8322 Attach the network adapter to a host interface. On Linux, the TAP
8323 setup application will be executed if configured and unless a device
8324 name and/or file descriptor has been set, a new TAP interface will be
8325 created.
8326 </desc>
8327 </method>
8328
8329 <method name="attachToInternalNetwork">
8330 <desc>
8331 Attach the network adapter to an internal network.
8332 </desc>
8333 </method>
8334
8335 <method name="detach">
8336 <desc>
8337 Detach the network adapter
8338 </desc>
8339 </method>
8340 </interface>
8341
8342
8343 <!--
8344 // ISerialPort
8345 /////////////////////////////////////////////////////////////////////////
8346 -->
8347
8348 <enum
8349 name="PortMode"
8350 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
8351 >
8352 <desc>
8353 The PortMode enumeration represents possible communicaton modes for
8354 the virtual serial port device.
8355 </desc>
8356
8357 <const name="Disconnected" value="0">
8358 <desc>Virtual device is not attached to any real host device.</desc>
8359 </const>
8360 <const name="HostPipe" value="1">
8361 <desc>Virtual device is attached to a host pipe.</desc>
8362 </const>
8363 <const name="HostDevice" value="2">
8364 <desc>Virtual device is attached to a host device.</desc>
8365 </const>
8366 </enum>
8367
8368 <interface
8369 name="ISerialPort" extends="$unknown"
8370 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
8371 wsmap="managed"
8372 >
8373
8374 <desc>
8375 The ISerialPort interface represents the virtual serial port device.
8376
8377 The virtual serial port device acts like an ordinary serial port
8378 inside the virtual machine. This device communicates to the real
8379 serial port hardware in one of two modes: host pipe or host device.
8380
8381 In host pipe mode, the #path attribute specifies the path to the pipe on
8382 the host computer that represents a serial port. The #server attribute
8383 determines if this pipe is created by the virtual machine process at
8384 machine startup or it must already exist before starting machine
8385 execution.
8386
8387 In host device mode, the #path attribute specifies the name of the
8388 serial port device on the host computer.
8389
8390 There is also a third communication mode: the disconnected mode. In this
8391 mode, the guest OS running inside the virtual machine will be able to
8392 detect the serial port, but all port write operations will be discarded
8393 and all port read operations will return no data.
8394
8395 <see>IMachine::getSerialPort</see>
8396 </desc>
8397
8398 <attribute name="slot" type="unsigned long" readonly="yes">
8399 <desc>
8400 Slot number this serial port is plugged into. Corresponds to
8401 the value you pass to <link to="IMachine::getSerialPort"/>
8402 to obtain this instance.
8403 </desc>
8404 </attribute>
8405
8406 <attribute name="enabled" type="boolean">
8407 <desc>
8408 Flag whether the serial port is enabled. If disabled,
8409 the serial port will not be reported to the guest OS.
8410 </desc>
8411 </attribute>
8412
8413 <attribute name="IOBase" type="unsigned long">
8414 <desc>Base I/O address of the serial port.</desc>
8415 </attribute>
8416
8417 <attribute name="IRQ" type="unsigned long">
8418 <desc>IRQ number of the serial port.</desc>
8419 </attribute>
8420
8421 <attribute name="hostMode" type="PortMode">
8422 <desc>How is this port connected to the host.</desc>
8423 </attribute>
8424
8425 <attribute name="server" type="boolean">
8426 <desc>
8427 Flag whether this serial port acts as a server (creates a new pipe on
8428 the host) or as a client (uses the existing pipe). This attribute is
8429 used only when #hostMode is PortMode::HostPipePort.
8430 </desc>
8431 </attribute>
8432
8433 <attribute name="path" type="wstring">
8434 <desc>
8435 Path to the serial port's pipe on the host when #hostMode is
8436 PortMode::HostPipePort, or the host serial device name when #hostMode
8437 is PortMode::HostDevicePort. In either of the above cases, setting a
8438 @c null or an empty string as the attribute's value will result into
8439 an error. Otherwise, the value of this property is ignored.
8440 </desc>
8441 </attribute>
8442
8443 </interface>
8444
8445 <!--
8446 // IParallelPort
8447 /////////////////////////////////////////////////////////////////////////
8448 -->
8449
8450 <interface
8451 name="IParallelPort" extends="$unknown"
8452 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
8453 wsmap="managed"
8454 >
8455
8456 <desc>
8457 The IParallelPort interface represents the virtual parallel port device.
8458
8459 The virtual parallel port device acts like an ordinary parallel port
8460 inside the virtual machine. This device communicates to the real
8461 parallel port hardware using the name of the parallel device on the host
8462 computer specified in the #path attribute.
8463
8464 Each virtual parallel port device is assigned a base I/O address and an
8465 IRQ number that will be reported to the guest operating system and used
8466 to operate the given parallel port from within the virtual machine.
8467
8468 <see>IMachine::getParallelPort</see>
8469 </desc>
8470
8471 <attribute name="slot" type="unsigned long" readonly="yes">
8472 <desc>
8473 Slot number this parallel port is plugged into. Corresponds to
8474 the value you pass to <link to="IMachine::getParallelPort"/>
8475 to obtain this instance.
8476 </desc>
8477 </attribute>
8478
8479 <attribute name="enabled" type="boolean">
8480 <desc>
8481 Flag whether the parallel port is enabled. If disabled,
8482 the parallel port will not be reported to the guest OS.
8483 </desc>
8484 </attribute>
8485
8486 <attribute name="IOBase" type="unsigned long">
8487 <desc>Base I/O address of the parallel port.</desc>
8488 </attribute>
8489
8490 <attribute name="IRQ" type="unsigned long">
8491 <desc>IRQ number of the parallel port.</desc>
8492 </attribute>
8493
8494 <attribute name="path" type="wstring">
8495 <desc>
8496 Host parallel device name. If this parallel port is enabled, setting a
8497 @c null or an empty string as this attribute's value will result into
8498 an error.
8499 </desc>
8500 </attribute>
8501
8502 </interface>
8503
8504
8505 <!--
8506 // IMachineDebugger
8507 /////////////////////////////////////////////////////////////////////////
8508 -->
8509
8510 <interface
8511 name="IMachineDebugger" extends="$unknown"
8512 uuid="b3a02721-556a-4481-9d47-052a3f8cff90"
8513 wsmap="suppress"
8514 >
8515 <method name="resetStats">
8516 <desc>
8517 Reset VM statistics.
8518 </desc>
8519 <param name="pattern" type="wstring" dir="in">
8520 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8521 </param>
8522 </method>
8523
8524 <method name="dumpStats">
8525 <desc>
8526 Dumps VM statistics.
8527 </desc>
8528 <param name="pattern" type="wstring" dir="in">
8529 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8530 </param>
8531 </method>
8532
8533 <method name="getStats">
8534 <desc>
8535 Get the VM statistics in a XMLish format.
8536 </desc>
8537 <param name="pattern" type="wstring" dir="in">
8538 <desc>The selection pattern. A bit similar to filename globbing.</desc>
8539 </param>
8540 <param name="withDescriptions" type="boolean" dir="in">
8541 <desc>Whether to include the descriptions.</desc>
8542 </param>
8543 <param name="stats" type="wstring" dir="out">
8544 <desc>The XML document containing the statistics.</desc>
8545 </param>
8546 </method>
8547
8548 <attribute name="singlestep" type="boolean">
8549 <desc>Switch for enabling singlestepping.</desc>
8550 </attribute>
8551
8552 <attribute name="recompileUser" type="boolean">
8553 <desc>Switch for forcing code recompilation for user mode code.</desc>
8554 </attribute>
8555
8556 <attribute name="recompileSupervisor" type="boolean">
8557 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
8558 </attribute>
8559
8560 <attribute name="PATMEnabled" type="boolean">
8561 <desc>Switch for enabling and disabling the PATM component.</desc>
8562 </attribute>
8563
8564 <attribute name="CSAMEnabled" type="boolean">
8565 <desc>Switch for enabling and disabling the CSAM component.</desc>
8566 </attribute>
8567
8568 <attribute name="logEnabled" type="boolean">
8569 <desc>Switch for enabling and disabling logging.</desc>
8570 </attribute>
8571
8572 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
8573 <desc>
8574 Flag indicating whether the VM is currently making use of CPU hardware
8575 virtualization extensions
8576 </desc>
8577 </attribute>
8578
8579 <attribute name="PAEEnabled" type="boolean" readonly="yes">
8580 <desc>
8581 Flag indicating whether the VM is currently making use of the Physical
8582 Address Extension CPU feature.
8583 </desc>
8584 </attribute>
8585
8586 <attribute name="virtualTimeRate" type="unsigned long">
8587 <desc>
8588 The rate at which the virtual time runs expressed as a percentage.
8589 The accepted range is 2% to 20000%.
8590 </desc>
8591 </attribute>
8592
8593 <!-- @todo method for setting log flags, groups and destination! -->
8594
8595 <attribute name="VM" type="unsigned long long" readonly="yes">
8596 <desc>
8597 Gets the VM handle. This is only for internal use while
8598 we carve the details of this interface.
8599 </desc>
8600 </attribute>
8601
8602 </interface>
8603
8604 <!--
8605 // IUSBController
8606 /////////////////////////////////////////////////////////////////////////
8607 -->
8608
8609 <interface
8610 name="IUSBController" extends="$unknown"
8611 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
8612 wsmap="managed"
8613 >
8614 <attribute name="enabled" type="boolean">
8615 <desc>
8616 Flag whether the USB controller is present in the
8617 guest system. If disabled, the virtual guest hardware will
8618 not contain any USB controller. Can only be changed when
8619 the VM is powered off.
8620 </desc>
8621 </attribute>
8622
8623 <attribute name="enabledEhci" type="boolean">
8624 <desc>
8625 Flag whether the USB EHCI controller is present in the
8626 guest system. If disabled, the virtual guest hardware will
8627 not contain a USB EHCI controller. Can only be changed when
8628 the VM is powered off.
8629 </desc>
8630 </attribute>
8631
8632 <attribute name="USBStandard" type="unsigned short" readonly="yes">
8633 <desc>
8634 USB standard version which the controller implements.
8635 This is a BCD which means that the major version is in the
8636 high byte and minor version is in the low byte.
8637 </desc>
8638 </attribute>
8639
8640 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
8641 <desc>
8642 List of USB device filters associated with the machine.
8643
8644 If the machine is currently running, these filters are activated
8645 every time a new (supported) USB device is attached to the host
8646 computer that was not ignored by global filters
8647 (<link to="IHost::USBDeviceFilters"/>).
8648
8649 These filters are also activated when the machine is powered up.
8650 They are run against a list of all currently available USB
8651 devices (in states
8652 <link to="USBDeviceState::Available">Available</link>,
8653 <link to="USBDeviceState::Busy">Busy</link>,
8654 <link to="USBDeviceState::Held">Held</link>) that were not previously
8655 ignored by global filters.
8656
8657 If at least one filter matches the USB device in question, this
8658 device is automatically captured (attached to) the virtual USB
8659 controller of this machine.
8660
8661 <see>IUSBDeviceFilter, ::IUSBController</see>
8662 </desc>
8663 </attribute>
8664
8665 <method name="createDeviceFilter">
8666 <desc>
8667 Creates a new USB device filter. All attributes except
8668 the filter name are set to <tt>null</tt> (any match),
8669 <i>active</i> is <tt>false</tt> (the filter is not active).
8670
8671 The created filter can then be added to the list of filters using
8672 <link to="#insertDeviceFilter()"/>.
8673
8674 <see>#deviceFilters</see>
8675 </desc>
8676 <param name="name" type="wstring" dir="in">
8677 <desc>
8678 Filter name. See <link to="IUSBDeviceFilter::name"/>
8679 for more info.
8680 </desc>
8681 </param>
8682 <param name="filter" type="IUSBDeviceFilter" dir="return">
8683 <desc>Created filter object.</desc>
8684 </param>
8685 </method>
8686
8687 <method name="insertDeviceFilter">
8688 <desc>
8689 Inserts the given USB device to the specified position
8690 in the list of filters.
8691
8692 Positions are numbered starting from <tt>0</tt>. If the specified
8693 position is equal to or greater than the number of elements in
8694 the list, the filter is added to the end of the collection.
8695
8696 <note>
8697 Duplicates are not allowed, so an attempt to inster a
8698 filter that is already in the collection, will return an
8699 error.
8700 </note>
8701
8702 <see>#deviceFilters</see>
8703 </desc>
8704 <param name="position" type="unsigned long" dir="in">
8705 <desc>Position to insert the filter to.</desc>
8706 </param>
8707 <param name="filter" type="IUSBDeviceFilter" dir="in">
8708 <desc>USB device filter to insert.</desc>
8709 </param>
8710 </method>
8711
8712 <method name="removeDeviceFilter">
8713 <desc>
8714 Removes a USB device filter from the specified position in the
8715 list of filters.
8716
8717 Positions are numbered starting from <tt>0</tt>. Specifying a
8718 position equal to or greater than the number of elements in
8719 the list will produce an error.
8720
8721 <see>#deviceFilters</see>
8722 </desc>
8723 <param name="position" type="unsigned long" dir="in">
8724 <desc>Position to remove the filter from.</desc>
8725 </param>
8726 <param name="filter" type="IUSBDeviceFilter" dir="return">
8727 <desc>Removed USB device filter.</desc>
8728 </param>
8729 </method>
8730
8731 </interface>
8732
8733
8734 <!--
8735 // IUSBDevice
8736 /////////////////////////////////////////////////////////////////////////
8737 -->
8738
8739 <enumerator
8740 name="IUSBDeviceEnumerator" type="IUSBDevice"
8741 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
8742 />
8743
8744 <collection
8745 name="IUSBDeviceCollection" type="IUSBDevice"
8746 enumerator="IUSBDeviceEnumerator"
8747 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
8748 readonly="yes"
8749 >
8750 <method name="findById">
8751 <desc>
8752 Searches this collection for a USB device with the given UUID.
8753 <note>
8754 The method returns an error if the given UUID does not
8755 correspond to any USB device in the collection.
8756 </note>
8757 <see>IUSBDevice::id</see>
8758 </desc>
8759 <param name="id" type="uuid" dir="in">
8760 <desc>UUID of the USB device to search for.</desc>
8761 </param>
8762 <param name="device" type="IUSBDevice" dir="return">
8763 <desc>Found USB device object.</desc>
8764 </param>
8765 </method>
8766
8767 <method name="findByAddress">
8768 <desc>
8769 Searches this collection for a USB device with the given
8770 host address.
8771 <note>
8772 The method returns an error if the given address does not
8773 correspond to any USB device in the collection.
8774 </note>
8775 <see>IUSBDevice::address</see>
8776 </desc>
8777 <param name="name" type="wstring" dir="in">
8778 <desc>
8779 Address of the USB device (as assigned by the host) to
8780 search for.
8781 </desc>
8782 </param>
8783 <param name="device" type="IUSBDevice" dir="return">
8784 <desc>Found USB device object.</desc>
8785 </param>
8786 </method>
8787
8788 </collection>
8789
8790 <interface
8791 name="IUSBDevice" extends="$unknown"
8792 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
8793 wsmap="managed"
8794 >
8795 <desc>
8796 The IUSBDevice interface represents a virtual USB device attached to the
8797 virtual machine.
8798
8799 A collection of objects implementing this interface is stored in the
8800 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
8801 attached to a running virtual machine's USB controller.
8802 </desc>
8803
8804 <attribute name="id" type="uuid" readonly="yes">
8805 <desc>
8806 Unique USB device ID. This ID is built from #vendorId,
8807 #productId, #revision and #serialNumber.
8808 </desc>
8809 </attribute>
8810
8811 <attribute name="vendorId" type="unsigned short" readonly="yes">
8812 <desc>Vendor ID.</desc>
8813 </attribute>
8814
8815 <attribute name="productId" type="unsigned short" readonly="yes">
8816 <desc>Product ID.</desc>
8817 </attribute>
8818
8819 <attribute name="revision" type="unsigned short" readonly="yes">
8820 <desc>
8821 Product revision number. This is a packed BCD represented as
8822 unsigned short. The high byte is the integer part and the low
8823 byte is the decimal.
8824 </desc>
8825 </attribute>
8826
8827 <attribute name="manufacturer" type="wstring" readonly="yes">
8828 <desc>Manufacturer string.</desc>
8829 </attribute>
8830
8831 <attribute name="product" type="wstring" readonly="yes">
8832 <desc>Product string.</desc>
8833 </attribute>
8834
8835 <attribute name="serialNumber" type="wstring" readonly="yes">
8836 <desc>Serial number string.</desc>
8837 </attribute>
8838
8839 <attribute name="address" type="wstring" readonly="yes">
8840 <desc>Host specific address of the device.</desc>
8841 </attribute>
8842
8843 <attribute name="port" type="unsigned short" readonly="yes">
8844 <desc>
8845 Host USB port number the device is physically
8846 coonected to.
8847 </desc>
8848 </attribute>
8849
8850 <attribute name="version" type="unsigned short" readonly="yes">
8851 <desc>
8852 The major USB version of the device - 1 or 2.
8853 </desc>
8854 </attribute>
8855
8856 <attribute name="portVersion" type="unsigned short" readonly="yes">
8857 <desc>
8858 The major USB version of the host USB port the device is
8859 physically coonected to - 1 or 2. For devices not connected to
8860 anything this will have the same value as the version attribute.
8861 </desc>
8862 </attribute>
8863
8864 <attribute name="remote" type="boolean" readonly="yes">
8865 <desc>
8866 Whether the device is physically connected to a remote VRDP
8867 client or to a local host machine.
8868 </desc>
8869 </attribute>
8870
8871 </interface>
8872
8873
8874 <!--
8875 // IUSBDeviceFilter
8876 /////////////////////////////////////////////////////////////////////////
8877 -->
8878
8879 <enumerator
8880 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
8881 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
8882 />
8883
8884 <collection
8885 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
8886 enumerator="IUSBDeviceFilterEnumerator"
8887 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
8888 readonly="yes"
8889 />
8890
8891 <interface
8892 name="IUSBDeviceFilter" extends="$unknown"
8893 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
8894 wsmap="managed"
8895 >
8896 <desc>
8897 The IUSBDeviceFilter interface represents an USB device filter used
8898 to perform actions on a group of USB devices.
8899
8900 This type of filters is used by running virtual machines to
8901 automatically capture selected USB devices once they are physically
8902 attached to the host computer.
8903
8904 A USB device is matched to the given device filter if and only if all
8905 attributes of the device match the corresponding attributes of the
8906 filter (that is, attributes are joined together using the logical AND
8907 operation). On the other hand, all together, filters in the list of
8908 filters carry the semantics of the logical OR operation. So if it is
8909 desirable to create a match like "this vendor id OR this product id",
8910 one needs to create two filters and specify "any match" (see below)
8911 for unused attributes.
8912
8913 All filter attributes used for matching are strings. Each string
8914 is an expression representing a set of values of the corresponding
8915 device attribute, that will match the given filter. Currently, the
8916 following filtering expressions are supported:
8917
8918 <ul>
8919 <li><i>Interval filters</i>. Used to specify valid intervals for
8920 integer device attributes (Vendor ID, Product ID and Revision).
8921 The format of the string is:
8922
8923 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
8924
8925 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
8926 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
8927 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
8928 is ommitted before a dash (<tt>-</tt>), the minimum possible integer
8929 is assumed; if <tt>n</tt> is ommitted after a dash, the maximum
8930 possible integer is assummed.
8931 </li>
8932 <li><i>Boolean filters</i>. Used to specify acceptable values for
8933 boolean device attributes. The format of the string is:
8934
8935 <tt>true|false|yes|no|0|1</tt>
8936
8937 </li>
8938 <li><i>Exact match</i>. Used to specify a single value for the given
8939 device attribute. Any string that does't start with <tt>int:</tt>
8940 represents the exact match. String device attributes are compared to
8941 this string including case of symbols. Integer attributes are first
8942 converted to a string (see individual filter attributes) and then
8943 compared ignoring case.
8944
8945 </li>
8946 <li><i>Any match</i>. Any value of the corresponding device attribute
8947 will match the given filter. An empty or <tt>null</tt> string is
8948 used to construct this type of filtering expressions.
8949
8950 </li>
8951 </ul>
8952
8953 <note>
8954 On the Windows host platform, interval filters are not currently
8955 available. Also all string filter attributes
8956 (<link to="#manufacturer"/>, <link to="#product"/>,
8957 <link to="#serialNumber"/>) are ignored, so they behave as
8958 <i>any match</i> no matter what string expression is specified.
8959 </note>
8960
8961 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
8962 </desc>
8963
8964 <attribute name="name" type="wstring">
8965 <desc>
8966 Visible name for this filter.
8967 This name is used to visually distungish one filter from another,
8968 so it can neither be <tt>null</tt> nor an empty string.
8969 </desc>
8970 </attribute>
8971
8972 <attribute name="active" type="boolean">
8973 <desc>Whether this filter active or has been temporarily disabled.</desc>
8974 </attribute>
8975
8976 <attribute name="vendorId" type="wstring">
8977 <desc>
8978 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
8979 The string representation for the <i>exact matching</i>
8980 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
8981 (including leading zeroes).
8982 </desc>
8983 </attribute>
8984
8985 <attribute name="productId" type="wstring">
8986 <desc>
8987 <link to="IUSBDevice::productId">Product ID</link> filter.
8988 The string representation for the <i>exact matching</i>
8989 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
8990 (including leading zeroes).
8991 </desc>
8992 </attribute>
8993
8994 <attribute name="revision" type="wstring">
8995 <desc>
8996 <link to="IUSBDevice::productId">Product revision number</link>
8997 filter. The string representation for the <i>exact matching</i>
8998 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
8999 of the integer part of the revision, and <tt>F</tt> is the
9000 decimal digit of its fractional part (including leading and
9001 trailing zeroes).
9002 Note that for interval filters, it's best to use the hexadecimal
9003 form, because the revision is stored as a 16 bit packed BCD value;
9004 so the expression <tt>int:0x0100-0x0199</tt> will match any
9005 revision from <tt>1.0</tt> to <tt>1.99</tt>.
9006 </desc>
9007 </attribute>
9008
9009 <attribute name="manufacturer" type="wstring">
9010 <desc>
9011 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
9012 </desc>
9013 </attribute>
9014
9015 <attribute name="product" type="wstring">
9016 <desc>
9017 <link to="IUSBDevice::product">Product</link> filter.
9018 </desc>
9019 </attribute>
9020
9021 <attribute name="serialNumber" type="wstring">
9022 <desc>
9023 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
9024 </desc>
9025 </attribute>
9026
9027 <attribute name="port" type="wstring">
9028 <desc>
9029 <link to="IUSBDevice::port">Host USB port</link> filter.
9030 </desc>
9031 </attribute>
9032
9033 <attribute name="remote" type="wstring">
9034 <desc>
9035 <link to="IUSBDevice::remote">Remote state</link> filter.
9036 <note>
9037 This filter makes sense only for machine USB filters,
9038 i.e. it is ignored by IHostUSBDeviceFilter objects.
9039 </note>
9040 </desc>
9041 </attribute>
9042
9043 <attribute name="maskedInterfaces" type="unsigned long">
9044 <desc>
9045 This is an advanced option for hiding one or more USB interfaces
9046 from the guest. The value is a bitmask where the bits that are set
9047 means the corresponding USB interface should be hidden, masked off
9048 if you like.
9049 This feature only works on Linux hosts.
9050 </desc>
9051 </attribute>
9052
9053 </interface>
9054
9055
9056 <!--
9057 // IHostUSBDevice
9058 /////////////////////////////////////////////////////////////////////////
9059 -->
9060
9061 <enum
9062 name="USBDeviceState"
9063 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
9064 >
9065 <desc>
9066 USB device state. This enumeration represents all possible states
9067 of the USB device physically attached to the host computer regarding
9068 its state on the host computer and availability to guest computers
9069 (all currently running virtual machines).
9070
9071 Once a supported USB device is attached to the host, global USB
9072 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
9073 either ignore the device, or put ot to #Held state, or do nothing. Unless
9074 the device is ignored by global filters, filters of all currently running
9075 guests (<link to="IUSBController::deviceFilters"/>) are activated that can
9076 put it to #Captured state.
9077
9078 If the device was ignored by global filters, or didn't match
9079 any filters at all (including guest ones), it is handled by the host
9080 in a normal way. In this case, the device state is determined by
9081 the host and can be one of #Unavailable, #Busy or #Available, depending on
9082 the current device usage.
9083
9084 Besides auto-capturing based on filters, the device can be manually
9085 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
9086 state is #Busy, #Available or #Held.
9087
9088 <note>
9089 Due to differences in USB stack implementations in Linux and Win32,
9090 states #Busy and #Available are applicable only to the Linux version of
9091 the product. This also means that (<link
9092 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if
9093 the device state is #USBDeviceHeld.
9094 </note>
9095
9096 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
9097 </desc>
9098
9099 <const name="NotSupported" value="0">
9100 <desc>
9101 Not supported by the VirtualBox server, not available to guests.
9102 </desc>
9103 </const>
9104 <const name="Unavailable" value="1">
9105 <desc>
9106 Being used by the host computer exclusively,
9107 not available to guests.
9108 </desc>
9109 </const>
9110 <const name="Busy" value="2">
9111 <desc>
9112 Being used by the host computer, potentially available to guests.
9113 </desc>
9114 </const>
9115 <const name="Available" value="3">
9116 <desc>
9117 Not used by the host computer, available to guests.
9118 The host computer can also start using the device at any time.
9119 </desc>
9120 </const>
9121 <const name="Held" value="4">
9122 <desc>
9123 Held by the VirtualBox server (ignored by the host computer),
9124 available to guests.
9125 </desc>
9126 </const>
9127 <const name="Captured" value="5">
9128 <desc>
9129 Captured by one of the guest computers, not available
9130 to anybody else.
9131 </desc>
9132 </const>
9133 </enum>
9134
9135 <enumerator
9136 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
9137 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
9138 />
9139
9140 <collection
9141 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
9142 enumerator="IHostUSBDeviceEnumerator"
9143 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
9144 readonly="yes"
9145 >
9146 <method name="findById">
9147 <desc>
9148 Searches this collection for a USB device with the given UUID.
9149 <note>
9150 The method returns an error if the given UUID does not
9151 correspond to any USB device in the collection.
9152 </note>
9153 <see>IHostUSBDevice::id</see>
9154 </desc>
9155 <param name="id" type="uuid" dir="in">
9156 <desc>UUID of the USB device to search for.</desc>
9157 </param>
9158 <param name="device" type="IHostUSBDevice" dir="return">
9159 <desc>Found USB device object.</desc>
9160 </param>
9161 </method>
9162
9163 <method name="findByAddress">
9164 <desc>
9165 Searches this collection for a USB device with the given
9166 host address.
9167 <note>
9168 The method returns an error if the given address does not
9169 correspond to any USB device in the collection.
9170 </note>
9171 <see>IHostUSBDevice::address</see>
9172 </desc>
9173 <param name="name" type="wstring" dir="in">
9174 <desc>
9175 Address of the USB device (as assigned by the host) to
9176 search for.
9177 </desc>
9178 </param>
9179 <param name="device" type="IHostUSBDevice" dir="return">
9180 <desc>Found USB device object.</desc>
9181 </param>
9182 </method>
9183
9184 </collection>
9185
9186 <interface
9187 name="IHostUSBDevice" extends="IUSBDevice"
9188 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
9189 wsmap="managed"
9190 >
9191 <desc>
9192 The IHostUSBDevice interface represents a physical USB device attached
9193 to the host computer.
9194
9195 Besides properties inherited from IUSBDevice, this interface adds the
9196 <link to="#state"/> property that holds the courrent state of the USB
9197 device.
9198
9199 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
9200 </desc>
9201
9202 <attribute name="state" type="USBDeviceState" readonly="yes">
9203 <desc>
9204 Current state of the device.
9205 </desc>
9206 </attribute>
9207
9208 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
9209
9210 </interface>
9211
9212
9213 <!--
9214 // IHostUSBDeviceFilter
9215 /////////////////////////////////////////////////////////////////////////
9216 -->
9217
9218 <enum
9219 name="USBDeviceFilterAction"
9220 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
9221 >
9222 <desc>
9223 Actions for host USB device filters.
9224 <see>IHostUSBDeviceFilter, USBDeviceState</see>
9225 </desc>
9226
9227 <const name="Null" value="0">
9228 <desc><tt>null</tt> value. Never used by the API.</desc>
9229 </const>
9230 <const name="Ignore" value="1">
9231 <desc>Ignore the matched USB device.</desc>
9232 </const>
9233 <const name="Hold" value="2">
9234 <desc>Hold the matched USB device.</desc>
9235 </const>
9236 </enum>
9237
9238 <enumerator
9239 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
9240 uuid="ff735211-903e-4642-9c37-189eb44579fe"
9241 />
9242
9243 <collection
9244 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
9245 enumerator="IHostUSBDeviceFilterEnumerator"
9246 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
9247 readonly="yes"
9248 />
9249
9250 <interface
9251 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
9252 uuid="4cc70246-d74a-400f-8222-3900489c0374"
9253 wsmap="managed"
9254 >
9255 <desc>
9256 The IHostUSBDeviceFilter interface represents a global filter for a
9257 physical USB device used by the host computer. Used indirectly in
9258 <link to="IHost::USBDeviceFilters"/>.
9259
9260 Using filters of this type, the host computer determines the initial
9261 state of the USB device after it is physically attached to the
9262 host's USB controller.
9263
9264 <note>
9265 The <link to="#remote"/> attribute is ignored by this type of
9266 filters, because it makes sense only for
9267 <link to="IUSBController::deviceFilters">machine USB filters</link>.
9268 </note>
9269
9270 <see>IHost::USBDeviceFilters</see>
9271 </desc>
9272
9273 <attribute name="action" type="USBDeviceFilterAction">
9274 <desc>
9275 Action performed by the host when an attached USB device
9276 matches this filter.
9277 </desc>
9278 </attribute>
9279
9280 </interface>
9281
9282 <!--
9283 // IAudioAdapter
9284 /////////////////////////////////////////////////////////////////////////
9285 -->
9286
9287 <enum
9288 name="AudioDriverType"
9289 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
9290 >
9291 <desc>
9292 Host audio driver type.
9293 </desc>
9294
9295 <const name="Null" value="0">
9296 <desc><tt>null</tt> value. Also means "dummy audio driver".</desc>
9297 </const>
9298 <const name="WinMM" value="1"/>
9299 <const name="OSS" value="2"/>
9300 <const name="ALSA" value="3"/>
9301 <const name="DirectSound" value="4"/>
9302 <const name="CoreAudio" value="5"/>
9303 <const name="MMPM" value="6"/>
9304 <const name="Pulse" value="7"/>
9305 <const name="SolAudio" value="8"/>
9306 </enum>
9307
9308 <enum
9309 name="AudioControllerType"
9310 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
9311 >
9312 <desc>
9313 Virtual audio controller type.
9314 </desc>
9315
9316 <const name="AC97" value="0"/>
9317 <const name="SB16" value="1"/>
9318 </enum>
9319
9320 <interface
9321 name="IAudioAdapter" extends="$unknown"
9322 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
9323 wsmap="managed"
9324 >
9325 <desc>
9326 The IAudioAdapter interface represents the virtual audio adapter of
9327 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
9328 </desc>
9329 <attribute name="enabled" type="boolean">
9330 <desc>
9331 Flag whether the audio adapter is present in the
9332 guest system. If disabled, the virtual guest hardware will
9333 not contain any audio adapter. Can only be changed when
9334 the VM is not running.
9335 </desc>
9336 </attribute>
9337 <attribute name="audioController" type="AudioControllerType">
9338 <desc>
9339 The audio hardware we emulate.
9340 </desc>
9341 </attribute>
9342 <attribute name="audioDriver" type="AudioDriverType">
9343 <desc>
9344 Audio driver the adapter is connected to. This setting
9345 can only be changed when the VM is not running.
9346 </desc>
9347 </attribute>
9348 </interface>
9349
9350 <!--
9351 // IVRDPServer
9352 /////////////////////////////////////////////////////////////////////////
9353 -->
9354
9355 <enum
9356 name="VRDPAuthType"
9357 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
9358 >
9359 <desc>
9360 VRDP authentication type.
9361 </desc>
9362
9363 <const name="Null" value="0">
9364 <desc><tt>null</tt> value. Also means "no authentication".</desc>
9365 </const>
9366 <const name="External" value="1"/>
9367 <const name="Guest" value="2"/>
9368 </enum>
9369
9370 <interface
9371 name="IVRDPServer" extends="$unknown"
9372 uuid="ed9d31ae-867f-45fc-b727-6740084d1883"
9373 wsmap="managed"
9374 >
9375 <attribute name="enabled" type="boolean">
9376 <desc>VRDP server status.</desc>
9377 </attribute>
9378
9379 <attribute name="port" type="unsigned long">
9380 <desc>
9381 VRDP server port number.
9382 <note>
9383 Setting the value of this property to <tt>0</tt> will reset the port
9384 number to the default value which is
9385 currently <tt>3389</tt>. Reading this property will always return a
9386 real port number, even after it has been set to <tt>0</tt> (in which
9387 case the default port is returned).
9388 </note>
9389 </desc>
9390 </attribute>
9391
9392 <attribute name="netAddress" type="wstring">
9393 <desc>VRDP server address.</desc>
9394 </attribute>
9395
9396 <attribute name="authType" type="VRDPAuthType">
9397 <desc>VRDP authentication method.</desc>
9398 </attribute>
9399
9400 <attribute name="authTimeout" type="unsigned long">
9401 <desc>Timeout for guest authentication. Milliseconds.</desc>
9402 </attribute>
9403
9404 <attribute name="allowMultiConnection" type="boolean">
9405 <desc>
9406 Flag whether multiple simultaneous connections to the VM are permitted.
9407 Note that this will be replaced by a more powerful mechanism in the future.
9408 </desc>
9409 </attribute>
9410
9411 </interface>
9412
9413
9414 <!--
9415 // ISharedFolder
9416 /////////////////////////////////////////////////////////////////////////
9417 -->
9418
9419 <enumerator
9420 name="ISharedFolderEnumerator" type="ISharedFolder"
9421 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
9422 />
9423
9424 <collection
9425 name="ISharedFolderCollection" type="ISharedFolder"
9426 enumerator="ISharedFolderEnumerator"
9427 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
9428 readonly="yes">
9429
9430 <method name="findByName">
9431 <desc>
9432 Searches this collection for a shared folder with the given logical
9433 name.
9434 <note>
9435 The method returns an error if the given name does not correspond to
9436 any shared folder in the collection.
9437 </note>
9438 </desc>
9439 <param name="name" type="wstring" dir="in">
9440 <desc>Logical name of the shared folder to search for</desc>
9441 </param>
9442 <param name="sharedFolder" type="ISharedFolder" dir="return">
9443 <desc>Found shared folder object</desc>
9444 </param>
9445 </method>
9446
9447 </collection>
9448
9449 <interface
9450 name="ISharedFolder" extends="$unknown"
9451 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
9452 wsmap="struct"
9453 >
9454 <desc>
9455 The ISharedFolder interface represents a folder in the host computer's
9456 file system accessible from the guest OS running inside a virtual
9457 machine using an associated logical name.
9458
9459 There are three types of shared folders:
9460 <ul>
9461 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
9462 folders available to all virtual machines.</li>
9463 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
9464 VM-specific shared folders available to the given virtual machine at
9465 startup.</li>
9466 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
9467 VM-specific shared folders created in the session context (for
9468 example, when the virtual machine is running) and automatically
9469 discarded when the session is closed (the VM is powered off).</li>
9470 </ul>
9471
9472 Logical names of shared folders must be unique within the given scope
9473 (global, permanent or transient). However, they do not need to be unique
9474 across scopes. In this case, the definitioin of the shared folder in a
9475 more specific scope takes precedence over definitions in all other
9476 scopes. The order of precedence is (more specific to more general):
9477 <ol>
9478 <li>Transient definitions</li>
9479 <li>Permanent definitions</li>
9480 <li>Global definitions</li>
9481 </ol>
9482
9483 For example, if MyMachine has a shared folder named
9484 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then cretaing a
9485 transient shared folder named <tt>C_DRIVE</tt> (that points
9486 to <tt>C:\\\\WINDOWS</tt>) will change the definition
9487 of <tt>C_DRIVE</tt> in the guest OS so
9488 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
9489 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
9490 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
9491 the prevoious (permanent) definition of <tt>C_DRIVE</tt> that points
9492 to <tt>C:\\</tt> if it still exists.
9493
9494 Note that permanent and transient shared folders of different machines
9495 are in different name spaces, so they don't overlap and don't need to
9496 have unique logical names.
9497
9498 <note>With the COM API, this is an interface like all the others. With the webservice,
9499 this is mapped to a structure, so querying the attribute will not return an object,
9500 but a complete structure.</note>
9501
9502 <note>
9503 Global shared folders are not implemented in the current vesion of the
9504 product.
9505 </note>
9506 </desc>
9507
9508 <attribute name="name" type="wstring" readonly="yes">
9509 <desc>Logical name of the shared folder.</desc>
9510 </attribute>
9511
9512 <attribute name="hostPath" type="wstring" readonly="yes">
9513 <desc>Full path to the shared folder in the host file system.</desc>
9514 </attribute>
9515
9516 <attribute name="accessible" type="boolean" readonly="yes">
9517 <desc>
9518 Whether the folder defined by the host path is currently
9519 accessible or not.
9520 For example, the folder can be unaccessible if it is placed
9521 on the network share that is not available by the time
9522 this property is read.
9523 </desc>
9524 </attribute>
9525
9526 <attribute name="writable" type="boolean" readonly="yes">
9527 <desc>
9528 Whether the folder defined by the host path is writable or
9529 not.
9530 </desc>
9531 </attribute>
9532
9533 </interface>
9534
9535 <!--
9536 // ISession
9537 /////////////////////////////////////////////////////////////////////////
9538 -->
9539
9540 <interface
9541 name="IInternalSessionControl" extends="$unknown"
9542 uuid="37838967-2430-4bb1-8acc-1b5b2c383d44"
9543 internal="yes"
9544 wsmap="suppress"
9545 >
9546 <method name="getPID">
9547 <desc>PID of the process that has created this Session object.
9548 </desc>
9549 <param name="pid" type="unsigned long" dir="return"/>
9550 </method>
9551
9552 <method name="getRemoteConsole">
9553 <desc>Returns the console object suitable for remote control.</desc>
9554 <param name="console" type="IConsole" dir="return"/>
9555 </method>
9556
9557 <method name="assignMachine">
9558 <desc>
9559 Assigns the machine object associated with this direct-type
9560 session or informs the session that it will be a remote one
9561 (if machine = NULL).
9562 </desc>
9563 <param name="machine" type="IMachine" dir="in"/>
9564 </method>
9565
9566 <method name="assignRemoteMachine">
9567 <desc>
9568 Assigns the machine and the (remote) console object associated with
9569 this remote-type session.
9570 </desc>
9571 <param name="machine" type="IMachine" dir="in"/>
9572 <param name="console" type="IConsole" dir="in"/>
9573 </method>
9574
9575 <method name="updateMachineState">
9576 <desc>
9577 Updates the machine state in the VM process.
9578 Must be called only in certain cases
9579 (see the method implementation).
9580 </desc>
9581 <param name="aMachineState" type="MachineState" dir="in"/>
9582 </method>
9583
9584 <method name="uninitialize">
9585 <desc>
9586 Uninitializes (closes) this session. Used by VirtualBox to close
9587 the corresponding remote session when the direct session dies
9588 or gets closed.
9589 </desc>
9590 </method>
9591
9592 <method name="onDVDDriveChange">
9593 <desc>
9594 Triggered when settings of the DVD drive object of the
9595 associated virtual machine have changed.
9596 </desc>
9597 </method>
9598
9599 <method name="onFloppyDriveChange">
9600 <desc>
9601 Triggered when settings of the floppy drive object of the
9602 associated virtual machine have changed.
9603 </desc>
9604 </method>
9605
9606 <method name="onNetworkAdapterChange">
9607 <desc>
9608 Triggered when settions of a network adapter of the
9609 associated virtual machine have changed.
9610 </desc>
9611 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
9612 </method>
9613
9614 <method name="onSerialPortChange">
9615 <desc>
9616 Triggered when settions of a serial port of the
9617 associated virtual machine have changed.
9618 </desc>
9619 <param name="serialPort" type="ISerialPort" dir="in"/>
9620 </method>
9621
9622 <method name="onParallelPortChange">
9623 <desc>
9624 Triggered when settings of a parallel port of the
9625 associated virtual machine have changed.
9626 </desc>
9627 <param name="parallelPort" type="IParallelPort" dir="in"/>
9628 </method>
9629
9630 <method name="onVRDPServerChange">
9631 <desc>
9632 Triggered when settings of the VRDP server object of the
9633 associated virtual machine have changed.
9634 </desc>
9635 </method>
9636
9637 <method name="onUSBControllerChange">
9638 <desc>
9639 Triggered when settings of the USB controller object of the
9640 associated virtual machine have changed.
9641 </desc>
9642 </method>
9643
9644 <method name="onSharedFolderChange">
9645 <desc>
9646 Triggered when a permanent (global or machine) shared folder has been
9647 created or removed.
9648 <note>
9649 We don't pass shared folder parameters in this notification because
9650 the order in which parallel notifications are delivered is not defined,
9651 therefore it could happen that these parameters were outdated by the
9652 time of processing this notification.
9653 </note>
9654 </desc>
9655 <param name="global" type="boolean" dir="in"/>
9656 </method>
9657
9658 <method name="onUSBDeviceAttach">
9659 <desc>
9660 Triggered when a request to capture a USB device (as a result
9661 of matched USB filters or direct call to
9662 <link to="IConsole::attachUSBDevice"/>) has completed.
9663 A @c null @a error object means success, otherwise it
9664 describes a failure.
9665 </desc>
9666 <param name="device" type="IUSBDevice" dir="in"/>
9667 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
9668 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
9669 </method>
9670
9671 <method name="onUSBDeviceDetach">
9672 <desc>
9673 Triggered when a request to release the USB device (as a result
9674 of machine termination or direct call to
9675 <link to="IConsole::detachUSBDevice"/>) has completed.
9676 A @c null @a error object means success, otherwise it
9677 </desc>
9678 <param name="id" type="uuid" dir="in"/>
9679 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
9680 </method>
9681
9682 <method name="onShowWindow">
9683 <desc>
9684 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
9685 <link to="IMachine::showConsoleWindow()"/> in order to notify
9686 console callbacks
9687 <link to="IConsoleCallback::onCanShowWindow()"/>
9688 and <link to="IConsoleCallback::onShowWindow()"/>.
9689 </desc>
9690 <param name="check" type="boolean" dir="in"/>
9691 <param name="canShow" type="boolean" dir="out"/>
9692 <param name="winId" type="unsigned long long" dir="out"/>
9693 </method>
9694
9695 </interface>
9696
9697 <interface
9698 name="ISession" extends="$dispatched"
9699 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
9700 wsmap="managed"
9701 >
9702 <desc>
9703 The ISession interface represents a serialization primitive for virtual
9704 machines.
9705
9706 Within VirtualBox, every time one wishes to manipulate a virtual machine
9707 (for example, change its settings or start execution), an instance of
9708 the ISession interface is required. One first creates a local session
9709 object that implements the ISession interface and then passes the
9710 created object with the method call that opens the given session and
9711 thus initiates the machine manipulation. The session serves several
9712 purposes: it identifies to the inter-process VirtualBox code which
9713 process is currently working with the virtual machine, and it ensures
9714 that there are no incompatible requests from several processes for the
9715 same virtual machine.
9716
9717 How sessions objects are used depends on whether you use the Main API
9718 via COM or via the web service:
9719
9720 <ul>
9721 <li>When using the COM API directly, an object of the Session class from the
9722 VirtualBox type library needs to be created. In regular COM C++ client code,
9723 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
9724 This object will then act as a local session object in further calls to open
9725 a session.
9726 </li>
9727
9728 <li>In the webservice, the session manager (IWebsessionManager) instead creates
9729 one session object automatically when <link to="IWebsessionManager::logon" />
9730 is called. A managed object reference to that session object can be retrieved by
9731 calling <link to="IWebsessionManager::getSessionObject" />. This session object
9732 reference can then be used to open sessions.
9733 </li>
9734 </ul>
9735
9736 Sessions are mainly used in two variations:
9737
9738 <ul>
9739 <li>
9740 To start a virtual machine in a separate process, one would call
9741 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
9742 object as its first parameter. This session then identifies the caller
9743 and lets him control the started machine (for example, pause machine
9744 execution or power it down) as well as be notified about machine
9745 execution state changes.
9746 </li>
9747
9748 <li>To alter machine settings, or to start machine execution within the
9749 current process, one needs to open a direct session for the machine first by
9750 calling <link to="IVirtualBox::openSession"/>. While a direct session
9751 is open within one process, no any other process may open another direct
9752 session for the same machine. This prevents the machine from being changed
9753 by other processes while it is running or while the machine is being configured.
9754 </li>
9755 </ul>
9756
9757 One also can attach to an existing direct session alreay opened by
9758 another process (for example, in order to send a control request to the
9759 virtual machine such as the pause or the reset request). This is done by
9760 calling <link to="IVirtualBox::openExistingSession"/>.
9761
9762 <note>
9763 Unless you are trying to write a new VirtualBox front-end that
9764 performs direct machine execution (like the VirtualBox or VBoxSDL
9765 frontends), don't call <link to="IConsole::powerUp"/> in a direct
9766 session opened by <link to="IVirtualBox::openSession"/> and use this
9767 session only to change virtual machine settings. If you simply want to
9768 start virtual machine execution using one of the existing frontends
9769 (for example the VirtualBox GUI frontend), use
9770 <link to="IVirtualBox::openRemoteSession"/>. In the latter case, on
9771 sucess, the machine will be powered up for you by the front-end so you
9772 don't need to call <link to="IConsole::powerUp"/> too.
9773 </note>
9774 </desc>
9775
9776 <attribute name="state" type="SessionState" readonly="yes">
9777 <desc>Current state of this session.</desc>
9778 </attribute>
9779
9780 <attribute name="type" type="SessionType" readonly="yes">
9781 <desc>
9782 Type of this session. The value of this attribute is valid only
9783 if the session is currently open (i.e. its #state is SessionType::SessionOpen),
9784 otherwise an error will be returned.
9785 </desc>
9786 </attribute>
9787
9788 <attribute name="machine" type="IMachine" readonly="yes">
9789 <desc>Machine object associated with this session.</desc>
9790 </attribute>
9791
9792 <attribute name="console" type="IConsole" readonly="yes">
9793 <desc>Console object associated with this session.</desc>
9794 </attribute>
9795
9796 <method name="close">
9797 <desc>
9798 Closes this session.
9799 <note>
9800 If a direct session for a machine opened with
9801 <link to="IVirtualBox::openSession()"/> is not explicitly
9802 closed when the application terminates, the state of the
9803 machine will be set to <link to="MachineState::Aborted"/>
9804 on the server. Generally, it is recommended to close all
9805 open sessions explicitly before terminating the application
9806 (no matter what is the reason of the termination).
9807 </note>
9808 </desc>
9809 </method>
9810
9811 </interface>
9812
9813 <!--
9814 // ISATAController
9815 /////////////////////////////////////////////////////////////////////////
9816 -->
9817
9818 <interface
9819 name="ISATAController" extends="$unknown"
9820 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
9821 wsmap="managed"
9822 >
9823 <attribute name="enabled" type="boolean">
9824 <desc>
9825 Flag whether the SATA controller is present in the
9826 guest system. If disabled, the virtual guest hardware will
9827 not contain any SATA controller. Can only be changed when
9828 the VM is powered off.
9829 </desc>
9830 </attribute>
9831
9832 <attribute name="portCount" type="unsigned long">
9833 <desc>
9834 The number of usable ports on the sata controller.
9835 It ranges from 1 to 30.
9836 </desc>
9837 </attribute>
9838
9839 <method name="GetIDEEmulationPort">
9840 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc>
9841 <param name="devicePosition" type="long" dir="in"/>
9842 <param name="portNumber" type="long" dir="return"/>
9843 </method>
9844
9845 <method name="SetIDEEmulationPort">
9846 <desc>Sets the port number which is emulated as an IDE device.</desc>
9847 <param name="devicePosition" type="long" dir="in"/>
9848 <param name="portNumber" type="long" dir="in"/>
9849 </method>
9850
9851 </interface>
9852
9853<if target="wsdl">
9854
9855 <!--
9856 // IManagedObjectRef
9857 /////////////////////////////////////////////////////////////////////////
9858 -->
9859
9860 <interface
9861 name="IManagedObjectRef" extends="$unknown"
9862 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
9863 internal="yes"
9864 wsmap="managed"
9865 wscpp="hardcoded"
9866 >
9867 <desc>
9868 Webservice only: Managed object reference.
9869
9870 Only within the webservice, a managed object reference (which is really
9871 an opaque number) allows a webservice client to address an object
9872 that lives in the address space of the webservice server.
9873
9874 Behind each managed object reference, there is a COM object that lives
9875 in the webservice server's address space. The COM object is not freed
9876 until the managed object reference is released, either by an explicit
9877 call to <link to="IManagedObjectRef::release" /> or by logging off from
9878 the webservice (<link to="IWebsessionManager::logoff" />), which releases
9879 all objects created during the webservice session.
9880
9881 Whenever a method call of the VirtualBox API returns a COM object, the
9882 webservice representation of that method will instead return a
9883 managed object reference, which can then be used to invoke methods
9884 on that object.
9885 </desc>
9886
9887 <method name="getInterfaceName">
9888 <desc>
9889 Returns the name of the interface that this managed object represents,
9890 for example, "IMachine", as a string.
9891 </desc>
9892 <param name="return" type="wstring" dir="return"/>
9893 </method>
9894
9895 <method name="release">
9896 <desc>
9897 Releases this managed object reference and frees the resources that
9898 were allocated for it in the webservice server process. After calling
9899 this method, the identifier of the reference can no longer be used.
9900 </desc>
9901 </method>
9902
9903 </interface>
9904
9905 <!--
9906 // IWebsessionManager
9907 /////////////////////////////////////////////////////////////////////////
9908 -->
9909
9910 <interface
9911 name="IWebsessionManager" extends="$unknown"
9912 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
9913 internal="yes"
9914 wsmap="global"
9915 wscpp="hardcoded"
9916 >
9917 <desc>
9918 Webservice only: Websession manager. This provides essential services
9919 to webservice clients.
9920 </desc>
9921 <method name="logon">
9922 <desc>
9923 Logs a new client onto the webservice and returns a managed object reference to
9924 the IVirtualBox instance, which the client can then use as a basis to further
9925 queries, since all calls to the VirtualBox API are based on the IVirtualBox
9926 interface, in one way or the other.
9927 </desc>
9928 <param name="username" type="wstring" dir="in"/>
9929 <param name="password" type="wstring" dir="in"/>
9930 <param name="return" type="wstring" dir="return"/>
9931 </method>
9932
9933 <method name="getSessionObject">
9934 <desc>
9935 Returns a managed object reference to the internal ISession object that was created
9936 for this web service session when the client logged on.
9937
9938 <see>ISession</see>
9939 </desc>
9940 <param name="refIVirtualBox" type="wstring" dir="in"/>
9941 <param name="return" type="wstring" dir="return"/>
9942 </method>
9943
9944 <method name="logoff">
9945 <desc>
9946 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
9947 and destroys all resources associated with the session (most importantly, all
9948 managed objects created in the server while the session was active).
9949 </desc>
9950 <param name="refIVirtualBox" type="wstring" dir="in"/>
9951 </method>
9952
9953 </interface>
9954
9955</if>
9956
9957 <module name="VBoxSVC" context="LocalServer">
9958 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
9959 namespace="virtualbox.org">
9960 <interface name="IVirtualBox" default="yes"/>
9961 </class>
9962 </module>
9963
9964 <module name="VBoxC" context="InprocServer" threadingModel="Free">
9965 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
9966 namespace="virtualbox.org">
9967 <interface name="ISession" default="yes"/>
9968 </class>
9969 </module>
9970
9971</library>
9972
9973</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