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 
00034 
00035 struct pn_link_t;
00036 struct pn_terminus_t;
00037 
00038 namespace proton {
00039 
00040 namespace internal {
00041 template <class T> class factory;
00042 }
00043 
00050 class terminus {
00052     terminus(pn_terminus_t* t);
00054 
00055   public:
00056     terminus() : object_(0), parent_(0) {}
00057 
00059     enum durability_mode {
00061         NONDURABLE = PN_NONDURABLE,
00063         CONFIGURATION = PN_CONFIGURATION,
00065         UNSETTLED_STATE = PN_DELIVERIES
00066     };
00067 
00069     enum expiry_policy {
00071         LINK_CLOSE = PN_EXPIRE_WITH_LINK,
00073         SESSION_CLOSE = PN_EXPIRE_WITH_SESSION,
00075         CONNECTION_CLOSE = PN_EXPIRE_WITH_CONNECTION,
00077         NEVER = PN_EXPIRE_NEVER
00078     };
00079 
00080     // XXX This should have address?
00081 
00083     PN_CPP_EXTERN enum expiry_policy expiry_policy() const;
00084 
00087     PN_CPP_EXTERN duration timeout() const;
00088 
00090     PN_CPP_EXTERN enum durability_mode durability_mode();
00091 
00093     PN_CPP_EXTERN bool dynamic() const;
00094 
00097     PN_CPP_EXTERN value node_properties() const;
00098 
00099   protected:
00100     pn_terminus_t *pn_object() const { return object_; }
00101   private:
00102     pn_terminus_t* object_;
00103     pn_link_t* parent_;
00104 
00106   friend class internal::factory<terminus>;
00107   friend class source;
00108   friend class target;
00110 };
00111 
00112 } // proton
00113 
00114 #endif // PROTON_TERMINUS_HPP

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