1// Copyright (c) 2017 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7//#![deny(missing_docs)]
8
9/// The `http://jabber.org/protocol/pubsub#event` protocol.
10pub mod event;
11
12/// The `http://jabber.org/protocol/pubsub` protocol.
13pub mod pubsub;
14
15pub use self::event::PubSubEvent;
16pub use self::pubsub::PubSub;
17
18generate_id!(
19 /// The name of a PubSub node, used to identify it on a JID.
20 NodeName
21);
22
23generate_id!(
24 /// The identifier of an item, which is unique per node.
25 ItemId
26);
27
28generate_id!(
29 /// The identifier of a subscription to a PubSub node.
30 SubscriptionId
31);
32
33generate_attribute!(
34 /// The state of a subscription to a node.
35 Subscription, "subscription", {
36 /// The user is not subscribed to this node.
37 None => "none",
38
39 /// The user’s subscription to this node is still pending.
40 Pending => "pending",
41
42 /// The user is subscribed to this node.
43 Subscribed => "subscribed",
44
45 /// The user’s subscription to this node will only be valid once
46 /// configured.
47 Unconfigured => "unconfigured",
48 }, Default = None
49);