High level Bluetooth Low Energy API and radio abstraction layer

Fork of BLE_API by Bluetooth Low Energy

Revision:
1116:9cb51490b3f7
Parent:
1115:82d4a8a56d91
Child:
1117:421bdb7c5711
diff -r 82d4a8a56d91 -r 9cb51490b3f7 ble/Gap.h
--- a/ble/Gap.h	Mon Jan 11 08:52:01 2016 +0000
+++ b/ble/Gap.h	Mon Jan 11 08:52:02 2016 +0000
@@ -25,6 +25,7 @@
 #include "CallChainOfFunctionPointersWithContext.h"
 #include "FunctionPointerWithContext.h"
 #include <set>
+#include "deprecate.h"
 
 /* Forward declarations for classes that will only be used for pointers or references in the following. */
 class GapAdvertisingParams;
@@ -52,13 +53,13 @@
 
     /**
      * Address-type for BLEProtocol addresses.
-     * @note: deprecated. Use BLEProtocol::AddressType_t instead.
+     * \deprecated: Use BLEProtocol::AddressType_t instead.
      *
      * DEPRECATION ALERT: The following constants have been left in their
      * deprecated state to transparenly support existing applications which may
      * have used Gap::ADDR_TYPE_*.
      */
-    enum {
+    enum DeprecatedAddressType_t {
         ADDR_TYPE_PUBLIC                        = BLEProtocol::AddressType::PUBLIC,
         ADDR_TYPE_RANDOM_STATIC                 = BLEProtocol::AddressType::RANDOM_STATIC,
         ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE     = BLEProtocol::AddressType::RANDOM_PRIVATE_RESOLVABLE,
@@ -277,6 +278,23 @@
     }
 
     /**
+     * Create a connection (GAP Link Establishment).
+     *
+     * \deprecated: This funtion overloads Gap::connect(const BLEProtocol::Address_t  peerAddr,
+                                                        BLEProtocol::AddressType_t    peerAddrType,
+                                                        const ConnectionParams_t     *connectionParams,
+                                                        const GapScanningParams      *scanParams)
+     *      to maintain backward compatibility for change from Gap::AddressType_t to BLEProtocol::AddressType_t
+     */
+    ble_error_t connect(const BLEProtocol::Address_t  peerAddr,
+                        DeprecatedAddressType_t       peerAddrType,
+                        const ConnectionParams_t     *connectionParams,
+                        const GapScanningParams      *scanParams)
+    __deprecated_message("Gap::DeprecatedAddressType_t is deprecated, use BLEProtocol::AddressType_t instead") {
+        return connect(peerAddr, (BLEProtocol::AddressType_t) peerAddrType, connectionParams, scanParams);
+    }
+
+    /**
      * This call initiates the disconnection procedure, and its completion will
      * be communicated to the application with an invocation of the
      * disconnectionCallback.