Qpid Proton C++ API  0.37.0
receiver_options.hpp
Go to the documentation of this file.
1 #ifndef PROTON_RECEIVER_OPTIONS_HPP
2 #define PROTON_RECEIVER_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 "./fwd.hpp"
26 #include "./internal/export.hpp"
27 #include "./delivery_mode.hpp"
28 #include "./types_fwd.hpp"
29 
30 #include <map>
31 #include <memory>
32 #include <string>
33 
36 
37 namespace proton {
38 
60  public:
62  PN_CPP_EXTERN receiver_options();
63 
65  PN_CPP_EXTERN receiver_options(const receiver_options&);
66 
67  PN_CPP_EXTERN ~receiver_options();
68 
71 
73  PN_CPP_EXTERN void update(const receiver_options& other);
74 
78  PN_CPP_EXTERN receiver_options& handler(class messaging_handler&);
79 
83 
87  PN_CPP_EXTERN receiver_options& auto_accept(bool);
88 
90  PN_CPP_EXTERN PN_CPP_DEPRECATED("applicable only to sender, not receiver") receiver_options& auto_settle(bool);
91 
94 
97 
101  PN_CPP_EXTERN receiver_options& credit_window(int count);
102 
104  PN_CPP_EXTERN receiver_options& name(const std::string& name);
105 
107  PN_CPP_EXTERN receiver_options& properties(const std::map<symbol, value>&);
108 
109  private:
110  void apply(receiver &) const;
111  const std::string* get_name() const; // Pointer to name if set, else 0
112 
113  class impl;
114  std::unique_ptr<impl> impl_;
115 
117  friend class receiver;
118  friend class session;
120 };
121 
122 } // proton
123 
124 #endif // PROTON_RECEIVER_OPTIONS_HPP
A collection of key-value pairs.
Definition: map.hpp:69
Handler for Proton messaging events.
Definition: messaging_handler.hpp:69
Options for creating a receiver.
Definition: receiver_options.hpp:59
receiver_options & name(const std::string &name)
Set the link name. If not set a unique name is generated.
receiver_options(const receiver_options &)
Copy options.
receiver_options & delivery_mode(delivery_mode)
Set the delivery mode on the receiver.
receiver_options & credit_window(int count)
Automatically replenish credit for flow control up to count messages.
void update(const receiver_options &other)
Merge with another option set.
receiver_options & operator=(const receiver_options &)
Copy options.
receiver_options & handler(class messaging_handler &)
Set a messaging_handler for receiver events only.
receiver_options & auto_accept(bool)
Enable or disable automatic acceptance of messages that aren't otherwise released,...
receiver_options & properties(const std::map< symbol, value > &)
Unsettled API - Link properties.
receiver_options()
Create an empty set of options.
receiver_options & auto_settle(bool)
Deprecated - Applicable only to sender, not receiver.
A channel for receiving messages.
Definition: receiver.hpp:41
A container of senders and receivers.
Definition: session.hpp:42
Options for creating a source node for a sender or receiver.
Definition: source_options.hpp:46
A point of origin for messages.
Definition: source.hpp:44
A string that represents the AMQP symbol type.
Definition: symbol.hpp:35
Options for creating a target node for a sender or receiver.
Definition: target_options.hpp:46
A destination for messages.
Definition: target.hpp:45
A holder for any AMQP value, simple or complex.
Definition: value.hpp:57
The message delivery policy to establish when opening a link.
Forward declarations.
The main Proton namespace.
Definition: annotation_key.hpp:33
The message delivery policy to establish when opening a link.
Definition: delivery_mode.hpp:33
Forward declarations for Proton types used to represent AMQP types.