implement Network Handler Logic

This commit is contained in:
2019-04-24 19:24:00 +02:00
parent ca4fde0b50
commit 0e06fb1df4
5 changed files with 165 additions and 29 deletions

View File

@ -18,19 +18,23 @@ impl ProtocolHandler for ServerState {
unimplemented!()
}
fn get_texture_by_id(&mut self, id: String) -> ProtocolResult<Option<Texture>> {
fn get_texture_by_id(&mut self, id: &str) -> ProtocolResult<Option<Texture>> {
unimplemented!()
}
fn get_texture_by_name(&mut self, id: String) -> ProtocolResult<Option<Texture>> {
fn get_texture_by_name(&mut self, name: &str) -> ProtocolResult<Option<Texture>> {
unimplemented!()
}
fn get_texture_file(&mut self, hash: Sha256) -> ProtocolResult<Arc<Vec<u8>>> {
fn get_texture_file(&mut self, hash: Sha256) -> ProtocolResult<Vec<u8>> {
unimplemented!()
}
fn get_texture_preview(&mut self, hash: Sha256) -> ProtocolResult<Arc<Vec<u8>>> {
fn get_texture_preview(
&mut self,
hash: Sha256,
format: TextureFormat,
) -> ProtocolResult<Vec<u8>> {
unimplemented!()
}
@ -40,6 +44,7 @@ impl ProtocolHandler for ServerState {
insert: Option<Texture>,
insert_texture_data: Option<Vec<u8>>,
) -> ProtocolResult<ReplaceTextureStatus> {
// NOTE: must also check if insert_texture_data fits sha256!
unimplemented!()
}
}