• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef OHOS_BLUETOOTH_STANDARD_MAP_MCE_SERVER_H
16 #define OHOS_BLUETOOTH_STANDARD_MAP_MCE_SERVER_H
17 
18 #include <string>
19 #include <vector>
20 
21 #include "i_bluetooth_map_mce.h"
22 #include "bluetooth_map_mce_stub.h"
23 #include "if_system_ability_manager.h"
24 #include "iservice_registry.h"
25 #include "system_ability.h"
26 #include "bluetooth_types.h"
27 
28 namespace OHOS {
29 namespace Bluetooth {
30 class BluetoothMapMceServer : public BluetoothMapMceStub {
31 public:
32     explicit BluetoothMapMceServer();
33     ~BluetoothMapMceServer() override;
34 
35     void RegisterObserver(
36         const sptr<IBluetoothMapMceObserver> &observer) override;
37     void DeregisterObserver(
38         const sptr<IBluetoothMapMceObserver> &observer) override;
39     int Connect(
40         const BluetoothRawAddress &device) override;
41     int Disconnect(
42         const BluetoothRawAddress &device) override;
43     int IsConnected(
44         const BluetoothRawAddress &device) override;
45     void GetConnectDevices(
46         std::vector<BluetoothRawAddress> &devices) override;
47     void GetDevicesByStates(const std::vector<int32_t> &statusList,
48         std::vector<BluetoothRawAddress> &devices) override;
49     int GetConnectionState(
50         const BluetoothRawAddress &device) override;
51     int SetConnectionStrategy(
52         const BluetoothRawAddress &device, int32_t strategy) override;
53     int GetConnectionStrategy(
54         const BluetoothRawAddress &device) override;
55     int GetSupportedFeatures(
56         const BluetoothRawAddress &device) override;
57     int SetNotificationFilter(
58         const BluetoothRawAddress &device, int32_t mask) override;
59     int UpdateInbox(
60         const BluetoothRawAddress &device, int32_t msgType) override;
61     int SetMessageStatus(const BluetoothRawAddress &device, int32_t msgType,
62         const std::u16string &msgHandle, int32_t statusIndicator, int32_t statusValue,
63         const std::string &extendedData) override;
64     int GetOwnerStatus(const BluetoothRawAddress &device,
65         const std::string &conversationId) override;
66     int GetUnreadMessages(const BluetoothRawAddress &device,
67         int32_t msgType, int32_t max) override;
68     int GetMessage(const BluetoothRawAddress &device, int32_t msgType,
69         const std::u16string &msgHandle, const BluetoothIProfileGetMessageParameters &para) override;
70     int SendMessage(const BluetoothRawAddress &device,
71         const BluetoothIProfileSendMessageParameters &msg) override;
72     int GetMessagesListing(const BluetoothRawAddress &device,
73         const BluetoothIProfileGetMessagesListingParameters &para) override;
74     int GetConversationListing(const BluetoothRawAddress &device,
75         const BluetoothIProfileGetConversationListingParameters &para) override;
76     int SetOwnerStatus(const BluetoothRawAddress &device,
77         const BluetoothIProfileSetOwnerStatusParameters &para) override;
78     BluetoothIProfileMasInstanceInfoList GetMasInstanceInfo(const BluetoothRawAddress &device) override;
79 
80 private:
81     BLUETOOTH_DECLARE_IMPL();
82     BLUETOOTH_DISALLOW_COPY_AND_ASSIGN(BluetoothMapMceServer);
83 };
84 }  // namespace Bluetooth
85 }  // namespace OHOS
86 #endif  // OHOS_BLUETOOTH_STANDARD_MAP_MCE_SERVER_H
87