summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-17 21:53:04 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-17 21:53:04 +0100
commit6e8f721b4b86da751efcdbfdec4ccf526f1cba34 (patch)
tree62c672f3f203ae480e268c0bb37a1cea978b2ca6
parent8a903a3696cc93c7828bea9f098896ca9c410418 (diff)
downloadconnman-6e8f721b4b86da751efcdbfdec4ccf526f1cba34.tar.gz
connman-6e8f721b4b86da751efcdbfdec4ccf526f1cba34.tar.bz2
connman-6e8f721b4b86da751efcdbfdec4ccf526f1cba34.zip
Add Device property to network objects
-rw-r--r--doc/network-api.txt5
-rw-r--r--src/element.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/doc/network-api.txt b/doc/network-api.txt
index b38e1223..ce487dd1 100644
--- a/doc/network-api.txt
+++ b/doc/network-api.txt
@@ -55,6 +55,11 @@ Properties string Name [readonly]
Indicates the signal strength of the network.
+ object Device [readonly]
+
+ The object path of the device this networks
+ belongs to.
+
array{byte} WiFi.SSID [readonly]
If the network type is WiFi, then this property is
diff --git a/src/element.c b/src/element.c
index c2cf05f7..6c07046f 100644
--- a/src/element.c
+++ b/src/element.c
@@ -696,6 +696,10 @@ static DBusMessage *network_get_properties(DBusConnection *conn,
DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
+ if (element->parent)
+ connman_dbus_dict_append_variant(&dict, "Device",
+ DBUS_TYPE_OBJECT_PATH, &element->parent->path);
+
str = __connman_element_policy2string(element->policy);
if (str != NULL)
connman_dbus_dict_append_variant(&dict, "Policy",