summaryrefslogtreecommitdiff
path: root/src/media-thumbnail.c
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2015-09-07 13:10:55 +0900
committerMinje Ahn <minje.ahn@samsung.com>2015-09-07 13:10:55 +0900
commite7bfe2daa994ee3eaacd53673ac5ff078a9399ec (patch)
tree78cc915ee3b71af1e2275406ddda160fb3897a0b /src/media-thumbnail.c
parent861a99ca9cc88fb8d54e70543e227c2c2e803fe7 (diff)
downloadlibmedia-thumbnail-dccb0b1e464f2bd40f0672dea6cf98b5e7f0b617.tar.gz
libmedia-thumbnail-dccb0b1e464f2bd40f0672dea6cf98b5e7f0b617.tar.bz2
libmedia-thumbnail-dccb0b1e464f2bd40f0672dea6cf98b5e7f0b617.zip
Change-Id: I4bab6e37f9d943c719325f971ae9d3499a77f93f Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/media-thumbnail.c')
-rwxr-xr-xsrc/media-thumbnail.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c
index e5f6c2b..dd16356 100755
--- a/src/media-thumbnail.c
+++ b/src/media-thumbnail.c
@@ -165,15 +165,7 @@ int thumbnail_request_extract_raw_data_async(int request_id, const char *origin_
return MS_MEDIA_ERR_NONE;
}
-int _media_thumbnail_cancel_cb(int error_code, char* path, void* data)
-{
- thumb_dbg("Error code : %d", error_code);
- if (path) thumb_dbg_slog("Cancel : %s", path);
-
- return MS_MEDIA_ERR_NONE;
-}
-
-int thumbnail_request_cancel_media(const char *origin_path, uid_t uid)
+int thumbnail_request_cancel_media(const char *origin_path)
{
int err = MS_MEDIA_ERR_NONE;
@@ -182,7 +174,7 @@ int thumbnail_request_cancel_media(const char *origin_path, uid_t uid)
return MS_MEDIA_ERR_INVALID_PARAMETER;
}
- err = _media_thumb_request_async(THUMB_REQUEST_CANCEL_MEDIA, origin_path, NULL, uid);
+ err = _media_thumb_request_async(THUMB_REQUEST_CANCEL_MEDIA, origin_path, NULL, 0);
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("_media_thumb_request failed : %d", err);
return err;
@@ -191,17 +183,16 @@ int thumbnail_request_cancel_media(const char *origin_path, uid_t uid)
return MS_MEDIA_ERR_NONE;
}
-int thumbnail_request_cancel_raw_data(int request_id, uid_t uid)
+int thumbnail_request_cancel_raw_data(int request_id)
{
int err = MS_MEDIA_ERR_NONE;
- const char *dummy_str = "dummy";
if (request_id == 0) {
thumb_err("Invalid parameter");
return MS_MEDIA_ERR_INVALID_PARAMETER;
}
- err = _media_thumb_request_raw_data_async(THUMB_REQUEST_CANCEL_RAW_DATA, request_id, dummy_str, 0, 0, NULL, uid);
+ err = _media_thumb_request_raw_data_async(THUMB_REQUEST_CANCEL_RAW_DATA, request_id, NULL, 0, 0, NULL, 0);
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("_media_thumb_request failed : %d", err);
return err;
@@ -210,24 +201,15 @@ int thumbnail_request_cancel_raw_data(int request_id, uid_t uid)
return MS_MEDIA_ERR_NONE;
}
-int thumbnail_request_cancel_all(bool is_raw_data, uid_t uid)
+int thumbnail_request_cancel_all(bool is_raw_data)
{
int err = MS_MEDIA_ERR_NONE;
- media_thumb_info thumb_info;
- char tmp_origin_path[MAX_PATH_SIZE] = {0,};
- char tmp_thumb_path[MAX_PATH_SIZE] = {0,};
-
- /* Request for thumb file to the daemon "Thumbnail generator" */
if(is_raw_data) {
- err = _media_thumb_request(THUMB_REQUEST_CANCEL_ALL_RAW_DATA, tmp_origin_path, tmp_thumb_path, sizeof(tmp_thumb_path), &thumb_info, uid);
+ err = _media_thumb_request_cancel_all(true);
} else {
- err = _media_thumb_request(THUMB_REQUEST_CANCEL_ALL, tmp_origin_path, tmp_thumb_path, sizeof(tmp_thumb_path), &thumb_info, uid);
- }
- if (err != MS_MEDIA_ERR_NONE) {
- thumb_err("_media_thumb_request failed : %d", err);
- return err;
+ err = _media_thumb_request_cancel_all(false);
}
- return MS_MEDIA_ERR_NONE;
+ return err;
}