/*++
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.
Copyright (c) 2005-2009  Sierra Wireless America Inc.

Module Name:

rilext.h

This file contains all the constant, enumerations and structures

Notes:
Revision History:

Developer  |||  ClearQuest CR#   |||   DD MMM YYYY    |||               Description 

Giang Do         WINSW00008686          26 Mar 2008              FWUpdater might be stuck after Modem reset during FWUpdate if modem's UART is routing to external port
Mihir Shah       WINSW00008450          01 Apr 2008              Implement a feature to display EvDO Rev A icon
Mihir Shah       WINSW00008614          08 May 2008              Implement IOTA 2.4 functionality for Sprint
Giang Do         WINSW00009104          09 Sep 2008              AAM and Data tab to launch SWIOMADMClient.exe when interfacing with an OMADM-capable modem. Implement DS_GET_OMADM_CONFIG_CID.
Mihir Shah       WINSW00009422          24 Dec 2008              Add functionality in RIL driver to handle HAC audio profile
Mihir Shah       WINSW00009443          23 Jan 2009              Modify the device specific IOCTL DS_GET_VERNO_INFO to return OEM Aux version as well.
Giang Do         WINSW00009584          14 Apr 2009              Improve GPS tab to set/get FIX mode
Giang Do         WINSW00009823          29 May 2009              Start using RIL_DEVSPECIFIC of RILGSM. Give better explanation to DEVSPECIFICDATA usage
Mihir Shah       WINSW00009985          24 Aug 2009              Implement support for Verizon WPS - Wireless Priority Service
Mihir Shah       WINSW00011098          10 Jan 2010              RILGOBI: Implement support for ##DATA->Advanced menu for Sprint cert
Mihir Shah       WINSW00011336          01 Sep 2011              RILGOBI: Implement support for new Sprint requirements of ##CLEAR and ##RTN
--*/
#ifndef __RILEXT_H__
#define __RILEXT_H__

#include "ril.h"
#include "rildrv.h"

#ifndef __SWI_DATA_TYPES_H
#define __SWI_DATA_TYPES_H

typedef unsigned long		  U32;
typedef unsigned short		U16;
typedef unsigned char		  U8;
typedef unsigned __int64	U64;

typedef long  I32;
typedef short I16;
typedef char  I8;

#endif // __SWI_DATA_TYPES_H

#define MAX_RIL_MCC_LEN                          3
#define MAX_RIL_MNC_LEN                          2  
#define MAX_RIL_MIN2_LEN                        3
#define MAX_RIL_MIN1_LEN                        7
#define MAX_RIL_SP_MODE_STRING_LEN              6
#define MAX_RIL_DIR_NUMB_PCS_LEN               15
#define MAX_RIL_NV_ITEM_SIZE                  512   // HDR password field is already 127 TCHAR long!
#define SW_DEFAULT_RIL_API_TIMEOUT_MS         8000  // in mili seconds
#define LENGTH_SectorId                       16
#define LENGTH_WAPUri                         128
#define LENGTH_HdrUati                        16
#define MAX_RIL_OTASP_STRING_LEN              20    // from MAXLEN_OTASP_Dialstring

// Physical limit by FW.
#define MIP_MAX_PROFILES                        6
#define RIL_MAX_NAI_LENGTH                     72
#define RIL_LEN_PDP_MNAAASS                    16
#define RIL_LEN_PDP_MNHASS                     16

#define RIL_NCLASS_ALL_EVENTS                           RIL_NCLASS_ALL | RIL_NCLASS_DEVSPECIFIC

// ALWAYS RESERVED SOME EXTRA SPACE FOR MS TO GROW!!!!!!
#define RIL_REGSTAT_ROAM_FLASHING                       (0x00000010)      // @constdefine Registered on roaming network and icon flashing

//roaming mode
#define RIL_ROAMMODE_AUTOMATIC                          (0x00000010)      // @constdefine Network define Roaming (The effect of this setting is carrier dependent)
#define RIL_ROAMMODE_ROAMING_ONLY                       (0x00000011)      // @constdefine Network define Roaming (The effect of this setting is carrier dependent)

#define GET_FUNCTION_CODE(rilIOCTLCode) (((rilIOCTLCode) >> 2 ) & 0xFFF)

// More explanation on the usage convention of
// RILEQUIPMENTINFO
//      dwParams = RIL_PARAM_EI_MODEL | RIL_PARAM_EI_REVISION | RIL_PARAM_EI_SERIALNUMBER |RIL_PARAM_EI_MANUFACTURER
//      szManufacturer      contains <"Sierra Wireless">
//      szModel             contains <hw_rev_id_str>:<model number>
//      szRevision          contains <firmware version number>:<prl version number>
//      szSerialNumber      contains <ESN>

//additional call events

#define RIL_CALLEVENT_UNCHANGED                  (0x00000000)      // @constdefine call event unchanged
#define RIL_CALLEVENT_CONNECTED                  (0x00000001)      // @constdefine call event connected
#define RIL_CALLEVENT_DISCONNECTED               (0x00000002)      // @constdefine call event disconnected

#define RIL_DISCINIT_OFFLINE                    (0x1004)  /* phone is offline */
#define RIL_DISCINIT_CDMA_LOCK                  (0x1005)  /* phone is CDMA locked until power cycle */
#define RIL_DISCINIT_NO_SRV                     (0x1006)  /* phone has no service */
#define RIL_DISCINIT_FADE                       (0x1007)  /* Call has ended abnormally */
//#define RIL_DISCINIT_INTERCEPT                  (0x1008)  /* received intercept from BS - orig only */
//#define RIL_DISCINIT_REORDER                    (0x1009)  /* received reorder from BS - orig only */
//#define RIL_DISCINIT_REL_NORMAL                 (0x100A)  /* received release from BS - no reason given */
//#define RIL_DISCINIT_REL_SO_REJ                 (0x100B)  /* received release from BS - SO reject */
//#define RIL_DISCINIT_INCOM_CALL                 (0x100C)  /* received incoming call from BS */
//#define RIL_DISCINIT_ALERT_STOP                 (0x100D)  /* received alert stop from BS - incom only */
//#define RIL_DISCINIT_CLIENT_END                 (0x100E)  /* client ended the call */
//#define RIL_DISCINIT_ACTIVATION                 (0x100F)  /* received end activation - OTASP call only */
//#define RIL_DISCINIT_MC_ABORT                   (0x1010)  /* MC aborts the origination/conversation*/
//#define RIL_DISCINIT_NDSS_FAIL                  (0x1011)  /* Call orig or call failed due to NDSS failure */
#define RIL_DISCINIT_MAX_ACCESS_PROBE           (0x1012)  /* Tri-mode only (not supported) */
//#define RIL_DISCINIT_PSIST_NG                   (0x1013)  /* Persistence test failure (not supported) */
//#define RIL_DISCINIT_RUIM_NOT_PRESENT           (0x1014)  /* RUIM is not present (currently not supported) */
//#define RIL_DISCINIT_ACC_IN_PROG                (0x1015)  /* Access attempt already in progress (currently not supported) */
//#define RIL_DISCINIT_ACC_FAIL                   (0x1016)  /* Access failure for reason other than the above (currently not supported) */
#define RIL_DISCINIT_RETRY_ORDER                (0x1017)  /* ved retry order - origination only */
//#define RIL_DISCINIT_CONN_DENY                  (0x1018)  /* abort connection setup due to the reception of a ConnectionDeny msg */
//#define RIL_DISCINIT_PRL_NOT_PREFERRED          (0x1019)  /* not preferred by the PRL */
//#define RIL_DISCINIT_HDR_NO_SESSION             (0x101A)  /* no HDR session  */
//#define RIL_DISCINIT_CM_COLLOC_ACQ_FAIL         (0x101B)  /* only for internal CM use - Fail to acquire collocated HDR for origination*/
//#define RIL_DISCINIT_USER_CALL_ORIG_DURING_GPS  (0x101C)  /* Used if CM is ending a GPS call in favor of a user call */

#define RIL_DISCINIT_IS_OTASP_COMMIT            (0x0001)  /* implies otasp commit done */

//additional call types
#define RIL_CALLTYPE_PD                         (0x00000004)      // @constdefine Position Determination call
#define RIL_CALLTYPE_TEST                       (0x00000005)      // @constdefine test call
#define RIL_CALLTYPE_OTAPA                      (0x00000006)      // @constdefine OTAPA call
#define RIL_CALLTYPE_STD_OTASP                  (0x00000007)      // @constdefine std OTASP call
#define RIL_CALLTYPE_NON_STD_OTASP              (0x00000008)      // @constdefine non-std OTASP call
#define RIL_CALLTYPE_E911                       (0x00000009)      // @constdefine E911 call
#define RIL_CALLTYPE_PKT_DATA                   (0x0000000A)      // @constdefine packet data call
#define RIL_CALLTYPE_SMS                        (0x0000000B)      // @constdefine Position Determination call

#define RIL_CALLTYPE_PKTDATA_AND_VOICE          (0x00000100)      // @special used for ModemStat
#define RIL_CALLTYPE_PKTDATA_AND_TEST           (0x00000200)      // @special used for ModemStat
#define RIL_CALLTYPE_PKTDATA_AND_OTASP          (0x00000300)      // @special used for ModemStat


//Additional audio paths required by the OEMs
//purposefully starting from HEX 20 (Decimal 32) to give MSFT enough space to add its own audio profiles.
#define RIL_AUDIO_DS_TTY                        (0x0000001F)      // @constdefine TTY audio profile 
#define RIL_AUDIO_DS_HAC                        (0x00000020)      // @constdefine Hearing Aid Compatibility 
//Honeywell has been using 5 for bluetooth in their products. Honeywell is the only customer for voice enabled RILGOBI, just follow.....
#define RIL_AUDIO_BLUETOOTH                         (0x00000005)      // @constdefine Bluetooth 


