2019-06-26 08:14:52 -07:00
|
|
|
package stanza
|
2019-06-17 02:59:39 -07:00
|
|
|
|
2016-02-17 06:35:24 -08:00
|
|
|
import (
|
|
|
|
"encoding/xml"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Tune struct {
|
|
|
|
XMLName xml.Name `xml:"http://jabber.org/protocol/tune tune"`
|
|
|
|
Artist string `xml:"artist,omitempty"`
|
|
|
|
Length int `xml:"length,omitempty"`
|
|
|
|
Rating int `xml:"rating,omitempty"`
|
|
|
|
Source string `xml:"source,omitempty"`
|
|
|
|
Title string `xml:"title,omitempty"`
|
|
|
|
Track string `xml:"track,omitempty"`
|
|
|
|
Uri string `xml:"uri,omitempty"`
|
|
|
|
}
|
|
|
|
|
2020-01-09 06:33:11 -08:00
|
|
|
// Mood defines data model for XEP-0107 - User Mood
|
2019-06-18 00:58:43 -07:00
|
|
|
// See: https://xmpp.org/extensions/xep-0107.html
|
2019-06-17 02:59:39 -07:00
|
|
|
type Mood struct {
|
2019-06-18 00:58:43 -07:00
|
|
|
MsgExtension // Mood can be added as a message extension
|
|
|
|
XMLName xml.Name `xml:"http://jabber.org/protocol/mood mood"`
|
|
|
|
// TODO: Custom parsing to extract mood type from tag name.
|
|
|
|
// Note: the list is predefined.
|
2019-06-17 02:59:39 -07:00
|
|
|
// Mood type
|
|
|
|
Text string `xml:"text,omitempty"`
|
2016-02-17 06:35:24 -08:00
|
|
|
}
|