VirtualBox

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

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

added package type property

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

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