receiver.hpp
Go to the documentation of this file.
#ifndef PROTON_RECEIVER_HPP
#define PROTON_RECEIVER_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 <proton/type_compat.h>
struct pn_link_t;
struct pn_session_t;
namespace proton {
class
PN_CPP_CLASS_EXTERN receiver : public link {
PN_CPP_EXTERN receiver(pn_link_t* r);
public:
receiver() {}
PN_CPP_EXTERN void open();
PN_CPP_EXTERN void open(const receiver_options &opts);
PN_CPP_EXTERN class source source() const;
PN_CPP_EXTERN class target target() const;
PN_CPP_EXTERN void add_credit(uint32_t);
PN_CPP_EXTERN void drain();
friend class internal::factory<receiver>;
friend class receiver_iterator;
};
class receiver_iterator : public internal::iter_base<receiver, receiver_iterator> {
explicit receiver_iterator(receiver r, pn_session_t* s = 0) :
internal::iter_base<receiver, receiver_iterator>(r), session_(s) {}
public:
explicit receiver_iterator() :
internal::iter_base<receiver, receiver_iterator>(0), session_(0) {}
PN_CPP_EXTERN receiver_iterator operator++();
private:
pn_session_t* session_;
friend class connection;
friend class session;
};
typedef internal::iter_range<receiver_iterator> receiver_range;
} // proton
#endif // PROTON_RECEIVER_HPP
proton::source
A point of origin for messages.
Definition: source.hpp:44
fwd.hpp
proton::receiver_options
Options for creating a receiver.
Definition: receiver_options.hpp:56
proton::receiver
A channel for receiving messages.
Definition: receiver.hpp:40
link.hpp
proton::receiver::receiver
receiver()
Create an empty receiver.
Definition: receiver.hpp:48
proton::target
A destination for messages.
Definition: target.hpp:45
proton
The main Proton namespace.
Definition: annotation_key.hpp:33
proton::link
A named channel for sending or receiving messages.
Definition: link.hpp:41