summaryrefslogtreecommitdiff
path: root/include/task.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-08-07 18:52:11 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-08-07 18:52:11 -0700
commitc78db61246eee132abf421b095baab5b996dd066 (patch)
tree7c6df0ebcd5fb6aefe32af8344b241797fb555a9 /include/task.h
parent3d0695bf9174934e300a983bc838d01ed02b8fdc (diff)
downloadconnman-c78db61246eee132abf421b095baab5b996dd066.tar.gz
connman-c78db61246eee132abf421b095baab5b996dd066.tar.bz2
connman-c78db61246eee132abf421b095baab5b996dd066.zip
Add fully flexible task handling framework
Diffstat (limited to 'include/task.h')
-rw-r--r--include/task.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/task.h b/include/task.h
index dbeb3a76..ec68935f 100644
--- a/include/task.h
+++ b/include/task.h
@@ -22,6 +22,8 @@
#ifndef __CONNMAN_TASK_H
#define __CONNMAN_TASK_H
+#include <dbus/dbus.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -34,9 +36,27 @@ extern "C" {
struct connman_task;
-struct connman_task *connman_task_create(void);
+typedef void (* connman_task_exit_t) (struct connman_task *task,
+ void *user_data);
+
+typedef void (* connman_task_notify_t) (struct connman_task *task,
+ DBusMessage *message, void *user_data);
+
+struct connman_task *connman_task_create(const char *program);
void connman_task_destroy(struct connman_task *task);
+int connman_task_add_argument(struct connman_task *task,
+ const char *argument, const char *value);
+int connman_task_add_variable(struct connman_task *task,
+ const char *key, const char *value);
+
+int connman_task_set_notify(struct connman_task *task, const char *member,
+ connman_task_notify_t function, void *user_data);
+
+int connman_task_run(struct connman_task *task,
+ connman_task_exit_t function, void *user_data);
+int connman_task_stop(struct connman_task *task);
+
#ifdef __cplusplus
}
#endif