Fix build error in sticker-receiver
[platform/core/uifw/capi-ui-sticker.git] / server / stickerd_db_manager.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_STICKERD_DB_MANAGER_H__
18 #define __TIZEN_UIX_STICKERD_DB_MANAGER_H__
19
20 #include <glib.h>
21 #include <tzplatform_config.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 typedef enum {
28     STICKER_DB_STICKER_ALL,
29     STICKER_DB_STICKER_APPID,
30     STICKER_DB_STICKER_TYPE,
31     STICKER_DB_STICKER_URI,
32     STICKER_DB_STICKER_THUMBNAIL,
33     STICKER_DB_STICKER_DESCRIPTION,
34     STICKER_DB_STICKER_GROUP,
35     STICKER_DB_STICKER_KEYWORD,
36     STICKER_DB_STICKER_DISP_TYPE,
37     STICKER_DB_STICKER_RECENT_HISTORY,
38 } sticker_info_db_type;
39
40 typedef struct {
41     int record_id;
42     char *app_id;
43     int  type;
44     char *uri;
45     char *thumbnail;
46     char *description;
47     char *group;
48     GList *keyword;
49     char *date;
50     int  display_type;
51 } sticker_info_db;
52
53 int stickerd_db_init(void);
54 int stickerd_db_insert_sticker_info(int *record_id, sticker_info_db *sticker_info);
55 int stickerd_db_delete_sticker_info(int record_id);
56 int stickerd_db_delete_sticker_info_by_uri(char *uri);
57 int stickerd_db_update_sticker_info(int record_id, sticker_info_db_type type, void *data);
58 int stickerd_db_get_sticker_info_by_record_id(int record_id, sticker_info_db *sticker_info);
59 int stickerd_db_get_group_list(GVariantBuilder *builder, char *app_id);
60 int stickerd_db_get_keyword_list(GVariantBuilder *builder, char *app_id);
61 int stickerd_db_get_sticker_count(int *count, char *app_id);
62 int stickerd_db_get_record_id(sticker_info_db_type type, GList **id_list, void *data, char *app_id, int offset, int count);
63 int stickerd_db_get_group_list_by_display_type(GVariantBuilder *builder, char *app_id, int disp_type);
64 int stickerd_db_check_file_exists(int *result, char *uri);
65 int stickerd_db_insert_recent_sticker_info(int record_id);
66 int stickerd_db_get_sticker_info_by_uri(char *uri, sticker_info_db *sticker_info);
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif /* __TIZEN_UIX_STICKERD_DB_MANAGER_H__ */