Commit graph

1419 commits

Author SHA1 Message Date
lumi
1f7c61e0d6 Merge branch 'xml-rs-0.4.1' into 'master'
Bump xml-rs dependency to 0.4.1

See merge request !5
2017-04-30 14:05:28 +00:00
lumi
1b1e2fa86a Merge branch 'use_btreemap_for_attributes' into 'master'
Use a BTreeMap<String, String> instead of a Vec<Attribute> to store attributes

Closes #4

See merge request !4
2017-04-30 14:00:05 +00:00
Emmanuel Gil Peyrot
4b90c1dc1f data_forms, disco, jingle, jingle_ft: Remove superfluous “extern crate”. 2017-04-29 22:10:38 +01:00
Emmanuel Gil Peyrot
407e4cceb4 License the project under MPL-2.0. 2017-04-29 22:14:34 +01:00
Emmanuel Gil Peyrot
6f2ee2f0ad Cargo.toml: Add some metadata. 2017-04-29 21:41:18 +01:00
Emmanuel Gil Peyrot
7750aae5b5 presence, message, jingle_ft: Remove unneeded println!(). 2017-04-29 06:57:20 +01:00
Emmanuel Gil Peyrot
61efeb827f forwarding: Remove unused imports. 2017-04-29 06:50:57 +01:00
Emmanuel Gil Peyrot
eecb47f4ed mam: Add tests. 2017-04-29 06:41:55 +01:00
Emmanuel Gil Peyrot
0b2d46aa3a Add a MAM parser and serialiser. 2017-04-29 06:07:00 +01:00
Emmanuel Gil Peyrot
7cd4a49011 error: Add JidParseError. 2017-04-29 06:06:41 +01:00
Emmanuel Gil Peyrot
72a6eee2fd Add a RSM parser and serialiser. 2017-04-29 04:37:18 +01:00
Emmanuel Gil Peyrot
0f92a11894 Add a forwarding parser and serialiser. 2017-04-29 03:50:49 +01:00
Emmanuel Gil Peyrot
d824a161b6 message: Implement IntoElements. 2017-04-29 03:50:20 +01:00
Emmanuel Gil Peyrot
4dc585f1c9 delay: Implement IntoElements. 2017-04-29 03:50:02 +01:00
Emmanuel Gil Peyrot
8b964df645 Add a stanza-id parser and serialiser. 2017-04-29 03:23:50 +01:00
Emmanuel Gil Peyrot
b09c57ec72 ecaps2: Move hashing crates to the main library. 2017-04-29 01:31:39 +01:00
Emmanuel Gil Peyrot
45b38bcef9 iq: Wire up the IBB parser and serialiser. 2017-04-29 01:06:12 +01:00
Emmanuel Gil Peyrot
846148d618 ibb: Fix serialisation of <data/> data. 2017-04-28 23:46:32 +01:00
Emmanuel Gil Peyrot
5e4ba2701b iq: Wire up the Jingle parser and serialiser. 2017-04-28 23:46:06 +01:00
Emmanuel Gil Peyrot
4fb4727357 jingle: Remove extraneous println!. 2017-04-28 23:45:43 +01:00
Emmanuel Gil Peyrot
10a336f874 jingle: Accept any unknown child, as per the specification. 2017-04-28 23:45:27 +01:00
Emmanuel Gil Peyrot
c20d37a842 jingle: Add serialisation for <reason/>. 2017-04-28 23:45:02 +01:00
Emmanuel Gil Peyrot
de93c32cb5 jingle_ft: Add a received parser. 2017-04-28 23:43:47 +01:00
Emmanuel Gil Peyrot
eeb9b36620 jingle_ft: Make Creator into an enum, instead of a String. 2017-04-28 23:43:24 +01:00
Emmanuel Gil Peyrot
9f6eea06ce ns: Fix the hashes text-names namespaces. 2017-04-28 23:42:50 +01:00
Emmanuel Gil Peyrot
fe3300b4b0 jingle_ft: Add the forgotten desc element. 2017-04-28 23:42:27 +01:00
Emmanuel Gil Peyrot
30a596cb26 ibb: Implement serialise. 2017-04-27 19:05:51 +01:00
Emmanuel Gil Peyrot
6a48a6bf00 ecaps2, error: Update to base64 0.5. 2017-04-27 18:33:02 +01:00
Emmanuel Gil Peyrot
154afda327 Bump xml-rs dependency to 0.4.1. 2017-04-27 17:42:00 +01:00
Bastien Orivel
f87e2442d4 Use a BTreeMap<String, String> instead of a Vec<Attribute> to store attributes
This way we don't need to reimplement PartialEq for Element. It's also
way easier to get an attribute by name as we don't need to iterate over
every attribute to see if it exists.

