1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 use crate::u2ftypes::{U2FDevice, U2FDeviceInfo}; 6 use std::io; 7 use std::io::{Read, Write}; 8 9 pub struct Device {} 10 11 impl Device { new(path: String) -> io::Result<Self>12 pub fn new(path: String) -> io::Result<Self> { 13 panic!("not implemented"); 14 } 15 is_u2f(&self) -> bool16 pub fn is_u2f(&self) -> bool { 17 panic!("not implemented"); 18 } 19 } 20 21 impl Read for Device { read(&mut self, buf: &mut [u8]) -> io::Result<usize>22 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { 23 panic!("not implemented"); 24 } 25 } 26 27 impl Write for Device { write(&mut self, buf: &[u8]) -> io::Result<usize>28 fn write(&mut self, buf: &[u8]) -> io::Result<usize> { 29 panic!("not implemented"); 30 } 31 flush(&mut self) -> io::Result<()>32 fn flush(&mut self) -> io::Result<()> { 33 panic!("not implemented"); 34 } 35 } 36 37 impl U2FDevice for Device { get_cid<'a>(&'a self) -> &'a [u8; 4]38 fn get_cid<'a>(&'a self) -> &'a [u8; 4] { 39 panic!("not implemented"); 40 } 41 set_cid(&mut self, cid: [u8; 4])42 fn set_cid(&mut self, cid: [u8; 4]) { 43 panic!("not implemented"); 44 } 45 in_rpt_size(&self) -> usize46 fn in_rpt_size(&self) -> usize { 47 panic!("not implemented"); 48 } 49 out_rpt_size(&self) -> usize50 fn out_rpt_size(&self) -> usize { 51 panic!("not implemented"); 52 } 53 get_property(&self, prop_name: &str) -> io::Result<String>54 fn get_property(&self, prop_name: &str) -> io::Result<String> { 55 panic!("not implemented") 56 } 57 get_device_info(&self) -> U2FDeviceInfo58 fn get_device_info(&self) -> U2FDeviceInfo { 59 panic!("not implemented") 60 } 61 set_device_info(&mut self, dev_info: U2FDeviceInfo)62 fn set_device_info(&mut self, dev_info: U2FDeviceInfo) { 63 panic!("not implemented") 64 } 65 } 66