summaryrefslogtreecommitdiffabout
path: root/libical/src/libical/icalparser.h
Unidiff
Diffstat (limited to 'libical/src/libical/icalparser.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libical/src/libical/icalparser.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/libical/src/libical/icalparser.h b/libical/src/libical/icalparser.h
index 5e1c88f..7773af4 100644
--- a/libical/src/libical/icalparser.h
+++ b/libical/src/libical/icalparser.h
@@ -33,16 +33,17 @@
33 33
34#include <stdio.h> /* For FILE* */ 34#include <stdio.h> /* For FILE* */
35 35
36typedef void* icalparser; 36typedef struct icalparser_impl icalparser;
37 37
38 38
39/*********************************************************************** 39/**
40 * Line-oriented parsing. 40 * @file icalparser.h
41 * @brief Line-oriented parsing.
41 * 42 *
42 * Create a new parser via icalparse_new_parser, then add ines one at 43 * Create a new parser via icalparse_new_parser, then add lines one at
43 * a time with icalparse_add_line(). icalparser_add_line() will return 44 * a time with icalparse_add_line(). icalparser_add_line() will return
44 * non-zero when it has finished with a component. 45 * non-zero when it has finished with a component.
45 ***********************************************************************/ 46 */
46 47
47typedef enum icalparser_state { 48typedef enum icalparser_state {
48 ICALPARSER_ERROR, 49 ICALPARSER_ERROR,
@@ -59,18 +60,20 @@ icalparser_state icalparser_get_state(icalparser* parser);
59void icalparser_free(icalparser* parser); 60void icalparser_free(icalparser* parser);
60 61
61 62
62/*********************************************************************** 63/**
63 * Message oriented parsing. icalparser_parse takes a string that 64 * Message oriented parsing. icalparser_parse takes a string that
64 * holds the text ( in RFC 2445 format ) and returns a pointer to an 65 * holds the text ( in RFC 2445 format ) and returns a pointer to an
65 * icalcomponent. The caller owns the memory. line_gen_func is a 66 * icalcomponent. The caller owns the memory. line_gen_func is a
66 * pointer to a function that returns one content line per invocation 67 * pointer to a function that returns one content line per invocation
67 **********************************************************************/ 68 */
68 69
69icalcomponent* icalparser_parse(icalparser *parser, 70icalcomponent* icalparser_parse(icalparser *parser,
70 char* (*line_gen_func)(char *s, size_t size, void *d)); 71 char* (*line_gen_func)(char *s, size_t size, void *d));
71 72
72/* Set the data that icalparser_parse will give to the line_gen_func 73/**
73 as the parameter 'd'*/ 74 Set the data that icalparser_parse will give to the line_gen_func
75 as the parameter 'd'
76 */
74void icalparser_set_gen_data(icalparser* parser, void* data); 77void icalparser_set_gen_data(icalparser* parser, void* data);
75 78
76 79
@@ -81,13 +84,13 @@ icalcomponent* icalparser_parse_string(const char* str);
81 * Parser support functions 84 * Parser support functions
82 ***********************************************************************/ 85 ***********************************************************************/
83 86
84/* Use the flex/bison parser to turn a string into a value type */ 87/** Use the flex/bison parser to turn a string into a value type */
85icalvalue* icalparser_parse_value(icalvalue_kind kind, 88icalvalue* icalparser_parse_value(icalvalue_kind kind,
86 const char* str, icalcomponent** errors); 89 const char* str, icalcomponent** errors);
87 90
88/* Given a line generator function, return a single iCal content line.*/ 91/** Given a line generator function, return a single iCal content line.*/
89char* icalparser_get_line(icalparser* parser, char* (*line_gen_func)(char *s, size_t size, void *d)); 92char* icalparser_get_line(icalparser* parser, char* (*line_gen_func)(char *s, size_t size, void *d));
90 93
91char* string_line_generator(char *out, size_t buf_size, void *d); 94char* icalparser_string_line_generator(char *out, size_t buf_size, void *d);
92 95
93#endif /* !ICALPARSE_H */ 96#endif /* !ICALPARSE_H */