fabaccess-bffh/bffhd/capnp/machinesystem.rs

56 lines
1.5 KiB
Rust
Raw Normal View History

2022-03-12 17:31:53 +01:00
use crate::authorization::AuthorizationHandle;
use crate::session::SessionHandle;
use api::machinesystem_capnp::machine_system::{
info, InfoParams, InfoResults, Server as MachineSystem,
};
use capnp::capability::Promise;
2021-12-06 21:53:42 +01:00
#[derive(Debug, Clone)]
pub struct Machines {
2022-03-12 17:31:53 +01:00
session: SessionHandle,
2021-12-06 21:53:42 +01:00
}
impl Machines {
2022-03-12 17:31:53 +01:00
pub fn new(session: SessionHandle) -> Self {
Self { session }
2021-12-06 21:53:42 +01:00
}
}
impl MachineSystem for Machines {
2022-03-12 17:31:53 +01:00
fn info(&mut self, _: InfoParams, _: InfoResults) -> Promise<(), ::capnp::Error> {
Promise::err(::capnp::Error::unimplemented(
"method not implemented".to_string(),
))
}
}
2021-12-06 21:53:42 +01:00
2022-03-12 17:31:53 +01:00
impl info::Server for Machines {
fn get_machine_list(
&mut self,
_: info::GetMachineListParams,
_: info::GetMachineListResults,
) -> Promise<(), ::capnp::Error> {
Promise::err(::capnp::Error::unimplemented(
"method not implemented".to_string(),
))
}
fn get_machine(
&mut self,
_: info::GetMachineParams,
_: info::GetMachineResults,
) -> Promise<(), ::capnp::Error> {
Promise::err(::capnp::Error::unimplemented(
"method not implemented".to_string(),
))
}
fn get_machine_u_r_n(
&mut self,
_: info::GetMachineURNParams,
_: info::GetMachineURNResults,
) -> Promise<(), ::capnp::Error> {
Promise::err(::capnp::Error::unimplemented(
"method not implemented".to_string(),
))
}
}