Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- ICalGLib.bt()¶
New in version 1.0.
- ICalGLib.errno_return()¶
- Returns:
Return the error happened
- Return type:
Returns the error stored in the library. If no error, return
ICalGLib.ErrorEnum.NO_ERROR
.New in version 1.0.
- ICalGLib.error_clear_errno()¶
New in version 1.0.
- ICalGLib.error_crash_here()¶
Shout out the errors to the compiler.
New in version 1.0.
- ICalGLib.error_get_error_state(error)¶
- Parameters:
error (
ICalGLib.ErrorEnum
) – The error to be checked- Returns:
The state of the error
- Return type:
Gets the state of an error.
New in version 1.0.
- ICalGLib.error_perror()¶
- Returns:
The string representation of the current error
- Return type:
Gets the
ICalGLib.ErrorEnum
in the string representation. This method called the icalerrorno_return to get the current error.New in version 1.0.
- ICalGLib.error_restore(error, es)¶
- Parameters:
error (
str
) – The error to be restoredes (
ICalGLib.ErrorState
) – The error state to be restored
Restores the error to specified state.
New in version 1.0.
- ICalGLib.error_set_errno(x)¶
- Parameters:
x (
ICalGLib.ErrorEnum
) – The error to be set
Sets the errno.
New in version 1.0.
- ICalGLib.error_set_error_state(error, state)¶
- Parameters:
error (
ICalGLib.ErrorEnum
) – The error enumstate (
ICalGLib.ErrorState
) – The error state
Sets the state to the corresponding error in the library.
New in version 1.0.
- ICalGLib.error_stop_here()¶
New in version 1.0.
- ICalGLib.error_strerror(e)¶
- Parameters:
e (
ICalGLib.ErrorEnum
) – TheICalGLib.ErrorEnum
to be translated- Returns:
The string representation of e
- Return type:
Translates the
ICalGLib.ErrorEnum
to the string representation.New in version 1.0.
- ICalGLib.error_supress(error)¶
- Parameters:
error (
str
) – The error to be suppressed- Returns:
The error state suppressed
- Return type:
Suppresses the error.
New in version 1.0.
- ICalGLib.get_unknown_token_handling_setting()¶
- Returns:
The setting of
ICalGLib.Unknowntokenhandling
- Return type:
Gets the setting of
ICalGLib.Unknowntokenhandling
.New in version 1.0.
- ICalGLib.memory_add_tmp_buffer(buf)¶
-
Adds an existing buffer to the buffer ring.
New in version 1.0.
- ICalGLib.memory_append_char(buf, pos, ch)¶
- Parameters:
- Returns:
- buf:
The buffer to be appended. It should not be the memory in ical.
- pos:
The position at which the new string to be appended
- Return type:
Append the character to the buffer. Only use them on normally allocated memory, or on buffers created from icalmemory_new_buffer, never with buffers created by icalmemory_tmp_buffer. If icalmemory_append_string has to resize a buffer on the ring, the ring will loose track of it an you will have memory problems.
New in version 1.0.
- ICalGLib.memory_append_string(buf, pos, str)¶
- Parameters:
- Returns:
- buf:
The buffer to be appended. It should not be the memory in ical.
- pos:
The position at which the new string to be appended
- Return type:
Appends the string to the buffer. Only use them on normally allocated memory, or on buffers created from icalmemory_new_buffer, never with buffers created by icalmemory_tmp_buffer. If icalmemory_append_string has to resize a buffer on the ring, the ring will loose track of it an you will have memory problems.
New in version 1.0.
- ICalGLib.memory_free_buffer(buf)¶
-
Frees the buffer.
New in version 1.0.
- ICalGLib.memory_new_buffer(size)¶
- Parameters:
size (
int
) – The size of the new buffer to be created- Returns:
The newly created buffer with the target size.
- Return type:
Creates a new buffer with target size. The caller should deallocate it when necessary.
New in version 1.0.
- ICalGLib.memory_resize_buffer(buf, size)¶
- Parameters:
- Returns:
The buffer after being resized.
- Return type:
Resizes the buffer to the target size.
New in version 1.0.
- ICalGLib.memory_strdup(s)¶
-
A wrapper around strdup. Partly to trap calls to strdup, partly because in -ansi, gcc on Red Hat claims that strdup is undeclared.
New in version 1.0.
- ICalGLib.memory_tmp_buffer(size)¶
- Parameters:
size (
int
) – The size of the buffer to be created- Returns:
The newly created buffer
- Return type:
Creates a buffer with target size.
New in version 1.0.
- ICalGLib.memory_tmp_copy(str)¶
-
Like strdup, but the buffer is on the ring.
New in version 1.0.
- ICalGLib.mime_parse(func, *user_data)¶
- Parameters:
func (
ICalGLib.MimeParseFunc
) – The parsing function
- Returns:
The parsed
ICalGLib.Component
- Return type:
Parses data to
ICalGLib.Component
using the given function.New in version 1.0.
- ICalGLib.recur_expand_recurrence(rule, start, count)¶
-
Fills an array with the ‘count’ number of occurrences generated by the rrule. Note that the times are returned in UTC, but the times are calculated in local time. YOu will have to convert the results back into local time before using them.
New in version 1.0.
- ICalGLib.request_status_code(stat)¶
- Parameters:
stat (
ICalGLib.RequestStatus
) – TheICalGLib.RequestStatus
to be queried- Returns:
The code for a request status
- Return type:
Returns the code for a request status.
New in version 1.0.
- ICalGLib.request_status_desc(stat)¶
- Parameters:
stat (
ICalGLib.RequestStatus
) – TheICalGLib.RequestStatus
to be translated- Returns:
The description of the stat
- Return type:
Returns the descriptive text for a request status.
New in version 1.0.
- ICalGLib.request_status_from_num(major, minor)¶
- Parameters:
- Returns:
The corresponding
ICalGLib.RequestStatus
- Return type:
Returns a request status for major/minor status numbers.
New in version 1.0.
- ICalGLib.request_status_major(stat)¶
- Parameters:
stat (
ICalGLib.RequestStatus
) – TheICalGLib.RequestStatus
to be queried- Returns:
The major number for a request status
- Return type:
Returns the major number for a request status.
New in version 1.0.
- ICalGLib.request_status_minor(stat)¶
- Parameters:
stat (
ICalGLib.RequestStatus
) – TheICalGLib.RequestStatus
to be queried- Returns:
The minor number for a request status
- Return type:
Returns the minor number for a request status.
New in version 1.0.
- ICalGLib.restriction_check(comp)¶
- Parameters:
comp (
ICalGLib.Component
) – The component to be checked- Returns:
Whether the comp is valid.
- Return type:
Checks whether the
ICalGLib.Component
is valid.New in version 1.0.
- ICalGLib.restriction_compare(restr, count)¶
- Parameters:
restr (
ICalGLib.RestrictionKind
) – The restriction kindcount (
int
) – The number of restrictions
- Returns:
Whether it is valid or not. -1 indicates invalid or more analysis. 1 indicates pass and 0 or 2+ indicates fail.
- Return type:
Compares the kind of restriction and the count to determine whether it is valid.
New in version 1.0.
- ICalGLib.set_unknown_token_handling_setting(newSetting)¶
- Parameters:
newSetting (
ICalGLib.Unknowntokenhandling
) – AICalGLib.Unknowntokenhandling
Sets
ICalGLib.Unknowntokenhandling
.New in version 1.0.