2 * Network Configuration Module
4 * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 * This file declares wifi direct dbus utility functions.
23 * @file wifi-direct-dbus.h
24 * @author Nishant Chaprana (n.chaprana@samsung.com)
28 #ifndef __WIFI_DIRECT_DBUS_H__
29 #define __WIFI_DIRECT_DBUS_H__
37 #define WFD_MANAGER_SERVICE "net.wifidirect"
38 #define WFD_MANAGER_PATH "/net/wifidirect"
39 #define WFD_MANAGER_MANAGE_INTERFACE WFD_MANAGER_SERVICE
40 #define WFD_MANAGER_GROUP_INTERFACE WFD_MANAGER_SERVICE ".group"
41 #define WFD_MANAGER_CONFIG_INTERFACE WFD_MANAGER_SERVICE ".config"
42 #define WFD_MANAGER_SERVICE_INTERFACE WFD_MANAGER_SERVICE ".service"
43 #define WFD_MANAGER_DISPLAY_INTERFACE WFD_MANAGER_SERVICE ".display"
44 #ifdef TIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND
45 #define DBUS_SERVICE "org.freedesktop.DBus"
46 #define DBUS_INTERFACE "org.freedesktop.DBus"
47 #define DBUS_PATH "/org/freedesktop/DBus"
48 #endif /* TIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND */
49 #if defined(TIZEN_FEATURE_ASP)
50 #define WFD_MANAGER_ASP_INTERFACE WFD_MANAGER_SERVICE ".asp"
53 #define WFD_MANAGER_DBUS_REPLY_TIMEOUT 10 * 1000
54 #define WFD_MANAGER_DBUS_REPLY_TIMEOUT_SYNC 10 * 1000
55 #define DBUS_OBJECT_PATH_MAX 150
57 #define DBUS_DEBUG_VARIANT(parameters) \
59 gchar *parameters_debug_str = NULL;\
61 parameters_debug_str = g_variant_print(parameters, TRUE);\
62 WDS_LOGD("signal params [%s]", parameters_debug_str ? parameters_debug_str : "NULL");\
63 g_free(parameters_debug_str);\
66 gboolean wfd_manager_dbus_init(void);
68 void wfd_manager_dbus_deinit(void);
70 guint wfd_manager_dbus_iface_register(const gchar* iface_name,
71 const gchar* iface_path,
72 GDBusNodeInfo *node_info,
73 const GDBusInterfaceVTable *interface_vtable);
75 gboolean wfd_manager_dbus_iface_unregister(guint reg_id);
77 gboolean wfd_manager_dbus_emit_signal(const gchar *interface_name,
78 const gchar *signal_name,
79 GVariant *parameters);
81 GVariant* wfd_manager_dbus_pack_ay(const unsigned char *src, int size);
82 #ifdef TIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND
83 void wfd_manager_dbus_unregister_nameowner_signal(void);
84 #endif /* TIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND */
89 #endif /* __WIFI_DIRECT_DBUS_H__ */