IBR-DTNSuite
0.12
|
#include <ApiP2PExtensionHandler.h>
Public Types | |
enum | COMMAND { CMD_NOOP = 100, CMD_CONNECT = 101, CMD_DISCONNECT = 102 } |
Public Member Functions | |
ApiP2PExtensionHandler (ClientHandler &client, ibrcommon::socketstream &stream, dtn::core::Node::Protocol proto) | |
virtual | ~ApiP2PExtensionHandler () |
virtual void | run () |
virtual void | finally () |
virtual void | setup () |
virtual void | __cancellation () throw () |
virtual dtn::core::Node::Protocol | getProtocol () const |
virtual void | connect (const dtn::core::Node::URI &uri) |
virtual void | disconnect (const dtn::core::Node::URI &uri) |
Public Member Functions inherited from dtn::api::ProtocolHandler | |
virtual | ~ProtocolHandler ()=0 |
Public Member Functions inherited from dtn::net::P2PDialupExtension | |
P2PDialupExtension () | |
virtual | ~P2PDialupExtension ()=0 |
Additional Inherited Members | |
Protected Member Functions inherited from dtn::api::ProtocolHandler | |
ProtocolHandler (ClientHandler &client, ibrcommon::socketstream &stream) | |
Protected Member Functions inherited from dtn::net::P2PDialupExtension | |
void | fireDiscovered (const dtn::data::EID &eid, const dtn::core::Node::URI &uri) const |
void | fireDisconnected (const dtn::data::EID &eid, const dtn::core::Node::URI &uri) const |
void | fireConnected (const dtn::data::EID &eid, const dtn::core::Node::URI &uri) const |
void | fireInterfaceUp (const ibrcommon::vinterface &iface) const |
void | fireInterfaceDown (const ibrcommon::vinterface &iface) const |
Protected Attributes inherited from dtn::api::ProtocolHandler | |
ClientHandler & | _client |
ibrcommon::socketstream & | _stream |
Definition at line 21 of file ApiP2PExtensionHandler.h.
Enumerator | |
---|---|
CMD_NOOP | |
CMD_CONNECT | |
CMD_DISCONNECT |
Definition at line 23 of file ApiP2PExtensionHandler.h.
dtn::api::ApiP2PExtensionHandler::ApiP2PExtensionHandler | ( | ClientHandler & | client, |
ibrcommon::socketstream & | stream, | ||
dtn::core::Node::Protocol | proto | ||
) |
Definition at line 17 of file ApiP2PExtensionHandler.cpp.
|
virtual |
Definition at line 22 of file ApiP2PExtensionHandler.cpp.
|
virtual |
Implements dtn::api::ProtocolHandler.
Definition at line 68 of file ApiP2PExtensionHandler.cpp.
|
virtual |
Try to initiate a connection to a remote peer
Implements dtn::net::P2PDialupExtension.
Definition at line 77 of file ApiP2PExtensionHandler.cpp.
References dtn::api::ProtocolHandler::_stream, CMD_CONNECT, and dtn::core::Node::URI::value.
|
virtual |
Close an open connection to a peer
Implements dtn::net::P2PDialupExtension.
Definition at line 83 of file ApiP2PExtensionHandler.cpp.
References dtn::api::ProtocolHandler::_stream, CMD_DISCONNECT, and dtn::core::Node::URI::value.
|
virtual |
Implements dtn::api::ProtocolHandler.
Definition at line 58 of file ApiP2PExtensionHandler.cpp.
References dtn::core::BundleCore::getConnectionManager(), dtn::core::BundleCore::getInstance(), and dtn::net::ConnectionManager::remove().
|
virtual |
Provides the extension tag used in the node URIs. E.g. p2p:wifi or p2p:bt
Implements dtn::net::P2PDialupExtension.
Definition at line 72 of file ApiP2PExtensionHandler.cpp.
|
virtual |
Implements dtn::api::ProtocolHandler.
Definition at line 26 of file ApiP2PExtensionHandler.cpp.
References dtn::api::ProtocolHandler::_stream, dtn::api::ClientHandler::API_STATUS_OK, and dtn::utils::Utils::tokenize().
|
virtual |
Reimplemented from dtn::api::ProtocolHandler.
Definition at line 63 of file ApiP2PExtensionHandler.cpp.
References dtn::net::ConnectionManager::add(), dtn::core::BundleCore::getConnectionManager(), and dtn::core::BundleCore::getInstance().