[PATCH] dbus: Change BSS, Network and some errors interface names

Witold Sowa witold.sowa
Wed Jan 6 12:02:06 PST 2010


I didn't turn off line wrapping. sorry. 

Remove ".Interface" part from BSS and Network objects and some
errors interface names.
---
 doc/dbus.doxygen                                |   16 ++++++------
 wpa_supplicant/dbus/dbus_new.c                  |   28 +++++++++++-----------
 wpa_supplicant/dbus/dbus_new.h                  |   22 +++++++++---------
 wpa_supplicant/examples/wpas-dbus-new-getall.py |    8 +++---
 wpa_supplicant/examples/wpas-dbus-new.py        |    2 +-
 5 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/doc/dbus.doxygen b/doc/dbus.doxygen
index 322d3de..f1206c7 100644
--- a/doc/dbus.doxygen
+++ b/doc/dbus.doxygen
@@ -202,7 +202,7 @@ fi.w1.wpa_supplicant1.CreateInterface.
 	<p>Disassociates the interface from current network.</p>
 	<h4>Possible errors</h4>
 	<dl>
-	  <dt>fi.w1.wpa_supplicant1.Interface.NotConnected</dt>
+	  <dt>fi.w1.wpa_supplicant1.NotConnected</dt>
 	  <dd>Interface is not connected to any network.</dd>
 	</dl>
       </li>
@@ -239,7 +239,7 @@ fi.w1.wpa_supplicant1.CreateInterface.
 	</dl>
 	<h4>Possible errors</h4>
 	<dl>
-	  <dt>fi.w1.wpa_supplicant1.Interface.NetworkUnknown</dt>
+	  <dt>fi.w1.wpa_supplicant1.NetworkUnknown</dt>
 	  <dd>A passed path doesn't point to any network object.</dd>
 	  <dt>fi.w1.wpa_supplicant1.InvalidArgs</dt>
 	  <dd>A passed path doesn't point to any network object.</dd>
@@ -258,7 +258,7 @@ fi.w1.wpa_supplicant1.CreateInterface.
 	</dl>
 	<h4>Possible errors</h4>
 	<dl>
-	  <dt>fi.w1.wpa_supplicant1.Interface.NetworkUnknown</dt>
+	  <dt>fi.w1.wpa_supplicant1.NetworkUnknown</dt>
 	  <dd>A passed path doesn't point to any network object.</dd>
 	  <dt>fi.w1.wpa_supplicant1.InvalidArgs</dt>
 	  <dd>A passed path doesn't point to any network object.</dd>
@@ -277,7 +277,7 @@ fi.w1.wpa_supplicant1.CreateInterface.
 	</dl>
 	<h4>Possible errors</h4>
 	<dl>
-	  <dt>fi.w1.wpa_supplicant1.Interface.BlobExists</dt>
+	  <dt>fi.w1.wpa_supplicant1.BlobExists</dt>
 	  <dd>A blob with the specified name already exists.</dd>
 	</dl>
       </li>
@@ -292,7 +292,7 @@ fi.w1.wpa_supplicant1.CreateInterface.
 	</dl>
 	<h4>Possible errors</h4>
 	<dl>
-	  <dt>fi.w1.wpa_supplicant1.Interface.BlobUnknown</dt>
+	  <dt>fi.w1.wpa_supplicant1.BlobUnknown</dt>
 	  <dd>A blob with the specified name doesn't exist.</dd>
 	</dl>
       </li>
@@ -312,7 +312,7 @@ fi.w1.wpa_supplicant1.CreateInterface.
 	</dl>
 	<h4>Possible errors</h4>
 	<dl>
-	  <dt>fi.w1.wpa_supplicant1.Interface.BlobUnknown</dt>
+	  <dt>fi.w1.wpa_supplicant1.BlobUnknown</dt>
 	  <dd>A blob with the specified name doesn't exist.</dd>
 	</dl>
       </li>
@@ -603,7 +603,7 @@ Interface implemented by objects related to network interface added to
     </ul>
 
 
-\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.
     </ul>
 
 
-\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 05e6936..b0776b6 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 <dcbw at redhat.com> and Red Hat, Inc.
- * Copyright (c) 2009, Witold Sowa <witold.sowa at gmail.com>
+ * Copyright (c) 2009-2010, Witold Sowa <witold.sowa at gmail.com>
  * Copyright (c) 2009, Jouni Malinen <j at w1.fi>
  *
  * 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);
 }
 
 
@@ -1095,52 +1095,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
@@ -1150,7 +1150,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 cc8fc6e..b196001 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 <dcbw at redhat.com> and Red Hat, Inc.
- * Copyright (c) 2009, Witold Sowa <witold.sowa at gmail.com>
+ * Copyright (c) 2009 - 2010, Witold Sowa <witold.sowa at gmail.com>
  *
  * 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
@@ -47,17 +47,17 @@ enum wpas_dbus_bss_prop {
 
 #define WPAS_DBUS_NEW_SERVICE		"fi.w1.wpa_supplicant1"
 #define WPAS_DBUS_NEW_PATH		"/fi/w1/wpa_supplicant1"
-#define WPAS_DBUS_NEW_INTERFACE		"fi.w1.wpa_supplicant1"
+#define WPAS_DBUS_NEW_INTERFACE	"fi.w1.wpa_supplicant1"
 
 #define WPAS_DBUS_NEW_PATH_INTERFACES	WPAS_DBUS_NEW_PATH "/Interfaces"
 #define WPAS_DBUS_NEW_IFACE_INTERFACE	WPAS_DBUS_NEW_INTERFACE ".Interface"
-#define WPAS_DBUS_NEW_IFACE_WPS WPAS_DBUS_NEW_IFACE_INTERFACE ".WPS"
+#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_NETWORKS_PART	"Networks"
+#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_BSSIDS_PART	"BSSs"
+#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 e26d0cd..03da187 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.py b/wpa_supplicant/examples/wpas-dbus-new.py
index ec789d1..bff6b39 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
-- 
1.6.0.2



More information about the Hostap mailing list