/*****************************************************************************
 * Copyright (C) Gemalto M2M GmbH
 *****************************************************************************
 * Project: IMC-RIL-Driver
 *****************************************************************************
 * Author : Wireless Modules RD SW A2
 *****************************************************************************
 * $Workfile: Y:/z_ms-d/src/working/Quinn/inc/rilextapi.h $
 * $Revision: /main/ms-d/47 $
 *     $Date: 2013-05-21 15:54:34 $
 *   $Author: pmackent $
 *****************************************************************************
 * Target:
 *  Microsoft Windows Mobile 5.0
 *****************************************************************************
 * Description:
 *  Cinterion IMC RIL
 *****************************************************************************
 *
 * $Log: Y:/z_ms-d/src/working/Quinn/inc/rilextapi.h$ 
 * 
 * /main/ms-d/47   2013-05-21 15:54:34   pmackent 
 * Add BGS5 as known module for testing purposes
 *
 * /main/ms-d/46   2013-04-05 09:53:29   pmackent
 * Finish EHS5 Java midlet update
 * Add RHA-API for bootloader pin on EHS5
 *
 * /main/ms-d/45   2013-02-07 14:04:56   pmackent
 * Special OMADM notification
 *
 * /main/ms-d/44   2013-01-16 11:30:59   pmackent
 * Introduce update of module file system
 *
 * /main/ms-d/43   2012-12-21 13:08:57   pmackent
 * Introduce NV item update
 *
 * /main/ms-d/42   2012-07-11 15:28:29   pmackent
 * Introduce PRI update
 *
 * /main/ms-d/41   2012-07-10 11:51:56   pmackent
 * Introduce AHS3
 *
 * /main/ms-d/40   2012-07-05 10:12:08   pmackent
 * Introduce loading of network provider list
 *
 * /main/ms-d/39   2012-07-03 11:51:17   pmackent
 * Introduce info about provider list date
 *
 * /main/ms-d/38   2012-06-21 13:16:18   pmackent
 * Introduce CDMA PRL list update
 *
 * /main/ms-d/37   2012-06-05 11:47:40   pmackent
 * Add handling of undocumented CDMA activation URC (IPIS100079730)
 *
 * /main/ms-d/36   2012-04-18 13:22:57   ctna0256
 * Introducing PVS8
 *
 * /main/ms-d/35   2012-01-31 16:38:09   ctna0256
 * Added support for EHS5
 *
 * /main/ms-d/34   2012-01-03 15:46:32   ctna0256
 * Introduce PXS8
 *
 * /main/ms-d/33   2011-09-09 14:17:36   ctna0256
 * New notifications for audio/firmware update (IPIS100074854)
 *
 * /main/ms-d/32   2011-09-09 09:50:15   ctna0256
 * Remove RIL_DEVSPECIFIC_ACTIVATE_SIMLOCK_WITH_PUK option (IPIS100074643)
 *
 * /main/ms-d/31   2011-09-02 11:03:32   ctna0256
 * Added PUK for customer SIM lock (IPIS100074643)
 *
 * /main/ms-d/30   2011-09-01 16:27:03   ctna0256
 * New devspecific phonelock API (IPIS100074639)
 *
 * /main/ms-d/29   2011-07-22 16:25:55   ctna0256
 * Notification about GPS activities
 *
 * /main/ms-d/28   2011-07-20 13:01:33   ctna0256
 * Introduce RIL_NOTIFY_DEVSPECIFIC_NETWORK_REJECT_CAUSE and prevent multiple notifications (IPIS100073123)
 *
 * /main/ms-d/27   2011-06-17 10:40:52   ctna0256
 * New API for extended registration status (IPIS100073242)
 *
 * /main/ms-d/26   2011-06-10 09:09:11   ctna0256
 * New device specific notification about call release cause (IPIS100073123)
 *
 * /main/ms-d/25   2011-01-18 10:57:58   ctna0256
 * Added missing MTLR parameters
 *
 * /main/ms-d/24   2010-11-18 11:11:52   ctna0256
 * New notifications for dial and hangup of emergency calls
 *
 * /main/ms-d/23   2010-10-26 11:01:04   ctna0256
 * Introducing new notification for SIM initialization (IPIS100068246)
 *
 * /main/ms-d/22   2010-07-02 11:05:13   ctna0256
 * New handling of Customer SIM lock for HC25 R2 (IPIS100065826)
 *
 * /main/ms-d/21   2010-05-28 14:23:39   ctna0256
 * Introducing PH8
 *
 * /main/ms-d/20   2010-05-05 13:13:40   ctna0256
 * Support EU3 (for Pre-PH8 testing)
 *
 * /main/ms-d/19   2009-05-28 11:36:29   ctna0256
 * Remove "Siemens" from RIL
 *
 * /main/ms-d/18   2008-10-06 11:11:28   ctna0256
 * Disable KSC5601 per default
 *
 * /main/ms-d/17   2008-09-23 10:50:06   ctna0256
 * Support of SMS coded with KSC5601
 *
 * /main/ms-d/16   2008-08-22 10:21:25   ctna0256
 * Set Cinterion copyright text
 *
 * /main/ms-d/15   2008-08-20 11:55:57   ctna0450
 * Prepared new disclaimer handling
 *
 * /main/ms-d/14   2008-07-24 09:41:02   mp49210
 * New option: RIL_DEVSPECIFIC_WRITE_TO_LOG
 *
 * /main/ms-d/13   2008-04-21 08:16:41   mp49210
 * Handling of AT&Ts network selection menue change
 *
 * /main/ms-d/12   2008-01-29 11:51:48   mp49210
 * New AT-Tunneling
 *
 * /main/ms-d/11   2007-11-16 10:00:16   mp49210
 * New indication for barring of incoming call
 *
 * /main/ms-d/10   2007-11-14 15:16:18   mp49210
 * Introduction of MTLR
 *
 * /main/ms-d/9   2007-08-02 11:21:32   mp49210
 * Introduction of HC28
 *
 * /main/ms-d/8   2007-04-11 08:25:05   mp49210
 * Extended version info
 *
 * /main/ms-d/7   2007-03-28 13:50:06   mp49210
 * Remove 'Classic RIL' specific code and comments
 *
 * /main/ms-d/6   2007-01-04 14:03:55   mp49210
 * Additional comments
 *
 * /main/ms-d/5   2006-11-09 14:26:57   mp49210
 * Quinn specific feature: selction of 2G / 3G network
 *
 * /main/ms-d/4   2006-10-26 16:33:09   wm36264
 * Updated supported modem types
 *
 * /main/ms-d/3   2006-10-24 16:12:28   wm36264
 * Removed SAP stuff
 *
 * /main/ms-d/1   2006-10-24 14:58:41   wm36264
 * Moved from classic RIL
 *
*/

