summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/SubscriptionManager.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-11-14 13:47:39 +0000
committerAlan Conway <aconway@apache.org>2007-11-14 13:47:39 +0000
commit26f34cfdef50ed420e98e114b6735ceb898cc74a (patch)
treef75585d51b0c9cd65508790f37c41b7ce6b57a8a /cpp/src/qpid/client/SubscriptionManager.h
parent03fd65578602ff436f4f2938528b47aa35f074e0 (diff)
downloadqpid-python-26f34cfdef50ed420e98e114b6735ceb898cc74a.tar.gz
Added auto-ack and commit-mode control to SubscriptionManager API.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@594879 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/SubscriptionManager.h')
-rw-r--r--cpp/src/qpid/client/SubscriptionManager.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/SubscriptionManager.h b/cpp/src/qpid/client/SubscriptionManager.h
index 1a03c1a47b..5cff46f0f2 100644
--- a/cpp/src/qpid/client/SubscriptionManager.h
+++ b/cpp/src/qpid/client/SubscriptionManager.h
@@ -37,11 +37,15 @@ class SubscriptionManager
typedef sys::Mutex::ScopedLock Lock;
typedef sys::Mutex::ScopedUnlock Unlock;
+ void subscribeInternal(const std::string& q, const std::string& dest);
+
qpid::client::Dispatcher dispatcher;
qpid::client::Session_0_10& session;
uint32_t messages;
uint32_t bytes;
bool window;
+ AckPolicy autoAck;
+ bool confirmMode;
public:
SubscriptionManager(Session_0_10& session);
@@ -96,6 +100,17 @@ public:
*@param window: if true use window-based flow control.
*/
void setFlowControl(uint32_t messages, uint32_t bytes, bool window=true);
+
+ /** Set the confirm-mode for new subscriptions. Defaults to true.
+ *@param confirm: if true messages must be confirmed by calling
+ *Message::acknowledge() or automatically, see setAckPolicy()
+ */
+ void setConfirmMode(bool confirm);
+
+ /** Set the acknowledgement policy for new subscriptions.
+ * Default is to acknowledge every message automatically.
+ */
+ void setAckPolicy(const AckPolicy& autoAck);
};