DA: Add exception check for time logic
[platform/upstream/connman.git] / include / device.h
index 57b925c..8cc8cce 100755 (executable)
@@ -50,6 +50,17 @@ enum connman_device_type {
 #define CONNMAN_DEVICE_PRIORITY_DEFAULT     0
 #define CONNMAN_DEVICE_PRIORITY_HIGH      100
 
+struct connman_device_scan_params {
+       enum connman_service_type type;
+       const char *ssid;
+       unsigned int ssid_len;
+       const char *identity;
+       const char* passphrase;
+       const char *security;
+       bool force_full_scan;
+       void *user_data;
+};
+
 struct connman_device;
 
 struct connman_device *connman_device_create(const char *node,
@@ -82,13 +93,10 @@ int connman_device_set_powered(struct connman_device *device,
 bool connman_device_get_powered(struct connman_device *device);
 int connman_device_set_scanning(struct connman_device *device,
                                enum connman_service_type type, bool scanning);
-bool connman_device_get_scanning(struct connman_device *device);
+bool connman_device_get_scanning(struct connman_device *device,
+                               enum connman_service_type type);
 void connman_device_reset_scanning(struct connman_device *device);
 
-int connman_device_set_disconnected(struct connman_device *device,
-                                               bool disconnected);
-bool connman_device_get_disconnected(struct connman_device *device);
-
 int connman_device_set_string(struct connman_device *device,
                                        const char *key, const char *value);
 const char *connman_device_get_string(struct connman_device *device,
@@ -98,6 +106,20 @@ int connman_device_add_network(struct connman_device *device,
                                        struct connman_network *network);
 struct connman_network *connman_device_get_network(struct connman_device *device,
                                                        const char *identifier);
+#if defined TIZEN_EXT
+struct connman_network *connman_device_get_default_network(
+                                                       struct connman_device *device);
+void connman_device_set_pending_reply(struct connman_device *device,
+                                                       DBusMessage *msg);
+void connman_device_send_connected_signal(struct connman_device *device,
+                                                       bool connected);
+void connman_device_set_max_scan_ssids(struct connman_device *device,
+                                                       int max_scan_ssids);
+int connman_device_get_max_scan_ssids(struct connman_device *device);
+void connman_device_set_wifi_5ghz_supported(struct connman_device *device,
+                                                       bool is_5_0_ghz_supported);
+bool connman_device_get_wifi_5ghz_supported(struct connman_device *device);
+#endif
 int connman_device_remove_network(struct connman_device *device,
                                        struct connman_network *network);
 
@@ -115,6 +137,38 @@ struct connman_device *connman_device_create_from_index(int index);
 struct connman_device *connman_device_find_by_index(int index);
 int connman_device_reconnect_service(struct connman_device *device);
 
+#if defined TIZEN_EXT
+bool connman_device_set_last_user_selection_time(struct connman_device *device,
+                                               time_t time);
+time_t connman_device_get_last_user_selection_time(struct connman_device *device);
+bool connman_device_set_last_user_selection_ident(struct connman_device *device,
+                                               const char *ident);
+const char *connman_device_get_last_user_selection_ident(struct connman_device *device);
+bool connman_device_set_last_connected_ident(struct connman_device *device,
+                                               const char *ident);
+const char *connman_device_get_last_connected_ident(struct connman_device *device);
+void connman_device_save_last_user_selection(struct connman_device *device);
+void connman_device_load_last_user_selection(struct connman_device *device);
+void connman_device_save_last_connected(struct connman_device *device);
+void connman_device_load_last_connected(struct connman_device *device);
+
+void connman_device_mac_policy_notify(struct connman_device *device,
+                                       int result, unsigned int policy);
+int connman_device_set_mac_policy(struct connman_device *device,
+                                               unsigned int policy);
+unsigned int connman_device_get_mac_policy(struct connman_device *device);
+void connman_device_preassoc_mac_policy_notify(struct connman_device *device,
+                                       int result, unsigned int policy);
+int connman_device_set_preassoc_mac_policy(struct connman_device *device,
+                                               unsigned int policy);
+unsigned int connman_device_get_preassoc_mac_policy(struct connman_device *device);
+void connman_device_random_mac_lifetime_notify(struct connman_device *device,
+                                       int result, unsigned int lifetime);
+int connman_device_set_random_mac_lifetime(struct connman_device *device,
+                                               unsigned int lifetime);
+unsigned int connman_device_get_random_mac_lifetime(struct connman_device *device);
+#endif
+
 struct connman_device_driver {
        const char *name;
        enum connman_device_type type;
@@ -123,13 +177,27 @@ struct connman_device_driver {
        void (*remove) (struct connman_device *device);
        int (*enable) (struct connman_device *device);
        int (*disable) (struct connman_device *device);
-       int (*scan)(enum connman_service_type type,
-                       struct connman_device *device,
-                       const char *ssid, unsigned int ssid_len,
-                       const char *identity, const char* passphrase,
-                       const char *security, void *user_data);
+       int (*scan)(struct connman_device *device,
+                       struct connman_device_scan_params *params);
+       void (*stop_scan) (enum connman_service_type type,
+                       struct connman_device *device);
        int (*set_regdom) (struct connman_device *device,
                                                const char *alpha2);
+#if defined TIZEN_EXT
+       int (*specific_scan) (enum connman_service_type type,
+                       struct connman_device *device, int scan_type,
+                       GSList *specific_scan_list, void *user_data);
+       int (*set_mac_policy) (struct connman_device *device, unsigned int policy);
+       int (*set_preassoc_mac_policy) (struct connman_device *device, unsigned int policy);
+       int (*set_random_mac_lifetime) (struct connman_device *device, unsigned int lifetime);
+#endif
+#if defined TIZEN_EXT_WIFI_MESH
+       int (*abort_scan) (enum connman_service_type type,
+                                               struct connman_device *device);
+       int (*mesh_specific_scan) (enum connman_service_type type,
+                       struct connman_device *device, const char *ssid, unsigned int freq,
+                       void *user_data);
+#endif
 };
 
 int connman_device_driver_register(struct connman_device_driver *driver);