//////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2008 Gemalto M2M GmbH
// Copyright (C) 2006-2008 Siemens AG
// Copyright (C) 2003 Intrinsyc Europe Ltd.
//
// Version: 1.0
// Date:    dummy
//
//////////////////////////////////////////////////////////////////////////////

#ifndef RILEXTAPI_H
#define RILEXTAPI_H TRUE

#define RIL_DEVSPECIFIC_BANDHANDOVER                0x01
#define RIL_DEVSPECIFIC_GETMODEMTYPE                0x02
#define RIL_DEVSPECIFIC_GETVERSIONINFO              0x03
#define RIL_DEVSPECIFIC_DISABLEURCS                 0x04
#define RIL_DEVSPECIFIC_ENABLEURCS                  0x05
#define RIL_DEVSPECIFIC_SEND_ATC                    0x06
#define RIL_DEVSPECIFIC_FORCEEQSTATEOFF             0x07
#define RIL_DEVSPECIFIC_SEND_ATCEX                  0x08
#define RIL_DEVSPECIFIC_GET_NSMC_STATUS             0x09
#define RIL_DEVSPECIFIC_WRITE_TO_LOG                0x0A
#define RIL_DEVSPECIFIC_ACTIVATE_SIMLOCK            0x0B
#define RIL_DEVSPECIFIC_GET_REGSTATUS_EX            0x0C
#define RIL_DEVSPECIFIC_ACTIVATE_PHONELOCK          0x0D
#define RIL_DEVSPECIFIC_GETPROVIDERLISTDATE         0x0E
#define RIL_DEVSPECIFIC_MTLR_RESPONSE               0x10
#define RIL_DEVSPECIFIC_GET2G3GSELECTION            0x80
#define RIL_DEVSPECIFIC_SET2G3GSELECTION            0x81

