Commit graph

52 commits

Author SHA1 Message Date
Emmanuel Gil Peyrot
bcd42a26e3 macros: Use a nicer syntax when declaring attributes.
The previous version had a => required|optional|default token, this was
duplicating information for Option types and didn’t look very good.

This new version looks like a type, which can be either Required<_>,
Option<_> or Default<_>, and means the same thing.
2019-02-24 20:26:42 +01:00
Emmanuel Gil Peyrot
637c3eadd7 Fix clippy lints. 2019-02-21 21:00:58 +01:00
Emmanuel Gil Peyrot
409a1dafa9 Move Error, helpers and macros into a util module. 2019-01-13 12:39:51 +01:00
Emmanuel Gil Peyrot
c2b7e19378 Rename "compat" into "disable-validation", to insist on it breaking some guarantees. 2019-01-12 22:00:46 +01:00
Emmanuel Gil Peyrot
8b15728bb2 blocking, jingle_ft: Split #[cfg] sections into their own tests. 2019-01-12 20:41:40 +01:00
Astro
95f4ade4ba compat mode that relaxes some of the check_* macros 2018-12-30 00:36:29 +01:00
Emmanuel Gil Peyrot
efd7bd5f2f Run cargo fmt. 2018-12-18 15:32:05 +01:00
Emmanuel Gil Peyrot
6b2dd8fe5e Run cargo fix --edition to move to Edition 2018. 2018-12-18 15:27:30 +01:00
Emmanuel Gil Peyrot
7a2dcbee01 Test struct sizes on 32-bit too. 2018-10-28 13:10:48 +01:00
Emmanuel Gil Peyrot
40aedcf184 Test the size of every struct defined here. 2018-10-26 14:26:16 +02:00
Emmanuel Gil Peyrot
eeeae25cb1 jingle_ft: Document this module. 2018-08-08 20:52:27 +02:00
Emmanuel Gil Peyrot
7f12d05fd2 Switch allow→deny(missing_docs) for the whole crate. 2018-08-08 18:48:05 +02:00
Emmanuel Gil Peyrot
3fb99988d5 macros: Merge generate_element_with_children!() into generate_element!(). 2018-05-28 16:45:13 +02:00
Emmanuel Gil Peyrot
9c598fbdf9 macros: Rename generate_element_with_only_attributes!() into generate_element!(). 2018-05-28 16:42:35 +02:00
Emmanuel Gil Peyrot
93b018e5ac macros: Remove use requirement on ns. 2018-05-14 16:30:28 +02:00
Emmanuel Gil Peyrot
0d4327eb42 macros: Remove use requirement on minidom::IntoAttributeValue. 2018-05-14 16:12:56 +02:00
Emmanuel Gil Peyrot
040792c242 macros: Remove use requirement on std::str::FromStr. 2018-05-14 16:11:22 +02:00
Emmanuel Gil Peyrot
927df2fdb1 jingle_ft: Add constructors and setters. 2018-05-04 19:10:45 +02:00
Emmanuel Gil Peyrot
e4cfc1b867 jingle_ft: Simplify serialisation. 2017-11-23 16:37:04 +00:00
Emmanuel Gil Peyrot
988b6a6160 jingle_ft: Parse <range/> using the new helper. 2017-11-23 16:33:08 +00:00
Emmanuel Gil Peyrot
fb27b6225c jingle_ft: Correctly insert <range/> in <file/>. 2017-10-31 21:44:43 +00:00
Emmanuel Gil Peyrot
5cdb2d77ab Split out DateTime parsing into its own module (implement XEP-0082). 2017-10-31 19:41:45 +00:00
Emmanuel Gil Peyrot
929bd577f3 Add a generate_element_with_only_attributes macro, and use it wherever it makes sense. 2017-10-31 17:58:11 +00:00
Emmanuel Gil Peyrot
97abc37f1a jingle_ft: Improve <range/> parsing. 2017-10-31 17:02:24 +00:00
Emmanuel Gil Peyrot
667ae4c40f jingle_ft: Implement checksum parsers. 2017-10-31 16:41:22 +00:00
Emmanuel Gil Peyrot
cf31506580 jingle_ft: Split Description::try_from into File::try_from. 2017-10-31 16:25:01 +00:00
Emmanuel Gil Peyrot
db9ef3ef30 jingle_ft: Use jingle’s ContentId type to identify content names. 2017-10-31 16:11:09 +00:00
Emmanuel Gil Peyrot
0200ced3e5 jingle_ft: Finish implementation of received. 2017-10-31 16:09:28 +00:00
Emmanuel Gil Peyrot
92277ccde0 jingle_ft: Add support for empty range elements.
These can be used to indicate support for ranged transfers.
2017-08-27 02:33:37 +01:00
Emmanuel Gil Peyrot
f51fa15b68 jingle_ft: Add forgotten xml:lang support for <desc/>. 2017-08-27 01:22:15 +01:00
Emmanuel Gil Peyrot
f6f6faeb77 iq, jingle_ft: Simplify item counting with Iterator::count(). 2017-07-20 23:08:23 +01:00
Emmanuel Gil Peyrot
487dbdc6de Replace Into<Element> with From<…> for Element.
This allows Element::from() to work, and since Into<Element> is
automatically implemented for any type implementing From there is no
change to existing code.
2017-07-20 20:36:13 +01:00
Emmanuel Gil Peyrot
1f43cd934b Use TryFrom from the try_from crate, instead of the unstable feature.
This makes xmpp-parsers usable on stable.
2017-07-20 20:03:15 +01:00
Emmanuel Gil Peyrot
6f69f2d7d9 jingle_ft: Parse <date/> into a proper DateTime. 2017-06-16 20:37:48 +01:00
Emmanuel Gil Peyrot
6794b34714 Cargo.toml: Update minidom to 0.4.3 to use its new IntoAttributeValue implementation on numbers. 2017-05-27 23:18:15 +01:00
Emmanuel Gil Peyrot
a6b3152add hashes: Make the hash a Vec<u8>, to avoid base64 issues. 2017-05-25 00:30:29 +01:00
Emmanuel Gil Peyrot
16e43c0b01 Convert all of the parsers/serialisers into consuming their parameter. 2017-05-23 23:31:33 +01:00
Emmanuel Gil Peyrot
e7e4284a0d jingle_ft: Obtain attributes using the get_attr! macro. 2017-05-21 21:02:06 +01:00
Emmanuel Gil Peyrot
b22acff15e hashes, ecaps2, jingle_ft: Make the algorithm a proper enum. 2017-05-18 23:09:29 +01:00
Emmanuel Gil Peyrot
1ec3806629 hashes: Switch to Into/TryFrom. 2017-05-06 20:46:11 +01:00
Emmanuel Gil Peyrot
a3a90e4eda jingle_ft: Switch to Into/TryFrom. 2017-05-06 20:30:52 +01:00
Emmanuel Gil Peyrot
29725b9d4d Update to minidom 0.3.0. 2017-05-04 01:20:22 +01: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
7750aae5b5 presence, message, jingle_ft: Remove unneeded println!(). 2017-04-29 06:57:20 +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
fe3300b4b0 jingle_ft: Add the forgotten desc element. 2017-04-28 23:42:27 +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