-
Notifications
You must be signed in to change notification settings - Fork 2
/
HCI.h
62 lines (45 loc) · 1.04 KB
/
HCI.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Copyright (c) 2013 Kazumasa Kohtaka. All rights reserved.
// This file is available under the MIT license.
#ifndef __HCI_H__
#define __HCI_H__
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <string>
#include <vector>
namespace HCI {
extern int get_device_id(const std::string &bdaddr_str);
class LocalDevice {
private:
int dev_id_;
::hci_dev_info dev_info_;
public:
LocalDevice(void);
explicit LocalDevice(int dev_id);
~LocalDevice(void);
int get_dev_id(void);
const std::string get_name(void);
const ::bdaddr_t get_address(void);
};
class RemoteSocket {
private:
int socket_;
public:
explicit RemoteSocket (int dev_id);
~RemoteSocket(void);
int get_socket(void);
};
class InquiryInfo {
private:
const int len_;
const int max_rsp_;
const int flags_;
inquiry_info *ii_;
const int num_rsp_;
std::vector< ::inquiry_info> devices_;
public:
explicit InquiryInfo(int dev_id);
~InquiryInfo(void);
const std::vector< ::inquiry_info> get_devices(void);
};
};
#endif // __HCI_H__