summaryrefslogtreecommitdiff
path: root/src/lib/emotion/emotion_modules.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-10 22:17:32 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-10 22:17:32 +0000
commit6125cd9e8765ea7d3863eb8ef9ec0f6ec41870d5 (patch)
treea98c50a0181d20d676a9161ddfd0efc7b9656dda /src/lib/emotion/emotion_modules.c
parent8a4248732aa6896122db2bd18c6c0698c7802241 (diff)
efl/emotion: move register/unregister.
SVN revision: 82593
Diffstat (limited to 'src/lib/emotion/emotion_modules.c')
-rw-r--r--src/lib/emotion/emotion_modules.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/emotion/emotion_modules.c b/src/lib/emotion/emotion_modules.c
index bf5b787d82..a019918fe0 100644
--- a/src/lib/emotion/emotion_modules.c
+++ b/src/lib/emotion/emotion_modules.c
@@ -124,3 +124,25 @@ emotion_modules_shutdown(void)
124 eina_hash_free(_emotion_backends); 124 eina_hash_free(_emotion_backends);
125 _emotion_backends = NULL; 125 _emotion_backends = NULL;
126} 126}
127
128EAPI Eina_Bool
129_emotion_module_register(const char *name, Emotion_Module_Open mod_open, Emotion_Module_Close mod_close)
130{
131 Eina_Emotion_Plugins *plugin;
132
133 plugin = malloc(sizeof (Eina_Emotion_Plugins));
134 EINA_SAFETY_ON_NULL_RETURN_VAL(plugin, EINA_FALSE);
135
136 plugin->open = mod_open;
137 plugin->close = mod_close;
138
139 INF("register module=%s, open=%p, close=%p", name, mod_open, mod_close);
140 return eina_hash_add(_emotion_backends, name, plugin);
141}
142
143EAPI Eina_Bool
144_emotion_module_unregister(const char *name)
145{
146 INF("unregister module=%s", name);
147 return eina_hash_del_by_key(_emotion_backends, name);
148}