]> Pileus Git - grits/blobdiff - src/data.h
Download progress bars
[grits] / src / data.h
index dacde3bc2c877aff10268f082691d1f28c1f5def..f08f9365c335125abfa773eb29df70a1217cfbe4 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __DATA_H__
 #define __DATA_H__
 
+#include <libsoup/soup.h>
+
 typedef enum {
        AWEATHER_ONCE,    // Cache the file if it does not exist
        AWEATHER_UPDATE,  // Append additional data to cached copy (resume)
@@ -27,7 +29,12 @@ typedef enum {
 typedef void (*AWeatherCacheDoneCallback)(gchar *file, gboolean updated,
                gpointer user_data);
 
-void cache_file(char *base, char *path, AWeatherCacheType update,
-               AWeatherCacheDoneCallback callback, gpointer user_data);
+typedef void (*AWeatherCacheChunkCallback)(gchar *file, goffset cur,
+               goffset total, gpointer user_data);
+
+SoupSession *cache_file(char *base, char *path, AWeatherCacheType update,
+               AWeatherCacheChunkCallback user_chunk_cb,
+               AWeatherCacheDoneCallback user_done_cb,
+               gpointer user_data);
 
 #endif