• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef OHOS_BLUETOOTH_STANDARD_REMOTE_DEVICE_OBSERVER_PROXY_H
17 #define OHOS_BLUETOOTH_STANDARD_REMOTE_DEVICE_OBSERVER_PROXY_H
18 
19 #include <map>
20 
21 #include "i_bluetooth_host.h"
22 #include "i_bluetooth_remote_device_observer.h"
23 #include "iremote_proxy.h"
24 
25 namespace OHOS {
26 namespace Bluetooth {
27 class BluetoothRemoteDeviceObserverproxy : public IRemoteProxy<IBluetoothRemoteDeviceObserver> {
28 public:
29     explicit BluetoothRemoteDeviceObserverproxy(const sptr<IRemoteObject> &impl);
30     ~BluetoothRemoteDeviceObserverproxy();
31 
32     void OnPairStatusChanged(const int32_t transport, const BluetoothRawAddress &device,
33         int32_t status, int32_t cause) override;
34     void OnRemoteUuidChanged(const BluetoothRawAddress &device, const std::vector<bluetooth::Uuid> uuids) override;
35     void OnRemoteNameChanged(const BluetoothRawAddress &device, const std::string deviceName) override;
36     void OnRemoteAliasChanged(const BluetoothRawAddress &device, const std::string alias) override;
37     void OnRemoteCodChanged(const BluetoothRawAddress &device, int32_t cod) override;
38     void OnRemoteBatteryChanged(const BluetoothRawAddress &device,
39         const BluetoothBatteryInfo &batteryInfo) override;
40     void OnRemoteDeviceCommonInfoReport(const BluetoothRawAddress &device,
41         const std::vector<uint8_t> &value) override;
42     void OnAclStateChanged(const BluetoothRawAddress &device, int state, unsigned int reason) override;
43 
44 private:
45     ErrCode InnerTransact(uint32_t code, MessageOption &flags, MessageParcel &data, MessageParcel &reply);
46     static inline BrokerDelegator<BluetoothRemoteDeviceObserverproxy> delegator_;
47 };
48 }  // namespace Bluetooth
49 }  // namespace OHOS
50 #endif  // OHOS_BLUETOOTH_STANDARD_REMOTE_DEVICE_OBSERVER_PROXY_H