aboutsummaryrefslogtreecommitdiffstats
path: root/src/hal-abi.h
blob: 277580f7739501dad24f7b445989121ef569e55c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * HAL ABI
 *
 * The following is all hal information needed in order to compile
 * a hald-addon.
 */

/* Structure declarations */
struct LibHalContext;
struct DBusConnection;

/* Simple error handling */
#define setup_logger()
#define eprintf(...) (fprintf(stderr, __VA_ARGS__), fprintf(stderr, "\n"))
#define WARNING(...) eprintf("addon-warning: " __VA_ARGS__)
#define DEBUG(...) eprintf("addon-debug: " __VA_ARGS__)
#define ERROR(...) eprintf("addon-error: " __VA_ARGS__)
#define HAL_WARNING(x) WARNING x
#define HAL_DEBUG(x) DEBUG x
#define HAL_ERROR(x) ERROR x

/* Function declarations */
struct LibHalContext *
libhal_ctx_init_direct(struct DBusError *error);

struct DBusConnection *
libhal_ctx_get_dbus_connection(struct LibHalContext *ctx);