#define MAX_SIZE 16
#define MAX_PATH_SIZE 4096
-int __thumbnail_util_replace_path(const char *path, char *replace_path)
+static int __thumbnail_util_replace_path(const char *path, char *replace_path)
{
if (!STRING_VALID(path)) {
thumbnail_util_error("Invalid path");
return THUMBNAIL_UTIL_ERROR_NONE;
}
-int __thumbnail_util_error_capi(int internal_error)
+static int __thumbnail_util_error_capi(int internal_error)
{
switch (internal_error) {
case MS_MEDIA_ERR_NONE:
}
}
-void __thumbnail_util_convert_itoa(int request_id, char **req_str)
+static void __thumbnail_util_convert_itoa(int request_id, char **req_str)
{
char buf[MAX_SIZE] = {0, };
snprintf(buf, MAX_SIZE, "%d", request_id);
*req_str = strndup(buf, strlen(buf));
}
-void __thumbnail_util_extract_completed_cb(int error, int request_id, const char *path, int thumb_width, int thumb_height, unsigned char *thumb_data, int thumb_size, void *user_data)
+static void __thumbnail_util_extract_completed_cb(int error, int request_id, const char *path, int thumb_width, int thumb_height, unsigned char *thumb_data, int thumb_size, void *user_data)
{
thumbnail_extract_cb_s *_thumb_cb = (thumbnail_extract_cb_s *)user_data;
char *request_id_str = NULL;
return ret;
}
-int __thumbnail_util_get_file_ext(const char *file_path, char *file_ext, int max_len)
+static int __thumbnail_util_get_file_ext(const char *file_path, char *file_ext, int max_len)
{
int i = 0;
for (i = (int)strlen(file_path); i >= 0; i--) {
if ((file_path[i] == '.') && (i < (int)strlen(file_path))) {
- strncpy(file_ext, &file_path[i + 1], max_len);
+ g_strlcpy(file_ext, &file_path[i + 1], max_len);
return THUMBNAIL_UTIL_ERROR_NONE;
}