cedric pushed a commit to branch enlightenment-0.17.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=d37b0761a7a3182c89219129972f2f3e8cce1dd7

commit d37b0761a7a3182c89219129972f2f3e8cce1dd7
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Wed May 7 16:46:56 2014 -0400

    add efm op to notify of device backend changes
---
 src/bin/e_fm.c                |  3 +++
 src/bin/e_fm/e_fm_main.c      | 14 ++++++++++++++
 src/bin/e_fm/e_fm_main.h      |  2 ++
 src/bin/e_fm/e_fm_main_eeze.c |  1 +
 src/bin/e_fm_op.h             |  3 ++-
 5 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index 2e76fff..63d23a7 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -2929,6 +2929,9 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
      }
    switch (e->minor)
      {
+      case E_FM_OP_INIT:
+        e_config->device_detect_mode = strtoul((char*)e->data, NULL, 10);
+        break;
       case E_FM_OP_MONITOR_SYNC:  /*mon list sync*/
         ecore_ipc_client_send(cl->cl, E_IPC_DOMAIN_FM, E_FM_OP_MONITOR_SYNC,
                               0, 0, e->response,
diff --git a/src/bin/e_fm/e_fm_main.c b/src/bin/e_fm/e_fm_main.c
index 817410c..1af20ea 100644
--- a/src/bin/e_fm/e_fm_main.c
+++ b/src/bin/e_fm/e_fm_main.c
@@ -170,6 +170,18 @@ main(int argc, char **argv)
    return 0;
 }
 
+void
+_e_fm_main_catch(unsigned int val)
+{
+   char buf[64];
+
+   snprintf(buf, sizeof(buf), "%u", val);
+   ecore_ipc_server_send(_e_fm_ipc_server,
+                         6 /*E_IPC_DOMAIN_FM*/,
+                         E_FM_OP_INIT,
+                         0, 0, 0, buf, strlen(buf) + 1);
+}
+
 #ifdef HAVE_HAL_MOUNT
 void
 _e_fm_main_hal_catch(Eina_Bool usable)
@@ -177,6 +189,7 @@ _e_fm_main_hal_catch(Eina_Bool usable)
    if (usable)
      {
         mode = EFM_MODE_USING_HAL_MOUNT;
+        _e_fm_main_catch(mode);
         return;
      }
 # ifdef HAVE_EEZE_MOUNT
@@ -192,6 +205,7 @@ _e_fm_main_udisks_catch(Eina_Bool usable)
    if (usable)
      {
         mode = EFM_MODE_USING_UDISKS_MOUNT;
+        _e_fm_main_catch(mode);
         return;
      }
 # ifdef HAVE_EEZE_MOUNT
diff --git a/src/bin/e_fm/e_fm_main.h b/src/bin/e_fm/e_fm_main.h
index 5578f77..849adf9 100644
--- a/src/bin/e_fm/e_fm_main.h
+++ b/src/bin/e_fm/e_fm_main.h
@@ -16,6 +16,8 @@
 extern Ecore_Ipc_Server *_e_fm_ipc_server;
 extern int efm_log_dom;
 
+void _e_fm_main_catch(unsigned int val);
+
 #define E_FM_MOUNT_TIMEOUT 30.0
 #define E_FM_UNMOUNT_TIMEOUT 60.0
 #define E_FM_EJECT_TIMEOUT 15.0
diff --git a/src/bin/e_fm/e_fm_main_eeze.c b/src/bin/e_fm/e_fm_main_eeze.c
index 4114089..05a227d 100644
--- a/src/bin/e_fm/e_fm_main_eeze.c
+++ b/src/bin/e_fm/e_fm_main_eeze.c
@@ -668,6 +668,7 @@ _scanner_run(void)
 static Eina_Bool
 _scanner_con(void *data __UNUSED__, int type __UNUSED__, 
Ecore_Con_Event_Server_Del *ev __UNUSED__)
 {
+   _e_fm_main_catch(EFM_MODE_USING_EEZE_MOUNT);
    INF("Scanner connected");
    es_con = eet_connection_new(_scanner_read, _scanner_write, NULL);
    return ECORE_CALLBACK_RENEW;
diff --git a/src/bin/e_fm_op.h b/src/bin/e_fm_op.h
index ff50b51..c7f79be 100644
--- a/src/bin/e_fm_op.h
+++ b/src/bin/e_fm_op.h
@@ -53,7 +53,8 @@ typedef enum _E_Fm_Op_Type
    E_FM_OP_EJECT_ERROR,
    E_FM_OP_SECURE_REMOVE,
    E_FM_OP_DESTROY,
-   E_FM_OP_VOLUME_LIST_DONE
+   E_FM_OP_VOLUME_LIST_DONE,
+   E_FM_OP_INIT
 } E_Fm_Op_Type;
 
 #else

-- 


Reply via email to