Arrange TV Product related code. media_content_product.h and media_content_type_produ...
[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_complete_phase_e;
31
32 /**
33  * @ingroup CAPI_MEDIA_CONTENT_MODULE
34  * @brief Enumeration for a media storage scan status.
35  * @since_tizen 2.3
36  */
37 typedef enum {
38         MEDIA_STORAGE_SCAN_NONE = 0,                            /**< Media Scanner not detect storage yet*/
39         MEDIA_STORAGE_SCAN_PREPARE,                             /**< Media Scanner detect storage but not scanning yet*/
40         MEDIA_STORAGE_SCAN_PROCESSING,                  /**< Media Scanner Start Scanning storage*/
41         MEDIA_STORAGE_SCAN_STOP,                                        /**< Media Scanner Stop Scanning storage. Not scanning items can be exist*/
42         MEDIA_STORAGE_SCAN_DONE,                                        /**< Scanning Done but need to extract metadata*/
43         MEDIA_STORAGE_SCAN_META_PROCESSING,             /**< Scanning Done and start to extract metadata*/
44         MEDIA_STORAGE_SCAN_META_STOP,                   /**< Stop extract metadata*/
45         MEDIA_STORAGE_SCAN_COMPLETE,                    /**< Complete scanning*/
46         MEDIA_STORAGE_SCAN_MAX,                                 /**< Invalid status*/
47 } media_storage_scan_status_e;
48
49 typedef enum {
50         MEDIA_DIR_SCAN_NONE                             = 0,            /**< Media Scanner not detect storage yet*/
51         MEDIA_DIR_SCAN_PREPARE                  = 1,            /**< Media Scanner detect storage but not scanning yet*/
52         MEDIA_DIR_SCAN_PROCESSING               = 2,            /**< Media Scanner Start Scanning storage*/
53         MEDIA_DIR_SCAN_STOP                             = 3,            /**< Stop scanning storage*/
54         MEDIA_DIR_SCAN_DONE                             = 4,            /**< Scanning Done but need to extract metadata*/
55         MEDIA_DIR_SCAN_META_PROCESSING  = 5,            /**< Scanning Done and start to extract metadata*/
56         MEDIA_DIR_SCAN_META_STOP                = 6,            /**< Stop extract metadata*/
57         MEDIA_DIR_SCAN_COMPLETE         = 7,            /**< Complete scanning*/
58 } media_folder_scan_status_e;
59
60
61 /**
62  * @ingroup CAPI_CONTENT_MEDIA_GROUP_MODULE
63  * @brief Iterates over media group list
64  *
65  * @details This callback is called for every group in obtained list of groups
66 .\n
67  *
68  * @remarks You should not free group_name returned by this function.
69  *
70  * @param[in] group_name The name of media group
71  * @param[in] count Media count of media group
72  * @param[in] user_data The user data passed from the foreach function
73  * @return true to continue with the next iteration of the loop,
74  * @return false to break out of the loop.
75  * @pre media_group_foreach_group_and_count_from_db() will invoke this function.
76  * @see media_group_foreach_group_and_count_from_db()
77  */
78 typedef bool (*media_group_and_count_cb)(const char *group_name, int count, void *user_data);
79
80 typedef void (*media_scan_completed_cb_v2)(media_content_error_e error, media_content_complete_phase_e complete_phase, void * user_data);
81
82 typedef void *media_pvr_h;
83 typedef void *media_uhd_h;
84 typedef bool (*media_pvr_cb)(media_pvr_h pvr, void *user_data);
85 typedef bool (*media_uhd_cb)(media_uhd_h uhd, void *user_data);
86
87 #define MEDIA_FOLDER_ID "MEDIA_FOLDER_ID" /**< Media folder ID */
88 #define MEDIA_MODIFIED_MONTH "MEDIA_MODIFIED_MONTH"             /**< media modified month */
89 #define MEDIA_MODIFIED_DATE "MEDIA_MODIFIED_DATE"               /**< media modified date */
90 #define MEDIA_STITCHED_INFO "MEDIA_STITCHED_INFO"
91
92 #ifdef _USE_SENIOR_MODE
93 #define MEDIA_CONTACT   "MEDIA_CONTACT"
94 #define MEDIA_APP_DATA  "MEDIA_APP_DATA"
95 #endif
96
97 #define PVR_DURATION                            "PVR_DURATION"
98 #define PVR_TIME_ZONE                           "PVR_TIME_ZONE"
99 #define PVR_PTC                                         "PVR_PTC"
100 #define PVR_MAJOR                                       "PVR_MAJOR"
101 #define PVR_MINOR                                       "PVR_MINOR"
102 #define PVR_CHANNEL_TYPE                        "PVR_CHANNEL_TYPE"
103 #define PVR_CHANNEL_NAME                        "PVR_CHANNEL_NAME"
104 #define PVR_CHANNEL_NUM                         "PVR_CHANNEL_NUM"
105 #define PVR_PROGRAM_TITLE                       "PVR_PROGRAM_TITLE"
106 #define PVR_PROGRAM_NUM                 "PVR_PROGRAM_NUM"
107 #define PVR_PROGRAM_CRID                        "PVR_PROGRAM_CRID"
108 #define PVR_GUIDANCE                            "PVR_GUIDANCE"
109 #define PVR_SYNOPSIS                            "PVR_SYNOPSIS"
110 #define PVR_GENRE                                       "PVR_GENRE"
111 #define PVR_LANGUAGE                            "PVR_LANGUAGE"
112 #define PVR_EMBARGO_TIME                        "PVR_EMBARGO_TIME"
113 #define PVR_EXPIRY_TIME                         "PVR_EXPIRY_TIME"
114 #define PVR_START_TIME                          "PVR_START_TIME"
115 #define PVR_PROGRAM_START_TIME  "PVR_PROGRAM_START_TIME"
116 #define PVR_PROGRAM_END_TIME            "PVR_PROGRAM_END_TIME"
117 #define PVR_PROGRAM_DATE                        "PVR_PROGRAM_DATE"
118 #define PVR_PARENTAL_RATING             "PVR_PARENTAL_RATING"
119 #define PVR_TIMER_RECORD                        "PVR_TIMER_RECORD"
120 #define PVR_SERIES_RECORD                       "PVR_SERIES_RECORD"
121 #define PVR_HD                                          "PVR_HD"
122 #define PVR_SUBTITLE                            "PVR_SUBTITLE"
123 #define PVR_TTX                                         "PVR_TTX"
124 #define PVR_AD                                          "PVR_AD"
125 #define PVR_HARDOF_HEARINGRADIO "PVR_HARDOF_HEARINGRADIO"
126 #define PVR_DATA_SERVICE                        "PVR_DATA_SERVICE"
127 #define PVR_CONTENT_LOCK                        "PVR_CONTENT_LOCK"
128 #define PVR_CONTENT_WATCH               "PVR_CONTENT_WATCH"
129 #define PVR_CONTENT_HAS_AUDIO_ONLY      "PVR_CONTENT_HAS_AUDIO_ONLY"
130 #define PVR_CONTENT_IS_LOCAL_RECORD     "PVR_CONTENT_IS_LOCAL_RECORD"
131 #define PVR_CONTENT_RESOLUTION          "PVR_CONTENT_RESOLUTION"
132 #define PVR_CONTENT_ASPECTRATIO         "PVR_CONTENT_ASPECTRATIO"
133 #define PVR_MODIFIED_MONTH              "PVR_MODIFIED_MONTH"
134 #define PVR_MODIFIED_DATE               "PVR_MODIFIED_DATE"
135 #define PVR_SPORTS_TYPE                 "PVR_SPORTS_TYPE"
136 #define PVR_GUIDANCE_LENGTH             "PVR_GUIDANCE_LENGTH"
137 #define PVR_TVMODE                                      "PVR_TVMODE"
138 #define PVR_PLAY_COUNT                          "PVR_PLAY_COUNT"
139 #define PVR_PRIVATE_DATA                        "PVR_PRIVATE_DATA"
140 #define UHD_CONTENT_TITLE               "UHD_CONTENT_TITLE"
141 #define UHD_RELEASE_DATE                "UHD_RELEASE_DATE"
142 #define UHD_SUB_TYPE                    "UHD_SUB_TYPE"
143 #define UHD_FILE_NAME                   "UHD_FILE_NAME"
144 #define UHD_FOLDER_ID                   "UHD_FOLDER_ID"
145 #define UHD_PLAYED_COUNT                "UHD_PLAYED_COUNT"
146
147
148 #ifdef __cplusplus
149 }
150 #endif /* __cplusplus */
151
152
153 #endif /*__TIZEN_MEDIA_CONTENT_TYPE_PRODUCT_H__*/