VirtualBox

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

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

Main: Lock the object before switching on non-const data members.

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