Add a new API for retrieving stickers using display type
[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
53 typedef enum {
54     STICKER_CLIENT_LIB_NONE,
55     STICKER_CLIENT_LIB_CONSUMER,
56     STICKER_CLIENT_LIB_PROVIDER,
57 } CLIENT_LIB;
58
59 typedef enum {
60     STICKER_DATA_TYPE_INFO_ID = 1,
61     STICKER_DATA_TYPE_APP_ID,
62     STICKER_DATA_TYPE_URI_TYPE,
63     STICKER_DATA_TYPE_URI,
64     STICKER_DATA_TYPE_THUMBNAIL,
65     STICKER_DATA_TYPE_DESCRIPTION,
66     STICKER_DATA_TYPE_GROUP,
67     STICKER_DATA_TYPE_KEYWORD,
68     STICKER_DATA_TYPE_DATE,
69     STICKER_DATA_TYPE_DISP_TYPE,
70 } STICKER_DAT_TYPE;
71
72 #ifdef __cplusplus
73 }
74 #endif
75
76 #endif  /* __TIZEN_UIX_STICKER_DEFS_H__ */