diff options
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>; }; |