diff options
| author | Alan Conway <aconway@apache.org> | 2007-04-04 15:45:37 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-04-04 15:45:37 +0000 |
| commit | eca38193ce566223a713185f505ff49f921535b3 (patch) | |
| tree | 6fd4e58f2f9ffc43d8c4ac2ab6dec7dd2729eda3 /qpid/cpp/src/client/ClientChannel.cpp | |
| parent | c378f175f08edf5d7e72e99dd604a1ba8c8e7167 (diff) | |
| download | qpid-python-eca38193ce566223a713185f505ff49f921535b3.tar.gz | |
* Made client::Channel bi-modal: 0-8 or 0-9 modes.
* Added dummy impl of client::MessageMessageChannel.
* Generalised ClientChannelTest to be able to test both modes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@525542 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/client/ClientChannel.cpp')
| -rw-r--r-- | qpid/cpp/src/client/ClientChannel.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/qpid/cpp/src/client/ClientChannel.cpp b/qpid/cpp/src/client/ClientChannel.cpp index eda872fc30..99eece46bc 100644 --- a/qpid/cpp/src/client/ClientChannel.cpp +++ b/qpid/cpp/src/client/ClientChannel.cpp @@ -26,8 +26,7 @@ #include "MethodBodyInstances.h" #include "Connection.h" #include "BasicMessageChannel.h" -// FIXME aconway 2007-03-21: -//#include "MessageMessageChannel.h" +#include "MessageMessageChannel.h" // FIXME aconway 2007-01-26: Evaluate all throws, ensure consistent // handling of errors that should close the connection or the channel. @@ -39,14 +38,15 @@ using namespace qpid::client; using namespace qpid::framing; using namespace qpid::sys; -Channel::Channel(bool _transactional, u_int16_t _prefetch, - MessageChannel* impl) : - // FIXME aconway 2007-03-21: MessageMessageChannel - messaging(impl ? impl : new BasicMessageChannel(*this)), - connection(0), - prefetch(_prefetch), - transactional(_transactional) -{ } +Channel::Channel(bool _transactional, u_int16_t _prefetch, InteropMode mode) : + connection(0), prefetch(_prefetch), transactional(_transactional) +{ + switch (mode) { + case AMQP_08: messaging.reset(new BasicMessageChannel(*this)); break; + case AMQP_09: messaging.reset(new MessageMessageChannel(*this)); break; + default: assert(0); QPID_ERROR(INTERNAL_ERROR, "Invalid interop-mode."); + } +} Channel::~Channel(){ close(); |
