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.
22 #include "audio-svc-types.h"
24 #ifndef _AUDIO_SVC_TYPES_PRIV_H_
25 #define _AUDIO_SVC_TYPES_PRIV_H_
27 #define AUDIO_SVC_TAG_UNKNOWN "Unknown"
28 #define AUDIO_SVC_MEDIA_PATH "/opt/data/file-manager-service" /**< Media path*/
29 #define AUDIO_SVC_THUMB_PATH_PREFIX AUDIO_SVC_MEDIA_PATH"/.thumb" /**< Thumbnail path prefix*/
30 #define AUDIO_SVC_THUMB_PHONE_PATH AUDIO_SVC_THUMB_PATH_PREFIX"/phone" /**< Phone thumbnail path*/
31 #define AUDIO_SVC_THUMB_MMC_PATH AUDIO_SVC_THUMB_PATH_PREFIX"/mmc" /**< MMC thumbnail path*/
32 #define AUDIO_SVC_QUERY_SIZE 4096 /**< Length of db query */
35 * DB table information
37 #define AUDIO_SVC_DB_TABLE_AUDIO "audio_media" /**< audio_media table. (old mp_music_phone table)*/
38 #define AUDIO_SVC_DB_TABLE_AUDIO_PLAYLISTS "audio_playlists" /**< audio_playlists table*/
39 #define AUDIO_SVC_DB_TABLE_AUDIO_PLAYLISTS_MAP "audio_playlists_map" /**< audio_playlists_map table*/
40 #define AUDIO_SVC_DB_TABLE_ALBUMS "albums" /**< albums table*/
41 #define AUDIO_SVC_DB_TABLE_ALBUM_ART "album_art" /**< album_art table*/
42 #define AUDIO_SVC_DB_TABLE_AUDIO_FOLDER "audio_folder" /**< audio_folder table*/
44 #define AUDIO_SVC_CONTENT_TYPE 3 /**< image-1, video-2, audio-3 */
47 * Audio meta data information
50 char title[AUDIO_SVC_METADATA_LEN_MAX]; /**< track title*/
51 char artist[AUDIO_SVC_METADATA_LEN_MAX]; /**< artist name*/
52 char album[AUDIO_SVC_METADATA_LEN_MAX]; /**< album name*/
53 char genre[AUDIO_SVC_METADATA_LEN_MAX]; /**< genre of track*/
54 char author[AUDIO_SVC_METADATA_LEN_MAX]; /**< author name*/
55 char copyright[AUDIO_SVC_METADATA_LEN_MAX]; /**< copyright of track*/
56 char description[AUDIO_SVC_METADATA_LEN_MAX]; /**< description of track*/
57 char format[50]; /**< format of track*/
58 int duration; /**< duration of track*/
59 int bitrate; /**< bitrate of track*/
60 char year[AUDIO_SVC_METADATA_LEN_MAX]; /**< year of track*/
61 int track; /**< track number*/
62 int album_rating; /**< rating of album*/
63 char parental_rating[20]; /**< parental rating*/
64 } audio_svc_audio_meta_s;
68 * Audio data information
71 int storage_type; /**< Storage of media file : internal/external */
72 char audio_uuid[AUDIO_SVC_UUID_SIZE+1]; /**< Unique ID of item */
73 char pathname[AUDIO_SVC_PATHNAME_SIZE]; /**< Full path and file name of media file */
74 char thumbname[AUDIO_SVC_PATHNAME_SIZE]; /**< Thumbnail image file path */
75 int played_count; /**< played count */
76 int time_played; /**< last played time */
77 int time_added; /**< added time */
78 int rating; /**< user defined rating */
79 int category; /**< category. sound or music*/
80 int favourate; /**< favourate. o or 1 */
81 audio_svc_audio_meta_s audio; /**< meta data structure for audio files */
82 } audio_svc_audio_item_s;
85 #define SAFE_FREE(src) { if(src) {free(src); src = NULL;}}
88 * Group item search result record
91 char maininfo[AUDIO_SVC_METADATA_LEN_MAX]; /**< main info of group */
92 char subinfo[AUDIO_SVC_METADATA_LEN_MAX]; /**< sub info of group */
93 char thumbnail_path[AUDIO_SVC_PATHNAME_SIZE]; /**< Thumbnail image file path */
94 int album_rating; /**< album rating*/
95 }audio_svc_group_item_s;
98 * List item search result record
101 char audio_uuid[AUDIO_SVC_UUID_SIZE+1]; /**< Unique ID of item */
102 char pathname[AUDIO_SVC_PATHNAME_SIZE]; /**< Full path and file name of media file */
103 char title[AUDIO_SVC_METADATA_LEN_MAX]; /**< title of track */
104 char artist[AUDIO_SVC_METADATA_LEN_MAX]; /**< artist of track */
105 char thumbnail_path[AUDIO_SVC_PATHNAME_SIZE]; /**< Thumbnail image file path */
106 char album[AUDIO_SVC_METADATA_LEN_MAX]; /**< album of track */
107 int duration; /**< track duration*/
108 int rating; /**< track rating*/
109 }audio_svc_list_item_s;
115 int playlist_id; /**< Unique ID of playlist*/
116 char name[AUDIO_SVC_METADATA_LEN_MAX]; /**< playlist name*/
117 char thumbnail_path[AUDIO_SVC_PATHNAME_SIZE]; /**< Thumbnail image file path */
118 }audio_svc_playlist_s;
121 int u_id; /**< Unique ID of playlist item*/
122 char audio_uuid[AUDIO_SVC_UUID_SIZE+1]; /**< Unique Audio ID */
123 char pathname[AUDIO_SVC_PATHNAME_SIZE]; /**< Full path and file name of media file */
124 char title[AUDIO_SVC_METADATA_LEN_MAX]; /**< title of track */
125 char artist[AUDIO_SVC_METADATA_LEN_MAX]; /**< artist of track */
126 char thumbnail_path[AUDIO_SVC_PATHNAME_SIZE]; /**< Thumbnail image file path */
127 int duration; /**< track duration*/
128 int rating; /**< track rating*/
129 int play_order; /**< Play order*/
130 }audio_svc_playlist_item_s;
133 AUDIO_SVC_QUERY_INSERT_ITEM,
134 AUDIO_SVC_QUERY_SET_ITEM_VALID,
135 AUDIO_SVC_QUERY_MOVE_ITEM,
136 }audio_svc_query_type_e;
142 #endif /*_AUDIO_SVC_TYPES_PRIV_H_*/