X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Futil.h;h=6e9b936231894a87b46c61f1e6e20ee38cf22eee;hb=3d19e35af3329d269be7dff6207ef6509880d994;hp=3070cf4223804fb9250b1fcea46d7f80ac2884e2;hpb=7dbb259cb053688702d0f636a9464a40b4e4fada;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git diff --git a/include/util.h b/include/util.h index 3070cf4..6e9b936 100755 --- a/include/util.h +++ b/include/util.h @@ -25,6 +25,7 @@ extern "C" { #endif #include +#include #include "wifi.h" #include "plugin.h" @@ -33,6 +34,22 @@ extern "C" { #define MAX_SIZE_ERROR_BUFFER 256 +#define ETHERNET_FEATURE "http://tizen.org/feature/network.ethernet" +#define TETHERING_FEATURE "http://tizen.org/feature/network.tethering" +#define WIFI_DIRECT_FEATURE "http://tizen.org/feature/network.wifi.direct" +#define WIFI_SOFTAP_FEATURE "http://tizen.org/feature/network.wifi.softap" + +typedef enum { + NETCONFIG_SUPPORTED_FEATURE_ETHERNET = 0, + NETCONFIG_SUPPORTED_FEATURE_TETHERING, + NETCONFIG_SUPPORTED_FEATURE_WIFI_DIRECT, + NETCONFIG_SUPPORTED_FEATURE_WIFI_SOFTAP, + NETCONFIG_SUPPORTED_FEATURE_MAX, +} netconfig_supported_feature_e; + +bool netconfig_check_feature_supported(netconfig_supported_feature_e feature); + +gboolean netconfig_check_passphrase(const gchar *service, const char *passphrase); GKeyFile *netconfig_keyfile_load(const char *pathname); void netconfig_keyfile_save(GKeyFile *keyfile, const char *pathname); @@ -51,9 +68,12 @@ gboolean netconfig_is_wifi_tethering_on(void); gboolean netconfig_interface_up(const char *ifname); gboolean netconfig_interface_down(const char *ifname); +int __netconfig_get_interface_index(const char *interface_name); int netconfig_execute_cmd(const char *cmd); int netconfig_execute_file(const char *file_path, char *const args[], char *const env[]); +int netconfig_execute_file_no_wait(const char *file_path, + char *const args[]); int netconfig_execute_clatd(const char *file_path, char *const args[]); int netconfig_add_route_ipv6(gchar *ip_addr, gchar *interface, gchar *gateway, unsigned char prefix_len); int netconfig_del_route_ipv6(gchar *ip_addr, gchar *interface, gchar *gateway, unsigned char prefix_len); @@ -76,11 +96,24 @@ int netconfig_vconf_get_int(const char * key, int *value); int netconfig_vconf_get_bool(const char * key, int *value); char* netconfig_get_env(const char *key); void netconfig_set_mac_address_from_file(void); - void __netconfig_pop_wifi_connected_poppup(const char *ssid); + +void netconfig_get_telephony_network_type(int *svctype, int *pstype); +gboolean __netconfig_wifi_get_sim_imsi(Wifi *wifi, GDBusMethodInvocation *context); +netconfig_error_e __netconfig_wifi_req_aka_auth(GArray *rand_data, GArray *autn_data, + GDBusMethodInvocation *context, struct wifi_authentication_data **data); +gboolean __netconfig_wifi_req_sim_auth(GArray *rand_data, + GDBusMethodInvocation *context, struct wifi_authentication_data **data); +gboolean netconfig_tapi_check_sim_state(void); +gboolean __netconfig_wifi_get_aka_authdata(Wifi *wifi, + GDBusMethodInvocation *context, struct wifi_authentication_data **data); +gboolean __netconfig_wifi_get_sim_authdata(Wifi *wifi, + GDBusMethodInvocation *context, struct wifi_authentication_data **data); + void netconfig_plugin_init(); void netconfig_plugin_deinit(); gboolean netconfig_get_headed_plugin_flag(); +gboolean netconfig_get_telephony_plugin_flag(); #ifdef __cplusplus } @@ -99,6 +132,6 @@ extern tizen_profile_t _get_tizen_profile(); #define TIZEN_TELEPHONY_ENABLE (_get_tizen_profile() == TIZEN_PROFILE_MOBILE) #define TIZEN_WLAN_BOARD_SPRD (_get_tizen_profile() == TIZEN_PROFILE_MOBILE) #define TIZEN_TV (_get_tizen_profile() == TIZEN_PROFILE_TV) -#define TIZEN_NTP_ENABLE (_get_tizen_profile() == TIZEN_PROFILE_IVI) +#define TIZEN_NTP_ENABLE 1 /* 1: enable, 0: disable */ #endif /* __NETCONFIG_UTIL_H__ */