proton/terminus.h

Go to the documentation of this file.
00001 #ifndef PROTON_TERMINUS_H
00002 #define PROTON_TERMINUS_H 1
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 <proton/import_export.h>
00026 #include <proton/type_compat.h>
00027 #include <proton/codec.h>
00028 #include <stddef.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00053 typedef struct pn_terminus_t pn_terminus_t;
00054 
00058 typedef enum {
00059   PN_UNSPECIFIED = 0, 
00061   PN_SOURCE = 1, 
00062   PN_TARGET = 2, 
00063   PN_COORDINATOR = 3 
00065 } pn_terminus_type_t;
00066 
00075 typedef enum {
00076   PN_NONDURABLE = 0, 
00077   PN_CONFIGURATION = 1, 
00079   PN_DELIVERIES = 2 
00082 } pn_durability_t;
00083 
00092 typedef enum {
00093   PN_EXPIRE_WITH_LINK, 
00094   PN_EXPIRE_WITH_SESSION, 
00095   PN_EXPIRE_WITH_CONNECTION, 
00096   PN_EXPIRE_NEVER 
00097 } pn_expiry_policy_t;
00098 
00106 typedef enum {
00107   PN_DIST_MODE_UNSPECIFIED = 0, 
00108   PN_DIST_MODE_COPY = 1, 
00109   PN_DIST_MODE_MOVE = 2 
00110 } pn_distribution_mode_t;
00111 
00118 PN_EXTERN pn_terminus_type_t pn_terminus_get_type(pn_terminus_t *terminus);
00119 
00127 PN_EXTERN int pn_terminus_set_type(pn_terminus_t *terminus, pn_terminus_type_t type);
00128 
00139 PN_EXTERN const char *pn_terminus_get_address(pn_terminus_t *terminus);
00140 
00148 PN_EXTERN int pn_terminus_set_address(pn_terminus_t *terminus, const char *address);
00149 
00156 PN_EXTERN pn_distribution_mode_t pn_terminus_get_distribution_mode(const pn_terminus_t *terminus);
00157 
00165 PN_EXTERN int pn_terminus_set_distribution_mode(pn_terminus_t *terminus, pn_distribution_mode_t mode);
00166 
00173 PN_EXTERN pn_durability_t pn_terminus_get_durability(pn_terminus_t *terminus);
00174 
00182 PN_EXTERN int pn_terminus_set_durability(pn_terminus_t *terminus,
00183                                          pn_durability_t durability);
00184 
00191 PN_EXTERN pn_expiry_policy_t pn_terminus_get_expiry_policy(pn_terminus_t *terminus);
00192 
00200 PN_EXTERN bool pn_terminus_has_expiry_policy(const pn_terminus_t *terminus);
00201 
00209 PN_EXTERN int pn_terminus_set_expiry_policy(pn_terminus_t *terminus, pn_expiry_policy_t policy);
00210 
00211 
00212 
00219 PN_EXTERN pn_seconds_t pn_terminus_get_timeout(pn_terminus_t *terminus);
00220 
00228 PN_EXTERN int pn_terminus_set_timeout(pn_terminus_t *terminus, pn_seconds_t timeout);
00229 
00236 PN_EXTERN bool pn_terminus_is_dynamic(pn_terminus_t *terminus);
00237 
00245 PN_EXTERN int pn_terminus_set_dynamic(pn_terminus_t *terminus, bool dynamic);
00246 
00259 PN_EXTERN pn_data_t *pn_terminus_properties(pn_terminus_t *terminus);
00260 
00273 PN_EXTERN pn_data_t *pn_terminus_capabilities(pn_terminus_t *terminus);
00274 
00287 PN_EXTERN pn_data_t *pn_terminus_outcomes(pn_terminus_t *terminus);
00288 
00301 PN_EXTERN pn_data_t *pn_terminus_filter(pn_terminus_t *terminus);
00302 
00310 PN_EXTERN int pn_terminus_copy(pn_terminus_t *terminus, pn_terminus_t *src);
00311 
00316 #ifdef __cplusplus
00317 }
00318 #endif
00319 
00320 #endif /* terminus.h */

Generated on 3 Aug 2018 for Qpid Proton C by  doxygen 1.6.1