#include <media_bookmark.h>
#include <media_storage.h>
#include <media_face.h>
-#include <media_pvr.h>
-#include <media_uhd.h>
+#include <media_content_product.h>
#ifdef __cplusplus
extern "C" {
* Operations include: inserting a new storage in media to the media database, removing storage from database, \n
*/
-/**
- * @brief Gets the storage scan status of media storage.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- *
- * @param[in] storage The media storage handle
- * @param[out] scan_status The storage type of the media storage
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #MEDIA_CONTENT_ERROR_NONE Successful
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int media_storage_get_scan_status(const char *storage_uuid, media_storage_scan_status_e *scan_status);
-
-typedef enum {
- MEDIA_CONTENT_SCAN_PARTIAL_COMPLETE = 2,
- MEDIA_CONTENT_SCAN_COMPLETE = 3,
- MEDIA_CONTENT_EXTRACT_COMPLETE = 4,
-} media_content_complete_phase_e;
-
-typedef void (*media_scan_completed_cb_v2)(media_content_error_e error, media_content_complete_phase_e complete_phase, void * user_data);
-
-typedef struct _media_content_scan_cb_data_v2 {
- media_scan_completed_cb_v2 callback;
- void *user_data;
-} media_content_scan_cb_data_v2;
-
-int media_content_scan_folder_v2(const char *path, bool is_recursive, media_scan_completed_cb_v2 callback, void *user_data);
-
-int media_info_get_media_info_by_path_from_db(const char* path, media_info_h* media);
-
-#ifdef _USE_SENIOR_MODE
-int media_info_insert_to_db_with_contact_data(const char *path, const char* contact, const char* app_data, media_info_h *info);
-int media_info_delete_contact_from_db(const char* contact, const char* storage_id);
-int media_info_delete_item(const char *media_id);
-int media_info_get_contact(media_info_h media, char **contact);
-int media_info_get_app_data(media_info_h media, char **app_data);
-int media_info_set_contact(media_info_h media, const char *contact);
-int media_info_set_app_data(media_info_h media, const char *app_data);
-#endif
-
-#define PVR_DURATION "PVR_DURATION"
-#define PVR_TIME_ZONE "PVR_TIME_ZONE"
-#define PVR_PTC "PVR_PTC"
-#define PVR_MAJOR "PVR_MAJOR"
-#define PVR_MINOR "PVR_MINOR"
-#define PVR_CHANNEL_TYPE "PVR_CHANNEL_TYPE"
-#define PVR_CHANNEL_NAME "PVR_CHANNEL_NAME"
-#define PVR_CHANNEL_NUM "PVR_CHANNEL_NUM"
-#define PVR_PROGRAM_TITLE "PVR_PROGRAM_TITLE"
-#define PVR_PROGRAM_NUM "PVR_PROGRAM_NUM"
-#define PVR_PROGRAM_CRID "PVR_PROGRAM_CRID"
-#define PVR_GUIDANCE "PVR_GUIDANCE"
-#define PVR_SYNOPSIS "PVR_SYNOPSIS"
-#define PVR_GENRE "PVR_GENRE"
-#define PVR_LANGUAGE "PVR_LANGUAGE"
-#define PVR_EMBARGO_TIME "PVR_EMBARGO_TIME"
-#define PVR_EXPIRY_TIME "PVR_EXPIRY_TIME"
-#define PVR_START_TIME "PVR_START_TIME"
-#define PVR_PROGRAM_START_TIME "PVR_PROGRAM_START_TIME"
-#define PVR_PROGRAM_END_TIME "PVR_PROGRAM_END_TIME"
-#define PVR_PROGRAM_DATE "PVR_PROGRAM_DATE"
-#define PVR_PARENTAL_RATING "PVR_PARENTAL_RATING"
-#define PVR_TIMER_RECORD "PVR_TIMER_RECORD"
-#define PVR_SERIES_RECORD "PVR_SERIES_RECORD"
-#define PVR_HD "PVR_HD"
-#define PVR_SUBTITLE "PVR_SUBTITLE"
-#define PVR_TTX "PVR_TTX"
-#define PVR_AD "PVR_AD"
-#define PVR_HARDOF_HEARINGRADIO "PVR_HARDOF_HEARINGRADIO"
-#define PVR_DATA_SERVICE "PVR_DATA_SERVICE"
-#define PVR_CONTENT_LOCK "PVR_CONTENT_LOCK"
-#define PVR_CONTENT_WATCH "PVR_CONTENT_WATCH"
-#define PVR_CONTENT_HAS_AUDIO_ONLY "PVR_CONTENT_HAS_AUDIO_ONLY"
-#define PVR_CONTENT_IS_LOCAL_RECORD "PVR_CONTENT_IS_LOCAL_RECORD"
-#define PVR_CONTENT_RESOLUTION "PVR_CONTENT_RESOLUTION"
-#define PVR_CONTENT_ASPECTRATIO "PVR_CONTENT_ASPECTRATIO"
-#define PVR_MODIFIED_MONTH "PVR_MODIFIED_MONTH"
-#define PVR_MODIFIED_DATE "PVR_MODIFIED_DATE"
-#define PVR_SPORTS_TYPE "PVR_SPORTS_TYPE"
-#define PVR_GUIDANCE_LENGTH "PVR_GUIDANCE_LENGTH"
-#define PVR_TVMODE "PVR_TVMODE"
-#define PVR_PLAY_COUNT "PVR_PLAY_COUNT"
-#define PVR_PRIVATE_DATA "PVR_PRIVATE_DATA"
-#define UHD_CONTENT_TITLE "UHD_CONTENT_TITLE"
-#define UHD_RELEASE_DATE "UHD_RELEASE_DATE"
-#define UHD_SUB_TYPE "UHD_SUB_TYPE"
-#define UHD_FILE_NAME "UHD_FILE_NAME"
-#define UHD_FOLDER_ID "UHD_FOLDER_ID"
-#define UHD_PLAYED_COUNT "UHD_PLAYED_COUNT"
-
-typedef void *media_pvr_h;
-typedef void *media_uhd_h;
-typedef bool (*media_pvr_cb)(media_pvr_h pvr, void *user_data);
-typedef bool (*media_uhd_cb)(media_uhd_h uhd, void *user_data);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
--- /dev/null
+/*
+* Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef __TIZEN_MEDIA_CONTENT_PRODUCT_H__
+#define __TIZEN_MEDIA_CONTENT_PRODUCT_H__
+
+#include <media_content_type_product.h>
+#include <media_pvr.h>
+#include <media_uhd.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/********** media_content **********/
+
+int media_content_scan_folder_v2(const char *path, bool is_recursive, media_scan_completed_cb_v2 callback, void *user_data);
+
+
+/********** media_info **********/
+
+/**
+ * @brief Gets the extract_flag of media info.
+ * @since_tizen 2.3
+ *
+ * @remarks You must release @a title using free().
+ *
+ * @param[in] media The media info handle
+ * @param[out] extract_flag The extract_flag of the media info
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
+ */
+int media_info_get_extract_flag(media_info_h media, int *extract_flag);
+int media_info_get_stitched_state(media_info_h media, int *type_360);
+int media_info_get_stitched_engine(media_info_h media, int *type_360);
+/**
+ * @brief Gets the content's played position parameter.
+ * @details Function returns content's elapsed playback position parameter as period
+ * starting from the beginning of the track.
+ *
+ * @param [in] media The handle to media info
+ * @param [out] played_position The elapsed time of the content
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int media_info_get_played_position(media_info_h media, int *played_position);
+/**
+ * @brief Gets the provider to media info.
+ *
+ * @remarks @a modified_month must be released with free() by you.
+ *
+ * @param[in] media The handle to media info
+ * @param[out] category The modified month of media info
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ */
+int media_info_get_modified_month(media_info_h media, char **modified_month);
+
+/**
+ * @brief Sets the played count to content meta handle.
+ *
+ * @param [in] media The handle to media info
+ * @param [in] played_count The played count of content
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @post media_info_update_to_db()
+ */
+int media_info_set_played_count(media_info_h media, int played_count);
+
+/**
+ * @brief Sets the played position to content meta handle.
+ *
+ * @param [in] media The handle to media info
+ * @param [in] played_position The played position of content
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @post media_info_update_to_db()
+ */
+int media_info_set_played_position(media_info_h media, int played_position);
+int media_info_get_media_info_by_path_from_db(const char* path, media_info_h* media);
+#ifdef _USE_SENIOR_MODE
+int media_info_insert_to_db_with_contact_data(const char *path, const char* contact, const char* app_data, media_info_h *info);
+int media_info_delete_contact_from_db(const char* contact, const char* storage_id);
+int media_info_delete_item(const char *media_id);
+int media_info_get_contact(media_info_h media, char **contact);
+int media_info_get_app_data(media_info_h media, char **app_data);
+int media_info_set_contact(media_info_h media, const char *contact);
+int media_info_set_app_data(media_info_h media, const char *app_data);
+#endif
+
+
+/********** media_folder **********/
+
+#ifdef _USE_SENIOR_MODE
+int media_folder_foreach_media_from_db_by_union_select(const char* folder_id, filter_h filter1, filter_h filter2, media_info_cb callback, void* user_data);
+#endif
+int media_folder_get_scan_status(const char *storage_uuid, char* path, media_folder_scan_status_e *scan_status);
+
+
+/********** media_group **********/
+
+ /**
+ * @brief Iterates through the media group with optional @a filter from the media database.
+ * @details This function gets the names and counts of media group meeting the given filter.
+ * The callback function will be invoked for every retrieved media group.
+ * If NULL is passed to the filter, no filtering is applied.
+ *
+ * @param [in] filter The handle to media filter
+ * @param [in] group The type of media group
+ * @param [in] callback The callback function to invoke
+ * @param [in] user_data The user data to be passed to the callback function
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre This function requires opened connection to content service by media_content_connect().
+ * @post This function invokes media_group_cb().
+ * @see #media_group_and_count_cb
+ * @see media_content_connect()
+ * @see media_filter_create()
+ */
+int media_group_foreach_group_and_count_from_db(filter_h filter, media_group_e group, media_group_and_count_cb callback, void *user_data);
+
+
+/********** media_storage **********/
+
+/**
+ * @brief Gets the storage scan status of media storage.
+ * @since_tizen 2.4
+ *
+ * @param[in] storage The media storage handle
+ * @param[out] scan_status The storage type of the media storage
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int media_storage_get_scan_status(const char *storage_uuid, media_storage_scan_status_e *scan_status);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __TIZEN_MEDIA_CONTENT_PRODUCT_H__ */
} media_group_e;
/**
- * @ingroup CAPI_MEDIA_CONTENT_MODULE
- * @brief Enumeration for a media storage scan status.
- * @since_tizen 2.3
- */
-typedef enum {
- MEDIA_STORAGE_SCAN_NONE = 0, /**< Media Scanner not detect storage yet*/
- MEDIA_STORAGE_SCAN_PREPARE, /**< Media Scanner detect storage but not scanning yet*/
- MEDIA_STORAGE_SCAN_PROCESSING, /**< Media Scanner Start Scanning storage*/
- MEDIA_STORAGE_SCAN_STOP, /**< Media Scanner Stop Scanning storage. Not scanning items can be exist*/
- MEDIA_STORAGE_SCAN_DONE, /**< Scanning Done but need to extract metadata*/
- MEDIA_STORAGE_SCAN_META_PROCESSING, /**< Scanning Done and start to extract metadata*/
- MEDIA_STORAGE_SCAN_META_STOP, /**< Stop extract metadata*/
- MEDIA_STORAGE_SCAN_COMPLETE, /**< Complete scanning*/
- MEDIA_STORAGE_SCAN_MAX, /**< Invalid status*/
-} media_storage_scan_status_e;
-
-typedef enum {
- MEDIA_DIR_SCAN_NONE = 0, /**< Media Scanner not detect storage yet*/
- MEDIA_DIR_SCAN_PREPARE = 1, /**< Media Scanner detect storage but not scanning yet*/
- MEDIA_DIR_SCAN_PROCESSING = 2, /**< Media Scanner Start Scanning storage*/
- MEDIA_DIR_SCAN_STOP = 3, /**< Stop scanning storage*/
- MEDIA_DIR_SCAN_DONE = 4, /**< Scanning Done but need to extract metadata*/
- MEDIA_DIR_SCAN_META_PROCESSING = 5, /**< Scanning Done and start to extract metadata*/
- MEDIA_DIR_SCAN_META_STOP = 6, /**< Stop extract metadata*/
- MEDIA_DIR_SCAN_COMPLETE = 7, /**< Complete scanning*/
-} media_folder_scan_status_e;
-
-
-/**
* @ingroup CAPI_CONTENT_MEDIA_INFO_MODULE
* @brief The structure type for the Media info handle.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef bool (*media_group_cb)(const char *group_name, void *user_data);
-
-/**
- * @ingroup CAPI_CONTENT_MEDIA_GROUP_MODULE
- * @brief Iterates over media group list
- *
- * @details This callback is called for every group in obtained list of groups
-.\n
- *
- * @remarks You should not free group_name returned by this function.
- *
- * @param[in] group_name The name of media group
- * @param[in] count Media count of media group
- * @param[in] user_data The user data passed from the foreach function
- * @return true to continue with the next iteration of the loop,
- * @return false to break out of the loop.
- * @pre media_group_foreach_group_and_count_from_db() will invoke this function.
- * @see media_group_foreach_group_and_count_from_db()
- */
-typedef bool (*media_group_and_count_cb)(const char *group_name, int count, void *user_data);
-
/**
* @ingroup CAPI_CONTENT_MEDIA_STORAGE_MODULE
* @brief Called for every storage in the obtained list of storages.
*/
#define MEDIA_TIMELINE "MEDIA_TIMELINE" /**< Media modified time */
-#define MEDIA_FOLDER_ID "MEDIA_FOLDER_ID" /**< Media folder ID */
-
/**
* @brief You can use above define to set the condition of media filter and order keyword.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
#define MEDIA_STORAGE_TYPE "MEDIA_STORAGE_TYPE" /**< Media storage. 0-internal storage, 1-external storage*/
-#define MEDIA_MODIFIED_MONTH "MEDIA_MODIFIED_MONTH" /**< media modified month */
-#define MEDIA_MODIFIED_DATE "MEDIA_MODIFIED_DATE" /**< media modified date */
-
/**
* @brief You can use above define to set the condition of media filter and order keyword.
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @since_tizen 3.0
*
*/
-#define MEDIA_360 "MEDIA_360"
-#define MEDIA_STITCHED_INFO "MEDIA_STITCHED_INFO"
-
-#ifdef _USE_SENIOR_MODE
-#define MEDIA_CONTACT "MEDIA_CONTACT"
-#define MEDIA_APP_DATA "MEDIA_APP_DATA"
-#endif
+#define MEDIA_360 "MEDIA_360" /**< Virtual Reality content*/
/**
* @}
--- /dev/null
+/*
+* Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+#ifndef __TIZEN_MEDIA_CONTENT_TYPE_PRODUCT_H__
+#define __TIZEN_MEDIA_CONTENT_TYPE_PRODUCT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+typedef enum {
+ MEDIA_CONTENT_SCAN_PARTIAL_COMPLETE = 2,
+ MEDIA_CONTENT_SCAN_COMPLETE = 3,
+ MEDIA_CONTENT_EXTRACT_COMPLETE = 4,
+} media_content_complete_phase_e;
+
+/**
+ * @ingroup CAPI_MEDIA_CONTENT_MODULE
+ * @brief Enumeration for a media storage scan status.
+ * @since_tizen 2.3
+ */
+typedef enum {
+ MEDIA_STORAGE_SCAN_NONE = 0, /**< Media Scanner not detect storage yet*/
+ MEDIA_STORAGE_SCAN_PREPARE, /**< Media Scanner detect storage but not scanning yet*/
+ MEDIA_STORAGE_SCAN_PROCESSING, /**< Media Scanner Start Scanning storage*/
+ MEDIA_STORAGE_SCAN_STOP, /**< Media Scanner Stop Scanning storage. Not scanning items can be exist*/
+ MEDIA_STORAGE_SCAN_DONE, /**< Scanning Done but need to extract metadata*/
+ MEDIA_STORAGE_SCAN_META_PROCESSING, /**< Scanning Done and start to extract metadata*/
+ MEDIA_STORAGE_SCAN_META_STOP, /**< Stop extract metadata*/
+ MEDIA_STORAGE_SCAN_COMPLETE, /**< Complete scanning*/
+ MEDIA_STORAGE_SCAN_MAX, /**< Invalid status*/
+} media_storage_scan_status_e;
+
+typedef enum {
+ MEDIA_DIR_SCAN_NONE = 0, /**< Media Scanner not detect storage yet*/
+ MEDIA_DIR_SCAN_PREPARE = 1, /**< Media Scanner detect storage but not scanning yet*/
+ MEDIA_DIR_SCAN_PROCESSING = 2, /**< Media Scanner Start Scanning storage*/
+ MEDIA_DIR_SCAN_STOP = 3, /**< Stop scanning storage*/
+ MEDIA_DIR_SCAN_DONE = 4, /**< Scanning Done but need to extract metadata*/
+ MEDIA_DIR_SCAN_META_PROCESSING = 5, /**< Scanning Done and start to extract metadata*/
+ MEDIA_DIR_SCAN_META_STOP = 6, /**< Stop extract metadata*/
+ MEDIA_DIR_SCAN_COMPLETE = 7, /**< Complete scanning*/
+} media_folder_scan_status_e;
+
+
+/**
+ * @ingroup CAPI_CONTENT_MEDIA_GROUP_MODULE
+ * @brief Iterates over media group list
+ *
+ * @details This callback is called for every group in obtained list of groups
+.\n
+ *
+ * @remarks You should not free group_name returned by this function.
+ *
+ * @param[in] group_name The name of media group
+ * @param[in] count Media count of media group
+ * @param[in] user_data The user data passed from the foreach function
+ * @return true to continue with the next iteration of the loop,
+ * @return false to break out of the loop.
+ * @pre media_group_foreach_group_and_count_from_db() will invoke this function.
+ * @see media_group_foreach_group_and_count_from_db()
+ */
+typedef bool (*media_group_and_count_cb)(const char *group_name, int count, void *user_data);
+
+typedef void (*media_scan_completed_cb_v2)(media_content_error_e error, media_content_complete_phase_e complete_phase, void * user_data);
+
+typedef void *media_pvr_h;
+typedef void *media_uhd_h;
+typedef bool (*media_pvr_cb)(media_pvr_h pvr, void *user_data);
+typedef bool (*media_uhd_cb)(media_uhd_h uhd, void *user_data);
+
+#define MEDIA_FOLDER_ID "MEDIA_FOLDER_ID" /**< Media folder ID */
+#define MEDIA_MODIFIED_MONTH "MEDIA_MODIFIED_MONTH" /**< media modified month */
+#define MEDIA_MODIFIED_DATE "MEDIA_MODIFIED_DATE" /**< media modified date */
+#define MEDIA_STITCHED_INFO "MEDIA_STITCHED_INFO"
+
+#ifdef _USE_SENIOR_MODE
+#define MEDIA_CONTACT "MEDIA_CONTACT"
+#define MEDIA_APP_DATA "MEDIA_APP_DATA"
+#endif
+
+#define PVR_DURATION "PVR_DURATION"
+#define PVR_TIME_ZONE "PVR_TIME_ZONE"
+#define PVR_PTC "PVR_PTC"
+#define PVR_MAJOR "PVR_MAJOR"
+#define PVR_MINOR "PVR_MINOR"
+#define PVR_CHANNEL_TYPE "PVR_CHANNEL_TYPE"
+#define PVR_CHANNEL_NAME "PVR_CHANNEL_NAME"
+#define PVR_CHANNEL_NUM "PVR_CHANNEL_NUM"
+#define PVR_PROGRAM_TITLE "PVR_PROGRAM_TITLE"
+#define PVR_PROGRAM_NUM "PVR_PROGRAM_NUM"
+#define PVR_PROGRAM_CRID "PVR_PROGRAM_CRID"
+#define PVR_GUIDANCE "PVR_GUIDANCE"
+#define PVR_SYNOPSIS "PVR_SYNOPSIS"
+#define PVR_GENRE "PVR_GENRE"
+#define PVR_LANGUAGE "PVR_LANGUAGE"
+#define PVR_EMBARGO_TIME "PVR_EMBARGO_TIME"
+#define PVR_EXPIRY_TIME "PVR_EXPIRY_TIME"
+#define PVR_START_TIME "PVR_START_TIME"
+#define PVR_PROGRAM_START_TIME "PVR_PROGRAM_START_TIME"
+#define PVR_PROGRAM_END_TIME "PVR_PROGRAM_END_TIME"
+#define PVR_PROGRAM_DATE "PVR_PROGRAM_DATE"
+#define PVR_PARENTAL_RATING "PVR_PARENTAL_RATING"
+#define PVR_TIMER_RECORD "PVR_TIMER_RECORD"
+#define PVR_SERIES_RECORD "PVR_SERIES_RECORD"
+#define PVR_HD "PVR_HD"
+#define PVR_SUBTITLE "PVR_SUBTITLE"
+#define PVR_TTX "PVR_TTX"
+#define PVR_AD "PVR_AD"
+#define PVR_HARDOF_HEARINGRADIO "PVR_HARDOF_HEARINGRADIO"
+#define PVR_DATA_SERVICE "PVR_DATA_SERVICE"
+#define PVR_CONTENT_LOCK "PVR_CONTENT_LOCK"
+#define PVR_CONTENT_WATCH "PVR_CONTENT_WATCH"
+#define PVR_CONTENT_HAS_AUDIO_ONLY "PVR_CONTENT_HAS_AUDIO_ONLY"
+#define PVR_CONTENT_IS_LOCAL_RECORD "PVR_CONTENT_IS_LOCAL_RECORD"
+#define PVR_CONTENT_RESOLUTION "PVR_CONTENT_RESOLUTION"
+#define PVR_CONTENT_ASPECTRATIO "PVR_CONTENT_ASPECTRATIO"
+#define PVR_MODIFIED_MONTH "PVR_MODIFIED_MONTH"
+#define PVR_MODIFIED_DATE "PVR_MODIFIED_DATE"
+#define PVR_SPORTS_TYPE "PVR_SPORTS_TYPE"
+#define PVR_GUIDANCE_LENGTH "PVR_GUIDANCE_LENGTH"
+#define PVR_TVMODE "PVR_TVMODE"
+#define PVR_PLAY_COUNT "PVR_PLAY_COUNT"
+#define PVR_PRIVATE_DATA "PVR_PRIVATE_DATA"
+#define UHD_CONTENT_TITLE "UHD_CONTENT_TITLE"
+#define UHD_RELEASE_DATE "UHD_RELEASE_DATE"
+#define UHD_SUB_TYPE "UHD_SUB_TYPE"
+#define UHD_FILE_NAME "UHD_FILE_NAME"
+#define UHD_FOLDER_ID "UHD_FOLDER_ID"
+#define UHD_PLAYED_COUNT "UHD_PLAYED_COUNT"
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+#endif /*__TIZEN_MEDIA_CONTENT_TYPE_PRODUCT_H__*/
*/
int media_folder_foreach_media_from_db(const char *folder_id, filter_h filter, media_info_cb callback, void *user_data);
-#ifdef _USE_SENIOR_MODE
-int media_folder_foreach_media_from_db_by_union_select(const char* folder_id, filter_h filter1, filter_h filter2, media_info_cb callback, void* user_data);
-#endif
-
/**
* @brief Clones the media folder.
* @details This function copies the media folder handle from a source to
*/
int media_folder_update_to_db(media_folder_h folder);
-int media_folder_get_scan_status(const char *storage_uuid, char* path, media_folder_scan_status_e *scan_status);
-
-
/**
* @}
*/
int media_group_get_group_count_from_db(filter_h filter, media_group_e group, int *group_count);
/**
- * @brief Iterates through the media group with optional @a filter from the media database.
- * @details This function gets the names and counts of media group meeting the given filter.
- * The callback function will be invoked for every retrieved media group.
- * If NULL is passed to the filter, no filtering is applied.
- *
- * @param [in] filter The handle to media filter
- * @param [in] group The type of media group
- * @param [in] callback The callback function to invoke
- * @param [in] user_data The user data to be passed to the callback function
- * @return 0 on success, otherwise a negative error value.
- * @retval #MEDIA_CONTENT_ERROR_NONE Successful
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @pre This function requires opened connection to content service by media_content_connect().
- * @post This function invokes media_group_cb().
- * @see #media_group_and_count_cb
- * @see media_content_connect()
- * @see media_filter_create()
- */
-int media_group_foreach_group_and_count_from_db(filter_h filter, media_group_e group, media_group_and_count_cb callback, void *user_data);
-
- /**
* @brief Iterates through the media group with an optional @a filter from the media database.
* @details This function gets names of media group meeting the given filter.
* The callback function will be invoked for every retrieved media group.
int media_info_get_title(media_info_h media, char **title);
/**
- * @brief Gets the extract_flag of media info.
- * @since_tizen 2.3
- *
- * @remarks You must release @a title using free().
- *
- * @param[in] media The media info handle
- * @param[out] extract_flag The extract_flag of the media info
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #MEDIA_CONTENT_ERROR_NONE Successful
- * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied
- */
-int media_info_get_extract_flag(media_info_h media, int *extract_flag);
-
-/**
* @brief Gets the category of media info.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
*/
int media_info_is_360_content(media_info_h media, bool *is_360);
-int media_info_get_stitched_state(media_info_h media, int *type_360);
-int media_info_get_stitched_engine(media_info_h media, int *type_360);
-
/**
* @brief Gets the storage type of media info.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type);
/**
- * @brief Gets the content's played position parameter.
- * @details Function returns content's elapsed playback position parameter as period
- * starting from the beginning of the track.
- *
- * @param [in] media The handle to media info
- * @param [out] played_position The elapsed time of the content
- * @return 0 on success, otherwise a negative error value.
- * @retval #MEDIA_CONTENT_ERROR_NONE Successful
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int media_info_get_played_position(media_info_h media, int *played_position);
-
-/**
* @brief Gets number which represents how many times given content has been played.
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
*
int media_info_increase_played_count(media_info_h media);
/**
- * @brief Gets the provider to media info.
- *
- * @remarks @a modified_month must be released with free() by you.
- *
- * @param[in] media The handle to media info
- * @param[out] category The modified month of media info
- * @return 0 on success, otherwise a negative error value.
- * @retval #MEDIA_CONTENT_ERROR_NONE Successful
- * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- *
- */
-int media_info_get_modified_month(media_info_h media, char **modified_month);
-
-/**
- * @brief Sets the played count to content meta handle.
- *
- * @param [in] media The handle to media info
- * @param [in] played_count The played count of content
- * @return 0 on success, otherwise a negative error value.
- * @retval #MEDIA_CONTENT_ERROR_NONE Successful
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @post media_info_update_to_db()
- */
-int media_info_set_played_count(media_info_h media, int played_count);
-
-/**
* @brief Sets the played time to content meta handle.
* @details You can set the latest played(opened) time of the media file. the latest played time to be set the current time on the system.
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
int media_info_set_played_time(media_info_h media);
/**
- * @brief Sets the played position to content meta handle.
- *
- * @param [in] media The handle to media info
- * @param [in] played_position The played position of content
- * @return 0 on success, otherwise a negative error value.
- * @retval #MEDIA_CONTENT_ERROR_NONE Successful
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- * @post media_info_update_to_db()
- */
-int media_info_set_played_position(media_info_h media, int played_position);
-
-/**
* @brief Sets the display name of media info.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
#include <glib.h>
#include <media-svc.h>
#include <media_content_type.h>
-#include <media_content_internal.h>
#include <dlog.h>
#include <media-util.h>
#include <errno.h>
#include <tzplatform_config.h>
+#ifdef _USE_TV_PROFILE
+#include <media_content_type_product.h>
+#endif
#ifdef __cplusplus
extern "C" {
void *user_data;
} media_content_scan_cb_data;
+typedef struct _media_content_scan_cb_data_v2 {
+ media_scan_completed_cb_v2 callback;
+ void *user_data;
+} media_content_scan_cb_data_v2;
/* DB Table */
#define DB_TABLE_MEDIA "media"
#ifndef __TIZEN_MEDIA_PVR_H__
#define __TIZEN_MEDIA_PVR_H__
-#include <media_content_internal.h>
#include <media_content_type.h>
+#include <media_content_type_product.h>
#ifdef __cplusplus
int media_storage_get_type(media_storage_h storage, media_content_storage_e *storage_type);
/**
- * @brief Gets the storage scan status of media storage.
- * @since_tizen 2.4
- *
- * @param[in] storage The media storage handle
- * @param[out] scan_status The storage type of the media storage
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #MEDIA_CONTENT_ERROR_NONE Successful
- * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int media_storage_get_scan_status(const char *storage_uuid, media_storage_scan_status_e *scan_status);
-
-
-/**
* @}
*/
#ifndef __TIZEN_MEDIA_UHD_H__
#define __TIZEN_MEDIA_UHD_H__
-#include <media_content_internal.h>
#include <media_content_type.h>
+#include <media_content_type_product.h>
#ifdef __cplusplus
Name: capi-content-media-content
Summary: A Media content library in Tizen Native API
-Version: 0.3.7
+Version: 0.3.8
Release: 0
Group: Multimedia/API
License: Apache-2.0
*/
-#include <media_content.h>
#include <media_info_private.h>
#include <media_util_private.h>
-#include <media_content_internal.h>
#include <unicode/uscript.h>
#include <unicode/uloc.h>
#include <fcntl.h>
#ifdef _USE_TV_PROFILE
#include <vconf.h>
-#include <media_pvr.h>
-#include <media_uhd.h>
#endif
static attribute_h g_attr_handle = NULL;
#include <media_info_private.h>
#include <media_util_private.h>
#include <system_info.h>
-#ifdef _USE_TV_PROFILE
-#include <media_content_internal.h>
-#endif
+
static void __media_info_insert_completed_cb(media_request_result_s *result, void *user_data);
static void __media_info_thumbnail_completed_cb(int error, const char *path, void *user_data);
static void __media_info_face_completed_cb(int error, const int face_count, void *user_data);
static bool __media_info_delete_batch_cb(media_info_h media, void *user_data);
static int __media_info_insert_batch(media_batch_insert_e insert_type, const char **path_array, unsigned int array_length, media_insert_completed_cb completed_cb, void *user_data);
+static int __media_info_set_str_data(media_info_h media, media_info_item_e data_type, const char *str_data);
static int __media_info_get_media_path_by_id_from_db(const char *media_id, char **path)
{
return ret;
}
+#ifdef _USE_TV_PROFILE
int media_info_get_media_info_by_path_from_db(const char* path, media_info_h* media)
{
char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0,};
return ret;
}
+#endif
#ifdef _USE_SENIOR_MODE
+int media_info_set_contact(media_info_h media, const char *contact)
+{
+ return __media_info_set_str_data(media, MEDIA_INFO_CONTACT, contact);
+}
+
+int media_info_set_app_data(media_info_h media, const char *app_data)
+{
+ return __media_info_set_str_data(media, MEDIA_INFO_APP_DATA, app_data);
+}
+
int media_info_insert_to_db_with_contact_data(const char *path, const char* contact, const char* app_data, media_info_h *info)
{
int ret = media_info_insert_to_db(path, info);
return __media_info_set_str_data(media, MEDIA_INFO_RECORDED_DATE, recorded_date);
}
-
-#ifdef _USE_SENIOR_MODE
-int media_info_set_contact(media_info_h media, const char *contact)
-{
- return __media_info_set_str_data(media, MEDIA_INFO_CONTACT, contact);
-}
-
-int media_info_set_app_data(media_info_h media, const char *app_data)
-{
- return __media_info_set_str_data(media, MEDIA_INFO_APP_DATA, app_data);
-}
-#endif
-
*/
#ifdef _USE_TV_PROFILE
-#include <media_content.h>
-#include <media_content_internal.h>
#include <media_info_private.h>
#include <media_util_private.h>
#include <media_pvr.h>
*/
-#include <media_content.h>
#include <media_info_private.h>
-#include <media_content_internal.h>
static void __media_storage_get_detail(sqlite3_stmt* stmt, media_storage_h storage)
{
* limitations under the License.
*/
#ifdef _USE_TV_PROFILE
-#include <media_content.h>
-#include <media_content_internal.h>
#include <media_info_private.h>
#include <media_util_private.h>
#include <media_uhd.h>