## ZifMonitor ZifMonitor — Monitor files for changes |

## Synopsis

    #define             ZIF_MONITOR_ERROR
    struct              ZifMonitor;
    struct              ZifMonitorClass;
    enum                ZifMonitorError;
    gboolean            zif_monitor_add_watch               (ZifMonitor *monitor,
                                                             const gchar *filename,
                                                             GError **error);
    GQuark              zif_monitor_error_quark             (void);
    ZifMonitor *        zif_monitor_new                     (void);

## Object Hierarchy

      GObject
       +----ZifMonitor

## Signals

      "changed"                                        : Run Last

## Description

This object is a trivial multiplexted wrapper around GIO.

## Details

### ZIF_MONITOR_ERROR

    #define ZIF_MONITOR_ERROR		(zif_monitor_error_quark ())

### struct ZifMonitor

    struct ZifMonitor;

### struct ZifMonitorClass

    struct ZifMonitorClass {
    	GObjectClass		 parent_class;
    	/* Padding for future expansion */
    	void (*_zif_reserved1) (void);
    	void (*_zif_reserved2) (void);
    	void (*_zif_reserved3) (void);
    	void (*_zif_reserved4) (void);
    };

### enum ZifMonitorError

    typedef enum {
    	ZIF_MONITOR_ERROR_FAILED,
    	ZIF_MONITOR_ERROR_LAST
    } ZifMonitorError;

`ZIF_MONITOR_ERROR_FAILED` |
`ZIF_MONITOR_ERROR_LAST` |

### zif_monitor_add_watch ()

    gboolean            zif_monitor_add_watch               (ZifMonitor *monitor,
                                                             const gchar *filename,
                                                             GError **error);

Sets up a watch on the file, and reports the 'changed' signal when the file is changed.

`monitor` : | A ZifMonitor
`filename` : | The full filename to watch
`error` : | A GError, or `NULL`
Returns : | `TRUE` for success, `FALSE` otherwise

Since 0.1.0

### zif_monitor_error_quark ()

    GQuark              zif_monitor_error_quark             (void);

Returns : | An error quark.

Since 0.1.0

### zif_monitor_new ()

    ZifMonitor *        zif_monitor_new                     (void);

Returns : | A new ZifMonitor instance.

Since 0.1.0

## Signal Details

### The `"changed"` signal

    void                user_function                      (ZifMonitor *zifmonitor,
                                                            gpointer    user_data)       : Run Last

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