3d74d6f15c457e5c679b693cd4c5aa64b0cd84a7
[platform/core/api/media-content.git] / include_product / media_content_type_product.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17
18 #ifndef __TIZEN_MEDIA_CONTENT_TYPE_PRODUCT_H__
19 #define __TIZEN_MEDIA_CONTENT_TYPE_PRODUCT_H__
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif /* __cplusplus */
24
25
26 typedef enum {
27         MEDIA_CONTENT_SCAN_PARTIAL_COMPLETE             = 2,
28         MEDIA_CONTENT_SCAN_COMPLETE                     = 3,
29         MEDIA_CONTENT_EXTRACT_COMPLETE          = 4,
30         MEDIA_CONTENT_RECURSIVE_START           = 5,
31 } media_content_complete_phase_e;
32
33 /**
34  * @ingroup CAPI_MEDIA_CONTENT_MODULE
35  * @brief Enumeration for a media storage scan status.
36  * @since_tizen 2.3
37  */
38 typedef enum {
39         MEDIA_STORAGE_SCAN_NONE = 0,                            /**< Media Scanner not detect storage yet*/
40         MEDIA_STORAGE_SCAN_PREPARE,                             /**< Media Scanner detect storage but not scanning yet*/
41         MEDIA_STORAGE_SCAN_PROCESSING,                  /**< Media Scanner Start Scanning storage*/
42         MEDIA_STORAGE_SCAN_STOP,                                        /**< Media Scanner Stop Scanning storage. Not scanning items can be exist*/
43         MEDIA_STORAGE_SCAN_DONE,                                        /**< Scanning Done but need to extract metadata*/
44         MEDIA_STORAGE_SCAN_META_PROCESSING,             /**< Scanning Done and start to extract metadata*/
45         MEDIA_STORAGE_SCAN_META_STOP,                   /**< Stop extract metadata*/
46         MEDIA_STORAGE_SCAN_COMPLETE,                    /**< Complete scanning*/
47         MEDIA_STORAGE_SCAN_MAX,                                 /**< Invalid status*/
48 } media_storage_scan_status_e;
49
50 typedef enum {
51         MEDIA_DIR_SCAN_NONE                             = 0,            /**< Media Scanner not detect storage yet*/
52         MEDIA_DIR_SCAN_PREPARE                  = 1,            /**< Media Scanner detect storage but not scanning yet*/
53         MEDIA_DIR_SCAN_PROCESSING               = 2,            /**< Media Scanner Start Scanning storage*/
54         MEDIA_DIR_SCAN_STOP                             = 3,            /**< Stop scanning storage*/
55         MEDIA_DIR_SCAN_DONE                             = 4,            /**< Scanning Done but need to extract metadata*/
56         MEDIA_DIR_SCAN_META_PROCESSING  = 5,            /**< Scanning Done and start to extract metadata*/
57         MEDIA_DIR_SCAN_META_STOP                = 6,            /**< Stop extract metadata*/
58         MEDIA_DIR_SCAN_COMPLETE         = 7,            /**< Complete scanning*/
59 } media_folder_scan_status_e;
60
61
62 /**
63  * @ingroup CAPI_CONTENT_MEDIA_GROUP_MODULE
64  * @brief Iterates over media group list
65  *
66  * @details This callback is called for every group in obtained list of groups
67 .\n
68  *
69  * @remarks You should not free group_name returned by this function.
70  *
71  * @param[in] group_name The name of media group
72  * @param[in] count Media count of media group
73  * @param[in] user_data The user data passed from the foreach function
74  * @return true to continue with the next iteration of the loop,
75  * @return false to break out of the loop.
76  * @pre media_group_foreach_group_and_count_from_db() will invoke this function.
77  * @see media_group_foreach_group_and_count_from_db()
78  */
79 typedef bool (*media_group_and_count_cb)(const char *group_name, int count, void *user_data);
80
81 typedef void (*media_scan_completed_cb_v2)(media_content_error_e error, media_content_complete_phase_e complete_phase, void * user_data);
82
83 typedef void *media_pvr_h;
84 typedef void *media_uhd_h;
85 typedef bool (*media_pvr_cb)(media_pvr_h pvr, void *user_data);
86 typedef bool (*media_uhd_cb)(media_uhd_h uhd, void *user_data);
87
88 #define MEDIA_PLAYED_COUNT "played_count"
89 #define MEDIA_LAST_PLAYED_TIME "last_played_time"
90 #define MEDIA_LAST_PLAYED_POSITION "last_played_position"
91
92 #define MEDIA_FOLDER_ID "folder_id" /**< Media folder ID */
93 #define MEDIA_MODIFIED_MONTH "modified_month"           /**< media modified month */
94 #define MEDIA_MODIFIED_DATE "modified_date"             /**< media modified date */
95 #define MEDIA_STITCHED_INFO "stitched_info"
96
97 #define PVR_DURATION                            "duration"
98 #define PVR_TIME_ZONE                           "timezone"
99 #define PVR_PTC                                         "ptc"
100 #define PVR_MAJOR                                       "major"
101 #define PVR_MINOR                                       "minor"
102 #define PVR_CHANNEL_TYPE                        "channel_type"
103 #define PVR_CHANNEL_NAME                        "channel_name"
104 #define PVR_CHANNEL_NUM                         "channel_num"
105 #define PVR_PROGRAM_TITLE                       "program_title"
106 #define PVR_PROGRAM_NUM                         "program_num"
107 #define PVR_PROGRAM_CRID                        "program_crid"
108 #define PVR_GUIDANCE                            "guidance"
109 #define PVR_SYNOPSIS                            "synopsis"
110 #define PVR_GENRE                                       "genre"
111 #define PVR_LANGUAGE                            "language"
112 #define PVR_EMBARGO_TIME                        "embargo_time"
113 #define PVR_EXPIRY_TIME                         "expiry_time"
114 #define PVR_START_TIME                          "start_time"
115 #define PVR_PROGRAM_START_TIME          "program_start_time"
116 #define PVR_PROGRAM_END_TIME            "program_end_time"
117 #define PVR_PROGRAM_DATE                        "program_date"
118 #define PVR_PARENTAL_RATING                     "parental_rating"
119 #define PVR_TIMER_RECORD                        "timer_record"
120 #define PVR_SERIES_RECORD                       "series_record"
121 #define PVR_HD                                          "hd"
122 #define PVR_SUBTITLE                            "subtitle"
123 #define PVR_TTX                                         "ttx"
124 #define PVR_AD                                          "ad"
125 #define PVR_HARDOF_HEARINGRADIO         "hard_of_hearing_radio"
126 #define PVR_DATA_SERVICE                        "data_service"
127 #define PVR_CONTENT_LOCK                        "content_lock"
128 #define PVR_CONTENT_WATCH                       "content_watch"
129 #define PVR_CONTENT_HAS_AUDIO_ONLY      "has_audio_only"
130 #define PVR_CONTENT_IS_LOCAL_RECORD     "is_local_record"
131 #define PVR_CONTENT_RESOLUTION          "resolution"
132 #define PVR_CONTENT_ASPECTRATIO         "aspectratio"
133 #define PVR_MODIFIED_MONTH                      "modified_month"
134 #define PVR_MODIFIED_DATE                       "modified_date"
135 #define PVR_SPORTS_TYPE                         "sports_type"
136 #define PVR_GUIDANCE_LENGTH                     "guidance_length"
137 #define PVR_TVMODE                                      "tvmode"
138 #define PVR_PLAY_COUNT                          "play_count"
139 #define PVR_PRIVATE_DATA                        "private_data"
140 #define UHD_CONTENT_TITLE                       "content_title"
141 #define UHD_RELEASE_DATE                        "release_date"
142 #define UHD_SUB_TYPE                            "sub_type"
143 #define UHD_FILE_NAME                           "file_name"
144 #define UHD_FOLDER_ID                           "folder_uuid"
145 #define UHD_PLAYED_COUNT                        "played_count"
146
147
148 #ifdef __cplusplus
149 }
150 #endif /* __cplusplus */
151
152
153 #endif /*__TIZEN_MEDIA_CONTENT_TYPE_PRODUCT_H__*/