ICalParser

ICalParser

Functions

Types and Values

Description

Functions

i_cal_parser_new ()

ICalParser *
i_cal_parser_new (void);

Create a default ICalParser.

Returns

The newly created ICalParser.

[transfer full]

Since: 1.0


i_cal_parser_add_line ()

ICalComponent *
i_cal_parser_add_line (ICalParser *parser,
                       gchar *str);

Add a line at one time into the ICalParser until the parsing is complete and ICalComponent will be returned.

Parameters

parser

The ICalParser used to parse the string into the ICalComponent.

[in][transfer full]

str

A line of string representation of the ICalComponent.

[allow-none][transfer none]

Returns

The complete ICalComponent.

[allow-none][transfer full]

Since: 1.0


i_cal_parser_clean ()

ICalComponent *
i_cal_parser_clean (ICalParser *parser);

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

Parameters

parser

The parser to be cleaned and queried.

 

Returns

The root ICalComponent in parser .

[allow-none][transfer full]

Since: 1.0


i_cal_parser_get_state ()

ICalParserState
i_cal_parser_get_state (ICalParser *parser);

Get the state of the target parser.

Parameters

parser

The ICalParser to be queried.

 

Returns

The parser state stored in the ICalParser.

Since: 1.0


i_cal_parser_free ()

void
i_cal_parser_free (ICalParser *parser);

Free a ICalParser.

Parameters

parser

The ICalParser to be freed.

 

Since: 1.0


i_cal_parser_parse ()

ICalComponent *
i_cal_parser_parse (ICalParser *parser,
                    gchar* (*func) (gchar *,size_t,void *));

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

Parameters

parser

The parser used to parse the string and output the ICalComponent.

 

func

The function used to parse.

 

Returns

The component output by the parser.

[transfer full]

Since: 1.0


i_cal_parser_set_gen_data ()

void
i_cal_parser_set_gen_data (ICalParser *parser,
                           void *data);

Set the data that icalparser_parse will give to the line_gen_func as the parameter 'd'

Parameters

parser

The parser

 

data

Set the data that icalparser_parse will give to the line_gen_func as the parameter 'd'

 

Since: 1.0


i_cal_parser_parse_string ()

ICalComponent *
i_cal_parser_parse_string (const gchar *str);

Parse the string into a ICalComponent.

Parameters

str

The string to be parsed

 

Returns

The ICalComponent parsed from str.

[transfer full]

Since: 1.0


i_cal_parser_get_line ()

gchar *
i_cal_parser_get_line (ICalParser *parser,
                       gchar* (*func) (gchar *,size_t,void *));

Given a line generator function, return a single iCal content line.

Parameters

parser

The parser to be queried.

 

func

A line generator function.

 

Returns

A single iCal content line.

[transfer full]

Since: 1.0


i_cal_parser_string_line_generator ()

gchar *
i_cal_parser_string_line_generator (gchar *out,
                                    size_t buf_size,
                                    void *d);

The string line generator used as line_gen_func

Parameters

out

The input.

 

buf_size

The size of the buffer.

 

d

The data to be supplied.

 

Returns

The generated line.

[transfer full]

Since: 1.0

Types and Values

I_CAL_PARSER_TYPE

#define             I_CAL_PARSER_TYPE

ICalParser

typedef struct {
} ICalParser;

This is the ICalParser instance.


struct ICalParserClass

struct ICalParserClass {
};

This is the ICalParser class.


enum ICalParserState

Members

I_CAL_PARSER_ERROR

   

I_CAL_PARSER_SUCCESS

   

I_CAL_PARSER_BEGIN_COMP

   

I_CAL_PARSER_END_COMP

   

I_CAL_PARSER_IN_PROGRESS