summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/amqp0_10/OutgoingMessage.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-01-12 12:02:38 +0000
committerGordon Sim <gsim@apache.org>2010-01-12 12:02:38 +0000
commitf47385682d2e9a82d007481e2c6d171a68dffa5f (patch)
tree272cc16ac4b05ce23aab1dd22fcd751c8dd6f3db /cpp/src/qpid/client/amqp0_10/OutgoingMessage.cpp
parent0528688ee4f8831b05576e2448d0835d6375ee82 (diff)
downloadqpid-python-f47385682d2e9a82d007481e2c6d171a68dffa5f.tar.gz
QPID-664: Added some of the missing standard message headers. Added two new test utilities for sending and receiving with the new API (both still works in progress).
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@898296 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/amqp0_10/OutgoingMessage.cpp')
-rw-r--r--cpp/src/qpid/client/amqp0_10/OutgoingMessage.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/cpp/src/qpid/client/amqp0_10/OutgoingMessage.cpp b/cpp/src/qpid/client/amqp0_10/OutgoingMessage.cpp
index abd4f4c28c..4065a16c6d 100644
--- a/cpp/src/qpid/client/amqp0_10/OutgoingMessage.cpp
+++ b/cpp/src/qpid/client/amqp0_10/OutgoingMessage.cpp
@@ -25,6 +25,7 @@
#include "qpid/messaging/Address.h"
#include "qpid/messaging/Message.h"
#include "qpid/messaging/MessageImpl.h"
+#include "qpid/framing/enum.h"
namespace qpid {
namespace client {
@@ -32,20 +33,25 @@ namespace amqp0_10 {
using qpid::messaging::Address;
using qpid::messaging::MessageImplAccess;
+using namespace qpid::framing::message;
void OutgoingMessage::convert(const qpid::messaging::Message& from)
{
//TODO: need to avoid copying as much as possible
message.setData(from.getContent());
message.getMessageProperties().setContentType(from.getContentType());
+ message.getMessageProperties().setCorrelationId(from.getCorrelationId());
+ message.getMessageProperties().setUserId(from.getUserId());
const Address& address = from.getReplyTo();
if (address) {
message.getMessageProperties().setReplyTo(AddressResolution::convert(address));
}
translate(from.getHeaders(), message.getMessageProperties().getApplicationHeaders());
- //TODO: set other message properties
- message.getDeliveryProperties().setRoutingKey(from.getSubject());
- //TODO: set other delivery properties
+ message.getDeliveryProperties().setTtl(from.getTtl());
+ if (from.getDurable()) {
+ message.getDeliveryProperties().setDeliveryMode(DELIVERY_MODE_PERSISTENT);
+ }
+
}
namespace {