summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-06-02 16:40:31 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-02 23:56:35 -0700
commit8e2ed59c833dccba32395b4037f7eb2dd5e1d52a (patch)
treec6df6ee6758a84dbe1df37dc3a926a6018aee5ab /dive.h
parenteb9d6d0f94adaf390ae94428afca74c78bc53c53 (diff)
downloadsubsurface-8e2ed59c833dccba32395b4037f7eb2dd5e1d52a.tar.gz
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 <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h8
1 files changed, 8 insertions, 0 deletions
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)