#define RIL_NOTIFY_DEVSPECIFIC_EMERG_SHUTDOWN           (0x00001001 | RIL_NCLASS_DEVSPECIFIC) // Emergency-Shutdown caused by the module (causes see below)
#define RIL_NOTIFY_DEVSPECIFIC_EMERG_SHUTDOWN_WARN      (0x00001002 | RIL_NCLASS_DEVSPECIFIC) // Warning of possible Emergency-Shutdown caused by the module (causes see below) (EMERG_SHUTDOWN_NONE == all clear)
#define RIL_NOTIFY_DEVSPECIFIC_SIM_MEMORY_FULL          (0x00001003 | RIL_NCLASS_DEVSPECIFIC) // SMS memory on SIM full (for Ozone-RIL only), in Magneto: RIL_NOTIFY_SIMSTATUSCHANGED:RIL_SIMSTATUSCHANGED_FULL
#define RIL_NOTIFY_DEVSPECIFIC_BARRING_INCOMING_CALL    (0x00001004 | RIL_NCLASS_DEVSPECIFIC) // GCF approval: call setup error "barring of incoming call active" detected
#define RIL_NOTIFY_DEVSPECIFIC_NSMC_STATUS_CHANGE       (0x00001005 | RIL_NCLASS_DEVSPECIFIC) // AT&T requirement (document 13340): notifies about status of ENS (network selection menu control)
#define RIL_NOTIFY_DEVSPECIFIC_LAST_READYSTATE_MSG      (0x00001006 | RIL_NCLASS_DEVSPECIFIC) // For Emergency calls: notification, when no further RIL_READYSTATE_INITIALIZED are to be expected
#define RIL_NOTIFY_DEVSPECIFIC_DIAL_EMERGENCY_CALL      (0x00001007 | RIL_NCLASS_DEVSPECIFIC) // Notifies when the RIL starts a call to a known emergency number
#define RIL_NOTIFY_DEVSPECIFIC_HANGUP_EMERGENCY_CALL    (0x00001008 | RIL_NCLASS_DEVSPECIFIC) // Notifies when an emergency call ends
#define RIL_NOTIFY_DEVSPECIFIC_CALL_RELEASE_CAUSE       (0x00001009 | RIL_NCLASS_DEVSPECIFIC) // Notification about the cause of a call release
#define RIL_NOTIFY_DEVSPECIFIC_REGSTATUS_EX             (0x0000100A | RIL_NCLASS_DEVSPECIFIC) // Extended notifications about registration state.
#define RIL_NOTIFY_DEVSPECIFIC_NETWORK_REJECT_CAUSE     (0x0000100B | RIL_NCLASS_DEVSPECIFIC) // Notification about the cause of a network rejection
#define RIL_NOTIFY_DEVSPECIFIC_GPS_ACTIVITY             (0x0000100C | RIL_NCLASS_DEVSPECIFIC) // Notification about changes in GPS activity states
#define RIL_NOTIFY_DEVSPECIFIC_CDMA_ACTIVATION          (0x0000100D | RIL_NCLASS_DEVSPECIFIC) // Notification about success of a CDMA activation
#define RIL_NOTIFY_DEVSPECIFIC_CDMA_OMADM_UPDATE        (0x0000100E | RIL_NCLASS_DEVSPECIFIC) // Notification about a CDMA OMADM status change
#define RIL_NOTIFY_DEVSPECIFIC_SYSTEMCHANGED            (0x00001010 | RIL_NCLASS_DEVSPECIFIC) // Extended notifications about access technology.
#define RIL_NOTIFY_DEVSPECIFIC_GPS_MTLR                 (0x00001100 | RIL_NCLASS_DEVSPECIFIC) // GPS: Mobile Terminated Location Request (MTLR) received
#define RIL_NOTIFY_DEVSPECIFIC_FW_UPDATE_START          (0x00001200 | RIL_NCLASS_DEVSPECIFIC) // Firmware update started
#define RIL_NOTIFY_DEVSPECIFIC_FW_UPDATE_PROGRESS       (0x00001201 | RIL_NCLASS_DEVSPECIFIC) // Firmware update progress notification
#define RIL_NOTIFY_DEVSPECIFIC_FW_UPDATE_END            (0x00001202 | RIL_NCLASS_DEVSPECIFIC) // Firmware update finished
#define RIL_NOTIFY_DEVSPECIFIC_AUDIO_UPDATE_START       (0x00001203 | RIL_NCLASS_DEVSPECIFIC) // Audio update started
#define RIL_NOTIFY_DEVSPECIFIC_AUDIO_UPDATE_PROGRESS    (0x00001204 | RIL_NCLASS_DEVSPECIFIC) // Audio update progress notification
#define RIL_NOTIFY_DEVSPECIFIC_AUDIO_UPDATE_END         (0x00001205 | RIL_NCLASS_DEVSPECIFIC) // Audio update finished
#define RIL_NOTIFY_DEVSPECIFIC_CDMA_PRL_UPDATE_START    (0x00001206 | RIL_NCLASS_DEVSPECIFIC) // CDMA PRL list update started
#define RIL_NOTIFY_DEVSPECIFIC_CDMA_PRL_UPDATE_PROGRESS (0x00001207 | RIL_NCLASS_DEVSPECIFIC) // CDMA PRL list update progress notification (for compatibility only, goes directly to 100%)
#define RIL_NOTIFY_DEVSPECIFIC_CDMA_PRL_UPDATE_END      (0x00001208 | RIL_NCLASS_DEVSPECIFIC) // CDMA PRL list update finished
#define RIL_NOTIFY_DEVSPECIFIC_NWL_UPDATE_START         (0x00001209 | RIL_NCLASS_DEVSPECIFIC) // GSM network provider list update started
#define RIL_NOTIFY_DEVSPECIFIC_NWL_UPDATE_PROGRESS      (0x0000120A | RIL_NCLASS_DEVSPECIFIC) // GSM network provider list update progress notification (for compatibility only, goes directly to 100%)
#define RIL_NOTIFY_DEVSPECIFIC_NWL_UPDATE_END           (0x0000120B | RIL_NCLASS_DEVSPECIFIC) // GSM network provider list update finished
#define RIL_NOTIFY_DEVSPECIFIC_CDMA_PRI_UPDATE_START    (0x0000120C | RIL_NCLASS_DEVSPECIFIC) // CDMA PRI update started
#define RIL_NOTIFY_DEVSPECIFIC_CDMA_PRI_UPDATE_PROGRESS (0x0000120D | RIL_NCLASS_DEVSPECIFIC) // CDMA PRI update progress notification (for compatibility only, goes directly to 100%)
#define RIL_NOTIFY_DEVSPECIFIC_CDMA_PRI_UPDATE_END      (0x0000120E | RIL_NCLASS_DEVSPECIFIC) // CDMA PRI update finished
#define RIL_NOTIFY_DEVSPECIFIC_NVITEM_UPDATE_START      (0x0000120F | RIL_NCLASS_DEVSPECIFIC) // NV Item update started
#define RIL_NOTIFY_DEVSPECIFIC_NVITEM_UPDATE_PROGRESS   (0x00001210 | RIL_NCLASS_DEVSPECIFIC) // NV Item update progress notification (for compatibility only, goes directly to 100%)
#define RIL_NOTIFY_DEVSPECIFIC_NVITEM_UPDATE_END        (0x00001211 | RIL_NCLASS_DEVSPECIFIC) // NV Item update finished
#define RIL_NOTIFY_DEVSPECIFIC_FSITEM_UPDATE_START      (0x00001212 | RIL_NCLASS_DEVSPECIFIC) // FS Item update started
#define RIL_NOTIFY_DEVSPECIFIC_FSITEM_UPDATE_PROGRESS   (0x00001213 | RIL_NCLASS_DEVSPECIFIC) // FS Item update progress notification (for compatibility only, goes directly to 100%)
#define RIL_NOTIFY_DEVSPECIFIC_FSITEM_UPDATE_END        (0x00001214 | RIL_NCLASS_DEVSPECIFIC) // Fs Item update finished
#define RIL_NOTIFY_DEVSPECIFIC_JAVA_UPDATE_START        (0x00001215 | RIL_NCLASS_DEVSPECIFIC) // FS Item update started
#define RIL_NOTIFY_DEVSPECIFIC_JAVA_UPDATE_PROGRESS     (0x00001216 | RIL_NCLASS_DEVSPECIFIC) // FS Item update progress notification (for compatibility only, goes directly to 100%)
#define RIL_NOTIFY_DEVSPECIFIC_JAVA_UPDATE_END          (0x00001217 | RIL_NCLASS_DEVSPECIFIC) // Fs Item update finished

