summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2010-06-24 16:15:56 +0000
committerCedric BAIL <cedric.bail@free.fr>2010-06-24 16:15:56 +0000
commitfbe90643103da8df6d452eed3c3b49cf1e11b7c1 (patch)
tree7a6444cb418881166f783a4552694bd2bd5911aa /legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
parent75d6f4ce18376d5e493279e2feecbd8046491ec0 (diff)
* ecore: Ecore callback really should return Eina_Bool.
SVN revision: 49829
Diffstat (limited to 'legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c')
-rw-r--r--legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
index 575378987b..ac700e5e54 100644
--- a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
+++ b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
@@ -225,12 +225,12 @@ _ecore_ipc_ddlt_int(int in, int prev, int mode)
225 return 0; 225 return 0;
226} 226}
227 227
228static int _ecore_ipc_event_client_add(void *data, int ev_type, void *ev); 228static Eina_Bool _ecore_ipc_event_client_add(void *data, int ev_type, void *ev);
229static int _ecore_ipc_event_client_del(void *data, int ev_type, void *ev); 229static Eina_Bool _ecore_ipc_event_client_del(void *data, int ev_type, void *ev);
230static int _ecore_ipc_event_server_add(void *data, int ev_type, void *ev); 230static Eina_Bool _ecore_ipc_event_server_add(void *data, int ev_type, void *ev);
231static int _ecore_ipc_event_server_del(void *data, int ev_type, void *ev); 231static Eina_Bool _ecore_ipc_event_server_del(void *data, int ev_type, void *ev);
232static int _ecore_ipc_event_client_data(void *data, int ev_type, void *ev); 232static Eina_Bool _ecore_ipc_event_client_data(void *data, int ev_type, void *ev);
233static int _ecore_ipc_event_server_data(void *data, int ev_type, void *ev); 233static Eina_Bool _ecore_ipc_event_server_data(void *data, int ev_type, void *ev);
234static void _ecore_ipc_event_client_add_free(void *data, void *ev); 234static void _ecore_ipc_event_client_add_free(void *data, void *ev);
235static void _ecore_ipc_event_client_del_free(void *data, void *ev); 235static void _ecore_ipc_event_client_del_free(void *data, void *ev);
236static void _ecore_ipc_event_client_data_free(void *data, void *ev); 236static void _ecore_ipc_event_client_data_free(void *data, void *ev);
@@ -1010,20 +1010,20 @@ ecore_ipc_ssl_available_get(void)
1010} 1010}
1011 1011
1012 1012
1013static int 1013static Eina_Bool
1014_ecore_ipc_event_client_add(void *data __UNUSED__, int ev_type __UNUSED__, void *ev) 1014_ecore_ipc_event_client_add(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1015{ 1015{
1016 Ecore_Con_Event_Client_Add *e; 1016 Ecore_Con_Event_Client_Add *e;
1017 1017
1018 e = ev; 1018 e = ev;
1019 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return 1; 1019 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return ECORE_CALLBACK_RENEW;
1020 /* handling code here */ 1020 /* handling code here */
1021 { 1021 {
1022 Ecore_Ipc_Client *cl; 1022 Ecore_Ipc_Client *cl;
1023 Ecore_Ipc_Server *svr; 1023 Ecore_Ipc_Server *svr;
1024 1024
1025 cl = calloc(1, sizeof(Ecore_Ipc_Client)); 1025 cl = calloc(1, sizeof(Ecore_Ipc_Client));
1026 if (!cl) return 0; 1026 if (!cl) return ECORE_CALLBACK_CANCEL;
1027 svr = ecore_con_server_data_get(ecore_con_client_server_get(e->client)); 1027 svr = ecore_con_server_data_get(ecore_con_client_server_get(e->client));
1028 ECORE_MAGIC_SET(cl, ECORE_MAGIC_IPC_CLIENT); 1028 ECORE_MAGIC_SET(cl, ECORE_MAGIC_IPC_CLIENT);
1029 cl->client = e->client; 1029 cl->client = e->client;
@@ -1045,16 +1045,16 @@ _ecore_ipc_event_client_add(void *data __UNUSED__, int ev_type __UNUSED__, void
1045 } 1045 }
1046 } 1046 }
1047 } 1047 }
1048 return 0; 1048 return ECORE_CALLBACK_CANCEL;
1049} 1049}
1050 1050
1051static int 1051static Eina_Bool
1052_ecore_ipc_event_client_del(void *data __UNUSED__, int ev_type __UNUSED__, void *ev) 1052_ecore_ipc_event_client_del(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1053{ 1053{
1054 Ecore_Con_Event_Client_Del *e; 1054 Ecore_Con_Event_Client_Del *e;
1055 1055
1056 e = ev; 1056 e = ev;
1057 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return 1; 1057 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return ECORE_CALLBACK_RENEW;
1058 /* handling code here */ 1058 /* handling code here */
1059 { 1059 {
1060 Ecore_Ipc_Client *cl; 1060 Ecore_Ipc_Client *cl;
@@ -1079,16 +1079,16 @@ _ecore_ipc_event_client_del(void *data __UNUSED__, int ev_type __UNUSED__, void
1079 } 1079 }
1080 } 1080 }
1081 } 1081 }
1082 return 0; 1082 return ECORE_CALLBACK_CANCEL;
1083} 1083}
1084 1084
1085static int 1085static Eina_Bool
1086_ecore_ipc_event_server_add(void *data __UNUSED__, int ev_type __UNUSED__, void *ev) 1086_ecore_ipc_event_server_add(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1087{ 1087{
1088 Ecore_Con_Event_Server_Add *e; 1088 Ecore_Con_Event_Server_Add *e;
1089 1089
1090 e = ev; 1090 e = ev;
1091 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return 1; 1091 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return ECORE_CALLBACK_RENEW;
1092 /* handling code here */ 1092 /* handling code here */
1093 { 1093 {
1094 Ecore_Ipc_Server *svr; 1094 Ecore_Ipc_Server *svr;
@@ -1108,16 +1108,16 @@ _ecore_ipc_event_server_add(void *data __UNUSED__, int ev_type __UNUSED__, void
1108 } 1108 }
1109 } 1109 }
1110 } 1110 }
1111 return 0; 1111 return ECORE_CALLBACK_CANCEL;
1112} 1112}
1113 1113
1114static int 1114static Eina_Bool
1115_ecore_ipc_event_server_del(void *data __UNUSED__, int ev_type __UNUSED__, void *ev) 1115_ecore_ipc_event_server_del(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1116{ 1116{
1117 Ecore_Con_Event_Server_Del *e; 1117 Ecore_Con_Event_Server_Del *e;
1118 1118
1119 e = ev; 1119 e = ev;
1120 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return 1; 1120 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return ECORE_CALLBACK_RENEW;
1121 /* handling code here */ 1121 /* handling code here */
1122 { 1122 {
1123 Ecore_Ipc_Server *svr; 1123 Ecore_Ipc_Server *svr;
@@ -1137,7 +1137,7 @@ _ecore_ipc_event_server_del(void *data __UNUSED__, int ev_type __UNUSED__, void
1137 } 1137 }
1138 } 1138 }
1139 } 1139 }
1140 return 0; 1140 return ECORE_CALLBACK_CANCEL;
1141} 1141}
1142 1142
1143#define CLSZ(_n) \ 1143#define CLSZ(_n) \
@@ -1181,13 +1181,13 @@ _ecore_ipc_event_server_del(void *data __UNUSED__, int ev_type __UNUSED__, void
1181 } \ 1181 } \
1182 msg._member = _ecore_ipc_ddlt_int(d, cl->prev.i._member, md); 1182 msg._member = _ecore_ipc_ddlt_int(d, cl->prev.i._member, md);
1183 1183
1184static int 1184static Eina_Bool
1185_ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, void *ev) 1185_ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1186{ 1186{
1187 Ecore_Con_Event_Client_Data *e; 1187 Ecore_Con_Event_Client_Data *e;
1188 1188
1189 e = ev; 1189 e = ev;
1190 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return 1; 1190 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return ECORE_CALLBACK_RENEW;
1191 /* handling code here */ 1191 /* handling code here */
1192 { 1192 {
1193 Ecore_Ipc_Client *cl; 1193 Ecore_Ipc_Client *cl;
@@ -1211,7 +1211,7 @@ _ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1211 free(cl->buf); 1211 free(cl->buf);
1212 cl->buf = 0; 1212 cl->buf = 0;
1213 cl->buf_size = 0; 1213 cl->buf_size = 0;
1214 return 0; 1214 return ECORE_CALLBACK_CANCEL;
1215 } 1215 }
1216 cl->buf = buf; 1216 cl->buf = buf;
1217 memcpy(cl->buf + cl->buf_size, e->data, e->size); 1217 memcpy(cl->buf + cl->buf_size, e->data, e->size);
@@ -1241,7 +1241,7 @@ _ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1241 if ((cl->buf_size - offset) < s) 1241 if ((cl->buf_size - offset) < s)
1242 { 1242 {
1243 if (offset > 0) goto scroll; 1243 if (offset > 0) goto scroll;
1244 return 0; 1244 return ECORE_CALLBACK_CANCEL;
1245 } 1245 }
1246 1246
1247 s = 4; 1247 s = 4;
@@ -1276,7 +1276,7 @@ _ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1276 if (msg.size > 0) 1276 if (msg.size > 0)
1277 { 1277 {
1278 buf = malloc(msg.size); 1278 buf = malloc(msg.size);
1279 if (!buf) return 0; 1279 if (!buf) return ECORE_CALLBACK_CANCEL;
1280 memcpy(buf, cl->buf + offset + s, msg.size); 1280 memcpy(buf, cl->buf + offset + s, msg.size);
1281 } 1281 }
1282 if (!cl->delete_me) 1282 if (!cl->delete_me)
@@ -1306,7 +1306,7 @@ _ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1306 free(cl->buf); 1306 free(cl->buf);
1307 cl->buf = NULL; 1307 cl->buf = NULL;
1308 cl->buf_size = 0; 1308 cl->buf_size = 0;
1309 return 0; 1309 return ECORE_CALLBACK_CANCEL;
1310 } 1310 }
1311 goto redo; 1311 goto redo;
1312 } 1312 }
@@ -1321,7 +1321,7 @@ _ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1321 free(cl->buf); 1321 free(cl->buf);
1322 cl->buf = NULL; 1322 cl->buf = NULL;
1323 cl->buf_size = 0; 1323 cl->buf_size = 0;
1324 return 0; 1324 return ECORE_CALLBACK_CANCEL;
1325 } 1325 }
1326 memcpy(buf, cl->buf + offset, cl->buf_size - offset); 1326 memcpy(buf, cl->buf + offset, cl->buf_size - offset);
1327 free(cl->buf); 1327 free(cl->buf);
@@ -1329,7 +1329,7 @@ _ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1329 cl->buf_size -= offset; 1329 cl->buf_size -= offset;
1330 } 1330 }
1331 } 1331 }
1332 return 0; 1332 return ECORE_CALLBACK_CANCEL;
1333} 1333}
1334 1334
1335#define SVSZ(_n) \ 1335#define SVSZ(_n) \
@@ -1373,13 +1373,13 @@ _ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1373 } \ 1373 } \
1374 msg._member = _ecore_ipc_ddlt_int(d, svr->prev.i._member, md); 1374 msg._member = _ecore_ipc_ddlt_int(d, svr->prev.i._member, md);
1375 1375
1376static int 1376static Eina_Bool
1377_ecore_ipc_event_server_data(void *data __UNUSED__, int ev_type __UNUSED__, void *ev) 1377_ecore_ipc_event_server_data(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1378{ 1378{
1379 Ecore_Con_Event_Server_Data *e; 1379 Ecore_Con_Event_Server_Data *e;
1380 1380
1381 e = ev; 1381 e = ev;
1382 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return 1; 1382 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return ECORE_CALLBACK_RENEW;
1383 /* handling code here */ 1383 /* handling code here */
1384 { 1384 {
1385 Ecore_Ipc_Server *svr; 1385 Ecore_Ipc_Server *svr;
@@ -1403,7 +1403,7 @@ _ecore_ipc_event_server_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1403 free(svr->buf); 1403 free(svr->buf);
1404 svr->buf = 0; 1404 svr->buf = 0;
1405 svr->buf_size = 0; 1405 svr->buf_size = 0;
1406 return 0; 1406 return ECORE_CALLBACK_CANCEL;
1407 } 1407 }
1408 svr->buf = buf; 1408 svr->buf = buf;
1409 memcpy(svr->buf + svr->buf_size, e->data, e->size); 1409 memcpy(svr->buf + svr->buf_size, e->data, e->size);
@@ -1433,7 +1433,7 @@ _ecore_ipc_event_server_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1433 if ((svr->buf_size - offset) < s) 1433 if ((svr->buf_size - offset) < s)
1434 { 1434 {
1435 if (offset > 0) goto scroll; 1435 if (offset > 0) goto scroll;
1436 return 0; 1436 return ECORE_CALLBACK_CANCEL;
1437 } 1437 }
1438 1438
1439 s = 4; 1439 s = 4;
@@ -1457,7 +1457,7 @@ _ecore_ipc_event_server_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1457 if (msg.size > 0) 1457 if (msg.size > 0)
1458 { 1458 {
1459 buf = malloc(msg.size); 1459 buf = malloc(msg.size);
1460 if (!buf) return 0; 1460 if (!buf) return ECORE_CALLBACK_CANCEL;
1461 memcpy(buf, svr->buf + offset + s, msg.size); 1461 memcpy(buf, svr->buf + offset + s, msg.size);
1462 } 1462 }
1463 if (!svr->delete_me) 1463 if (!svr->delete_me)
@@ -1487,7 +1487,7 @@ _ecore_ipc_event_server_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1487 free(svr->buf); 1487 free(svr->buf);
1488 svr->buf = NULL; 1488 svr->buf = NULL;
1489 svr->buf_size = 0; 1489 svr->buf_size = 0;
1490 return 0; 1490 return ECORE_CALLBACK_CANCEL;
1491 } 1491 }
1492 goto redo; 1492 goto redo;
1493 } 1493 }
@@ -1502,7 +1502,7 @@ _ecore_ipc_event_server_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1502 free(svr->buf); 1502 free(svr->buf);
1503 svr->buf = NULL; 1503 svr->buf = NULL;
1504 svr->buf_size = 0; 1504 svr->buf_size = 0;
1505 return 0; 1505 return ECORE_CALLBACK_CANCEL;
1506 } 1506 }
1507 memcpy(buf, svr->buf + offset, svr->buf_size - offset); 1507 memcpy(buf, svr->buf + offset, svr->buf_size - offset);
1508 free(svr->buf); 1508 free(svr->buf);
@@ -1510,7 +1510,7 @@ _ecore_ipc_event_server_data(void *data __UNUSED__, int ev_type __UNUSED__, void
1510 svr->buf_size -= offset; 1510 svr->buf_size -= offset;
1511 } 1511 }
1512 } 1512 }
1513 return 0; 1513 return ECORE_CALLBACK_CANCEL;
1514} 1514}
1515 1515
1516static void 1516static void