Move some IQ declaration in their own files

This commit is contained in:
Mickael Remond
2019-06-27 10:22:36 +02:00
parent 0c7e4588c6
commit cb9016693c
5 changed files with 100 additions and 76 deletions
+25
View File
@@ -0,0 +1,25 @@
package stanza
import "encoding/xml"
// ============================================================================
// Software Version (XEP-0092)
// Version
type Version struct {
XMLName xml.Name `xml:"jabber:iq:version query"`
Name string `xml:"name,omitempty"`
Version string `xml:"version,omitempty"`
OS string `xml:"os,omitempty"`
}
func (v *Version) Namespace() string {
return v.XMLName.Space
}
// ============================================================================
// Registry init
func init() {
TypeRegistry.MapExtension(PKTIQ, xml.Name{"jabber:iq:version", "query"}, Version{})
}