Bump to 1.0.6
[watersofshiloah] / src / stream_null.py
1 #!/usr/bin/env python
2
3 from __future__ import with_statement
4 from __future__ import division
5
6 import gobject
7 import logging
8
9
10 _moduleLogger = logging.getLogger(__name__)
11
12
13 class Stream(gobject.GObject):
14
15         STATE_PLAY = "play"
16         STATE_PAUSE = "pause"
17         STATE_STOP = "stop"
18
19         __gsignals__ = {
20                 'state-change' : (
21                         gobject.SIGNAL_RUN_LAST,
22                         gobject.TYPE_NONE,
23                         (gobject.TYPE_STRING, ),
24                 ),
25                 'eof' : (
26                         gobject.SIGNAL_RUN_LAST,
27                         gobject.TYPE_NONE,
28                         (gobject.TYPE_STRING, ),
29                 ),
30                 'error' : (
31                         gobject.SIGNAL_RUN_LAST,
32                         gobject.TYPE_NONE,
33                         (gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT),
34                 ),
35         }
36
37         def __init__(self):
38                 gobject.GObject.__init__(self)
39
40         @property
41         def playing(self):
42                 return False
43
44         @property
45         def has_file(self):
46                 return False
47
48         @property
49         def state(self):
50                 return self.STATE_STOP
51
52         def set_file(self, uri):
53                 self.emit("error", "Audio not supported on this platform", "")
54
55         def play(self):
56                 self.emit("error", "Audio not supported on this platform", "")
57
58         def pause(self):
59                 self.emit("error", "Audio not supported on this platform", "")
60
61         def stop(self):
62                 self.emit("error", "Audio not supported on this platform", "")
63
64         @property
65         def elapsed(self):
66                 return 0
67
68         @property
69         def duration(self):
70                 return 0
71
72         def seek_time(self, ns):
73                 self.emit("error", "Audio not supported on this platform", "")
74
75
76 if __name__ == "__main__":
77         pass
78