transfer.hpp
#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 "./internal/export.hpp"
#include "./internal/object.hpp"
#include <proton/delivery.h>
#include <proton/disposition.h>
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 container &container() const;
PN_CPP_EXTERN void settle();
PN_CPP_EXTERN bool settled() const;
friend class internal::factory<transfer>;
};
} // proton
#endif // PROTON_TRANSFER_HPP
proton::container
A top-level container of connections, sessions, senders, and receivers.
Definition: container.hpp:62
proton::transfer::NONE
Unknown state.
Definition: transfer.hpp:45
proton::connection
A connection to a remote AMQP peer.
Definition: connection.hpp:48
proton::transfer::state
enum state state() const
Get the remote state for a delivery.
proton::session
A container of senders and receivers.
Definition: session.hpp:46
proton::transfer::transfer
transfer()
Create an empty transfer.
Definition: transfer.hpp:41
proton::transfer::state
state
Delivery state values.
Definition: transfer.hpp:44
proton::transfer::settle
void settle()
Settle the delivery; informs the remote end.
proton::transfer
The base class for delivery and tracker.
Definition: transfer.hpp:34
proton::transfer::container
class container & container() const
Return the container for this transfer.
proton::transfer::ACCEPTED
Settled as accepted.
Definition: transfer.hpp:47
proton::transfer::RECEIVED
Received but not yet settled.
Definition: transfer.hpp:46
proton::transfer::REJECTED
Settled as rejected.
Definition: transfer.hpp:48
proton
Type traits for mapping between AMQP and C++ types.
Definition: annotation_key.hpp:28
proton::transfer::settled
bool settled() const
Return true if the transfer has been settled.
proton::transfer::RELEASED
Settled as released.
Definition: transfer.hpp:49
proton::transfer::MODIFIED
Settled as modified.
Definition: transfer.hpp:50