rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | /***************************************************************************** |
| 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) 2005 |
| 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 | #ifndef __RIL_STK__ |
| 36 | #define __RIL_STK__ |
| 37 | |
| 38 | #include <vendor-ril/telephony/ril.h> |
| 39 | #include "common.h" |
| 40 | /***************************************************************************** |
| 41 | * Enum |
| 42 | *****************************************************************************/ |
| 43 | // Proactive Command Type |
| 44 | typedef enum { |
| 45 | CMD_REFRESH = 0x01, |
| 46 | CMD_MORE_TIME = 0x02, |
| 47 | CMD_POLL_INTERVAL = 0x03, |
| 48 | CMD_POLLING_OFF = 0x04, |
| 49 | CMD_SETUP_EVENT_LIST = 0x05, |
| 50 | CMD_SETUP_CALL = 0x10, |
| 51 | CMD_SEND_SS = 0x11, |
| 52 | CMD_SEND_USSD = 0x12, |
| 53 | CMD_SEND_SMS = 0x13, |
| 54 | CMD_DTMF = 0x14, |
| 55 | CMD_LAUNCH_BROWSER = 0x15, |
| 56 | CMD_PLAY_TONE = 0x20, |
| 57 | CMD_DSPL_TXT = 0x21, |
| 58 | CMD_GET_INKEY = 0x22, |
| 59 | CMD_GET_INPUT = 0x23, |
| 60 | CMD_SELECT_ITEM = 0x24, |
| 61 | CMD_SETUP_MENU = 0x25, |
| 62 | CMD_PROVIDE_LOCAL_INFO = 0x26, |
| 63 | CMD_TIMER_MANAGER = 0x27, |
| 64 | CMD_IDLE_MODEL_TXT = 0x28, |
| 65 | CMD_PERFORM_CARD_APDU = 0x30, |
| 66 | CMD_POWER_ON_CARD = 0x31, |
| 67 | CMD_POWER_OFF_CARD = 0x32, |
| 68 | CMD_GET_READER_STATUS = 0x33, |
| 69 | CMD_RUN_AT = 0x34, |
| 70 | CMD_LANGUAGE_NOTIFY = 0x35, |
| 71 | CMD_OPEN_CHAN = 0x40, |
| 72 | CMD_CLOSE_CHAN = 0x41, |
| 73 | CMD_RECEIVE_DATA = 0x42, |
| 74 | CMD_SEND_DATA = 0x43, |
| 75 | CMD_GET_CHAN_STATUS = 0x44, |
| 76 | CMD_RFU = 0x60, |
| 77 | CMD_END_PROACTIVE_SESSION = 0x81, |
| 78 | CMD_DETAIL = 0xFF |
| 79 | } CatProactiveCmdEnum; |
| 80 | typedef enum { |
| 81 | CMD_TYPE_PROACTIVE = 0x00, |
| 82 | CMD_TYPE_NOTIFY = 0x01, |
| 83 | CMD_YPE_SESSIONEND = 0x02 |
| 84 | } sat_cmd_type_num; |
| 85 | int sendEnvelope(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 86 | int sendTerminalResponse(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 87 | int sendEnvelopeWithStatus(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 88 | int handleCallSetupRequestFromSim(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 89 | int reportStkServiceIsRunning(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 90 | void handleStkCommand(char* response, int responselen, int slot_id); |
| 91 | #endif |