typedef enum eHostBootType{
  CLEAN_BOOT,
  WARM_BOOT,
  COLD_BOOT
}HOST_BOOT_TYPE;


typedef enum                                                      // direct mapping from SWI_TYPE_CarrierID
{
	RIL_EXT_CARRIER_UNDEFINED						= -1,
	RIL_EXT_CARRIER_RESERVED						= 0,
	RIL_EXT_CARRIER_GENERIC,
	RIL_EXT_CARRIER_SPRINT,
	RIL_EXT_CARRIER_BELL,
	RIL_EXT_CARRIER_TELUS,
	RIL_EXT_CARRIER_VZW,
	RIL_EXT_CARRIER_WESTERNWIRELESS,
	RIL_EXT_CARRIER_SMARTCOM,
	RIL_EXT_CARRIER_ALLTEL,
	RIL_EXT_CARRIER_USCELLULAR,
	RIL_EXT_CARRIER_T_SPRINT,
	RIL_EXT_CARRIER_T_BELL,
	RIL_EXT_CARRIER_T_TELUS,
	RIL_EXT_CARRIER_T_VZW,
	RIL_EXT_CARRIER__CHINAUNICOM,
	RIL_EXT_CARRIER_HUTCHISONTHAILAND,
	RIL_EXT_CARRIER_MOVILNET,
	RIL_EXT_CARRIER_TARJETAS_IUSACELL_MEXICO,
	RIL_EXT_CARRIER_TELECOMNEWZEALAND,
	RIL_EXT_CARRIER_RELIANCE,
	RIL_EXT_CARRIER_TELSTRA,
	RIL_EXT_CARRIER_MOBILITYCANADA,
	RIL_EXT_CARRIER_VZW_PUERTO_RICO,
	RIL_EXT_CARRIER_PELEPHONE,
	RIL_EXT_CARRIER_BELL_CANADA,
	RIL_EXT_CARRIER_INDOSOL_INDONESIA,
	RIL_EXT_CARRIER_MIDWEST_WIRELESS,
	RIL_EXT_CARRIER_BELL_SOUTH_CHILE,
	RIL_EXT_CARRIER_BELL_SOUTH_PANAMA,
	RIL_EXT_CARRIER_TATA
} RIL_EXT_CARRIER_ID_TYPE;

// ==================================================================== //
// =======================     RIL DEVSPECIFIC structure  ==================== //
// ==================================================================== //
typedef struct tagDEVSPECIFICDATA
{
    DWORD dwcbSize;     // size (in byte) of the variable length dwData 
    DWORD dwAction;
    DWORD dwData;       // &(LPDEVSPECIFICDATA->dwData) is the start of a byte array or string or a data structure.
} DEVSPECIFICDATA, *LPDEVSPECIFICDATA;
// ==================================================================== //
// =======================     MSL INFO structure  ==================== //
// ==================================================================== //

typedef enum ePREF_CALL_SO
{
  SO_VOICE_WILD				  = 0x0000,
  SO_VOICE_IS96A              = 0x0001,
  SO_LOOPBACK_8K              = 0x0002,
  SO_VOICE_EVRC               = 0x0003,
  SO_ASYNCDATA_9_6K           = 0x0004,
  SO_GROUP3_FAX_9_6K          = 0x0005,
  SO_SMS_RATESET1             = 0x0006,
  SO_PKT_DATA                 = 0x0007,
  SO_LOOPBACK_13K             = 0x0009,
  SO_ASYNCDATA_14_4_OR_9_6K   = 0x000C,
  SO_GROUP3_FAX_14_4_OR_9_6K  = 0x000D,
  SO_SMS_RATESET2             = 0x000E,
  SO_PKT_DATA_14_4K           = 0x000F,
  SO_13K_IS733		          = 0x0011,
  SO_OTAPA_RATESET1           = 0x0012,
  SO_OTAPA_RATESET2           = 0x0013,
  SO_MDR_PKT_DATA_FRS1_RRS1   = 0x0016,
  SO_MDR_PKT_DATA_FRS1_RRS2   = 0x0017,
  SO_MDR_PKT_DATA_FRS2_RRS1   = 0x0018,
  SO_MDR_PKT_DATA_FRS2_RRS2   = 0x0019,
  SO_FULL_TDSO                = 0x0020,
  SO_LOOPBACK_1XHSPD          = 0x0021,
  SO_MARKOV_1XRTT             = 0x0036,
  SO_LOOPBACK_1XRTT           = 0x0037,
  SO_SELECTABLE		          = 0x0038,
  SO_4GV_NARROW_BAND          = 0x0044,
  SO_4GV_WIDE_BAND            = 0x0046,
  SO_VOICE_13K                = 0x8000,
  SO_VOICE_IS96               = 0x8001,
  SO_MARKOV                   = 0x8002,
  SO_WVRC                     = 0x8023,
  SO_TDSO                     = 0x8008,
  SO_MARKOV_13K               = 0x801C,
  SO_RS1_MARKOV               = 0x801E,
  SO_RS2_MARKOV               = 0x801F,
  SO_MDR_DPT_FRS1_RRS1        = 0x8024,
  SO_MDR_DPT_FRS2_RRS2        = 0x8025,
}PREF_CALL_SO_TYPE;

typedef enum eMSL_SET_MSK
{
  eMSLDirNum =         0x00000001,
  eMSLMCC =            0x00000002,
  eMSLMNC =            0x00000004,
  eMSLMIN2 =           0x00000008,
  eMSLMIN1 =           0x00000010,
  eMSLSlotCycleIndex = 0x00000020,
  eMSLACCOLC         = 0x00000040,
  eMSLPrefCallSO     = 0x00000080,
  eMSLSID            = 0x00000100,
  eMSLActiveNam      = 0x00000200,
  eMSLPrlVerNum      = 0x00000400,
  eMSLTotalUpTime    = 0x00000800,
  eMSLPriChecksum    = 0x00001000,
  eMSLPPrev          = 0x00002000,
}MSL_GET_SET_MSK;


typedef enum eMODE_PREF
{
    RIL_MODE_PREF_AUTOMATIC=0,   /* Determine mode automatically, */
    RIL_MODE_PREF_CDMA_ONLY,    /* CDMA only mode, */
    RIL_MODE_PREF_HDR_ONLY,     /* HDR only mode, */
} RIL_MODE_PREF_E_TYPE;

typedef enum eHDR_HYBR_PREF
{
  RIL_HDR_HYBR_PREF_OFF=0,   /*HDR Hybrid Pref setting OFF */
  RIL_HDR_HYBR_PREF_ON,      /*HDR Hybrid Pref setting ON */
} RIL_HDR_HYBR_PREF_E_TYPE;

typedef enum eDM_MODE
{
    RIL_PURE_DM_MODE=0,       /* RIL releases control off SWI and call SetTetherdMode to route modem's UART1 to external port*/
    RIL_FWUPDATE_DM_MODE_ONLY,/* RIL releases control off SWI ONLY */
} RIL_START_DM_MODE_E_TYPE;

typedef struct tagRILMSLINFO
{
  DWORD               cbSize;                                    // size in byte of the structure
  DWORD               dwMSLGetSetMsk;                            // MSL_GET_SET_MSK combination. For GetMSL, only valid data have GET mask enabled.
  DWORD               dwESN;                                    // ESN number of the modem                   

  WORD                wNAMNumber;                                // For GET: The response's value is the active NAM number
                                                                // For SET: should be 0 for now.
  WORD                wDirNumLen;                                // Length of the MDN number
  TCHAR               szDirNumber[MAX_RIL_DIR_NUMB_PCS_LEN+1];  // Pointer to the MDN buffer
  TCHAR               szMCC[MAX_RIL_MCC_LEN+1];                  // Pointer to the MCC buffer
  TCHAR               szMNC[MAX_RIL_MNC_LEN+1];                  // Pointer to the MNN buffer

  TCHAR               szMIN2[MAX_RIL_MIN2_LEN+1];                // Pointer to the MIN2 buffer
  TCHAR               szMIN1[MAX_RIL_MIN1_LEN+1];                // Pointer to the MIN1 buffer

  WORD                bySlotCycleIndex;                          // 0 - 7   
  WORD                byACCOLC;                                  // 0 -15 

  // All under the same mask of eMSLPrefCallSO
  BOOL                isEVRCEnabled;                            // is EVRC enabled or not
  PREF_CALL_SO_TYPE   eHomeOrigPrefCallSO;                      // voice service option for home originate
  PREF_CALL_SO_TYPE   eHomePagePrefCallSO;                      // voice service option for home paging
  PREF_CALL_SO_TYPE   eRoamPrefCallSO;                          // voice service option for roam

  WORD                wSIDNumber;                                // SID number
  WORD                wNIDNumber;                                // NID number

  WORD                wPrlVerNum;                     // version number of the PRL stored in the modem 
  DWORD               dwTotalUpTime;                  // Total up time in minutes
  WORD                wPPrev;                          // PPrev

}RILMSLINFO, *LPRILMSLINFO;
//11098 - Advanced menu structure required for Sprint
typedef struct tagRILADVMENU
{
  WORD wSCI;
  WORD wSCM;
  WORD wRegHomeSID;
  WORD wRegForeignSID;
  WORD wRegForeignNID;
  WORD wHomeSID;
  WORD wHomeNID;
  WORD wAccolc;
}RILADVMENU, *LPRILADVMENU;



