Release version 0.3.2
[platform/core/appfw/badge.git] / include / badge_private.h
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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  */
17
18 #ifndef __BADGE_PRIVATE_H__
19 #define __BADGE_PRIVATE_H__
20
21 #include <system_info.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26
27 #define BADGE_FEATURE "http://tizen.org/feature/badge"
28 #define CHECK_BADGE_FEATURE() \
29         do { \
30                 bool is_supported = false; \
31                 if (!system_info_get_platform_bool(BADGE_FEATURE, &is_supported)) { \
32                         if (is_supported == false) { \
33                                 LOGE("[%s] feature is disabled", BADGE_FEATURE); \
34                                 return BADGE_ERROR_NOT_SUPPORTED; \
35                         } \
36                 } \
37         } while (0)
38
39 #ifdef __cplusplus
40 }
41 #endif /* __cplusplus */
42
43 #endif /* __BADGE_PRIVATE_H__ */