Skip to content

Commit

Permalink
🚚 zb: move ::raw under ::connection
Browse files Browse the repository at this point in the history
  • Loading branch information
elmarco committed Jul 30, 2023
1 parent 3e442f7 commit 4bfe68c
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 16 deletions.
6 changes: 4 additions & 2 deletions zbus/src/connection/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ use crate::{
async_lock::RwLock,
names::{InterfaceName, UniqueName, WellKnownName},
object_server::Interface,
raw::Socket,
Connection, Error, Executor, Guid, Result,
};

use super::handshake::{AuthMechanism, Authenticated};
use super::{
handshake::{AuthMechanism, Authenticated},
raw::Socket,
};

const DEFAULT_MAX_QUEUED: usize = 64;

Expand Down
9 changes: 3 additions & 6 deletions zbus/src/connection/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ use xdg_home::home_dir;

#[cfg(windows)]
use crate::win32;
use crate::{
file::FileLines,
guid::Guid,
raw::{Connection, Socket},
Error, Result,
};
use crate::{file::FileLines, guid::Guid, Error, Result};

use super::raw::{Connection, Socket};

/// Authentication mechanisms
///
Expand Down
5 changes: 4 additions & 1 deletion zbus/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ use crate::{
fdo::{self, ConnectionCredentials, RequestNameFlags, RequestNameReply},
message::{self, Flags, Message, Type},
proxy::CacheProperties,
raw::{Connection as RawConnection, Socket},
DBusError, Error, Executor, Guid, MatchRule, MessageStream, ObjectServer, OwnedMatchRule,
Result, Task,
};

mod builder;
pub use builder::Builder;

mod raw;
use raw::Connection as RawConnection;
pub use raw::Socket;

mod socket_reader;
use socket_reader::SocketReader;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ use crate::{
header::{MAX_MESSAGE_SIZE, MIN_MESSAGE_SIZE},
Message, PrimaryHeader,
},
raw::Socket,
utils::padding_for_8_bytes,
};

use super::Socket;

use futures_core::ready;

/// A low-level representation of a D-Bus connection
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions zbus/src/connection/socket_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ use std::{
use futures_util::future::poll_fn;
use tracing::{debug, instrument, trace};

use crate::{
async_lock::Mutex, connection::MsgBroadcaster, raw::Connection as RawConnection, Executor,
OwnedMatchRule, Socket, Task,
};
use crate::{async_lock::Mutex, connection::MsgBroadcaster, Executor, OwnedMatchRule, Task};

use super::raw::{Connection as RawConnection, Socket};

#[derive(Debug)]
pub(crate) struct SocketReader {
Expand Down
5 changes: 3 additions & 2 deletions zbus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ pub use utils::*;
#[macro_use]
pub mod fdo;

mod raw;
pub use raw::Socket;
#[deprecated(note = "Use `connection::Socket` instead")]
#[doc(hidden)]
pub use connection::Socket;

pub mod blocking;

Expand Down

0 comments on commit 4bfe68c

Please sign in to comment.