source.hpp
Go to the documentation of this file.
#ifndef PROTON_SOURCE_HPP
#define PROTON_SOURCE_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 "./map.hpp"
#include "./symbol.hpp"
#include "./terminus.hpp"
#include "./value.hpp"
#include <string>
struct pn_terminus_t;
namespace proton {
class source : public terminus {
public:
typedef map<symbol, value> filter_map;
source() : terminus() {}
enum distribution_mode {
// XXX Why is unspecified needed? The protocol doesn't have
// it.
UNSPECIFIED = PN_DIST_MODE_UNSPECIFIED,
COPY = PN_DIST_MODE_COPY,
MOVE = PN_DIST_MODE_MOVE
};
using terminus::durability_mode;
using terminus::expiry_policy;
PN_CPP_EXTERN std::string address() const;
PN_CPP_EXTERN enum distribution_mode distribution_mode() const;
PN_CPP_EXTERN const filter_map& filters() const;
private:
source(pn_terminus_t* t);
source(const sender&);
source(const receiver&);
filter_map filters_;
friend class proton::internal::factory<source>;
friend class sender;
friend class receiver;
};
} // proton
#endif // PROTON_SOURCE_HPP
proton::map< symbol, value >
proton::receiver
A channel for receiving messages.
Definition: receiver.hpp:41
proton::sender
A channel for sending messages.
Definition: sender.hpp:40
proton::source
A point of origin for messages.
Definition: source.hpp:44
proton::source::address
std::string address() const
The address of the source.
proton::source::filters
const filter_map & filters() const
Unsettled API - Obtain the set of message filters.
proton::source::source
source()
Create an empty source.
Definition: source.hpp:51
proton::source::distribution_mode
distribution_mode
The policy for distributing messages.
Definition: source.hpp:54
proton::source::UNSPECIFIED
@ UNSPECIFIED
Unspecified.
Definition: source.hpp:58
proton::source::COPY
@ COPY
Once transferred, the message remains available to other links.
Definition: source.hpp:60
proton::source::MOVE
@ MOVE
Once transferred, the message is unavailable to other links.
Definition: source.hpp:62
proton::source::filter_map
map< symbol, value > filter_map
Unsettled API - A map of AMQP symbol keys and filter specifiers.
Definition: source.hpp:48
proton::terminus
One end of a link, either a source or a target.
Definition: terminus.hpp:51
proton::terminus::expiry_policy
expiry_policy
When expiration of the source or target begins.
Definition: terminus.hpp:70
proton::terminus::durability_mode
durability_mode
The persistence mode of the source or target.
Definition: terminus.hpp:60
fwd.hpp
Forward declarations.
map.hpp
A collection of key-value pairs.
proton
The main Proton namespace.
Definition: annotation_key.hpp:33
symbol.hpp
A string that represents the AMQP symbol type.
terminus.hpp
One end of a link, either a source or a target.
value.hpp
A holder for any AMQP value, simple or complex.