standardize MessageProperties throughout codebase
This commit is contained in:
parent
4422924219
commit
4ff7683536
|
|
@ -419,6 +419,7 @@ namespace Frame
|
||||||
} // namespace Frame
|
} // namespace Frame
|
||||||
|
|
||||||
typedef QHash<Frame::Content::Property, QVariant> MessageProperties;
|
typedef QHash<Frame::Content::Property, QVariant> MessageProperties;
|
||||||
|
typedef Frame::Content::Property MessageProperty;
|
||||||
|
|
||||||
} // namespace QAMQP
|
} // namespace QAMQP
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ QByteArray Message::payload() const
|
||||||
return d->payload;
|
return d->payload;
|
||||||
}
|
}
|
||||||
|
|
||||||
QHash<Message::MessageProperty, QVariant> Message::properties() const
|
MessageProperties Message::properties() const
|
||||||
{
|
{
|
||||||
return d->properties;
|
return d->properties;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,15 +20,12 @@ public:
|
||||||
Message &operator=(const Message &other);
|
Message &operator=(const Message &other);
|
||||||
~Message();
|
~Message();
|
||||||
|
|
||||||
typedef Frame::Content::Property MessageProperty;
|
|
||||||
Q_DECLARE_FLAGS(MessageProperties, MessageProperty)
|
|
||||||
|
|
||||||
qlonglong deliveryTag() const;
|
qlonglong deliveryTag() const;
|
||||||
bool redelivered() const;
|
bool redelivered() const;
|
||||||
QString exchangeName() const;
|
QString exchangeName() const;
|
||||||
QString routingKey() const;
|
QString routingKey() const;
|
||||||
QByteArray payload() const;
|
QByteArray payload() const;
|
||||||
QHash<MessageProperty, QVariant> properties() const;
|
MessageProperties properties() const;
|
||||||
Frame::TableField headers() const;
|
Frame::TableField headers() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public:
|
||||||
QString routingKey;
|
QString routingKey;
|
||||||
|
|
||||||
QByteArray payload;
|
QByteArray payload;
|
||||||
QHash<Message::MessageProperty, QVariant> properties;
|
MessageProperties properties;
|
||||||
Frame::TableField headers;
|
Frame::TableField headers;
|
||||||
|
|
||||||
int leftSize;
|
int leftSize;
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ void QueuePrivate::_q_content(const Frame::Content &frame)
|
||||||
QHash<int, QVariant>::ConstIterator it;
|
QHash<int, QVariant>::ConstIterator it;
|
||||||
QHash<int, QVariant>::ConstIterator itEnd = frame.properties_.constEnd();
|
QHash<int, QVariant>::ConstIterator itEnd = frame.properties_.constEnd();
|
||||||
for (it = frame.properties_.constBegin(); it != itEnd; ++it)
|
for (it = frame.properties_.constBegin(); it != itEnd; ++it)
|
||||||
message.d->properties[Message::MessageProperty(it.key())] = it.value();
|
message.d->properties[MessageProperty(it.key())] = it.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QueuePrivate::_q_body(const Frame::ContentBody &frame)
|
void QueuePrivate::_q_body(const Frame::ContentBody &frame)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue