Qpid Proton C++ API  0.33.0
source.hpp
Go to the documentation of this file.
1 #ifndef PROTON_SOURCE_HPP
2 #define PROTON_SOURCE_HPP
3 
4 /*
5  *
6  * Licensed to the Apache Software Foundation (ASF) under one
7  * or more contributor license agreements. See the NOTICE file
8  * distributed with this work for additional information
9  * regarding copyright ownership. The ASF licenses this file
10  * to you under the Apache License, Version 2.0 (the
11  * "License"); you may not use this file except in compliance
12  * with the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing,
17  * software distributed under the License is distributed on an
18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19  * KIND, either express or implied. See the License for the
20  * specific language governing permissions and limitations
21  * under the License.
22  *
23  */
24 
25 #include "./fwd.hpp"
26 #include "./internal/export.hpp"
27 #include "./map.hpp"
28 #include "./symbol.hpp"
29 #include "./terminus.hpp"
30 #include "./value.hpp"
31 
32 #include <string>
33 
36 
37 struct pn_terminus_t;
38 
39 namespace proton {
40 
44 class source : public terminus {
45  public:
49 
51  source() : terminus() {}
52 
55  // XXX Why is unspecified needed? The protocol doesn't have
56  // it.
58  UNSPECIFIED = PN_DIST_MODE_UNSPECIFIED,
60  COPY = PN_DIST_MODE_COPY,
62  MOVE = PN_DIST_MODE_MOVE
63  };
64 
67 
69  PN_CPP_EXTERN std::string address() const;
70 
72  PN_CPP_EXTERN enum distribution_mode distribution_mode() const;
73 
75  PN_CPP_EXTERN const filter_map& filters() const;
76 
77  private:
78  source(pn_terminus_t* t);
79  source(const sender&);
80  source(const receiver&);
81 
82  filter_map filters_;
83 
85  friend class proton::internal::factory<source>;
86  friend class sender;
87  friend class receiver;
89 };
90 
91 } // proton
92 
93 #endif // PROTON_SOURCE_HPP
proton::source::filters
const filter_map & filters() const
Unsettled API - Obtain the set of message filters.
symbol.hpp
A string that represents the AMQP symbol type.
proton::source
A point of origin for messages.
Definition: source.hpp:44
proton::terminus::expiry_policy
expiry_policy
When expiration of the source or target begins.
Definition: terminus.hpp:70
fwd.hpp
Forward declarations.
map.hpp
A collection of key-value pairs.
proton::receiver
A channel for receiving messages.
Definition: receiver.hpp:41
proton::map< symbol, value >
terminus.hpp
One end of a link, either a source or a target.
proton::terminus::durability_mode
durability_mode
The persistence mode of the source or target.
Definition: terminus.hpp:60
proton::terminus
One end of a link, either a source or a target.
Definition: terminus.hpp:51
proton::sender
A channel for sending messages.
Definition: sender.hpp:40
value.hpp
A holder for any AMQP value, simple or complex.
proton::source::UNSPECIFIED
@ UNSPECIFIED
Unspecified.
Definition: source.hpp:58
proton::source::distribution_mode
distribution_mode
The policy for distributing messages.
Definition: source.hpp:54
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
The main Proton namespace.
Definition: annotation_key.hpp:33
proton::source::COPY
@ COPY
Once transferred, the message remains available to other links.
Definition: source.hpp:60
proton::source::address
std::string address() const
The address of the source.
proton::source::source
source()
Create an empty source.
Definition: source.hpp:51
proton::source::MOVE
@ MOVE
Once transferred, the message is unavailable to other links.
Definition: source.hpp:62