00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _OASYS_BT_INQUIRY_H_
00018 #define _OASYS_BT_INQUIRY_H_
00019
00020 #include <config.h>
00021 #ifdef OASYS_BLUETOOTH_ENABLED
00022
00023 #include <bluetooth/bluetooth.h>
00024 #include <bluetooth/hci.h>
00025
00026 #include "../debug/Log.h"
00027
00028 #define MAX_BTNAME_SZ 248
00029
00030 #ifndef MIN
00031 #define MIN(a,b) ((a) < (b) ? (a) : (b))
00032 #endif
00033
00034 namespace oasys {
00035
00036 class BluetoothInquiry : public Logger {
00037
00038 public:
00039
00040 #define BT_INQ_NUM_RESP 20
00041 #define BT_INQ_LENGTH 8
00042
00043 BluetoothInquiry(const char * logbase = "/dtn/btinquiry");
00044 virtual ~BluetoothInquiry();
00045
00046
00047
00048
00049 int inquire();
00050
00051
00052
00053
00054 int first(bdaddr_t&);
00055 int next(bdaddr_t&);
00056
00057 protected:
00058 void reset();
00059
00060
00061 int num_responses_i_, pos_;
00062
00063 inquiry_info info_[BT_INQ_NUM_RESP];
00064
00065 long flags_;
00066 };
00067
00068 }
00069 #endif // OASYS_BLUETOOTH_ENABLED
00070 #endif // _OASYS_BT_INQUIRY_H_