TextureSync/server/texture-sync-server/src/server_state.rs

51 lines
1.2 KiB
Rust
Raw Normal View History

2019-04-20 01:24:19 +02:00
// TODO: remove on implementation
#![allow(unused_imports)]
#![allow(unused_variables)]
#![allow(dead_code)]
use crate::model::*;
use crate::protocol::*;
use std::sync::Arc;
2019-04-24 17:01:43 +02:00
#[derive(Clone)]
2019-04-20 01:24:19 +02:00
pub struct ServerState {
// ...
}
impl ProtocolHandler for ServerState {
fn query(&mut self, query: &[String]) -> ProtocolResult<Vec<Texture>> {
unimplemented!()
}
2019-04-24 19:24:00 +02:00
fn get_texture_by_id(&mut self, id: &str) -> ProtocolResult<Option<Texture>> {
2019-04-20 01:24:19 +02:00
unimplemented!()
}
2019-04-24 19:24:00 +02:00
fn get_texture_by_name(&mut self, name: &str) -> ProtocolResult<Option<Texture>> {
2019-04-20 01:24:19 +02:00
unimplemented!()
}
2019-04-24 19:24:00 +02:00
fn get_texture_file(&mut self, hash: Sha256) -> ProtocolResult<Vec<u8>> {
2019-04-20 01:24:19 +02:00
unimplemented!()
}
2019-04-24 19:24:00 +02:00
fn get_texture_preview(
&mut self,
hash: Sha256,
format: TextureFormat,
) -> ProtocolResult<Vec<u8>> {
2019-04-20 01:24:19 +02:00
unimplemented!()
}
fn replace_texture(
&mut self,
delete: Option<Texture>,
insert: Option<Texture>,
insert_texture_data: Option<Vec<u8>>,
) -> ProtocolResult<ReplaceTextureStatus> {
2019-04-24 19:24:00 +02:00
// NOTE: must also check if insert_texture_data fits sha256!
2019-04-20 01:24:19 +02:00
unimplemented!()
}
}