blob: b0457df2dfa09d0c4b25347fc8f7bac8c01ce4d6 [file] [log] [blame]
lla2d39312022-01-18 12:34:30 +00001/*=============================================================================
ll8551b222022-04-01 07:50:08 +00002# FileName: lynq_sim.h
lla2d39312022-01-18 12:34:30 +00003# Desc: about SIMAPI
ll8551b222022-04-01 07:50:08 +00004# Author: lei
lla2d39312022-01-18 12:34:30 +00005# Version: V1.0
ll8551b222022-04-01 07:50:08 +00006# LastChange: 2022-03-31
lla2d39312022-01-18 12:34:30 +00007# History:
ll3705eeb2022-03-17 02:23:00 +00008# If you need to use any API under lynq_sim, you must first call the lynq_sim_init() function to initialize these functions.
lla2d39312022-01-18 12:34:30 +00009=============================================================================*/
10#ifndef __LYNQ_SIM__
11#define __LYNQ_SIM__
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16int lynq_get_sim_status(int *card_status);
17int lynq_get_imsi(char buf[]);
lla2d39312022-01-18 12:34:30 +000018int lynq_sim_init(int utoken);
19int lynq_sim_deinit(void);
20int lynq_enable_pin(char pin[]);
21int lynq_disable_pin(char pin[]);
22int lynq_get_iccid(char buf[]);
23int lynq_query_pin_lock(char *pin,int buf[]);
24int lynq_verify_pin(char *pin);
25int lynq_change_pin(char *old_pin, char *new_pin);
26int lynq_unlock_pin(char *puk, char *pin);
27int lynq_query_phone_number(char buf[]);
rjw8bdc56b2022-02-28 15:01:49 +080028int lynq_switch_card(int slot);
ll50248102022-03-09 03:13:31 +000029int lynq_screen(int num);
ll16765dd2022-03-10 09:01:50 +000030int lynq_get_imei(char buf[]);
ll3705eeb2022-03-17 02:23:00 +000031
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 */
51int lynq_req_sim_io(int list[5], char *path, char *data, char *pin2, char *aidPtr, int sw[2], char *simResponse);
52
ll8551b222022-04-01 07:50:08 +000053/**
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 */
60int 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 */
67int lynq_get_version(char buf[]);
68
lla2d39312022-01-18 12:34:30 +000069
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif
76