#define RIL_MAX_BUF                     128
//version no details
typedef struct tagRILVERNOINFO {
  TCHAR   szSWVersion[RIL_MAX_BUF];
  TCHAR   szVerDir[RIL_MAX_BUF];     // version directory 
  TCHAR   szVerBootLoader[RIL_MAX_BUF];     // boot loader version 
  WORD    wMobFirmRev;                    // Firmware Rev 
  WORD    wPrlVerNum;                     // version number of the PRL stored in the modem 
  TCHAR   szApiHwRevIdStr[RIL_MAX_BUF]; // AirPrime Hardware Version as a null-terminated string
  BYTE    byEriFilePresent;               // Indicates if an ERI file is currently present in the modem
  WORD    wEriFileVerno;                 // If byEriFilePresent is non-zero, indicates the version number of the ERI file in the modem 
  TCHAR   szESN[RIL_MAX_BUF];     // ESN information //for UMTS this is used for IMSI
  TCHAR   szSWISDKVersion[RIL_MAX_BUF];
  TCHAR   szSWIVSPVersion[RIL_MAX_BUF];
  TCHAR   szPRIVersion[RIL_MAX_BUF];
  //9443 - Modify the device specific IOCTL DS_GET_VERNO_INFO to return OEM Aux version as well.
  TCHAR   szOEMAuxVersion[RIL_MAX_BUF*2];// will return the version of OEM Aux
  TCHAR   szIMEI[RIL_MAX_BUF];
  TCHAR   szMEID[RIL_MAX_BUF];
} RILVERNOINFO;

// ==================================================================== //
// =======================    NV item & structure  ==================== //
// ==================================================================== //

// --------------------- Specific NV data structure    ---------------- //

#define     NV_I_ESN                  0
// Data structure used for this item
// Use DWORD

// -------------------------------------------------------------------- //

#define     NV_I_PAP_USERID           1
// Data structure used for this item

#define MAX_PAPUSER_ID_LEN            127
typedef struct tagRILPAPUSERID
{
  DWORD         cbSize;                           // size of this structure
  DWORD         dwLength;                         // Length of the szUserID
  TCHAR          szUserID[MAX_PAPUSER_ID_LEN + 1]; // SIP UserID
}RILPAPUSERID, *LPRILPAPUSERID;

// -------------------------------------------------------------------- //

#define     NV_I_PPP_PASSWORD           2
// Data structure used for this item

#define MAX_PPP_PASSWORD_LEN            127
typedef struct tagRILPPPPASSWORD
{
  DWORD         cbSize;                               // size of this structure
  DWORD         dwLength;                             // Length of the szPassword
  TCHAR          szPassword[MAX_PPP_PASSWORD_LEN + 1]; // SIP Password
}RILPPPPASSWORD, *LPRILPPPPASSWORD;

// -------------------------------------------------------------------- //
#define     NV_I_QCMIP                  3
// Data structure used for this item

//MIP preference values
#define RIL_DS_QCMIP_SIP_ONLY   0
#define RIL_DS_QCMIP_MIP_PREF   1
#define RIL_DS_QCMIP_MIP_ONLY   2

typedef struct tagRILQCMIP
{
  DWORD         cbSize;                               // size of this structure
  DWORD          dwPreference; 
}RILQCMIP, *LPRILQCMIP;

// -------------------------------------------------------------------- //
#define     NV_I_MIP_DMU_MN_AUTH         4
// Data structure used for this item

typedef struct tagRILDMUMNAUTH
{
  DWORD         cbSize;                               // size of this structure
  BYTE          byData[5]; 
}RILDMUMNAUTH, *LPRILDMUMNAUTH;

#define     NV_I_MOB_CAI_REV             5
//Data structure used for this item

typedef struct tagRILMOBCAIREV
{
  DWORD         cbSize;
  DWORD         dwCaiRev;
}RILMOBCAIREV, *LPRILMOBCAIREV;

#define     NV_I_NV_PREF_VOICE_SO        6
//Data structure used for this item

typedef struct tagRILPREFVOICESO
{
  DWORD         cbSize;
  BOOL          bEnable;
  WORD          wHomePageVoiceSO;
  WORD          wHomeOrigVoiceSO;
  WORD          wRoamOrigVoiceSO;
}RILPREFVOICESO, *LPRILPREFVOICESO;

#define     NV_I_NV_TERM_HOME           7    //TermHome
//Data structure used for this item
typedef struct tagRILTERMHOME
{
  DWORD         cbSize;
  DWORD         dwTermHomeEnable;
}RILTERMHOME, *LPRILTERMHOME;

#define     NV_I_NV_TERM_SID            8   // TermSid
//Data structure used for this item
typedef struct tagRILTERMSID
{
  DWORD         cbSize;
  DWORD         dwTermSidEnable;
}RILTERMSID, *LPRILTERMSID;

#define     NV_I_NV_TERM_NID            9   // TermNid
//Data structure used for this item
typedef struct tagRILTERMNID
{
  DWORD         cbSize;
  DWORD         dwTermNidEnable;
}RILTERMNID, *LPRILTERMNID;

#define     NV_I_NV_LOCK_CODE           10   // ModemAccessLockCode
//Data structure used for this item
#define MAX_LOCK_CODE_LEN               4

typedef struct tagRILMODACCSLOCKCODE
{
  DWORD         cbSize;                               // size of this structure
  DWORD         dwLength;                             // Length of the szLockCode
  TCHAR         szLockCode[MAX_LOCK_CODE_LEN + 1];    // Modem Access Lock code
}RILMODACCSLOCKCODE, *LPRILMODACCSLOCKCODE;

#define     NV_I_NV_SCM                 11  // Station Class Mark" 
//Data structure used for this item
// ???

#define     NV_I_HDR_USERID             12
// Data structure used for this item

#define MAX_HDRUSER_ID_LEN              127
typedef struct tagRILHDRUSERID
{
  DWORD         cbSize;                           // size of this structure
  DWORD         dwLength;                         // Length of the szUserID
  TCHAR          szUserID[MAX_HDRUSER_ID_LEN + 1]; // HDR UserID
}RILHDRUSERID, *LPRILHDRUSERID;

// -------------------------------------------------------------------- //

#define     NV_I_HDR_AAA_PASSWORD       13
// Data structure used for this item

#define MAX_HDR_AAA_PASSWORD_LEN        127
typedef struct tagRILHDRAAAPASSWORD
{
  DWORD         cbSize;                               // size of this structure
  DWORD         dwLength;                             // Length of the szPassword
  TCHAR          szPassword[MAX_HDR_AAA_PASSWORD_LEN + 1]; // HDR AAA Password
}RILHDRAAAPASSWORD, *LPRILHDRAAAPASSWORD;


#define     NV_I_GENERAL_FEATURE_SUPPORT      14
// Data structure used for this item
// Use DWORD

typedef enum eGPSFixMode
{
  RIL_GPS_FIX_MODE_AUTONOMOUS          = 1, //Mobile does everything involved in computing its position.  No PDE required
  RIL_GPS_FIX_MODE_MS_BASED            = 2, //Mobile gets assistance from the PDE but the mobile computes position.
  RIL_GPS_FIX_MODE_MS_ASSISTED         = 3, //Mobile provides information to the PDE so that the PDE can compute the mobiles position.
  RIL_GPS_FIX_MODE_OPTIMIZED_SPEED     = 4, //MS Based or MS Assisted depending on Performance and Accuracy settings.
  RIL_GPS_FIX_MODE_OPTIMIZED_ACCURACY  = 5, //MS-Assisted preferred, MS-Based if MS-Assisted fails
  RIL_GPS_FIX_MODE_OPTIMIZED_DATA      = 6, //MS-Based preferred, MS-Assisted if MS-Based fails
} RIL_GPS_FIX_MODE;

// -------------------------------------------------------------------- //

// -------------------------------------------------------------------- //
// ------------------- NV generic r/w structure       ----------------- //
// -------------------------------------------------------------------- //

//NVM read command structure
typedef struct tagRILGETNVMITEM               
{
  DWORD         dwItem;                             // one of the NV_I_XXX item
  DWORD         dwExtraIndex;                       // some NV_I_XXX item has sub index.
}RILGETNVMITEM, *LPRILGETNVMITEM;

// DS_GETMSL_ID (NVM read) result structure
typedef struct tagRILNVMITEMINFO
{
  DWORD     dwItem;
  BYTE        chData[MAX_RIL_NV_ITEM_SIZE];        // Specific data structure for the corresponding NV item
}RILNVMITEMINFO, *LPRILNVMITEMINFO;

// -------------------------------------------------------------------- //

//NVM write command structure
typedef struct tagRILSETNVMITEM               
{
  DWORD     dwItem;
  DWORD     dwDataLen;
  BYTE      chData[MAX_RIL_NV_ITEM_SIZE];
}RILSETNVMITEM, *LPRILSETNVMITEM;

// set and get PDSM param
typedef struct tagRILSETGETPAParam  
{
	DWORD			dwsizeStruct; 
	DWORD			dwIPAddress;
	DWORD			dwPortID;
	DWORD			dwGpsLock;		// See GPS Lock Values above
	DWORD			dwTransportMech;	// See Transport Mechanism Values above
	DWORD			dwPrivacy;		// See Privacy Values above
	DWORD			dwNetworkAccess;	// See Network Access Level above
	DWORD			dwFixRate;				// Fix Rate stored in the modem
	BYTE			bAutoTrack;				// 0 no auto track, 1 track start when USB message is sent
	WORD            wFixMode;       // One of RIL_GPS_FIX_MODE
}RILSETGETPAParam, *LPRILSETGETPAParam;

// Get  PDSM Data
typedef struct tagRILGETPAData 
{
  DWORD			dwsizeStruct;
	DWORD			dwLatitude;
	DWORD			dwLongitude;
	DWORD			dwTimeStamp;		// Timestamp of the location response(CDMA System Time)
	DWORD			dwLocUncAngle;	// In units of 5.625 degrees 
	DWORD			dwLocUncA;
	DWORD			dwLocUncP;
	DWORD			dwFix;			//  0x0000 = 2-D fix, 0x0001 = 3-D fix
	DWORD			dwHeightIncl;	//	0x0000 = Height info not available, 0x0001 = Height info included
	DWORD			dwAltitude;		//  If iHeightIncl = 0x0001, this field is valid
	DWORD			dwLocUncVe;		//	If iHeightIncl = 0x0001, this field is valid
	DWORD			dwVelocityIncl;	//  0x0000 = Velocity info not available, 0x0001 = Velocity info included
	DWORD			dwHeading;		//  Valid if iVelocityInc = 0x0001
	DWORD			dwVelHoriz;		//  Valid if iVelocityInc = 0x0001
	DWORD			dwVelVert;		//  Valid if iVelocityInc = 0x0001
}RILGETPAData, *LPRILGETPAData;


