ext: Add get_command and mopidy.backends.base.Command
This commit is contained in:
parent
c0f1a1352b
commit
da4cfebe05
@ -2,6 +2,8 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
|
from mopidy.utils import command
|
||||||
|
|
||||||
|
|
||||||
class Backend(object):
|
class Backend(object):
|
||||||
#: Actor proxy to an instance of :class:`mopidy.audio.Audio`.
|
#: Actor proxy to an instance of :class:`mopidy.audio.Audio`.
|
||||||
@ -281,6 +283,12 @@ class BasePlaylistsProvider(object):
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
|
# Re-exporting from this location for backends.
|
||||||
|
class Command(command.Command):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: remove
|
||||||
class BaseSubCommandProvider(object):
|
class BaseSubCommandProvider(object):
|
||||||
"""Sub-classes may optionally add arguments to the passed in parser.
|
"""Sub-classes may optionally add arguments to the passed in parser.
|
||||||
|
|
||||||
|
|||||||
@ -87,14 +87,18 @@ class Extension(object):
|
|||||||
"""
|
"""
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def get_sub_commands(self):
|
def get_sub_commads(self):
|
||||||
"""List of sub-command classes
|
# TODO: remove
|
||||||
|
|
||||||
:returns: list of
|
|
||||||
:class:`~mopidy.backends.base.BaseSubCommandProvider` subclasses
|
|
||||||
"""
|
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
def get_command(self):
|
||||||
|
"""Command to expose to command line users running mopidy.
|
||||||
|
|
||||||
|
:returns:
|
||||||
|
:class:`~mopidy.backends.base.Command` instance
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
def register_gstreamer_elements(self):
|
def register_gstreamer_elements(self):
|
||||||
"""Hook for registering custom GStreamer elements
|
"""Hook for registering custom GStreamer elements
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user