sum7
/
yaja
Archived
1
0
Fork 0
This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
yaja/xmpp/iq/service_discovery.go

45 lines
1.4 KiB
Go
Raw Normal View History

package xmppiq
import (
"encoding/xml"
"dev.sum7.eu/genofire/yaja/xmpp/base"
)
// DiscoQueryInfo implements XEP 0030: Service Discovery - 11.1 disco#info
type DiscoQueryInfo struct {
XMLName xml.Name `xml:"http://jabber.org/protocol/disco#info query"`
Node *string `xml:"node,attr"`
Identities []*DiscoIdentity
Features []*DiscoFeature
}
// DiscoIdentity implements XEP 0030: Service Discovery - 11.1 disco#info
type DiscoIdentity struct {
XMLName xml.Name `xml:"http://jabber.org/protocol/disco#info identity"`
Category string `xml:"category"` //required
Name *string `xml:"name"`
Type string `xml:"type"` //required
}
// DiscoFeature implements XEP 0030: Service Discovery - 11.1 disco#info
type DiscoFeature struct {
XMLName xml.Name `xml:"http://jabber.org/protocol/disco#info feature"`
Var string `xml:"var"` //required
}
// DiscoQueryItem implements XEP 0030: Service Discovery - 11.2 disco#items
type DiscoQueryItem struct {
XMLName xml.Name `xml:"http://jabber.org/protocol/disco#items query"`
Node *string `xml:"node,attr"`
Items []*DiscoItem
}
// DiscoItem implements XEP 0030: Service Discovery - 11.2 disco#items
type DiscoItem struct {
XMLName xml.Name `xml:"http://jabber.org/protocol/disco#items item"`
JID *xmppbase.JID `xml:"jid"`
Node *string `xml:"node"`
Name *string `xml:"name"`
}