proton/connection_options.hpp

Go to the documentation of this file.
00001 #ifndef PROTON_CONNECTION_OPTIONS_H
00002 #define PROTON_CONNECTION_OPTIONS_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "./duration.hpp"
00026 #include "./fwd.hpp"
00027 #include "./internal/config.hpp"
00028 #include "./internal/export.hpp"
00029 #include "./internal/pn_unique_ptr.hpp"
00030 #include "./types_fwd.hpp"
00031 
00032 #include <proton/type_compat.h>
00033 
00034 #include <vector>
00035 #include <string>
00036 
00039 
00040 struct pn_connection_t;
00041 struct pn_transport_t;
00042 
00043 namespace proton {
00044 
00066 class connection_options {
00067   public:
00069     PN_CPP_EXTERN connection_options();
00070 
00072     PN_CPP_EXTERN connection_options(class messaging_handler& h);
00073 
00075     PN_CPP_EXTERN connection_options(const connection_options&);
00076 
00077     PN_CPP_EXTERN ~connection_options();
00078 
00080     PN_CPP_EXTERN connection_options& operator=(const connection_options&);
00081 
00082     // XXX add C++11 move operations - Still relevant, and applies to all options
00083 
00088     PN_CPP_EXTERN connection_options& handler(class messaging_handler&);
00089 
00091     PN_CPP_EXTERN connection_options& max_frame_size(uint32_t max);
00092 
00094     PN_CPP_EXTERN connection_options& max_sessions(uint16_t max);
00095 
00102     PN_CPP_EXTERN connection_options& idle_timeout(duration);
00103 
00105     PN_CPP_EXTERN connection_options& container_id(const std::string& id);
00106 
00113     PN_CPP_EXTERN connection_options& virtual_host(const std::string& name);
00114 
00123     PN_CPP_EXTERN connection_options& user(const std::string&);
00124 
00129     PN_CPP_EXTERN connection_options& password(const std::string&);
00130 
00132     PN_CPP_EXTERN connection_options& ssl_client_options(const class ssl_client_options&);
00133 
00135     PN_CPP_EXTERN connection_options& ssl_server_options(const class ssl_server_options&);
00136 
00138     PN_CPP_EXTERN connection_options& sasl_enabled(bool);
00139 
00143     PN_CPP_EXTERN connection_options& sasl_allow_insecure_mechs(bool);
00144 
00146     PN_CPP_EXTERN connection_options& sasl_allowed_mechs(const std::string&);
00147 
00149     PN_CPP_EXTERN connection_options& sasl_config_name(const std::string&);
00150 
00152     PN_CPP_EXTERN connection_options& sasl_config_path(const std::string&);
00153 
00155     PN_CPP_EXTERN connection_options& reconnect(reconnect_options &);
00156 
00158     PN_CPP_EXTERN connection_options& update(const connection_options& other);
00159 
00160   private:
00161     void apply_unbound(connection&) const;
00162     void apply_unbound_client(pn_transport_t*) const;
00163     void apply_unbound_server(pn_transport_t*) const;
00164     messaging_handler* handler() const;
00165 
00166     class impl;
00167     internal::pn_unique_ptr<impl> impl_;
00168 
00170   friend class container;
00171   friend class io::connection_driver;
00172   friend class connection;
00174 };
00175 
00176 } // proton
00177 
00178 #endif // PROTON_CONNECTION_OPTIONS_H

Generated on 29 Mar 2018 for Qpid Proton C++ by  doxygen 1.6.1