pubsub: Move Subscription to the module.

This commit is contained in:
Emmanuel Gil Peyrot 2018-05-14 21:02:22 +02:00
parent 688ae145be
commit d2dc77e4a3
2 changed files with 8 additions and 8 deletions

View file

@ -16,7 +16,7 @@ use ns;
use data_forms::DataForm; use data_forms::DataForm;
use pubsub::{NodeName, ItemId, SubscriptionId}; use pubsub::{NodeName, ItemId, Subscription, SubscriptionId};
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct Item { pub struct Item {
@ -58,13 +58,6 @@ impl From<Item> for Element {
} }
} }
generate_attribute!(Subscription, "subscription", {
None => "none",
Pending => "pending",
Subscribed => "subscribed",
Unconfigured => "unconfigured",
}, Default = None);
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub enum PubSubEvent { pub enum PubSubEvent {
/* /*

View file

@ -11,3 +11,10 @@ pub use self::event::PubSubEvent;
generate_id!(NodeName); generate_id!(NodeName);
generate_id!(ItemId); generate_id!(ItemId);
generate_id!(SubscriptionId); generate_id!(SubscriptionId);
generate_attribute!(Subscription, "subscription", {
None => "none",
Pending => "pending",
Subscribed => "subscribed",
Unconfigured => "unconfigured",
}, Default = None);