2019-03-11 19:00:25 +00:00
|
|
|
//! XMPP implementation with asynchronous I/O using Tokio.
|
2018-08-02 19:58:19 +02:00
|
|
|
|
2021-09-02 03:21:25 +02:00
|
|
|
#![deny(unsafe_code, missing_docs, bare_trait_objects)]
|
2020-03-16 00:34:46 +01:00
|
|
|
|
2024-04-20 21:22:25 +02:00
|
|
|
#[cfg(all(
|
|
|
|
|
not(xmpprs_doc_build),
|
|
|
|
|
not(doc),
|
|
|
|
|
feature = "tls-native",
|
|
|
|
|
feature = "tls-rust"
|
|
|
|
|
))]
|
2023-10-24 18:24:04 +02:00
|
|
|
compile_error!("Both tls-native and tls-rust features can't be enabled at the same time.");
|
|
|
|
|
|
2023-12-30 22:08:37 -05:00
|
|
|
#[cfg(all(
|
|
|
|
|
feature = "starttls",
|
|
|
|
|
not(feature = "tls-native"),
|
|
|
|
|
not(feature = "tls-rust")
|
|
|
|
|
))]
|
|
|
|
|
compile_error!(
|
|
|
|
|
"when starttls feature enabled one of tls-native and tls-rust features must be enabled."
|
|
|
|
|
);
|
2023-10-24 19:58:59 +02:00
|
|
|
|
2023-12-30 22:08:37 -05:00
|
|
|
#[cfg(feature = "starttls")]
|
|
|
|
|
pub mod starttls;
|
2018-12-18 19:04:31 +01:00
|
|
|
mod stream_start;
|
2024-01-01 01:13:51 -05:00
|
|
|
#[cfg(feature = "insecure-tcp")]
|
|
|
|
|
pub mod tcp;
|
2020-03-16 00:34:46 +01:00
|
|
|
mod xmpp_codec;
|
2024-06-15 09:21:20 -04:00
|
|
|
pub use crate::xmpp_codec::{Packet, XmppCodec};
|
2017-07-23 02:46:47 +02:00
|
|
|
mod event;
|
2020-05-30 00:14:32 +02:00
|
|
|
pub use event::Event;
|
|
|
|
|
mod client;
|
2023-12-30 22:08:37 -05:00
|
|
|
pub mod connect;
|
2020-03-18 01:12:48 +01:00
|
|
|
pub mod stream_features;
|
2020-05-30 00:14:32 +02:00
|
|
|
pub mod xmpp_stream;
|
2023-12-30 22:08:37 -05:00
|
|
|
|
2023-03-20 17:27:13 +01:00
|
|
|
pub use client::{
|
2023-12-30 22:08:37 -05:00
|
|
|
async_client::{Client as AsyncClient, Config as AsyncConfig},
|
2023-12-29 01:09:33 -05:00
|
|
|
simple_client::Client as SimpleClient,
|
2023-03-20 17:27:13 +01:00
|
|
|
};
|
2017-07-22 01:59:51 +01:00
|
|
|
mod component;
|
2018-12-18 18:29:31 +01:00
|
|
|
pub use crate::component::Component;
|
2018-09-06 17:46:06 +02:00
|
|
|
mod error;
|
2024-07-31 19:25:09 +02:00
|
|
|
pub use crate::error::{AuthError, Error, ProtocolError};
|
2023-08-17 16:17:13 +02:00
|
|
|
|
|
|
|
|
// Re-exports
|
2024-07-24 20:39:27 +02:00
|
|
|
pub use minidom;
|
2023-08-17 16:17:13 +02:00
|
|
|
pub use xmpp_parsers as parsers;
|
2024-07-24 20:39:27 +02:00
|
|
|
pub use xmpp_parsers::jid;
|