summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>2014-08-26 14:28:49 (GMT)
committerJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>2014-09-30 12:09:14 (GMT)
commit561e2cae46730cdbadf485dfa7ab449e60524bae (patch)
tree5d2127e248aac6750950cbd2352976729baa4bc7 /src/include
parent1b8cf739c37f1103b7fa613b788f0d5e32f5bad9 (diff)
downloadlibmedia-thumbnail-561e2cae46730cdbadf485dfa7ab449e60524bae.zip
libmedia-thumbnail-561e2cae46730cdbadf485dfa7ab449e60524bae.tar.gz
libmedia-thumbnail-561e2cae46730cdbadf485dfa7ab449e60524bae.tar.bz2
Use User UID to write or read into database Use Unix socket Fix-Tizen: TC-1482 Change-Id: I557a28de1650c9af1a30ef7d795d64464eaa2e8f Signed-off-by: Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/ipc/media-thumb-ipc.h10
-rwxr-xr-xsrc/include/media-thumb-internal.h6
-rwxr-xr-xsrc/include/util/media-thumb-db.h5
-rwxr-xr-xsrc/include/util/media-thumb-util.h11
4 files changed, 20 insertions, 12 deletions
diff --git a/src/include/ipc/media-thumb-ipc.h b/src/include/ipc/media-thumb-ipc.h
index ce81c01..1819af4 100755
--- a/src/include/ipc/media-thumb-ipc.h
+++ b/src/include/ipc/media-thumb-ipc.h
@@ -42,6 +42,7 @@
#include <unistd.h>
#include <errno.h>
#include <signal.h>
+#include <sys/types.h>
#ifndef _MEDIA_THUMB_IPC_H_
#define _MEDIA_THUMB_IPC_H_
@@ -83,6 +84,7 @@ typedef struct _thumbMsg{
media_thumb_type thumb_type;
int status;
int pid;
+ uid_t uid;
int thumb_size;
int thumb_width;
int thumb_height;
@@ -121,15 +123,17 @@ _media_thumb_request(int msg_type,
const char *origin_path,
char *thumb_path,
int max_length,
- media_thumb_info *thumb_info);
+ media_thumb_info *thumb_info,
+ uid_t uid);
int
_media_thumb_request_async(int msg_type,
media_thumb_type thumb_type,
const char *origin_path,
- thumbUserData *userData);
+ thumbUserData *userData,
+ uid_t uid);
int
-_media_thumb_process(thumbMsg *req_msg, thumbMsg *res_msg);
+_media_thumb_process(thumbMsg *req_msg, thumbMsg *res_msg, uid_t uid);
#endif /*_MEDIA_THUMB_IPC_H_*/
diff --git a/src/include/media-thumb-internal.h b/src/include/media-thumb-internal.h
index 0180a29..32427ca 100755
--- a/src/include/media-thumb-internal.h
+++ b/src/include/media-thumb-internal.h
@@ -69,13 +69,15 @@ _media_thumb_image(const char *origin_path,
int thumb_width,
int thumb_height,
media_thumb_format format,
- media_thumb_info *thumb_info);
+ media_thumb_info *thumb_info,
+ uid_t uid);
int
_media_thumb_video(const char *origin_path,
int thumb_width,
int thumb_height,
media_thumb_format format,
- media_thumb_info *thumb_info);
+ media_thumb_info *thumb_info,
+ uid_t uid);
#endif /*_MEDIA_THUMB_INTERNAL_H_*/
diff --git a/src/include/util/media-thumb-db.h b/src/include/util/media-thumb-db.h
index effd3f4..b29920a 100755
--- a/src/include/util/media-thumb-db.h
+++ b/src/include/util/media-thumb-db.h
@@ -51,7 +51,7 @@
sqlite3 *_media_thumb_db_get_handle();
int
-_media_thumb_db_connect();
+_media_thumb_db_connect(uid_t uid);
int
_media_thumb_db_disconnect();
@@ -74,7 +74,8 @@ int
_media_thumb_update_db(const char *origin_path,
char *thumb_path,
int width,
- int height);
+ int height,
+ uid_t uid);
#endif /*_MEDIA_THUMB_DB_H_*/
diff --git a/src/include/util/media-thumb-util.h b/src/include/util/media-thumb-util.h
index 20c54bb..4fe33f8 100755
--- a/src/include/util/media-thumb-util.h
+++ b/src/include/util/media-thumb-util.h
@@ -43,10 +43,10 @@
#define THUMB_PATH_PHONE MEDIA_ROOT_PATH_INTERNAL /**< File path prefix of files stored in phone */
#define THUMB_PATH_MMC MEDIA_ROOT_PATH_SDCARD /**< File path prefix of files stored in mmc card */
-#define THUMB_PHONE_PATH tzplatform_mkpath(TZ_SYS_DATA, "file-manager-service/.thumb/phone")
-#define THUMB_MMC_PATH tzplatform_mkpath(TZ_SYS_DATA, "file-manager-service/.thumb/mmc")
+#define THUMB_PHONE_PATH tzplatform_mkpath(TZ_USER_DATA, "file-manager-service/.thumb/phone")
+#define THUMB_MMC_PATH tzplatform_mkpath(TZ_USER_DATA, "file-manager-service/.thumb/mmc")
-#define THUMB_DEFAULT_PATH tzplatform_mkpath(TZ_SYS_DATA, "file-manager-service/.thumb/thumb_default.png")
+#define THUMB_DEFAULT_PATH tzplatform_mkpath(TZ_USER_DATA, "file-manager-service/.thumb/thumb_default.png")
typedef enum
{
@@ -72,7 +72,7 @@ char
int
_media_thumb_get_hash_name(const char *file_full_path,
- char *thumb_hash_path, size_t max_thumb_path);
+ char *thumb_hash_path, size_t max_thumb_path, uid_t uid);
int
_media_thumb_save_to_file_with_evas(unsigned char *data,
@@ -141,7 +141,8 @@ int _thumbnail_get_data(const char *origin_path,
int *height,
int *origin_width,
int *origin_height,
- int *alpha);
+ int *alpha,
+ uid_t uid);
#endif /*_MEDIA_THUMB_UTIL_H_*/