src/lib/cache.h
changeset 8 400ddf1e7aa9
parent 7 997906f5fd2d
child 9 a31048ff76a2
equal deleted inserted replaced
7:997906f5fd2d 8:400ddf1e7aa9
    65  * Construct the image cache info object associated with the given image.
    65  * Construct the image cache info object associated with the given image.
    66  */
    66  */
    67 int pt_cache_open (struct pt_cache **cache_ptr, const char *path, int mode);
    67 int pt_cache_open (struct pt_cache **cache_ptr, const char *path, int mode);
    68 
    68 
    69 /**
    69 /**
    70  * Verify if the cached data has become stale compared to the given original file.
    70  * Verify if the cached data eixsts, or has become stale compared to the given original file.
       
    71  *
       
    72  * @return one of pt_cache_status; <0 on error, 0 if fresh, >0 otherwise
    71  */
    73  */
    72 int pt_cache_stale (struct pt_cache *cache, const char *img_path);
    74 int pt_cache_status (struct pt_cache *cache, const char *img_path);
    73 
    75 
    74 /**
    76 /**
    75  * Update the cache data from the given PNG image.
    77  * Update the cache data from the given PNG image.
    76  */
    78  */
    77 int pt_cache_update_png (struct pt_cache *cache, png_structp png, png_infop info);
    79 int pt_cache_update_png (struct pt_cache *cache, png_structp png, png_infop info);