Skip to content

Commit 9603708

Browse files
import ble modules into global namespace
1 parent 7e64019 commit 9603708

File tree

13 files changed

+37
-60
lines changed

13 files changed

+37
-60
lines changed

connectivity/FEATURE_BLE/include/ble/Gap.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,11 +1453,11 @@ class Gap {
14531453
#endif // !defined(DOXYGEN_ONLY)
14541454
} // namespace ble
14551455

1456+
/* This includes the concrete class implementation, to provide a an alternative API implementation
1457+
* disable ble-api-implementation and place your header in a path with the same structure */
1458+
#include "ble/internal/GapImpl.h"
14561459

1457-
#endif // BLE_GAP_GAP_H
1460+
/** @deprecated Use the namespaced ble::Gap instead of the global Gap. */
1461+
using ble::Gap;
14581462

1459-
#if (BLE_API_IMPLEMENTATION == 1)
1460-
#include "ble/internal/GapImpl.h"
1461-
#else
1462-
#error "please provide alternate BLE implementation"
1463-
#endif
1463+
#endif // BLE_GAP_GAP_H

connectivity/FEATURE_BLE/include/ble/GattClient.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,10 +716,11 @@ class GattClient {
716716
#endif // !defined(DOXYGEN_ONLY)
717717
} // namespace ble
718718

719-
#if (BLE_API_IMPLEMENTATION == 1)
719+
/* This includes the concrete class implementation, to provide a an alternative API implementation
720+
* disable ble-api-implementation and place your header in a path with the same structure */
720721
#include "ble/internal/GattClientImpl.h"
721-
#else
722-
#error "please provide alternate BLE implementation"
723-
#endif
722+
723+
/** @deprecated Use the namespaced ble::GattClient instead of the global GattClient. */
724+
using ble::GattClient;
724725

725726
#endif /* ifndef MBED_GATT_CLIENT_H__ */

connectivity/FEATURE_BLE/include/ble/GattServer.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,11 @@ class GattServer {
667667
#endif // !defined(DOXYGEN_ONLY)
668668
} // ble
669669

670-
#if (BLE_API_IMPLEMENTATION == 1)
670+
/* This includes the concrete class implementation, to provide a an alternative API implementation
671+
* disable ble-api-implementation and place your header in a path with the same structure */
671672
#include "ble/internal/GattServerImpl.h"
672-
#else
673-
#error "please provide alternate BLE implementation"
674-
#endif
673+
674+
/** @deprecated Use the namespaced ble::GattServer instead of the global GattServer. */
675+
using ble::GattServer;
675676

676677
#endif /* ifndef MBED_GATT_SERVER_H__ */

connectivity/FEATURE_BLE/include/ble/SecurityManager.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -938,10 +938,11 @@ class SecurityManager
938938
#endif // !defined(DOXYGEN_ONLY)
939939
} // ble
940940

941-
#if (BLE_API_IMPLEMENTATION == 1)
941+
/* This includes the concrete class implementation, to provide a an alternative API implementation
942+
* disable ble-api-implementation and place your header in a path with the same structure */
942943
#include "ble/internal/SecurityManagerImpl.h"
943-
#else
944-
#error "please provide alternate BLE implementation"
945-
#endif
944+
945+
/** @deprecated Use the namespaced ble::SecurityManager instead of the global SecurityManager. */
946+
using ble::SecurityManager;
946947

947948
#endif /*BLE_SECURITY_MANAGER_H_*/

connectivity/FEATURE_BLE/include/ble/internal/BLEInstanceBase.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,9 @@ class BLEInstanceBase {
257257
*/
258258
extern ble::BLEInstanceBase *createBLEInstance(void);
259259

260-
#if (BLE_PAL_API_IMPLEMENTATION == 1)
260+
/* This includes the concrete class implementation, to provide a an alternative BLE PAL implementation
261+
* disable Cordio and place your header in a path with the same structure */
261262
#include "ble/internal/BLEInstanceBaseImpl.h"
262-
#else
263-
#error "please provide alternate BLE implementation"
264-
#endif
265263

266264
/**
267265
* @}

connectivity/FEATURE_BLE/include/ble/internal/PalAttClient.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,8 @@ class PalAttClient {
630630
} // namespace interface
631631
} // namespace ble
632632

633-
#if (BLE_PAL_API_IMPLEMENTATION == 1)
633+
/* This includes the concrete class implementation, to provide a an alternative BLE PAL implementation
634+
* disable Cordio and place your header in a path with the same structure */
634635
#include "ble/internal/PalAttClientImpl.h"
635-
#else
636-
#error "please provide alternate BLE implementation"
637-
#endif
638636

639637
#endif /* BLE_PAL_ATTCLIENT_H_ */

connectivity/FEATURE_BLE/include/ble/internal/PalEventQueue.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ class PalEventQueue {
5858
} // namespace interface
5959
} // namespace ble
6060

61-
#if (BLE_PAL_API_IMPLEMENTATION == 1)
61+
/* This includes the concrete class implementation, to provide a an alternative BLE PAL implementation
62+
* disable Cordio and place your header in a path with the same structure */
6263
#include "ble/internal/PalEventQueueImpl.h"
63-
#else
64-
#error "please provide alternate BLE implementation"
65-
#endif
6664

6765
#endif /* BLE_PAL_EVENT_QUEUE_H_ */

connectivity/FEATURE_BLE/include/ble/internal/PalGap.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,10 +1635,8 @@ class PalGap {
16351635
} // namespace ble
16361636

16371637

1638-
#if (BLE_PAL_API_IMPLEMENTATION == 1)
1638+
/* This includes the concrete class implementation, to provide a an alternative BLE PAL implementation
1639+
* disable Cordio and place your header in a path with the same structure */
16391640
#include "ble/internal/PalGapImpl.h"
1640-
#else
1641-
#error "please provide alternate BLE implementation"
1642-
#endif
16431641

16441642
#endif /* BLE_PAL_GAP_H_ */

connectivity/FEATURE_BLE/include/ble/internal/PalGattClient.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,8 @@ class PalGattClient {
630630
} // namespace interface
631631
} // namespace ble
632632

633-
#if (BLE_PAL_API_IMPLEMENTATION == 1)
633+
/* This includes the concrete class implementation, to provide a an alternative BLE PAL implementation
634+
* disable Cordio and place your header in a path with the same structure */
634635
#include "ble/internal/PalGattClientImpl.h"
635-
#else
636-
#error "please provide alternate BLE implementation"
637-
#endif
638636

639637
#endif /* BLE_PAL_GATT_CLIENT_H_ */

connectivity/FEATURE_BLE/include/ble/internal/PalGenericAccessService.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@ struct PalGenericAccessService {
7373
} // namespace interface
7474
} // namespace ble
7575

76-
#if (BLE_PAL_API_IMPLEMENTATION == 1)
76+
/* This includes the concrete class implementation, to provide a an alternative BLE PAL implementation
77+
* disable Cordio and place your header in a path with the same structure */
7778
#include "ble/internal/PalGenericAccessServiceImpl.h"
78-
#else
79-
#error "please provide alternate BLE implementation"
80-
#endif
8179

8280
#endif /* BLE_PAL_GENERIC_ACCESS_SERVICE_H_ */

0 commit comments

Comments
 (0)