Move ClientFeature to feature module
This commit is contained in:
parent
77ee7c15fa
commit
0bbc089480
2 changed files with 15 additions and 8 deletions
13
xmpp/src/feature.rs
Normal file
13
xmpp/src/feature.rs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
// Copyright (c) 2023 xmpp-rs contributors.
|
||||||
|
//
|
||||||
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
#[derive(PartialEq)]
|
||||||
|
pub enum ClientFeature {
|
||||||
|
#[cfg(feature = "avatars")]
|
||||||
|
Avatars,
|
||||||
|
ContactList,
|
||||||
|
JoinRooms,
|
||||||
|
}
|
|
@ -33,6 +33,7 @@ pub use tokio_xmpp::{BareJid, Element, FullJid, Jid};
|
||||||
extern crate log;
|
extern crate log;
|
||||||
|
|
||||||
pub mod builder;
|
pub mod builder;
|
||||||
|
pub mod feature;
|
||||||
pub mod iq;
|
pub mod iq;
|
||||||
pub mod message;
|
pub mod message;
|
||||||
pub mod presence;
|
pub mod presence;
|
||||||
|
@ -41,19 +42,12 @@ pub mod upload;
|
||||||
|
|
||||||
// Module re-exports
|
// Module re-exports
|
||||||
pub use builder::{ClientBuilder, ClientType};
|
pub use builder::{ClientBuilder, ClientType};
|
||||||
|
pub use feature::ClientFeature;
|
||||||
|
|
||||||
pub type Error = tokio_xmpp::Error;
|
pub type Error = tokio_xmpp::Error;
|
||||||
pub type Id = Option<String>;
|
pub type Id = Option<String>;
|
||||||
pub type RoomNick = String;
|
pub type RoomNick = String;
|
||||||
|
|
||||||
#[derive(PartialEq)]
|
|
||||||
pub enum ClientFeature {
|
|
||||||
#[cfg(feature = "avatars")]
|
|
||||||
Avatars,
|
|
||||||
ContactList,
|
|
||||||
JoinRooms,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Event {
|
pub enum Event {
|
||||||
Online,
|
Online,
|
||||||
|
|
Loading…
Reference in a new issue