aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/eolian/database_event_api.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-09-25 14:58:53 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-09-25 14:58:53 +0100
commita1552fe6a9f8fc07929a68dafc0413c5338bcd61 (patch)
treedc99ea5d04e06acb11a8f869e37b0826ab57fbf4 /src/lib/eolian/database_event_api.c
parentefreet: TODO++ (diff)
downloadefl-a1552fe6a9f8fc07929a68dafc0413c5338bcd61.tar.gz
eolian: new API: eolian_event_c_name_get
Diffstat (limited to 'src/lib/eolian/database_event_api.c')
-rw-r--r--src/lib/eolian/database_event_api.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/eolian/database_event_api.c b/src/lib/eolian/database_event_api.c
index 71a44ff5e4..9aa597ac36 100644
--- a/src/lib/eolian/database_event_api.c
+++ b/src/lib/eolian/database_event_api.c
@@ -32,3 +32,15 @@ eolian_event_scope_get(const Eolian_Event *event)
EINA_SAFETY_ON_NULL_RETURN_VAL(event, EOLIAN_SCOPE_PUBLIC);
return event->scope;
}
+
+EAPI Eina_Stringshare *
+eolian_event_c_name_get(const Eolian_Event *event)
+{
+ char buf[512];
+ char *tmp = buf;
+ snprintf(buf, sizeof(buf), "%s_EVENT_%s", event->klass->full_name,
+ event->name);
+ eina_str_toupper(&tmp);
+ while ((tmp = strchr(tmp, '.'))) *tmp = '_';
+ return eina_stringshare_add(buf);
+}