altosui: Add bluetooth bits back in
[fw/altos] / altosui / libaltos / libaltos.c
index 21e94ca0c3d1f9602250a67e2a75c0afc9273eb0..a3796ee380e9d0b2a3516719b946cfe3c5d0e276 100644 (file)
@@ -598,7 +598,6 @@ altos_list_finish(struct altos_list *usbdevs)
        free(usbdevs);
 }
 
-#if HAS_BLUETOOTH
 struct altos_bt_list {
        inquiry_info    *ii;
        int             sock;
@@ -730,7 +729,6 @@ no_sock:
 no_file:
        return NULL;
 }
-#endif /* HAS_BLUETOOTH */
 
 #endif
 
@@ -794,8 +792,8 @@ get_number(io_object_t object, CFStringRef entry, int *result)
        return 0;
 }
 
-struct altos_list *
-altos_list_start(int time)
+PUBLIC struct altos_list *
+altos_list_start(void)
 {
        struct altos_list *list = calloc (sizeof (struct altos_list), 1);
        CFMutableDictionaryRef matching_dictionary = IOServiceMatching("IOUSBDevice");
@@ -810,7 +808,7 @@ altos_list_start(int time)
        return list;
 }
 
-int
+PUBLIC int
 altos_list_next(struct altos_list *list, struct altos_device *device)
 {
        io_object_t object;
@@ -837,13 +835,55 @@ altos_list_next(struct altos_list *list, struct altos_device *device)
        }
 }
 
-void
+PUBLIC void
 altos_list_finish(struct altos_list *list)
 {
        IOObjectRelease (list->iterator);
        free(list);
 }
 
+struct altos_bt_list {
+       int             sock;
+       int             dev_id;
+       int             rsp;
+       int             num_rsp;
+};
+
+#define INQUIRY_MAX_RSP        255
+
+struct altos_bt_list *
+altos_bt_list_start(int inquiry_time)
+{
+       return NULL;
+}
+
+int
+altos_bt_list_next(struct altos_bt_list *bt_list,
+                  struct altos_bt_device *device)
+{
+       return 0;
+}
+
+void
+altos_bt_list_finish(struct altos_bt_list *bt_list)
+{
+}
+
+void
+altos_bt_fill_in(char *name, char *addr, struct altos_bt_device *device)
+{
+       strncpy(device->name, name, sizeof (device->name));
+       device->name[sizeof(device->name)-1] = '\0';
+       strncpy(device->addr, addr, sizeof (device->addr));
+       device->addr[sizeof(device->addr)-1] = '\0';
+}
+
+struct altos_file *
+altos_bt_open(struct altos_bt_device *device)
+{
+       return NULL;
+}
+
 #endif
 
 
@@ -1180,4 +1220,38 @@ altos_getchar(struct altos_file *file, int timeout)
        return file->in_data[file->in_read++];
 }
 
+struct altos_bt_list *
+altos_bt_list_start(int inquiry_time)
+{
+       return NULL;
+}
+
+int
+altos_bt_list_next(struct altos_bt_list *bt_list,
+                  struct altos_bt_device *device)
+{
+       return 0;
+}
+
+void
+altos_bt_list_finish(struct altos_bt_list *bt_list)
+{
+       free(bt_list);
+}
+
+void
+altos_bt_fill_in(char *name, char *addr, struct altos_bt_device *device)
+{
+       strncpy(device->name, name, sizeof (device->name));
+       device->name[sizeof(device->name)-1] = '\0';
+       strncpy(device->addr, addr, sizeof (device->addr));
+       device->addr[sizeof(device->addr)-1] = '\0';
+}
+
+struct altos_file *
+altos_bt_open(struct altos_bt_device *device)
+{
+       return NULL;
+}
+
 #endif