summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ofono.h1
-rw-r--r--src/ussd.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/src/ofono.h b/src/ofono.h
index d95f2f21..9b2e53fe 100644
--- a/src/ofono.h
+++ b/src/ofono.h
@@ -254,6 +254,7 @@ gboolean __ofono_ussd_passwd_register(struct ofono_ussd *ussd, const char *sc,
ofono_ussd_passwd_cb_t cb, void *data,
ofono_destroy_func destroy);
void __ofono_ussd_passwd_unregister(struct ofono_ussd *ussd, const char *sc);
+gboolean __ofono_ussd_is_busy(struct ofono_ussd *ussd);
#include <ofono/netreg.h>
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)
{