Tizen 2.0 Release
[profile/ivi/org.tizen.video-player.git] / include / mp-drm-ctrl.h
1 /*\r
2  * Copyright (c) [2012] Samsung Electronics Co., Ltd.\r
3  *\r
4  * Licensed under the Flora License, Version 1.0 (the License);\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *     http://floralicense.org/license/\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an AS IS BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 \r
18 #ifndef _MP_DRM_CTRL_H_\r
19 #define _MP_DRM_CTRL_H_\r
20 \r
21 #define DRM_STR_LEN_MAX         2048\r
22 \r
23 typedef enum\r
24 {\r
25         MP_VIDEO_DRM_ERROR_NONE = 0,\r
26         MP_VIDEO_DRM_ERROR_INTERNAL,\r
27         MP_VIDEO_DRM_ERROR_TIME_BASED,\r
28         MP_VIDEO_DRM_ERROR_INTERVAL,\r
29         MP_VIDEO_DRM_ERROR_INTERVAL_FIRST_USE,\r
30         MP_VIDEO_DRM_ERROR_ACCUMULATED,\r
31         MP_VIDEO_DRM_ERROR_COUNT,\r
32         MP_VIDEO_DRM_ERROR_COUNT_SMALL,\r
33         MP_VIDEO_DRM_ERROR_TIME_COUNT_BASED,\r
34         MP_VIDEO_DRM_ERROR_TIME_INDIVIDULAL,\r
35         MP_VIDEO_DRM_ERROR_TIME_SYSTEM,\r
36         MP_VIDEO_DRM_ERROR_MAX,\r
37 }MpVideoDrmErrorType;\r
38 \r
39 \r
40 \r
41 typedef struct\r
42 {\r
43         int     nErrorCode;\r
44         int     nData;\r
45 }MpVideoDrmInfo;\r
46 \r
47 \r
48 typedef enum\r
49 {\r
50         VIDEO_DRM_CONSUMPTION_STATE_DISABLE             = 0,\r
51         VIDEO_DRM_CONSUMPTION_STATE_ENABLE,\r
52 }MpVideoDrmConsumptionStateType;\r
53 \r
54 \r
55 void    MpVideoDrmInit(void);\r
56 bool    MpVideoDrmGetForwardLookState(void);\r
57 void    MpVideoDrmSetConsumptionState(int nState);\r
58 int     MpVideoDrmGetConsumption(void);\r
59 void    MpVideoDrmStartConsumption(char *szPath);\r
60 void    MpVideoDrmPauseConsumption(void);\r
61 void    MpVideoDrmResumeConsumption(void);\r
62 void    MpVideoDrmStopConsumption(void);\r
63 bool    MpVideoDrmIsDrmFile(char* szPath);              //bool MpVideoDrmFileRight(char* szPath);\r
64 bool    MpVideoDrmHasValidRo(char* szPath);\r
65 bool    MpVideoDrmCheckForward(char* szPath);\r
66 MpVideoDrmInfo  *MpVideoDrmCheckLeftRo(char* szVideoTitle, char* szPath);\r
67 bool    MpVideoDrmCheckExpiration(char* szPath);\r
68 \r
69 /* DivX DRM functions */\r
70 void    MpVideoDrmGetFileExtension(char *szPath, char *szContentType, int nContentTypeStrSize);\r
71 \r
72 #endif //_MP_DRM_CTRL_H_\r