1 #ifndef __WIFI_CONFIG_H__
2 #define __WIFI_CONFIG_H__
7 #include "wifi_dbus_private.h"
9 #define WIFI_CONFIG_NAME "Name"
10 #define WIFI_CONFIG_SSID "SSID"
11 #define WIFI_CONFIG_PASSPHRASE "Passphrase"
12 #define WIFI_CONFIG_SECURITY_TYPE "Security"
13 #define WIFI_CONFIG_PROXYADDRESS "ProxyAddress"
14 #define WIFI_CONFIG_HIDDEN "Hidden"
15 #define WIFI_CONFIG_FAILURE "Failure"
16 #define WIFI_CONFIG_EAP_ANONYMOUS_IDENTITY "AnonymousIdentity"
17 #define WIFI_CONFIG_EAP_CACERT "CACertFile"
18 #define WIFI_CONFIG_EAP_CLIENTCERT "ClientCertFile"
19 #define WIFI_CONFIG_EAP_PRIVATEKEY "PrivateKeyFile"
20 #define WIFI_CONFIG_EAP_IDENTITY "Identity"
21 #define WIFI_CONFIG_EAP_TYPE "EapType"
22 #define WIFI_CONFIG_EAP_AUTH_TYPE "EapAuthType"
23 #define WIFI_CONFIG_EAP_SUBJECT_MATCH "SubjectMatch"
25 struct _wifi_eap_config {
29 gchar *anonymous_identity;
32 wifi_eap_type_e eap_type;
33 wifi_eap_auth_type_e eap_auth_type;
40 wifi_security_type_e security_type;
43 // optional field is set using wifi_config_set_field
46 wifi_address_family_e address_family;
47 struct _wifi_eap_config *eap_config;
48 wifi_error_e last_error;
51 gchar * wifi_config_get_config_id(const gchar *name, wifi_security_type_e security_type);
52 GSList *wifi_config_get_config_id_list(wifi_dbus *handle);
54 int wifi_config_get_last_error(wifi_config_h config, wifi_error_e *last_error);
56 int wifi_save_configurations(wifi_dbus *handle, const gchar *name, const gchar *passphrase, wifi_security_type_e security_type, const gchar *proxy_address, gboolean is_hidden);
57 int wifi_load_configurations(wifi_dbus *handle, const gchar *config_id, gchar **name, wifi_security_type_e *security_type, gchar **proxy_address, gboolean *is_hidden, wifi_error_e *last_error);
58 int wifi_remove_configurations(wifi_dbus *handle, const gchar *config_id);
59 int wifi_configuration_set_field(wifi_dbus *handle, const gchar *config_id, const gchar *key, const gchar *value);
60 int wifi_configuration_get_passphrase(wifi_dbus *handle, const gchar *config_id, gchar **passphrase);
62 int wifi_save_eap_configurations(wifi_dbus *handle, const gchar *name, const gchar *passphrase, wifi_security_type_e security_type, const gchar *proxy_address, struct _wifi_eap_config *eap_config, gboolean is_hidden);
63 int wifi_load_eap_configurations(wifi_dbus *handle, const gchar *config_id, gchar **name, wifi_security_type_e *security_type, gchar **proxy_address, gboolean *is_hidden, struct _wifi_eap_config **eap_config,wifi_error_e *last_error);
64 wifi_eap_type_e wifi_eap_type_to_int(const gchar *type);
65 wifi_eap_auth_type_e wifi_eap_auth_type_to_int(const gchar *type);
66 gchar *wifi_eap_type_to_string(wifi_eap_type_e eap_type);
67 gchar *wifi_eap_auth_type_to_string(wifi_eap_auth_type_e eap_auth_type);