- add ecore_file_download_protocol_available so we can determine if the

protocols we need are compiled in or not


SVN revision: 15488
This commit is contained in:
Dan Sinclair 2005-06-22 14:51:37 +00:00 committed by Dan Sinclair
parent 94c5dabec5
commit 1c6ef60b3c
3 changed files with 15 additions and 1 deletions

View File

@ -14,3 +14,4 @@ Kim Woelders <kim@woelders.dk>
Sebastian Dransfeld <sebastid@tango.flipp.net>
Simon Poole <simon.armlinux@themalago.net>
Jorge Luis Zapata Muga <jorgeluis.zapata@gmail.com>
dan sinclair <zero@everburning.com>

View File

@ -83,6 +83,7 @@ extern "C" {
const char *file,
int status),
void *data);
EAPI int ecore_file_download_protocol_available(const char *protocol);
#ifdef __cplusplus
}

View File

@ -97,7 +97,7 @@ ecore_file_download(const char *url, const char *dst,
}
#ifdef HAVE_CURL
else if ((!strncmp(url, "http://", 7)) ||
(!strncmp(url, "ftp://", 7)))
(!strncmp(url, "ftp://", 6)))
{
/* download */
Ecore_File_Download_Job *job;
@ -115,6 +115,18 @@ ecore_file_download(const char *url, const char *dst,
}
}
int
ecore_file_download_protocol_available(const char *protocol)
{
if (!strncmp(protocol, "file://", 7)) return 1;
#ifdef HAVE_CURL
else if (!strncmp(protocol, "http://", 7)) return 1;
else if (!strncmp(protocol, "ftp://", 6)) return 1;
#endif
return 0;
}
#ifdef HAVE_CURL
/*
* FIXME: Use