summaryrefslogtreecommitdiffstats
path: root/src/ussd.c
diff options
context:
space:
mode:
authorYang Gu <yang.gu@intel.com>2010-09-06 10:19:55 +0800
committerDenis Kenzior <denkenz@gmail.com>2010-09-09 08:57:36 -0500
commit41d38d76bcb5344e6097eb491be488454cb549dc (patch)
treed41d293a91a83a224ffc6c7c9db06ea893ad418d /src/ussd.c
parent0a6637bda69c9a9ae04bc2ed7889ea750e3f2caf (diff)
downloadofono-41d38d76bcb5344e6097eb491be488454cb549dc.tar.bz2
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.
Diffstat (limited to 'src/ussd.c')
-rw-r--r--src/ussd.c11
1 files changed, 11 insertions, 0 deletions
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)
{