• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 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 OHOS_BLUETOOTH_STANDARD_MAP_MCE_INTERFACE_H
17 #define OHOS_BLUETOOTH_STANDARD_MAP_MCE_INTERFACE_H
18 
19 #include "../parcel/bluetooth_map_mce_parameter.h"
20 #include "../parcel/bluetooth_raw_address.h"
21 #include "iremote_broker.h"
22 #include "bluetooth_service_ipc_interface_code.h"
23 #include "i_bluetooth_map_mce_observer.h"
24 
25 namespace OHOS {
26 namespace Bluetooth {
27 class IBluetoothMapMce : public OHOS::IRemoteBroker {
28 public:
29     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.ipc.IBluetoothMapMce");
30 
31     virtual void RegisterObserver(const sptr<IBluetoothMapMceObserver> &observer) = 0;
32     virtual void DeregisterObserver(const sptr<IBluetoothMapMceObserver> &observer) = 0;
33     virtual int Connect(const BluetoothRawAddress &device) = 0;
34     virtual int Disconnect(const BluetoothRawAddress &device) = 0;
35     virtual int IsConnected(const BluetoothRawAddress &device) = 0;
36     virtual void GetConnectDevices(std::vector<BluetoothRawAddress> &devices) = 0;
37     virtual void GetDevicesByStates(const std::vector<int32_t> &statusList, std::vector<BluetoothRawAddress> &devices) = 0;
38     virtual int GetConnectionState(const BluetoothRawAddress &device) = 0;
39     virtual int SetConnectionStrategy(const BluetoothRawAddress &device, int32_t strategy) = 0;
40     virtual int GetConnectionStrategy(const BluetoothRawAddress &device) = 0;
41     virtual int GetUnreadMessages(const BluetoothRawAddress &device, int32_t msgType, int32_t max) = 0;
42     virtual int GetSupportedFeatures(const BluetoothRawAddress &device) = 0;
43     virtual int SendMessage(const BluetoothRawAddress &device, const BluetoothIProfileSendMessageParameters &msg) = 0;
44     virtual int SetNotificationFilter(const BluetoothRawAddress &device, int32_t mask) = 0;
45     virtual int GetMessagesListing(const BluetoothRawAddress &device,
46         const BluetoothIProfileGetMessagesListingParameters &para) = 0;
47     virtual int GetMessage(const BluetoothRawAddress &device, int32_t msgType,
48         const std::u16string &msgHandle, const BluetoothIProfileGetMessageParameters &para) = 0;
49     virtual int UpdateInbox(const BluetoothRawAddress &device, int32_t msgType) = 0;
50     virtual int GetConversationListing(const BluetoothRawAddress &device,
51         const BluetoothIProfileGetConversationListingParameters &para) = 0;
52     virtual int SetMessageStatus(const BluetoothRawAddress &device, int32_t msgType, const std::u16string &msgHandle,
53         int32_t statusIndicator, int32_t statusValue, const std::string &extendedData) = 0;
54     virtual int SetOwnerStatus(const BluetoothRawAddress &device,
55         const BluetoothIProfileSetOwnerStatusParameters &para) = 0;
56     virtual int GetOwnerStatus(const BluetoothRawAddress &device, const std::string &conversationId) = 0;
57     virtual BluetoothIProfileMasInstanceInfoList GetMasInstanceInfo(const BluetoothRawAddress &device) = 0;
58 };
59 }  // namespace Bluetooth
60 }  // namespace OHOS
61 #endif  // OHOS_BLUETOOTH_STANDARD_MAP_MCE_INTERFACE_H
62