No changes

Fork of nRF51822 by Nordic Semiconductor

Revision:
549:3f782c64d014
Parent:
548:920e941cbe1e
Child:
561:613dbbdeed27
--- a/source/nRF5xGattClient.h	Mon Jan 11 10:19:06 2016 +0000
+++ b/source/nRF5xGattClient.h	Mon Jan 11 10:19:06 2016 +0000
@@ -19,7 +19,6 @@
 
 #include "ble/GattClient.h"
 #include "nRF5xServiceDiscovery.h"
-#include "nRF5xCharacteristicDescriptorDiscoverer.h"
 
 class nRF5xGattClient : public GattClient
 {
@@ -88,14 +87,14 @@
                                                const UUID                                 &matchingCharacteristicUUIDIn = UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN));
 
     virtual void onServiceDiscoveryTermination(ServiceDiscovery::TerminationCallback_t callback) {
-        _discovery.onTermination(callback);
+        discovery.onTermination(callback);
     }
 
     /**
      * Is service-discovery currently active?
      */
     virtual bool isServiceDiscoveryActive(void) const {
-        return _discovery.isActive();
+        return discovery.isActive();
     }
 
     /**
@@ -103,31 +102,9 @@
      * invocation of the TerminationCallback if service-discovery is active.
      */
     virtual void terminateServiceDiscovery(void) {
-        _discovery.terminate();
+        discovery.terminate();
     }
 
-    /**
-     * @brief Implementation of GattClient::discoverCharacteristicDescriptors 
-     * @see GattClient::discoverCharacteristicDescriptors 
-     */
-    virtual ble_error_t discoverCharacteristicDescriptors(
-        const DiscoveredCharacteristic& characteristic,
-        const CharacteristicDescriptorDiscovery::DiscoveryCallback_t& discoveryCallback,
-        const CharacteristicDescriptorDiscovery::TerminationCallback_t& terminationCallback
-    );
-
-    /**
-     * @brief Implementation of GattClient::isCharacteristicDiscoveryActive 
-     * @see GattClient::isCharacteristicDiscoveryActive 
-     */
-    virtual bool isCharacteristicDescriptorsDiscoveryActive(const DiscoveredCharacteristic& characteristic) const;
-
-    /**
-     * @brief Implementation of GattClient::terminateCharacteristicDiscovery 
-     * @see GattClient::terminateCharacteristicDiscovery 
-     */
-    virtual void terminateCharacteristicDescriptorsDiscovery(const DiscoveredCharacteristic& characteristic);
-
     virtual ble_error_t read(Gap::Handle_t connHandle, GattAttribute::Handle_t attributeHandle, uint16_t offset) const {
         uint32_t rc = sd_ble_gattc_read(connHandle, attributeHandle, offset);
         if (rc == NRF_SUCCESS) {
@@ -171,25 +148,18 @@
     }
 
 public:
-    nRF5xGattClient() : _discovery(this) {
+    nRF5xGattClient() : discovery(this) {
         /* empty */
     }
 
-    nRF5xServiceDiscovery& discovery() { 
-        return _discovery;
-    }
-
-    nRF5xCharacteristicDescriptorDiscoverer& characteristicDescriptorDiscoverer() { 
-        return _characteristicDescriptorDiscoverer;
-    }
+    friend void bleGattcEventHandler(const ble_evt_t *p_ble_evt);
 
 private:
     nRF5xGattClient(const nRF5xGattClient &);
     const nRF5xGattClient& operator=(const nRF5xGattClient &);
 
 private:
-    nRF5xServiceDiscovery _discovery;
-    nRF5xCharacteristicDescriptorDiscoverer _characteristicDescriptorDiscoverer;
+    nRF5xServiceDiscovery discovery;
 
 #endif // if !S110
 };