Skip to content

Commit

Permalink
Merge remote-tracking branch 'kkent030315/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Dec 27, 2023
2 parents 436da87 + d450630 commit d6c175b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ pub enum ServiceStartType {
OnDemand = Services::SERVICE_DEMAND_START,
/// Disabled service
Disabled = Services::SERVICE_DISABLED,
/// Driver start on system startup.
/// This start type is only applicable to driver services.
SystemStart = Services::SERVICE_SYSTEM_START,
/// Driver start on OS boot.
/// This start type is only applicable to driver services.
BootStart = Services::SERVICE_BOOT_START,
}

impl ServiceStartType {
Expand All @@ -105,6 +111,8 @@ impl ServiceStartType {
x if x == ServiceStartType::AutoStart.to_raw() => Ok(ServiceStartType::AutoStart),
x if x == ServiceStartType::OnDemand.to_raw() => Ok(ServiceStartType::OnDemand),
x if x == ServiceStartType::Disabled.to_raw() => Ok(ServiceStartType::Disabled),
x if x == ServiceStartType::SystemStart.to_raw() => Ok(ServiceStartType::SystemStart),
x if x == ServiceStartType::BootStart.to_raw() => Ok(ServiceStartType::BootStart),
_ => Err(ParseRawError::InvalidInteger(raw)),
}
}
Expand Down

0 comments on commit d6c175b

Please sign in to comment.