blob: c35ee8fa739334728a3fc139980daf6398d568e2 [file] [log] [blame]
/*=============================================================================
# FileName: lynq_sim.cpp
# Desc: about SIMAPI
# Author: mobiletek
# Version: V1.0
# LastChange: 2020-07-29
# History:
# If you need to use any API under lynq_sim, you must first call the lynq_sim_init() function to initialize these functions.
=============================================================================*/
#ifndef __LYNQ_SIM__
#define __LYNQ_SIM__
#ifdef __cplusplus
extern "C" {
#endif
int lynq_get_sim_status(int *card_status);
int lynq_get_imsi(char buf[]);
int lynq_sim_init(int utoken);
int lynq_sim_deinit(void);
int lynq_enable_pin(char pin[]);
int lynq_disable_pin(char pin[]);
int lynq_get_iccid(char buf[]);
int lynq_query_pin_lock(char *pin,int buf[]);
int lynq_verify_pin(char *pin);
int lynq_change_pin(char *old_pin, char *new_pin);
int lynq_unlock_pin(char *puk, char *pin);
int lynq_query_phone_number(char buf[]);
int lynq_switch_card(int slot);
int lynq_screen(int num);
int lynq_get_imei(char buf[]);
/**
* @brief Radio on/off
*
* @param data 0/1 0 is off, 1 is on
* @return int
*/
int lynq_factory_radio(const int data);
/**
* @brief Request SIM I/O operation.
* This is similar to the TS 27.007 "restricted SIM" operation
* where it assumes all of the EF selection will be done by the callee.
* @param list type: [IN] list[0]:one of the commands listed for TS 27.007 +CRSM.(command)
* type: [IN] list[1]:EF id(fileid)
* type: [IN] list[2]:offset(p1)
* type: [IN] list[3]:offset(p2)
* type: [IN] list[4]:response len,sometimes needn't care(p3)
* @param path type: [IN] "pathid" from TS 27.007 +CRSM command.
type: [IN] Path is in hex asciii format eg "7f205f70"
type: [IN] Path must always be provided.
* @param data type: [IN] May be NULL
* @param pin2 type: [IN] May be NULL
* @param aidPtr type: [IN] AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
* @param sw type: [OUT]
* @param simResponse type: [OUT] response
* @return int
*/
int lynq_req_sim_io(int list[5], char *path, char *data, char *pin2, char *aidPtr, int sw[2], char *simResponse);
#ifdef __cplusplus
}
#endif
#endif