1 /* 2 * Copyright (C) 2021 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 CARRIER_CALL_H 17 #define CARRIER_CALL_H 18 19 #include "call_base.h" 20 #include "cellular_call_connection.h" 21 22 namespace OHOS { 23 namespace Telephony { 24 class CarrierCall : public CallBase { 25 public: 26 CarrierCall(DialParaInfo &info); 27 CarrierCall(DialParaInfo &info, AppExecFwk::PacMap &extras); 28 ~CarrierCall(); 29 int32_t CarrierDialingProcess(); 30 int32_t CarrierAnswerCall(int32_t videoState); 31 int32_t CarrierRejectCall(); 32 int32_t CarrierHangUpCall(); 33 int32_t CarrierHoldCall(); 34 int32_t CarrierUnHoldCall(); 35 int32_t CarrierSetMute(int32_t mute, int32_t slotId); 36 void GetCallAttributeCarrierInfo(CallAttributeInfo &info); 37 bool GetEmergencyState() override; 38 int32_t CarrierSwitchCall(); 39 int32_t StartDtmf(char str) override; 40 int32_t StopDtmf() override; 41 int32_t GetSlotId() override; 42 int32_t CarrierCombineConference(); 43 int32_t CarrierSeparateConference(); 44 int32_t IsSupportConferenceable() override; 45 46 protected: 47 int32_t PackCellularCallInfo(CellularCallInfo &callInfo); 48 49 private: 50 DialScene dialScene_; 51 int32_t slotId_; 52 int32_t index_; 53 bool isEcc_; 54 std::mutex mutex_; 55 std::shared_ptr<CellularCallConnection> cellularCallConnectionPtr_; 56 }; 57 } // namespace Telephony 58 } // namespace OHOS 59 60 #endif // CARRIER_CALL_H 61