73 } |
73 } |
74 |
74 |
75 // One of the three core XMPP stanza types: iq, message, presence. See |
75 // One of the three core XMPP stanza types: iq, message, presence. See |
76 // RFC3920, section 9. |
76 // RFC3920, section 9. |
77 type Header struct { |
77 type Header struct { |
78 To string `xml:"to,attr,omitempty"` |
78 To JID `xml:"to,attr,omitempty"` |
79 From string `xml:"from,attr,omitempty"` |
79 From JID `xml:"from,attr,omitempty"` |
80 Id string `xml:"id,attr,omitempty"` |
80 Id string `xml:"id,attr,omitempty"` |
81 Type string `xml:"type,attr,omitempty"` |
81 Type string `xml:"type,attr,omitempty"` |
82 Lang string `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty"` |
82 Lang string `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty"` |
83 Innerxml string `xml:",innerxml"` |
83 Innerxml string `xml:",innerxml"` |
84 Error *Error |
84 Error *Error |
128 |
128 |
129 // Used for resource binding as a nested element inside <iq/>. |
129 // Used for resource binding as a nested element inside <iq/>. |
130 type bindIq struct { |
130 type bindIq struct { |
131 XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-bind bind"` |
131 XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-bind bind"` |
132 Resource *string `xml:"resource"` |
132 Resource *string `xml:"resource"` |
133 Jid *string `xml:"jid"` |
133 Jid *JID `xml:"jid"` |
134 } |
134 } |
135 |
135 |
136 // Holds human-readable text, with an optional language |
136 // Holds human-readable text, with an optional language |
137 // specification. Generally multiple instances of these can be found |
137 // specification. Generally multiple instances of these can be found |
138 // together, allowing the software to choose which language to present |
138 // together, allowing the software to choose which language to present |