# -*- coding: utf-8 -*-
# Elisa - Home multimedia server
# Copyright (C) 2006-2008 Fluendo Embedded S.L. (www.fluendo.com).
# All rights reserved.
#
# This file is available under one of two license agreements.
#
# This file is licensed under the GPL version 3.
# See "LICENSE.GPL" in the root of this distribution including a special
# exception to use Elisa with Fluendo's plugins.
#
# The GPL part of Elisa is also available under a commercial licensing
# agreement from Fluendo.
# See "LICENSE.Elisa" in the root directory of this distribution package
# for details on that license.


__maintainer__ = 'Lionel Martin <lionel@fluendo.com>'


from elisa.core.component import Component

#
# Review by Benjamin Kampmann ( 24/08/2007):
# Why is this for supported_file_types while all other are always (beside
# the metadata) for uri.schemes?
#
# That is not very consistent and does not make much sense: an action maybe
# able to download a http-image but not a flickr-uri-based one. but both are
# for the same file-type.
#
# FIXME: we need to define WHAT an Action is !!!!!


class Action(Component):
    """
    DOCME

    @ivar supported_file_types: DOCME
    @type supported_file_types: tuple of strings
    @cvar label:                DOCME
    @type label:                string
    """

    # Action label
    label='action'
    # Tuple of supported media
    # 'directory', 'image', 'audio', 'video'
    supported_file_types=()

    def __call__(self, controller, origin):
        """
        DOCME

        @param origin: the origin of the event in Elisa world
                       can be frontend, backend or None
        @type origin: L{elisa.core.backend.Backend} or L{elisa.core.frontend.Frontend} or None
        """
        # Call is always without parameter
        pass
