diff options
author | Denis Khalikov <d.khalikov@partner.samsung.com> | 2016-11-28 12:47:37 +0300 |
---|---|---|
committer | Denis Khalikov <d.khalikov@partner.samsung.com> | 2016-11-28 12:47:37 +0300 |
commit | 0aa7b18d5850a4fa32e83a34cdd5ea57571b0ed1 (patch) | |
tree | dfd765f3a991a2657f04f2d8f81b7799845d5a01 | |
parent | 113d6661f2b907669fe534ec9fd1bfd89ba3e2ad (diff) | |
download | libmedia-thumbnail-sandbox/denis13/visibility.tar.gz libmedia-thumbnail-sandbox/denis13/visibility.tar.bz2 libmedia-thumbnail-sandbox/denis13/visibility.zip |
visibility supportsandbox/denis13/visibility
-rwxr-xr-x | CMakeLists.txt | 2 | ||||
-rwxr-xr-x | include/media-thumbnail.h | 14 | ||||
-rw-r--r-- | md5/media-thumb-hash.c | 3 | ||||
-rwxr-xr-x | src/include/codec/img-codec-parser.h | 4 | ||||
-rwxr-xr-x | src/include/codec/img-codec.h | 2 | ||||
-rwxr-xr-x | src/include/ipc/media-thumb-ipc.h | 14 | ||||
-rwxr-xr-x | src/include/util/media-thumb-util.h | 13 |
7 files changed, 28 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7eb108f..95f3a46 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -fvisibility=hidden") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") SET(CMAKE_C_FLAGS_RELEASE "-O2 -fPIC") diff --git a/include/media-thumbnail.h b/include/media-thumbnail.h index 76e4ffa..2feeda0 100755 --- a/include/media-thumbnail.h +++ b/include/media-thumbnail.h @@ -38,19 +38,19 @@ typedef int (*ThumbFunc) (int error_code, char* path, void* data); typedef void (*ThumbRawFunc) (int error_code, int request_id, const char* org_path, int thumb_width, int thumb_height, unsigned char* thumb_data, int thumb_size, void* data); -int thumbnail_request_from_db_async(unsigned int request_id, const char *origin_path, ThumbFunc func, void *user_data, uid_t uid); +__attribute__ ((visibility("default"))) int thumbnail_request_from_db_async(unsigned int request_id, const char *origin_path, ThumbFunc func, void *user_data, uid_t uid); -int thumbnail_request_extract_raw_data_async(int request_id, const char *origin_path, int width, int height, ThumbRawFunc func, void *user_data, uid_t uid); +__attribute__ ((visibility("default"))) int thumbnail_request_extract_raw_data_async(int request_id, const char *origin_path, int width, int height, ThumbRawFunc func, void *user_data, uid_t uid); -int thumbnail_request_extract_all_thumbs(uid_t uid); +__attribute__ ((visibility("default"))) int thumbnail_request_extract_all_thumbs(uid_t uid); -int thumbnail_request_from_db_with_size(const char *origin_path, char *thumb_path, int max_length, int *origin_width, int *origin_height, uid_t uid); +__attribute__ ((visibility("default"))) int thumbnail_request_from_db_with_size(const char *origin_path, char *thumb_path, int max_length, int *origin_width, int *origin_height, uid_t uid); -int thumbnail_request_cancel_media(unsigned int request_id, const char *origin_path); +__attribute__ ((visibility("default"))) int thumbnail_request_cancel_media(unsigned int request_id, const char *origin_path); -int thumbnail_request_cancel_raw_data(int request_id); +__attribute__ ((visibility("default"))) int thumbnail_request_cancel_raw_data(int request_id); -int thumbnail_request_cancel_all(bool is_raw_data); +__attribute__ ((visibility("default"))) int thumbnail_request_cancel_all(bool is_raw_data); #ifdef __cplusplus } diff --git a/md5/media-thumb-hash.c b/md5/media-thumb-hash.c index abd4fda..89bef73 100644 --- a/md5/media-thumb-hash.c +++ b/md5/media-thumb-hash.c @@ -46,6 +46,7 @@ static const char ACCEPTABLE_URI_CHARS[96] = { 0x20, 0x20, 0x3F, 0x20 }; +__attribute__((visibility("default"))) char *_media_thumb_generate_hash_name(const char *file) { int n; @@ -104,4 +105,4 @@ char *_media_thumb_generate_hash_name(const char *file) md5out[2 * n] = '\0'; return md5out; -}
\ No newline at end of file +} diff --git a/src/include/codec/img-codec-parser.h b/src/include/codec/img-codec-parser.h index b412416..2812d49 100755 --- a/src/include/codec/img-codec-parser.h +++ b/src/include/codec/img-codec-parser.h @@ -54,8 +54,8 @@ typedef enum } ImgCodecType; //ImgCodecType ImgGetInfoFile(const char*filePath, ImgImageInfo *imgInfo); -int ImgGetImageInfo(const char *filePath, ImgCodecType *type, unsigned int *width, unsigned int *height); -int ImgGetImageInfoForThumb(const char *filePath, ImgCodecType *type, unsigned int *width, unsigned int *height); +__attribute__ ((visibility("default"))) int ImgGetImageInfo(const char *filePath, ImgCodecType *type, unsigned int *width, unsigned int *height); +__attribute__ ((visibility("default"))) int ImgGetImageInfoForThumb(const char *filePath, ImgCodecType *type, unsigned int *width, unsigned int *height); #ifdef __cplusplus } diff --git a/src/include/codec/img-codec.h b/src/include/codec/img-codec.h index d365705..00517fb 100755 --- a/src/include/codec/img-codec.h +++ b/src/include/codec/img-codec.h @@ -30,6 +30,8 @@ extern "C" { #endif /* __cplusplus */ + +__attribute__((visibility("default"))) unsigned int* ImgGetFirstFrameAGIFAtSize(const char *szFileName, unsigned int width, unsigned int height); int ImgConvertRGB565ToRGB888(void *pBuf_rgb565, void **pBuf_rgb888, int width, int height); diff --git a/src/include/ipc/media-thumb-ipc.h b/src/include/ipc/media-thumb-ipc.h index 1b5b17f..4f8fe4b 100755 --- a/src/include/ipc/media-thumb-ipc.h +++ b/src/include/ipc/media-thumb-ipc.h @@ -59,26 +59,26 @@ enum { THUMB_FAIL }; -int _media_thumb_recv_msg(int sock, int header_size, thumbMsg *msg); +__attribute__ ((visibility("default"))) int _media_thumb_recv_msg(int sock, int header_size, thumbMsg *msg); -int _media_thumb_recv_udp_msg(int sock, int header_size, thumbMsg *msg, struct sockaddr_un *from_addr, unsigned int *from_size); +__attribute__ ((visibility("default"))) int _media_thumb_recv_udp_msg(int sock, int header_size, thumbMsg *msg, struct sockaddr_un *from_addr, unsigned int *from_size); -int _media_thumb_set_buffer(thumbMsg *req_msg, unsigned char **buf, int *buf_size); +__attribute__ ((visibility("default"))) int _media_thumb_set_buffer(thumbMsg *req_msg, unsigned char **buf, int *buf_size); -int _media_thumb_request(int msg_type, +__attribute__ ((visibility("default"))) int _media_thumb_request(int msg_type, const char *origin_path, char *thumb_path, int max_length, media_thumb_info *thumb_info, uid_t uid); -int _media_thumb_request_async(int msg_type, +__attribute__ ((visibility("default"))) int _media_thumb_request_async(int msg_type, unsigned int request_id, const char *origin_path, thumbUserData *userData, uid_t uid); -int _media_thumb_request_raw_data_async(int msg_type, +__attribute__ ((visibility("default"))) int _media_thumb_request_raw_data_async(int msg_type, int request_id, const char *origin_path, int width, @@ -86,6 +86,6 @@ int _media_thumb_request_raw_data_async(int msg_type, thumbRawUserData *userData, uid_t uid); -int _media_thumb_request_cancel_all(bool isRaw); +__attribute__ ((visibility("default"))) int _media_thumb_request_cancel_all(bool isRaw); #endif /*_MEDIA_THUMB_IPC_H_*/ diff --git a/src/include/util/media-thumb-util.h b/src/include/util/media-thumb-util.h index 9c2e4d3..b2fbcf6 100755 --- a/src/include/util/media-thumb-util.h +++ b/src/include/util/media-thumb-util.h @@ -52,17 +52,18 @@ typedef enum THUMB_MMC /**< Stored only in MMC */ } media_thumb_store_type; -int _media_thumb_get_store_type_by_path(const char *full_path); +__attribute__ ((visibility("default"))) int _media_thumb_get_store_type_by_path(const char *full_path); -int _media_thumb_get_file_ext(const char *file_path, char *file_ext, int max_len); +__attribute__ ((visibility("default"))) int _media_thumb_get_file_ext(const char *file_path, char *file_ext, int max_len); -int _media_thumb_get_file_type(const char *file_full_path); +__attribute__ ((visibility("default"))) int _media_thumb_get_file_type(const char *file_full_path); -char* _media_thumb_generate_hash_name(const char *file); +__attribute__((visibility("default"))) + char* _media_thumb_generate_hash_name(const char *file); -int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path, size_t max_thumb_path, uid_t uid); +__attribute__ ((visibility("default"))) int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path, size_t max_thumb_path, uid_t uid); -int _media_thumb_remove_file(const char *path); +__attribute__ ((visibility("default"))) int _media_thumb_remove_file(const char *path); #endif /*_MEDIA_THUMB_UTIL_H_*/ |