/**
* ICalParserLineGenFunc:
* @bytes: (array length=size) (element-type gchar): the bytes to process
* @size: the length of the bytes array
* @user_data: the user data
*
* Returns: One content line per invocation
*/
typedef gchar *(*ICalParserLineGenFunc)(gchar *bytes, size_t size, gpointer user_data);
Creates a default #ICalParser.
Add a line at one time into the #ICalParser until the parsing is complete and #ICalComponent will be returned.
We won't get a clean exit if some components did not have an "END" tag. Clear off any component that may be left in the list.
Gets the state of the target parser.
Frees a #ICalParser.
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. @func is a pointer to a function that returns one content line per invocation.
g_return_val_if_fail (parser != NULL && func != NULL, NULL);
icalparser_set_gen_data ((icalparser *)i_cal_object_get_native ((ICalObject *)parser), user_data);
return i_cal_component_new_full (icalparser_parse ((icalparser *)i_cal_object_get_native ((ICalObject *)parser), func), NULL);
Parses the string into a #ICalComponent.
Given a line generator function, returns a single iCal content line.
g_return_val_if_fail (parser != NULL && func != NULL, NULL);
icalparser_set_gen_data ((icalparser *)i_cal_object_get_native ((ICalObject *)parser), user_data);
return icalparser_get_line ((icalparser *)i_cal_object_get_native ((ICalObject *)parser), func);