CONNECTION_SUPPORTED_FEATURE_MAX,
} connection_supported_feature_e;
+#define CONN_LOCK \
+ do { \
+ _connection_lock(); \
+ } while(0)
+
+#define CONN_UNLOCK \
+ do { \
+ _connection_unlock(); \
+ } while(0)
+
#define CHECK_FEATURE_SUPPORTED(...) \
do { \
int rv = _connection_check_feature_supported(__VA_ARGS__, NULL); \
- if (rv != CONNECTION_ERROR_NONE) \
+ if (rv != CONNECTION_ERROR_NONE) { \
+ CONN_UNLOCK; \
return rv; \
+ } \
} while (0)
#define DEPRECATED_LOG(origin, substitution) \
connection_type_changed_cb type_changed_callback;
connection_address_changed_cb ip_changed_callback;
connection_address_changed_cb proxy_changed_callback;
+ connection_internet_state_changed_cb internet_state_changed_callback;
connection_ethernet_cable_state_changed_cb ethernet_cable_state_changed_callback;
connection_set_default_cb set_default_callback;
connection_opened_cb opened_callback;
void *type_changed_user_data;
void *ip_changed_user_data;
void *proxy_changed_user_data;
+ void *internet_state_changed_user_data;
void *ethernet_cable_state_changed_user_data;
void *set_default_user_data;
void *opened_user_data;
} connection_handle_s;
int _connection_libnet_init(connection_handle_s *conn_handle);
-bool _connection_libnet_deinit(connection_handle_s *conn_handle);
+bool _connection_libnet_deinit(connection_handle_s *conn_handle, bool is_empty);
void _connection_set_cs_tid(int tid, connection_handle_s *conn_handle);
void _connection_unset_cs_tid(int tid, connection_handle_s *conn_handle);
int _connection_libnet_get_metered_state(connection_handle_s *conn_handle, bool* is_metered);
int _connection_libnet_get_tcpdump_state(connection_handle_s *conn_handle,
gboolean *tcpdump_state);
+void _connection_lock(void);
+void _connection_unlock(void);
+
bool _connection_check_handle_validity(connection_h connection);
#ifdef __cplusplus
}