mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
eb9d6d0f94
commit
8e2ed59c83
1 changed files with 8 additions and 0 deletions
8
dive.h
8
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)
|
||||
|
|
Loading…
Reference in a new issue