beagle r3666 - trunk/beagle/beagled/FileSystemQueryable



Author: dbera
Date: 2007-04-22 04:13:28 +0100 (Sun, 22 Apr 2007)
New Revision: 3666
ViewCVS link: http://svn.gnome.org/viewcvs/beagle?rev=3666&view=rev

Modified:
   trunk/beagle/beagled/FileSystemQueryable/FileSystemQueryable.cs
Log:
XMP sidecar support.

During crawling: Use the cache_uid_by_path table to store (till PostAddHook) <path,id> for all addition indexables. Use this table to lookup id of already scheduled basefiles for new xmp files. If not scheduled, then schedule the basefile (will almost never happen, directory enumnerator will always return foo before foo.xmp) and then use the id of the scheduled indexable to create a prop-change indexable for the xmp file. Before scheduling any new file, check the cache_uid_by_path table to see if a file is already scheduled before hand. The cache_uid_by_path table might add some memory overhead, but I do not see any better way. A per-directory table might have been (slightly) better, but the AddIndexableGenerator destroys semantics of a directory.

>From inotify: Same as above. But if foo is not found for foo.xmp, assume foo does not exist and index foo.xmp as a normal xmp file. Which means, if you have foo.xmp and then create foo, properties from foo.xmp will _not_ be added to foo. This is BY DESIGN.

What does not work (yet):
* Actual XMP parsing: Need an XMP parser to return properties from xmp files. Currently, only one hardcoded property is set.
* Removal of xmp files: This one is tricky. I plan to retrieve all secondary properties, and remove the one with namespace "xmp" and then send a prop-change indexable. Veeeeeeery complicated.
* Renames/moves: As before, by design, if foo comes into existence after foo.xmp, nothing happens. If foo.xmp is renamed, a removal+addition might be necessary. It might be more complicated than it sounds.
* foo.xmp is updated: Follow the path of removal above. Maybe short-circuit. But I foresee lots and lots of code. Arghh... clumsy.

Any help is appreciated :)





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]