Loading...
Searching...
No Matches
transfer.hpp
Go to the documentation of this file.
#ifndef PROTON_TRANSFER_HPP
#define PROTON_TRANSFER_HPP
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
#include "./fwd.hpp"
#include "./internal/export.hpp"
#include "./internal/object.hpp"
#include <proton/disposition.h>
#include <iosfwd>
struct pn_delivery_t;
namespace proton {
class transfer : public internal::object<pn_delivery_t> {
transfer(pn_delivery_t* d) : internal::object<pn_delivery_t>(d) {}
public:
transfer() : internal::object<pn_delivery_t>(0) {}
enum state {
NONE = 0,
RECEIVED = PN_RECEIVED,
ACCEPTED = PN_ACCEPTED,
REJECTED = PN_REJECTED,
RELEASED = PN_RELEASED,
MODIFIED = PN_MODIFIED
}; // AMQP spec 3.4 delivery State
PN_CPP_EXTERN enum state state() const;
PN_CPP_EXTERN class session session() const;
PN_CPP_EXTERN class connection connection() const;
PN_CPP_EXTERN class work_queue& work_queue() const;
PN_CPP_EXTERN class container &container() const;
PN_CPP_EXTERN void settle();
PN_CPP_EXTERN bool settled() const;
friend class internal::factory<transfer>;
};
PN_CPP_EXTERN std::string to_string(enum transfer::state);
PN_CPP_EXTERN std::ostream& operator<<(std::ostream&, const enum transfer::state);
} // proton
#endif // PROTON_TRANSFER_HPP
proton::transfer::settle
void settle()
Settle the delivery; informs the remote end.
proton::transfer::transfer
transfer()
Create an empty transfer.
Definition transfer.hpp:47
proton::transfer::state
enum state state() const
Get the remote state for a delivery.
proton::transfer::work_queue
class work_queue & work_queue() const
Get the work_queue for the transfer.
proton::transfer::session
class session session() const
Return the session for this transfer.
proton::transfer::container
class container & container() const
Return the container for this transfer.
proton::transfer::settled
bool settled() const
Return true if the transfer has been settled.
proton::transfer::state
state
Delivery state values.
Definition transfer.hpp:50
proton::transfer::RECEIVED
@ RECEIVED
Received but not yet settled.
Definition transfer.hpp:52
proton::transfer::MODIFIED
@ MODIFIED
Settled as modified.
Definition transfer.hpp:56
proton::transfer::ACCEPTED
@ ACCEPTED
Settled as accepted.
Definition transfer.hpp:53
proton::transfer::RELEASED
@ RELEASED
Settled as released.
Definition transfer.hpp:55
proton::transfer::NONE
@ NONE
Unknown state.
Definition transfer.hpp:51
proton::transfer::REJECTED
@ REJECTED
Settled as rejected.
Definition transfer.hpp:54
proton::transfer::connection
class connection connection() const
Return the connection for this transfer.
fwd.hpp
Forward declarations.
proton
The main Proton namespace.
Definition annotation_key.hpp:33
proton::to_string
std::string to_string(const message &)
Human readable string representation.
proton::operator<<
std::ostream & operator<<(std::ostream &, const binary &)
Print a binary value.