aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_ipc
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ecore/src/lib/ecore_ipc')
-rw-r--r--libraries/ecore/src/lib/ecore_ipc/Ecore_Ipc.h325
-rw-r--r--libraries/ecore/src/lib/ecore_ipc/Makefile.am29
-rw-r--r--libraries/ecore/src/lib/ecore_ipc/Makefile.in836
-rw-r--r--libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c1593
-rw-r--r--libraries/ecore/src/lib/ecore_ipc/ecore_ipc_private.h104
5 files changed, 0 insertions, 2887 deletions
diff --git a/libraries/ecore/src/lib/ecore_ipc/Ecore_Ipc.h b/libraries/ecore/src/lib/ecore_ipc/Ecore_Ipc.h
deleted file mode 100644
index 40ae621..0000000
--- a/libraries/ecore/src/lib/ecore_ipc/Ecore_Ipc.h
+++ /dev/null
@@ -1,325 +0,0 @@
1#ifndef _ECORE_IPC_H
2#define _ECORE_IPC_H
3
4#ifdef EAPI
5# undef EAPI
6#endif
7
8#ifdef _WIN32
9# ifdef EFL_ECORE_IPC_BUILD
10# ifdef DLL_EXPORT
11# define EAPI __declspec(dllexport)
12# else
13# define EAPI
14# endif
15# else
16# define EAPI __declspec(dllimport)
17# endif
18#else
19# ifdef __GNUC__
20# if __GNUC__ >= 4
21# define EAPI __attribute__ ((visibility("default")))
22# else
23# define EAPI
24# endif
25# else
26# define EAPI
27# endif
28#endif
29
30/**
31 * @file Ecore_Ipc.h
32 * @brief Ecore inter-process communication functions.
33 */
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39typedef struct _Ecore_Ipc_Server Ecore_Ipc_Server; /**< An IPC connection handle */
40typedef struct _Ecore_Ipc_Client Ecore_Ipc_Client; /**< An IPC connection handle */
41
42EAPI unsigned short _ecore_ipc_swap_16(unsigned short v);
43EAPI unsigned int _ecore_ipc_swap_32(unsigned int v);
44EAPI unsigned long long _ecore_ipc_swap_64(unsigned long long v);
45
46#ifdef WORDS_BIGENDIAN
47#define ECORE_IPC_SWAP2NET64(x) _ecore_ipc_swap_64(x)
48#define ECORE_IPC_SWAP2CPU64(x) _ecore_ipc_swap_64(x)
49#define ECORE_IPC_SWAP2NET32(x) _ecore_ipc_swap_32(x)
50#define ECORE_IPC_SWAP2CPU32(x) _ecore_ipc_swap_32(x)
51#define ECORE_IPC_SWAP2NET16(x) _ecore_ipc_swap_16(x)
52#define ECORE_IPC_SWAP2CPU16(x) _ecore_ipc_swap_16(x)
53#define ECORE_IPC_SWAP2NET8(x) (x)
54#define ECORE_IPC_SWAP2CPU8(x) (x)
55#else
56#define ECORE_IPC_SWAP2NET64(x) (x)
57#define ECORE_IPC_SWAP2CPU64(x) (x)
58#define ECORE_IPC_SWAP2NET32(x) (x)
59#define ECORE_IPC_SWAP2CPU32(x) (x)
60#define ECORE_IPC_SWAP2NET16(x) (x)
61#define ECORE_IPC_SWAP2CPU16(x) (x)
62#define ECORE_IPC_SWAP2NET8(x) (x)
63#define ECORE_IPC_SWAP2CPU8(x) (x)
64#endif
65
66/* 1, 2, 4 and 8 byte datatypes */
67/* unpacking */
68#define ECORE_IPC_GET64(v)\
69 { \
70 p->v = ECORE_IPC_SWAP2CPU64(*(long long *)(ptr)); \
71 ptr += 8; \
72 }
73#define ECORE_IPC_GET32(v)\
74 { \
75 p->v = ECORE_IPC_SWAP2CPU32(*(int *)(ptr)); \
76 ptr += 4; \
77 }
78#define ECORE_IPC_GET16(v)\
79 { \
80 p->v = ECORE_IPC_SWAP2CPU16(*(short *)(ptr)); \
81 ptr += 2; \
82 }
83#define ECORE_IPC_GET8(v) \
84 { \
85 p->v = ECORE_IPC_SWAP2CPU8(*(char *)(ptr)); \
86 ptr += 1; \
87 }
88/* packing */
89#define ECORE_IPC_PUT64(v)\
90 { \
91 *(long long *)(ptr) = ECORE_IPC_SWAP2NET64(p->v); \
92 ptr += 8; \
93 }
94#define ECORE_IPC_PUT32(v)\
95 { \
96 *(int *)(ptr) = ECORE_IPC_SWAP2NET32(p->v); \
97 ptr += 4; \
98 }
99#define ECORE_IPC_PUT16(v)\
100 { \
101 *(short *)(ptr) = ECORE_IPC_SWAP2NET16(p->v); \
102 ptr += 2; \
103 }
104#define ECORE_IPC_PUT8(v) \
105 { \
106 *(char *)(ptr) = ECORE_IPC_SWAP2NET8(p->v); \
107 ptr += 1; \
108 }
109/* padding data */
110#define ECORE_IPC_PAD8() ptr += 1
111#define ECORE_IPC_PAD16() ptr += 2
112#define ECORE_IPC_PAD32() ptr += 4
113#define ECORE_IPC_PAD64() ptr += 8
114
115/* counting data when encoding lists */
116#define ECORE_IPC_CNT8() len += 1
117#define ECORE_IPC_CNT16() len += 2
118#define ECORE_IPC_CNT32() len += 4
119#define ECORE_IPC_CNT64() len += 8
120
121/* strings */
122#define ECORE_IPC_CHEKS() if (*((unsigned char *)d + s - 1) != 0) return 0;
123#define ECORE_IPC_GETS(v) \
124 { \
125 if (ptr < ((unsigned char *)d + s)) \
126 { \
127 p->v = (char *)ptr; \
128 ptr += strlen(p->v) + 1; \
129 } \
130 }
131#define ECORE_IPC_PUTS(v, l)\
132 { \
133 strcpy((char *)ptr, p->v); \
134 ptr += l + 1; \
135 }
136
137/* handy to calculate what sized block we need to alloc */
138#define ECORE_IPC_SLEN(l, v) ((l = strlen(p->v)) + 1)
139#define ECORE_IPC_CNTS(v) len += strlen(p->v) + 1
140
141/* saves typing function headers */
142#define ECORE_IPC_DEC_STRUCT_PROTO(x) static int x(void *d, int s, void *pp)
143#define ECORE_IPC_ENC_STRUCT_PROTO(x) static void *x(void *pp, int *s)
144#define ECORE_IPC_DEC_EINA_LIST_PROTO(x) static Eina_List *x(void *d, int s)
145#define ECORE_IPC_ENC_EINA_LIST_PROTO(x) static void *x(Eina_List *lp, int *s)
146
147
148/* decoder setup - saves typing. requires data packet of exact size, or fail */
149#define ECORE_IPC_DEC_STRUCT_HEAD_EXACT(typ, x) \
150 typ *p; \
151 unsigned char *ptr; \
152 p = (typ *)pp; \
153 if (!d) return 0; if (s != (x)) return 0; \
154 ptr = d;
155/* decoder setup - saves typing. requires data packet of a minimum size */
156#define ECORE_IPC_DEC_STRUCT_HEAD_MIN(typ, x) \
157 typ *p; \
158 unsigned char *ptr; \
159 p = (typ *)pp; \
160 if (!d) return 0; if (s < (x)) return 0; \
161 ptr = d;
162/* footer for the hell of it */
163#define ECORE_IPC_DEC_STRUCT_FOOT() return 1
164/* header for encoder - gives native strct type and size of flattened packet */
165#define ECORE_IPC_ENC_STRUCT_HEAD(typ, sz) \
166 typ *p; \
167 unsigned char *d, *ptr; \
168 int len; \
169 *s = 0; \
170 if(!pp) return NULL; \
171 p = (typ *)pp; \
172 len = sz; \
173 d = malloc(len); \
174 if (!d) return NULL; \
175 *s = len; \
176 ptr = d;
177/* footer for the hell of it */
178#define ECORE_IPC_ENC_STRUCT_FOOT() return d
179
180#define ECORE_IPC_DEC_EINA_LIST_HEAD(typ) \
181 unsigned char *ptr; \
182 Eina_List *l; \
183 typ *p; \
184 l = NULL; \
185 ptr = d; \
186 while(ptr < (unsigned char *)(d + s)) \
187 { \
188 p = malloc(sizeof(typ));
189
190#define ECORE_IPC_DEC_EINA_LIST_FOOT() \
191 l = eina_list_append(l, p); \
192 } \
193 return l
194#define ECORE_IPC_ENC_EINA_LIST_HEAD_START(typ) \
195 Eina_List *l; \
196 typ *p; \
197 unsigned char *d, *ptr; \
198 int len; \
199 *s = 0; \
200 len = 0; \
201 for (l = lp; l; l = l->next) \
202 { \
203 p = l->data;
204#define ECORE_IPC_ENC_EINA_LIST_HEAD_FINISH() \
205 } \
206 d = malloc(len); \
207 if(!d) return NULL; \
208 *s = len; \
209 ptr = d; \
210 for (l = lp; l; l = l->next) \
211 { \
212 p = l->data;
213
214#define ECORE_IPC_ENC_EINA_LIST_FOOT() \
215 } \
216 return d
217
218typedef enum _Ecore_Ipc_Type
219{
220 ECORE_IPC_LOCAL_USER,
221 ECORE_IPC_LOCAL_SYSTEM,
222 ECORE_IPC_REMOTE_SYSTEM,
223 ECORE_IPC_USE_SSL = 16
224} Ecore_Ipc_Type;
225
226typedef struct _Ecore_Ipc_Event_Client_Add Ecore_Ipc_Event_Client_Add;
227typedef struct _Ecore_Ipc_Event_Client_Del Ecore_Ipc_Event_Client_Del;
228typedef struct _Ecore_Ipc_Event_Server_Add Ecore_Ipc_Event_Server_Add;
229typedef struct _Ecore_Ipc_Event_Server_Del Ecore_Ipc_Event_Server_Del;
230typedef struct _Ecore_Ipc_Event_Client_Data Ecore_Ipc_Event_Client_Data;
231typedef struct _Ecore_Ipc_Event_Server_Data Ecore_Ipc_Event_Server_Data;
232
233struct _Ecore_Ipc_Event_Client_Add
234{
235 Ecore_Ipc_Client *client;
236};
237
238struct _Ecore_Ipc_Event_Client_Del
239{
240 Ecore_Ipc_Client *client;
241};
242
243struct _Ecore_Ipc_Event_Server_Add
244{
245 Ecore_Ipc_Server *server;
246};
247
248struct _Ecore_Ipc_Event_Server_Del
249{
250 Ecore_Ipc_Server *server;
251};
252
253struct _Ecore_Ipc_Event_Client_Data
254{
255 Ecore_Ipc_Client *client;
256 /* FIXME: this needs to become an ipc message */
257 int major;
258 int minor;
259 int ref;
260 int ref_to;
261 int response;
262 void *data;
263 int size;
264};
265
266struct _Ecore_Ipc_Event_Server_Data
267{
268 Ecore_Ipc_Server *server;
269 /* FIXME: this needs to become an ipc message */
270 int major;
271 int minor;
272 int ref;
273 int ref_to;
274 int response;
275 void *data;
276 int size;
277};
278
279EAPI extern int ECORE_IPC_EVENT_CLIENT_ADD;
280EAPI extern int ECORE_IPC_EVENT_CLIENT_DEL;
281EAPI extern int ECORE_IPC_EVENT_SERVER_ADD;
282EAPI extern int ECORE_IPC_EVENT_SERVER_DEL;
283EAPI extern int ECORE_IPC_EVENT_CLIENT_DATA;
284EAPI extern int ECORE_IPC_EVENT_SERVER_DATA;
285
286EAPI int ecore_ipc_init(void);
287EAPI int ecore_ipc_shutdown(void);
288
289/* FIXME: need to add protocol type parameter */
290EAPI Ecore_Ipc_Server *ecore_ipc_server_add(Ecore_Ipc_Type type, const char *name, int port, const void *data);
291
292/* FIXME: need to add protocol type parameter */
293EAPI Ecore_Ipc_Server *ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void *data);
294EAPI void *ecore_ipc_server_del(Ecore_Ipc_Server *svr);
295EAPI void *ecore_ipc_server_data_get(Ecore_Ipc_Server *svr);
296EAPI Eina_Bool ecore_ipc_server_connected_get(Ecore_Ipc_Server *svr);
297EAPI Eina_List *ecore_ipc_server_clients_get(Ecore_Ipc_Server *svr);
298/* FIXME: this needs to become an ipc message */
299EAPI int ecore_ipc_server_send(Ecore_Ipc_Server *svr, int major, int minor, int ref, int ref_to, int response, const void *data, int size);
300EAPI void ecore_ipc_server_client_limit_set(Ecore_Ipc_Server *svr, int client_limit, char reject_excess_clients);
301EAPI void ecore_ipc_server_data_size_max_set(Ecore_Ipc_Server *srv, int size);
302EAPI int ecore_ipc_server_data_size_max_get(Ecore_Ipc_Server *srv);
303EAPI const char *ecore_ipc_server_ip_get(Ecore_Ipc_Server *svr);
304EAPI void ecore_ipc_server_flush(Ecore_Ipc_Server *svr);
305
306/* FIXME: this needs to become an ipc message */
307EAPI int ecore_ipc_client_send(Ecore_Ipc_Client *cl, int major, int minor, int ref, int ref_to, int response, const void *data, int size);
308EAPI Ecore_Ipc_Server *ecore_ipc_client_server_get(Ecore_Ipc_Client *cl);
309EAPI void *ecore_ipc_client_del(Ecore_Ipc_Client *cl);
310EAPI void ecore_ipc_client_data_set(Ecore_Ipc_Client *cl, const void *data);
311EAPI void *ecore_ipc_client_data_get(Ecore_Ipc_Client *cl);
312EAPI void ecore_ipc_client_data_size_max_set(Ecore_Ipc_Client *cl, int size);
313EAPI int ecore_ipc_client_data_size_max_get(Ecore_Ipc_Client *cl);
314EAPI const char *ecore_ipc_client_ip_get(Ecore_Ipc_Client *cl);
315EAPI void ecore_ipc_client_flush(Ecore_Ipc_Client *cl);
316
317EAPI int ecore_ipc_ssl_available_get(void);
318/* FIXME: need to add a callback to "ok" large ipc messages greater than */
319/* a certain size (seurity/DOS attack safety) */
320
321#ifdef __cplusplus
322}
323#endif
324
325#endif
diff --git a/libraries/ecore/src/lib/ecore_ipc/Makefile.am b/libraries/ecore/src/lib/ecore_ipc/Makefile.am
deleted file mode 100644
index 9cbed43..0000000
--- a/libraries/ecore/src/lib/ecore_ipc/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-I$(top_builddir)/src/lib/ecore \
5-I$(top_builddir)/src/lib/ecore_con \
6-I$(top_builddir)/src/lib/ecore_ipc \
7-I$(top_srcdir)/src/lib/ecore \
8-I$(top_srcdir)/src/lib/ecore_con \
9-I$(top_srcdir)/src/lib/ecore_ipc \
10@EFL_ECORE_IPC_BUILD@ \
11@SSL_CFLAGS@ \
12@EINA_CFLAGS@
13
14lib_LTLIBRARIES = libecore_ipc.la
15includes_HEADERS = Ecore_Ipc.h
16includesdir = $(includedir)/ecore-@VMAJ@
17
18libecore_ipc_la_SOURCES = \
19ecore_ipc.c
20
21libecore_ipc_la_LIBADD = \
22$(top_builddir)/src/lib/ecore/libecore.la \
23$(top_builddir)/src/lib/ecore_con/libecore_con.la \
24@SSL_LIBS@ \
25@EINA_LIBS@
26
27libecore_ipc_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@
28
29EXTRA_DIST = ecore_ipc_private.h
diff --git a/libraries/ecore/src/lib/ecore_ipc/Makefile.in b/libraries/ecore/src/lib/ecore_ipc/Makefile.in
deleted file mode 100644
index e339ffc..0000000
--- a/libraries/ecore/src/lib/ecore_ipc/Makefile.in
+++ /dev/null
@@ -1,836 +0,0 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18
19VPATH = @srcdir@
20pkgdatadir = $(datadir)/@PACKAGE@
21pkgincludedir = $(includedir)/@PACKAGE@
22pkglibdir = $(libdir)/@PACKAGE@
23pkglibexecdir = $(libexecdir)/@PACKAGE@
24am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
25install_sh_DATA = $(install_sh) -c -m 644
26install_sh_PROGRAM = $(install_sh) -c
27install_sh_SCRIPT = $(install_sh) -c
28INSTALL_HEADER = $(INSTALL_DATA)
29transform = $(program_transform_name)
30NORMAL_INSTALL = :
31PRE_INSTALL = :
32POST_INSTALL = :
33NORMAL_UNINSTALL = :
34PRE_UNINSTALL = :
35POST_UNINSTALL = :
36build_triplet = @build@
37host_triplet = @host@
38subdir = src/lib/ecore_ipc
39DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \
40 $(srcdir)/Makefile.in
41ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
42am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
43 $(top_srcdir)/m4/ac_path_generic.m4 \
44 $(top_srcdir)/m4/check_x_extension.m4 \
45 $(top_srcdir)/m4/ecore_check_module.m4 \
46 $(top_srcdir)/m4/ecore_check_options.m4 \
47 $(top_srcdir)/m4/efl_compiler_flag.m4 \
48 $(top_srcdir)/m4/efl_doxygen.m4 \
49 $(top_srcdir)/m4/efl_examples.m4 \
50 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
51 $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \
52 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
53 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
54 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
55 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
56 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
57 $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
58 $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
59am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
60 $(ACLOCAL_M4)
61mkinstalldirs = $(install_sh) -d
62CONFIG_HEADER = $(top_builddir)/config.h
63CONFIG_CLEAN_FILES =
64CONFIG_CLEAN_VPATH_FILES =
65am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
66am__vpath_adj = case $$p in \
67 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
68 *) f=$$p;; \
69 esac;
70am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
71am__install_max = 40
72am__nobase_strip_setup = \
73 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
74am__nobase_strip = \
75 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
76am__nobase_list = $(am__nobase_strip_setup); \
77 for p in $$list; do echo "$$p $$p"; done | \
78 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
79 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
80 if (++n[$$2] == $(am__install_max)) \
81 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
82 END { for (dir in files) print dir, files[dir] }'
83am__base_list = \
84 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
85 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
86am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"
87LTLIBRARIES = $(lib_LTLIBRARIES)
88libecore_ipc_la_DEPENDENCIES = \
89 $(top_builddir)/src/lib/ecore/libecore.la \
90 $(top_builddir)/src/lib/ecore_con/libecore_con.la
91am_libecore_ipc_la_OBJECTS = ecore_ipc.lo
92libecore_ipc_la_OBJECTS = $(am_libecore_ipc_la_OBJECTS)
93AM_V_lt = $(am__v_lt_$(V))
94am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
95am__v_lt_0 = --silent
96libecore_ipc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
97 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
98 $(AM_CFLAGS) $(CFLAGS) $(libecore_ipc_la_LDFLAGS) $(LDFLAGS) \
99 -o $@
100DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
101depcomp = $(SHELL) $(top_srcdir)/depcomp
102am__depfiles_maybe = depfiles
103am__mv = mv -f
104COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
105 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
106LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
107 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
108 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
109 $(AM_CFLAGS) $(CFLAGS)
110AM_V_CC = $(am__v_CC_$(V))
111am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
112am__v_CC_0 = @echo " CC " $@;
113AM_V_at = $(am__v_at_$(V))
114am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
115am__v_at_0 = @
116CCLD = $(CC)
117LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
118 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
119 $(AM_LDFLAGS) $(LDFLAGS) -o $@
120AM_V_CCLD = $(am__v_CCLD_$(V))
121am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
122am__v_CCLD_0 = @echo " CCLD " $@;
123AM_V_GEN = $(am__v_GEN_$(V))
124am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
125am__v_GEN_0 = @echo " GEN " $@;
126SOURCES = $(libecore_ipc_la_SOURCES)
127DIST_SOURCES = $(libecore_ipc_la_SOURCES)
128HEADERS = $(includes_HEADERS)
129ETAGS = etags
130CTAGS = ctags
131DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
132ACLOCAL = @ACLOCAL@
133ALLOCA = @ALLOCA@
134AMTAR = @AMTAR@
135AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
136AR = @AR@
137AS = @AS@
138AUTOCONF = @AUTOCONF@
139AUTOHEADER = @AUTOHEADER@
140AUTOMAKE = @AUTOMAKE@
141AWK = @AWK@
142CARES_CFLAGS = @CARES_CFLAGS@
143CARES_LIBS = @CARES_LIBS@
144CC = @CC@
145CCDEPMODE = @CCDEPMODE@
146CFLAGS = @CFLAGS@
147CHECK_CFLAGS = @CHECK_CFLAGS@
148CHECK_LIBS = @CHECK_LIBS@
149CPP = @CPP@
150CPPFLAGS = @CPPFLAGS@
151CURL_CFLAGS = @CURL_CFLAGS@
152CURL_LIBS = @CURL_LIBS@
153CXX = @CXX@
154CXXCPP = @CXXCPP@
155CXXDEPMODE = @CXXDEPMODE@
156CXXFLAGS = @CXXFLAGS@
157CYGPATH_W = @CYGPATH_W@
158DEFS = @DEFS@
159DEPDIR = @DEPDIR@
160DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
161DIRECTFB_LIBS = @DIRECTFB_LIBS@
162DLLTOOL = @DLLTOOL@
163DSYMUTIL = @DSYMUTIL@
164DUMPBIN = @DUMPBIN@
165ECHO_C = @ECHO_C@
166ECHO_N = @ECHO_N@
167ECHO_T = @ECHO_T@
168ECORE_XCB_CFLAGS = @ECORE_XCB_CFLAGS@
169ECORE_XCB_LIBS = @ECORE_XCB_LIBS@
170EFL_ECORE_BUILD = @EFL_ECORE_BUILD@
171EFL_ECORE_CON_BUILD = @EFL_ECORE_CON_BUILD@
172EFL_ECORE_EVAS_BUILD = @EFL_ECORE_EVAS_BUILD@
173EFL_ECORE_FILE_BUILD = @EFL_ECORE_FILE_BUILD@
174EFL_ECORE_IMF_BUILD = @EFL_ECORE_IMF_BUILD@
175EFL_ECORE_IMF_EVAS_BUILD = @EFL_ECORE_IMF_EVAS_BUILD@
176EFL_ECORE_INPUT_BUILD = @EFL_ECORE_INPUT_BUILD@
177EFL_ECORE_INPUT_EVAS_BUILD = @EFL_ECORE_INPUT_EVAS_BUILD@
178EFL_ECORE_IPC_BUILD = @EFL_ECORE_IPC_BUILD@
179EFL_ECORE_PSL1GHT_BUILD = @EFL_ECORE_PSL1GHT_BUILD@
180EFL_ECORE_SDL_BUILD = @EFL_ECORE_SDL_BUILD@
181EFL_ECORE_WIN32_BUILD = @EFL_ECORE_WIN32_BUILD@
182EFL_ECORE_WINCE_BUILD = @EFL_ECORE_WINCE_BUILD@
183EFL_PTHREAD_CFLAGS = @EFL_PTHREAD_CFLAGS@
184EFL_PTHREAD_LIBS = @EFL_PTHREAD_LIBS@
185EGREP = @EGREP@
186EINA_CFLAGS = @EINA_CFLAGS@
187EINA_LIBS = @EINA_LIBS@
188ESCAPE_CFLAGS = @ESCAPE_CFLAGS@
189ESCAPE_LIBS = @ESCAPE_LIBS@
190EVAS_CFLAGS = @EVAS_CFLAGS@
191EVAS_LIBS = @EVAS_LIBS@
192EVIL_CFLAGS = @EVIL_CFLAGS@
193EVIL_LIBS = @EVIL_LIBS@
194EXEEXT = @EXEEXT@
195EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
196EXOTIC_LIBS = @EXOTIC_LIBS@
197FGREP = @FGREP@
198GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
199GLIB_CFLAGS = @GLIB_CFLAGS@
200GLIB_LIBS = @GLIB_LIBS@
201GMSGFMT = @GMSGFMT@
202GMSGFMT_015 = @GMSGFMT_015@
203GREP = @GREP@
204INSTALL = @INSTALL@
205INSTALL_DATA = @INSTALL_DATA@
206INSTALL_PROGRAM = @INSTALL_PROGRAM@
207INSTALL_SCRIPT = @INSTALL_SCRIPT@
208INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
209INTLLIBS = @INTLLIBS@
210INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
211KEYSYMDEFS = @KEYSYMDEFS@
212LD = @LD@
213LDFLAGS = @LDFLAGS@
214LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
215LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
216LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
217LIBICONV = @LIBICONV@
218LIBINTL = @LIBINTL@
219LIBOBJS = @LIBOBJS@
220LIBS = @LIBS@
221LIBTOOL = @LIBTOOL@
222LIPO = @LIPO@
223LN_S = @LN_S@
224LTLIBICONV = @LTLIBICONV@
225LTLIBINTL = @LTLIBINTL@
226LTLIBOBJS = @LTLIBOBJS@
227MAKEINFO = @MAKEINFO@
228MKDIR_P = @MKDIR_P@
229MSGFMT = @MSGFMT@
230MSGFMT_015 = @MSGFMT_015@
231MSGMERGE = @MSGMERGE@
232NM = @NM@
233NMEDIT = @NMEDIT@
234OBJC = @OBJC@
235OBJCDEPMODE = @OBJCDEPMODE@
236OBJCFLAGS = @OBJCFLAGS@
237OBJDUMP = @OBJDUMP@
238OBJEXT = @OBJEXT@
239OTOOL = @OTOOL@
240OTOOL64 = @OTOOL64@
241PACKAGE = @PACKAGE@
242PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
243PACKAGE_NAME = @PACKAGE_NAME@
244PACKAGE_STRING = @PACKAGE_STRING@
245PACKAGE_TARNAME = @PACKAGE_TARNAME@
246PACKAGE_URL = @PACKAGE_URL@
247PACKAGE_VERSION = @PACKAGE_VERSION@
248PATH_SEPARATOR = @PATH_SEPARATOR@
249PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
250PIXMAN_LIBS = @PIXMAN_LIBS@
251PKG_CONFIG = @PKG_CONFIG@
252PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
253PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
254POSUB = @POSUB@
255RANLIB = @RANLIB@
256SCIM_CFLAGS = @SCIM_CFLAGS@
257SCIM_LIBS = @SCIM_LIBS@
258SDL_CFLAGS = @SDL_CFLAGS@
259SDL_CONFIG = @SDL_CONFIG@
260SDL_LIBS = @SDL_LIBS@
261SED = @SED@
262SET_MAKE = @SET_MAKE@
263SHELL = @SHELL@
264SHM_OPEN_LIBS = @SHM_OPEN_LIBS@
265SSL_CFLAGS = @SSL_CFLAGS@
266SSL_LIBS = @SSL_LIBS@
267STRIP = @STRIP@
268TLS2_CFLAGS = @TLS2_CFLAGS@
269TLS2_LIBS = @TLS2_LIBS@
270TLS_CFLAGS = @TLS_CFLAGS@
271TLS_LIBS = @TLS_LIBS@
272TSLIB_CFLAGS = @TSLIB_CFLAGS@
273TSLIB_LIBS = @TSLIB_LIBS@
274USE_NLS = @USE_NLS@
275VERSION = @VERSION@
276VMAJ = @VMAJ@
277WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
278WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
279WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
280WAYLAND_LIBS = @WAYLAND_LIBS@
281WIN32_CFLAGS = @WIN32_CFLAGS@
282WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
283WIN32_LIBS = @WIN32_LIBS@
284XCB_COMPOSITE_CFLAGS = @XCB_COMPOSITE_CFLAGS@
285XCB_COMPOSITE_LIBS = @XCB_COMPOSITE_LIBS@
286XCB_CURSOR_CFLAGS = @XCB_CURSOR_CFLAGS@
287XCB_CURSOR_LIBS = @XCB_CURSOR_LIBS@
288XCB_DAMAGE_CFLAGS = @XCB_DAMAGE_CFLAGS@
289XCB_DAMAGE_LIBS = @XCB_DAMAGE_LIBS@
290XCB_DPMS_CFLAGS = @XCB_DPMS_CFLAGS@
291XCB_DPMS_LIBS = @XCB_DPMS_LIBS@
292XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@
293XCB_RANDR_LIBS = @XCB_RANDR_LIBS@
294XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@
295XCB_RENDER_LIBS = @XCB_RENDER_LIBS@
296XCB_SCREENSAVER_CFLAGS = @XCB_SCREENSAVER_CFLAGS@
297XCB_SCREENSAVER_LIBS = @XCB_SCREENSAVER_LIBS@
298XCB_SHAPE_CFLAGS = @XCB_SHAPE_CFLAGS@
299XCB_SHAPE_LIBS = @XCB_SHAPE_LIBS@
300XCB_SYNC_CFLAGS = @XCB_SYNC_CFLAGS@
301XCB_SYNC_LIBS = @XCB_SYNC_LIBS@
302XCB_X11_CFLAGS = @XCB_X11_CFLAGS@
303XCB_X11_LIBS = @XCB_X11_LIBS@
304XCB_XFIXES_CFLAGS = @XCB_XFIXES_CFLAGS@
305XCB_XFIXES_LIBS = @XCB_XFIXES_LIBS@
306XCB_XGESTURE_CFLAGS = @XCB_XGESTURE_CFLAGS@
307XCB_XGESTURE_LIBS = @XCB_XGESTURE_LIBS@
308XCB_XINERAMA_CFLAGS = @XCB_XINERAMA_CFLAGS@
309XCB_XINERAMA_LIBS = @XCB_XINERAMA_LIBS@
310XCB_XINPUT_CFLAGS = @XCB_XINPUT_CFLAGS@
311XCB_XINPUT_LIBS = @XCB_XINPUT_LIBS@
312XCB_XPRINT_CFLAGS = @XCB_XPRINT_CFLAGS@
313XCB_XPRINT_LIBS = @XCB_XPRINT_LIBS@
314XCB_XTEST_CFLAGS = @XCB_XTEST_CFLAGS@
315XCB_XTEST_LIBS = @XCB_XTEST_LIBS@
316XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
317XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
318XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
319XDAMAGE_LIBS = @XDAMAGE_LIBS@
320XDPMS_CFLAGS = @XDPMS_CFLAGS@
321XDPMS_LIBS = @XDPMS_LIBS@
322XFIXES_CFLAGS = @XFIXES_CFLAGS@
323XFIXES_LIBS = @XFIXES_LIBS@
324XGESTURE_CFLAGS = @XGESTURE_CFLAGS@
325XGESTURE_LIBS = @XGESTURE_LIBS@
326XGETTEXT = @XGETTEXT@
327XGETTEXT_015 = @XGETTEXT_015@
328XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
329XI2_CFLAGS = @XI2_CFLAGS@
330XI2_LIBS = @XI2_LIBS@
331XINERAMA_CFLAGS = @XINERAMA_CFLAGS@
332XINERAMA_LIBS = @XINERAMA_LIBS@
333XKB_CFLAGS = @XKB_CFLAGS@
334XKB_LIBS = @XKB_LIBS@
335XMKMF = @XMKMF@
336XPRINT_CFLAGS = @XPRINT_CFLAGS@
337XPRINT_LIBS = @XPRINT_LIBS@
338XRANDR_CFLAGS = @XRANDR_CFLAGS@
339XRANDR_LIBS = @XRANDR_LIBS@
340XRENDER_CFLAGS = @XRENDER_CFLAGS@
341XRENDER_LIBS = @XRENDER_LIBS@
342XSS_CFLAGS = @XSS_CFLAGS@
343XSS_LIBS = @XSS_LIBS@
344XTEST_CFLAGS = @XTEST_CFLAGS@
345XTEST_LIBS = @XTEST_LIBS@
346X_CFLAGS = @X_CFLAGS@
347X_EXTRA_LIBS = @X_EXTRA_LIBS@
348X_LIBS = @X_LIBS@
349X_PRE_LIBS = @X_PRE_LIBS@
350Xcursor_cflags = @Xcursor_cflags@
351Xcursor_libs = @Xcursor_libs@
352abs_builddir = @abs_builddir@
353abs_srcdir = @abs_srcdir@
354abs_top_builddir = @abs_top_builddir@
355abs_top_srcdir = @abs_top_srcdir@
356ac_ct_CC = @ac_ct_CC@
357ac_ct_CXX = @ac_ct_CXX@
358ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
359ac_ct_OBJC = @ac_ct_OBJC@
360am__include = @am__include@
361am__leading_dot = @am__leading_dot@
362am__quote = @am__quote@
363am__tar = @am__tar@
364am__untar = @am__untar@
365bindir = @bindir@
366build = @build@
367build_alias = @build_alias@
368build_cpu = @build_cpu@
369build_os = @build_os@
370build_vendor = @build_vendor@
371builddir = @builddir@
372cocoa_ldflags = @cocoa_ldflags@
373datadir = @datadir@
374datarootdir = @datarootdir@
375dlopen_libs = @dlopen_libs@
376docdir = @docdir@
377dvidir = @dvidir@
378ecore_cocoa_cflags = @ecore_cocoa_cflags@
379ecore_cocoa_libs = @ecore_cocoa_libs@
380ecore_con_cflags = @ecore_con_cflags@
381ecore_con_libs = @ecore_con_libs@
382ecore_directfb_cflags = @ecore_directfb_cflags@
383ecore_directfb_libs = @ecore_directfb_libs@
384ecore_evas_cflags = @ecore_evas_cflags@
385ecore_evas_libs = @ecore_evas_libs@
386ecore_fb_cflags = @ecore_fb_cflags@
387ecore_fb_libs = @ecore_fb_libs@
388ecore_file_cflags = @ecore_file_cflags@
389ecore_file_libs = @ecore_file_libs@
390ecore_imf_cflags = @ecore_imf_cflags@
391ecore_imf_evas_cflags = @ecore_imf_evas_cflags@
392ecore_imf_evas_libs = @ecore_imf_evas_libs@
393ecore_imf_libs = @ecore_imf_libs@
394ecore_imf_scim_cflags = @ecore_imf_scim_cflags@
395ecore_imf_scim_libs = @ecore_imf_scim_libs@
396ecore_imf_xim_cflags = @ecore_imf_xim_cflags@
397ecore_imf_xim_libs = @ecore_imf_xim_libs@
398ecore_input_cflags = @ecore_input_cflags@
399ecore_input_evas_cflags = @ecore_input_evas_cflags@
400ecore_input_evas_libs = @ecore_input_evas_libs@
401ecore_input_libs = @ecore_input_libs@
402ecore_ipc_cflags = @ecore_ipc_cflags@
403ecore_ipc_libs = @ecore_ipc_libs@
404ecore_psl1ght_cflags = @ecore_psl1ght_cflags@
405ecore_psl1ght_libs = @ecore_psl1ght_libs@
406ecore_sdl_cflags = @ecore_sdl_cflags@
407ecore_sdl_libs = @ecore_sdl_libs@
408ecore_wayland_cflags = @ecore_wayland_cflags@
409ecore_wayland_libs = @ecore_wayland_libs@
410ecore_win32_cflags = @ecore_win32_cflags@
411ecore_win32_libs = @ecore_win32_libs@
412ecore_wince_cflags = @ecore_wince_cflags@
413ecore_wince_libs = @ecore_wince_libs@
414ecore_x_cflags = @ecore_x_cflags@
415ecore_x_libs = @ecore_x_libs@
416ecore_x_libs_private = @ecore_x_libs_private@
417efl_doxygen = @efl_doxygen@
418efl_have_doxygen = @efl_have_doxygen@
419exec_prefix = @exec_prefix@
420have_ecore_x_xcb_define = @have_ecore_x_xcb_define@
421host = @host@
422host_alias = @host_alias@
423host_cpu = @host_cpu@
424host_os = @host_os@
425host_vendor = @host_vendor@
426htmldir = @htmldir@
427includedir = @includedir@
428infodir = @infodir@
429install_sh = @install_sh@
430libdir = @libdir@
431libexecdir = @libexecdir@
432localedir = @localedir@
433localstatedir = @localstatedir@
434lt_ECHO = @lt_ECHO@
435lt_enable_auto_import = @lt_enable_auto_import@
436mandir = @mandir@
437mkdir_p = @mkdir_p@
438oldincludedir = @oldincludedir@
439pdfdir = @pdfdir@
440pkgconfig_requires_private = @pkgconfig_requires_private@
441prefix = @prefix@
442program_transform_name = @program_transform_name@
443psdir = @psdir@
444release_info = @release_info@
445requirements_ecore = @requirements_ecore@
446requirements_ecore_cocoa = @requirements_ecore_cocoa@
447requirements_ecore_con = @requirements_ecore_con@
448requirements_ecore_directfb = @requirements_ecore_directfb@
449requirements_ecore_evas = @requirements_ecore_evas@
450requirements_ecore_fb = @requirements_ecore_fb@
451requirements_ecore_file = @requirements_ecore_file@
452requirements_ecore_imf = @requirements_ecore_imf@
453requirements_ecore_imf_evas = @requirements_ecore_imf_evas@
454requirements_ecore_imf_scim = @requirements_ecore_imf_scim@
455requirements_ecore_imf_xim = @requirements_ecore_imf_xim@
456requirements_ecore_input = @requirements_ecore_input@
457requirements_ecore_input_evas = @requirements_ecore_input_evas@
458requirements_ecore_ipc = @requirements_ecore_ipc@
459requirements_ecore_psl1ght = @requirements_ecore_psl1ght@
460requirements_ecore_sdl = @requirements_ecore_sdl@
461requirements_ecore_wayland = @requirements_ecore_wayland@
462requirements_ecore_win32 = @requirements_ecore_win32@
463requirements_ecore_wince = @requirements_ecore_wince@
464requirements_ecore_x = @requirements_ecore_x@
465rt_libs = @rt_libs@
466sbindir = @sbindir@
467sharedstatedir = @sharedstatedir@
468srcdir = @srcdir@
469sysconfdir = @sysconfdir@
470target_alias = @target_alias@
471top_build_prefix = @top_build_prefix@
472top_builddir = @top_builddir@
473top_srcdir = @top_srcdir@
474version_info = @version_info@
475x_cflags = @x_cflags@
476x_includes = @x_includes@
477x_libs = @x_libs@
478MAINTAINERCLEANFILES = Makefile.in
479AM_CPPFLAGS = \
480-I$(top_builddir)/src/lib/ecore \
481-I$(top_builddir)/src/lib/ecore_con \
482-I$(top_builddir)/src/lib/ecore_ipc \
483-I$(top_srcdir)/src/lib/ecore \
484-I$(top_srcdir)/src/lib/ecore_con \
485-I$(top_srcdir)/src/lib/ecore_ipc \
486@EFL_ECORE_IPC_BUILD@ \
487@SSL_CFLAGS@ \
488@EINA_CFLAGS@
489
490lib_LTLIBRARIES = libecore_ipc.la
491includes_HEADERS = Ecore_Ipc.h
492includesdir = $(includedir)/ecore-@VMAJ@
493libecore_ipc_la_SOURCES = \
494ecore_ipc.c
495
496libecore_ipc_la_LIBADD = \
497$(top_builddir)/src/lib/ecore/libecore.la \
498$(top_builddir)/src/lib/ecore_con/libecore_con.la \
499@SSL_LIBS@ \
500@EINA_LIBS@
501
502libecore_ipc_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@
503EXTRA_DIST = ecore_ipc_private.h
504all: all-am
505
506.SUFFIXES:
507.SUFFIXES: .c .lo .o .obj
508$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
509 @for dep in $?; do \
510 case '$(am__configure_deps)' in \
511 *$$dep*) \
512 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
513 && { if test -f $@; then exit 0; else break; fi; }; \
514 exit 1;; \
515 esac; \
516 done; \
517 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/ecore_ipc/Makefile'; \
518 $(am__cd) $(top_srcdir) && \
519 $(AUTOMAKE) --gnu src/lib/ecore_ipc/Makefile
520.PRECIOUS: Makefile
521Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
522 @case '$?' in \
523 *config.status*) \
524 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
525 *) \
526 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
527 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
528 esac;
529
530$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
531 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
532
533$(top_srcdir)/configure: $(am__configure_deps)
534 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
535$(ACLOCAL_M4): $(am__aclocal_m4_deps)
536 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
537$(am__aclocal_m4_deps):
538install-libLTLIBRARIES: $(lib_LTLIBRARIES)
539 @$(NORMAL_INSTALL)
540 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
541 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
542 list2=; for p in $$list; do \
543 if test -f $$p; then \
544 list2="$$list2 $$p"; \
545 else :; fi; \
546 done; \
547 test -z "$$list2" || { \
548 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
549 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
550 }
551
552uninstall-libLTLIBRARIES:
553 @$(NORMAL_UNINSTALL)
554 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
555 for p in $$list; do \
556 $(am__strip_dir) \
557 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
558 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
559 done
560
561clean-libLTLIBRARIES:
562 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
563 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
564 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
565 test "$$dir" != "$$p" || dir=.; \
566 echo "rm -f \"$${dir}/so_locations\""; \
567 rm -f "$${dir}/so_locations"; \
568 done
569libecore_ipc.la: $(libecore_ipc_la_OBJECTS) $(libecore_ipc_la_DEPENDENCIES)
570 $(AM_V_CCLD)$(libecore_ipc_la_LINK) -rpath $(libdir) $(libecore_ipc_la_OBJECTS) $(libecore_ipc_la_LIBADD) $(LIBS)
571
572mostlyclean-compile:
573 -rm -f *.$(OBJEXT)
574
575distclean-compile:
576 -rm -f *.tab.c
577
578@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_ipc.Plo@am__quote@
579
580.c.o:
581@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
582@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
583@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
584@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
585@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
586@am__fastdepCC_FALSE@ $(COMPILE) -c $<
587
588.c.obj:
589@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
590@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
591@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
592@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
593@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
594@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
595
596.c.lo:
597@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
598@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
599@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
600@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
601@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
602@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
603
604mostlyclean-libtool:
605 -rm -f *.lo
606
607clean-libtool:
608 -rm -rf .libs _libs
609install-includesHEADERS: $(includes_HEADERS)
610 @$(NORMAL_INSTALL)
611 test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)"
612 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
613 for p in $$list; do \
614 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
615 echo "$$d$$p"; \
616 done | $(am__base_list) | \
617 while read files; do \
618 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \
619 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \
620 done
621
622uninstall-includesHEADERS:
623 @$(NORMAL_UNINSTALL)
624 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
625 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
626 test -n "$$files" || exit 0; \
627 echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \
628 cd "$(DESTDIR)$(includesdir)" && rm -f $$files
629
630ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
631 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
632 unique=`for i in $$list; do \
633 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
634 done | \
635 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
636 END { if (nonempty) { for (i in files) print i; }; }'`; \
637 mkid -fID $$unique
638tags: TAGS
639
640TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
641 $(TAGS_FILES) $(LISP)
642 set x; \
643 here=`pwd`; \
644 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
645 unique=`for i in $$list; do \
646 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
647 done | \
648 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
649 END { if (nonempty) { for (i in files) print i; }; }'`; \
650 shift; \
651 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
652 test -n "$$unique" || unique=$$empty_fix; \
653 if test $$# -gt 0; then \
654 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
655 "$$@" $$unique; \
656 else \
657 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
658 $$unique; \
659 fi; \
660 fi
661ctags: CTAGS
662CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
663 $(TAGS_FILES) $(LISP)
664 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
665 unique=`for i in $$list; do \
666 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
667 done | \
668 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
669 END { if (nonempty) { for (i in files) print i; }; }'`; \
670 test -z "$(CTAGS_ARGS)$$unique" \
671 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
672 $$unique
673
674GTAGS:
675 here=`$(am__cd) $(top_builddir) && pwd` \
676 && $(am__cd) $(top_srcdir) \
677 && gtags -i $(GTAGS_ARGS) "$$here"
678
679distclean-tags:
680 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
681
682distdir: $(DISTFILES)
683 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
684 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
685 list='$(DISTFILES)'; \
686 dist_files=`for file in $$list; do echo $$file; done | \
687 sed -e "s|^$$srcdirstrip/||;t" \
688 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
689 case $$dist_files in \
690 */*) $(MKDIR_P) `echo "$$dist_files" | \
691 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
692 sort -u` ;; \
693 esac; \
694 for file in $$dist_files; do \
695 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
696 if test -d $$d/$$file; then \
697 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
698 if test -d "$(distdir)/$$file"; then \
699 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
700 fi; \
701 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
702 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
703 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
704 fi; \
705 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
706 else \
707 test -f "$(distdir)/$$file" \
708 || cp -p $$d/$$file "$(distdir)/$$file" \
709 || exit 1; \
710 fi; \
711 done
712check-am: all-am
713check: check-am
714all-am: Makefile $(LTLIBRARIES) $(HEADERS)
715installdirs:
716 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \
717 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
718 done
719install: install-am
720install-exec: install-exec-am
721install-data: install-data-am
722uninstall: uninstall-am
723
724install-am: all-am
725 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
726
727installcheck: installcheck-am
728install-strip:
729 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
730 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
731 `test -z '$(STRIP)' || \
732 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
733mostlyclean-generic:
734
735clean-generic:
736
737distclean-generic:
738 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
739 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
740
741maintainer-clean-generic:
742 @echo "This command is intended for maintainers to use"
743 @echo "it deletes files that may require special tools to rebuild."
744 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
745clean: clean-am
746
747clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
748 mostlyclean-am
749
750distclean: distclean-am
751 -rm -rf ./$(DEPDIR)
752 -rm -f Makefile
753distclean-am: clean-am distclean-compile distclean-generic \
754 distclean-tags
755
756dvi: dvi-am
757
758dvi-am:
759
760html: html-am
761
762html-am:
763
764info: info-am
765
766info-am:
767
768install-data-am: install-includesHEADERS
769
770install-dvi: install-dvi-am
771
772install-dvi-am:
773
774install-exec-am: install-libLTLIBRARIES
775
776install-html: install-html-am
777
778install-html-am:
779
780install-info: install-info-am
781
782install-info-am:
783
784install-man:
785
786install-pdf: install-pdf-am
787
788install-pdf-am:
789
790install-ps: install-ps-am
791
792install-ps-am:
793
794installcheck-am:
795
796maintainer-clean: maintainer-clean-am
797 -rm -rf ./$(DEPDIR)
798 -rm -f Makefile
799maintainer-clean-am: distclean-am maintainer-clean-generic
800
801mostlyclean: mostlyclean-am
802
803mostlyclean-am: mostlyclean-compile mostlyclean-generic \
804 mostlyclean-libtool
805
806pdf: pdf-am
807
808pdf-am:
809
810ps: ps-am
811
812ps-am:
813
814uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES
815
816.MAKE: install-am install-strip
817
818.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
819 clean-libLTLIBRARIES clean-libtool ctags distclean \
820 distclean-compile distclean-generic distclean-libtool \
821 distclean-tags distdir dvi dvi-am html html-am info info-am \
822 install install-am install-data install-data-am install-dvi \
823 install-dvi-am install-exec install-exec-am install-html \
824 install-html-am install-includesHEADERS install-info \
825 install-info-am install-libLTLIBRARIES install-man install-pdf \
826 install-pdf-am install-ps install-ps-am install-strip \
827 installcheck installcheck-am installdirs maintainer-clean \
828 maintainer-clean-generic mostlyclean mostlyclean-compile \
829 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
830 tags uninstall uninstall-am uninstall-includesHEADERS \
831 uninstall-libLTLIBRARIES
832
833
834# Tell versions [3.59,3.63) of GNU make to not export all variables.
835# Otherwise a system limit (for SysV at least) may be exceeded.
836.NOEXPORT:
diff --git a/libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c b/libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c
deleted file mode 100644
index 0210f1d..0000000
--- a/libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c
+++ /dev/null
@@ -1,1593 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <string.h>
6
7#ifdef HAVE_NETINET_IN_H
8# include <sys/types.h>
9# include <netinet/in.h>
10#endif
11
12#ifdef HAVE_WINSOCK2_H
13# include <winsock2.h>
14#endif
15
16#if USE_GNUTLS_OPENSSL
17# include <gnutls/openssl.h>
18#elif USE_OPENSSL
19# include <openssl/ssl.h>
20#endif
21
22#include <Ecore.h>
23#include <ecore_private.h>
24#include <Ecore_Con.h>
25
26#include "Ecore_Ipc.h"
27#include "ecore_ipc_private.h"
28
29#define DLT_ZERO 0
30#define DLT_ONE 1
31#define DLT_SAME 2
32#define DLT_SHL 3
33#define DLT_SHR 4
34#define DLT_ADD8 5
35#define DLT_DEL8 6
36#define DLT_ADDU8 7
37#define DLT_DELU8 8
38#define DLT_ADD16 9
39#define DLT_DEL16 10
40#define DLT_ADDU16 11
41#define DLT_DELU16 12
42#define DLT_SET 13
43#define DLT_R1 14
44#define DLT_R2 15
45
46int _ecore_ipc_log_dom = -1;
47
48EAPI unsigned short
49_ecore_ipc_swap_16(unsigned short v)
50{
51 unsigned char *s, t;
52
53 s = (unsigned char *)(&v);
54 t = s[0]; s[0] = s[1]; s[1] = t;
55 return v;
56}
57
58EAPI unsigned int
59_ecore_ipc_swap_32(unsigned int v)
60{
61 unsigned char *s, t;
62
63 s = (unsigned char *)(&v);
64 t = s[0]; s[0] = s[3]; s[3] = t;
65 t = s[1]; s[1] = s[2]; s[2] = t;
66 return v;
67}
68
69EAPI unsigned long long
70_ecore_ipc_swap_64(unsigned long long v)
71{
72 unsigned char *s, t;
73
74 s = (unsigned char *)(&v);
75 t = s[0]; s[0] = s[7]; s[7] = t;
76 t = s[1]; s[1] = s[6]; s[6] = t;
77 t = s[2]; s[2] = s[5]; s[5] = t;
78 t = s[3]; s[3] = s[4]; s[4] = t;
79 return v;
80}
81
82static int _ecore_ipc_dlt_int(int out, int prev, int *mode);
83static int _ecore_ipc_ddlt_int(int in, int prev, int mode);
84
85static int
86_ecore_ipc_dlt_int(int out, int prev, int *mode)
87{
88 int dlt;
89
90 /* 0 byte */
91 if (out == 0)
92 {
93 *mode = DLT_ZERO;
94 return 0;
95 }
96 if (out == (int)0xffffffff)
97 {
98 *mode = DLT_ONE;
99 return 0;
100 }
101 if (out == prev)
102 {
103 *mode = DLT_SAME;
104 return 0;
105 }
106 if (out == prev << 1)
107 {
108 *mode = DLT_SHL;
109 return 0;
110 }
111 if (out == prev >> 1)
112 {
113 *mode = DLT_SHR;
114 return 0;
115 }
116 /* 1 byte */
117 dlt = out - prev;
118 if (!(dlt & 0xffffff00))
119 {
120 *mode = DLT_ADD8;
121 return dlt & 0xff;
122 }
123 dlt = prev - out;
124 if (!(dlt & 0xffffff00))
125 {
126 *mode = DLT_DEL8;
127 return dlt & 0xff;
128 }
129 dlt = out - prev;
130 if (!(dlt & 0x00ffffff))
131 {
132 *mode = DLT_ADDU8;
133 return (dlt >> 24) & 0xff;
134 }
135 dlt = prev - out;
136 if (!(dlt & 0x00ffffff))
137 {
138 *mode = DLT_DELU8;
139 return (dlt >> 24) & 0xff;
140 }
141 /* 2 byte */
142 dlt = out - prev;
143 if (!(dlt & 0xffff0000))
144 {
145 *mode = DLT_ADD16;
146 return dlt & 0xffff;
147 }
148 dlt = prev - out;
149 if (!(dlt & 0xffff0000))
150 {
151 *mode = DLT_DEL16;
152 return dlt & 0xffff;
153 }
154 dlt = out - prev;
155 if (!(dlt & 0x0000ffff))
156 {
157 *mode = DLT_ADDU16;
158 return (dlt >> 16) & 0xffff;
159 }
160 dlt = prev - out;
161 if (!(dlt & 0x0000ffff))
162 {
163 *mode = DLT_DELU16;
164 return (dlt >> 16) & 0xffff;
165 }
166 /* 4 byte */
167 *mode = DLT_SET;
168 return out;
169}
170
171static int
172_ecore_ipc_ddlt_int(int in, int prev, int mode)
173{
174 switch (mode)
175 {
176 case DLT_ZERO:
177 return 0;
178 break;
179 case DLT_ONE:
180 return 0xffffffff;
181 break;
182 case DLT_SAME:
183 return prev;
184 break;
185 case DLT_SHL:
186 return prev << 1;
187 break;
188 case DLT_SHR:
189 return prev >> 1;
190 break;
191 case DLT_ADD8:
192 return prev + in;
193 break;
194 case DLT_DEL8:
195 return prev - in;
196 break;
197 case DLT_ADDU8:
198 return prev + (in << 24);
199 break;
200 case DLT_DELU8:
201 return prev - (in << 24);
202 break;
203 case DLT_ADD16:
204 return prev + in;
205 break;
206 case DLT_DEL16:
207 return prev - in;
208 break;
209 case DLT_ADDU16:
210 return prev + (in << 16);
211 break;
212 case DLT_DELU16:
213 return prev - (in << 16);
214 break;
215 case DLT_SET:
216 return in;
217 break;
218 case DLT_R1:
219 return 0;
220 break;
221 case DLT_R2:
222 return 0;
223 break;
224 default:
225 break;
226 }
227 return 0;
228}
229
230static Eina_Bool _ecore_ipc_event_client_add(void *data, int ev_type, void *ev);
231static Eina_Bool _ecore_ipc_event_client_del(void *data, int ev_type, void *ev);
232static Eina_Bool _ecore_ipc_event_server_add(void *data, int ev_type, void *ev);
233static Eina_Bool _ecore_ipc_event_server_del(void *data, int ev_type, void *ev);
234static Eina_Bool _ecore_ipc_event_client_data(void *data, int ev_type, void *ev);
235static Eina_Bool _ecore_ipc_event_server_data(void *data, int ev_type, void *ev);
236static void _ecore_ipc_event_client_add_free(void *data, void *ev);
237static void _ecore_ipc_event_client_del_free(void *data, void *ev);
238static void _ecore_ipc_event_client_data_free(void *data, void *ev);
239static void _ecore_ipc_event_server_add_free(void *data, void *ev);
240static void _ecore_ipc_event_server_del_free(void *data, void *ev);
241static void _ecore_ipc_event_server_data_free(void *data, void *ev);
242
243EAPI int ECORE_IPC_EVENT_CLIENT_ADD = 0;
244EAPI int ECORE_IPC_EVENT_CLIENT_DEL = 0;
245EAPI int ECORE_IPC_EVENT_SERVER_ADD = 0;
246EAPI int ECORE_IPC_EVENT_SERVER_DEL = 0;
247EAPI int ECORE_IPC_EVENT_CLIENT_DATA = 0;
248EAPI int ECORE_IPC_EVENT_SERVER_DATA = 0;
249
250static int _ecore_ipc_init_count = 0;
251static Eina_List *servers = NULL;
252static Ecore_Event_Handler *handler[6];
253
254/**
255 * @defgroup Ecore_IPC_Library_Group IPC Library Functions
256 *
257 * Functions that set up and shut down the Ecore IPC Library.
258 */
259
260/**
261 * Initialises the Ecore IPC library.
262 * @return Number of times the library has been initialised without
263 * being shut down.
264 * @ingroup Ecore_IPC_Library_Group
265 */
266EAPI int
267ecore_ipc_init(void)
268{
269 int i = 0;
270
271 if (++_ecore_ipc_init_count != 1)
272 return _ecore_ipc_init_count;
273 _ecore_ipc_log_dom = eina_log_domain_register
274 ("ecore_ipc", ECORE_IPC_DEFAULT_LOG_COLOR);
275 if(_ecore_ipc_log_dom < 0)
276 {
277 EINA_LOG_ERR("Impossible to create a log domain for the Ecore IPC module.");
278 return --_ecore_ipc_init_count;
279 }
280 if (!ecore_con_init())
281 return --_ecore_ipc_init_count;
282
283 ECORE_IPC_EVENT_CLIENT_ADD = ecore_event_type_new();
284 ECORE_IPC_EVENT_CLIENT_DEL = ecore_event_type_new();
285 ECORE_IPC_EVENT_SERVER_ADD = ecore_event_type_new();
286 ECORE_IPC_EVENT_SERVER_DEL = ecore_event_type_new();
287 ECORE_IPC_EVENT_CLIENT_DATA = ecore_event_type_new();
288 ECORE_IPC_EVENT_SERVER_DATA = ecore_event_type_new();
289
290 handler[i++] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_ADD,
291 _ecore_ipc_event_client_add, NULL);
292 handler[i++] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DEL,
293 _ecore_ipc_event_client_del, NULL);
294 handler[i++] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD,
295 _ecore_ipc_event_server_add, NULL);
296 handler[i++] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL,
297 _ecore_ipc_event_server_del, NULL);
298 handler[i++] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DATA,
299 _ecore_ipc_event_client_data, NULL);
300 handler[i] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
301 _ecore_ipc_event_server_data, NULL);
302 return _ecore_ipc_init_count;
303}
304
305/**
306 * Shuts down the Ecore IPC library.
307 * @return Number of times the library has been initialised without being
308 * shut down.
309 * @ingroup Ecore_IPC_Library_Group
310 */
311EAPI int
312ecore_ipc_shutdown(void)
313{
314 int i;
315
316 if (--_ecore_ipc_init_count != 0)
317 return _ecore_ipc_init_count;
318
319 Eina_List *l, *l2;
320 Ecore_Ipc_Server *svr;
321 EINA_LIST_FOREACH_SAFE(servers, l, l2, svr)
322 ecore_ipc_server_del(svr);
323
324 for (i = 0; i < 6; i++)
325 ecore_event_handler_del(handler[i]);
326
327 ecore_con_shutdown();
328 eina_log_domain_unregister(_ecore_ipc_log_dom);
329 _ecore_ipc_log_dom = -1;
330 return _ecore_ipc_init_count;
331}
332
333/**
334 * @defgroup Ecore_IPC_Server_Group IPC Server Functions
335 *
336 * Functions the deal with IPC server objects.
337 */
338
339/**
340 * Creates an IPC server that listens for connections.
341 *
342 * For more details about the @p compl_type, @p name and @p port
343 * parameters, see the @ref ecore_con_server_add documentation.
344 *
345 * @param compl_type The connection type.
346 * @param name Name to associate with the socket used for connection.
347 * @param port Number to identify with socket used for connection.
348 * @param data Data to associate with the IPC server.
349 * @return New IPC server. If there is an error, @c NULL is returned.
350 * @ingroup Ecore_IPC_Server_Group
351 * @todo Need to add protocol type parameter to this function.
352 */
353EAPI Ecore_Ipc_Server *
354ecore_ipc_server_add(Ecore_Ipc_Type compl_type, const char *name, int port, const void *data)
355{
356 Ecore_Ipc_Server *svr;
357 Ecore_Ipc_Type type;
358 Ecore_Con_Type extra = 0;
359
360 svr = calloc(1, sizeof(Ecore_Ipc_Server));
361 if (!svr) return NULL;
362 type = compl_type;
363 type &= ~ECORE_IPC_USE_SSL;
364 if (compl_type & ECORE_IPC_USE_SSL) extra = ECORE_CON_USE_SSL;
365 switch (type)
366 {
367 case ECORE_IPC_LOCAL_USER:
368 svr->server = ecore_con_server_add(ECORE_CON_LOCAL_USER | extra, name, port, svr);
369 break;
370 case ECORE_IPC_LOCAL_SYSTEM:
371 svr->server = ecore_con_server_add(ECORE_CON_LOCAL_SYSTEM | extra, name, port, svr);
372 break;
373 case ECORE_IPC_REMOTE_SYSTEM:
374 svr->server = ecore_con_server_add(ECORE_CON_REMOTE_SYSTEM | extra, name, port, svr);
375 break;
376 default:
377 free(svr);
378 return NULL;
379 }
380 if (!svr->server)
381 {
382 free(svr);
383 return NULL;
384 }
385 svr->max_buf_size = 32 * 1024;
386 svr->data = (void *)data;
387 servers = eina_list_append(servers, svr);
388 ECORE_MAGIC_SET(svr, ECORE_MAGIC_IPC_SERVER);
389 return svr;
390}
391
392/**
393 * Creates an IPC server object to represent the IPC server listening
394 * on the given port.
395 *
396 * For more details about the @p compl_type, @p name and @p port
397 * parameters, see the @ref ecore_con_server_connect documentation.
398 *
399 * @param compl_type The IPC connection type.
400 * @param name Name used to determine which socket to use for the
401 * IPC connection.
402 * @param port Number used to identify the socket to use for the
403 * IPC connection.
404 * @param data Data to associate with the server.
405 * @return A new IPC server. @c NULL is returned on error.
406 * @ingroup Ecore_IPC_Server_Group
407 * @todo Need to add protocol type parameter.
408 */
409EAPI Ecore_Ipc_Server *
410ecore_ipc_server_connect(Ecore_Ipc_Type compl_type, char *name, int port, const void *data)
411{
412 Ecore_Ipc_Server *svr;
413 Ecore_Ipc_Type type;
414 Ecore_Con_Type extra = 0;
415
416 svr = calloc(1, sizeof(Ecore_Ipc_Server));
417 if (!svr) return NULL;
418 type = compl_type;
419 type &= ~ECORE_IPC_USE_SSL;
420 if (compl_type & ECORE_IPC_USE_SSL) extra = ECORE_CON_USE_SSL;
421 switch (type)
422 {
423 case ECORE_IPC_LOCAL_USER:
424 svr->server = ecore_con_server_connect(ECORE_CON_LOCAL_USER | extra, name, port, svr);
425 break;
426 case ECORE_IPC_LOCAL_SYSTEM:
427 svr->server = ecore_con_server_connect(ECORE_CON_LOCAL_SYSTEM | extra, name, port, svr);
428 break;
429 case ECORE_IPC_REMOTE_SYSTEM:
430 svr->server = ecore_con_server_connect(ECORE_CON_REMOTE_SYSTEM | extra, name, port, svr);
431 break;
432 default:
433 free(svr);
434 return NULL;
435 }
436 if (!svr->server)
437 {
438 free(svr);
439 return NULL;
440 }
441 svr->max_buf_size = -1;
442 svr->data = (void *)data;
443 servers = eina_list_append(servers, svr);
444 ECORE_MAGIC_SET(svr, ECORE_MAGIC_IPC_SERVER);
445 return svr;
446}
447
448/**
449 * Closes the connection and frees the given IPC server.
450 * @param svr The given IPC server.
451 * @return The data associated with the server when it was created.
452 * @ingroup Ecore_IPC_Server_Group
453 */
454EAPI void *
455ecore_ipc_server_del(Ecore_Ipc_Server *svr)
456{
457 void *data;
458
459 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
460 {
461 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
462 "ecore_ipc_server_del");
463 return NULL;
464 }
465 if (svr->delete_me) return NULL;
466
467 data = svr->data;
468 svr->data = NULL;
469 svr->delete_me = 1;
470 if (svr->event_count == 0)
471 {
472 Ecore_Ipc_Client *cl;
473
474 EINA_LIST_FREE(svr->clients, cl)
475 ecore_ipc_client_del(cl);
476 ecore_con_server_del(svr->server);
477 servers = eina_list_remove(servers, svr);
478
479 if (svr->buf) free(svr->buf);
480 ECORE_MAGIC_SET(svr, ECORE_MAGIC_NONE);
481 free(svr);
482 }
483 return data;
484}
485
486/**
487 * Retrieves the data associated with the given IPC server.
488 * @param svr The given IPC server.
489 * @return The associated data.
490 * @ingroup Ecore_IPC_Server_Group
491 */
492EAPI void *
493ecore_ipc_server_data_get(Ecore_Ipc_Server *svr)
494{
495 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
496 {
497 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
498 "ecore_ipc_server_data_get");
499 return NULL;
500 }
501 return svr->data;
502}
503
504/**
505 * Retrieves whether the given IPC server is currently connected.
506 * @param svr The given IPC server.
507 * @return #EINA_TRUE if the server is connected. #EINA_FALSE otherwise.
508 * @ingroup Ecore_IPC_Server_Group
509 */
510EAPI Eina_Bool
511ecore_ipc_server_connected_get(Ecore_Ipc_Server *svr)
512{
513 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
514 {
515 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
516 "ecore_ipc_server_connected_get");
517 return EINA_FALSE;
518 }
519 return ecore_con_server_connected_get(svr->server);
520}
521
522/**
523 * Retrieves the list of clients for this server.
524 * @param svr The given IPC server.
525 * @return An Eina_List with the clients.
526 * @ingroup Ecore_IPC_Server_Group
527 */
528EAPI Eina_List *
529ecore_ipc_server_clients_get(Ecore_Ipc_Server *svr)
530{
531 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
532 {
533 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
534 "ecore_ipc_server_clients_get");
535 return NULL;
536 }
537 return svr->client_list;
538}
539
540#define SVENC(_member) \
541 d = _ecore_ipc_dlt_int(msg._member, svr->prev.o._member, &md); \
542 if (md >= DLT_SET) \
543 { \
544 unsigned int v; \
545 unsigned char *dd; \
546 dd = (unsigned char *)&v; \
547 v = d; \
548 v = htonl(v); \
549 *(dat + s + 0) = dd[0]; \
550 *(dat + s + 1) = dd[1]; \
551 *(dat + s + 2) = dd[2]; \
552 *(dat + s + 3) = dd[3]; \
553 s += 4; \
554 } \
555 else if (md >= DLT_ADD16) \
556 { \
557 unsigned short v; \
558 unsigned char *dd; \
559 dd = (unsigned char *)&v; \
560 v = d; \
561 v = htons(v); \
562 *(dat + s + 0) = dd[0]; \
563 *(dat + s + 1) = dd[1]; \
564 s += 2; \
565 } \
566 else if (md >= DLT_ADD8) \
567 { \
568 *(dat + s + 0) = (unsigned char)d; \
569 s += 1; \
570 }
571
572/**
573 * Sends a message to the given IPC server.
574 *
575 * The content of the parameters, excluding the @p svr paramter, is up to
576 * the client.
577 *
578 * @param svr The given IPC server.
579 * @param major Major opcode of the message.
580 * @param minor Minor opcode of the message.
581 * @param ref Message reference number.
582 * @param ref_to Reference number of the message this message refers to.
583 * @param response Requires response.
584 * @param data The data to send as part of the message.
585 * @param size Length of the data, in bytes, to send.
586 * @return Number of bytes sent. @c 0 is returned if there is an error.
587 * @ingroup Ecore_IPC_Server_Group
588 * @todo This function needs to become an IPC message.
589 * @todo Fix up the documentation: Make sure what ref_to and response are.
590 */
591EAPI int
592ecore_ipc_server_send(Ecore_Ipc_Server *svr, int major, int minor, int ref, int ref_to, int response, const void *data, int size)
593{
594 Ecore_Ipc_Msg_Head msg;
595 int ret;
596 int *head, md = 0, d, s;
597 unsigned char dat[sizeof(Ecore_Ipc_Msg_Head)];
598
599 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
600 {
601 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
602 "ecore_ipc_server_send");
603 return 0;
604 }
605 if (size < 0) size = 0;
606 msg.major = major;
607 msg.minor = minor;
608 msg.ref = ref;
609 msg.ref_to = ref_to;
610 msg.response = response;
611 msg.size = size;
612 head = (int *)dat;
613 s = 4;
614 SVENC(major);
615 *head = md;
616 SVENC(minor);
617 *head |= md << (4 * 1);
618 SVENC(ref);
619 *head |= md << (4 * 2);
620 SVENC(ref_to);
621 *head |= md << (4 * 3);
622 SVENC(response);
623 *head |= md << (4 * 4);
624 SVENC(size);
625 *head |= md << (4 * 5);
626 *head = htonl(*head);
627 svr->prev.o = msg;
628 ret = ecore_con_server_send(svr->server, dat, s);
629 if (size > 0) ret += ecore_con_server_send(svr->server, data, size);
630 return ret;
631}
632
633/**
634 * Sets a limit on the number of clients that can be handled concurrently
635 * by the given server, and a policy on what to do if excess clients try to
636 * connect.
637 * Beware that if you set this once ecore is already running, you may
638 * already have pending CLIENT_ADD events in your event queue. Those
639 * clients have already connected and will not be affected by this call.
640 * Only clients subsequently trying to connect will be affected.
641 * @param svr The given server.
642 * @param client_limit The maximum number of clients to handle
643 * concurrently. -1 means unlimited (default). 0
644 * effectively disables the server.
645 * @param reject_excess_clients Set to 1 to automatically disconnect
646 * excess clients as soon as they connect if you are
647 * already handling client_limit clients. Set to 0
648 * (default) to just hold off on the "accept()"
649 * system call until the number of active clients
650 * drops. This causes the kernel to queue up to 4096
651 * connections (or your kernel's limit, whichever is
652 * lower).
653 * @ingroup Ecore_Ipc_Server_Group
654 */
655EAPI void
656ecore_ipc_server_client_limit_set(Ecore_Ipc_Server *svr, int client_limit, char reject_excess_clients)
657{
658 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
659 {
660 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
661 "ecore_ipc_server_client_limit_set");
662 return;
663 }
664 ecore_con_server_client_limit_set(svr->server, client_limit, reject_excess_clients);
665}
666
667/**
668 * Sets the max data payload size for an Ipc message in bytes
669 *
670 * @param svr The given server.
671 * @param size The maximum data payload size in bytes.
672 * @ingroup Ecore_Ipc_Server_Group
673 */
674EAPI void
675ecore_ipc_server_data_size_max_set(Ecore_Ipc_Server *svr, int size)
676{
677 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
678 {
679 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
680 "ecore_ipc_server_data_size_max_set");
681 return;
682 }
683 svr->max_buf_size = size;
684}
685
686/**
687 * Gets the max data payload size for an Ipc message in bytes
688 *
689 * @param svr The given server.
690 * @return The maximum data payload in bytes.
691 * @ingroup Ecore_Ipc_Server_Group
692 */
693EAPI int
694ecore_ipc_server_data_size_max_get(Ecore_Ipc_Server *svr)
695{
696 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
697 {
698 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
699 "ecore_ipc_server_data_size_max_get");
700 return -1;
701 }
702 return svr->max_buf_size;
703}
704
705/**
706 * Gets the IP address of a server that has been connected to.
707 *
708 * @param svr The given server.
709 * @return A pointer to an internal string that contains the IP address of
710 * the connected server in the form "XXX.YYY.ZZZ.AAA" IP notation.
711 * This string should not be modified or trusted to stay valid after
712 * deletion for the @p svr object. If no IP is known NULL is returned.
713 * @ingroup Ecore_Ipc_Server_Group
714 */
715EAPI const char *
716ecore_ipc_server_ip_get(Ecore_Ipc_Server *svr)
717{
718 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
719 {
720 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
721 "ecore_ipc_server_ip_get");
722 return NULL;
723 }
724 return ecore_con_server_ip_get(svr->server);
725}
726
727/**
728 * Flushes all pending data to the given server. Will return when done.
729 *
730 * @param svr The given server.
731 * @ingroup Ecore_Ipc_Server_Group
732 */
733EAPI void
734ecore_ipc_server_flush(Ecore_Ipc_Server *svr)
735{
736 if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
737 {
738 ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
739 "ecore_ipc_server_server_flush");
740 return;
741 }
742 ecore_con_server_flush(svr->server);
743}
744
745#define CLENC(_member) \
746 d = _ecore_ipc_dlt_int(msg._member, cl->prev.o._member, &md); \
747 if (md >= DLT_SET) \
748 { \
749 unsigned int v; \
750 unsigned char *dd; \
751 dd = (unsigned char *)&v; \
752 v = d; \
753 v = htonl(v); \
754 *(dat + s + 0) = dd[0]; \
755 *(dat + s + 1) = dd[1]; \
756 *(dat + s + 2) = dd[2]; \
757 *(dat + s + 3) = dd[3]; \
758 s += 4; \
759 } \
760 else if (md >= DLT_ADD16) \
761 { \
762 unsigned short v; \
763 unsigned char *dd; \
764 dd = (unsigned char *)&v; \
765 v = d; \
766 v = htons(v); \
767 *(dat + s + 0) = dd[0]; \
768 *(dat + s + 1) = dd[1]; \
769 s += 2; \
770 } \
771 else if (md >= DLT_ADD8) \
772 { \
773 *(dat + s) = (unsigned char)d; \
774 s += 1; \
775 }
776
777/**
778 * @defgroup Ecore_IPC_Client_Group IPC Client Functions
779 *
780 * Functions that deal with IPC client objects.
781 */
782
783/**
784 * Sends a message to the given IPC client.
785 * @param cl The given IPC client.
786 * @param major Major opcode of the message.
787 * @param minor Minor opcode of the message.
788 * @param ref Reference number of the message.
789 * @param ref_to Reference number of the message this message refers to.
790 * @param response Requires response.
791 * @param data The data to send as part of the message.
792 * @param size Length of the data, in bytes, to send.
793 * @return The number of bytes sent. @c 0 will be returned if there is
794 * an error.
795 * @ingroup Ecore_IPC_Client_Group
796 * @todo This function needs to become an IPC message.
797 * @todo Make sure ref_to and response parameters are described correctly.
798 */
799EAPI int
800ecore_ipc_client_send(Ecore_Ipc_Client *cl, int major, int minor, int ref, int ref_to, int response, const void *data, int size)
801{
802 Ecore_Ipc_Msg_Head msg;
803 int ret;
804 int *head, md = 0, d, s;
805 unsigned char dat[sizeof(Ecore_Ipc_Msg_Head)];
806
807 if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
808 {
809 ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
810 "ecore_ipc_client_send");
811 return 0;
812 }
813 if (size < 0) size = 0;
814 msg.major = major;
815 msg.minor = minor;
816 msg.ref = ref;
817 msg.ref_to = ref_to;
818 msg.response = response;
819 msg.size = size;
820 head = (int *)dat;
821 s = 4;
822 CLENC(major);
823 *head = md;
824 CLENC(minor);
825 *head |= md << (4 * 1);
826 CLENC(ref);
827 *head |= md << (4 * 2);
828 CLENC(ref_to);
829 *head |= md << (4 * 3);
830 CLENC(response);
831 *head |= md << (4 * 4);
832 CLENC(size);
833 *head |= md << (4 * 5);
834 *head = htonl(*head);
835 cl->prev.o = msg;
836 ret = ecore_con_client_send(cl->client, dat, s);
837 if (size > 0) ret += ecore_con_client_send(cl->client, data, size);
838 return ret;
839}
840
841/**
842 * Retrieves the IPC server that the given IPC client is connected to.
843 * @param cl The given IPC client.
844 * @return The IPC server the IPC client is connected to.
845 * @ingroup Ecore_IPC_Client_Group
846 */
847EAPI Ecore_Ipc_Server *
848ecore_ipc_client_server_get(Ecore_Ipc_Client *cl)
849{
850 if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
851 {
852 ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
853 "ecore_ipc_client_server_get");
854 return NULL;
855 }
856 return (ecore_con_server_data_get(ecore_con_client_server_get(cl->client)));
857}
858
859/**
860 * Closes the connection and frees memory allocated to the given IPC
861 * client.
862 * @param cl The given client.
863 * @return Data associated with the client.
864 * @ingroup Ecore_IPC_Client_Group
865 */
866EAPI void *
867ecore_ipc_client_del(Ecore_Ipc_Client *cl)
868{
869 void *data;
870 Ecore_Ipc_Server *svr;
871
872 if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
873 {
874 ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
875 "ecore_ipc_client_del");
876 return NULL;
877 }
878 data = cl->data;
879 cl->data = NULL;
880 cl->delete_me = 1;
881 if (cl->event_count == 0)
882 {
883 svr = ecore_con_server_data_get(ecore_con_client_server_get(cl->client));
884 ecore_con_client_del(cl->client);
885 svr->clients = eina_list_remove(svr->clients, cl);
886 if (cl->buf) free(cl->buf);
887 ECORE_MAGIC_SET(cl, ECORE_MAGIC_NONE);
888 free(cl);
889 }
890 return data;
891}
892
893/**
894 * Sets the IPC data associated with the given IPC client to @p data.
895 * @param cl The given IPC client.
896 * @param data The data to associate with the IPC client.
897 * @ingroup Ecore_IPC_Client_Group
898 */
899EAPI void
900ecore_ipc_client_data_set(Ecore_Ipc_Client *cl, const void *data)
901{
902 if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
903 {
904 ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
905 "ecore_ipc_client_data_set");
906 return;
907 }
908 cl->data = (void *)data;
909}
910
911/**
912 * Retrieves the data that has been associated with the given IPC client.
913 * @param cl The given client.
914 * @return The data associated with the IPC client.
915 * @ingroup Ecore_IPC_Client_Group
916 */
917EAPI void *
918ecore_ipc_client_data_get(Ecore_Ipc_Client *cl)
919{
920 if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
921 {
922 ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
923 "ecore_ipc_client_data_get");
924 return NULL;
925 }
926 return cl->data;
927}
928
929/**
930 * Sets the max data payload size for an Ipc message in bytes
931 *
932 * @param cl The given client.
933 * @param size The maximum data payload size in bytes.
934 * @ingroup Ecore_Ipc_Client_Group
935 */
936EAPI void
937ecore_ipc_client_data_size_max_set(Ecore_Ipc_Client *cl, int size)
938{
939 if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
940 {
941 ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
942 "ecore_ipc_client_data_size_max_set");
943 return;
944 }
945 cl->max_buf_size = size;
946}
947
948/**
949 * Sets the max data payload size for an Ipc message in bytes
950 *
951 * @param cl The given client.
952 * @ingroup Ecore_Ipc_Client_Group
953 */
954EAPI int
955ecore_ipc_client_data_size_max_get(Ecore_Ipc_Client *cl)
956{
957 if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
958 {
959 ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
960 "ecore_ipc_client_data_size_max_get");
961 return -1;
962 }
963 return cl->max_buf_size;
964}
965
966/**
967 * Gets the IP address of a client that has been connected to.
968 *
969 * @param cl The given client.
970 * @return A pointer to an internal string that contains the IP address of
971 * the connected server in the form "XXX.YYY.ZZZ.AAA" IP notation.
972 * This string should not be modified or trusted to stay valid after
973 * deletion for the @p cl object. If no IP is known NULL is returned.
974 * @ingroup Ecore_Ipc_Client_Group
975 */
976EAPI const char *
977ecore_ipc_client_ip_get(Ecore_Ipc_Client *cl)
978{
979 if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
980 {
981 ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
982 "ecore_ipc_client_ip_get");
983 return NULL;
984 }
985 return ecore_con_client_ip_get(cl->client);
986}
987
988/**
989 * Flushes all pending data to the given client. Will return when done.
990 *
991 * @param cl The given client.
992 * @ingroup Ecore_Ipc_Client_Group
993 */
994EAPI void
995ecore_ipc_client_flush(Ecore_Ipc_Client *cl)
996{
997 if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
998 {
999 ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,
1000 "ecore_ipc_client_flush");
1001 return;
1002 }
1003 ecore_con_client_flush(cl->client);
1004}
1005
1006/**
1007 * Returns if SSL support is available
1008 * @return 1 if SSL is available, 0 if it is not.
1009 * @ingroup Ecore_Con_Client_Group
1010 */
1011EAPI int
1012ecore_ipc_ssl_available_get(void)
1013{
1014 return ecore_con_ssl_available_get();
1015}
1016
1017
1018static Eina_Bool
1019_ecore_ipc_event_client_add(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1020{
1021 Ecore_Con_Event_Client_Add *e;
1022
1023 e = ev;
1024 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return ECORE_CALLBACK_RENEW;
1025 /* handling code here */
1026 {
1027 Ecore_Ipc_Client *cl;
1028 Ecore_Ipc_Server *svr;
1029
1030 cl = calloc(1, sizeof(Ecore_Ipc_Client));
1031 if (!cl) return ECORE_CALLBACK_CANCEL;
1032 svr = ecore_con_server_data_get(ecore_con_client_server_get(e->client));
1033 ECORE_MAGIC_SET(cl, ECORE_MAGIC_IPC_CLIENT);
1034 cl->client = e->client;
1035 cl->max_buf_size = 32 * 1024;
1036 ecore_con_client_data_set(cl->client, (void *)cl);
1037 svr->clients = eina_list_append(svr->clients, cl);
1038 svr->client_list = eina_list_append(svr->client_list, cl);
1039 if (!cl->delete_me)
1040 {
1041 Ecore_Ipc_Event_Client_Add *e2;
1042
1043 e2 = calloc(1, sizeof(Ecore_Ipc_Event_Client_Add));
1044 if (e2)
1045 {
1046 cl->event_count++;
1047 e2->client = cl;
1048 ecore_event_add(ECORE_IPC_EVENT_CLIENT_ADD, e2,
1049 _ecore_ipc_event_client_add_free, NULL);
1050 }
1051 }
1052 }
1053 return ECORE_CALLBACK_CANCEL;
1054}
1055
1056static Eina_Bool
1057_ecore_ipc_event_client_del(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1058{
1059 Ecore_Con_Event_Client_Del *e;
1060
1061 e = ev;
1062 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return ECORE_CALLBACK_RENEW;
1063 /* handling code here */
1064 {
1065 Ecore_Ipc_Client *cl;
1066
1067 cl = ecore_con_client_data_get(e->client);
1068 {
1069 Ecore_Ipc_Event_Client_Del *e2;
1070 Ecore_Ipc_Server *svr;
1071
1072 svr = ecore_con_server_data_get(ecore_con_client_server_get(e->client));
1073 svr->client_list = eina_list_remove(svr->client_list, cl);
1074 if (!cl->delete_me)
1075 {
1076 e2 = calloc(1, sizeof(Ecore_Ipc_Event_Client_Del));
1077 if (e2)
1078 {
1079 cl->event_count++;
1080 e2->client = cl;
1081 ecore_event_add(ECORE_IPC_EVENT_CLIENT_DEL, e2,
1082 _ecore_ipc_event_client_del_free, NULL);
1083 }
1084 }
1085 }
1086 }
1087 return ECORE_CALLBACK_CANCEL;
1088}
1089
1090static Eina_Bool
1091_ecore_ipc_event_server_add(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1092{
1093 Ecore_Con_Event_Server_Add *e;
1094
1095 e = ev;
1096 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return ECORE_CALLBACK_RENEW;
1097 /* handling code here */
1098 {
1099 Ecore_Ipc_Server *svr;
1100
1101 svr = ecore_con_server_data_get(e->server);
1102 if (!svr->delete_me)
1103 {
1104 Ecore_Ipc_Event_Server_Add *e2;
1105
1106 e2 = calloc(1, sizeof(Ecore_Ipc_Event_Server_Add));
1107 if (e2)
1108 {
1109 svr->event_count++;
1110 e2->server = svr;
1111 ecore_event_add(ECORE_IPC_EVENT_SERVER_ADD, e2,
1112 _ecore_ipc_event_server_add_free, NULL);
1113 }
1114 }
1115 }
1116 return ECORE_CALLBACK_CANCEL;
1117}
1118
1119static Eina_Bool
1120_ecore_ipc_event_server_del(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1121{
1122 Ecore_Con_Event_Server_Del *e;
1123
1124 e = ev;
1125 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return ECORE_CALLBACK_RENEW;
1126 /* handling code here */
1127 {
1128 Ecore_Ipc_Server *svr;
1129
1130 svr = ecore_con_server_data_get(e->server);
1131 if (!svr->delete_me)
1132 {
1133 Ecore_Ipc_Event_Server_Del *e2;
1134
1135 e2 = calloc(1, sizeof(Ecore_Ipc_Event_Server_Del));
1136 if (e2)
1137 {
1138 svr->event_count++;
1139 e2->server = svr;
1140 ecore_event_add(ECORE_IPC_EVENT_SERVER_DEL, e2,
1141 _ecore_ipc_event_server_del_free, NULL);
1142 }
1143 }
1144 }
1145 return ECORE_CALLBACK_CANCEL;
1146}
1147
1148#define CLSZ(_n) \
1149 md = ((head >> (4 * _n)) & 0xf); \
1150 if (md >= DLT_SET) s += 4; \
1151 else if (md >= DLT_ADD16) s += 2; \
1152 else if (md >= DLT_ADD8) s += 1;
1153
1154#define CLDEC(_n, _member) \
1155 md = ((head >> (4 * _n)) & 0xf); \
1156 if (md >= DLT_SET) \
1157 { \
1158 unsigned int v; \
1159 unsigned char *dv; \
1160 dv = (unsigned char *)&v; \
1161 dv[0] = *(cl->buf + offset + s + 0); \
1162 dv[1] = *(cl->buf + offset + s + 1); \
1163 dv[2] = *(cl->buf + offset + s + 2); \
1164 dv[3] = *(cl->buf + offset + s + 3); \
1165 d = (int)ntohl(v); \
1166 s += 4; \
1167 } \
1168 else if (md >= DLT_ADD16) \
1169 { \
1170 unsigned short v; \
1171 unsigned char *dv; \
1172 dv = (unsigned char *)&v; \
1173 dv[0] = *(cl->buf + offset + s + 0); \
1174 dv[1] = *(cl->buf + offset + s + 1); \
1175 d = (int)ntohs(v); \
1176 s += 2; \
1177 } \
1178 else if (md >= DLT_ADD8) \
1179 { \
1180 unsigned char v; \
1181 unsigned char *dv; \
1182 dv = (unsigned char *)&v; \
1183 dv[0] = *(cl->buf + offset + s + 0); \
1184 d = (int)v; \
1185 s += 1; \
1186 } \
1187 msg._member = _ecore_ipc_ddlt_int(d, cl->prev.i._member, md);
1188
1189static Eina_Bool
1190_ecore_ipc_event_client_data(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1191{
1192 Ecore_Con_Event_Client_Data *e;
1193
1194 e = ev;
1195 if (!eina_list_data_find(servers, ecore_con_server_data_get(ecore_con_client_server_get(e->client)))) return ECORE_CALLBACK_RENEW;
1196 /* handling code here */
1197 {
1198 Ecore_Ipc_Client *cl;
1199 Ecore_Ipc_Msg_Head msg;
1200 int offset = 0;
1201 unsigned char *buf;
1202
1203 cl = ecore_con_client_data_get(e->client);
1204
1205 if (!cl->buf)
1206 {
1207 cl->buf_size = e->size;
1208 cl->buf = e->data;
1209 e->data = NULL; /* take it out of the old event */
1210 }
1211 else
1212 {
1213 buf = realloc(cl->buf, cl->buf_size + e->size);
1214 if (!buf)
1215 {
1216 free(cl->buf);
1217 cl->buf = 0;
1218 cl->buf_size = 0;
1219 return ECORE_CALLBACK_CANCEL;
1220 }
1221 cl->buf = buf;
1222 memcpy(cl->buf + cl->buf_size, e->data, e->size);
1223 cl->buf_size += e->size;
1224 }
1225 /* examine header */
1226 redo:
1227 if ((cl->buf_size - offset) >= (int)sizeof(int))
1228 {
1229 int s, md, d = 0, head;
1230 unsigned char *dd;
1231
1232 dd = (unsigned char *)&head;
1233 dd[0] = *(cl->buf + offset + 0);
1234 dd[1] = *(cl->buf + offset + 1);
1235 dd[2] = *(cl->buf + offset + 2);
1236 dd[3] = *(cl->buf + offset + 3);
1237 head = ntohl(head);
1238 dd = (unsigned char *)&d;
1239 s = 4;
1240 CLSZ(0);
1241 CLSZ(1);
1242 CLSZ(2);
1243 CLSZ(3);
1244 CLSZ(4);
1245 CLSZ(5);
1246 if ((cl->buf_size - offset) < s)
1247 {
1248 if (offset > 0) goto scroll;
1249 return ECORE_CALLBACK_CANCEL;
1250 }
1251
1252 s = 4;
1253 CLDEC(0, major);
1254 CLDEC(1, minor);
1255 CLDEC(2, ref);
1256 CLDEC(3, ref_to);
1257 CLDEC(4, response);
1258 CLDEC(5, size);
1259 if (msg.size < 0) msg.size = 0;
1260 /* there is enough data in the buffer for a full message */
1261 if ((cl->buf_size - offset) >= (s + msg.size))
1262 {
1263 Ecore_Ipc_Event_Client_Data *e2;
1264 Ecore_Ipc_Server *svr;
1265 int max, max2;
1266
1267 buf = NULL;
1268 svr = ecore_con_server_data_get(ecore_con_client_server_get(cl->client));
1269 max = svr->max_buf_size;
1270 max2 = cl->max_buf_size;
1271 if ((max >= 0) && (max2 >= 0))
1272 {
1273 if (max2 < max) max = max2;
1274 }
1275 else
1276 {
1277 if (max < 0) max = max2;
1278 }
1279 if ((max < 0) || (msg.size <= max))
1280 {
1281 if (msg.size > 0)
1282 {
1283 buf = malloc(msg.size);
1284 if (!buf) return ECORE_CALLBACK_CANCEL;
1285 memcpy(buf, cl->buf + offset + s, msg.size);
1286 }
1287 if (!cl->delete_me)
1288 {
1289 e2 = calloc(1, sizeof(Ecore_Ipc_Event_Client_Data));
1290 if (e2)
1291 {
1292 cl->event_count++;
1293 e2->client = cl;
1294 e2->major = msg.major;
1295 e2->minor = msg.minor;
1296 e2->ref = msg.ref;
1297 e2->ref_to = msg.ref_to;
1298 e2->response = msg.response;
1299 e2->size = msg.size;
1300 e2->data = buf;
1301 ecore_event_add(ECORE_IPC_EVENT_CLIENT_DATA, e2,
1302 _ecore_ipc_event_client_data_free,
1303 NULL);
1304 }
1305 }
1306 }
1307 cl->prev.i = msg;
1308 offset += (s + msg.size);
1309 if (cl->buf_size == offset)
1310 {
1311 free(cl->buf);
1312 cl->buf = NULL;
1313 cl->buf_size = 0;
1314 return ECORE_CALLBACK_CANCEL;
1315 }
1316 goto redo;
1317 }
1318 else goto scroll;
1319 }
1320 else
1321 {
1322 scroll:
1323 buf = malloc(cl->buf_size - offset);
1324 if (!buf)
1325 {
1326 free(cl->buf);
1327 cl->buf = NULL;
1328 cl->buf_size = 0;
1329 return ECORE_CALLBACK_CANCEL;
1330 }
1331 memcpy(buf, cl->buf + offset, cl->buf_size - offset);
1332 free(cl->buf);
1333 cl->buf = buf;
1334 cl->buf_size -= offset;
1335 }
1336 }
1337 return ECORE_CALLBACK_CANCEL;
1338}
1339
1340#define SVSZ(_n) \
1341 md = ((head >> (4 * _n)) & 0xf); \
1342 if (md >= DLT_SET) s += 4; \
1343 else if (md >= DLT_ADD16) s += 2; \
1344 else if (md >= DLT_ADD8) s += 1;
1345
1346#define SVDEC(_n, _member) \
1347 md = ((head >> (4 * _n)) & 0xf); \
1348 if (md >= DLT_SET) \
1349 { \
1350 unsigned int v; \
1351 unsigned char *dv; \
1352 dv = (unsigned char *)&v; \
1353 dv[0] = *(svr->buf + offset + s + 0); \
1354 dv[1] = *(svr->buf + offset + s + 1); \
1355 dv[2] = *(svr->buf + offset + s + 2); \
1356 dv[3] = *(svr->buf + offset + s + 3); \
1357 d = (int)ntohl(v); \
1358 s += 4; \
1359 } \
1360 else if (md >= DLT_ADD16) \
1361 { \
1362 unsigned short v; \
1363 unsigned char *dv; \
1364 dv = (unsigned char *)&v; \
1365 dv[0] = *(svr->buf + offset + s + 0); \
1366 dv[1] = *(svr->buf + offset + s + 1); \
1367 d = (int)ntohs(v); \
1368 s += 2; \
1369 } \
1370 else if (md >= DLT_ADD8) \
1371 { \
1372 unsigned char v; \
1373 unsigned char *dv; \
1374 dv = (unsigned char *)&v; \
1375 dv[0] = *(svr->buf + offset + s + 0); \
1376 d = (int)v; \
1377 s += 1; \
1378 } \
1379 msg._member = _ecore_ipc_ddlt_int(d, svr->prev.i._member, md);
1380
1381static Eina_Bool
1382_ecore_ipc_event_server_data(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
1383{
1384 Ecore_Con_Event_Server_Data *e;
1385
1386 e = ev;
1387 if (!eina_list_data_find(servers, ecore_con_server_data_get(e->server))) return ECORE_CALLBACK_RENEW;
1388 /* handling code here */
1389 {
1390 Ecore_Ipc_Server *svr;
1391 Ecore_Ipc_Msg_Head msg;
1392 int offset = 0;
1393 unsigned char *buf;
1394
1395 svr = ecore_con_server_data_get(e->server);
1396
1397 if (!svr->buf)
1398 {
1399 svr->buf_size = e->size;
1400 svr->buf = e->data;
1401 e->data = NULL; /* take it out of the old event */
1402 }
1403 else
1404 {
1405 buf = realloc(svr->buf, svr->buf_size + e->size);
1406 if (!buf)
1407 {
1408 free(svr->buf);
1409 svr->buf = 0;
1410 svr->buf_size = 0;
1411 return ECORE_CALLBACK_CANCEL;
1412 }
1413 svr->buf = buf;
1414 memcpy(svr->buf + svr->buf_size, e->data, e->size);
1415 svr->buf_size += e->size;
1416 }
1417 /* examine header */
1418 redo:
1419 if ((svr->buf_size - offset) >= (int)sizeof(int))
1420 {
1421 int s, md, d = 0, head;
1422 unsigned char *dd;
1423
1424 dd = (unsigned char *)&head;
1425 dd[0] = *(svr->buf + offset + 0);
1426 dd[1] = *(svr->buf + offset + 1);
1427 dd[2] = *(svr->buf + offset + 2);
1428 dd[3] = *(svr->buf + offset + 3);
1429 head = ntohl(head);
1430 dd = (unsigned char *)&d;
1431 s = 4;
1432 SVSZ(0);
1433 SVSZ(1);
1434 SVSZ(2);
1435 SVSZ(3);
1436 SVSZ(4);
1437 SVSZ(5);
1438 if ((svr->buf_size - offset) < s)
1439 {
1440 if (offset > 0) goto scroll;
1441 return ECORE_CALLBACK_CANCEL;
1442 }
1443
1444 s = 4;
1445 SVDEC(0, major);
1446 SVDEC(1, minor);
1447 SVDEC(2, ref);
1448 SVDEC(3, ref_to);
1449 SVDEC(4, response);
1450 SVDEC(5, size);
1451 if (msg.size < 0) msg.size = 0;
1452 /* there is enough data in the buffer for a full message */
1453 if ((svr->buf_size - offset) >= (s + msg.size))
1454 {
1455 Ecore_Ipc_Event_Server_Data *e2;
1456 int max;
1457
1458 buf = NULL;
1459 max = svr->max_buf_size;
1460 if ((max < 0) || (msg.size <= max))
1461 {
1462 if (msg.size > 0)
1463 {
1464 buf = malloc(msg.size);
1465 if (!buf) return ECORE_CALLBACK_CANCEL;
1466 memcpy(buf, svr->buf + offset + s, msg.size);
1467 }
1468 if (!svr->delete_me)
1469 {
1470 e2 = calloc(1, sizeof(Ecore_Ipc_Event_Server_Data));
1471 if (e2)
1472 {
1473 svr->event_count++;
1474 e2->server = svr;
1475 e2->major = msg.major;
1476 e2->minor = msg.minor;
1477 e2->ref = msg.ref;
1478 e2->ref_to = msg.ref_to;
1479 e2->response = msg.response;
1480 e2->size = msg.size;
1481 e2->data = buf;
1482 ecore_event_add(ECORE_IPC_EVENT_SERVER_DATA, e2,
1483 _ecore_ipc_event_server_data_free,
1484 NULL);
1485 }
1486 }
1487 }
1488 svr->prev.i = msg;
1489 offset += (s + msg.size);
1490 if (svr->buf_size == offset)
1491 {
1492 free(svr->buf);
1493 svr->buf = NULL;
1494 svr->buf_size = 0;
1495 return ECORE_CALLBACK_CANCEL;
1496 }
1497 goto redo;
1498 }
1499 else goto scroll;
1500 }
1501 else
1502 {
1503 scroll:
1504 buf = malloc(svr->buf_size - offset);
1505 if (!buf)
1506 {
1507 free(svr->buf);
1508 svr->buf = NULL;
1509 svr->buf_size = 0;
1510 return ECORE_CALLBACK_CANCEL;
1511 }
1512 memcpy(buf, svr->buf + offset, svr->buf_size - offset);
1513 free(svr->buf);
1514 svr->buf = buf;
1515 svr->buf_size -= offset;
1516 }
1517 }
1518 return ECORE_CALLBACK_CANCEL;
1519}
1520
1521static void
1522_ecore_ipc_event_client_add_free(void *data __UNUSED__, void *ev)
1523{
1524 Ecore_Ipc_Event_Client_Add *e;
1525
1526 e = ev;
1527 e->client->event_count--;
1528 if ((e->client->event_count == 0) && (e->client->delete_me))
1529 ecore_ipc_client_del(e->client);
1530 free(e);
1531}
1532
1533static void
1534_ecore_ipc_event_client_del_free(void *data __UNUSED__, void *ev)
1535{
1536 Ecore_Ipc_Event_Client_Del *e;
1537
1538 e = ev;
1539 e->client->event_count--;
1540 if ((e->client->event_count == 0) && (e->client->delete_me))
1541 ecore_ipc_client_del(e->client);
1542 free(e);
1543}
1544
1545static void
1546_ecore_ipc_event_client_data_free(void *data __UNUSED__, void *ev)
1547{
1548 Ecore_Ipc_Event_Client_Data *e;
1549
1550 e = ev;
1551 e->client->event_count--;
1552 if (e->data) free(e->data);
1553 if ((e->client->event_count == 0) && (e->client->delete_me))
1554 ecore_ipc_client_del(e->client);
1555 free(e);
1556}
1557
1558static void
1559_ecore_ipc_event_server_add_free(void *data __UNUSED__, void *ev)
1560{
1561 Ecore_Ipc_Event_Server_Add *e;
1562
1563 e = ev;
1564 e->server->event_count--;
1565 if ((e->server->event_count == 0) && (e->server->delete_me))
1566 ecore_ipc_server_del(e->server);
1567 free(e);
1568}
1569
1570static void
1571_ecore_ipc_event_server_del_free(void *data __UNUSED__, void *ev)
1572{
1573 Ecore_Ipc_Event_Server_Add *e;
1574
1575 e = ev;
1576 e->server->event_count--;
1577 if ((e->server->event_count == 0) && (e->server->delete_me))
1578 ecore_ipc_server_del(e->server);
1579 free(e);
1580}
1581
1582static void
1583_ecore_ipc_event_server_data_free(void *data __UNUSED__, void *ev)
1584{
1585 Ecore_Ipc_Event_Server_Data *e;
1586
1587 e = ev;
1588 if (e->data) free(e->data);
1589 e->server->event_count--;
1590 if ((e->server->event_count == 0) && (e->server->delete_me))
1591 ecore_ipc_server_del(e->server);
1592 free(e);
1593}
diff --git a/libraries/ecore/src/lib/ecore_ipc/ecore_ipc_private.h b/libraries/ecore/src/lib/ecore_ipc/ecore_ipc_private.h
deleted file mode 100644
index 57f7849..0000000
--- a/libraries/ecore/src/lib/ecore_ipc/ecore_ipc_private.h
+++ /dev/null
@@ -1,104 +0,0 @@
1#ifndef _ECORE_IPC_PRIVATE_H
2#define _ECORE_IPC_PRIVATE_H
3
4
5extern int _ecore_ipc_log_dom;
6
7#ifdef ECORE_IPC_DEFAULT_LOG_COLOR
8# undef ECORE_IPC_DEFAULT_LOG_COLOR
9#endif
10#define ECORE_IPC_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
11
12#ifdef ERR
13# undef ERR
14#endif
15#define ERR(...) EINA_LOG_DOM_ERR(_ecore_ipc_log_dom, __VA_ARGS__)
16
17#ifdef DBG
18# undef DBG
19#endif
20#define DBG(...) EINA_LOG_DOM_DBG(_ecore_ipc_log_dom, __VA_ARGS__)
21
22#ifdef INF
23# undef INF
24#endif
25#define INF(...) EINA_LOG_DOM_INFO(_ecore_ipc_log_dom, __VA_ARGS__)
26
27#ifdef WRN
28# undef WRN
29#endif
30#define WRN(...) EINA_LOG_DOM_WARN(_ecore_ipc_log_dom, __VA_ARGS__)
31
32#ifdef CRIT
33# undef CRIT
34#endif
35#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_ipc_log_dom, __VA_ARGS__)
36
37#define ECORE_MAGIC_IPC_SERVER 0x87786556
38#define ECORE_MAGIC_IPC_CLIENT 0x78875665
39
40typedef struct _Ecore_Ipc_Msg_Head Ecore_Ipc_Msg_Head;
41
42
43#if defined (_MSC_VER) || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
44# pragma pack(1)
45# define ECORE_IPC_STRUCT_PACKED
46#elif defined (__GNUC__) || (defined (__SUNPRO_C) && __SUNPRO_C >= 0x5100)
47# define ECORE_IPC_STRUCT_PACKED __attribute__((packed))
48#else
49# define ECORE_IPC_STRUCT_PACKED
50#endif
51
52#ifdef __sgi
53#pragma pack 4
54#endif
55struct _Ecore_Ipc_Msg_Head
56{
57 int major;
58 int minor;
59 int ref;
60 int ref_to;
61 int response;
62 int size;
63} ECORE_IPC_STRUCT_PACKED;
64#ifdef __sgi
65#pragma pack 0
66#endif
67
68struct _Ecore_Ipc_Client
69{
70 ECORE_MAGIC;
71 Ecore_Con_Client *client;
72 void *data;
73 unsigned char *buf;
74 int buf_size;
75 int max_buf_size;
76
77 struct {
78 Ecore_Ipc_Msg_Head i, o;
79 } prev;
80
81 int event_count;
82 char delete_me : 1;
83};
84
85struct _Ecore_Ipc_Server
86{
87 ECORE_MAGIC;
88 Ecore_Con_Server *server;
89 Eina_List *clients;
90 Eina_List *client_list;
91 void *data;
92 unsigned char *buf;
93 int buf_size;
94 int max_buf_size;
95
96 struct {
97 Ecore_Ipc_Msg_Head i, o;
98 } prev;
99
100 int event_count;
101 char delete_me : 1;
102};
103
104#endif