summaryrefslogtreecommitdiff
path: root/altosui/libaltos
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-08-08 12:31:48 -0700
committerKeith Packard <keithp@keithp.com>2011-08-08 12:31:48 -0700
commita315b200cd0da1a964f5395cd59660be1b49672b (patch)
treeccc1369313bfee5b8f6d20561c327fa9f939db17 /altosui/libaltos
parenta65daf94e8fe3e22f770ef76d9104c3dd11d0330 (diff)
altosui: Pull out BlueTooth support
This leaves the code in place, but commented out so that it isn't used until we've got a bluetooth device ready for use. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/libaltos')
-rw-r--r--altosui/libaltos/cjnitest.c2
-rw-r--r--altosui/libaltos/libaltos.c2
-rw-r--r--altosui/libaltos/libaltos.h6
3 files changed, 10 insertions, 0 deletions
diff --git a/altosui/libaltos/cjnitest.c b/altosui/libaltos/cjnitest.c
index 88e40d73..f0fe78f7 100644
--- a/altosui/libaltos/cjnitest.c
+++ b/altosui/libaltos/cjnitest.c
@@ -41,6 +41,7 @@ main ()
altos_close(file);
}
altos_list_finish(list);
+#if HAS_BLUETOOTH
bt_list = altos_bt_list_start(8);
while (altos_bt_list_next(bt_list, &bt_device)) {
printf ("%s %s\n", bt_device.name, bt_device.addr);
@@ -64,6 +65,7 @@ main ()
}
}
altos_bt_list_finish(bt_list);
+#endif
altos_fini();
return 0;
}
diff --git a/altosui/libaltos/libaltos.c b/altosui/libaltos/libaltos.c
index 5e507cdf..b00a7704 100644
--- a/altosui/libaltos/libaltos.c
+++ b/altosui/libaltos/libaltos.c
@@ -582,6 +582,7 @@ altos_list_finish(struct altos_list *usbdevs)
free(usbdevs);
}
+#if HAS_BLUETOOTH
struct altos_bt_list {
inquiry_info *ii;
int sock;
@@ -713,6 +714,7 @@ no_sock:
no_file:
return NULL;
}
+#endif /* HAS_BLUETOOTH */
#endif
diff --git a/altosui/libaltos/libaltos.h b/altosui/libaltos/libaltos.h
index f710919c..dd091e51 100644
--- a/altosui/libaltos/libaltos.h
+++ b/altosui/libaltos/libaltos.h
@@ -34,6 +34,8 @@
# define PUBLIC
#endif
+#define HAS_BLUETOOTH 0
+
#define USB_VENDOR_FSF 0xfffe
#define USB_VENDOR_ALTUSMETRUM USB_VENDOR_FSF
#define USB_PRODUCT_ALTUSMETRUM 0x000a
@@ -109,6 +111,8 @@ altos_flush(struct altos_file *file);
PUBLIC int
altos_getchar(struct altos_file *file, int timeout);
+#if HAS_BLUETOOTH
+
PUBLIC struct altos_bt_list *
altos_bt_list_start(int inquiry_time);
@@ -124,4 +128,6 @@ altos_bt_fill_in(char *name, char *addr, struct altos_bt_device *device);
PUBLIC struct altos_file *
altos_bt_open(struct altos_bt_device *device);
+#endif
+
#endif /* _LIBALTOS_H_ */