Migrate to openssl3
[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 #ifndef __DRM_TIZEN_MID_H__
21 #define __DRM_TIZEN_MID_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #include <sys/types.h>
28 #include <sys/stat.h>
29 #include <sys/syscall.h>
30 #include <linux/unistd.h>
31 #include <unistd.h>
32
33 // Flag to Enable Widget DRM Rights installation using the Linux OMA DRM design
34 //#define __EDRM_ENABLE_WIDGET_DRM__
35 #define drmgettid() (long int)syscall(__NR_gettid)
36 #define DRM_FILENAME(X) \
37         (strrchr((char *)(X), '/') ? \
38          (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 #define DRM_TAPPS_LOG(FMT, ARG...) \
49         SLOG(LOG_INFO, TAG_DRM_TIZEN, FMT, ##ARG)
50 #define DRM_TAPPS_FRQ_LOG(FMT, ARG...) \
51         SLOG(LOG_DEBUG, TAG_DRM_TIZEN, FMT, ##ARG)
52 #define DRM_TAPPS_EXCEPTION(FMT, ARG...) \
53         SLOG(LOG_ERROR, TAG_DRM_TIZEN, FMT, ##ARG)
54 #define DRM_TAPPS_SECURE_LOG(FMT, ARG...) \
55         SECURE_SLOG(LOG_INFO, TAG_DRM_TIZEN, FMT, ##ARG)
56 #define DRM_TAPPS_SECURE_EXCEPTION(FMT, ARG...) \
57         SECURE_SLOG(LOG_ERROR, TAG_DRM_TIZEN, FMT, ##ARG)
58
59 #ifdef __cplusplus
60 }
61 #endif
62
63 #endif /* __DRM_TIZEN_MID_H__*/