diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-06-02 16:56:02 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-02 23:57:16 -0700 |
commit | cfa51c6526c8e178f675456330ef890e4e2bb2f8 (patch) | |
tree | 6e26529b637e10cb97446635fd3e6b4081af1c6c /dive.h | |
parent | 8e2ed59c833dccba32395b4037f7eb2dd5e1d52a (diff) | |
download | subsurface-cfa51c6526c8e178f675456330ef890e4e2bb2f8.tar.gz |
Add stubs for the main methods that will operate on pictures.
add, remove, get count, and picture_load_exif_data.
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.h | 23 |
1 files changed, 15 insertions, 8 deletions
@@ -81,12 +81,6 @@ 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); @@ -255,7 +249,7 @@ typedef struct dive_trip /* List of dive trips (sorted by date) */ extern dive_trip_t *dive_trip_list; - +struct picture; struct dive { int number; tripflag_t tripflag; @@ -285,9 +279,22 @@ struct dive { struct tag_entry *tag_list; struct divecomputer dc; int id; // unique ID for this dive - struct picture_list *picture_list; + struct picture *picture_list; +}; + +/* picture list and methods related to dive picture handling */ +struct picture { + char *filename; + time_t timestamp; + struct picture *next; }; +extern struct picture *dive_add_picture(struct dive *d, char *picture); +extern void dive_remove_picture(struct dive *d, char *picture); +extern uint dive_get_picture_count(struct dive *d); +extern void picture_load_exif_data(struct picture *p); + + static inline int dive_has_gps_location(struct dive *dive) { return dive->latitude.udeg || dive->longitude.udeg; |