proton/terminus.hpp

Go to the documentation of this file.
00001 #ifndef PROTON_TERMINUS_HPP
00002 #define PROTON_TERMINUS_HPP
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 "./types_fwd.hpp"
00026 #include "./internal/export.hpp"
00027 
00028 #include <proton/terminus.h>
00029 
00030 #include <string>
00031 #include <vector>
00032 
00035 
00036 struct pn_link_t;
00037 struct pn_terminus_t;
00038 
00039 namespace proton {
00040 
00041 namespace internal {
00042 template <class T> class factory;
00043 }
00044 
00051 class terminus {
00053     terminus(pn_terminus_t* t);
00055 
00056   public:
00057     terminus() : object_(0), parent_(0) {}
00058 
00060     enum durability_mode {
00062         NONDURABLE = PN_NONDURABLE,
00064         CONFIGURATION = PN_CONFIGURATION,
00066         UNSETTLED_STATE = PN_DELIVERIES
00067     };
00068 
00070     enum expiry_policy {
00072         LINK_CLOSE = PN_EXPIRE_WITH_LINK,
00074         SESSION_CLOSE = PN_EXPIRE_WITH_SESSION,
00076         CONNECTION_CLOSE = PN_EXPIRE_WITH_CONNECTION,
00078         NEVER = PN_EXPIRE_NEVER
00079     };
00080 
00081     // XXX This should have address?
00082 
00084     PN_CPP_EXTERN enum expiry_policy expiry_policy() const;
00085 
00088     PN_CPP_EXTERN duration timeout() const;
00089 
00091     PN_CPP_EXTERN enum durability_mode durability_mode();
00092 
00094     PN_CPP_EXTERN bool dynamic() const;
00095 
00097     PN_CPP_EXTERN bool anonymous() const;
00098 
00101     PN_CPP_EXTERN value node_properties() const;
00102 
00104     PN_CPP_EXTERN std::vector<symbol> capabilities() const;
00105 
00106   protected:
00107     pn_terminus_t *pn_object() const { return object_; }
00108   private:
00109     pn_terminus_t* object_;
00110     pn_link_t* parent_;
00111 
00113   friend class internal::factory<terminus>;
00114   friend class source;
00115   friend class target;
00117 };
00118 
00119 } // proton
00120 
00121 #endif // PROTON_TERMINUS_HPP

Generated on 8 Oct 2019 for Qpid Proton C++ by  doxygen 1.6.1