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

Implements 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)
icalvalue * icalvalue_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 *v)
icalproperty * icalvalue_get_parent (const icalvalue *value)
bool icalvalue_is_valid (const icalvalue *value)
icalvalue_kind icalvalue_isa (const icalvalue *value)
bool icalvalue_isa_value (void *value)
icalvalue * icalvalue_new (icalvalue_kind kind)
icalvalue * icalvalue_new_from_string (icalvalue_kind kind, const char *str)
void icalvalue_reset_kind (icalvalue *value)
void icalvalue_set_parent (icalvalue *value, icalproperty *property)

Detailed Description

Implements the data structure representing iCalendar parameter values.

Definition in file icalvalue.c.

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 1211 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 1220 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 1353 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 1587 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 1553 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 793 of file icalvalue.c.

◆ icalvalue_get_parent()

icalproperty * icalvalue_get_parent ( const icalvalue * value)

Gets the parent icalproperty of the specified icalvalue.

Parameters
valuea pointer to the icalvalue
Returns
the parent icalproperty for the specified icalvalue.
Since
3.0

Definition at line 1548 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 867 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 1320 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 1329 of file icalvalue.c.

◆ 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 788 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 1528 of file icalvalue.c.

◆ icalvalue_set_parent()

void icalvalue_set_parent ( icalvalue * value,
icalproperty * property )

Sets the parent icalproperty for the specified icalvalue.

Parameters
valuea pointer to a valid icalvalue
propertya pointer to a presumably valid icalproperty to use

Definition at line 1541 of file icalvalue.c.