photosgallery/collectionframework/thumbnailcreator/inc/glxtnimagedecoderfactory.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Definition of GlxtnImageDecoderFactory
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef GLXTNIMAGEDECODERFACTORY_H
       
    22 #define GLXTNIMAGEDECODERFACTORY_H
       
    23 
       
    24 #include <e32std.h>
       
    25 
       
    26 class CImageDecoder;
       
    27 class RFs;
       
    28 
       
    29 /**
       
    30  * Factory to create appropriate decoder for a given image.
       
    31  *
       
    32  * @author Dan Rhodes
       
    33  * @ingroup glx_thumbnail_creator
       
    34  */
       
    35 class GlxtnImageDecoderFactory
       
    36     {
       
    37 public:
       
    38     /**
       
    39     * Create a decoder for an image file.  If the file is a JPEG, the function
       
    40     * will first try to create a hardware decoder.  If that fails a software
       
    41     * decoder will be created.
       
    42     * @param aFs File server session.
       
    43     * @param aFilename Full path of the file.
       
    44     * @return Pointer to image decoder (caller takes ownership).
       
    45     */
       
    46     static CImageDecoder* NewL( RFs& aFs, const TDesC& aFilename );
       
    47     /**
       
    48     * Create a decoder for JPEG image data.
       
    49     * @param aFs File server session.
       
    50     * @param aData Buffer containing the image to be decoded.
       
    51     * @return Pointer to image decoder (caller takes ownership).
       
    52     */
       
    53     static CImageDecoder* NewL( RFs& aFs, const TDesC8& aData );
       
    54     /**
       
    55         * Create a decoder for an image file.  If the file is a JPEG, the function
       
    56         * will first try to create a hardware decoder.  If that fails a software
       
    57         * decoder will be created.It also returns the type of decoder used
       
    58         * @param aFs File server session.
       
    59         * @param aFilename Full path of the file.
       
    60         * @param 
       
    61         * @return Pointer to image decoder (caller takes ownership).
       
    62         */
       
    63     static CImageDecoder* NewL( RFs& aFs, const TDesC& aFilename, TBool& aDecoderType );
       
    64     };
       
    65 
       
    66 #endif  // GLXTNIMAGEDECODERFACTORY_H