Emmanuel Gil Peyrot
c828f93839
Add a Stream Management implementation.
2018-05-18 19:04:02 +02:00
Emmanuel Gil Peyrot
9bd6fe002d
disco: Implement IqGetPayload on the correct structs.
2018-05-17 19:24:51 +02:00
Emmanuel Gil Peyrot
0bec19c224
ibr: Fix syntax error.
2018-05-16 15:16:15 +02:00
Emmanuel Gil Peyrot
412eafb363
iq: Implement the Iq*Payload traits on every possible payload.
2018-05-16 15:08:17 +02:00
Emmanuel Gil Peyrot
d5f88d2636
iq: Add helper constructors.
2018-05-16 14:49:00 +02:00
Emmanuel Gil Peyrot
d29021b85c
iq: Replace clunky payload enums with proper traits.
2018-05-16 14:48:29 +02:00
Emmanuel Gil Peyrot
d9f2af6c97
mam: Use a macro to generate Result_.
2018-05-15 02:06:38 +02:00
Emmanuel Gil Peyrot
965f6a1f83
ecaps2: Use a macro to generate ECaps2.
2018-05-15 01:55:16 +02:00
Emmanuel Gil Peyrot
f52c28fb35
jingle, jingle_s5b: Add missing checks for unknown attributes and children.
2018-05-15 01:47:12 +02:00
Emmanuel Gil Peyrot
71dc5ad6c8
pubsub: Document the new structs and their fields.
2018-05-15 00:18:15 +02:00
Emmanuel Gil Peyrot
58a1d80b77
pubsub: Add forgotten toplevel parsing.
2018-05-14 21:32:58 +02:00
Emmanuel Gil Peyrot
fcdfc6d85a
Add a PubSub module.
2018-05-14 21:04:16 +02:00
Emmanuel Gil Peyrot
a3e35510cc
macros: Always use the correct std::default::Default trait.
2018-05-14 21:03:24 +02:00
Emmanuel Gil Peyrot
d2dc77e4a3
pubsub: Move Subscription to the module.
2018-05-14 21:02:22 +02:00
Emmanuel Gil Peyrot
688ae145be
pubsub: Move common attributes to the module.
2018-05-14 17:49:25 +02:00
Emmanuel Gil Peyrot
b37a8da906
Add a User Nickname (XEP-0172) parser and serialiser.
2018-05-14 17:43:03 +02:00
Emmanuel Gil Peyrot
90063e5433
mood: Add support for the <text/> element.
2018-05-14 17:32:15 +02:00
Emmanuel Gil Peyrot
3d495ccf41
Use check_no_children!() where it makes sense.
2018-05-14 16:33:47 +02:00
Emmanuel Gil Peyrot
93b018e5ac
macros: Remove use requirement on ns.
2018-05-14 16:30:28 +02:00
Emmanuel Gil Peyrot
d9aaa3e9ce
macros: Remove use requirement on error::Error.
2018-05-14 16:21:39 +02:00
Emmanuel Gil Peyrot
6f497027f5
macros: Remove use requirement on minidom::Element.
2018-05-14 16:17:21 +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
292cdd059c
macros: Remove use requirement on try_from::TryFrom.
2018-05-14 16:07:15 +02:00
Emmanuel Gil Peyrot
84355f9e1d
macros: Simplify generated code for check_no_attributes!().
2018-05-12 20:25:59 +02:00
Emmanuel Gil Peyrot
6bb466eea2
Use check_self!() where it makes sense.
2018-05-12 18:31:11 +02:00
Emmanuel Gil Peyrot
e0438f9b88
jingle_message, muc, presence, version: Always use the check_no_attributes macro.
2018-05-12 17:59:04 +02:00
Emmanuel Gil Peyrot
f2f8de773b
message: Rename body into value, since this applies to subject too.
2018-05-12 17:42:49 +02:00
Emmanuel Gil Peyrot
c72f5819c7
message: Optimise slightly the get_best method.
2018-05-12 17:42:07 +02:00
Emmanuel Gil Peyrot
6bafe35d2a
message: Add getters for the best body per language list.
2018-05-12 17:22:05 +02:00
Emmanuel Gil Peyrot
53e23cbf65
jingle_s5b: Make Candidate.host an IpAddr instead of a String.
2018-05-04 21:19:40 +02:00
Emmanuel Gil Peyrot
3310f29704
jingle_s5b: Add constructors and setters.
2018-05-04 19:11:03 +02:00
Emmanuel Gil Peyrot
927df2fdb1
jingle_ft: Add constructors and setters.
2018-05-04 19:10:45 +02:00
Emmanuel Gil Peyrot
a1e95ffb2e
jingle: Add constructors and setters.
2018-05-04 19:10:29 +02:00
Emmanuel Gil Peyrot
c762a03c39
hashes: Add two constructors.
2018-05-04 19:10:04 +02:00
Emmanuel Gil Peyrot
d83624c8a4
component: Add constructors.
2018-03-01 17:32:50 +01:00
Emmanuel Gil Peyrot
0a057cdfef
component: Fix handshake content, it’s hex, not base64!
2018-03-01 17:31:49 +01:00
Emmanuel Gil Peyrot
011308b4b4
Add a component handshake parser.
2018-03-01 10:57:01 +01:00
Emmanuel Gil Peyrot
395b64e644
Add a <stream:stream> parser.
2018-03-01 10:08:30 +01:00
Emmanuel Gil Peyrot
3de29e1e81
lib, ns, error, macros: Update the copyright year.
2018-03-01 10:01:35 +01:00
Emmanuel Gil Peyrot
a484150e4b
bind: Switch to an enum, only three options are possible.
2018-02-23 12:38:40 +01:00
Emmanuel Gil Peyrot
7c0975dd5d
Add a Bind parser.
2018-02-20 17:43:19 +01:00
Emmanuel Gil Peyrot
cfaebb4a91
Add a SASL parser.
2018-02-20 17:01:12 +01:00
Emmanuel Gil Peyrot
fab99c9004
error: Remove std::error::Error implementation as it conflicts with failure.
2018-02-20 16:53:42 +01:00
Emmanuel Gil Peyrot
208e280067
Add a WebSocket <open/> parser.
2018-02-20 16:20:45 +01:00
Emmanuel Gil Peyrot
93c7ea6914
muc/user: Improve documentation of Status.
2017-11-24 05:50:24 +00:00
Emmanuel Gil Peyrot
75625c497c
muc/user: Simplify Status with a new macro.
2017-11-24 05:44:58 +00:00
Emmanuel Gil Peyrot
32f427a73c
muc/user: Generate Reason automatically.
2017-11-24 05:24:12 +00:00
Emmanuel Gil Peyrot
5a2f4859cf
Add a mood parser and serialiser.
2017-11-24 05:20:36 +00:00
Emmanuel Gil Peyrot
42a3e42533
roster: Simplify parsing of Item.
2017-11-24 05:09:25 +00:00
Emmanuel Gil Peyrot
80a2f425e2
media_element: Simplify parsing of MediaElement.
2017-11-24 04:48:31 +00:00
Emmanuel Gil Peyrot
6533395ec3
media_element: Simplify parsing of URI.
2017-11-24 04:46:08 +00:00
Emmanuel Gil Peyrot
ef04d2e524
stanza_error: Generate DefinedCondition automatically.
2017-11-24 04:30:33 +00:00
Emmanuel Gil Peyrot
2661259e9a
chatstates: Generate ChatState automatically.
2017-11-24 04:27:35 +00:00
Emmanuel Gil Peyrot
cec581baa0
roster: Parse query using the new helpers.
2017-11-23 16:45:05 +00: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
0ead24a041
helpers, disco: Parse children based on their name and namespace.
2017-11-23 16:32:18 +00:00
Emmanuel Gil Peyrot
d78a0e6dae
helpers, disco: Add missing serialisation, and add a test.
2017-11-23 16:30:53 +00:00
Emmanuel Gil Peyrot
682bb34b0b
delay: Use the new helper macro.
2017-11-23 16:19:24 +00:00
Emmanuel Gil Peyrot
32e373be03
helpers: Add a plain text codec.
2017-11-23 16:19:04 +00:00
Emmanuel Gil Peyrot
cb6eb55686
macros: Uniformise trailing commas handling.
2017-11-23 16:06:35 +00:00
Emmanuel Gil Peyrot
3f57edfc27
hashes: Use the new helpers.
2017-11-23 15:52:06 +00:00
Emmanuel Gil Peyrot
ad17c877f5
Move Base64 codec into a helper module.
2017-11-23 16:00:47 +00:00
Rust Cambridge Mob
3e37beffe2
Implement macro for elements containing children
2017-11-16 21:00:01 +00:00
Rust Cambridge Mob
77e150c63d
Implement macro for elements containing text
2017-11-16 20:17:11 +00:00
Emmanuel Gil Peyrot
9c9ffe70a7
caps: Do the same fixes, unbreak blake2 and simplify code.
2017-11-15 23:16:37 +00: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
8aa51bd047
eme: Restore docstrings.
2017-11-01 00:24:23 +00:00
Emmanuel Gil Peyrot
4fb909cfd1
data_forms: Simplify serialisation using .map().
2017-10-31 23:33:34 +00:00
Emmanuel Gil Peyrot
1e39a4cdd7
jingle_s5b: Actually use the Candidate parser.
2017-10-31 22:31:57 +00:00
Emmanuel Gil Peyrot
35258482ba
delay: Simplify parsing and add more checks.
2017-10-31 22:27:13 +00:00
Emmanuel Gil Peyrot
7950fe8f52
rsm: Simplify serialisation.
2017-10-31 22:21:50 +00:00
Emmanuel Gil Peyrot
86eb65b829
mam: Bump jid to 0.3.1, to serialise it directly to a text node.
2017-10-31 22:21:27 +00:00
Emmanuel Gil Peyrot
6e48d0f65a
media_element: Also check for unknown attributes.
2017-10-31 22:04:13 +00:00
Emmanuel Gil Peyrot
4875f15201
media_element: Parse URI separately from MediaElement.
2017-10-31 22:01:52 +00:00
Emmanuel Gil Peyrot
fb27b6225c
jingle_ft: Correctly insert <range/> in <file/>.
2017-10-31 21:44:43 +00:00
Emmanuel Gil Peyrot
bd9aa01ad5
Split macros into their own module.
2017-10-31 21:17:24 +00:00
Emmanuel Gil Peyrot
df069ac6c6
mam: Simplify parsing.
2017-10-31 21:10:04 +00:00
Emmanuel Gil Peyrot
6eba0e7d87
Simplify check_self macro.
2017-10-31 20:35:25 +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
82fcf3bad5
ecaps2: Simplify parsing.
2017-10-31 19:07:49 +00:00
Emmanuel Gil Peyrot
47c9263b86
blocking: Merge get_children_items into the try_from.
2017-10-31 18:53:51 +00:00
Emmanuel Gil Peyrot
649286d59e
disco: Use generate_element_with_only_attributes.
2017-10-31 18:49:22 +00:00
Emmanuel Gil Peyrot
61badccf8b
Add meta support to macros.
2017-10-31 18:37:32 +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
ed53f452c3
ping: Add a serialise test.
2017-10-31 17:57:49 +00:00
Emmanuel Gil Peyrot
b5e41a7074
Fix the name in create_empty_element.
2017-10-31 17:55:27 +00:00
Emmanuel Gil Peyrot
7fa889f46e
jingle: Import the disposition attribute values.
2017-10-31 17:17:06 +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
b7b3340c9f
Add a blocking command parser (XEP-0191).
2017-10-31 15:48:11 +00:00
Emmanuel Gil Peyrot
f85b451fcf
Add a new check_no_attributes macro, to avoid the empty list.
2017-10-31 15:47:38 +00:00
Emmanuel Gil Peyrot
1892e1ca04
disco: Check for children ordering in disco#info.
2017-10-29 00:36:36 +01:00
Emmanuel Gil Peyrot
a8cfc8e62e
pubsub::event: Add more type safety.
2017-10-10 19:45:08 +01:00
Emmanuel Gil Peyrot
e1477f146b
pubsub::event: Use the new helper macros to simplify parsing.
2017-10-10 19:27:29 +01:00
Emmanuel Gil Peyrot
5f6f6a5e91
disco: Use the new helper macros to simplify parsing.
2017-10-10 19:00:42 +01:00
Emmanuel Gil Peyrot
9f27f200ca
data_forms: Use the new helper macros to simplify parsing.
2017-10-10 18:26:05 +01:00
Emmanuel Gil Peyrot
a2c7529668
eme: Use the new helper macros to simplify parsing.
2017-10-10 18:10:52 +01:00
Emmanuel Gil Peyrot
ee243c4720
chatstates: Use the new helper macros to simplify parsing.
2017-10-10 18:09:58 +01:00
Emmanuel Gil Peyrot
a2b6033336
caps: Use the new helper macros to simplify parsing.
2017-10-10 18:04:27 +01:00
Emmanuel Gil Peyrot
66fb8fea74
message_correct: Use the new helper macros to simplify parsing.
2017-10-10 18:00:15 +01:00
Emmanuel Gil Peyrot
cfbfce512e
lib, ping, attention: Add a macro for singleton elements.
2017-10-10 17:53:25 +01:00
Emmanuel Gil Peyrot
6add31b526
lib: Add check macros, to simplify code.
2017-10-10 17:52:14 +01:00
Emmanuel Gil Peyrot
33018a5c09
roster: Make subscription="none" the default, see RFC6121 §2.1.2.5.
2017-10-10 17:40:29 +01: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
833ef068c6
message: Fix wrong element for xml:lang.
2017-08-27 01:21:07 +01:00
Emmanuel Gil Peyrot
f69f567448
Use minidom 0.6.1’s Element::has_ns(), to simplify namespace comparisons.
2017-08-27 01:04:56 +01:00
Emmanuel Gil Peyrot
c853a1ff4b
compare_elements: Add missing license notice.
2017-08-27 01:32:15 +01:00
Astro
1b1661fd82
Introduce comparing with namespace support.
2017-08-19 00:04:18 +01:00
Emmanuel Gil Peyrot
1af06fdf6d
Add an iq version parser (XEP-0092).
2017-07-29 11:45:45 +01:00
Emmanuel Gil Peyrot
69cc83c456
message, iq, presence, stanza_error, forwarded: Add support for components hidden behind the component feature flag.
2017-07-29 06:49:02 +01:00
Emmanuel Gil Peyrot
99b9525e6f
Update to jid-rs 0.2.3, which implements IntoAttributeValue on Jid.
2017-07-29 06:28:20 +01:00
Emmanuel Gil Peyrot
d55fa8e5dd
chatstates: Prevent compilation if the module isn’t properly documented.
2017-07-29 06:26:50 +01:00
Emmanuel Gil Peyrot
a04c395122
roster: Document most structs and their fields.
2017-07-29 06:22:35 +01:00
Emmanuel Gil Peyrot
56a66f8c4b
message: Enforce more type safety on Body, Subject and Thread.
2017-07-29 06:11:48 +01:00
Emmanuel Gil Peyrot
6ec1e46953
roster: Make Group a proper struct.
2017-07-29 05:36:59 +01:00
Emmanuel Gil Peyrot
5388696b95
lib: Remove erroneous “reference” mention in the module docstring.
2017-07-29 05:24:20 +01:00
Emmanuel Gil Peyrot
45d196463c
disco: Document every struct and their fields.
2017-07-29 04:51:51 +01:00
Emmanuel Gil Peyrot
67e72b009e
disco: Fix serialisation of extensions, and add a test.
2017-07-29 04:39:50 +01:00
Emmanuel Gil Peyrot
4d3717d170
disco: Split Feature and Identity parsing out of DiscoQueryResult.
2017-07-29 04:35:15 +01:00
Emmanuel Gil Peyrot
5ece20a029
disco: Create a mutable DiscoInfoResult at the beginning of its parsing.
2017-07-29 04:25:55 +01:00
Emmanuel Gil Peyrot
58760fc28d
data_forms: Split field parsing into its own TryFrom impl.
2017-07-29 04:19:58 +01:00
Emmanuel Gil Peyrot
37d1ae64ad
receipts: Split the stupid enum into two different structs.
2017-07-29 04:00:25 +01:00
Emmanuel Gil Peyrot
a0b1d93ff0
stanza_id: Split the stupid enum into two different structs.
2017-07-29 03:51:41 +01:00
Emmanuel Gil Peyrot
db35d28c9c
ibb: Split the stupid enum into three different structs.
2017-07-29 03:44:35 +01:00
Emmanuel Gil Peyrot
dfb736a973
rsm: Change if .is_some() { .unwrap() } into if let Some().
2017-07-29 03:03:45 +01:00
Emmanuel Gil Peyrot
f83fe92244
jingle: Wrap the disposition in a struct, to get better type safety.
2017-07-29 02:47:33 +01:00
Emmanuel Gil Peyrot
75ae6100b4
data_forms: Remove unneccessary swallowing of an error.
2017-07-29 02:41:42 +01: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
4454da15b6
disco: Implement disco#items.
2017-07-21 17:33:58 +01:00
Emmanuel Gil Peyrot
3b6733f38b
Upgrade to minidom 0.4.4 to avoid having to redefine IntoElements for each Into<Element>.
2017-07-21 01:20:29 +01:00
Emmanuel Gil Peyrot
21cee25b27
Replace .and_then() with .map() wherever it makes sense.
2017-07-21 01:19:34 +01:00
Emmanuel Gil Peyrot
7612c53f9a
attention, chatstates, eme, ping: Add a docstring on the structs.
2017-07-20 23:47:21 +01:00
Emmanuel Gil Peyrot
fd31e691af
lib: Improve the wording of the docstring.
2017-07-20 23:46:44 +01:00
Emmanuel Gil Peyrot
87af0f3615
message, presence, iq: Improve documentation.
2017-07-20 23:10:13 +01:00
Emmanuel Gil Peyrot
5df585ca40
data_forms, ibr, message, presence, roster: Always use into_iter.
2017-07-20 23:09:22 +01:00
Emmanuel Gil Peyrot
f6f6faeb77
iq, jingle_ft: Simplify item counting with Iterator::count().
2017-07-20 23:08:23 +01:00
Maxime “pep” Buquet
2571aa7666
presence: Add with_ helpers to build a Presence
2017-07-19 00:21:44 +01:00
Emmanuel Gil Peyrot
5543d71599
attention: Use super::* in tests like every other module.
2017-07-20 20:53:59 +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
5ec921fa6f
attention: Add missing unknown attribute check.
2017-07-20 20:11:00 +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