xmpp-rs/src/pubsub/mod.rs
2018-08-08 18:48:05 +02:00

47 lines
1.3 KiB
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright (c) 2017 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
/// The `http://jabber.org/protocol/pubsub#event` protocol.
pub mod event;
/// The `http://jabber.org/protocol/pubsub` protocol.
pub mod pubsub;
pub use self::event::PubSubEvent;
pub use self::pubsub::PubSub;
generate_id!(
/// The name of a PubSub node, used to identify it on a JID.
NodeName
);
generate_id!(
/// The identifier of an item, which is unique per node.
ItemId
);
generate_id!(
/// The identifier of a subscription to a PubSub node.
SubscriptionId
);
generate_attribute!(
/// The state of a subscription to a node.
Subscription, "subscription", {
/// The user is not subscribed to this node.
None => "none",
/// The users subscription to this node is still pending.
Pending => "pending",
/// The user is subscribed to this node.
Subscribed => "subscribed",
/// The users subscription to this node will only be valid once
/// configured.
Unconfigured => "unconfigured",
}, Default = None
);