Add PerformJobsNeeded enum (DC_JOBS_NEEDED_* in core)

This commit is contained in:
Alexander Krotov
2019-11-28 15:56:18 +01:00
committed by Floris Bruynooghe
parent fe7852b64e
commit 95b90a59dc
2 changed files with 19 additions and 6 deletions

View File

@@ -489,12 +489,25 @@ pub struct BobStatus {
pub qr_scan: Option<Lot>,
}
#[derive(Debug, PartialEq)]
pub enum PerformJobsNeeded {
Not,
AtOnce,
AvoidDos,
}
impl Default for PerformJobsNeeded {
fn default() -> Self {
Self::Not
}
}
#[derive(Default, Debug)]
pub struct SmtpState {
pub idle: bool,
pub suspended: bool,
pub doing_jobs: bool,
pub perform_jobs_needed: i32,
pub perform_jobs_needed: PerformJobsNeeded,
pub probe_network: bool,
}