2 * Network Configuration Module
4 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Danny JS Seo <S.Seo@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 #ifndef __NETCONFIG_DBUS_H__
23 #define __NETCONFIG_DBUS_H__
30 #include <dbus/dbus.h>
31 #include <dbus/dbus-glib.h>
33 #define CONNMAN_SERVICE "net.connman"
34 #define CONNMAN_PATH "/net/connman"
36 #define SUPPLICANT_SERVICE "fi.w1.wpa_supplicant1"
37 #define SUPPLICANT_INTERFACE "fi.w1.wpa_supplicant1"
38 #define SUPPLICANT_PATH "/fi/w1/wpa_supplicant1"
39 #define SUPPLICANT_GLOBAL_INTERFACE "org.freedesktop.DBus.Properties"
41 #define CONNMAN_MANAGER_INTERFACE CONNMAN_SERVICE ".Manager"
42 #define CONNMAN_SERVICE_INTERFACE CONNMAN_SERVICE ".Service"
43 #define CONNMAN_TECHNOLOGY_INTERFACE CONNMAN_SERVICE ".Technology"
44 #define CONNMAN_MANAGER_PATH "/"
46 #define CONNMAN_WIFI_SERVICE_PROFILE_PREFIX CONNMAN_PATH "/service/wifi_"
47 #define CONNMAN_WIFI_TECHNOLOGY_PREFIX CONNMAN_PATH "/technology/wifi"
49 #define DBUS_PATH_MAX_BUFLEN 512
50 #define DBUS_STATE_MAX_BUFLEN 64
53 NETCONFIG_DBUS_RESULT_GET_BGSCAN_MODE,
54 NETCONFIG_DBUS_RESULT_DEFAULT_TECHNOLOGY,
55 } netconfig_dbus_result_type;
57 struct dbus_input_arguments {
62 char *netconfig_wifi_get_connected_service_name(DBusMessage *message);
63 DBusMessage *netconfig_invoke_dbus_method(const char *dest, DBusConnection *connection,
64 const char *path, const char *interface_name, const char *method);
65 DBusMessage *netconfig_supplicant_invoke_dbus_method(const char *dest,
66 DBusConnection *connection,
67 const char *path, const char *interface_name,
68 const char *method, GList *args);
69 DBusMessage *netconfig_dbus_send_request(const char *destination, char *param_array[]);
70 void netconfig_dbus_parse_recursive(DBusMessageIter *iter,
71 netconfig_dbus_result_type result_type, void *data);
72 char *netconfig_dbus_get_string(DBusMessage *msg);
74 DBusGConnection *netconfig_setup_dbus(void);
80 #endif /* __NETCONFIG_DBUS_H__ */