lib.rs

 1//! A crate parsing common XMPP elements into Rust structures.
 2//!
 3//! Each module implements a `parse` function, which takes a minidom
 4//! `Element` reference and returns `Some(MessagePayload)` if the parsing
 5//! succeeded, None otherwise.
 6//!
 7//! Parsed structs can then be manipulated internally, and serialised back
 8//! before being sent over the wire.
 9
10// Copyright (c) 2017 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
11//
12// This Source Code Form is subject to the terms of the Mozilla Public
13// License, v. 2.0. If a copy of the MPL was not distributed with this
14// file, You can obtain one at http://mozilla.org/MPL/2.0/.
15
16extern crate minidom;
17extern crate jid;
18extern crate base64;
19extern crate digest;
20extern crate sha2;
21extern crate sha3;
22extern crate blake2;
23
24/// Error type returned by every parser on failure.
25pub mod error;
26/// XML namespace definitions used through XMPP.
27pub mod ns;
28
29/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
30pub mod message;
31/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
32pub mod presence;
33/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
34pub mod iq;
35/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
36pub mod stanza_error;
37
38/// RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence
39pub mod body;
40
41/// XEP-0004: Data Forms
42pub mod data_forms;
43
44/// XEP-0030: Service Discovery
45pub mod disco;
46
47/// XEP-0047: In-Band Bytestreams
48pub mod ibb;
49
50/// XEP-0059: Result Set Management
51pub mod rsm;
52
53/// XEP-0085: Chat State Notifications
54pub mod chatstates;
55
56/// XEP-0166: Jingle
57pub mod jingle;
58
59/// XEP-0184: Message Delivery Receipts
60pub mod receipts;
61
62/// XEP-0199: XMPP Ping
63pub mod ping;
64
65/// XEP-0203: Delayed Delivery
66pub mod delay;
67
68/// XEP-0221: Data Forms Media Element
69pub mod media_element;
70
71/// XEP-0224: Attention
72pub mod attention;
73
74/// XEP-0234: Jingle File Transfer
75pub mod jingle_ft;
76
77/// XEP-0261: Jingle In-Band Bytestreams Transport Method
78pub mod jingle_ibb;
79
80/// XEP-0297: Stanza Forwarding
81pub mod forwarding;
82
83/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
84pub mod hashes;
85
86/// XEP-0308: Last Message Correction
87pub mod message_correct;
88
89/// XEP-0313: Message Archive Management
90pub mod mam;
91
92/// XEP-0359: Unique and Stable Stanza IDs
93pub mod stanza_id;
94
95/// XEP-0380: Explicit Message Encryption
96pub mod eme;
97
98/// XEP-0390: Entity Capabilities 2.0
99pub mod ecaps2;