-/* 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_check_ext ( const gchar *filename, const gchar *fileext );
+
+/*
+ * Function to determine if a filename is a 'viking' type file
+ */
+gboolean check_file_magic_vik ( const gchar *filename );
+
+typedef enum {
+ LOAD_TYPE_READ_FAILURE,
+ LOAD_TYPE_GPSBABEL_FAILURE,
+ LOAD_TYPE_GPX_FAILURE,
+ LOAD_TYPE_UNSUPPORTED_FAILURE,
+ LOAD_TYPE_VIK_FAILURE_NON_FATAL,
+ LOAD_TYPE_VIK_SUCCESS,
+ LOAD_TYPE_OTHER_SUCCESS,
+} VikLoadType_t;
+
+gchar *append_file_ext ( const gchar *filename, VikLoadType_t type );
+
+VikLoadType_t a_file_load ( VikAggregateLayer *top, VikViewport *vp, const gchar *filename );