## ECalBackendStore ECalBackendStore — A helper class for storing calendar components |

## Functions

ECalBackendStore * | e_cal_backend_store_new ()
const gchar * | e_cal_backend_store_get_path ()
ETimezoneCache * | e_cal_backend_store_ref_timezone_cache ()
gboolean | e_cal_backend_store_load ()
gboolean | e_cal_backend_store_is_loaded ()
gboolean | e_cal_backend_store_clean ()
ECalComponent * | e_cal_backend_store_get_component ()
gboolean | e_cal_backend_store_put_component_with_time_range ()
gboolean | e_cal_backend_store_put_component ()
gboolean | e_cal_backend_store_remove_component ()
gboolean | e_cal_backend_store_has_component ()
const icaltimezone * | e_cal_backend_store_get_default_timezone ()
gboolean | e_cal_backend_store_set_default_timezone ()
GSList * | e_cal_backend_store_get_components_by_uid ()
gchar * | e_cal_backend_store_get_components_by_uid_as_ical_string ()
GSList * | e_cal_backend_store_get_components ()
GSList * | e_cal_backend_store_get_components_occuring_in_range ()
GSList * | e_cal_backend_store_get_component_ids ()
const gchar * | e_cal_backend_store_get_key_value ()
gboolean | e_cal_backend_store_put_key_value ()
void | e_cal_backend_store_thaw_changes ()
void | e_cal_backend_store_freeze_changes ()
void | e_cal_backend_store_interval_tree_add_comp ()

## Types and Values

struct | ECalBackendStore
struct | ECalBackendStoreClass

## Includes

    #include <libedata-cal/libedata-cal.h>

## Description

This class can be used by backends to store calendar components.

## Functions

### e_cal_backend_store_new ()

    ECalBackendStore *
    e_cal_backend_store_new (const gchar *path,
                             ETimezoneCache *cache);

Creates a new ECalBackendStore from `path` and `cache` .

#### Parameters

path | the directory for the store file |
cache | an ETimezoneCache |

#### Returns

a new ECalBackendStore

Since 3.8

### e_cal_backend_store_get_path ()

    const gchar *
    e_cal_backend_store_get_path (ECalBackendStore *store);

#### Parameters

store | an ECalBackendStore |

Since 2.28

### e_cal_backend_store_ref_timezone_cache ()

    ETimezoneCache *
    e_cal_backend_store_ref_timezone_cache
                                   (ECalBackendStore *store);

Returns the ETimezoneCache passed to `e_cal_backend_store_new()`.

The returned ETimezoneCache is referenced for thread-safety and must be unreferenced with `g_object_unref()` when finished with it.

#### Parameters

store | an ECalBackendStore |

#### Returns

an ETimezoneCache

Since 3.8

### e_cal_backend_store_load ()

    gboolean
    e_cal_backend_store_load (ECalBackendStore *store);

#### Parameters

store | an ECalBackendStore |

Since 2.28

### e_cal_backend_store_is_loaded ()

    gboolean
    e_cal_backend_store_is_loaded (ECalBackendStore *store);

### e_cal_backend_store_clean ()

    gboolean
    e_cal_backend_store_clean (ECalBackendStore *store);

#### Parameters

store | an ECalBackendStore |

Since 2.28

### e_cal_backend_store_get_component ()

    ECalComponent *
    e_cal_backend_store_get_component (ECalBackendStore *store,
                                       const gchar *uid,
                                       const gchar *rid);

Fetches a component by `uid` and `rid`

#### Parameters

store | an ECalBackendStore |
uid | the uid of the component to fetch |
rid | the recurrence id of the component to fetch |

#### Returns

An ECalComponent

Since 2.28

### e_cal_backend_store_put_component_with_time_range ()

    gboolean
    e_cal_backend_store_put_component_with_time_range
                                   (ECalBackendStore *store,
                                    ECalComponent *comp,
                                    time_t occurence_start,
                                    time_t occurence_end);

