Commit bb7cc902 authored by Alexander Larsson's avatar Alexander Larsson

Add gvfsd-metadata update daemon

This daemon singleton handles updates to metadata stores.
All clients that wishes to write metadata should talk to
it via dbus.

This way all writes are serialized to avoid data loss on
concurrent writes.
parent 192d3a7d
......@@ -94,6 +94,14 @@ G_BEGIN_DECLS
#define G_VFS_DBUS_MONITOR_CLIENT_INTERFACE "org.gtk.vfs.MonitorClient"
#define G_VFS_DBUS_MONITOR_CLIENT_OP_CHANGED "Changed"
/* The well known name of the metadata daemon */
#define G_VFS_DBUS_METADATA_NAME "org.gtk.vfs.Metadata"
#define G_VFS_DBUS_METADATA_PATH "/org/gtk/vfs/metadata"
#define G_VFS_DBUS_METADATA_INTERFACE "org.gtk.vfs.Metadata"
#define G_VFS_DBUS_METADATA_OP_SET "Set"
#define G_VFS_DBUS_METADATA_OP_UNSET "Unset"
#define G_VFS_DBUS_METADATA_OP_REMOVE "Remove"
#define G_VFS_DBUS_METADATA_OP_MOVE "Move"
/* Mounts time out in 10 minutes, since they can be slow, with auth, etc */
#define G_VFS_DBUS_MOUNT_TIMEOUT_MSECS (1000*60*10)
......
......@@ -11,10 +11,14 @@ endif
noinst_PROGRAMS = $(APPS)
libexec_PROGRAMS =\
gvfsd-metadata \
$(NULL)
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gvfs \
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/common \
$(LIBXML_CFLAGS) $(GLIB_CFLAGS) $(DBUS_CFLAGS) \
$(UDEV_CFLAGS) \
-DGVFS_LOCALEDIR=\""$(localedir)"\" \
-DG_LOG_DOMAIN=\"GVFS\" -DG_DISABLE_DEPRECATED \
-DDBUS_API_SUBJECT_TO_CHANGE
......@@ -28,3 +32,14 @@ libmetadata_la_LIBADD = $(GLIB_LIBS) $(UDEV_LIBS)
convert_nautilus_metadata_LDADD = libmetadata.la $(LIBXML_LIBS)
convert_nautilus_metadata_SOURCES = metadata-nautilus.c
gvfsd_metadata_LDADD = libmetadata.la $(DBUS_LIBS) ../common/libgvfscommon.la
gvfsd_metadata_SOURCES = meta-daemon.c
# D-BUS service file
%.service: %.service.in ../config.log
sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
servicedir = $(DBUS_SERVICE_DIR)
service_in_files = gvfs-metadata.service.in
service_DATA = gvfs-metadata.service
[D-BUS Service]
Name=org.gtk.vfs.Metadata
Exec=@libexecdir@/gvfsd-metadata
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment