summaryrefslogtreecommitdiff
path: root/metadata/meta-daemon.c
Commit message (Collapse)AuthorAgeFilesLines
* Notify changes in metadataSergio Costas2020-05-191-3/+86
| | | | | | | | | | | | | | | | | | | | | | | | | When a program (like Nautilus) modifies the metadata in a file (like metadata::custom-icon) there is no way of detecting that change from other programs: neither inotify generates an event in the file or the directory holding it, nor is possible to use it in the files at, or the folder itself, ~/.local/share/gvfs-metadata, because writting in them is delayed for nearly a minute. Unfortunately, there are cases where it is needed to be able to detect that. An example (and the reason for this patch) is when Nautilus (or another file manager) modifies the custom icon in a file from the desktop, and the desktop is managed by a different program (in this case, Desktop Icons NG), because the later can't detect the change made by the former and, thus, the file will keep the old icon until the whole desktop is refreshed. To fix this, this patch proposes to add a signal to the org.gtk.vfs.Metadata DBus interface, which will be triggered whenever a key is modified. To avoid saturating the system in case of modifying a lot of keys, it is triggered up to once per second.
* metadata: Prevent usage of NULL if GUdevDevice is not foundOndrej Holy2018-04-131-6/+8
| | | | | | | | | | | | | | Code to determine tree name from device has been recently ported from udev to gudev by commit c2d8564. Unfortunately, the gudev code floods logs by the following messages if device is not found (it can happen e.g. for tmpfs): g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed Udev code silently returned if NULL device was used, however, corresponding gudev code prints the mentioned messages. Let's prevent usage of NULL device in order to prevent those messages. https://bugzilla.gnome.org/show_bug.cgi?id=795191
* metadata: Remove udev dependency in favor of gudevOndrej Holy2017-11-011-25/+19
| | | | | | | GVfs uses udev and also gudev. Let's use just gudev and remove corresponding --enable-udev option. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* metadata: Include headers for device number functionalityOndrej Holy2017-01-061-0/+6
| | | | | | | | The implicit sys/sysmacros.h (resp. sys/mkdev.h) includes via sys/types.h is being deprecated. Use AC_HEADER_MAJOR and include necessary header files for major(), minor(), and makedev() functions. https://bugzilla.gnome.org/show_bug.cgi?id=776213
* Use Unicode in translatable stringsPiotr Drąg2016-10-031-4/+4
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772219
* metadata: Get tree from udev via dbusOndrej Holy2015-06-011-0/+48
| | | | | | | | | | | | We don't want to have dependency on udev in client part of gvfs due to app sandboxing. Thus move the code into the metadata daemon and get tree name via dbus. Common code to get metadata proxy has to be moved in metatree code. Mentioned changes caused that unistd.h is also included in meta-get-tree.c and cause symbol redeclaration error. Variable "pause" has to be renamed to avoid this conflict.
* metadata: remove unused dbus unset apiOndrej Holy2015-04-101-37/+0
| | | | | | | Metadata are unset from client side using dbus set api, therefore dbus unset api and corresponding code isn't necessary. There is only one usage of unset api in private meta-set utility, which is replaced by this patch.
* metadata: remove unused dbus get apiOndrej Holy2015-04-101-93/+0
| | | | | Metadata are read from client side directly using meta_tree_enumerate_keys, therefore dbus api and corresponding code isn't necessary.
* metadata: Free objects on errorRoss Lagerwall2015-01-311-2/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=743653
* metadata: Export skeleton before name is acquiredRoss Lagerwall2015-01-311-26/+19
| | | | | | | Exporting the skeleton after acquiring the name is racy, as documented in the GIO docs for g_bus_own_name. https://bugzilla.gnome.org/show_bug.cgi?id=743653
* Report gvfs version when --version is usedRoss Lagerwall2014-04-111-0/+9
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=727132
* metadata: Flush all scheduled writeouts on daemon exitTomas Bzatek2013-05-131-6/+40
| | | | | | | | This patch ensures that we safely write all data from journals to metatrees on exit. E.g. if anything happens to session bus or we get replaced by some other instance. https://bugzilla.gnome.org/show_bug.cgi?id=637095
* metadata: Use shorter writeout timeout on NFSTomas Bzatek2013-05-131-3/+9
| | | | | | | Since we've moved journal to a non-volatile storage, let's flush more often to minimize a chance of data loss. https://bugzilla.gnome.org/show_bug.cgi?id=637095
* Remove calls to g_type_init(), bump GLib required versionColin Walters2012-10-301-2/+0
| | | | | | See http://git.gnome.org/browse/glib/commit/?id=2002479c02fa6e468fc3f67ddc663657a52ebde8 https://bugzilla.gnome.org/show_bug.cgi?id=687236
* gdbus: Remove last traces of libdbus in metadata sourcesTomas Bzatek2012-07-311-2/+0
|
* Update the Address of the FSFFelix Möller2012-07-301-2/+2
| | | | | | | | | | | | | | | Updating the address of the FSF. This has been done by: while read file; do sed -i 's:59 Temple Place:51 Franklin Street:' $file sed -i 's:Suite 330:Fifth Floor:' $file sed -i 's:02111-1307:02110-1301:' $file done https://bugzilla.gnome.org/show_bug.cgi?id=656598 Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
* Port volume monitoring and metadata to GDBusTomas Bzatek2012-06-041-471/+212
| | | | | | | | This is a complete port of volume monitors and metadata to GDBus. The (private) d-bus API has been mostly preserved except of MountOp methods. No difference in functionality should be observed.
* Rename gdbusutils.h to avoid conflict with GIO1.6.2Matthias Clasen2010-05-271-1/+1
| | | | This makes gvfs build with recent glib again, see bug #619537
* Fix warningAlexander Larsson2009-12-011-1/+1
|
* Initialize the DBus errorCosimo Cecchi2009-07-201-0/+1
| | | | | | Initialize the DBus error structure before calling dbus_bus_request_name(). Fix bug #589015, patch by Patryk Zawadzki.
* Plug some leaks and fix some strings.Cosimo Cecchi2009-06-301-2/+3
|
* Implement a dbus based metadata get callAlexander Larsson2009-06-251-0/+191
|
* include locale.h for setlocale() callBenjamin Otte2009-06-251-0/+1
|
* Allow unsetting keys with the standard Set dbus operationAlexander Larsson2009-06-251-1/+20
| | | | Passing a key value type of Byte means unset that key.
* Add gvfsd-metadata update daemonAlexander Larsson2009-06-231-0/+573
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.