2011-09-05 19:12:58 +00:00
|
|
|
#ifndef DIVELIST_H
|
|
|
|
#define DIVELIST_H
|
|
|
|
|
2013-04-01 10:51:49 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
2013-04-24 23:52:18 +00:00
|
|
|
#endif
|
2013-04-24 23:33:29 +00:00
|
|
|
|
2011-09-19 23:41:56 +00:00
|
|
|
struct dive;
|
|
|
|
|
2011-11-13 17:29:07 +00:00
|
|
|
extern void update_cylinder_related_info(struct dive *);
|
2011-09-21 04:29:09 +00:00
|
|
|
extern void mark_divelist_changed(int);
|
|
|
|
extern int unsaved_changes(void);
|
2012-09-03 04:48:30 +00:00
|
|
|
extern void remove_autogen_trips(void);
|
2014-02-28 04:09:57 +00:00
|
|
|
extern double init_decompression(struct dive *dive);
|
2013-04-07 03:49:06 +00:00
|
|
|
|
|
|
|
/* divelist core logic functions */
|
2013-04-24 23:33:29 +00:00
|
|
|
extern void process_dives(bool imported, bool prefer_imported);
|
2013-05-02 17:38:34 +00:00
|
|
|
extern char *get_nitrox_string(struct dive *dive);
|
2013-10-07 20:43:17 +00:00
|
|
|
|
2013-04-07 03:49:06 +00:00
|
|
|
extern dive_trip_t *find_trip_by_idx(int idx);
|
2013-10-07 20:43:17 +00:00
|
|
|
|
2013-04-07 03:49:06 +00:00
|
|
|
extern int trip_has_selected_dives(dive_trip_t *trip);
|
|
|
|
extern void get_dive_gas(struct dive *dive, int *o2_p, int *he_p, int *o2low_p);
|
|
|
|
extern int get_divenr(struct dive *dive);
|
|
|
|
extern dive_trip_t *find_matching_trip(timestamp_t when);
|
2013-12-12 23:03:25 +00:00
|
|
|
extern void remove_dive_from_trip(struct dive *dive, short was_autogen);
|
2013-04-07 03:49:06 +00:00
|
|
|
extern dive_trip_t *create_and_hookup_trip_from_dive(struct dive *dive);
|
|
|
|
extern void autogroup_dives(void);
|
2013-09-24 04:57:28 +00:00
|
|
|
extern struct dive *merge_two_dives(struct dive *a, struct dive *b);
|
2013-09-24 10:42:40 +00:00
|
|
|
extern bool consecutive_selected();
|
2013-04-07 03:49:06 +00:00
|
|
|
extern void select_dive(int idx);
|
|
|
|
extern void deselect_dive(int idx);
|
2013-11-19 22:16:33 +00:00
|
|
|
void find_new_trip_start_time(dive_trip_t *trip);
|
2013-04-07 03:49:06 +00:00
|
|
|
|
|
|
|
#ifdef DEBUG_TRIP
|
|
|
|
extern void dump_selection(void);
|
|
|
|
extern void dump_trip_list(void);
|
|
|
|
#endif
|
|
|
|
|
2013-04-01 10:51:49 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2014-02-11 18:14:46 +00:00
|
|
|
#endif // DIVELIST_H
|