4 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
\r
6 * Contact: Sunggun Jung <sunggun.jung@samsung.com>
\r
8 * This library is free software; you can redistribute it and/or modify it under
\r
9 * the terms of the GNU Lesser General Public License as published by the
\r
10 * Free Software Foundation; either version 2.1 of the License, or (at your option)
\r
11 * any later version.
\r
13 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
\r
14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
\r
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
\r
16 * License for more details.
\r
18 * You should have received a copy of the GNU Lesser General Public License
\r
19 * along with this library; if not, write to the Free Software Foundation, Inc., 51
\r
20 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
\r
26 * @defgroup DRM-INTEL drm-intel
\r
29 #include "drm-intel-util.h"
\r
30 //#include "drm-intel-crypto-util.h"
\r
37 * An application can install Intel DRM license(DRO).
\r
39 * @param[in] pDroXML Data String of the Rights Request
\r
40 * @param[in] droBufLen pDroXML Length
\r
41 * @return This function returns 1 on success or 0 on failure.
\r
46 int drm_oem_intel_install_license(char *pDroXML, int droBufLen);
\r
49 * An application can uninstall Intel DRM license(DRO).
\r
51 * @param[in] pAppId App-id of the rigths which want to un-install
\r
52 * @return This function returns 1 on success or 0 on failure.
\r
57 int drm_oem_intel_uninstall_license(char *pAppId);
\r
60 * An application can install CEK(Contents Encryption Key).
\r
62 * @param[in] pCekXML Data String of the Rights Request
\r
63 * @param[in] cekBufLen pDroXML Length
\r
64 * @return This function returns 1 on success or 0 on failure.
\r
69 int drm_oem_intel_install_cek(char *pCekXML, int cekBufLen);
\r
72 * An application can get decrypted contents(Apps) which is encrypted
\r
74 * @param[in] pDcfPath Intel DRM Package File Path
\r
75 * @param[in] pDecryptedFile Decrypted File Path
\r
76 * @return This function returns 1 on success or 0 on failure.
\r
81 int drm_oem_intel_decrypt_package(char *pDcfPath, char *pDecryptedFile);
\r
84 * An application can get informations of rights (DRO).
\r
86 * @param[in] pAppId App-id of the rights which want to know
\r
87 * @param[out] pDro The rights information about the app-id
\r
88 * @return This function can return any of the following codes
\r
89 * DRM_INTEL_SUCCESS = 0 <success
\r
90 * DRM_INTEL_LIC_VALID = 1 <License is valid
\r
91 * DRM_INTEL_LIC_SUSPEND = 2 <License is valid but for future use
\r
92 * DRM_INTEL_INVALID_ARG = -1000 <invalid argument
\r
93 * DRM_INTEL_PARSING_ERROR = -999 <parsing contents or rights error
\r
94 * DRM_INTEL_DB_ERROR = -998 <data base error
\r
95 * DRM_INTEL_INSUFFICIENT_MEMORY = -997 <memory error
\r
96 * DRM_INTEL_INTERNAL_ERROR = -996 <processing error
\r
97 * DRM_INTEL_FILE_ERROR = -995 <file error
\r
98 * DRM_INTEL_LIC_EXPIRED_DATETIME = -994 <Datetime License is expired
\r
99 * DRM_INTEL_LIC_EXPIRED_COUNT = -993 <Count License is expired
\r
100 * DRM_INTEL_LIC_NO_LICENCE = -992 <No License
\r
101 * DRM_INTEL_LIC_IMEI_MISMATCH = -991 <IMEI is mismatching
\r
102 * DRM_INTEL_LIC_PNUM_MISMATCH = -990 <PNUM is mismatching
\r
103 * DRM_INTEL_UNKNOWN_ERROR = -1 <dummy error value
\r
108 int drm_oem_intel_getLicenseInfo(char *pAppId, T_DRO *pDro);
\r
111 * An application can get informations of rights (DRO).
\r
113 * @param[in] pAppId App-id of the rights which want to know
\r
114 * @return This function can return any of the following codes
\r
115 * DRM_INTEL_SUCCESS = 0 <success
\r
116 * DRM_INTEL_LIC_VALID = 1 <License is valid
\r
117 * DRM_INTEL_LIC_SUSPEND = 2 <License is valid but for future use
\r
118 * DRM_INTEL_INVALID_ARG = -1000 <invalid argument
\r
119 * DRM_INTEL_PARSING_ERROR = -999 <parsing contents or rights error
\r
120 * DRM_INTEL_DB_ERROR = -998 <data base error
\r
121 * DRM_INTEL_INSUFFICIENT_MEMORY = -997 <memory error
\r
122 * DRM_INTEL_INTERNAL_ERROR = -996 <processing error
\r
123 * DRM_INTEL_FILE_ERROR = -995 <file error
\r
124 * DRM_INTEL_LIC_EXPIRED_DATETIME = -994 <Datetime License is expired
\r
125 * DRM_INTEL_LIC_EXPIRED_COUNT = -993 <Count License is expired
\r
126 * DRM_INTEL_LIC_NO_LICENCE = -992 <No License
\r
127 * DRM_INTEL_LIC_IMEI_MISMATCH = -991 <IMEI is mismatching
\r
128 * DRM_INTEL_LIC_PNUM_MISMATCH = -990 <PNUM is mismatching
\r
129 * DRM_INTEL_UNKNOWN_ERROR = -1 <dummy error value
\r
134 int drm_oem_intel_consume_license(char *pAppID);
\r
137 * An application can veify the app's rights.
\r
139 * @param[in] pAppId App-id of the rights which want to know
\r
140 * @return This function can return any of the following codes
\r
141 * DRM_INTEL_SUCCESS = 0 <success
\r
142 * DRM_INTEL_LIC_VALID = 1 <License is valid
\r
143 * DRM_INTEL_LIC_SUSPEND = 2 <License is valid but for future use
\r
144 * DRM_INTEL_INVALID_ARG = -1000 <invalid argument
\r
145 * DRM_INTEL_PARSING_ERROR = -999 <parsing contents or rights error
\r
146 * DRM_INTEL_DB_ERROR = -998 <data base error
\r
147 * DRM_INTEL_INSUFFICIENT_MEMORY = -997 <memory error
\r
148 * DRM_INTEL_INTERNAL_ERROR = -996 <processing error
\r
149 * DRM_INTEL_FILE_ERROR = -995 <file error
\r
150 * DRM_INTEL_LIC_EXPIRED_DATETIME = -994 <Datetime License is expired
\r
151 * DRM_INTEL_LIC_EXPIRED_COUNT = -993 <Count License is expired
\r
152 * DRM_INTEL_LIC_NO_LICENCE = -992 <No License
\r
153 * DRM_INTEL_LIC_IMEI_MISMATCH = -991 <IMEI is mismatching
\r
154 * DRM_INTEL_LIC_PNUM_MISMATCH = -990 <PNUM is mismatching
\r
155 * DRM_INTEL_UNKNOWN_ERROR = -1 <dummy error value
\r
161 int drm_oem_intel_has_valid_license(char *pAppID);
\r
164 * An application can check the file is drm enabled or not
\r
166 * @param[in] pDcfPath The file path which want to check
\r
167 * @return This function returns 1 on success or 0 on failure.
\r
172 int drm_oem_intel_isDrmFile(char *pDcfPath);
\r