aboutsummaryrefslogtreecommitdiff
path: root/trygvis-io-bt-stubs/src/main
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-01-28 23:45:38 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-01-28 23:45:38 +0100
commit3e619a735e63a1222e71060d9e65b354a156b158 (patch)
tree2f31cdc65d0d773874800c114530eb620bcca536 /trygvis-io-bt-stubs/src/main
parentc4685214d8db34166213ffa373a16af1a99401a5 (diff)
downloadio.trygvis.soilmoisture-android-3e619a735e63a1222e71060d9e65b354a156b158.tar.gz
io.trygvis.soilmoisture-android-3e619a735e63a1222e71060d9e65b354a156b158.tar.bz2
io.trygvis.soilmoisture-android-3e619a735e63a1222e71060d9e65b354a156b158.tar.xz
io.trygvis.soilmoisture-android-3e619a735e63a1222e71060d9e65b354a156b158.zip
o Major refactoring on the BtPromise, mainly internal. Renaming BtPromise to BtSequence and BtSequencer.
Diffstat (limited to 'trygvis-io-bt-stubs/src/main')
-rw-r--r--trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGatt.java32
-rw-r--r--trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattCallback.java31
-rw-r--r--trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattCharacteristic.java13
-rw-r--r--trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattDescriptor.java13
-rw-r--r--trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattService.java4
-rw-r--r--trygvis-io-bt-stubs/src/main/java/android/util/Log.java20
6 files changed, 113 insertions, 0 deletions
diff --git a/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGatt.java b/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGatt.java
new file mode 100644
index 0000000..13b33ed
--- /dev/null
+++ b/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGatt.java
@@ -0,0 +1,32 @@
+package android.bluetooth;
+
+import java.util.List;
+import java.util.UUID;
+
+public class BluetoothGatt {
+ public static final int GATT_SUCCESS = 1;
+ public static final int STATE_CONNECTED = 2;
+
+ public boolean discoverServices() {
+ return false;
+ }
+
+ public List getServices() {
+ return null;
+ }
+
+ public BluetoothGattService getService(UUID uuid) {
+ return null;
+ }
+
+ public boolean writeCharacteristic(BluetoothGattCharacteristic characteristic) {
+ return false;
+ }
+
+ public void setCharacteristicNotification(BluetoothGattCharacteristic characteristic, boolean b) {
+ }
+
+ public boolean writeDescriptor(BluetoothGattDescriptor descriptor) {
+ return false;
+ }
+}
diff --git a/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattCallback.java b/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattCallback.java
new file mode 100644
index 0000000..a2a2943
--- /dev/null
+++ b/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattCallback.java
@@ -0,0 +1,31 @@
+package android.bluetooth;
+
+public class BluetoothGattCallback {
+
+ public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
+ }
+
+ public void onServicesDiscovered(BluetoothGatt gatt, int status) {
+ }
+
+ public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
+ }
+
+ public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
+ }
+
+ public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
+ }
+
+ public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {
+ }
+
+ public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {
+ }
+
+ public void onReliableWriteCompleted(BluetoothGatt gatt, int status) {
+ }
+
+ public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {
+ }
+}
diff --git a/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattCharacteristic.java b/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattCharacteristic.java
new file mode 100644
index 0000000..8398b5a
--- /dev/null
+++ b/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattCharacteristic.java
@@ -0,0 +1,13 @@
+package android.bluetooth;
+
+import java.util.UUID;
+
+public class BluetoothGattCharacteristic {
+ public UUID getUuid() {
+ return null;
+ }
+
+ public byte[] getValue() {
+ return null;
+ }
+}
diff --git a/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattDescriptor.java b/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattDescriptor.java
new file mode 100644
index 0000000..0a86c7e
--- /dev/null
+++ b/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattDescriptor.java
@@ -0,0 +1,13 @@
+package android.bluetooth;
+
+import java.util.UUID;
+
+public class BluetoothGattDescriptor {
+ public UUID getUuid() {
+ return null;
+ }
+
+ public BluetoothGattCharacteristic getCharacteristic() {
+ return null;
+ }
+}
diff --git a/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattService.java b/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattService.java
new file mode 100644
index 0000000..cd2a57f
--- /dev/null
+++ b/trygvis-io-bt-stubs/src/main/java/android/bluetooth/BluetoothGattService.java
@@ -0,0 +1,4 @@
+package android.bluetooth;
+
+public class BluetoothGattService {
+}
diff --git a/trygvis-io-bt-stubs/src/main/java/android/util/Log.java b/trygvis-io-bt-stubs/src/main/java/android/util/Log.java
new file mode 100644
index 0000000..036ce22
--- /dev/null
+++ b/trygvis-io-bt-stubs/src/main/java/android/util/Log.java
@@ -0,0 +1,20 @@
+package android.util;
+
+public class Log {
+ public static void d(String tag, String s) {
+ System.out.println("d: " + tag + ": " + s);
+ }
+
+ public static void i(String tag, String s) {
+ System.out.println("i: " + tag + ": " + s);
+ }
+
+ public static void w(String tag, String s) {
+ System.out.println("w: " + tag + ": " + s);
+ }
+
+ public static void w(String tag, String s, Exception e) {
+ System.out.println("w: " + tag + ": " + s);
+ e.printStackTrace(System.out);
+ }
+}