blob: 1405614f7946edb12b8953246390d5eb8966c37e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
package xmpp
import (
"encoding/xml"
)
type DiscoQuery struct {
XMLName xml.Name `xml:"http://jabber.org/protocol/disco#items query"`
Items []Node `xml:"item"`
}
type Node struct {
XMLName xml.Name `xml:"item"`
Jid string `xml:"jid,attr"`
Node string `xml:"node,attr"`
}
type PubSub struct {
XMLName xml.Name `xml:"http://jabber.org/protocol/pubsub pubsub"`
Subscribe []Subscribe `xml:"subscribe"`
Subscription []Subscription `xml:"subscription"`
Subscriptions []Subscription `xml:"subscriptions"`
Publish *Publish `xml:"publish"`
}
type Subscribe struct {
XMLName xml.Name `xml:"subscribe"`
Jid string `xml:"jid,attr"`
Node string `xml:"node,attr"`
}
type Subscription struct {
XMLName xml.Name `xml:"subscription"`
Jid string `xml:"jid,attr"`
Node string `xml:"node,attr"`
SubID string `xml:"subid,attr"`
Subscription string `xml:"subscription,attr"`
}
type Publish struct {
XMLName xml.Name `xml:"publish"`
Node string `xml:"node,attr"`
Item []Item `xml:"item"`
Items []Item `xml:"items"`
}
type Item struct {
XMLName xml.Name `xml:"publish"`
Id string `xml:"id,attr"`
Data string `xml:",innerxml"`
}
|