// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_SERVICE_H_ #define DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_SERVICE_H_ #include <stdint.h> #include <optional> #include <vector> #include "base/functional/callback.h" #include "base/functional/callback_forward.h" #include "base/memory/weak_ptr.h" #include "device/bluetooth/bluetooth_export.h" #include "device/bluetooth/bluetooth_gatt_characteristic.h" #include "device/bluetooth/bluetooth_gatt_service.h" #include "device/bluetooth/public/cpp/bluetooth_uuid.h" namespace device { class BluetoothLocalGattCharacteristic; class BluetoothLocalGattDescriptor; class BluetoothDevice; // BluetoothLocalGattService represents a local GATT service. // // Instances of the BluetoothLocalGattService class are used to represent a // locally hosted GATT attribute hierarchy when the local // adapter is used in the "peripheral" role. Such instances are meant to be // constructed directly and registered. Once registered, a GATT attribute // hierarchy will be visible to remote devices in the "central" role. // BT local GATT services will be owned by the adapter they are created with. // // Note: We use virtual inheritance on the gatt service since it will be // inherited by platform specific versions of the gatt service classes also. The // platform specific local gatt service classes will inherit both this class and // their gatt service class, hence causing an inheritance diamond. class DEVICE_BLUETOOTH_EXPORT BluetoothLocalGattService : public virtual BluetoothGattService { … }; } // namespace device #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_SERVICE_H_