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 /** 17 * @file a2dp_src_service.h 18 * 19 * @brief Declares the class of the a2dp profile, including attributes, and methods. 20 * 21 * @since 6 22 */ 23 24 #ifndef A2DP_SRC_SERVICE_H 25 #define A2DP_SRC_SERVICE_H 26 27 #include <cstdint> 28 #include <cstring> 29 30 #include "gavdp/a2dp_service.h" 31 32 namespace OHOS { 33 namespace bluetooth { 34 /** 35 * @brief This class provides a2dp source functions called by Framework API. 36 * 37 * @since 6.0 38 */ 39 class A2dpSrcService : public A2dpService { 40 public: 41 /** 42 * @brief A constructor used to create an a2dp source service instance. 43 * 44 * @since 6.0 45 */ 46 A2dpSrcService(); 47 48 /** 49 * @brief A destructor used to delete the a2dp source service instance. 50 * 51 * @since 6.0 52 */ ~A2dpSrcService()53 ~A2dpSrcService(){}; 54 55 /** 56 * @brief Get a2dp source instance. 57 * 58 * @return Returns an instance of a2dp source. 59 * @since 6.0 60 */ 61 static A2dpSrcService *GetProfile(); 62 63 private: 64 static std::string g_name; /// service name. 65 static std::string g_version; /// profile version. 66 static uint8_t g_role; /// profile role. 67 }; 68 } // namespace bluetooth 69 } // namespace OHOS 70 #endif // A2DP_SRC_SERVICE_H