#include <source/ariba/utility/transport/asio/bluetooth_endpoint.hpp>
Public Types | |
typedef BluetoothProtocol | protocol_type |
The protocol type associated with the endpoint. | |
typedef boost::asio::detail::socket_addr_type | data_type |
Public Member Functions | |
bluetooth_endpoint () | |
Default constructor. | |
bluetooth_endpoint (const BluetoothProtocol &protocol, unsigned short channel) | |
bluetooth_endpoint (unsigned short channel) | |
bluetooth_endpoint (const char *addr, unsigned short channel) | |
bluetooth_endpoint (bdaddr_t addr, unsigned short channel) | |
bluetooth_endpoint (const bluetooth_endpoint &other) | |
Copy constructor. | |
bluetooth_endpoint & | operator= (const bluetooth_endpoint &other) |
Assign from another endpoint. | |
protocol_type | protocol () const |
The protocol associated with the endpoint. | |
data_type * | data () |
const data_type * | data () const |
Get the underlying endpoint in the native type. | |
std::size_t | size () const |
Get the underlying size of the endpoint in the native type. | |
void | resize (std::size_t size) |
Set the underlying size of the endpoint in the native type. | |
std::size_t | capacity () const |
Get the capacity of the endpoint in the native type. | |
unsigned short | channel () const |
void | channel (unsigned short channel_num) |
bdaddr_t | address () const |
Get the Bluetooth address associated with the endpoint. | |
void | address (const boost::asio::ip::address &addr) |
Set the Bluetooth address associated with the endpoint. | |
void | address_hr (char &buf) |
Get the Bluetooth address in human readable form and write it to buf. | |
Private Attributes | |
struct sockaddr_rc | data_ |
Static Private Attributes | |
static bdaddr_t | addr_any = (const bdaddr_t) { {0u, 0u, 0u, 0u, 0u, 0u} } |
Friends | |
bool | operator== (const bluetooth_endpoint &e1, const bluetooth_endpoint &e2) |
Compare two endpoints for equality. | |
bool | operator!= (const bluetooth_endpoint &e1, const bluetooth_endpoint &e2) |
Compare two endpoints for inequality. | |
bool | operator< (const bluetooth_endpoint< BluetoothProtocol > &e1, const bluetooth_endpoint< BluetoothProtocol > &e2) |
Compare endpoints for ordering. |
Definition at line 19 of file bluetooth_endpoint.hpp.
typedef boost::asio::detail::socket_addr_type boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_type |
The type of the endpoint structure. This type is dependent on the underlying implementation of the socket layer.
Definition at line 29 of file bluetooth_endpoint.hpp.
typedef BluetoothProtocol boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::protocol_type |
The protocol type associated with the endpoint.
Definition at line 25 of file bluetooth_endpoint.hpp.
boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::bluetooth_endpoint | ( | ) | [inline] |
Default constructor.
Definition at line 33 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::addr_any, and boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::bluetooth_endpoint | ( | const BluetoothProtocol & | protocol, | |
unsigned short | channel | |||
) | [inline] |
Definition at line 40 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::addr_any, and boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::bluetooth_endpoint | ( | unsigned short | channel | ) | [inline] |
Construct an endpoint using a port number, specified in the host's byte order. The IP address will be the any address (i.e. INADDR_ANY or in6addr_any). This constructor would typically be used for accepting new connections.
Definition at line 52 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::bluetooth_endpoint | ( | const char * | addr, | |
unsigned short | channel | |||
) | [inline] |
Construct an endpoint using a port number and an BT address. The address is in human readable form as a string.
Definition at line 61 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::bluetooth_endpoint | ( | bdaddr_t | addr, | |
unsigned short | channel | |||
) | [inline] |
Construct an endpoint using a port number and an BT address. The address is given in the bluetooth-internal format.
Definition at line 70 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::bluetooth_endpoint | ( | const bluetooth_endpoint< BluetoothProtocol > & | other | ) | [inline] |
void boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::address | ( | const boost::asio::ip::address & | addr | ) | [inline] |
Set the Bluetooth address associated with the endpoint.
Definition at line 140 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::channel(), and boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
bdaddr_t boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::address | ( | ) | const [inline] |
Get the Bluetooth address associated with the endpoint.
Definition at line 135 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
Referenced by ariba::transport::convert().
void boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::address_hr | ( | char & | buf | ) | [inline] |
Get the Bluetooth address in human readable form and write it to buf.
Definition at line 146 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
std::size_t boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::capacity | ( | ) | const [inline] |
Get the capacity of the endpoint in the native type.
Definition at line 118 of file bluetooth_endpoint.hpp.
void boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::channel | ( | unsigned short | channel_num | ) | [inline] |
Set the channel associated with the endpoint. The port number is always in the host's byte order.
Definition at line 130 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
unsigned short boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::channel | ( | ) | const [inline] |
Get the channel associated with the endpoint. The port number is always in the host's byte order.
Definition at line 124 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
Referenced by boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::address(), and ariba::transport::convert().
const data_type* boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data | ( | ) | const [inline] |
Get the underlying endpoint in the native type.
Definition at line 100 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
data_type* boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data | ( | ) | [inline] |
Get the underlying endpoint in the native type. TODO: make this nice and generic -> union like in tcp
Definition at line 95 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
bluetooth_endpoint& boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::operator= | ( | const bluetooth_endpoint< BluetoothProtocol > & | other | ) | [inline] |
Assign from another endpoint.
Definition at line 83 of file bluetooth_endpoint.hpp.
References boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_.
protocol_type boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::protocol | ( | ) | const [inline] |
void boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::resize | ( | std::size_t | size | ) | [inline] |
Set the underlying size of the endpoint in the native type.
Definition at line 110 of file bluetooth_endpoint.hpp.
std::size_t boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::size | ( | ) | const [inline] |
Get the underlying size of the endpoint in the native type.
Definition at line 105 of file bluetooth_endpoint.hpp.
bool operator!= | ( | const bluetooth_endpoint< BluetoothProtocol > & | e1, | |
const bluetooth_endpoint< BluetoothProtocol > & | e2 | |||
) | [friend] |
bool operator< | ( | const bluetooth_endpoint< BluetoothProtocol > & | e1, | |
const bluetooth_endpoint< BluetoothProtocol > & | e2 | |||
) | [friend] |
bool operator== | ( | const bluetooth_endpoint< BluetoothProtocol > & | e1, | |
const bluetooth_endpoint< BluetoothProtocol > & | e2 | |||
) | [friend] |
bdaddr_t boost::asio::bluetooth::bluetooth_endpoint< X >::addr_any = (const bdaddr_t) { {0u, 0u, 0u, 0u, 0u, 0u} } [inline, static, private] |
Definition at line 21 of file bluetooth_endpoint.hpp.
Referenced by boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::bluetooth_endpoint().
struct sockaddr_rc boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_ [read, private] |
Definition at line 173 of file bluetooth_endpoint.hpp.
Referenced by boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::address(), boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::address_hr(), boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::bluetooth_endpoint(), boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::channel(), boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data(), and boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::operator=().