forked from enlightenment/efl
- 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:
parent
94c5dabec5
commit
1c6ef60b3c
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue