blob: a96642b6748b4799df9116aa9b01184ad87b306d [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001/*****************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2016
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS (""MEDIATEK SOFTWARE"")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN ""AS-IS"" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*****************************************************************************/
35/*************************************************************
36*
37* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
38*
39* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
40*
41* Copyright (c) 1999-2010 VIA Telecom, Inc. All rights reserved.
42*
43*************************************************************/
44/****************************************************************************
45 *
46 * Module: status.h
47 *
48 * Purpose: Definitions and prototypes for Call Progression Status.
49 *
50 ****************************************************************************
51 *
52 * PVCS Header Information
53 *
54 * $Workfile$
55 * $Revision: 1.2 $
56 * $Modtime$
57 * $Author: fpeng $
58 *
59 * $Log: status.h $
60 *
61 * 08 29 2017 tina.ma
62 * [MOLY00274341] [Merge from MP5.TC10]when exit flight mode, if camp on the same cell, report MCC search response eraly
63 *
64 * merge code from MP5.TC10
65 *
66 * 07 06 2017 sue.zhong
67 * [MOLY00259241] [6293][C2K]Replace with KAL data type
68 * Correct copyright file header
69 *
70 * 05 17 2017 peijun.zheng
71 * [MOLY00249027] [BIACNO][MT6763][New feature]C2K code release code modification
72 *
73 * C2k code release.
74 *
75 * 11 09 2016 sue.zhong
76 * [MOLY00208435] [6293][C2K]Sync C2K code to UMOLYA TRUNK
77 * Update C2K PS code (1/2)
78 * Revision 1.2 2004/03/25 12:09:46 fpeng
79 * Updated from 6.0 CP 2.5.0
80 * Revision 1.2 2004/02/10 12:50:56 bcolford
81 * Merged CBP4.0 Release 8.05.0 changes.
82 * Revision 1.4 2003/11/06 11:24:06 ameya
83 * Added prototype for cpGetCurrentBand().
84 * Revision 1.3 2002/06/06 13:15:00 chinh
85 * Changed and Added Copyright
86 * Revision 1.2 2001/12/14 17:12:20 mclee
87 * prototype cpGetCurrentMode(), cpGetNID(), cpGetPilotPN()
88 * Revision 1.1 2001/01/17 10:59:29 plabarbe
89 * Initial revision
90 * Revision 1.1 2000/10/24 14:11:29 fpeng
91 * Initial revision
92 * Revision 1.5 2000/08/31 23:41:58Z bcolford
93 * Replaced AMPS_SUPPORTED with SYS_OPTION_AMPS.
94 * Revision 1.4 2000/08/23 22:11:31Z RSATTARI
95 * Isotel release 2.8 plus LSI applicable IS-95B changes.
96 * Revision 1.17 1999/12/09 22:01:46 gfrye
97 * Moved definitions of System Determination Indications to css_api.h
98 *
99 * Revision 1.16 1999/08/31 00:09:18 gfrye
100 * Added new system determination indication CP_PREV_SYSTEM_LOST_ACCESS.
101 *
102 * Revision 1.15 1999/03/02 00:53:43 dfischer
103 * Added state CP_AMPS_SYSDET_DELAY
104 *
105 * Revision 1.14 1999/02/26 00:33:36 mhayduk
106 * Added PILOT_PN to status record.
107 *
108 * Revision 1.13 1999/02/25 19:40:55 mhayduk
109 * Added call to allow any engine component to request status be
110 * sent to wbios.
111 *
112 * Revision 1.12 1998/12/22 19:08:55 dfischer
113 * Added CP_AMPS_REGCONF_WFOMT
114 *
115 * Revision 1.11 1998/11/27 22:29:13 mhayduk
116 * Removed system A/B definitions and just use the
117 * current ones defined in engine.h.
118 *
119 * Revision 1.10 1998/11/26 23:15:13 mhayduk
120 * Added interfaces to update the new status elements -
121 * mode and block.
122 *
123 * Revision 1.9 1998/11/26 22:08:19 mhayduk
124 * Updated status structure for new api.
125 *
126 * Revision 1.8 1998/10/20 23:58:23 mhayduk
127 * Added T53 support.
128 *
129 * Revision 1.7 1998/09/22 18:44:57 tdaly
130 * Added IS-95 analog mode support.
131 *
132 * Revision 1.6 1998/08/28 20:15:59 mhayduk
133 * Added setting of band.
134 *
135 * Revision 1.5 1998/05/27 17:16:28 scotvold
136 * Updated for Release 0.05.
137 *
138 * Revision 1.4 1998/05/01 18:13:54 scotvold
139 * Update for release 0.04
140 *
141 * Revision 1.3 1998/03/30 23:26:03 mhayduk
142 * Release 0.03.
143 *
144 * Revision 1.1 1997/11/06 17:49:24 mhayduk
145 * Initial revision
146 *
147 *
148 ****************************************************************************
149 ****************************************************************************/
150
151#ifndef _STATUS_H_
152
153 #define _STATUS_H_ 1
154
155/*****************************************************************************
156 * Includes
157 ****************************************************************************/
158#include "cssapi.h"
159#include "pswapi.h"
160
161/*****************************************************************************
162 * Definitions
163 ****************************************************************************/
164
165
166 #define CP_AMPS_FIRST_STATE CP_AMPS_WBIOS_INIT
167
168 #define CP_AMPS_LAST_STATE CP_AMPS_NUM_STATES
169
170/*****************************************************************************
171 * Call Processing Status Information structure
172 ****************************************************************************/
173 typedef struct
174 {
175 CPState state; /* Call Processing State */
176 CPState prevState; /* Previous Call Processing State */
177 kal_uint8 roam; /* ROAM Status */
178 SysCdmaBandT band; /* Current Operating Band */
179 kal_uint16 channel; /* Current Channel Number */
180 kal_uint8 mode; /* current mode: PCS/CellularAnalog */
181 kal_uint8 block; /* current CDMA block (if CDMA system) */
182 kal_uint8 servingSystem; /* Serving System/Block */
183 kal_uint16 sid; /* Last-Received System ID */
184 kal_uint16 nid; /* Last-Received Network ID */
185 kal_uint16 pilotPN; /* PILOT_PN */
186 } CPStatus;
187
188
189/*****************************************************************************
190 * Function prototypes
191 ****************************************************************************/
192 void cpSetSystemIndication(kal_uint8 indication);
193 kal_uint8 cpGetSystemIndication(void);
194 void setCPState(CPState state);
195 void cpSetRoam(kal_uint8 roam);
196 kal_uint8 cpGetRoam(void);
197 void cpSetCurrentBand(SysCdmaBandT band);
198 SysCdmaBandT cpGetCurrentBand(void);
199 void cpSetCurrentChannel(kal_uint16 channel);
200 kal_uint16 cpGetCurrentChannel(void);
201 void cpSetCurrentBlock(kal_uint8 block);
202 void cpSetServingSystem(kal_uint8 servingSystem);
203 kal_uint8 cpGetServingSystem(void);
204 void cpSetSysID(kal_uint16 sid);
205 kal_uint16 cpGetSysID(void);
206 void cpSetNID(kal_uint16 nid);
207 kal_uint16 cpGetNID(void);
208 void cpSetPilotPN(kal_uint16 pn);
209 kal_uint16 cpGetPilotPN(void);
210 void cpReportStatus(void);
211 void cpSetProtocolRev( kal_uint8 prev );
212 kal_uint8 cpGetProtocolRev(void);
213 void cpSetSystemStatus( kal_uint8 status );
214 kal_uint8 cpGetSystemStatus(void);
215 kal_uint8 cpGetOrigCallMode(void);
216 void cpSetOrigCallMode(kal_uint8 callMode);
217
218#if defined(MTK_DEV_SLT)
219 kal_bool lstIf1xRxValidated (void);
220
221 void lstSet1xRxValidated (kal_bool value);
222
223 void lstInit1xProcedureVariable (void);
224
225 kal_bool lstIf1xTxValidated (void);
226
227 void lstSet1xTxValidated (kal_bool value);
228#endif /* MTK_DEV_SLT */
229void cpSetRegZone(kal_uint16 regZone);
230CPState getCPPrevState(void);
231void cpInitStatus(void);
232
233#endif /* _STATUS_H_ */
234
235