// Causes for emergency shutdown:
#define EMERG_SHUTDOWN_NONE                         0x0000
#define EMERG_SHUTDOWN_UNDERVOLTAGE                 0x0001
#define EMERG_SHUTDOWN_OVERTEMPERATURE              0x0002
#define EMERG_SHUTDOWN_UNDERTEMPERATURE             0x0003
#define EMERG_SHUTDOWN_POWERLOSS                    0x0004
#define EMERG_SHUTDOWN_OVERVOLTAGE                  0x0005

// Options for RIL_DEVSPECIFIC_SEND_ATCEX:
#define ATCEX_OPT_PORT_DEFAULT        0x00
#define ATCEX_OPT_PORT_URCPORT        0x01
#define ATCEX_OPT_PORT_DATAPORT       0x02
#define ATCEX_OPT_PORT_NOERRORPARSE   0x10

// Options for RIL_NOTIFY_DEVSPECIFIC_LAST_READYSTATE_MSG:
#define LAST_READYSTATE_MSG_FINAL    0
#define LAST_READYSTATE_MSG_PIN      1
#define LAST_READYSTATE_MSG_NO_SIM   2

// Techonlogy selections:
#define SELECTION2G3G_UNKNOWN       0
#define SELECTION2G3G_AUTOMATIC     1
#define SELECTION2G3G_GSM_ONLY      2
#define SELECTION2G3G_UMTS_ONLY     3
#define SELECTION2G3G_LTE_ONLY      4

