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,
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);
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,