|  |  |  | Evolution-Data-Server Manual: Utilities (libedataserver) |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
struct 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_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); ESource * e_source_list_peek_default_source (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);
struct ESourceList;
Contains only private data that should be read and manipulated using the functions below.
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);
| Returns : | . [transfer none][element-type ESourceGroup] | 
ESourceGroup * e_source_list_peek_group_by_uid (ESourceList *list,const gchar *uid);
ESourceGroup * e_source_list_peek_group_by_base_uri (ESourceList *list,const gchar *base_uri);
Returns the first ESourceGroup having the given base URI.
The base URI is usually just the URI scheme, such as "http://".
If no such group is present in list, the function returns NULL.
| 
 | an ESourceList | 
| 
 | a group base URI | 
| Returns : | an ESourceGroup with a matching base URI, or NULL | 
Since 2.28
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.
Since 2.28
ESource * e_source_list_peek_source_by_uid (ESourceList *list,const gchar *uid);
ESource *           e_source_list_peek_default_source   (ESourceList *list);
Attempts to find a default ESource in source_list by looking for
a source with a property named "default", or else a source with a
property named "system".  If no such ESource exists, the function
returns NULL.
| Returns : | the default ESource in source_list, orNULL | 
Since 2.32
gboolean e_source_list_add_group (ESourceList *list,ESourceGroup *group,gint position);
gboolean e_source_list_remove_group (ESourceList *list,ESourceGroup *group);
Removes the first ESourceGroup with a unique ID matching group
(possibly group itself) from list.  The function returns TRUE if a
matching group was found, otherwise FALSE.
| 
 | an ESourceList | 
| 
 | an ESourceGroup | 
| Returns : | TRUEif an ESourceGroup was removed,FALSEotherwise | 
gboolean e_source_list_remove_group_by_uid (ESourceList *list,const gchar *uid);
Removes the first ESourceGroup with the given unique ID from list.
The function returns TRUE if a matching group was found, otherwise
FALSE.
| 
 | an ESourceList | 
| 
 | the unique ID of an ESourceGroup | 
| Returns : | TRUEif an ESourceGroup was removed,FALSEotherwise | 
ESourceGroup * e_source_list_ensure_group (ESourceList *list,const gchar *name,const gchar *base_uri,gboolean ret_it);
Ensures an ESourceGroup with the given base URI exists in list, and
renames its to the given name.  If ret_it is TRUE, the matching group
will be returned and should be unreferenced with g_object_unref().
| 
 | an ESourceList | 
| 
 | a localized group name | 
| 
 | a group base URI | 
| 
 | whether to return the group | 
| Returns : | the matching ESourceGroup if ret_itisTRUE, otherwiseNULL | 
Since 2.28
gboolean e_source_list_remove_group_by_base_uri (ESourceList *list,const gchar *base_uri);
Removes the first ESourceGroup having the given base URI from list.
The base URI is usually just the URI scheme, such as "http://".  The
function returns TRUE if a matching group was found, otherwise FALSE.
| 
 | an ESourceList | 
| 
 | a group base URI | 
| Returns : | TRUEif an ESourceGroup was removed,FALSEotherwise | 
Since 2.28
gboolean e_source_list_remove_source_by_uid (ESourceList *list,const gchar *uidj);
Removes the first ESource with the given unique ID from list.  The
function returns TRUE if a matching source was found, otherwise FALSE.
| 
 | an ESourceList | 
| Returns : | TRUEif an ESource was removed,FALSEotherwise | 
gboolean e_source_list_sync (ESourceList *list,GError **error);
Writes the contents of list to GConf.  If an error occurs, such as
the GConf daemon not responding, the function sets error and returns
FALSE.
| 
 | an ESourceList | 
| 
 | return location for a GError, or NULL | 
| Returns : | TRUEon success,FALSEon failure | 
gboolean            e_source_list_is_gconf_updated      (ESourceList *list);
Returns TRUE if the GConf data for list is up-to-date, FALSE if
e_source_list_sync() should be called.
| 
 | an ESourceList | 
| Returns : | TRUEif the GConf data forlistis up-to-date | 
"changed" signalvoid                user_function                      (ESourceList *esourcelist,
                                                        gpointer     user_data)        : Run Last
| 
 | the object which received the signal. | 
| 
 | user data set when the signal handler was connected. | 
"group-added" signalvoid                user_function                      (ESourceList  *esourcelist,
                                                        ESourceGroup *arg1,
                                                        gpointer      user_data)        : Run Last
| 
 | the object which received the signal. | 
| 
 | user data set when the signal handler was connected. | 
"group-removed" signalvoid                user_function                      (ESourceList  *esourcelist,
                                                        ESourceGroup *arg1,
                                                        gpointer      user_data)        : Run Last
| 
 | the object which received the signal. | 
| 
 | user data set when the signal handler was connected. |