📄 cfw.h
字号:
UINT8 mr;
UINT8 padding;
UINT32 st;
} CFW_SMS_TXT_REPORT_V0_INFO;
typedef struct _CFW_SMS_TXT_REPORT_V1_INFO {
UINT8 ra[TEL_NUMBER_MAX_LEN];
UINT8 ra_size;
TM_SMS_TIME_STAMP scts;
TM_SMS_TIME_STAMP dt;
UINT8 tora;
UINT8 stat;
UINT8 fo;
UINT8 mr;
UINT32 st;
} CFW_SMS_TXT_REPORT_V1_INFO;
typedef struct _CFW_SMS_PDU_INFO {
UINT16 nTpUdl;
UINT16 nDataSize;
UINT8 nStatus;
UINT8 padding[3];
UINT8 pData[1];
} CFW_SMS_PDU_INFO;
typedef struct _CFW_SMS_TXT_SUBMITTED_NO_HRD_INFO {
UINT8 da[TEL_NUMBER_MAX_LEN];
UINT8 da_size;
UINT8 stat;
UINT8 padding;
UINT16 length;
UINT8 data[1];
} CFW_SMS_TXT_SUBMITTED_NO_HRD_INFO;
typedef struct _CFW_SMS_TXT_SUBMITTED_WITH_HRD_INFO {
UINT8 da[TEL_NUMBER_MAX_LEN];
UINT8 da_size;
UINT8 sca[TEL_NUMBER_MAX_LEN];
UINT8 sca_size;
UINT8 toda;
UINT8 tosca;
UINT8 stat;
UINT8 fo;
UINT8 pid;
UINT8 dcs;
UINT8 vp;
UINT8 padding[3];
UINT16 length;
UINT8 data[1];
} CFW_SMS_TXT_SUBMITTED_WITH_HRD_INFO;
typedef struct _CFW_SMS_TXT_NO_HRD_IND {
UINT8 oa[TEL_NUMBER_MAX_LEN];
UINT8 oa_size;
UINT8 tooa;
UINT8 dcs;
TM_SMS_TIME_STAMP scts;
UINT16 nStorageId;
UINT16 nIndex;
UINT8 padding;
UINT16 nDataLen;
UINT8 pData[1];
} CFW_SMS_TXT_NO_HRD_IND, CFW_SMS_TXT_HRD_V0_IND;
typedef struct _CFW_SMS_TXT_HRD_V1_IND {
UINT8 oa[TEL_NUMBER_MAX_LEN];
UINT8 oa_size;
UINT8 sca[TEL_NUMBER_MAX_LEN];
UINT8 sca_size;
TM_SMS_TIME_STAMP scts;
UINT8 tosca;
UINT8 tooa;
UINT8 fo;
UINT8 pid;
UINT8 dcs;
UINT8 padding;
UINT16 nStorageId;
UINT16 nIndex;
UINT16 nDataLen;
UINT8 pData[1];
} CFW_SMS_TXT_HRD_V1_IND;
typedef struct _CFW_SMS_TXT_STATUS_IND {
UINT8 ra[TEL_NUMBER_MAX_LEN];
UINT8 ra_size;
UINT8 tora;
UINT8 fo;
UINT8 mr;
UINT8 st;
UINT16 nStorageId;
UINT16 nIndex;
TM_SMS_TIME_STAMP scts;
TM_SMS_TIME_STAMP dt;
} CFW_SMS_TXT_STATUS_IND;
typedef struct _CFW_SMS_MULTIPART_INFO {
UINT8 id;
UINT8 count;
UINT8 current;
UINT8 padding;
} CFW_SMS_MULTIPART_INFO;
UINT32 SRVAPI CFW_SmsDeleteMessage (
UINT16 nIndex,
UINT8 nStatus,
UINT16 nStorage,
UINT16 nUTI
);
UINT32 SRVAPI CFW_SmsGetStorage (
UINT16 nStorage,
UINT16 nUTI
);
UINT32 SRVAPI CFW_SmsSetUnRead2Read (
UINT16 nStorage,
UINT16 nIndex,
UINT16 nUTI
);
UINT32 SRVAPI CFW_SmsSetStorage (
UINT16 nStorage1,
UINT16 nStorage2,
UINT16 nStorage3,
UINT16 nUTI
);
UINT32 SRVAPI CFW_SmsListMessages (
UINT16 nStorage,
UINT8 nStatus,
UINT16 nCount,
UINT16 nStartIndex,
UINT8 nOption,
UINT16 nUTI
);
UINT32 SRVAPI CFW_SmsCopyMessages (
UINT8 nStatus,
UINT16 nCount,
UINT16 nStartIndex,
UINT8 nOption,
UINT16 nUTI
);
UINT32 SRVAPI CFW_SmsReadMessage (
UINT16 nStorage,
UINT16 nIndex,
UINT16 nUTI
);
UINT32 SRVAPI CFW_SmsSetRead2UnRead (
UINT16 nStorage,
UINT16 nIndex,
UINT16 nUTI
);
UINT32 SRVAPI CFW_SmsSendMessage (
CFW_DIALNUMBER* pNumber,
UINT8* pData,
UINT16 nDataSize,
UINT16 nUTI
);
UINT32 SRVAPI CFW_SmsWriteMessage (
CFW_DIALNUMBER* pNumber,
UINT8* pData,
UINT16 nDataSize,
UINT16 nStorage,
UINT16 nIndex,
UINT8 nStatus,
UINT16 nUTI
);
typedef struct _CFW_SMS_NODE {
PVOID pNode;
UINT16 nStorage;
UINT16 nStatus;
UINT16 nConcatPrevIndex;
UINT16 nConcatNextIndex;
UINT16 nConcatCurrentIndex;
UINT8 nType;
UINT8 padding;
} CFW_SMS_NODE;
typedef struct _CFW_NEW_SMS_NODE {
PVOID pNode;
UINT16 nStorage;
UINT16 nConcatPrevIndex;
UINT16 nConcatCurrentIndex;
UINT8 nType;
} CFW_NEW_SMS_NODE;
UINT32 SRVAPI CFW_SmsGetMessageNode (
PVOID pListResult,
UINT16 nIndex,
CFW_SMS_NODE **pNode
);
typedef struct _CFW_SMS_HEADER{
UINT8 pTelNumber[TEL_NUMBER_MAX_LEN];
UINT8 nNumber_size;
UINT8 nTelNumberType;
UINT8 nStatus;
UINT16 nStorage;
UINT16 nConcatPrevIndex;
UINT16 nConcatNextIndex;
UINT16 nConcatCurrentIndex;
TM_SMS_TIME_STAMP nTime;
} CFW_SMS_HEADER;
#define CFW_SMS_LIST_OPTION__TIME_DESCEND_ORDER 0x01
#define CFW_SMS_STORED_STATUS_TIME_ASCEND_ORDER 0x02
#define CFW_SMS_MULTIPART_OPTION_ALL 0x04
#define CFW_SMS_MULTIPART_OPTION_FIRST 0x08
#define CFW_SMS_MULTIPART_OPTION_SIM_BACKUP 0x10
#define CFW_SMS_ROUT_LOCATION 0x20
#define CFW_SMS_ROUT_DETAIL_INFO 0x40
UINT32 SRVAPI CFW_SmsListMessagesHeader (
UINT16 nStorage,
UINT8 nStatus,
UINT16 nCount,
UINT16 nStartIndex,
UINT8 nOption,
UINT16 nUTI
);
#define SCA_MAX_NUMBER 21
typedef struct _CFW_SMS_SCA {
UINT8 nNumber[SCA_MAX_NUMBER];
UINT8 nType;
UINT8 nFlag;
UINT8 padding[1];
} CFW_SMS_SCA;
UINT32 SRVAPI CFW_SmsSetUnSent2Sent(
UINT16 nStorage,
UINT16 nIndex,
UINT8 nSendStatus,
UINT16 nUTI
);
UINT32 SRVAPI CFW_SmsQueryOverflowInd (
UINT8* pMode,
UINT8* pStatus
);
UINT32 SRVAPI CFW_SmsNewSmsAck (
UINT8 nCmd,
UINT8* pData,
UINT16 nSize
);
typedef struct _CFW_SMS_PDU_PARAM {
UINT8 vp; //167
UINT8 pid; // 0
UINT8 dcs; // 0
UINT8 mti; // 0x01
UINT8 ssr; // 0
UINT8 bearer; // 0
UINT8 mr; // 0
UINT8 SCAIndex; // default index
UINT8 nNumber[12]; // BCD format
UINT8 rp;
} CFW_SMS_PDU_PARAM;
UINT32 SRVAPI CFW_SmsComposePdu(
UINT8* pTpUd, // "ABC"
UINT16 nTpUdl, // 3
CFW_DIALNUMBER* pNumber, // telephone number to send, 135XXX,
CFW_SMS_PDU_PARAM* pSmsParam, // NULL
UINT32* pSmsData, // ouput need to maloc.
UINT16* pSmsDataSize // size
);
// CC Network Error code
#define CFW_CC_CAUSE_NOUSED_CAUSE 0
#define CFW_CC_CAUSE_UNASSIGNED_NUMBER 1
#define CFW_CC_CAUSE_NO_ROUTE_IN_TRANSIT_NETWORK 2
#define CFW_CC_CAUSE_NO_ROUTE_TO_DESTINATION 3
#define CFW_CC_CAUSE_CHANNEL_UNACCEPTABLE 6
#define CFW_CC_CAUSE_CALL_AWARDED 7
#define CFW_CC_CAUSE_OPERATOR_DETERMINED_BARRING 8
#define CFW_CC_CAUSE_NORMAL_CALL_CLEARING 16
#define CFW_CC_CAUSE_USER_BUSY 17
#define CFW_CC_CAUSE_NO_USER_RESPONDING 18
#define CFW_CC_CAUSE_USER_ALERTING_NO_ANSWER 19
#define CFW_CC_CAUSE_CALL_REJECTED 21
#define CFW_CC_CAUSE_NUMBER_CHANGED 22
#define CFW_CC_CAUSE_PRE_EMPTION 25
#define CFW_CC_CAUSE_NON_SELECTED_USER_CLEARING 26
#define CFW_CC_CAUSE_DESTINATION_OUT_OF_ORDER 27
#define CFW_CC_CAUSE_INVALID_NUMBER_FORMAT 28
#define CFW_CC_CAUSE_FACILITY_REJECTED 29
#define CFW_CC_CAUSE_RESPONSE_TO_STATUS_ENQUIRY 30
#define CFW_CC_CAUSE_NORMAL_UNSPECIFIED 31
#define CFW_CC_CAUSE_NO_CIRCUIT_CHANNEL_AVAILABLE 34
#define CFW_CC_CAUSE_NETWORK_OUT_OF_ORDER 38
#define CFW_CC_CAUSE_TEMPORARY_FAILURE 41
#define CFW_CC_CAUSE_SWITCHING_EQUIPMENT_CONGESTION 42
#define CFW_CC_CAUSE_ACCESS_INFORMATION_DISCARDED 43
#define CFW_CC_CAUSE_CHANNEL_UNAVAILABLE 44
#define CFW_CC_CAUSE_RESOURCES_UNAVAILABLE 47
#define CFW_CC_CAUSE_QOS_UNAVAILABLE 49
#define CFW_CC_CAUSE_FACILITY_NOT_SUBSCRIBED 50
#define CFW_CC_CAUSE_MT_CALLS_BARRED 55
#define CFW_CC_CAUSE_BC_NOT_AUTHORIZED 57
#define CFW_CC_CAUSE_BC_NOT_PRESENTLY_AVAILABLE 58
#define CFW_CC_CAUSE_SERVICE_UNAVAILABLE 63
#define CFW_CC_CAUSE_BEARER_SERVICE_NOT_IMPLEMENTED 65
#define CFW_CC_CAUSE_CHANNEL_NOT_IMPLEMENTED 66
#define CFW_CC_CAUSE_ACM_EQUAL_TO_OR_GREATER_THAN_ACMMAX 68
#define CFW_CC_CAUSE_REQUESTED_FACILITY_NOT_IMPLEMENTED 69
#define CFW_CC_CAUSE_ONLY_RESTRICTED_DIGITAL_INFORMATION_BC_AVAILABLE 70
#define CFW_CC_CAUSE_SERVICE_NOT_IMPLEMENTED 71
#define CFW_CC_CAUSE_INVALID_TI_VALUE 81
#define CFW_CC_CAUSE_CHANNEL_DOES_NOT_EXIST 82
#define CFW_CC_CAUSE_CALL_IDENTITY_DOESNT_EXIST 83
#define CFW_CC_CAUSE_CALL_IDENTITY_IN_USE 84
#define CFW_CC_CAUSE_NO_CALL_SUSPENDED 85
#define CFW_CC_CAUSE_CALL_CLEARED 86
#define CFW_CC_CAUSE_USER_NOT_MEMBER_OF_CUG 87
#define CFW_CC_CAUSE_INCOMPATIBLE_DESTINATION 88
#define CFW_CC_CAUSE_INVALID_TRANSIT_NETWORK 91
#define CFW_CC_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE 94
#define CFW_CC_CAUSE_INVALID_MESSAGE 95
#define CFW_CC_CAUSE_INVALID_MANDATORY_INFORMATION 96
#define CFW_CC_CAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED 97
#define CFW_CC_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE 98
#define CFW_CC_CAUSE_IE_NOT_IMPLEMENTED 99
#define CFW_CC_CAUSE_CONDITIONAL_IE_ERROR 100
#define CFW_CC_CAUSE_MESSAGE_NOT_COMPATIBLE 101
#define CFW_CC_CAUSE_RECOVERY_ON_TIMER_EXPIRY 102
#define CFW_CC_CAUSE_PROTOCOL_ERROR_UNSPECIFIED 111
#define CFW_CC_CAUSE_INTERWORKING_UNSPECIFIED 127
#define CFW_CM_CAUSE_SUCCESS 255
// CC local error
#define CFW_CC_ERR_NORMAL_RELEASE 0
#define CFW_CC_ERR_LOW_LAYER_FAIL 1
#define CFW_CC_ERR_REQUEST_IMPOSSIBLE 2
#define CFW_CC_ERR_INCOMING_CALL_BARRED 3
#define CFW_CC_ERR_OUTGOING_CALL_BARRED 4
#define CFW_CC_ERR_CALL_HOLD_REJECTED 5
#define CFW_CC_ERR_CALL_RTRV_REJECTED 6
#define CFW_CC_ERR_CC_TIMER_EXPIRY 7
#define CFW_CC_ERR_CC_PROTOCOL_ERROR 8
#define CFW_CC_ERR_NOT_USED 0xff
// Crss error
#define CFW_CRSS_ERR_RETURN_ERROR 0x0002
#define CFW_CRSS_ERR_GENERAL_PROBLEM_UNRECOGNIZED_COMPONENT 0x8000
#define CFW_CRSS_ERR_GENERAL_PROBLEM_MISTYPED_COMPONENT 0x8001
#define CFW_CRSS_ERR_GENERAL_PROBLEM_BADLY_STRUCTURED_COMPONENT 0x8002
#define CFW_CRSS_ERR_INVOKE_PROBLEM_DUPLICATE_INVOKE_ID 0x8100
#define CFW_CRSS_ERR_INVOKE_PROBLEM_UNRECOGNIZED_OPERATION 0x8101
#define CFW_CRSS_ERR_INVOKE_PROBLEM_MISTYPED_PARAMETER 0x8102
#define CFW_CRSS_ERR_INVOKE_PROBLEM_RESOURCE_LIMITATION 0x8103
#define CFW_CRSS_ERR_INVOKE_PROBLEM_INITIATING_RELEASE 0x8104
#define CFW_CRSS_ERR_INVOKE_PROBLEM_UNRECOGNIZED_LINKED_ID 0x8105
#define CFW_CRSS_ERR_INVOKE_PROBLEM_LINKED_RESPONSE_UNEXPECTED 0x8106
#define CFW_CRSS_ERR_INVOKE_PROBLEM_UNEXPECTED_LINKED_OPERATION 0x8107
#define CFW_CRSS_ERR_RETURN_RESULT_PROBLEM_UNRECOGNIZED_INVOKE_ID 0x8200
#define CFW_CRSS_ERR_RETURN_RESULT_PROBLEM_RETURN_RESULT_UNEXPECTED 0x8201
#define CFW_CRSS_ERR_RETURN_RESULT_PROBLEM_MISTYPED_PARAMETER 0x8202
#define CFW_CRSS_ERR_RETURN_ERROR_PROBLEM_UNRECOGNIZED_INVOKE_ID 0x8300
#define CFW_CRSS_ERR_RETURN_ERROR_PROBLEM_RETURN_ERROR_UNEXPECTED 0x8301
#define CFW_CRSS_ERR_RETURN_ERROR_PROBLEM_UNRECOGNIZED_ERROR 0x8302
#define CFW_CRSS_ERR_RETURN_ERROR_PROBLEM_UNEXPECTED_ERROR 0x8303
#define CFW_CRSS_ERR_RETURN_ERROR_PROBLEM_MISTYPED_PARAMETER 0x8304
//SS code
#define CFW_SS_NO_CODE
#define CFW_SS_CLIP 30 // CLIP
#define CFW_SS_CLIR 31 // CLIR
#define CFW_SS_COLP 76 // COLP
#define CFW_SS_COLR 77 // COLR
#define CFW_SS_CNAP 300 // CNAP
#define CFW_SS_CFA 2 // All forwarding
#define CFW_SS_CFU 21 // CF unconditional
#define CFW_SS_CD 66 // call deflection
#define CFW_SS_CFC 4 // CF conditional
#define CFW_SS_CFB 67 // CF on MS busy
#define CFW_SS_CFNRY 61 // CF on MS no reply
#define CFW_SS_CFNRC 62 // CF on MS not reachable
#define CFW_SS_USSD_V2 100 // USSD version 2 services supports
// all USSD Operations except
// ss_ProcessUnstructuredSSData
#define CFW_SS_USSD_V1 101 // USSD version 1 services supports
// ss_ProcessUnstructuredSSData
// Operations Only
#define CFW_SS_ECT 96 // explicit call transfer
#define CFW_SS_CW 43 // call waiting
#define CFW_SS_HOLD 102 // call hold (defined by CIITEC)
#define CFW_SS_MPTY 103 // multiparty (defined by CIITEC)
#define CFW_SS_AOCI 104 // advice of charge information (defined by CIITEC)
#define CFW_SS_AOCC 105 // advice of charge charging (defined by CIITEC)
#define CFW_SS_UUS1 361 // uus1
#define CFW_SS_UUS2 362 // uus2
#define CFW_SS_UUS3 363 // uus3
#define CFW_SS_AllBarringSS 330 // all call barring
#define CFW_SS_BarringOfOutgoingCalls 333 // barring of MO call
#define CFW_SS_BAOC 33 // barring of all MO call
#define CFW_SS_BOIC 331 // barring of international MO call
#define CFW_SS_BOIC_ExHC 332 // barring of international MO call
// except those going to the home plmn
#define CFW_SS_BarringOfIncomingCalls 353 // barring of MT call
#define CFW_SS_BAIC 35 // barring of all MT call
#define CFW_SS_BIC_ROAM 351 // barring of MT call when roaming
// outside of home plmn
//SS operation code
#define CFW_SS_REGISTER 10 // register a SS valid for CF
#define CFW_SS_ERASURE 11 // erase a SS valid for CF
#define CFW_SS_ACTIVATE 12 // activate a SS valid for all
// SS operations except line
// identification
#define CFW_SS_DEACTIVATE 13 // deactivate a SS valid for all
// SS operations except line
// identification
#define CFW_SS_INTERROGATE 14 // interrogate a SS
#define CFW_SS_NOTIFY 16
#define CFW_SS_REGISTERPASSWORD 17 // register a password valid for CB
#define CFW_SS_GETCALLBARRINGPASSWORD 18 // this operation is invoked by
// network only
#define CFW_SS_PROCESSUNSTRUCTUREDSSDATA 19 // This operation is used only
// for USSD Version 1
#define CFW_SS_PROCESSUNSTRUCTUREDSSREQUEST 59 // This operation is used only
// for USSD Version 2
#define CFW_SS_UNSTRUCTUREDSSREQUEST 60 // This operation is used only
// for USSD Version 2
#define CFW_SS_UNSTRUCTUREDSSNOTIFY 61 // This operation is used only
// for USSD Version 2
#define CFW_SS_CALLDEFLECTION 117
#define CFW_SS_USERUSERSERVICE 118
#define CFW_SS_SPLITMPTY 121
#define CFW_SS_RETRIEVEMPTY 122
#define CFW_SS_HOLDMPTY 123
#define CFW_SS_BUILDMPTY 124
#define CFW_SS_FORWARDCHARGEADVICE 125
#define CFW_SS_EXPLICITCT 126
//
// PBK Services
//
#define CFW_PBK_DATA_MAX_SIZE 20
#define PBK_SIM_NUMBER_SIZE SIM_PBK_NUMBER_SIZE
#define CFW_PBK_NAME_MAX_SIZE 20
#define CFW_PBK_NUMBER_MAX_SIZE 20 // BCD
#define PBK_HINT_SIZE 16
typedef struct _CFW_PBK_ENTRY_SIMPLE_HRD {
UINT16 nPosition;
UINT8 nStorageId;
UINT8 nNameSize;
UINT8 nNumberSize;
UINT8 nNumberType;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -