2 * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef __TIZEN_UIX_STICKER_DBUS_H__
18 #define __TIZEN_UIX_STICKER_DBUS_H__
24 #include <dbus/dbus.h>
25 #include "sticker_defs.h"
26 #include "sticker_data.h"
27 #include "sticker_data_main.h"
28 #include "sticker_provider_main.h"
29 #include "sticker_consumer_main.h"
35 enum sticker_client_error {
36 STICKER_CLIENT_ERROR_NONE,
37 STICKER_CLIENT_ERROR_INVALID_PARAMETER,
38 STICKER_CLIENT_ERROR_PERMISSION_DENIED,
39 STICKER_CLIENT_ERROR_OUT_OF_MEMORY,
40 STICKER_CLIENT_ERROR_SERVICE_NOT_READY,
41 STICKER_CLIENT_ERROR_OPERATION_FAILED,
42 STICKER_CLIENT_ERROR_IO_ERROR,
45 int sticker_dbus_init(GDBusConnection **gdbus_connection, int *server_watcher_id,
46 int *monitor_id, int *server_monitor_id, CLIENT_LIB lib, void *data);
47 int sticker_dbus_shutdown(GDBusConnection *gdbus_connection, int *server_watcher_id, int *server_monitor_id, int *monitor_id);
48 int sticker_dbus_insert_sticker_info(GDBusConnection *gdbus_connection, sticker_data_h sticker_data);
49 int sticker_dbus_insert_sticker_info_by_json(GDBusConnection *gdbus_connection, const char *app_id, const char *json_path);
50 int sticker_dbus_delete_sticker_info(GDBusConnection *gdbus_connection, int record_id);
51 int sticker_dbus_update_sticker_info(GDBusConnection *gdbus_connection, sticker_data_h sticker_data);
52 int sticker_dbus_get_sticker_info_by_record_id(GDBusConnection *gdbus_connection, sticker_data_h sticker_data, int record_id);
53 int sticker_dbus_get_group_list(GDBusConnection *gdbus_connection, const char *app_id, GList **group_list);
54 int sticker_dbus_get_keyword_list(GDBusConnection *gdbus_connection, const char *app_id, GList **keyword_list);
55 int sticker_dbus_get_sticker_count(GDBusConnection *gdbus_connection, const char *app_id, int *count);
56 int sticker_dbus_get_all_sticker_info(GDBusConnection *gdbus_connection, const char *app_id, int offset, int count, GVariantIter **id_iter);
57 int sticker_dbus_get_sticker_info_by_appid(GDBusConnection *gdbus_connection, const char *app_id, int offset, int count, GVariantIter **id_iter);
58 int sticker_dbus_get_sticker_info_by_type(GDBusConnection *gdbus_connection, const char *app_id, sticker_data_uri_type_e type, int offset, int count, GVariantIter **id_iter);
59 int sticker_dbus_get_sticker_info_by_group(GDBusConnection *gdbus_connection, const char *app_id, const char *group, int offset, int count, GVariantIter **id_iter);
60 int sticker_dbus_get_sticker_info_by_keyword(GDBusConnection *gdbus_connection, const char *app_id, const char *keyword, int offset, int count, GVariantIter **id_iter);
61 int sticker_dbus_get_sticker_info_by_display_type(GDBusConnection *gdbus_connection, const char *app_id, sticker_data_display_type_e type, int offset, int count, GVariantIter **id_iter);
62 int sticker_dbus_get_group_list_by_display_type(GDBusConnection *gdbus_connection, const char *app_id, sticker_data_display_type_e type, GList **group_list);
68 #endif /* __TIZEN_UIX_STICKER_DBUS_H__ */