forked from enlightenment/efl
added ecore_con_url_status_code_get, cleaned up recent changelog/news entries, zero http status on new transfers
SVN revision: 69009
This commit is contained in:
parent
894bfaeed7
commit
4652719267
|
@ -554,11 +554,15 @@
|
|||
2012-03-07 ChunEon Park (Hermet)
|
||||
|
||||
* Add ecore_x_illume_clipboard_state_set()
|
||||
ecore_x_illume_clipboard_state_get()
|
||||
ecore_x_illume_clipboard_geometry_set()
|
||||
ecore_x_illume_clipboard_geometry_get()
|
||||
ecore_x_illume_clipboard_state_get()
|
||||
ecore_x_illume_clipboard_geometry_set()
|
||||
ecore_x_illume_clipboard_geometry_get()
|
||||
|
||||
2012-03-07 Carsten Haitzler (The Rasterman)
|
||||
2012-03-07 Carsten Haitzler (The Rasterman)
|
||||
|
||||
* Add atoms and api for rotation and indicator transparency in
|
||||
ecore_x/ecore_evas
|
||||
|
||||
2012-03-07 Mike Blumenkrantz (discomfitor/zmike)
|
||||
|
||||
* Add ecore_con_url_status_code_get() to check return code at any time
|
||||
|
|
|
@ -13,9 +13,10 @@ Additions:
|
|||
- ECORE_CON_REMOTE_CORK
|
||||
- ecore_con_url_proxy_set()
|
||||
- ecore_con_url_timeout_set()
|
||||
- ecore_con_url_proxy_username_set
|
||||
- ecore_con_url_proxy_username_set()
|
||||
- ecore_con_url_proxy_password_set()
|
||||
- ecore_con_url_http_version_set()
|
||||
- ecore_con_url_status_code_get()
|
||||
* ecore_x:
|
||||
- ecore_x_randr_output_backlight_available()
|
||||
- ecore_x_randr_window_crtcs_get()
|
||||
|
|
|
@ -1917,6 +1917,16 @@ EAPI Eina_Bool ecore_con_url_proxy_password_set(Ecore_Con_Url *url_con, const ch
|
|||
*/
|
||||
EAPI void ecore_con_url_timeout_set(Ecore_Con_Url *url_con, double timeout);
|
||||
|
||||
/**
|
||||
* Get the returned HTTP STATUS code
|
||||
*
|
||||
* This is used to, at any time, try to return the status code for a transmission.
|
||||
* @param url_con Connection object
|
||||
* @return A valid HTTP STATUS code, or -1 on failure
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
EAPI int ecore_con_url_status_code_get(Ecore_Con_Url *url_con);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -48,6 +48,7 @@ static void _ecore_con_event_url_free(Ecore_Con_Url *url_con, void *ev);
|
|||
static Eina_Bool _ecore_con_url_timer(void *data);
|
||||
static Eina_Bool _ecore_con_url_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
|
||||
static Eina_Bool _ecore_con_url_timeout_cb(void *data);
|
||||
static void _ecore_con_url_status_get(Ecore_Con_Url *url_con);
|
||||
|
||||
static Eina_List *_url_con_list = NULL;
|
||||
static Eina_List *_fd_hd_list = NULL;
|
||||
|
@ -360,6 +361,24 @@ ecore_con_url_url_get(Ecore_Con_Url *url_con)
|
|||
#endif
|
||||
}
|
||||
|
||||
EAPI int
|
||||
ecore_con_url_status_code_get(Ecore_Con_Url *url_con)
|
||||
{
|
||||
#ifdef HAVE_CURL
|
||||
if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL))
|
||||
{
|
||||
ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
_ecore_con_url_status_get(url_con);
|
||||
return url_con->status ?: -1;
|
||||
#else
|
||||
return -1;
|
||||
(void)url_con;
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
ecore_con_url_url_set(Ecore_Con_Url *url_con, const char *url)
|
||||
{
|
||||
|
@ -620,6 +639,7 @@ _ecore_con_url_send(Ecore_Con_Url *url_con, int mode, const void *data, long len
|
|||
EINA_LIST_FREE(url_con->response_headers, s)
|
||||
free((char *)s);
|
||||
url_con->response_headers = NULL;
|
||||
url_con->status = 0;
|
||||
|
||||
curl_slist_free_all(url_con->headers);
|
||||
url_con->headers = NULL;
|
||||
|
@ -1270,8 +1290,12 @@ static void
|
|||
_ecore_con_url_status_get(Ecore_Con_Url *url_con)
|
||||
{
|
||||
long status = 0;
|
||||
|
||||
if (!url_con->curl_easy) return;
|
||||
if (curl_easy_getinfo(url_con->curl_easy, CURLINFO_RESPONSE_CODE, &status))
|
||||
url_con->status = status;
|
||||
else
|
||||
url_con->status = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue