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 Permalink Normal View History

package xmppiq
import (
"encoding/xml"
"dev.sum7.eu/genofire/yaja/xmpp/base"
)
2018-02-22 03:12:07 +01:00
// DiscoQueryInfo implements XEP-0030: Service Discovery - 11.1 disco#info
type DiscoQueryInfo struct {
XMLName xml.Name `xml:"http://jabber.org/protocol/disco#info query"`
2018-02-16 08:29:35 +01:00
Node string `xml:"node,attr,omitempty"`
Identities []*DiscoIdentity
Features []*DiscoFeature
}
2018-02-22 03:12:07 +01:00
// 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
2018-02-16 08:29:35 +01:00
Name string `xml:"name,omitempty"`
Type string `xml:"type"` //required
}
2018-02-22 03:12:07 +01:00
// 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
}
2018-02-22 03:12:07 +01:00
// DiscoQueryItem implements XEP-0030: Service Discovery - 11.2 disco#items
type DiscoQueryItem struct {
XMLName xml.Name `xml:"http://jabber.org/protocol/disco#items query"`
2018-02-16 08:29:35 +01:00
Node string `xml:"node,attr,omitempty"`
Items []*DiscoItem
}
2018-02-22 03:12:07 +01:00
// 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"`
2018-02-16 08:29:35 +01:00
Node string `xml:"node,omitempty"`
Name string `xml:"name,omitempty"`
}