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 
00042 namespace proton {
00043 
00065 class connection_options {
00066   public:
00068     PN_CPP_EXTERN connection_options();
00069 
00071     PN_CPP_EXTERN connection_options(class messaging_handler& h);
00072 
00074     PN_CPP_EXTERN connection_options(const connection_options&);
00075 
00076     PN_CPP_EXTERN ~connection_options();
00077 
00079     PN_CPP_EXTERN connection_options& operator=(const connection_options&);
00080 
00081     // XXX add C++11 move operations - Still relevant, and applies to all options
00082 
00087     PN_CPP_EXTERN connection_options& handler(class messaging_handler&);
00088 
00090     PN_CPP_EXTERN connection_options& max_frame_size(uint32_t max);
00091 
00093     PN_CPP_EXTERN connection_options& max_sessions(uint16_t max);
00094 
00101     PN_CPP_EXTERN connection_options& idle_timeout(duration);
00102 
00104     PN_CPP_EXTERN connection_options& container_id(const std::string& id);
00105 
00112     PN_CPP_EXTERN connection_options& virtual_host(const std::string& name);
00113 
00122     PN_CPP_EXTERN connection_options& user(const std::string&);
00123 
00128     PN_CPP_EXTERN connection_options& password(const std::string&);
00129 
00131     PN_CPP_EXTERN connection_options& ssl_client_options(const class ssl_client_options&);
00132 
00134     PN_CPP_EXTERN connection_options& ssl_server_options(const class ssl_server_options&);
00135 
00137     PN_CPP_EXTERN connection_options& sasl_enabled(bool);
00138 
00142     PN_CPP_EXTERN connection_options& sasl_allow_insecure_mechs(bool);
00143 
00145     PN_CPP_EXTERN connection_options& sasl_allowed_mechs(const std::string&);
00146 
00148     PN_CPP_EXTERN connection_options& sasl_config_name(const std::string&);
00149 
00151     PN_CPP_EXTERN connection_options& sasl_config_path(const std::string&);
00152 
00154     PN_CPP_EXTERN connection_options& reconnect(reconnect_options &);
00155 
00157     PN_CPP_EXTERN connection_options& update(const connection_options& other);
00158 
00159   private:
00160     void apply_unbound(connection&) const;
00161     void apply_bound(connection&) const;
00162     messaging_handler* handler() const;
00163 
00164     class impl;
00165     internal::pn_unique_ptr<impl> impl_;
00166 
00168   friend class container;
00169   friend class io::connection_driver;
00170   friend class connection;
00172 };
00173 
00174 } // proton
00175 
00176 #endif // PROTON_CONNECTION_OPTIONS_H

Generated on 28 Nov 2017 for Qpid Proton C++ by  doxygen 1.6.1