## ESourceRegistryWatcher ESourceRegistryWatcher — Watch changes in ESource-s |

## Functions

ESourceRegistryWatcher * | e_source_registry_watcher_new ()
ESourceRegistry * | e_source_registry_watcher_get_registry ()
const gchar * | e_source_registry_watcher_get_extension_name ()
void | e_source_registry_watcher_reclaim ()

## Types and Values

struct | ESourceRegistryWatcher

## Object Hierarchy

        GObject
        ╰── ESourceRegistryWatcher

## Includes

    #include <libedataserver/libedataserver.h>

## Description

ESourceRegistryWatcher watches for changes in an ESourceRegistry and notifies about newly added and enabled ESource instances, the same as about removed or disabled. The amount of notifications can be filtered with “filter” signal.

The watcher listens only for changes, thus it is not pre-populated after its creation. That's because the owner usually wants to subscribe to the “filter”, “appeared” and “disappeared” signals. The owner should call `e_source_registry_watcher_reclaim()` when it has all the needed signal handlers connected.

## Functions

### e_source_registry_watcher_new ()

    ESourceRegistryWatcher *
    e_source_registry_watcher_new (ESourceRegistry *registry,
                                   const gchar *extension_name);

Creates a new ESourceRegistryWatcher instance.

The `extension_name` can be used as a complementary filter to “filter” signal.

#### Parameters

registry | an ESourceRegistry |
extension_name | optional extension name to filter sources with, or `NULL`. | [nullable]

#### Returns

an ESourceRegistryWatcher.

[transfer full]

Since: 3.26

### e_source_registry_watcher_get_registry ()

    ESourceRegistry *
    e_source_registry_watcher_get_registry
                                   (ESourceRegistryWatcher *watcher);

Returns the ESourceRegistry passed to `e_source_registry_watcher_new()`.

#### Parameters

watcher | an ESourceRegistryWatcher |

#### Returns

an ESourceRegistry.

[transfer none]

Since: 3.26

### e_source_registry_watcher_get_extension_name ()

    const gchar *
    e_source_registry_watcher_get_extension_name
                                   (ESourceRegistryWatcher *watcher);

#### Parameters

watcher | an ESourceRegistryWatcher |

#### Returns

The extension name passed to `e_source_registry_watcher_new()`.

[nullable]

Since: 3.26

### e_source_registry_watcher_reclaim ()

    void
    e_source_registry_watcher_reclaim (ESourceRegistryWatcher *watcher);

Reclaims all available sources satisfying the “filter” signal. It doesn't notify about disappeared sources, it notifies only on those appeared.

#### Parameters

watcher | an ESourceRegistryWatcher |

Since: 3.26

## Types and Values

### struct ESourceRegistryWatcher

    struct ESourceRegistryWatcher;

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