#pragma once #include #include struct mobile_prim; /** * Mobile Script<->App primitives. Application script will receive * indications and will send primitives to the lower layers. Here * we will convert from internal state/events to the primitives. In * the future the indications might be generated at lower levels * directly. */ enum mobile_prims { PRIM_MOB_TIMER, PRIM_MOB_TIMER_CANCEL, PRIM_MOB_STARTED, PRIM_MOB_SHUTDOWN, PRIM_MOB_SMS, PRIM_MOB_MM, PRIM_MOB_NETWORK_RESELECT, }; struct mobile_prim_intf { struct osmocom_ms *ms; void (*indication)(struct mobile_prim_intf *, struct mobile_prim *prim); /* Internal state */ struct llist_head entry; struct llist_head timers; }; /** * Primitive to create timers and get indication once they have * expired. Currently there is no way to cancel timers. */ struct mobile_timer_param { uint64_t timer_id; /*!< Unique Id identifying the timer */ int seconds; /*!< Seconds the timer should fire in */ }; /** * Primitive to indicate starting of the mobile. */ struct mobile_started_param { bool started; }; /** * Primitive to indicate shutdown of the mobile. It will go through * various states. */ struct mobile_shutdown_param { int old_state; int new_state; }; /** * SMS related configs. */ struct mobile_sms_param { struct gsm_sms sms; char sca[20+1]; /*