// PDSM_PD_DLOAD_DATA
typedef struct tagRILGETPADLDData 
{
	DWORD	dwsizeStruct;     
	DWORD	dwValidEntryPairNum;
	DWORD	dwDataType1;
	DWORD	dwSource1;
	DWORD	dwDataType2;
	DWORD	dwSource2;
	DWORD	dwDataType3;
	DWORD	dwSource3;
	DWORD	dwDataType4;
	DWORD	dwSource4;
	DWORD	dwDataType5;
	DWORD	dwSource5;
}RILGETPADLDData,*LPRILGETPADLDData;


// PDSM_PD_TRACK
typedef struct tagRILPDSMPATrack 
{
	DWORD	dwsizeStruct;
	DWORD dwFixType;
	DWORD dwPerformance;	//	0x0001 - 0x00FF seconds
	DWORD	dwAccuracy;		//	0x00000000 - 0xFFFFFFF0 meters
	DWORD	dwFixCount;		//	0 - 999 fixes -OR- 1000 for continuous fixes
	DWORD	dwFixRate;		//	0 - 1,799,999 seconds 
}RILPDSMPATRK,*LPRILPDSMPATRK;


//PDSM_PD_END_SESSION
typedef struct tagRILPDSMPDEndSession 
{
  DWORD				dwsizeStruct;     
	DWORD				dwSessionType;	//	0x0000 = Location Fix, 0x0001 = Downlaod
}RILPDSMPDENDSESN,*LPRILPDSMPDENDSESN;


// PDSM - Session Type Values
enum RIL_PDSM_SessionType
{
	RIL_PDSM_PD_LocationFix,
	RIL_PDSM_PD_Download
};
// ==================================================================== //
// =======================  Validate SPC Code      ==================== //
// ==================================================================== //

// -------------------------------------------------------------------- //

typedef struct tagRILSPMODE
{
  DWORD        dwSpCode;
  DWORD        dwSpMode;        // return from modem response to tell what SP mode is in

}RILSPMODE, *LPRILSPMODE;

// SpMode will contain one of the 2 following values only.
// Other than these two values should be treated as RIL_RESULT_ERROR
#define SP_MODE_OTKSL         1
#define SP_MODE_MSL           2

typedef struct tagRILPDPLIST{
    BOOL     bIsActiveIndexSelected;            // FALSE if no profile has been selected to be active
    DWORD     dwActiveIndex;                     // If bIsActiveIndexSelected then dwActiveIndex is the selected one (should be less than MIP_MAX_PROFILES)
    BOOL     bIsProfileEnabled[MIP_MAX_PROFILES];  // FALSE if the corresponding profile is not enabled
} RILPDPLIST;

typedef struct tagRILPDPPAYLOAD{
    TCHAR     szNAI[RIL_MAX_NAI_LENGTH+1];            // NULL terminated string
    BOOL      bSet_MN_HA_SPI;
    DWORD     dwMN_HA_SPI;
    BOOL      bSet_MN_AAA_SPI;
    DWORD     dwMN_AAA_SPI;
    BOOL      bRev_Tunnel_pRef;
    DWORD      dwHome_Addr;
    DWORD     dwPrim_HA_Addr;
    DWORD     dwSec_HA_Addr;
    BYTE      wMN_HA_SS_Len;                          // [IN] when writing and [OUT] when reading
    TCHAR      szMN_HA_SS[RIL_LEN_PDP_MNHASS+1];       // CANNOT be NULL terminated string
    BYTE      wMN_AAA_SS_Len;                         // [IN] when writing and [OUT] when reading
    TCHAR     szMN_AAA_SS[RIL_LEN_PDP_MNAAASS+1];     // BECAUSE these "Shared secret" may contains NULL character in the middle of the string
} RILPDPPAYLOAD;

typedef struct tagRILGETORSETPDP{
    DWORD dwIndex;                          // [IN] index of the PDP to read/write
    RILPDPPAYLOAD payload;                  // [OUT] payload data
} RILGETORSETPDP;  

typedef struct tagRILDIALEX{
    char  szAddress[MAXLENGTH_ADDRESS]; // @parm address to dial (no longer than <def MAXLENGTH_ADDRESS> chars)
    DWORD dwType;                       // @parm type of the call to establish (SHOULD be CALLTYPE_TEST or greater)
    DWORD dwOptions;                    // @parm dialing options (one of the PREF_CALL_SO_TYPE)
} RILDIALEX;

typedef struct tagRIL_CallConnected{
  DWORD               dwsizeStruct;
  DWORD               dwCalltypeState;
  DWORD						    dwSo;
} RIL_CallConnected;


// ******************************************************************** //
// ******************** End of data structure section ***************** //
// **************** Start of DEV SPECIFIC CMD ID section ************** //
// ******************************************************************** //

// ******************************************************************** //
// DEV SPECIFIC COMMAND ID:
// ========================

#define DS_SET_A_PDP_ITEM_CID                             2
// Purpose: Save a MIP profile to the modem
// Command:
// ========
// Pointer to RILGETORSETPDP for index and payload specification

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GET_A_PDP_ITEM_CID                             3
// Purpose: Read out a MIP profile from the modem
// Command:
// ========
// Pointer to RILGETORSETPDP for index specification

// Response:
// =========
// Pointer to RILGETORSETPDP or standard RIL_RESULT_ERROR

// ******************************************************************** //

#define DS_GET_PDP_LIST_CID                               5
// Purpose: Get the summary list of all MIP profile stored in the modem
// Command:
// ========
// No param

// Response:
// =========
// Pointer to RILPDPLIST or standard RIL_RESULT_ERROR

// ******************************************************************** //

#define DS_START_MODEM_DEBUG_CID                          10
// Purpose: Ask the RIL to start polling for 1X network statistic and report it via RIL_NOTIFY_MODEM_DBG_INFO
// Command:
// ========
// No Param

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_STOP_MODEM_DEBUG_CID                           11
// Purpose: Ask the RIL to stop polling for 1X network statistic and therefore stop reporting it via RIL_NOTIFY_MODEM_DBG_INFO
// Command:
// ========
// No Param

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GETMSL_CID                                     12
// Purpose: Get the modem's MIN, MDN and other mdeom's provisioning related data
// Command:
// ========
// No Param

// Response:
// =========
// Pointer to RILMSLINFO or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_SETMSL_CID                                     13
// Purpose: Save the modem's MIN, MDN and other mdeom's provisioning related data (manual provisioning feature in CDMA)
// Command:
// ========
// RILMSLINFO with selective mask combination and valid NAM

// Response:
// =========
// RIL_RESULT_OK (the mask will be clear on item that cannot
//                be saved on to the modem) or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_VALIDATE_SPC_CID                               14
// Purpose: Validate the MSL (aka SPC) code with the modem
// Command:
// ========
// Pointer to RILSPMODE

// Response:
// =========
// Pointer to RILSPMODE (answer is in dwSpMode) or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GETNVMITEM_CID                                 17
// Purpose: Read modem's NV data
// Command:
// ========
// Pointer to RILGETNVMITEM

// Response:
// =========
// Pointer to RILNVMITEMINFO or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_SETNVMITEM_CID                                 18
// Purpose: Save NV data to the modem.
// Command:
// ========
// Pointer to RILSETNVMITEM

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GET_SYS_MODE_PREF_CID                          21
// Purpose: Get the CDMA modem's network preference setting such as 1X Only vs Hybrid
// Command:
// ========
// No param

// Response:
// =========
// DWORD with values being one of RIL_MODE_PREF_E_TYPE values
// ******************************************************************** //

#define DS_SET_SYS_MODE_PREF_CID              23
// Purpose: Save the CDMA network preference setting to the modem
// Command:
// ========
// DWORD: one of RIL_MODE_PREF_E_TYPE values

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_SELECT_ACTIVE_PDP_CID                          25
// Purpose: Select a MIP profile as the default for the modem to use to establish the data call
// Command:
// ========
// Pointer to DWORD for index specification

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //
#define DS_SET_LOCATION_MODE_CID                          31
// Purpose: Set location tracking ON or OFF. OFF means network can ONLY track the modem while in emergency mode
// Command:
// ========
// DWORD: one of RIL_LOCATION_* values

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************//

#define DS_START_PT_MODE_CID                              32
// Purpose: Ask the RIL to call SetTetheredMode to start routing the modem's UART1 to the external port.
//          This feature should only be used with a modem that provides DM over UART1.
// Command:
// ========
// no param

// Response:
// =========
//RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_STOP_PT_MODE_CID                               33
// Purpose: Ask the RIL to call SetTetheredMode to stop routing the modem's UART1 to the external port.
//          This feature should only be used with a modem that provides DM over UART1.
// Command:
// ========
// No param

// Response:
// =========
//RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GET_PT_MODE_CID                                34
// Purpose: Ask the RIL to return the current PT mode.
// Command:
// ========
// No param

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR. DWORD represents TRUE or FALSE
// ******************************************************************** //

#define DS_GET_PACKET_DATA_STATUS_CID                     41
// Purpose: Ask the RIL about the current status of the packet data call.
// Command:
// ========
// no param

// Response:
// =========
// Pointer to RILPACKETDATASTATUS_ADV or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_START_DM_MODE_CID                              42
// Purpose: Ask the RIL to stop communicating to the modem. Ignore the modem completely no matter what happens.
//          Do not call SetTetheredMode if the DM mode type is RIL_FWUPDATE_DM_MODE_ONLY
//          Also, the RIL needs to make sure that the system will stay on D0 forever
// Command:
// ========
// DWORD: one of RIL_START_DM_MODE_E_TYPE values

