e-cal-component-period

e-cal-component-period — An ECalComponentPeriod structure

Functions

Types and Values

Object Hierarchy

    GBoxed
    ╰── ECalComponentPeriod

Includes

#include <libecal/libecal.h>

Description

Contains functions to work with the ECalComponentPeriod structure.

Functions

e_cal_component_period_new_datetime ()

ECalComponentPeriod *
e_cal_component_period_new_datetime (const ICalTime *start,
                                     const ICalTime *end);

Creates a new ECalComponentPeriod of kind E_CAL_COMPONENT_PERIOD_DATETIME. The returned structure should be freed with e_cal_component_period_free(), when no longer needed.

Parameters

start

an ICalTime, the start of the period.

[not nullable]

end

an ICalTime, the end of the period.

[nullable]

Returns

a newly allocated ECalComponentPeriod.

[transfer full]

Since: 3.34


e_cal_component_period_new_duration ()

ECalComponentPeriod *
e_cal_component_period_new_duration (const ICalTime *start,
                                     const ICalDuration *duration);

Creates a new ECalComponentPeriod of kind E_CAL_COMPONENT_PERIOD_DURATION. The returned structure should be freed with e_cal_component_period_free(), when no longer needed.

Parameters

start

an ICalTime, the start of the period.

[not nullable]

duration

an ICalDuration, the duration of the period.

[not nullable]

Returns

a newly allocated ECalComponentPeriod.

[transfer full]

Since: 3.34


e_cal_component_period_copy ()

ECalComponentPeriod *
e_cal_component_period_copy (const ECalComponentPeriod *period);

Parameters

period

an ECalComponentPeriod to copy.

[not nullable]

Returns

a newly allocated ECalComponentPeriod, copy of period . The returned structure should be freed with e_cal_component_period_free(), when no longer needed.

[transfer full]

Since: 3.34


e_cal_component_period_free ()

void
e_cal_component_period_free (gpointer period);

Free the period , previously allocated by e_cal_component_period_new_datetime(), e_cal_component_period_new_duration() or e_cal_component_period_copy().

[skip]

Parameters

period

an ECalComponentPeriod to free.

[type ECalComponentPeriod][nullable]

Since: 3.34


e_cal_component_period_get_kind ()

ECalComponentPeriodKind
e_cal_component_period_get_kind (const ECalComponentPeriod *period);

Returns kind of the period , one of ECalComponentPeriodKind. Depending on it either e_cal_component_period_get_end()/e_cal_component_period_set_end() or e_cal_component_period_get_duration()/e_cal_component_period_set_duration() can be used. The kind of an existing period canbe changed with e_cal_component_period_set_datetime_full() and e_cal_component_period_set_duration_full().

Parameters

period

an ECalComponentPeriod

 

Returns

kind of the period, one of ECalComponentPeriodKind

Since: 3.34


e_cal_component_period_set_datetime_full ()

void
e_cal_component_period_set_datetime_full
                               (ECalComponentPeriod *period,
                                const ICalTime *start,
                                const ICalTime *end);

Set the kind of period to be E_CAL_COMPONENT_PERIOD_DATETIME and fills the content with start and end .

Parameters

period

an ECalComponentPeriod

 

start

an ICalTime, the start of the period .

[not nullable]

end

an ICalTime, the end of the period .

[nullable]

Since: 3.34


e_cal_component_period_set_duration_full ()

void
e_cal_component_period_set_duration_full
                               (ECalComponentPeriod *period,
                                const ICalTime *start,
                                const ICalDuration *duration);

Set the kind of period to be E_CAL_COMPONENT_PERIOD_DURATION and fills the content with start and duration .

Parameters

period

an ECalComponentPeriod

 

start

an ICalTime, the start of the period .

[not nullable]

duration

an ICalDuration, the duration of the period .

[not nullable]

Since: 3.34


e_cal_component_period_get_start ()

ICalTime *
e_cal_component_period_get_start (const ECalComponentPeriod *period);

Returns the start of the period . The returned ICalTime object is owned by period and should not be freed. It's valid until the period is freed or its start time changed.

Parameters

period

an ECalComponentPeriod

 

Returns

the start of the period , as an ICalTime.

[transfer none]

Since: 3.34


e_cal_component_period_set_start ()

void
e_cal_component_period_set_start (ECalComponentPeriod *period,
                                  const ICalTime *start);

Set the start of the period . This can be called on any kind of the period .

Parameters

period

an ECalComponentPeriod

 

start

an ICalTime, the start of the period .

[not nullable]

Since: 3.34


e_cal_component_period_get_end ()

ICalTime *
e_cal_component_period_get_end (const ECalComponentPeriod *period);

Returns the end of the period . This can be called only on period objects of kind E_CAL_COMPONENT_PERIOD_DATETIME. The end time can be a null-time, in which case the period corresponds to a single date/date-time value, not to a period.

The returned ICalTime object is owned by period and should not be freed. It's valid until the period is freed or its end time changed.

Parameters

period

an ECalComponentPeriod

 

Returns

the end of the period, as an ICalTime.

[transfer none][nullable]

Since: 3.34


e_cal_component_period_set_end ()

void
e_cal_component_period_set_end (ECalComponentPeriod *period,
                                const ICalTime *end);

Set the end of the period . This can be called only on period objects of kind E_CAL_COMPONENT_PERIOD_DATETIME.

Parameters

period

an ECalComponentPeriod

 

end

an ICalTime, the end of the period .

[nullable]

Since: 3.34


e_cal_component_period_get_duration ()

ICalDuration *
e_cal_component_period_get_duration (const ECalComponentPeriod *period);

Returns the duration of the period . This can be called only on period objects of kind E_CAL_COMPONENT_PERIOD_DURATION. The returned ICalDuration object is owned by period and should not be freed. It's valid until the period is freed or its duration changed.

Parameters

period

an ECalComponentPeriod

 

Returns

the duration of the period, as an ICalDuration.

[transfer none]

Since: 3.34


e_cal_component_period_set_duration ()

void
e_cal_component_period_set_duration (ECalComponentPeriod *period,
                                     const ICalDuration *duration);

Set the duration of the period . This can be called only on period objects of kind E_CAL_COMPONENT_PERIOD_DURATION.

Parameters

period

an ECalComponentPeriod

 

duration

an ICalDuration, the duration of the period .

[not nullable]

Since: 3.34

Types and Values

ECalComponentPeriod

typedef struct _ECalComponentPeriod ECalComponentPeriod;

Period of time, can have explicit start/end times or start/duration instead. Use the functions below to work with it.