qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kp...@apache.org
Subject qpid-interop-test git commit: QPIDIT-21: Fixes to accomodate recent changes to the C++ Proton binding
Date Thu, 11 Feb 2016 16:31:10 GMT
Repository: qpid-interop-test
Updated Branches:
  refs/heads/master 62aaea888 -> 1ab3a142f


QPIDIT-21: Fixes to accomodate recent changes to the C++ Proton binding


Project: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/commit/1ab3a142
Tree: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/tree/1ab3a142
Diff: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/diff/1ab3a142

Branch: refs/heads/master
Commit: 1ab3a142f37478d20e0deb82590198c038fd3622
Parents: 62aaea8
Author: Kim van der Riet <kpvdr@apache.org>
Authored: Thu Feb 11 11:30:50 2016 -0500
Committer: Kim van der Riet <kpvdr@apache.org>
Committed: Thu Feb 11 11:30:50 2016 -0500

----------------------------------------------------------------------
 .../src/qpidit/shim/AmqpSender.cpp              | 21 ++++++++++---------
 .../src/qpidit/shim/JmsSender.cpp               | 22 ++++++++++----------
 2 files changed, 22 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/1ab3a142/shims/qpid-proton-cpp/src/qpidit/shim/AmqpSender.cpp
----------------------------------------------------------------------
diff --git a/shims/qpid-proton-cpp/src/qpidit/shim/AmqpSender.cpp b/shims/qpid-proton-cpp/src/qpidit/shim/AmqpSender.cpp
index 8b26726..138eb45 100644
--- a/shims/qpid-proton-cpp/src/qpidit/shim/AmqpSender.cpp
+++ b/shims/qpid-proton-cpp/src/qpidit/shim/AmqpSender.cpp
@@ -203,17 +203,18 @@ namespace qpidit
         proton::value AmqpSender::extractProtonValue(const Json::Value& val) {
             switch (val.type()) {
             case Json::nullValue:
-                return proton::amqp_null();
+                proton::amqp_null n;
+                return proton::value(n);
             case Json::intValue:
-                return proton::amqp_int(val.asInt());
+                return proton::value(proton::amqp_int(val.asInt()));
             case Json::uintValue:
-                return proton::amqp_uint(val.asUInt());
+                return proton::value(proton::amqp_uint(val.asUInt()));
             case Json::realValue:
-                return proton::amqp_double(val.asDouble());
+                return proton::value(proton::amqp_double(val.asDouble()));
             case Json::stringValue:
-                return proton::amqp_string(val.asString());
+                return proton::value(proton::amqp_string(val.asString()));
             case Json::booleanValue:
-                return proton::amqp_boolean(val.asBool());
+                return proton::value(proton::amqp_boolean(val.asBool()));
             default:;
             }
         }
@@ -233,11 +234,11 @@ namespace qpidit
                 if ((*i).isArray()) {
                     std::vector<proton::value> subArray;
                     processArray(subArray, *i);
-                    array.push_back(subArray);
+                    array.push_back(proton::value(subArray));
                 } else if ((*i).isObject()) {
                     std::map<std::string, proton::value> subMap;
                     processMap(subMap, *i);
-                    array.push_back(subMap);
+                    array.push_back(proton::value(subMap));
                 } else {
                     proton::value v;
                     if ((*i).isNull())
@@ -265,11 +266,11 @@ namespace qpidit
                 if ((*i).isArray()) {
                     std::vector<proton::value> subList;
                     processList(subList, *i);
-                    list.push_back(subList);
+                    list.push_back(proton::value(subList));
                 } else if ((*i).isObject()) {
                     std::map<std::string, proton::value> subMap;
                     processMap(subMap, *i);
-                    list.push_back(subMap);
+                    list.push_back(proton::value(subMap));
                 } else {
                     list.push_back(extractProtonValue(*i));
                 }

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/1ab3a142/shims/qpid-proton-cpp/src/qpidit/shim/JmsSender.cpp
----------------------------------------------------------------------
diff --git a/shims/qpid-proton-cpp/src/qpidit/shim/JmsSender.cpp b/shims/qpid-proton-cpp/src/qpidit/shim/JmsSender.cpp
index 5df15ac..24e954b 100644
--- a/shims/qpid-proton-cpp/src/qpidit/shim/JmsSender.cpp
+++ b/shims/qpid-proton-cpp/src/qpidit/shim/JmsSender.cpp
@@ -221,13 +221,13 @@ namespace qpidit
         proton::message& JmsSender::setStreamMessage(proton::message& msg, const
std::string& subType, const std::string& testValueStr) {
             std::vector<proton::value> l;
             if (subType.compare("boolean") == 0) {
-                if (testValueStr.compare("False") == 0) l.push_back(proton::amqp_boolean(false));
-                else if (testValueStr.compare("True") == 0) l.push_back(proton::amqp_boolean(true));
+                if (testValueStr.compare("False") == 0) l.push_back(proton::value(proton::amqp_boolean(false)));
+                else if (testValueStr.compare("True") == 0) l.push_back(proton::value(proton::amqp_boolean(true)));
                 else throw InvalidTestValueError(subType, testValueStr);
             } else if (subType.compare("byte") == 0) {
-                l.push_back(proton::amqp_byte(getIntegralValue<int8_t>(testValueStr)));
+                l.push_back(proton::value(proton::amqp_byte(getIntegralValue<int8_t>(testValueStr))));
             } else if (subType.compare("bytes") == 0) {
-                l.push_back(proton::amqp_binary(testValueStr));
+                l.push_back(proton::value(proton::amqp_binary(testValueStr)));
             } else if (subType.compare("char") == 0) {
                 wchar_t val;
                 if (testValueStr[0] == '\\') { // Format: '\xNN'
@@ -235,19 +235,19 @@ namespace qpidit
                 } else { // Format: 'c'
                     val = testValueStr[0];
                 }
-                l.push_back(proton::amqp_char(val));
+                l.push_back(proton::value(proton::amqp_char(val)));
             } else if (subType.compare("double") == 0) {
-                l.push_back(proton::amqp_double(getFloatValue<double, uint64_t>(testValueStr)));
+                l.push_back(proton::value(proton::amqp_double(getFloatValue<double, uint64_t>(testValueStr))));
             } else if (subType.compare("float") == 0) {
-                l.push_back(proton::amqp_float(getFloatValue<float, uint32_t>(testValueStr)));
+                l.push_back(proton::value(proton::amqp_float(getFloatValue<float, uint32_t>(testValueStr))));
             } else if (subType.compare("int") == 0) {
-                l.push_back(proton::amqp_int(getIntegralValue<int32_t>(testValueStr)));
+                l.push_back(proton::value(proton::amqp_int(getIntegralValue<int32_t>(testValueStr))));
             } else if (subType.compare("long") == 0) {
-                l.push_back(proton::amqp_long(getIntegralValue<int64_t>(testValueStr)));
+                l.push_back(proton::value(proton::amqp_long(getIntegralValue<int64_t>(testValueStr))));
             } else if (subType.compare("short") == 0) {
-                l.push_back(proton::amqp_short(getIntegralValue<int16_t>(testValueStr)));
+                l.push_back(proton::value(proton::amqp_short(getIntegralValue<int16_t>(testValueStr))));
             } else if (subType.compare("string") == 0) {
-                l.push_back(proton::amqp_string(testValueStr));
+                l.push_back(proton::value(proton::amqp_string(testValueStr)));
             } else {
                 throw qpidit::UnknownJmsMessageSubTypeError(subType);
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message