4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Hyunjun Ko <zzoon.ko@samsung.com>, Haejeong Kim <backto.kim@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
24 #ifndef _MEDIA_SVC_ENV_H_
25 #define _MEDIA_SVC_ENV_H_
37 #define MEDIA_SVC_DB_NAME "/opt/dbspace/.media.db" /**< media db name*/
40 * DB table information
43 #define MEDIA_SVC_DB_TABLE_MEDIA "media" /**< media table*/
44 #define MEDIA_SVC_DB_TABLE_FOLDER "folder" /**< media_folder table*/
45 #define MEDIA_SVC_DB_TABLE_PLAYLIST "playlist" /**< playlist table*/
46 #define MEDIA_SVC_DB_TABLE_PLAYLIST_MAP "playlist_map" /**< playlist_map table*/
47 #define MEDIA_SVC_DB_TABLE_ALBUM "album" /**< album table*/
48 #define MEDIA_SVC_DB_TABLE_TAG "tag" /**< tag table*/
49 #define MEDIA_SVC_DB_TABLE_TAG_MAP "tag_map" /**< tag_map table*/
50 #define MEDIA_SVC_DB_TABLE_BOOKMARK "bookmark" /**< bookmark table*/
51 #define MEDIA_SVC_DB_TABLE_CUSTOM "custom" /**< custom table*/
54 #define MEDIA_SVC_METADATA_LEN_MAX 128 /**< Length of metadata*/
55 #define MEDIA_SVC_METADATA_DESCRIPTION_MAX 512 /**< Length of description*/
56 #define MEDIA_SVC_PATHNAME_SIZE 4096 /**< Length of Path name. */
57 #define MEDIA_SVC_UUID_SIZE 36 /**< Length of UUID*/
59 #define MEDIA_SVC_TAG_UNKNOWN "Unknown"
60 #define MEDIA_SVC_MEDIA_PATH "/opt/data/file-manager-service" /**< Media path*/
61 #define MEDIA_SVC_THUMB_PATH_PREFIX MEDIA_SVC_MEDIA_PATH"/.thumb" /**< Thumbnail path prefix*/
62 #define MEDIA_SVC_THUMB_INTERNAL_PATH MEDIA_SVC_THUMB_PATH_PREFIX"/phone" /**< Phone thumbnail path*/
63 #define MEDIA_SVC_THUMB_EXTERNAL_PATH MEDIA_SVC_THUMB_PATH_PREFIX"/mmc" /**< MMC thumbnail path*/
65 #define MEDIA_SVC_DEFAULT_GPS_VALUE -200 /**< Default GPS Value*/
66 #define THUMB_EXT "jpg"
68 #define MEDIA_SVC_PATH_PHONE "/opt/media"
69 #define MEDIA_SVC_PATH_MMC "/opt/storage/sdcard"
71 enum Exif_Orientation {
85 * Media meta data information
88 char title[MEDIA_SVC_METADATA_LEN_MAX]; /**< track title*/
89 char album[MEDIA_SVC_METADATA_LEN_MAX]; /**< album name*/
90 char artist[MEDIA_SVC_METADATA_LEN_MAX]; /**< artist name*/
91 char genre[MEDIA_SVC_METADATA_LEN_MAX]; /**< genre of track*/
92 char author[MEDIA_SVC_METADATA_LEN_MAX]; /**< author name*/
93 char year[MEDIA_SVC_METADATA_LEN_MAX]; /**< author name*/
94 char recorded_date[MEDIA_SVC_METADATA_LEN_MAX]; /**< recorded date*/
95 char copyright[MEDIA_SVC_METADATA_LEN_MAX]; /**< copyright*/
96 char track_num[MEDIA_SVC_METADATA_LEN_MAX]; /**< track number*/
97 char description[MEDIA_SVC_METADATA_DESCRIPTION_MAX]; /**< description*/
98 int bitrate; /**< bitrate*/
99 int samplerate; /**< samplerate*/
100 int channel; /**< channel*/
101 int duration; /**< duration*/
102 float longitude; /**< longitude*/
103 float latitude; /**< latitude*/
104 float altitude; /**< altitude*/
105 int width; /**< width*/
106 int height; /**< height*/
107 char datetaken[MEDIA_SVC_METADATA_LEN_MAX]; /**< datetaken*/
108 char timetaken[MEDIA_SVC_METADATA_LEN_MAX]; /**< timetaken*/
109 int orientation; /**< orientation*/
110 int rating; /**< user defined rating */
111 } media_svc_content_meta_s;
115 * Media data information
118 char media_uuid[MEDIA_SVC_UUID_SIZE+1]; /**< Unique ID of item */
119 char path[MEDIA_SVC_PATHNAME_SIZE]; /**< Full path and file name of media file */
120 char file_name[MEDIA_SVC_PATHNAME_SIZE]; /**< Full path and file name of media file */
121 int media_type; /**< Type of media file : internal/external */
122 char mime_type[MEDIA_SVC_PATHNAME_SIZE]; /**< Full path and file name of media file */
124 int added_time; /**< added time */
125 int modified_time; /**< modified time */
126 char folder_uuid[MEDIA_SVC_UUID_SIZE+1]; /**< Unique ID of folder */
127 int album_id; /**< Unique ID of album */
128 char thumbnail_path[MEDIA_SVC_PATHNAME_SIZE]; /**< Thumbnail image file path */
129 int played_count; /**< played count */
130 int last_played_time; /**< last played time */
131 int last_played_position;
132 int favourate; /**< favourate. o or 1 */
133 int hiding; /**< hiding. o or 1 */
134 int is_drm; /**< is_drm. o or 1 */
135 int storage_type; /**< Storage of media file : internal/external */
136 media_svc_content_meta_s media_meta; /**< meta data structure for audio files */
137 } media_svc_content_info_s;
140 * Media meta data information
143 char * title; /**< track title*/
144 char * album; /**< album name*/
145 char * artist; /**< artist name*/
146 char * genre; /**< genre of track*/
147 char * composer; /**< composer name*/
148 char * year; /**< year*/
149 char * recorded_date; /**< recorded date*/
150 char * copyright; /**< copyright*/
151 char * track_num; /**< track number*/
152 char * description; /**< description*/
153 int bitrate; /**< bitrate*/
154 int samplerate; /**< samplerate*/
155 int channel; /**< channel*/
156 int duration; /**< duration*/
157 float longitude; /**< longitude*/
158 float latitude; /**< latitude*/
159 float altitude; /**< altitude*/
160 int width; /**< width*/
161 int height; /**< height*/
162 char * datetaken; /**< datetaken*/
163 int orientation; /**< orientation*/
164 int rating; /**< user defined rating */
165 } media_svc_content_meta_s;
169 * Media data information
172 char * media_uuid; /**< Unique ID of item */
173 char * path; /**< Full path of media file */
174 char * file_name; /**< File name of media file. Display name */
175 int media_type; /**< Type of media file : internal/external */
176 char * mime_type; /**< Full path and file name of media file */
177 unsigned long long size; /**< size */
178 time_t added_time; /**< added time, time_t */
179 time_t modified_time; /**< modified time, time_t */
180 char * folder_uuid; /**< Unique ID of folder */
181 int album_id; /**< Unique ID of album */
182 char * thumbnail_path; /**< Thumbnail image file path */
183 int played_count; /**< played count */
184 int last_played_time; /**< last played time */
185 int last_played_position; /**< last played position */
186 int favourate; /**< favourate. o or 1 */
187 int is_drm; /**< is_drm. o or 1 */
188 int storage_type; /**< Storage of media file : internal/external */
189 media_svc_content_meta_s media_meta; /**< meta data structure for audio files */
190 } media_svc_content_info_s;
194 MEDIA_SVC_QUERY_INSERT_ITEM,
195 MEDIA_SVC_QUERY_SET_ITEM_VALIDITY,
196 MEDIA_SVC_QUERY_MOVE_ITEM,
197 } media_svc_query_type_e;
203 #endif /*_MEDIA_SVC_ENV_H_*/