-extern struct connman_device *connman_device_ref(struct connman_device *device);
-extern void connman_device_unref(struct connman_device *device);
-
-extern const char *connman_device_get_name(struct connman_device *device);
-extern const char *connman_device_get_path(struct connman_device *device);
-extern void connman_device_set_index(struct connman_device *device,
- int index);
-extern int connman_device_get_index(struct connman_device *device);
-extern void connman_device_set_interface(struct connman_device *device,
- const char *interface);
-extern const char *connman_device_get_interface(struct connman_device *device);
-
-extern void connman_device_set_policy(struct connman_device *device,
- enum connman_device_policy policy);
-extern void connman_device_set_mode(struct connman_device *device,
- enum connman_device_mode mode);
-extern enum connman_device_mode connman_device_get_mode(struct connman_device *device);
-
-extern int connman_device_set_powered(struct connman_device *device,
- connman_bool_t powered);
-extern int connman_device_set_carrier(struct connman_device *device,
- connman_bool_t carrier);
-extern int connman_device_set_scanning(struct connman_device *device,
- connman_bool_t scanning);
-extern int connman_device_set_disconnected(struct connman_device *device,
- connman_bool_t disconnected);
-
-extern int connman_device_set_string(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);
+int connman_device_get_index(struct connman_device *device);
+void connman_device_set_interface(struct connman_device *device,
+ const char *interface);
+
+void connman_device_set_ident(struct connman_device *device,
+ const char *ident);
+const char *connman_device_get_ident(struct connman_device *device);
+
+int connman_device_set_powered(struct connman_device *device,
+ bool powered);
+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,
+ enum connman_service_type type);
+void connman_device_reset_scanning(struct connman_device *device);
+
+int connman_device_set_string(struct connman_device *device,