#### Parameters

store | an ECalBackendStore |
comp | the ECalComonent to add |
occurence_start | start time of this component |
occurence_end | end time of this component |

#### Returns

whether `comp` was successfully added

Since 2.32

### e_cal_backend_store_put_component ()

    gboolean
    e_cal_backend_store_put_component (ECalBackendStore *store,
                                       ECalComponent *comp);

#### Parameters

store | an ECalBackendStore |
comp | the ECalComonent to add |

#### Returns

whether `comp` was successfully added

Since 2.28

### e_cal_backend_store_remove_component ()

    gboolean
    e_cal_backend_store_remove_component (ECalBackendStore *store,
                                          const gchar *uid,
                                          const gchar *rid);

#### Parameters

store | an ECalBackendStore |
uid | the uid of the component to remove |
rid | the recurrence id of the component to remove |

#### Returns

whether the component was successfully removed

Since 2.28

### e_cal_backend_store_has_component ()

    gboolean
    e_cal_backend_store_has_component (ECalBackendStore *store,
                                       const gchar *uid,
                                       const gchar *rid);

#### Parameters

store | an ECalBackendStore |
uid | the uid of the component to check |
rid | the recurrence id of the component to check |

#### Returns

Whether there was a component for `uid` and `rid`

Since 2.28

### e_cal_backend_store_get_default_timezone ()

    const icaltimezone *
    e_cal_backend_store_get_default_timezone
                                   (ECalBackendStore *store);

Fetch the default timezone

#### Parameters

store | an ECalBackendStore |

#### Returns

The default timezone.

[transfer none]

Since 2.28

### e_cal_backend_store_set_default_timezone ()

    gboolean
    e_cal_backend_store_set_default_timezone
                                   (ECalBackendStore *store,
                                    icaltimezone *zone);

#### Parameters

store | an ECalBackendStore |
zone | the timezone to set |

#### Returns

whether the timezone was successfully set

Since 2.28

### e_cal_backend_store_get_components_by_uid ()

    GSList *
    e_cal_backend_store_get_components_by_uid
                                   (ECalBackendStore *store,
                                    const gchar *uid);

#### Parameters

store | an ECalBackendStore |
uid | the `uid` of the components to fetch |

#### Returns

a list of components matching `uid`

Since 2.28

### e_cal_backend_store_get_components_by_uid_as_ical_string ()

    gchar *
    e_cal_backend_store_get_components_by_uid_as_ical_string
                                   (ECalBackendStore *store,
                                    const gchar *uid);

#### Parameters

store | an ECalBackendStore |
uid | a component UID |

#### Returns

Newly allocated ical string containing all instances with given `uid` . Free returned pointer with `g_free()`, when no longer needed.

Since 3.10

### e_cal_backend_store_get_components ()

    GSList *
    e_cal_backend_store_get_components (ECalBackendStore *store);

#### Parameters

store | an ECalBackendStore |

#### Returns

the list of components in `store`

Since 2.28

### e_cal_backend_store_get_components_occuring_in_range ()

    GSList *
    e_cal_backend_store_get_components_occuring_in_range
                                   (ECalBackendStore *store,
                                    time_t start,
                                    time_t end);

Retrieves a list of components stored in the store, that are occuring in time range [start, end].

#### Parameters

store | An ECalBackendStore object. |
start | Start time |
end | End time |

#### Returns

A list of the components. Each item in the list is an ECalComponent, which should be freed when no longer needed.

[transfer full]

Since 2.32

### e_cal_backend_store_get_component_ids ()

    GSList *
    e_cal_backend_store_get_component_ids (ECalBackendStore *store);

#### Parameters

store | an ECalBackendStore |

Since 2.28

### e_cal_backend_store_get_key_value ()

    const gchar *
    e_cal_backend_store_get_key_value (ECalBackendStore *store,
                                       const gchar *key);

