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 "./internal/export.hpp"
00026 #include "./internal/object.hpp"
00027 #include "./value.hpp"
00028
00029 #include <proton/link.h>
00030 #include <string>
00031
00032 namespace proton {
00033
00040 class terminus {
00042 terminus(pn_terminus_t* t);
00044
00045 public:
00046 terminus() : object_(0), parent_(0) {}
00047
00049 enum durability_mode {
00051 NONDURABLE = PN_NONDURABLE,
00053 CONFIGURATION = PN_CONFIGURATION,
00055 UNSETTLED_STATE = PN_DELIVERIES
00056 };
00057
00059 enum expiry_policy {
00061 LINK_CLOSE = PN_EXPIRE_WITH_LINK,
00063 SESSION_CLOSE = PN_EXPIRE_WITH_SESSION,
00065 CONNECTION_CLOSE = PN_EXPIRE_WITH_CONNECTION,
00067 NEVER = PN_EXPIRE_NEVER
00068 };
00069
00070
00071
00073 PN_CPP_EXTERN enum expiry_policy expiry_policy() const;
00074
00077 PN_CPP_EXTERN duration timeout() const;
00078
00080 PN_CPP_EXTERN enum durability_mode durability_mode();
00081
00083 PN_CPP_EXTERN bool dynamic() const;
00084
00087 PN_CPP_EXTERN value node_properties() const;
00088
00089 protected:
00090 pn_terminus_t *pn_object() { return object_; }
00091 private:
00092 pn_terminus_t* object_;
00093 pn_link_t* parent_;
00094
00096 friend class internal::factory<terminus>;
00097 friend class source;
00098 friend class target;
00100 };
00101
00102 }
00103
00104 #endif // PROTON_TERMINUS_HPP