boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol > Class Template Reference

#include <source/ariba/utility/transport/asio/bluetooth_endpoint.hpp>

List of all members.

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_endpointoperator= (const bluetooth_endpoint &other)
 Assign from another endpoint.
protocol_type protocol () const
 The protocol associated with the endpoint.
data_typedata ()
const data_typedata () 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.


Detailed Description

template<typename BluetoothProtocol>
class boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >

Describes an endpoint for a RFCOMM Bluetooth socket.

Author:
Martin Florian <mflorian@lafka.net>

Definition at line 19 of file bluetooth_endpoint.hpp.


Member Typedef Documentation

template<typename BluetoothProtocol>
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.

template<typename BluetoothProtocol>
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.


Constructor & Destructor Documentation

template<typename BluetoothProtocol>
boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::bluetooth_endpoint (  )  [inline]

template<typename BluetoothProtocol>
boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::bluetooth_endpoint ( const BluetoothProtocol &  protocol,
unsigned short  channel 
) [inline]

template<typename BluetoothProtocol>
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_.

template<typename BluetoothProtocol>
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_.

template<typename BluetoothProtocol>
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_.

template<typename BluetoothProtocol>
boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::bluetooth_endpoint ( const bluetooth_endpoint< BluetoothProtocol > &  other  )  [inline]

Copy constructor.

Definition at line 78 of file bluetooth_endpoint.hpp.


Member Function Documentation

template<typename BluetoothProtocol>
void boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::address ( const boost::asio::ip::address &  addr  )  [inline]

template<typename BluetoothProtocol>
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().

template<typename BluetoothProtocol>
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_.

template<typename BluetoothProtocol>
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.

template<typename BluetoothProtocol>
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_.

template<typename BluetoothProtocol>
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().

template<typename BluetoothProtocol>
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_.

template<typename BluetoothProtocol>
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_.

template<typename BluetoothProtocol>
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_.

template<typename BluetoothProtocol>
protocol_type boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::protocol (  )  const [inline]

The protocol associated with the endpoint.

Definition at line 89 of file bluetooth_endpoint.hpp.

template<typename BluetoothProtocol>
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.

template<typename BluetoothProtocol>
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.


Friends And Related Function Documentation

template<typename BluetoothProtocol>
bool operator!= ( const bluetooth_endpoint< BluetoothProtocol > &  e1,
const bluetooth_endpoint< BluetoothProtocol > &  e2 
) [friend]

Compare two endpoints for inequality.

Definition at line 157 of file bluetooth_endpoint.hpp.

template<typename BluetoothProtocol>
bool operator< ( const bluetooth_endpoint< BluetoothProtocol > &  e1,
const bluetooth_endpoint< BluetoothProtocol > &  e2 
) [friend]

Compare endpoints for ordering.

Definition at line 163 of file bluetooth_endpoint.hpp.

template<typename BluetoothProtocol>
bool operator== ( const bluetooth_endpoint< BluetoothProtocol > &  e1,
const bluetooth_endpoint< BluetoothProtocol > &  e2 
) [friend]

Compare two endpoints for equality.

Definition at line 151 of file bluetooth_endpoint.hpp.


Member Data Documentation

template<typename BluetoothProtocol>
bdaddr_t boost::asio::bluetooth::bluetooth_endpoint< X >::addr_any = (const bdaddr_t) { {0u, 0u, 0u, 0u, 0u, 0u} } [inline, static, private]

template<typename BluetoothProtocol>
struct sockaddr_rc boost::asio::bluetooth::bluetooth_endpoint< BluetoothProtocol >::data_ [read, private]


The documentation for this class was generated from the following file:

Generated on Fri Aug 14 23:39:43 2009 for Ariba by  doxygen 1.5.8