[gthumb] Removed unused cache functions



commit 79504858c98f4e63b7845c90cd20134e906fe4ce
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Mon May 11 15:56:08 2009 -0400

    Removed unused cache functions
---
 libgthumb/file-utils.c |   84 ------------------------------------------------
 libgthumb/file-utils.h |    6 ---
 2 files changed, 0 insertions(+), 90 deletions(-)

diff --git a/libgthumb/file-utils.c b/libgthumb/file-utils.c
index d331930..ff32c8c 100644
--- a/libgthumb/file-utils.c
+++ b/libgthumb/file-utils.c
@@ -2604,90 +2604,6 @@ check_cache_free_space (void)
 }
 
 
-typedef struct {
-	CopyDoneFunc done_func;
-	gpointer     done_data;
-} CopyToCacheData;
-
-
-static void
-copy_remote_file_to_cache_done (const char     *uri, 
-				GError         *error, 
-				gpointer        callback_data)
-{
-	CopyToCacheData *data = callback_data;
-
-	if (error == NULL) {
-		FileData *cache_file;
-		
-		cache_file = file_data_new (uri);
-		file_data_update (cache_file);
-		cache_used_space += cache_file->size;
-		cache_files = g_list_prepend (cache_files, cache_file);
-	}
-	
-	if (data->done_func != NULL)
-                /*FIXME: change GnomeVFSResult to GError and use below instead of NULL*/
-		data->done_func (uri, NULL, data->done_data);
-	
-	g_free (data);
-}
-
-
-CopyData *
-copy_remote_file_to_cache (FileData     *file,
-			   CopyDoneFunc  done_func,
-			   gpointer      done_data)
-{
-	CopyData *copy_data = NULL;
-	char     *cache_uri;
-	
-	cache_uri = get_cache_uri_from_uri (file->path);
-	if (is_local_file (file->path) || (get_file_mtime (cache_uri) >= file->mtime)) {
-		copy_data = copy_data_new (file->path, cache_uri, done_func, done_data);
-		copy_data->idle_id = g_idle_add (copy_file_async_done, copy_data);
-	}
-	else {
-		CopyToCacheData *data;
-		
-		check_cache_free_space ();
-		
-		data = g_new0 (CopyToCacheData, 1);
-		data->done_func = done_func;
-		data->done_data = done_data;
-						
-		copy_data = copy_file_async (file->path, 
-				 	     cache_uri, 
-				 	     copy_remote_file_to_cache_done, 
-				 	     data);
-	}
-	g_free (cache_uri);
-	
-	return copy_data;
-}
-
-
-CopyData *
-update_file_from_cache (FileData     *file,
-			CopyDoneFunc  done_func,
-			gpointer      done_data)
-{
-	CopyData *copy_data = NULL;	
-	char     *cache_uri;
-	
-	cache_uri = get_cache_uri_from_uri (file->path);
-	if (is_local_file (file->path) || (file->mtime >= get_file_mtime (cache_uri))) {
-		copy_data = copy_data_new (file->path, cache_uri, done_func, done_data);
-		copy_data->idle_id = g_idle_add (copy_file_async_done, copy_data);
-	}
-	else
-		copy_data = copy_file_async (cache_uri, file->path, done_func, done_data);
-	g_free (cache_uri);
-	
-	return copy_data;
-}
-
-
 static GdkPixbuf*
 get_pixbuf_using_external_converter (FileData   *file,
 				     int         requested_width,
diff --git a/libgthumb/file-utils.h b/libgthumb/file-utils.h
index eadbcc6..c3bbd41 100644
--- a/libgthumb/file-utils.h
+++ b/libgthumb/file-utils.h
@@ -241,12 +241,6 @@ char *              get_cache_filename_from_uri   (const char       *uri);
 char *              get_cache_uri_from_uri        (const char       *uri);
 void                free_cache                    (void);
 void                check_cache_free_space        (void);
-CopyData *          copy_remote_file_to_cache     (FileData         *file,
-						   CopyDoneFunc      done_func,
-						   gpointer          done_data);
-CopyData *          update_file_from_cache        (FileData         *file,
-						   CopyDoneFunc      done_func,
-						   gpointer          done_data);
 GHashTable *        read_dot_hidden_file          (const char       *uri);
 
 /* Pixbuf + VFS */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]