mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-08 18:36:17 +01:00
2737ab3201
Remove all event merging and dispatch logic from GFileMonitor. The only implementation of GFileMonitor outside of glib is in gvfs and it already does these things properly. Get rid of GLocalDirectoryMonitor. We will use a single class, GLocalFileMonitor, for both directory and file monitoring. This will prevent every single backend from having to create two objects separately (eg: ginotifydirectorymonitor.c and ginotifyfilemonitor.c). Introduce GFileMonitorSource as a thread-safe cross-context dispatch mechanism. Put it in GLocalFileMonitor. All backends will be expected to dispatch via the source and not touch the GFileMonitor object at all from the worker thread. Remove all construct properties from GLocalFileMonitor and remove the "context" construct property from GFileMonitor. All backends must now get the information about what file to monitor from the ->start() call which is mandatory to implement. Remove the implementation of rate limiting in GFileMonitor and add an implementation in GLocalFileMonitor. gvfs never did anything with this anyway, but if it wanted to, it would have to implement it for itself. This was done in order to get the rate_limit field into the GFileMonitorSource so that it could be safely accessed from the worker thread. Expose g_local_file_is_remote() internally for NFS detection. With the "is_remote" functionality exposed, we can now move all functions for creating local file monitors to a proper location in glocalfilemonitor.c Port the inotify backend to adjust to the changes above. None of the other backends are ported yet. Those will come in future commits.
29 lines
596 B
Makefile
29 lines
596 B
Makefile
include $(top_srcdir)/glib.mk
|
|
|
|
noinst_LTLIBRARIES += libinotify.la
|
|
|
|
libinotify_la_SOURCES = \
|
|
inotify-kernel.c \
|
|
inotify-sub.c \
|
|
inotify-path.c \
|
|
inotify-missing.c \
|
|
inotify-helper.c \
|
|
inotify-kernel.h \
|
|
inotify-missing.h \
|
|
inotify-path.h \
|
|
inotify-sub.h \
|
|
inotify-helper.h \
|
|
ginotifyfilemonitor.c \
|
|
ginotifyfilemonitor.h \
|
|
$(NULL)
|
|
|
|
libinotify_la_CFLAGS = \
|
|
$(GLIB_HIDDEN_VISIBILITY_CFLAGS) \
|
|
-DG_LOG_DOMAIN=\"GLib-GIO\" \
|
|
$(gio_INCLUDES) \
|
|
$(GLIB_DEBUG_FLAGS) \
|
|
-DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\" \
|
|
-DGIO_COMPILATION \
|
|
-DG_DISABLE_DEPRECATED
|
|
|