/* * Copyright 2012 Samsung Electronics Co., Ltd * * Licensed under the Flora License, Version 1.1 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://floralicense.org/license * * 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 __MSG_VIEWER_DRM_UTILITY_H__ #define __MSG_VIEWER_DRM_UTILITY_H__ /*================================================================================================== * INCLUDE HEADERS *==================================================================================================*/ #include "msg-ui-viewer-types.h" #include /*================================================================================================== * ENUMERATIONS *==================================================================================================*/ typedef enum { MSG_UI_DRM_UNDEFINED = DRM_METHOD_TYPE_UNDEFINED, MSG_UI_DRM_TYPE_FL = DRM_METHOD_TYPE_FORWARD_LOCK, MSG_UI_DRM_TYPE_CD = DRM_METHOD_TYPE_COMBINED_DELIVERY, MSG_UI_DRM_TYPE_SD = DRM_METHOD_TYPE_SEPARATE_DELIVERY, } MSG_UI_DRM_TYPE_E; typedef enum { MSG_UI_DRM_RIGHT_PLAY, /*video*/ MSG_UI_DRM_RIGHT_DISPLAY, /*image*/ } MSG_UI_DRM_RIGHT_TYPE_E; /*================================================================================================== * FUNCTION DECLARATIONS *==================================================================================================*/ MSG_BOOL msg_ui_viewer_is_drm_file(const char *filepath); /* *@fn msg_ui_viewer_get_drm_type(const char *filepath); *@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 * @param[in] filepath filepath * @return return TRUE if ro is valid, else FALSE */ MSG_UI_DRM_TYPE_E msg_ui_viewer_get_drm_type(const char *filepath); /* *@fn msg_ui_viewer_check_drm_ro_valid(const char *filepath, MSG_UI_DRM_RIGHT_TYPE_E permission_type); *@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 * @param[in] filepath filepath * @param[in] permission_type permission type to be shown/played * @return return TRUE if ro is valid, else FALSE */ MSG_BOOL msg_ui_viewer_check_drm_ro_valid(const char *filepath, MSG_UI_DRM_RIGHT_TYPE_E permission_type); /* *@fn msg_ui_viewer_get_drm_url(const char *filepath, char *szurl, int szurl_len); *@brief This function is used to check ro is valid or not * @param[in] filepath filepath * @param[in] szurl_len buffer size of szrul * @param[out] szurl will be got url address of ro * @return return TRUE if caller get url address well, else FALSE */ MSG_BOOL msg_ui_viewer_get_drm_url(const char *filepath, char *szurl, int szurl_len); #endif