ICalGLib.Parser

g GObject.Object GObject.Object ICalGLib.Object ICalGLib.Object GObject.Object->ICalGLib.Object ICalGLib.Parser ICalGLib.Parser ICalGLib.Object->ICalGLib.Parser

Subclasses:

None

Methods

Inherited:

ICalGLib.Object (11), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

parse_string (str)

add_line (str)

clean ()

free ()

get_line (func, *user_data)

get_state ()

parse (func, *user_data)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

ICalGLib.Object (5)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class ICalGLib.Parser(**kwargs)
Bases:

ICalGLib.Object

Abstract:

No

Structure:

ICalGLib.ParserClass

This is the ICalGLib.Parser instance.

classmethod new()
Returns:

The newly created ICalGLib.Parser.

Return type:

ICalGLib.Parser

Creates a default ICalGLib.Parser.

New in version 1.0.

classmethod parse_string(str)
Parameters:

str (str) – The string to be parsed

Returns:

The ICalGLib.Component parsed from str.

Return type:

ICalGLib.Component

Parses the string into a ICalGLib.Component.

New in version 1.0.

add_line(str)
Parameters:

str (str or None) – A line of string representation of the ICalGLib.Component

Returns:

The complete ICalGLib.Component.

Return type:

ICalGLib.Component or None

Add a line at one time into the ICalGLib.Parser until the parsing is complete and ICalGLib.Component will be returned.

New in version 1.0.

clean()
Returns:

The root ICalGLib.Component in self.

Return type:

ICalGLib.Component or None

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.

New in version 1.0.

free()

Frees a ICalGLib.Parser.

New in version 1.0.

get_line(func, *user_data)
Parameters:
Returns:

A single iCal content line.

Return type:

str

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

New in version 1.0.

get_state()
Returns:

The parser state stored in the ICalGLib.Parser.

Return type:

ICalGLib.ParserState

Gets the state of the target parser.

New in version 1.0.

parse(func, *user_data)
Parameters:
Returns:

The component output by the parser.

Return type:

ICalGLib.Component

icalparser_parse takes a string that holds the text ( in RFC 2445 format ) and returns a pointer to an ICalGLib.Component. The caller owns the memory. func is a pointer to a function that returns one content line per invocation.

New in version 1.0.