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/// The `http://jabber.org/protocol/pubsub#event` protocol.
8pub mod event;
9
10/// The `http://jabber.org/protocol/pubsub` protocol.
11pub mod pubsub;
12
13pub use self::event::PubSubEvent;
14pub use self::pubsub::PubSub;
15
16generate_id!(
17 /// The name of a PubSub node, used to identify it on a JID.
18 NodeName
19);
20
21generate_id!(
22 /// The identifier of an item, which is unique per node.
23 ItemId
24);
25
26generate_id!(
27 /// The identifier of a subscription to a PubSub node.
28 SubscriptionId
29);
30
31generate_attribute!(
32 /// The state of a subscription to a node.
33 Subscription, "subscription", {
34 /// The user is not subscribed to this node.
35 None => "none",
36
37 /// The user’s subscription to this node is still pending.
38 Pending => "pending",
39
40 /// The user is subscribed to this node.
41 Subscribed => "subscribed",
42
43 /// The user’s subscription to this node will only be valid once
44 /// configured.
45 Unconfigured => "unconfigured",
46 }, Default = None
47);