use http::Uri;
use crate::{model::Operation, operation::IppOperation, request::IppRequestResponse};
#[derive(Default)]
pub struct CupsGetPrinters;
impl CupsGetPrinters {
pub fn new() -> CupsGetPrinters {
CupsGetPrinters
}
}
impl IppOperation for CupsGetPrinters {
fn into_ipp_request(self) -> IppRequestResponse {
IppRequestResponse::new(self.version(), Operation::CupsGetPrinters, None)
}
}
pub struct CupsDeletePrinter(Uri);
impl CupsDeletePrinter {
pub fn new(printer_uri: Uri) -> CupsDeletePrinter {
CupsDeletePrinter(printer_uri)
}
}
impl IppOperation for CupsDeletePrinter {
fn into_ipp_request(self) -> IppRequestResponse {
IppRequestResponse::new(self.version(), Operation::CupsDeletePrinter, Some(self.0))
}
}