blob: 7240d11eb7df7d5068133c3b61d40e47563309f3 [file] [log] [blame]
/**
* @file at_other_msg.h
* @brief ÌṩÁËAT_CTLÖзÇOPENCPUµÄÏûÏ¢¶ÔÓ¦µÄ½á¹¹Ì嶨Òå
*
* Copyright (C) 2017 Sanechips Technology Co., Ltd.
* @author
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
#ifndef __AT_OTHER_API_H__
#define __AT_OTHER_API_H__
/*******************************************************************************
* Include header files *
******************************************************************************/
#include "max_macro.h"
/*******************************************************************************
* Macro definitions *
******************************************************************************/
#define ZDIAL_NUM_MAX 48
/*******************************************************************************
* Type definitions *
******************************************************************************/
typedef struct {
unsigned char pduLen;
char pdu[1024];
unsigned char seq;
} T_zAt_CsimRes;
/**
* @brief ¿¨²å°ÎÐÅÏ¢Éϱ¨£¬¶ÔÓ¦ÏûÏ¢MSG_CMD_ZUSLOT_IND
* @param slot£¬¿¨²Û ȡֵ·¶Î§ 0,1,2
* @param slot_state, ¿¨×´Ì¬ 0 °Î¿¨ 1 ²å¿¨
*/
typedef struct {
long slot;
long slot_state;
} T_zAt_ZuslotRes;
/**
* @brief PINÂëÑéÖ¤ÏûÏ¢½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_VERIFY_PIN_REQ/MSG_CMD_VERIFY_PUK_REQ
* @param pin»òpin2£¬µ±Ç°ÃÜÂëÊäÈëÇëÇóΪPIN»òPIN2£¬ÔòÊäÈë+CPIN=<pin>½øÐÐУÑé
* @param newpin, µ±Ç°ÃÜÂëÊäÈëÇëÇóΪPUK»òPUK2£¬ÔòÊäÈë+CPIN=<pin>,<newpin>½øÐнâËø£¬
* µÚÒ»¸ö²ÎÊýpinΪSIM PUKÂë»òÕßSIM PUK2Â룬µÚ¶þ¸ö²ÎÊýnewpinΪеÄPINÂë»òPIN2Âë
*/
typedef struct {
char pin[10];
char newpin[10];
} T_zAt_CpinPukSet;
/**
* @brief PINÂë¹ÜÀíÏûÏ¢½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_PIN_MANAGE_REQ
* @param action£¬²Ù×÷ÀàÐÍ 0 ¹Ø±Õ 1 ´ò¿ª 2 ÐÞ¸Ä
* @param oldPin, ¹Ø±Õ/´ò¿ªÊ±ÊäÈëµÄPINÂ룬ÐÞ¸ÄʱÊäÈëµÄ¾ÉPINÂë
* @param newPin ÐÞ¸ÄʱÊäÈëµÄÐÂPINÂë
*/
typedef struct {
unsigned int action; /*¶¯×÷ÀàÐÍ£¬enable, disable, modify*/
char oldPin[10];
char newPin[10];
} T_zAt_PinManage;
/**
* @brief ¿¨³õʼ»¯½á¹û£¬¶ÔÓ¦ÏûÏ¢MSG_CMD_ZPBIC_IND
* @param result£¬0 ʧ°Ü 1 ³É¹¦
* @param opertype, ÒµÎñÀàÐÍ 0 ¶ÌÐÅ 1 µç»°±¾ 2 È«²¿
*/
typedef struct {
long result;
long opertype;
} T_zAt_ZpbicRes;
/*****************¶ÌÐÅÏà¹ØÏûÏ¢¶ÔÓ¦½á¹¹Ìå begin*****************************/
/**
* @brief ·¢ËͶÌÐÅÏûÏ¢½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_SENDSMS_REQ
* @param length£¬¶ÌÐÅÄÚÈݳ¤¶È
* @param pdu, pdu
*/
typedef struct {
int length;
char pdu[ZSMS_PDU_SIZE];
} T_zSms_SendSmsReq;
/**
* @brief ɾ³ý¶ÌÐÅÏûÏ¢½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_DELSMS_REQ
* @param index£¬´ýɾ¶ÌÐÅË÷Òý
*/
typedef struct {
int index;
} T_zSms_DelSmsReq;
/**
* @brief ÉèÖÃÉϲã¿Õ¼ä±ä³É¿ÉÓûò²»¿ÉÓ㬶ÔÓ¦ÏûÏ¢MSG_CMD_STORAGE_CAP_REQ
* @param type 0 ²»Âú 1 Âú
*/
typedef struct {
int type;
} T_zSms_StroageReq;
/**
* @brief ½«¶ÌÐÅ´Óδ¶Á״̬±ä³ÉÒѶÁ£¬¶ÔÓ¦ÏûÏ¢MSG_CMD_MODIFY_TAG_REQ
* @param index£¬¶ÌÐÅË÷Òý
*/
typedef struct {
int index;
} T_zSms_ModifyTagReq;
/**
* @brief ¶Á¶ÌÐÅÇëÇó½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_READSMS_REQ
* @param index£¬¶ÌÐÅË÷Òý
*/
typedef struct {
int index;
} T_zSms_ReadSmsReq;
/**
* @brief ÉèÖöÌÐÅÖÐÐÄ£¬¶ÔÓ¦ÏûÏ¢MSG_CMD_SCA_SET_REQ
* @param sca£¬¶ÌÐÅÖÐÐĺÅÂë
*/
typedef struct {
char sca[22];
} T_zSms_SetScaReq;
/**
* @brief жÌÐÅ֪ͨÉèÖ㬶ÔÓ¦ÏûÏ¢MSG_CMD_NOTIFY_SET_REQ
* @param mt£¬Ö¸Ê¾Ð¶ÌÐŵ½´ïʱµÄָʾ·½Ê½
*/
typedef struct {
int mt;
} T_zSms_NotifySetReq;
/**
* @brief жÌÐÅÈ·ÈÏ£¬¶ÔÓ¦ÏûÏ¢MSG_CMD_SMSACK_REQ
* @param ackmode£¬ÏìÓ¦·½Ê½
* @param length£¬PDUµÄ³¤¶È
* @param pdu£¬SMSCµØÖ·ºÍTPDUÊý¾Ý°ü
*/
typedef struct {
int ackmode;
int length;
char pdu[50];
} T_zSms_SmsAckReq;
/**
* @brief ¶ÌÐŲÙ×÷½á¹û£¬¶ÔÓ¦ÏûÏ¢MSG_CMD_SENDSMS_RSP
* /MSG_CMD_DELSMS_RSP /MSG_CMD_STORAGE_CAP_RSP
* /MSG_CMD_MODIFY_TAG_RSP/MSG_CMD_NOTIFY_SET_RSP/MSG_CMD_SCA_SET_RSP
* /MSG_CMD_SMSACK_RSP/MSG_CMD_SMSINIT_RSP
* @param result£¬1 ³É¹¦ ÆäËû ʧ°Ü
*/
typedef struct {
int result;
} T_zSms_optRsp;
/*¶ÔÓ¦ÏûÏ¢ MSG_CMD_NEWSMS_STATUS_IND MSG_CMD_ZMGR_IND MSG_CMD_READSMS_RSP*/
/**
* @brief жÌÐÅÉϱ¨£¬¶ÔÓ¦ÏûÏ¢MSG_CMD_NEWSMS_STATUS_IND/MSG_CMD_ZMGR_IND
* @param index£¬¶ÌÐÅÔÚ´æ´¢ÇøÖеÄË÷ÒýºÅ
* @param stat£¬´æ´¢Æ÷ÖжÌÏûÏ¢µÄÐÅϢ״̬
* @param alpha£¬²ÎÊýÄÚÈÝÊÜ+CSCSÃüÁî¿ØÖÆ
* @param length£¬pdu³¤¶È
* @param pdu£¬pdu
*/
typedef struct {
int index;
int stat;
char alpha[36];
int length;
char pdu[ZSMS_PDU_SIZE];
} T_zSms_SmsInd;
/**
* @brief жÌÐÅindexÉϱ¨£¬¶ÔÓ¦ÏûÏ¢MSG_CMD_NEWSMS_INDEX_IND/MSG_CMD_NEWSMS_STATUS_INDEX_IND
* @param storetype£¬¶ÌÏûÏ¢½ÓÊÕµÄ´æ´¢Çø
* @param index£¬´æ´¢Î»ÖÃÐòºÅ
*/
typedef struct {
char storetype[10];
int index;
} T_zSms_SmsIndexInd;
/**
* @brief ¶ÌÐÅÖÐÐÄÉϱ¨£¬¶ÔÓ¦ÏûÏ¢MSG_CMD_CSCA_IND
* @param sca£¬¶ÌÐÅÖÐÐĵØÖ·
* @param tosca£¬<sca>µÄÀàÐÍ
*/
typedef struct {
char sca[22];
char tosca[22];
} T_zSms_CscaInd;
/**
* @brief ¶ÌÐÅ´æ´¢ÇøÐÅÏ¢£¬¶ÔÓ¦ÏûÏ¢MSG_CMD_CPMS_IND
* @param used£¬ÒÑÓÃÌõÊý
* @param total£¬×ܹ²¿ÉÈÝÄÉÌõÊý
*/
typedef struct {
int used;
int total;
} T_zSms_CpmsInd;
/*****************¶ÌÐÅÏà¹ØÏûÏ¢¶ÔÓ¦½á¹¹Ìå end*****************************/
/************ÃûƬ¼ÐÏà¹ØÏûÏ¢¶ÔÓ¦µÄ½á¹¹Ìåbegin***********/
/*µ¥ÌõcontactÐÅÏ¢£¬¶ÔÓ¦ÏûÏ¢MSG_CMD_READ_PB_RSP*/
typedef struct {
char number1[42];
char number2[42];
char number3[42];
char number4[42];
char text[182];
char email[182];
unsigned char coding;
unsigned char num1Type;
unsigned char num2Type;
unsigned char num3Type;
unsigned char num4Type;
unsigned int index;
} T_zPb_ScpbrSetRes;
/*¶ÔÓ¦ÏûÏ¢MSG_CMD_READ_PB_REQ*/
typedef struct {
int minIndex;//ɾ³ýpb¿ªÊ¼Î»ÖÃ
int maxIndex;//ɾ³ýpb½áÊøÎ»ÖÃ
} T_zPb_ScpbrReadRes;
typedef struct {
int pbIndex;
int coding;
char name[185];
char mobilNumber[42];
char officeNumber[42];
char homeNumber[42];
char faxNumber[42];
char email[182];
} T_zPb_ScpbwParam;
/*¶ÔÓ¦ÏûÏ¢ ²Ù×÷½á¹û*/
typedef struct {
int result;
} T_zPb_optRsp;
/*²éѯpbÐÅÏ¢µÄ×Ü´æ´¢Æ÷¸öÊý¡¢ÒÑÓô洢Æ÷¸öÊýÐÅÏ¢£¬Öмä½á¹ûÉϱ¨*/
typedef struct {
char locType[10];
unsigned int usedEntries;
unsigned int totalEntries;
} T_zPb_AtCpbsReadRes;
/*²éѯpbÐÅÏ¢µÄ×î´óË÷Òý¡¢³¤¶ÈµÈÐÅÏ¢£¬Öмä½á¹ûÉϱ¨*/
typedef struct {
int minIndex;
int maxIndex;
int maxNumberLen;
int maxTextLen;
int maxEmailLen;
} T_zPb_AtScpbrTestRes;
/************ÃûƬ¼ÐÏà¹ØÏûÏ¢¶ÔÓ¦µÄ½á¹¹Ìåend***********/
/************ccappÏà¹ØÏûÏ¢¶ÔÓ¦µÄ½á¹¹Ìåbegin***********/
/*¶ÔÓ¦ÏûÏ¢MSG_CMD_ATD_DIAL_REQ*/
typedef struct {
char number[ZDIAL_NUM_MAX];
} T_zCcapp_CallMoReq;
/*¶ÔÓ¦ÏûÏ¢MSG_CMD_VTS_REQ*/
typedef struct {
char dtmfchar;
} T_zCcapp_VtsReq;
/*¶ÔÓ¦ÏûÏ¢MSG_CMD_ZIMSPLUS_REQ*/
typedef struct {
unsigned int setfg;
unsigned int act;
} T_zCcapp_ImsplusReq;
/*¶ÔÓ¦ÏûÏ¢MSG_CMD_CLCK_REQ*/
typedef struct {
unsigned int type;
unsigned int act;
char pw[5];
} T_zCcapp_ClckReq;
/*¶ÔÓ¦ÏûÏ¢MSG_CMD_CCFC_REQ*/
typedef struct {
unsigned int type;
unsigned int act;
char dn[ZDIAL_NUM_MAX];
} T_zCcapp_CcfcReq;
/*¶ÔÓ¦ÏûÏ¢MSG_CMD_CCFC_REQ*/
typedef struct {
unsigned int type;
} T_zCcapp_ChldReq;
/*¶ÔÓ¦ÏûÏ¢ ²Ù×÷½á¹û*/
typedef struct {
int result;
} T_zCcapp_optRsp;
/*¶ÔÓ¦ÏûÏ¢MSG_CMD_DSCI_IND*/
typedef struct {
unsigned int cid;
unsigned int dir;
unsigned int state;
unsigned int inMpty;
char num[ZDIAL_NUM_MAX];
} T_zCcApp_DsciInd;
/*¶ÔÓ¦ÏûÏ¢MSG_CMD_ZIMSPLUS_IND*/
typedef struct {
unsigned int act;
unsigned int rate;
} T_zCcApp_ImsplusInd;
/*¶ÔÓ¦ÏûÏ¢MSG_CMD_ZCPI*/
typedef struct {
unsigned int cid;
unsigned int state;
unsigned int progdsp;
} T_zCcApp_ZcpiInd;
/*¶ÔÓ¦ÏûÏ¢MSG_CMD_ZVOICECHNL*/
typedef struct {
unsigned int op; //0-close,1-open
unsigned int act; // 3-gsm, 5-w, 15-tds, 17-lte
unsigned int codetype; //0-nb, 1-wb
unsigned int amrpath; //0-teak, 1-softlib
} T_zCcApp_VoiceChnl;
/************ccappÏà¹ØÏûÏ¢¶ÔÓ¦µÄ½á¹¹Ìåend***********/
#endif