2020-03-30 01:44:20 +02:00
|
|
|
/*
|
|
|
|
* NimBLERemoteDescriptor.h
|
|
|
|
*
|
|
|
|
* Created: on Jan 27 2020
|
|
|
|
* Author H2zero
|
2020-05-14 06:03:56 +02:00
|
|
|
*
|
2020-03-30 01:44:20 +02:00
|
|
|
* Originally:
|
|
|
|
*
|
|
|
|
* BLERemoteDescriptor.h
|
|
|
|
*
|
|
|
|
* Created on: Jul 8, 2017
|
|
|
|
* Author: kolban
|
|
|
|
*/
|
|
|
|
|
2024-07-26 22:47:36 +02:00
|
|
|
#ifndef NIMBLE_CPP_REMOTE_DESCRIPTOR_H_
|
|
|
|
#define NIMBLE_CPP_REMOTE_DESCRIPTOR_H_
|
2020-03-30 01:44:20 +02:00
|
|
|
|
2020-05-14 06:03:56 +02:00
|
|
|
#include "nimconfig.h"
|
2021-09-07 05:14:43 +02:00
|
|
|
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_CENTRAL)
|
2020-05-14 06:03:56 +02:00
|
|
|
|
2024-07-26 22:47:36 +02:00
|
|
|
# include "NimBLERemoteValueAttribute.h"
|
2020-03-30 01:44:20 +02:00
|
|
|
|
|
|
|
class NimBLERemoteCharacteristic;
|
2024-07-26 22:47:36 +02:00
|
|
|
class NimBLEClient;
|
|
|
|
|
2020-03-30 01:44:20 +02:00
|
|
|
/**
|
2024-07-26 22:47:36 +02:00
|
|
|
* @brief A model of remote BLE descriptor.
|
2020-03-30 01:44:20 +02:00
|
|
|
*/
|
2024-07-26 22:47:36 +02:00
|
|
|
class NimBLERemoteDescriptor : public NimBLERemoteValueAttribute {
|
|
|
|
public:
|
|
|
|
NimBLERemoteCharacteristic* getRemoteCharacteristic() const;
|
|
|
|
std::string toString(void) const;
|
|
|
|
NimBLEClient* getClient() const override;
|
2022-01-17 04:11:18 +01:00
|
|
|
|
2024-07-26 22:47:36 +02:00
|
|
|
private:
|
|
|
|
friend class NimBLERemoteCharacteristic;
|
2020-05-23 18:27:32 +02:00
|
|
|
|
2024-07-26 22:47:36 +02:00
|
|
|
NimBLERemoteDescriptor(const NimBLERemoteCharacteristic* pRemoteCharacteristic, const ble_gatt_dsc* dsc);
|
|
|
|
~NimBLERemoteDescriptor() = default;
|
2020-05-23 18:27:32 +02:00
|
|
|
|
2024-07-26 22:47:36 +02:00
|
|
|
const NimBLERemoteCharacteristic* m_pRemoteCharacteristic;
|
2020-03-30 01:44:20 +02:00
|
|
|
};
|
2020-05-14 06:03:56 +02:00
|
|
|
|
2021-09-07 05:14:43 +02:00
|
|
|
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL */
|
2024-07-26 22:47:36 +02:00
|
|
|
#endif /* NIMBLE_CPP_REMOTE_DESCRIPTOR_H_ */
|