2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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.
22 #include <glib/gstdio.h>
24 #define INTERNAL_FILE_PATH "/opt/media/Camera"
25 #define EXTERNAL_FILE_PATH "/opt/storage/sdcard/Camera"
34 gboolean cam_file_init(GError **error);
35 void cam_file_finalize();
36 gboolean cam_file_get_size(const char *filename, guint64 *size);
37 gboolean cam_file_check_exists(gchar *filename);
38 gboolean cam_file_get_size(const char *filename, guint64 *size);
40 gboolean cam_file_register(const char *filename, GError **error);
41 gboolean cam_file_register_to_DCF(const char *filename, GError **error);
42 gboolean cam_file_delete(const gchar *filename, GError **error);
43 gboolean cam_file_rename(const gchar *filename, const gchar *new_name,
45 const gchar *cam_file_get_dcim_path(void);
46 const gchar *cam_file_get_internal_image_path(void);
47 const gchar *cam_file_get_internal_video_path(void);
48 const gchar *cam_file_get_external_image_path(void);
49 const gchar *cam_file_get_external_video_path(void);
51 gchar *cam_file_get_next_filename_for_multishot(const gchar *storage_root,
52 const gchar *first_file_name,
54 gchar *cam_file_get_next_filename(const gchar *storage_root,
55 const gchar *prefix_string,
57 gchar *cam_file_get_next_dcim_filename(const gchar *storage_root, media_type_t media_type);
59 * @brief get latest file path in @storage_root folder
60 * @param[in] data camera appdata structure
61 * @param[in] storage_root folder path (full path)
62 * @return Operation result
63 * @retval NOT NULL lateset file path in @storage_root
64 * @retval NULL Error or no file
66 gchar *cam_file_get_last_file_path (void *data, const gchar *storage_root);
68 * @brief get latest file path folder id in @storage_root folder,folder id is for media-content api
69 * @param[in] storage_root folder path (full path)
70 * @return Operation result
71 * @retval NOT NULL folder id for @storage_root
74 char *cam_file_get_cam_storage_folder_id(const gchar *storage_root);
76 * @brief get thumbnail full path of @file_path,folder id is for media-content api
77 * @param[in] file_path file path (full path)
78 * @param[out] file_path thumbnail_path of @file_path (full path)
79 * @return Operation result
80 * @retval TRUE succeed
83 gboolean cam_file_get_cam_file_thumbnail_path(const gchar *file_path, gchar **thumbnail_path);
85 gboolean cam_check_dir();