From 6fbc5fc019402cf53bd3ef960660b58511943a81 Mon Sep 17 00:00:00 2001 From: Jonathan Robie Date: Fri, 5 Mar 2010 21:51:53 +0000 Subject: Modified to either support the older XQilla 2.1.3 API or to use xqilla/ast/XQEffectiveBooleanValue.hpp, depending on a constant set in configure.ac. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@919631 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/xml/XmlExchange.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/xml/XmlExchange.cpp') diff --git a/cpp/src/qpid/xml/XmlExchange.cpp b/cpp/src/qpid/xml/XmlExchange.cpp index 6771767969..4cc0767377 100644 --- a/cpp/src/qpid/xml/XmlExchange.cpp +++ b/cpp/src/qpid/xml/XmlExchange.cpp @@ -34,6 +34,10 @@ #include +#ifndef XQILLA_2_1_3 +#include +#endif + #include #include @@ -51,7 +55,7 @@ namespace qpid { namespace broker { - XmlExchange::XmlExchange(const string& _name, Manageable* _parent, Broker* b) : Exchange(_name, _parent, b) +XmlExchange::XmlExchange(const string& _name, Manageable* _parent, Broker* b) : Exchange(_name, _parent, b) { if (mgmtExchange != 0) mgmtExchange->set_type (typeName); @@ -180,7 +184,13 @@ bool XmlExchange::matches(Query& query, Deliverable& msg, const qpid::framing::F } Result result = query->execute(context.get()); +#ifndef XQILLA_BEFORE_2_2_3 + Item::Ptr first_ = result->next(context.get()); + Item::Ptr second_ = result->next(context.get()); + return XQEffectiveBooleanValue::get(first_, second_, context.get(), 0); +#else return result->getEffectiveBooleanValue(context.get(), 0); +#endif } catch (XQException& e) { QPID_LOG(warning, "Could not parse XML content (or message headers):" << msgContent); -- cgit v1.2.1