Add upgrade script
[platform/core/security/drm-service-core-tizen.git] / include / drm-tizen-mid.h
1 /*
2  * Copyright (c) 2000-2015 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  *     http://floralicense.org/license/
9  *
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.
15  *
16  * @file     drm-tizen-mid.h
17  * @author   Sunggun Jung <sunggun.jung@samsung.com>
18  *           Kyungwook Tak <k.tak@samsung.com>
19  *
20  */
21
22 #ifndef __DRM_TIZEN_MID_H__
23 #define __DRM_TIZEN_MID_H__
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #include <sys/types.h>
30 #include <sys/stat.h>
31 #include <sys/syscall.h>
32 #include <linux/unistd.h>
33 #include <unistd.h>
34
35 /*Flag to Enable Widget DRM Rights installation using the Linux OMA DRM design */
36 //#define __EDRM_ENABLE_WIDGET_DRM__
37 #define drmgettid() (long int)syscall(__NR_gettid)
38 #define DRM_FILENAME(X) (strrchr((char*)(X), '/') ? (char*)(strrchr((char*)(X), '/') + 1) : ((char*)(X)) )
39
40
41 #ifdef TAG_DRM_TIZEN
42 #undef TAG_DRM_TIZEN
43 #endif
44 #define TAG_DRM_TIZEN "DRM_TIZEN"
45
46 #include <dlog.h>
47
48 /* Tizen Apps DRM related logs */
49 #define DRM_TAPPS_LOG(FMT, ARG...)               SLOG(LOG_INFO, TAG_DRM_TIZEN, FMT, ##ARG)
50 #define DRM_TAPPS_FRQ_LOG(FMT, ARG...)           SLOG(LOG_DEBUG, TAG_DRM_TIZEN, FMT, ##ARG)
51 #define DRM_TAPPS_EXCEPTION(FMT, ARG...)         SLOG(LOG_ERROR, TAG_DRM_TIZEN, FMT, ##ARG)
52 #define DRM_TAPPS_SECURE_LOG(FMT, ARG...)        SECURE_SLOG(LOG_INFO, TAG_DRM_TIZEN, FMT, ##ARG)
53 #define DRM_TAPPS_SECURE_EXCEPTION(FMT, ARG...)  SECURE_SLOG(LOG_ERROR, TAG_DRM_TIZEN, FMT, ##ARG)
54
55 #ifdef __cplusplus
56 }
57 #endif
58
59 #endif /* __DRM_TIZEN_MID_H__*/