updated interface file in android_api.
authorjihwan.seo <jihwan.seo@samsung.com>
Thu, 13 Aug 2015 11:50:30 +0000 (20:50 +0900)
committerErich Keane <erich.keane@intel.com>
Fri, 14 Aug 2015 07:20:16 +0000 (07:20 +0000)
as java interface for BLE was changed(change-2100),
I have updated java files android_api.

Change-Id: I7519f007619eb5c4ac8b25abb8f9fbf5f3a5d3c0
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2197
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
android/android_api/base/src/main/java/org/iotivity/ca/CaLeClientInterface.java
android/android_api/base/src/main/java/org/iotivity/ca/CaLeServerInterface.java

index 891cb40..ef20573 100644 (file)
@@ -72,8 +72,7 @@ public class CaLeClientInterface {
     private native static void caLeRegisterGattCallback(BluetoothGattCallback callback);
 
     // BluetoothAdapter.LeScanCallback
-    private native static void caLeScanCallback(BluetoothDevice device,
-                                                int rssi, byte[] scanRecord);
+    private native static void caLeScanCallback(BluetoothDevice device);
 
     // BluetoothGattCallback
     private native static void caLeGattConnectionStateChangeCallback(
@@ -81,24 +80,13 @@ public class CaLeClientInterface {
 
     private native static void caLeGattServicesDiscoveredCallback(BluetoothGatt gatt, int status);
 
-    private native static void caLeGattCharacteristicReadCallback(
-            BluetoothGatt gatt, BluetoothGattCharacteristic characteristic,
-            byte[] data, int status);
-
     private native static void caLeGattCharacteristicWriteCallback(
-            BluetoothGatt gatt, BluetoothGattCharacteristic characteristic,
-            byte[] data, int status);
+            BluetoothGatt gatt, byte[] data, int status);
 
     private native static void caLeGattCharacteristicChangedCallback(
-            BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, byte[] data);
-
-    private native static void caLeGattDescriptorReadCallback(BluetoothGatt gatt,
-                                                             BluetoothGattDescriptor descriptor,
-                                                             int status);
+            BluetoothGatt gatt, byte[] data);
 
-    private native static void caLeGattDescriptorWriteCallback(BluetoothGatt gatt,
-                                                              BluetoothGattDescriptor descriptor,
-                                                              int status);
+    private native static void caLeGattDescriptorWriteCallback(BluetoothGatt gatt, int status);
 
     private native static void caLeGattReliableWriteCompletedCallback(BluetoothGatt gatt,
                                                                      int status);
@@ -125,7 +113,7 @@ public class CaLeClientInterface {
                     Log.d(TAG, "UUID : " + uuid.toString());
                     if(uuid.toString().contains(SERVICE_UUID.toLowerCase())) {
                         Log.d(TAG, "we found that has the Device");
-                        caLeScanCallback(device, rssi, scanRecord);
+                        caLeScanCallback(device);
                     }
                 }
             } catch(UnsatisfiedLinkError e) {
@@ -202,9 +190,6 @@ public class CaLeClientInterface {
         public void onCharacteristicRead(BluetoothGatt gatt,
                 BluetoothGattCharacteristic characteristic, int status) {
             super.onCharacteristicRead(gatt, characteristic, status);
-
-            caLeGattCharacteristicReadCallback(gatt, characteristic,
-                                               characteristic.getValue(), status);
         }
 
         @Override
@@ -212,8 +197,7 @@ public class CaLeClientInterface {
                 BluetoothGattCharacteristic characteristic, int status) {
             super.onCharacteristicWrite(gatt, characteristic, status);
 
-            caLeGattCharacteristicWriteCallback(gatt, characteristic,
-                                                characteristic.getValue(), status);
+            caLeGattCharacteristicWriteCallback(gatt, characteristic.getValue(), status);
         }
 
         @Override
@@ -221,16 +205,13 @@ public class CaLeClientInterface {
                 BluetoothGattCharacteristic characteristic) {
             super.onCharacteristicChanged(gatt, characteristic);
 
-            caLeGattCharacteristicChangedCallback(gatt, characteristic,
-                                                  characteristic.getValue());
+            caLeGattCharacteristicChangedCallback(gatt, characteristic.getValue());
         }
 
         @Override
         public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor,
                 int status) {
             super.onDescriptorRead(gatt, descriptor, status);
-
-            caLeGattDescriptorReadCallback(gatt, descriptor, status);
         }
 
         @Override
@@ -238,21 +219,17 @@ public class CaLeClientInterface {
                 int status) {
             super.onDescriptorWrite(gatt, descriptor, status);
 
-            caLeGattDescriptorWriteCallback(gatt, descriptor, status);
+            caLeGattDescriptorWriteCallback(gatt, status);
         }
 
         @Override
         public void onReliableWriteCompleted(BluetoothGatt gatt, int status) {
             super.onReliableWriteCompleted(gatt, status);
-
-            caLeGattReliableWriteCompletedCallback(gatt, status);
         }
 
         @Override
         public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {
             super.onReadRemoteRssi(gatt, rssi, status);
-
-            caLeGattReadRemoteRssiCallback(gatt, rssi, status);
         }
     };
 
