195489c19Sopenharmony_ci/* 295489c19Sopenharmony_ci * Copyright (C) 2021 Huawei Device Co., Ltd. 395489c19Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 495489c19Sopenharmony_ci * you may not use this file except in compliance with the License. 595489c19Sopenharmony_ci * You may obtain a copy of the License at 695489c19Sopenharmony_ci * 795489c19Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 895489c19Sopenharmony_ci * 995489c19Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1095489c19Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1195489c19Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1295489c19Sopenharmony_ci * See the License for the specific language governing permissions and 1395489c19Sopenharmony_ci * limitations under the License. 1495489c19Sopenharmony_ci */ 1595489c19Sopenharmony_ci 1695489c19Sopenharmony_ci/** 1795489c19Sopenharmony_ci * @addtogroup Bluetooth 1895489c19Sopenharmony_ci * @{ 1995489c19Sopenharmony_ci * 2095489c19Sopenharmony_ci * @brief Defines a bluetooth system that provides basic bluetooth connection and profile functions, 2195489c19Sopenharmony_ci * including A2DP, AVRCP, BLE, GATT, HFP, MAP, PBAP, and SPP, etc. 2295489c19Sopenharmony_ci * 2395489c19Sopenharmony_ci * @since 6 2495489c19Sopenharmony_ci */ 2595489c19Sopenharmony_ci 2695489c19Sopenharmony_ci/** 2795489c19Sopenharmony_ci * @file bluetooth_hfp_hf.h 2895489c19Sopenharmony_ci * 2995489c19Sopenharmony_ci * @brief Declares HFP HF role framework functions, including basic and observer functions. 3095489c19Sopenharmony_ci * 3195489c19Sopenharmony_ci * @since 6 3295489c19Sopenharmony_ci */ 3395489c19Sopenharmony_ci 3495489c19Sopenharmony_ci#ifndef BLUETOOTH_HFP_HF_H 3595489c19Sopenharmony_ci#define BLUETOOTH_HFP_HF_H 3695489c19Sopenharmony_ci 3795489c19Sopenharmony_ci#include <string> 3895489c19Sopenharmony_ci#include <vector> 3995489c19Sopenharmony_ci#include <memory> 4095489c19Sopenharmony_ci 4195489c19Sopenharmony_ci#include "bluetooth_def.h" 4295489c19Sopenharmony_ci#include "bluetooth_types.h" 4395489c19Sopenharmony_ci#include "bluetooth_remote_device.h" 4495489c19Sopenharmony_ci#include "bluetooth_hf_call.h" 4595489c19Sopenharmony_ci#include "bluetooth_no_destructor.h" 4695489c19Sopenharmony_ci 4795489c19Sopenharmony_cinamespace OHOS { 4895489c19Sopenharmony_cinamespace Bluetooth { 4995489c19Sopenharmony_ci/** 5095489c19Sopenharmony_ci * @brief Class for HandsFree Unit observer functions. 5195489c19Sopenharmony_ci * 5295489c19Sopenharmony_ci * @since 6 5395489c19Sopenharmony_ci */ 5495489c19Sopenharmony_ciclass HandsFreeUnitObserver { 5595489c19Sopenharmony_cipublic: 5695489c19Sopenharmony_ci /** 5795489c19Sopenharmony_ci * @brief The observer function to notify connection state changed. 5895489c19Sopenharmony_ci * 5995489c19Sopenharmony_ci * @param device Remote device object. 6095489c19Sopenharmony_ci * @param state Connection state. 6195489c19Sopenharmony_ci * @param cause Connecton cause. 6295489c19Sopenharmony_ci * @since 12 6395489c19Sopenharmony_ci */ 6495489c19Sopenharmony_ci virtual void OnConnectionStateChanged(const BluetoothRemoteDevice &device, int state, int cause) 6595489c19Sopenharmony_ci {} 6695489c19Sopenharmony_ci 6795489c19Sopenharmony_ci /** 6895489c19Sopenharmony_ci * @brief The observer function to notify audio connection state changed. 6995489c19Sopenharmony_ci * 7095489c19Sopenharmony_ci * @param device Remote device object. 7195489c19Sopenharmony_ci * @param state Connection state. 7295489c19Sopenharmony_ci * @since 6 7395489c19Sopenharmony_ci */ 7495489c19Sopenharmony_ci virtual void OnScoStateChanged(const BluetoothRemoteDevice &device, int state) 7595489c19Sopenharmony_ci {} 7695489c19Sopenharmony_ci 7795489c19Sopenharmony_ci /** 7895489c19Sopenharmony_ci * @brief The observer function to notify call object changed. 7995489c19Sopenharmony_ci * 8095489c19Sopenharmony_ci * @param device Remote device object. 8195489c19Sopenharmony_ci * @param call Call object. 8295489c19Sopenharmony_ci * @since 6 8395489c19Sopenharmony_ci */ 8495489c19Sopenharmony_ci virtual void OnCallChanged(const BluetoothRemoteDevice &device, const HandsFreeUnitCall &call) 8595489c19Sopenharmony_ci {} 8695489c19Sopenharmony_ci 8795489c19Sopenharmony_ci /** 8895489c19Sopenharmony_ci * @brief The observer function to notify signal strength changed. 8995489c19Sopenharmony_ci * 9095489c19Sopenharmony_ci * @param device Remote device object. 9195489c19Sopenharmony_ci * @param batteryLevel Signal strength. 9295489c19Sopenharmony_ci * @since 6 9395489c19Sopenharmony_ci */ 9495489c19Sopenharmony_ci virtual void OnSignalStrengthChanged(const BluetoothRemoteDevice &device, int signal) 9595489c19Sopenharmony_ci {} 9695489c19Sopenharmony_ci 9795489c19Sopenharmony_ci /** 9895489c19Sopenharmony_ci * @brief The observer function to notify registration status changed. 9995489c19Sopenharmony_ci * 10095489c19Sopenharmony_ci * @param device Remote device object. 10195489c19Sopenharmony_ci * @param status Registration status. 10295489c19Sopenharmony_ci * @since 6 10395489c19Sopenharmony_ci */ 10495489c19Sopenharmony_ci virtual void OnRegistrationStatusChanged(const BluetoothRemoteDevice &device, int status) 10595489c19Sopenharmony_ci {} 10695489c19Sopenharmony_ci 10795489c19Sopenharmony_ci /** 10895489c19Sopenharmony_ci * @brief The observer function to notify roaming status changed. 10995489c19Sopenharmony_ci * 11095489c19Sopenharmony_ci * @param device Remote device object. 11195489c19Sopenharmony_ci * @param status Roaming status. 11295489c19Sopenharmony_ci * @since 6 11395489c19Sopenharmony_ci */ 11495489c19Sopenharmony_ci virtual void OnRoamingStatusChanged(const BluetoothRemoteDevice &device, int status) 11595489c19Sopenharmony_ci {} 11695489c19Sopenharmony_ci 11795489c19Sopenharmony_ci /** 11895489c19Sopenharmony_ci * @brief The observer function to notify operator selection name changed. 11995489c19Sopenharmony_ci * 12095489c19Sopenharmony_ci * @param device Remote device object. 12195489c19Sopenharmony_ci * @param name Operator selection name. 12295489c19Sopenharmony_ci * @since 6 12395489c19Sopenharmony_ci */ 12495489c19Sopenharmony_ci virtual void OnOperatorSelectionChanged(const BluetoothRemoteDevice &device, const std::string &name) 12595489c19Sopenharmony_ci {} 12695489c19Sopenharmony_ci 12795489c19Sopenharmony_ci /** 12895489c19Sopenharmony_ci * @brief The observer function to notify subscriber number changed. 12995489c19Sopenharmony_ci * 13095489c19Sopenharmony_ci * @param device Remote device object. 13195489c19Sopenharmony_ci * @param number Subscriber number. 13295489c19Sopenharmony_ci * @since 6 13395489c19Sopenharmony_ci */ 13495489c19Sopenharmony_ci virtual void OnSubscriberNumberChanged(const BluetoothRemoteDevice &device, const std::string &number) 13595489c19Sopenharmony_ci {} 13695489c19Sopenharmony_ci 13795489c19Sopenharmony_ci /** 13895489c19Sopenharmony_ci * @brief The observer function to notify voice recognition status changed. 13995489c19Sopenharmony_ci * 14095489c19Sopenharmony_ci * @param device Remote device object. 14195489c19Sopenharmony_ci * @param status Voice recognition status. 14295489c19Sopenharmony_ci * @since 6 14395489c19Sopenharmony_ci */ 14495489c19Sopenharmony_ci virtual void OnVoiceRecognitionStatusChanged(const BluetoothRemoteDevice &device, int status) 14595489c19Sopenharmony_ci {} 14695489c19Sopenharmony_ci 14795489c19Sopenharmony_ci /** 14895489c19Sopenharmony_ci * @brief The observer function to notify inBand ring tone status changed. 14995489c19Sopenharmony_ci * 15095489c19Sopenharmony_ci * @param device Remote device object. 15195489c19Sopenharmony_ci * @param status InBand ring tone status. 15295489c19Sopenharmony_ci * @since 6 15395489c19Sopenharmony_ci */ 15495489c19Sopenharmony_ci virtual void OnInBandRingToneChanged(const BluetoothRemoteDevice &device, int status) 15595489c19Sopenharmony_ci {} 15695489c19Sopenharmony_ci 15795489c19Sopenharmony_ci /** 15895489c19Sopenharmony_ci * @brief Destroy the HandsFreeUnitObserver object. 15995489c19Sopenharmony_ci * 16095489c19Sopenharmony_ci * @since 6 16195489c19Sopenharmony_ci */ 16295489c19Sopenharmony_ci virtual ~HandsFreeUnitObserver() 16395489c19Sopenharmony_ci {} 16495489c19Sopenharmony_ci}; 16595489c19Sopenharmony_ci 16695489c19Sopenharmony_ci/** 16795489c19Sopenharmony_ci * @brief Class for HandsFree Unit API. 16895489c19Sopenharmony_ci * 16995489c19Sopenharmony_ci * @since 6 17095489c19Sopenharmony_ci */ 17195489c19Sopenharmony_ciclass BLUETOOTH_API HandsFreeUnit { 17295489c19Sopenharmony_cipublic: 17395489c19Sopenharmony_ci /** 17495489c19Sopenharmony_ci * @brief Get the instance of HandsFreeAudioGateway object. 17595489c19Sopenharmony_ci * 17695489c19Sopenharmony_ci * @return Returns the pointer to the HandsFreeAudioGateway instance. 17795489c19Sopenharmony_ci * @since 6 17895489c19Sopenharmony_ci */ 17995489c19Sopenharmony_ci static HandsFreeUnit *GetProfile(); 18095489c19Sopenharmony_ci 18195489c19Sopenharmony_ci /** 18295489c19Sopenharmony_ci * @brief Initiate the establishment of an audio connection to remote AG device. 18395489c19Sopenharmony_ci * 18495489c19Sopenharmony_ci * @param device Remote device object. 18595489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 18695489c19Sopenharmony_ci * @since 6 18795489c19Sopenharmony_ci */ 18895489c19Sopenharmony_ci bool ConnectSco(const BluetoothRemoteDevice &device); 18995489c19Sopenharmony_ci 19095489c19Sopenharmony_ci /** 19195489c19Sopenharmony_ci * @brief Release the audio connection from remote HF device. 19295489c19Sopenharmony_ci * 19395489c19Sopenharmony_ci * @param device Remote device object. 19495489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 19595489c19Sopenharmony_ci * @since 6 19695489c19Sopenharmony_ci */ 19795489c19Sopenharmony_ci bool DisconnectSco(const BluetoothRemoteDevice &device); 19895489c19Sopenharmony_ci 19995489c19Sopenharmony_ci /** 20095489c19Sopenharmony_ci * @brief Get remote AG device list which are in the specified states. 20195489c19Sopenharmony_ci * 20295489c19Sopenharmony_ci * @param states List of remote device states. 20395489c19Sopenharmony_ci * @return Returns the list of devices. 20495489c19Sopenharmony_ci * @since 6 20595489c19Sopenharmony_ci */ 20695489c19Sopenharmony_ci std::vector<BluetoothRemoteDevice> GetDevicesByStates(std::vector<int> states) const; 20795489c19Sopenharmony_ci 20895489c19Sopenharmony_ci /** 20995489c19Sopenharmony_ci * @brief Get the connection state of the specified remote AG device. 21095489c19Sopenharmony_ci * 21195489c19Sopenharmony_ci * @param device Remote device object. 21295489c19Sopenharmony_ci * @return Returns the connection state of the remote device. 21395489c19Sopenharmony_ci * @since 6 21495489c19Sopenharmony_ci */ 21595489c19Sopenharmony_ci int GetDeviceState(const BluetoothRemoteDevice &device) const; 21695489c19Sopenharmony_ci 21795489c19Sopenharmony_ci /** 21895489c19Sopenharmony_ci * @brief Get the Audio connection state of the specified remote AG device. 21995489c19Sopenharmony_ci * 22095489c19Sopenharmony_ci * @param device Remote device object. 22195489c19Sopenharmony_ci * @return Returns the Audio connection state. 22295489c19Sopenharmony_ci * @since 6 22395489c19Sopenharmony_ci */ 22495489c19Sopenharmony_ci int GetScoState(const BluetoothRemoteDevice &device) const; 22595489c19Sopenharmony_ci 22695489c19Sopenharmony_ci /** 22795489c19Sopenharmony_ci * @brief Send DTMF tone code to remote AG device. 22895489c19Sopenharmony_ci * 22995489c19Sopenharmony_ci * @param device Remote device object. 23095489c19Sopenharmony_ci * @param code DTMF tone code. 23195489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 23295489c19Sopenharmony_ci * @since 6 23395489c19Sopenharmony_ci */ 23495489c19Sopenharmony_ci bool SendDTMFTone(const BluetoothRemoteDevice &device, uint8_t code); 23595489c19Sopenharmony_ci 23695489c19Sopenharmony_ci /** 23795489c19Sopenharmony_ci * @brief Initiate the establishment of a service level connection to remote AG device. 23895489c19Sopenharmony_ci * 23995489c19Sopenharmony_ci * @param device Remote device object. 24095489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 24195489c19Sopenharmony_ci * @since 6 24295489c19Sopenharmony_ci */ 24395489c19Sopenharmony_ci bool Connect(const BluetoothRemoteDevice &device); 24495489c19Sopenharmony_ci 24595489c19Sopenharmony_ci /** 24695489c19Sopenharmony_ci * @brief Release the audio connection from remote AG device. 24795489c19Sopenharmony_ci * 24895489c19Sopenharmony_ci * @param device Remote device object. 24995489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 25095489c19Sopenharmony_ci * @since 6 25195489c19Sopenharmony_ci */ 25295489c19Sopenharmony_ci bool Disconnect(const BluetoothRemoteDevice &device); 25395489c19Sopenharmony_ci 25495489c19Sopenharmony_ci /** 25595489c19Sopenharmony_ci * @brief Open voice recognition. 25695489c19Sopenharmony_ci * 25795489c19Sopenharmony_ci * @param device Remote device object. 25895489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 25995489c19Sopenharmony_ci * @since 6 26095489c19Sopenharmony_ci */ 26195489c19Sopenharmony_ci bool OpenVoiceRecognition(const BluetoothRemoteDevice &device); 26295489c19Sopenharmony_ci 26395489c19Sopenharmony_ci /** 26495489c19Sopenharmony_ci * @brief Close voice recognition. 26595489c19Sopenharmony_ci * 26695489c19Sopenharmony_ci * @param device Remote device object. 26795489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 26895489c19Sopenharmony_ci * @since 6 26995489c19Sopenharmony_ci */ 27095489c19Sopenharmony_ci bool CloseVoiceRecognition(const BluetoothRemoteDevice &device); 27195489c19Sopenharmony_ci 27295489c19Sopenharmony_ci /** 27395489c19Sopenharmony_ci * @brief Get a list of all existing calls. 27495489c19Sopenharmony_ci * 27595489c19Sopenharmony_ci * @param device Remote device object. 27695489c19Sopenharmony_ci * @return The list of all existing calls. 27795489c19Sopenharmony_ci * @since 6 27895489c19Sopenharmony_ci */ 27995489c19Sopenharmony_ci std::vector<HandsFreeUnitCall> GetExistingCalls(const BluetoothRemoteDevice &device); 28095489c19Sopenharmony_ci 28195489c19Sopenharmony_ci /** 28295489c19Sopenharmony_ci * @brief Accept an incoming call. 28395489c19Sopenharmony_ci * 28495489c19Sopenharmony_ci * @param device Remote device object. 28595489c19Sopenharmony_ci * @param flag Types of calls accepted. 28695489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 28795489c19Sopenharmony_ci * @since 6 28895489c19Sopenharmony_ci */ 28995489c19Sopenharmony_ci bool AcceptIncomingCall(const BluetoothRemoteDevice &device, int flag); 29095489c19Sopenharmony_ci 29195489c19Sopenharmony_ci /** 29295489c19Sopenharmony_ci * @brief Hold an active call. 29395489c19Sopenharmony_ci * 29495489c19Sopenharmony_ci * @param device Remote device object. 29595489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 29695489c19Sopenharmony_ci * @since 6 29795489c19Sopenharmony_ci */ 29895489c19Sopenharmony_ci bool HoldActiveCall(const BluetoothRemoteDevice &device); 29995489c19Sopenharmony_ci 30095489c19Sopenharmony_ci /** 30195489c19Sopenharmony_ci * @brief Reject an incoming call. 30295489c19Sopenharmony_ci * 30395489c19Sopenharmony_ci * @param device Remote device object. 30495489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 30595489c19Sopenharmony_ci * @since 6 30695489c19Sopenharmony_ci */ 30795489c19Sopenharmony_ci bool RejectIncomingCall(const BluetoothRemoteDevice &device); 30895489c19Sopenharmony_ci 30995489c19Sopenharmony_ci bool SendKeyPressed(const BluetoothRemoteDevice &device); 31095489c19Sopenharmony_ci 31195489c19Sopenharmony_ci /** 31295489c19Sopenharmony_ci * @brief Handle an incoming call. 31395489c19Sopenharmony_ci * 31495489c19Sopenharmony_ci * @param device Remote device object. 31595489c19Sopenharmony_ci * @param flag handle action 31695489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 31795489c19Sopenharmony_ci * @since 9 31895489c19Sopenharmony_ci */ 31995489c19Sopenharmony_ci bool HandleIncomingCall(const BluetoothRemoteDevice &device, int flag); 32095489c19Sopenharmony_ci 32195489c19Sopenharmony_ci /** 32295489c19Sopenharmony_ci * @brief Hande multi calll. 32395489c19Sopenharmony_ci * 32495489c19Sopenharmony_ci * @param device Remote device object. 32595489c19Sopenharmony_ci * @param flag handle action 32695489c19Sopenharmony_ci * @param index call index 32795489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 32895489c19Sopenharmony_ci * @since 9 32995489c19Sopenharmony_ci */ 33095489c19Sopenharmony_ci bool HandleMultiCall(const BluetoothRemoteDevice &device, int flag, int index); 33195489c19Sopenharmony_ci 33295489c19Sopenharmony_ci /** 33395489c19Sopenharmony_ci * @brief dial last number. 33495489c19Sopenharmony_ci * 33595489c19Sopenharmony_ci * @param device Remote device object. 33695489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 33795489c19Sopenharmony_ci * @since 9 33895489c19Sopenharmony_ci */ 33995489c19Sopenharmony_ci bool DialLastNumber(const BluetoothRemoteDevice &device); 34095489c19Sopenharmony_ci 34195489c19Sopenharmony_ci /** 34295489c19Sopenharmony_ci * @brief dial memory number. 34395489c19Sopenharmony_ci * 34495489c19Sopenharmony_ci * @param device Remote device object. 34595489c19Sopenharmony_ci * @param index memory number index 34695489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 34795489c19Sopenharmony_ci * @since 9 34895489c19Sopenharmony_ci */ 34995489c19Sopenharmony_ci bool DialMemory(const BluetoothRemoteDevice &device, int index); 35095489c19Sopenharmony_ci 35195489c19Sopenharmony_ci bool SendVoiceTag(const BluetoothRemoteDevice &device, int index); 35295489c19Sopenharmony_ci 35395489c19Sopenharmony_ci /** 35495489c19Sopenharmony_ci * @brief brief Finish a specified active call. 35595489c19Sopenharmony_ci * 35695489c19Sopenharmony_ci * @param device Remote device object. 35795489c19Sopenharmony_ci * @param call Call object. 35895489c19Sopenharmony_ci * @return Returns <b>true</b> if the operation is successful; returns <b>false</b> if the operation fails. 35995489c19Sopenharmony_ci * @since 6 36095489c19Sopenharmony_ci */ 36195489c19Sopenharmony_ci bool FinishActiveCall(const BluetoothRemoteDevice &device, const HandsFreeUnitCall &call); 36295489c19Sopenharmony_ci 36395489c19Sopenharmony_ci /** 36495489c19Sopenharmony_ci * @brief Start dial with specified call number. 36595489c19Sopenharmony_ci * 36695489c19Sopenharmony_ci * @param device Remote device object. 36795489c19Sopenharmony_ci * @param number Call's number to dial. 36895489c19Sopenharmony_ci * @return The object of dial out call or nullopt. 36995489c19Sopenharmony_ci * @since 6 37095489c19Sopenharmony_ci */ 37195489c19Sopenharmony_ci std::optional<HandsFreeUnitCall> StartDial(const BluetoothRemoteDevice &device, const std::string &number); 37295489c19Sopenharmony_ci 37395489c19Sopenharmony_ci /** 37495489c19Sopenharmony_ci * @brief Register HandsFree Unit observer instance. 37595489c19Sopenharmony_ci * 37695489c19Sopenharmony_ci * @param observer HandsFreeUnitObserver instance. 37795489c19Sopenharmony_ci * @since 6 37895489c19Sopenharmony_ci */ 37995489c19Sopenharmony_ci void RegisterObserver(std::shared_ptr<HandsFreeUnitObserver> observer); 38095489c19Sopenharmony_ci 38195489c19Sopenharmony_ci /** 38295489c19Sopenharmony_ci * @brief Deregister HandsFree Unit observer instance. 38395489c19Sopenharmony_ci * 38495489c19Sopenharmony_ci * @param observer HandsFreeUnitObserver instance. 38595489c19Sopenharmony_ci * @since 6 38695489c19Sopenharmony_ci */ 38795489c19Sopenharmony_ci void DeregisterObserver(std::shared_ptr<HandsFreeUnitObserver> observer); 38895489c19Sopenharmony_ci 38995489c19Sopenharmony_ci /** 39095489c19Sopenharmony_ci * @brief The external process calls the HfpHf profile interface before the Bluetooth process starts. At this 39195489c19Sopenharmony_ci * time, it needs to monitor the start of the Bluetooth process, and then call this interface to initialize the 39295489c19Sopenharmony_ci * HfpHf proflie. 39395489c19Sopenharmony_ci */ 39495489c19Sopenharmony_ci void Init(); 39595489c19Sopenharmony_ci 39695489c19Sopenharmony_ci /** 39795489c19Sopenharmony_ci * @brief Static HandsFree Unit observer instance. 39895489c19Sopenharmony_ci * 39995489c19Sopenharmony_ci * @since 6 40095489c19Sopenharmony_ci */ 40195489c19Sopenharmony_ci static HandsFreeUnit *instance_; 40295489c19Sopenharmony_ci 40395489c19Sopenharmony_ciprivate: 40495489c19Sopenharmony_ci HandsFreeUnit(); 40595489c19Sopenharmony_ci ~HandsFreeUnit(); 40695489c19Sopenharmony_ci BLUETOOTH_DISALLOW_COPY_AND_ASSIGN(HandsFreeUnit); 40795489c19Sopenharmony_ci BLUETOOTH_DECLARE_IMPL(); 40895489c19Sopenharmony_ci 40995489c19Sopenharmony_ci#ifdef DTFUZZ_TEST 41095489c19Sopenharmony_ci friend class BluetoothNoDestructor<HandsFreeUnit>; 41195489c19Sopenharmony_ci#endif 41295489c19Sopenharmony_ci}; 41395489c19Sopenharmony_ci} // namespace Bluetooth 41495489c19Sopenharmony_ci} // namespace OHOS 41595489c19Sopenharmony_ci#endif // BLUETOOTH_HFP_HF_H 416