2020-03-30 01:44:20 +02:00
|
|
|
/*
|
2024-12-13 03:21:03 +01:00
|
|
|
* Copyright 2020-2024 Ryan Powell <ryan@nable-embedded.io> and
|
|
|
|
* esp-nimble-cpp, NimBLE-Arduino contributors.
|
2020-03-30 01:44:20 +02:00
|
|
|
*
|
2024-12-13 03:21:03 +01:00
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
2020-05-14 06:03:56 +02:00
|
|
|
*
|
2024-12-13 03:21:03 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2020-03-30 01:44:20 +02:00
|
|
|
*
|
2024-12-13 03:21:03 +01:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
2020-03-30 01:44:20 +02:00
|
|
|
*/
|
|
|
|
|
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_ */
|