service: Clean up append_nameservers() helper function
[framework/connectivity/connman.git] / src / technology.c
index 5b1de9e..2edb48f 100644 (file)
@@ -831,7 +831,7 @@ void __connman_technology_scan_stopped(struct connman_device *device)
                if (__connman_device_get_service_type(other_device) != type)
                        continue;
 
-               if (__connman_device_scanning(other_device))
+               if (connman_device_get_scanning(other_device) == TRUE)
                        count += 1;
        }
 
@@ -859,16 +859,19 @@ static DBusMessage *scan(DBusConnection *conn, DBusMessage *msg, void *data)
 }
 
 static const GDBusMethodTable technology_methods[] = {
-       { "GetProperties", "",   "a{sv}", get_properties,
-                                               G_DBUS_METHOD_FLAG_DEPRECATED },
-       { "SetProperty",   "sv", "",      set_property   },
-       { "Scan",          "",    "",     scan,
-                                               G_DBUS_METHOD_FLAG_ASYNC },
+       { GDBUS_DEPRECATED_METHOD("GetProperties",
+                       NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+                       get_properties) },
+       { GDBUS_METHOD("SetProperty",
+                       GDBUS_ARGS({ "name", "s" }, { "value", "v" }),
+                       NULL, set_property) },
+       { GDBUS_ASYNC_METHOD("Scan", NULL, NULL, scan) },
        { },
 };
 
-static GDBusSignalTable technology_signals[] = {
-       { "PropertyChanged", "sv" },
+static const GDBusSignalTable technology_signals[] = {
+       { GDBUS_SIGNAL("PropertyChanged",
+                       GDBUS_ARGS({ "name", "s" }, { "value", "v" })) },
        { },
 };
 
@@ -1098,7 +1101,7 @@ int __connman_technology_remove_device(struct connman_device *device)
                return -ENXIO;
        }
 
-       if (__connman_device_scanning(device))
+       if (connman_device_get_scanning(device) == TRUE)
                __connman_technology_scan_stopped(device);
 
        technology->device_list = g_slist_remove(technology->device_list,