Initialize Tizen 2.3
[framework/osp/security-service.git] / inc / DrmServiceDl.h
1 /*
2  * DrmServiceDl.h
3  *
4  *  Created on: Mar 25, 2013
5  *      Author: manyfun
6  */
7
8 #ifndef _DRMSERVICE_DL_H_
9 #define _DRMSERVICE_DL_H_
10
11 #define DLOPEN_FAILED   -1
12 #define DLSYM_FAILED    -2
13 #define SADC_SUCCESS    1
14
15 #define DRM_SAPPS_SO_PATH       "/usr/lib/libdrm-service-core-tizen.so"
16
17 /*Samsung Apps DRM*/
18 typedef int (*DRM_OEM_SAPPS_GENERATE_LICENSE_REQUEST) (const char *pRespBuf, unsigned int respBufLen, char *pReqBuf, unsigned int *pReqBufLen, char *pLicenseUrl, unsigned int *pLicenseUrlLen);
19 typedef int (*DRM_OEM_SAPPS_REGISTER_LICENSE) (const char *pRespBuf, unsigned int respBufLen);
20 typedef int (*DRM_OEM_SAPPS_IS_DRM_FILE) (const char *pDcfPath, int dcfPathLen);
21 typedef int (*DRM_OEM_SAPPS_DECRYPT_PACKAGE) (const char *pSADCFilepath, int sadcFileLen, const char *pDecryptedFile, int decryptedFileLen);
22 typedef int (*DRM_OEM_SAPPS_GENERATE_PURCHASE_REQUEST) (const char *pSADCFilepath, char *pReqBuf, unsigned int *pReqBufLen, char *pLicenseUrl, unsigned int *pLicenseUrlLen);
23
24 /*Samsung Apps function start*/
25 typedef enum {
26         FUNC_DRM_OEM_SAPPS_GENERATE_LICENSE_REQUEST = 0,
27         FUNC_DRM_OEM_SAPPS_REGISTER_LICENSE,
28         FUNC_DRM_OEM_SAPPS_IS_DRM_FILE,
29         FUNC_DRM_OEM_SAPPS_DECRYPT_PACKAGE,
30         FUNC_DRM_OEM_SAPPS_GENERATE_PURCHASE_REQUEST,
31         FUNC_DRM_SAPPS_MAX
32 } drm_sapps_enum_t;
33
34 typedef struct {
35         DRM_OEM_SAPPS_GENERATE_LICENSE_REQUEST drm_oem_sapps_generate_license_request;
36         DRM_OEM_SAPPS_REGISTER_LICENSE drm_oem_sapps_register_license;
37         DRM_OEM_SAPPS_IS_DRM_FILE drm_oem_sapps_is_drm_file;
38         DRM_OEM_SAPPS_DECRYPT_PACKAGE drm_oem_sapps_decrypt_package;
39         DRM_OEM_SAPPS_GENERATE_PURCHASE_REQUEST drm_oem_sapps_generate_purchase_request;
40 } drm_sapps_func_t;
41
42 #endif