• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/uqmi/uqmid/sim_fsm.h

  1 #ifndef __UQMID_SIM_FSM_H
  2 #define __UQMID_SIM_FSM_H
  3 
  4 #include <stdbool.h>
  5 
  6 enum sim_fsm_state {
  7         SIM_ST_IDLE,
  8         SIM_ST_WAIT_UIM_PRESENT,
  9         SIM_ST_GET_INFO,
 10         SIM_ST_CHV_PIN,
 11         SIM_ST_CHV_PUK,
 12         SIM_ST_READY,
 13         SIM_ST_FAILED,
 14         SIM_ST_NO_PIN_TRIES_LEFT,
 15         SIM_ST_FAIL_PUK_REQUIRED,
 16         SIM_ST_FAIL_PIN_REQUIRED,
 17         SIM_ST_FAIL_NO_SIM_PRESENT,
 18         SIM_ST_DESTROY,
 19 };
 20 
 21 // check uim available (or not configured to be used)
 22 // uim get slot status, uim get card status
 23 // uim check if pin is required, check if puk is required
 24 // uim get IMSI, ICCID, MSISDN?
 25 // setup indication to be notified if sim got removed
 26 
 27 // sending information towards modem_fsm-> (removed, ready)
 28 
 29 enum sim_fsm_event {
 30         SIM_EV_REQ_START,
 31         SIM_EV_REQ_CONFIGURED,
 32         SIM_EV_REQ_DESTROY,
 33 
 34         SIM_EV_RX_UIM_FAILED, /* UIM failed, need to switch to DMS */
 35 
 36         SIM_EV_RX_UIM_GET_SLOT_FAILED, /* some modem doesn't support GET SLOT */
 37         SIM_EV_RX_UIM_NO_UIM_FOUND, /* we couldn't find a UIM */
 38         SIM_EV_RX_UIM_VALID_ICCID, /* when Get Slot Status found a valid ICCID */
 39         SIM_EV_RX_UIM_CARD_STATUS_VALID, /* Got a valid Get Card Status */
 40 
 41         SIM_EV_RX_UIM_GET_IMSI_SUCCESS,
 42         SIM_EV_RX_UIM_GET_IMSI_FAILED,
 43 
 44         SIM_EV_RX_UIM_PIN_REQUIRED,
 45         SIM_EV_RX_UIM_PIN_INVALID,
 46         SIM_EV_RX_UIM_PIN_VERIFIED,
 47 
 48         SIM_EV_RX_UIM_PUK_REQUIRED,
 49         SIM_EV_RX_UIM_PUK_INVALID,
 50         SIM_EV_RX_UIM_PUK_VERIFIED,
 51 
 52         SIM_EV_RX_UIM_REFRESH, /* we need to re-check the UIM. E.g. this can happen when pin verified or puk applied, but with a result which we can't parse */
 53         SIM_EV_RX_UIM_READY,
 54 
 55         SIM_EV_RX_FAILED,
 56         SIM_EV_RX_SUCCEED, /* a generic callback succeeded */
 57 };
 58 
 59 struct modem;
 60 struct osmo_fsm_inst;
 61 
 62 void sim_fsm_start(struct modem *modem);
 63 struct osmo_fsm_inst *sim_fsm_alloc(struct modem *modem);
 64 
 65 #endif /* __UQMID_SIM_FSM_H */
 66 

This page was automatically generated by LXR 0.3.1.  •  OpenWrt