// Response:
// =========
//RIL_RESULT_OK or standard RIL_RESULT_ERROR

// ******************************************************************** //

#define DS_STOP_DM_MODE_CID                               43
// Purpose: Ask the RIL to resume the communication with the modem by first forcing a HW power off and on to the modem.
// Command:
// ========
// No param

// Response:
// =========
//RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_EXIT_911_MODE                                  44
// Purpose: Ask the modem to exit emergency mode.
// Command:
// ========
// No Param

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************//

#define DS_GET_VERNO_INFO                                 45
// Purpose: Return the same set of information that RIL_GetEquipmentInfo provides plus the following information:
//                 ERI version, OEMAUX version, PRI version, Boot Loader version of the modem
// Command:
// ========
// No Param

// Response:
// =========
// pointer to RILVERNOINFO structure or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GET_CARRIER_CHANGED_IND                        46
// Purpose: Ask the RIL to see if there is a carrier changed (useful when swapping the CDMA modem during the test)
// Command:
// ========
// No Param

// Response:
// =========
// Pointer to RILCARRIERINFO structure
// ******************************************************************//


#define DS_GET_MIN_ACTIVE_STATE_CID                       51
// Purpose: Get the activatation state of the modem. (CDMA only)
// Command:
// ========
// No Param

// Response:
// =========
// Pointer to RILMINACTIVESTATE or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GET_TEST_MODE_CID                              52
// Purpose: Check to see if the RIL is under the test mode with special PRL setting.
// Command:
// ========
// No Param

// Response:
// =========
// BOOL value (TRUE if test mode is enabled) or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_DIAL_EX_CID                                    53
// Purpose: CDMA only. Allow to dial out a test number with special service option.
// Command:
// ========
// Pointer to RILDIALEX

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GET_HDR_HYBR_PREF_CID                          54
// Purpose: Query the current HDR Hybrid Pref setting from the modem.
// Command:
// ========
// No param

// Response:
// =========
// DWORD with values being one of RIL_HDR_HYBR_PREF_E_TYPE values
// ******************************************************************** //

#define DS_SET_HDR_HYBR_PREF_CID                          55
// Purpose: Save the HDR HYBR pref setting to th modem.
// Command:
// ========
// DWORD: one of RIL_HDR_HYBR_PREF_E_TYPE values

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_SET_IOTA_DISABLE_CID                           56
// Purpose: Turn on/off the IOTA notification.
// Command:
// ========
// DWORD: TRUE Disable IOTA   Note: this will disable RIL_NOTIFY_IOTA_STATUS and RIL_NOTIFY_IOTA_WAPPUSH  notifications
//        FALSE  Enable IOTA  Note: this will enable RIL_NOTIFY_IOTA_STATUS and RIL_NOTIFY_IOTA_WAPPUSH  notifications

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GET_IOTA_DISABLED_CID                          57
// Purpose: Get the current IOTA notification setting.
// Command:
// ========
// No param

// Response:
// =========
//  DWORD:  TRUE  IOTA Disabled   // if disabled for sprint then it is an error we need to enable using DS_SET_IOTA_DISABLE_CID
//          FALSE IOTA Enabled
// ******************************************************************** //

#define DS_IOTA_START_CID                                 58
// Purpose: Ask the modem to start IOTA session
// Command:
// ========
// No param

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// start CIIP IOTA session
// ******************************************************************** //

#define DS_IOTA_STOP_CID                                  59
// Purpose: Ask the modem to stop IOTA session
// Command:
// ========
// No param

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// STOP CIIP/NIIP/NISP IOTA session
// ******************************************************************** //

#define DS_START_HDR_TECH_CID                             60
// Purpose: Ask the RIL to start EV network statistic notification.
// Command:
// ========
// No Param
// start the HDR tech notification. 
// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_STOP_HDR_TECH_CID                              61
// Purpose: Ask the RIL to stop EV network statistic notification
// Command:
// ========
// No Param

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GET_IOTA_LOG_CID                               62
// Purpose: Get the IOTA log that is stored on the modem.
// Command:
// ========
// No param

// Response:
// =========
// Result is  TCHAR* with Log Data.
// ******************************************************************** //

#define DS_GET_IOTA_LOG_SIZE_CID                          63
// Purpose: Get the size of the IOTA log that is stored on the modem. Allocate enough storage data with this size before calling DS_GET_IOTA_LOG_CID
// Command:
// ========
// No param

// Response:
// =========
// DWORD with size of the log
// ******************************************************************** //

#define DS_GET_PDSM_PA_PARAM_CID                          64
// Purpose: Get the GPS default setting from the modem 
// Command:
// ========
// No param

// Response:
// =========
// Pointer to RILSETGETPAParam structure
// ******************************************************************** //

#define DS_SET_PDSM_PA_PARAM_CID                          65
// Purpose: Save the GPS setting to the modem.
// Command:
// ========
// RILSETGETPAParam contains params

// Response:
// =========
//RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GET_PDSM_PA_DATA_CID                           66
// Purpose: Get the GPS data from the modem (single fix for testing purpose only)
// Command:
// ========
// RILSETGETPAParam contains params

// Response:
// =========
//RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_START_PDSM_LOC_NOTIF_STATUS_CID                67
// Purpose: Start GPS tracking for testing purpose
// Command:
// ========
// No param

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_START_PDSM_DLD_NOTIF_STATUS_CID                68
// Purpose: Start notification for almanac download event
// Command:
// ========
// No param

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_STOP_PDSM_LOC_NOTIF_STATUS_CID                 69
// Purpose: Stop GPS tracking notification
// Command:
// ========
// No param

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_STOP_PDSM_DLD_NOTIF_STATUS_CID                 70
// Purpose: Stop notification for almanac download event
// Command:
// ========
// No param

// Response:
// =========
// RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_PDSM_START_TRACK_CID                           71
// Purpose: Start GPS tracking
// Command:
// ========
// RILPDSMPATRK contains params to start the track session

// Response:
// =========
//RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_PDSM_END_SESSION_CID                           72
// Purpose: Stop GPS tracking
// Command:
// ========
// RILPDSMPDENDSESN contains Ending command

// Response:
// =========
//RIL_RESULT_OK or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GET_DM_MODE_CID                                73
// Purpose: Query the RIL to check if the RIL is in DM mode or not.
// Command:
// ========
// none

// Response:
// =========
// RIL_RESULT_OF with TRUE or FALSE to indicate in DM mode or not
// ******************************************************************** //

#define DS_GET_CONN_STATE_CID                             74
// Purpose: Get modem's current connection state
// Command:
// ========
// None
// Response:
// =========
// DWORD containing call state value (directly from the modem)
// ******************************************************************** //

#define DS_GET_POWER_SAVE_MODE_CID                        75
// Purpose: Ask the RIL if the modem's 1X and/or EV searcher is in deep sleep mode or not.
// Command:
// ========
// None
// Response:
// =========
// DWORD containing call state value
// ******************************************************************** //

#define DS_POWER_SAVE_EXIT_CID                            76
// Purpose: Ask the modem's 1X and/or EV searcher to resume from deep sleep mode.
// Command:
// ========
// None
// Response:
// =========
// DWORD containing call state value
// ******************************************************************** //

#define DS_RTN_RESET                                      77
// Purpose: Ask the modem to perform a factory reset.
// Command:
// ========
// None
// Response:
// =========
// DWORD containing call state value
// ******************************************************************** //

#define DS_GET_ACTWIZ_UI_MASK_CID                         78
// Purpose: Get the ActWiz preference setting from the modem.
// Command:
// ========
// None
// Response:
// =========
// Pointer to RILACTWIZUIMASK structure
// ******************************************************************** //

#define DS_GET_NAI_PW_UI_DISPLAY_MODE_CID                 79
// Purpose: Get the preference setting for displaying an UI to allow changing the SIP User Name and Password
// Command:
// ========
// DWORD: one of the RIL_NAI_PW_ITEM
// Response:
// =========
// Pointer to RILNAIPWUIDISPLAYMODE structure
// ******************************************************************** //

#define DS_GET_OMADM_CONFIG_CID                           80
// Purpose: Get the preference setting regarding OMADM feature
// Command:
// ========
// None
// Response:
// =========
// Pointer to RILOMADMCONFIG structure
// ******************************************************************** //

#define DS_FORCEEQSTATEOFF_CID                            81
// Purpose: Ask the RIL to immediately call OEMAUX API to power off the modem. No time for power down deregistration with the network
// Command:
// ========
// No param

// Response:
// =========
// RIL_RESULT_OK (lpData point to one RILBANDINFO structure) or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_GET_ADVANCEDMENU_PARAMS                         82  //11098- ##menu requirement for Sprint
// Purpose: Ask the RIL to query all the parameters needed for displayed in Advanced menu under ##DATA
// Command:
// ========
// No param

// Response:
// =========
// RIL_RESULT_OK (lpData point to one RILADVMENU structure) or standard RIL_RESULT_ERROR
// ******************************************************************** //

#define DS_INITIATE_HOST_BOOT                                      83 //11336 - new sprint reqs
// Purpose: Ask the OEM to initiate host boot
// Command:
// ========
// None
// Response:
// =========
// 
// ******************************************************************** //

#define DS_GET_PROVISION_STATE_CID						84
// Purpose: Get the Provision Status
// Command:
// ========
// No param

// Response:
// =========
//
// ******************************************************************** //

#define DS_GET_LOCATION_STATUS_CID                        0x8000
// Purpose: Get the location tracking (is it ON or OFF)
// Command:
// ========
// No param

// Response:
// =========
// DWORD with values being one of RIL_LOCATION_* values

// ******************************************************************** //

#define DS_GET_ROAMING_STATUS_CID                         0x8001
// Purpose: Get the Roaming status.
// Command:
// ========
// No param

