diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-31 09:07:53 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-31 09:07:53 +0100 |
commit | c9fb635620bd63ed64b9af6d61828cbc7592971c (patch) | |
tree | a0765ae02eb05f50b7ed509b1384c0967385a20d | |
parent | e6de96640ddfad332fa033f98863644c83343c4a (diff) | |
download | connman-c9fb635620bd63ed64b9af6d61828cbc7592971c.tar.gz connman-c9fb635620bd63ed64b9af6d61828cbc7592971c.tar.bz2 connman-c9fb635620bd63ed64b9af6d61828cbc7592971c.zip |
Add Interface property for connections
-rw-r--r-- | doc/connection-api.txt | 7 | ||||
-rw-r--r-- | src/element.c | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/doc/connection-api.txt b/doc/connection-api.txt index c39c6d29..a0c97da3 100644 --- a/doc/connection-api.txt +++ b/doc/connection-api.txt @@ -21,6 +21,13 @@ Properties string Type [readonly] The connection type (for example wifi etc.) + string Interface [readonly] + + The connection interface (for example "eth0" etc.) + + This value is for pure informational purposes. It + is not guaranteed that it is always present. + uint8 Strength [readonly] Indicates the signal strength of the connection. diff --git a/src/element.c b/src/element.c index 5e795899..0271107f 100644 --- a/src/element.c +++ b/src/element.c @@ -539,6 +539,10 @@ static DBusMessage *connection_get_properties(DBusConnection *conn, connman_dbus_dict_append_variant(&dict, "Type", DBUS_TYPE_STRING, &str); + if (element->devname != NULL) + connman_dbus_dict_append_variant(&dict, "Interface", + DBUS_TYPE_STRING, &element->devname); + if (element->subtype == CONNMAN_ELEMENT_SUBTYPE_WIFI || element->subtype == CONNMAN_ELEMENT_SUBTYPE_WIMAX) connman_dbus_dict_append_variant(&dict, "Strength", |