Remove Profile Build Dependency: Do it at runtime
[platform/core/connectivity/net-config.git] / include / util.h
index 46d9ab4..908c737 100755 (executable)
@@ -36,15 +36,6 @@ extern "C" {
 
 #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);
 
@@ -72,9 +63,8 @@ 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,
@@ -82,12 +72,10 @@ int netconfig_send_message_to_net_popup(const char *title,
 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_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);
 
@@ -95,4 +83,19 @@ void netconfig_set_mac_address_from_file(void);
 }
 #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 (_get_tizen_profile() == TIZEN_PROFILE_IVI)
+
 #endif /* __NETCONFIG_UTIL_H__ */