mirror of git://git.sysmocom.de/ofono
sim: Emit PropertyChanged for ActiveCardSlot changes
This commit is contained in:
parent
693396da22
commit
ab4e5d0852
|
@ -671,6 +671,8 @@ static gboolean set_own_numbers(struct ofono_sim *sim,
|
||||||
static void sim_set_slot_callback(const struct ofono_error *error, void *data)
|
static void sim_set_slot_callback(const struct ofono_error *error, void *data)
|
||||||
{
|
{
|
||||||
struct ofono_sim *sim = data;
|
struct ofono_sim *sim = data;
|
||||||
|
DBusConnection *conn = ofono_dbus_get_connection();
|
||||||
|
const char *path = __ofono_atom_get_path(sim->atom);
|
||||||
DBusMessage *reply;
|
DBusMessage *reply;
|
||||||
|
|
||||||
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
|
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
|
||||||
|
@ -688,6 +690,12 @@ static void sim_set_slot_callback(const struct ofono_error *error, void *data)
|
||||||
|
|
||||||
reply = dbus_message_new_method_return(sim->pending);
|
reply = dbus_message_new_method_return(sim->pending);
|
||||||
__ofono_dbus_pending_reply(&sim->pending, reply);
|
__ofono_dbus_pending_reply(&sim->pending, reply);
|
||||||
|
|
||||||
|
ofono_dbus_signal_property_changed(conn, path,
|
||||||
|
OFONO_SIM_MANAGER_INTERFACE,
|
||||||
|
"ActiveCardSlot",
|
||||||
|
DBUS_TYPE_UINT32,
|
||||||
|
&sim->active_card_slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DBusMessage *sim_set_property(DBusConnection *conn, DBusMessage *msg,
|
static DBusMessage *sim_set_property(DBusConnection *conn, DBusMessage *msg,
|
||||||
|
|
Loading…
Reference in New Issue