X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=include%2Felement.h;h=d8fa88c13f420084043663ae56f3d5557a020a13;hb=aee3ce108157d7776420cecca4690c597d2cee8f;hp=d91886b674795b8e916d07c5e04f2a34eb3c3b33;hpb=f93ca201df00929db3f27625b0626a9f2e7ac3ca;p=connman diff --git a/include/element.h b/include/element.h index d91886b..d8fa88c 100644 --- a/include/element.h +++ b/include/element.h @@ -30,6 +30,7 @@ extern "C" { #include #include +#include #include /** @@ -64,6 +65,7 @@ struct connman_element { gchar *path; enum connman_element_type type; gboolean enabled; + gboolean configuring; gchar *devname; struct connman_element *parent; @@ -79,7 +81,7 @@ struct connman_element { struct connman_network *network; }; - GSList *properties; + GHashTable *properties; struct { enum connman_ipv4_method method; @@ -96,25 +98,21 @@ extern struct connman_element *connman_element_create(const char *name); extern struct connman_element *connman_element_ref(struct connman_element *element); extern void connman_element_unref(struct connman_element *element); -extern int connman_element_add_static_property(struct connman_element *element, - const char *name, int type, const void *value); -extern int connman_element_set_static_property(struct connman_element *element, - const char *name, int type, const void *value); -extern int connman_element_add_static_array_property(struct connman_element *element, - const char *name, int type, const void *value, int len); -extern int connman_element_define_properties(struct connman_element *element, ...); -extern int connman_element_create_property(struct connman_element *element, - const char *name, int type); -extern int connman_element_set_property(struct connman_element *element, - enum connman_property_id id, const void *value); extern int connman_element_get_value(struct connman_element *element, enum connman_property_id id, void *value); -extern gboolean connman_element_get_static_property(struct connman_element *element, - const char *name, void *value); -extern gboolean connman_element_get_static_array_property(struct connman_element *element, - const char *name, void *value, int *len); -extern gboolean connman_element_match_static_property(struct connman_element *element, - const char *name, const void *value); + +extern int connman_element_set_string(struct connman_element *element, + const char *key, const char *value); +extern const char *connman_element_get_string(struct connman_element *element, + const char *key); +extern int connman_element_set_uint8(struct connman_element *element, + const char *key, connman_uint8_t value); +extern connman_uint8_t connman_element_get_uint8(struct connman_element *element, + const char *key); +extern int connman_element_set_blob(struct connman_element *element, + const char *key, const void *data, unsigned int size); +extern const void *connman_element_get_blob(struct connman_element *element, + const char *key, unsigned int *size); extern int connman_element_register(struct connman_element *element, struct connman_element *parent);