From 41d38d76bcb5344e6097eb491be488454cb549dc Mon Sep 17 00:00:00 2001 From: Yang Gu Date: Mon, 6 Sep 2010 10:19:55 +0800 Subject: ussd: Add __ofono_ussd_is_busy Send SS requires Call Forwarding / Call Settings / Call Barring to check whether USSD is currently busy. If it is, then the SIM should be notified appropriately. We introduce a function __ofono_ussd_is_busy to help with this. --- src/ussd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ussd.c') diff --git a/src/ussd.c b/src/ussd.c index 825d5606..fbb07d20 100644 --- a/src/ussd.c +++ b/src/ussd.c @@ -65,6 +65,17 @@ struct ssc_entry { ofono_destroy_func destroy; }; +gboolean __ofono_ussd_is_busy(struct ofono_ussd *ussd) +{ + if (!ussd) + return FALSE; + + if (ussd->pending || ussd->state != USSD_STATE_IDLE) + return TRUE; + + return FALSE; +} + static struct ssc_entry *ssc_entry_create(const char *sc, void *cb, void *data, ofono_destroy_func destroy) { -- cgit v1.2.3