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 YOCTO_SMS_H |
| 36 | #define YOCTO_SMS_H 1 |
| 37 | |
| 38 | #include <vendor-ril/telephony/ril.h> |
| 39 | #include "common.h" |
| 40 | |
| 41 | //for auto save sms to sim |
| 42 | typedef struct { |
| 43 | int charset; |
| 44 | int sendStatus; |
| 45 | char num[16]; |
| 46 | char sms[512]; |
| 47 | char smsc[16]; |
| 48 | }smsSaveInfo; |
| 49 | |
| 50 | //RIL_REQUEST_SEND_SMS |
| 51 | int sendSMS(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 52 | //RIL_REQUEST_SEND_SMS_EXPECT_MORE |
| 53 | int sendSMSExpectMore(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 54 | //RIL_REQUEST_IMS_SEND_SMS |
| 55 | int sendImsGsmSms(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 56 | int sendImsCdmaSms(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 57 | /*int sendImsCdmaSms(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);*/ |
| 58 | //RIL_REQUEST_WRITE_SMS_TO_SIM |
| 59 | int writeSmsToSim(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 60 | //RIL_REQUEST_DELETE_SMS_ON_SIM |
| 61 | int deleteSmsOnSim(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 62 | //RIL_REQUEST_SMS_ACKNOWLEDGE |
| 63 | int acknowledgeLastIncomingGsmSms(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 64 | //RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU |
| 65 | int acknowledgeIncomingGsmSmsWithPdu(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 66 | //RIL_REQUEST_REPORT_SMS_MEMORY_STATUS |
| 67 | int reportSmsMemoryStatus(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 68 | //RIL_REQUEST_SET_SMSC_ADDRESS |
| 69 | int setSmscAddress(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 70 | //RIL_REQUEST_GET_SMSC_ADDRESS |
| 71 | int getSmscAddress(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 72 | void sendSMSACK(RIL_SOCKET_ID soc_id); |
| 73 | int responseNewSMS(const char *data, size_t datalen, int soc_id,int32_t unsol); |
| 74 | |
| 75 | #ifdef C2K_SUPPORT |
| 76 | int getCdmaBroadcastConfig(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 77 | int deleteSmsOnRUIM(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 78 | int setCdmaBroadcastConfig(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 79 | int setCdmaBroadcastActivation(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 80 | int writeSmsToRuim(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 81 | int sendCdmaSms(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 82 | int acknowledgeLastIncomingCdmaSms(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 83 | #endif /*C2K_SUPPORT*/ |
| 84 | int getGsmBroadcastConfig(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 85 | int setGsmBroadcastConfig(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 86 | int setGsmBroadcastActivation(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 87 | int getSmsSimMemStatus(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 88 | int setAutoSaveSmsToSimFlag(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 89 | int setSimSmsStorageFullFlag(bool enable); |
| 90 | int autoWriteSmsToSim(smsSaveInfo *smsInfo, int id); |
| 91 | int saveSendedSmsInfo(int charset, char* num, char* msg, char* smsc); |
| 92 | int sendStatusWriteSmsToSim(int socket_id); |
| 93 | int unreadStatusWriteSMSToSim(const char *data, size_t datalen, int soc_id); |
| 94 | int gostSendSmsForMsd(int id, char *num, char *msd); |
| 95 | int getGsmBroadcastLanguage(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 96 | int setGsmBroadcastLanguage(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI); |
| 97 | #endif |