dnsproxy: Only one copy of the relevant buffers will be made to a TCP request
[framework/connectivity/connman.git] / include / device.h
index 5cb34d7..f787cf4 100644 (file)
@@ -2,7 +2,7 @@
  *
  *  Connection Manager
  *
- *  Copyright (C) 2007-2010  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2007-2012  Intel Corporation. All rights reserved.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
@@ -55,8 +55,18 @@ struct connman_device;
 
 struct connman_device *connman_device_create(const char *node,
                                                enum connman_device_type type);
-struct connman_device *connman_device_ref(struct connman_device *device);
-void connman_device_unref(struct connman_device *device);
+
+#define connman_device_ref(device) \
+       connman_device_ref_debug(device, __FILE__, __LINE__, __func__)
+
+#define connman_device_unref(device) \
+       connman_device_unref_debug(device, __FILE__, __LINE__, __func__)
+
+struct connman_device *
+connman_device_ref_debug(struct connman_device *device,
+                       const char *file, int line, const char *caller);
+void connman_device_unref_debug(struct connman_device *device,
+                       const char *file, int line, const char *caller);
 
 enum connman_device_type connman_device_get_type(struct connman_device *device);
 void connman_device_set_index(struct connman_device *device, int index);
@@ -72,13 +82,12 @@ int connman_device_set_powered(struct connman_device *device,
                                                connman_bool_t powered);
 int connman_device_set_scanning(struct connman_device *device,
                                                connman_bool_t scanning);
+connman_bool_t connman_device_get_scanning(struct connman_device *device);
 void connman_device_reset_scanning(struct connman_device *device);
 
 int connman_device_set_disconnected(struct connman_device *device,
                                                connman_bool_t disconnected);
 connman_bool_t connman_device_get_disconnected(struct connman_device *device);
-int connman_device_set_connected(struct connman_device *device,
-                                               connman_bool_t connected);
 
 int connman_device_set_string(struct connman_device *device,
                                        const char *key, const char *value);
@@ -90,11 +99,9 @@ int connman_device_add_network(struct connman_device *device,
 struct connman_network *connman_device_get_network(struct connman_device *device,
                                                        const char *identifier);
 int connman_device_remove_network(struct connman_device *device,
-                                                       const char *identifier);
+                                       struct connman_network *network);
 void connman_device_remove_all_networks(struct connman_device *device);
 
-void connman_device_schedule_scan(struct connman_device *device);
-
 int connman_device_register(struct connman_device *device);
 void connman_device_unregister(struct connman_device *device);
 
@@ -110,6 +117,11 @@ struct connman_device_driver {
        int (*enable) (struct connman_device *device);
        int (*disable) (struct connman_device *device);
        int (*scan) (struct connman_device *device);
+       int (*scan_fast) (struct connman_device *device);
+       int (*scan_hidden)(struct connman_device *device,
+                       const char *ssid, unsigned int ssid_len,
+                       const char *identity, const char* passphrase,
+                       void *user_data);
 };
 
 int connman_device_driver_register(struct connman_device_driver *driver);