summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2012-10-31 10:33:31 +0100
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-11-05 14:43:33 +0200
commit571da6449e813c3cf1a3f9515818d69bbc2e264d (patch)
treedfdbeece268dd464411fa722ca41a4f3aef3f58b /include
parenta475f99d89f5f9615c31400f4a7126be871c3152 (diff)
downloadconnman-571da6449e813c3cf1a3f9515818d69bbc2e264d.tar.gz
connman-571da6449e813c3cf1a3f9515818d69bbc2e264d.tar.bz2
connman-571da6449e813c3cf1a3f9515818d69bbc2e264d.zip
session: Add callback to policy create()
Instead returning directly a config when create() is called in policy plugin, use a callback function for handing over a valid configuration from the plugin to the session core. This prepares support for asynchronous create call.
Diffstat (limited to 'include')
-rw-r--r--include/session.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/session.h b/include/session.h
index 63e077be..f006e009 100644
--- a/include/session.h
+++ b/include/session.h
@@ -65,11 +65,16 @@ struct connman_session_config {
GSList *allowed_bearers;
};
+typedef void (* connman_session_config_cb) (struct connman_session *session,
+ struct connman_session_config *config,
+ void *user_data, int err);
+
struct connman_session_policy {
const char *name;
int priority;
- struct connman_session_config *(*create)(
- struct connman_session *session);
+ int (*create)(struct connman_session *session,
+ connman_session_config_cb callback,
+ void *user_data);
void (*destroy)(struct connman_session *session);
};