Debian Codegraph @

third_party/rust/authenticator/src/transport/stub/device.rs

raw
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::ctap2::commands::get_info::AuthenticatorInfo;
6 use crate::transport::hid::HIDDevice;
7 use crate::transport::{FidoDevice, FidoProtocol};
8 use crate::transport::{HIDError, SharedSecret};
9 use crate::u2ftypes::U2FDeviceInfo;
10 use std::hash::Hash;
11 use std::io;
12 use std::io::{Read, Write};
13 use std::path::PathBuf;
14
15 #[derive(Debug, Hash, PartialEq, Eq)]
16 pub struct Device {}
17
18 impl Read for Device {
19 fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
20 unimplemented!();
21 }
22 }
23
24 impl Write for Device {
25 fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
26 unimplemented!();
27 }
28
29 fn flush(&mut self) -> io::Result<()> {
30 unimplemented!();
31 }
32 }
33
34 impl HIDDevice for Device {
35 type BuildParameters = PathBuf;
36 type Id = PathBuf;
37
38 fn new(parameters: Self::BuildParameters) -> Result<Self, (HIDError, Self::Id)> {
39 unimplemented!();
40 }
41
42 fn id(&self) -> Self::Id {
43 unimplemented!()
44 }
45
46 fn get_cid(&self) -> &[u8; 4] {
47 unimplemented!();
48 }
49
50 fn set_cid(&mut self, cid: [u8; 4]) {
51 unimplemented!();
52 }
53
54 fn in_rpt_size(&self) -> usize {
55 unimplemented!();
56 }
57
58 fn out_rpt_size(&self) -> usize {
59 unimplemented!();
60 }
61
62 fn get_property(&self, prop_name: &str) -> io::Result<String> {
63 unimplemented!();
64 }
65
66 fn get_device_info(&self) -> U2FDeviceInfo {
67 unimplemented!();
68 }
69
70 fn set_device_info(&mut self, dev_info: U2FDeviceInfo) {
71 unimplemented!();
72 }
73 }
74
75 impl FidoDevice for Device {
76 fn pre_init(&mut self) -> Result<(), HIDError> {
77 unimplemented!();
78 }
79
80 fn should_try_ctap2(&self) -> bool {
81 unimplemented!();
82 }
83
84 fn initialized(&self) -> bool {
85 unimplemented!();
86 }
87
88 fn is_u2f(&mut self) -> bool {
89 unimplemented!()
90 }
91
92 fn get_authenticator_info(&self) -> Option<&AuthenticatorInfo> {
93 unimplemented!()
94 }
95
96 fn set_authenticator_info(&mut self, authenticator_info: AuthenticatorInfo) {
97 unimplemented!()
98 }
99
100 fn set_shared_secret(&mut self, secret: SharedSecret) {
101 unimplemented!()
102 }
103
104 fn get_shared_secret(&self) -> Option<&SharedSecret> {
105 unimplemented!()
106 }
107
108 fn get_protocol(&self) -> FidoProtocol {
109 unimplemented!()
110 }
111
112 fn downgrade_to_ctap1(&mut self) {
113 unimplemented!()
114 }
115 }