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 | 4384b532eda0c030fec237083abdf3e1b1dec7e5 (patch) | |
tree | ff20013c19f52bbcfaa4ee5cf52934b00ccc93f9 /qpid/cpp/src | |
parent | 9e405ce51ac2b1484556bcaf760151a25fd0ea8b (diff) | |
download | qpid-python-4384b532eda0c030fec237083abdf3e1b1dec7e5.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@919631 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r-- | qpid/cpp/src/qpid/xml/XmlExchange.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/xml/XmlExchange.cpp b/qpid/cpp/src/qpid/xml/XmlExchange.cpp index 6771767969..4cc0767377 100644 --- a/qpid/cpp/src/qpid/xml/XmlExchange.cpp +++ b/qpid/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); |