2 #include "e_hal_private.h"
4 int _e_dbus_hal_log_dom = -1;
5 int _e_dbus_hal_init_count = 0;
10 if (++_e_dbus_hal_init_count != 1)
11 return _e_dbus_hal_init_count;
14 return --_e_dbus_hal_init_count;
16 _e_dbus_hal_log_dom = eina_log_domain_register
17 ("e_hal", E_DBUS_COLOR_DEFAULT);
18 if (_e_dbus_hal_log_dom < 0)
20 EINA_LOG_ERR("Could not register 'e_hal' log domain.");
25 ERR("Could not initialize E_DBus.");
26 goto unregister_log_domain;
29 return _e_dbus_hal_init_count;
31 unregister_log_domain:
32 eina_log_domain_unregister(_e_dbus_hal_log_dom);
33 _e_dbus_hal_log_dom = -1;
37 return _e_dbus_hal_init_count;
43 if (--_e_dbus_hal_init_count != 0)
44 return _e_dbus_hal_init_count;
48 eina_log_domain_unregister(_e_dbus_hal_log_dom);
49 _e_dbus_hal_log_dom = -1;
52 return _e_dbus_hal_init_count;