Skip to content

Commit 98bb0f7

Browse files
fix backwards compatibility
1 parent 1d4d3e1 commit 98bb0f7

File tree

13 files changed

+53
-77
lines changed

13 files changed

+53
-77
lines changed

connectivity/FEATURE_BLE/include/ble/BLE.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@
2828
#include "ble/types/BLETypes.h"
2929
#include "ble/types/blecommon.h"
3030

31+
#include "ble/Gap.h"
32+
#include "ble/GattClient.h"
33+
#include "ble/GattServer.h"
34+
#include "ble/SecurityManager.h"
3135

3236
/* Forward declaration for the implementation class */
3337

3438
namespace ble {
3539
class BLEInstanceBase;
36-
class Gap;
37-
class GattClient;
38-
class GattServer;
39-
class SecurityManager;
40-
}
4140

4241
/**
4342
* @addtogroup ble
@@ -188,9 +187,10 @@ class BLE {
188187
* @return A reference to a single object.
189188
*
190189
* @pre id shall be less than NUM_INSTANCES.
191-
* @deprecated BLE singleton supports one instance. You may create multiple instances by using the constructor.
192-
* Please use BLE::Instance().
190+
*
193191
*/
192+
MBED_DEPRECATED_SINCE("mbed-os-6.3.0", "BLE singleton supports one instance. You may create multiple"
193+
"instances by using the constructor. Please use BLE::Instance().")
194194
static BLE &Instance(InstanceID_t id)
195195
{
196196
return Instance();
@@ -200,8 +200,9 @@ class BLE {
200200
* Fetch the ID of a BLE instance.
201201
*
202202
* @return Instance id of this BLE instance.
203-
* @deprecated BLE singleton supports one instance. You may create multiple instances by using the constructor.
204203
*/
204+
MBED_DEPRECATED_SINCE("mbed-os-6.3.0", "BLE singleton supports one instance. You may create multiple"
205+
"instances by using the constructor.")
205206
InstanceID_t getInstanceID(void) const
206207
{
207208
return DEFAULT_INSTANCE;
@@ -475,6 +476,9 @@ class BLE {
475476
bool event_signaled;
476477
};
477478

479+
}
480+
481+
using ble::BLE;
478482
/**
479483
* @namespace ble Entry namespace for all %BLE API definitions.
480484
*/

connectivity/FEATURE_BLE/include/ble/Gap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ class Gap {
555555
/**
556556
* Preferred connection parameter display in Generic Access Service.
557557
*/
558-
typedef struct PreferredConnectionParams_t {
558+
typedef struct {
559559
/**
560560
* Minimum interval between two connection events allowed for a
561561
* connection.

connectivity/FEATURE_BLE/include/ble/GattServer.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,7 @@
3131
#include "ble/Gap.h"
3232
#include "SecurityManager.h"
3333

34-
#include "ble/BLE.h"
35-
36-
/*! Maximum count of characteristics that can be stored for authorisation purposes */
37-
#define MAX_CHARACTERISTIC_AUTHORIZATION_CNT 20
38-
39-
/*! client characteristic configuration descriptors settings */
40-
#define MAX_CCCD_CNT 20
41-
4234
namespace ble {
43-
class PalAttClient;
44-
class BLE;
4535

4636
/**
4737
* @addtogroup ble

connectivity/FEATURE_BLE/include/ble/SecurityManager.h

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525

2626
#include "ble/types/BLETypes.h"
2727
#include "ble/types/blecommon.h"
28-
#include "ble/Gap.h"
2928

30-
#include "ble/internal/GapTypes.h"
3129
#include "ble/types/BLETypes.h"
3230
#include "ble/internal/SecurityDb.h"
3331
#include "ble/internal/PalConnectionMonitor.h"
@@ -668,34 +666,6 @@ class SecurityManager
668666
*/
669667
ble_error_t setHintFutureRoleReversal(bool enable = true);
670668

671-
/**
672-
* Set the time after which an event will be generated unless we received a packet with
673-
* a valid MIC.
674-
*
675-
* @param[in] connectionHandle Handle to identify the connection.
676-
* @param[in] timeout_in_ms Timeout to set.
677-
*
678-
* @return BLE_ERROR_NONE or appropriate error code indicating the failure reason.
679-
*/
680-
ble_error_t setAuthenticationTimeout(
681-
connection_handle_t connection,
682-
uint32_t timeout_in_ms
683-
);
684-
685-
/**
686-
* Get the time after which an event will be generated unless we received a packet with
687-
* a valid MIC.
688-
*
689-
* @param[in] connectionHandle Handle to identify the connection.
690-
* @param[in] timeout_in_ms Returns the timeout.
691-
*
692-
* @return BLE_ERROR_NONE or appropriate error code indicating the failure reason.
693-
*/
694-
ble_error_t getAuthenticationTimeout(
695-
connection_handle_t connection,
696-
uint32_t *timeout_in_ms
697-
);
698-
699669
////////////////////////////////////////////////////////////////////////////
700670
// Encryption
701671
//
@@ -921,15 +891,9 @@ class SecurityManager
921891

922892
public:
923893
#if !defined(DOXYGEN_ONLY)
924-
/** For backwards compatibility. This enm is now in BLETypes.h
925-
* @deprecated, use the enum in ble namespace */
926-
enum Keypress_t {
927-
KEYPRESS_STARTED, /**< Passkey entry started */
928-
KEYPRESS_ENTERED, /**< Passkey digit entered */
929-
KEYPRESS_ERASED, /**< Passkey digit erased */
930-
KEYPRESS_CLEARED, /**< Passkey cleared */
931-
KEYPRESS_COMPLETED, /**< Passkey entry completed */
932-
};
894+
/** For backwards compatibility. This enum is now in BLETypes.h
895+
* @deprecated use the enum in ble namespace */
896+
typedef ble::Keypress_t Keypress_t;
933897
#endif // !defined(DOXYGEN_ONLY)
934898
};
935899

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@
2727

2828
namespace ble {
2929

30-
class SecurityManager;
31-
class Gap;
32-
class GattClient;
33-
class GattServer;
34-
3530
/**
3631
* @addtogroup ble
3732
* @{

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

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

2222
#include "ble/types/UUID.h"
2323
#include "ble/types/GattAttribute.h"
24+
#include "ble/types/GattCallbackParamTypes.h"
2425
#include "ble/types/CharacteristicDescriptorDiscovery.h"
2526
#include "ble/types/DiscoveredCharacteristicDescriptor.h"
2627

connectivity/FEATURE_BLE/include/ble/types/DiscoveredCharacteristicDescriptor.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@
2222
#include "ble/types/UUID.h"
2323
#include "ble/Gap.h"
2424
#include "ble/types/GattAttribute.h"
25-
#include "ble/GattClient.h"
2625
#include "ble/types/CharacteristicDescriptorDiscovery.h"
2726

27+
namespace ble {
28+
class GattClient;
29+
}
30+
2831
/**
2932
* @addtogroup ble
3033
* @{

connectivity/FEATURE_BLE/include/ble/types/GattCallbackParamTypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18+
#include "CallChainOfFunctionPointersWithContext.h"
1819

1920
#ifndef MBED_BLE_GATT_CALLBACK_PARAM_TYPES_H__
2021
#define MBED_BLE_GATT_CALLBACK_PARAM_TYPES_H__

0 commit comments

Comments
 (0)