/* * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef OHOS_BLUETOOTH_STANDARD_HFP_HF_SERVER_H #define OHOS_BLUETOOTH_STANDARD_HFP_HF_SERVER_H #include #include #include "bluetooth_types.h" #include "bluetooth_hfp_hf_stub.h" namespace OHOS { namespace Bluetooth { class BluetoothHfpHfServer : public BluetoothHfpHfStub{ public: explicit BluetoothHfpHfServer(); ~BluetoothHfpHfServer() override; bool ConnectSco(const BluetoothRawAddress &device) override; bool DisconnectSco(const BluetoothRawAddress &device) override; int GetDevicesByStates(const std::vector &states, std::vector &devices) override; int GetDeviceState(const BluetoothRawAddress &device) override; int GetScoState(const BluetoothRawAddress &device) override; bool SendDTMFTone(const BluetoothRawAddress &device, uint8_t code) override; int Connect(const BluetoothRawAddress &device) override; int Disconnect(const BluetoothRawAddress &device) override; bool OpenVoiceRecognition(const BluetoothRawAddress &device) override; bool CloseVoiceRecognition(const BluetoothRawAddress &device) override; int GetCurrentCallList(const BluetoothRawAddress &device, std::vector &calls) override; bool AcceptIncomingCall(const BluetoothRawAddress &device, int flag) override; bool HoldActiveCall(const BluetoothRawAddress &device) override; bool RejectIncomingCall(const BluetoothRawAddress &device) override; bool SendKeyPressed(const BluetoothRawAddress &device) override; bool HandleIncomingCall(const BluetoothRawAddress &device, int flag) override; bool HandleMultiCall(const BluetoothRawAddress &device, int flag, int index) override; bool DialLastNumber(const BluetoothRawAddress &device) override; bool DialMemory(const BluetoothRawAddress &device, int index) override; bool SendVoiceTag(const BluetoothRawAddress &device, int index) override; bool FinishActiveCall(const BluetoothRawAddress &device, const BluetoothHfpHfCall &call) override; int StartDial(const BluetoothRawAddress &device, const std::string &number, BluetoothHfpHfCall &call) override; void RegisterObserver(const sptr &observer) override; void DeregisterObserver(const sptr &observer) override; private: BLUETOOTH_DECLARE_IMPL(); BLUETOOTH_DISALLOW_COPY_AND_ASSIGN(BluetoothHfpHfServer); }; } // namespace Bluetooth } // namespace OHOS #endif // OHOS_BLUETOOTH_STANDARD_HFP_HF_SERVER_H