From 8b82aef0397d65de0c7278476e4f409fcc636306 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 28 Sep 2007 16:21:34 +0000 Subject: * src/tests/ClientSessionTest.cpp: Suspend/resume tests. * broker/SessionManager.cpp, broker/SessionHandler.cpp: Implement suspend/resume * client/ScopedAssociation.h, SessionCore.h, SessionHandler.h: Simplified relationships. - Removed ScopedAssociation. - SessionHandler: is now a member of SessionCore. - SessionCore: shared_ptr ownership by Session(s) and ConnectionImpl. - Using framing::FrameHandler interfaces. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@580403 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/ConnectionImpl.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'cpp/src/qpid/client/ConnectionImpl.h') diff --git a/cpp/src/qpid/client/ConnectionImpl.h b/cpp/src/qpid/client/ConnectionImpl.h index fc786ba643..975beaa101 100644 --- a/cpp/src/qpid/client/ConnectionImpl.h +++ b/cpp/src/qpid/client/ConnectionImpl.h @@ -30,17 +30,18 @@ #include "qpid/sys/TimeoutHandler.h" #include "ConnectionHandler.h" #include "Connector.h" -#include "SessionCore.h" namespace qpid { namespace client { +class SessionCore; + class ConnectionImpl : public framing::FrameHandler, - public sys::TimeoutHandler, - public sys::ShutdownHandler + public sys::TimeoutHandler, + public sys::ShutdownHandler { - typedef std::map SessionMap; + typedef std::map > SessionMap; SessionMap sessions; ConnectionHandler handler; boost::shared_ptr connector; @@ -56,14 +57,12 @@ class ConnectionImpl : public framing::FrameHandler, void shutdown(); void signalClose(uint16_t, const std::string&); void assertNotClosed(); - SessionCore::shared_ptr find(uint16_t); - public: typedef boost::shared_ptr shared_ptr; ConnectionImpl(boost::shared_ptr c); - void allocated(SessionCore::shared_ptr); - void released(SessionCore::shared_ptr); + void addSession(const boost::shared_ptr&); + void open(const std::string& host, int port = 5672, const std::string& uid = "guest", const std::string& pwd = "guest", -- cgit v1.2.1