Rockbox mail archive
Subject: Viewing Files With Plugins Proof of concept
From: Henrik Backe (backe_at_swipnet.se)
Date: 2004-01-18
I've finally submitted a proof of concept
http://sourceforge.net/tracker/index.php?func=detail&aid=879411&group_id=44306&atid=439120
It is my attemt to implement the scheme in mail
http://rockbox.haxx.se/mail/archive/rockbox-archive-2004-01/0386.shtml
I've made a few changes to this scheme.
- /.rockbox/viewers.config and /.rockbox/viewers are
read/scanned at bootup if no /.rockbox/.viewers.cache
exist. This way we always know what extensions are
supported, and we only get excessive file reads on the
first boot.
- /.rockbox/viewers.config and /.rockbox/viewers are
not read/scanned when a viewer plugin is called.
Instead there is a refresh of .viewers.cache
if a plugins is missing or have filesize zero.
- If a new viewer plugin is added .viewers.cache has to
be refreshed, since this will not be done automagically
I've added an option
settings->system->manage settings->reset plugin list
- I've made the assumption that for example
txt-viewer.rock and viewer.rock will be in
the /.rockbox/viewers folder, and then no rocks with
an extension prefix should be displayed in the
onplay->"open with" menu.
Things left to do
- code policeing
- commenting of the code
- add splashes for some of the error conditions
- add language strings
- figure out a sane value for string_buffer in filetypes.c
It's set to 1000 bytes, but I think it can be reduced.
- One known bug, A second reset of the plugin list will
freeze the unit.
Daniel's patch mentioned in
http://rockbox.haxx.se/mail/archive/rockbox-archive-2004-01/0461.shtml
should be applied before this patch.
.../Henrik
Page was last modified "Jan 10 2012" The Rockbox Crew
|