1 #ifndef PROTON_MESSAGE_HPP 2 #define PROTON_MESSAGE_HPP 26 #include "./internal/export.hpp" 32 #include "./internal/pn_unique_ptr.hpp" 34 #include <proton/type_compat.h> 67 #if PN_CPP_HAS_RVALUE_REFERENCES 85 PN_CPP_EXTERN
void clear();
97 PN_CPP_EXTERN
void user(
const std::string&);
100 PN_CPP_EXTERN std::string
user()
const;
104 PN_CPP_EXTERN
void encode(std::vector<char>&)
const;
107 PN_CPP_EXTERN std::vector<char>
encode()
const;
110 PN_CPP_EXTERN
void decode(
const std::vector<char>&);
118 PN_CPP_EXTERN
void to(
const std::string&);
121 PN_CPP_EXTERN std::string
to()
const;
125 PN_CPP_EXTERN
void address(
const std::string&);
126 PN_CPP_EXTERN std::string address()
const;
130 PN_CPP_EXTERN
void reply_to(
const std::string&);
133 PN_CPP_EXTERN std::string
reply_to()
const;
156 PN_CPP_EXTERN
void subject(
const std::string&);
159 PN_CPP_EXTERN std::string
subject()
const;
194 PN_CPP_EXTERN
bool inferred()
const;
208 PN_CPP_EXTERN
bool durable()
const;
211 PN_CPP_EXTERN
void durable(
bool);
232 PN_CPP_EXTERN uint8_t
priority()
const;
235 PN_CPP_EXTERN
void priority(uint8_t);
268 PN_CPP_EXTERN
void group_id(
const std::string&);
271 PN_CPP_EXTERN std::string
group_id()
const;
326 pn_message_t* pn_msg()
const;
327 struct impl& impl()
const;
329 mutable pn_message_t* pn_msg_;
340 #endif // PROTON_MESSAGE_HPP An AMQP message.
Definition: message.hpp:50
std::string group_id() const
Get the message group ID.
const value & body() const
Get the body.
bool inferred() const
Get the inferred flag.
uint8_t priority() const
Get the priority.
message_id correlation_id() const
Get the ID for matching related messages.
friend std::ostream & operator<<(std::ostream &, const message &)
Human readable string representation.
void swap(map< K, T > &, map< K, T > &)
Swap proton::map instances.
message_id id() const
Get the message ID.
timestamp creation_time() const
Get the creation time.
bool first_acquirer() const
Get the first acquirer flag.
A span of time in milliseconds.
Definition: duration.hpp:39
std::vector< char > encode() const
Return encoded message as a byte vector.
uint32_t delivery_count() const
Get the delivery count.
std::string to_string(const message &)
Human readable string representation.
A collection of key-value pairs.
map< std::string, scalar > property_map
A map of string keys and AMQP scalar values.
Definition: message.hpp:53
A collection of key-value pairs.
Definition: map.hpp:44
std::string content_type() const
Get the content type of the body.
annotation_map & message_annotations()
Get the message annotations map.
annotation_map & delivery_annotations()
Get the delivery annotations map.
std::string user() const
Get the user name or ID.
int32_t group_sequence() const
Get the group sequence.
A span of time in milliseconds.
map< annotation_key, value > annotation_map
A map of AMQP annotation keys and AMQP values.
Definition: message.hpp:56
std::string subject() const
Get the subject.
bool durable() const
Get the durable flag.
A 64-bit timestamp in milliseconds since the Unix epoch.
Definition: timestamp.hpp:35
A holder for any AMQP value, simple or complex.
Definition: value.hpp:57
std::string to() const
Get the destination address.
message & operator=(const message &)
Copy a message.
void clear()
Clear the message content and properties.
static const uint8_t default_priority
Default priority assigned to new messages.
Definition: message.hpp:318
timestamp expiry_time() const
Get the expiration time.
std::string content_encoding() const
Get the content encoding of the body.
property_map & properties()
Get the application properties map.
std::string reply_to_group_id() const
Get the reply-to group ID.
std::string reply_to() const
Get the address for replies.
The main Proton namespace.
Definition: annotation_key.hpp:33
void decode(const std::vector< char > &)
Decode from string data into the message.
A 64-bit timestamp in milliseconds since the Unix epoch.
A holder for any AMQP value, simple or complex.
An AMQP message ID.
Definition: message_id.hpp:47
message()
Create an empty message.
duration ttl() const
Get the TTL.