Qpid Proton C++  0.17.0
terminus.hpp
1 #ifndef PROTON_TERMINUS_HPP
2 #define PROTON_TERMINUS_HPP
3 
4 /*
5  *
6  * Licensed to the Apache Software Foundation (ASF) under one
7  * or more contributor license agreements. See the NOTICE file
8  * distributed with this work for additional information
9  * regarding copyright ownership. The ASF licenses this file
10  * to you under the Apache License, Version 2.0 (the
11  * "License"); you may not use this file except in compliance
12  * with the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing,
17  * software distributed under the License is distributed on an
18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19  * KIND, either express or implied. See the License for the
20  * specific language governing permissions and limitations
21  * under the License.
22  *
23  */
24 
25 #include "./types_fwd.hpp"
26 #include "./internal/export.hpp"
27 
28 #include <proton/terminus.h>
29 
30 #include <string>
31 
32 struct pn_link_t;
33 struct pn_terminus_t;
34 
35 namespace proton {
36 
37 namespace internal {
38 template <class T> class factory;
39 }
40 
47 class terminus {
49  terminus(pn_terminus_t* t);
51 
52  public:
53  terminus() : object_(0), parent_(0) {}
54 
58  NONDURABLE = PN_NONDURABLE,
60  CONFIGURATION = PN_CONFIGURATION,
62  UNSETTLED_STATE = PN_DELIVERIES
63  };
64 
68  LINK_CLOSE = PN_EXPIRE_WITH_LINK,
70  SESSION_CLOSE = PN_EXPIRE_WITH_SESSION,
72  CONNECTION_CLOSE = PN_EXPIRE_WITH_CONNECTION,
74  NEVER = PN_EXPIRE_NEVER
75  };
76 
77  // XXX This should have address?
78 
80  PN_CPP_EXTERN enum expiry_policy expiry_policy() const;
81 
84  PN_CPP_EXTERN duration timeout() const;
85 
87  PN_CPP_EXTERN enum durability_mode durability_mode();
88 
90  PN_CPP_EXTERN bool dynamic() const;
91 
94  PN_CPP_EXTERN value node_properties() const;
95 
96  protected:
97  pn_terminus_t *pn_object() { return object_; }
98  private:
99  pn_terminus_t* object_;
100  pn_link_t* parent_;
101 
103  friend class internal::factory<terminus>;
104  friend class source;
105  friend class target;
107 };
108 
109 } // proton
110 
111 #endif // PROTON_TERMINUS_HPP
One end of a link, either a source or a target.
Definition: terminus.hpp:47
expiry_policy
When expiration of the source or target begins.
Definition: terminus.hpp:66
A span of time in milliseconds.
Definition: duration.hpp:36
A point of origin for messages.
Definition: source.hpp:41
Forward declarations for all the C++ types used by Proton to represent AMQP types.
A holder for any AMQP value, simple or complex.
Definition: value.hpp:55
A destination for messages.
Definition: target.hpp:42
The main Proton namespace.
Definition: annotation_key.hpp:30
durability_mode
The persistence mode of the source or target.
Definition: terminus.hpp:56