session: Add callbacks for config creation and distruction
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Wed, 19 Sep 2012 14:04:51 +0000 (16:04 +0200)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Thu, 27 Sep 2012 08:28:28 +0000 (10:28 +0200)
Whenever a new session is created, the core will ask the plugin
the create the config. This config can then be used by the core
to enforce the user settings.

The owner ship of this config stays in the plugin. Therefore, the plugin
will destroy is later.

include/session.h

index 2f5c80b0edff30f21ea9c901c461e847551f2759..34ed25d2da28cd347d3005e00e0e3da40608153e 100644 (file)
@@ -71,6 +71,9 @@ struct connman_session_policy {
                                const char *key, connman_bool_t *val);
        int (*get_string) (struct connman_session *session,
                                const char *key, char **val);
+       struct connman_session_config *(*create)(
+                                       struct connman_session *session);
+       void (*destroy)(struct connman_session *session);
 };
 
 int connman_session_policy_register(struct connman_session_policy *config);