summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2014-09-23 16:24:32 -0400
committerzmike <michael.blumenkrantz@gmail.com>2017-02-23 15:09:03 -0500
commit906f9c210022577061cb90bac6e23a0014553049 (patch)
treec5bb53dfee919ccc881c58263f3a66b448a2664e
parent208d211e1a36f55abb35f58e40b471d75e2b8b2d (diff)
only export azy_value_util funcs for old efl, don't require linking azy when using code generator
-rw-r--r--configure.ac10
-rw-r--r--src/bin/azy.mk3
-rw-r--r--src/bin/azy/azy.c16
-rw-r--r--src/bin/azy/azy_parser_main.c15
-rw-r--r--src/include/azy/Azy.h22
-rw-r--r--src/include/azy/Azy.h.in643
-rw-r--r--src/lib/azy/azy_utils.c2
-rw-r--r--src/lib/azy/azy_value.c5
8 files changed, 711 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 8c46b2e..42dab2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,7 +153,16 @@ if test "x$build_azy" = "xyes" ; then
153 PKG_CHECK_MODULES([AZY], [$AZY_REQUIRES]) 153 PKG_CHECK_MODULES([AZY], [$AZY_REQUIRES])
154fi 154fi
155 155
156OLD_EFL=0
156AM_CONDITIONAL([BUILD_AZY], [test "x${build_azy}" = "xyes"]) 157AM_CONDITIONAL([BUILD_AZY], [test "x${build_azy}" = "xyes"])
158if test "x$build_azy" = "xyes" ; then
159 AC_CHECK_LIB([eina], [eina_value_util_struct_desc_new],
160 [],[
161 AC_DEFINE_UNQUOTED([OLD_EFL], [1], [EFL version is earlier than 1.12])
162 OLD_EFL=1
163 ])
164fi
165AC_SUBST([OLD_EFL])
157 166
158AC_ARG_ENABLE([mysql-tests], 167AC_ARG_ENABLE([mysql-tests],
159 [AC_HELP_STRING([--disable-mysql-tests], [disable code for mysql in tests @<:@default=yes@:>@])], 168 [AC_HELP_STRING([--disable-mysql-tests], [disable code for mysql in tests @<:@default=yes@:>@])],
@@ -426,6 +435,7 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
426AC_CONFIG_FILES([ 435AC_CONFIG_FILES([
427Makefile 436Makefile
428doc/azy.dox 437doc/azy.dox
438src/include/azy/Azy.h
429azy.pc 439azy.pc
430email.pc 440email.pc
431shotgun.pc 441shotgun.pc
diff --git a/src/bin/azy.mk b/src/bin/azy.mk
index c9087d2..c2c4cc6 100644
--- a/src/bin/azy.mk
+++ b/src/bin/azy.mk
@@ -28,7 +28,8 @@ src/bin/azy_parser.y
28src_bin_azy_parser_CPPFLAGS = \ 28src_bin_azy_parser_CPPFLAGS = \
29$(BIN_CPPFLAGS) \ 29$(BIN_CPPFLAGS) \
30$(AZY_CFLAGS) \ 30$(AZY_CFLAGS) \
31-I$(top_srcdir)/src/bin/azy 31-I$(top_srcdir)/src/bin/azy \
32-I$(top_srcdir)/src/include/azy
32 33
33src_bin_azy_parser_LDADD = \ 34src_bin_azy_parser_LDADD = \
34$(AZY_LIBS) \ 35$(AZY_LIBS) \
diff --git a/src/bin/azy/azy.c b/src/bin/azy/azy.c
index d4e0554..479058c 100644
--- a/src/bin/azy/azy.c
+++ b/src/bin/azy/azy.c
@@ -65,9 +65,14 @@ azy_typedef_new(int type,
65 } 65 }
66 else if (!strcmp(name, "base64")) 66 else if (!strcmp(name, "base64"))
67 { 67 {
68#ifdef OLD_EFL
68 t->copy_func = eina_stringshare_add("azy_util_strdup"); 69 t->copy_func = eina_stringshare_add("azy_util_strdup");
69 t->etype = eina_stringshare_add("EINA_VALUE_TYPE_STRING");
70 t->eq_func = eina_stringshare_add("azy_util_streq"); 70 t->eq_func = eina_stringshare_add("azy_util_streq");
71#else
72 t->copy_func = eina_stringshare_add("eina_strdup");
73 t->eq_func = eina_stringshare_add("eina_streq");
74#endif
75 t->etype = eina_stringshare_add("EINA_VALUE_TYPE_STRING");
71 } 76 }
72 else if (!strcmp(name, "int")) 77 else if (!strcmp(name, "int"))
73 t->etype = eina_stringshare_add("EINA_VALUE_TYPE_INT"); 78 t->etype = eina_stringshare_add("EINA_VALUE_TYPE_INT");
@@ -117,12 +122,21 @@ azy_new(void)
117 122
118 c = calloc(1, sizeof(Azy_Model)); 123 c = calloc(1, sizeof(Azy_Model));
119 EINA_SAFETY_ON_NULL_RETURN_VAL(c, NULL); 124 EINA_SAFETY_ON_NULL_RETURN_VAL(c, NULL);
125#ifdef OLD_EFL
120 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "int", "int", "int", "0", sizeof(int), "eina_value_get", "azy_value_util_int_new", NULL, "%i")); 126 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "int", "int", "int", "0", sizeof(int), "eina_value_get", "azy_value_util_int_new", NULL, "%i"));
121 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "boolean", "boolean", "Eina_Bool", "EINA_FALSE", sizeof(Eina_Bool), "eina_value_get", "azy_value_util_bool_new", NULL, "%s")); 127 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "boolean", "boolean", "Eina_Bool", "EINA_FALSE", sizeof(Eina_Bool), "eina_value_get", "azy_value_util_bool_new", NULL, "%s"));
122 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "double", "double", "double", "0.0", sizeof(double), "eina_value_get", "azy_value_util_double_new", NULL, "%g")); 128 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "double", "double", "double", "0.0", sizeof(double), "eina_value_get", "azy_value_util_double_new", NULL, "%g"));
123 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "string", "string", "Eina_Stringshare *", "NULL", sizeof(char*), "azy_value_util_string_copy", "azy_value_util_string_new", "eina_stringshare_del", "%s")); 129 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "string", "string", "Eina_Stringshare *", "NULL", sizeof(char*), "azy_value_util_string_copy", "azy_value_util_string_new", "eina_stringshare_del", "%s"));
124 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "time", "time", "time_t", "0", sizeof(time_t), "eina_value_get", "azy_value_util_time_new", NULL, "%ld")); 130 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "time", "time", "time_t", "0", sizeof(time_t), "eina_value_get", "azy_value_util_time_new", NULL, "%ld"));
125 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "base64", "base64", "char *", "NULL", sizeof(char*), "azy_value_util_base64_copy", "azy_value_util_base64_new", "free", "%s")); 131 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "base64", "base64", "char *", "NULL", sizeof(char*), "azy_value_util_base64_copy", "azy_value_util_base64_new", "free", "%s"));
132#else
133 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "int", "int", "int", "0", sizeof(int), "eina_value_get", "eina_value_util_int_new", NULL, "%i"));
134 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "boolean", "boolean", "Eina_Bool", "EINA_FALSE", sizeof(Eina_Bool), "eina_value_get", "eina_value_util_bool_new", NULL, "%s"));
135 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "double", "double", "double", "0.0", sizeof(double), "eina_value_get", "eina_value_util_double_new", NULL, "%g"));
136 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "string", "string", "Eina_Stringshare *", "NULL", sizeof(char*), "eina_value_util_stringshare_copy", "eina_value_util_stringshare_new", "eina_stringshare_del", "%s"));
137 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "time", "time", "time_t", "0", sizeof(time_t), "eina_value_get", "eina_value_util_time_new", NULL, "%ld"));
138 c->types = eina_list_append(c->types, azy_typedef_new(TD_BASE, "base64", "base64", "char *", "NULL", sizeof(char*), "eina_value_util_string_copy", "eina_value_util_string_new", "free", "%s"));
139#endif
126 return c; 140 return c;
127} 141}
128 142
diff --git a/src/bin/azy/azy_parser_main.c b/src/bin/azy/azy_parser_main.c
index e2094e7..558f6f8 100644
--- a/src/bin/azy/azy_parser_main.c
+++ b/src/bin/azy/azy_parser_main.c
@@ -180,8 +180,11 @@ gen_type_marshalizers(Azy_Typedef *t,
180 NL; 180 NL;
181 EL(1, "if (!azy_user_type) return NULL;"); 181 EL(1, "if (!azy_user_type) return NULL;");
182 NL; 182 NL;
183 183#ifdef OLD_EFL
184 EL(1, "st_desc = azy_value_util_struct_desc_new();"); 184 EL(1, "st_desc = azy_value_util_struct_desc_new();");
185#else
186 EL(1, "st_desc = eina_value_util_struct_desc_new();");
187#endif
185 EL(1, "members = malloc(%u * sizeof(Eina_Value_Struct_Member));", eina_list_count(t->struct_members)); 188 EL(1, "members = malloc(%u * sizeof(Eina_Value_Struct_Member));", eina_list_count(t->struct_members));
186 EL(1, "st_desc->members = members;"); 189 EL(1, "st_desc->members = members;");
187 EL(1, "st_desc->member_count = %u;", eina_list_count(t->struct_members)); 190 EL(1, "st_desc->member_count = %u;", eina_list_count(t->struct_members));
@@ -189,9 +192,17 @@ gen_type_marshalizers(Azy_Typedef *t,
189 EINA_LIST_FOREACH(t->struct_members, l, m) 192 EINA_LIST_FOREACH(t->struct_members, l, m)
190 { 193 {
191 EL(1, "members[%u].name = eina_stringshare_add(\"%s\");", x, m->strname ? m->strname : m->name); 194 EL(1, "members[%u].name = eina_stringshare_add(\"%s\");", x, m->strname ? m->strname : m->name);
195#ifdef OLD_EFL
192 EL(1, "offset = azy_value_util_type_offset(%s, offset);", m->type->etype); 196 EL(1, "offset = azy_value_util_type_offset(%s, offset);", m->type->etype);
197#else
198 EL(1, "offset = eina_value_util_type_offset(%s, offset);", m->type->etype);
199#endif
193 EL(1, "members[%u].offset = offset;", x); 200 EL(1, "members[%u].offset = offset;", x);
201#ifdef OLD_EFL
194 EL(1, "offset += azy_value_util_type_size(%s);", m->type->etype); 202 EL(1, "offset += azy_value_util_type_size(%s);", m->type->etype);
203#else
204 EL(1, "offset += eina_value_util_type_size(%s);", m->type->etype);
205#endif
195 EL(1, "members[%u].type = %s;", x, m->type->etype); 206 EL(1, "members[%u].type = %s;", x, m->type->etype);
196 x++; 207 x++;
197 } 208 }
@@ -1019,7 +1030,6 @@ gen_common_headers(void)
1019 EL(0, "# include \"config.h\""); 1030 EL(0, "# include \"config.h\"");
1020 EL(0, "#endif"); 1031 EL(0, "#endif");
1021 EL(0, "#include <Eina.h>"); 1032 EL(0, "#include <Eina.h>");
1022 EL(0, "#include <Azy.h>");
1023 EL(0, "#include \"%s%sCommon.h\"", name, sep); 1033 EL(0, "#include \"%s%sCommon.h\"", name, sep);
1024 1034
1025 NL; 1035 NL;
@@ -1045,7 +1055,6 @@ gen_common_impl(void)
1045 EL(0, "#include <string.h>"); 1055 EL(0, "#include <string.h>");
1046 EL(0, "#include <inttypes.h>"); 1056 EL(0, "#include <inttypes.h>");
1047 EL(0, "#include <errno.h>"); 1057 EL(0, "#include <errno.h>");
1048 EL(0, "#include <Azy.h>");
1049 NL; 1058 NL;
1050 1059
1051 EL(0, "Eina_Bool"); 1060 EL(0, "Eina_Bool");
diff --git a/src/include/azy/Azy.h b/src/include/azy/Azy.h
index ba8e295..049e091 100644
--- a/src/include/azy/Azy.h
+++ b/src/include/azy/Azy.h
@@ -371,8 +371,14 @@ EAPI Azy_Net_Transport azy_util_transport_get(const char *content_type);
371EAPI Eina_Bool azy_util_ip_is_valid(const char *ip); 371EAPI Eina_Bool azy_util_ip_is_valid(const char *ip);
372EAPI Eina_Bool azy_util_domain_match(const char *domain, const char *match); 372EAPI Eina_Bool azy_util_domain_match(const char *domain, const char *match);
373EAPI time_t azy_util_date_parse(char *start, char **end); 373EAPI time_t azy_util_date_parse(char *start, char **end);
374
375#if 0
374EAPI char *azy_util_strdup(const char *str); 376EAPI char *azy_util_strdup(const char *str);
375EAPI Eina_Bool azy_util_streq(const char *a, const char *b); 377EAPI Eina_Bool azy_util_streq(const char *a, const char *b);
378#else
379#define azy_util_strdup eina_strdup
380#define azy_util_streq eina_streq
381#endif
376 382
377/* server */ 383/* server */
378EAPI void azy_server_stop(Azy_Server *server); 384EAPI void azy_server_stop(Azy_Server *server);
@@ -478,6 +484,7 @@ EAPI Azy_Value_Type azy_value_util_type_get(const Eina_Value *val);
478EAPI Eina_Bool azy_value_util_retval_is_error(const Eina_Value *val, int *errcode, const char **errmsg); 484EAPI Eina_Bool azy_value_util_retval_is_error(const Eina_Value *val, int *errcode, const char **errmsg);
479EAPI void azy_value_util_dump(const Eina_Value *v, Eina_Strbuf *string, unsigned int indent); 485EAPI void azy_value_util_dump(const Eina_Value *v, Eina_Strbuf *string, unsigned int indent);
480 486
487#if 0
481EAPI Eina_Value_Struct_Desc *azy_value_util_struct_desc_new(void); 488EAPI Eina_Value_Struct_Desc *azy_value_util_struct_desc_new(void);
482EAPI Eina_Value *azy_value_util_int_new(int i); 489EAPI Eina_Value *azy_value_util_int_new(int i);
483EAPI Eina_Value *azy_value_util_double_new(double d); 490EAPI Eina_Value *azy_value_util_double_new(double d);
@@ -491,6 +498,21 @@ EAPI Eina_Bool azy_value_util_string_copy(const Eina_Value *val, Eina_Stringshar
491EAPI Eina_Bool azy_value_util_base64_copy(const Eina_Value *val, char **str); 498EAPI Eina_Bool azy_value_util_base64_copy(const Eina_Value *val, char **str);
492EAPI unsigned int azy_value_util_type_offset(const Eina_Value_Type *type, unsigned base); 499EAPI unsigned int azy_value_util_type_offset(const Eina_Value_Type *type, unsigned base);
493EAPI size_t azy_value_util_type_size(const Eina_Value_Type *type); 500EAPI size_t azy_value_util_type_size(const Eina_Value_Type *type);
501#else
502#define azy_value_util_struct_desc_new eina_value_util_struct_desc_new
503#define azy_value_util_int_new eina_value_util_int_new
504#define azy_value_util_double_new eina_value_util_double_new
505#define azy_value_util_bool_new eina_value_util_bool_new
506#define azy_value_util_base64_new eina_value_util_string_new
507#define azy_value_util_string_new eina_value_util_stringshare_new
508#define azy_value_util_time_new eina_value_util_time_new
509#define azy_value_util_time_string_new eina_value_util_time_string_new
510#define azy_value_util_copy eina_value_util_dup
511#define azy_value_util_string_copy eina_value_util_stringshare_copy
512#define azy_value_util_base64_copy eina_value_util_string_copy
513#define azy_value_util_type_offset eina_value_util_type_offset
514#define azy_value_util_type_size eina_value_util_type_size
515#endif
494 516
495/* content */ 517/* content */
496EAPI Azy_Content *azy_content_new(const char *method); 518EAPI Azy_Content *azy_content_new(const char *method);
diff --git a/src/include/azy/Azy.h.in b/src/include/azy/Azy.h.in
new file mode 100644
index 0000000..361225f
--- /dev/null
+++ b/src/include/azy/Azy.h.in
@@ -0,0 +1,643 @@
1/* Azy - Networking toolkit
2 * Copyright 2010, 2011, 2012, 2013 Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library;
16 * if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef AZY_H
20#define AZY_H
21
22#include <Eina.h>
23#include <Eet.h>
24
25#ifdef EAPI
26# undef EAPI
27#endif
28
29#ifdef _WIN32
30# ifdef DLL_EXPORT
31# define EAPI __declspec(dllexport)
32# else
33# define EAPI
34# endif /* ! DLL_EXPORT */
35#else
36# ifdef __GNUC__
37# if __GNUC__ >= 4
38# define EAPI __attribute__ ((visibility("default")))
39# else
40# define EAPI
41# endif
42# else
43# define EAPI
44# endif
45#endif /* ! _WIN32 */
46
47/**
48 * @defgroup Azy_Events Azy Events
49 * @brief Events that are emitted from the library
50 * @{
51 */
52EAPI extern int AZY_EVENT_CLIENT_DISCONNECTED; /**< Event emitted upon client disconnecting, sends #Azy_Client object */
53EAPI extern int AZY_EVENT_CLIENT_CONNECTED; /**< Event emitted upon client connecting, sends #Azy_Client object */
54EAPI extern int AZY_EVENT_CLIENT_UPGRADE; /**< Event emitted upon client successfully upgrading to TLS, sends #Azy_Client object */
55EAPI extern int AZY_EVENT_CLIENT_TRANSFER_COMPLETE; /**< Event emitted upon client method returning if
56 no callback was set, sends #Azy_Event_Client_Transfer_Complete */
57EAPI extern int AZY_EVENT_SERVER_CLIENT_ADD; /**< Event emitted upon client connecting to server,
58 sends #Azy_Server object */
59EAPI extern int AZY_EVENT_SERVER_CLIENT_UPGRADE; /**< Event emitted upon client successfully upgrading to TLS, sends #Azy_Server_Module object */
60EAPI extern int AZY_EVENT_SERVER_CLIENT_DEL; /**< Event emitted upon client disconnecting from server,
61 sends #Azy_Server object */
62
63EAPI extern int AZY_EVENT_CLIENT_TRANSFER_PROGRESS; /**< Event emitted when a GET request makes progress, sends #Azy_Event_Client_Transfer_Progress */
64/**@}*/
65/**
66 * @defgroup Azy_Typedefs Azy types
67 * @brief These types are used throughout the library
68 * @{
69 */
70
71/**
72 * @typedef Azy_Server
73 * A server object for hosting a server, and is used by the
74 * azy_server namespace
75 */
76typedef struct Azy_Server Azy_Server;
77/**
78 * @typedef Azy_Server_Module
79 * A module object which contains all of the connection info
80 * for the associated client
81 */
82typedef struct Azy_Server_Module Azy_Server_Module;
83/**
84 * @typedef Azy_Server_Module_Method
85 * A method object containing the name and callback
86 */
87typedef struct Azy_Server_Module_Method Azy_Server_Module_Method;
88/**
89 * @typedef Azy_Server_Module_Def
90 * A module definition object. This type is the means by which
91 * #Azy_Server_Module objects are created and manipulated by users
92 * of the api; contains all methods present in the module
93 */
94typedef struct Azy_Server_Module_Def Azy_Server_Module_Def;
95/**
96 * @typedef Azy_Client
97 * A client object for connecting to a server, used by the
98 * azy_client namespace
99 */
100typedef struct Azy_Client Azy_Client;
101/**
102 * @typedef Azy_Net
103 * A network object containing all connection and http
104 * information
105 */
106typedef struct Azy_Net Azy_Net;
107/**
108 * @typedef Azy_Net_Cookie
109 * An HTTP cookie
110 */
111typedef struct Azy_Net_Cookie Azy_Net_Cookie;
112/**
113 * @typedef Azy_Rss
114 * An object representing an RSS feed's content
115 */
116typedef struct Azy_Rss Azy_Rss;
117/**
118 * @typedef Azy_Rss_Item
119 * An object representing a content item from an RSS feed
120 */
121typedef struct Azy_Rss_Item Azy_Rss_Item;
122/**
123 * @typedef Azy_Rss_Link
124 * An object representing a link from an RSS feed
125 */
126typedef struct Azy_Rss_Link
127{
128 Eina_Stringshare *title; /**< The title of the link */
129 Eina_Stringshare *href; /**< The link URI */
130 Eina_Stringshare *rel; /**< The relation type */
131 Eina_Stringshare *type; /**< The content-type */
132 Eina_Stringshare *hreflang; /**< The language of the URI */
133 size_t length; /**< The size of the URI */
134} Azy_Rss_Link;
135
136typedef struct Azy_Rss_Category
137{
138 Eina_Stringshare *category;
139 Eina_Stringshare *domain;
140} Azy_Rss_Category;
141/**
142 * @typedef Azy_Rss_Contact
143 * An object representing a contact from an RSS feed
144 */
145typedef struct Azy_Rss_Contact
146{
147 const char *name; /**< Name of the contact */
148 const char *uri; /**< URI associated with the contact */
149 const char *email; /**< Email address of the contact */
150} Azy_Rss_Contact;
151
152/**
153 * @typedef Azy_Content
154 * A struct which holds the content being sent/received in an rpc method call
155 * in a list of #Azy_Value objects
156 */
157typedef struct Azy_Content Azy_Content;
158/**
159 * @typedef Azy_Client_Call_Id
160 * A unique identifier for every azy_client_call and azy_client_blank
161 * which can be used to set callbacks for the transmission
162 */
163typedef unsigned int Azy_Client_Call_Id;
164
165/**
166 * @typedef Azy_Event_Client_Transfer_Progress
167 * The event object for AZY_EVENT_CLIENT_TRANSFER_PROGRESS
168 */
169typedef struct Azy_Event_Client_Transfer_Complete
170{
171 Azy_Client_Call_Id id; /**< The id of the transfer */
172 Azy_Content *content; /**< The received content object */
173 Azy_Client *client; /**< The client making the transfer */
174} Azy_Event_Client_Transfer_Complete;
175
176/**
177 * @typedef Azy_Event_Client_Transfer_Progress
178 * The event object for AZY_EVENT_CLIENT_TRANSFER_PROGRESS
179 */
180typedef struct Azy_Event_Client_Transfer_Progress
181{
182 Azy_Client_Call_Id id; /**< The id of the transfer */
183 size_t size; /**< The number of bytes transferred in the event */
184 size_t current; /**< The total number of bytes transferred at the time of the event */
185 Azy_Net *net; /**< The receiving net object */
186 Azy_Client *client; /**< The client making the transfer */
187} Azy_Event_Client_Transfer_Progress;
188
189/**
190 * @typedef Azy_Net_Cookie_Flags
191 * The attributes of a cookie
192 */
193typedef enum
194{
195 AZY_NET_COOKIE_BLANK = 0,
196 AZY_NET_COOKIE_HTTPONLY = (1 << 0), /**< Cookie cannot be used for non-HTTP transfers */
197 AZY_NET_COOKIE_SECURE = (1 << 1), /**< Cookie cannot be used for "insecure" transfers */
198 AZY_NET_COOKIE_PERSISTENT = (1 << 2), /**< Cookie persists after current session ends */
199 AZY_NET_COOKIE_HOSTONLY = (1 << 3) /**< Cookie can only be used with exact domain matches */
200} Azy_Net_Cookie_Flags;
201
202/**
203 * @typedef Azy_Server_Type
204 * A simple enum for easily specifying the type of server to run
205 */
206typedef enum
207{
208 AZY_SERVER_NONE = 0, /**< Server listen address must be set using azy_server_addr_set */
209 AZY_SERVER_LOCAL = 1, /**< Server listen address is 127.0.0.1 */
210 AZY_SERVER_BROADCAST = 2, /**< Server listen address is 0.0.0.0 */
211 AZY_SERVER_TLS = (1 << 4) /**< If bitwise ORed into the type, server will use TLS */
212} Azy_Server_Type;
213
214/**
215 * @typedef Azy_Net_Transfer_Encoding
216 * An enum for determining transfer-encoding of a transfer
217 */
218typedef enum
219{
220 AZY_NET_TRANSFER_ENCODING_NONE, /**< No encoding set */
221 AZY_NET_TRANSFER_ENCODING_CHUNKED, /**< Using chunked encoding */
222 AZY_NET_TRANSFER_ENCODING_LAST /**< Dummy value used for setting errors and iterating */
223} Azy_Net_Transfer_Encoding;
224
225/**
226 * @typedef Azy_Net_Protocol
227 * An enum for determining which net protocol is used
228 */
229typedef enum
230{
231 AZY_NET_PROTOCOL_HTTP_1_0, /**< HTTP 1.0 */
232 AZY_NET_PROTOCOL_HTTP_1_1, /**< HTTP 1.1 */
233 AZY_NET_PROTOCOL_LAST /**< Dummy value used for setting errors and iterating */
234} Azy_Net_Protocol;
235
236typedef struct
237{
238 unsigned char *data;
239 int64_t size;
240} Azy_Net_Data;
241
242/**
243 * @typedef Azy_Client_Error
244 * Enum for client errors
245 */
246/* FIXME: THIS NEEDS TO GO AWAY OR SOMETHING!!!! */
247typedef enum
248{
249 AZY_CLIENT_ERROR_MARSHALIZER,
250 AZY_CLIENT_ERROR_CLOSED,
251 AZY_CLIENT_ERROR_CONNECT,
252 AZY_CLIENT_ERROR_IO,
253 AZY_CLIENT_ERROR_FAILED
254} Azy_Client_Error;
255
256/**
257 * @typedef Azy_Value_Type
258 * Represents the type of value stored in the #Azy_Value object
259 */
260typedef enum
261{
262 AZY_VALUE_ARRAY, /**< Array object */
263 AZY_VALUE_STRUCT, /**< Struct object */
264 AZY_VALUE_INT, /**< Int object */
265 AZY_VALUE_STRING, /**< String (stringshared) object */
266 AZY_VALUE_BOOL, /**< Boolean object */
267 AZY_VALUE_DOUBLE, /**< Double object */
268 AZY_VALUE_TIME, /**< Time (stringshared) object */
269 AZY_VALUE_BASE64, /**< Base64 encoded string (stringshared) object */
270 AZY_VALUE_LAST, /**< Base64 encoded string (stringshared) object */
271} Azy_Value_Type;
272
273/**
274 * @typedef Azy_Net_Type
275 * Represents the type of http method in the header
276 */
277typedef enum
278{
279 AZY_NET_TYPE_NONE,
280 AZY_NET_TYPE_GET,
281 AZY_NET_TYPE_POST,
282 AZY_NET_TYPE_PUT,
283 AZY_NET_TYPE_RESPONSE,
284 AZY_NET_TYPE_RESPONSE_ERROR,
285 AZY_NET_TYPE_OPTIONS
286} Azy_Net_Type;
287
288/**
289 * @typedef Azy_Net_Transport
290 * Represents the content-type in the http headers
291 */
292typedef enum
293{
294 AZY_NET_TRANSPORT_UNKNOWN,
295 AZY_NET_TRANSPORT_XML,
296 AZY_NET_TRANSPORT_JSON,
297 AZY_NET_TRANSPORT_EET,
298 AZY_NET_TRANSPORT_TEXT,
299 AZY_NET_TRANSPORT_HTML,
300 AZY_NET_TRANSPORT_ATOM,
301 AZY_NET_TRANSPORT_JAVASCRIPT
302} Azy_Net_Transport;
303
304/**
305 * @typedef Azy_Server_Module_Cb
306 * Function called on client connect (__init__) as well as to serve GET/PUT requests.
307 * If #EINA_FALSE is returned in __init__, client will be disconnected immediately.
308 * Must return #EINA_FALSE on error to prevent a response in __download__ or __upload__,
309 * otherwise response will be sent.
310 */
311typedef Eina_Bool (*Azy_Server_Module_Cb)(Azy_Server_Module *);
312/**
313 * @typedef Azy_Server_Module_Shutdown_Cb
314 * Function called when module is unloaded for given connection.
315 */
316typedef void (*Azy_Server_Module_Shutdown_Cb)(Azy_Server_Module *);
317/**
318 * @typedef Azy_Server_Module_Pre_Cb
319 * Function called prior to a regular method. The #Azy_Server_Module object
320 * contains the network data for the client, and the #Azy_Net object contains
321 * the network data which will be used for sending.
322 * Note that after this call, the network data received from the client will no longer be
323 * available.
324 */
325typedef Eina_Bool (*Azy_Server_Module_Pre_Cb)(Azy_Server_Module *, Azy_Net *);
326/**
327 * @typedef Azy_Server_Module_Content_Cb
328 * Function called after rpc method is handled as well as for fallback method.
329 */
330typedef Eina_Bool (*Azy_Server_Module_Content_Cb)(Azy_Server_Module *, Azy_Content *);
331/**
332 * @typedef Azy_Content_Cb
333 * Function to convert Eina_Value* to user type.
334 */
335typedef void * (*Azy_Content_Cb)(Eina_Value *, void **);
336/**
337 * @typedef Azy_Content_Retval_Cb
338 * Function to convert user type to Eina_Value*.
339 */
340typedef Eina_Value *(*Azy_Content_Retval_Cb)(void *);
341/**
342 * @typedef Azy_Client_Transfer_Complete_Cb
343 * Function must return AZY_ERROR_NONE (0) on success, else
344 * an error number. @p ret_content must NOT be freed.
345 */
346typedef Eina_Error (*Azy_Client_Transfer_Complete_Cb)(Azy_Client *cli, Azy_Content *ret_content, void *ret);
347
348/**
349 * @typedef Azy_Server_Module_Def_Cb
350 * Function which creates an #Azy_Server_Module_Def, used in azy_server_module_def_load().
351 */
352typedef Azy_Server_Module_Def *(*Azy_Server_Module_Def_Cb)(void);
353#define AZY_ERROR_NONE 0 /**< More explicit define for #Azy_Client_Transfer_Complete_Cb functions. */
354
355/** }@ */
356#ifdef __cplusplus
357extern "C" {
358#endif
359
360/* library */
361EAPI int azy_init(void);
362EAPI int azy_shutdown(void);
363EAPI void azy_rpc_log_enable(void);
364
365/* utils */
366EAPI char *azy_util_base64_encode(const unsigned char *string, size_t len, size_t *size);
367EAPI unsigned char *azy_util_base64_decode(const char *string, size_t len, size_t *size);
368EAPI unsigned char *azy_util_memstr(const unsigned char *big, const unsigned char *small, size_t big_len, size_t small_len);
369EAPI const char *azy_util_uuid_new(void);
370EAPI Azy_Net_Transport azy_util_transport_get(const char *content_type);
371EAPI Eina_Bool azy_util_ip_is_valid(const char *ip);
372EAPI Eina_Bool azy_util_domain_match(const char *domain, const char *match);
373EAPI time_t azy_util_date_parse(char *start, char **end);
374
375#if @OLD_EFL@
376EAPI char *azy_util_strdup(const char *str);
377EAPI Eina_Bool azy_util_streq(const char *a, const char *b);
378#else
379#define azy_util_strdup eina_strdup
380#define azy_util_streq eina_streq
381#endif
382
383/* server */
384EAPI void azy_server_stop(Azy_Server *server);
385EAPI Azy_Server *azy_server_new(Eina_Bool secure);
386EAPI void azy_server_free(Azy_Server *server);
387EAPI Eina_Bool azy_server_cert_add(Azy_Server *server, const char *cert_file);
388EAPI unsigned long int azy_server_clients_count(Azy_Server *server);
389EAPI Eina_Hash *azy_server_module_defs_get(Azy_Server *server);
390EAPI Eina_Bool azy_server_run(Azy_Server *server);
391EAPI Eina_Bool azy_server_basic_run(int port, int type, const char *cert, Azy_Server_Module_Def **modules);
392EAPI Eina_Bool azy_server_addr_set(Azy_Server *server, const char *addr);
393EAPI const char *azy_server_addr_get(Azy_Server *server);
394EAPI Eina_Bool azy_server_port_set(Azy_Server *server, int port);
395EAPI int azy_server_port_get(Azy_Server *server);
396EAPI void azy_server_ssl_enable(Azy_Server *server);
397
398/* server module */
399EAPI Eina_Bool azy_server_module_send(Azy_Server_Module *module, Azy_Net *net, const Azy_Net_Data *data);
400EAPI void *azy_server_module_data_get(Azy_Server_Module *module);
401EAPI Eina_Bool azy_server_module_params_exist(Azy_Server_Module *module);
402EAPI Azy_Net_Data *azy_server_module_recv_get(Azy_Server_Module *module);
403EAPI Eina_Bool azy_server_module_param_set(Azy_Server_Module *module, const char *name, const void *value, Eina_Free_Cb free_func);
404EAPI void *azy_server_module_param_get(Azy_Server_Module *module, const char *name);
405EAPI Azy_Net *azy_server_module_net_get(Azy_Server_Module *module);
406EAPI Azy_Server_Module_Def *azy_server_module_def_find(Azy_Server *server, const char *name);
407EAPI void azy_server_module_events_resume(Azy_Server_Module *module, Eina_Bool ret);
408EAPI void azy_server_module_events_suspend(Azy_Server_Module *module);
409EAPI Eina_Bool azy_server_module_events_rewind(Azy_Server_Module *module);
410EAPI Eina_Bool azy_server_module_events_suspended_get(Azy_Server_Module *module);
411EAPI Eina_Bool azy_server_module_active_get(Azy_Server_Module *module);
412EAPI Azy_Content *azy_server_module_content_get(Azy_Server_Module *module);
413EAPI Eina_Bool azy_server_module_add(Azy_Server *server, Azy_Server_Module_Def *module);
414EAPI Eina_Bool azy_server_module_del(Azy_Server *server, Azy_Server_Module_Def *module);
415EAPI Eina_Bool azy_server_module_name_del(Azy_Server *server, const char *name);
416EAPI Azy_Server_Module_Method *azy_server_module_method_new(const char *name, Azy_Server_Module_Content_Cb cb);
417EAPI void azy_server_module_method_free(Azy_Server_Module_Method *method);
418EAPI Azy_Server_Module_Def *azy_server_module_def_new(const char *name);
419EAPI Azy_Server_Module_Def *azy_server_module_def_load(const char *file, const char *modname);
420EAPI void azy_server_module_def_free(Azy_Server_Module_Def *def);
421EAPI void azy_server_module_def_init_shutdown_set(Azy_Server_Module_Def *def, Azy_Server_Module_Cb init, Azy_Server_Module_Shutdown_Cb shutdown);
422EAPI void azy_server_module_def_pre_post_set(Azy_Server_Module_Def *def, Azy_Server_Module_Pre_Cb pre, Azy_Server_Module_Content_Cb post);
423EAPI void azy_server_module_def_download_upload_set(Azy_Server_Module_Def *def, Azy_Server_Module_Cb download, Azy_Server_Module_Cb upload);
424EAPI void azy_server_module_def_fallback_set(Azy_Server_Module_Def *def, Azy_Server_Module_Content_Cb fallback);
425EAPI void azy_server_module_def_method_add(Azy_Server_Module_Def *def, Azy_Server_Module_Method *method);
426EAPI Eina_Bool azy_server_module_def_method_del(Azy_Server_Module_Def *def, Azy_Server_Module_Method *method);
427EAPI int azy_server_module_def_size_get(Azy_Server_Module_Def *def);
428EAPI Eina_Bool azy_server_module_size_set(Azy_Server_Module_Def *def, int size);
429EAPI double azy_server_module_version_get(Azy_Server_Module *m);
430EAPI void azy_server_module_def_version_set(Azy_Server_Module_Def *def, double version);
431EAPI Eina_Bool azy_server_module_upgrade(Azy_Server_Module *module);
432
433/* net */
434EAPI Azy_Net *azy_net_new(void *conn);
435EAPI Azy_Net *azy_net_buffer_new(void *buf, size_t size, Azy_Net_Transport transport, Eina_Bool steal);
436EAPI void *azy_net_buffer_steal(Azy_Net *net, size_t *size);
437EAPI void azy_net_free(Azy_Net *net);
438EAPI const char *azy_net_header_get(Azy_Net *net, const char *name);
439EAPI Eina_Bool azy_net_auth_set(Azy_Net *net, const char *username, const char *password);
440EAPI Eina_Bool azy_net_auth_get(Azy_Net *net, const char **username, const char **password);
441EAPI const char *azy_net_uri_get(Azy_Net *net);
442EAPI Eina_Bool azy_net_uri_set(Azy_Net *net, const char *path);
443EAPI Azy_Net_Protocol azy_net_protocol_get(Azy_Net *net);
444EAPI Eina_Bool azy_net_protocol_set(Azy_Net *net, Azy_Net_Protocol proto);
445EAPI int azy_net_code_get(Azy_Net *net);
446EAPI void azy_net_code_set(Azy_Net *net, int code);
447EAPI const char *azy_net_ip_get(Azy_Net *net);
448EAPI Azy_Net_Type azy_net_type_get(Azy_Net *net);
449EAPI int azy_net_content_length_get(Azy_Net *net);
450EAPI void azy_net_header_set(Azy_Net *net, const char *name, const char *value);
451EAPI void azy_net_headers_reset(Azy_Net *net);
452EAPI void azy_net_type_set(Azy_Net *net, Azy_Net_Type type);
453EAPI void azy_net_transport_set(Azy_Net *net, Azy_Net_Transport transport);
454EAPI Azy_Net_Transport azy_net_transport_get(Azy_Net *net);
455EAPI void azy_net_content_length_set(Azy_Net *net, int length);
456EAPI Eina_Strbuf *azy_net_header_create(Azy_Net *net);
457EAPI const char *azy_net_http_msg_get(int code);
458EAPI Azy_Net_Transfer_Encoding azy_net_transfer_encoding_get(const Azy_Net *net);
459EAPI void azy_net_transfer_encoding_set(Azy_Net *net, Azy_Net_Transfer_Encoding transfer_encoding);
460
461/* cookie */
462EAPI Azy_Net_Cookie *azy_net_cookie_parse(const Azy_Net *net, char *txt);
463EAPI time_t azy_net_cookie_expires(const Azy_Net_Cookie *ck);
464EAPI Azy_Net_Cookie_Flags azy_net_cookie_flags_get(const Azy_Net_Cookie *ck);
465EAPI Eina_Stringshare *azy_net_cookie_path_get(const Azy_Net_Cookie *ck);
466EAPI Eina_Stringshare *azy_net_cookie_domain_get(const Azy_Net_Cookie *ck);
467EAPI void azy_net_cookie_append(Azy_Net *net, Azy_Net_Cookie *ck, Eina_Bool send);
468EAPI void azy_net_cookie_set_list_clear(Azy_Net *net);
469EAPI void azy_net_cookie_send_list_clear(Azy_Net *net);
470EAPI const Eina_List *azy_net_cookie_send_list_get(const Azy_Net *net);
471EAPI const Eina_List *azy_net_cookie_set_list_get(const Azy_Net *net);
472EAPI Eina_List *azy_net_cookie_send_list_steal(Azy_Net *net);
473EAPI Eina_List *azy_net_cookie_set_list_steal(Azy_Net *net);
474EAPI void azy_net_cookie_send_list_apply(Azy_Net *net, const Eina_List *cookies);
475EAPI void azy_net_cookie_free(Azy_Net_Cookie *ck);
476EAPI Azy_Net_Cookie *azy_net_cookie_new(void);
477EAPI void azy_net_cookie_set_list_generate(Eina_Strbuf *buf, const Eina_List *cookies);
478EAPI void azy_net_cookie_send_list_generate(Eina_Strbuf *buf, const Eina_List *cookies);
479
480/* values */
481EAPI Azy_Value_Type azy_value_util_type_get(const Eina_Value *val);
482EAPI Eina_Bool azy_value_util_retval_is_error(const Eina_Value *val, int *errcode, const char **errmsg);
483EAPI void azy_value_util_dump(const Eina_Value *v, Eina_Strbuf *string, unsigned int indent);
484
485#if @OLD_EFL@
486EAPI Eina_Value_Struct_Desc *azy_value_util_struct_desc_new(void);
487EAPI Eina_Value *azy_value_util_int_new(int i);
488EAPI Eina_Value *azy_value_util_double_new(double d);
489EAPI Eina_Value *azy_value_util_bool_new(Eina_Bool b);
490EAPI Eina_Value *azy_value_util_base64_new(const char *b64);
491EAPI Eina_Value *azy_value_util_string_new(const char *str);
492EAPI Eina_Value *azy_value_util_time_new(time_t t);
493EAPI Eina_Value *azy_value_util_time_string_new(const char *timestr);
494EAPI Eina_Value *azy_value_util_copy(const Eina_Value *val);
495EAPI Eina_Bool azy_value_util_string_copy(const Eina_Value *val, Eina_Stringshare **str);
496EAPI Eina_Bool azy_value_util_base64_copy(const Eina_Value *val, char **str);
497EAPI unsigned int azy_value_util_type_offset(const Eina_Value_Type *type, unsigned base);
498EAPI size_t azy_value_util_type_size(const Eina_Value_Type *type);
499#else
500#define azy_value_util_struct_desc_new eina_value_util_struct_desc_new
501#define azy_value_util_int_new eina_value_util_int_new
502#define azy_value_util_double_new eina_value_util_double_new
503#define azy_value_util_bool_new eina_value_util_bool_new
504#define azy_value_util_base64_new eina_value_util_string_new
505#define azy_value_util_string_new eina_value_util_stringshare_new
506#define azy_value_util_time_new eina_value_util_time_new
507#define azy_value_util_time_string_new eina_value_util_time_string_new
508#define azy_value_util_copy eina_value_util_dup
509#define azy_value_util_string_copy eina_value_util_stringshare_copy
510#define azy_value_util_base64_copy eina_value_util_string_copy
511#define azy_value_util_type_offset eina_value_util_type_offset
512#define azy_value_util_type_size eina_value_util_type_size
513#endif
514
515/* content */
516EAPI Azy_Content *azy_content_new(const char *method);
517EAPI void azy_content_free(Azy_Content *content);
518EAPI Azy_Content_Cb azy_content_callback_get(Azy_Content *content);
519EAPI const char *azy_content_method_get(Azy_Content *content);
520EAPI const char *azy_content_method_full_get(Azy_Content *content);
521EAPI const char *azy_content_module_name_get(Azy_Content *content, const char *fallback);
522EAPI Azy_Net *azy_content_net_get(Azy_Content *content);
523EAPI void azy_content_param_add(Azy_Content *content, Eina_Value *val);
524EAPI Eina_Value *azy_content_param_get(Azy_Content *content, unsigned int pos);
525EAPI Eina_List *azy_content_params_get(Azy_Content *content);
526EAPI void azy_content_retval_set(Azy_Content *content, Eina_Value *val);
527EAPI void *azy_content_return_get(Azy_Content *content, Eina_Bool *rss);
528EAPI Azy_Client_Call_Id azy_content_id_get(Azy_Content *content);
529EAPI Eina_Value *azy_content_retval_get(Azy_Content *content);
530EAPI void azy_content_error_code_set(Azy_Content *content, Eina_Error code);
531EAPI void azy_content_error_faultcode_set(Azy_Content *content, Eina_Error code, int faultcode);
532EAPI void azy_content_error_faultmsg_set(Azy_Content *content, int faultcode, const char *fmt, ...);
533EAPI Eina_Bool azy_content_error_is_set(Azy_Content *content);
534EAPI void azy_content_error_reset(Azy_Content *content);
535EAPI Eina_Error azy_content_error_code_get(Azy_Content *content);
536EAPI const char *azy_content_error_message_get(Azy_Content *content);
537EAPI void azy_content_error_copy(Azy_Content *from, Azy_Content *to);
538EAPI char *azy_content_dump_string(const Azy_Content *content, unsigned int indent);
539EAPI void azy_content_data_set(Azy_Content *content, const void *data);
540EAPI void *azy_content_data_get(Azy_Content *content);
541EAPI void azy_content_retval_cb_set(Azy_Content *content, Azy_Content_Retval_Cb cb);
542EAPI Azy_Content_Retval_Cb azy_content_retval_cb_get(Azy_Content *content);
543EAPI Eina_Bool azy_content_deserialize(Azy_Content *content, Azy_Net *net);
544EAPI Eina_Bool azy_content_serialize_request(Azy_Content *content, Azy_Net_Transport type);
545EAPI Eina_Bool azy_content_deserialize_request(Azy_Content *content, Azy_Net_Transport type, char *buf, ssize_t len);
546EAPI Eina_Bool azy_content_serialize_response(Azy_Content *content, Azy_Net_Transport type);
547EAPI Eina_Bool azy_content_deserialize_response(Azy_Content *content, Azy_Net_Transport type, char *buf, ssize_t len);
548EAPI char *azy_content_serialize_json(Eina_Value *ev);
549EAPI Eina_Bool azy_content_deserialize_json(Azy_Content *content, const char *buf, ssize_t len);
550
551/* client */
552EAPI void *azy_client_data_get(Azy_Client *client);
553EAPI void azy_client_data_set(Azy_Client *client, const void *data);
554EAPI Azy_Client *azy_client_new(void);
555EAPI Eina_Bool azy_client_callback_set(Azy_Client *client, Azy_Client_Call_Id id, Azy_Client_Transfer_Complete_Cb callback);
556EAPI Eina_Bool azy_client_callback_free_set(Azy_Client *client, Azy_Client_Call_Id id, Eina_Free_Cb callback);
557EAPI void azy_client_free(Azy_Client *client);
558EAPI Eina_Bool azy_client_port_set(Azy_Client *client, int port);
559EAPI Eina_Bool azy_client_connected_get(Azy_Client *client);
560EAPI Eina_Bool azy_client_host_set(Azy_Client *client, const char *addr, int port);
561EAPI Azy_Net *azy_client_net_get(Azy_Client *client);
562EAPI void azy_client_net_set(Azy_Client *client, Azy_Net *net);
563EAPI const char *azy_client_addr_get(Azy_Client *client);
564EAPI Eina_Bool azy_client_addr_set(Azy_Client *client, const char *addr);
565EAPI int azy_client_port_get(Azy_Client *client);
566EAPI Azy_Client *azy_client_util_connect(const char *addr);
567EAPI Eina_Bool azy_client_util_reconnect(Azy_Client *client);
568EAPI Eina_Bool azy_client_secure_get(const Azy_Client *client);
569EAPI void azy_client_secure_set(Azy_Client *client, Eina_Bool secure);
570EAPI Eina_Bool azy_client_connect(Azy_Client *client);
571EAPI void azy_client_close(Azy_Client *client);
572EAPI Eina_Bool azy_client_call_checker(Azy_Client *cli, Azy_Content *err_content, Azy_Client_Call_Id ret, Azy_Client_Transfer_Complete_Cb cb, const char *func);
573EAPI Azy_Client_Call_Id azy_client_call(Azy_Client *client, Azy_Content *content, Azy_Net_Transport transport, Azy_Content_Cb cb);
574EAPI Azy_Client_Call_Id azy_client_blank(Azy_Client *client, Azy_Net_Type type, Azy_Net_Data *netdata, Azy_Content_Cb cb, void *data);
575EAPI Eina_Bool azy_client_redirect(Azy_Client *cli);
576EAPI Azy_Client_Call_Id azy_client_current(Azy_Client *cli);
577EAPI Eina_Bool azy_server_module_upgrade(Azy_Server_Module *module);
578EAPI void azy_client_timeout_set(Azy_Client *client, double timeout);
579EAPI double azy_client_timeout_get(Azy_Client *client);
580
581/* RSS */
582EAPI void azy_rss_free(Azy_Rss *rss);
583EAPI void azy_rss_link_free(Azy_Rss_Link *li);
584EAPI void azy_rss_contact_free(Azy_Rss_Contact *c);
585EAPI void azy_rss_ref(Azy_Rss *rss);
586EAPI void azy_rss_item_free(Azy_Rss_Item *item);
587EAPI const Eina_List *azy_rss_items_get(const Azy_Rss *rss);
588EAPI Eina_List *azy_rss_items_steal(Azy_Rss *rss);
589EAPI unsigned int azy_rss_ttl_get(const Azy_Rss *rss);
590EAPI unsigned int azy_rss_skipdays_get(const Azy_Rss *rss);
591EAPI unsigned long long azy_rss_skiphours_get(const Azy_Rss *rss);
592EAPI time_t azy_rss_updated_get(const Azy_Rss *rss);
593EAPI Eina_Bool azy_rss_atom_get(const Azy_Rss *rss);
594EAPI Eina_Bool azy_rss_item_atom_get(const Azy_Rss_Item *item);
595EAPI const Eina_List *azy_rss_authors_get(const Azy_Rss *rss);
596EAPI const Eina_List *azy_rss_contributors_get(const Azy_Rss *rss);
597EAPI const Eina_List *azy_rss_categories_get(const Azy_Rss *rss);
598EAPI const Eina_List *azy_rss_links_get(const Azy_Rss *rss);
599EAPI Eina_Stringshare *azy_rss_title_get(const Azy_Rss *rss);
600EAPI Eina_Stringshare *azy_rss_link_get(const Azy_Rss *rss);
601EAPI Eina_Stringshare *azy_rss_img_url_get(const Azy_Rss *rss);
602EAPI Eina_Stringshare *azy_rss_desc_get(const Azy_Rss *rss);
603EAPI Eina_Stringshare *azy_rss_rights_get(const Azy_Rss *rss);
604EAPI Eina_Stringshare *azy_rss_id_get(const Azy_Rss *rss);
605EAPI Eina_Stringshare *azy_rss_logo_get(const Azy_Rss *rss);
606EAPI Eina_Stringshare *azy_rss_generator_get(const Azy_Rss *rss);
607EAPI const Eina_List *azy_rss_item_authors_get(const Azy_Rss_Item *item);
608EAPI const Eina_List *azy_rss_item_contributors_get(const Azy_Rss_Item *item);
609EAPI const Eina_List *azy_rss_item_categories_get(const Azy_Rss_Item *item);
610EAPI const Eina_List *azy_rss_item_links_get(const Azy_Rss_Item *item);
611EAPI Eina_Stringshare *azy_rss_item_title_get(const Azy_Rss_Item *item);
612EAPI Eina_Stringshare *azy_rss_item_uuid_get(const Azy_Rss_Item *item);
613EAPI Eina_Stringshare *azy_rss_item_content_get(const Azy_Rss_Item *item);
614EAPI Eina_Stringshare *azy_rss_item_content_encoded_get(const Azy_Rss_Item *item);
615EAPI Eina_Stringshare *azy_rss_item_link_get(const Azy_Rss_Item *item);
616EAPI Eina_Stringshare *azy_rss_item_desc_get(const Azy_Rss_Item *item);
617EAPI time_t azy_rss_item_date_get(const Azy_Rss_Item *item);
618EAPI Eina_Stringshare *azy_rss_item_guid_get(const Azy_Rss_Item *item);
619EAPI Eina_Bool azy_rss_item_guid_is_permalink(const Azy_Rss_Item *item);
620EAPI Eina_Stringshare *azy_rss_item_comment_url_get(const Azy_Rss_Item *item);
621EAPI Eina_Stringshare *azy_rss_item_author_get(const Azy_Rss_Item *item);
622EAPI Eina_Stringshare *azy_rss_item_rights_get(const Azy_Rss_Item *rss);
623EAPI Eina_Stringshare *azy_rss_item_id_get(const Azy_Rss_Item *rss);
624EAPI time_t azy_rss_item_pubdate_get(const Azy_Rss_Item *item);
625EAPI Eina_Bool azy_rss_item_read_get(const Azy_Rss_Item *item);
626EAPI void azy_rss_item_read_set(Azy_Rss_Item *item, Eina_Bool is_read);
627EAPI void azy_rss_item_enclosure_get(const Azy_Rss_Item *item, Eina_Stringshare **url, Eina_Stringshare **content_type, size_t *length);
628EAPI void azy_rss_print(const char *pre, int indent, const Azy_Rss *rss);
629EAPI void azy_rss_category_print(const char *pre, int indent, const Azy_Rss_Category *cat);
630EAPI void azy_rss_link_print(const char *pre, int indent, const Azy_Rss_Link *li);
631EAPI void azy_rss_contact_print(const char *pre, int indent, const Azy_Rss_Contact *c);
632EAPI void azy_rss_item_print(const char *pre, int indent, const Azy_Rss_Item *item);
633
634EAPI Eet_Data_Descriptor *azy_rss_contact_edd_get(void);
635EAPI Eet_Data_Descriptor *azy_rss_category_edd_get(void);
636EAPI Eet_Data_Descriptor *azy_rss_link_edd_get(void);
637EAPI Eet_Data_Descriptor *azy_rss_edd_get(void);
638EAPI Eet_Data_Descriptor *azy_rss_item_edd_get(void);
639#ifdef __cplusplus
640}
641#endif
642
643#endif
diff --git a/src/lib/azy/azy_utils.c b/src/lib/azy/azy_utils.c
index 63c342e..adf5fb9 100644
--- a/src/lib/azy/azy_utils.c
+++ b/src/lib/azy/azy_utils.c
@@ -506,6 +506,7 @@ error:
506 return 0; 506 return 0;
507} 507}
508 508
509#ifdef OLD_EFL
509/** 510/**
510 * @brief strdup function which takes @c NULL 511 * @brief strdup function which takes @c NULL
511 * @param str The string to copy 512 * @param str The string to copy
@@ -531,4 +532,5 @@ azy_util_streq(const char *a, const char *b)
531 if (!b) return EINA_FALSE; 532 if (!b) return EINA_FALSE;
532 return !strcmp(a, b); 533 return !strcmp(a, b);
533} 534}
535#endif
534/** @} */ 536/** @} */
diff --git a/src/lib/azy/azy_value.c b/src/lib/azy/azy_value.c
index 2ad57f3..558876a 100644
--- a/src/lib/azy/azy_value.c
+++ b/src/lib/azy/azy_value.c
@@ -23,6 +23,7 @@
23 * @{ 23 * @{
24 */ 24 */
25 25
26#ifdef OLD_EFL
26 27
27static void * 28static void *
28_ops_malloc(const Eina_Value_Struct_Operations *ops EINA_UNUSED, const Eina_Value_Struct_Desc *desc) 29_ops_malloc(const Eina_Value_Struct_Operations *ops EINA_UNUSED, const Eina_Value_Struct_Desc *desc)
@@ -60,6 +61,8 @@ static Eina_Value_Struct_Operations operations =
60 NULL 61 NULL
61}; 62};
62 63
64#endif
65
63static Eina_Bool azy_value_list_multi_line_get_(const Eina_Value *v); 66static Eina_Bool azy_value_list_multi_line_get_(const Eina_Value *v);
64 67
65 68
@@ -349,6 +352,7 @@ azy_value_util_dump(const Eina_Value *v,
349} 352}
350 353
351/** @} */ 354/** @} */
355#ifdef OLD_EFL
352//////////////////////////////////////////// 356////////////////////////////////////////////
353 357
354Eina_Value * 358Eina_Value *
@@ -493,3 +497,4 @@ azy_value_util_struct_desc_new(void)
493 return (Eina_Value_Struct_Desc*)st_desc; 497 return (Eina_Value_Struct_Desc*)st_desc;
494} 498}
495 499
500#endif