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

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

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