The only side effect is that now, in the Debug output, attributes are
automatically sorted by names instead of being sorted by insertion
order.

Fixes #4
2017-04-26 23:44:58 +02:00
lumi
2aef4aacb8 linewrap license 2017-04-26 01:26:29 +02:00
Emmanuel Gil Peyrot
5d51dff9e6 disco: Bump minidom dependency to 0.2.0, which fixes xml:lang parsing. 2017-04-26 00:22:40 +01:00
Emmanuel Gil Peyrot
a0eab6c1af ecaps2: Import Digest from digest. 2017-04-26 00:20:50 +01:00
lumi
8116c6e657 Well, that's embarrassing. Hope nobody will ever look at this commit. (if you see this, please don't look) 2017-04-26 01:15:56 +02:00
lumi
d54b002243 bump to 2.0.0, switch license to MIT 2017-04-26 01:14:16 +02:00
lumi
c6f9cc485f Merge branch 'Eijebong/minidom-rs-fix_namespaced_attributes'
# Conflicts:
#	src/tests.rs
2017-04-26 01:02:17 +02:00
lumi
64f212d11b Merge branch 'fix_equality' into 'master'
Fix the PartialEq implementation for Element

Closes #3

See merge request !3
2017-04-25 22:44:59 +00:00
Eijebong
0d0c4b76eb Fix the PartialEq implementation for Element
The order of attributes in an `Element` doesn't matter anymore.
`<elem a="b" c="d" />` and `<elem c="d" a="b" />` are now correctly
considered equal.

For that I had to derive `PartialOrd` and `Ord` for `Attribute`.
This allows us to sort cloned vectors of `Attribute` in the `PartialEq`
implementation and compare them instead of the struct `attributes`.

Fixes #3
2017-04-24 21:15:53 +02:00
Emmanuel Gil Peyrot
7fc40dbb19 ecaps2: Remove extraneous borrowing on base64::encode. 2017-04-24 20:03:05 +01:00
Emmanuel Gil Peyrot
049ef23595 jingle_ft: Implement IntoElements on Range, and change size to be an u64. 2017-04-24 19:52:41 +01:00
Emmanuel Gil Peyrot
5abf820fad jingle_ft: Implement serialise. 2017-04-24 19:25:00 +01:00
Emmanuel Gil Peyrot
db1a87e2ee jingle: Implement serialise. 2017-04-24 19:25:00 +01:00
Emmanuel Gil Peyrot
fa10ab4ebc jingle: Implement From for String on all special attributes. 2017-04-24 19:25:00 +01:00
Emmanuel Gil Peyrot
90f1792ebc jingle_ibb: Make the fields in Transport public. 2017-04-24 19:25:00 +01:00
Emmanuel Gil Peyrot
2b19a415d4 jingle_ibb: Implement serialise. 2017-04-24 19:25:00 +01:00
Emmanuel Gil Peyrot
c71b32ae24 ibb: Implement IntoAttributeValue for Stanza. 2017-04-24 19:25:00 +01:00
Maxime “pep” Buquet
1b4c0c4589 iq: Clippify 2017-04-24 19:20:35 +01:00
Eijebong
6f0e88b25b Correctly add namespaced attributes to elements
Instead of adding the local_name of an attribute, if a prefix exists,
add prefix:local_name to allow users to retrieve it via the namespaced
key name.

For example, with this XML:
```
<?xml version="1.0" encoding="utf-8"?>
<root xml:lang="en" >
</root>
```

`root.attr("xml:lang").unwrap()` will now correctly return "en".
`root.attr("lang")` will not retrieve "xml:lang" value anymore.

This is a breaking change.

Fixes #2
2017-04-24 18:19:50 +02:00
Maxime “pep” Buquet
c462d230f1 ping, iq: Implement ping::serialise_ping and link to Iq. 2017-04-23 21:17:26 +01:00
Maxime “pep” Buquet
b259ab9ef2 iq: Link disco parser to Iq. 2017-04-23 21:12:27 +01:00