2 * Network Client Library
4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.1 (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.tizenopensource.org/license
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.
20 #ifndef __NETWORK_DBUS_REQUEST_H__
21 #define __NETWORK_DBUS_REQUEST_H__
23 #include "network-internal.h"
24 #include "network-wifi-intf.h"
30 /*****************************************************************************
32 *****************************************************************************/
34 #define CONNMAN_CLIENT_DBUS_TYPE_STRING "string"
35 #define CONNMAN_CLIENT_DBUS_TYPE_INT16 "int16"
36 #define CONNMAN_CLIENT_DBUS_TYPE_UINT16 "uint16"
37 #define CONNMAN_CLIENT_DBUS_TYPE_INT32 "int32"
38 #define CONNMAN_CLIENT_DBUS_TYPE_UINT32 "uint32"
39 #define CONNMAN_CLIENT_DBUS_TYPE_INT64 "int64"
40 #define CONNMAN_CLIENT_DBUS_TYPE_UINT64 "uint64"
41 #define CONNMAN_CLIENT_DBUS_TYPE_DOUBLE "double"
42 #define CONNMAN_CLIENT_DBUS_TYPE_BYTE "byte"
43 #define CONNMAN_CLIENT_DBUS_TYPE_BOOLEAN "boolean"
44 #define CONNMAN_CLIENT_DBUS_TYPE_OBJECT_PATH "objpath"
46 #define CONNMAN_CLIENT_DBUS_TYPE_VARIANT "variant"
47 #define CONNMAN_CLIENT_DBUS_TYPE_ARRAY "array"
48 #define CONNMAN_CLIENT_DBUS_TYPE_DICT_ENTRY "dict"
50 #define NETCONFIG_AGENT_FIELD_SSID "SSID"
51 #define NETCONFIG_AGENT_FIELD_PASSPHRASE "Passphrase"
52 #define NETCONFIG_AGENT_FIELD_WPS_PBC "WPS_PBC"
53 #define NETCONFIG_AGENT_FIELD_WPS_PIN "WPS_PIN"
55 #define CONNMAN_CONFIG_FIELD_TYPE "Type"
56 #define CONNMAN_CONFIG_FIELD_NAME "Name"
57 #define CONNMAN_CONFIG_FIELD_SSID "SSID"
58 #define CONNMAN_CONFIG_FIELD_EAP_METHOD "EAP"
59 #define CONNMAN_CONFIG_FIELD_IDENTITY "Identity"
60 #define CONNMAN_CONFIG_FIELD_PASSPHRASE "Passphrase"
61 #define CONNMAN_CONFIG_FIELD_PHASE2 "Phase2"
62 #define CONNMAN_CONFIG_FIELD_CA_CERT_FILE "CACertFile"
63 #define CONNMAN_CONFIG_FIELD_CLIENT_CERT_FILE "ClientCertFile"
64 #define CONNMAN_CONFIG_FIELD_PVT_KEY_FILE "PrivateKeyFile"
65 #define CONNMAN_CONFIG_FIELD_PVT_KEY_PASSPHRASE "PrivateKeyPassphrase"
66 #define CONNMAN_CONFIG_FIELD_EAP_KEYMGMT_TYPE "KeymgmtType"
68 /*****************************************************************************
70 *****************************************************************************/
83 char *client_cert_file;
84 char *private_key_file;
85 char *private_key_password;
86 char *eap_keymgmt_type;
88 } net_wifi_connect_service_info_t;
90 /*****************************************************************************
92 *****************************************************************************/
93 int _net_dbus_scan_request(void);
94 int _net_dbus_set_bgscan_mode(net_wifi_background_scan_mode_t mode);
95 int _net_dbus_get_state(char* state);
96 int _net_dbus_get_ethernet_cable_state(int *state);
97 int _net_dbus_set_agent_passphrase_and_connect(
98 const char *passphrase, const char *profilename);
99 int _net_dbus_get_wps_pin(char **wps_pin);
100 int _net_dbus_set_agent_wps_pbc_and_connect(const char *profilename);
101 int _net_dbus_set_agent_wps_pin_and_connect(
102 const char *wps_pin, const char *profilename);
103 int _net_dbus_open_connection(const char* profile_name);
104 int _net_dbus_close_connection(const char* profile_name);
105 int _net_dbus_get_network_status(net_device_t device_type, net_cm_network_status_t* network_status);
106 int _net_dbus_get_tech_status(net_device_t device_type, net_tech_info_t* tech_status);
107 int _net_dbus_get_wifi_state(char **wifi_state);
108 int _net_dbus_connect_service(const net_wifi_connect_service_info_t* wifi_connection_info);
109 int _net_dbus_set_profile_ipv4(net_profile_info_t* prof_info, char* profile_name);
110 int _net_dbus_set_profile_ipv6(net_profile_info_t* prof_info, char* profile_name);
111 int _net_dbus_set_profile_dns(net_profile_info_t* prof_info, char* profile_name);
112 int _net_dbus_set_proxy(net_profile_info_t* prof_info, char* profile_name);
113 int _net_dbus_get_technology_state(network_tech_state_info_t* tech_state);
114 GVariant *_net_invoke_dbus_method(const char *dest, const char *path,
115 const char *interface_name, const char *method,
116 GVariant *params, int *dbus_error);
117 int _net_invoke_dbus_method_nonblock(const char *dest, const char *path,
118 const char *interface_name, const char *method,
119 GVariant *params, int timeout,
120 GAsyncReadyCallback notify_func);
121 int _net_dbus_load_wifi_driver(gboolean wifi_picker_test);
122 int _net_dbus_remove_wifi_driver(void);
123 int _net_dbus_get_statistics(net_device_t device_type, net_statistics_type_e statistics_type, unsigned long long *size);
124 int _net_dbus_set_statistics(net_device_t device_type, net_statistics_type_e statistics_type);
125 int _net_dbus_add_pdp_profile(net_profile_info_t *prof_info);
126 int _net_dbus_reset_pdp_profile(int type, const char * modem_path);
127 int _net_dbus_modify_pdp_profile(net_profile_info_t *prof_info, const char *profile_name);
128 int _net_dbus_specific_scan_request(const char *ssid);
129 int _net_dbus_wps_scan_request(void);
130 int _net_dbus_set_default(const char* profile_name);
131 int _net_dbus_get_passpoint(int *enabled);
132 int _net_dbus_set_passpoint(int enable);
134 int _net_dbus_cancel_wps(void);
138 int _net_dbus_open_connection_without_ssid();
139 int _net_dbus_open_pin_connection_without_ssid(const char *pin);
140 int _net_dbus_set_agent_wps_pbc(void);
141 int _net_dbus_set_agent_wps_pin(const char *wps_pin);
145 int _net_dbus_tdls_disconnect(const char* peer_mac_addr);
146 int _net_dbus_tdls_connected_peer(char** peer_mac_addr);
148 int _net_dbus_device_policy_get_wifi(int *state);
149 int _net_dbus_device_policy_get_wifi_profile(int *state);
155 #endif /** __NETWORK_SIGNAL_HANDLER_H__ */