forked from chteufleur/go-xmpp
Add XEP-0092 (Software version)
This commit is contained in:
parent
f7b1e7ecb2
commit
e82f10fe48
|
|
@ -39,7 +39,7 @@ type DiscoFeature struct {
|
|||
// Iq get/result payload for "items" requests.
|
||||
type DiscoItems struct {
|
||||
XMLName xml.Name `xml:"http://jabber.org/protocol/disco#items query"`
|
||||
Node string `xml:"node,attr"`
|
||||
Node string `xml:"node,attr"`
|
||||
Item []DiscoItem `xml:"item"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package xmpp
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
)
|
||||
|
||||
const (
|
||||
NsJabberClient = "jabber:iq:version"
|
||||
)
|
||||
|
||||
// XEP-0092 Software Version
|
||||
type SoftwareVersion struct {
|
||||
XMLName xml.Name `xml:"jabber:iq:version query"`
|
||||
Name string `xml:"name,omitempty"`
|
||||
Version string `xml:"version,omitempty"`
|
||||
OS string `xml:"os,omitempty"`
|
||||
}
|
||||
|
|
@ -6,7 +6,6 @@ import (
|
|||
"fmt"
|
||||
)
|
||||
|
||||
|
||||
const (
|
||||
IqTypeGet = "get"
|
||||
IqTypeSet = "set"
|
||||
|
|
@ -14,7 +13,6 @@ const (
|
|||
IqTypeError = "error"
|
||||
)
|
||||
|
||||
|
||||
// XMPP <iq/> stanza.
|
||||
type Iq struct {
|
||||
XMLName xml.Name `xml:"iq"`
|
||||
|
|
@ -81,10 +79,10 @@ type Presence struct {
|
|||
Type string `xml:"type,attr,omitempty"`
|
||||
To string `xml:"to,attr,omitempty"`
|
||||
From string `xml:"from,attr,omitempty"`
|
||||
Show string `xml:"show"` // away, chat, dnd, xa
|
||||
Status string `xml:"status"` // sb []clientText
|
||||
Photo string `xml:"photo,omitempty"` // Avatar
|
||||
Nick string `xml:"nick,omitempty"` // Nickname
|
||||
Show string `xml:"show"` // away, chat, dnd, xa
|
||||
Status string `xml:"status"` // sb []clientText
|
||||
Photo string `xml:"photo,omitempty"` // Avatar
|
||||
Nick string `xml:"nick,omitempty"` // Nickname
|
||||
}
|
||||
|
||||
// XMPP <error/>. May occur as a top-level stanza or embedded in another
|
||||
|
|
|
|||
Loading…
Reference in New Issue