diff options
Diffstat (limited to 'src/hal-abi.h')
| -rw-r--r-- | src/hal-abi.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/hal-abi.h b/src/hal-abi.h new file mode 100644 index 0000000..277580f --- /dev/null +++ b/src/hal-abi.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* | ||
| 2 | * HAL ABI | ||
| 3 | * | ||
| 4 | * The following is all hal information needed in order to compile | ||
| 5 | * a hald-addon. | ||
| 6 | */ | ||
| 7 | |||
| 8 | /* Structure declarations */ | ||
| 9 | struct LibHalContext; | ||
| 10 | struct DBusConnection; | ||
| 11 | |||
| 12 | /* Simple error handling */ | ||
| 13 | #define setup_logger() | ||
| 14 | #define eprintf(...) (fprintf(stderr, __VA_ARGS__), fprintf(stderr, "\n")) | ||
| 15 | #define WARNING(...) eprintf("addon-warning: " __VA_ARGS__) | ||
| 16 | #define DEBUG(...) eprintf("addon-debug: " __VA_ARGS__) | ||
| 17 | #define ERROR(...) eprintf("addon-error: " __VA_ARGS__) | ||
| 18 | #define HAL_WARNING(x) WARNING x | ||
| 19 | #define HAL_DEBUG(x) DEBUG x | ||
| 20 | #define HAL_ERROR(x) ERROR x | ||
| 21 | |||
| 22 | /* Function declarations */ | ||
| 23 | struct LibHalContext * | ||
| 24 | libhal_ctx_init_direct(struct DBusError *error); | ||
| 25 | |||
| 26 | struct DBusConnection * | ||
| 27 | libhal_ctx_get_dbus_connection(struct LibHalContext *ctx); | ||
| 28 | |||
