rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | /* 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 | |
| 42 | typedef enum { |
| 43 | UNKNOWN, |
| 44 | EN16454_ECALL, |
| 45 | GOST_ECALL, |
| 46 | NG_ECALL, |
| 47 | } ECALL_TYPE; |
| 48 | |
| 49 | typedef enum { |
| 50 | GOST_EGTS_PT_RESPONSE = 0, |
| 51 | GOST_EGTS_PT_APPDATA, |
| 52 | GOST_EGTS_PT_SIGNED_APPDATA, |
| 53 | } ECALL_PT_T; |
| 54 | |
| 55 | typedef enum { |
| 56 | ECALL_INACTIVITY = 0, |
| 57 | ECALL_DEREGISTRATION, |
| 58 | } GOST_ECALL_RETURN_T; |
| 59 | |
| 60 | enum { |
| 61 | ECALL_NETWORK_SELECT_COMPLETE = 0, |
| 62 | ECALL_NETWORK_SELECTING, |
| 63 | }; |
| 64 | |
| 65 | int setIVS(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 66 | int setTestNum(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 67 | int setReconfNum(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 68 | int setMSD(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 69 | int setPASP(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 70 | int makeECall(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 71 | int IVSPushMSD(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 72 | int PSAPPushMSD(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 73 | int setMSDMode(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 74 | int dialFastEcall(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 75 | int setCTRLSequence(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 76 | int resetIVS(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 77 | int setEmsdpri(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 78 | void handleEcallIndication(const void* data, int datalen, RIL_SOCKET_ID soc_id); |
| 79 | void init_ecall_timer_all(); |
| 80 | int setMsdDateForTest(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 81 | int setNadDeregTime(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 82 | int setNadRegState(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 83 | int setEcallType(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 84 | int getEcallType(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 85 | bool isEn16454Ecall(); |
| 86 | bool isGostEcall(); |
| 87 | bool isNgEcall(); |
| 88 | int gostTransmitAttemptsSet(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 89 | int gostTransmitIntervalSet(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 90 | int gostTransmitDefaultSet(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 91 | int gostNetworkSelectionSet(int soc_id); |
| 92 | void gostSaveSmsData(int argc, char** argv ,RIL_SOCKET_ID id); |
| 93 | void gostDelSaveSmsData(); |
| 94 | int gostParseSmsHandle(int soc_id, char *num, char *msg); |
| 95 | int gostEcallResendMsd(bool flg); |
| 96 | void gostSetInNeedRegister(bool flags); |
| 97 | void gostFastEcallFlgSet(bool flags); |
| 98 | bool isEcallAudioPath(); |
| 99 | void setEcallAudioPathOn(bool on); |
| 100 | #endif /*ECALL_SUPPORT*/ |
| 101 | #endif |