1#ifndef PROTON_TRANSFER_HPP
2#define PROTON_TRANSFER_HPP
27#include "./internal/export.hpp"
28#include "./internal/object.hpp"
30#include <proton/disposition.h>
41class transfer :
public internal::object<pn_delivery_t> {
43 transfer(pn_delivery_t* d) : internal::object<pn_delivery_t>(d) {}
48 transfer() : internal::object<pn_delivery_t>(0) {}
91 friend class internal::factory<
transfer>;
103template <>
struct std::hash<
proton::transfer> {
105 return std::hash<proton::binary>{}(k.
tag());
Arbitrary binary data.
Definition binary.hpp:40
The base class for delivery and tracker.
Definition transfer.hpp:41
void settle()
Settle the delivery; informs the remote end.
void * user_data() const
Get user data from this transfer.
transfer()
Create an empty transfer.
Definition transfer.hpp:48
enum state state() const
Get the remote state for a delivery.
class work_queue & work_queue() const
Get the work_queue for the transfer.
void user_data(void *user_data) const
Set user data on this transfer.
class session session() const
Return the session for this transfer.
class container & container() const
Return the container for this transfer.
binary tag() const
Return the tag for this transfer.
bool settled() const
Return true if the transfer has been settled.
state
Delivery state values.
Definition transfer.hpp:51
@ RECEIVED
Received but not yet settled.
Definition transfer.hpp:53
@ MODIFIED
Settled as modified.
Definition transfer.hpp:57
@ ACCEPTED
Settled as accepted.
Definition transfer.hpp:54
@ RELEASED
Settled as released.
Definition transfer.hpp:56
@ NONE
Unknown state.
Definition transfer.hpp:52
@ REJECTED
Settled as rejected.
Definition transfer.hpp:55
class connection connection() const
Return the connection for this transfer.
The main Proton namespace.
Definition annotation_key.hpp:33
std::string to_string(const message &)
Human readable string representation.
std::ostream & operator<<(std::ostream &, const binary &)
Print a binary value.