2 * Copyright (c) 2000-2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Flora License, Version 1.1 (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
8 * http://floralicense.org/license/
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.
16 * @file drm-tizen-apps.h
17 * @author Sunggun Jung <sunggun.jung@samsung.com>
19 #ifndef __DRM_TIZEN_APPS_H__
20 #define __DRM_TIZEN_APPS_H__
27 #include "drm-tizen-error.h"
31 * @defgroup DRM-TAPPS drm-tapps
36 * An application can request generate request for getting License.
38 * @param[in] pRespBuf Response Data String of the Purchase Request
39 * (Null terminator string)
40 * @param[in] respBufLen pResBuf Length
41 * @param[in][out] pReqBuf License Request Data
42 * @param[in][out] pReqBufLen IN : pReqBuf Length
43 * OUT : Rights Request Data String Size
44 * (including null terminator)
45 * @param[in][out] pLicenseUrl License Acquisition URL Data
46 * @param[in][out] pLicenseUrlLen IN : pLicenseUrl Length
47 * OUT : Rights Issuer Server URL Data String Size
48 * (including null terminator)
50 * @return TADC_SUCCESS(1) on success or an integer value other than 1 on failure.
52 * @see drm_tdc_generate_purchase_request()
54 int drm_tizen_generate_license_request(
55 const char *pRespBuf, unsigned int respBufLen,
56 char *pReqBuf, unsigned int *pReqBufLen,
57 char *pLicenseUrl, unsigned int *pLicenseUrlLen);
60 * An application can get TAD license which is encrypted.
62 * @param[in] pRespBuf Response Data String of the Rights Request
63 * (Null terminator string)
64 * @param[in] respBufLen pResBuf Length
65 * @return TADC_SUCCESS(1) on success or an integer value other than 1 on failure.
67 int drm_tizen_register_license(const char *pRespBuf, unsigned int respBufLen);
70 * Checks whether the app drm file or not
72 * @param[in] pDcfPath File path that to be checked whether the app drm file or not
73 * @param[in] dcfPathLen File path length that to be checked whether the app
76 * @return TADC_SUCCESS(1) on success or an integer value other than 1 on failure.
78 int drm_tizen_is_drm_file(const char *pDcfPath, int dcfPathLen);
81 * An application can get decrypted contents(Apps) which is encrypted.
83 * @param[in] pTADCFilepath TDC DRM File Path
84 * @param[in] tadcFileLen TDC DRM File length
85 * @param[in] pDecryptedFile Decrypted File Path
86 * @param[in] decryptedFileLen Decrypted File length
88 * @return TADC_SUCCESS(1) on success or an integer value other than 1 on failure.
90 int drm_tizen_decrypt_package(const char *pTADCFilepath, int tadcFileLen,
91 const char *pDecryptedFile, int decryptedFileLen);
94 * An application can request purchase request for getting License.
96 * @param[in] pTADCFilepath File path of Tizen Apps DRM contents
97 * @param[out] pReqBuf Purchase Request Data
98 * @param[in][out] pReqBufLen IN : pReqBuf Length
99 * OUT : Purchase Request Data String Size
100 * (including null terminator)
101 * @param[out] pLicenseUrl License Acquisition URL Data
102 * @param[in][out] pLicenseUrlLen IN : pLicenseUrl Length
103 * OUT : License Server URL Data String Size
104 * (including null terminator)
106 * @return TADC_SUCCESS(1) on success or an integer value other than 1 on failure.
108 * @see DrmTdcGenerateLicenseRequest()
110 int drm_tizen_generate_purchase_request(const char *pTADCFilepath,
111 char *pReqBuf, unsigned int *pReqBufLen, char *pLicenseUrl,
112 unsigned int *pLicenseUrlLen);
122 #endif //__DRM_TIZEN_APPS_H__