diff options
author | Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com> | 2012-02-06 14:33:58 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-02-22 06:56:58 -0600 |
commit | 69453afe9eeb2eba2024cd1792d25b5da61a439f (patch) | |
tree | 1a24535e1c90c10fdacb8215d3182fba919e2058 /src | |
parent | 0dc3515af468e23bfc0e934ed94c7ca23c06fde9 (diff) |
call-forwarding: Emit signals when cfu is toggled
Emit signals to mask/unmask conditional cfs on cfu
activation/deactivation.
Diffstat (limited to 'src')
-rw-r--r-- | src/call-forwarding.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/call-forwarding.c b/src/call-forwarding.c index b2b6aa29..3c68bc45 100644 --- a/src/call-forwarding.c +++ b/src/call-forwarding.c @@ -436,6 +436,36 @@ static void set_new_cond_list(struct ofono_call_forwarding *cf, if (new_cfu != old_cfu) { ofono_bool_t status = new_cfu; + int i; + + /* + * Emit signals to mask/unmask conditional cfs on cfu change + */ + for (i = 0; i < 4; i++) { + if (i == CALL_FORWARDING_TYPE_UNCONDITIONAL) + continue; + + l = g_slist_find_custom(cf->cf_conditions[i], + GINT_TO_POINTER(BEARER_CLASS_VOICE), + cf_condition_find_with_cls); + + if (l == NULL) + continue; + + if (new_cfu) + number = ""; + else { + lc = l->data; + + number = phone_number_to_string( + &lc->phone_number); + } + + ofono_dbus_signal_property_changed(conn, path, + OFONO_CALL_FORWARDING_INTERFACE, + cf_type_lut[i], + DBUS_TYPE_STRING, &number); + } ofono_dbus_signal_property_changed(conn, path, OFONO_CALL_FORWARDING_INTERFACE, |