qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject [2/3] qpid-proton git commit: PROTON-1164: [C++ binding] Add a container accessor to object hierarchy - This allows simple access to all layers of the object model from every object type that can bre passed to a handler
Date Thu, 07 Apr 2016 21:28:29 GMT
PROTON-1164: [C++ binding] Add a container accessor to object hierarchy
- This allows simple access to all layers of the object model
  from every object type that can bre passed to a handler


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

Branch: refs/heads/master
Commit: 3ca3cb3b519c38b1da917449cc6545cc25714315
Parents: edd8bc5
Author: Andrew Stitcher <astitcher@apache.org>
Authored: Wed Apr 6 16:46:48 2016 -0400
Committer: Andrew Stitcher <astitcher@apache.org>
Committed: Thu Apr 7 17:10:23 2016 -0400

----------------------------------------------------------------------
 proton-c/bindings/cpp/include/proton/delivery.hpp | 3 +++
 proton-c/bindings/cpp/include/proton/link.hpp     | 3 +++
 proton-c/bindings/cpp/include/proton/session.hpp  | 3 +++
 proton-c/bindings/cpp/src/delivery.cpp            | 2 ++
 proton-c/bindings/cpp/src/link.cpp                | 4 ++++
 proton-c/bindings/cpp/src/session.cpp             | 4 ++++
 6 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/3ca3cb3b/proton-c/bindings/cpp/include/proton/delivery.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/delivery.hpp b/proton-c/bindings/cpp/include/proton/delivery.hpp
index 8ae8bc1..f1966eb 100644
--- a/proton-c/bindings/cpp/include/proton/delivery.hpp
+++ b/proton-c/bindings/cpp/include/proton/delivery.hpp
@@ -50,6 +50,9 @@ class delivery : public internal::object<pn_delivery_t> {
     /// Return the connection for this delivery
     PN_CPP_EXTERN class connection connection() const;
 
+    /// Return the container for this delivery
+    PN_CPP_EXTERN class container &container() const;
+
     /// Delivery state values.
     enum state {
         NONE = 0,               ///< Unknown state

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/3ca3cb3b/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 839f0a3..54eae3b 100644
--- a/proton-c/bindings/cpp/include/proton/link.hpp
+++ b/proton-c/bindings/cpp/include/proton/link.hpp
@@ -119,6 +119,9 @@ PN_CPP_CLASS_EXTERN link : public internal::object<pn_link_t> ,
public endpoint
     /// Get the link name.
     PN_CPP_EXTERN std::string name() const;
 
+    /// Return the container for this link
+    PN_CPP_EXTERN class container &container() const;
+
     /// Connection that owns this link.
     PN_CPP_EXTERN class connection connection() const;
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/3ca3cb3b/proton-c/bindings/cpp/include/proton/session.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/session.hpp b/proton-c/bindings/cpp/include/proton/session.hpp
index 24ada91..450f035 100644
--- a/proton-c/bindings/cpp/include/proton/session.hpp
+++ b/proton-c/bindings/cpp/include/proton/session.hpp
@@ -66,6 +66,9 @@ PN_CPP_CLASS_EXTERN session : public internal::object<pn_session_t>,
public endp
     /// handler::on_session_close().
     PN_CPP_EXTERN void close();
 
+    /// Return the container for this session
+    PN_CPP_EXTERN class container &container() const;
+
     /// Get the connection this session belongs to.
     PN_CPP_EXTERN class connection connection() const;
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/3ca3cb3b/proton-c/bindings/cpp/src/delivery.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/delivery.cpp b/proton-c/bindings/cpp/src/delivery.cpp
index 9d69625..49f6e26 100644
--- a/proton-c/bindings/cpp/src/delivery.cpp
+++ b/proton-c/bindings/cpp/src/delivery.cpp
@@ -34,6 +34,8 @@ namespace proton {
 link delivery::link() const { return pn_delivery_link(pn_object()); }
 session delivery::session() const { return pn_link_session(pn_delivery_link(pn_object()));
}
 connection delivery::connection() const { return pn_session_connection(pn_link_session(pn_delivery_link(pn_object())));
}
+container& delivery::container() const { return connection().container(); }
+
 bool delivery::settled() const { return pn_delivery_settled(pn_object()); }
 
 void delivery::settle() { pn_delivery_settle(pn_object()); }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/3ca3cb3b/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 472281e..420711a 100644
--- a/proton-c/bindings/cpp/src/link.cpp
+++ b/proton-c/bindings/cpp/src/link.cpp
@@ -76,6 +76,10 @@ terminus link::remote_target() const { return pn_link_remote_target(pn_object())
 
 std::string link::name() const { return std::string(pn_link_name(pn_object()));}
 
+container& link::container() const {
+    return connection().container();
+}
+
 class connection link::connection() const {
     return pn_session_connection(pn_link_session(pn_object()));
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/3ca3cb3b/proton-c/bindings/cpp/src/session.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/session.cpp b/proton-c/bindings/cpp/src/session.cpp
index e5c1f82..37550b0 100644
--- a/proton-c/bindings/cpp/src/session.cpp
+++ b/proton-c/bindings/cpp/src/session.cpp
@@ -36,6 +36,10 @@ void session::open() {
     pn_session_open(pn_object());
 }
 
+container& session::container() const {
+    return connection().container();
+}
+
 connection session::connection() const {
     return pn_session_connection(pn_object());
 }


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


Mime
View raw message