2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __THUMBNAIL_MANAGER_H__
18 #define __THUMBNAIL_MANAGER_H__
20 #include "unified_storage_format.h"
23 * Thumbnail size information
31 // TODO check this enum
34 UNIFIED_STORAGE_THUMB_LARGE,
35 UNIFIED_STORAGE_THUMB_SMALL,
38 UNIFIED_STORAGE_FORMAT_PUBLIC_API int thumbnail_manager_init(void);
39 UNIFIED_STORAGE_FORMAT_PUBLIC_API int thumbnail_manager_deinit(void);
42 * @brief Sets thumbnail size
43 * @param thumbnail_size Thumbnail size
45 UNIFIED_STORAGE_FORMAT_PUBLIC_API void thumbnail_manager_set_thumbnail_size(const thumbnail_size_s *thumbnail_size);
48 * @brief Gets thumbnail size
49 * @param thumbnail_size Thumbnail size
51 UNIFIED_STORAGE_FORMAT_PUBLIC_API void thumbnail_manager_get_thumbnail_size(thumbnail_size_s *thumbnail_size);
54 * @brief Generate hash name for thumbnail file
55 * @param origin_path File path
56 * @param hash_code Generated hash name for thumbnail file
57 * @param max_length Max length of has name to be generated
58 * @return 0 on success, -1 otherwise
60 UNIFIED_STORAGE_FORMAT_PUBLIC_API int thumbnail_manager_generate_hash(const char *origin_path, char *hash_code, int max_length);
63 * Creates thumbnail file for image file
64 * @param file_path File path
65 * @param thumb_type Thumbnail type
66 * @param thumb_path Thumbnail path
67 * @return 0 on success, -1 otherwise
69 // TODO check this function
70 UNIFIED_STORAGE_FORMAT_PUBLIC_API int create_thumbnail_file_for_image_file(const char *file_path, const char *thumb_path);
71 //UNIFIED_STORAGE_FORMAT_PUBLIC_API int create_thumbnail_file_for_image_file(const char *file_path, media_thumb_type_e thumb_type, const char *thumb_path);
73 #endif /* __THUMBNAIL_MANAGER_H__ */