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.
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>
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)
{