Libical API Documentation 4.0 UNRELEASED Go to the stable 3.0 documentation
Loading...
Searching...
No Matches
icaltypes.c File Reference

Implements the functions to manipulate internal types. More...

Go to the source code of this file.

Functions

ical_unknown_token_handling ical_get_unknown_token_handling_setting (void)
void ical_set_unknown_token_handling_setting (ical_unknown_token_handling newSetting)
const char * icalreqstattype_as_string (struct icalreqstattype stat)
char * icalreqstattype_as_string_r (struct icalreqstattype stat)
struct icalreqstattype icalreqstattype_from_string (const char *str)
struct icaltriggertype icaltriggertype_from_seconds (const int reltime)
struct icaltriggertype icaltriggertype_from_string (const char *str)
bool icaltriggertype_is_bad_trigger (struct icaltriggertype tr)
bool icaltriggertype_is_null_trigger (struct icaltriggertype tr)

Detailed Description

Implements the functions to manipulate internal types.

Definition in file icaltypes.c.

Function Documentation

◆ ical_get_unknown_token_handling_setting()

ical_unknown_token_handling ical_get_unknown_token_handling_setting ( void )

Gets how the library handles unknown tokens.

The default library setting is ICAL_TREAT_AS_ERROR.

Returns
the library's current ical_unknown_token_handling setting.
See also
ical_set_unknown_token_handling_setting

Definition at line 188 of file icaltypes.c.

◆ ical_set_unknown_token_handling_setting()

void ical_set_unknown_token_handling_setting ( ical_unknown_token_handling newSetting)

Sets how the library handles unknown tokens.

Parameters
newSettingis the ical_unknown_token_handling to use
See also
ical_get_unknown_token_handling_setting

Definition at line 205 of file icaltypes.c.

◆ icalreqstattype_as_string()

const char * icalreqstattype_as_string ( struct icalreqstattype stat)

Represent the specified icalreqstattype as a string.

Parameters
statthe icalreqstattype to use
Returns
a pointer to a char string containing the string representation of st at. NULL is returned only in case of a memory allocation failure.
See also
icalreqstattype_as_string_r

Definition at line 156 of file icaltypes.c.

◆ icalreqstattype_as_string_r()

char * icalreqstattype_as_string_r ( struct icalreqstattype stat)

Represent the specified icalreqstattype as a string.

Parameters
statthe icalreqstattype to use
Returns
a pointer to a char string containing the string representation of stat. NULL is returned only in case of a memory allocation failure.
See also
icalreqstattype_as_string

Definition at line 165 of file icaltypes.c.

◆ icalreqstattype_from_string()

struct icalreqstattype icalreqstattype_from_string ( const char * str)

Create an icalreqstattype from a character string.

Parameters
stra pointer to a char string containing the string representation of an icalreqstattype
Returns
the icalreqstattype representation of str. An unknown icalreqstattype (stat.code is ICAL_UNKNOWN_STATUS) is returned if str is invalid.

Definition at line 99 of file icaltypes.c.

◆ icaltriggertype_from_seconds()

struct icaltriggertype icaltriggertype_from_seconds ( const int reltime)

Construct an icaltriggertype from number of seconds.

The resulting icaltriggertype will a have a corresponding duration setting and a null time setting.

Parameters
reltimethe number of seconds to use, may be negative or positive.
Returns
an icaltriggertype with a duration of reltime.

Definition at line 51 of file icaltypes.c.

◆ icaltriggertype_from_string()

struct icaltriggertype icaltriggertype_from_string ( const char * str)

Construct an icaltriggertype from a char string representation.

Parameters
stra pointer to a char string containing a string representation of an icaltriggertype
Returns
an icaltriggertype corresponding to str. If the string representation is invalid, a null icaltriggertype is returned and the library internal error is set to :ICAL_MALFORMEDDATA_ERROR.

Definition at line 61 of file icaltypes.c.

◆ icaltriggertype_is_bad_trigger()

bool icaltriggertype_is_bad_trigger ( struct icaltriggertype tr)

Determine if the specified icaltriggertype is valid.

Parameters
tris the icaltriggertype to use
Returns
true if tr is valid; false otherwise.
See also
icaltriggertype_is_null_trigger

Definition at line 42 of file icaltypes.c.

◆ icaltriggertype_is_null_trigger()

bool icaltriggertype_is_null_trigger ( struct icaltriggertype tr)

Determine if the specified icaltriggertype is null.

A null icaltriggertype has null icaltime or a null icalduration.

Parameters
tris the icaltriggertype to use
Returns
true if tr is null; false otherwise.
See also
icaltriggertype_is_bad_trigger

Definition at line 33 of file icaltypes.c.