Add preliminary support for IoT control (XEP-0325)

This commit is contained in:
Mickael Remond
2016-02-15 11:08:54 +01:00
parent adcd2bd467
commit 3a516a43d3
5 changed files with 37 additions and 6 deletions

23
xmpp/iot/control.go Normal file
View File

@@ -0,0 +1,23 @@
package iot
import "encoding/xml"
type Control struct {
ControlSet ControlSet `xml:",omitempty"`
ControlGetForm ControlGetForm `xml:",omitempty"`
}
type ControlSet struct {
XMLName xml.Name `xml:"urn:xmpp:iot:control set"`
Fields []ControlField `xml:",any"`
}
type ControlGetForm struct {
XMLName xml.Name `xml:"urn:xmpp:iot:control getForm"`
}
type ControlField struct {
XMLName xml.Name
Name string `xml:"name,attr,omitempty"`
Value string `xml:"value,attr,omitempty"`
}