2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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 __ASP_MANAGER_GDBUS_H__
18 #define __ASP_MANAGER_GDBUS_H__
20 #include "asp-manager.h"
26 #define SERVICE_DBUS_ERROR_NAME "net.asp.service.Error.Failed"
27 #define SESSION_DBUS_ERROR_NAME "net.asp.session.Error.Failed"
29 #define DEBUG_PARAMS(parameters) \
31 gchar *parameters_debug_str = NULL;\
33 parameters_debug_str = g_variant_print((GVariant *)parameters, TRUE);\
34 ASP_LOGD("signal params [%s]", parameters_debug_str ? parameters_debug_str : "NULL");\
35 g_free(parameters_debug_str);\
38 void asp_manager_gdbus_init(gpointer asp_manager);
39 void asp_manager_gdbus_deinit(gpointer asp_manager);
40 void asp_manager_gdbus_notify_advertise_status(guint32 adv_id, guint8 status, gint32 reason);
42 void asp_manager_gdbus_notify_search_result(guint32 search_id,
43 const gchar *service_mac,
44 const gchar *service_device_name,
46 const gchar *instance_name,
47 GHashTable *service_info_map,
48 guint8 service_status);
50 void asp_manager_gdbus_notify_session_request(gint32 error_code,
51 gchar *session_mac, guint32 session_id, guint32 adv_id,
52 gchar *device_name, gchar *session_info,
53 gboolean get_pin, gchar *pin);
55 void asp_manager_gdbus_notify_session_config_request(gchar * session_mac,
56 guint32 sessoin_id, gboolean get_pin, gchar *pin);
58 void asp_manager_gdbus_notify_connect_status(gchar *session_mac,
59 guint32 session_id, gint32 status, gchar *deferred);
61 void asp_manager_gdbus_notify_session_status(gchar *session_mac,
62 guint32 session_id, gint32 state, gint32 status, const gchar *info);
64 void asp_manager_gdbus_notify_port_status(gchar *session_mac,
65 guint32 session_id, const gchar *ip, gint32 port, gint32 protocol,
72 #endif /* __ASP_MANAGER_GDBUS_H__ */