diff options
Diffstat (limited to 'libraries/ecore/src/lib/ecore_con/Ecore_Con.h')
-rw-r--r-- | libraries/ecore/src/lib/ecore_con/Ecore_Con.h | 81 |
1 files changed, 48 insertions, 33 deletions
diff --git a/libraries/ecore/src/lib/ecore_con/Ecore_Con.h b/libraries/ecore/src/lib/ecore_con/Ecore_Con.h index c3af46a..d0ca6f6 100644 --- a/libraries/ecore/src/lib/ecore_con/Ecore_Con.h +++ b/libraries/ecore/src/lib/ecore_con/Ecore_Con.h | |||
@@ -723,10 +723,13 @@ EAPI Eina_Bool ecore_con_ssl_client_upgrade(Ecore_Con_Client *cl, Ecore_ | |||
723 | */ | 723 | */ |
724 | 724 | ||
725 | EAPI Ecore_Con_Socks *ecore_con_socks4_remote_add(const char *ip, int port, const char *username); | 725 | EAPI Ecore_Con_Socks *ecore_con_socks4_remote_add(const char *ip, int port, const char *username); |
726 | EAPI void ecore_con_socks4_lookup_set(Ecore_Con_Socks *ecs, Eina_Bool enable); | ||
727 | EAPI Eina_Bool ecore_con_socks4_lookup_get(Ecore_Con_Socks *ecs); | ||
728 | EAPI Eina_Bool ecore_con_socks4_remote_exists(const char *ip, int port, const char *username); | 726 | EAPI Eina_Bool ecore_con_socks4_remote_exists(const char *ip, int port, const char *username); |
729 | EAPI void ecore_con_socks4_remote_del(const char *ip, int port, const char *username); | 727 | EAPI void ecore_con_socks4_remote_del(const char *ip, int port, const char *username); |
728 | EAPI Ecore_Con_Socks *ecore_con_socks5_remote_add(const char *ip, int port, const char *username, const char *password); | ||
729 | EAPI Eina_Bool ecore_con_socks5_remote_exists(const char *ip, int port, const char *username, const char *password); | ||
730 | EAPI void ecore_con_socks5_remote_del(const char *ip, int port, const char *username, const char *password); | ||
731 | EAPI void ecore_con_socks_lookup_set(Ecore_Con_Socks *ecs, Eina_Bool enable); | ||
732 | EAPI Eina_Bool ecore_con_socks_lookup_get(Ecore_Con_Socks *ecs); | ||
730 | EAPI void ecore_con_socks_bind_set(Ecore_Con_Socks *ecs, Eina_Bool is_bind); | 733 | EAPI void ecore_con_socks_bind_set(Ecore_Con_Socks *ecs, Eina_Bool is_bind); |
731 | EAPI Eina_Bool ecore_con_socks_bind_get(Ecore_Con_Socks *ecs); | 734 | EAPI Eina_Bool ecore_con_socks_bind_get(Ecore_Con_Socks *ecs); |
732 | EAPI unsigned int ecore_con_socks_version_get(Ecore_Con_Socks *ecs); | 735 | EAPI unsigned int ecore_con_socks_version_get(Ecore_Con_Socks *ecs); |
@@ -744,8 +747,8 @@ EAPI void ecore_con_socks_apply_always(Ecore_Con_Socks *ecs); | |||
744 | * | 747 | * |
745 | * Setting up a server is very simple: you just need to start it with | 748 | * Setting up a server is very simple: you just need to start it with |
746 | * ecore_con_server_add() and setup some callbacks to the events | 749 | * ecore_con_server_add() and setup some callbacks to the events |
747 | * #ECORE_CON_EVENT_CLIENT_ADD, #ECORE_CON_EVENT_CLIENT_DEL and | 750 | * @ref ECORE_CON_EVENT_CLIENT_ADD, @ref ECORE_CON_EVENT_CLIENT_DEL and |
748 | * #ECORE_CON_EVENT_CLIENT_DATA, that will be called when a client is | 751 | * @ref ECORE_CON_EVENT_CLIENT_DATA, that will be called when a client is |
749 | * communicating with the server: | 752 | * communicating with the server: |
750 | * | 753 | * |
751 | * @code | 754 | * @code |
@@ -867,8 +870,8 @@ EAPI Ecore_Con_Server *ecore_con_server_add(Ecore_Con_Type type, | |||
867 | * | 870 | * |
868 | * However, even if this call returns a valid @ref Ecore_Con_Server, the | 871 | * However, even if this call returns a valid @ref Ecore_Con_Server, the |
869 | * connection will only be successfully completed if an event of type | 872 | * connection will only be successfully completed if an event of type |
870 | * #ECORE_CON_EVENT_SERVER_ADD is received. If it fails to complete, an | 873 | * @ref ECORE_CON_EVENT_SERVER_ADD is received. If it fails to complete, an |
871 | * #ECORE_CON_EVENT_SERVER_DEL will be received. | 874 | * @ref ECORE_CON_EVENT_SERVER_DEL will be received. |
872 | * | 875 | * |
873 | * The @p data parameter can be fetched later using ecore_con_server_data_get() | 876 | * The @p data parameter can be fetched later using ecore_con_server_data_get() |
874 | * or changed with ecore_con_server_data_set(). | 877 | * or changed with ecore_con_server_data_set(). |
@@ -1335,6 +1338,35 @@ typedef enum _Ecore_Con_Url_Time | |||
1335 | } Ecore_Con_Url_Time; | 1338 | } Ecore_Con_Url_Time; |
1336 | 1339 | ||
1337 | /** | 1340 | /** |
1341 | * @typedef Ecore_Con_Url_Http_Version | ||
1342 | * @enum _Ecore_Con_Url_Http_Version | ||
1343 | * The http version to use | ||
1344 | * @since 1.2 | ||
1345 | */ | ||
1346 | typedef enum _Ecore_Con_Url_Http_Version | ||
1347 | { | ||
1348 | /** | ||
1349 | * HTTP version 1.0 | ||
1350 | * @since 1.2 | ||
1351 | */ | ||
1352 | ECORE_CON_URL_HTTP_VERSION_1_0, | ||
1353 | /** | ||
1354 | * HTTP version 1.1 (default) | ||
1355 | * @since 1.2 | ||
1356 | */ | ||
1357 | ECORE_CON_URL_HTTP_VERSION_1_1 | ||
1358 | } Ecore_Con_Url_Http_Version; | ||
1359 | |||
1360 | /** | ||
1361 | * Change the HTTP version used for the request | ||
1362 | * @param version The version to be used | ||
1363 | * @return EINA_TRUE on success, EINA_FALSE on failure to change version | ||
1364 | * @since 1.2 | ||
1365 | * @see ecore_con_url_pipeline_get() | ||
1366 | */ | ||
1367 | EAPI Eina_Bool ecore_con_url_http_version_set(Ecore_Con_Url *url_con, Ecore_Con_Url_Http_Version version); | ||
1368 | |||
1369 | /** | ||
1338 | * Initialises the Ecore_Con_Url library. | 1370 | * Initialises the Ecore_Con_Url library. |
1339 | * @return Number of times the library has been initialised without being | 1371 | * @return Number of times the library has been initialised without being |
1340 | * shut down. | 1372 | * shut down. |
@@ -1554,33 +1586,6 @@ EAPI Eina_Bool ecore_con_url_httpauth_set(Ecore_Con_Url *url_con, | |||
1554 | const char *password, | 1586 | const char *password, |
1555 | Eina_Bool safe); | 1587 | Eina_Bool safe); |
1556 | /** | 1588 | /** |
1557 | * Sends a request. | ||
1558 | * | ||
1559 | * @param url_con Connection object to perform a request on, previously created | ||
1560 | * with ecore_con_url_new() or ecore_con_url_custom_new(). | ||
1561 | * @param data Payload (data sent on the request) | ||
1562 | * @param length Payload length. If @c -1, rely on automatic length | ||
1563 | * calculation via @c strlen() on @p data. | ||
1564 | * @param content_type Content type of the payload (e.g. text/xml) | ||
1565 | * | ||
1566 | * @return #EINA_TRUE on success, #EINA_FALSE on error. | ||
1567 | * | ||
1568 | * @see ecore_con_url_custom_new() | ||
1569 | * @see ecore_con_url_additional_headers_clear() | ||
1570 | * @see ecore_con_url_additional_header_add() | ||
1571 | * @see ecore_con_url_data_set() | ||
1572 | * @see ecore_con_url_data_get() | ||
1573 | * @see ecore_con_url_response_headers_get() | ||
1574 | * @see ecore_con_url_time() | ||
1575 | * @see ecore_con_url_get() | ||
1576 | * @see ecore_con_url_post() | ||
1577 | * | ||
1578 | * @deprecated Use ecore_con_url_post() instead of this. | ||
1579 | */ | ||
1580 | EINA_DEPRECATED EAPI Eina_Bool ecore_con_url_send(Ecore_Con_Url *url_con, | ||
1581 | const void *data, long length, | ||
1582 | const char *content_type); | ||
1583 | /** | ||
1584 | * Sends a get request. | 1589 | * Sends a get request. |
1585 | * | 1590 | * |
1586 | * @param url_con Connection object to perform a request on, previously created | 1591 | * @param url_con Connection object to perform a request on, previously created |
@@ -1913,6 +1918,16 @@ EAPI Eina_Bool ecore_con_url_proxy_password_set(Ecore_Con_Url *url_con, const ch | |||
1913 | EAPI void ecore_con_url_timeout_set(Ecore_Con_Url *url_con, double timeout); | 1918 | EAPI void ecore_con_url_timeout_set(Ecore_Con_Url *url_con, double timeout); |
1914 | 1919 | ||
1915 | /** | 1920 | /** |
1921 | * Get the returned HTTP STATUS code | ||
1922 | * | ||
1923 | * This is used to, at any time, try to return the status code for a transmission. | ||
1924 | * @param url_con Connection object | ||
1925 | * @return A valid HTTP STATUS code, or 0 on failure | ||
1926 | * | ||
1927 | * @since 1.2 | ||
1928 | */ | ||
1929 | EAPI int ecore_con_url_status_code_get(Ecore_Con_Url *url_con); | ||
1930 | /** | ||
1916 | * @} | 1931 | * @} |
1917 | */ | 1932 | */ |
1918 | 1933 | ||