Merge branch '0128_tizen20'
[apps/core/preloaded/video-player.git] / include / mp-drm-ctrl.h
1 /*\r
2  * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
3  * \r
4  *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
5  * \r
6  *    Licensed under the Flora License, Version 1.0 (the "License");\r
7  *    you may not use this file except in compliance with the License.\r
8  *    You may obtain a copy of the License at\r
9  * \r
10  *        http://www.tizenopensource.org/license\r
11  * \r
12  *    Unless required by applicable law or agreed to in writing, software\r
13  *    distributed under the License is distributed on an "AS IS" BASIS,\r
14  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
15  *    See the License for the specific language governing permissions and\r
16  *    limitations under the License.\r
17  */\r
18 \r
19 \r
20 #ifndef _MP_DRM_CTRL_H_\r
21 #define _MP_DRM_CTRL_H_\r
22 \r
23 #define DRM_STR_LEN_MAX         2048\r
24 \r
25 typedef enum\r
26 {\r
27         MP_VIDEO_DRM_ERROR_NONE = 0,\r
28         MP_VIDEO_DRM_ERROR_INTERNAL,\r
29         MP_VIDEO_DRM_ERROR_TIME_BASED,\r
30         MP_VIDEO_DRM_ERROR_INTERVAL,\r
31         MP_VIDEO_DRM_ERROR_INTERVAL_FIRST_USE,\r
32         MP_VIDEO_DRM_ERROR_ACCUMULATED,\r
33         MP_VIDEO_DRM_ERROR_COUNT,\r
34         MP_VIDEO_DRM_ERROR_COUNT_SMALL,\r
35         MP_VIDEO_DRM_ERROR_TIME_COUNT_BASED,\r
36         MP_VIDEO_DRM_ERROR_TIME_INDIVIDULAL,\r
37         MP_VIDEO_DRM_ERROR_TIME_SYSTEM,\r
38         MP_VIDEO_DRM_ERROR_MAX,\r
39 }MpVideoDrmErrorType;\r
40 \r
41 \r
42 \r
43 typedef struct\r
44 {\r
45         int     nErrorCode;\r
46         int     nData;\r
47 }MpVideoDrmInfo;\r
48 \r
49 \r
50 typedef enum\r
51 {\r
52         VIDEO_DRM_CONSUMPTION_STATE_DISABLE             = 0,\r
53         VIDEO_DRM_CONSUMPTION_STATE_ENABLE,\r
54 }MpVideoDrmConsumptionStateType;\r
55 \r
56 \r
57 void    MpVideoDrmInit(void);\r
58 bool    MpVideoDrmGetForwardLookState(void);\r
59 void    MpVideoDrmSetConsumptionState(int nState);\r
60 int     MpVideoDrmGetConsumption(void);\r
61 void    MpVideoDrmStartConsumption(char *szPath);\r
62 void    MpVideoDrmPauseConsumption(void);\r
63 void    MpVideoDrmResumeConsumption(void);\r
64 void    MpVideoDrmStopConsumption(void);\r
65 bool    MpVideoDrmIsDrmFile(char* szPath);              //bool MpVideoDrmFileRight(char* szPath);\r
66 bool    MpVideoDrmHasValidRo(char* szPath);\r
67 bool    MpVideoDrmCheckForward(char* szPath);\r
68 MpVideoDrmInfo  *MpVideoDrmCheckLeftRo(char* szVideoTitle, char* szPath);\r
69 bool    MpVideoDrmCheckExpiration(char* szPath);\r
70 \r
71 /* DivX DRM functions */\r
72 void    MpVideoDrmGetFileExtension(char *szPath, char *szContentType, int nContentTypeStrSize);\r
73 \r
74 #endif //_MP_DRM_CTRL_H_\r