#define ETHERNET_MAC_INFO_FILE "/sys/class/net/eth0/address"
#define WIFI_MAC_INFO_FILE "/sys/class/net/wlan0/address"
-#define TELEPHONY_FEATURE "http://tizen.org/feature/network.telephony"
-#define WIFI_FEATURE "http://tizen.org/feature/network.wifi"
+#define TELEPHONY_FEATURE "http://tizen.org/feature/network.telephony"
+#define WIFI_FEATURE "http://tizen.org/feature/network.wifi"
#define TETHERING_BLUETOOTH_FEATURE "http://tizen.org/feature/network.tethering.bluetooth"
#define ETHERNET_FEATURE "http://tizen.org/feature/network.ethernet"
-typedef enum
-{
+typedef enum {
CONNECTION_CELLULAR_SUBSCRIBER_1 = 0x00,
CONNECTION_CELLULAR_SUBSCRIBER_2 = 0x01,
} connection_cellular_subscriber_id_e;
-typedef enum
-{
+typedef enum {
CONNECTION_SUPPORTED_FEATURE_TELEPHONY,
CONNECTION_SUPPORTED_FEATURE_WIFI,
CONNECTION_SUPPORTED_FEATURE_TETHERING_BLUETOOTH,
CONNECTION_SUPPORTED_FEATURE_MAX,
} connection_supported_feature_e;
-#if !defined TIZEN_TV
#define CHECK_FEATURE_SUPPORTED(...) \
do { \
int rv = _connection_check_feature_supported(__VA_ARGS__, NULL); \
- if( rv != CONNECTION_ERROR_NONE ) \
+ if (rv != CONNECTION_ERROR_NONE) \
return rv; \
- } while(0)
-#else
-#define CHECK_FEATURE_SUPPORTED(...)
-#endif
+ } while (0)
+
+#define DEPRECATED_LOG(origin, substitution) \
+ do { \
+ LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed " \
+ "from next release. Use %s() instead", origin, substitution); \
+ } while (0)
#define CONNECTION_LOG(log_level, format, args...) \
do { \
default: \
LOGI(format, ## args); \
} \
- } while(0)
+ } while (0)
#define SECURE_CONNECTION_LOG(log_level, format, args...) \
do { \
default: \
SECURE_LOGI(format, ## args); \
} \
- } while(0)
+ } while (0)
#define VCONF_TELEPHONY_DEFAULT_DATA_SERVICE \
"db/telephony/dualsim/default_data_service"
connection_type_changed_cb type_changed_callback;
connection_address_changed_cb ip_changed_callback;
connection_address_changed_cb proxy_changed_callback;
- connection_ethernet_cable_state_chaged_cb ethernet_cable_state_changed_callback;
+ connection_ethernet_cable_state_changed_cb ethernet_cable_state_changed_callback;
void *type_changed_user_data;
void *ip_changed_user_data;
void *proxy_changed_user_data;
int _connection_libnet_init(void);
bool _connection_libnet_deinit(void);
+int _connection_libnet_get_metered_state(bool* is_metered);
int _connection_libnet_get_wifi_state(connection_wifi_state_e *state);
int _connection_libnet_get_ethernet_state(connection_ethernet_state_e *state);
int _connection_libnet_get_ethernet_cable_state(connection_ethernet_cable_state_e* state);
int _connection_libnet_remove_route(const char *interface_name, const char *host_address);
int _connection_libnet_add_route_ipv6(const char *interface_name, const char *host_address, const char * gateway);
int _connection_libnet_remove_route_ipv6(const char *interface_name, const char *host_address, const char * gateway);
+int _connection_libnet_add_route_entry(connection_address_family_e address_family, const char *interface_name, const char *host_address, const char * gateway);
+int _connection_libnet_remove_route_entry(connection_address_family_e address_family, const char *interface_name, const char *host_address, const char * gateway);
void _connection_libnet_add_to_profile_list(connection_profile_h profile);
void _connection_libnet_remove_from_profile_list(connection_profile_h profile);
bool _connection_libnet_add_to_profile_cb_list(connection_profile_h profile,