diff options
author | Gordon Sim <gsim@apache.org> | 2009-11-17 17:35:28 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2009-11-17 17:35:28 +0000 |
commit | 74c1740d54360bb4b091b5486c69f0f945d27abd (patch) | |
tree | 4eded291096792a62ce1f6546ea01c6e1959f3c8 /cpp/include | |
parent | 99c896bf60506c66f339d2ce51d4dca2725968af (diff) | |
download | qpid-python-74c1740d54360bb4b091b5486c69f0f945d27abd.tar.gz |
QPID-664: Add accessors for connection from session, and for session from sender/receiver.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@881395 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include')
-rw-r--r-- | cpp/include/qpid/messaging/Receiver.h | 6 | ||||
-rw-r--r-- | cpp/include/qpid/messaging/Sender.h | 7 | ||||
-rw-r--r-- | cpp/include/qpid/messaging/Session.h | 7 |
3 files changed, 19 insertions, 1 deletions
diff --git a/cpp/include/qpid/messaging/Receiver.h b/cpp/include/qpid/messaging/Receiver.h index 2dc62b1598..51630b12a2 100644 --- a/cpp/include/qpid/messaging/Receiver.h +++ b/cpp/include/qpid/messaging/Receiver.h @@ -37,6 +37,7 @@ namespace messaging { class Message; class ReceiverImpl; +class Session; /** * Interface through which messages are received. @@ -116,6 +117,11 @@ class Receiver : public qpid::client::Handle<ReceiverImpl> */ QPID_CLIENT_EXTERN const std::string& getName() const; + /** + * Returns a handle to the session associated with this receiver. + */ + QPID_CLIENT_EXTERN Session getSession() const; + private: friend class qpid::client::PrivateImplRef<Receiver>; }; diff --git a/cpp/include/qpid/messaging/Sender.h b/cpp/include/qpid/messaging/Sender.h index 29af3810f4..335e61260c 100644 --- a/cpp/include/qpid/messaging/Sender.h +++ b/cpp/include/qpid/messaging/Sender.h @@ -37,7 +37,7 @@ namespace messaging { class Message; class SenderImpl; - +class Session; /** * Interface through which messages are sent. */ @@ -73,6 +73,11 @@ class Sender : public qpid::client::Handle<SenderImpl> * Returns the name of this sender. */ QPID_CLIENT_EXTERN const std::string& getName() const; + + /** + * Returns a handle to the session associated with this sender. + */ + QPID_CLIENT_EXTERN Session getSession() const; private: friend class qpid::client::PrivateImplRef<Sender>; }; diff --git a/cpp/include/qpid/messaging/Session.h b/cpp/include/qpid/messaging/Session.h index edb6fa6331..46372cb849 100644 --- a/cpp/include/qpid/messaging/Session.h +++ b/cpp/include/qpid/messaging/Session.h @@ -37,6 +37,7 @@ template <class> class PrivateImplRef; namespace messaging { class Address; +class Connection; class Message; class MessageListener; class Sender; @@ -133,6 +134,12 @@ class Session : public qpid::client::Handle<SessionImpl> * if there is none for that name. */ QPID_CLIENT_EXTERN Receiver getReceiver(const std::string& name) const; + /** + * Returns a handle to the connection this session is associated + * with. + */ + QPID_CLIENT_EXTERN Connection getConnection() const; + private: friend class qpid::client::PrivateImplRef<Session>; }; |