summaryrefslogtreecommitdiffstats
path: root/core/picture.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/picture.h')
-rw-r--r--core/picture.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/picture.h b/core/picture.h
index 61492fffc..b763adfe9 100644
--- a/core/picture.h
+++ b/core/picture.h
@@ -10,6 +10,8 @@
extern "C" {
#endif
+struct dive;
+
struct picture {
char *filename;
offset_t offset;
@@ -17,6 +19,13 @@ struct picture {
};
static const struct picture empty_picture = { NULL, { 0 }, { { 0 }, { 0 } } };
+/* loop through all pictures of a dive */
+#define FOR_EACH_PICTURE(_dive) \
+ if ((_dive) && (_dive)->pictures.nr) \
+ for (struct picture *picture = (_dive)->pictures.pictures; \
+ picture < (_dive)->pictures.pictures + (_dive)->pictures.nr; \
+ picture++)
+
/* Table of pictures. Attention: this stores pictures,
* *not* pointers to pictures. This has two crucial consequences:
* 1) Pointers to pictures are not stable. They may be
@@ -37,6 +46,9 @@ extern void remove_from_picture_table(struct picture_table *, int idx);
extern int get_picture_idx(const struct picture_table *, const char *filename); /* Return -1 if not found */
extern void sort_picture_table(struct picture_table *);
+extern struct picture *create_picture(const char *filename, int shift_time, bool match_all, struct dive **dive);
+extern bool picture_check_valid_time(timestamp_t timestamp, int shift_time);
+
#ifdef __cplusplus
}
#endif