24#include "libical_ical_export.h"
73typedef char *(*icalparser_line_gen_func) (
char *s,
size_t size,
void *d);
272 icalparser_line_gen_func line_gen_func);
359 icalparser_line_gen_func line_gen_func);
361LIBICAL_ICAL_EXPORT
char *icalparser_string_line_generator(
char *out,
size_t buf_size,
void *d);
icalcomponent * icalparser_parse(icalparser *parser, icalparser_line_gen_func line_gen_func)
Message oriented parsing.
Definition icalparser.c:634
void icalparser_free(icalparser *parser)
Frees an icalparser object.
Definition icalparser.c:123
void icalparser_set_ctrl(enum icalparser_ctrl ctrl)
Set the parser setting how to handle CONTROL characters.
Definition icalparser.c:1422
enum icalparser_ctrl icalparser_get_ctrl(void)
Get the current parser setting how to handle CONTROL characters.
Definition icalparser.c:1417
icalcomponent * icalparser_parse_string(const char *str)
Parses a string and returns the parsed icalcomponent.
Definition icalparser.c:1392
icalparser_ctrl
Defines how to handle invalid CONTROL characters in content lines.
Definition icalparser.h:319
@ ICALPARSER_CTRL_OMIT
Definition icalparser.h:323
@ ICALPARSER_CTRL_KEEP
Definition icalparser.h:321
@ ICALPARSER_CTRL_ERROR
Definition icalparser.h:325
icalparser * icalparser_new(void)
Creates a new icalparser.
Definition icalparser.c:101
icalcomponent * icalparser_add_line(icalparser *parser, char *str)
Adds a single line to be parsed by the icalparser.
Definition icalparser.c:694
icalparser_state icalparser_get_state(icalparser *parser)
Returns current state of the icalparser.
Definition icalparser.c:1287
icalcomponent * icalparser_clean(icalparser *parser)
Cleans out an icalparser and returns whatever it has parsed so far.
Definition icalparser.c:1292
void icalparser_set_gen_data(icalparser *parser, void *data)
Sets the data that icalparser_parse will give to the line_gen_func as the parameter 'd'.
Definition icalparser.c:140
char * icalparser_get_line(icalparser *parser, icalparser_line_gen_func line_gen_func)
Given a line generator function, returns a single iCal content line.
Definition icalparser.c:485
icalparser_state
Represents the current state of the parser.
Definition icalparser.h:56
@ ICALPARSER_BEGIN_COMP
Definition icalparser.h:64
@ ICALPARSER_SUCCESS
Definition icalparser.h:61
@ ICALPARSER_END_COMP
Definition icalparser.h:67
@ ICALPARSER_IN_PROGRESS
Definition icalparser.h:70
@ ICALPARSER_ERROR
Definition icalparser.h:58
Definition icalcomponent.c:36
Definition icalparser.c:53