From 8e2ed59c833dccba32395b4037f7eb2dd5e1d52a Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 2 Jun 2014 16:40:31 -0300 Subject: Add a picture_list struct Add a picture_list struct that will hold all the pictures relative to a dive. Before we used to hold events for the pictures, but an event is a much bigger struct so this will save a bit of memory, and we will also stop to use magic flags and special treatment for pictures on the dive profile. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- dive.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dive.h b/dive.h index 26732df15..8337ed5e4 100644 --- a/dive.h +++ b/dive.h @@ -81,6 +81,13 @@ struct event { char name[]; }; +/* picture list and methods related to dive picture handling */ +struct picture_list{ + char *filename; + time_t timestamp; + struct picture_list *next; +}; + extern int get_pressure_units(int mb, const char **units); extern double get_depth_units(int mm, int *frac, const char **units); extern double get_volume_units(unsigned int ml, int *frac, const char **units); @@ -278,6 +285,7 @@ struct dive { struct tag_entry *tag_list; struct divecomputer dc; int id; // unique ID for this dive + struct picture_list *picture_list; }; static inline int dive_has_gps_location(struct dive *dive) -- cgit v1.2.3-70-g09d2