forked from enlightenment/efl
url: Added underscore(_) to elm internal functions, elm_url_xxx.
- _elm_url_download, _elm_url_cancel, _elm_url_get - other internal functions in elm_priv.h also have same prefix.
This commit is contained in:
parent
a4f3074f9c
commit
68eca6d62e
|
@ -496,7 +496,7 @@ _elm_image_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
ecore_timer_del(sd->anim_timer);
|
ecore_timer_del(sd->anim_timer);
|
||||||
evas_object_del(sd->img);
|
evas_object_del(sd->img);
|
||||||
evas_object_del(sd->prev_img);
|
evas_object_del(sd->prev_img);
|
||||||
if (sd->remote) elm_url_cancel(sd->remote);
|
if (sd->remote) _elm_url_cancel(sd->remote);
|
||||||
free(sd->remote_data);
|
free(sd->remote_data);
|
||||||
eina_stringshare_del(sd->key);
|
eina_stringshare_del(sd->key);
|
||||||
|
|
||||||
|
@ -922,10 +922,10 @@ _elm_image_smart_download_done(void *data, Elm_Url *url EINA_UNUSED, Eina_Binbuf
|
||||||
if (sd->remote_data) free(sd->remote_data);
|
if (sd->remote_data) free(sd->remote_data);
|
||||||
length = eina_binbuf_length_get(download);
|
length = eina_binbuf_length_get(download);
|
||||||
sd->remote_data = eina_binbuf_string_steal(download);
|
sd->remote_data = eina_binbuf_string_steal(download);
|
||||||
f = eina_file_virtualize(elm_url_get(url),
|
f = eina_file_virtualize(_elm_url_get(url),
|
||||||
sd->remote_data, length,
|
sd->remote_data, length,
|
||||||
EINA_FALSE);
|
EINA_FALSE);
|
||||||
_elm_image_smart_internal_file_set(obj, sd, elm_url_get(url), f, sd->key, &ret);
|
_elm_image_smart_internal_file_set(obj, sd, _elm_url_get(url), f, sd->key, &ret);
|
||||||
eina_file_close(f);
|
eina_file_close(f);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
@ -992,7 +992,7 @@ _elm_image_smart_file_set(Eo *obj, void *_pd, va_list *list)
|
||||||
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (sd->remote) elm_url_cancel(sd->remote);
|
if (sd->remote) _elm_url_cancel(sd->remote);
|
||||||
sd->remote = NULL;
|
sd->remote = NULL;
|
||||||
|
|
||||||
for (i = 0; i < sizeof (remote_uri) / sizeof (remote_uri[0]); ++i)
|
for (i = 0; i < sizeof (remote_uri) / sizeof (remote_uri[0]); ++i)
|
||||||
|
@ -1000,7 +1000,7 @@ _elm_image_smart_file_set(Eo *obj, void *_pd, va_list *list)
|
||||||
{
|
{
|
||||||
// Found a remote target !
|
// Found a remote target !
|
||||||
evas_object_hide(sd->img);
|
evas_object_hide(sd->img);
|
||||||
sd->remote = elm_url_download(file,
|
sd->remote = _elm_url_download(file,
|
||||||
_elm_image_smart_download_done,
|
_elm_image_smart_download_done,
|
||||||
_elm_image_smart_download_cancel,
|
_elm_image_smart_download_cancel,
|
||||||
_elm_image_smart_download_progress,
|
_elm_image_smart_download_progress,
|
||||||
|
@ -1027,7 +1027,7 @@ _elm_image_smart_mmap_set(Eo *obj, void *_pd, va_list *list)
|
||||||
|
|
||||||
Elm_Image_Smart_Data *sd = _pd;
|
Elm_Image_Smart_Data *sd = _pd;
|
||||||
|
|
||||||
if (sd->remote) elm_url_cancel(sd->remote);
|
if (sd->remote) _elm_url_cancel(sd->remote);
|
||||||
sd->remote = NULL;
|
sd->remote = NULL;
|
||||||
|
|
||||||
_elm_image_smart_internal_file_set(obj, sd,
|
_elm_image_smart_internal_file_set(obj, sd,
|
||||||
|
|
|
@ -1413,7 +1413,7 @@ _elm_photocam_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
|
||||||
|
|
||||||
if (sd->f) eina_file_close(sd->f);
|
if (sd->f) eina_file_close(sd->f);
|
||||||
free(sd->remote_data);
|
free(sd->remote_data);
|
||||||
if (sd->remote) elm_url_cancel(sd->remote);
|
if (sd->remote) _elm_url_cancel(sd->remote);
|
||||||
eina_stringshare_del(sd->file);
|
eina_stringshare_del(sd->file);
|
||||||
ecore_job_del(sd->calc_job);
|
ecore_job_del(sd->calc_job);
|
||||||
ecore_timer_del(sd->scr_timer);
|
ecore_timer_del(sd->scr_timer);
|
||||||
|
@ -1560,10 +1560,10 @@ _elm_photocam_download_done(void *data, Elm_Url *url EINA_UNUSED, Eina_Binbuf *d
|
||||||
if (sd->remote_data) free(sd->remote_data);
|
if (sd->remote_data) free(sd->remote_data);
|
||||||
length = eina_binbuf_length_get(download);
|
length = eina_binbuf_length_get(download);
|
||||||
sd->remote_data = eina_binbuf_string_steal(download);
|
sd->remote_data = eina_binbuf_string_steal(download);
|
||||||
f = eina_file_virtualize(elm_url_get(url),
|
f = eina_file_virtualize(_elm_url_get(url),
|
||||||
sd->remote_data, length,
|
sd->remote_data, length,
|
||||||
EINA_FALSE);
|
EINA_FALSE);
|
||||||
_internal_file_set(obj, sd, elm_url_get(url), f, &ret);
|
_internal_file_set(obj, sd, _elm_url_get(url), f, &ret);
|
||||||
eina_file_close(f);
|
eina_file_close(f);
|
||||||
|
|
||||||
if (ret != EVAS_LOAD_ERROR_NONE)
|
if (ret != EVAS_LOAD_ERROR_NONE)
|
||||||
|
@ -1634,14 +1634,14 @@ _file_set(Eo *obj, void *_pd, va_list *list)
|
||||||
sd->f = NULL;
|
sd->f = NULL;
|
||||||
|
|
||||||
free(sd->remote_data);
|
free(sd->remote_data);
|
||||||
if (sd->remote) elm_url_cancel(sd->remote);
|
if (sd->remote) _elm_url_cancel(sd->remote);
|
||||||
sd->remote = NULL;
|
sd->remote = NULL;
|
||||||
|
|
||||||
for (i = 0; i < sizeof (remote_uri) / sizeof (remote_uri[0]); ++i)
|
for (i = 0; i < sizeof (remote_uri) / sizeof (remote_uri[0]); ++i)
|
||||||
if (strncmp(remote_uri[i], file, strlen(remote_uri[i])) == 0)
|
if (strncmp(remote_uri[i], file, strlen(remote_uri[i])) == 0)
|
||||||
{
|
{
|
||||||
// Found a remote target !
|
// Found a remote target !
|
||||||
sd->remote = elm_url_download(file,
|
sd->remote = _elm_url_download(file,
|
||||||
_elm_photocam_download_done,
|
_elm_photocam_download_done,
|
||||||
_elm_photocam_download_cancel,
|
_elm_photocam_download_cancel,
|
||||||
_elm_photocam_download_progress,
|
_elm_photocam_download_progress,
|
||||||
|
|
|
@ -475,9 +475,9 @@ typedef void (*Elm_Url_Done)(void *data, Elm_Url *url, Eina_Binbuf *download);
|
||||||
typedef void (*Elm_Url_Cancel)(void *data, Elm_Url *url, int error);
|
typedef void (*Elm_Url_Cancel)(void *data, Elm_Url *url, int error);
|
||||||
typedef void (*Elm_Url_Progress)(void *data, Elm_Url *url, double now, double total);
|
typedef void (*Elm_Url_Progress)(void *data, Elm_Url *url, double now, double total);
|
||||||
|
|
||||||
Elm_Url *elm_url_download(const char *url, Elm_Url_Done done_cb, Elm_Url_Cancel cancel_cb, Elm_Url_Progress progress_cb, const void *data);
|
Elm_Url *_elm_url_download(const char *url, Elm_Url_Done done_cb, Elm_Url_Cancel cancel_cb, Elm_Url_Progress progress_cb, const void *data);
|
||||||
void elm_url_cancel(Elm_Url *r);
|
void _elm_url_cancel(Elm_Url *r);
|
||||||
const char *elm_url_get(Elm_Url *r);
|
const char *_elm_url_get(Elm_Url *r);
|
||||||
|
|
||||||
extern char *_elm_appname;
|
extern char *_elm_appname;
|
||||||
extern Elm_Config *_elm_config;
|
extern Elm_Config *_elm_config;
|
||||||
|
|
|
@ -88,7 +88,7 @@ _elm_url_data(void *data, int type EINA_UNUSED, void *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
Elm_Url *
|
Elm_Url *
|
||||||
elm_url_download(const char *url, Elm_Url_Done done_cb, Elm_Url_Cancel cancel_cb, Elm_Url_Progress progress_cb, const void *data)
|
_elm_url_download(const char *url, Elm_Url_Done done_cb, Elm_Url_Cancel cancel_cb, Elm_Url_Progress progress_cb, const void *data)
|
||||||
{
|
{
|
||||||
Ecore_Con_Url *target;
|
Ecore_Con_Url *target;
|
||||||
Elm_Url *r;
|
Elm_Url *r;
|
||||||
|
@ -139,14 +139,14 @@ elm_url_download(const char *url, Elm_Url_Done done_cb, Elm_Url_Cancel cancel_cb
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
elm_url_cancel(Elm_Url *r)
|
_elm_url_cancel(Elm_Url *r)
|
||||||
{
|
{
|
||||||
r->cb.cancel((void*) r->data, r, 0);
|
r->cb.cancel((void*) r->data, r, 0);
|
||||||
_elm_url_free(r);
|
_elm_url_free(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
elm_url_get(Elm_Url *r)
|
_elm_url_get(Elm_Url *r)
|
||||||
{
|
{
|
||||||
return r->url;
|
return r->url;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue