diff options
author | Daniel Juyung Seo <seojuyung2@gmail.com> | 2014-01-21 23:23:37 +0900 |
---|---|---|
committer | Daniel Juyung Seo <seojuyung2@gmail.com> | 2014-01-21 23:23:37 +0900 |
commit | 635916ce26bd87db9e8a78df53c33d5c0527fa6c (patch) | |
tree | 79368f471b7809e0852e8e38a56eaf6519eb5bac | |
parent | e3372339d8dbfaa4d85eae118bb940021fe6b2ce (diff) |
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.
-rw-r--r-- | src/lib/elm_image.c | 12 | ||||
-rw-r--r-- | src/lib/elm_photocam.c | 10 | ||||
-rw-r--r-- | src/lib/elm_priv.h | 6 | ||||
-rw-r--r-- | src/lib/elm_url.c | 6 |
4 files changed, 17 insertions, 17 deletions
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c index c669ea2be..e4e59d1e5 100644 --- a/src/lib/elm_image.c +++ b/src/lib/elm_image.c | |||
@@ -496,7 +496,7 @@ _elm_image_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) | |||
496 | ecore_timer_del(sd->anim_timer); | 496 | ecore_timer_del(sd->anim_timer); |
497 | evas_object_del(sd->img); | 497 | evas_object_del(sd->img); |
498 | evas_object_del(sd->prev_img); | 498 | evas_object_del(sd->prev_img); |
499 | if (sd->remote) elm_url_cancel(sd->remote); | 499 | if (sd->remote) _elm_url_cancel(sd->remote); |
500 | free(sd->remote_data); | 500 | free(sd->remote_data); |
501 | eina_stringshare_del(sd->key); | 501 | eina_stringshare_del(sd->key); |
502 | 502 | ||
@@ -922,10 +922,10 @@ _elm_image_smart_download_done(void *data, Elm_Url *url EINA_UNUSED, Eina_Binbuf | |||
922 | if (sd->remote_data) free(sd->remote_data); | 922 | if (sd->remote_data) free(sd->remote_data); |
923 | length = eina_binbuf_length_get(download); | 923 | length = eina_binbuf_length_get(download); |
924 | sd->remote_data = eina_binbuf_string_steal(download); | 924 | sd->remote_data = eina_binbuf_string_steal(download); |
925 | f = eina_file_virtualize(elm_url_get(url), | 925 | f = eina_file_virtualize(_elm_url_get(url), |
926 | sd->remote_data, length, | 926 | sd->remote_data, length, |
927 | EINA_FALSE); | 927 | EINA_FALSE); |
928 | _elm_image_smart_internal_file_set(obj, sd, elm_url_get(url), f, sd->key, &ret); | 928 | _elm_image_smart_internal_file_set(obj, sd, _elm_url_get(url), f, sd->key, &ret); |
929 | eina_file_close(f); | 929 | eina_file_close(f); |
930 | 930 | ||
931 | if (!ret) | 931 | if (!ret) |
@@ -992,7 +992,7 @@ _elm_image_smart_file_set(Eo *obj, void *_pd, va_list *list) | |||
992 | 992 | ||
993 | unsigned int i; | 993 | unsigned int i; |
994 | 994 | ||
995 | if (sd->remote) elm_url_cancel(sd->remote); | 995 | if (sd->remote) _elm_url_cancel(sd->remote); |
996 | sd->remote = NULL; | 996 | sd->remote = NULL; |
997 | 997 | ||
998 | for (i = 0; i < sizeof (remote_uri) / sizeof (remote_uri[0]); ++i) | 998 | 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) | |||
1000 | { | 1000 | { |
1001 | // Found a remote target ! | 1001 | // Found a remote target ! |
1002 | evas_object_hide(sd->img); | 1002 | evas_object_hide(sd->img); |
1003 | sd->remote = elm_url_download(file, | 1003 | sd->remote = _elm_url_download(file, |
1004 | _elm_image_smart_download_done, | 1004 | _elm_image_smart_download_done, |
1005 | _elm_image_smart_download_cancel, | 1005 | _elm_image_smart_download_cancel, |
1006 | _elm_image_smart_download_progress, | 1006 | _elm_image_smart_download_progress, |
@@ -1027,7 +1027,7 @@ _elm_image_smart_mmap_set(Eo *obj, void *_pd, va_list *list) | |||
1027 | 1027 | ||
1028 | Elm_Image_Smart_Data *sd = _pd; | 1028 | Elm_Image_Smart_Data *sd = _pd; |
1029 | 1029 | ||
1030 | if (sd->remote) elm_url_cancel(sd->remote); | 1030 | if (sd->remote) _elm_url_cancel(sd->remote); |
1031 | sd->remote = NULL; | 1031 | sd->remote = NULL; |
1032 | 1032 | ||
1033 | _elm_image_smart_internal_file_set(obj, sd, | 1033 | _elm_image_smart_internal_file_set(obj, sd, |
diff --git a/src/lib/elm_photocam.c b/src/lib/elm_photocam.c index bde52adb1..661e18394 100644 --- a/src/lib/elm_photocam.c +++ b/src/lib/elm_photocam.c | |||
@@ -1413,7 +1413,7 @@ _elm_photocam_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) | |||
1413 | 1413 | ||
1414 | if (sd->f) eina_file_close(sd->f); | 1414 | if (sd->f) eina_file_close(sd->f); |
1415 | free(sd->remote_data); | 1415 | free(sd->remote_data); |
1416 | if (sd->remote) elm_url_cancel(sd->remote); | 1416 | if (sd->remote) _elm_url_cancel(sd->remote); |
1417 | eina_stringshare_del(sd->file); | 1417 | eina_stringshare_del(sd->file); |
1418 | ecore_job_del(sd->calc_job); | 1418 | ecore_job_del(sd->calc_job); |
1419 | ecore_timer_del(sd->scr_timer); | 1419 | ecore_timer_del(sd->scr_timer); |
@@ -1560,10 +1560,10 @@ _elm_photocam_download_done(void *data, Elm_Url *url EINA_UNUSED, Eina_Binbuf *d | |||
1560 | if (sd->remote_data) free(sd->remote_data); | 1560 | if (sd->remote_data) free(sd->remote_data); |
1561 | length = eina_binbuf_length_get(download); | 1561 | length = eina_binbuf_length_get(download); |
1562 | sd->remote_data = eina_binbuf_string_steal(download); | 1562 | sd->remote_data = eina_binbuf_string_steal(download); |
1563 | f = eina_file_virtualize(elm_url_get(url), | 1563 | f = eina_file_virtualize(_elm_url_get(url), |
1564 | sd->remote_data, length, | 1564 | sd->remote_data, length, |
1565 | EINA_FALSE); | 1565 | EINA_FALSE); |
1566 | _internal_file_set(obj, sd, elm_url_get(url), f, &ret); | 1566 | _internal_file_set(obj, sd, _elm_url_get(url), f, &ret); |
1567 | eina_file_close(f); | 1567 | eina_file_close(f); |
1568 | 1568 | ||
1569 | if (ret != EVAS_LOAD_ERROR_NONE) | 1569 | if (ret != EVAS_LOAD_ERROR_NONE) |
@@ -1634,14 +1634,14 @@ _file_set(Eo *obj, void *_pd, va_list *list) | |||
1634 | sd->f = NULL; | 1634 | sd->f = NULL; |
1635 | 1635 | ||
1636 | free(sd->remote_data); | 1636 | free(sd->remote_data); |
1637 | if (sd->remote) elm_url_cancel(sd->remote); | 1637 | if (sd->remote) _elm_url_cancel(sd->remote); |
1638 | sd->remote = NULL; | 1638 | sd->remote = NULL; |
1639 | 1639 | ||
1640 | for (i = 0; i < sizeof (remote_uri) / sizeof (remote_uri[0]); ++i) | 1640 | for (i = 0; i < sizeof (remote_uri) / sizeof (remote_uri[0]); ++i) |
1641 | if (strncmp(remote_uri[i], file, strlen(remote_uri[i])) == 0) | 1641 | if (strncmp(remote_uri[i], file, strlen(remote_uri[i])) == 0) |
1642 | { | 1642 | { |
1643 | // Found a remote target ! | 1643 | // Found a remote target ! |
1644 | sd->remote = elm_url_download(file, | 1644 | sd->remote = _elm_url_download(file, |
1645 | _elm_photocam_download_done, | 1645 | _elm_photocam_download_done, |
1646 | _elm_photocam_download_cancel, | 1646 | _elm_photocam_download_cancel, |
1647 | _elm_photocam_download_progress, | 1647 | _elm_photocam_download_progress, |
diff --git a/src/lib/elm_priv.h b/src/lib/elm_priv.h index c2e19484b..0c997edd6 100644 --- a/src/lib/elm_priv.h +++ b/src/lib/elm_priv.h | |||
@@ -475,9 +475,9 @@ typedef void (*Elm_Url_Done)(void *data, Elm_Url *url, Eina_Binbuf *download); | |||
475 | typedef void (*Elm_Url_Cancel)(void *data, Elm_Url *url, int error); | 475 | typedef void (*Elm_Url_Cancel)(void *data, Elm_Url *url, int error); |
476 | typedef void (*Elm_Url_Progress)(void *data, Elm_Url *url, double now, double total); | 476 | typedef void (*Elm_Url_Progress)(void *data, Elm_Url *url, double now, double total); |
477 | 477 | ||
478 | 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); | 478 | 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); |
479 | void elm_url_cancel(Elm_Url *r); | 479 | void _elm_url_cancel(Elm_Url *r); |
480 | const char *elm_url_get(Elm_Url *r); | 480 | const char *_elm_url_get(Elm_Url *r); |
481 | 481 | ||
482 | extern char *_elm_appname; | 482 | extern char *_elm_appname; |
483 | extern Elm_Config *_elm_config; | 483 | extern Elm_Config *_elm_config; |
diff --git a/src/lib/elm_url.c b/src/lib/elm_url.c index 2f25ed2dc..95d38010d 100644 --- a/src/lib/elm_url.c +++ b/src/lib/elm_url.c | |||
@@ -88,7 +88,7 @@ _elm_url_data(void *data, int type EINA_UNUSED, void *event) | |||
88 | } | 88 | } |
89 | 89 | ||
90 | Elm_Url * | 90 | Elm_Url * |
91 | elm_url_download(const char *url, Elm_Url_Done done_cb, Elm_Url_Cancel cancel_cb, Elm_Url_Progress progress_cb, const void *data) | 91 | _elm_url_download(const char *url, Elm_Url_Done done_cb, Elm_Url_Cancel cancel_cb, Elm_Url_Progress progress_cb, const void *data) |
92 | { | 92 | { |
93 | Ecore_Con_Url *target; | 93 | Ecore_Con_Url *target; |
94 | Elm_Url *r; | 94 | Elm_Url *r; |
@@ -139,14 +139,14 @@ elm_url_download(const char *url, Elm_Url_Done done_cb, Elm_Url_Cancel cancel_cb | |||
139 | } | 139 | } |
140 | 140 | ||
141 | void | 141 | void |
142 | elm_url_cancel(Elm_Url *r) | 142 | _elm_url_cancel(Elm_Url *r) |
143 | { | 143 | { |
144 | r->cb.cancel((void*) r->data, r, 0); | 144 | r->cb.cancel((void*) r->data, r, 0); |
145 | _elm_url_free(r); | 145 | _elm_url_free(r); |
146 | } | 146 | } |
147 | 147 | ||
148 | const char * | 148 | const char * |
149 | elm_url_get(Elm_Url *r) | 149 | _elm_url_get(Elm_Url *r) |
150 | { | 150 | { |
151 | return r->url; | 151 | return r->url; |
152 | } | 152 | } |