equal
deleted
inserted
replaced
53 var _ xml.Marshaler = &errText{} |
53 var _ xml.Marshaler = &errText{} |
54 |
54 |
55 type Features struct { |
55 type Features struct { |
56 Starttls *starttls |
56 Starttls *starttls |
57 Mechanisms mechs |
57 Mechanisms mechs |
58 Bind *Generic |
58 Bind *bindIq |
59 Session *Generic |
59 Session *Generic |
60 Any *Generic |
60 Any *Generic |
61 } |
61 } |
62 |
62 |
63 type starttls struct { |
63 type starttls struct { |
161 Any *Generic |
161 Any *Generic |
162 } |
162 } |
163 var _ xml.Marshaler = &Error{} |
163 var _ xml.Marshaler = &Error{} |
164 var _ os.Error = &Error{} |
164 var _ os.Error = &Error{} |
165 |
165 |
|
166 // Used for resource binding as a nested element inside <iq/>. |
|
167 type bindIq struct { |
|
168 XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-bind bind"` |
|
169 Resource *string `xml:"resource"` |
|
170 Jid *string `xml:"jid"` |
|
171 } |
|
172 |
166 // Holds an XML element not described by the more specific types. |
173 // Holds an XML element not described by the more specific types. |
167 type Generic struct { |
174 type Generic struct { |
168 XMLName xml.Name |
175 XMLName xml.Name |
169 Any *Generic |
176 Any *Generic |
170 Chardata string `xml:"chardata"` |
177 Chardata string `xml:"chardata"` |
536 if err != nil { |
543 if err != nil { |
537 return nil, err |
544 return nil, err |
538 } |
545 } |
539 return stan, nil |
546 return stan, nil |
540 } |
547 } |
|
548 |
|
549 func newBind(name *xml.Name) interface{} { |
|
550 return &bindIq{} |
|
551 } |