Libical API Documentation 4.0 STABLE VERSION [Visit the v3.0 documentation]
Loading...
Searching...
No Matches
icalvalue.h File Reference

Defines the data structure representing iCalendar parameter values. More...

Go to the source code of this file.

Functions

const char * icalvalue_as_ical_string (const icalvalue *value)
char * icalvalue_as_ical_string_r (const icalvalue *value)
icalvalueicalvalue_clone (const icalvalue *old)
icalparameter_xliccomparetype icalvalue_compare (const icalvalue *a, const icalvalue *b)
bool icalvalue_decode_ical_string (const char *szText, char *szDecText, int maxBufferLen)
bool icalvalue_encode_ical_string (const char *szText, char *szEncText, int maxBufferLen)
void icalvalue_free (icalvalue *value)
bool icalvalue_is_valid (const icalvalue *value)
icalvalue_kind icalvalue_isa (const icalvalue *value)
bool icalvalue_isa_value (void *value)
bool icalvalue_kind_is_valid (const icalvalue_kind kind)
const char * icalvalue_kind_to_string (const icalvalue_kind kind)
icalvalueicalvalue_new (icalvalue_kind kind)
icalvalueicalvalue_new_from_string (icalvalue_kind kind, const char *str)
void icalvalue_reset_kind (icalvalue *value)
icalvalue_kind icalvalue_string_to_kind (const char *str)

Detailed Description

Defines the data structure representing iCalendar parameter values.

Definition in file icalvalue.h.

Function Documentation

◆ icalvalue_as_ical_string()

const char * icalvalue_as_ical_string ( const icalvalue * value)

Create a string representation of an icalvalue.

Parameters
valuea pointer to a valid icalvalue
Returns
a pointer to a char string containing the string representatin of v value. NULL is returned is value is invalid.
See also
icalvalue_as_ical_string_r

Definition at line 1217 of file icalvalue.c.

◆ icalvalue_as_ical_string_r()

char * icalvalue_as_ical_string_r ( const icalvalue * value)

Create a string representation of an icalvalue.

Parameters
valuea pointer to a valid icalvalue
Returns
a pointer to a char string containing the string representatin of value. NULL is returned is value is invalid.
See also
icalvalue_as_ical_string

Definition at line 1226 of file icalvalue.c.

◆ icalvalue_clone()

icalvalue * icalvalue_clone ( const icalvalue * old)

Deeply clone an icalvalue.

Parameters
oldis a pointer to a valid icalvalue from which to clone
Returns
a pointer to the memory for the newly cloned icalvalue. Free the resulting memory using icalvalue_free.
Since
4.0

Definition at line 65 of file icalvalue.c.

◆ icalvalue_compare()

icalparameter_xliccomparetype icalvalue_compare ( const icalvalue * a,
const icalvalue * b )

Compares two icalvalues.

Parameters
aan icalvalue to compare
ban icalvalue to compare
Returns
an icalparameter_xliccomparetype representing how a and b compare; if the values do not have the same type ICAL_XLICCOMPARETYPE_NOTEQUAL is returned; ICAL_XLICCOMPARETYPE_NONE is returned if the values type is unknown or one of the values is null.

Definition at line 1356 of file icalvalue.c.

◆ icalvalue_decode_ical_string()

bool icalvalue_decode_ical_string ( const char * szText,
char * szDecText,
int maxBufferLen )

Decode the string that has been encoded by icalvalue_encode_ical_string().

Parameters
szTextis a pointer to a char string to be decoded
szDecTextis a pointer to a char string to contain the decoded input string upon return.
maxBufferLenis the maximum number of characters to encode
Returns
true if the decoding was successful; false otherwise.
See also
icalvalue_encode_ical_string

Definition at line 1590 of file icalvalue.c.

◆ icalvalue_encode_ical_string()

bool icalvalue_encode_ical_string ( const char * szText,
char * szEncText,
int maxBufferLen )

Encode a character string in ical format, escape certain characters, etc.

Parameters
szTextis a pointer to a char string to be encoded
szEncTextis a pointer to a char string to contain the encoded input string upon return.
maxBufferLenis the maximum number of characters to encode
Returns
true if the encoding was successful; false otherwise.
See also
icalvalue_decode_ical_string

Definition at line 1556 of file icalvalue.c.

◆ icalvalue_free()

void icalvalue_free ( icalvalue * value)

Free the memory for an icalvalue.

Parameters
valuea pointer to a valid icalvalue

Definition at line 796 of file icalvalue.c.

◆ icalvalue_is_valid()

bool icalvalue_is_valid ( const icalvalue * value)

Determine if the specified icalvalue is valid.

Parameters
valuea pointer to a icalvalue
Returns
true if value is valid; false otherwise.

Definition at line 873 of file icalvalue.c.

◆ icalvalue_isa()

icalvalue_kind icalvalue_isa ( const icalvalue * value)

Get the icalvalue_kind of an icalvalue.

Parameters
valuea pointer to a valid icalvalue
Returns
the icalvalue_kind of value. ICAL_NO_VALUE is returned if value is null.

Definition at line 1327 of file icalvalue.c.

◆ icalvalue_isa_value()

bool icalvalue_isa_value ( void * value)

Determine if the specified address points to an icalvalue.

Parameters
valuea pointer to a possible icalvalue.
Returns
true if the address points to an icalvalue; false otherwise.

Definition at line 1336 of file icalvalue.c.

◆ icalvalue_kind_is_valid()

bool icalvalue_kind_is_valid ( const icalvalue_kind kind)

Check the validity of the specified icalvalue_kind.

Parameters
kindis the icalvalue_kind to use
Returns
true if the icalvalue_kind is valid; false otherwise.

◆ icalvalue_kind_to_string()

const char * icalvalue_kind_to_string ( const icalvalue_kind kind)

Converts an icalvalue_kind to its string representation.

Parameters
kindis the icalvalue_kind to use
Returns
a pointer to a char string containing the string representation of the specified icalvalue_kind.

◆ icalvalue_new()

icalvalue * icalvalue_new ( icalvalue_kind kind)

Construct a new icalvalue of the specified icalvalue_kind.

Parameters
kindis the icalvalue_kind to use
Returns
a pointer to the newly allocated icalvalue. The data structure contains all null values and is essentially invalid. Free the resulting memory with icalvalue_free.

Definition at line 60 of file icalvalue.c.

◆ icalvalue_new_from_string()

icalvalue * icalvalue_new_from_string ( icalvalue_kind kind,
const char * str )

Construct and populate a new icalvalue of the specified icalvalue_kind.

Parameters
kindthe icalvalue_kind to use
stris a non-NULL pointer to the data used to populate the new icalvalue
Returns
a pointer to the newly allocated icalvalue. Free the resulting memory with icalvalue_free.

Definition at line 791 of file icalvalue.c.

◆ icalvalue_reset_kind()

void icalvalue_reset_kind ( icalvalue * value)

Resets the icalvalue_kind of the specified icalvalue.

Parameters
valuea pointer to a valid icalvalue

Definition at line 1531 of file icalvalue.c.

◆ icalvalue_string_to_kind()

icalvalue_kind icalvalue_string_to_kind ( const char * str)

Converts a char string into an icalvalue_kind.

Parameters
stra pointer to a char string containing the character representation of an icalvalue_kind
Returns
the icalvalue_kind associated with str. ICAL_NO_VALUE is returned if str is invalid.