diff options
author | Jonathan Robie <jonathan@apache.org> | 2010-03-05 21:51:53 +0000 |
---|---|---|
committer | Jonathan Robie <jonathan@apache.org> | 2010-03-05 21:51:53 +0000 |
commit | 6fbc5fc019402cf53bd3ef960660b58511943a81 (patch) | |
tree | e6920b3409a13fb619a13f8d7f6ce442912db94a /cpp | |
parent | 0c680d094fe9090fd60d7a76dd86416234547733 (diff) | |
download | qpid-python-6fbc5fc019402cf53bd3ef960660b58511943a81.tar.gz |
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
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/xml/XmlExchange.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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 <xercesc/framework/MemBufInputSource.hpp> +#ifndef XQILLA_2_1_3 +#include <xqilla/ast/XQEffectiveBooleanValue.hpp> +#endif + #include <xqilla/ast/XQGlobalVariable.hpp> #include <xqilla/context/ItemFactory.hpp> @@ -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); |