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

« back to all changes in this revision

Viewing changes to gio/gfilemonitor.c

  • 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:
20
20
 * Author: Alexander Larsson <alexl@redhat.com>
21
21
 */
22
22
 
23
 
#include <config.h>
 
23
#include "config.h"
24
24
#include <string.h>
25
25
 
26
26
#include "gfilemonitor.h"
27
27
#include "gio-marshal.h"
28
28
#include "gioenumtypes.h"
 
29
#include "gfile.h"
29
30
#include "gvfs.h"
30
31
#include "glibintl.h"
31
32
 
39
40
 * Monitors a file or directory for changes.
40
41
 *
41
42
 * To obtain a #GFileMonitor for a file or directory, use
42
 
 * g_file_monitor_file() or g_file_monitor_directory().
 
43
 * g_file_monitor(), g_file_monitor_file(), or
 
44
 * g_file_monitor_directory().
43
45
 *
44
46
 * To get informed about changes to the file or directory you
45
47
 * are monitoring, connect to the #GFileMonitor::changed signal.
52
54
  LAST_SIGNAL
53
55
};
54
56
 
 
57
/* work around a limitation of the aliasing foo */
 
58
#undef g_file_monitor
 
59
 
55
60
G_DEFINE_ABSTRACT_TYPE (GFileMonitor, g_file_monitor, G_TYPE_OBJECT);
56
61
 
57
62
typedef struct {
156
161
    }
157
162
 
158
163
  g_hash_table_destroy (monitor->priv->rate_limiter);
159
 
  
160
 
  if (G_OBJECT_CLASS (g_file_monitor_parent_class)->finalize)
161
 
    (*G_OBJECT_CLASS (g_file_monitor_parent_class)->finalize) (object);
 
164
 
 
165
  G_OBJECT_CLASS (g_file_monitor_parent_class)->finalize (object);
162
166
}
163
167
 
164
168
static void
170
174
 
171
175
  /* Make sure we cancel on last unref */
172
176
  g_file_monitor_cancel (monitor);
173
 
  
174
 
  if (G_OBJECT_CLASS (g_file_monitor_parent_class)->dispose)
175
 
    (*G_OBJECT_CLASS (g_file_monitor_parent_class)->dispose) (object);
 
177
 
 
178
  G_OBJECT_CLASS (g_file_monitor_parent_class)->dispose (object);
176
179
}
177
180
 
178
181
static void