qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject [2/4] qpid-proton git commit: PROTON-1182: [C++ binding] Remove now unneeded sender & receiver members of link
Date Tue, 26 Apr 2016 22:18:37 GMT
PROTON-1182: [C++ binding] Remove now unneeded sender & receiver members of link


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

Branch: refs/heads/master
Commit: 5f5ae932ac0362bd592bc270194153a514b8a9f5
Parents: 5c24f89
Author: Andrew Stitcher <astitcher@apache.org>
Authored: Tue Apr 26 01:21:30 2016 -0400
Committer: Andrew Stitcher <astitcher@apache.org>
Committed: Tue Apr 26 18:16:09 2016 -0400

----------------------------------------------------------------------
 proton-c/bindings/cpp/include/proton/link.hpp   | 12 ------------
 proton-c/bindings/cpp/src/link.cpp              | 16 ----------------
 proton-c/bindings/cpp/src/messaging_adapter.cpp |  8 ++++----
 3 files changed, 4 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5f5ae932/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 515787c..9af4523 100644
--- a/proton-c/bindings/cpp/include/proton/link.hpp
+++ b/proton-c/bindings/cpp/include/proton/link.hpp
@@ -86,18 +86,6 @@ PN_CPP_CLASS_EXTERN link : public object<pn_link_t> , public endpoint
{
     /// without cancelling it.
     PN_CPP_EXTERN void detach();
 
-    /// Return sender if this link is a sender, 0 if not.
-    PN_CPP_EXTERN class sender sender();
-
-    /// Return sender if this link is a sender, 0 if not.
-    PN_CPP_EXTERN const class sender sender() const;
-
-    /// Return receiver if this link is a receiver, 0 if not.
-    PN_CPP_EXTERN class receiver receiver();
-
-    /// Return receiver if this link is a receiver, 0 if not.
-    PN_CPP_EXTERN const class receiver receiver() const;
-
     /// Credit available on the link.
     PN_CPP_EXTERN int credit() const;
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5f5ae932/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 d12bd5a..de431d5 100644
--- a/proton-c/bindings/cpp/src/link.cpp
+++ b/proton-c/bindings/cpp/src/link.cpp
@@ -45,22 +45,6 @@ void link::detach() {
     pn_link_detach(pn_object());
 }
 
-sender link::sender() {
-    return pn_link_is_sender(pn_object()) ? proton::sender(pn_object()) : proton::sender();
-}
-
-receiver link::receiver() {
-    return pn_link_is_receiver(pn_object()) ? proton::receiver(pn_object()) : proton::receiver();
-}
-
-const sender link::sender() const {
-    return pn_link_is_sender(pn_object()) ? proton::sender(pn_object()) : proton::sender();
-}
-
-const receiver link::receiver() const {
-    return pn_link_is_receiver(pn_object()) ? proton::receiver(pn_object()) : proton::receiver();
-}
-
 int link::credit() const {
     return pn_link_credit(pn_object());
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5f5ae932/proton-c/bindings/cpp/src/messaging_adapter.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/messaging_adapter.cpp b/proton-c/bindings/cpp/src/messaging_adapter.cpp
index 83f737b..1981726 100644
--- a/proton-c/bindings/cpp/src/messaging_adapter.cpp
+++ b/proton-c/bindings/cpp/src/messaging_adapter.cpp
@@ -145,13 +145,13 @@ void messaging_adapter::on_link_remote_close(proton_event &pe) {
     pn_event_t *cevent = pe.pn_event();
     pn_link_t *lnk = pn_event_link(cevent);
     if (pn_link_is_receiver(lnk)) {
-        receiver r = internal::link(lnk).receiver();
+        receiver r(lnk);
         if (pn_condition_is_set(pn_link_remote_condition(lnk))) {
             delegate_.on_receiver_error(r);
         }
         delegate_.on_receiver_close(r);
     } else {
-        sender s = internal::link(lnk).sender();
+        sender s(lnk);
         if (pn_condition_is_set(pn_link_remote_condition(lnk))) {
             delegate_.on_sender_error(s);
         }
@@ -209,10 +209,10 @@ void messaging_adapter::on_link_remote_open(proton_event &pe) {
     sender s;
     pn_link_t *lnk = pn_event_link(pe.pn_event());
     if (pn_link_is_receiver(lnk)) {
-      r = internal::link(lnk).receiver();
+      r = lnk;
       delegate_.on_receiver_open(r);
     } else {
-      s = internal::link(lnk).sender();
+      s = lnk;
       delegate_.on_sender_open(s);
     }
     if (!is_local_open(pn_link_state(lnk)) && is_local_unititialised(pn_link_state(lnk)))
{


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


Mime
View raw message