dc76f296de
Prepare for merge: Move all xmpp-parsers files into xmpp-parsers/
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-10-18 13:47:10 +02:00
Emmanuel Gil Peyrot
d1d98ff3d5
Use crate::Element instead of minidom::Element.
...
This makes refactoring much easier.
2019-09-25 10:28:44 +02:00
Emmanuel Gil Peyrot
b307652421
Remove unused base64 imports.
2019-09-07 16:21:42 +02:00
Emmanuel Gil Peyrot
5bf14b0b22
Drop dependency on try_from.
...
This bumps the minimum supported stable Rust version to 1.34.
The TryFrom and TryInto traits are still reexported to not break the
API, but these reexports are deprecated and will be removed in a future
release.
2019-04-12 11:06:03 +02:00
Emmanuel Gil Peyrot
af8cf177ce
ecaps2: Add a constructor.
2019-03-03 20:08:27 +01:00
Emmanuel Gil Peyrot
f2c3f45a6f
data_forms: Stop duplicating FORM_TYPE in memory.
...
The FORM_TYPE is now only present once, as the form_type member of the
DataForm struct, it isn’t duplicated in fields anymore.
This removes the need to ignore this special field in every single
protocol built on XEP-0128.
2019-02-24 19:52:59 +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
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
9cb4f00341
caps, ecaps2: Update to RustCrypto 0.8.
2018-10-12 17:23:34 +02:00
Emmanuel Gil Peyrot
e41de29d9d
presence: Make PresencePayload a trait, and implement it on every payload.
2018-09-20 20:51:48 +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
0d9d24ffca
ecaps2: Document this module.
2018-07-31 23:35:16 +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
965f6a1f83
ecaps2: Use a macro to generate ECaps2.
2018-05-15 01:55:16 +02:00
Emmanuel Gil Peyrot
93b018e5ac
macros: Remove use requirement on ns.
2018-05-14 16:30:28 +02:00
Emmanuel Gil Peyrot
702c4d2932
ecaps2: Use the digest() facility to simplify hashing.
2017-11-15 23:15:12 +00:00
Emmanuel Gil Peyrot
c1ff291c11
Update all crypto crates to their latest release; un-break blake2b.
2017-11-15 18:37:28 +00:00
Emmanuel Gil Peyrot
82fcf3bad5
ecaps2: Simplify parsing.
2017-10-31 19:07:49 +00:00
Emmanuel Gil Peyrot
4b3ced042e
ecaps2, jingle_s5b: Replace drain() with into_iter().
2017-07-26 00:04:20 +01:00
Emmanuel Gil Peyrot
83c9713ab9
caps, ecaps2: Make Blake2b panic and update the blake2 crate to 0.6.1.
...
See https://github.com/RustCrypto/hashes/issues/34 for more information.
2017-07-24 23:11:10 +01:00
Emmanuel Gil Peyrot
cc563b46d2
ecaps2, forwarding, jingle_s5b, mam: Replace complex into expressions with .map(Element::from).
2017-07-20 20:52:25 +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
76a46559b8
disco: Split query and result.
2017-07-20 17:39:59 +01:00
Emmanuel Gil Peyrot
8e1d5e7983
disco: Make xml:lang a proper Option and rename it to lang.
2017-05-27 22:10:00 +01:00
Emmanuel Gil Peyrot
bdaced7603
caps, ecaps2: Add a function to create a Disco query from a hash.
2017-05-27 12:22:50 +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
b172a6e05c
ecaps2: Remove the last clone.
2017-05-25 00:04:37 +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
f18043231c
ecaps2: Avoid a useless clone.
2017-05-18 23:12:45 +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
2b49d8aa53
disco: Switch to Into/TryFrom.
2017-05-06 21:01:15 +01:00
Emmanuel Gil Peyrot
f963715e77
ecaps2: Switch to Into/TryFrom.
2017-05-06 20:58:22 +01:00
Emmanuel Gil Peyrot
1ec3806629
hashes: Switch to Into/TryFrom.
2017-05-06 20:46:11 +01:00
Emmanuel Gil Peyrot
407e4cceb4
License the project under MPL-2.0.
2017-04-29 22:14:34 +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
6a48a6bf00
ecaps2, error: Update to base64 0.5.
2017-04-27 18:33:02 +01:00
Emmanuel Gil Peyrot
a0eab6c1af
ecaps2: Import Digest from digest.
2017-04-26 00:20:50 +01:00
Emmanuel Gil Peyrot
7fc40dbb19
ecaps2: Remove extraneous borrowing on base64::encode.
2017-04-24 20:03:05 +01:00
Emmanuel Gil Peyrot
948b54d073
ecaps2: Implement blake2b.
2017-04-23 19:28:03 +01:00
Emmanuel Gil Peyrot
429abb996d
ecaps2: Implement serialise.
2017-04-23 18:36:37 +01:00
Emmanuel Gil Peyrot
e1070a8b98
ecaps2: Add a parser too.
2017-04-22 16:51:10 +01:00
Emmanuel Gil Peyrot
6ba22a43e5
lib: Import base64 at the top-level, and not in a module.
2017-04-21 02:46:41 +01:00
Emmanuel Gil Peyrot
6600418070
ecaps2: Remove function convert_element, used only in the tests.
2017-04-21 01:39:32 +01:00
Emmanuel Gil Peyrot
79c691e1c0
ecaps2: Add a TODO about changing algo into an enum.
2017-04-21 01:30:29 +01:00
Emmanuel Gil Peyrot
3209b04a50
Fix all warnings issued by cargo clippy
.
2017-04-21 01:28:58 +01:00