Add function to support new API on media-content.
[platform/core/multimedia/libmedia-service.git] / include / media-svc-types.h
1 /*
2  * libmedia-service
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Hyunjun Ko <zzoon.ko@samsung.com>, Haejeong Kim <backto.kim@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  *
20  */
21
22
23
24 #ifndef _MEDIA_SVC_TYPES_H_
25 #define _MEDIA_SVC_TYPES_H_
26
27 #include <time.h>
28
29 typedef void MediaSvcHandle;            /**< Handle */
30
31 /**
32  * Type definition for storage type
33  */
34 typedef enum{
35         MEDIA_SVC_STORAGE_INTERNAL,                     /**< Internal storage*/
36         MEDIA_SVC_STORAGE_EXTERNAL,                     /**< External storage*/
37         MEDIA_SVC_STORAGE_MAX,                          /**< Invalid storage*/
38 }media_svc_storage_type_e;
39
40 /**
41  * Type definition for content type
42  */
43 typedef enum{
44         MEDIA_SVC_MEDIA_TYPE_IMAGE      = 0,    /**< Image Content*/
45         MEDIA_SVC_MEDIA_TYPE_VIDEO      = 1,    /**< Video Content*/
46         MEDIA_SVC_MEDIA_TYPE_SOUND      = 2,    /**< Sound Content like Ringtone*/
47         MEDIA_SVC_MEDIA_TYPE_MUSIC      = 3,    /**< Music Content like mp3*/
48         MEDIA_SVC_MEDIA_TYPE_OTHER      = 4,    /**< Not media Content*/
49 }media_svc_media_type_e;
50
51 /**
52  * Media meta data information
53  */
54 typedef struct {
55         char    *       title;                          /**< track title*/
56         char    *       album;                          /**< album name*/
57         char    *       artist;                         /**< artist name*/
58         char    *       album_artist;           /**< artist name*/
59         char    *       genre;                          /**< genre of track*/
60         char    *       composer;                       /**< composer name*/
61         char    *       year;                           /**< year*/
62         char    *       recorded_date;          /**< recorded date*/
63         char    *       copyright;                      /**< copyright*/
64         char    *       track_num;                      /**< track number*/
65         char    *       description;                    /**< description*/
66         int             bitrate;                                /**< bitrate*/
67         int             samplerate;                     /**< samplerate*/
68         int             channel;                                /**< channel*/
69         int             duration;                       /**< duration*/
70         float           longitude;                      /**< longitude*/
71         float           latitude;                               /**< latitude*/
72         float           altitude;                               /**< altitude*/
73         char    *       exposure_time;          /**< exposure_time*/
74         float           fnumber;                        /**< fnumber*/
75         int             iso;                            /**< iso*/
76         char    *       model;                          /**< model*/
77         int             width;                          /**< width*/
78         int             height;                         /**< height*/
79         char    *       datetaken;                      /**< datetaken*/
80         int             orientation;                    /**< orientation*/
81         int             rating;                         /**< user defined rating */
82         char    *       weather;                                /**< weather of image */
83         int             bitpersample;                           /**< bitrate*/
84
85         char    *       file_name_pinyin;                               /**< pinyin for file_name*/
86         char    *       title_pinyin;                                   /**< pinyin for title*/
87         char    *       album_pinyin;                           /**< pinyin for album*/
88         char    *       artist_pinyin;                                  /**< pinyin for artist*/
89         char    *       album_artist_pinyin;                    /**< pinyin for album_artist*/
90         char    *       genre_pinyin;                                   /**< pinyin for genre*/
91         char    *       composer_pinyin;                                /**< pinyin for composer*/
92         char    *       copyright_pinyin;                               /**< pinyin for copyright*/
93         char    *       description_pinyin;                     /**< pinyin for description*/
94 } media_svc_content_meta_s;
95
96 /**
97  * Media data information
98  */
99 typedef struct {
100         char    *       media_uuid;                                     /**< Unique ID of item */
101         char    *       path;                                           /**< Full path of media file */
102         char    *       file_name;                                      /**< File name of media file. Display name */
103         char    *       file_name_pinyin;                               /**< File name pinyin of media file. Display name */
104         int             media_type;                                     /**< Type of media file : internal/external */
105         char    *       mime_type;                                      /**< Full path and file name of media file */
106         unsigned long long      size;                                                   /**< size */
107         time_t  added_time;                                     /**< added time, time_t */
108         time_t  modified_time;                          /**< modified time, time_t */
109         time_t  timeline;                                       /**< timeline of media, time_t */
110         char    *       folder_uuid;                                    /**< Unique ID of folder */
111         int             album_id;                                       /**< Unique ID of album */
112         char    *       thumbnail_path;                         /**< Thumbnail image file path */
113         int             played_count;                           /**< played count */
114         int             last_played_time;                               /**< last played time */
115         int             last_played_position;                   /**< last played position */
116         int             favourate;                                      /**< favourate. o or 1 */
117         int             is_drm;                                         /**< is_drm. o or 1 */
118         int             sync_status;                                            /**< sync_status  */
119         int             storage_type;                                   /**< Storage of media file : internal/external */
120         char    *       storage_uuid;                                   /**< Unique ID of storage */
121         media_svc_content_meta_s        media_meta;     /**< meta data structure for audio files */
122 } media_svc_content_info_s;
123
124 #endif /*_MEDIA_SVC_TYPES_H_*/