2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef __TIZEN_MEDIA_CONTENT_INTERNAL_H__
20 #define __TIZEN_MEDIA_CONTENT_INTERNAL_H__
22 #include <media_content_type.h>
26 #endif /* __cplusplus */
30 * @file media_content_internal.h
31 * @brief This file contains API on main functional operations with storage that are related to media resources in the media database. \n
32 * Operations include: inserting a new storage in media to the media database, removing storage from database, \n
36 * @brief Gets the storage scan status of media storage.
37 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
39 * @param[in] storage The media storage handle
40 * @param[out] scan_status The storage type of the media storage
42 * @return @c 0 on success,
43 * otherwise a negative error value
45 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
46 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
48 int media_storage_get_scan_status(const char *storage_uuid, media_storage_scan_status_e *scan_status);
51 MEDIA_CONTENT_SCAN_PARTIAL_COMPLETE = 2,
52 MEDIA_CONTENT_SCAN_COMPLETE = 3,
53 MEDIA_CONTENT_EXTRACT_COMPLETE = 4,
54 } media_content_complete_phase_e;
56 typedef void (*media_scan_completed_cb_v2)(media_content_error_e error, media_content_complete_phase_e complete_phase, void * user_data);
58 typedef struct _media_content_scan_cb_data_v2 {
59 media_scan_completed_cb_v2 callback;
61 } media_content_scan_cb_data_v2;
63 int media_content_scan_folder_v2(const char *path, bool is_recursive, media_scan_completed_cb_v2 callback, void *user_data);
65 int media_info_get_media_info_by_path_from_db(const char* path, media_info_h* media);
67 #ifdef _USE_SENIOR_MODE
68 int media_info_insert_to_db_with_contact_data(const char *path, const char* contact, const char* app_data, media_info_h *info);
69 int media_info_delete_contact_from_db(const char* contact, const char* storage_id);
70 int media_info_delete_item(const char *media_id);
71 int media_info_get_contact(media_info_h media, char **contact);
72 int media_info_get_app_data(media_info_h media, char **app_data);
73 int media_info_set_contact(media_info_h media, const char *contact);
74 int media_info_set_app_data(media_info_h media, const char *app_data);
77 #define PVR_DURATION "PVR_DURATION"
78 #define PVR_TIME_ZONE "PVR_TIME_ZONE"
79 #define PVR_PTC "PVR_PTC"
80 #define PVR_MAJOR "PVR_MAJOR"
81 #define PVR_MINOR "PVR_MINOR"
82 #define PVR_CHANNEL_TYPE "PVR_CHANNEL_TYPE"
83 #define PVR_CHANNEL_NAME "PVR_CHANNEL_NAME"
84 #define PVR_CHANNEL_NUM "PVR_CHANNEL_NUM"
85 #define PVR_PROGRAM_TITLE "PVR_PROGRAM_TITLE"
86 #define PVR_PROGRAM_NUM "PVR_PROGRAM_NUM"
87 #define PVR_PROGRAM_CRID "PVR_PROGRAM_CRID"
88 #define PVR_GUIDANCE "PVR_GUIDANCE"
89 #define PVR_SYNOPSIS "PVR_SYNOPSIS"
90 #define PVR_GENRE "PVR_GENRE"
91 #define PVR_LANGUAGE "PVR_LANGUAGE"
92 #define PVR_EMBARGO_TIME "PVR_EMBARGO_TIME"
93 #define PVR_EXPIRY_TIME "PVR_EXPIRY_TIME"
94 #define PVR_START_TIME "PVR_START_TIME"
95 #define PVR_PROGRAM_START_TIME "PVR_PROGRAM_START_TIME"
96 #define PVR_PROGRAM_END_TIME "PVR_PROGRAM_END_TIME"
97 #define PVR_PROGRAM_DATE "PVR_PROGRAM_DATE"
98 #define PVR_PARENTAL_RATING "PVR_PARENTAL_RATING"
99 #define PVR_TIMER_RECORD "PVR_TIMER_RECORD"
100 #define PVR_SERIES_RECORD "PVR_SERIES_RECORD"
101 #define PVR_HD "PVR_HD"
102 #define PVR_SUBTITLE "PVR_SUBTITLE"
103 #define PVR_TTX "PVR_TTX"
104 #define PVR_AD "PVR_AD"
105 #define PVR_HARDOF_HEARINGRADIO "PVR_HARDOF_HEARINGRADIO"
106 #define PVR_DATA_SERVICE "PVR_DATA_SERVICE"
107 #define PVR_CONTENT_LOCK "PVR_CONTENT_LOCK"
108 #define PVR_CONTENT_WATCH "PVR_CONTENT_WATCH"
109 #define PVR_CONTENT_HAS_AUDIO_ONLY "PVR_CONTENT_HAS_AUDIO_ONLY"
110 #define PVR_CONTENT_IS_LOCAL_RECORD "PVR_CONTENT_IS_LOCAL_RECORD"
111 #define PVR_CONTENT_RESOLUTION "PVR_CONTENT_RESOLUTION"
112 #define PVR_CONTENT_ASPECTRATIO "PVR_CONTENT_ASPECTRATIO"
113 #define PVR_MODIFIED_MONTH "PVR_MODIFIED_MONTH"
114 #define PVR_MODIFIED_DATE "PVR_MODIFIED_DATE"
115 #define PVR_SPORTS_TYPE "PVR_SPORTS_TYPE"
116 #define PVR_GUIDANCE_LENGTH "PVR_GUIDANCE_LENGTH"
117 #define PVR_TVMODE "PVR_TVMODE"
118 #define PVR_PLAY_COUNT "PVR_PLAY_COUNT"
119 #define PVR_PRIVATE_DATA "PVR_PRIVATE_DATA"
120 #define UHD_CONTENT_TITLE "UHD_CONTENT_TITLE"
121 #define UHD_RELEASE_DATE "UHD_RELEASE_DATE"
122 #define UHD_SUB_TYPE "UHD_SUB_TYPE"
123 #define UHD_FILE_NAME "UHD_FILE_NAME"
124 #define UHD_FOLDER_ID "UHD_FOLDER_ID"
125 #define UHD_PLAYED_COUNT "UHD_PLAYED_COUNT"
127 typedef void *media_pvr_h;
128 typedef void *media_uhd_h;
129 typedef bool (*media_pvr_cb)(media_pvr_h pvr, void *user_data);
130 typedef bool (*media_uhd_cb)(media_uhd_h uhd, void *user_data);
134 #endif /* __cplusplus */
135 #endif /*__TIZEN_MEDIA_CONTENT_INTERNAL_H__*/