// Response:
// =========
// DWORD with values being one of RIL_ROAMSTATUS_* values
// ******************************************************************** //
					


// ******************************************************************** //
// ******************************************************************** //
// ******************************************************************** //
// *********************** NOTIFICATION SECTION  ********************** //
// ******************************************************************** //
// ******************************************************************** //
// ******************************************************************** //
//For Carrier changed notification
typedef struct tagRILCARRIERINFO{
  DWORD dwOldCarrierIndex;  //carrier index before change
  DWORD dwNewCarrierIndex;  //carrier index after change
}RILCARRIERINFO;

//For RIL_NOTIFY_MIN_ACTIVE_STATE notification
typedef struct tagRILMINACTIVESTATE{
      BOOL bState;              // TRUE if Phone is activated
}RILMINACTIVESTATE;

#define MAX_WalshCode					2
#define MAX_FingerSet					6
#define MAX_ActiveSet					6

struct TechFingerSingle
{
	int									iPilot;
	DWORD  							nWalshCode[MAX_WalshCode];
	int									iRssi;
};

struct TechFinger
{
	DWORD									nCount;
	TechFingerSingle			FingerSet[MAX_FingerSet];
};

struct TechActiveSetSingle
{
	int									iPilot;
	int									iEcio;
};

struct TechActiveSet
{
	DWORD								nCount;
	TechActiveSetSingle ActiveSet[MAX_ActiveSet];
};

enum TechBandClass
{
	BANDCLASS_Cellular,
	BANDCLASS_Pcs
};
typedef struct tagRILMODEMDEBUGINFO
{
/*
    To be supported in the firmware...???

    MODEM_DBG_RF_MODE_TYPE        eRFMode;    // RF is in which mode of operation.
    DWORD                         dwFinLock;  // bit mask to hold locked status of 4 fingers
    int                           nTxAdj;  
    DWORD                         dwCurrFwdRC; 
    DWORD                         dwCurrRevRC;
                                  BS PREV
                                  BS ID
*/
    DWORD                         dwUpdateMsk;
    /* 
            Field to hold the update item bitmask.  Each bit position will 
            represent the following fields in order and will be set if that 
            field has changed since the last report. 
    */

    WORD                          wCallSO;  // cached by the RIL or modem for the current or last call
    WORD                          wCallEndReason;  // cached by the RIL or modem for the current or last call
    WORD                          wCallError;  // cached by the RIL or modem for the current or last call
    WORD                          wRssi;  // cached by the RIL or modem
    WORD                          wEcio;  // cached by the RIL or modem

    WORD                          wdSid;      // same as SwiGetTechSID
    WORD                          wdNid;      // same as SwiGetTechNID

    DWORD                         dwChannel;  // same as SwiGetChannelNumber

    WORD                          wPRevInUse;    // same as SwiGetCurrentBaseStation

	WORD                          wBSId;
	short						  iProvisionStatus;
    long                          iBSLongitude;   // same as SwiGetTechBSInfo
    long                          iBSLatitude;

    DWORD                         dwTotalFrames;  // same as SwiGetTechFrame
    DWORD                         dwBadFrames;

    short                         iTxPwr;         // same as SwiGetTransmitPower
    short                         iRxPwr;         // same as SwiGetReceivePower

    long                          iTemperature;   // same as SwiGetTemperature

    WORD                          wPacketZoneID;  // same as SwiGetTechPacketZone

    TechBandClass                 wBandClass;     // same as SwiGetTechBandClass
    
    TechActiveSet                 activeSet;   // same as SwiGetTechActiveSet  

    TechFinger                    finger;      // same as SwiGetTechFinger 

	WORD						 PilotPN;
    /* 
    These following values should be known and cached using other notification mechanism: 

    Last Call State (no more CP state) , Last Call Type, Dormant State
    Modem Oprt_mode {Offline, Online, Reset, power off}
    */
}RILMODEMDEBUGINFO, *LPRILMODEMDEBUGINFO;


typedef struct tagRILTechHdrSector
{
  U32           sizeStruct; 
  U8				    szHdrSectorId[LENGTH_SectorId];   
  U16						iHdrSubnetMask;   
  U16           iHdrColorCode;
  U16           iHdrPnOffset;

}RILTECHHDRSECTOR, *LPRILTECHHDRSECTOR;

typedef struct tagRILTechHdrSession
{
    U32           sizeStruct; 
    U8            szHdrUati[LENGTH_HdrUati];
    U16           iHdrUatiColorCode;
    U32           iHdrRati;
    U16           iHdrSessionDuration;
    U32           iHdrSessionStart1;
    U32           iHdrSessionStart2;
    U32           iHdrSessionEnd1;
    U32           iHdrSessionEnd2;

}RILTECHHDRSESSION, *LPRILTECHHDRSESSION;

typedef struct tagRILTechHdrStats
{
    U32           sizeStruct; 
    U16           iHdrRxAgc0;
    U16           iHdrRxAgc1;
    U16           iHdrTxTotal;
    U16           iHdrTxAdj;
    U16           iHdrc2i;
    U16           iHdrEcio;
    U16           iHdrRssi;
}RILTECHHDRSTATS, *LPRILTECHHDRSTATS;

typedef struct tagRILTechHdrPrev
{
    U32           sizeStruct;     
    U16						iHdrPRevMin;   
    U16						iHdrPRevMax;   
}RILTECHHDRPREV, *LPRILTECHHDRPREV;

typedef struct RILTechHdrRri
{
    U32           sizeStruct; 
    U16           iHdrRri;
}RILTECHHDRRRI, *LPRILTECHHDRRRI;

typedef struct RILIOTAWAPUri
{
	U32			sizeStruct;					// size of this structure
  TCHAR 	    szWAPUri[128]; 	    //null terminated URI contains wap trigger
}RILIOTAWAPURI, *LPRILIOTAWAPURI;


typedef enum 
{
	RIL_TECH_HDR_AN_AUTH_NOT_AUTHENTICATED            = 0x00000000,
	RIL_TECH_HDR_AN_AUTH_AUTHENTICATED                = 0x00000001,
  RIL_TECH_HDR_AN_AUTH_AUTHENTICATION_FAILED        = 0x00000002,
  RIL_TECH_HDR_AN_AUTH_AUTHENTICATION_DISABLED      = 0x00000003,
};

typedef struct RILTechHdrAnAuth
{
    U32           sizeStruct; 
    U16           iHdrAnAuthS;
}RILTECHHDRANAUTH, *LPRILTECHHDRANAUTH;

typedef struct RILTechHdrDrcVal
{
    U32           sizeStruct; 
    U16           iHdrDrcValue;
}RILTECHHDRDRCVAL, *LPRILTECHHDRDRCVAL;

typedef struct RILTechHdrDrcCover
{
    U32           sizeStruct; 
    U16           iHdrDrcCover;
}RILTECHHDRDRCCOVER, *LPRILTECHHDRDRCCOVER;
//For RIL_NOTIFY_PACKETDATASTATUS_ADV notification

typedef enum RILTechHdrSessionState
{
	RIL_TECH_HDR_SESSION_STATE_CLOSE                    = 0x00000000,
	RIL_TECH_HDR_SESSION_STATE_ADDR_MGMT_PROTOCOL_SETUP = 0x00000001,
  RIL_TECH_HDR_SESSION_STATE_AT_INITIATED             = 0x00000002,
  RIL_TECH_HDR_SESSION_STATE_AN_INITIATED             = 0x00000003,
  RIL_TECH_HDR_SESSION_STATE_OPEN                     = 0x00000004,
};

typedef struct RILTechHdrState
{
    U32           sizeStruct; 
    U16           iHdrAtState;
    U16           iHdrSessionState;
}RILTECHHDRSTATE, *LPRILTECHHDRSTATE;

typedef struct RILTechHdrChannel
{
    U32           sizeStruct; 
    U16           iHdrChannel;
}RILTECHHDRCHANNEL, *LPRILTECHHDRCHANNEL;

//advanced packet data states
typedef enum {
  RIL_PACKETDATASTATUS_ADV_NONE = -1,     // FOR INTERNAL USE ONLY!
  RIL_PACKETDATASTATUS_ADV_NO_SESSION,    // No packet data session exists.
  RIL_PACKETDATASTATUS_ADV_DORM,          // A packet data session exists and is in a dormant state.
  RIL_PACKETDATASTATUS_ADV_ACTIVE,        // A packet data session exists and is in an active state. Refer to SYSTEMCHANGE for the system type
  RIL_PACKETDATASTATUS_ADV_MAX            // FOR INTERNAL USE ONLY!
} RIL_PACKETDATASTATUS_ADV_STATE;


typedef struct tagRILPACKETDATASTATUS_ADV{
		  RIL_PACKETDATASTATUS_ADV_STATE dwState;              //one of RIL_PACKETDATASTATUS_ADV_* enums
}RILPACKETDATASTATUS_ADV;

// IOTA ENUMS

typedef enum 
{
	RIL_IOTA_SESSION_START=0,				  // 0:EM IOTA session started
	RIL_IOTA_SESSION_END,				      // 1:EM IOTA session end
}RIL_IOTA_EVENT_TYPE;

typedef enum 
{
	RIL_IOTA_EVENT_SUCCESS=0,			// 0:event successful
	RIL_IOTA_EVENT_FAILURE,				// 1:event failed	
}RIL_IOTA_EVENT_RESULT;

