00001 #ifndef PROTON_TERMINUS_HPP
00002 #define PROTON_TERMINUS_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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
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 }
00113
00114 #endif // PROTON_TERMINUS_HPP