From 8e5568f874f591db5e293e58cfe7ca7611977168 Mon Sep 17 00:00:00 2001 From: Witold Sowa Date: Sat, 9 Jan 2010 11:40:15 +0200 Subject: [PATCH] dbus: Change BSS, Network and some errors interface names Remove ".Interface" part from BSS and Network objects and some error names. --- doc/dbus.doxygen | 16 +++++------ wpa_supplicant/dbus/dbus_new.c | 28 +++++++++---------- wpa_supplicant/dbus/dbus_new.h | 14 +++++----- .../examples/wpas-dbus-new-getall.py | 8 +++--- .../examples/wpas-dbus-new-signals.py | 4 +-- wpa_supplicant/examples/wpas-dbus-new.py | 2 +- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/doc/dbus.doxygen b/doc/dbus.doxygen index 322d3deea..f1206c739 100644 --- a/doc/dbus.doxygen +++ b/doc/dbus.doxygen @@ -202,7 +202,7 @@ fi.w1.wpa_supplicant1.CreateInterface.

Disassociates the interface from current network.

Possible errors

-
fi.w1.wpa_supplicant1.Interface.NotConnected
+
fi.w1.wpa_supplicant1.NotConnected
Interface is not connected to any network.
@@ -239,7 +239,7 @@ fi.w1.wpa_supplicant1.CreateInterface.

Possible errors

-
fi.w1.wpa_supplicant1.Interface.NetworkUnknown
+
fi.w1.wpa_supplicant1.NetworkUnknown
A passed path doesn't point to any network object.
fi.w1.wpa_supplicant1.InvalidArgs
A passed path doesn't point to any network object.
@@ -258,7 +258,7 @@ fi.w1.wpa_supplicant1.CreateInterface.

Possible errors

-
fi.w1.wpa_supplicant1.Interface.NetworkUnknown
+
fi.w1.wpa_supplicant1.NetworkUnknown
A passed path doesn't point to any network object.
fi.w1.wpa_supplicant1.InvalidArgs
A passed path doesn't point to any network object.
@@ -277,7 +277,7 @@ fi.w1.wpa_supplicant1.CreateInterface.

Possible errors

-
fi.w1.wpa_supplicant1.Interface.BlobExists
+
fi.w1.wpa_supplicant1.BlobExists
A blob with the specified name already exists.
@@ -292,7 +292,7 @@ fi.w1.wpa_supplicant1.CreateInterface.

Possible errors

-
fi.w1.wpa_supplicant1.Interface.BlobUnknown
+
fi.w1.wpa_supplicant1.BlobUnknown
A blob with the specified name doesn't exist.
@@ -312,7 +312,7 @@ fi.w1.wpa_supplicant1.CreateInterface.

Possible errors

