diff options
author | Gordon Sim <gsim@apache.org> | 2007-09-10 18:37:36 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-09-10 18:37:36 +0000 |
commit | fbda2ac45519f7108fc48f483d76d1487c2b3544 (patch) | |
tree | 08a3fc85a9730b42892f3075e18855421b378299 /cpp/src/qpid/client/ClientChannel.cpp | |
parent | 002b38eecc23c7e9be56fbab0b643829acbb4bb8 (diff) | |
download | qpid-python-fbda2ac45519f7108fc48f483d76d1487c2b3544.tar.gz |
Support for keyword args in session interface
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@574323 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ClientChannel.cpp')
-rw-r--r-- | cpp/src/qpid/client/ClientChannel.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/cpp/src/qpid/client/ClientChannel.cpp b/cpp/src/qpid/client/ClientChannel.cpp index 1a0fd25bc3..b77840f433 100644 --- a/cpp/src/qpid/client/ClientChannel.cpp +++ b/cpp/src/qpid/client/ClientChannel.cpp @@ -80,7 +80,7 @@ bool Channel::isOpen() const { } void Channel::setQos() { - session.basicQos(0, getPrefetch(), false); + session.basicQos((prefetchCount=getPrefetch(), global=false)); if(isTransactional()) { //I think this is wrong! should only send TxSelect once... session.txSelect(); @@ -92,34 +92,32 @@ void Channel::setPrefetch(uint16_t _prefetch){ setQos(); } -void Channel::declareExchange(Exchange& exchange, bool synch){ - FieldTable args; +void Channel::declareExchange(Exchange& _exchange, bool synch){ ScopedSync s(session, synch); - session.exchangeDeclare(0, exchange.getName(), exchange.getType(), empty, false, false, false, args); + session.exchangeDeclare((exchange=_exchange.getName(), type=_exchange.getType())); } -void Channel::deleteExchange(Exchange& exchange, bool synch){ +void Channel::deleteExchange(Exchange& _exchange, bool synch){ ScopedSync s(session, synch); - session.exchangeDelete(0, exchange.getName(), false); + session.exchangeDelete((exchange=_exchange.getName(), ifUnused=false)); } -void Channel::declareQueue(Queue& queue, bool synch){ - if (queue.getName().empty()) { +void Channel::declareQueue(Queue& _queue, bool synch){ + if (_queue.getName().empty()) { stringstream uniqueName; uniqueName << uniqueId << "-queue-" << ++nameCounter; - queue.setName(uniqueName.str()); + _queue.setName(uniqueName.str()); } - FieldTable args; ScopedSync s(session, synch); - session.queueDeclare(0, queue.getName(), empty, false/*passive*/, queue.isDurable(), - queue.isExclusive(), queue.isAutoDelete(), args); + session.queueDeclare((queue=_queue.getName(), passive=false/*passive*/, durable=_queue.isDurable(), + exclusive=_queue.isExclusive(), autoDelete=_queue.isAutoDelete())); } -void Channel::deleteQueue(Queue& queue, bool ifunused, bool ifempty, bool synch){ +void Channel::deleteQueue(Queue& _queue, bool ifunused, bool ifempty, bool synch){ ScopedSync s(session, synch); - session.queueDelete(0, queue.getName(), ifunused, ifempty); + session.queueDelete((queue=_queue.getName(), ifUnused=ifunused, ifEmpty=ifempty)); } void Channel::bind(const Exchange& exchange, const Queue& queue, const std::string& key, const FieldTable& args, bool synch){ |