AirLibrary/Client/AirServiceProvider/ApplyUpdate.rs
1//! `AirServiceProvider::ApplyUpdate` - tell the Air daemon to install a
2//! previously downloaded update. Wraps
3//! [`crate::Client::AirClient::AirClient::ApplyUpdate`].
4
5use crate::{AirError, Client::AirServiceProvider::AirServiceProvider, dev_log};
6
7impl AirServiceProvider {
8 /// Applies the update package at `update_path` and tags it with
9 /// `version` for the daemon's bookkeeping.
10 pub async fn ApplyUpdate(&self, version:String, update_path:String) -> Result<(), AirError> {
11 let RequestID = crate::Utility::GenerateRequestId();
12
13 dev_log!("grpc", "[AirServiceProvider] ApplyUpdate (request_id: {})", RequestID);
14
15 self.client.ApplyUpdate(RequestID, version, update_path).await
16 }
17}