[WM_ROT] support for rotating prediction window without virtual keyboard
[platform/core/uifw/e17.git] / src / bin / e_datastore.c
1 #include "e.h"
2
3 /* local subsystem functions */
4
5 /* local subsystem globals */
6 static Eina_Hash *store = NULL;
7
8 /* externally accessible functions */
9 EAPI void
10 e_datastore_set(char *key, void *data)
11 {
12    if (!store) store = eina_hash_string_superfast_new(NULL);
13    eina_hash_del(store, key, NULL);
14    eina_hash_add(store, key, data);
15 }
16
17 EAPI void *
18 e_datastore_get(char *key)
19 {
20    return eina_hash_find(store, key);
21 }
22
23 EAPI void
24 e_datastore_del(char *key)
25 {
26    eina_hash_del(store, key, NULL);
27    if (eina_hash_population(store)) return;
28    eina_hash_free(store);
29    store = NULL;
30 }
31
32 /* local subsystem functions */