From b8224a01dad949079d0006c6fb809b3e1f9c40b1 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 12 Mar 2008 14:54:04 +0200 Subject: [PATCH] Add path metadata fields, names from GPX metadata. Add some extra data fields to Position struct. --- src/path.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/path.h b/src/path.h index 65e19c1..ac9da80 100644 --- a/src/path.h +++ b/src/path.h @@ -41,6 +41,9 @@ struct _Position { gdouble lon; gfloat altitude; gboolean valid; + gchar *desc; + time_t time; + guint type; }; /** A general definition of a point in the Mapper unit system. */ @@ -62,20 +65,37 @@ struct _WayPoint { /** A Path is a set of PathPoints and WayPoints. */ typedef struct _Path Path; struct _Path { + /* Path points */ Point *head; /* points to first element in array; NULL if empty. */ Point *tail; /* points to last element in array. */ - Point *cap; /* points after last slot in array. */ + Point *cap; /* points after last slot in array. */ + + /* Path waypoints */ WayPoint *whead; /* points to first element in array; NULL if empty. */ WayPoint *wtail; /* points to last element in array. */ WayPoint *wcap; /* points after last slot in array. */ + + /* Path statistics */ guint32 points; gdouble length; gdouble tspeed; gdouble avgspeed; gfloat maxspeed; + + /* GPX metadata fields */ + gchar *name; + gchar *desc; + gchar *author; + gchar *keywords; + time_t time; + gchar *copyright; + gchar *src; }; +/* Null point */ Point _point_null; + +/* Special positions */ Position _home; Position _dest; -- 2.39.5