aboutsummaryrefslogtreecommitdiffstats
path: root/src/hal-abi.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/hal-abi.h')
-rw-r--r--src/hal-abi.h28
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 @@
+/*
+ * 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);
+