mirror of
https://gitlab.com/marcandre.lureau/qemu-display.git
synced 2024-12-22 05:35:20 +00:00
qemu-display: update to current zbus git
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
24cca85289
commit
aa10b12bcb
@ -58,10 +58,10 @@ pub struct Volume {
|
||||
)]
|
||||
trait Audio {
|
||||
/// RegisterOutListener method
|
||||
fn register_out_listener(&self, listener: Fd) -> zbus::Result<()>;
|
||||
fn register_out_listener(&self, listener: Fd<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// RegisterInListener method
|
||||
fn register_in_listener(&self, listener: Fd) -> zbus::Result<()>;
|
||||
fn register_in_listener(&self, listener: Fd<'_>) -> zbus::Result<()>;
|
||||
}
|
||||
|
||||
#[derive(derivative::Derivative)]
|
||||
|
@ -10,7 +10,7 @@ use crate::Result;
|
||||
#[dbus_proxy(default_service = "org.qemu", interface = "org.qemu.Display1.Chardev")]
|
||||
pub trait Chardev {
|
||||
/// Register method
|
||||
fn register(&self, stream: Fd) -> zbus::Result<()>;
|
||||
fn register(&self, stream: Fd<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// SendBreak method
|
||||
fn send_break(&self) -> zbus::Result<()>;
|
||||
|
@ -19,7 +19,7 @@ use crate::{
|
||||
#[dbus_proxy(default_service = "org.qemu", interface = "org.qemu.Display1.Console")]
|
||||
pub trait Console {
|
||||
/// RegisterListener method
|
||||
fn register_listener(&self, listener: Fd) -> zbus::Result<()>;
|
||||
fn register_listener(&self, listener: Fd<'_>) -> zbus::Result<()>;
|
||||
|
||||
/// SetUIInfo method
|
||||
#[dbus_proxy(name = "SetUIInfo")]
|
||||
|
@ -208,7 +208,7 @@ impl<H: ConsoleListenerHandler> ConsoleListener<H> {
|
||||
#[dbus_interface(name = "ScanoutDMABUF")]
|
||||
async fn scanout_dmabuf(
|
||||
&mut self,
|
||||
_fd: Fd,
|
||||
_fd: Fd<'_>,
|
||||
_width: u32,
|
||||
_height: u32,
|
||||
_stride: u32,
|
||||
@ -225,7 +225,7 @@ impl<H: ConsoleListenerHandler> ConsoleListener<H> {
|
||||
#[dbus_interface(name = "ScanoutDMABUF")]
|
||||
async fn scanout_dmabuf(
|
||||
&mut self,
|
||||
fd: Fd,
|
||||
fd: Fd<'_>,
|
||||
width: u32,
|
||||
height: u32,
|
||||
stride: u32,
|
||||
|
@ -200,7 +200,7 @@ impl<'d> Display<'d> {
|
||||
}
|
||||
|
||||
pub async fn receive_owner_changed(&self) -> Result<OwnerChangedStream<'_>> {
|
||||
Ok(self.inner.proxy.receive_owner_changed().await?)
|
||||
Ok(self.inner.proxy.inner().receive_owner_changed().await?)
|
||||
}
|
||||
|
||||
pub async fn audio(&self) -> Result<Option<Audio>> {
|
||||
|
@ -109,7 +109,7 @@ impl Handler {
|
||||
};
|
||||
|
||||
let (stream, peer) = UnixStream::pair()?;
|
||||
chardev.proxy.register(peer.as_raw_fd().into()).await?;
|
||||
chardev.proxy.register((&peer).into()).await?;
|
||||
|
||||
let c = ctxt.clone();
|
||||
let stream_fd = stream.as_raw_fd();
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::Result;
|
||||
|
||||
#[cfg(unix)]
|
||||
use std::os::unix::{io::AsRawFd, net::UnixStream};
|
||||
use std::os::unix::net::UnixStream;
|
||||
#[cfg(windows)]
|
||||
use win32::Fd;
|
||||
#[cfg(unix)]
|
||||
@ -21,7 +21,7 @@ use windows::Win32::System::Threading::PROCESS_DUP_HANDLE;
|
||||
pub fn prepare_uds_pass(#[cfg(windows)] peer_pid: u32, us: &UnixStream) -> Result<Fd> {
|
||||
#[cfg(unix)]
|
||||
{
|
||||
Ok(us.as_raw_fd().into())
|
||||
Ok(us.into())
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
|
@ -8,7 +8,7 @@ use windows::Win32::{
|
||||
#[cfg(feature = "qmp")]
|
||||
use uds_windows::UnixStream;
|
||||
|
||||
pub type Fd = Vec<u8>;
|
||||
pub type Fd<'a> = Vec<u8>;
|
||||
|
||||
// A process handle
|
||||
pub struct ProcessHandle(HANDLE);
|
||||
|
Loading…
Reference in New Issue
Block a user