extern void connman_iface_indicate_carrier_off(struct connman_iface *iface);
extern void connman_iface_indicate_configured(struct connman_iface *iface);
+extern void connman_iface_indicate_station(struct connman_iface *iface,
+ const char *name, int strength);
+
extern int connman_iface_get_ipv4(struct connman_iface *iface,
struct connman_ipv4 *ipv4);
extern int connman_iface_set_ipv4(struct connman_iface *iface,
if (station == NULL)
return;
- if (station->name)
- connman_iface_indicate_station(iface, station->name);
+ if (station->name == NULL)
+ return;
+
+ connman_iface_indicate_station(iface, station->name, station->qual);
}
static struct station_data *create_station(struct iface_data *iface,
}
}
-static void append_station(DBusMessage *reply, const char *name)
+static void append_station(DBusMessage *reply, const char *name, int signal)
{
DBusMessageIter array, dict;
DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
append_entry(&dict, "ESSID", DBUS_TYPE_STRING, &name);
+ append_entry(&dict, "Signal", DBUS_TYPE_UINT16, &signal);
dbus_message_iter_close_container(&array, &dict);
}
void connman_iface_indicate_station(struct connman_iface *iface,
- const char *name)
+ const char *name, int strength)
{
DBusMessage *signal;
if (signal == NULL)
return;
- append_station(signal, name);
+ append_station(signal, name, strength);
dbus_connection_send(connection, signal, NULL);
dbus_message_unref(signal);