};
enum connman_session_type {
- CONNMAN_SESSION_TYPE_ANY = 0,
- CONNMAN_SESSION_TYPE_LOCAL = 1,
- CONNMAN_SESSION_TYPE_INTERNET = 2,
+ CONNMAN_SESSION_TYPE_UNKNOWN = 0,
+ CONNMAN_SESSION_TYPE_ANY = 1,
+ CONNMAN_SESSION_TYPE_LOCAL = 2,
+ CONNMAN_SESSION_TYPE_INTERNET = 3,
};
struct connman_session;
-struct connman_session_bearer {
- char *name;
- connman_bool_t match_all;
- enum connman_service_type service_type;
-};
-
struct connman_session_config {
connman_bool_t priority;
enum connman_session_roaming_policy roaming_policy;
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);
};
int connman_session_policy_register(struct connman_session_policy *config);
void connman_session_policy_unregister(struct connman_session_policy *config);
-GSList *connman_session_allowed_bearers_any(void);
-void connman_session_free_bearers(GSList *bearers);
+int connman_session_config_update(struct connman_session *session);
+void connman_session_destroy(struct connman_session *session);
+
+struct connman_session_config *connman_session_create_default_config(void);
+
+enum connman_session_roaming_policy connman_session_parse_roaming_policy(const char *policy);
+enum connman_session_type connman_session_parse_connection_type(const char *type);
+int connman_session_parse_bearers(const char *token, GSList **list);
+
+const char *connman_session_get_owner(struct connman_session *session);
#ifdef __cplusplus
}