Functions

  bt ()
  errno_return ()
  error_clear_errno ()
  error_crash_here ()
  error_get_error_state (error)
  error_perror ()
  error_restore (error, es)
  error_set_errno (x)
  error_set_error_state (error, state)
  error_stop_here ()
  error_strerror (e)
  error_supress (error)
  get_unknown_token_handling_setting ()
  memory_add_tmp_buffer (buf)
  memory_append_char (buf, pos, ch)
  memory_append_string (buf, pos, str)
  memory_free_buffer (buf)
  memory_new_buffer (size)
  memory_resize_buffer (buf, size)
  memory_strdup (s)
  memory_tmp_buffer (size)
  memory_tmp_copy (str)
  mime_parse (func, *user_data)
  recur_expand_recurrence (rule, start, count)
  request_status_code (stat)
  request_status_desc (stat)
  request_status_from_num (major, minor)
  request_status_major (stat)
  request_status_minor (stat)
  restriction_check (comp)
  restriction_compare (restr, count)
  set_unknown_token_handling_setting (newSetting)

Details

ICalGLib.bt()

New in version 1.0.

ICalGLib.errno_return()
Returns:Return the error happened
Return type:ICalGLib.ErrorEnum

Return 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:ICalGLib.ErrorState

Get the state of an error

New in version 1.0.

ICalGLib.error_perror()
Returns:The string representation of the current error
Return type:str

Get 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:

Restore the error to specified state

New in version 1.0.

ICalGLib.error_set_errno(x)
Parameters:x (ICalGLib.ErrorEnum) – The error to be set

Set the errno.

New in version 1.0.

ICalGLib.error_set_error_state(error, state)
Parameters:

Set 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) – The ICalGLib.ErrorEnum to be translated
Returns:The string representation of e
Return type:str

Translate 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:ICalGLib.ErrorState

Suppress the error

New in version 1.0.

ICalGLib.get_unknown_token_handling_setting()
Returns:The setting of ICalGLib.Unknowntokenhandling
Return type:ICalGLib.Unknowntokenhandling

Get the setting of ICalGLib.Unknowntokenhandling

New in version 1.0.

ICalGLib.memory_add_tmp_buffer(buf)
Parameters:buf (object or None) – The existing buffer to be added into the ical

Add an existing buffer to the buffer ring

New in version 1.0.

ICalGLib.memory_append_char(buf, pos, ch)
Parameters:
  • buf ([int]) – The buffer to be appended. It should not be the memory in ical.
  • pos ([int]) – The position at which the new string to be appended.
  • ch (int) – The character to be allocated
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:

(buf: [int], pos: [int])

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:
  • buf ([int]) – The buffer to be appended. It should not be the memory in ical.
  • pos ([int]) – The position at which the new string to be appended.
  • str (str) – The string to be allocated
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:

(buf: [int], pos: [int])

Append 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)
Parameters:buf (object or None) – The buffer to be freed.

Free 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:object or None

Create 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:
  • buf (object or None) – The buffer needs to be resized.
  • size (int) – The target size the buffer to be resized to.
Returns:

The buffer after being resized.

Return type:

object or None

Resize the buffer to the target size.

New in version 1.0.

ICalGLib.memory_strdup(s)
Parameters:s (str) – The string to be cloned.
Returns:The cloned string.
Return type:str

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:object or None

Create a buffer with target size.

New in version 1.0.

ICalGLib.memory_tmp_copy(str)
Parameters:str (str) – The string to be copied
Returns:The new copy of the str.
Return type:str

Like strdup, but the buffer is on the ring.

New in version 1.0.

ICalGLib.mime_parse(func, *user_data)
Parameters:
Returns:

The parsed ICalGLib.Component

Return type:

ICalGLib.Component

Parse data to ICalGLib.Component using the given function.

New in version 1.0.

ICalGLib.recur_expand_recurrence(rule, start, count)
Parameters:
  • rule (str) – The rule of the recurrence.
  • start (int) – the start seconds past the POSIX epoch.
  • count (int) – The number of elements to be filled up in the array.
Returns:

If successful, return the array. None if failed.

Return type:

[int]

Fill 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) – The ICalGLib.RequestStatus to be queried
Returns:The code for a request status
Return type:str

Return the code for a request status

New in version 1.0.

ICalGLib.request_status_desc(stat)
Parameters:stat (ICalGLib.RequestStatus) – The ICalGLib.RequestStatus to be translated
Returns:The description of the stat
Return type:str

Return the descriptive text for a request status

New in version 1.0.

ICalGLib.request_status_from_num(major, minor)
Parameters:
  • major (int) – The major number
  • minor (int) – The minor number
Returns:

The corresponding ICalGLib.RequestStatus

Return type:

ICalGLib.RequestStatus

Return a request status for major/minor status numbers

New in version 1.0.

ICalGLib.request_status_major(stat)
Parameters:stat (ICalGLib.RequestStatus) – The ICalGLib.RequestStatus to be queried
Returns:The major number for a request status
Return type:int

Return the major number for a request status

New in version 1.0.

ICalGLib.request_status_minor(stat)
Parameters:stat (ICalGLib.RequestStatus) – The ICalGLib.RequestStatus to be queried
Returns:The minor number for a request status
Return type:int

Return 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:int

Check whether the ICalGLib.Component is valid.

New in version 1.0.

ICalGLib.restriction_compare(restr, count)
Parameters:
Returns:

Whether it is valid or not. -1 indicates invalid or more analysis. 1 indicates pass and 0 or 2+ indicates fail.

Return type:

int

Compare 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) – A ICalGLib.Unknowntokenhandling

Set the setting of ICalGLib.Unknowntokenhandling

New in version 1.0.