Qpid Proton C++ API  0.18.1
source_options.hpp
Go to the documentation of this file.
1 #ifndef PROTON_SOURCE_OPTIONS_HPP
2 #define PROTON_SOURCE_OPTIONS_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 "./internal/export.hpp"
26 #include "./internal/pn_unique_ptr.hpp"
27 #include "./duration.hpp"
28 #include "./source.hpp"
29 
30 #include <string>
31 
34 
35 namespace proton {
36 
45  public:
47  PN_CPP_EXTERN source_options();
48 
50  PN_CPP_EXTERN source_options(const source_options&);
51 
52  PN_CPP_EXTERN ~source_options();
53 
55  PN_CPP_EXTERN source_options& operator=(const source_options&);
56 
59  PN_CPP_EXTERN source_options& address(const std::string&);
60 
64  PN_CPP_EXTERN source_options& dynamic(bool);
65 
68  PN_CPP_EXTERN source_options& distribution_mode(enum source::distribution_mode);
69 
72  PN_CPP_EXTERN source_options& durability_mode(enum source::durability_mode);
73 
76  PN_CPP_EXTERN source_options& timeout(duration);
77 
80  PN_CPP_EXTERN source_options& expiry_policy(enum source::expiry_policy);
81 
85  PN_CPP_EXTERN source_options& filters(const source::filter_map&);
86 
87  private:
88  void apply(source&) const;
89 
90  class impl;
91  internal::pn_unique_ptr<impl> impl_;
92 
94  friend class source;
95  friend class sender_options;
96  friend class receiver_options;
98 };
99 
100 } // proton
101 
102 #endif // PROTON_SOURCE_OPTIONS_HPP
source_options & timeout(duration)
The expiry period after which the source is discarded.
distribution_mode
The policy for distributing messages.
Definition: source.hpp:54
source_options & durability_mode(enum source::durability_mode)
Control the persistence of the source node.
Options for creating a sender.
Definition: sender_options.hpp:56
A span of time in milliseconds.
Definition: duration.hpp:39
source_options & distribution_mode(enum source::distribution_mode)
Control whether messsages are browsed or consumed.
source_options()
Create an empty set of options.
A point of origin for messages.
Definition: source.hpp:44
A point of origin for messages.
source_options & expiry_policy(enum source::expiry_policy)
Control when the clock for expiration begins.
source_options & operator=(const source_options &)
Copy options.
A span of time in milliseconds.
durability_mode
The persistence mode of the source or target.
Definition: terminus.hpp:59
source_options & address(const std::string &)
Set the address for the source.
Options for creating a source node for a sender or receiver.
Definition: source_options.hpp:44
Options for creating a receiver.
Definition: receiver_options.hpp:55
source_options & filters(const source::filter_map &)
Unsettled API - Specify a filter mechanism on the source that restricts message flow to a subset of t...
expiry_policy
When expiration of the source or target begins.
Definition: terminus.hpp:69
The main Proton namespace.
Definition: annotation_key.hpp:33
source_options & dynamic(bool)
Request that a node be dynamically created by the remote peer.