Changeset 7041 for source/ariba/utility/transport
- Timestamp:
- Dec 8, 2009, 6:18:58 PM (15 years ago)
- Location:
- source/ariba/utility/transport
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/transport/asio/bluetooth_endpoint.hpp
r6185 r7041 1 #include<config.h> 2 3 #ifdef HAVE_LIBBLUETOOTH 4 1 5 #ifndef BOOST_ASIO_BLUETOOTH_BLUETOOTH_ENDPOINT_HPP__ 2 6 #define BOOST_ASIO_BLUETOOTH_BLUETOOTH_ENDPOINT_HPP__ … … 180 184 181 185 #endif 186 #endif -
source/ariba/utility/transport/rfcomm/rfcomm.cpp
r5993 r7041 1 #include<config.h> 2 3 #ifdef HAVE_LIBBLUETOOTH 4 1 5 #include "rfcomm.hpp" 2 6 … … 432 436 433 437 }} // namespace ariba::transport 438 439 #endif -
source/ariba/utility/transport/rfcomm/rfcomm.hpp
r5993 r7041 1 #include<config.h> 2 3 #ifdef HAVE_LIBBLUETOOTH 4 1 5 #ifndef RFCOMM_HPP_ 2 6 #define RFCOMM_HPP_ … … 72 76 73 77 #endif /* RFCOMM_HPP_ */ 78 #endif -
source/ariba/utility/transport/transport_peer.cpp
r5614 r7041 1 1 2 #include<config.h> 2 3 #include "transport_peer.hpp" 3 4 #include "transport.hpp" … … 17 18 cout << "Started tcpip_transport on port " << local.tcp.begin()->value() << endl; 18 19 } 20 21 #ifdef HAVE_LIBBLUETOOTH 19 22 // setup rfcomm transports 20 23 rfc = NULL; … … 24 27 cout << "Started rfcomm_transport on port " << local.rfcomm.begin()->value() << endl; 25 28 } 29 #endif 26 30 } 27 31 28 32 transport_peer::~transport_peer() { 29 33 if (tcp !=NULL ) delete tcp; 34 #ifdef HAVE_LIBBLUETOOTH 30 35 if (rfc !=NULL ) delete rfc; 36 #endif 31 37 } 32 38 33 39 void transport_peer::start() { 34 40 if (tcp!=NULL) tcp->start(); 41 #ifdef HAVE_LIBBLUETOOTH 35 42 if (rfc!=NULL) rfc->start(); 43 #endif 36 44 } 37 45 38 46 void transport_peer::stop() { 39 47 if (tcp!=NULL) tcp->stop(); 48 #ifdef HAVE_LIBBLUETOOTH 40 49 if (rfc!=NULL) rfc->stop(); 50 #endif 41 51 } 42 52 … … 45 55 tcp->send(remote,data,size); 46 56 } else 57 #ifdef HAVE_LIBBLUETOOTH 47 58 if (remote->instanceof<rfcomm_endpoint>() && rfc!=NULL) { 48 59 rfc->send(remote,data,size); 49 60 } else 61 #endif 50 62 cerr << "Could not send message to " << remote->to_string() << endl; 51 63 } … … 53 65 void transport_peer::send( const endpoint_set& endpoints, const uint8_t* data, size_t size ) { 54 66 if (tcp!=NULL) tcp->send(endpoints,data,size); 67 #ifdef HAVE_LIBBLUETOOTH 55 68 if (rfc!=NULL) rfc->send(endpoints,data,size); 69 #endif 56 70 } 57 71 … … 59 73 if (remote->instanceof<tcpip_endpoint>() && tcp!=NULL) 60 74 tcp->terminate(remote); 75 #ifdef HAVE_LIBBLUETOOTH 61 76 if (remote->instanceof<rfcomm_endpoint>() && rfc!=NULL) 62 77 rfc->terminate(remote); 78 #endif 63 79 } 64 80 65 81 void transport_peer::register_listener( transport_listener* listener ) { 66 82 if (tcp!=NULL) tcp->register_listener(listener); 83 #ifdef HAVE_LIBBLUETOOTH 67 84 if (rfc!=NULL) rfc->register_listener(listener); 85 #endif 68 86 } 69 87 -
source/ariba/utility/transport/transport_peer.hpp
r5993 r7041 2 2 #define TRANSPORT_PEER_HPP_ 3 3 4 #include<config.h> 4 5 #include "transport_protocol.hpp" 5 6 #include "ariba/utility/addressing/endpoint_set.hpp" … … 12 13 13 14 class tcpip; 15 #ifdef HAVE_LIBBLUETOOTH 14 16 class rfcomm; 17 #endif 15 18 16 19 /** … … 35 38 endpoint_set& local; 36 39 tcpip* tcp; 40 #ifdef HAVE_LIBBLUETOOTH 37 41 rfcomm* rfc; 42 #endif 38 43 }; 39 44
Note:
See TracChangeset
for help on using the changeset viewer.