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_HF_GAP_SEVER_H 17 #define HFP_HF_GAP_SEVER_H 18 19 #include <cstdint> 20 21 #include "base_def.h" 22 #include "gap_if.h" 23 24 namespace OHOS { 25 namespace bluetooth { 26 /** 27 * @brief Class for HFP HF GAP server. 28 */ 29 class HfpHfGapServer { 30 public: 31 /** 32 * @brief Register Service Security. 33 * 34 * @param scn Server channel number. 35 * @return Returns the error code of register service security. 36 */ 37 static int RegisterServiceSecurity(uint8_t scn); 38 39 /** 40 * @brief Deregister Service Security 41 * 42 * @return Returns the error code of deregister service security. 43 */ 44 static int DeregisterServiceSecurity(); 45 46 private: 47 /** 48 * @brief Construct a new HfpAgGapServer object. 49 */ 50 HfpHfGapServer() = delete; 51 52 /** 53 * @brief Destroy the HfpAgGapServer object. 54 */ 55 ~HfpHfGapServer() = delete; 56 57 static GapServiceSecurityInfo g_securityInfo; 58 59 BT_DISALLOW_COPY_AND_ASSIGN(HfpHfGapServer); 60 }; 61 } // namespace bluetooth 62 } // namespace OHOS 63 #endif // HFP_HF_GAP_SEVER_H 64