summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-24 15:52:34 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-24 16:29:55 +0200
commit4ce7444dd117867d2a2d955c5652bb3cc2ab20ca (patch)
treebadd24242f05a09374491e9a7c6e48b8c57f443c
parentda594413bef425f4032e3108817625d3106a233c (diff)
efl: use new eolian error functionality instead of globals
Also enable referencing errors in docs.
-rw-r--r--src/lib/ecore_con/ecore_con.c19
-rw-r--r--src/lib/ecore_con/efl_net_dialer.eo6
-rw-r--r--src/lib/ecore_con/efl_net_socket_ssl.eo4
-rw-r--r--src/lib/eolian/eolian_database.c1
4 files changed, 13 insertions, 17 deletions
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 75f083a..5cf7bc1 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -59,13 +59,6 @@ int sd_fd_max = 0;
59 59
60EWAPI Eina_Error EFL_NET_ERROR_COULDNT_RESOLVE_HOST = 0; 60EWAPI Eina_Error EFL_NET_ERROR_COULDNT_RESOLVE_HOST = 0;
61 61
62EWAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_CONNECT = 0;
63EWAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY = 0;
64EWAPI Eina_Error EFL_NET_DIALER_ERROR_PROXY_AUTHENTICATION_FAILED = 0;
65
66EWAPI Eina_Error EFL_NET_SOCKET_SSL_ERROR_HANDSHAKE = 0;
67EWAPI Eina_Error EFL_NET_SOCKET_SSL_ERROR_CERTIFICATE_VERIFY_FAILED = 0;
68
69static int _ecore_con_init_count = 0; 62static int _ecore_con_init_count = 0;
70int _ecore_con_log_dom = -1; 63int _ecore_con_log_dom = -1;
71 64
@@ -104,12 +97,14 @@ ecore_con_init(void)
104 97
105 EFL_NET_ERROR_COULDNT_RESOLVE_HOST = eina_error_msg_static_register("Couldn't resolve host name"); 98 EFL_NET_ERROR_COULDNT_RESOLVE_HOST = eina_error_msg_static_register("Couldn't resolve host name");
106 99
107 EFL_NET_DIALER_ERROR_COULDNT_CONNECT = eina_error_msg_static_register("Couldn't connect to server"); 100 /* initialize the .eo file errors once to guarantee thread safety */
108 EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY = eina_error_msg_static_register("Couldn't resolve proxy name"); 101
109 EFL_NET_DIALER_ERROR_PROXY_AUTHENTICATION_FAILED = eina_error_msg_static_register("Proxy authentication failed"); 102 EFL_NET_DIALER_ERROR_COULDNT_CONNECT;
103 EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY;
104 EFL_NET_DIALER_ERROR_PROXY_AUTHENTICATION_FAILED;
110 105
111 EFL_NET_SOCKET_SSL_ERROR_HANDSHAKE = eina_error_msg_static_register("Failed SSL handshake"); 106 EFL_NET_SOCKET_SSL_ERROR_HANDSHAKE;
112 EFL_NET_SOCKET_SSL_ERROR_CERTIFICATE_VERIFY_FAILED = eina_error_msg_static_register("Failed to verify peer's certificate"); 107 EFL_NET_SOCKET_SSL_ERROR_CERTIFICATE_VERIFY_FAILED;
113 108
114#ifdef HAVE_SYSTEMD 109#ifdef HAVE_SYSTEMD
115 sd_fd_max = sd_listen_fds(0); 110 sd_fd_max = sd_listen_fds(0);
diff --git a/src/lib/ecore_con/efl_net_dialer.eo b/src/lib/ecore_con/efl_net_dialer.eo
index 8570e65..6ba5656 100644
--- a/src/lib/ecore_con/efl_net_dialer.eo
+++ b/src/lib/ecore_con/efl_net_dialer.eo
@@ -1,6 +1,6 @@
1var @beta Efl.Net.Dialer_Error.COULDNT_CONNECT: Eina.Error; [[The dialer could not connect to the remote]] 1error @beta Efl.Net.Dialer_Error.COULDNT_CONNECT = "Couldn't connect to server"; [[The dialer could not connect to the remote]]
2var @beta Efl.Net.Dialer_Error.COULDNT_RESOLVE_PROXY: Eina.Error; [[The dialer could not resolve the given proxy server]] 2error @beta Efl.Net.Dialer_Error.COULDNT_RESOLVE_PROXY = "Couldn't resolve proxy name"; [[The dialer could not resolve the given proxy server]]
3var @beta Efl.Net.Dialer_Error.PROXY_AUTHENTICATION_FAILED: Eina.Error; [[The dialer failed to authenticate against the proxy server]] 3error @beta Efl.Net.Dialer_Error.PROXY_AUTHENTICATION_FAILED = "Proxy authentication failed"; [[The dialer failed to authenticate against the proxy server]]
4 4
5interface @beta Efl.Net.Dialer extends Efl.Net.Socket { 5interface @beta Efl.Net.Dialer extends Efl.Net.Socket {
6 [[Creates a client socket to reach a remote peer. 6 [[Creates a client socket to reach a remote peer.
diff --git a/src/lib/ecore_con/efl_net_socket_ssl.eo b/src/lib/ecore_con/efl_net_socket_ssl.eo
index 7bf9b4c..60a1fbb 100644
--- a/src/lib/ecore_con/efl_net_socket_ssl.eo
+++ b/src/lib/ecore_con/efl_net_socket_ssl.eo
@@ -1,5 +1,5 @@
1var @beta Efl.Net.Socket_Ssl_Error.HANDSHAKE: Eina.Error; [[Failed SSL handshake]] 1error @beta Efl.Net.Socket_Ssl_Error.HANDSHAKE = "Failed SSL handshake"; [[Failed SSL handshake]]
2var @beta Efl.Net.Socket_Ssl_Error.CERTIFICATE_VERIFY_FAILED: Eina.Error; [[Failed to verify peer's certificate]] 2error @beta Efl.Net.Socket_Ssl_Error.CERTIFICATE_VERIFY_FAILED = "Failed to verify peer's certificate"; [[Failed to verify peer's certificate]]
3 3
4class @beta Efl.Net.Socket_Ssl extends Efl.Loop_Consumer implements Efl.Net.Socket { 4class @beta Efl.Net.Socket_Ssl extends Efl.Loop_Consumer implements Efl.Net.Socket {
5 [[A wrapper socket doing SSL (Secure Sockets Layer). 5 [[A wrapper socket doing SSL (Secure Sockets Layer).
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index 9aa6b8f..cef722d 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -492,6 +492,7 @@ database_doc_token_ref_resolve(const Eolian_Doc_Token *tok,
492 case EOLIAN_OBJECT_CLASS: 492 case EOLIAN_OBJECT_CLASS:
493 case EOLIAN_OBJECT_TYPEDECL: 493 case EOLIAN_OBJECT_TYPEDECL:
494 case EOLIAN_OBJECT_VARIABLE: 494 case EOLIAN_OBJECT_VARIABLE:
495 case EOLIAN_OBJECT_ERROR:
495 /* we only allow certain types to be referenced */ 496 /* we only allow certain types to be referenced */
496 return tp; 497 return tp;
497 default: 498 default: