Benoit Lefevre wrote:

    After having a (long) look to the XPCOM documentation you pointed
    out, i finally found the cache service i was looking for :


http://www.xulplanet.com/references/xpcomref/ifaces/nsICacheService.html

    Unfortunately, the way to use it is still a bite fuzzy. I'm planing to
get a
    file back from the cache according to a given URI.

    But the only way to fetch something from the cache i can figure out is
    thru this sequence of method call (starting from the previous
CacheService) :


http://www.xulplanet.com/references/xpcomref/ifaces/nsICacheService.html#method_createSession

http://www.xulplanet.com/references/xpcomref/ifaces/nsICacheSession.html

http://www.xulplanet.com/references/xpcomref/ifaces/nsICacheSession.html#method_openCacheEntry

    What this method is returning give me almost a direct access to what i'm
    looking for (the file representation of a jpg to access exif part of
it).

But that it is requesting a "char *key" parameter is puzzling me ...

My guess is that you can pass in a URL as that key, if you load the URL about:cache in Mozilla and then look at entries it shows something alike

           Key: http://groups.google.com/intl/en_ALL/images/groups_res.gif
     Data size: 26216 bytes
   Fetch count: 1
 Last modified: 12/24/04 14:54:33
       Expires: 01/17/38 20:14:02

so the key is probably simply the URL the cache item has been loaded from.


--

        Martin Honnen
        http://JavaScript.FAQTs.com/
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to