##############################################################################
#
# Copyright (c) 2002 Ingeniweb SARL
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################

"""
ZAttachmentAttribute product
"""


from config import *
import os
import string

from Products.ZAttachmentAttribute import ZAttachmentAttribute
from Products.ZAttachmentAttribute import ZAttachmentRegistry
from Products.ZAttachmentAttribute import ZAbstractAttachment
from Products.ZAttachmentAttribute.Log import *

class AudioAttachment(ZAbstractAttachment.ZAbstractAttachment):
    """
    Image file abstraction
    """
    
    icon_file = "audio.gif"
    small_icon_file = "audio_small.gif"
    content_types = ('audio/mpeg', 'audio/x-wav', )
    index_list = ()


    def indexAttachment(self):
        """
        indexAttachment(self) => nothing
        No indexing is done on audio files
        """
        raise RuntimeError, "Unable to index this"


    def isPreviewAvailable(self,):
        return 0


    def convertPreview(self,):
        return None


ZAttachmentRegistry.AttachmentRegistry.registerClass(AudioAttachment, globals())

