mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-26 20:32:02 -08:00
b05e68c844
- Using the router, the dispatch is not done anymore by receiving from receive channel, but by registering callback functions in routers, with matchers. - Make IQPayload a real interface to make it easier to match namespaces. - The StreamManager Run command is now blocking, waiting for StreamManager to terminate.
34 lines
665 B
Go
34 lines
665 B
Go
package xmpp // import "gosrc.io/xmpp"
|
|
|
|
import (
|
|
"encoding/xml"
|
|
)
|
|
|
|
type ControlSet struct {
|
|
XMLName xml.Name `xml:"urn:xmpp:iot:control set"`
|
|
Fields []ControlField `xml:",any"`
|
|
}
|
|
|
|
func (c *ControlSet) Namespace() string {
|
|
return c.XMLName.Space
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
type ControlSetResponse struct {
|
|
IQPayload
|
|
XMLName xml.Name `xml:"urn:xmpp:iot:control setResponse"`
|
|
}
|
|
|
|
func (c *ControlSetResponse) Namespace() string {
|
|
return c.XMLName.Space
|
|
}
|