VirtualBox

source: vbox/trunk/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h@ 11820

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

made Qt4 the default GUI; VBOX_VRDP => VBOX_WITH_VRDP; VBOX_HGCM => VBOX_WITH_HGCM; Makefile cleanup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1/** @file
2 *
3 * VBoxGuestLib - A support library for VirtualBox guest additions:
4 * Internal header
5 */
6
7/*
8 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __VBGLINTERNAL__H
24#define __VBGLINTERNAL__H
25
26/* I have added this include here as
27 a) This file is always included before VBGLInternal and
28 b) It contains a definition for VBGLHGCMHANDLE, so we definitely do not
29 need to redefine that here. The C (without ++) compiler was complaining
30 that it was defined twice.
31*/
32#include <VBox/VBoxGuestLib.h>
33
34#if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED)
35#include <VBox/log.h>
36# define dprintf(a) RTLogBackdoorPrintf a
37#else
38# define dprintf(a) do {} while (0)
39#endif
40
41#include "SysHlp.h"
42
43#pragma pack(4)
44
45struct _VBGLPHYSHEAPBLOCK;
46typedef struct _VBGLPHYSHEAPBLOCK VBGLPHYSHEAPBLOCK;
47struct _VBGLPHYSHEAPCHUNK;
48typedef struct _VBGLPHYSHEAPCHUNK VBGLPHYSHEAPCHUNK;
49
50#ifndef VBGL_VBOXGUEST
51struct VBGLHGCMHANDLEDATA
52{
53 uint32_t fAllocated;
54 VBGLDRIVER driver;
55};
56#endif
57
58enum VbglLibStatus
59{
60 VbglStatusNotInitialized = 0,
61 VbglStatusInitializing,
62 VbglStatusReady
63};
64
65typedef struct _VBGLDATA
66{
67 enum VbglLibStatus status;
68
69 VBGLIOPORT portVMMDev;
70
71 VMMDevMemory *pVMMDevMemory;
72
73 /**
74 * Physical memory heap data.
75 * @{
76 */
77
78 VBGLPHYSHEAPBLOCK *pFreeBlocksHead;
79 VBGLPHYSHEAPBLOCK *pAllocBlocksHead;
80 VBGLPHYSHEAPCHUNK *pChunkHead;
81
82 RTSEMFASTMUTEX mutexHeap;
83 /** @} */
84
85#ifndef VBGL_VBOXGUEST
86 /**
87 * Fast heap for HGCM handles data.
88 * @{
89 */
90
91 RTSEMFASTMUTEX mutexHGCMHandle;
92
93 struct VBGLHGCMHANDLEDATA aHGCMHandleData[64];
94
95 /** @} */
96#endif
97} VBGLDATA;
98
99#pragma pack()
100
101#ifndef VBGL_DECL_DATA
102extern VBGLDATA g_vbgldata;
103#endif
104
105/* Check if library has been initialized before entering
106 * a public library function.
107 */
108int VbglEnter (void);
109
110#ifdef VBOX_WITH_HGCM
111#ifndef VBGL_VBOXGUEST
112/* Initialize HGCM subsystem. */
113int vbglHGCMInit (void);
114/* Terminate HGCM subsystem. */
115int vbglHGCMTerminate (void);
116#endif
117#endif
118
119#endif /* __VBGLINTERNAL__H */
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