comparison g23m/condat/ms/src/aci/cmh_mm.h @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS (6147)
4 | Modul : CMH_MM
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : Definitions for the command handler of the
18 | Mobility Mangement
19 +-----------------------------------------------------------------------------
20 */
21
22 #ifndef CMH_MM_H
23 #define CMH_MM_H
24
25
26 /*==== CONSTANTS ==================================================*/
27 #define PNN_SHORT_NAME_IEI 0x45
28 #define PNN_LONG_NAME_IEI 0x43
29
30 /*==== TYPES ======================================================*/
31
32 /* According to ITE-E 212 MNC shall not be more that 3 digits
33 Thus 0xffff is invalid number and means that rules are same
34 for all Operators in the country*/
35 #define ALL_MNC 0x7fff
36
37 #define MM_FFS_OPER_DIR "/gsm/cops"
38 #define MM_FFS_OPER_FILE "/gsm/cops/operimsi"
39
40
41 typedef struct FFSPLMNIMSI
42 {
43 UBYTE mcc[SIZE_MCC];
44 UBYTE mnc[SIZE_MNC];
45 UBYTE IMSI[MAX_IMSI-1];
46 } T_FFSPLMNIMSI;
47
48 /* Type for ECCIgnoreTable. See descr for ECCIgnoreTable*/
49 typedef struct ECCIgnoreRec
50 {
51 SHORT mcc;
52 SHORT mnc;
53 char *ecc;
54 } T_ECCIgnoreRec;
55
56 /* Type for CPHS ONS reade state*/
57 typedef enum {
58 ONS_READ_NOT_DONE = 0,
59 ONS_READING,
60 ONS_READ_OVER,
61 ONS_READ_FAIL
62 } T_ONS_READ_STATE;
63
64 /*==== PROTOTYPES =================================================*/
65 EXTERN SHORT cmhMM_Registered ( void );
66 EXTERN SHORT cmhMM_Deregistered ( void );
67 EXTERN SHORT cmhMM_SelNetwork ( void );
68 EXTERN SHORT cmhMM_NetworkLst ( void );
69
70 EXTERN BOOL cmhMM_FindPLMN ( T_OPER_ENTRY * plmnDesc,
71 SHORT mcc, SHORT mnc, U16 lac, BOOL nw_search );
72 EXTERN void cmhMM_getBandSettings( UBYTE *SetBands,
73 UBYTE *AllowedBands );
74 EXTERN BOOL cmhMM_isBandAllowed( UBYTE band,
75 UBYTE AllowedBands );
76 EXTERN BOOL cmhMM_writeSetBand ( UBYTE setband );
77 EXTERN BOOL cmhMM_FindNumeric ( T_OPER_ENTRY * plmnDesc,
78 const CHAR * numStr );
79 EXTERN BOOL cmhMM_FindName ( T_OPER_ENTRY * plmnDesc,
80 const CHAR * longStr,
81 T_ACI_CPOL_FRMT format );
82 EXTERN void cmhMM_CnvrtPLMN2INT( const UBYTE * BCDmcc,
83 const UBYTE * BCDmnc,
84 SHORT * mccBuf,
85 SHORT * mncBuf );
86 EXTERN void cmhMM_CnvrtINT2PLMN( SHORT INTmcc,
87 SHORT INTmnc,
88 UBYTE * mccBuf,
89 UBYTE * mncBuf );
90 EXTERN T_ACI_CREG_STAT cmhMM_GetNregCREGStat( void );
91 EXTERN T_ACI_CME_ERR cmhMM_GetNregCMEStat ( void );
92 EXTERN USHORT cmhMM_GetOperLstLen ( void );
93 EXTERN void cmhMM_CnvrtTrmPCMOpNam( T_OPER_ENTRY *plmnDesc, void *pPCMBuf );
94 EXTERN void cmhMM_Ntfy_NtwRegistrationStatus( T_ACI_CREG_STAT creg );
95 EXTERN SHORT cmhMM_CipheringInd ( UBYTE ciph );
96 EXTERN void cmhMM_OpCheckName (); /* EONS function */
97 EXTERN void cmhMM_OpCheckList ();/* EONS function */
98 EXTERN BOOL cmhMM_OpReadName ( UBYTE rec_num);/* EONS function */
99 EXTERN void cmhMM_OpReadNameCb ( SHORT table_id);/* EONS function */
100 EXTERN void cmhMM_OpSetPNNLst(); /* EONS function */
101 EXTERN void cmhMM_OpExtractNameCB ( SHORT table_id); /* EONS function */
102 EXTERN BOOL cmhMM_OpUpdateName (); /* EONS function */
103 EXTERN void cmhMM_GetCmerSettings (T_ACI_CMD_SRC srcId, T_ACI_MM_CMER_VAL_TYPE *sCmerSettings );
104 EXTERN BOOL cmhMM_ChkIgnoreECC(CHAR *dialStr);
105
106 EXTERN T_ACI_RETURN cmhMM_OperatorSelect(T_ACI_CMD_SRC srcId,
107 T_ACI_NRG_RGMD regMode,
108 T_ACI_NRG_SVMD srvMode,
109 T_ACI_NRG_FRMT oprFrmt,
110 CHAR *opr);
111
112 EXTERN void cmhMM_OperatorQuery( T_ACI_CMD_SRC srcId,
113 T_ACI_COPS_FRMT format,
114 CHAR *oper);
115
116 EXTERN BOOL cmhMM_OperatorStoreInFFS(UBYTE* mcc, UBYTE* mnc, UBYTE* IMSI);
117 EXTERN BOOL cmhMM_OperatorReadFromFFS(UBYTE* mcc, UBYTE* mnc, UBYTE* IMSI);
118
119
120
121
122 EXTERN BOOL cmhMM_GetActingHPLMN(SHORT * mccBuf, SHORT * mncBuf);
123 EXTERN BOOL cmhMM_ONSReadName ();//EONS function
124 EXTERN void cmhMM_ONSReadNameCb ( SHORT table_id);//EONS function
125 EXTERN void cmhMM_Reset_ONSDesc ();
126
127 /*==== EXPORT =====================================================*/
128
129 #ifdef CMH_MMF_C
130
131 GLOBAL T_ENT_STAT mmEntStat;
132 GLOBAL BOOL regReqPnd = FALSE;
133 #else
134
135 EXTERN T_ENT_STAT mmEntStat;
136 EXTERN BOOL regReqPnd;
137
138 #endif /* CMH_MMF_C */
139 #endif /* CMH_MM_H */
140
141 /*==== EOF =======================================================*/