source: source/ariba/utility/transport/transport_peer.hpp@ 10653

Last change on this file since 10653 was 10653, checked in by Michael Tänzer, 12 years ago

Merge the ASIO branch back into trunk

File size: 1.5 KB
RevLine 
[5284]1#ifndef TRANSPORT_PEER_HPP_
2#define TRANSPORT_PEER_HPP_
3
[7464]4#include "ariba/config.h"
[5284]5#include "transport_protocol.hpp"
[5993]6#include "ariba/utility/addressing/endpoint_set.hpp"
[10653]7#include <boost/shared_ptr.hpp>
8#include "rfcomm/bluetooth_rfcomm.hpp"
[5284]9
[10653]10
[5284]11// namespace ariba::transport
12namespace ariba {
13namespace transport {
14
15using namespace ariba::addressing;
16
17class tcpip;
[10653]18
[7041]19#ifdef HAVE_LIBBLUETOOTH
[10653]20class rfcomm_transport;
[7041]21#endif
[5284]22
23/**
24 * TODO: Doc
25 *
26 * @author Sebastian Mies <mies@tm.uka.de>
27 */
[9324]28/// this transport peer allocates implementations of various transport
29/// protocols and can send messages to an entire set of endpoints
[5284]30class transport_peer : public transport_protocol {
31public:
32 transport_peer( endpoint_set& local_set );
33 virtual ~transport_peer();
34 virtual void start();
35 virtual void stop();
[10653]36
37 virtual void send(
38 const endpoint_set& endpoints,
39 reboost::message_t message,
40 uint8_t priority = 0);
41
42 /// @deprecated: Use terminate() from transport_connection instead
[5614]43 virtual void terminate( const address_v* remote );
[10653]44
[5284]45 virtual void register_listener( transport_listener* listener );
46
47private:
[10653]48 void create_service(tcp::endpoint endp);
49#ifdef HAVE_LIBBLUETOOTH
50 void create_service(boost::asio::bluetooth::rfcomm::endpoint endp);
51#endif
52
[5284]53 endpoint_set& local;
[10653]54 std::vector< boost::shared_ptr<tcpip> > tcps;
[7041]55#ifdef HAVE_LIBBLUETOOTH
[10653]56 std::vector< boost::shared_ptr<rfcomm_transport> > rfcomms;
[7041]57#endif
[5284]58};
59
60}} // namespace ariba::transport
61
62#endif /* TRANSPORT_PEER_HPP_ */
Note: See TracBrowser for help on using the repository browser.