33 lines
811 B
Rust
33 lines
811 B
Rust
use serde::de::DeserializeOwned;
|
|
use tauri::{AppHandle, Runtime, plugin::PluginApi};
|
|
|
|
use crate::models::*;
|
|
|
|
pub fn init<R: Runtime, C: DeserializeOwned>(
|
|
app: &AppHandle<R>,
|
|
_api: PluginApi<R, C>,
|
|
) -> crate::Result<Bluclas<R>> {
|
|
Ok(Bluclas(app.clone()))
|
|
}
|
|
|
|
/// Access to the bluclas APIs.
|
|
pub struct Bluclas<R: Runtime>(AppHandle<R>);
|
|
|
|
impl<R: Runtime> Bluclas<R> {
|
|
pub fn cek_izin(&self) -> crate::Result<bool> {
|
|
return Ok(false);
|
|
}
|
|
|
|
pub fn minta_izin(&self) -> crate::Result<()> {
|
|
return Ok(());
|
|
}
|
|
|
|
pub fn daftar_perangkat(&self) -> crate::Result<SBlueclasResponDaftarPerangkat> {
|
|
return Ok(SBlueclasResponDaftarPerangkat { data: vec![] });
|
|
}
|
|
|
|
pub fn kirim(&self, _: SBlueclasMuatanKirim) -> crate::Result<()> {
|
|
return Ok(());
|
|
}
|
|
}
|