From 2f2e0cc7ded9b2c8afe29281c621d8ee6c5def9a Mon Sep 17 00:00:00 2001 From: Heinrich Wendel Date: Wed, 9 Jul 2003 14:18:45 +0000 Subject: added module --- recent-files/recent-file-spec.xml | 156 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 recent-files/recent-file-spec.xml diff --git a/recent-files/recent-file-spec.xml b/recent-files/recent-file-spec.xml new file mode 100644 index 0000000..b473de8 --- /dev/null +++ b/recent-files/recent-file-spec.xml @@ -0,0 +1,156 @@ + + +
+ + Recent File Storage Specification + Version 0.2 + 12 August 2002 + + + James + Willcox + +
+ jwillcox@gnome.org +
+
+
+
+
+ + + Overview + + Many applications choose to have a menu containing a list of recently + used files, which can be used as an alternative to opening a file + selector. GNOME, and KDE applications have done this for quite some + time, and probably others have as well. + This specification aims to do the following things: + + + + Provide a standard mechanism for storing a list of recently used + files (really, URIs) + + + Allow for notification of changes in the list + + + + Accomplishing this will make using applications that are not native + to the user's desktop a bit nicer, and give a more unified feel to + the X desktop in general. It will be especially useful to applications + that don't belong to a specific desktop at all, such as Mozilla and + Open Office, + since those applications could become compatible with all desktops + in this area without special case considerations for each one. + + + + + Storage + + For different desktops and applications to have access to the same + information, a protocol for storing the recent file list has to be + determined. An XML document will be used, of the form below: + + + + + file:///home/jwillcox/testfile.txt + text/plain + 1028181153 + + + Recent File Test + + + + file:///home/jwillcox/recent-file-spec.xml + text/xml + 1028181158 + + + Recent File Test + + + + ]]> + + The URI, Mime-Type, Timestamp tags are required, but the + Private, Groups, and Group tags are not. The Timestamp tag should be + the number of + seconds sinced the Epoch when the item was added to the list. + The Group tags exist for the purpose of + making groups of items with an arbitrary set of MIME types. A single item + can belong to an unlimited number of groups. If the Private tag is + specified, it means that implementations should only include the item if + requestor has specifically asked for items in a group that the item + belongs to. For instance, maybe a file selector would like to hold a list + of directories that you have recently saved files in, and allow you to + choose from one of these next time you save a file. You wouldn't want + those directories showing up in the "Recent Documents" menu. If the items + are put into the "File Selector Save Directories" group and marked as + private, this problem is solved. + + + All text in the file should be stored in the UTF-8 encoding. + No local paths are allowed in the URI tag. They should be converted to a + valid + URI + with a "file" scheme. Items with the + same URI should not be allowed. If a duplicate is found, it should have + its timestamp updated, and any new groups added to it. No other + information should be changed. The document should be stored in + "~/.recently-used", and it should contain no more than 500 items. + + + Before reading or writing the document, it should be locked using the + POSIX lockf() mechanism, and unlocked when finished. + + + + + Notification + + Notification should be accomplished by simply monitoring the document for + changes. This can be done by either polling the file every so often, + or using a library like + FAM. + + + + + Change history + + Version 0.2, 12 August 2002, James Willcox + + + + + Switched from flat-file storage to XML. This was done to + facilitate easier storage of meta-data. Files can now belong + to "groups", and the timestamp is now a required piece of + meta-data. + + + + + + + Version 0.1, 8 July 2002, James Willcox + + + + + Created initial draft. + + + + + + +
-- cgit v1.2.3-54-g00ecf