qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [1/2] qpid-proton git commit: Revert PROTON-1703: [cpp] Remove auto_settle from receiver_options
Date Tue, 19 Dec 2017 19:13:22 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 38afef9d2 -> 3311dd602


Revert PROTON-1703: [cpp] Remove auto_settle from receiver_options

Reverted the change for binary compatibility but deprecated auto_settle
since it is a no-op on receiver. To remove at next major revision.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/b9f94025
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/b9f94025
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/b9f94025

Branch: refs/heads/master
Commit: b9f9402598171602ed7d3c6f7dd410906d1d0684
Parents: 38afef9
Author: Alan Conway <aconway@redhat.com>
Authored: Tue Dec 19 13:43:25 2017 -0500
Committer: Alan Conway <aconway@redhat.com>
Committed: Tue Dec 19 13:50:00 2017 -0500

----------------------------------------------------------------------
 proton-c/bindings/cpp/include/proton/receiver_options.hpp | 3 +++
 proton-c/bindings/cpp/src/receiver_options.cpp            | 7 +++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b9f94025/proton-c/bindings/cpp/include/proton/receiver_options.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/receiver_options.hpp b/proton-c/bindings/cpp/include/proton/receiver_options.hpp
index 049fe86..2213f88 100644
--- a/proton-c/bindings/cpp/include/proton/receiver_options.hpp
+++ b/proton-c/bindings/cpp/include/proton/receiver_options.hpp
@@ -83,6 +83,9 @@ class receiver_options {
     /// default.
     PN_CPP_EXTERN receiver_options& auto_accept(bool);
 
+    /// @deprecated not applicable to receiver, only to sender
+    PN_CPP_EXTERN receiver_options& auto_settle(bool);
+
     /// Options for the source node of the receiver.
     PN_CPP_EXTERN receiver_options& source(source_options&);
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b9f94025/proton-c/bindings/cpp/src/receiver_options.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/receiver_options.cpp b/proton-c/bindings/cpp/src/receiver_options.cpp
index 96e2ffa..cb4ac05 100644
--- a/proton-c/bindings/cpp/src/receiver_options.cpp
+++ b/proton-c/bindings/cpp/src/receiver_options.cpp
@@ -65,6 +65,7 @@ class receiver_options::impl {
     option<messaging_handler*> handler;
     option<proton::delivery_mode> delivery_mode;
     option<bool> auto_accept;
+    option<bool> auto_settle;
     option<int> credit_window;
     option<bool> dynamic_address;
     option<source_options> source;
@@ -76,6 +77,7 @@ class receiver_options::impl {
         if (r.uninitialized()) {
             if (delivery_mode.set) set_delivery_mode(r, delivery_mode.value);
             if (handler.set && handler.value) container::impl::set_handler(r, handler.value);
+            if (auto_settle.set) get_context(r).auto_settle = auto_settle.value;
             if (auto_accept.set) get_context(r).auto_accept = auto_accept.value;
             if (credit_window.set) get_context(r).credit_window = credit_window.value;
 
@@ -94,6 +96,7 @@ class receiver_options::impl {
         handler.update(x.handler);
         delivery_mode.update(x.delivery_mode);
         auto_accept.update(x.auto_accept);
+        auto_settle.update(x.auto_settle);
         credit_window.update(x.credit_window);
         dynamic_address.update(x.dynamic_address);
         source.update(x.source);
@@ -128,4 +131,8 @@ void receiver_options::apply(receiver& r) const { impl_->apply(r);
}
 const std::string* receiver_options::get_name() const {
     return impl_->name.set ? &impl_->name.value : 0;
 }
+
+// No-op, kept for binary compat but auto_settle is not relevant to receiver only sender.
+receiver_options& receiver_options::auto_settle(bool b) { return *this; }
+
 } // namespace proton


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


Mime
View raw message