2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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://floralicense.org/license
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.
17 #ifndef __MSG_VIEWER_DRM_UTILITY_H__
18 #define __MSG_VIEWER_DRM_UTILITY_H__
20 /*==================================================================================================
22 *==================================================================================================*/
23 #include "msg-ui-viewer-types.h"
24 #include <drm_client.h>
26 /*==================================================================================================
28 *==================================================================================================*/
30 MSG_UI_DRM_UNDEFINED = DRM_METHOD_TYPE_UNDEFINED,
31 MSG_UI_DRM_TYPE_FL = DRM_METHOD_TYPE_FORWARD_LOCK,
32 MSG_UI_DRM_TYPE_CD = DRM_METHOD_TYPE_COMBINED_DELIVERY,
33 MSG_UI_DRM_TYPE_SD = DRM_METHOD_TYPE_SEPARATE_DELIVERY,
37 MSG_UI_DRM_RIGHT_PLAY, /*video*/
38 MSG_UI_DRM_RIGHT_DISPLAY, /*image*/
39 } MSG_UI_DRM_RIGHT_TYPE_E;
41 /*==================================================================================================
42 * FUNCTION DECLARATIONS
43 *==================================================================================================*/
44 MSG_BOOL msg_ui_viewer_is_drm_file(const char *filepath);
47 *@fn msg_ui_viewer_get_drm_type(const char *filepath);
48 *@brief This function is used to get drm type, msg_ui_viewer_is_drm_file should be called before calling this api to check whether filepath is drm file or not
49 * @param[in] filepath filepath
50 * @return return TRUE if ro is valid, else FALSE
52 MSG_UI_DRM_TYPE_E msg_ui_viewer_get_drm_type(const char *filepath);
55 *@fn msg_ui_viewer_check_drm_ro_valid(const char *filepath, MSG_UI_DRM_RIGHT_TYPE_E permission_type);
56 *@brief This function is used to check ro is valid or not, msg_ui_viewer_is_drm_file should be called before calling this api to check whether filepath is drm file or not
57 * @param[in] filepath filepath
58 * @param[in] permission_type permission type to be shown/played
59 * @return return TRUE if ro is valid, else FALSE
61 MSG_BOOL msg_ui_viewer_check_drm_ro_valid(const char *filepath, MSG_UI_DRM_RIGHT_TYPE_E permission_type);
64 *@fn msg_ui_viewer_get_drm_url(const char *filepath, char *szurl, int szurl_len);
65 *@brief This function is used to check ro is valid or not
66 * @param[in] filepath filepath
67 * @param[in] szurl_len buffer size of szrul
68 * @param[out] szurl will be got url address of ro
69 * @return return TRUE if caller get url address well, else FALSE
71 MSG_BOOL msg_ui_viewer_get_drm_url(const char *filepath, char *szurl, int szurl_len);