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 I_BLUETOOTH_CALL_H 17 #define I_BLUETOOTH_CALL_H 18 19 #include <cstdio> 20 #include <memory> 21 #include <string> 22 23 #include "iremote_broker.h" 24 #include "pac_map.h" 25 26 #include "call_manager_inner_type.h" 27 28 namespace OHOS { 29 namespace Telephony { 30 extern "C" { 31 enum BluetoothCallSurfaceCode { 32 INTERFACE_BT_ANSWER_CALL = 0, 33 INTERFACE_BT_REJECT_CALL, 34 INTERFACE_BT_HOLD_CALL, 35 INTERFACE_BT_UNHOLD_CALL, 36 INTERFACE_BT_DISCONNECT_CALL, 37 INTERFACE_BT_GET_CALL_STATE, 38 INTERFACE_BT_SWAP_CALL, 39 INTERFACE_BT_COMBINE_CONFERENCE, 40 INTERFACE_BT_SEPARATE_CONFERENCE, 41 INTERFACE_BT_START_DTMF, 42 INTERFACE_BT_STOP_DTMF, 43 INTERFACE_BT_GET_CURRENT_CALL_LIST, 44 }; 45 } // end extern 46 47 class IBluetoothCall : public IRemoteBroker { 48 public: 49 virtual ~IBluetoothCall() = default; 50 virtual int32_t AnswerCall() = 0; 51 virtual int32_t RejectCall() = 0; 52 virtual int32_t HangUpCall() = 0; 53 virtual int32_t GetCallState() = 0; 54 virtual int32_t HoldCall() = 0; 55 virtual int32_t UnHoldCall() = 0; 56 virtual int32_t SwitchCall() = 0; 57 virtual int32_t CombineConference() = 0; 58 virtual int32_t SeparateConference() = 0; 59 virtual int32_t StartDtmf(char str) = 0; 60 virtual int32_t StopDtmf() = 0; 61 virtual std::vector<CallAttributeInfo> GetCurrentCallList(int32_t slotId) = 0; 62 63 public: 64 DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.IBluetoothCall"); 65 }; 66 } // namespace Telephony 67 } // namespace OHOS 68 69 #endif // I_BLUETOOTH_CALL_H