diff options
| author | Gordon Sim <gsim@apache.org> | 2008-02-19 16:02:25 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-02-19 16:02:25 +0000 |
| commit | 321153d64eccde228d4dd8d9c9833e2b259d8c05 (patch) | |
| tree | b389cffb773fa032be18c68772acc6b78cbabde9 /cpp | |
| parent | 4351730550bc48c4237de4e616f8e420e084c081 (diff) | |
| download | qpid-python-321153d64eccde228d4dd8d9c9833e2b259d8c05.tar.gz | |
Moved c++ to 0-9, based on a spec file with all the WIP stuff removed manually to avoid having to tinker with generator to exclude it.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1@629137 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/gen/Makefile.am | 4 | ||||
| -rw-r--r-- | cpp/lib/broker/SessionHandlerImpl.cpp | 27 | ||||
| -rw-r--r-- | cpp/lib/broker/SessionHandlerImpl.h | 15 | ||||
| -rwxr-xr-x | cpp/tests/run-python-tests | 2 |
4 files changed, 37 insertions, 11 deletions
diff --git a/cpp/gen/Makefile.am b/cpp/gen/Makefile.am index 61ec38bbaa..dc63c8005e 100644 --- a/cpp/gen/Makefile.am +++ b/cpp/gen/Makefile.am @@ -35,7 +35,7 @@ if CAN_GENERATE_CODE gentools_dir = $(srcdir)/../../gentools spec_dir = $(srcdir)/../../specs -spec = $(spec_dir)/amqp.0-8.xml +spec = $(spec_dir)/amqp.0-9.no-wip.xml gentools_srcdir = $(gentools_dir)/src/org/apache/qpid/gentools gentools_libs = $(gentools_dir)/lib/velocity-1.4.jar:$(gentools_dir)/lib/velocity-dep-1.4.jar @@ -45,8 +45,6 @@ $(BUILT_SOURCES) timestamp: $(spec) $(java_sources) $(cxx_templates) $(JAVAC) -cp $(gentools_libs) -sourcepath $(gentools_srcdir) -d $(gentools_dir)/src $(gentools_srcdir)/*.java $(JAVA) -cp $(gentools_dir)/src:$(gentools_libs) org.apache.qpid.gentools.Main \ -c -o . -t $(gentools_dir)/templ.cpp $(spec) - echo $(JAVA) -cp $(gentools_dir)/src:$(gentools_libs) org.apache.qpid.gentools.Main \ - -c -o . -t $(gentools_dir)/templ.cpp $(spec) >> debug touch timestamp gen-src.mk: timestamp diff --git a/cpp/lib/broker/SessionHandlerImpl.cpp b/cpp/lib/broker/SessionHandlerImpl.cpp index b23432e29d..d1b1d996a4 100644 --- a/cpp/lib/broker/SessionHandlerImpl.cpp +++ b/cpp/lib/broker/SessionHandlerImpl.cpp @@ -223,7 +223,7 @@ void SessionHandlerImpl::ChannelHandlerImpl::open(u_int16_t channel, const strin if (parent->channels[channel] == 0) { parent->channels[channel] = new Channel(parent->client->getProtocolVersion() , parent->context, channel, parent->framemax, parent->queues->getStore(), parent->settings.stagingThreshold); - parent->client->getChannel().openOk(channel); + parent->client->getChannel().openOk(channel, ""); } else { std::stringstream out; out << "Channel already open: " << channel; @@ -337,6 +337,25 @@ void SessionHandlerImpl::QueueHandlerImpl::bind(u_int16_t channel, u_int16_t /*t } } + +void SessionHandlerImpl::QueueHandlerImpl::unbind(u_int16_t channel, + u_int16_t /*ticket*/, + const string& queueName, + const string& exchangeName, + const string& routingKey, + const FieldTable& arguments) +{ + Queue::shared_ptr queue = parent->getQueue(queueName, channel); + Exchange::shared_ptr exchange = parent->exchanges->get(exchangeName); + if(exchange){ + exchange->unbind(queue, routingKey, &arguments); + }else{ + throw ChannelException(404, "Unbind failed. No such exchange: " + exchangeName); + } + + parent->client->getQueue().unbindOk(channel); +} + void SessionHandlerImpl::QueueHandlerImpl::purge(u_int16_t channel, u_int16_t /*ticket*/, const string& queueName, bool nowait){ Queue::shared_ptr queue = parent->getQueue(queueName, channel); @@ -446,7 +465,11 @@ void SessionHandlerImpl::BasicHandlerImpl::reject(u_int16_t /*channel*/, u_int64 void SessionHandlerImpl::BasicHandlerImpl::recover(u_int16_t channel, bool requeue){ parent->getChannel(channel)->recover(requeue); - parent->client->getBasic().recoverOk(channel); +} + +void SessionHandlerImpl::BasicHandlerImpl::recoverSync(u_int16_t channel, bool requeue){ + parent->getChannel(channel)->recover(requeue); + parent->client->getBasic().recoverSyncOk(channel); } void SessionHandlerImpl::TxHandlerImpl::select(u_int16_t channel){ diff --git a/cpp/lib/broker/SessionHandlerImpl.h b/cpp/lib/broker/SessionHandlerImpl.h index 92aa0ff456..1d81b6503f 100644 --- a/cpp/lib/broker/SessionHandlerImpl.h +++ b/cpp/lib/broker/SessionHandlerImpl.h @@ -162,7 +162,7 @@ class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, u_int16_t classId, u_int16_t methodId); virtual void closeOk(u_int16_t channel); - + virtual ~ChannelHandlerImpl(){} }; @@ -200,6 +200,13 @@ class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, const string& exchange, const string& routingKey, bool nowait, const qpid::framing::FieldTable& arguments); + virtual void unbind(u_int16_t channel, + u_int16_t ticket, + const string& queue, + const string& exchange, + const string& routingKey, + const framing::FieldTable& arguments); + virtual void purge(u_int16_t channel, u_int16_t ticket, const string& queue, bool nowait); @@ -235,6 +242,8 @@ class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, virtual void reject(u_int16_t channel, u_int64_t deliveryTag, bool requeue); virtual void recover(u_int16_t channel, bool requeue); + + virtual void recoverSync(u_int16_t channel, bool requeue); virtual ~BasicHandlerImpl(){} }; @@ -262,10 +271,6 @@ class SessionHandlerImpl : public virtual qpid::sys::SessionHandler, inline virtual StreamHandler* getStreamHandler(){ throw ConnectionException(540, "Stream class not implemented"); } inline virtual DtxHandler* getDtxHandler(){ throw ConnectionException(540, "Dtx class not implemented"); } inline virtual TunnelHandler* getTunnelHandler(){ throw ConnectionException(540, "Tunnel class not implemented"); } - - // Temporary add-in to resolve version conflicts: AMQP v8.0 still defines class Test; - // however v0.9 will not - kpvdr 2006-11-17 - inline virtual TestHandler* getTestHandler(){ throw ConnectionException(540, "Test class not implemented"); } }; } diff --git a/cpp/tests/run-python-tests b/cpp/tests/run-python-tests index 5148f644eb..e2e45f9ea9 100755 --- a/cpp/tests/run-python-tests +++ b/cpp/tests/run-python-tests @@ -41,7 +41,7 @@ sleep 4 # Run the tests. ( cd $abs_srcdir/../../python \ - && python ./run-tests -v -I cpp_failing.txt ) || fail=1 + && python ./run-tests -v -I cpp_failing.txt -s ../specs/amqp.0-9.no-wip.xml ) || fail=1 kill $pid || { echo FAIL: process already died; cat log; fail=1; } |
