Port to verion 1.39.0 of Boost
[Arachnida.git] / lib / Damon / Session.h
blobb67cee76628f04e30a397c2aa78a7136e0d585df
1 #ifndef damon_session_h
2 #define damon_session_h
4 #include "Details/prologue.h"
5 #include <map>
6 #include <vector>
7 #include <boost/shared_ptr.hpp>
8 #include <boost/noncopyable.hpp>
10 namespace Spin { class Connection; }
11 namespace Scorpion { class Context; }
12 namespace Damon
14 struct Response;
15 class Request;
17 class DAMON_API Session : boost::noncopyable
19 public :
20 Session();
21 ~Session();
23 void setContext(const Scorpion::Context & context);
25 private :
26 typedef std::map< std::string, boost::shared_ptr< Spin::Connection > > ConnectionCache_;
28 Scorpion::Context * context_;
29 ConnectionCache_ connection_cache_;
31 friend DAMON_API Response send(Session & /*session*/, const Request &/* request*/);
32 friend DAMON_API std::vector< Response > send(Session & /*session*/, const std::vector< Request > & requests);
36 #endif