summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con/ecore_con_url.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_con/ecore_con_url.c')
-rw-r--r--src/lib/ecore_con/ecore_con_url.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 049d4f2..000bf4d 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -225,12 +225,9 @@ EAPI Ecore_Con_Url *
225ecore_con_url_new(const char *url) 225ecore_con_url_new(const char *url)
226{ 226{
227 Ecore_Con_Url *url_obj; 227 Ecore_Con_Url *url_obj;
228 url_obj = eo_add(EFL_NETWORK_URL_CLASS, NULL, 228 url_obj = eo_add(EFL_NETWORK_URL_CLASS, NULL, efl_network_url_set(eoid, url));
229 efl_network_url_set(url));
230 229
231 eo_do(url_obj, 230 eo_event_callback_array_add(url_obj, efl_network_url_event_table_callbacks(), NULL);
232 eo_event_callback_array_add(efl_network_url_event_table_callbacks(),
233 NULL));
234 231
235 return url_obj; 232 return url_obj;
236} 233}
@@ -238,7 +235,7 @@ ecore_con_url_new(const char *url)
238EOLIAN static Eo * 235EOLIAN static Eo *
239_efl_network_url_eo_base_constructor(Efl_Network_Url *url_obj, Efl_Network_Url_Data *url_con EINA_UNUSED) 236_efl_network_url_eo_base_constructor(Efl_Network_Url *url_obj, Efl_Network_Url_Data *url_con EINA_UNUSED)
240{ 237{
241 url_obj = eo_do_super_ret(url_obj, MY_CLASS, url_obj, eo_constructor()); 238 url_obj = eo_constructor(eo_super(url_obj, MY_CLASS));
242 239
243 if (!_init_count || !_c_init()) 240 if (!_init_count || !_c_init())
244 { 241 {
@@ -338,7 +335,7 @@ _efl_network_url_eo_base_finalize(Efl_Network_Url *url_obj, Efl_Network_Url_Data
338 */ 335 */
339 _c->curl_easy_setopt(url_con->curl_easy, CURLOPT_CONNECTTIMEOUT, 30); 336 _c->curl_easy_setopt(url_con->curl_easy, CURLOPT_CONNECTTIMEOUT, 30);
340 _c->curl_easy_setopt(url_con->curl_easy, CURLOPT_FOLLOWLOCATION, 1); 337 _c->curl_easy_setopt(url_con->curl_easy, CURLOPT_FOLLOWLOCATION, 1);
341 return eo_do_super_ret(url_obj, MY_CLASS, url_obj, eo_finalize()); 338 return eo_finalize(eo_super(url_obj, MY_CLASS));
342} 339}
343 340
344EAPI Ecore_Con_Url * 341EAPI Ecore_Con_Url *
@@ -375,9 +372,7 @@ ecore_con_url_free(Ecore_Con_Url *url_obj)
375 if (!eo_isa(url_obj, EFL_NETWORK_URL_CLASS)) 372 if (!eo_isa(url_obj, EFL_NETWORK_URL_CLASS))
376 return; 373 return;
377 374
378 eo_do(url_obj, 375 eo_event_callback_array_del(url_obj, efl_network_url_event_table_callbacks(), NULL);
379 eo_event_callback_array_del(efl_network_url_event_table_callbacks(),
380 NULL));
381 376
382 eo_del(url_obj); 377 eo_del(url_obj);
383} 378}
@@ -400,7 +395,7 @@ _ecore_con_url_free_internal(Ecore_Con_Url *url_obj)
400EOLIAN static void 395EOLIAN static void
401_efl_network_url_eo_base_destructor(Efl_Network_Url *url_obj, Efl_Network_Url_Data *url_con) 396_efl_network_url_eo_base_destructor(Efl_Network_Url *url_obj, Efl_Network_Url_Data *url_con)
402{ 397{
403 eo_do_super(url_obj, MY_CLASS, eo_destructor()); 398 eo_destructor(eo_super(url_obj, MY_CLASS));
404 399
405 if (!_c) return; 400 if (!_c) return;
406 if (url_con->curl_easy) 401 if (url_con->curl_easy)
@@ -1145,7 +1140,7 @@ _ecore_con_url_event_url_complete(Ecore_Con_Url *url_obj, CURLMsg *curlmsg)
1145 e.status = status; 1140 e.status = status;
1146 e.url_con = url_obj; 1141 e.url_con = url_obj;
1147 url_con->event_count++; 1142 url_con->event_count++;
1148 eo_do(url_obj, eo_event_callback_call(EFL_NETWORK_URL_EVENT_COMPLETE, &e)); 1143 eo_event_callback_call(url_obj, EFL_NETWORK_URL_EVENT_COMPLETE, &e);
1149} 1144}
1150 1145
1151static void 1146static void
@@ -1206,7 +1201,7 @@ _ecore_con_url_data_cb(void *buffer, size_t size, size_t nitems, void *userp)
1206 e.size = real_size; 1201 e.size = real_size;
1207 e.data = buffer; 1202 e.data = buffer;
1208 url_con->event_count++; 1203 url_con->event_count++;
1209 eo_do(url_obj, eo_event_callback_call(EFL_NETWORK_URL_EVENT_DATA, &e)); 1204 eo_event_callback_call(url_obj, EFL_NETWORK_URL_EVENT_DATA, &e);
1210 } 1205 }
1211 else 1206 else
1212 { 1207 {
@@ -1265,7 +1260,7 @@ _ecore_con_url_progress_cb(void *clientp, double dltotal, double dlnow, double u
1265 e.up.total = ultotal; 1260 e.up.total = ultotal;
1266 e.up.now = ulnow; 1261 e.up.now = ulnow;
1267 url_con->event_count++; 1262 url_con->event_count++;
1268 eo_do(url_obj, eo_event_callback_call(EFL_NETWORK_URL_EVENT_PROGRESS, &e)); 1263 eo_event_callback_call(url_obj, EFL_NETWORK_URL_EVENT_PROGRESS, &e);
1269 1264
1270 return 0; 1265 return 0;
1271} 1266}