?? rilpdd.h
字號(hào):
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
//
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Module Name:
rilpdd.h
Abstract:
Notes:
--*/
#pragma once
// -----------------------------------------------------------------------------
//
// Macros used by MDD/PDD
//
// -----------------------------------------------------------------------------
#define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
#define FILE_DEVICE_RIL_INTERFACE 0xA00
#define IOCTL_RIL_POWERSUSPEND CTL_CODE(FILE_DEVICE_RIL, FILE_DEVICE_RIL_INTERFACE, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_RIL_POWERRESUME CTL_CODE(FILE_DEVICE_RIL, FILE_DEVICE_RIL_INTERFACE + 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define SAFE_PDD_CREATECOMMAND(buffer_ptr, buffer_size, hr, api_call) \
*( buffer_ptr ) = 0; \
( hr ) = ( api_call ); \
( buffer_ptr )[( buffer_size ) - 1] = 0;
// -----------------------------------------------------------------------------
//
// MDD data and functions used by PDD
//
// -----------------------------------------------------------------------------
extern BOOL g_fSignalQualityReceived;
extern RILSIGNALQUALITY g_rsq;
extern RILCALLINFO g_rgfCallStates[];
extern const DWORD g_rgdwCallTypes[];
extern const UINT NUM_CALLTYPES;
extern BOOL g_rfExternalCalltypeDetermination;
extern VOID SetCalltypeFromCallInfo(RILCALLINFO *prci);
extern BOOL SetupCallListEvaluation (void);
extern DWORD g_dwLastError;
extern void SendRilCPIMessage ( const RILCALLINFO *prciCallInfo );
extern BOOL GetRegistryPacketSupport( void );
extern BOOL GetRegistryEventLogging( __inout_bcount(cbData) BYTE *pData, DWORD& cbData);
extern CRITICAL_SECTION g_csCallStates;
// -----------------------------------------------------------------------------
//
// Parameters provided to MDD during initialization by PDD
//
// -----------------------------------------------------------------------------
typedef struct _RILPDDParams {
DWORD cbSize;
bool fRadioSignonRequired;
bool fIgnoreUnsolicitedNoCarrier;
PFN_CMD_PARSE pfnParseGetCurrentAddressId;
PFN_CMD_PARSE pfnParseATRInfo;
const LISTSTRINGMAP* plsmPhoneBookLocationCapsTable;
const UINT uiPhoneBookLocationCapsTableSize;
DWORD dwDevCapsSIMTKN_SetUpCall;
DWORD dwDevCapsSIMTKN_SendDTMF;
bool fNotificationPortSupported;
DWORD dwCRSMStatusCommandId;
UINT RestrictedSimAccessSetCmdParam3;
bool fGPRSQoSEmptyParameterListAllowed;
const LPCSTR* pstrPhoneBookLocationTable;
const UINT uiPhoneBookLocationTableSize;
bool fIsRadioOffInMinimumPowerState;
bool fDontTurnRadioOnIfAlreadyOn;
bool fSendSimCmdSupported;
bool fCRSMResponseQuoted;
PFN_CMD_PARSE pfnParseGetSimToolkitProfile;
PFN_CMD_PARSE pfnParseSendSimToolkitEnvelopeCmd;
bool fPowerManagementSupported;
PFN_CMD_PARSE pfnParseBuildInfo;
PFN_CMD_PARSE pfnParseBatteryInfo;
ENCODING_TYPE etMessageEncodingType;
PFN_CMD_PARSE pfnParsePostRebootDiagnostics;
DWORD dwPostRebootInitDelay;
const ERRORMAP* pemCMEErrorTable;
const UINT uiCMEErrorTableSize;
const ERRORMAP* pemCMSErrorTable;
const UINT uiCMSErrorTableSize;
const ERRORMAP* pemEXTErrorTable;
const UINT uiEXTErrorTableSize;
const char* pchSMSIntermediaryPrompt;
bool fIgnoreDeniedNotificationsUntilUnlock;
bool fRequireWaitingForSMSReady;
bool fRequireWaitingForSIMPhoneBookReady;
bool fExplicitRadioReadyNotification;
bool fSIMToolkit_SupportsTextNotifications;
bool fSIMToolkit_SupportsTextFormat;
bool fByteArrayIsQuoted;
bool fSetAudioDevicesSupported;
DWORD dwDefaultCOMMask;
ENCODING_TYPE etEncodingTECharset;
bool fSendRegStatusChangedAfterEveryReadyStateNotification;
bool fSignalQualityActualLevelSupported;
const INITSTRING_DATA* pisdInitStringDataTable;
const UINT uiInitStringDataTableSize;
PFN_CMD_PARSE pfnParseGetNITZSupported;
}RILPDDParams, *PRILPDDParams;
// -----------------------------------------------------------------------------
//
// PDD functions invoked by MDD
//
// -----------------------------------------------------------------------------
HRESULT PDD_Initialize(__out const RILPDDParams*& prppRILPDDParams);
HRESULT PDD_Deinitialize();
HRESULT PDD_RebootRadio();
HRESULT PDD_BeginRadioPowerOn();
HRESULT PDD_WaitForSIMReady();
HRESULT PDD_IsSIMPINNotification(__in const void* rpBlob, __in const UINT rcbBlob, __in const DWORD dwCode, __out bool& fSIMPIN);
HRESULT PDD_GetRilNdisObject(__in const CRilHandle* pRilHandle, __out CRilNDIS*& pRilNdis);
HRESULT PDD_GetRilInstanceNdisObject(__in const CRilInstanceHandle* pRilInstanceHandle, __out CRilInstanceNDIS*& pRilInstanceNdis);
HRESULT PDD_CreateCommand_SendDTMF(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in LPCSTR lpszChars, __out DWORD& dwDuration, __out UINT& uiNumVals);
HRESULT PDD_CreateCommand_StartDTMF(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in const char ch);
HRESULT PDD_CreateCommand_StopDTMF(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in const char ch);
HRESULT PDD_CreateCommand_ReleaseHeld(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd);
HRESULT PDD_CreateCommand_ReleaseCall(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in const DWORD dwID);
HRESULT PDD_CreateCommand_HoldActiveAcceptHeld(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd);
HRESULT PDD_CreateCommand_SetCurrentAddressId(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in const DWORD dwAddressId);
HRESULT PDD_CreateCommand_GetCurrentAddressId(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd);
HRESULT PDD_CreateCommand_GetATR(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd);
HRESULT PDD_CreateCommand_GetEquipmentInfo(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd);
HRESULT PDD_CreateCommand_SetupBeforeRadioOn(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in const bool fPrefixPresent);
HRESULT PDD_CreateCommand_CleanupBeforeRadioOff(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in const bool fPrefixPresent);
HRESULT PDD_CreateCommand_GetSimToolkitProfile(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd);
HRESULT PDD_CreateCommand_SetSimToolkitProfile(__out_ecount(cchCmd) LPSTR szCmd, size_t cchCmd, __in_ecount(cchSTKPS) LPCSTR szSTKProfileString, size_t cchSTKPS);
HRESULT PDD_CreateCommand_SimToolkitEnvelopeCmd(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in_ecount(dwSize) const BYTE* lpbCommand, __in const DWORD dwSize);
HRESULT PDD_CreateCommand_SIMTKCmdResponsePrefix(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in const DWORD dwResponseType);
HRESULT PDD_CreateCommand_SIMTKEventDownloadPrefix(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd);
HRESULT PDD_CreateCommand_BuildInfoQuery(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd);
HRESULT PDD_CreateCommand_BatteryInfoQuery(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd);
HRESULT PDD_CreateCommand_GetPostRebootDiagnostics(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd);
HRESULT PDD_CreateCommand_ChangeLockingPassword(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in const DWORD dwFacility, __in LPCSTR lpszOldPassword, __in LPCSTR lpszNewPassword);
HRESULT PDD_CreateCommand_TerminateSimToolkitSession(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in const DWORD dwCause);
HRESULT PDD_CreateCommand_EnableSignalQualityNotification(__out_ecount(cchCmd) LPSTR szCmd, __in const size_t cchCmd, __in const bool fEnable);
HRESULT PDD_CreateCommand_GetNITZSupported(__out_ecount(cchCmd) LPSTR szCmd, __in size_t cchCmd);
HRESULT PDD_GetResponseObject(__out CResponse*& pNewRsp, __in const CResponse* pSrcRsp=NULL);
HRESULT PDD_QueueResponse(__in CCommand* pCurrCommand, __inout CResponse* pRsp, __out bool& fQueueResponse);
HRESULT PDD_BeginGPRSContextDeactivation();
HRESULT PDD_IndicateCallActivityToAudioSubsystem(__in const bool fCallIsActive);
HRESULT PDD_SetDownlinkVolume(__in const DWORD dwDownlinkVolume);
HRESULT PDD_GetDownlinkVolume(__in const bool fNormalized, __out UINT& uiDownlinkVolume);
HRESULT PDD_GetUplinkVolume(__out UINT& uiUplinkVolume);
HRESULT PDD_SetUplinkVolume(__in const DWORD dwUplinkVolume);
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -