summaryrefslogtreecommitdiff
path: root/altosui/libaltos/libaltos.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-04-08 10:13:55 -0700
committerKeith Packard <keithp@keithp.com>2011-04-08 10:13:55 -0700
commit8dd455204cf8712fa8c142b0c0517cec1bf5fd0f (patch)
treeb265bec35628bdcec11fe827dac3ed935a8d6e31 /altosui/libaltos/libaltos.h
parentbf1c7df5301a1727e871a8447f835fe75bdce3fc (diff)
altosui: Add low-level Bluetooth APIs
Adds the JNI functions to query and connect to arbitrary bluetooth devices. Adds Java wrappers to construct a list of proximate bluetooth devices. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/libaltos/libaltos.h')
-rw-r--r--altosui/libaltos/libaltos.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/altosui/libaltos/libaltos.h b/altosui/libaltos/libaltos.h
index 0e5691cb..9c3f9655 100644
--- a/altosui/libaltos/libaltos.h
+++ b/altosui/libaltos/libaltos.h
@@ -58,6 +58,15 @@ struct altos_device {
//%mutable;
};
+#define BLUETOOTH_PRODUCT_TELEBT "TeleBT"
+
+struct altos_bt_device {
+ //%immutable;
+ char name[256];
+ char addr[20];
+ //%mutable;
+};
+
#define LIBALTOS_SUCCESS 0
#define LIBALTOS_ERROR -1
#define LIBALTOS_TIMEOUT -2
@@ -100,4 +109,16 @@ altos_flush(struct altos_file *file);
PUBLIC int
altos_getchar(struct altos_file *file, int timeout);
+PUBLIC struct altos_bt_list *
+altos_bt_list_start(void);
+
+PUBLIC int
+altos_bt_list_next(struct altos_bt_list *list, struct altos_bt_device *device);
+
+PUBLIC void
+altos_bt_list_finish(struct altos_bt_list *list);
+
+PUBLIC struct altos_file *
+altos_bt_open(struct altos_bt_device *device);
+
#endif /* _LIBALTOS_H_ */