// Modifiers for RIL_NOTIFY_DEVSPECIFIC_REGSTATUS_EX and RIL_DEVSPECIFIC_GET_REGSTATUS_EX
#define RIL_EXT_REGSTAT_LIMITED_SERVICE  0x100
#define RIL_EXT_REGSTAT_NO_COVERAGE      0x200

// Responses for MTLR:
#define MTLR_RESPONSE_DENY          0
#define MTLR_RESPONSE_ACCEPT        1
#define MTLR_RESPONSE_NO_RESPONSE   2
#define MTLR_RESPONSE_REGISTER      3
#define MTLR_RESPONSE_DEREGISTER    4

// Parameters for RIL_NOTIFY_DEVSPECIFIC_GPS_ACTIVITY
#define GPS_ACTIVITY_STOP               0
#define GPS_ACTIVITY_START_APPLICATION  1
#define GPS_ACTIVITY_START_EMERGENCY    2

// Parameters for RIL_NOTIFY_DEVSPECIFIC_FW_UPDATE_END and RIL_NOTIFY_DEVSPECIFIC_AUDIO_UPDATE_END
#define UPDATE_PROCESS_SUCCESS          0
#define UPDATE_PROCESS_ERROR            1

enum MODEMTYPE {
    MODEMTYPE_UNKNOWN = 0,
    MODEMTYPE_HC25,
    MODEMTYPE_HC28,
    MODEMTYPE_EU3,
    MODEMTYPE_PH8,
    MODEMTYPE_PXS8,
    MODEMTYPE_PVS8,
    MODEMTYPE_EHS5,
    MODEMTYPE_BGS5,
    MODEMTYPE_AHS3,
    MODEMTYPE_EHS8,
    MODEMTYPE_PDS5,
    MODEMTYPE_PDS8,
	MODEMTYPE_ELS61_E,
	MODEMTYPE_ELS61_USA, //Take care: the USA type must be put before the US version to get avoid of the unexpected prefix match in function GetModemTypeFromResponse().
	MODEMTYPE_ELS61_US,
	MODEMTYPE_ELS61_AUS,
    MODEMTYPE_PLS62,
	MODEMTYPE_ELS81_E,
	MODEMTYPE_ELS81_US,
    NUMBER_OF_SUPPORTED_MODEMTYPES
};

#define RADIO_VERSION_STRUCT_VERSION                0x02000000
typedef struct tagRadioVersionInfo {
    DWORD dwStructVersion;
    DWORD dwRILVersion;
    DWORD dwMuxVersion;
    DWORD dwAudVersion;
    DWORD dwRHAVersion;
    DWORD dwUSBDrvVersion;
    DWORD dwNDISAPIVersion;
} RADIO_VERSION_INFO, *PRADIO_VERSION_INFO;

#define RIL_AUDIO_PROF_START                        (TEXT("EVT_RIL_AUDPROF_START"))
#define RIL_AUDIO_PROF_END                          (TEXT("EVT_RIL_AUDPROF_END"))

// Additional audio modes supported by the RIL. Can be used with RHA_ConfirmAudioMode().
#define RIL_AUDIO_EXTENSION_BLUETOOTHHEADSET          100
#define RIL_AUDIO_EXTENSION_BLUETOOTHCARKIT           101
#define RIL_AUDIO_EXTENSION_GENERIC1                  102
#define RIL_AUDIO_EXTENSION_GENERIC2                  103

#endif
