summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Lima (Etrunko) <eduardo.lima@intel.com>2013-09-16 14:43:51 -0300
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>2013-09-19 19:45:26 -0300
commit58cccc9559893aa701d1d28743f00cf41d8e81c0 (patch)
tree95d697227876ac2586a752b7e1cb36cf4d67b6d5
parent9892ad0f9423bacce14839992e344ebe58f41982 (diff)
downloadweekeyboard-58cccc9559893aa701d1d28743f00cf41d8e81c0.tar.gz
weekeyboard-58cccc9559893aa701d1d28743f00cf41d8e81c0.tar.bz2
weekeyboard-58cccc9559893aa701d1d28743f00cf41d8e81c0.zip
Add accessor for key id
Also fix implementations of wkb_config_key_set and wkb_config_key_get. Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
-rw-r--r--src/wkb-ibus-config-key.c12
-rw-r--r--src/wkb-ibus-config-key.h1
2 files changed, 10 insertions, 3 deletions
diff --git a/src/wkb-ibus-config-key.c b/src/wkb-ibus-config-key.c
index 13b6f1f..6853974 100644
--- a/src/wkb-ibus-config-key.c
+++ b/src/wkb-ibus-config-key.c
@@ -190,8 +190,14 @@ wkb_config_key_free(struct wkb_config_key *key)
free(key);
}
-static Eina_Bool
-wkb_config_key_set_value(struct wkb_config_key * key, Eldbus_Message_Iter *iter)
+const char *
+wkb_config_key_id(struct wkb_config_key *key)
+{
+ return key->id;
+}
+
+Eina_Bool
+wkb_config_key_set(struct wkb_config_key * key, Eldbus_Message_Iter *iter)
{
if (!key->field || !key->set)
return EINA_FALSE;
@@ -200,7 +206,7 @@ wkb_config_key_set_value(struct wkb_config_key * key, Eldbus_Message_Iter *iter)
}
void *
-wkb_config_key_get_value(struct wkb_config_key *key)
+wkb_config_key_get(struct wkb_config_key *key)
{
if (!key->field || !key->get)
return NULL;
diff --git a/src/wkb-ibus-config-key.h b/src/wkb-ibus-config-key.h
index 709421e..708dbe1 100644
--- a/src/wkb-ibus-config-key.h
+++ b/src/wkb-ibus-config-key.h
@@ -28,6 +28,7 @@ struct wkb_config_key *wkb_config_key_string(const char *id, void *field);
struct wkb_config_key *wkb_config_key_string_list(const char *id, void *field);
void wkb_config_key_free(struct wkb_config_key *key);
+const char *wkb_config_key_id(struct wkb_config_key *key);
Eina_Bool wkb_config_key_set(struct wkb_config_key * key, Eldbus_Message_Iter *iter);
void * wkb_config_key_get(struct wkb_config_key *key);