manager: implemented GcalManager::get_source method
This commit is contained in:
committed by
Erick Pérez Castellanos
parent
4d978a33f6
commit
e5a2361274
@@ -855,6 +855,26 @@ gcal_manager_new_with_settings (GSettings *settings)
|
||||
return GCAL_MANAGER (g_object_new (GCAL_TYPE_MANAGER, "settings", settings, NULL));
|
||||
}
|
||||
|
||||
/**
|
||||
* gcal_manager_get_source:
|
||||
* @manager:
|
||||
*
|
||||
* Retrieve a source according to it's UID. The source
|
||||
* is referenced for thread-safety and must be unreferenced
|
||||
* after user.
|
||||
*
|
||||
* Returns: (Transfer full) an {@link ESource}, or NULL.
|
||||
**/
|
||||
ESource*
|
||||
gcal_manager_get_source (GcalManager *manager,
|
||||
const gchar *uid)
|
||||
{
|
||||
GcalManagerPrivate *priv;
|
||||
priv = gcal_manager_get_instance_private (manager);
|
||||
|
||||
return e_source_registry_ref_source (priv->source_registry, uid);
|
||||
}
|
||||
|
||||
/**
|
||||
* gcal_manager_get_sources:
|
||||
* @manager:
|
||||
|
||||
@@ -63,6 +63,9 @@ GType gcal_manager_get_type (void);
|
||||
|
||||
GcalManager* gcal_manager_new_with_settings (GSettings *settings);
|
||||
|
||||
ESource* gcal_manager_get_source (GcalManager *manager,
|
||||
const gchar *uid);
|
||||
|
||||
GList* gcal_manager_get_sources (GcalManager *manager);
|
||||
|
||||
GList* gcal_manager_get_sources_connected (GcalManager *manager);
|
||||
|
||||
Reference in New Issue
Block a user