# command.py - Command base class
#
# Copyright 2007 Nokia
# Author: Daniel d'Andrada T. de Carvalho <daniel.carvalho@indt.org.br>
#
# This file is part of mediahandler-skeleton.
#
# mediahandler-skeleton is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# mediahandler-skeleton is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with mediahandler-proxy. If not, see <http://www.gnu.org/licenses/>.

class Command():
    '''Abstract class of a media handler command.'''

    def __init__(self, name):
        self.name = name

    def parse(self, string):
        '''Parse a string containing the command parameters.

        Returns True on success and False otherwise.'''
        raise NotImplemented

    def execute(self):
        '''Execute the command.

        Returns a string with the command result.'''
        raise NotImplemented
