condition.h
Go to the documentation of this file.
#ifndef PROTON_CONDITION_H
#define PROTON_CONDITION_H 1
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
#include <proton/import_export.h>
#include <proton/codec.h>
#include <proton/type_compat.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct pn_condition_t pn_condition_t;
PN_EXTERN bool pn_condition_is_set(pn_condition_t *condition);
PN_EXTERN void pn_condition_clear(pn_condition_t *condition);
PN_EXTERN const char *pn_condition_get_name(pn_condition_t *condition);
PN_EXTERN int pn_condition_set_name(pn_condition_t *condition, const char *name);
PN_EXTERN const char *pn_condition_get_description(pn_condition_t *condition);
PN_EXTERN int pn_condition_set_description(pn_condition_t *condition, const char *description);
PN_EXTERN pn_data_t *pn_condition_info(pn_condition_t *condition);
PN_EXTERN int pn_condition_vformat(pn_condition_t *, const char *name, const char *fmt, va_list ap);
PN_EXTERN int pn_condition_format(pn_condition_t *, const char *name, const char *fmt, ...);
PN_EXTERN bool pn_condition_is_redirect(pn_condition_t *condition);
PN_EXTERN const char *pn_condition_redirect_host(pn_condition_t *condition);
PN_EXTERN int pn_condition_redirect_port(pn_condition_t *condition);
PN_EXTERN int pn_condition_copy(pn_condition_t *dest, pn_condition_t *src);
PN_EXTERN pn_condition_t *pn_condition(void);
PN_EXTERN void pn_condition_free(pn_condition_t *);
#ifdef __cplusplus
}
#endif
#endif /* condition.h */
codec.h
AMQP data encoding and decoding.
pn_condition_get_name
const char * pn_condition_get_name(pn_condition_t *condition)
Returns the name associated with the exceptional condition, or NULL if there is no conditional inform...
pn_condition_is_set
bool pn_condition_is_set(pn_condition_t *condition)
Returns true if the condition object is holding some information, i.e.
pn_condition_t
struct pn_condition_t pn_condition_t
An AMQP Condition object.
Definition: condition.h:64
pn_condition_info
pn_data_t * pn_condition_info(pn_condition_t *condition)
Returns a data object that holds the additional information associated with the condition.
pn_condition_format
int pn_condition_format(pn_condition_t *, const char *name, const char *fmt,...)
Set the name and printf-style formatted description.
pn_condition_redirect_host
const char * pn_condition_redirect_host(pn_condition_t *condition)
Retrieves the redirect host from the additional information associated with the condition.
pn_condition_set_description
int pn_condition_set_description(pn_condition_t *condition, const char *description)
Sets the description associated with the exceptional condition.
pn_condition_get_description
const char * pn_condition_get_description(pn_condition_t *condition)
Gets the description associated with the exceptional condition.
pn_condition_set_name
int pn_condition_set_name(pn_condition_t *condition, const char *name)
Sets the name associated with the exceptional condition.
pn_condition_clear
void pn_condition_clear(pn_condition_t *condition)
Clears the condition object of any exceptional information.
pn_condition
pn_condition_t * pn_condition(void)
Create a condition object.
pn_condition_vformat
int pn_condition_vformat(pn_condition_t *, const char *name, const char *fmt, va_list ap)
Set the name and printf-style formatted description.
pn_condition_free
void pn_condition_free(pn_condition_t *)
Free a condition object.
pn_condition_copy
int pn_condition_copy(pn_condition_t *dest, pn_condition_t *src)
Copy the src condition to the dst condition.
pn_condition_is_redirect
bool pn_condition_is_redirect(pn_condition_t *condition)
Returns true if the condition is a redirect.
pn_condition_redirect_port
int pn_condition_redirect_port(pn_condition_t *condition)
Retrieves the redirect port from the additional information associated with the condition.
pn_data_t
struct pn_data_t pn_data_t
An AMQP Data object.
Definition: codec.h:364