libkcal
icalparser.h File Reference
Line-oriented parsing. More...
#include "icalenums.h"
#include "icaltypes.h"
#include "icalcomponent.h"
#include <stdio.h>
Go to the source code of this file.
Typedefs | |
typedef struct icalparser_impl | icalparser |
Enumerations | |
enum | icalparser_state { ICALPARSER_ERROR, ICALPARSER_SUCCESS, ICALPARSER_BEGIN_COMP, ICALPARSER_END_COMP, ICALPARSER_IN_PROGRESS } |
Functions | |
icalcomponent * | icalparser_add_line (icalparser *parser, char *str) |
icalcomponent * | icalparser_clean (icalparser *parser) |
void | icalparser_free (icalparser *parser) |
char * | icalparser_get_line (icalparser *parser, char *(*line_gen_func)(char *s, size_t size, void *d)) |
icalparser_state | icalparser_get_state (icalparser *parser) |
icalparser * | icalparser_new (void) |
icalcomponent * | icalparser_parse (icalparser *parser, char *(*line_gen_func)(char *s, size_t size, void *d)) |
icalcomponent * | icalparser_parse_string (const char *str) |
icalvalue * | icalparser_parse_value (icalvalue_kind kind, const char *str, icalcomponent **errors) |
void | icalparser_set_gen_data (icalparser *parser, void *data) |
char * | icalparser_string_line_generator (char *out, size_t buf_size, void *d) |
Detailed Description
Line-oriented parsing.Create a new parser via icalparse_new_parser, then add lines one at a time with icalparse_add_line(). icalparser_add_line() will return non-zero when it has finished with a component.
Definition in file icalparser.h.
Typedef Documentation
typedef struct icalparser_impl icalparser |
Definition at line 36 of file icalparser.h.
Enumeration Type Documentation
enum icalparser_state |
- Enumerator:
-
ICALPARSER_ERROR ICALPARSER_SUCCESS ICALPARSER_BEGIN_COMP ICALPARSER_END_COMP ICALPARSER_IN_PROGRESS
Definition at line 48 of file icalparser.h.
Function Documentation
icalcomponent* icalparser_add_line | ( | icalparser * | parser, | |
char * | str | |||
) |
icalcomponent* icalparser_clean | ( | icalparser * | parser | ) |
void icalparser_free | ( | icalparser * | parser | ) |
char* icalparser_get_line | ( | icalparser * | parser, | |
char *(*)(char *s, size_t size, void *d) | line_gen_func | |||
) |
Given a line generator function, return a single iCal content line.
icalparser_state icalparser_get_state | ( | icalparser * | parser | ) |
icalparser* icalparser_new | ( | void | ) |
icalcomponent* icalparser_parse | ( | icalparser * | parser, | |
char *(*)(char *s, size_t size, void *d) | line_gen_func | |||
) |
Message oriented parsing.
icalparser_parse takes a string that holds the text ( in RFC 2445 format ) and returns a pointer to an icalcomponent. The caller owns the memory. line_gen_func is a pointer to a function that returns one content line per invocation
icalcomponent* icalparser_parse_string | ( | const char * | str | ) |
icalvalue* icalparser_parse_value | ( | icalvalue_kind | kind, | |
const char * | str, | |||
icalcomponent ** | errors | |||
) |
Use the flex/bison parser to turn a string into a value type.
void icalparser_set_gen_data | ( | icalparser * | parser, | |
void * | data | |||
) |
Set the data that icalparser_parse will give to the line_gen_func as the parameter 'd'.
char* icalparser_string_line_generator | ( | char * | out, | |
size_t | buf_size, | |||
void * | d | |||
) |