ZifMonitor

ZifMonitor — Monitor files for changes

Synopsis

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

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 {
	GObject			 parent;
	ZifMonitorPrivate *priv;
};


struct ZifMonitorClass

struct ZifMonitorClass {
	GObjectClass		 parent_class;
};


enum ZifMonitorError

typedef enum {
	ZIF_MONITOR_ERROR_FAILED,
	ZIF_MONITOR_ERROR_LAST
} ZifMonitorError;


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


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


ZifMonitorPrivate

typedef struct _ZifMonitorPrivate ZifMonitorPrivate;

Private ZifMonitor data