diff --git a/profiles/input/hog_manager.c b/profiles/input/hog_manager.c
index 8ddaf2f..6d173cc 100644
--- a/profiles/input/hog_manager.c
+++ b/profiles/input/hog_manager.c
static gboolean suspend_supported = FALSE;
+static void suspend_callback(void)
+{
+ DBG("Suspending ...");
+}
+
+static void resume_callback(void)
+{
+ DBG("Resuming ...");
+}
+
static int hog_device_probe(struct btd_profile *p, struct btd_device *device,
GSList *uuids)
{
{
int err;
- err = suspend_init();
+ err = suspend_init(suspend_callback, resume_callback);
if (err < 0)
DBG("Suspend: %s(%d)", strerror(-err), -err);
else
diff --git a/profiles/input/suspend-dummy.c b/profiles/input/suspend-dummy.c
index 0a97158..282d3fb 100644
--- a/profiles/input/suspend-dummy.c
+++ b/profiles/input/suspend-dummy.c
#include <config.h>
#endif
+#include <stdlib.h>
+
#include "suspend.h"
-int suspend_init(void)
+static suspend_event suspend_cb = NULL;
+static resume_event resume_cb = NULL;
+
+int suspend_init(suspend_event suspend, resume_event resume)
{
+ suspend_cb = suspend;
+ resume_cb = resume;
+
return 0;
}
diff --git a/profiles/input/suspend.h b/profiles/input/suspend.h
index 3f37a29..bfee3cf 100644
--- a/profiles/input/suspend.h
+++ b/profiles/input/suspend.h
*
*/
-int suspend_init(void);
+typedef void (*suspend_event) (void);
+typedef void (*resume_event) (void);
+
+int suspend_init(suspend_event suspend, resume_event resume);
void suspend_exit(void);