Files
esp-nimble-cpp/src/NimBLERemoteDescriptor.h
T

49 lines
1.6 KiB
C++
Raw Normal View History

2020-03-29 17:44:20 -06:00
/*
2025-02-24 17:53:24 -07:00
* Copyright 2020-2025 Ryan Powell <ryan@nable-embedded.io> and
2024-12-12 19:21:03 -07:00
* esp-nimble-cpp, NimBLE-Arduino contributors.
2020-03-29 17:44:20 -06:00
*
2024-12-12 19:21:03 -07: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
*
2024-12-12 19:21:03 -07:00
* http://www.apache.org/licenses/LICENSE-2.0
2020-03-29 17:44:20 -06:00
*
2024-12-12 19:21:03 -07: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-29 17:44:20 -06:00
*/
2024-07-26 14:47:36 -06:00
#ifndef NIMBLE_CPP_REMOTE_DESCRIPTOR_H_
#define NIMBLE_CPP_REMOTE_DESCRIPTOR_H_
2020-03-29 17:44:20 -06:00
#include "nimconfig.h"
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_CENTRAL)
2024-07-26 14:47:36 -06:00
# include "NimBLERemoteValueAttribute.h"
2020-03-29 17:44:20 -06:00
class NimBLERemoteCharacteristic;
2024-07-26 14:47:36 -06:00
class NimBLEClient;
2020-03-29 17:44:20 -06:00
/**
2024-07-26 14:47:36 -06:00
* @brief A model of remote BLE descriptor.
2020-03-29 17:44:20 -06:00
*/
2024-07-26 14:47:36 -06:00
class NimBLERemoteDescriptor : public NimBLERemoteValueAttribute {
public:
NimBLERemoteCharacteristic* getRemoteCharacteristic() const;
std::string toString(void) const;
NimBLEClient* getClient() const override;
2022-01-16 20:11:18 -07:00
2024-07-26 14:47:36 -06:00
private:
friend class NimBLERemoteCharacteristic;
2022-01-16 20:11:18 -07:00
2024-07-26 14:47:36 -06:00
NimBLERemoteDescriptor(const NimBLERemoteCharacteristic* pRemoteCharacteristic, const ble_gatt_dsc* dsc);
~NimBLERemoteDescriptor() = default;
2024-07-26 14:47:36 -06:00
const NimBLERemoteCharacteristic* m_pRemoteCharacteristic;
2020-03-29 17:44:20 -06:00
};
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL */
2024-07-26 14:47:36 -06:00
#endif /* NIMBLE_CPP_REMOTE_DESCRIPTOR_H_ */