aboutsummaryrefslogtreecommitdiffstats
path: root/filamento/src/disco.rs
diff options
context:
space:
mode:
Diffstat (limited to 'filamento/src/disco.rs')
-rw-r--r--filamento/src/disco.rs43
1 files changed, 43 insertions, 0 deletions
diff --git a/filamento/src/disco.rs b/filamento/src/disco.rs
index 86e339e..ccc99cb 100644
--- a/filamento/src/disco.rs
+++ b/filamento/src/disco.rs
@@ -4,6 +4,7 @@ use stanza::xep_0030::{info, items};
pub use feature::Feature;
pub use identity::Identity;
+#[derive(Debug, Clone)]
pub struct Info {
node: Option<String>,
features: Vec<Feature>,
@@ -109,6 +110,7 @@ mod feature {
use stanza::xep_0030::info;
// https://xmpp.org/registrar/disco-features.html
+ #[derive(Debug, Clone)]
pub enum Feature {
DNSSRV,
FullUnicode,
@@ -527,6 +529,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum Amp {
Errors,
Action(AmpAction),
@@ -543,6 +546,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum AmpAction {
Alert,
Drop,
@@ -562,6 +566,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum AmpCondition {
Deliver,
ExpireAt,
@@ -581,6 +586,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum Bytestreams {
UDP,
}
@@ -594,6 +600,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum CapsVersion {
One(Option<CapsOne>),
Two(Option<CapsTwo>),
@@ -614,6 +621,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum CapsOne {
Optimize,
}
@@ -627,6 +635,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum CapsTwo {
Optimize,
}
@@ -640,6 +649,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum Disco {
Info,
Items,
@@ -655,6 +665,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum MUC {
Admin,
Owner,
@@ -704,6 +715,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum PubSub {
AccessAuthorize,
AccessOpen,
@@ -821,6 +833,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum SOAP {
Fault,
}
@@ -834,6 +847,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum WaitingList {
Schemes(WaitingListSchemes),
}
@@ -846,6 +860,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum WaitingListSchemes {
Mailto,
Tel,
@@ -863,6 +878,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum Component {
Accept,
Connect,
@@ -878,6 +894,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum Iq {
Auth,
Gateway,
@@ -911,6 +928,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum X {
Data,
Encrypted,
@@ -930,6 +948,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum XMPPSASL {
C2S,
S2S,
@@ -945,6 +964,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum XMPPTLS {
C2S,
S2S,
@@ -960,6 +980,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum Archive {
Auto,
Manage,
@@ -979,6 +1000,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum Avatar {
Data,
Metadata,
@@ -994,6 +1016,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum Jingle {
Apps(JingleApps),
}
@@ -1006,6 +1029,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum JingleApps {
RTP(JingleAppsRTP),
}
@@ -1018,6 +1042,7 @@ mod feature {
}
}
+ #[derive(Debug, Clone)]
pub enum JingleAppsRTP {
Audio,
Video,
@@ -1037,6 +1062,7 @@ mod feature {
mod identity {
use stanza::xep_0030::info;
+ #[derive(Debug, Clone)]
pub struct Identity {
name: Option<String>,
category: Category,
@@ -1065,6 +1091,7 @@ mod identity {
// TODO: separate crate for disco registry
/// categories taken from [XMPP Disco Categories](https://xmpp.org/registrar/disco-categories.html)
+ #[derive(Debug, Clone)]
pub enum Category {
Account(Account),
Auth(Auth),
@@ -1165,6 +1192,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Account {
Admin,
Anonymous,
@@ -1195,6 +1223,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Auth {
Cert,
Generic,
@@ -1234,6 +1263,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Authz {
Ephemeral,
Other(String),
@@ -1258,6 +1288,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Automation {
CommandList,
CommandNode,
@@ -1294,6 +1325,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Client {
Bot,
Console,
@@ -1342,6 +1374,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Collaboration {
Whiteboard,
Other(String),
@@ -1366,6 +1399,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Component {
Archive,
C2S,
@@ -1417,6 +1451,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Conference {
IRC,
Text,
@@ -1444,6 +1479,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Directory {
Chatroom,
Group,
@@ -1477,6 +1513,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Gateway {
Aim,
Discord,
@@ -1579,6 +1616,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Headline {
NewMail,
RSS,
@@ -1609,6 +1647,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Hierarchy {
Branch,
Leaf,
@@ -1636,6 +1675,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Proxy {
Bytestreams,
Other(String),
@@ -1660,6 +1700,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum PubSub {
Collection,
Leaf,
@@ -1694,6 +1735,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Server {
IM,
Other(String),
@@ -1718,6 +1760,7 @@ mod identity {
}
}
+ #[derive(Debug, Clone)]
pub enum Store {
Berkeley,
File,