📄 ril.h
字号:
#ifndef __RIL_H__
#define __RIL_H__
#ifdef __cplusplus
extern "C" {
#endif
#define RIL_PARAM_MDCS_TYPE (0x00000001)
#define RIL_PARAM_MDCS_FLAGS (0x00000002)
#define RIL_PARAM_MDCS_MSGCLASS (0x00000004)
#define RIL_PARAM_MDCS_INDICATION (0x00000008)
#define RIL_PARAM_MDCS_LANGUAGE (0x00000010)
#define RIL_PARAM_MDCS_ALL (0x0000001F)
#define RIL_MSG_IN_DELIVER (0x00010001)
#define RIL_MSG_IN_STATUS (0x00010002)
#define RIL_MSGFLAG_NONE (0x00000000)
#define RIL_MSGFLAG_MORETOSEND (0x00000001)
#define RIL_MSGFLAG_REPLYPATH (0x00000002)
#define RIL_MSGFLAG_HEADER (0x00000004)
#define RIL_MSGFLAG_REJECTDUPS (0x00000008)
#define RIL_MSGFLAG_STATUSREPORTRETURNED (0x00000010)
#define RIL_MSGFLAG_STATUSREPORTREQUESTED (0x00000020)
#define RIL_MSGFLAG_CAUSEDBYCOMMAND (0x00000040)
#define RIL_MSGFLAG_ALL (0x000000FF)
#define RIL_DCSTYPE_GENERAL (0x00000001)
#define RIL_DCSTYPE_MSGWAIT (0x00000002)
#define RIL_DCSTYPE_MSGCLASS (0x00000004)
#define RIL_DCSTYPE_LANGUAGE (0x00000008)
/* uncertain */
#define RIL_NCLASS_FUNCRESULT (0x80000000)
/* verified from RSUpgrade.exe */
#define RIL_NCLASS_CALLCTRL (0x00010000)
#define RIL_NCLASS_MESSAGE (0x00020000)
#define RIL_NCLASS_NETWORK (0x00040000)
#define RIL_NCLASS_SUPSERVICE (0x00080000)
/* uncertain */
#define RIL_NCLASS_PHONEBOOK (0x00100000)
#define RIL_NCLASS_SIMTOOLKIT (0x00200000)
#define RIL_NCLASS_MISC (0x00400000)
#define RIL_NCLASS_RADIOSTATE (0x00800000)
#define RIL_NCLASS_ALL (0x00FF0000)
// Notify class Call Control
#define RIL_NOTIFY_RING (0x00000001)
#define RIL_NOTIFY_CONNECT (0x00000002)
#define RIL_NOTIFY_DISCONNECT (0x00000003)
#define RIL_NOTIFY_DATASVCNEGOTIATED (0x00000004)
#define RIL_NOTIFY_CALLSTATECHANGED (0x00000005)
#define RIL_NOTIFY_EMERGENCYMODEENTERED (0x00000006)
#define RIL_NOTIFY_EMERGENCYMODEEXITED (0x00000007)
#define RIL_NOTIFY_EMERGENCYHANGUP (0x00000008)
#define RIL_NOTIFY_HSCSDPARMSNEGOTIATED (0x00000009)
#define RIL_NOTIFY_DIAL (0x0000000A)
// Notify class Message
#define RIL_NOTIFY_MESSAGE (0x00000001)
#define RIL_NOTIFY_BCMESSAGE (0x00000002)
#define RIL_NOTIFY_STATUSMESSAGE (0x00000003)
#define RIL_NOTIFY_MSGSTORED (0x00000004)
#define RIL_NOTIFY_MSGDELETED (0x00000005)
#define RIL_NOTIFY_MSGSTORAGECHANGED (0x00000006)
#define RIL_NOTIFY_MESSAGE_IN_SIM (0x00000007)
#define RIL_NOTIFY_BCMESSAGE_IN_SIM (0x00000008)
#define RIL_NOTIFY_STATUSMESSAGE_IN_SIM (0x00000009)
/* unknown, guessed */
#define RIL_SENDOPT_NONE (0x00000001)
#define RIL_SENDOPT_PERSISTLINK (0x00000002)
#define MAXLENGTH_ADDRESS 256
#define MAXLENGTH_SUBADDR 256
#define MAXLENGTH_DESCRIPTION 256
#define MAXLENGTH_OPERATOR 32
#define MAXLENGTH_OPERATOR_LONG 32
#define MAXLENGTH_OPERATOR_SHORT 16
#define MAXLENGTH_OPERATOR_NUMERIC 16
#define MAXLENGTH_SERVCTR 256
#define MAXLENGTH_PASSWORD 256
#define MAXLENGTH_ERRSHORT 256
#define MAXLENGTH_ERRLONG 256
#define MAXLENGTH_EQUIPINFO 256
#define MAXLENGTH_PHONEBOOKADDR 256
#define MAXLENGTH_PHONEBOOKTEXT 256
#define MAXLENGTH_CURRENCY 256
#define MAXLENGTH_AREAID 256
#define MAXLENGTH_CELLID 256
#define MAXLENGTH_HDR 256
#define MAXLENGTH_MSG 256
#define MAXLENGTH_CMD 256
#define MAXLENGTH_MSGIDS 256
#define MAXLENGTH_USERID 256
#define MAXLENGTH_DTMF 256
#define MAXLENGTH_GPRSADDRESS 256
#define MAXLENGTH_GPRSACCESSPOINTNAME 256
typedef DWORD HRIL;
typedef struct {
DWORD cbSize;
DWORD dwParams;
DWORD dwType;
DWORD dwNumPlan;
WCHAR wszAddress[MAXLENGTH_ADDRESS];
} RILADDRESS;
typedef struct {
DWORD cbSize;
DWORD dwParams;
DWORD dwType;
DWORD dwFlags;
DWORD dwMsgClass;
DWORD dwAlphabet;
DWORD dwIndication;
DWORD dwLanguage;
} RILMSGDCS;
typedef struct {
DWORD cbSize;
DWORD dwParams;
RILADDRESS raSvcCtrAddress;
DWORD dwType;
DWORD dwFlags;
union {
struct {
RILADDRESS raOrigAddress;
DWORD dwProtocolID;
RILMSGDCS rmdDataCoding;
SYSTEMTIME stSCReceiveTime;
DWORD cbHdrLength;
DWORD cchMsgLength;
BYTE rgbHdr[MAXLENGTH_HDR];
BYTE rgbMsg[MAXLENGTH_MSG];
} msgInDeliver;
struct {
DWORD dwTgtMsgReference;
RILADDRESS raTgtRecipAddress;
SYSTEMTIME stTgtSCReceiveTime;
SYSTEMTIME stTgtDischargeTime;
DWORD dwTgtDlvStatus;
DWORD dwProtocolID;
RILMSGDCS rmdDataCoding;
DWORD cbHdrLength;
DWORD cchMsgLength;
BYTE rgbHdr[MAXLENGTH_HDR];
BYTE rgbMsg[MAXLENGTH_MSG];
} msgInStatus;
struct {
RILADDRESS raDestAddress;
DWORD dwProtocolID;
RILMSGDCS rmdDataCoding;
DWORD dwVPFormat;
SYSTEMTIME stVP;
DWORD cbHdrLength;
DWORD cchMsgLength;
BYTE rgbHdr[MAXLENGTH_HDR];
BYTE rgbMsg[MAXLENGTH_MSG];
} msgOutSubmit;
struct {
DWORD dwProtocolID;
DWORD dwCommandType;
DWORD dwTgtMsgReference;
RILADDRESS raDestAddress;
DWORD cbCmdLength;
BYTE rgbCmd[MAXLENGTH_CMD];
} msgOutCommand;
struct {
DWORD dwGeoScope;
DWORD dwMsgCode;
DWORD dwUpdateNumber;
DWORD dwID;
RILMSGDCS rmdDataCoding;
DWORD dwTotalPages;
DWORD dwPageNumber;
DWORD cchMsgLength;
BYTE rgbMsg[MAXLENGTH_MSG];
} msgBcGeneral;
// Maybe incomplete ...
struct {
DWORD cchMsgLength;
BYTE rgbMsg[MAXLENGTH_MSG];
} msgOutRaw;
};
} RILMESSAGE;
typedef struct {
DWORD cbSize;
DWORD dwParams;
DWORD dwIndex;
DWORD dwStatus;
RILMESSAGE rmMessage;
} RILMESSAGEINFO;
typedef void (CALLBACK *RILNOTIFYCALLBACK)(DWORD dwCode, const void *lpData,
DWORD cbdata, DWORD dwParam);
typedef void (CALLBACK *RILRESULTCALLBACK)(DWORD dwCode, HRESULT hrCmdID,
const void *lpData, DWORD cbdata, DWORD dwParam);
/* Function prototypes, based on an export from the DLL and info from the patent */
/*
RIL_AddCallForwarding
RIL_AddPreferredOperator
RIL_Answer
RIL_CancelSupServiceDataSession
RIL_ChangeCallBarringPassword
RIL_ChangeLockingPassword
RIL_ClearCCBSRegistration
*/
HRESULT RIL_Deinitialize(HRIL hril);
/*
RIL_DeleteGPRSContext
RIL_DeleteMinimumQualityOfService
RIL_DeleteMsg
RIL_DeletePhonebookEntry
RIL_DeleteRequestedQualityOfService
RIL_DevSpecific
RIL_Dial
RIL_DisableNotifications
RIL_EnableNotifications
RIL_EnterGPRSDataMode
RIL_FetchSimToolkitCmd
RIL_GetAudioDevices
RIL_GetAudioGain
RIL_GetAudioMuting
RIL_GetBearerServiceOptions
RIL_GetCallBarringStatus
RIL_GetCallerIdSettings
RIL_GetCallForwardingSettings
RIL_GetCallList
RIL_GetCallWaitingSettings
RIL_GetCCBSStatus
RIL_GetCellBroadcastMsgConfig
RIL_GetCellTowerInfo
RIL_GetClosedGroupSettings
RIL_GetCostInfo
RIL_GetCurrentAddressId
RIL_GetCurrentOperator
RIL_GetDataCompression
RIL_GetDevCaps
RIL_GetDialedIdSettings
RIL_GetDriverVersion
RIL_GetEquipmentInfo
RIL_GetEquipmentState
RIL_GetErrorCorrection
RIL_GetGPRSAddress
RIL_GetGPRSAttached
RIL_GetGPRSClass
RIL_GetGPRSContextActivatedList
RIL_GetGPRSContextList
RIL_GetGPRSRegistrationStatus
RIL_GetHideConnectedIdSettings
RIL_GetHideIdSettings
RIL_GetHSCSDCallSettings
RIL_GetHSCSDOptions
RIL_GetLineStatus
RIL_GetLockingStatus
RIL_GetMinimumQualityOfServiceList
RIL_GetMOSMSService
RIL_GetMsgConfig
RIL_GetMsgServiceOptions
RIL_GetOperatorList
RIL_GetPhonebookOptions
RIL_GetPhoneLockedState
RIL_GetPreferredOperatorList
RIL_GetRadioPresence
RIL_GetRegistrationStatus
RIL_GetRequestedQualityOfServiceList
RIL_GetRLPOptions
RIL_GetSerialPortHandle
RIL_GetSerialPortStatistics
RIL_GetSignalQuality
RIL_GetSimRecordStatus
RIL_GetSimToolkitProfile
RIL_GetSubscriberNumbers
RIL_GetSystemTime
RIL_GetUserIdentity
RIL_GPRSAnswer
RIL_Hangup
*/
HRESULT RIL_Initialize(DWORD dwIndex, RILRESULTCALLBACK pfnResult,
RILNOTIFYCALLBACK pfnNotify, DWORD dwNotificationClasses,
DWORD dwParam, HRIL *lphRil);
/*
RIL_Initialize
RIL_InitializeEmergency
RIL_ManageCalls
RIL_ReadMsg
RIL_ReadPhonebookEntries
RIL_RegisterOnNetwork
RIL_RemoveCallForwarding
RIL_RemovePreferredOperator
RIL_SendDTMF
*/
HRESULT RIL_SendMsg(HRIL hRil, const RILMESSAGE* lpMessage, DWORD dwOptions);
/*
RIL_SendMsgAcknowledgement
RIL_SendRestrictedSimCmd
RIL_SendSimCmd
RIL_SendSimToolkitCmdResponse
RIL_SendSimToolkitEnvelopeCmd
RIL_SendStoredMsg
RIL_SendSupServiceData
RIL_SetAudioDevices
RIL_SetAudioGain
RIL_SetAudioMuting
RIL_SetBearerServiceOptions
RIL_SetCallBarringStatus
RIL_SetCallerIdStatus
RIL_SetCallForwardingStatus
RIL_SetCallWaitingStatus
RIL_SetCellBroadcastMsgConfig
RIL_SetClosedGroupSettings
RIL_SetCostInfo
RIL_SetCurrentAddressId
RIL_SetDataCompression
RIL_SetDialedIdStatus
RIL_SetDTMFMonitoring
RIL_SetEquipmentState
RIL_SetErrorCorrection
RIL_SetGPRSAttached
RIL_SetGPRSClass
RIL_SetGPRSContext
RIL_SetGPRSContextActivated
RIL_SetHideConnectedIdStatus
RIL_SetHideIdStatus
RIL_SetHSCSDOptions
RIL_SetLockingStatus
RIL_SetMinimumQualityOfService
RIL_SetMOSMSService
RIL_SetMsgConfig
RIL_SetMsgServiceOptions
RIL_SetPhonebookOptions
RIL_SetRequestedQualityOfService
RIL_SetRLPOptions
RIL_SetSimToolkitProfile
RIL_TerminateSimToolkitSession
RIL_TransferCall
RIL_UnlockPhone
RIL_UnregisterFromNetwork
RIL_WriteMsg
RIL_WritePhonebookEntry
*/
#ifdef __cplusplus
}
#endif
#endif // __RIL_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -