e/connman: Add strength property

SVN revision: 76044
This commit is contained in:
Lucas De Marchi 2012-09-03 21:59:20 +00:00
parent 6237df554b
commit 0ba8b9e95b
3 changed files with 11 additions and 0 deletions

View File

@ -60,6 +60,7 @@ struct Connman_Service
char *name;
enum Connman_State state;
enum Connman_Service_Type type;
uint8_t strength;
};
/* Ecore Events */

View File

@ -137,6 +137,13 @@ static void _service_parse_prop_changed(struct Connman_Service *cs,
cs->type = str_to_type(type);
DBG("New type: %s %d", type, cs->type);
}
else if (strcmp(prop_name, "Strength") == 0)
{
uint8_t strength;
dbus_message_iter_get_basic(value, &strength);
cs->strength = strength;
DBG("New strength: %d", strength);;
}
}
static void _service_prop_dict_changed(struct Connman_Service *cs,

View File

@ -46,6 +46,9 @@ static Evas_Object * _econnman_service_new_icon(struct Connman_Service *cs,
edje_object_signal_emit(icon, buf, "e");
}
msg.val = cs->strength;
edje_object_message_send(icon, EDJE_MESSAGE_INT, 1, &msg);
return icon;
}