コード例 #1
0
ファイル: eeze_scanner.c プロジェクト: Stefan-Schmidt/efl
static void
event_send(const char *device, Eeze_Scanner_Event_Type type, Eina_Bool volume)
{
   Eeze_Scanner_Event ev;
   Eet_Connection *ec;
   const Eina_List *n;


   ev.device = device;
   ev.type = type;
   ev.volume = volume;
   EINA_LIST_FOREACH(clients, n, ec)
     {
        const char *ts;
        const char *vol = volume ? " (volume)" : "";
        switch (type)
          {
           case EEZE_SCANNER_EVENT_TYPE_ADD: ts = "ADD"; break;
           case EEZE_SCANNER_EVENT_TYPE_REMOVE: ts = "REMOVE"; break;
           case EEZE_SCANNER_EVENT_TYPE_CHANGE: ts = "CHANGE"; break;
           default: ts = "?";
          }
        INF("Serializing event %s '%s'%s for client %p...", ts, device, vol, ec);
        eet_connection_send(ec, es_edd, &ev, NULL);
     }
}
コード例 #2
0
ファイル: eeze_scanner.c プロジェクト: Limsik/e17
static void
event_send(const char *device, Eeze_Scanner_Event_Type type, Eina_Bool volume)
{
   Eeze_Scanner_Event ev;
   const Eina_List *l;
   Ecore_Con_Client *cl;

   ev.device = device;
   ev.type = type;
   ev.volume = volume;
   EINA_LIST_FOREACH(ecore_con_server_clients_get(svr), l, cl)
     {
        Eet_Connection *ec;

        ec = eina_hash_find(clients, cl);
        if (!ec) continue;
        INF("Serializing event...");
        eet_connection_send(ec, es_edd, &ev, NULL);
     }