Repository: qpid-proton
Updated Branches:
  refs/heads/master 04e948972 -> c63b2bea6


PROTON-1138: C++ handler options, Visual Studio fix for f2ae27d


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

Branch: refs/heads/master
Commit: c63b2bea65f38b961a0f672a6cbb9a7de918c9e7
Parents: 04e9489
Author: Clifford Jansen <[email protected]>
Authored: Tue Mar 22 23:48:58 2016 -0700
Committer: Clifford Jansen <[email protected]>
Committed: Tue Mar 22 23:48:58 2016 -0700

----------------------------------------------------------------------
 proton-c/bindings/cpp/include/proton/link.hpp | 2 ++
 proton-c/bindings/cpp/src/link.cpp            | 4 ++++
 proton-c/bindings/cpp/src/link_options.cpp    | 6 +++---
 3 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c63b2bea/proton-c/bindings/cpp/include/proton/link.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/link.hpp 
b/proton-c/bindings/cpp/include/proton/link.hpp
index 363ea16..839f0a3 100644
--- a/proton-c/bindings/cpp/include/proton/link.hpp
+++ b/proton-c/bindings/cpp/include/proton/link.hpp
@@ -39,6 +39,7 @@ namespace proton {
 class sender;
 class receiver;
 class condition;
+class link_context;
 
 /// A named channel for sending or receiving messages.  It is the base
 /// class for sender and receiver.
@@ -142,6 +143,7 @@ PN_CPP_CLASS_EXTERN link : public 
internal::object<pn_link_t> , public endpoint
     // Used by message to decode message from a delivery
     ssize_t recv(char* buffer, size_t size);
     bool advance();
+    link_context &context();
 
   friend class connection;
   friend class delivery;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c63b2bea/proton-c/bindings/cpp/src/link.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/link.cpp 
b/proton-c/bindings/cpp/src/link.cpp
index 1ac7304..472281e 100644
--- a/proton-c/bindings/cpp/src/link.cpp
+++ b/proton-c/bindings/cpp/src/link.cpp
@@ -146,4 +146,8 @@ link_iterator link_iterator::operator++() {
     return *this;
 }
 
+link_context &link::context() {
+    return link_context::get(pn_object());
+}
+
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c63b2bea/proton-c/bindings/cpp/src/link_options.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/link_options.cpp 
b/proton-c/bindings/cpp/src/link_options.cpp
index ee41535..2fecf3a 100644
--- a/proton-c/bindings/cpp/src/link_options.cpp
+++ b/proton-c/bindings/cpp/src/link_options.cpp
@@ -122,7 +122,7 @@ class link_options::impl {
                     }
                 }
             }
-            if (auto_settle.set) link_context::get(l.pn_object()).auto_settle 
= auto_settle.value;
+            if (auto_settle.set) l.context().auto_settle = auto_settle.value;
             if (!sender) {
                 // receiver only options
                 if (distribution_mode.set) 
l.local_source().distribution_mode(distribution_mode.value);
@@ -135,8 +135,8 @@ class link_options::impl {
                     enc << codec::start::map() << symbol("selector") << 
codec::start::described()
                         << symbol("apache.org:selector-filter:string") << 
binary(selector.value) << codec::finish();
                 }
-                if (auto_accept.set) 
link_context::get(l.pn_object()).auto_accept = auto_accept.value;
-                if (credit_window.set) 
link_context::get(l.pn_object()).credit_window = credit_window.value;
+                if (auto_accept.set) l.context().auto_accept = 
auto_accept.value;
+                if (credit_window.set) l.context().credit_window = 
credit_window.value;
             }
         }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to