Skip to content

Commit 241c69f

Browse files
committed
BLE: Cleanup public headers
1 parent 7cbc0e3 commit 241c69f

File tree

14 files changed

+52
-81
lines changed

14 files changed

+52
-81
lines changed

connectivity/FEATURE_BLE/include/ble/BLE.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@
1919
#ifndef MBED_BLE_H__
2020
#define MBED_BLE_H__
2121

22-
#include "ble/common/FunctionPointerWithContext.h"
2322
#include "platform/mbed_error.h"
2423
#include "platform/mbed_assert.h"
2524
#include "platform/mbed_toolchain.h"
2625

27-
#include "ble/common/BLERoles.h"
28-
#include "ble/common/BLETypes.h"
29-
#include "ble/common/blecommon.h"
30-
3126
#include "ble/Gap.h"
3227
#include "ble/GattClient.h"
3328
#include "ble/GattServer.h"
3429
#include "ble/SecurityManager.h"
3530

31+
#include "ble/common/BLERoles.h"
32+
#include "ble/common/BLETypes.h"
33+
#include "ble/common/blecommon.h"
34+
#include "ble/common/FunctionPointerWithContext.h"
35+
3636
/* Forward declaration for the implementation class */
3737

3838
namespace ble {
@@ -479,7 +479,7 @@ class BLE {
479479

480480
using ble::BLE;
481481
/**
482-
* @namespace ble Entry namespace for all %BLE API definitions.
482+
* @namespace ble Entry namespace for all BLE API definitions.
483483
*/
484484

485485
/**

connectivity/FEATURE_BLE/include/ble/Gap.h

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@
2121

2222
#include "ble/common/CallChainOfFunctionPointersWithContext.h"
2323

24-
#include <algorithm>
25-
26-
#include "drivers/LowPowerTimeout.h"
27-
#include "drivers/LowPowerTicker.h"
28-
#include "platform/mbed_error.h"
29-
3024
#include "ble/common/BLERoles.h"
3125
#include "ble/common/BLETypes.h"
3226
#include "ble/gap/AdvertisingDataBuilder.h"
@@ -35,12 +29,17 @@
3529
#include "ble/gap/AdvertisingDataTypes.h"
3630
#include "ble/gap/AdvertisingParameters.h"
3731
#include "ble/gap/ConnectionParameters.h"
38-
#include "ble/gap/Events.h"
3932
#include "ble/gap/ScanParameters.h"
33+
#include "ble/gap/Events.h"
4034
#include "ble/gap/Types.h"
4135

4236
namespace ble {
43-
class PalGenericAccessService;
37+
38+
#if !defined(DOXYGEN_ONLY)
39+
namespace impl {
40+
class Gap;
41+
}
42+
#endif // !defined(DOXYGEN_ONLY)
4443

4544
/**
4645
* @addtogroup ble
@@ -280,11 +279,6 @@ class PalGenericAccessService;
280279
* PHY and of any changes to PHYs which may be triggered autonomously by the
281280
* controller or by the peer.
282281
*/
283-
#if !defined(DOXYGEN_ONLY)
284-
namespace impl {
285-
class Gap;
286-
}
287-
#endif // !defined(DOXYGEN_ONLY)
288282
class Gap {
289283
public:
290284
/**
@@ -1467,10 +1461,6 @@ class Gap {
14671461

14681462
} // namespace ble
14691463

1470-
/* This includes the concrete class implementation, to provide a an alternative API implementation
1471-
* disable ble-api-implementation and place your header in a path with the same structure */
1472-
//#include "ble/internal/GapImpl.h"
1473-
14741464
/** @deprecated Use the namespaced ble::Gap instead of the global Gap. */
14751465
using ble::Gap;
14761466

connectivity/FEATURE_BLE/include/ble/GattClient.h

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
#define MBED_GATT_CLIENT_H__
2323

2424
#include "ble/common/CallChainOfFunctionPointersWithContext.h"
25-
#include <algorithm>
26-
2725
#include "ble/common/blecommon.h"
26+
2827
#include "ble/gatt/GattAttribute.h"
2928
#include "ble/gatt/ServiceDiscovery.h"
3029
#include "ble/gatt/CharacteristicDescriptorDiscovery.h"
@@ -34,6 +33,12 @@
3433

3534
namespace ble {
3635

36+
#if !defined(DOXYGEN_ONLY)
37+
namespace impl {
38+
class GattClient;
39+
}
40+
#endif // !defined(DOXYGEN_ONLY)
41+
3742
/**
3843
* @addtogroup ble
3944
* @{
@@ -89,11 +94,6 @@ namespace ble {
8994
* indicate properties are set. The client discovers that descriptor
9095
* if it intends to register to server initiated events.
9196
*/
92-
#if !defined(DOXYGEN_ONLY)
93-
namespace impl {
94-
class GattClient;
95-
}
96-
#endif // !defined(DOXYGEN_ONLY)
9797
class GattClient {
9898
public:
9999
/**
@@ -724,10 +724,6 @@ class GattClient {
724724

725725
} // namespace ble
726726

727-
/* This includes the concrete class implementation, to provide a an alternative API implementation
728-
* disable ble-api-implementation and place your header in a path with the same structure */
729-
//#include "ble/internal/GattClientImpl.h"
730-
731727
/** @deprecated Use the namespaced ble::GattClient instead of the global GattClient. */
732728
using ble::GattClient;
733729

connectivity/FEATURE_BLE/include/ble/GattServer.h

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,21 @@
2121
#define MBED_GATT_SERVER_H__
2222

2323
#include "ble/common/CallChainOfFunctionPointersWithContext.h"
24+
#include "ble/common/blecommon.h"
2425

2526
#include "ble/gatt/GattService.h"
2627
#include "ble/gatt/GattAttribute.h"
2728
#include "ble/gatt/GattCallbackParamTypes.h"
2829

29-
#include "ble/common/blecommon.h"
30-
#include "ble/Gap.h"
31-
#include "SecurityManager.h"
32-
3330
namespace ble {
3431

32+
#if !defined(DOXYGEN_ONLY)
33+
namespace impl {
34+
class GattServer;
35+
}
36+
#endif // !defined(DOXYGEN_ONLY)
37+
38+
3539
/**
3640
* @addtogroup ble
3741
* @{
@@ -93,13 +97,6 @@ namespace ble {
9397
* Characteristic Value Notification and Characteristic Value Indication when
9498
* the nature of the server initiated is not relevant.
9599
*/
96-
#if !defined(DOXYGEN_ONLY)
97-
namespace impl {
98-
class GattServer;
99-
}
100-
101-
namespace interface {
102-
#endif // !defined(DOXYGEN_ONLY)
103100
class GattServer {
104101
public:
105102
/**
@@ -607,19 +604,9 @@ class GattServer {
607604
* @}
608605
*/
609606

610-
#if !defined(DOXYGEN_ONLY)
611-
} // namespace interface
612-
#endif // !defined(DOXYGEN_ONLY)
613-
614-
using ble::interface::GattServer;
615-
616607
} // ble
617608

618-
/* This includes the concrete class implementation, to provide a an alternative API implementation
619-
* disable ble-api-implementation and place your header in a path with the same structure */
620-
//#include "ble/internal/GattServerImpl.h"
621-
622609
/** @deprecated Use the namespaced ble::GattServer instead of the global GattServer. */
623-
using ble::interface::GattServer;
610+
using ble::GattServer;
624611

625612
#endif /* ifndef MBED_GATT_SERVER_H__ */

connectivity/FEATURE_BLE/include/ble/SecurityManager.h

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,19 @@
2020
#define BLE_SECURITY_MANAGER_H_
2121

2222
#include <cstdint>
23-
#include "ble/common/CallChainOfFunctionPointersWithContext.h"
24-
#include "platform/Callback.h"
2523

2624
#include "ble/common/BLETypes.h"
2725
#include "ble/common/blecommon.h"
28-
29-
#include "ble/common/BLETypes.h"
26+
#include "ble/common/CallChainOfFunctionPointersWithContext.h"
3027

3128
namespace ble {
3229

30+
#if !defined(DOXYGEN_ONLY)
31+
namespace impl {
32+
class SecurityManager;
33+
}
34+
#endif // !defined(DOXYGEN_ONLY)
35+
3336
/**
3437
* Overview
3538
*
@@ -183,12 +186,6 @@ namespace ble {
183186
* @endverbatim
184187
*
185188
*/
186-
#if !defined(DOXYGEN_ONLY)
187-
namespace impl {
188-
class SecurityManager;
189-
}
190-
#endif // !defined(DOXYGEN_ONLY)
191-
192189
class SecurityManager
193190
{
194191
public:
@@ -905,7 +902,6 @@ class SecurityManager
905902
impl::SecurityManager *impl;
906903
};
907904

908-
909905
} // ble
910906

911907
/** @deprecated Use the namespaced ble::SecurityManager instead of the global SecurityManager. */

connectivity/FEATURE_BLE/include/ble/common/BLETypes.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
#include <cstddef>
2323
#include <cstdint>
2424
#include <cstring>
25-
#include "ble/common/SafeEnum.h"
25+
2626
#include "platform/Span.h"
2727

28+
#include "ble/common/SafeEnum.h"
2829
#include "ble/gap/Types.h"
2930

3031
/**

connectivity/FEATURE_BLE/include/ble/driver/CordioHCIDriver.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
#include <cstddef>
2121
#include <cstdint>
2222
#include <BLETypes.h>
23-
// FIXME: make this invisible!
24-
#include "wsf_buf.h"
25-
#include "CordioHCITransportDriver.h"
23+
#include "ble/driver/CordioHCITransportDriver.h"
2624
#include "ble/common/blecommon.h"
2725
#include "mbed.h"
2826

27+
// FIXME: make this invisible!
28+
#include "wsf_buf.h"
29+
2930
namespace ble {
3031

3132
/**

connectivity/FEATURE_BLE/include/ble/driver/H4TransportDriver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include <cstdint>
2323
#include "mbed.h"
24-
#include "driver/CordioHCITransportDriver.h"
24+
#include "ble/driver/CordioHCITransportDriver.h"
2525

2626
namespace ble {
2727

connectivity/FEATURE_BLE/include/ble/gap/ConnectionParameters.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#ifndef MBED_EXTENDED_CONNECT_PARAMETERS_H__
2020
#define MBED_EXTENDED_CONNECT_PARAMETERS_H__
2121

22-
#include "mbed_assert.h"
22+
#include "platform/mbed_assert.h"
2323

2424
#include "ble/common/BLETypes.h"
2525

connectivity/FEATURE_BLE/include/ble/gatt/DiscoveredCharacteristic.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
#define MBED_DISCOVERED_CHARACTERISTIC_H__
2121

2222
#include "ble/common/UUID.h"
23-
#include "GattAttribute.h"
24-
#include "GattCallbackParamTypes.h"
23+
#include "ble/gatt/GattAttribute.h"
24+
#include "ble/gatt/GattCallbackParamTypes.h"
2525
#include "ble/gatt/CharacteristicDescriptorDiscovery.h"
26-
#include "DiscoveredCharacteristicDescriptor.h"
26+
#include "ble/gatt/DiscoveredCharacteristicDescriptor.h"
2727

2828
namespace ble {
2929
class GattClient;

0 commit comments

Comments
 (0)