blob: 9b9593f7caf130b5898709d5e5e12c40aa647052 [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 init_sim() function to initialize these functions.
=============================================================================*/
#ifndef __LYNQ_SIM__
#define __LYNQ_SIM__
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <string.h>
#include <unistd.h>
#include <binder/Parcel.h>
#include <log/log.h>
#include <cutils/jstring.h>
#include <pthread.h>
#define MAX_BUF 20
#define MAX_NUM 80
#ifdef __cplusplus
#define RIL_REQUEST_GET_SIM_STATUS 1
#define RIL_REQUEST_GET_IMSI 11
#define RIL_REQUEST_QUERY_ICCID 2026
#define RIL_REQUEST_SET_FACILITY_LOCK 43
#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
#define RIL_REQUEST_ENTER_SIM_PIN 2
#define RIL_REQUEST_ENTER_SIM_PUK 3
#define RIL_REQUEST_CHANGE_SIM_PIN 6
#define RIL_REQUEST_OEM_HOOK_RAW 59
extern "C" {
#endif
#define MAX_LEN 1024*8
typedef struct{
int uToken;
int request;
int paramLen;
char param[MAX_LEN];
}lynq_client_t;
typedef struct
{
char *MCCMCN;
char *buf;
char *MCN;
}FindOperator;
int lynq_get_sim_status(int *card_status);
int lynq_get_imsi(char buf[]);
/*add by lei*/
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_query_operator(char buf[]);
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[]);
/*add by lei*/
#ifdef __cplusplus
}
#endif
#endif