2008-05-25 22:16:34 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
2009-01-31 10:33:39 -08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2010-04-05 01:26:48 -07:00
|
|
|
#ifdef BUILD_ECORE_CON
|
|
|
|
# include "Ecore_Con.h"
|
|
|
|
#endif
|
|
|
|
|
2005-06-15 18:54:12 -07:00
|
|
|
#include "ecore_file_private.h"
|
|
|
|
|
2009-10-14 10:29:13 -07:00
|
|
|
#ifdef BUILD_ECORE_CON
|
|
|
|
|
2008-03-09 09:43:32 -07:00
|
|
|
#define ECORE_MAGIC_FILE_DOWNLOAD_JOB 0xf7427cb8
|
2005-06-17 16:52:32 -07:00
|
|
|
|
|
|
|
struct _Ecore_File_Download_Job
|
|
|
|
{
|
2008-03-09 09:43:32 -07:00
|
|
|
ECORE_MAGIC;
|
|
|
|
|
|
|
|
Ecore_Con_Url *url_con;
|
|
|
|
FILE *file;
|
|
|
|
|
|
|
|
char *dst;
|
|
|
|
|
|
|
|
void (*completion_cb)(void *data, const char *file, int status);
|
|
|
|
|
|
|
|
int (*progress_cb) (void *data, const char *file,
|
|
|
|
long int dltotal, long int dlnow,
|
|
|
|
long int ultotal, long int ulnow);
|
2005-06-17 16:52:32 -07:00
|
|
|
};
|
|
|
|
|
2008-03-09 09:43:32 -07:00
|
|
|
#ifdef HAVE_CURL
|
2005-06-17 16:52:32 -07:00
|
|
|
Ecore_File_Download_Job *_ecore_file_download_curl(const char *url, const char *dst,
|
|
|
|
void (*completion_cb)(void *data, const char *file, int status),
|
2006-04-07 05:27:39 -07:00
|
|
|
int (*progress_cb)(void *data, const char *file, long int dltotal, long int dlnow, long int ultotal, long int ulnow),
|
2005-06-17 16:52:32 -07:00
|
|
|
void *data);
|
|
|
|
|
2010-06-24 09:15:56 -07:00
|
|
|
static Eina_Bool _ecore_file_download_url_complete_cb(void *data, int type, void *event);
|
|
|
|
static Eina_Bool _ecore_file_download_url_progress_cb(void *data, int type, void *event);
|
2005-06-17 16:52:32 -07:00
|
|
|
#endif
|
|
|
|
|
2008-03-09 09:43:32 -07:00
|
|
|
static Ecore_Event_Handler *_url_complete_handler = NULL;
|
|
|
|
static Ecore_Event_Handler *_url_progress_download = NULL;
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
static Eina_List *_job_list;
|
2008-03-09 09:43:32 -07:00
|
|
|
|
2009-10-14 10:29:13 -07:00
|
|
|
#endif /* BUILD_ECORE_CON */
|
|
|
|
|
2009-10-09 22:28:43 -07:00
|
|
|
int
|
2005-06-17 16:52:32 -07:00
|
|
|
ecore_file_download_init(void)
|
|
|
|
{
|
2009-10-14 10:29:13 -07:00
|
|
|
#ifdef BUILD_ECORE_CON
|
2009-10-09 22:28:43 -07:00
|
|
|
if (!ecore_con_url_init())
|
|
|
|
return 0;
|
2005-09-07 01:50:25 -07:00
|
|
|
|
2009-10-14 10:29:13 -07:00
|
|
|
# ifdef HAVE_CURL
|
2009-10-09 22:28:43 -07:00
|
|
|
_url_complete_handler = ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _ecore_file_download_url_complete_cb, NULL);
|
|
|
|
_url_progress_download = ecore_event_handler_add(ECORE_CON_EVENT_URL_PROGRESS, _ecore_file_download_url_progress_cb, NULL);
|
2009-10-14 10:29:13 -07:00
|
|
|
# endif
|
|
|
|
|
|
|
|
#endif /* BUILD_ECORE_CON */
|
2008-03-09 09:43:32 -07:00
|
|
|
|
|
|
|
return 1;
|
2005-06-17 16:52:32 -07:00
|
|
|
}
|
|
|
|
|
2009-10-09 22:28:43 -07:00
|
|
|
void
|
2005-06-17 16:52:32 -07:00
|
|
|
ecore_file_download_shutdown(void)
|
|
|
|
{
|
2009-10-14 10:29:13 -07:00
|
|
|
#ifdef BUILD_ECORE_CON
|
2009-10-09 22:28:43 -07:00
|
|
|
if (_url_complete_handler)
|
|
|
|
ecore_event_handler_del(_url_complete_handler);
|
|
|
|
if (_url_progress_download)
|
|
|
|
ecore_event_handler_del(_url_progress_download);
|
|
|
|
_url_complete_handler = NULL;
|
|
|
|
_url_progress_download = NULL;
|
|
|
|
ecore_file_download_abort_all();
|
|
|
|
|
|
|
|
ecore_con_url_shutdown();
|
2009-10-14 10:29:13 -07:00
|
|
|
#endif /* BUILD_ECORE_CON */
|
2005-06-17 16:52:32 -07:00
|
|
|
}
|
|
|
|
|
2008-03-09 09:43:32 -07:00
|
|
|
EAPI void
|
2006-09-08 09:52:29 -07:00
|
|
|
ecore_file_download_abort_all(void)
|
|
|
|
{
|
2009-10-14 10:29:13 -07:00
|
|
|
#ifdef BUILD_ECORE_CON
|
2009-10-09 22:28:43 -07:00
|
|
|
Ecore_File_Download_Job *job;
|
2008-03-09 09:43:32 -07:00
|
|
|
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
EINA_LIST_FREE(_job_list, job)
|
2009-11-13 09:51:52 -08:00
|
|
|
ecore_file_download_abort(job);
|
2009-10-14 10:29:13 -07:00
|
|
|
#endif /* BUILD_ECORE_CON */
|
2006-09-08 09:52:29 -07:00
|
|
|
}
|
|
|
|
|
2007-08-06 13:00:28 -07:00
|
|
|
/**
|
|
|
|
* Download @p url to the given @p dst
|
|
|
|
* @param url The complete url to download
|
|
|
|
* @param dst The local file to save the downloaded to
|
|
|
|
* @param completion_cb A callback called on download complete
|
|
|
|
* @param progress_cb A callback called during the download operation
|
2010-03-14 03:53:14 -07:00
|
|
|
* @param data User data passed to both callbacks
|
|
|
|
* @param job_ret If the protocol in use is http or ftp, this parameter will be
|
|
|
|
* filled with the job. Then you can use ecore_file_download_abort() to cancel it.
|
|
|
|
*
|
2007-08-06 13:00:28 -07:00
|
|
|
* @return 1 if the download start or 0 on failure
|
|
|
|
*
|
|
|
|
* You must provide the full url, including 'http://', 'ftp://' or 'file://'.\n
|
|
|
|
* If @p dst already exist it will not be overwritten and the function will fail.\n
|
2010-03-14 03:53:14 -07:00
|
|
|
* Ecore must be compiled with CURL to download using http and ftp protocols.\n
|
|
|
|
* The @p status param in the @p completion_cb() will be 0 if the download goes well or
|
|
|
|
* 1 in case of failure.
|
2007-08-06 13:00:28 -07:00
|
|
|
*/
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI int
|
2005-06-17 16:52:32 -07:00
|
|
|
ecore_file_download(const char *url, const char *dst,
|
|
|
|
void (*completion_cb)(void *data, const char *file, int status),
|
2006-04-07 05:27:39 -07:00
|
|
|
int (*progress_cb)(void *data, const char *file, long int dltotal, long int dlnow, long int ultotal, long int ulnow),
|
2009-11-13 09:51:52 -08:00
|
|
|
void *data, Ecore_File_Download_Job **job_ret)
|
2005-06-15 18:54:12 -07:00
|
|
|
{
|
2009-10-14 10:29:13 -07:00
|
|
|
#ifdef BUILD_ECORE_CON
|
2007-11-07 13:15:11 -08:00
|
|
|
char *dir = ecore_file_dir_get(dst);
|
|
|
|
|
|
|
|
if (!ecore_file_is_dir(dir))
|
|
|
|
{
|
|
|
|
free(dir);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
free(dir);
|
2005-06-17 16:52:32 -07:00
|
|
|
if (ecore_file_exists(dst)) return 0;
|
2005-06-15 18:54:12 -07:00
|
|
|
|
|
|
|
/* FIXME: Add handlers for http and ftp! */
|
|
|
|
if (!strncmp(url, "file://", 7))
|
|
|
|
{
|
2005-06-17 16:52:32 -07:00
|
|
|
/* FIXME: Maybe fork? Might take a while to copy.
|
|
|
|
* Check filesize? */
|
2005-06-15 18:54:12 -07:00
|
|
|
/* Just copy it */
|
|
|
|
|
|
|
|
url += 7;
|
2005-06-17 16:52:32 -07:00
|
|
|
/* skip hostname */
|
|
|
|
url = strchr(url, '/');
|
2009-11-14 05:43:38 -08:00
|
|
|
return ecore_file_cp(url, dst);
|
2005-06-17 16:52:32 -07:00
|
|
|
}
|
2009-10-14 10:29:13 -07:00
|
|
|
# ifdef HAVE_CURL
|
2005-06-17 16:52:32 -07:00
|
|
|
else if ((!strncmp(url, "http://", 7)) ||
|
2005-06-22 07:51:37 -07:00
|
|
|
(!strncmp(url, "ftp://", 6)))
|
2005-06-17 16:52:32 -07:00
|
|
|
{
|
|
|
|
/* download */
|
|
|
|
Ecore_File_Download_Job *job;
|
2007-11-07 13:15:11 -08:00
|
|
|
|
2006-04-07 05:27:39 -07:00
|
|
|
job = _ecore_file_download_curl(url, dst, completion_cb, progress_cb, data);
|
2009-11-13 09:51:52 -08:00
|
|
|
if(job_ret) *job_ret = job;
|
2010-08-21 06:52:25 -07:00
|
|
|
return !!job;
|
2005-06-15 18:54:12 -07:00
|
|
|
}
|
2009-10-14 10:29:13 -07:00
|
|
|
# endif
|
2005-06-15 18:54:12 -07:00
|
|
|
else
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2009-10-14 10:29:13 -07:00
|
|
|
#else
|
2006-11-05 08:34:30 -08:00
|
|
|
completion_cb = NULL;
|
|
|
|
progress_cb = NULL;
|
|
|
|
data = NULL;
|
2009-11-13 09:51:52 -08:00
|
|
|
return 0;
|
2009-10-14 10:29:13 -07:00
|
|
|
#endif /* BUILD_ECORE_CON */
|
2005-06-15 18:54:12 -07:00
|
|
|
}
|
2005-06-17 16:52:32 -07:00
|
|
|
|
2007-08-06 13:00:28 -07:00
|
|
|
/**
|
|
|
|
* Check if the given protocol is available
|
|
|
|
* @param protocol The protocol to check
|
|
|
|
* @return 1 if protocol is handled or 0 if not
|
|
|
|
*
|
|
|
|
* @p protocol can be 'http://', 'ftp://' or 'file://'.\n
|
2007-11-07 13:15:11 -08:00
|
|
|
* Ecore must be compiled with CURL to handle http and ftp protocols.
|
2007-08-06 13:00:28 -07:00
|
|
|
*/
|
2006-01-06 10:46:30 -08:00
|
|
|
EAPI int
|
2005-06-22 07:51:37 -07:00
|
|
|
ecore_file_download_protocol_available(const char *protocol)
|
|
|
|
{
|
2009-10-14 10:29:13 -07:00
|
|
|
#ifdef BUILD_ECORE_CON
|
2005-06-22 07:51:37 -07:00
|
|
|
if (!strncmp(protocol, "file://", 7)) return 1;
|
2009-10-14 10:29:13 -07:00
|
|
|
# ifdef HAVE_CURL
|
2005-06-22 07:51:37 -07:00
|
|
|
else if (!strncmp(protocol, "http://", 7)) return 1;
|
|
|
|
else if (!strncmp(protocol, "ftp://", 6)) return 1;
|
2009-10-14 10:29:13 -07:00
|
|
|
# endif
|
|
|
|
#endif /* BUILD_ECORE_CON */
|
2005-06-22 07:51:37 -07:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2009-10-14 10:29:13 -07:00
|
|
|
#ifdef BUILD_ECORE_CON
|
|
|
|
|
|
|
|
# ifdef HAVE_CURL
|
2006-11-10 11:11:12 -08:00
|
|
|
static int
|
2008-03-09 09:43:32 -07:00
|
|
|
_ecore_file_download_url_compare_job(const void *data1, const void *data2)
|
2007-11-07 13:15:11 -08:00
|
|
|
{
|
2008-03-09 09:43:32 -07:00
|
|
|
const Ecore_File_Download_Job *job = data1;
|
|
|
|
const Ecore_Con_Url *url = data2;
|
|
|
|
|
|
|
|
if (job->url_con == url) return 0;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2010-06-24 09:15:56 -07:00
|
|
|
static Eina_Bool
|
2010-02-28 15:27:47 -08:00
|
|
|
_ecore_file_download_url_complete_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
2008-03-09 09:43:32 -07:00
|
|
|
{
|
|
|
|
Ecore_Con_Event_Url_Complete *ev = event;
|
|
|
|
Ecore_File_Download_Job *job;
|
|
|
|
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
job = eina_list_search_unsorted(_job_list, _ecore_file_download_url_compare_job, ev->url_con);
|
2010-06-24 09:15:56 -07:00
|
|
|
if (!ECORE_MAGIC_CHECK(job, ECORE_MAGIC_FILE_DOWNLOAD_JOB)) return ECORE_CALLBACK_PASS_ON;
|
2008-03-09 09:43:32 -07:00
|
|
|
|
|
|
|
if (job->completion_cb)
|
|
|
|
job->completion_cb(ecore_con_url_data_get(job->url_con), job->dst, !ev->status);
|
|
|
|
|
2009-11-14 05:43:38 -08:00
|
|
|
_job_list = eina_list_remove(_job_list, job);
|
|
|
|
fclose(job->file);
|
|
|
|
free(job->dst);
|
|
|
|
free(job);
|
2008-03-09 09:43:32 -07:00
|
|
|
|
2010-06-24 09:15:56 -07:00
|
|
|
return ECORE_CALLBACK_DONE;
|
2008-03-09 09:43:32 -07:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:15:56 -07:00
|
|
|
static Eina_Bool
|
2010-02-28 15:27:47 -08:00
|
|
|
_ecore_file_download_url_progress_cb(void *data __UNUSED__, int type __UNUSED__, void *event)
|
2008-03-09 09:43:32 -07:00
|
|
|
{
|
|
|
|
/* this reports the downloads progress. if we return 0, then download
|
|
|
|
* continues, if we return anything else, then the download stops */
|
|
|
|
Ecore_Con_Event_Url_Progress *ev = event;
|
|
|
|
Ecore_File_Download_Job *job;
|
|
|
|
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
job = eina_list_search_unsorted(_job_list, _ecore_file_download_url_compare_job, ev->url_con);
|
2010-06-24 09:15:56 -07:00
|
|
|
if (!ECORE_MAGIC_CHECK(job, ECORE_MAGIC_FILE_DOWNLOAD_JOB)) return ECORE_CALLBACK_PASS_ON;
|
2008-03-09 09:43:32 -07:00
|
|
|
|
|
|
|
if (job->progress_cb)
|
|
|
|
if (job->progress_cb(ecore_con_url_data_get(job->url_con), job->dst,
|
|
|
|
(long int) ev->down.total, (long int) ev->down.now,
|
|
|
|
(long int) ev->up.total, (long int) ev->up.now) != 0)
|
|
|
|
{
|
2009-11-14 05:43:38 -08:00
|
|
|
_job_list = eina_list_remove(_job_list, job);
|
|
|
|
fclose(job->file);
|
|
|
|
free(job->dst);
|
|
|
|
free(job);
|
|
|
|
|
2010-06-24 09:15:56 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2008-03-09 09:43:32 -07:00
|
|
|
}
|
2007-11-07 13:15:11 -08:00
|
|
|
|
2010-06-24 09:15:56 -07:00
|
|
|
return ECORE_CALLBACK_DONE;
|
2006-04-07 05:27:39 -07:00
|
|
|
}
|
|
|
|
|
2005-06-17 16:52:32 -07:00
|
|
|
Ecore_File_Download_Job *
|
|
|
|
_ecore_file_download_curl(const char *url, const char *dst,
|
|
|
|
void (*completion_cb)(void *data, const char *file,
|
|
|
|
int status),
|
2007-11-07 13:15:11 -08:00
|
|
|
int (*progress_cb)(void *data, const char *file,
|
2006-04-07 05:27:39 -07:00
|
|
|
long int dltotal, long int dlnow,
|
2008-03-09 09:43:32 -07:00
|
|
|
long int ultotal, long int ulnow),
|
2005-06-17 16:52:32 -07:00
|
|
|
void *data)
|
|
|
|
{
|
|
|
|
Ecore_File_Download_Job *job;
|
|
|
|
|
|
|
|
job = calloc(1, sizeof(Ecore_File_Download_Job));
|
|
|
|
if (!job) return NULL;
|
|
|
|
|
2008-03-09 09:43:32 -07:00
|
|
|
ECORE_MAGIC_SET(job, ECORE_MAGIC_FILE_DOWNLOAD_JOB);
|
|
|
|
|
2005-06-17 16:52:32 -07:00
|
|
|
job->file = fopen(dst, "wb");
|
|
|
|
if (!job->file)
|
|
|
|
{
|
|
|
|
free(job);
|
|
|
|
return NULL;
|
|
|
|
}
|
2008-03-09 09:43:32 -07:00
|
|
|
job->url_con = ecore_con_url_new(url);
|
|
|
|
if (!job->url_con)
|
2005-06-17 16:52:32 -07:00
|
|
|
{
|
|
|
|
fclose(job->file);
|
|
|
|
free(job);
|
|
|
|
return NULL;
|
|
|
|
}
|
2007-11-07 13:15:11 -08:00
|
|
|
|
2008-03-09 09:43:32 -07:00
|
|
|
ecore_con_url_fd_set(job->url_con, fileno(job->file));
|
|
|
|
ecore_con_url_data_set(job->url_con, data);
|
|
|
|
|
|
|
|
job->dst = strdup(dst);
|
2007-11-07 13:15:11 -08:00
|
|
|
|
2005-06-17 16:52:32 -07:00
|
|
|
job->completion_cb = completion_cb;
|
2006-04-07 05:27:39 -07:00
|
|
|
job->progress_cb = progress_cb;
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
_job_list = eina_list_append(_job_list, job);
|
2005-06-17 16:52:32 -07:00
|
|
|
|
2008-03-09 09:43:32 -07:00
|
|
|
ecore_con_url_send(job->url_con, NULL, 0, NULL);
|
2005-06-17 16:52:32 -07:00
|
|
|
|
|
|
|
return job;
|
|
|
|
}
|
2009-10-14 10:29:13 -07:00
|
|
|
# endif
|
2009-11-23 01:05:02 -08:00
|
|
|
#endif
|
2008-03-11 03:24:10 -07:00
|
|
|
|
2010-03-14 03:53:14 -07:00
|
|
|
/**
|
2010-05-18 16:06:07 -07:00
|
|
|
* Abort the given download job and call the @p completion_cb function with a
|
|
|
|
* @status of 1 (error)
|
2010-03-14 03:53:14 -07:00
|
|
|
* @param job The download job to abort
|
|
|
|
*/
|
|
|
|
|
2009-11-13 09:51:52 -08:00
|
|
|
EAPI void
|
|
|
|
ecore_file_download_abort(Ecore_File_Download_Job *job)
|
2008-03-11 03:24:10 -07:00
|
|
|
{
|
2009-11-23 01:05:02 -08:00
|
|
|
#ifdef BUILD_ECORE_CON
|
2010-05-18 16:06:07 -07:00
|
|
|
if (job->completion_cb)
|
|
|
|
job->completion_cb(ecore_con_url_data_get(job->url_con), job->dst, 1);
|
2009-10-14 10:29:13 -07:00
|
|
|
# ifdef HAVE_CURL
|
2008-03-11 03:24:10 -07:00
|
|
|
ecore_con_url_destroy(job->url_con);
|
2009-11-14 05:43:38 -08:00
|
|
|
# endif
|
2009-11-13 09:51:52 -08:00
|
|
|
_job_list = eina_list_remove(_job_list, job);
|
2008-03-11 03:24:10 -07:00
|
|
|
fclose(job->file);
|
|
|
|
free(job->dst);
|
|
|
|
free(job);
|
2009-10-14 10:29:13 -07:00
|
|
|
#endif /* BUILD_ECORE_CON */
|
2009-11-23 01:05:02 -08:00
|
|
|
}
|