Commit log

c13712b tokio-xmpp client: condense fn connect(), refactor out into stream_features

Astro created

4d24e6b tokio-xmpp: name Event::Online fields, add resumed flag

Astro created

5bea70c Merge branch 'outdated-dependencies' into 'master'

Click to expand commit body
Update dependencies

See merge request lumi/sasl-rs!7

lumi created

7fd6923 Use error structs for errors instead of plain strings.

Emmanuel Gil Peyrot created

492e35b Update base64 to 0.12.

Emmanuel Gil Peyrot created

f8cb643 xmpp: Add ChatMessage and GroupMessage events; API likely to change

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

597f5a3 Update Changelogs re jid / serde

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

8bf643a jid: implement custom (De)Serializer for a prettier visual

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

91c8045 jid: impl &{Bare,Full}Jid for String

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

36aaa3e jid: Add serde support behind feature

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

df47130 README: add lib descriptions

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

36d77bc Add README

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

47ab444 parsers: remove unused imports

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

d4bbeb2 minidom: Add todo in Prefixes

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

33ee71b tokio-xmpp: update for minidom changes

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

eca44f5 jid: update for minidom changes

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

fd158d9 parsers: rustfmt

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

fa8b9ed minidom: rustfmt

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

3d71e37 minidom: Ensure there is no colon in name when creating element

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

937e238 minidom: Make `ElementBuilder::prefix` fail on adding duplicate prefix

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

770dff7 minidom: Don't borrow prefix in Prefixes.get

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

1f2d7aa minidom: Rework Prefixes internal structure

Click to expand commit body
Change the mapping in Prefixes to Prefix -> Namespace instead of
Namespace -> Prefix. This allows us to not have duplicate prefixes
anymore, but requires us to store the prefix on Element. This prefix is
only taken as a hint anyway and used only when coming from the reader.

This commits also partially removes the possibility to add prefixes
when creating an Element via `Element::new`, `Element::builder` or
`Element::bare`. Proper errors should be added in the following commits.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

4299491 minidom: remove unused Rc

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

6308250 parsers: update for minidom API changes

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

40b92d6 minidom: clarify meaning of Element.name (being the local name)

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

171e7f1 minidom: ensure prefix is extracted out of provided name when creating Element

Click to expand commit body
I would have liked to handle all of this in `Element::new` only, but I
also have to do it in `Element::builder` unfortunately because then
element builder then pushes prefixes it gathered itself.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

f151306 minidom: forcing a namespace on Element. Stop requiring prefixes.

Click to expand commit body
Below is what I think I did.

A few changes:
- Change prefixes to be something less important in the API.
- Rework the Element struct to force a namespace. In XMPP everything is
  namespaced.
- Remove parent ref on what was previously NamespaceSet and is now
  Prefixes.

More specifically this means `Element::new` has changed to require
`Element`'s new new properties as parameters. `Element::builder` and
`Element::bare` now require a namespace unconditionally.
`Element::prefix` has been removed.

This new API is based on the fact that prefixes are non-essential
(really just an implementation detail) and shouldn't be visible to the
user. It is possible nonetheless to set custom prefixes for
compatibility reasons with `ElementBuilder::prefix`. **A prefix is
firstly mapped to a namespace, and then attached to an element**, there
cannot be a prefix without a namespace.

Prefix inheritance is used if possible but for the case with no
prefix ("xmlns") to be reused, we only check custom prefixes declared on
the tag itself and not ascendants. If it's already used then we generate
prefixes (ns0, ns1, ..) checking on what has been declared on all
ascendants (plus of course those already set on the current tag).

Example API:

```rust
let mut elem = ElementBuilder("stream", "http://etherx.jabber.org/streams")
  .prefix(Some(String::from("stream")), "http://etherx.jabber.org/streams)
  .prefix(None, "jabber:client")
  .attr(..)
  .build();

assert_eq!(elem.ns(), String::from("http://etherx.jabber.org/streams"));
```

See also the few tests added in src/tests.

TODO: Fix inconsistencies wrt. "prefix:name" format provided as a name
when creating an Element with `Element::new` or `Element::bare`.
`Element::builder` already handles this as it should, splitting name and
prefix.
TODO: Change `Element::name` method to `Element::local_name` to make it
more explicit.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

0b680a1 parsers: Fix jingle and jingle_rtp test_size for 32bit

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

080c7b8 CI: Remove build stage

Click to expand commit body
`cargo test` rebuilds all of it anyway.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

5eeac93 CI: rename jobs to make it easier to read in gitlab

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

20b2248 minidom: Remove NSChoice::None

Click to expand commit body
Although it is still possible to create such elements, this is not a a
case that should happen in XMPP. Changing to API to prevent the creation
of these elements is next on the list.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

9737194 xmpp-parsers: Add MIX to the supported XEPs.

Emmanuel Gil Peyrot created

048e49f xmpp-parsers: Add a MIX serialisation test.

Emmanuel Gil Peyrot created

820fbbf xmpp-parsers: Add helper constructors for MIX.

Emmanuel Gil Peyrot created

ad4c1f5 xmpp-parsers: Add a MIX parser.

Emmanuel Gil Peyrot created

5e7701f minidom: Remove remaining Comment bits in node

Click to expand commit body
They were hidden behind the flag and not showing up in tests.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

015d000 minidom: Remove comments support. Forbid them as per XMPP RFC.

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

c154593 Bump dependencies

Emmanuel Gil Peyrot created

f41b6bf Use stable rustfmt

Click to expand commit body
And install it as the container doesn't have it. Fortunately it's rather
quick (few seconds).

The previous nightly container apparently dropped rustfmt, which is
understandable as not all tools are available all the time. That's on
us.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

476813a CI: Allow nightly to fail

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

a4325c7 tokio-xmpp: doc

Astro created

b6828b9 tokio-xmpp: remove obsolete TODOs

Astro created

4ae9ab4 xmpp-rs: add env_logger in example

Click to expand commit body
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Maxime “pep” Buquet created

7f25b4e tokio-xmpp: update for futures-0.3 (100% API breakage)

Astro created

23cb34e tokio-xmpp: rewrite for futures-0.3

Astro created

bded964 tokio-xmpp: update dependency xml5ever

Astro created

04df9fd xmpp-parsers: Bump base64 to 0.11.

Emmanuel Gil Peyrot created

944c4a0 minidom: quick-xml::Error now implements Error without failure, so use it

Click to expand commit body
Thanks pep.!

Emmanuel Gil Peyrot created

0974582 client: Remove Result from Mechanism::initial().

Emmanuel Gil Peyrot created

21e9c8e Switch from the deprecated rand-os crate to getrandom.

Emmanuel Gil Peyrot created