aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/eolian/database_event_api.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-08-13 12:06:48 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-08-21 09:26:04 +0100
commit057e01d67fdcbb715580a4e34af52f09de4e0e29 (patch)
treeb737b6d6d48d26136defe6d421601add3a42bec9 /src/lib/eolian/database_event_api.c
parenteolian: new API: eolian_class_event_scope_get (diff)
downloadefl-057e01d67fdcbb715580a4e34af52f09de4e0e29.tar.gz
eolian: API refactoring
Start getting rid of the terrible _information_get APIs, starting with events.
Diffstat (limited to 'src/lib/eolian/database_event_api.c')
-rw-r--r--src/lib/eolian/database_event_api.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/lib/eolian/database_event_api.c b/src/lib/eolian/database_event_api.c
index 877932e1f8..29169786cf 100644
--- a/src/lib/eolian/database_event_api.c
+++ b/src/lib/eolian/database_event_api.c
@@ -1,18 +1,29 @@
#include <Eina.h>
#include "eolian_database.h"
-EAPI Eina_Bool
-eolian_class_event_information_get(const Eolian_Event *event, const char **event_name, const Eolian_Type **event_type, const char **event_comment)
+EAPI Eina_Stringshare *
+eolian_event_name_get(const Eolian_Event *event)
{
- EINA_SAFETY_ON_NULL_RETURN_VAL(event, EINA_FALSE);
- if (event_name) *event_name = event->name;
- if (event_type) *event_type = event->type;
- if (event_comment) *event_comment = event->comment;
- return EINA_TRUE;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(event, NULL);
+ return event->name;
+}
+
+EAPI Eolian_Type *
+eolian_event_type_get(const Eolian_Event *event)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(event, NULL);
+ return event->type;
+}
+
+EAPI Eina_Stringshare *
+eolian_event_description_get(const Eolian_Event *event)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(event, NULL);
+ return event->comment;
}
EAPI Eolian_Object_Scope
-eolian_class_event_scope_get(const Eolian_Event *event)
+eolian_event_scope_get(const Eolian_Event *event)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(event, EOLIAN_SCOPE_PUBLIC);
return event->scope;