summaryrefslogtreecommitdiffstats
path: root/dundee/dundee.h
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-12-20 15:12:51 +0100
committerDaniel Wagner <daniel.wagner@bmw-carit.de>2012-05-22 18:44:46 +0200
commit3e69d5857021a125a1559dc72ee4363d20a57124 (patch)
tree377e567fa9abcda34bd1e94ebe8c03a70923f387 /dundee/dundee.h
parentb1030d281dc575742d4e033a89a83a4bc9a4a1b5 (diff)
downloadofono-3e69d5857021a125a1559dc72ee4363d20a57124.tar.bz2
dundee: Add device un/register
Diffstat (limited to 'dundee/dundee.h')
-rw-r--r--dundee/dundee.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/dundee/dundee.h b/dundee/dundee.h
index 366938e3..ae14e013 100644
--- a/dundee/dundee.h
+++ b/dundee/dundee.h
@@ -105,6 +105,27 @@ int __dundee_device_init(void);
void __dundee_device_cleanup(void);
void __dundee_device_shutdown(void);
+typedef void (*dundee_device_connect_cb_t)(const struct dundee_error *error,
+ int fd, void *data);
+typedef void (*dundee_device_disconnect_cb_t)(const struct dundee_error *error,
+ void *data);
+
+struct dundee_device_driver {
+ const char *name;
+
+ /* Connect and dial */
+ void (*connect)(struct dundee_device *device,
+ dundee_device_connect_cb_t cb, void *data);
+
+ /* Hangup and disconnect */
+ void (*disconnect)(struct dundee_device *device,
+ dundee_device_disconnect_cb_t cb, void *data);
+};
+
+struct dundee_device *dundee_device_create(struct dundee_device_driver *d);
+int dundee_device_register(struct dundee_device *device);
+void dundee_device_unregister(struct dundee_device *device);
+
typedef void (*dundee_device_foreach_func)(struct dundee_device *device,
void *data);
void __dundee_device_foreach(dundee_device_foreach_func cb, void *userdata);