187 const char *buf,
size_t maxlen);
207 char *buf,
size_t maxlen);
Internal definitions for CoRE Link format module.
ssize_t clif_attr_type_to_str(clif_attr_type_t type, const char **str)
Returns a constant string of a given attribute type.
ssize_t clif_decode_link(clif_t *link, clif_attr_t *attrs, unsigned attrs_len, const char *buf, size_t maxlen)
Decodes a string of link format.
clif_attr_type_t
Types of link format attributes.
ssize_t clif_add_target(const char *target, char *buf, size_t maxlen)
Adds a given target to a given buffer buf using link format.
ssize_t clif_add_target_from_buffer(const char *target, size_t target_len, char *buf, size_t maxlen)
Adds a given target to a given buffer buf using link format.
int clif_init_attr(clif_attr_t *attr, clif_attr_type_t type)
Initializes the key of a given attribute according to a given type.
ssize_t clif_get_target(const char *input, size_t input_len, char **output)
Looks for a the target URI of a given link.
ssize_t clif_get_attr(const char *input, size_t input_len, clif_attr_t *attr)
Looks for the first attribute in a given link.
clif_attr_type_t clif_get_attr_type(const char *input, size_t input_len)
Returns the attribute type of a given string.
ssize_t clif_encode_link(const clif_t *link, char *buf, size_t maxlen)
Encodes a given link in link format into a given buffer.
ssize_t clif_add_link_separator(char *buf, size_t maxlen)
Adds the link separator character to a given buf, using link format.
ssize_t clif_add_attr(clif_attr_t *attr, char *buf, size_t maxlen)
Adds a given attr to a given buffer buf using link format.
@ CLIF_ATTR_EXT
extensions
@ CLIF_ATTR_TITLE_EXT
title*
@ CLIF_NOT_FOUND
could not find a component in a buffer
@ CLIF_NO_SPACE
not enough space in the buffer
Link format attribute descriptor.
unsigned key_len
length of the attribute name
unsigned value_len
length of the value
const char * key
attribute name
char * value
string with the value
unsigned target_len
length of target string
unsigned attrs_len
size of array of attributes
char * target
target string
clif_attr_t * attrs
array of attributes