sender.hpp
Go to the documentation of this file.
#ifndef PROTON_SENDER_HPP
#define PROTON_SENDER_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 "./link.hpp"
#include "./tracker.hpp"
struct pn_link_t;
struct pn_session_t;
namespace proton {
class
PN_CPP_CLASS_EXTERN sender : public link {
PN_CPP_EXTERN sender(pn_link_t* s);
public:
sender() {}
PN_CPP_EXTERN void open();
PN_CPP_EXTERN void open(const sender_options &opts);
PN_CPP_EXTERN tracker send(const message &m);
PN_CPP_EXTERN class source source() const;
PN_CPP_EXTERN class target target() const;
PN_CPP_EXTERN void return_credit();
friend class internal::factory<sender>;
friend class sender_iterator;
};
class sender_iterator : public internal::iter_base<sender, sender_iterator> {
sender_iterator(sender snd, pn_session_t* s = 0) :
internal::iter_base<sender, sender_iterator>(snd), session_(s) {}
public:
sender_iterator() :
internal::iter_base<sender, sender_iterator>(0), session_(0) {}
PN_CPP_EXTERN sender_iterator operator++();
private:
pn_session_t* session_;
friend class connection;
friend class session;
};
typedef internal::iter_range<sender_iterator> sender_range;
}
#endif // PROTON_SENDER_HPP
proton::link
A named channel for sending or receiving messages.
Definition: link.hpp:42
proton::message
An AMQP message.
Definition: message.hpp:50
proton::sender_options
Options for creating a sender.
Definition: sender_options.hpp:57
proton::sender
A channel for sending messages.
Definition: sender.hpp:40
proton::sender::open
void open(const sender_options &opts)
Open the sender.
proton::sender::send
tracker send(const message &m)
Send a message on the sender.
proton::sender::open
void open()
Open the sender.
proton::sender::return_credit
void return_credit()
Unsettled API - Return all unused credit to the receiver in response to a drain request.
proton::sender::sender
sender()
Create an empty sender.
Definition: sender.hpp:47
proton::source
A point of origin for messages.
Definition: source.hpp:44
proton::target
A destination for messages.
Definition: target.hpp:45
proton::tracker
A tracker for a sent message.
Definition: tracker.hpp:40
fwd.hpp
Forward declarations.
link.hpp
A named channel for sending or receiving messages.
proton
The main Proton namespace.
Definition: annotation_key.hpp:33
tracker.hpp
A tracker for a sent message.