summaryrefslogtreecommitdiff
path: root/legacy/efreet/src/bin/efreetd.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/efreet/src/bin/efreetd.c')
-rw-r--r--legacy/efreet/src/bin/efreetd.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/legacy/efreet/src/bin/efreetd.c b/legacy/efreet/src/bin/efreetd.c
new file mode 100644
index 0000000000..a905664f3d
--- /dev/null
+++ b/legacy/efreet/src/bin/efreetd.c
@@ -0,0 +1,47 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <Ecore.h>
6
7#include "efreetd.h"
8#include "efreetd_dbus.h"
9#include "efreetd_cache.h"
10
11int efreetd_log_dom = -1;
12
13int
14main(void)
15{
16 if (!eina_init()) return 1;
17 efreetd_log_dom = eina_log_domain_register("efreetd", EFREETD_DEFAULT_LOG_COLOR);
18 if (efreetd_log_dom < 0)
19 {
20 EINA_LOG_ERR("Efreet: Could not create a log domain for efreetd.");
21 goto ecore_error;
22 }
23 if (!ecore_init()) goto ecore_error;
24
25 if (!dbus_init()) goto dbus_error;
26 if (!cache_init()) goto cache_error;
27
28 ecore_main_loop_begin();
29
30 cache_shutdown();
31 dbus_shutdown();
32 ecore_shutdown();
33 eina_log_domain_unregister(efreetd_log_dom);
34 efreetd_log_dom = -1;
35 eina_shutdown();
36 return 0;
37
38cache_error:
39 dbus_shutdown();
40dbus_error:
41 ecore_shutdown();
42ecore_error:
43 eina_log_domain_unregister(efreetd_log_dom);
44 efreetd_log_dom = -1;
45 eina_shutdown();
46 return 1;
47}