Debian Codegraph @

cpp/include/proton/session_options.hpp

raw
1 #ifndef PROTON_SESSION_OPTIONS_HPP
2 #define PROTON_SESSION_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
28 #include <memory>
29
30 /// @file
31 /// @copybrief proton::session_options
32
33 namespace proton {
34
35 /// Options for creating a session.
36 ///
37 /// Options can be "chained" (see proton::connection_options).
38 ///
39 /// Normal value semantics: copy or assign creates a separate copy of
40 /// the options.
41 class session_options {
42 public:
43 /// Create an empty set of options.
44 PN_CPP_EXTERN session_options();
45
46 /// Copy options.
47 PN_CPP_EXTERN session_options(const session_options&);
48
49 PN_CPP_EXTERN ~session_options();
50
51 /// Copy options.
52 PN_CPP_EXTERN session_options& operator=(const session_options&);
53
54 /// Set a messaging_handler for the session.
55 PN_CPP_EXTERN session_options& handler(class messaging_handler &);
56
57 // Other useful session configuration TBD.
58
59 /// @cond INTERNAL
60 private:
61 void apply(session&) const;
62
63 class impl;
64 std::unique_ptr<impl> impl_;
65
66 friend class session;
67 /// @endcond
68 };
69
70 } // proton
71
72 #endif // PROTON_SESSION_OPTIONS_HPP