1 | /** @file
|
---|
2 | * PDM - Pluggable Device Manager, Common Definitions & Types. (VMM)
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | * available from http://www.virtualbox.org. This file is free software;
|
---|
10 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | * General Public License (GPL) as published by the Free Software
|
---|
12 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | *
|
---|
16 | * The contents of this file may alternatively be used under the terms
|
---|
17 | * of the Common Development and Distribution License Version 1.0
|
---|
18 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
19 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
20 | * CDDL are applicable instead of those of the GPL.
|
---|
21 | *
|
---|
22 | * You may elect to license modified versions of this file under the
|
---|
23 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
24 | *
|
---|
25 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
26 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
27 | * additional information or have any questions.
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifndef ___VBox_pdmcommon_h
|
---|
31 | #define ___VBox_pdmcommon_h
|
---|
32 |
|
---|
33 | #include <VBox/types.h>
|
---|
34 |
|
---|
35 | /** @defgroup grp_pdm_common Common Definitions & Types
|
---|
36 | * @ingroup grp_pdm
|
---|
37 | *
|
---|
38 | * Not all the types here are "common", they are here to work around header
|
---|
39 | * ordering issues.
|
---|
40 | *
|
---|
41 | * @{
|
---|
42 | */
|
---|
43 |
|
---|
44 | /** PDM Attach/Detach Callback Flags.
|
---|
45 | * Used by PDMDeviceAttach, PDMDeviceDetach, PDMDriverAttach, PDMDriverDetach,
|
---|
46 | * FNPDMDEVATTACH, FNPDMDEVDETACH, FNPDMDRVATTACH, FNPDMDRVDETACH and
|
---|
47 | * FNPDMDRVCONSTRUCT.
|
---|
48 | @{ */
|
---|
49 | /** The attach/detach command is not a hotplug event. */
|
---|
50 | #define PDM_TACH_FLAGS_NOT_HOT_PLUG RT_BIT_32(0)
|
---|
51 | /** Indicates that no attach or detach callbacks should be made.
|
---|
52 | * This is mostly for internal use. */
|
---|
53 | #define PDM_TACH_FLAGS_NO_CALLBACKS RT_BIT_32(1)
|
---|
54 | /* @} */
|
---|
55 |
|
---|
56 |
|
---|
57 | /**
|
---|
58 | * Is asynchronous handling of suspend or power off notification completed?
|
---|
59 | *
|
---|
60 | * This is called to check whether the USB device has quiesced. Don't deadlock.
|
---|
61 | * Avoid blocking. Do NOT wait for anything.
|
---|
62 | *
|
---|
63 | * @returns true if done, false if more work to be done.
|
---|
64 | *
|
---|
65 | * @param pUsbIns The USB device instance.
|
---|
66 | *
|
---|
67 | * @thread EMT(0)
|
---|
68 | */
|
---|
69 | typedef DECLCALLBACK(bool) FNPDMUSBASYNCNOTIFY(PPDMUSBINS pUsbIns);
|
---|
70 | /** Pointer to a FNPDMUSBASYNCNOTIFY. */
|
---|
71 | typedef FNPDMUSBASYNCNOTIFY *PFNPDMUSBASYNCNOTIFY;
|
---|
72 |
|
---|
73 | /**
|
---|
74 | * Is asynchronous handling of suspend or power off notification completed?
|
---|
75 | *
|
---|
76 | * This is called to check whether the device has quiesced. Don't deadlock.
|
---|
77 | * Avoid blocking. Do NOT wait for anything.
|
---|
78 | *
|
---|
79 | * @returns true if done, false if more work to be done.
|
---|
80 | *
|
---|
81 | * @param pDevIns The device instance.
|
---|
82 | *
|
---|
83 | * @thread EMT(0)
|
---|
84 | */
|
---|
85 | typedef DECLCALLBACK(bool) FNPDMDEVASYNCNOTIFY(PPDMDEVINS pDevIns);
|
---|
86 | /** Pointer to a FNPDMDEVASYNCNOTIFY. */
|
---|
87 | typedef FNPDMDEVASYNCNOTIFY *PFNPDMDEVASYNCNOTIFY;
|
---|
88 |
|
---|
89 | /**
|
---|
90 | * Is asynchronous handling of suspend or power off notification completed?
|
---|
91 | *
|
---|
92 | * This is called to check whether the driver has quiesced. Don't deadlock.
|
---|
93 | * Avoid blocking. Do NOT wait for anything.
|
---|
94 | *
|
---|
95 | * @returns true if done, false if more work to be done.
|
---|
96 | *
|
---|
97 | * @param pDrvIns The driver instance.
|
---|
98 | *
|
---|
99 | * @thread EMT(0)
|
---|
100 | */
|
---|
101 | typedef DECLCALLBACK(bool) FNPDMDRVASYNCNOTIFY(PPDMDRVINS pDrvIns);
|
---|
102 | /** Pointer to a FNPDMDRVASYNCNOTIFY. */
|
---|
103 | typedef FNPDMDRVASYNCNOTIFY *PFNPDMDRVASYNCNOTIFY;
|
---|
104 |
|
---|
105 | /** @} */
|
---|
106 |
|
---|
107 | #endif
|
---|
108 |
|
---|