iq: Implement the Iq*Payload traits on every possible payload.
This commit is contained in:
parent
d5f88d2636
commit
412eafb363
11 changed files with 64 additions and 0 deletions
|
|
@ -12,9 +12,12 @@ use minidom::Element;
|
|||
use error::Error;
|
||||
|
||||
use ns;
|
||||
use iq::{IqGetPayload, IqSetPayload, IqResultPayload};
|
||||
|
||||
generate_empty_element!(BlocklistRequest, "blocklist", BLOCKING);
|
||||
|
||||
impl IqGetPayload for BlocklistRequest {}
|
||||
|
||||
macro_rules! generate_blocking_element {
|
||||
($elem:ident, $name:tt) => (
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
@ -59,6 +62,10 @@ generate_blocking_element!(BlocklistResult, "blocklist");
|
|||
generate_blocking_element!(Block, "block");
|
||||
generate_blocking_element!(Unblock, "unblock");
|
||||
|
||||
impl IqResultPayload for BlocklistResult {}
|
||||
impl IqSetPayload for Block {}
|
||||
impl IqSetPayload for Unblock {}
|
||||
|
||||
generate_empty_element!(Blocked, "blocked", BLOCKING_ERRORS);
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue