Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2019-02-01 20:05:33 +0300
committerPhilipp Hörist <philipp@hoerist.com>2019-02-01 20:07:48 +0300
commitb1cb29c0f415234f42971e722d639cc2ff409939 (patch)
treedbf8dd43589b3bbd6845221b9f8ce2b54622b873 /nbxmpp/structs.py
parenta1f0d26a1a7357c7db66ea88cf86bd9d7c1a1eb8 (diff)
Add UserTune (XEP-0118) module
Diffstat (limited to 'nbxmpp/structs.py')
-rw-r--r--nbxmpp/structs.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/nbxmpp/structs.py b/nbxmpp/structs.py
index d4a5c1d..73aaae5 100644
--- a/nbxmpp/structs.py
+++ b/nbxmpp/structs.py
@@ -65,6 +65,22 @@ MoodData = namedtuple('MoodData', 'mood text')
ActivityData = namedtuple('ActivityData', 'activity subactivity text')
+class TuneData(namedtuple('TuneData', 'artist length rating source title track uri')):
+
+ __slots__ = []
+
+ def __new__(cls, artist=None, length=None, rating=None, source=None,
+ title=None, track=None, uri=None):
+ return super(TuneData, cls).__new__(cls, artist, length, rating,
+ source, title, track, uri)
+
+ @property
+ def was_removed(self):
+ return (self.artist is None and
+ self.title is None and
+ self.track is None)
+
+
class MAMData(namedtuple('MAMData', 'id query_id archive namespace timestamp')):
__slots__ = []