From: Marcel Holtmann Date: Mon, 5 Jan 2009 21:30:52 +0000 (+0100) Subject: All policy is now part of devices and networks X-Git-Tag: 2.0_alpha~4120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c90bc95e4a15388be52e0240799238fa9d9c3bf5;p=framework%2Fconnectivity%2Fconnman.git All policy is now part of devices and networks --- diff --git a/include/element.h b/include/element.h index 6a3f98f..5d12653 100644 --- a/include/element.h +++ b/include/element.h @@ -38,13 +38,6 @@ extern "C" { * @short_description: Functions for handling elements */ -enum connman_element_policy { - CONNMAN_ELEMENT_POLICY_UNKNOWN = 0, - CONNMAN_ELEMENT_POLICY_IGNORE = 1, - CONNMAN_ELEMENT_POLICY_AUTO = 2, - CONNMAN_ELEMENT_POLICY_ASK = 3, -}; - enum connman_element_type { CONNMAN_ELEMENT_TYPE_UNKNOWN = 0, CONNMAN_ELEMENT_TYPE_ROOT = 1, @@ -70,7 +63,6 @@ struct connman_element { gchar *name; gchar *path; enum connman_element_type type; - enum connman_element_policy policy; gboolean enabled; guint16 priority; guint8 strength; diff --git a/src/connman.h b/src/connman.h index 0afef06..df2b4c4 100644 --- a/src/connman.h +++ b/src/connman.h @@ -116,9 +116,6 @@ int __connman_element_count(struct connman_element *element, const char *__connman_element_type2string(enum connman_element_type type); -const char *__connman_element_policy2string(enum connman_element_policy policy); -enum connman_element_policy __connman_element_string2policy(const char *policy); - static inline void __connman_element_lock(struct connman_element *element) { } diff --git a/src/element.c b/src/element.c index f28e57d..9dbcd68 100644 --- a/src/element.c +++ b/src/element.c @@ -127,34 +127,6 @@ static const char *type2string(enum connman_element_type type) return NULL; } -const char *__connman_element_policy2string(enum connman_element_policy policy) -{ - switch (policy) { - case CONNMAN_ELEMENT_POLICY_UNKNOWN: - return "unknown"; - case CONNMAN_ELEMENT_POLICY_IGNORE: - return "ignore"; - case CONNMAN_ELEMENT_POLICY_AUTO: - return "auto"; - case CONNMAN_ELEMENT_POLICY_ASK: - return "ask"; - } - - return NULL; -} - -enum connman_element_policy __connman_element_string2policy(const char *policy) -{ - if (strcasecmp(policy, "ignore") == 0) - return CONNMAN_ELEMENT_POLICY_IGNORE; - else if (strcasecmp(policy, "auto") == 0) - return CONNMAN_ELEMENT_POLICY_AUTO; - else if (strcasecmp(policy, "ask") == 0) - return CONNMAN_ELEMENT_POLICY_ASK; - else - return CONNMAN_ELEMENT_POLICY_UNKNOWN; -} - const char *__connman_ipv4_method2string(enum connman_ipv4_method method) { switch (method) { @@ -603,7 +575,6 @@ struct connman_element *connman_element_create(const char *name) element->name = g_strdup(name); element->type = CONNMAN_ELEMENT_TYPE_UNKNOWN; - element->policy = CONNMAN_ELEMENT_POLICY_AUTO; element->index = -1; element->enabled = FALSE;