property: Remove HOSTNAME and DOMAINNAME
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 31 May 2011 15:43:48 +0000 (17:43 +0200)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 31 May 2011 15:50:44 +0000 (17:50 +0200)
include/element.h
include/property.h
src/element.c

index 05a51d5..2e944d3 100644 (file)
@@ -86,9 +86,6 @@ struct connman_element {
        };
 
        GHashTable *properties;
-
-       gchar *hostname;
-       gchar *domainname;
 };
 
 struct connman_element *connman_element_create(const char *name);
index 876908d..8fed172 100644 (file)
@@ -40,9 +40,6 @@ extern "C" {
 enum connman_property_id {
        CONNMAN_PROPERTY_ID_INVALID = 0,
 
-       CONNMAN_PROPERTY_ID_HOSTNAME,
-       CONNMAN_PROPERTY_ID_DOMAINNAME,
-
        CONNMAN_PROPERTY_ID_IPV6_METHOD,
        CONNMAN_PROPERTY_ID_IPV6_ADDRESS,
        CONNMAN_PROPERTY_ID_IPV6_PREFIXLEN,
index 050efae..0d796fa 100644 (file)
@@ -623,8 +623,6 @@ void connman_element_unref(struct connman_element *element)
                        element->destruct(element);
                free_children(element);
                free_properties(element);
-               g_free(element->hostname);
-               g_free(element->domainname);
                g_free(element->devname);
                g_free(element->path);
                g_free(element->name);
@@ -707,28 +705,7 @@ static int set_static_array_property(struct connman_element *element,
 int connman_element_get_value(struct connman_element *element,
                                enum connman_property_id id, void *value)
 {
-       if (element->type == CONNMAN_ELEMENT_TYPE_ROOT)
-               return -EINVAL;
-
-       switch (id) {
-       case CONNMAN_PROPERTY_ID_HOSTNAME:
-               if (element->hostname == NULL)
-                       return connman_element_get_value(element->parent,
-                                                               id, value);
-               *((char **) value) = element->hostname;
-               break;
-       case CONNMAN_PROPERTY_ID_DOMAINNAME:
-               if (element->domainname == NULL)
-                       return connman_element_get_value(element->parent,
-                                                               id, value);
-               *((char **) value) = element->domainname;
-               break;
-
-       default:
-               return -EINVAL;
-       }
-
-       return 0;
+       return -EINVAL;
 }
 
 static gboolean get_static_property(struct connman_element *element,