static void save_dc(struct membuffer *b, struct dive *dive, struct divecomputer *dc) { put_format(b, " <divecomputer"); show_utf8(b, dc->model, " model='", "'", 1); if (dc->deviceid) put_format(b, " deviceid='%08x'", dc->deviceid); if (dc->diveid) put_format(b, " diveid='%08x'", dc->diveid); if (dc->when && dc->when != dive->when) show_date(b, dc->when); if (dc->duration.seconds && dc->duration.seconds != dive->dc.duration.seconds) put_duration(b, dc->duration, " duration='", " min'"); if (dc->divemode != OC) { for (enum dive_comp_type i = 0; i < NUM_DC_TYPE; i++) if (dc->divemode == i) show_utf8(b, divemode_text[i], " dctype='", "'", 1); if (dc->no_o2sensors) put_format(b," no_o2sensors='%d'", dc->no_o2sensors); } put_format(b, ">\n"); save_depths(b, dc); save_temperatures(b, dc); save_airpressure(b, dc); save_salinity(b, dc); put_duration(b, dc->surfacetime, " <surfacetime>", " min</surfacetime>\n"); save_extra_data(b, dc->extra_data); save_events(b, dc->events); save_samples(b, dc->samples, dc->sample); put_format(b, " </divecomputer>\n"); }
bool Drumkit::save( const QString& dk_dir, bool overwrite ) { INFOLOG( QString( "Saving drumkit %1 into %2" ).arg( __name ).arg( dk_dir ) ); if( !Filesystem::mkdir( dk_dir ) ) { return false; } bool ret = save_samples( dk_dir, overwrite ); if ( ret ) { ret = save_file( Filesystem::drumkit_file( dk_dir ), overwrite ); } return ret; }
static void save_dc(struct membuffer *b, struct dive *dive, struct divecomputer *dc) { show_utf8(b, "model ", dc->model, "\n"); if (dc->deviceid) put_format(b, "deviceid %08x\n", dc->deviceid); if (dc->diveid) put_format(b, "diveid %08x\n", dc->diveid); if (dc->when && dc->when != dive->when) show_date(b, dc->when); if (dc->duration.seconds && dc->duration.seconds != dive->dc.duration.seconds) put_duration(b, dc->duration, "duration ", "min\n"); save_depths(b, dc); save_temperatures(b, dc); save_airpressure(b, dc); save_salinity(b, dc); put_duration(b, dc->surfacetime, "surfacetime ", "min\n"); save_events(b, dc->events); save_samples(b, dc->samples, dc->sample); }
static void save_dc(struct membuffer *b, struct dive *dive, struct divecomputer *dc) { put_format(b, " <divecomputer"); show_utf8(b, dc->model, " model='", "'", 1); if (dc->deviceid) put_format(b, " deviceid='%08x'", dc->deviceid); if (dc->diveid) put_format(b, " diveid='%08x'", dc->diveid); if (dc->when && dc->when != dive->when) show_date(b, dc->when); if (dc->duration.seconds && dc->duration.seconds != dive->dc.duration.seconds) put_duration(b, dc->duration, " duration='", " min'"); put_format(b, ">\n"); save_depths(b, dc); save_temperatures(b, dc); save_airpressure(b, dc); save_salinity(b, dc); put_duration(b, dc->surfacetime, " <surfacetime>", " min</surfacetime>\n"); save_events(b, dc->events); save_samples(b, dc->samples, dc->sample); put_format(b, " </divecomputer>\n"); }