ECal.ComponentBag
Description: Reference for ECal.ComponentBag

### Class

# ECalComponentBag

#### Description

    final class ECal.ComponentBag : GObject.Object
    {
      /* No available fields */
    }

No description available.

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### e_cal_component_bag_new

Creates a new `ECalComponentBag`.

since: 3.58

#### Instance methods

###### e_cal_component_bag_add

Adds a component into the bag. It’s possible to add the same component from the same client multiple times, in which case any previous occurrence is removed.

since: 3.58

###### e_cal_component_bag_add_with_user_data

Adds a component into the bag. It’s possible to add the same component from the same client multiple times, in which case any previous occurrence is removed.

since: 3.58

###### e_cal_component_bag_clear

Removes all components from the bag.

since: 3.58

###### e_cal_component_bag_dup_item

Looks up for an item identified by the `client`, `uid` and optionally `rid`, and returns a copy of it. Free the returned item with e_cal_component_bag_item_free(), when no longer needed.

since: 3.58

###### e_cal_component_bag_dup_span

Similar to the e_cal_component_bag_get_span(), except the returned array is a copy of the span, thus it is thread safe.

since: 3.58

###### e_cal_component_bag_foreach

Calls the `func` for each item in the `self`, or until the `func` returns `FALSE`, to stop the traversal earlier.

since: 3.58

###### e_cal_component_bag_get_item

Looks up for an item identified by the `client`, `uid` and optionally `rid`, and returns it.

since: 3.58

###### e_cal_component_bag_get_min_duration_minutes

Gets minimum duration, in minutes, previously set by the e_cal_component_bag_set_min_duration_minutes().

since: 3.58

###### e_cal_component_bag_get_n_items

Gets how many items are in the bag across all the spans.

since: 3.58

###### e_cal_component_bag_get_n_spans

Gets how many spans all the components in the `self` occupy.

since: 3.58

###### e_cal_component_bag_get_span

Peeks a current span content. The `index` should be between 0 and one less than e_cal_component_bag_get_n_spans().

since: 3.58

###### e_cal_component_bag_get_timezone

Gets an `ICalTimezone` used to calculate component times in.

since: 3.58

###### e_cal_component_bag_list

Lists all components stored in the `self`. The items are of the `ECalComponentBagItem` type. Even only the container is needed to be freed, the items are owned by the container and can be modified in any way without influencing the `self`.

since: 3.58

###### e_cal_component_bag_lock

Locks the `self`, to prevent changes from other threads. It can be called multiple times, only each call needs its pair call of the e_cal_component_bag_unlock().

since: 3.58

###### e_cal_component_bag_rebuild

Rebuilds the spans with the current content, like if all the items are added from scratch.

since: 3.58

###### e_cal_component_bag_remove

Removes a component from the bag. The function does nothing when the component is not part of the bag.

since: 3.58

###### e_cal_component_bag_set_min_duration_minutes

Sets minimum duration to be used for the components, in minutes. When the component duration is less than this `value`, it is increased to it. The default value is 0.

since: 3.58

###### e_cal_component_bag_set_timezone

Sets the `zone` as a time zone to be used to calculate component times in.

since: 3.58

###### e_cal_component_bag_unlock

Unlocks the `self`, previously locked by the e_cal_component_bag_unlock().

since: 3.58

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### ECal.ComponentBag:n-items

Total count of the components in all spans. The property can be only read. It emits a notification when it changes.

since: 3.58

###### ECal.ComponentBag:n-spans

How many spans the components are divided to. The property can be only read. It emits a notification when it changes.

since: 3.58

###### ECal.ComponentBag:timezone

An `ICalTimezone` to calculate component times in.

since: 3.58

#### Signals

###### ECal.ComponentBag::added

A signal emitted whenever a new `ECalComponentBagItem` is added.

since: 3.58

###### ECal.ComponentBag::item-changed

A signal emitted whenever an existing `item` in the `bag` is changed. It’s a complement signal for the ECalComponentBag::added signal, in a sense that when adding an item to the `bag` either the added or the item-changed is emitted, if the component changed.

since: 3.58

###### ECal.ComponentBag::removed

A signal emitted when one or more items are removed from the `bag`. This is not called for e_cal_component_bag_clear().

since: 3.58

###### ECal.ComponentBag::span-changed

A signal emitted with an array of `ECalComponentBagItem` structures, whose span changed.

since: 3.58

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct ECalComponentBagClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.