Fix build error in sticker-receiver
[platform/core/uifw/capi-ui-sticker.git] / client / sticker_defs.h
1 /*
2  * Copyright (c) 2019 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 #ifndef __TIZEN_UIX_STICKER_DEFS_H__
18 #define __TIZEN_UIX_STICKER_DEFS_H__
19
20 #include <tzplatform_config.h>
21 #include <stdbool.h>
22 #include <system_info.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 #define HAPI __attribute__((visibility("hidden")))
29
30 #define DBUS_NAME                       "org.freedesktop.DBus"
31 #define DBUS_OBJECT_PATH                "/org/freedesktop/DBus"
32 #define DBUS_INTERFACE_NAME             "org.freedesktop.DBus"
33
34 #define STICKER_DBUS_NAME               "org.tizen.sticker.server"
35 #define STICKER_OBJECT_PATH             "/org/tizen/sticker/server"
36 #define STICKER_INTERFACE_NAME          "org.tizen.sticker_service"
37 #define STICKER_PROVIDER_INTERFACE_NAME "org.tizen.sticker_provider"
38 #define STICKER_CONSUMER_INTERFACE_NAME "org.tizen.sticker_consumer"
39
40 #define STICKER_PRIVILEGE_MEDIASTORAGE  "http://tizen.org/privilege/mediastorage"
41 #define STICKER_FEATURE_STICKER         "tizen.org/feature/ui_service.sticker"
42 #define CHECK_STICKER_FEATURE()  \
43   do { \
44     bool is_supported = false;  \
45     if (!system_info_get_platform_bool(STICKER_FEATURE_STICKER, &is_supported)) {  \
46       if (is_supported == false) {  \
47         LOGE("ui_service.sticker feature not supported");  \
48         return STICKER_ERROR_NOT_SUPPORTED;  \
49       }  \
50     }  \
51   } while (0)
52 #define STICKER_DIRECTORY "/opt/usr/share/sticker-data"
53
54 typedef enum {
55     STICKER_CLIENT_LIB_NONE,
56     STICKER_CLIENT_LIB_CONSUMER,
57     STICKER_CLIENT_LIB_PROVIDER,
58 } CLIENT_LIB;
59
60 typedef enum {
61     STICKER_DATA_TYPE_INFO_ID = 1,
62     STICKER_DATA_TYPE_APP_ID,
63     STICKER_DATA_TYPE_URI_TYPE,
64     STICKER_DATA_TYPE_URI,
65     STICKER_DATA_TYPE_THUMBNAIL,
66     STICKER_DATA_TYPE_DESCRIPTION,
67     STICKER_DATA_TYPE_GROUP,
68     STICKER_DATA_TYPE_KEYWORD,
69     STICKER_DATA_TYPE_DATE,
70     STICKER_DATA_TYPE_DISP_TYPE,
71 } STICKER_DAT_TYPE;
72
73 typedef enum {
74     STICKER_EVENT_TYPE_INSERT,
75     STICKER_EVENT_TYPE_DELETE,
76     STICKER_EVENT_TYPE_UPDATE,
77 } STICKER_EVENT_TYPE;
78
79 #ifdef __cplusplus
80 }
81 #endif
82
83 #endif  /* __TIZEN_UIX_STICKER_DEFS_H__ */