ll | a2d3931 | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 1 | /*============================================================================= |
ll | 8551b22 | 2022-04-01 07:50:08 +0000 | [diff] [blame] | 2 | # FileName: lynq_sim.h |
ll | a2d3931 | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 3 | # Desc: about SIMAPI |
ll | 8551b22 | 2022-04-01 07:50:08 +0000 | [diff] [blame] | 4 | # Author: lei |
ll | a2d3931 | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 5 | # Version: V1.0 |
ll | 8551b22 | 2022-04-01 07:50:08 +0000 | [diff] [blame] | 6 | # LastChange: 2022-03-31 |
ll | a2d3931 | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 7 | # History: |
ll | 3705eeb | 2022-03-17 02:23:00 +0000 | [diff] [blame] | 8 | # If you need to use any API under lynq_sim, you must first call the lynq_sim_init() function to initialize these functions. |
ll | a2d3931 | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 9 | =============================================================================*/ |
| 10 | #ifndef __LYNQ_SIM__ |
| 11 | #define __LYNQ_SIM__ |
| 12 | #ifdef __cplusplus |
| 13 | extern "C" { |
| 14 | #endif |
| 15 | |
| 16 | int lynq_get_sim_status(int *card_status); |
| 17 | int lynq_get_imsi(char buf[]); |
ll | a2d3931 | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 18 | int lynq_sim_init(int utoken); |
| 19 | int lynq_sim_deinit(void); |
| 20 | int lynq_enable_pin(char pin[]); |
| 21 | int lynq_disable_pin(char pin[]); |
| 22 | int lynq_get_iccid(char buf[]); |
| 23 | int lynq_query_pin_lock(char *pin,int buf[]); |
| 24 | int lynq_verify_pin(char *pin); |
| 25 | int lynq_change_pin(char *old_pin, char *new_pin); |
| 26 | int lynq_unlock_pin(char *puk, char *pin); |
| 27 | int lynq_query_phone_number(char buf[]); |
rjw | 8bdc56b | 2022-02-28 15:01:49 +0800 | [diff] [blame] | 28 | int lynq_switch_card(int slot); |
ll | 5024810 | 2022-03-09 03:13:31 +0000 | [diff] [blame] | 29 | int lynq_screen(int num); |
ll | 16765dd | 2022-03-10 09:01:50 +0000 | [diff] [blame] | 30 | int lynq_get_imei(char buf[]); |
ll | 3705eeb | 2022-03-17 02:23:00 +0000 | [diff] [blame] | 31 | |
| 32 | /** |
| 33 | * @brief Request SIM I/O operation. |
| 34 | * This is similar to the TS 27.007 "restricted SIM" operation |
| 35 | * where it assumes all of the EF selection will be done by the callee. |
| 36 | * @param list type: [IN] list[0]:one of the commands listed for TS 27.007 +CRSM.(command) |
| 37 | * type: [IN] list[1]:EF id(fileid) |
| 38 | * type: [IN] list[2]:offset(p1) |
| 39 | * type: [IN] list[3]:offset(p2) |
| 40 | * type: [IN] list[4]:response len,sometimes needn't care(p3) |
| 41 | * @param path type: [IN] "pathid" from TS 27.007 +CRSM command. |
| 42 | type: [IN] Path is in hex asciii format eg "7f205f70" |
| 43 | type: [IN] Path must always be provided. |
| 44 | * @param data type: [IN] May be NULL |
| 45 | * @param pin2 type: [IN] May be NULL |
| 46 | * @param aidPtr type: [IN] AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. |
| 47 | * @param sw type: [OUT] |
| 48 | * @param simResponse type: [OUT] response |
| 49 | * @return int |
| 50 | */ |
| 51 | int lynq_req_sim_io(int list[5], char *path, char *data, char *pin2, char *aidPtr, int sw[2], char *simResponse); |
| 52 | |
ll | 8551b22 | 2022-04-01 07:50:08 +0000 | [diff] [blame] | 53 | /** |
| 54 | * @brief |
| 55 | * @param options type: [IN] [options] define whether you want to halt, power-off, or reboot the machine.May be NULL |
| 56 | * @param time type: [IN] [time] specifies when you want the shutdown to perform.May be NULL |
| 57 | * @param message type: [IN] [message] adds a message that announces the shutdown.May be NULL |
| 58 | * @return int |
| 59 | */ |
| 60 | int lynq_shutdown(char options[], char time[], char message[]); |
| 61 | |
| 62 | /** |
| 63 | * @brief get currnet version of mobiletek |
| 64 | * @param buf type: [out] My Param doc |
| 65 | * @return int |
| 66 | */ |
| 67 | int lynq_get_version(char buf[]); |
| 68 | |
ll | a2d3931 | 2022-01-18 12:34:30 +0000 | [diff] [blame] | 69 | |
| 70 | |
| 71 | #ifdef __cplusplus |
| 72 | } |
| 73 | #endif |
| 74 | |
| 75 | #endif |
| 76 | |