blob: f60338198a59e38ab25c0aa00dcb8e7528b21ee0 [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) 2014
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 * Filename:
38 * ------------
39 * l4bsbp_public_api.h
40 *
41 * Project:
42 * ------------
43 * MOLY
44 *
45 * Description:
46 * ------------
47 * This file defines functions/enums for external module usage.
48 *
49 * Author:
50 * -----------
51 * -------
52 *
53 *===========================================================
54 * $Log$
55 *
56 * 09 06 2019 titi.wu
57 * [MOLY00431999] [97] code sync
58 *
59 * .
60 *
61 * 06 12 2018 peter-sl.yeh
62 * [MOLY00332770] DSBP reconfig modification and SIM trans_id addition for DSBP
63 * .
64 *
65 * 06 12 2018 peter-sl.yeh
66 * [MOLY00332770] DSBP reconfig modification and SIM trans_id addition for DSBP
67 * .
68 *
69 * 05 17 2018 peter-sl.yeh
70 * [MOLY00326718] [Gen93] Add SBP API to get operator by PLMN ID
71 * .
72 *
73 *
74 *****************************************************************************/
75
76#ifndef _L4BSBP_PUBLIC_API_H_
77#define _L4BSBP_PUBLIC_API_H_
78
79#include "kal_general_types.h"
80#include "sim_exported_enum.h"
81
82
83#ifndef L4BSBP_DSBP_MODE_DEFINED
84#define L4BSBP_DSBP_MODE_DEFINED
85typedef enum
86{
87 L4BSBP_DSBP_MODE_NONE,
88 L4BSBP_DSBP_MODE_1,
89 L4BSBP_DSBP_MODE_2,
90} l4bsbp_dsbp_mode_enum;
91#endif
92
93typedef enum
94{
95 L4BSBP_DSBP_STATUS_NONE,
96 L4BSBP_DSBP_STATUS_LEVEL1_DSBP_ONDOING,
97 L4BSBP_DSBP_STATUS_LEVEL2_DSBP_ONDOING,
98} l4bsbp_dsbp_status_enum;
99
100/*****************************************************************************
101* FUNCTION
102* l4bsbp_get_dsbp_status()
103*
104* DESCRIPTION
105* This function is used to get current D-SBP procedure status.
106*
107* PARAMETERS
108* ps_id [IN] protocol stack ID
109*
110* RETURNS
111* l4bsbp_dsbp_status_enum
112*****************************************************************************/
113extern l4bsbp_dsbp_status_enum l4bsbp_get_dsbp_status(protocol_id_enum ps_id);
114
115/*****************************************************************************
116 * FUNCTION
117 * l4bsbp_expected_efun_state
118 *
119 * DESCRIPTION
120 * Compute expected EFUN state according to the D-SBP status
121 *
122 * PARAMETERS
123 * current_efun [IN] current EFUN state
124 *
125 * RETURNS
126 * kal_uint8 expected EFUN state
127 *
128 *****************************************************************************/
129extern kal_uint8 l4bsbp_expected_efun_state(kal_uint8 current_efun);
130
131/*****************************************************************************
132 * FUNCTION
133 * l4bsbp_get_operator_by_plmn_id
134 *
135 * DESCRIPTION
136 * get SBP ID by PLMN ID (MCC+MNC)
137 *
138 * PARAMETERS
139 * plmn [IN] PLMN ID in integer format, ex. 460-01 = 46001
140 *
141 * RETURNS
142 * void
143 *
144 *****************************************************************************/
145extern kal_uint32 l4bsbp_get_operator_by_plmn_id(kal_uint32 plmn_id);
146
147/*****************************************************************************
148 * FUNCTION
149 * l4bsbp_get_ap_dsbp_mode
150 *
151 * DESCRIPTION
152 * get AP DSBP Mode (None, Mode_1, Mode2)
153 *
154 * PARAMETERS
155 * ilm_ptr [IN]
156 *
157 * RETURNS
158 * void
159 *
160 *****************************************************************************/
161extern l4bsbp_dsbp_mode_enum l4bsbp_get_ap_dsbp_mode(void);
162
163/*****************************************************************************
164 * FUNCTION
165 * l4bsbp_get_mcc_mnc_for_current_sim_sbp_id
166 *
167 * DESCRIPTION
168 * get MCC/MNC for current used SIM SBP ID.
169 * Please contact with SBP owner to make sure you could use this API.
170 *
171 * PARAMETERS
172 * current_ps_id [IN] Current PS ID
173 * mcc[L4BSBP_MAX_MCC_MNC_LEN] [IN] MCC for current used SIM SBP ID
174 * mnc[L4BSBP_MAX_MCC_MNC_LEN] [IN] MNC for current used SIM SBP ID
175 *
176 *
177 * RETURNS
178 * Void
179 *
180 *****************************************************************************/
181extern void l4bsbp_get_mcc_mnc_for_current_sim_sbp_id(protocol_id_enum current_ps_id, kal_uint8 *mcc, kal_uint8 *mnc);
182
183
184#endif // _VDM_EXTERNAL_LIB_H_