summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2011-06-17 21:23:50 +0000
committerCharles E. Rolke <chug@apache.org>2011-06-17 21:23:50 +0000
commitf1616d61d152fe80e87e99d73851ade5e58b2e23 (patch)
treea32d4e53f5e404dde50e065b1b56a726706ad3f5
parent707e99c990de4d159907440304c149e4a152069b (diff)
downloadqpid-python-f1616d61d152fe80e87e99d73851ade5e58b2e23.tar.gz
QPID-3200 Ability to acknowledge all messages up to and including a given message for a Session
.NET Binding keeps up with additions to the Messaging package. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1137034 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/src/Session.cpp25
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/src/Session.h2
2 files changed, 27 insertions, 0 deletions
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp b/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp
index 4a6199f108..0e918769a3 100644
--- a/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp
+++ b/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp
@@ -248,6 +248,31 @@ namespace Messaging {
}
}
+ void Session::AcknowledgeUpTo(Message ^ message)
+ {
+ AcknowledgeUpTo(message, false);
+ }
+
+ void Session::AcknowledgeUpTo(Message ^ message, bool sync)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ sessionp->acknowledgeUpTo(*(message->NativeMessage), sync);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
void Session::Reject(Message ^ message)
{
System::Exception ^ newException = nullptr;
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Session.h b/qpid/cpp/bindings/qpid/dotnet/src/Session.h
index 4d4cad75c4..4b98a37f18 100644
--- a/qpid/cpp/bindings/qpid/dotnet/src/Session.h
+++ b/qpid/cpp/bindings/qpid/dotnet/src/Session.h
@@ -104,6 +104,8 @@ namespace Messaging {
void Acknowledge(bool sync);
void Acknowledge(Message ^ message);
void Acknowledge(Message ^ message, bool sync);
+ void AcknowledgeUpTo(Message ^ message);
+ void AcknowledgeUpTo(Message ^ message, bool sync);
void Reject(Message ^);
void Release(Message ^);
void Sync();