file

file

Functions

Types and Values

Description

Functions

a_file_check_ext ()

gboolean
a_file_check_ext (const gchar *filename,
                  const gchar *fileext);

check_file_magic_vik ()

gboolean
check_file_magic_vik (const gchar *filename);

append_file_ext ()

gchar *
append_file_ext (const gchar *filename,
                 VikFileType_t type);

Append a file extension, if not already present.

Returns

a newly allocated string


a_file_load ()

VikLoadType_t
a_file_load (VikAggregateLayer *top,
             VikViewport *vp,
             VikTrwLayer *vtl,
             const gchar *filename_or_uri,
             gboolean new_layer,
             gboolean external,
             const gchar *name);

a_file_save ()

gboolean
a_file_save (VikAggregateLayer *top,
             gpointer vp,
             const gchar *filename);

a_file_export ()

gboolean
a_file_export (VikTrwLayer *vtl,
               const gchar *filename,
               VikFileType_t file_type,
               VikTrack *trk,
               gboolean write_hidden);

A general export command to convert from Viking TRW layer data to an external supported format. The write_hidden option is provided mainly to be able to transfer selected items when uploading to a GPS

Parameters

vtl

The TrackWaypoint to export data from

 

filename

The name of the file to be written

 

file_type

Choose one of the supported file types for the export

 

trk

If specified then only export this track rather than the whole layer

 

write_hidden

Whether to write invisible items

 

a_file_export_babel ()

gboolean
a_file_export_babel (VikTrwLayer *vtl,
                     const gchar *filename,
                     const gchar *format,
                     gboolean tracks,
                     gboolean routes,
                     gboolean waypoints,
                     const gchar *suboptions);

file_write_layer_param ()

void
file_write_layer_param (FILE *f,
                        const gchar *name,
                        VikLayerParamType type,
                        VikLayerParamData data);

file_realpath ()

char *
file_realpath (const char *path,
               char *real);

file_realpath_dup ()

char *
file_realpath_dup (const char *path);

file_GetRelativeFilename ()

const gchar *
file_GetRelativeFilename (gchar *currentDirectory,
                          gchar *absoluteFilename);

Types and Values

enum VikFileType_t

Members

FILE_TYPE_GPSPOINT

   

FILE_TYPE_GPSMAPPER

   

FILE_TYPE_GPX

   

FILE_TYPE_KML

   

FILE_TYPE_GEOJSON

   

FILE_TYPE_TCX

   

enum VikLoadType_t

Members

LOAD_TYPE_READ_FAILURE

   

LOAD_TYPE_GPSBABEL_FAILURE

   

LOAD_TYPE_GPX_FAILURE

   

LOAD_TYPE_TCX_FAILURE

   

LOAD_TYPE_KML_FAILURE

   

LOAD_TYPE_UNSUPPORTED_FAILURE

   

LOAD_TYPE_OTHER_FAILURE_NON_FATAL

   

LOAD_TYPE_VIK_FAILURE_NON_FATAL

   

LOAD_TYPE_VIK_SUCCESS

   

LOAD_TYPE_OTHER_SUCCESS