VirtualBox

source: vbox/trunk/src/VBox/Main/include/vbox-libhal.h@ 4041

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

Corrected the style in the new dbus and libhal code in Main

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1/** @file
2 *
3 * Module to dynamically load libhal and libdbus and load all symbols
4 * which are needed by VirtualBox.
5 */
6
7/*
8 * Copyright (C) 2006-2007 innotek GmbH
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 as published by the Free Software Foundation,
14 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
15 * distribution. VirtualBox OSE is distributed in the hope that it will
16 * be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * If you received this file as part of a commercial VirtualBox
19 * distribution, then only the terms of your commercial VirtualBox
20 * license agreement apply instead of the previous paragraph.
21 */
22
23#ifndef ____H_VBOX_LIBHAL
24#define ____H_VBOX_LIBHAL
25
26#include <stdint.h>
27
28#define LIB_DBUS "libdbus-1"
29#define LIB_HAL "libhal"
30
31/** Types from the dbus and hal header files which we need. These are taken more or less
32 verbatim from the DBus and Hal public interface header files. */
33struct DBusError
34{
35 const char *name;
36 const char *message;
37 unsigned int dummy1 : 1; /**< placeholder */
38 unsigned int dummy2 : 1; /**< placeholder */
39 unsigned int dummy3 : 1; /**< placeholder */
40 unsigned int dummy4 : 1; /**< placeholder */
41 unsigned int dummy5 : 1; /**< placeholder */
42 void *padding1; /**< placeholder */
43};
44struct DBusConnection;
45typedef struct DBusConnection DBusConnection;
46typedef uint32_t dbus_bool_t;
47typedef enum { DBUS_BUS_SESSON, DBUS_BUS_SYSTEM, DBUS_BUS_STARTER } DBusBusType;
48struct LibHalContext_s;
49typedef struct LibHalContext_s LibHalContext;
50
51/** The following are the symbols which we need from libdbus and libhal. */
52extern void (*gDBusErrorInit)(DBusError *);
53extern DBusConnection *(*gDBusBusGet)(DBusBusType, DBusError *);
54extern void (*gDBusErrorFree)(DBusError *);
55extern void (*gDBusConnectionUnref)(DBusConnection *);
56extern LibHalContext *(*gLibHalCtxNew)(void);
57extern dbus_bool_t (*gLibHalCtxSetDBusConnection)(LibHalContext *, DBusConnection *);
58extern dbus_bool_t (*gLibHalCtxInit)(LibHalContext *, DBusError *);
59extern char **(*gLibHalFindDeviceByCapability)(LibHalContext *, const char *, int *, DBusError *);
60extern char *(*gLibHalDeviceGetPropertyString)(LibHalContext *, const char *, const char *,
61 DBusError *);
62extern void (*gLibHalFreeString)(char *);
63extern void (*gLibHalFreeStringArray)(char **);
64extern dbus_bool_t (*gLibHalCtxShutdown)(LibHalContext *, DBusError *);
65extern dbus_bool_t (*gLibHalCtxFree)(LibHalContext *);
66
67extern bool gLibHalCheckPresence(void);
68
69#endif /* ____H_VBOX_LIBHAL not defined */
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