summaryrefslogtreecommitdiff
path: root/src/lib/ecore_file
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-10-15 09:16:26 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-10-15 09:16:26 +0900
commitea9963f469c5de5d0b1e6707fa82ce9e57fe29c7 (patch)
tree6ac3066cab59cb690d744e5914171df7b61c6803 /src/lib/ecore_file
parented8301b8bfc5faab23b76668acc79f88759ecef5 (diff)
ecore-file - remove ifdefs for HAVE_CULR since ecore-con "always" has it
now that it's runtime dlopen'ed etc. ecore-con "always" has url support via curl so ecore-file needs to assume that this can always work and this just use ecore-con-url anyway.
Diffstat (limited to 'src/lib/ecore_file')
-rw-r--r--src/lib/ecore_file/ecore_file_download.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/lib/ecore_file/ecore_file_download.c b/src/lib/ecore_file/ecore_file_download.c
index 92a701b6d7..e8fdf4c9aa 100644
--- a/src/lib/ecore_file/ecore_file_download.c
+++ b/src/lib/ecore_file/ecore_file_download.c
@@ -26,7 +26,6 @@ struct _Ecore_File_Download_Job
26 Ecore_File_Download_Progress_Cb progress_cb; 26 Ecore_File_Download_Progress_Cb progress_cb;
27}; 27};
28 28
29#ifdef HAVE_CURL
30Ecore_File_Download_Job *_ecore_file_download_curl(const char *url, const char *dst, 29Ecore_File_Download_Job *_ecore_file_download_curl(const char *url, const char *dst,
31 Ecore_File_Download_Completion_Cb completion_cb, 30 Ecore_File_Download_Completion_Cb completion_cb,
32 Ecore_File_Download_Progress_Cb progress_cb, 31 Ecore_File_Download_Progress_Cb progress_cb,
@@ -35,7 +34,6 @@ Ecore_File_Download_Job *_ecore_file_download_curl(const char *url, const char *
35 34
36static Eina_Bool _ecore_file_download_url_complete_cb(void *data, int type, void *event); 35static Eina_Bool _ecore_file_download_url_complete_cb(void *data, int type, void *event);
37static Eina_Bool _ecore_file_download_url_progress_cb(void *data, int type, void *event); 36static Eina_Bool _ecore_file_download_url_progress_cb(void *data, int type, void *event);
38#endif
39 37
40static Ecore_Event_Handler *_url_complete_handler = NULL; 38static Ecore_Event_Handler *_url_complete_handler = NULL;
41static Ecore_Event_Handler *_url_progress_download = NULL; 39static Ecore_Event_Handler *_url_progress_download = NULL;
@@ -54,10 +52,8 @@ ecore_file_download_init(void)
54 ecore_con_shutdown(); 52 ecore_con_shutdown();
55 return 0; 53 return 0;
56 } 54 }
57#ifdef HAVE_CURL
58 _url_complete_handler = ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _ecore_file_download_url_complete_cb, NULL); 55 _url_complete_handler = ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _ecore_file_download_url_complete_cb, NULL);
59 _url_progress_download = ecore_event_handler_add(ECORE_CON_EVENT_URL_PROGRESS, _ecore_file_download_url_progress_cb, NULL); 56 _url_progress_download = ecore_event_handler_add(ECORE_CON_EVENT_URL_PROGRESS, _ecore_file_download_url_progress_cb, NULL);
60#endif
61 return 1; 57 return 1;
62} 58}
63 59
@@ -77,7 +73,6 @@ ecore_file_download_shutdown(void)
77 ecore_con_shutdown(); 73 ecore_con_shutdown();
78} 74}
79 75
80# ifdef HAVE_CURL
81static Eina_Bool 76static Eina_Bool
82_ecore_file_download_headers_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) 77_ecore_file_download_headers_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata)
83{ 78{
@@ -86,7 +81,6 @@ _ecore_file_download_headers_foreach_cb(const Eina_Hash *hash EINA_UNUSED, const
86 81
87 return EINA_TRUE; 82 return EINA_TRUE;
88} 83}
89# endif
90 84
91static Eina_Bool 85static Eina_Bool
92_ecore_file_download(const char *url, 86_ecore_file_download(const char *url,
@@ -131,7 +125,6 @@ _ecore_file_download(const char *url,
131 else 125 else
132 return EINA_FALSE; 126 return EINA_FALSE;
133 } 127 }
134#ifdef HAVE_CURL
135 else if ((!strncmp(url, "http://", 7)) || (!strncmp(url, "https://", 8)) || 128 else if ((!strncmp(url, "http://", 7)) || (!strncmp(url, "https://", 8)) ||
136 (!strncmp(url, "ftp://", 6))) 129 (!strncmp(url, "ftp://", 6)))
137 { 130 {
@@ -148,18 +141,6 @@ _ecore_file_download(const char *url,
148 return EINA_FALSE; 141 return EINA_FALSE;
149 } 142 }
150 } 143 }
151#else
152 else if ((!strncmp(url, "http://", 7)) || (!strncmp(url, "https://", 8)) ||
153 (!strncmp(url, "ftp://", 6)))
154 {
155 (void)completion_cb;
156 (void)progress_cb;
157 (void)data;
158 (void)job_ret;
159 (void)headers;
160 return EINA_FALSE;
161 }
162#endif
163 else 144 else
164 { 145 {
165 return EINA_FALSE; 146 return EINA_FALSE;
@@ -251,15 +232,12 @@ EAPI Eina_Bool
251ecore_file_download_protocol_available(const char *protocol) 232ecore_file_download_protocol_available(const char *protocol)
252{ 233{
253 if (!strncmp(protocol, "file://", 7)) return EINA_TRUE; 234 if (!strncmp(protocol, "file://", 7)) return EINA_TRUE;
254#ifdef HAVE_CURL
255 else if (!strncmp(protocol, "http://", 7)) return EINA_TRUE; 235 else if (!strncmp(protocol, "http://", 7)) return EINA_TRUE;
256 else if (!strncmp(protocol, "ftp://", 6)) return EINA_TRUE; 236 else if (!strncmp(protocol, "ftp://", 6)) return EINA_TRUE;
257#endif
258 237
259 return EINA_FALSE; 238 return EINA_FALSE;
260} 239}
261 240
262# ifdef HAVE_CURL
263static int 241static int
264_ecore_file_download_url_compare_job(const void *data1, const void *data2) 242_ecore_file_download_url_compare_job(const void *data1, const void *data2)
265{ 243{
@@ -391,9 +369,7 @@ ecore_file_download_abort(Ecore_File_Download_Job *job)
391 369
392 if (job->completion_cb) 370 if (job->completion_cb)
393 job->completion_cb(ecore_con_url_data_get(job->url_con), job->dst, 1); 371 job->completion_cb(ecore_con_url_data_get(job->url_con), job->dst, 1);
394#ifdef HAVE_CURL
395 ecore_con_url_free(job->url_con); 372 ecore_con_url_free(job->url_con);
396#endif
397 _job_list = eina_list_remove(_job_list, job); 373 _job_list = eina_list_remove(_job_list, job);
398 fclose(job->file); 374 fclose(job->file);
399 free(job->dst); 375 free(job->dst);