Merge tag 'upstream/1.40' into tizen.
[platform/upstream/connman.git] / include / service.h
old mode 100644 (file)
new mode 100755 (executable)
index 8f6b36b..041949f
 
 #include <stdbool.h>
 
+#if defined TIZEN_EXT
+#include <glib.h>
+#include <gdbus.h>
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -45,8 +50,15 @@ enum connman_service_type {
        CONNMAN_SERVICE_TYPE_VPN       = 7,
        CONNMAN_SERVICE_TYPE_GADGET    = 8,
        CONNMAN_SERVICE_TYPE_P2P       = 9,
+#if defined TIZEN_EXT_WIFI_MESH
+       CONNMAN_SERVICE_TYPE_MESH      = 10,
+#endif
 };
+#if defined TIZEN_EXT_WIFI_MESH
+#define        MAX_CONNMAN_SERVICE_TYPES        11
+#else
 #define        MAX_CONNMAN_SERVICE_TYPES        10
+#endif
 
 
 enum connman_service_security {
@@ -57,6 +69,14 @@ enum connman_service_security {
        CONNMAN_SERVICE_SECURITY_8021X   = 4,
        CONNMAN_SERVICE_SECURITY_WPA     = 8,
        CONNMAN_SERVICE_SECURITY_RSN     = 9,
+#if defined TIZEN_EXT
+       CONNMAN_SERVICE_SECURITY_SAE     = 10,
+       CONNMAN_SERVICE_SECURITY_OWE     = 11,
+       CONNMAN_SERVICE_SECURITY_DPP     = 12,
+#endif
+#if defined TIZEN_EXT
+       CONNMAN_SERVICE_SECURITY_MAX
+#endif
 };
 
 enum connman_service_state {
@@ -80,6 +100,9 @@ enum connman_service_error {
        CONNMAN_SERVICE_ERROR_AUTH_FAILED    = 6,
        CONNMAN_SERVICE_ERROR_INVALID_KEY    = 7,
        CONNMAN_SERVICE_ERROR_BLOCKED        = 8,
+#if defined TIZEN_EXT
+       CONNMAN_SERVICE_ERROR_ASSOC_FAILED   = 9,
+#endif
 };
 
 enum connman_service_proxy_method {
@@ -150,6 +173,53 @@ void connman_service_create_ip4config(struct connman_service *service,
 void connman_service_create_ip6config(struct connman_service *service,
                                                                int index);
 
+#if defined TIZEN_EXT
+/*
+ * Description: TIZEN implements system global connection management.
+ *              It's only for PDP (cellular) bearer. Wi-Fi is managed by ConnMan automatically.
+ *              Reference count can help to manage open/close connection requests by each application.
+ */
+
+/*
+ * Increase reference count of user-initiated packet data network connection
+ */
+void connman_service_user_pdn_connection_ref(struct connman_service *service);
+
+/*
+ * Decrease reference count of user initiated packet data network connection
+ * and return TRUE if counter is zero.
+ */
+gboolean connman_service_user_pdn_connection_unref_and_test(
+                                       struct connman_service *service);
+
+/*
+ * Test reference count of user initiated packet data network connection
+ * and return TRUE if counter is zero. No impact to reference count
+ */
+gboolean connman_service_is_no_ref_user_pdn_connection(
+                                       struct connman_service *service);
+
+struct connman_service *connman_service_get_default_connection(void);
+struct connman_service *connman_service_get_connected_service(const char *ifname);
+
+/*
+ * Description: telephony plug-in requires manual PROXY setting
+ */
+int connman_service_set_proxy(struct connman_service *service,
+                                       const char *proxy, gboolean active);
+
+void connman_service_set_disconnection_requested(struct connman_service *service,
+                                                bool disconnection_requested);
+#endif
+
+#if defined TIZEN_EXT
+void connman_service_set_internet_connection(struct connman_service *service,
+                                                       bool internet_connection);
+bool connman_service_get_internet_connection(struct connman_service *service);
+DBusMessage *connman_service_create_dbus_service_reply(DBusMessage *msg,
+                                                       struct connman_service *service);
+#endif
+
 #ifdef __cplusplus
 }
 #endif