summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Lima (Etrunko) <eduardo.lima@intel.com>2013-09-25 17:26:01 -0300
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>2013-09-26 17:33:24 -0300
commit54d18acbfc6465347df1c84b87671c2da6d2ae58 (patch)
treeaaf01ea7bb6264897180ce2f0b603037e610ddbe
parentd4ddcbb1069d9fb06251fb84978188d94090520d (diff)
downloadweekeyboard-54d18acbfc6465347df1c84b87671c2da6d2ae58.tar.gz
weekeyboard-54d18acbfc6465347df1c84b87671c2da6d2ae58.tar.bz2
weekeyboard-54d18acbfc6465347df1c84b87671c2da6d2ae58.zip
Fix signatures of wkb_ibus_config_eet public functions
This is to reflect the change on the previous commit. Change-Id: I46199f4f67440660ccedfd7ab507da6b8345d3d4 Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
-rw-r--r--src/wkb-ibus-config-eet.c87
-rw-r--r--src/wkb-ibus-config-eet.h4
2 files changed, 46 insertions, 45 deletions
diff --git a/src/wkb-ibus-config-eet.c b/src/wkb-ibus-config-eet.c
index 37c090b..f72712c 100644
--- a/src/wkb-ibus-config-eet.c
+++ b/src/wkb-ibus-config-eet.c
@@ -85,6 +85,7 @@ _config_section_find(struct _config_section *base, const char *section)
if (!section)
return NULL;
+ printf("Requested section '%s'\n", section);
if (!strncasecmp(section, base->id, strlen(base->id)))
return base;
@@ -109,6 +110,7 @@ _config_section_find_key(struct _config_section *base, const char *section, cons
goto end;
}
+ printf("Requested key '%s'\n", name);
EINA_LIST_FOREACH(base->keys, node, key)
{
key_id = wkb_config_key_id(key);
@@ -123,42 +125,6 @@ end:
return ret;
}
-static Eina_Bool
-_config_section_set_value(struct _config_section *base, const char *section, const char *name, Eldbus_Message_Iter *value)
-{
- Eina_Bool ret = EINA_FALSE;
- struct wkb_config_key *key;
-
- if (!(key = _config_section_find_key(base, section, name)))
- {
- printf("Config key with id '%s' not found\n", name);
- goto end;
- }
-
-end:
- return ret;
-}
-
-static void *
-_config_section_get_value(struct _config_section *base, const char *section, const char *name)
-{
- struct wkb_config_key *key;
-
- if (!(key = _config_section_find_key(base, section, name)))
- {
- printf("Config key with id '%s' not found\n", name);
- goto end;
- }
-
-end:
- return NULL;
-}
-
-static void *
-_config_section_get_values(struct _config_section *base, const char *section)
-{
-}
-
#define _config_section_init(_section, _id) \
do { \
_section->set_defaults = _config_ ## _id ## _set_defaults; \
@@ -808,19 +774,54 @@ struct wkb_ibus_config_eet
Eina_Bool
wkb_ibus_config_eet_set_value(struct wkb_ibus_config_eet *config_eet, const char *section, const char *name, Eldbus_Message_Iter *value)
{
- return _config_section_set_value(config_eet->ibus_config, section, name, value);
+ Eina_Bool ret = EINA_FALSE;
+ struct wkb_config_key *key;
+
+ if (!(key = _config_section_find_key(config_eet->ibus_config, section, name)))
+ {
+ printf("Config key with id '%s' not found\n", name);
+ goto end;
+ }
+
+ ret = wkb_config_key_set(key, value);
+
+end:
+ return ret;
}
-void *
-wkb_ibus_config_eet_get_value(struct wkb_ibus_config_eet *config_eet, const char *section, const char *name)
+Eina_Bool
+wkb_ibus_config_eet_get_value(struct wkb_ibus_config_eet *config_eet, const char *section, const char *name, Eldbus_Message_Iter *reply)
{
- return _config_section_get_value(config_eet->ibus_config, section, name);
+ Eina_Bool ret = EINA_FALSE;
+ struct wkb_config_key *key;
+
+ if (!(key = _config_section_find_key(config_eet->ibus_config, section, name)))
+ {
+ printf("Config key with id '%s' not found\n", name);
+ goto end;
+ }
+
+ ret = wkb_config_key_get(key, reply);
+
+end:
+ return ret;
}
-void *
-wkb_ibus_config_eet_get_values(struct wkb_ibus_config_eet *config_eet, const char *section)
+Eina_Bool
+wkb_ibus_config_eet_get_values(struct wkb_ibus_config_eet *config_eet, const char *section, Eldbus_Message_Iter *reply)
{
- return _config_section_get_values(config_eet->ibus_config, section);
+ Eina_Bool ret = EINA_FALSE;
+ struct _config_section *sec;
+ struct wkb_config_key *key;
+
+ if (!(sec = _config_section_find(config_eet->ibus_config, section)))
+ {
+ printf("Config section with id '%s' not found\n", section);
+ goto end;
+ }
+
+end:
+ return ret;
}
void
diff --git a/src/wkb-ibus-config-eet.h b/src/wkb-ibus-config-eet.h
index a7e7970..ce2bde0 100644
--- a/src/wkb-ibus-config-eet.h
+++ b/src/wkb-ibus-config-eet.h
@@ -23,8 +23,8 @@
struct wkb_ibus_config_eet;
Eina_Bool wkb_ibus_config_eet_set_value(struct wkb_ibus_config_eet *config_eet, const char *section, const char *name, Eldbus_Message_Iter *value);
-void *wkb_ibus_config_eet_get_value(struct wkb_ibus_config_eet *config_eet, const char *section, const char *name);
-void *wkb_ibus_config_eet_get_values(struct wkb_ibus_config_eet *config_eet, const char *section);
+Eina_Bool wkb_ibus_config_eet_get_value(struct wkb_ibus_config_eet *config_eet, const char *section, const char *name, Eldbus_Message_Iter *reply);
+Eina_Bool wkb_ibus_config_eet_get_values(struct wkb_ibus_config_eet *config_eet, const char *section, Eldbus_Message_Iter *reply);
void wkb_ibus_config_eet_set_defaults(struct wkb_ibus_config_eet *config_eet);