Remove lifetime methods from output API

This commit is contained in:
Stein Magnus Jodal 2011-03-07 21:35:14 +01:00
parent 4749e77f1d
commit 9dafc6ebe9
2 changed files with 0 additions and 45 deletions

View File

@ -3,33 +3,6 @@ class BaseOutput(object):
Base class for audio outputs.
"""
def __init__(self, core_queue):
self.core_queue = core_queue
def start(self):
"""
Start the output.
*MAY be implemented by subclasses.*
"""
pass
def destroy(self):
"""
Destroy the output.
*MAY be implemented by subclasses.*
"""
pass
def process_message(self, message):
"""
Process messages with the output as destination.
*MUST be implemented by subclass.*
"""
raise NotImplementedError
def play_uri(self, uri):
"""
Play URI.

View File

@ -8,15 +8,6 @@ class DummyOutput(BaseOutput):
# pylint: disable = R0902
# Too many instance attributes (9/7)
#: For testing. :class:`True` if :meth:`start` has been called.
start_called = False
#: For testing. :class:`True` if :meth:`destroy` has been called.
destroy_called = False
#: For testing. Contains all messages :meth:`process_message` has received.
messages = []
#: For testing. Contains the last URI passed to :meth:`play_uri`.
uri = None
@ -40,15 +31,6 @@ class DummyOutput(BaseOutput):
#: For testing. Contains the current volume.
volume = 100
def start(self):
self.start_called = True
def destroy(self):
self.destroy_called = True
def process_message(self, message):
self.messages.append(message)
def play_uri(self, uri):
self.uri = uri
return True