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 #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
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 }
00120
00121 #endif // PROTON_TERMINUS_HPP