2018-02-14 18:49:26 +01:00
|
|
|
package xmppiq
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/xml"
|
|
|
|
|
|
|
|
"dev.sum7.eu/genofire/yaja/xmpp/base"
|
|
|
|
)
|
|
|
|
|
2018-02-15 20:56:04 +01:00
|
|
|
// DiscoQueryInfo implements XEP 0030: Service Discovery - 11.1 disco#info
|
|
|
|
type DiscoQueryInfo struct {
|
2018-02-14 18:49:26 +01:00
|
|
|
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"`
|
2018-02-15 20:56:04 +01:00
|
|
|
Identities []*DiscoIdentity
|
|
|
|
Features []*DiscoFeature
|
2018-02-14 18:49:26 +01:00
|
|
|
}
|
|
|
|
|
2018-02-15 20:56:04 +01:00
|
|
|
// DiscoIdentity implements XEP 0030: Service Discovery - 11.1 disco#info
|
|
|
|
type DiscoIdentity struct {
|
2018-02-14 18:49:26 +01:00
|
|
|
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"`
|
2018-02-14 18:49:26 +01:00
|
|
|
Type string `xml:"type"` //required
|
|
|
|
}
|
|
|
|
|
2018-02-15 20:56:04 +01:00
|
|
|
// DiscoFeature implements XEP 0030: Service Discovery - 11.1 disco#info
|
|
|
|
type DiscoFeature struct {
|
2018-02-14 18:49:26 +01:00
|
|
|
XMLName xml.Name `xml:"http://jabber.org/protocol/disco#info feature"`
|
|
|
|
Var string `xml:"var"` //required
|
|
|
|
}
|
|
|
|
|
2018-02-15 20:56:04 +01:00
|
|
|
// DiscoQueryItem implements XEP 0030: Service Discovery - 11.2 disco#items
|
|
|
|
type DiscoQueryItem struct {
|
2018-02-14 18:49:26 +01:00
|
|
|
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"`
|
2018-02-15 20:56:04 +01:00
|
|
|
Items []*DiscoItem
|
2018-02-14 18:49:26 +01:00
|
|
|
}
|
|
|
|
|
2018-02-15 20:56:04 +01:00
|
|
|
// DiscoItem implements XEP 0030: Service Discovery - 11.2 disco#items
|
|
|
|
type DiscoItem struct {
|
2018-02-14 18:49:26 +01:00
|
|
|
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"`
|
2018-02-14 18:49:26 +01:00
|
|
|
}
|