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_INTERFACE_H 17 #define OHOS_BLUETOOTH_STANDARD_REMOTE_DEVICE_OBSERVER_INTERFACE_H 18 19 #include "../parcel/bluetooth_raw_address.h" 20 #include "bluetooth_service_ipc_interface_code.h" 21 #include "../common/bt_uuid.h" 22 #include "iremote_broker.h" 23 #include "../parcel/bluetooth_device_battery_info.h" 24 25 namespace OHOS { 26 namespace Bluetooth { 27 class IBluetoothRemoteDeviceObserver : public OHOS::IRemoteBroker { 28 public: 29 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.ipc.IBluetoothRemoteDeviceObserver"); 30 31 virtual void OnAclStateChanged(const BluetoothRawAddress &device, int32_t state, uint32_t reason) = 0; 32 virtual void OnPairStatusChanged(const int32_t transport, const BluetoothRawAddress &device, 33 int32_t status, int32_t cause) = 0; 34 virtual void OnRemoteUuidChanged(const BluetoothRawAddress &device, const std::vector<bluetooth::Uuid> uuids) = 0; 35 virtual void OnRemoteNameChanged(const BluetoothRawAddress &device, const std::string deviceName) = 0; 36 virtual void OnRemoteAliasChanged(const BluetoothRawAddress &device, const std::string alias) = 0; 37 virtual void OnRemoteCodChanged(const BluetoothRawAddress &device, int32_t cod) = 0; 38 virtual void OnRemoteBatteryChanged(const BluetoothRawAddress &device, const BluetoothBatteryInfo &batteryInfo) = 0; 39 virtual void OnRemoteDeviceCommonInfoReport(const BluetoothRawAddress &device, 40 const std::vector<uint8_t> &value) = 0; 41 }; 42 } // namespace Bluetooth 43 } // namespace OHOS 44 #endif // OHOS_BLUETOOTH_STANDARD_REMOTE_DEVICE_OBSERVER_INTERFACE_H