## ESourceList

ESourceList

## Synopsis

                        ESourceList;
    ESourceList *       e_source_list_new                   (void);
    ESourceList *       e_source_list_new_for_gconf         (GConfClient *client,
                                                             const gchar *path);
    ESourceList *       e_source_list_new_for_gconf_default (const gchar *path);
    GSList *            e_source_list_peek_groups           (ESourceList *list);
    ESourceGroup *      e_source_list_peek_group_by_uid     (ESourceList *list,
                                                             const gchar *uid);
    ESourceGroup *      e_source_list_peek_group_by_name    (ESourceList *list,
                                                             const gchar *name);
    ESourceGroup *      e_source_list_peek_group_by_base_uri
                                                            (ESourceList *list,
                                                             const gchar *base_uri);
    ESourceGroup *      e_source_list_peek_group_by_properties
                                                            (ESourceList *list,
                                                             const gchar *property_name,
                                                             ...);
    ESource *           e_source_list_peek_source_by_uid    (ESourceList *list,
                                                             const gchar *uid);
    ESource *           e_source_list_peek_source_any       (ESourceList *list);
    gboolean            e_source_list_add_group             (ESourceList *list,
                                                             ESourceGroup *group,
                                                             gint position);
    gboolean            e_source_list_remove_group          (ESourceList *list,
                                                             ESourceGroup *group);
    gboolean            e_source_list_remove_group_by_uid   (ESourceList *list,
                                                             const gchar *uid);
    ESourceGroup *      e_source_list_ensure_group          (ESourceList *list,
                                                             const gchar *name,
                                                             const gchar *base_uri,
                                                             gboolean ret_it);
    gboolean            e_source_list_remove_group_by_base_uri
                                                            (ESourceList *list,
                                                             const gchar *base_uri);
    gboolean            e_source_list_remove_source_by_uid  (ESourceList *list,
                                                             const gchar *uidj);
    gboolean            e_source_list_sync                  (ESourceList *list,
                                                             GError **error);
    gboolean            e_source_list_is_gconf_updated      (ESourceList *list);

## Object Hierarchy

      GObject
       +----ESourceList

## Signals

      "changed"                                        : Run Last
      "group-added"                                    : Run Last
      "group-removed"                                  : Run Last

## Description

## Details

### ESourceList

    typedef struct _ESourceList ESourceList;

### e_source_list_new ()

    ESourceList *       e_source_list_new                   (void);

Returns : |

### e_source_list_new_for_gconf ()

    ESourceList *       e_source_list_new_for_gconf         (GConfClient *client,
                                                             const gchar *path);

`client` : |
`path` : |
Returns : |

### e_source_list_new_for_gconf_default ()

    ESourceList *       e_source_list_new_for_gconf_default (const gchar *path);

`path` : |
Returns : |

### e_source_list_peek_groups ()

    GSList *            e_source_list_peek_groups           (ESourceList *list);

`list` : |
Returns : |

### e_source_list_peek_group_by_uid ()

    ESourceGroup *      e_source_list_peek_group_by_uid     (ESourceList *list,
                                                             const gchar *uid);

`list` : |
`uid` : |
Returns : |

### e_source_list_peek_group_by_name ()

    ESourceGroup *      e_source_list_peek_group_by_name    (ESourceList *list,
                                                             const gchar *name);

### Warning

`e_source_list_peek_group_by_name` is deprecated and should not be used in newly-written code.

`list` : |
`name` : |
Returns : |

### e_source_list_peek_group_by_base_uri ()

    ESourceGroup *      e_source_list_peek_group_by_base_uri
                                                            (ESourceList *list,
                                                             const gchar *base_uri);

`list` : |
`base_uri` : |
Returns : | the first group which base uri begins with a base_uri.

Since 2.28

### e_source_list_peek_group_by_properties ()

    ESourceGroup *      e_source_list_peek_group_by_properties
                                                            (ESourceList *list,
                                                             const gchar *property_name,
                                                             ...);

Peeks group by its properties. Parameters are pairs of strings property_name, property_value, terminated by NULL! ESourceGroup is returned only if matches all the properties. Values are compared case insensitively.

`list` : |
`property_name` : |
`...` : |
Returns : |

Since 2.28

### e_source_list_peek_source_by_uid ()

    ESource *           e_source_list_peek_source_by_uid    (ESourceList *list,
                                                             const gchar *uid);

`list` : |
`uid` : |
Returns : |

### e_source_list_peek_source_any ()

    ESource *           e_source_list_peek_source_any       (ESourceList *list);

`list` : |
Returns : |

### e_source_list_add_group ()

    gboolean            e_source_list_add_group             (ESourceList *list,
                                                             ESourceGroup *group,
                                                             gint position);

`list` : |
`group` : |
`position` : |
Returns : |

### e_source_list_remove_group ()

    gboolean            e_source_list_remove_group          (ESourceList *list,
                                                             ESourceGroup *group);

`list` : |
`group` : |
Returns : |

### e_source_list_remove_group_by_uid ()

    gboolean            e_source_list_remove_group_by_uid   (ESourceList *list,
                                                             const gchar *uid);

`list` : |
`uid` : |
Returns : |

### e_source_list_ensure_group ()

    ESourceGroup *      e_source_list_ensure_group          (ESourceList *list,
                                                             const gchar *name,
                                                             const gchar *base_uri,
                                                             gboolean ret_it);

Ensures group with the `base_uri` will exists in the `list` and its name will be `name`. If ret_it will be TRUE the group will be also returned, in that case caller should g_object_unref the group. Otherwise it returns NULL.

`list` : |
`name` : |
`base_uri` : |
`ret_it` : |
Returns : |

Since 2.28

### e_source_list_remove_group_by_base_uri ()

    gboolean            e_source_list_remove_group_by_base_uri
                                                            (ESourceList *list,
                                                             const gchar *base_uri);

Removes group with given base_uri.

`list` : |
`base_uri` : |
Returns : | TRUE if group was found.

Since 2.28

### e_source_list_remove_source_by_uid ()

    gboolean            e_source_list_remove_source_by_uid  (ESourceList *list,
                                                             const gchar *uidj);

`list` : |
`uidj` : |
Returns : |

### e_source_list_sync ()

    gboolean            e_source_list_sync                  (ESourceList *list,
                                                             GError **error);

`list` : |
`error` : |
Returns : |

### e_source_list_is_gconf_updated ()

    gboolean            e_source_list_is_gconf_updated      (ESourceList *list);

`list` : |
Returns : |

## Signal Details

### The `"changed"` signal

    void                user_function                      (ESourceList *esourcelist,
                                                            gpointer     user_data)        : Run Last

`esourcelist` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"group-added"` signal

    void                user_function                      (ESourceList *esourcelist,
                                                            gpointer     arg1,
                                                            gpointer     user_data)        : Run Last

`esourcelist` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The `"group-removed"` signal

    void                user_function                      (ESourceList *esourcelist,
                                                            gpointer     arg1,
                                                            gpointer     user_data)        : Run Last

`esourcelist` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.