Refactor IQ handling and merge payload iq struct fields for supported XEPs

This commit is contained in:
Mickael Remond
2016-02-15 15:22:51 +01:00
parent 3a516a43d3
commit 268acbff07
4 changed files with 83 additions and 8 deletions

View File

@@ -2,16 +2,24 @@ package iot
import "encoding/xml"
/*
type Control struct {
ControlSet ControlSet `xml:",omitempty"`
ControlGetForm ControlGetForm `xml:",omitempty"`
}
func (*Control) IQPayload() {
}
*/
type ControlSet struct {
XMLName xml.Name `xml:"urn:xmpp:iot:control set"`
Fields []ControlField `xml:",any"`
}
func (*ControlSet) IsIQPayload() {
}
type ControlGetForm struct {
XMLName xml.Name `xml:"urn:xmpp:iot:control getForm"`
}