imagehandlingutilities/thumbnailmanager/plugins/audio/inc/thumbnailaudioprovider.h
changeset 0 2014ca87e772
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/imagehandlingutilities/thumbnailmanager/plugins/audio/inc/thumbnailaudioprovider.h	Tue Jan 26 15:18:05 2010 +0200
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Image thumbnail provider plugin.
+ *
+*/
+
+
+#ifndef THUMBNAILAUDIOPROVIDER_H
+#define THUMBNAILAUDIOPROVIDER_H
+
+#include "thumbnailprovider.h"
+
+class CThumbnailImageDecoderv3;
+
+/**
+ *  Image thumbnail provider plugin.
+ *
+ *  @since S60 v5.0
+ */
+class CThumbnailAudioProvider: public CThumbnailProvider
+    {
+
+public:
+
+    /**
+     * Two-phased constructor.
+     *
+     * @since S60 v5.0
+     * @return New image thumbnail provider instance.
+     */
+    static CThumbnailAudioProvider* NewL();
+
+    /**
+     * Destructor
+     *
+     * @since S60 v5.0
+     */
+    virtual ~CThumbnailAudioProvider();
+
+    /**
+     * Function that will provide thumbnail from given parameters.
+     *
+     * @since S60 v5.0
+     * @param aFs File server session
+     * @param aFile Source image file.
+     * @param aMimeType MIME-type of the image file.
+     * @param aFlags Flags for thumbnail creation.
+     * @param aDisplayMode Used display mode.
+     */
+    void GetThumbnailL( RFs& aFs, RFile64& aFile, const TDataType& aMimeType,
+        const CThumbnailManager::TThumbnailFlags aFlags, const TDisplayMode
+        aDisplayMode, const CThumbnailManager::TThumbnailQualityPreference aQualityPreference );
+    
+    /**
+     * Function that will provide thumbnail from given parameters.
+     *
+     * @since S60 v5.0
+     * @param aFs File server session
+     * @param aBuffer Source image buffer.
+     * @param aMimeType MIME-type of the image file.
+     * @param aFlags Flags for thumbnail creation.
+     * @param aDisplayMode Used display mode.
+     */    
+    void GetThumbnailL( RFs& aFs, TDesC8* aBuffer, const
+        TDataType& aMimeType, const CThumbnailManager::TThumbnailFlags aFlags,
+        const TDisplayMode aDisplayMode, const CThumbnailManager::TThumbnailQualityPreference aQualityPreference );
+    
+    /**
+     * Function that will provide thumbnail from given parameters.
+     *
+     * @since S60 v5.0
+     * @param aFs File server session
+     * @param aBuffer Source image buffer.
+     */ 
+    void GetThumbnailL( RFs& aFs, TDesC8& aBuffer);
+
+    /**
+     * Cancel a previous thumbnail request, if any.
+     *
+     * @since S60 5.0
+     */
+    void CancelGetThumbnail();
+
+private:
+
+    /**
+     * C++ default constructor
+     *
+     * @since S60 v5.0
+     * @return New image thumbnail provider instance.
+     */
+    CThumbnailAudioProvider();
+
+private:
+
+    /**
+     * Thumbnail decoder.
+     */
+    CThumbnailImageDecoderv3* iImageDecoderv3;
+
+    
+   /**
+     * File server session.
+     * Not own.
+     */
+    RFs iFs;
+
+    /**
+     * Mime-type of image
+     */
+    TDataType iMimeType;
+};
+
+#include "thumbnailprovider.inl"
+
+#endif // THUMBNAILIMAGEPROVIDER_H