-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USB Portal #210
base: master
Are you sure you want to change the base?
USB Portal #210
Conversation
fced97d
to
ecb8189
Compare
Currently includes a revert for #208 |
4d81103
to
de86287
Compare
The build failure is because it needs a flatpak version that isn't available. |
239d19c
to
1f7eec3
Compare
} | ||
|
||
/// Call on success of acquire_devices. | ||
#[doc(alias = "FinishAcquireDevices")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it can be just called at the end of acquire_device, why it is a separate method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem is that there is a dbus limitation on how many fd it can return, so we need to be able to chunk the finish call. So it has to be called manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked about this in the matrix channel, this is a dbus limitation. You should instead call it yourself in AcquireDevices until it stops returning, and return the results or even better make it return a Stream so you can call next on it which would call internally the FinishAcquireDevices.
#[strong] | ||
page, | ||
async move { | ||
let usb = UsbProxy::new().await.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the proxy around
|
||
pub(super) async fn stop_session(&self) -> anyhow::Result<()> { | ||
if let Some(session) = self.session.lock().await.take() { | ||
session.close().await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should switch the buttons state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is done by the non-imp version which is the one called from the UI.
d85650e
to
3aee673
Compare
Signed-off-by: Hubert Figuière <[email protected]>
This allow running the release build. Signed-off-by: Hubert Figuière <[email protected]>
Signed-off-by: Hubert Figuière <[email protected]>
- Added UI for USB - Added rusb to the crates. - Added libusb to the manifest. Signed-off-by: Hubert Figuière <[email protected]>
3aee673
to
9146631
Compare
This is a draft, needs a lot of cleanup. Also the portal hasn't landed yet.
But I'm using this to exercise / test the USB portal.