summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-03-07 19:07:32 +0000
committerGordon Sim <gsim@apache.org>2008-03-07 19:07:32 +0000
commit8f4d89dccf62bc6a0a41d9221049b136611e92dc (patch)
treebeb6def1c353198b6438e25bfaca4c0bf85d8d0b /qpid/cpp
parentc8c75599115f4c8e8d610f16aaee77f1aed9324c (diff)
downloadqpid-python-8f4d89dccf62bc6a0a41d9221049b136611e92dc.tar.gz
Added acquire impl to final 0-10 codepath
Converted some more python tests git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@634780 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/broker/SessionAdapter.cpp16
-rw-r--r--qpid/cpp/src/qpid/broker/SessionAdapter.h2
-rw-r--r--qpid/cpp/xml/extra.xml11
3 files changed, 22 insertions, 7 deletions
diff --git a/qpid/cpp/src/qpid/broker/SessionAdapter.cpp b/qpid/cpp/src/qpid/broker/SessionAdapter.cpp
index c4ee6d9ec1..663565c26c 100644
--- a/qpid/cpp/src/qpid/broker/SessionAdapter.cpp
+++ b/qpid/cpp/src/qpid/broker/SessionAdapter.cpp
@@ -367,16 +367,20 @@ void SessionAdapter::MessageHandlerImpl::accept(const framing::SequenceSet& comm
commands.for_each(acceptOp);
}
-/*
-void SessionAdapter::MessageHandlerImpl::acquire(const SequenceSet& transfers)
+framing::Message010AcquireResult SessionAdapter::MessageHandlerImpl::acquire(const framing::SequenceSet& transfers)
{
+ //TODO: change this when SequenceNumberSet is deleted along with preview code
SequenceNumberSet results;
- RangedOperation op = boost::bind(&SemanticState::acquire, &state, _1, _2, boost::ref(results));
- transfers.processRanges(op);
+ RangedOperation f = boost::bind(&SemanticState::acquire, &state, _1, _2, boost::ref(results));
+ transfers.for_each(f);
+
results = results.condense();
- getProxy().getMessage().acquired(results);
+ SequenceSet acquisitions;
+ RangedOperation g = boost::bind(&SequenceSet::add, &acquisitions, _1, _2);
+ results.processRanges(g);
+
+ return Message010AcquireResult(acquisitions);
}
-*/
void SessionAdapter::ExecutionHandlerImpl::sync()
diff --git a/qpid/cpp/src/qpid/broker/SessionAdapter.h b/qpid/cpp/src/qpid/broker/SessionAdapter.h
index c2d61392d7..23cc1beb93 100644
--- a/qpid/cpp/src/qpid/broker/SessionAdapter.h
+++ b/qpid/cpp/src/qpid/broker/SessionAdapter.h
@@ -149,6 +149,8 @@ class SessionAdapter : public HandlerImpl, public framing::AMQP_ServerOperations
void release(const framing::SequenceSet& commands,
bool setRedelivered);
+ framing::Message010AcquireResult acquire(const framing::SequenceSet&);
+
void subscribe(const string& queue,
const string& destination,
uint8_t acceptMode,
diff --git a/qpid/cpp/xml/extra.xml b/qpid/cpp/xml/extra.xml
index f8bd7688b4..23df91e492 100644
--- a/qpid/cpp/xml/extra.xml
+++ b/qpid/cpp/xml/extra.xml
@@ -670,7 +670,16 @@
<field name="commands" domain="sequence-set"/>
<field name="set-redelivered" domain="bit"/>
</method>
-
+ <method name = "acquire" index="5">
+ <doc>blah, blah</doc>
+ <chassis name="server" implement="MUST" />
+ <field name="transfers" domain="sequence-set"/>
+ <result>
+ <struct size="long" type="4">
+ <field name="transfers" domain="sequence-set"/>
+ </struct>
+ </result>
+ </method>
<method name = "subscribe" index="7">
<doc>blah, blah</doc>