Last change
on this file since 6837 was 5284, checked in by mies, 15 years ago |
+ added new transport modules and adapted ariba to them
+ exchange endpoint descriptors an link establishment
+ clean up of base communication
+ link establishment with in the presence of multiple endpoints
+ local discovery for ipv6, ipv4 and bluetooth mac addresses
|
File size:
1.2 KB
|
Line | |
---|
1 | #ifndef BOOST_ASIO_BLUETOOTH_RFCOMM_HPP__
|
---|
2 | #define BOOST_ASIO_BLUETOOTH_RFCOMM_HPP__
|
---|
3 |
|
---|
4 | #include "bluetooth_endpoint.hpp"
|
---|
5 |
|
---|
6 | #include <bluetooth/bluetooth.h>
|
---|
7 | #include <bluetooth/rfcomm.h>
|
---|
8 |
|
---|
9 | namespace boost {
|
---|
10 | namespace asio {
|
---|
11 | namespace bluetooth {
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * The rfcomm class contains flags necessary for RFCOMM sockets.
|
---|
15 | *
|
---|
16 | * @author Martin Florian <mflorian@lafka.net>
|
---|
17 | */
|
---|
18 | class rfcomm {
|
---|
19 | public:
|
---|
20 | /// The type of endpoint.
|
---|
21 | typedef bluetooth_endpoint<rfcomm> endpoint;
|
---|
22 |
|
---|
23 | /// Get an Instance.
|
---|
24 | /// We need this to fulfill the asio Endpoint requirements, I think.
|
---|
25 | static rfcomm get() {
|
---|
26 | return rfcomm();
|
---|
27 | }
|
---|
28 |
|
---|
29 | /// Obtain an identifier for the type of the protocol.
|
---|
30 | int type() const {
|
---|
31 | return SOCK_STREAM;
|
---|
32 | }
|
---|
33 |
|
---|
34 | /// Obtain an identifier for the protocol.
|
---|
35 | int protocol() const {
|
---|
36 | return BTPROTO_RFCOMM;
|
---|
37 | }
|
---|
38 |
|
---|
39 | /// Obtain an identifier for the protocol family.
|
---|
40 | int family() const {
|
---|
41 | return AF_BLUETOOTH;
|
---|
42 | }
|
---|
43 |
|
---|
44 | /// The RFCOMM socket type, lets pray that this will work.
|
---|
45 | typedef basic_stream_socket<rfcomm> socket;
|
---|
46 |
|
---|
47 | /// The RFCOMM acceptor type.
|
---|
48 | typedef basic_socket_acceptor<rfcomm> acceptor;
|
---|
49 |
|
---|
50 | };
|
---|
51 |
|
---|
52 | }}} // namespace boost::asio::bluetooth
|
---|
53 |
|
---|
54 | #endif /* BOOST_ASIO_BLUETOOTH_RFCOMM_HPP__ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.