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_
28 #include <media-util.h>
38 #define MEDIA_SVC_DB_NAME MEDIA_DB_NAME /**< media db name*/
41 * DB table information
44 #define MEDIA_SVC_DB_TABLE_MEDIA "media" /**< media table*/
45 #define MEDIA_SVC_DB_TABLE_FOLDER "folder" /**< media_folder table*/
46 #define MEDIA_SVC_DB_TABLE_PLAYLIST "playlist" /**< playlist table*/
47 #define MEDIA_SVC_DB_TABLE_PLAYLIST_MAP "playlist_map" /**< playlist_map table*/
48 #define MEDIA_SVC_DB_TABLE_ALBUM "album" /**< album table*/
49 #define MEDIA_SVC_DB_TABLE_TAG "tag" /**< tag table*/
50 #define MEDIA_SVC_DB_TABLE_TAG_MAP "tag_map" /**< tag_map table*/
51 #define MEDIA_SVC_DB_TABLE_BOOKMARK "bookmark" /**< bookmark table*/
52 #define MEDIA_SVC_DB_TABLE_CUSTOM "custom" /**< custom table*/
55 #define MEDIA_SVC_METADATA_LEN_MAX 128 /**< Length of metadata*/
56 #define MEDIA_SVC_METADATA_DESCRIPTION_MAX 512 /**< Length of description*/
57 #define MEDIA_SVC_PATHNAME_SIZE 4096 /**< Length of Path name. */
58 #define MEDIA_SVC_UUID_SIZE 36 /**< Length of UUID*/
60 #define MEDIA_SVC_TAG_UNKNOWN "Unknown"
61 #define MEDIA_SVC_MEDIA_PATH MEDIA_DATA_PATH /**< Media path*/
62 #define MEDIA_SVC_THUMB_PATH_PREFIX MEDIA_SVC_MEDIA_PATH"/.thumb" /**< Thumbnail path prefix*/
63 #define MEDIA_SVC_THUMB_INTERNAL_PATH MEDIA_SVC_THUMB_PATH_PREFIX"/phone" /**< Phone thumbnail path*/
64 #define MEDIA_SVC_THUMB_EXTERNAL_PATH MEDIA_SVC_THUMB_PATH_PREFIX"/mmc" /**< MMC thumbnail path*/
65 #define MEDIA_SVC_THUMB_DEFAULT_PATH MEDIA_SVC_THUMB_PATH_PREFIX"/thumb_default.png" /** default thumbnail */
67 #define MEDIA_SVC_DEFAULT_GPS_VALUE -200 /**< Default GPS Value*/
68 #define THUMB_EXT "jpg"
70 #define MEDIA_SVC_PATH_PHONE MEDIA_ROOT_PATH_INTERNAL
71 #define MEDIA_SVC_PATH_MMC MEDIA_ROOT_PATH_SDCARD
73 enum Exif_Orientation {
87 * Media meta data information
90 char title[MEDIA_SVC_METADATA_LEN_MAX]; /**< track title*/
91 char album[MEDIA_SVC_METADATA_LEN_MAX]; /**< album name*/
92 char artist[MEDIA_SVC_METADATA_LEN_MAX]; /**< artist name*/
93 char genre[MEDIA_SVC_METADATA_LEN_MAX]; /**< genre of track*/
94 char author[MEDIA_SVC_METADATA_LEN_MAX]; /**< author name*/
95 char year[MEDIA_SVC_METADATA_LEN_MAX]; /**< author name*/
96 char recorded_date[MEDIA_SVC_METADATA_LEN_MAX]; /**< recorded date*/
97 char copyright[MEDIA_SVC_METADATA_LEN_MAX]; /**< copyright*/
98 char track_num[MEDIA_SVC_METADATA_LEN_MAX]; /**< track number*/
99 char description[MEDIA_SVC_METADATA_DESCRIPTION_MAX]; /**< description*/
100 int bitrate; /**< bitrate*/
101 int samplerate; /**< samplerate*/
102 int channel; /**< channel*/
103 int duration; /**< duration*/
104 float longitude; /**< longitude*/
105 float latitude; /**< latitude*/
106 float altitude; /**< altitude*/
107 int width; /**< width*/
108 int height; /**< height*/
109 char datetaken[MEDIA_SVC_METADATA_LEN_MAX]; /**< datetaken*/
110 char timetaken[MEDIA_SVC_METADATA_LEN_MAX]; /**< timetaken*/
111 int orientation; /**< orientation*/
112 int rating; /**< user defined rating */
113 } media_svc_content_meta_s;
117 * Media data information
120 char media_uuid[MEDIA_SVC_UUID_SIZE+1]; /**< Unique ID of item */
121 char path[MEDIA_SVC_PATHNAME_SIZE]; /**< Full path and file name of media file */
122 char file_name[MEDIA_SVC_PATHNAME_SIZE]; /**< Full path and file name of media file */
123 int media_type; /**< Type of media file : internal/external */
124 char mime_type[MEDIA_SVC_PATHNAME_SIZE]; /**< Full path and file name of media file */
126 int added_time; /**< added time */
127 int modified_time; /**< modified time */
128 char folder_uuid[MEDIA_SVC_UUID_SIZE+1]; /**< Unique ID of folder */
129 int album_id; /**< Unique ID of album */
130 char thumbnail_path[MEDIA_SVC_PATHNAME_SIZE]; /**< Thumbnail image file path */
131 int played_count; /**< played count */
132 int last_played_time; /**< last played time */
133 int last_played_position;
134 int favourate; /**< favourate. o or 1 */
135 int hiding; /**< hiding. o or 1 */
136 int is_drm; /**< is_drm. o or 1 */
137 int storage_type; /**< Storage of media file : internal/external */
138 media_svc_content_meta_s media_meta; /**< meta data structure for audio files */
139 } media_svc_content_info_s;
142 * Media meta data information
145 char * title; /**< track title*/
146 char * album; /**< album name*/
147 char * artist; /**< artist name*/
148 char * genre; /**< genre of track*/
149 char * composer; /**< composer name*/
150 char * year; /**< year*/
151 char * recorded_date; /**< recorded date*/
152 char * copyright; /**< copyright*/
153 char * track_num; /**< track number*/
154 char * description; /**< description*/
155 int bitrate; /**< bitrate*/
156 int samplerate; /**< samplerate*/
157 int channel; /**< channel*/
158 int duration; /**< duration*/
159 float longitude; /**< longitude*/
160 float latitude; /**< latitude*/
161 float altitude; /**< altitude*/
162 int width; /**< width*/
163 int height; /**< height*/
164 char * datetaken; /**< datetaken*/
165 int orientation; /**< orientation*/
166 int rating; /**< user defined rating */
167 } media_svc_content_meta_s;
171 * Media data information
174 char * media_uuid; /**< Unique ID of item */
175 char * path; /**< Full path of media file */
176 char * file_name; /**< File name of media file. Display name */
177 int media_type; /**< Type of media file : internal/external */
178 char * mime_type; /**< Full path and file name of media file */
179 unsigned long long size; /**< size */
180 time_t added_time; /**< added time, time_t */
181 time_t modified_time; /**< modified time, time_t */
182 char * folder_uuid; /**< Unique ID of folder */
183 int album_id; /**< Unique ID of album */
184 char * thumbnail_path; /**< Thumbnail image file path */
185 int played_count; /**< played count */
186 int last_played_time; /**< last played time */
187 int last_played_position; /**< last played position */
188 int favourate; /**< favourate. o or 1 */
189 int is_drm; /**< is_drm. o or 1 */
190 int storage_type; /**< Storage of media file : internal/external */
191 media_svc_content_meta_s media_meta; /**< meta data structure for audio files */
192 } media_svc_content_info_s;
196 MEDIA_SVC_QUERY_INSERT_ITEM,
197 MEDIA_SVC_QUERY_SET_ITEM_VALIDITY,
198 MEDIA_SVC_QUERY_MOVE_ITEM,
199 } media_svc_query_type_e;
205 #endif /*_MEDIA_SVC_ENV_H_*/