1e1c44949Sopenharmony_ci/* 2e1c44949Sopenharmony_ci * Copyright (C) 2021 Huawei Device Co., Ltd. 3e1c44949Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4e1c44949Sopenharmony_ci * you may not use this file except in compliance with the License. 5e1c44949Sopenharmony_ci * You may obtain a copy of the License at 6e1c44949Sopenharmony_ci * 7e1c44949Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8e1c44949Sopenharmony_ci * 9e1c44949Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10e1c44949Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11e1c44949Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12e1c44949Sopenharmony_ci * See the License for the specific language governing permissions and 13e1c44949Sopenharmony_ci * limitations under the License. 14e1c44949Sopenharmony_ci */ 15e1c44949Sopenharmony_ci 16e1c44949Sopenharmony_ci#ifndef CARRIER_CALL_H 17e1c44949Sopenharmony_ci#define CARRIER_CALL_H 18e1c44949Sopenharmony_ci 19e1c44949Sopenharmony_ci#include "call_base.h" 20e1c44949Sopenharmony_ci#include "cellular_call_connection.h" 21e1c44949Sopenharmony_ci 22e1c44949Sopenharmony_cinamespace OHOS { 23e1c44949Sopenharmony_cinamespace Telephony { 24e1c44949Sopenharmony_ciclass CarrierCall : public CallBase { 25e1c44949Sopenharmony_cipublic: 26e1c44949Sopenharmony_ci explicit CarrierCall(DialParaInfo &info); 27e1c44949Sopenharmony_ci CarrierCall(DialParaInfo &info, AppExecFwk::PacMap &extras); 28e1c44949Sopenharmony_ci ~CarrierCall(); 29e1c44949Sopenharmony_ci int32_t CarrierDialingProcess(); 30e1c44949Sopenharmony_ci int32_t CarrierAnswerCall(int32_t videoState); 31e1c44949Sopenharmony_ci int32_t CarrierRejectCall(); 32e1c44949Sopenharmony_ci int32_t CarrierHangUpCall(); 33e1c44949Sopenharmony_ci int32_t CarrierHoldCall(); 34e1c44949Sopenharmony_ci int32_t CarrierUnHoldCall(); 35e1c44949Sopenharmony_ci int32_t CarrierSetMute(int32_t mute, int32_t slotId); 36e1c44949Sopenharmony_ci void GetCallAttributeCarrierInfo(CallAttributeInfo &info); 37e1c44949Sopenharmony_ci bool GetEmergencyState() override; 38e1c44949Sopenharmony_ci int32_t CarrierSwitchCall(); 39e1c44949Sopenharmony_ci int32_t StartDtmf(char str) override; 40e1c44949Sopenharmony_ci int32_t StopDtmf() override; 41e1c44949Sopenharmony_ci int32_t PostDialProceed(bool proceed) override; 42e1c44949Sopenharmony_ci int32_t GetSlotId() override; 43e1c44949Sopenharmony_ci int32_t CarrierCombineConference(); 44e1c44949Sopenharmony_ci int32_t CarrierSeparateConference(); 45e1c44949Sopenharmony_ci int32_t CarrierKickOutFromConference(); 46e1c44949Sopenharmony_ci int32_t IsSupportConferenceable() override; 47e1c44949Sopenharmony_ci void SetSlotId(int32_t slotId) override; 48e1c44949Sopenharmony_ci void SetCallIndex(int32_t index) override; 49e1c44949Sopenharmony_ci int32_t GetCallIndex() override; 50e1c44949Sopenharmony_ci 51e1c44949Sopenharmony_ciprotected: 52e1c44949Sopenharmony_ci int32_t PackCellularCallInfo(CellularCallInfo &callInfo); 53e1c44949Sopenharmony_ci 54e1c44949Sopenharmony_ciprivate: 55e1c44949Sopenharmony_ci DialScene dialScene_; 56e1c44949Sopenharmony_ci int32_t slotId_; 57e1c44949Sopenharmony_ci int32_t index_; 58e1c44949Sopenharmony_ci bool isEcc_; 59e1c44949Sopenharmony_ci std::mutex mutex_; 60e1c44949Sopenharmony_ci std::shared_ptr<CellularCallConnection> cellularCallConnectionPtr_; 61e1c44949Sopenharmony_ci}; 62e1c44949Sopenharmony_ci} // namespace Telephony 63e1c44949Sopenharmony_ci} // namespace OHOS 64e1c44949Sopenharmony_ci 65e1c44949Sopenharmony_ci#endif // CARRIER_CALL_H 66