#### Parameters

store | an ECalBackendStore |
key | the key for the value to fetch |

#### Returns

The value matching `key` .

[transfer none]

Since 2.28

### e_cal_backend_store_put_key_value ()

    gboolean
    e_cal_backend_store_put_key_value (ECalBackendStore *store,
                                       const gchar *key,
                                       const gchar *value);

#### Parameters

store | an ECalBackendStore |
key | the key for the value to set |
value | the value to set for `key` |

#### Returns

whether `value` was successfully set for `key`

Since 2.28

### e_cal_backend_store_thaw_changes ()

    void
    e_cal_backend_store_thaw_changes (ECalBackendStore *store);

#### Parameters

store | an ECalBackendStore |

Since 2.28

### e_cal_backend_store_freeze_changes ()

    void
    e_cal_backend_store_freeze_changes (ECalBackendStore *store);

#### Parameters

store | an ECalBackendStore |

Since 2.28

### e_cal_backend_store_interval_tree_add_comp ()

    void
    e_cal_backend_store_interval_tree_add_comp
                                   (ECalBackendStore *store,
                                    ECalComponent *comp,
                                    time_t occurence_start,
                                    time_t occurence_end);

#### Parameters

store | an ECalBackendStore |
comp | the ECalComponent to add |
occurence_start | start time for `comp` |
occurence_end | end time for `comp` |

Since 2.32

## Types and Values

### struct ECalBackendStore

    struct ECalBackendStore {
    };

Contains only private data that should be read and manipulated using the functions below.

Since 2.28

### struct ECalBackendStoreClass

    struct ECalBackendStoreClass {
    	/* virtual methods */
    	gboolean (*load)			(ECalBackendStore *store);
    	gboolean (*clean)		(ECalBackendStore *store);
    	ECalComponent * (*get_component) (ECalBackendStore *store,
    						 const gchar *uid,
    						 const gchar *rid);
    	gboolean (*put_component) (ECalBackendStore *store,
    						 ECalComponent *comp);
    	gboolean (*remove_component) (ECalBackendStore *store,
    						 const gchar *uid,
    						 const gchar *rid);
    	gboolean (*has_component) (ECalBackendStore *store,
    						 const gchar *uid,
    						 const gchar *rid);
    	GSList * (*get_components_by_uid)(ECalBackendStore *store,
    						 const gchar *uid);
    	GSList * (*get_components) (ECalBackendStore *store);

    	GSList * (*get_component_ids) (ECalBackendStore *store);
    	const icaltimezone *
    			(*get_default_timezone) (ECalBackendStore *store);
    	gboolean (*set_default_timezone) (ECalBackendStore *store,
    						 icaltimezone *zone);
    	void		(*thaw_changes)		(ECalBackendStore *store);
    	void		(*freeze_changes) (ECalBackendStore *store);
    	const gchar * (*get_key_value) (ECalBackendStore *store,
    						 const gchar *key);
    	gboolean (*put_key_value) (ECalBackendStore *store,
    						 const gchar *key,
    						 const gchar *value);
    };

Class structure for the ECalBackendStore class.

#### Members

`load` () | FIXME: Doxument me |
`clean` () | FIXME: Doxument me |
`get_component` () | FIXME: Doxument me |
`put_component` () | FIXME: Doxument me |
`remove_component` () | FIXME: Doxument me |
`has_component` () | FIXME: Doxument me |
`get_components_by_uid` () | FIXME: Doxument me |
`get_components` () | FIXME: Doxument me |
`get_component_ids` () | FIXME: Doxument me |
`get_default_timezone` () | FIXME: Doxument me |
`set_default_timezone` () | FIXME: Doxument me |
`thaw_changes` () | FIXME: Doxument me |
`freeze_changes` () | FIXME: Doxument me |
`get_key_value` () | FIXME: Doxument me |
`put_key_value` () | FIXME: Doxument me |

Since 2.28