elm_entry: monitor the cbhm daemon 15/121415/1
authorMinchul Lee <slotus.lee@samsung.com>
Tue, 28 Mar 2017 03:11:12 +0000 (12:11 +0900)
committerMinchul Lee <slotus.lee@samsung.com>
Tue, 28 Mar 2017 04:02:47 +0000 (13:02 +0900)
Change-Id: Icf01e24f07ab239ff78d73e4842b164f830d63c3
Signed-off-by: Minchul Lee <slotus.lee@samsung.com>
src/lib/elm_entry.c

index d236b1d..c80025a 100644 (file)
@@ -132,13 +132,20 @@ static Eina_Bool _action_activate(Evas_Object *obj, const char *params);
 
 //TIZEN ONLY (20160926): cbhm client for multi entry
 #ifdef HAVE_ELEMENTARY_WAYLAND
+#define CBHM_DBUS_OBJPATH "/org/tizen/cbhm/dbus"
+#ifndef CBHM_DBUS_INTERFACE
+#define CBHM_DBUS_INTERFACE "org.tizen.cbhm.dbus"
+#endif /* CBHM_DBUS_INTERFACE */
+
 static void
-_cbhm_on_name_owner_changed(void *data EINA_UNUSED,
-      const char *bus EINA_UNUSED, const char *old_id EINA_UNUSED,
-      const char *new_id EINA_UNUSED)
+_cbhm_on_name_owner_changed(void *data EINA_UNUSED, const char *bus,
+                            const char *old_id, const char *new_id)
 {
-   /* FIXME : If entry should know the time cbhm service is started or stoped,
-    * use this function. */
+   if ((!new_id || (new_id[0] == '\0'))
+       && strncmp(CBHM_DBUS_INTERFACE, bus, strlen(CBHM_DBUS_INTERFACE)))
+     {
+        ERR("cbhm daemon lost owner");
+     }
 }
 
 static void
@@ -154,11 +161,6 @@ _on_item_clicked(void *data, const Eldbus_Message *msg EINA_UNUSED)
      _paste_cb(obj, NULL, NULL);
 }
 
-#define CBHM_DBUS_OBJPATH "/org/tizen/cbhm/dbus"
-#ifndef CBHM_DBUS_INTERFACE
-#define CBHM_DBUS_INTERFACE "org.tizen.cbhm.dbus"
-#endif /* CBHM_DBUS_INTERFACE */
-
 static void
 _cbhm_eldbus_init(Evas_Object *obj)
 {