• 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 #ifndef OHOS_BLUETOOTH_STANDARD_MAP_MSE_INTERFACE_H
16 #define OHOS_BLUETOOTH_STANDARD_MAP_MSE_INTERFACE_H
17 
18 #include <string>
19 #include <vector>
20 #include "../parcel/bluetooth_map_mce_parameter.h"
21 #include "../parcel/bluetooth_raw_address.h"
22 #include "bluetooth_service_ipc_interface_code.h"
23 #include "iremote_broker.h"
24 #include "i_bluetooth_map_mse_observer.h"
25 
26 namespace OHOS {
27 namespace Bluetooth {
28 class IBluetoothMapMse : public OHOS::IRemoteBroker {
29 public:
30     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.ipc.IBluetoothMapMse");
31 
32     virtual void RegisterObserver(
33         const sptr<IBluetoothMapMseObserver> &observer) = 0;
34     virtual void DeregisterObserver(
35         const sptr<IBluetoothMapMseObserver> &observer) = 0;
36     virtual void GetState(int32_t &ret) = 0;
37     virtual void Disconnect(
38         const BluetoothRawAddress &device, int32_t &ret) = 0;
39     virtual void IsConnected(
40         const BluetoothRawAddress &device, bool &ret) = 0;
41     virtual void GetConnectedDevices(
42         std::vector<BluetoothRawAddress> &devices) = 0;
43     virtual void GetDevicesByStates(const std::vector<int32_t> &states,
44         std::vector<BluetoothRawAddress> &devices) = 0;
45     virtual void GetConnectionState(
46         const BluetoothRawAddress &device, int32_t &ret) = 0;
47     virtual void SetConnectionStrategy(
48         const BluetoothRawAddress &device, int32_t strategy, bool &ret) = 0;
49     virtual void GetConnectionStrategy(
50         const BluetoothRawAddress &device, int32_t &ret) = 0;
51     virtual void GrantPermission(
52         const BluetoothRawAddress &device, bool allow, bool save) = 0;
53 };
54 }  // namespace Bluetooth
55 }  // namespace OHOS
56 #endif  // OHOS_BLUETOOTH_STANDARD_MAP_MSE_INTERFACE_H
57