]> Pileus Git - grits/blobdiff - src/data.h
Replacing GFile/GIO with libsoup
[grits] / src / data.h
index 994384bf76aa8d136360e3f6985d2fcf3b62e4db..dacde3bc2c877aff10268f082691d1f28c1f5def 100644 (file)
 #ifndef __DATA_H__
 #define __DATA_H__
 
-typedef void (*AWeatherCacheDoneCallback)(gchar *file, gpointer user_data);
+typedef enum {
+       AWEATHER_ONCE,    // Cache the file if it does not exist
+       AWEATHER_UPDATE,  // Append additional data to cached copy (resume)
+       AWEATHER_REFRESH, // Delete existing file and cache a new copy
+} AWeatherCacheType;
 
-void cache_file(char *base, char *path, AWeatherCacheDoneCallback callback, gpointer user_data);
+typedef void (*AWeatherCacheDoneCallback)(gchar *file, gboolean updated,
+               gpointer user_data);
+
+void cache_file(char *base, char *path, AWeatherCacheType update,
+               AWeatherCacheDoneCallback callback, gpointer user_data);
 
 #endif