diff options
author | Alan Conway <aconway@apache.org> | 2007-10-29 18:35:29 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-10-29 18:35:29 +0000 |
commit | 505c43651b302ecf773bff1fcf3d45f5a1aef682 (patch) | |
tree | d1548a878fd1186f5a4d317ea624336760af8e98 /cpp/src | |
parent | 0fb42a897731efaea3dcb8c4238707f38c0d4d3e (diff) | |
download | qpid-python-505c43651b302ecf773bff1fcf3d45f5a1aef682.tar.gz |
Rename client::Session as client::Session_0_10
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@589794 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/client/Channel.cpp | 6 | ||||
-rw-r--r-- | cpp/src/qpid/client/Channel.h | 6 | ||||
-rw-r--r-- | cpp/src/qpid/client/Connection.cpp | 6 | ||||
-rw-r--r-- | cpp/src/qpid/client/Connection.h | 6 | ||||
-rw-r--r-- | cpp/src/qpid/client/Dispatcher.cpp | 6 | ||||
-rw-r--r-- | cpp/src/qpid/client/Dispatcher.h | 10 | ||||
-rw-r--r-- | cpp/src/qpid/client/Message.h | 4 | ||||
-rw-r--r-- | cpp/src/tests/ClientSessionTest.cpp | 6 |
8 files changed, 25 insertions, 25 deletions
diff --git a/cpp/src/qpid/client/Channel.cpp b/cpp/src/qpid/client/Channel.cpp index 16e0428a56..8b7b7e1118 100644 --- a/cpp/src/qpid/client/Channel.cpp +++ b/cpp/src/qpid/client/Channel.cpp @@ -49,9 +49,9 @@ const std::string empty; class ScopedSync { - Session& session; + Session_0_10& session; public: - ScopedSync(Session& s, bool enabled = true) : session(s) { session.setSynchronous(enabled); } + ScopedSync(Session_0_10& s, bool enabled = true) : session(s) { session.setSynchronous(enabled); } ~ScopedSync() { session.setSynchronous(false); } }; @@ -66,7 +66,7 @@ Channel::~Channel() join(); } -void Channel::open(const Session& s) +void Channel::open(const Session_0_10& s) { Mutex::ScopedLock l(stopLock); if (isOpen()) diff --git a/cpp/src/qpid/client/Channel.h b/cpp/src/qpid/client/Channel.h index bf0b289077..19a3a2de8c 100644 --- a/cpp/src/qpid/client/Channel.h +++ b/cpp/src/qpid/client/Channel.h @@ -29,7 +29,7 @@ #include "Message.h" #include "Queue.h" #include "ConnectionImpl.h" -#include "qpid/client/Session.h" +#include "qpid/client/Session_0_10.h" #include "qpid/Exception.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Runnable.h" @@ -78,7 +78,7 @@ class Channel : private sys::Runnable bool running; ConsumerMap consumers; - Session session; + Session_0_10 session; framing::ChannelId channelId; BlockingQueue<framing::FrameSet::shared_ptr> gets; framing::Uuid uniqueId; @@ -87,7 +87,7 @@ class Channel : private sys::Runnable void stop(); - void open(const Session& session); + void open(const Session_0_10& session); void closeInternal(); void join(); diff --git a/cpp/src/qpid/client/Connection.cpp b/cpp/src/qpid/client/Connection.cpp index 932fab8881..3210b29104 100644 --- a/cpp/src/qpid/client/Connection.cpp +++ b/cpp/src/qpid/client/Connection.cpp @@ -73,15 +73,15 @@ void Connection::openChannel(Channel& channel) { channel.open(newSession()); } -Session Connection::newSession(uint32_t detachedLifetime) { +Session_0_10 Connection::newSession(uint32_t detachedLifetime) { shared_ptr<SessionCore> core( new SessionCore(impl, ++channelIdCounter, max_frame_size)); impl->addSession(core); core->open(detachedLifetime); - return Session(core); + return Session_0_10(core); } -void Connection::resume(Session& session) { +void Connection::resume(Session_0_10& session) { session.impl->setChannel(++channelIdCounter); impl->addSession(session.impl); session.impl->resume(impl); diff --git a/cpp/src/qpid/client/Connection.h b/cpp/src/qpid/client/Connection.h index d2612ca754..32b2200f25 100644 --- a/cpp/src/qpid/client/Connection.h +++ b/cpp/src/qpid/client/Connection.h @@ -25,7 +25,7 @@ #include <string> #include "Channel.h" #include "ConnectionImpl.h" -#include "qpid/client/Session.h" +#include "qpid/client/Session_0_10.h" #include "qpid/framing/AMQP_HighestVersion.h" #include "qpid/framing/Uuid.h" @@ -135,13 +135,13 @@ class Connection * that the broker may discard the session state. Default is 0, * meaning the session cannot be resumed. */ - Session newSession(uint32_t detachedLifetime=0); + Session_0_10 newSession(uint32_t detachedLifetime=0); /** * Resume a suspendded session. A session may be resumed * on a different connection to the one that created it. */ - void resume(Session& session); + void resume(Session_0_10& session); }; }} // namespace qpid::client diff --git a/cpp/src/qpid/client/Dispatcher.cpp b/cpp/src/qpid/client/Dispatcher.cpp index 5c3c85343e..ea6fcfb463 100644 --- a/cpp/src/qpid/client/Dispatcher.cpp +++ b/cpp/src/qpid/client/Dispatcher.cpp @@ -20,7 +20,7 @@ */ #include "Dispatcher.h" -#include "qpid/client/Session.h" +#include "qpid/client/Session_0_10.h" #include "qpid/framing/FrameSet.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/log/Statement.h" @@ -36,7 +36,7 @@ using qpid::sys::Thread; namespace qpid { namespace client { - Subscriber::Subscriber(Session& s, MessageListener* l, bool a, uint f) : session(s), listener(l), autoAck(a), ackBatchSize(f), count(0) {} + Subscriber::Subscriber(Session_0_10& s, MessageListener* l, bool a, uint f) : session(s), listener(l), autoAck(a), ackBatchSize(f), count(0) {} void Subscriber::received(Message& msg) { @@ -51,7 +51,7 @@ void Subscriber::received(Message& msg) } - Dispatcher::Dispatcher(Session& s, const std::string& q) : session(s), queue(q), running(false), stopped(false) + Dispatcher::Dispatcher(Session_0_10& s, const std::string& q) : session(s), queue(q), running(false), stopped(false) { } diff --git a/cpp/src/qpid/client/Dispatcher.h b/cpp/src/qpid/client/Dispatcher.h index 1d1d9141e3..550ba36ef5 100644 --- a/cpp/src/qpid/client/Dispatcher.h +++ b/cpp/src/qpid/client/Dispatcher.h @@ -33,11 +33,11 @@ namespace qpid { namespace client { -class Session; +class Session_0_10; class Subscriber : public MessageListener { - Session& session; + Session_0_10& session; MessageListener* const listener; const bool autoAck; const uint ackBatchSize; @@ -45,7 +45,7 @@ class Subscriber : public MessageListener public: typedef boost::shared_ptr<Subscriber> shared_ptr; - Subscriber(Session& session, MessageListener* listener, bool autoAck = true, uint ackBatchSize = 1); + Subscriber(Session_0_10& session, MessageListener* listener, bool autoAck = true, uint ackBatchSize = 1); void received(Message& msg); }; @@ -57,7 +57,7 @@ class Dispatcher : public sys::Runnable typedef std::map<std::string, Subscriber::shared_ptr> Listeners; sys::Mutex lock; sys::Thread worker; - Session& session; + Session_0_10& session; const std::string queue; bool running; bool stopped; @@ -71,7 +71,7 @@ class Dispatcher : public sys::Runnable bool isStopped(); public: - Dispatcher(Session& session, const std::string& queue = ""); + Dispatcher(Session_0_10& session, const std::string& queue = ""); void start(); void run(); diff --git a/cpp/src/qpid/client/Message.h b/cpp/src/qpid/client/Message.h index 1fc199e8d8..655fc89457 100644 --- a/cpp/src/qpid/client/Message.h +++ b/cpp/src/qpid/client/Message.h @@ -22,7 +22,7 @@ * */ #include <string> -#include "qpid/client/Session.h" +#include "qpid/client/Session_0_10.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/TransferContent.h" @@ -60,7 +60,7 @@ public: return getMessageProperties().getApplicationHeaders(); } - void acknowledge(Session& session, bool cumulative = true, bool send = true) const + void acknowledge(Session_0_10& session, bool cumulative = true, bool send = true) const { session.execution().completed(id, cumulative, send); } diff --git a/cpp/src/tests/ClientSessionTest.cpp b/cpp/src/tests/ClientSessionTest.cpp index db2cd62b0a..149cbd8e3d 100644 --- a/cpp/src/tests/ClientSessionTest.cpp +++ b/cpp/src/tests/ClientSessionTest.cpp @@ -21,7 +21,7 @@ #include "qpid_test_plugin.h" #include "InProcessBroker.h" #include "qpid/client/Dispatcher.h" -#include "qpid/client/Session.h" +#include "qpid/client/Session_0_10.h" #include "qpid/framing/TransferContent.h" #include "qpid/framing/reply_exceptions.h" @@ -42,7 +42,7 @@ struct DummyListener : public MessageListener uint count; Dispatcher dispatcher; - DummyListener(Session& session, const std::string& _name, uint _expected) : name(_name), expected(_expected), count(0), + DummyListener(Session_0_10& session, const std::string& _name, uint _expected) : name(_name), expected(_expected), count(0), dispatcher(session) {} void listen() @@ -74,7 +74,7 @@ class ClientSessionTest : public CppUnit::TestCase CPPUNIT_TEST_SUITE_END(); shared_ptr<broker::Broker> broker; - Session session; + Session_0_10 session; // Defer construction & thread creation to setUp boost::optional<InProcessConnection> c; boost::optional<InProcessConnection> c2; |