1 /* 2 * Copyright (C) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef CELLULAR_CALL_CONNECTION_SATELLITE_H 17 #define CELLULAR_CALL_CONNECTION_SATELLITE_H 18 19 #include "base_connection.h" 20 #include "tel_ril_call_parcel.h" 21 22 namespace OHOS { 23 namespace Telephony { 24 class CellularCallConnectionSatellite : public BaseConnection { 25 public: 26 /** 27 * Constructor 28 */ 29 CellularCallConnectionSatellite() = default; 30 31 /** 32 * Destructor 33 */ 34 ~CellularCallConnectionSatellite() = default; 35 36 /** 37 * DialRequest 38 * 39 * @param slotId 40 * @param DialRequestStruct 41 * @return Error Code: Returns TELEPHONY_SUCCESS on success, others on failure. 42 */ 43 int32_t DialRequest(int32_t slotId, const DialRequestStruct &dialRequest); 44 45 /** 46 * HangUpRequest 47 * 48 * @param slotId 49 * @return Error Code: Returns TELEPHONY_SUCCESS on success, others on failure. 50 */ 51 int32_t HangUpRequest(int32_t slotId); 52 53 /** 54 * AnswerRequest 55 * 56 * @param slotId 57 * @return Error Code: Returns TELEPHONY_SUCCESS on success, others on failure. 58 */ 59 int32_t AnswerRequest(int32_t slotId); 60 61 /** 62 * RejectRequest 63 * 64 * @param slotId 65 * @return Error Code: Returns TELEPHONY_SUCCESS on success, others on failure. 66 */ 67 int32_t RejectRequest(int32_t slotId); 68 69 /** 70 * SatelliteControl GetSatelliteCallsDataRequest 71 * 72 * 27007-430_2001 7.18 List current calls +CLCC 73 * 3GPP TS 22.030 [19] 74 * 75 * Returns list of current calls of ME. 76 * 77 * @param slotId 78 * @param lastCallsDataFlag 79 * @return Error Code: Returns TELEPHONY_SUCCESS on success, others on failure. 80 */ 81 int32_t GetSatelliteCallsDataRequest(int32_t slotId, int64_t lastCallsDataFlag); 82 83 /** 84 * Get Call Fail Reason Request 85 * 86 * @param slotId 87 * @return Error Code: Returns TELEPHONY_SUCCESS on success, others on failure. 88 */ 89 int32_t GetCallFailReasonRequest(int32_t slotId) const; 90 91 /** 92 * RegisterHandler 93 */ 94 void RegisterHandler(); 95 96 /** 97 * SendDtmfRequest 98 * 99 * @param slotId 100 * @param char cDtmfCode 101 * @param index 102 * @return Error Code: Returns TELEPHONY_SUCCESS on success, others on failure. 103 */ 104 int32_t SendDtmfRequest(int32_t slotId, char cDtmfCode, int32_t index) const; 105 106 /** 107 * StartDtmfRequest 108 * 109 * @param slotId 110 * @param char cDtmfCode 111 * @param index 112 * @return Error Code: Returns TELEPHONY_SUCCESS on success, others on failure. 113 */ 114 int32_t StartDtmfRequest(int32_t slotId, char cDtmfCode, int32_t index) const; 115 116 /** 117 * StopDtmfRequest 118 * 119 * @param slotId 120 * @param index 121 * @return Error Code: Returns TELEPHONY_SUCCESS on success, others on failure. 122 */ 123 int32_t StopDtmfRequest(int32_t slotId, int32_t index) const; 124 125 private: 126 virtual int32_t ProcessPostDialCallChar(int32_t slotId, char c) override; 127 }; 128 } // namespace Telephony 129 } // namespace OHOS 130 131 #endif // CELLULAR_CALL_CONNECTION_SATELLITE_H