diff options
Diffstat (limited to 'include/session.h')
-rw-r--r-- | include/session.h | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/include/session.h b/include/session.h index 61cc2644..3f666649 100644 --- a/include/session.h +++ b/include/session.h @@ -23,7 +23,6 @@ #define __CONNMAN_SESSION_H #include <connman/service.h> -#include <connman/types.h> #ifdef __cplusplus extern "C" { @@ -56,32 +55,15 @@ enum connman_session_id_type { CONNMAN_SESSION_ID_TYPE_LSM = 3, }; -struct cb_data { - void *cb; - void *user_data; - void *data; -}; - -static inline struct cb_data *cb_data_new(void *cb, void *user_data) -{ - struct cb_data *ret; - - ret = g_new0(struct cb_data, 1); - ret->cb = cb; - ret->user_data = user_data; - - return ret; -} - struct connman_session; struct connman_session_config { enum connman_session_id_type id_type; char *id; - connman_bool_t priority; + bool priority; enum connman_session_roaming_policy roaming_policy; enum connman_session_type type; - connman_bool_t ecall; + bool ecall; GSList *allowed_bearers; }; @@ -92,10 +74,15 @@ typedef int (* connman_session_config_func_t) (struct connman_session *session, struct connman_session_policy { const char *name; int priority; + bool (*autoconnect)(enum connman_service_connect_reason reason); int (*create)(struct connman_session *session, connman_session_config_func_t cb, void *user_data); void (*destroy)(struct connman_session *session); + void (*session_changed)(struct connman_session *session, bool active, + GSList *bearers); + bool (*allowed)(struct connman_session *session, + struct connman_service *service); }; int connman_session_policy_register(struct connman_session_policy *config); @@ -113,6 +100,9 @@ int connman_session_parse_bearers(const char *token, GSList **list); const char *connman_session_get_owner(struct connman_session *session); +int connman_session_connect(struct connman_service *service); +int connman_session_disconnect(struct connman_service *service); + #ifdef __cplusplus } #endif |