Arrange TV Product related code. media_content_product.h and media_content_type_produ... 84/126584/2
authorHaejeong Kim <backto.kim@samsung.com>
Mon, 24 Apr 2017 08:05:31 +0000 (17:05 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Mon, 24 Apr 2017 08:31:20 +0000 (17:31 +0900)
Change-Id: Iac766f9655aacead8dc9b1592fd1e446d5822c45

18 files changed:
include_product/media_content.h
include_product/media_content_internal.h
include_product/media_content_product.h [new file with mode: 0755]
include_product/media_content_type.h
include_product/media_content_type_product.h [new file with mode: 0755]
include_product/media_folder.h
include_product/media_group.h
include_product/media_info.h
include_product/media_info_private.h
include_product/media_pvr.h
include_product/media_storage.h
include_product/media_uhd.h
packaging/capi-content-media-content.spec
src/media_content.c
src/media_info.c
src/media_pvr.c
src/media_storage.c
src/media_uhd.c

index e31edb8..0786366 100755 (executable)
@@ -30,8 +30,7 @@
 #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" {
index 4f1a55f..dec3508 100755 (executable)
@@ -32,103 +32,6 @@ 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 */
diff --git a/include_product/media_content_product.h b/include_product/media_content_product.h
new file mode 100755 (executable)
index 0000000..6c3e554
--- /dev/null
@@ -0,0 +1,171 @@
+/*
+* 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__ */
index 3f2de8e..b5d8d7f 100755 (executable)
@@ -251,35 +251,6 @@ typedef enum {
 } 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
@@ -695,26 +666,6 @@ typedef bool (*media_album_cb)(media_album_h album, void *user_data);
  */
 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.
@@ -832,8 +783,6 @@ typedef bool (*media_face_cb)(media_face_h face, void *user_data);
  */
 #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
@@ -1114,9 +1063,6 @@ typedef bool (*media_face_cb)(media_face_h face, void *user_data);
  */
 #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
@@ -1262,13 +1208,7 @@ typedef bool (*media_face_cb)(media_face_h face, void *user_data);
  * @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*/
 
 /**
  * @}
diff --git a/include_product/media_content_type_product.h b/include_product/media_content_type_product.h
new file mode 100755 (executable)
index 0000000..118eca7
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+* 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__*/
index b9524c6..582119b 100755 (executable)
@@ -160,10 +160,6 @@ int media_folder_get_media_count_from_db(const char *folder_id, filter_h filter,
  */
 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
@@ -462,9 +458,6 @@ int media_folder_set_order(media_folder_h folder, int order);
  */
 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);
-
-
 /**
  * @}
  */
index d3718a7..5a304de 100755 (executable)
@@ -339,27 +339,6 @@ int media_album_get_album_from_db(int album_id, media_album_h *album);
 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.
index 0848f14..c959f73 100755 (executable)
@@ -928,25 +928,6 @@ int media_info_get_content_name(media_info_h media, char **content_name);
 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
  *
@@ -1074,9 +1055,6 @@ int media_info_is_drm(media_info_h media, bool *is_drm);
  */
 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
@@ -1094,19 +1072,6 @@ int media_info_get_stitched_engine(media_info_h media, int *type_360);
 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
  *
@@ -1183,33 +1148,6 @@ int media_info_get_media_from_db(const char *media_id, media_info_h *media);
 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
@@ -1227,18 +1165,6 @@ int media_info_set_played_count(media_info_h media, int played_count);
 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
  *
index f8dbdff..aca5d1f 100755 (executable)
 #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" {
@@ -481,6 +483,10 @@ typedef struct _media_content_cb_data {
        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"
index 761fa1c..4a3ab98 100755 (executable)
@@ -18,8 +18,8 @@
 #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
index bafd28f..9a4a7b0 100755 (executable)
@@ -297,22 +297,6 @@ int media_storage_get_path(media_storage_h storage, char **storage_path);
 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);
-
-
-/**
  * @}
  */
 
index d4e7a93..815f9d4 100755 (executable)
@@ -18,8 +18,8 @@
 #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
index eb6797e..4080e52 100755 (executable)
@@ -1,6 +1,6 @@
 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
index 559c096..df4a26f 100755 (executable)
 */
 
 
-#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>
@@ -28,8 +26,6 @@
 #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;
index d909415..816880c 100755 (executable)
 #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)
 {
@@ -554,6 +553,7 @@ int media_info_insert_burst_shot_to_db(const char **path_array, unsigned int arr
        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,};
@@ -576,8 +576,19 @@ int media_info_get_media_info_by_path_from_db(const char* path, media_info_h* me
 
        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);
@@ -3598,16 +3609,3 @@ int media_info_set_recorded_date(media_info_h media, const char *recorded_date)
 
        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
-
index 1aa171d..e4fed3a 100755 (executable)
@@ -15,8 +15,6 @@
  */
 
 #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>
index 81eb96a..c7ff8e0 100755 (executable)
@@ -15,9 +15,7 @@
  */
 
 
-#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)
 {
index 39c8208..a7b79ec 100755 (executable)
@@ -14,8 +14,6 @@
  * 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>