~ubuntu-branches/debian/squeeze/glib2.0/squeeze

« back to all changes in this revision

Viewing changes to gio/gfilemonitor.h

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-02-15 13:00:43 UTC
  • mfrom: (1.3.1 upstream) (69.1.10 intrepid)
  • Revision ID: james.westby@ubuntu.com-20090215130043-q47fbt3owmt42m2f
Tags: 2.18.4-2
* Release to unstable
* debian/rules:
- bump SHVER, since we are already forcing a 2.18.0 dependecy on the
  symbols introduced in the development versions
* debian/control.in:
- added Homepage and Vcs-* control fields

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* GIO - GLib Input, Output and Streaming Library
2
 
 * 
 
2
 *
3
3
 * Copyright (C) 2006-2007 Red Hat, Inc.
4
4
 *
5
5
 * This library is free software; you can redistribute it and/or
27
27
#ifndef __G_FILE_MONITOR_H__
28
28
#define __G_FILE_MONITOR_H__
29
29
 
30
 
#include <glib-object.h>
31
 
#include <gio/gfile.h>
 
30
#include <gio/giotypes.h>
32
31
 
33
32
G_BEGIN_DECLS
34
33
 
39
38
#define G_IS_FILE_MONITOR_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_FILE_MONITOR))
40
39
#define G_FILE_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_FILE_MONITOR, GFileMonitorClass))
41
40
 
42
 
/**
43
 
 * GFileMonitorEvent:
44
 
 * @G_FILE_MONITOR_EVENT_CHANGED: a file changed.
45
 
 * @G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: a hint that this was probably the last change in a set of changes.
46
 
 * @G_FILE_MONITOR_EVENT_DELETED: a file was deleted.
47
 
 * @G_FILE_MONITOR_EVENT_CREATED: a file was created.
48
 
 * @G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: a file attribute was changed.
49
 
 * @G_FILE_MONITOR_EVENT_PRE_UNMOUNT: the file location will soon be unmounted.
50
 
 * @G_FILE_MONITOR_EVENT_UNMOUNTED: the file location was unmounted.
51
 
 * 
52
 
 * Specifies what type of event a monitor event is.
53
 
 **/
54
 
typedef enum {
55
 
  G_FILE_MONITOR_EVENT_CHANGED,
56
 
  G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT,
57
 
  G_FILE_MONITOR_EVENT_DELETED,
58
 
  G_FILE_MONITOR_EVENT_CREATED,
59
 
  G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED,
60
 
  G_FILE_MONITOR_EVENT_PRE_UNMOUNT,
61
 
  G_FILE_MONITOR_EVENT_UNMOUNTED
62
 
} GFileMonitorEvent;
63
 
 
64
 
typedef struct _GFileMonitorClass       GFileMonitorClass;
 
41
typedef struct _GFileMonitorClass       GFileMonitorClass;
65
42
typedef struct _GFileMonitorPrivate     GFileMonitorPrivate;
66
43
 
67
44
/**
68
45
 * GFileMonitor:
69
 
 * 
 
46
 *
70
47
 * Watches for changes to a file.
71
48
 **/
72
49
struct _GFileMonitor
80
57
struct _GFileMonitorClass
81
58
{
82
59
  GObjectClass parent_class;
83
 
  
 
60
 
84
61
  /* Signals */
85
 
  void (* changed) (GFileMonitor* monitor,
86
 
                    GFile* file,
87
 
                    GFile* other_file,
88
 
                    GFileMonitorEvent event_type);
89
 
  
 
62
  void     (* changed) (GFileMonitor      *monitor,
 
63
                        GFile             *file,
 
64
                        GFile             *other_file,
 
65
                        GFileMonitorEvent  event_type);
 
66
 
90
67
  /* Virtual Table */
91
 
  gboolean      (*cancel)(GFileMonitor* monitor);
 
68
  gboolean (* cancel)  (GFileMonitor      *monitor);
92
69
 
93
70
  /*< private >*/
94
71
  /* Padding for future expansion */
99
76
  void (*_g_reserved5) (void);
100
77
};
101
78
 
102
 
GType g_file_monitor_get_type (void) G_GNUC_CONST;
 
79
GType    g_file_monitor_get_type       (void) G_GNUC_CONST;
103
80
 
104
 
gboolean g_file_monitor_cancel         (GFileMonitor *monitor);
105
 
gboolean g_file_monitor_is_cancelled   (GFileMonitor *monitor);
106
 
void     g_file_monitor_set_rate_limit (GFileMonitor *monitor,
107
 
                                        int           limit_msecs);
 
81
gboolean g_file_monitor_cancel         (GFileMonitor      *monitor);
 
82
gboolean g_file_monitor_is_cancelled   (GFileMonitor      *monitor);
 
83
void     g_file_monitor_set_rate_limit (GFileMonitor      *monitor,
 
84
                                        int                limit_msecs);
108
85
 
109
86
 
110
87
/* For implementations */
111
 
void g_file_monitor_emit_event (GFileMonitor      *monitor,
112
 
                                GFile             *child,
113
 
                                GFile             *other_file,
114
 
                                GFileMonitorEvent  event_type);
 
88
void     g_file_monitor_emit_event     (GFileMonitor      *monitor,
 
89
                                        GFile             *child,
 
90
                                        GFile             *other_file,
 
91
                                        GFileMonitorEvent  event_type);
115
92
 
116
93
G_END_DECLS
117
94