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 void GetCallAttributeCarrierInfo(CallAttributeInfo &info); 36 bool GetEmergencyState() override; 37 int32_t CarrierSwitchCall(); 38 int32_t StartDtmf(char str) override; 39 int32_t StopDtmf() override; 40 int32_t GetSlotId() override; 41 int32_t CarrierCombineConference(); 42 int32_t CarrierSeparateConference(); 43 int32_t IsSupportConferenceable() override; 44 45 protected: 46 int32_t PackCellularCallInfo(CellularCallInfo &callInfo); 47 48 private: 49 DialScene dialScene_; 50 int32_t slotId_; 51 int32_t index_; 52 bool isEcc_; 53 std::mutex mutex_; 54 std::shared_ptr<CellularCallConnection> cellularCallConnectionPtr_; 55 }; 56 } // namespace Telephony 57 } // namespace OHOS 58 59 #endif // CARRIER_CALL_H 60