aboutsummaryrefslogtreecommitdiff
path: root/trygvis-io-bt-stubs
diff options
context:
space:
mode:
Diffstat (limited to 'trygvis-io-bt-stubs')
-rw-r--r--trygvis-io-bt-stubs/build.gradle5
-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
7 files changed, 118 insertions, 0 deletions
diff --git a/trygvis-io-bt-stubs/build.gradle b/trygvis-io-bt-stubs/build.gradle
new file mode 100644
index 0000000..c152b19
--- /dev/null
+++ b/trygvis-io-bt-stubs/build.gradle
@@ -0,0 +1,5 @@
+apply plugin: 'java'
+
+dependencies {
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+} \ No newline at end of file
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);
+ }
+}