1 /* 2 * Copyright (C) 2021-2022 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 HFP_AG_GAP_CLIENT_H 17 #define HFP_AG_GAP_CLIENT_H 18 19 #include <cstdint> 20 21 #include "base_def.h" 22 #include "btstack.h" 23 #include "gap_if.h" 24 25 namespace OHOS { 26 namespace bluetooth { 27 /** 28 * @brief Class for HFP AG GAP client. 29 */ 30 class HfpAgGapClient { 31 public: 32 /** 33 * @brief Construct a new HfpAgGapClient object. 34 */ 35 HfpAgGapClient() = default; 36 37 /** 38 * @brief Destroy the HfpAgGapClient object. 39 */ 40 ~HfpAgGapClient() = default; 41 42 /** 43 * @brief Register Service Security. 44 * 45 * @param address Remote device address. 46 * @param scn Server channel number. 47 * @return Returns the error code of register service security. 48 */ 49 int RegisterServiceSecurity(const BtAddr &address, uint8_t scn); 50 51 /** 52 * @brief Deregister Service Security 53 * 54 * @param address Remote device address. 55 * @return Returns the error code of deregister service security. 56 */ 57 int DeregisterServiceSecurity(const BtAddr &address) const; 58 59 private: 60 GapServiceSecurityInfo securityInfo_; 61 BT_DISALLOW_COPY_AND_ASSIGN(HfpAgGapClient); 62 }; 63 } // namespace bluetooth 64 } // namespace OHOS 65 #endif // HFP_AG_GAP_H 66