Commit graph

2148 commits

Author SHA1 Message Date
xmppftw
fde4c2b640 Move XmppCodec and XmppStream to proto module 2024-08-10 16:49:26 +02:00
xmppftw
ec3c7694a7 Moved starttls connector to tokio_xmpp::connect::starttls module 2024-08-10 16:49:26 +02:00
xmppftw
9151461b10 TCP connector is now in connect module 2024-08-10 16:49:26 +02:00
xmppftw
a3fbd77050 Remove tokio_xmpp::SimpleClient 2024-08-10 16:49:24 +02:00
xmppftw
97698b4d1e Add dns feature for DNS stuff (not just in starttls) 2024-08-10 16:48:47 +02:00
Emmanuel Gil Peyrot
d706b318c3 xmpp-parsers: Remove the generate_element!() macro
The last users have now been converted to xso.
2024-08-09 16:08:26 +02:00
Emmanuel Gil Peyrot
4f81411410 xmpp-parsers: Convert Jingle to xso 2024-08-09 16:08:26 +02:00
Emmanuel Gil Peyrot
cb2c4133fe xmpp-parsers: Convert Forwarded to xso 2024-08-09 16:08:26 +02:00
Emmanuel Gil Peyrot
6b167ed677 xmpp-parsers: Convert disco#info identity to xso 2024-08-09 16:08:26 +02:00
Emmanuel Gil Peyrot
2690e62060 xmpp-parsers: Convert roster item to xso 2024-08-09 16:08:26 +02:00
Emmanuel Gil Peyrot
d4f6812386 xmpp-parsers: Convert cert_management to xso
This introduces a breaking change by moving from a bool to an
Option<NoCertManagement>, which will be reverted eventually once we add
support for #[xml(flag)] types of children.
2024-08-09 16:08:26 +02:00
Jonas Schäfer
230b72b052 xso: add ToC to FromXml docs 2024-08-08 15:25:40 +00:00
Jonas Schäfer
fb80bb7532 xso: add support for dynamic enums 2024-08-08 15:25:40 +00:00
Jonas Schäfer
b36d1d0d4c xso-proc: refactor enum handling
This will allow other kinds of enumerations in the future more
easily.
2024-08-08 15:25:40 +00:00
Emmanuel Gil Peyrot
8e16ae1cbb xmpp-parsers: Integrate sasl2 and sasl_cb into stream:features 2024-08-08 13:52:01 +00:00
Emmanuel Gil Peyrot
7238ebc35e xmpp-parsers: Integrate bind2 and sm into sasl2 2024-08-08 13:52:01 +00:00
Emmanuel Gil Peyrot
27e4499153 xmpp-parsers: Simplify SASL mechanisms type
These can be a simple String for now.
2024-08-08 13:52:01 +00:00
xmppftw
23e943825f xmpp::Agent::wait_for_events cannot error 2024-08-08 15:43:52 +02:00
xmppftw
2fc8e1c1dd AsyncClient::new reconnects by default, fixes disconnect logic 2024-08-08 15:33:17 +02:00
Emmanuel Gil Peyrot
d8e08df464 xmpp-parsers: Implement XEP-0478: Stream Limits Advertisement
This allows servers to communicate their maximum stanza limit, as well
as idle time limit.
2024-08-07 20:59:30 +02:00
Emmanuel Gil Peyrot
9960cfd965 jid: Make Debug more readable on Jid
Jid("foo@bar/baz") instead of Jid { normalized: "foo@bar/baz", at:
Some(3), slash: Some(7) }, which I find much more readable.

Same for BareJid and FullJid.
2024-08-06 16:53:58 +02:00
Emmanuel Gil Peyrot
3f61050944 xmpp-parsers: Implement XEP-0388: Extensible SASL Profile 2024-08-06 16:36:11 +02:00
Emmanuel Gil Peyrot
de2ba97f79 xmpp-parsers: Implement XEP-0440: SASL Channel-Binding Type Capability 2024-08-06 16:36:10 +02:00
Emmanuel Gil Peyrot
f16fb6a6ef xmpp-parsers: Convert the remaining bind2 elements to xso 2024-08-06 16:36:10 +02:00
Emmanuel Gil Peyrot
f0f4299b02 xmpp-parsers: Parse the bind feature in its module, with required
This is different from the bind query or the bind response, despite all
three having the same element namespace and name…  Annoying!
2024-08-06 16:14:42 +02:00
Emmanuel Gil Peyrot
35932268af tokio-xmpp: Error out when the stream:features couldn’t be parsed
This is nicer than sleeping forever with no debug info whatsoever.
2024-08-06 16:14:42 +02:00
xmppftw
ba6a7c4744 Use tokio::sync::RwLock instead of std 2024-08-06 16:04:04 +02:00
xmppftw
8aca413fc3 Collect unknown stream features in StreamFeatures.others 2024-08-05 21:38:29 +02:00
Jonas Schäfer
fda4a9ff29 xso: implement transparent structs 2024-08-05 15:13:39 +00:00
Emmanuel Gil Peyrot
fea915daf1 xmpp-parsers: Make MAM metadata children pub
This had been forgotten when I converted it to xso.
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
e1da3410ba xmpp-parsers: Convert MAM prefs to xso 2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
0d3e73ec74 xmpp-parsers: Convert bind2 to xso 2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
f37b7b4dfd xmpp-parsers: Convert bind to xso 2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
2df243966f xmpp-parsers: Convert blocking to xso 2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
ce0f3bec0e xmpp-parsers: Convert DataForms validation to xso 2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
95d08e3c1e xmpp-parsers: Simplify RTT implementation using more xso
Especially exhaustive enums are super useful for this kind of pattern.
2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
f049e3626b xmpp-parsers: Convert OOB to xso 2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
79e224a02a xmpp-parsers: Convert bookmarks to xso 2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
9e9186ef7b xmpp-parsers: Convert MUC to xso 2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
57c2eeadfc xmpp-parsers: Convert Jingle RTP to xso 2024-08-05 15:02:25 +00:00
Emmanuel Gil Peyrot
4e2af36186 xmpp-parsers: Implement FromXmlText and AsXmlText for default types
This allows such default type wrappers to be used in other xso elements.
2024-08-05 15:02:25 +00:00
Jonas Schäfer
656125a850 xso-proc: change field def's span slightly for better UX 2024-08-05 15:33:57 +02:00
Jonas Schäfer
0361b5905b xso: implement catch-all for unknown elements 2024-08-05 15:33:57 +02:00
xmppftw
2103ef0191 Remove manual doc_cfg feature because we have doc_auto_cfg 2024-08-05 11:14:41 +02:00
xmppftw
fa99c09585 Indicate which feature flag for each module/type 2024-08-05 11:14:41 +02:00
xmppftw
aa26d98e2a Check attr="" parse to Some("") in Option<String> 2024-08-05 05:49:14 +00:00
xmppftw
b3fd0b5372 Move SimpleClient constructors to client::simple_client module 2024-08-04 21:32:38 +02:00
xmppftw
fc0071a0c5 Move AsyncClient::new to client::async_client module 2024-08-04 21:32:36 +02:00
xmppftw
84511b54a0 Only expose one error type in crate root 2024-08-04 18:17:17 +02:00
xmppftw
34796c90d4 Only expose one error type in crate root 2024-08-04 16:04:09 +00:00