VirtualBox

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

Last change on this file since 10534 was 10534, checked in by vboxsync, 16 years ago

Backed out Performance API changes.

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

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