Skip to content

Commit d1d9cab

Browse files
committed
Add missing NimBLEUtils and NimBLEConnInfo includes to NimBLEDevice.h (#806)
In some cases compilation of examples would fail due to missing these headers so they should be included in NimBLEDevice.h
1 parent eec4c1b commit d1d9cab

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ All notable changes to this project will be documented in this file.
88
- Compile error when central is disabled, class `NimBLEServer` has no member named `m_pClient`.
99
- Compile error with nRF devices, unresolved symbol `nimble_port_stop`.
1010

11+
## Changed
12+
- Added missing includes for `NimBLEConnInfo` and `NimBLEUtils` to `NimBLEDevice.h`.
13+
1114
## [2.1.0] 2024-12-14
1215

1316
## **Breaking changes**

src/NimBLEDescriptor.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,12 @@
2121
#include "nimconfig.h"
2222
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
2323

24-
class NimBLEDescriptor;
25-
class NimBLEDescriptorCallbacks;
26-
2724
# include "NimBLELocalValueAttribute.h"
28-
# include "NimBLECharacteristic.h"
29-
# include "NimBLEUUID.h"
30-
# include "NimBLEAttValue.h"
31-
# include "NimBLEConnInfo.h"
32-
3325
# include <string>
3426

27+
class NimBLECharacteristic;
28+
class NimBLEDescriptorCallbacks;
29+
3530
/**
3631
* @brief A model of a BLE descriptor.
3732
*/

src/NimBLEDevice.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,5 +282,11 @@ class NimBLEDevice {
282282
# endif
283283
# endif
284284

285+
# if defined(CONFIG_BT_NIMBLE_ROLE_CENTRAL) || defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
286+
# include "NimBLEConnInfo.h"
287+
# endif
288+
289+
# include "NimBLEUtils.h"
290+
285291
#endif // CONFIG_BT_ENABLED
286292
#endif // NIMBLE_CPP_DEVICE_H_

0 commit comments

Comments
 (0)