Commit graph

2138 commits

Author SHA1 Message Date
6b4bdc1641
xso: Bump version to 0.1.1
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-25 18:53:31 +02:00
Emmanuel Gil Peyrot
c0f1aa620e xmpp-parsers: Bump version to 0.21.0 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
09c5ad5976 xmpp-parsers: Convert jingle_s5b’s Candidate to xso 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
726801610f xmpp-parsers: Convert ibb to xso 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
1a7dec6f1e xmpp-parsers: Convert sm’s Enable and Enabled to xso 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
01a61c6099 xmpp-parsers: Convert pubsub’s Default to xso 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
5b5df16ac9 xmpp-parsers: Convert jingle_rtp_hdrext to xso 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
0b92061433 xmpp-parsers: Convert jingle_ibb to xso 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
2eb6ca2f94 xmpp-parsers: Remove util::text_node_codecs
This codec system was useful for the previous parser style, but we have
converted them all to xso now!
2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
0c9e478994 xmpp-parsers: Convert media_element to xso
The API changed here, URI became Uri to be more in line with the coding
style.

Also we don’t attempt to trim them any more because that was only used
in the examples, and nowhere in the text of the specification did it say
that those had to be trimmed.
2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
2b333ce579 xso: Add an EmptyAsError text codec
As its name implies, this codec emits an error when the parsed string is
empty.
2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
4be297de11 xmpp-parsers: Convert component to xso 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
e9b6fd5d8b xmpp-parsers: Convert avatar to xso 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
a2ece705cc xmpp-parsers: Convert vcard to xso 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
dc0db38cf3 xmpp-parsers: Convert jingle_dtls_srtp to xso 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
f0b51decea xso: Import the ColonSeparatedHex text codec from xmpp-parsers
This codec converts from a colon-separated case-insensitive hexadecimal
string into a Vec of bytes, and back to a lowercase colon-separated
hexadecimal string.  Each byte must be separated by exactly one colon.
2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
8a48244bc3 xmpp-parsers: Convert vcard_update to xso 2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
16204a1092 xso: Import the FixedHex text codec from xmpp-parsers
This codec converts from a fixed-size case-insensitive hexadecimal
string into an array of bytes, and back to a lowercase hexadecimal
string.
2024-07-25 18:42:18 +02:00
Emmanuel Gil Peyrot
387fccce4a xmpp-parsers: Write the ChangeLog for 0.21.0 2024-07-25 17:39:42 +02:00
Emmanuel Gil Peyrot
9346aedfac xmpp-parsers: Update the version in the DOAP
We are close to the release!
2024-07-25 17:39:42 +02:00
11d40bac94 Unify version string formats
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-requirements

"^1.2.3" is strictly equivalent to "1.2.3"

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-25 14:41:04 +00:00
Emmanuel Gil Peyrot
5fc12c45b5 xmpp: Use tokio-xmpp’s reexports of jid and minidom 2024-07-25 14:36:09 +00:00
Emmanuel Gil Peyrot
e9b226e1ae tokio-xmpp: Import Jid, BareJid and Element properly
xmpp-parsers has stopped reexporting them, instead it reexports only the
crates themselves.
2024-07-25 14:36:09 +00:00
Emmanuel Gil Peyrot
7b66de1166 xmpp-parsers: Stop reexporting extra symbols
Let’s continue reexporting jid and minidom, but not their inner pub
items, users of this crate can go one level deeper if they need that.