-
fi.w1.wpa_supplicant1.Interface.BlobUnknown
+
fi.w1.wpa_supplicant1.BlobUnknown
A blob with the specified name doesn't exist.
@@ -603,7 +603,7 @@ Interface implemented by objects related to network interface added to -\section dbus_bss fi.w1.wpa_supplicant1.Interface.BSS +\section dbus_bss fi.w1.wpa_supplicant1.BSS Interface implemented by objects representing a scanned BSSs, i.e., scan results. @@ -668,7 +668,7 @@ scan results. -\section dbus_network fi.w1.wpa_supplicant1.Interface.Network +\section dbus_network fi.w1.wpa_supplicant1.Network Interface implemented by objects representing configured networks, i.e., returned by fi.w1.wpa_supplicant1.Interface.AddNetwork. diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index 9e90629ae..9d98f95eb 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -1,7 +1,7 @@ /* * WPA Supplicant / dbus-based control interface * Copyright (c) 2006, Dan Williams and Red Hat, Inc. - * Copyright (c) 2009, Witold Sowa + * Copyright (c) 2009-2010, Witold Sowa * Copyright (c) 2009, Jouni Malinen * * This program is free software; you can redistribute it and/or modify @@ -181,7 +181,7 @@ static void wpas_dbus_signal_bss(struct wpa_supplicant *wpa_s, goto err; wpa_dbus_get_object_properties(iface, bss_obj_path, - WPAS_DBUS_NEW_IFACE_BSSID, + WPAS_DBUS_NEW_IFACE_BSS, &iter_dict); if (!wpa_dbus_dict_close_write(&iter, &iter_dict)) @@ -752,7 +752,7 @@ void wpas_dbus_bss_signal_prop_changed(struct wpa_supplicant *wpa_s, wpa_s->dbus_new_path, id); wpa_dbus_mark_property_changed(wpa_s->global->dbus, path, - WPAS_DBUS_NEW_IFACE_BSSID, prop); + WPAS_DBUS_NEW_IFACE_BSS, prop); } @@ -1096,52 +1096,52 @@ int wpas_dbus_unregister_network(struct wpa_supplicant *wpa_s, int nid) static const struct wpa_dbus_property_desc wpas_dbus_bss_properties[] = { - { "SSID", WPAS_DBUS_NEW_IFACE_BSSID, "ay", + { "SSID", WPAS_DBUS_NEW_IFACE_BSS, "ay", (WPADBusPropertyAccessor) wpas_dbus_getter_bss_ssid, NULL, R }, - { "BSSID", WPAS_DBUS_NEW_IFACE_BSSID, "ay", + { "BSSID", WPAS_DBUS_NEW_IFACE_BSS, "ay", (WPADBusPropertyAccessor) wpas_dbus_getter_bss_bssid, NULL, R }, - { "Privacy", WPAS_DBUS_NEW_IFACE_BSSID, "b", + { "Privacy", WPAS_DBUS_NEW_IFACE_BSS, "b", (WPADBusPropertyAccessor) wpas_dbus_getter_bss_privacy, NULL, R }, - { "Mode", WPAS_DBUS_NEW_IFACE_BSSID, "s", + { "Mode", WPAS_DBUS_NEW_IFACE_BSS, "s", (WPADBusPropertyAccessor) wpas_dbus_getter_bss_mode, NULL, R }, - { "Signal", WPAS_DBUS_NEW_IFACE_BSSID, "n", + { "Signal", WPAS_DBUS_NEW_IFACE_BSS, "n", (WPADBusPropertyAccessor) wpas_dbus_getter_bss_signal, NULL, R }, - { "Frequency", WPAS_DBUS_NEW_IFACE_BSSID, "q", + { "Frequency", WPAS_DBUS_NEW_IFACE_BSS, "q", (WPADBusPropertyAccessor) wpas_dbus_getter_bss_frequency, NULL, R }, - { "Rates", WPAS_DBUS_NEW_IFACE_BSSID, "au", + { "Rates", WPAS_DBUS_NEW_IFACE_BSS, "au", (WPADBusPropertyAccessor) wpas_dbus_getter_bss_rates, NULL, R }, - { "WPAIE", WPAS_DBUS_NEW_IFACE_BSSID, "ay", + { "WPAIE", WPAS_DBUS_NEW_IFACE_BSS, "ay", (WPADBusPropertyAccessor) wpas_dbus_getter_bss_wpaie, NULL, R }, - { "RSNIE", WPAS_DBUS_NEW_IFACE_BSSID, "ay", + { "RSNIE", WPAS_DBUS_NEW_IFACE_BSS, "ay", (WPADBusPropertyAccessor) wpas_dbus_getter_bss_rsnie, NULL, R }, - { "WPSIE", WPAS_DBUS_NEW_IFACE_BSSID, "ay", + { "WPSIE", WPAS_DBUS_NEW_IFACE_BSS, "ay", (WPADBusPropertyAccessor) wpas_dbus_getter_bss_wpsie, NULL, R @@ -1151,7 +1151,7 @@ static const struct wpa_dbus_property_desc wpas_dbus_bss_properties[] = { static const struct wpa_dbus_signal_desc wpas_dbus_bss_signals[] = { - { "PropertiesChanged", WPAS_DBUS_NEW_IFACE_BSSID, + { "PropertiesChanged", WPAS_DBUS_NEW_IFACE_BSS, { { "properties", "a{sv}", ARG_OUT }, END_ARGS diff --git a/wpa_supplicant/dbus/dbus_new.h b/wpa_supplicant/dbus/dbus_new.h index cc8fc6e36..e7dd796bd 100644 --- a/wpa_supplicant/dbus/dbus_new.h +++ b/wpa_supplicant/dbus/dbus_new.h @@ -1,7 +1,7 @@ /* * WPA Supplicant / dbus-based control interface * Copyright (c) 2006, Dan Williams and Red Hat, Inc. - * Copyright (c) 2009, Witold Sowa + * Copyright (c) 2009-2010, Witold Sowa * * 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 @@ -54,10 +54,10 @@ enum wpas_dbus_bss_prop { #define WPAS_DBUS_NEW_IFACE_WPS WPAS_DBUS_NEW_IFACE_INTERFACE ".WPS" #define WPAS_DBUS_NEW_NETWORKS_PART "Networks" -#define WPAS_DBUS_NEW_IFACE_NETWORK WPAS_DBUS_NEW_IFACE_INTERFACE ".Network" +#define WPAS_DBUS_NEW_IFACE_NETWORK WPAS_DBUS_NEW_INTERFACE ".Network" #define WPAS_DBUS_NEW_BSSIDS_PART "BSSs" -#define WPAS_DBUS_NEW_IFACE_BSSID WPAS_DBUS_NEW_IFACE_INTERFACE ".BSS" +#define WPAS_DBUS_NEW_IFACE_BSS WPAS_DBUS_NEW_INTERFACE ".BSS" /* Errors */ @@ -72,14 +72,14 @@ enum wpas_dbus_bss_prop { WPAS_DBUS_NEW_INTERFACE ".InterfaceUnknown" #define WPAS_DBUS_ERROR_NOT_CONNECTED \ - WPAS_DBUS_NEW_IFACE_INTERFACE ".NotConnected" + WPAS_DBUS_NEW_INTERFACE ".NotConnected" #define WPAS_DBUS_ERROR_NETWORK_UNKNOWN \ - WPAS_DBUS_NEW_IFACE_INTERFACE ".NetworkUnknown" + WPAS_DBUS_NEW_INTERFACE ".NetworkUnknown" #define WPAS_DBUS_ERROR_BLOB_EXISTS \ - WPAS_DBUS_NEW_IFACE_INTERFACE ".BlobExists" + WPAS_DBUS_NEW_INTERFACE ".BlobExists" #define WPAS_DBUS_ERROR_BLOB_UNKNOWN \ - WPAS_DBUS_NEW_IFACE_INTERFACE ".BlobUnknown" + WPAS_DBUS_NEW_INTERFACE ".BlobUnknown" #ifdef CONFIG_CTRL_IFACE_DBUS_NEW diff --git a/wpa_supplicant/examples/wpas-dbus-new-getall.py b/wpa_supplicant/examples/wpas-dbus-new-getall.py index e26d0cdff..03da187c8 100755 --- a/wpa_supplicant/examples/wpas-dbus-new-getall.py +++ b/wpa_supplicant/examples/wpas-dbus-new-getall.py @@ -38,20 +38,20 @@ def main(): dbus_interface=dbus.PROPERTIES_IFACE) if len(res) > 0: bss_obj = bus.get_object("fi.w1.wpa_supplicant1", res[0]) - props = bss_obj.GetAll("fi.w1.wpa_supplicant1.Interface.BSS", + props = bss_obj.GetAll("fi.w1.wpa_supplicant1.BSS", dbus_interface=dbus.PROPERTIES_IFACE) print - print "GetAll(fi.w1.wpa_supplicant1.Interface.BSS, %s):" % (res[0]) + print "GetAll(fi.w1.wpa_supplicant1.BSS, %s):" % (res[0]) print props res = if_obj.Get("fi.w1.wpa_supplicant1.Interface", 'Networks', dbus_interface=dbus.PROPERTIES_IFACE) if len(res) > 0: net_obj = bus.get_object("fi.w1.wpa_supplicant1", res[0]) - props = net_obj.GetAll("fi.w1.wpa_supplicant1.Interface.Network", + props = net_obj.GetAll("fi.w1.wpa_supplicant1.Network", dbus_interface=dbus.PROPERTIES_IFACE) print - print "GetAll(fi.w1.wpa_supplicant1.Interface.Network, %s):" % (res[0]) + print "GetAll(fi.w1.wpa_supplicant1.Network, %s):" % (res[0]) print props if __name__ == "__main__": diff --git a/wpa_supplicant/examples/wpas-dbus-new-signals.py b/wpa_supplicant/examples/wpas-dbus-new-signals.py index bf0586950..b040e0a60 100755 --- a/wpa_supplicant/examples/wpas-dbus-new-signals.py +++ b/wpa_supplicant/examples/wpas-dbus-new-signals.py @@ -12,8 +12,8 @@ WPAS_DBUS_OPATH = "/fi/w1/wpa_supplicant1" WPAS_DBUS_INTERFACES_INTERFACE = "fi.w1.wpa_supplicant1.Interface" WPAS_DBUS_INTERFACES_OPATH = "/fi/w1/wpa_supplicant1/Interfaces" -WPAS_DBUS_BSS_INTERFACE = "fi.w1.wpa_supplicant1.Interface.BSS" -WPAS_DBUS_NETWORK_INTERFACE = "fi.w1.wpa_supplicant1.Interface.Network" +WPAS_DBUS_BSS_INTERFACE = "fi.w1.wpa_supplicant1.BSS" +WPAS_DBUS_NETWORK_INTERFACE = "fi.w1.wpa_supplicant1.Network" def byte_array_to_string(s): import urllib diff --git a/wpa_supplicant/examples/wpas-dbus-new.py b/wpa_supplicant/examples/wpas-dbus-new.py index ec789d128..bff6b3977 100755 --- a/wpa_supplicant/examples/wpas-dbus-new.py +++ b/wpa_supplicant/examples/wpas-dbus-new.py @@ -12,7 +12,7 @@ WPAS_DBUS_OPATH = "/fi/w1/wpa_supplicant1" WPAS_DBUS_INTERFACES_INTERFACE = "fi.w1.wpa_supplicant1.Interface" WPAS_DBUS_INTERFACES_OPATH = "/fi/w1/wpa_supplicant1/Interfaces" -WPAS_DBUS_BSS_INTERFACE = "fi.w1.wpa_supplicant1.Interface.BSS" +WPAS_DBUS_BSS_INTERFACE = "fi.w1.wpa_supplicant1.BSS" def byte_array_to_string(s): import urllib