-/* Type to hold name of track and timestamp of first trackpoint */
-typedef struct {
- time_t first_timestamp;
- gpointer id;
-} gpx_track_and_timestamp;
-
-typedef struct {
- gpx_track_and_timestamp *trks;
- guint i;
- guint n_trks;
-} gpx_gather_tracks_passalong_t;
-
-/* Function to collect a track and the first timestamp in the list */
-static void gpx_collect_track (const gpointer id, VikTrack *track, gpx_gather_tracks_passalong_t *passalong)
-{
- if (passalong->i < passalong->n_trks)
- {
- passalong->trks[passalong->i].id = id;
- if (track && track->trackpoints && track->trackpoints->data)
- {
- VikTrackpoint *first_point = (VikTrackpoint *)track->trackpoints->data;
- passalong->trks[passalong->i].first_timestamp = first_point->timestamp;
- }
- else
- {
- passalong->trks[passalong->i].first_timestamp = 0;
- }
- passalong->i++;
- }
-}
-