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-service-apps.h
17 * @author Sunggun Jung <sunggun.jung@samsung.com>
21 #ifndef __DRM_TIZEN_APPS_H__
22 #define __DRM_TIZEN_APPS_H__
29 #include "drm-tizen-error.h"
34 * @defgroup DRM-TAPPS drm-tapps
39 * An application can request generate request for getting License.
41 * @param[in] pRespBuf Response Data String of the Purchase Request ( Null terminator string )
42 * @param[in] respBufLen pResBuf Length
43 * @param[in][out] pReqBuf License Request Data
44 * @param[in][out] pReqBufLen IN : pReqBuf Length, OUT : Rights Request Data String Size ( including null terminator )
45 * @param[in][out] pLicenseUrl License Acquisition URL Data
46 * @param[in][out] pLicenseUrlLen IN : pLicenseUrl Length, OUT : Rights Issuer Server URL Data String Size ( including null terminator )
47 * @return This function returns TADC_SUCCESS(1) on success or an integer value other than 1 on failure.
49 * @see drm_tdc_generate_purchase_request
52 int drm_tizen_generate_license_request(const char *pRespBuf, unsigned int respBufLen, char *pReqBuf, unsigned int *pReqBufLen, char *pLicenseUrl, unsigned int *pLicenseUrlLen);
55 * An application can get TAD license which is encrypted.
57 * @param[in] pRespBuf Response Data String of the Rights Request ( Null terminator string )
58 * @param[in] respBufLen pResBuf Length
59 * @return This function returns TADC_SUCCESS(1) on success or an integer value other than 1 on failure.
64 int drm_tizen_register_license(const char *pRespBuf, unsigned int respBufLen);
67 * API for checks whether the app drm file or not
69 * @param[in] pDcfPath File path that to be checked whether the app drm file or not
70 * @param[in] dcfPathLen File path length that to be checked whether the app drm file or not
71 * @return This function returns TADC_SUCCESS(1) on success or an integer value other than 1 on failure.
76 int drm_tizen_is_drm_file(const char *pDcfPath, int dcfPathLen);
79 * An application can get decrypted contents(Apps) which is encrypted.
81 * @param[in] pTADCFilepath TDC DRM File Path
82 * @param[in] tadcFileLen TDC DRM File length
83 * @param[in] pDecryptedFile Decrypted File Path
84 * @param[in] decryptedFileLen Decrypted File length
85 * @return This function returns TADC_SUCCESS(1) on success or an integer value other than 1 on failure.
91 int drm_tizen_decrypt_package ( const char *pTADCFilepath, int tadcFileLen, 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, OUT : Purchase Request Data String Size ( including null terminator )
99 * @param[out] pLicenseUrl License Acquisition URL Data
100 * @param[in][out] pLicenseUrlLen IN : pLicenseUrl Length, OUT : License Server URL Data String Size ( including null terminator )
101 * @return This function returns TADC_SUCCESS(1) on success or an integer value other than 1 on failure.
103 * @see DrmTdcGenerateLicenseRequest
106 int drm_tizen_generate_purchase_request ( const char *pTADCFilepath, char *pReqBuf, unsigned int *pReqBufLen, char *pLicenseUrl, unsigned int *pLicenseUrlLen );
110 */ /* Doxygen : addtogroup*/