diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-09-26 10:58:58 +0200 |
---|---|---|
committer | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-09-27 10:28:28 +0200 |
commit | 5e6894d4a634d389e11e52c16ef01b6e272ca168 (patch) | |
tree | 2c3a21670b5fddc36fba1762b62cc5039f8f75dc | |
parent | a374db97cda09ca0cdd16ca0c19f7d1ecdc974a8 (diff) | |
download | connman-5e6894d4a634d389e11e52c16ef01b6e272ca168.tar.gz connman-5e6894d4a634d389e11e52c16ef01b6e272ca168.tar.bz2 connman-5e6894d4a634d389e11e52c16ef01b6e272ca168.zip |
session: Remove unused functions
Basic types are not used for the configuration anymore.
-rw-r--r-- | include/session.h | 8 | ||||
-rw-r--r-- | plugins/session_policy.c | 30 | ||||
-rw-r--r-- | src/session.c | 33 |
3 files changed, 0 insertions, 71 deletions
diff --git a/include/session.h b/include/session.h index 34ed25d2..960b8391 100644 --- a/include/session.h +++ b/include/session.h @@ -67,10 +67,6 @@ struct connman_session_config { struct connman_session_policy { const char *name; int priority; - int (*get_bool) (struct connman_session *session, - 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); @@ -81,10 +77,6 @@ void connman_session_policy_unregister(struct connman_session_policy *config); GSList *connman_session_allowed_bearers_any(void); -int connman_session_update_bool(struct connman_session *session, const char *key, - connman_bool_t val); -int connman_session_update_string(struct connman_session *session, const char *key, - const char *val); #ifdef __cplusplus } diff --git a/plugins/session_policy.c b/plugins/session_policy.c index 31ded238..dadfd5b3 100644 --- a/plugins/session_policy.c +++ b/plugins/session_policy.c @@ -35,34 +35,6 @@ static GHashTable *config_hash; -static int policy_get_bool(struct connman_session *session, - const char *key, connman_bool_t *val) -{ - DBG("sesion %p key %s", session, key); - - if (g_str_equal(key, "Priority") == TRUE) - *val = FALSE; - else if (g_str_equal(key, "EmergencyCall") == TRUE) - *val = FALSE; - else - return -EINVAL; - - return 0; -} - -static int policy_get_string(struct connman_session *session, - const char *key, char **val) -{ - DBG("session %p key %s", session, key); - - if (g_str_equal(key, "RoamingPolicy") == TRUE) - *val = "default"; - else - return -EINVAL; - - return 0; -} - static struct connman_session_config *policy_create( struct connman_session *session) { @@ -99,8 +71,6 @@ static void policy_destroy(struct connman_session *session) static struct connman_session_policy session_policy = { .name = "session policy configuration", .priority = CONNMAN_SESSION_POLICY_PRIORITY_LOW, - .get_bool = policy_get_bool, - .get_string = policy_get_string, .create = policy_create, .destroy = policy_destroy, }; diff --git a/src/session.c b/src/session.c index 529d8877..bbd066ad 100644 --- a/src/session.c +++ b/src/session.c @@ -300,39 +300,6 @@ static gint compare_priority(gconstpointer a, gconstpointer b) return policy2->priority - policy1->priority; } -int connman_session_update_bool(struct connman_session *session, const char *key, - connman_bool_t val) -{ - struct session_info *info; - - if (session == NULL) - return -EINVAL; - - info = session->info; - if (info == NULL) - return 0; - - DBG("%s %d", key, val); - - return -EINVAL; -} - -int connman_session_update_string(struct connman_session *session, const char *key, - const char *val) -{ - struct session_info *info; - - if (session == NULL) - return -EINVAL; - - info = session->info; - if (info == NULL) - return 0; - - DBG("%s %s", key, val); - - return -EINVAL; -} int connman_session_policy_register(struct connman_session_policy *policy) { |