]> Pileus Git - grits/commitdiff
Document GisData
authorAndy Spencer <andy753421@gmail.com>
Mon, 8 Feb 2010 22:29:22 +0000 (22:29 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 8 Feb 2010 22:29:22 +0000 (22:29 +0000)
src/data/gis-data.c
src/data/gis-data.h

index d3e5b9b9c7e19536d1a296b98597008392c7c46e..1126825be09342eb54d138ff330d35be5e5f8611 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/**
+ * SECTION:gis-data
+ * @short_description: Miscellaneous utilities for data access
+ * @include: glib/gstdio.h
+ *
+ * Various support routines for data access,
+ * these are mostly related to disk caching.
+ */
+
 #include <config.h>
 #include <stdio.h>
 #include <glib.h>
 #include "gis-data.h"
 
 /**
+ * fopen_p:
+ * @path: the path to the file to be opened.
+ * @mode: mode to open the file, see <function>fopen</function> for details
+ *
  * Open a file, creating parent directories if needed
+ *
+ * Returns: the opened file descriptor
  */
 FILE *fopen_p(const gchar *path, const gchar *mode)
 {
index 7c8a72834be5b6dc5eea3cfdb9d62a26ecae30f9..671280dd72648539cb636877e35cbdeb9ba4a339 100644 (file)
 #include <glib.h>
 
 /**
- * Various ways to cach a file
+ * GisCacheType:
+ * @GIS_LOCAL:   Only return local files (for offline mode)
+ * @GIS_ONCE:    Download the file only if it does not exist
+ * @GIS_UPDATE:  Update the file to be like the server
+ * @GIS_REFRESH: Delete the existing file and fetch a new copy
+ *
+ * Various methods for caching data
  */
 typedef enum {
-       GIS_LOCAL,   // Only return local files (for offline mode)
-       GIS_ONCE,    // Download the file only if it does not exist
-       GIS_UPDATE,  // Update the file to be like the server
-       GIS_REFRESH, // Delete the existing file and fetch a new copy
+       GIS_LOCAL,
+       GIS_ONCE,
+       GIS_UPDATE,
+       GIS_REFRESH,
 } GisCacheType;
 
 /**
+ * GisChunkCallback:
+ * @file:      path to the file which is being fetched
+ * @cur:       current offset in the file
+ * @total:     total size of the file
+ * @user_data: the user_data argument passed to the function
+ *
  * Function called when part of a file is fetched
  * Used for updating progress bars, etc
  */
 typedef void (*GisChunkCallback)(gchar *file, goffset cur,
                goffset total, gpointer user_data);
 
-/**
- * Open a file and create the parent directory if necessasairy
- */
 FILE *fopen_p(const gchar *path, const gchar *mode);
 
 #endif