mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-10-24 13:35:34 -07:00
Add preliminary support for IoT control (XEP-0325)
This commit is contained in:
23
xmpp/iot/control.go
Normal file
23
xmpp/iot/control.go
Normal 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user