@@ -293,3 +270,4 @@ public class CaLeClientInterface {
     };
 }
 
+
index 18ac49f..281beac 100644 (file)
@@ -56,23 +56,10 @@ public class CaLeServerInterface {
                                                                   BluetoothGattService service);
 
     private native static void caLeGattServerCharacteristicReadRequestCallback(
-            BluetoothDevice device,
-            int requestId, int offset, BluetoothGattCharacteristic characteristic, byte[] data);
+            BluetoothDevice device, byte[] data);
 
     private native static void caLeGattServerCharacteristicWriteRequestCallback(
-            BluetoothDevice device, int requestId,
-            BluetoothGattCharacteristic characteristic, byte[] data, boolean preparedWrite,
-            boolean responseNeeded, int offset, byte[] value);
-
-    private native static void caLeGattServerDescriptorReadRequestCallback(
-            BluetoothDevice device, int requestId, int offset, BluetoothGattDescriptor descriptor);
-
-    public native static void caLeGattServerDescriptorWriteRequestCallback(
-            BluetoothDevice device, int requestId, BluetoothGattDescriptor descriptor,
-            boolean preparedWrite, boolean responseNeeded, int offset, byte[] value);
-
-    private native static void caLeGattServerExecuteWriteCallback(BluetoothDevice device,
-                                                                 int requestId, boolean execute);
+            BluetoothDevice device, byte[] data);
 
     private native static void caLeGattServerNotificationSentCallback(BluetoothDevice device,
                                                                      int status);
@@ -107,9 +94,7 @@ public class CaLeServerInterface {
                 BluetoothGattCharacteristic characteristic) {
             super.onCharacteristicReadRequest(device, requestId, offset, characteristic);
 
-            caLeGattServerCharacteristicReadRequestCallback(device, requestId, offset,
-                                                            characteristic,
-                                                            characteristic.getValue());
+            caLeGattServerCharacteristicReadRequestCallback(device, characteristic.getValue());
         }
 
         @Override
@@ -119,9 +104,7 @@ public class CaLeServerInterface {
             super.onCharacteristicWriteRequest(device, requestId, characteristic,
                     preparedWrite, responseNeeded, offset, value);
 
-            caLeGattServerCharacteristicWriteRequestCallback(device, requestId, characteristic,
-                                                             value, preparedWrite, responseNeeded,
-                                                             offset, value);
+            caLeGattServerCharacteristicWriteRequestCallback(device, value);
         }
 
         @Override
@@ -129,8 +112,6 @@ public class CaLeServerInterface {
                 BluetoothDevice device,
                 int requestId, int offset, BluetoothGattDescriptor descriptor) {
             super.onDescriptorReadRequest(device, requestId, offset, descriptor);
-
-            caLeGattServerDescriptorReadRequestCallback(device, requestId, offset, descriptor);
         }
 
         @Override
@@ -140,17 +121,11 @@ public class CaLeServerInterface {
                 byte[] value) {
             super.onDescriptorWriteRequest(device, requestId, descriptor, preparedWrite,
                                            responseNeeded, offset, value);
-
-            caLeGattServerDescriptorWriteRequestCallback(device, requestId, descriptor,
-                                                         preparedWrite, responseNeeded, offset,
-                                                         value);
         }
 
         @Override
         public void onExecuteWrite(BluetoothDevice device, int requestId, boolean execute) {
             super.onExecuteWrite(device, requestId, execute);
-
-            caLeGattServerExecuteWriteCallback(device, requestId, execute);
         }
 
         @Override