Skip to content

Commit 31a614b

Browse files
authored
Merge pull request #154 from linux-credentials/simplify-background-event
Simplify BackgroundEvent
2 parents 9650c8c + 37da720 commit 31a614b

14 files changed

Lines changed: 601 additions & 914 deletions

File tree

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"args": [],
1313
"env": {
1414
"RUST_LOG": "credentialsd=debug,libwebauthn=debug,libwebauthn::webauthn=debug,libwebauthn=warn,libwebauthn::proto::ctap2::preflight=debug,libwebauthn::transport::channel=debug,zbus::object_server::debug,zbus=debug",
15-
"CREDSD_TRUSTED_CALLERS": "/usr/bin/python3.14",
16-
"CREDSD_TRUSTED_APP_IDS": "app:xyz.iinuwa.credentialsd.DemoCredentialsUi",
15+
"CREDSD_TRUSTED_CALLERS": "/usr/bin/python3.14,${workspaceFolder}/../../portal/xdg-desktop-portal/build/src/xdg-desktop-portal",
16+
"CREDSD_TRUSTED_APP_IDS": "xyz.iinuwa.credentialsd.DemoCredentialsUi",
1717
},
1818
"sourceLanguages": [
1919
"rust"

credentialsd-common/src/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use std::pin::Pin;
33
use futures_lite::Stream;
44

55
use crate::{
6-
model::{BackgroundEvent, Device},
7-
server::RequestId,
6+
model::Device,
7+
server::{BackgroundEvent, RequestId},
88
};
99

1010
/// Used for communication from trusted UI to credential service

credentialsd-common/src/model.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,13 @@ pub struct RequestingParty {
122122
pub origin: String,
123123
}
124124

125+
// TODO: Move to credentialsd-ui
125126
#[derive(Debug, Clone, Serialize, Deserialize)]
126127
pub enum ViewUpdate {
127128
SetTitle((String, String)),
128129
SetDevices(Vec<Device>),
129-
SetCredentials(Vec<Credential>),
130+
// TODO: Fix this
131+
SetCredentials(Vec<crate::server::Credential>),
130132

131133
WaitingForDevice(Device),
132134
SelectingDevice,
@@ -252,13 +254,6 @@ pub enum NfcState {
252254
Failed(Error),
253255
}
254256

255-
#[derive(Clone, Debug)]
256-
pub enum BackgroundEvent {
257-
UsbStateChanged(UsbState),
258-
HybridQrStateChanged(HybridState),
259-
NfcStateChanged(NfcState),
260-
}
261-
262257
#[derive(Debug, Clone)]
263258
pub enum Error {
264259
/// Some unknown error with the authenticator occurred.

0 commit comments

Comments
 (0)