Merge "N_SE-24408 : Fix B/S after resend from MMS viewer" into tizen_2.0
[apps/core/preloaded/message-app.git] / viewer / include / msg-ui-viewer-drm-utility.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
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
7  *
8  *    http://floralicense.org/license
9  *
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.
15  */
16
17 #ifndef __MSG_VIEWER_DRM_UTILITY_H__
18 #define __MSG_VIEWER_DRM_UTILITY_H__
19
20 /*==================================================================================================
21  *                                                                      INCLUDE HEADERS
22  *==================================================================================================*/
23 #include "msg-ui-viewer-types.h"
24 #include <drm_client.h>
25
26 /*==================================================================================================
27  *                                                                              ENUMERATIONS
28  *==================================================================================================*/
29 typedef enum {
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,
34 } MSG_UI_DRM_TYPE_E;
35
36 typedef enum {
37         MSG_UI_DRM_RIGHT_PLAY,                  /*video*/
38         MSG_UI_DRM_RIGHT_DISPLAY,               /*image*/
39 } MSG_UI_DRM_RIGHT_TYPE_E;
40
41 /*==================================================================================================
42  *                                                                      FUNCTION DECLARATIONS
43  *==================================================================================================*/
44 MSG_BOOL msg_ui_viewer_is_drm_file(const char *filepath);
45
46 /*
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
51  */
52 MSG_UI_DRM_TYPE_E msg_ui_viewer_get_drm_type(const char *filepath);
53
54 /*
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
60  */
61 MSG_BOOL msg_ui_viewer_check_drm_ro_valid(const char *filepath, MSG_UI_DRM_RIGHT_TYPE_E permission_type);
62
63 /*
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
70  */
71 MSG_BOOL msg_ui_viewer_get_drm_url(const char *filepath, char *szurl, int szurl_len);
72 #endif