file-info: Add a G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID attribute
authorRyan Lortie <desrt@desrt.ca>
Fri, 11 Oct 2013 10:22:31 +0000 (11:22 +0100)
committerRyan Lortie <desrt@desrt.ca>
Wed, 23 Oct 2013 15:56:28 +0000 (11:56 -0400)
commitfe7069749fe39a006985ec266260a3c02ee8c855
tree4c003df920a76336fa6617bdf5bf7a176ba56dcc
parent38dc8d4cd302082c4e308d0b7032160c98736244
file-info: Add a G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID attribute

This indicates whether the thumbnail (given by G_FILE_ATTRIBUTE_THUMBNAIL_PATH)
is valid — i.e. to represent the file in its current state. If
G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID is FALSE (for a normal _or_ failed
thumbnail) it means the file has changed since the thumbnail was generated, and
the thumbnail is out of date.

Part of checking thumbnail validity (by the spec) involves parsing
headers out of the thumbnail .png so we include some (small) code to do
that in a separate file.  We will likely want to copy this code to gvfs
to do the same for GVfsFile.

Heavily based on a patch from Philip Withnall <philip.withnall@collabora.co.uk>
who suggested the feature and designed the API.

https://bugzilla.gnome.org/show_bug.cgi?id=709898
docs/reference/gio/Makefile.am
docs/reference/gio/gio-sections.txt
gio/Makefile.am
gio/gfileattribute.c
gio/gfileinfo-priv.h
gio/gfileinfo.c
gio/gfileinfo.h
gio/glocalfileinfo.c
gio/thumbnail-verify.c [new file with mode: 0644]
gio/thumbnail-verify.h [new file with mode: 0644]