blob: f04c02067da2831931f935f1531868efcfc026e8 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/* Copyright Statement:
2 *
3 * This software/firmware and related documentation ("MediaTek Software") are
4 * protected under relevant copyright laws. The information contained herein
5 * is confidential and proprietary to MediaTek Inc. and/or its licensors.
6 * Without the prior written permission of MediaTek inc. and/or its licensors,
7 * any reproduction, modification, use or disclosure of MediaTek Software,
8 * and information contained herein, in whole or in part, shall be strictly prohibited.
9 */
10/* MediaTek Inc. (C) 2010. All rights reserved.
11 *
12 * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
13 * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
14 * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
15 * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
18 * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
19 * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
20 * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
21 * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
22 * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
23 * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
24 * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
25 * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
26 * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
27 * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
28 * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
29 * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
30 *
31 * The following software/firmware and/or related documentation ("MediaTek Software")
32 * have been modified by MediaTek Inc. All revisions are subject to any receiver's
33 * applicable license agreements with MediaTek Inc.
34 */
35#ifndef __RIL_ECALL__
36#define __RIL_ECALL__
37#include "common.h"
38#include <vendor-ril/telephony/ril.h>
39
40#ifdef ECALL_SUPPORT
41
42typedef enum {
43 UNKNOWN,
44 EN16454_ECALL,
45 GOST_ECALL,
46 NG_ECALL,
47} ECALL_TYPE;
48
49typedef enum {
50 GOST_EGTS_PT_RESPONSE = 0,
51 GOST_EGTS_PT_APPDATA,
52 GOST_EGTS_PT_SIGNED_APPDATA,
53} ECALL_PT_T;
54
55typedef enum {
56 ECALL_INACTIVITY = 0,
57 ECALL_DEREGISTRATION,
58} GOST_ECALL_RETURN_T;
59
60enum {
61 ECALL_NETWORK_SELECT_COMPLETE = 0,
62 ECALL_NETWORK_SELECTING,
63};
64
65int setIVS(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
66int setTestNum(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
67int setReconfNum(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
68int setMSD(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
69int setPASP(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
70int makeECall(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
71int IVSPushMSD(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
72int PSAPPushMSD(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
73int setMSDMode(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
74int dialFastEcall(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
75int setCTRLSequence(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
76int resetIVS(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
77int setEmsdpri(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
78void handleEcallIndication(const void* data, int datalen, RIL_SOCKET_ID soc_id);
79void init_ecall_timer_all();
80int setMsdDateForTest(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
81int setNadDeregTime(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
82int setNadRegState(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
83int setEcallType(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
84int getEcallType(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
85bool isEn16454Ecall();
86bool isGostEcall();
87bool isNgEcall();
88int gostTransmitAttemptsSet(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
89int gostTransmitIntervalSet(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
90int gostTransmitDefaultSet(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
91int gostNetworkSelectionSet(int soc_id);
92void gostSaveSmsData(int argc, char** argv ,RIL_SOCKET_ID id);
93void gostDelSaveSmsData();
94int gostParseSmsHandle(int soc_id, char *num, char *msg);
95int gostEcallResendMsd(bool flg);
96void gostSetInNeedRegister(bool flags);
97void gostFastEcallFlgSet(bool flags);
98bool isEcallAudioPath();
99void setEcallAudioPathOn(bool on);
100#endif /*ECALL_SUPPORT*/
101#endif