ECal.ComponentAlarms

Fields

None

Methods

class

new (comp)

add_instance (instance)

copy ()

get_component ()

get_instances ()

remove_instance (instance)

set_instances (instances)

take_instance (instance)

take_instances (instances)

Details

class ECal.ComponentAlarms

Opaque structure, which represents alarm trigger instances for a particular component. Use the functions below to work with it.

classmethod new(comp)
Parameters:

comp (ECal.Component or None) – the actual alarm component, as ECal.Component, or None

Returns:

a newly allocated ECal.ComponentAlarms

Return type:

ECal.ComponentAlarms

Creates a new ECal.ComponentAlarms structure, associated with comp. Free the alarms with e_cal_component_alarms_free(), when no longer needed.

The comp can be None since 3.48, in which case the respective instances hold the component they belong to.

Added in version 3.34.

add_instance(instance)
Parameters:

instance (ECal.ComponentAlarmInstance) – an ECal.ComponentAlarmInstance

Add a copy of instance into the list of instances. It is added in no particular order.

Added in version 3.34.

copy()
Returns:

a newly allocated copy of self

Return type:

ECal.ComponentAlarms

Returns a newly allocated copy of self, which should be freed with e_cal_component_alarms_free(), when no longer needed.

Added in version 3.34.

get_component()
Returns:

an ECal.Component associated with the self structure, or None

Return type:

ECal.Component or None

The returned component is valid until the self is freed.

Added in version 3.34.

get_instances()
Returns:

instances of the self structure; can be None, when none had been added yet

Return type:

[ECal.ComponentAlarmInstance] or None

The returned GLib.SList is owned by self and should not be modified. It’s valid until the self is freed or the list of instances is not modified by other functions. The items are of type ECal.ComponentAlarmInstance.

Added in version 3.34.

remove_instance(instance)
Parameters:

instance (ECal.ComponentAlarmInstance) – an ECal.ComponentAlarmInstance

Returns:

whether the instance had been found and freed

Return type:

bool

Remove the instance from the list of instances. If found, the instance is also freed.

Added in version 3.34.

set_instances(instances)
Parameters:

instances ([ECal.ComponentAlarmInstance] or None) – ECal.ComponentAlarmInstance objects to set

Modifies the list of instances to copy of the given instances.

Added in version 3.34.

take_instance(instance)
Parameters:

instance (ECal.ComponentAlarmInstance) – an ECal.ComponentAlarmInstance

Add the instance into the list of instances and assume ownership of it. It is added in no particular order.

Added in version 3.34.

take_instances(instances)
Parameters:

instances ([ECal.ComponentAlarmInstance] or None) – ECal.ComponentAlarmInstance objects to take

Replaces the list of instances with the given instances and assumes ownership of it. Neither the GLib.SList, nor its items, should contain the same structures.

Added in version 3.34.