typedef enum 
{
	RIL_IOTA_STATUS_MIN = -1,		              // -1:IOTA status min
	RIL_IOTA_STATUS_SUCCESS ,		              // 0:IOTA status success
	RIL_IOTA_STATUS_ERR_DISCONNECT,	          // 1:status error disconnect
	RIL_IOTA_STATUS_ERR_NOT_ALLOWED,	        // 2:status error iota session is not allowed
	RIL_IOTA_STATUS_ERR_ALREADY_ACTIVE,	      // 3:status error iota sesstion is already in progress
	RIL_IOTA_STATUS_ERR_CLIENT_ABORT,	        // 4:status error client aborted iota session
	RIL_IOTA_STATUS_ERR_HTTP,	                // 5:status error HTTP
	RIL_IOTA_STATUS_ERR_MIME,	                // 6:status error MIME
	RIL_IOTA_STATUS_ERR_XML,	                // 7:status error XML
	RIL_IOTA_STATUS_ERR_MMC,	                // 8:status error MMC
	RIL_IOTA_STATUS_ERR_NOT_TRUSTED,	        // 9:status error not trusted domain
	RIL_IOTA_STATUS_ERR_SESSION_TIMEOUT,      // 10:status error session timed out
	RIL_IOTA_STATUS_ERR_UNKNOWN,	            // 11:status error unknown
	RIL_IOTA_STATUS_ERR_INTERNAL,	            // 12:status error internal
	RIL_IOTA_STATUS_ERR_NO_SERVICE,	          // 13:status error no service
	RIL_IOTA_STATUS_ERR_ACTIVE_DATA_CALL,	    // 14:status error user is in active data call
	RIL_IOTA_STATUS_ERR_ACTIVE_VOICE_CALL,	  // 15:status error user is in active voice call
	RIL_IOTA_STATUS_ERR_NO_DIGITAL_SERVICE,	  // 16:status error user is no digital service ( roaming  mode )
	RIL_IOTA_STATUS_MAX,	                    // 17:iota status max
}RIL_IOTA_EVENT_FAIL_REASON;


typedef enum 
{
	RIL_IOTA_ERR_MMC_DISCONNECT,      // 0:Normal Release (MMC "disconnect")
	RIL_IOTA_ERR_INVALID_VALREF,	    // 1:MMC_RESULT_INVALID_VALUEREF
	RIL_IOTA_ERR_CID_MISSING,				  // 2:MMC_RESULT_CID_MISSING
	RIL_IOTA_ERR_DLD_FAILED,	  			// 3:MMC_RESULT_DOWNLOAD_FAILED
	RIL_IOTA_ERR_RESERVED,			      // 4:reserved
	RIL_IOTA_ERR_INVALID_CONTENT,     // 5:MMC_RESULT_INVALID_CONTENT
	RIL_IOTA_ERR_USR_DENIED,		      // 6:MMC_RESULT_USER_DENIED
	RIL_IOTA_ERR_BAD_VALUE,		        // 7:MMC_RESULT_BAD_VALUE
	RIL_IOTA_ERR_TIMEOUT,             // 8:MMC_RESULT_TIMEOUT
	RIL_IOTA_ERR_NONEW_DOC, 			    // 9:MMC_RESULT_NEW_DOC_ARRIVED
	RIL_IOTA_ERR_DELETE_FAILED,		    // 10:MMC_RESULT_DELETE_FAILED
	RIL_IOTA_ERR_BAD_DATA,			      // 11:MMC_RESULT_BAD_DATA
	RIL_IOTA_ERR_DISPLAY_DISABLED,    // 12:MMC_RESULT_DISPLAY_DISABLED
	RIL_IOTA_ERR_WRITE_ONLY,		      // 13:MMC_RESULT_WRITE_ONLY
	RIL_IOTA_ERR_RESULT_ABORT,	      // 14:MMC_RESULT_ABORT
	RIL_IOTA_ERR_RESERVED1,			      // 15:reserved
	RIL_IOTA_ERR_BAD_OBJECT,		      // 16:MMC_RESULT_BAD_OBJECT
	RIL_IOTA_ERR_UNKNOWN_RESULT,      // 17:MMC_RESULT_UNKNOWN_ERROR
	RIL_IOTA_ERR_FILE_LOCKED,		      // 18:MMC_RESULT_FILE_LOCKED
	RIL_IOTA_ERR_FILE_OPEN, 		      // 19:MMC_RESULT_FILE_OPEN
	RIL_IOTA_ERR_CHECK_FAILED,	      // 20:MMC_RESULT_CHECK_FAILED
	RIL_IOTA_ERR_INVALID_SIZE,	      // 21:MMC_RESULT_INVALID_SIZE
	RIL_IOTA_ERR_INVALID_OFFSET,      // 22:MMC_RESULT_INVALID_OFFSET
	RIL_IOTA_ERR_DEVICE_BUSY,		      // 23:MMC_RESULT_DEVICE_BUSY
	RIL_IOTA_ERR_RESERVED2,			      // 24:reserved
                                    //For HTTP Error - actual HTTP error code so other than these error actual http
                                    // errror codes should be captured
}RIL_IOTA_EVENT_ERR;

typedef struct RILIOTAStatus
{
	U32			sizeStruct;					      // size of this structure
	U16			iEvent;						        // event type see RIL_IOTA_EVENT_TYPE for details
	U16			iEventStatus;						  // event success or failure see RIL_IOTA_EVENT_RESULT for details
	U16			iSessionEndFailureReason;	// Session end failure reason (future support) see RIL_IOTA_EVENT_FAIL_REASON for details
	U16			iSessionEndErrorCode;			// Session end error code (depends on Param 3 Session 
                                    //end failure reason) (future support) see RIL_IOTA_EVENT_ERR for details
                                    //For HTTP Error - actual HTTP error code MMC error //refer HTTP or MMC error code spec
}RILIOTASTATUS, *LPRILIOTASTATUS;

// Cause code of the PDP INACT failure
typedef enum {
  RIL_PDP_ACCESS_FAIL_NONE=-1,  /* FOR INTERNAL USE ONLY! */

  RIL_PDP_ACCESS_FAIL_PD_ORIG_ATTEMPT,
   /* A packet data call was attempted using an inactive PDP.  */
  RIL_PDP_ACCESS_FAIL_AT_READ_CMD,
   /* The host attempted to read part or all of an inactive PDP using 
    an AT command. */

  RIL_PDP_ACCESS_FAIL_MAX  /* FOR INTERNAL USE ONLY! */
} RIL_PDP_INACT_FAIL_CAUSE;

typedef struct tagRILPACKETDATASTATUS_INACT{
		  DWORD index; //Index, which is inactive
      RIL_PDP_INACT_FAIL_CAUSE  cause; // Root cause that triggers the failure
}RILPACKETDATASTATUS_INACT;

typedef enum {
	MIP_NAI_PROF0,
	MIP_NAI_PROF1,
	MIP_NAI_PROF2,
	MIP_NAI_PROF3,
	MIP_NAI_PROF4,
	MIP_NAI_PROF5,
	SIP_NAI,
	SIP_PASSWORD,
	HDR_AN_AUTH_NAI,
	HDR_AN_AUTH_PASSWORD,	
	QNC_NAI,
	QNC_PASSWORD,
	MAX_AUTO_POP_ITEMS,
} RIL_NAI_PW_ITEM;

// Activation Wizard disabled if none of the AW_OPT bits are set
typedef enum
{
	RIL_PRI_AW_OPT_MANUAL			= 0x0001,		// Enable manual provisioning option
	RIL_PRI_AW_OPT_VOICEASSIST		= 0x0002,		// Enable Voice assisted option	(Exclusive to AW_OPT_AUTOMATED)
	RIL_PRI_AW_OPT_AUTOMATED		= 0x0004,		// Enable Automated option	(Exclusive to AW_OPT_VOICEAST)
	RIL_PRI_AW_HEADSET				= 0x0008,		// Enable headset requirement	(used only with AW_OPT_VOICEAST or AW_OPT_AUTOMATED)
	RIL_PRI_AW_DLG_CALLCARRIER		= 0x0010,		// Enable "Call service provider..." screen
	RIL_PRI_AW_DLG_SID				= 0x0020, 		// ( reserved, set manually via old CNS SWINV 39 )	
													// Enable SID screen
	RIL_PRI_AW_DLG_QNCUSERPW		= 0x0040, 		// ( reserved, set manually via old CNS SWINV 40 )	
													// Enable QNC user/pw screen
	RIL_PRI_AW_SET_IMSI				= 0x0080,		// Enable user to set IMSI (independent of MDN)  (Exclusive to AW_SET_IMSI_XX)
	RIL_PRI_AW_SET_IMSI_EQ_MDN		= 0x0100,		// Automatically set IMSI (to equal the MDN)	(Exclusive to AW_SET_IMSI_XX)
	RIL_PRI_AW_DLG_1XUSERPW			= 0x0200,		// Enable 1x username / pw

	RIL_PRI_AW_OTASP_DIALPAD		= 0x0800,		// Enable dialpad for assisted/automated activation
	RIL_PRI_AW_BYPASS_OTKSL			= 0x1000,		// Bypass OTKSL entry

	RIL_PRI_AW_BYPASS_INTRO_SCREEN	= 0x2000,		// Bypass Introduction Screen
	RIL_PRI_AW_ENABLED				= RIL_PRI_AW_OPT_MANUAL | RIL_PRI_AW_OPT_VOICEASSIST | 
									  RIL_PRI_AW_OPT_AUTOMATED,
	RIL_PRI_AW_ALL					= 0xFFFF,

	RIL_PRI_AW_MASK_ENABLED			= 0x8000	// Enabled bit
} RIL_PRI_ACTWIZ_MASK;

typedef enum {
	NAI_PW_UI_NEVER,              // Never shows UI form for QNC or SIP (RIL_PRI_AW_DLG_1XUSERPW)
	NAI_PW_UI_ALWAYS,             // Show pre-populated UI form for QNC or SIP (RIL_PRI_AW_DLG_1XUSERPW)
	NAI_PW_UI_USER_ENTRY,         // Show blank UI form for QNC or SIP (RIL_PRI_AW_DLG_1XUSERPW)
	NAI_PW_UI_RESERVED,           // should never happen! Don't support it. Tread it as NEVER. LogCritical it
} RIL_NAI_PW_UI_DISPLAY_MODE;

