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  * @addtogroup Bluetooth
18  * @{
19  *
20  * @brief Defines profile service manager, including common functions.
21  *
22  * @since 6
23  */
24 
25 /**
26  * @file interface_profile_manager.h
27  *
28  * @brief profile manager interface.
29  *
30  * @since 6
31  */
32 
33 #ifndef INTERFACE_PROFILE_MANAGER_H
34 #define INTERFACE_PROFILE_MANAGER_H
35 
36 #include "interface_profile.h"
37 #include <vector>
38 
39 namespace OHOS {
40 namespace bluetooth {
41 /**
42  * @brief Represents interface profile manager.
43  *
44  * @since 6
45  */
46 class BLUETOOTH_API IProfileManager {
47 public:
48     /**
49      * @brief A destructor used to delete the <b>IProfileManager</b> instance.
50      *
51      * @since 6
52      */
53     virtual ~IProfileManager() = default;
54 
55     /**
56      * @brief Get profile manager singleton instance pointer.
57      *
58      * @return Returns the singleton instance pointer.
59      * @since 6
60      */
61     static IProfileManager *GetInstance();
62 
63     /**
64      * @brief Get profile service pointer.
65      *
66      * @param name Profile service name.
67      * @return Returns the profile service pointer.
68      * @since 6
69      */
70     virtual IProfile *GetProfileService(const std::string &name) const = 0;
71 
72     /**
73      * @brief Get profile service ID list.
74      *
75      * @return Returns vector of enabled profile services ID.
76      * @since 6
77      */
78     virtual std::vector<uint32_t> GetProfileServicesList() const = 0;
79 
80     /**
81      * @brief Get profile service connect state.
82      *
83      * @param profileID Profile service ID.
84      * @return Returns connect state for designated profile service.
85      * @since 6
86      */
87     virtual BTConnectState GetProfileServiceConnectState(const uint32_t profileID) const = 0;
88 
89     /**
90      * @brief Get local device supported uuids.
91      *
92      * @param[out] Vector which use to return support uuids.
93      * @since 6
94      */
95     virtual void GetProfileServicesSupportedUuids(std::vector<std::string> &uuids) const = 0;
96 };
97 }  // namespace bluetooth
98 }  // namespace OHOS
99 
100 #endif  // INTERFACE_PROFILE_MANAGER_H