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>
This commit is contained in:
Tomaz Canabrava 2014-06-02 16:56:02 -03:00 committed by Dirk Hohndel
parent 8e2ed59c83
commit cfa51c6526
2 changed files with 34 additions and 8 deletions

19
dive.c
View file

@ -2259,3 +2259,22 @@ int average_depth(struct diveplan *dive)
return integral / last_time;
}
void picture_load_exif_data(struct picture *p)
{
}
struct picture* dive_add_picture(struct dive *d, char *picture)
{
}
uint dive_get_picture_count(struct dive *d)
{
}
void dive_remove_picture(struct dive *d, char *picture)
{
}

23
dive.h
View file

@ -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;