From: Denis Kenzior <[email protected]>
---
src/emulator.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/emulator.c b/src/emulator.c
index 1c43e21..5be7b63 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -48,6 +48,7 @@ struct ofono_emulator {
GSList *indicators;
guint callsetup_source;
int pns_id;
+ struct ofono_handsfree_card *card;
bool slc : 1;
unsigned int events_mode : 2;
bool events_ind : 1;
@@ -990,6 +991,9 @@ static void emulator_unregister(struct ofono_atom *atom)
g_at_server_unref(em->server);
em->server = NULL;
+
+ ofono_handsfree_card_remove(em->card);
+ em->card = NULL;
}
void ofono_emulator_register(struct ofono_emulator *em, int fd)
@@ -1435,6 +1439,8 @@ void __ofono_emulator_slc_condition(struct ofono_emulator
*em,
ofono_info("SLC reached");
em->slc = TRUE;
+ ofono_handsfree_card_register(em->card);
+
default:
break;
}
@@ -1460,3 +1466,12 @@ void ofono_emulator_set_hf_indicator_active(struct
ofono_emulator *em,
sprintf(buf, "+BIND: %d,%d", HFP_HF_INDICATOR_ENHANCED_SAFETY, active);
g_at_server_send_unsolicited(em->server, buf);
}
+
+void ofono_emulator_set_handsfree_card(struct ofono_emulator *em,
+ struct ofono_handsfree_card *card)
+{
+ if (em == NULL)
+ return;
+
+ em->card = card;
+}
--
2.5.0
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono