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