00001 /* 00002 * HTTPConvergenceLayer.h 00003 * 00004 * Created on: 29.07.2010 00005 * Author: morgenro 00006 */ 00007 00008 #ifndef HTTPCONVERGENCELAYER_H_ 00009 #define HTTPCONVERGENCELAYER_H_ 00010 00011 #include "Component.h" 00012 #include "net/ConvergenceLayer.h" 00013 #include <ibrcommon/Exceptions.h> 00014 #include <ibrcommon/net/vinterface.h> 00015 #include <ibrcommon/net/vaddress.h> 00016 #include <ibrcommon/thread/Mutex.h> 00017 #include <iostream> 00018 00019 namespace dtn 00020 { 00021 namespace net 00022 { 00023 class HTTPConvergenceLayer : public ConvergenceLayer, public dtn::daemon::IndependentComponent 00024 { 00025 public: 00026 HTTPConvergenceLayer(const std::string &server); 00027 virtual ~HTTPConvergenceLayer(); 00028 00029 dtn::core::Node::Protocol getDiscoveryProtocol() const; 00030 void queue(const dtn::core::Node &n, const ConvergenceLayer::Job &job); 00031 00035 virtual const std::string getName() const; 00036 00037 protected: 00038 virtual void componentUp(); 00039 virtual void componentRun(); 00040 virtual void componentDown(); 00041 bool __cancellation(); 00042 00043 private: 00044 ibrcommon::Mutex _write_lock; 00045 const std::string _server; 00046 }; 00047 } 00048 } 00049 00050 #endif /* HTTPCONVERGENCELAYER_H_ */
1.7.1