Only xso::error::Error is still useful to reexport, as this is part of
the public API of all of our parsers.
2024-07-25 14:36:09 +00:00
Jonas Schäfer
ab35c234c8 xso: Bump version to 0.1.0
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
2024-07-25 08:25:39 +00:00
Emmanuel Gil Peyrot
62b2966b9d xmpp-parsers: Simplify the page-flip logic for MAM
This only has to be a bool, no need for this Option<bool>.
2024-07-25 08:04:49 +00:00
Emmanuel Gil Peyrot
fa2846024f xmpp-parsers: Fix typos noticed by codespell 2024-07-25 07:54:30 +00:00
Emmanuel Gil Peyrot
6e1f24c385 xso: Apply clippy’s suggestions 2024-07-25 07:35:19 +00:00
Jonas Schäfer
ca53892e66 xso: add README files 2024-07-24 16:27:53 +02:00
Jonas Schäfer
d6d9a7aaaf Add changelog stub files for xso crates 2024-07-24 16:27:33 +02:00
Jonas Schäfer
7bc7e7a684 xso: remove remnants of IntoXml 2024-07-24 16:05:06 +02:00
Jonas Schäfer
ccf38cdf9b Port everything over to AsXml 2024-07-24 16:05:06 +02:00
Jonas Schäfer
4910b01244 xso: add text conversion traits for AsXml 2024-07-24 16:05:06 +02:00
Jonas Schäfer
569b6e327d xso: provide adapter for AsXml implementation based on Into<Element>
Analogous to the already existing `IntoXml` implementation helpers
based on an `Into<Element>` implementation on a type, this provides
the utilities for `AsXml`.

This is of course exceptionally inefficient, but it is only needed
transitionally until we have everything migrated to derive macros or
otherwise rewritten in terms of AsXml/FromXml.
2024-07-24 16:05:06 +02:00
Jonas Schäfer
d12b6c31ea xso: implement AsXml for minidom::Element 2024-07-24 16:05:06 +02:00
Jonas Schäfer
d29b89d307 xso: introduce AsXml trait
This will soon replace the IntoXml trait. The idea here is that we
don't generally need to take ownership of values which are going to
be transformed into XML: most of the time, the XML text is created
by building a string from some more specific type, such as an
integer or an enum. Requiring to clone an entire structure for this
purpose is wasteful.

In other cases, we actually could reference data right from the structs
we are converting to XML. In those cases, assuming that an iterator
always generates owned data would be incorrect, too.

Hence, we introduce a new `Item` type which closely mirrors the
`rxml::Item` type, but where the constituents are `Cow`. In the upcoming
changes, we are going to work toward replacing all uses of `IntoXml`
with `AsXml`, as well as modifying the macros accordingly.
2024-07-24 16:05:06 +02:00
Jonas Schäfer
25adde99da Bump rxml to 0.11.1 2024-07-24 16:05:05 +02:00
0ef646db86 jid: Bump version to 0.11.1
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 19:02:46 +02:00
f35bbcb36d minidom: Bump version to 0.16
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 19:02:46 +02:00
f648ab0c36 minidom: Update changelog
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 18:52:45 +02:00
cc123e3d93 parsers: Update jid to 0.11
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 18:52:44 +02:00
86c13611ba Remove unused paths in multiple Cargo.toml
Paths are already patched in the workspace's [patch.crates-io] block.
Not sure why this was added in the first place.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 16:28:38 +00:00
93288307d3
jid: bump version to 0.11
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 18:06:03 +02:00
318e5a19cc jid: Update Changelog
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 14:32:13 +02:00
77eadecea9 sasl: bump version to 0.5.2
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-22 22:30:48 +02:00
25ee51f178 sasl: Update Changelog
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-22 22:30:48 +02:00
Emmanuel Gil Peyrot
b4b0a7dbba jid: Simplify from_parts() a bit
By defining the variables in the parent scope, we can avoid one level of
indentation for the tuple, which makes things more readable.

Additionally, we don’t need to call .to_str() on the passed objects,
they automatically Deref to &str for the format!() call.
2024-07-15 18:27:35 +02:00
Emmanuel Gil Peyrot
c631e4eff4 xmpp-parsers: Implement XEP-0386: Bind 2
This depends on XEP-0313 for its MAM metadata, and many others such as
XEP-0198, XEP-0280 and XEP-0352 for the inline features, but we
currently provide those as minidom Elements instead.
2024-07-03 23:11:23 +00:00
Emmanuel Gil Peyrot
ff588d834e jid: Fix a clippy warning
The other three are about missing Self in the new method’s return type,
but these return the Cow type instead so that’s how they’re meant to be.
2024-07-03 16:28:11 +02:00
Emmanuel Gil Peyrot
1adccee40b minidom: Fix all clippy warnings 2024-07-03 16:28:11 +02:00