X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Futil.h;h=4115fc4c46d89ee90c8efa0c21e01d2a2973879c;hb=f9cf24f12404a2ea38d7e591e1cc50eb202337b0;hp=970c4ef204b410bff919696fa33bbe55c099c3f6;hpb=411e953a971f6caab9ec935824da392553adb46d;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git diff --git a/include/util.h b/include/util.h index 970c4ef..4115fc4 100755 --- a/include/util.h +++ b/include/util.h @@ -27,24 +27,12 @@ extern "C" { #include #include "wifi.h" +#include "plugin.h" -#define NETCONFIG_ADD_FOUND_AP_NOTI "add_found_ap_noti" -#define NETCONFIG_DEL_FOUND_AP_NOTI "del_found_ap_noti" -#define NETCONFIG_ADD_PORTAL_NOTI "add_portal_noti" -#define NETCONFIG_DEL_PORTAL_NOTI "del_portal_noti" -#define NETCONFIG_TIZEN_SYSTEM_ENV "/run/tizen-system-env" +#define NETCONFIG_TIZEN_SYSTEM_ENV "/run/tizen-system-env" #define MAX_SIZE_ERROR_BUFFER 256 -#if defined TIZEN_WEARABLE -typedef enum { - WC_POPUP_TYPE_SESSION_OVERLAPPED, - WC_POPUP_TYPE_WIFI_CONNECTED, - WC_POPUP_TYPE_CAPTIVE_PORTAL, - WC_POPUP_TYPE_WIFI_RESTRICT -}netconfig_wcpopup_type_e; -#endif - GKeyFile *netconfig_keyfile_load(const char *pathname); void netconfig_keyfile_save(GKeyFile *keyfile, const char *pathname); @@ -64,6 +52,7 @@ gboolean netconfig_is_wifi_tethering_on(void); gboolean netconfig_interface_up(const char *ifname); gboolean netconfig_interface_down(const char *ifname); +int netconfig_execute_cmd(const char *cmd); int netconfig_execute_file(const char *file_path, char *const args[], char *const env[]); 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); @@ -72,29 +61,57 @@ int netconfig_add_route_ipv4(gchar *ip_addr, gchar *subnet, gchar *interface, gi int netconfig_del_route_ipv4(gchar *ip_addr, gchar *subnet, gchar *interface, gint address_family); gboolean handle_launch_direct(Wifi *wifi, GDBusMethodInvocation *context); -gboolean handle_launch_mdns(Network *object, GDBusMethodInvocation *context); -gboolean handle_ref_mdns(Network *object, GDBusMethodInvocation *context); -gboolean handle_unref_mdns(Network *object, GDBusMethodInvocation *context); +gboolean handle_launch_mdns(Network *object, GDBusMethodInvocation *context, + gchar *name); gboolean netconfig_send_notification_to_net_popup(const char * noti, const char * data); int netconfig_send_message_to_net_popup(const char *title, const char *content, const char *type, const char *ssid); int netconfig_send_restriction_to_net_popup(const char *title, const char *type, const char *restriction); -void netconfig_set_system_event(const char * sys_evt, const char * evt_key, const char * evt_val); -#if defined TIZEN_WEARABLE -int wc_launch_syspopup(netconfig_wcpopup_type_e type); -int wc_launch_popup(netconfig_wcpopup_type_e type); -#endif +void netconfig_set_system_event(int sys_evt, int evt_key, int evt_val); void netconfig_set_vconf_int(const char * key, int value); void netconfig_set_vconf_str(const char * key, const char * value); 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 } #endif +typedef enum { + TIZEN_PROFILE_UNKNOWN = 0, + TIZEN_PROFILE_MOBILE = 0x1, + TIZEN_PROFILE_WEARABLE = 0x2, + TIZEN_PROFILE_TV = 0x4, + TIZEN_PROFILE_IVI = 0x8, + TIZEN_PROFILE_COMMON = 0x10, +} tizen_profile_t; +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 1 /* 1: enable, 0: disable */ + #endif /* __NETCONFIG_UTIL_H__ */