Functions ========= .. currentmodule:: gi.repository.ICalGLib .. function:: bt() -> None .. versionadded:: 1.0 .. function:: errno_return() -> ~gi.repository.ICalGLib.ErrorEnum Returns the error stored in the library. If no error, return I_CAL_NO_ERROR. .. versionadded:: 1.0 :return: Return the error happened .. function:: error_clear_errno() -> None .. versionadded:: 1.0 .. function:: error_crash_here() -> None Shout out the errors to the compiler. .. versionadded:: 1.0 .. function:: error_get_error_state(error: ~gi.repository.ICalGLib.ErrorEnum) -> ~gi.repository.ICalGLib.ErrorState Gets the state of an error. .. versionadded:: 1.0 :param error: The error to be checked :return: The state of the ``error`` .. function:: error_perror() -> str Gets the :obj:`~gi.repository.ICalGLib.ErrorEnum` in the string representation. This method called the icalerrorno_return to get the current error. .. versionadded:: 1.0 :return: The string representation of the current error .. function:: error_restore(error: str, es: ~gi.repository.ICalGLib.ErrorState) -> None Restores the error to specified state. .. versionadded:: 1.0 :param error: The error to be restored :param es: The error state to be restored .. function:: error_set_errno(x: ~gi.repository.ICalGLib.ErrorEnum) -> None Sets the errno. .. versionadded:: 1.0 :param x: The error to be set .. function:: error_set_error_state(error: ~gi.repository.ICalGLib.ErrorEnum, state: ~gi.repository.ICalGLib.ErrorState) -> None Sets the state to the corresponding error in the library. .. versionadded:: 1.0 :param error: The error enum :param state: The error state .. function:: error_stop_here() -> None .. versionadded:: 1.0 .. function:: error_strerror(e: ~gi.repository.ICalGLib.ErrorEnum) -> str Translates the :obj:`~gi.repository.ICalGLib.ErrorEnum` to the string representation. .. versionadded:: 1.0 :param e: The :obj:`~gi.repository.ICalGLib.ErrorEnum` to be translated :return: The string representation of ``e`` .. function:: error_supress(error: str) -> ~gi.repository.ICalGLib.ErrorState Suppresses the error. .. versionadded:: 1.0 :param error: The error to be suppressed :return: The error state suppressed .. function:: get_unknown_token_handling_setting() -> ~gi.repository.ICalGLib.Unknowntokenhandling Gets the setting of :obj:`~gi.repository.ICalGLib.Unknowntokenhandling`\. .. versionadded:: 1.0 :return: The setting of :obj:`~gi.repository.ICalGLib.Unknowntokenhandling` .. function:: memory_add_tmp_buffer(buf: ~typing.Any = None) -> None Adds an existing buffer to the buffer ring. .. versionadded:: 1.0 :param buf: The existing buffer to be added into the ical .. function:: memory_append_char(buf: list[int], pos: list[int], ch: int) -> tuple[list[int], list[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. .. versionadded:: 1.0 :param buf: The buffer to be appended. It should not be the memory in ical. :param pos: The position at which the new string to be appended :param ch: The character to be allocated .. function:: memory_append_string(buf: list[int], pos: list[int], str: str) -> tuple[list[int], list[int]] 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. .. versionadded:: 1.0 :param buf: The buffer to be appended. It should not be the memory in ical. :param pos: The position at which the new string to be appended :param str: The string to be allocated .. function:: memory_free_buffer(buf: ~typing.Any = None) -> None Frees the buffer. .. versionadded:: 1.0 :param buf: The buffer to be freed .. function:: memory_new_buffer(size: int) -> ~typing.Any | None Creates a new buffer with target size. The caller should deallocate it when necessary. .. versionadded:: 1.0 :param size: The size of the new buffer to be created :return: The newly created buffer with the target size. .. function:: memory_resize_buffer(buf: ~typing.Any, size: int) -> ~typing.Any | None Resizes the buffer to the target size. .. versionadded:: 1.0 :param buf: The buffer needs to be resized :param size: The target size the buffer to be resized to :return: The buffer after being resized. .. function:: memory_strdup(s: str) -> str A wrapper around strdup. Partly to trap calls to strdup, partly because in -ansi, gcc on Red Hat claims that strdup is undeclared. .. versionadded:: 1.0 :param s: The string to be cloned :return: The cloned string. .. function:: memory_tmp_buffer(size: int) -> ~typing.Any | None Creates a buffer with target size. .. versionadded:: 1.0 :param size: The size of the buffer to be created :return: The newly created buffer .. function:: mime_parse(func: ~collections.abc.Callable[[list[int], ~typing.Any], str], user_data: ~typing.Any = None) -> ~gi.repository.ICalGLib.Component Parses data to :obj:`~gi.repository.ICalGLib.Component` using the given function. .. versionadded:: 1.0 :param func: The parsing function :param user_data: The date given to ``func`` :return: The parsed :obj:`~gi.repository.ICalGLib.Component` .. function:: recur_expand_recurrence(rule: str, start: int, count: int) -> list[int] 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. .. versionadded:: 1.0 :param rule: The rule of the recurrence :param start: The start seconds past the POSIX epoch :param count: The number of elements to be filled up in the ``array`` :return: If successful, return the array. NULL if failed. .. function:: request_status_code(stat: ~gi.repository.ICalGLib.RequestStatus) -> str Returns the code for a request status. .. versionadded:: 1.0 :param stat: The :obj:`~gi.repository.ICalGLib.RequestStatus` to be queried :return: The code for a request status .. function:: request_status_desc(stat: ~gi.repository.ICalGLib.RequestStatus) -> str Returns the descriptive text for a request status. .. versionadded:: 1.0 :param stat: The :obj:`~gi.repository.ICalGLib.RequestStatus` to be translated :return: The description of the ``stat`` .. function:: request_status_from_num(major: int, minor: int) -> ~gi.repository.ICalGLib.RequestStatus Returns a request status for major/minor status numbers. .. versionadded:: 1.0 :param major: The major number :param minor: The minor number :return: The corresponding :obj:`~gi.repository.ICalGLib.RequestStatus` .. function:: request_status_major(stat: ~gi.repository.ICalGLib.RequestStatus) -> int Returns the major number for a request status. .. versionadded:: 1.0 :param stat: The :obj:`~gi.repository.ICalGLib.RequestStatus` to be queried :return: The major number for a request status .. function:: request_status_minor(stat: ~gi.repository.ICalGLib.RequestStatus) -> int Returns the minor number for a request status. .. versionadded:: 1.0 :param stat: The :obj:`~gi.repository.ICalGLib.RequestStatus` to be queried :return: The minor number for a request status .. function:: restriction_check(comp: ~gi.repository.ICalGLib.Component) -> int Checks whether the :obj:`~gi.repository.ICalGLib.Component` is valid. .. versionadded:: 1.0 :param comp: The component to be checked :return: Whether the ``comp`` is valid. .. function:: restriction_compare(restr: ~gi.repository.ICalGLib.RestrictionKind, count: int) -> int Compares the kind of restriction and the count to determine whether it is valid. .. versionadded:: 1.0 :param restr: The restriction kind :param count: The number of restrictions :return: Whether it is valid or not. -1 indicates invalid or more analysis. 1 indicates pass and 0 or 2+ indicates fail. .. function:: set_unknown_token_handling_setting(newSetting: ~gi.repository.ICalGLib.Unknowntokenhandling) -> None Sets :obj:`~gi.repository.ICalGLib.Unknowntokenhandling`\. .. versionadded:: 1.0 :param newSetting: A :obj:`~gi.repository.ICalGLib.Unknowntokenhandling`