23#ifndef __STUMPLESS_PARAM_H
24# define __STUMPLESS_PARAM_H
27# include <stumpless/config.h>
31# define STUMPLESS_MAX_PARAM_NAME_LENGTH 32
40#ifdef STUMPLESS_JOURNALD_TARGETS_SUPPORTED
128# ifdef STUMPLESS_JOURNALD_TARGETS_SUPPORTED
130 stumpless_param_namer_func_t get_journald_name;
132# ifdef STUMPLESS_THREAD_SAFETY_SUPPORTED
#define STUMPLESS_PUBLIC_FUNCTION
Marks functions that are provided for use by the library.
Definition config.h:31
Types and functions for creating and modifying entries.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_param * stumpless_set_param_value(struct stumpless_param *param, const char *value)
Sets the value of the given param.
STUMPLESS_PUBLIC_FUNCTION const char * stumpless_param_to_string(const struct stumpless_param *param)
Returns the name and the value from param as a formatted string.
STUMPLESS_PUBLIC_FUNCTION void stumpless_destroy_param(const struct stumpless_param *param)
Destroys a param, freeing any allocated memory.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_param * stumpless_copy_param(const struct stumpless_param *param)
Creates a copy of a param.
STUMPLESS_PUBLIC_FUNCTION const char * stumpless_get_param_value(const struct stumpless_param *param)
Returns the value of the given param.
#define STUMPLESS_MAX_PARAM_NAME_LENGTH
The maximum length of a parameter name, as specified by RFC 5424.
Definition param.h:31
STUMPLESS_PUBLIC_FUNCTION void stumpless_unload_param(const struct stumpless_param *param)
Unloads a param.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_param * stumpless_new_param_from_string(const char *string)
Creates a new param given a string by parsing the string and calling stumpless_new_param.
STUMPLESS_PUBLIC_FUNCTION const char * stumpless_get_param_name(const struct stumpless_param *param)
Returns the name of the given param.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_param * stumpless_new_param(const char *name, const char *value)
Creates a new param with the given name and value.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_param * stumpless_set_param_name(struct stumpless_param *param, const char *name)
Sets the name of the given param.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_param * stumpless_load_param(struct stumpless_param *param, const char *name, const char *value)
Loads a provided param with the given values.
A log entry.
Definition entry.h:60
A parameter within a structured data element.
Definition param.h:93
size_t name_length
The number of characters in name (not including the NULL character).
Definition param.h:110
char * value
The value may be any UTF-8 string.
Definition param.h:125
char name[32+1]
The name of the parameter.
Definition param.h:108
size_t value_length
The number of characters in value (not including the NULL character).
Definition param.h:127