VirtualBox

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

Last change on this file since 51026 was 44528, checked in by vboxsync, 12 years ago

header (C) fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 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-2010 Oracle Corporation
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
19#ifndef ____H_VBOX_LIBHAL
20#define ____H_VBOX_LIBHAL
21
22#include <stdint.h>
23
24#define LIB_HAL "libhal.so.1"
25
26/** Types from the dbus and hal header files which we need. These are taken more or less
27 verbatim from the DBus and Hal public interface header files. */
28struct DBusError
29{
30 const char *name;
31 const char *message;
32 unsigned int dummy1 : 1; /**< placeholder */
33 unsigned int dummy2 : 1; /**< placeholder */
34 unsigned int dummy3 : 1; /**< placeholder */
35 unsigned int dummy4 : 1; /**< placeholder */
36 unsigned int dummy5 : 1; /**< placeholder */
37 void *padding1; /**< placeholder */
38};
39struct DBusConnection;
40typedef struct DBusConnection DBusConnection;
41typedef uint32_t dbus_bool_t;
42typedef enum { DBUS_BUS_SESSON, DBUS_BUS_SYSTEM, DBUS_BUS_STARTER } DBusBusType;
43struct LibHalContext_s;
44typedef struct LibHalContext_s LibHalContext;
45
46/** The following are the symbols which we need from libdbus and libhal. */
47extern void (*gDBusErrorInit)(DBusError *);
48extern DBusConnection *(*gDBusBusGet)(DBusBusType, DBusError *);
49extern void (*gDBusErrorFree)(DBusError *);
50extern void (*gDBusConnectionUnref)(DBusConnection *);
51extern LibHalContext *(*gLibHalCtxNew)(void);
52extern dbus_bool_t (*gLibHalCtxSetDBusConnection)(LibHalContext *, DBusConnection *);
53extern dbus_bool_t (*gLibHalCtxInit)(LibHalContext *, DBusError *);
54extern char **(*gLibHalFindDeviceStringMatch)(LibHalContext *, const char *, const char *, int *,
55 DBusError *);
56extern char *(*gLibHalDeviceGetPropertyString)(LibHalContext *, const char *, const char *,
57 DBusError *);
58extern void (*gLibHalFreeString)(char *);
59extern void (*gLibHalFreeStringArray)(char **);
60extern dbus_bool_t (*gLibHalCtxShutdown)(LibHalContext *, DBusError *);
61extern dbus_bool_t (*gLibHalCtxFree)(LibHalContext *);
62
63extern bool gLibHalCheckPresence(void);
64
65#endif /* ____H_VBOX_LIBHAL not defined */
66/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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