typedef struct
{
  RIL_PRI_ACTWIZ_MASK         priActWizBitMask;                         // consult enumeration in RILExt.h
  TCHAR                       OTASPString[MAX_RIL_OTASP_STRING_LEN];    // only valid if RIL_PRI_AW_OPT_AUTOMATED is set
} RILACTWIZUIMASK;

typedef struct
{
  WORD                        index;                  // one of the RIL_NAI_PW_ITEM
  RIL_NAI_PW_UI_DISPLAY_MODE  displayMode;            // 
} RILNAIPWUIDISPLAYMODE;

// OMA-DM Types and Structures

typedef enum
{
  RIL_OMADM_DEVICE_CAPABILITY_NONE                = 0x00,
  RIL_OMADM_DEVICE_CAPABILITY_SWI                 = 0x01,
  RIL_OMADM_DEVICE_CAPABILITY_REDBEND             = 0x02,
} RIL_OMADM_DEVICE_CAPABILITY;

typedef enum
{
  RIL_OMADM_FEATURE_CIDC                          = 0x00000001,
  RIL_OMADM_FEATURE_NIDC                          = 0x00000002,
  RIL_OMADM_FEATURE_CIPRL                         = 0x00000004,
  RIL_OMADM_FEATURE_NIPRL                         = 0x00000008,
  RIL_OMADM_FEATURE_CIFUMO                        = 0x00000010,
  RIL_OMADM_FEATURE_NIFUMO                        = 0x00000020,
  RIL_OMADM_FEATURE_HFA                           = 0x00000040,
} RIL_OMADM_FEATURE_CAPABILITY;

typedef struct
{
  U32                                         sizeStruct;
  RIL_OMADM_DEVICE_CAPABILITY                 nOMADMCapability;
  U8                                          nMaxAcctSupport;        //1 - 8
  U8                                          nNumAccts;              //0 - 8
  U8                                          bAcctChanged;           //used to notify if acount support/number changes
  RIL_OMADM_FEATURE_CAPABILITY                dwFeatureCapabilityMask;//what features are supported
  RIL_OMADM_FEATURE_CAPABILITY                dwFeatureEnableMask;    //feature enable state
  U8                                          bHFAAttempted;          //TRUE if HFA has been attempted (only if HFA supported)
} RILOMADMCONFIG;

//For Generic notification
typedef struct tagRILGENERICNOTIFICATION{
  DWORD swAPIID;  //APIID
  HRESULT hr;  //HRESULT
}RILGENERICNOTIFICATION;


//10511 - This will help to NOT gray out the tabs under Phone ->options.
#ifndef PHGFL_PHONE_SUPPORT0230DIALPARSING
#pragma message("PHGFL_PHONE_SUPPORT0230DIALPARSING is NOT defined by default in the AKU")
#define PHGFL_PHONE_SUPPORT0230DIALPARSING 0x02000000
#endif

#define RIL_NOTIFY_MOBILEIP_FAIL                         (0x00000002 | RIL_NCLASS_DEVSPECIFIC)  // lpData is DWORD*

#define RIL_NOTIFY_MODEM_DBG_INFO                        (0x00000004 | RIL_NCLASS_DEVSPECIFIC)  // lpData is RILMODEMDEBUGINFO*

#define RIL_NOTIFY_MIN_ACTIVE_STATE                      (0x00000008 | RIL_NCLASS_DEVSPECIFIC)  // lpData is RILMINACTIVESTATE*

#define RIL_NOTIFY_PACKETDATASTATUS_ADV                  (0x00000009 | RIL_NCLASS_DEVSPECIFIC)  // lpData is RILPACKETDATASTATUS_ADV*

#define RIL_NOTIFY_PDP_INACT_FAIL_E                      (0x0000000B | RIL_NCLASS_DEVSPECIFIC)  // lpData is RILPACKETDATASTATUS_INACT*

#define RIL_NOTIFY_CARRIER_CHANGED                       (0x000000018 | RIL_NCLASS_DEVSPECIFIC)  // lpData is RILCARRIERINFO*

#define RIL_NOTIFY_DEVSPC_CALLSTATECHANGED               (0x000000019 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILCALLINFO> structures. All call (data/voice) should be reported

#define RIL_NOTIFY_DEVSPC_TECHHDRSECTOR                  (0x000000020 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILTECHHDRSECTOR> structures.

#define RIL_NOTIFY_DEVSPC_TECHHDRSTATS                   (0x000000021 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILTECHHDRSTATS> structures.

#define RIL_NOTIFY_DEVSPC_TECHHDRSESSION                 (0x000000022 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILTECHHDRSESSION> structures.

#define RIL_NOTIFY_DEVSPC_TECHHDRCHANNEL                 (0x000000023 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILTECHHDRCHANNEL> structures.

#define RIL_NOTIFY_DEVSPC_TECHHDRSTATE                   (0x000000024 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILTECHHDRSTATE> structures.

#define RIL_NOTIFY_DEVSPC_TECHHDRPREV                    (0x000000025 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILTECHHDRPREV> structures.

#define RIL_NOTIFY_DEVSPC_TECHHDRPKTZONE                 (0x000000026 | RIL_NCLASS_DEVSPECIFIC)  // 

#define RIL_NOTIFY_DEVSPC_TECHHDRANAUTH                  (0x000000027 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILTECHHDRANAUTH> structures.

#define RIL_NOTIFY_DEVSPC_TECHHDRDRCVAL                  (0x000000028 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILTECHHDRDRCVAL> structures.

#define RIL_NOTIFY_DEVSPC_TECHHDRDRCCOVER                (0x000000029 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILTECHHDRDRCCOVER> structures.

#define RIL_NOTIFY_DEVSPC_TECHHDRRRI                     (0x000000030 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILTECHHDRRRI> structures.

#define RIL_NOTIFY_IOTA_STATUS                           (0x000000031 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILIOTASTATUS> structures.

#define RIL_NOTIFY_IOTA_WAPPUSH                          (0x000000032 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to an array of <t RILIOTAWAPURI> structures.

#define RIL_NOTIFY_PDSM_PA_Address                       (0x000000033 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to DWORD of value.

#define RIL_NOTIFY_PDSM_PA_PtlmMode                      (0x000000034 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to DWORD of value.

#define RIL_NOTIFY_PDSM_PA_PortID                        (0x000000035 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to DWORD of value.

#define RIL_NOTIFY_PDSM_PA_Privacy                       (0x000000036 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to DWORD of value.

#define RIL_NOTIFY_PDSM_PA_NetAccess                     (0x000000037 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to DWORD of value.

#define RIL_NOTIFY_PDSM_PD_Data                          (0x000000038 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to RILGETPAData structure.

#define RIL_NOTIFY_PDSM_PD_Done                          (0x000000039 | RIL_NCLASS_DEVSPECIFIC)  // None

#define RIL_NOTIFY_PDSM_PD_End                           (0x000000040 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to DWORD with End Reason.

#define RIL_NOTIFY_PDSM_PD_Begin                         (0x000000041 | RIL_NCLASS_DEVSPECIFIC)  // none.

#define RIL_NOTIFY_PDSM_PD_UpdateFailure                 (0x000000042 | RIL_NCLASS_DEVSPECIFIC)  // none.

#define RIL_NOTIFY_PDSM_PD_DLD_Data                      (0x000000043 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to RILGETPADLDData structure.

#define RIL_NOTIFY_PDSM_PD_DLD_Done                       (0x000000044 | RIL_NCLASS_DEVSPECIFIC)  // None

#define RIL_NOTIFY_PDSM_PD_DLD_End                        (0x000000045 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to DWORD with End Reason.

#define RIL_NOTIFY_PDSM_PD_DLD_Begin                      (0x000000046 | RIL_NCLASS_DEVSPECIFIC)  // none.

#define RIL_NOTIFY_DEVSPC_CALLBYTECOUNTER                 (0x000000047 | RIL_NCLASS_DEVSPECIFIC)  // lpdata points to RILBYTECOUNTER;

#define RIL_NOTIFY_DEVSPC_POWERSAVEMODECHANGED           (0x000000048 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to DWORD with RIL_PWRSV_MODES.

#define RIL_NOTIFY_PDSM_PA_GpsLock                        (0x000000048 | RIL_NCLASS_DEVSPECIFIC)  // none.

#define RIL_NOTIFY_SMS_SEND_STATUS                        (0x000000049 | RIL_NCLASS_DEVSPECIFIC)  // none.

#define RIL_NOTIFY_EVDO_NETWORKTYPE                       (0x000000050 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to DWORD with RIL_EVDO_NETWORKTYPES.
//9985 - device specific notification sent out by RIL for WPS
#define RIL_NOTIFY_DEVSPC_WPS                             (0x000000051 | RIL_NCLASS_DEVSPECIFIC)  // none

#define RIL_NOTIFY_DEVSPC_GENERIC                         (0x000000052 | RIL_NCLASS_DEVSPECIFIC)  // lpData points to RILGENERICNOTIFICATION 



typedef enum
{
  PWRSV_NONE = 0x0000,
  PWRSV_1XRTT = 0x0001,
  PWRSV_EVDO = 0x0002,
  PWRSV_ALL = PWRSV_1XRTT | PWRSV_EVDO,
}RIL_PWRSV_MODES;

typedef enum
{
  NW_EVDO_NOSERVICE = 0x00000000,
  NW_EVDO_REV0 = 0x00000002,
  NW_EVDO_REVA = 0x00000004,
}RIL_EVDO_NETWORKTYPES;   //this enumeration should match with enumeration: SWI_TYPE_Hdr_Srv_State

// Below value is not defined in ril.h. Instead of changing ril.h, define it here
#define RIL_RESULT_DELAYRSP                               (0x00000000 | RIL_NCLASS_FUNCRESULT)  // Delay respond.

#endif //__RILEXT