X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/94933cb8c883c442ed95f19a11dacb0783f65c3b..4f14a010d0a7d09721c32f0d35ffbeae05ea994c:/src/file.h?ds=inline diff --git a/src/file.h b/src/file.h index 2b301a32..b03ebcd0 100644 --- a/src/file.h +++ b/src/file.h @@ -28,16 +28,23 @@ #include "viktrwlayer.h" #include "vikviewport.h" -#define FILE_TYPE_GPSPOINT 1 -#define FILE_TYPE_GPSMAPPER 2 -#define FILE_TYPE_GPX 3 +typedef enum { +FILE_TYPE_GPSPOINT=1, +FILE_TYPE_GPSMAPPER=2, +FILE_TYPE_GPX=3, +} VikFileType_t; const gchar *a_file_basename ( const gchar *filename ); +gboolean check_file_ext ( const gchar *filename, const gchar *fileext ); /* 0 on failure, 1 on success (vik file) 2 on success (other file) */ gshort a_file_load ( VikAggregateLayer *top, VikViewport *vp, const gchar *filename ); gboolean a_file_save ( VikAggregateLayer *top, gpointer vp, const gchar *filename ); -gboolean a_file_export ( VikTrwLayer *vtl, const gchar *filename, gshort file_type ); +/* Only need to define VikTrack and trackname if the file type is FILE_TYPE_GPX_TRACK */ +gboolean a_file_export ( VikTrwLayer *vtl, const gchar *filename, VikFileType_t file_type, const gchar *trackname ); const gchar *a_get_viking_dir(); +void file_write_layer_param ( FILE *f, const gchar *name, guint8 type, VikLayerParamData data ); + + #endif