最新revisionだとなんかerrorになるので、暫定的に rev 111にrevert。ごめんなさい。こういうときどういうふうにcommitすればいいのか分からなかったので。

Dependents:   MiniSteer_BLE

Fork of BLE_API by Bluetooth Low Energy

Revision:
118:f2de8009b969
Parent:
116:ca826083980e
--- a/public/BLEDevice.h	Mon Sep 08 17:11:58 2014 +0100
+++ b/public/BLEDevice.h	Wed Sep 17 04:54:22 2014 +0000
@@ -194,27 +194,27 @@
      */
     ble_error_t stopAdvertising(void);
 
-    ble_error_t disconnect(Gap::DisconnectionReason_t reason);
+    ble_error_t disconnect(void);
 
     /* APIs to set GAP callbacks. */
     void onTimeout(Gap::EventCallback_t timeoutCallback);
 
-    void onConnection(Gap::ConnectionEventCallback_t connectionCallback);
+    void onConnection(Gap::HandleSpecificEventCallback_t connectionCallback);
     /**
      * Used to setup a callback for GAP disconnection.
      */
-    void onDisconnection(Gap::DisconnectionEventCallback_t disconnectionCallback);
+    void onDisconnection(Gap::HandleSpecificEventCallback_t disconnectionCallback);
 
     /**
      * Setup a callback for the GATT event DATA_SENT.
      */
-    void onDataSent(GattServer::ServerEventCallbackWithCount_t callback);
+    void onDataSent(GattServer::ServerEventCallback_t callback);
 
     /**
      * Setup a callback for when a characteristic has its value updated by a
      * client.
      */
-    void onDataWritten(GattServer::WriteEventCallback_t callback);
+    void onDataWritten(GattServer::EventCallback_t callback);
     void onUpdatesEnabled(GattServer::EventCallback_t callback);
     void onUpdatesDisabled(GattServer::EventCallback_t callback);
     void onConfirmationReceived(GattServer::EventCallback_t callback);
@@ -443,9 +443,9 @@
 }
 
 inline ble_error_t
-BLEDevice::disconnect(Gap::DisconnectionReason_t reason)
+BLEDevice::disconnect(void)
 {
-    return transport->getGap().disconnect(reason);
+    return transport->getGap().disconnect();
 }
 
 inline void
@@ -455,25 +455,25 @@
 }
 
 inline void
-BLEDevice::onConnection(Gap::ConnectionEventCallback_t connectionCallback)
+BLEDevice::onConnection(Gap::HandleSpecificEventCallback_t connectionCallback)
 {
     transport->getGap().setOnConnection(connectionCallback);
 }
 
 inline void
-BLEDevice::onDisconnection(Gap::DisconnectionEventCallback_t disconnectionCallback)
+BLEDevice::onDisconnection(Gap::HandleSpecificEventCallback_t disconnectionCallback)
 {
     transport->getGap().setOnDisconnection(disconnectionCallback);
 }
 
 inline void
-BLEDevice::onDataSent(GattServer::ServerEventCallbackWithCount_t callback)
+BLEDevice::onDataSent(GattServer::ServerEventCallback_t callback)
 {
     transport->getGattServer().setOnDataSent(callback);
 }
 
 inline void
-BLEDevice::onDataWritten(GattServer::WriteEventCallback_t callback)
+BLEDevice::onDataWritten(GattServer::EventCallback_t callback)
 {
     transport->getGattServer().setOnDataWritten(callback);
 }
@@ -551,25 +551,25 @@
 inline ble_error_t
 BLEDevice::setDeviceName(const uint8_t *deviceName)
 {
-    return transport->getGap().setDeviceName(deviceName);
+    return transport->getGattServer().setDeviceName(deviceName);
 }
 
 inline ble_error_t
 BLEDevice::getDeviceName(uint8_t *deviceName, unsigned *lengthP)
 {
-    return transport->getGap().getDeviceName(deviceName, lengthP);
+    return transport->getGattServer().getDeviceName(deviceName, lengthP);
 }
 
 inline ble_error_t
 BLEDevice::setAppearance(uint16_t appearance)
 {
-    return transport->getGap().setAppearance(appearance);
+    return transport->getGattServer().setAppearance(appearance);
 }
 
 inline ble_error_t
 BLEDevice::getAppearance(uint16_t *appearanceP)
 {
-    return transport->getGap().getAppearance(appearanceP);
+    return transport->getGattServer().getAppearance(appearanceP);
 }
 
 inline ble_error_t