imagehandlingutilities/thumbnailmanager/plugins/image/inc/thumbnailimageprovider.h
changeset 0 2014ca87e772
equal deleted inserted replaced
-1:000000000000 0:2014ca87e772
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:  Image thumbnail provider plugin.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef THUMBNAILIMAGEPROVIDER_H
       
    20 #define THUMBNAILIMAGEPROVIDER_H
       
    21 
       
    22 #include "thumbnailprovider.h"
       
    23 
       
    24 class CThumbnailImageDecoder;
       
    25 class CThumbnailImageDecoderv2;
       
    26 
       
    27 /**
       
    28  *  Image thumbnail provider plugin.
       
    29  *
       
    30  *  @since S60 v5.0
       
    31  */
       
    32 class CThumbnailImageProvider: public CThumbnailProvider
       
    33     {
       
    34 
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Two-phased constructor.
       
    39      *
       
    40      * @since S60 v5.0
       
    41      * @return New image thumbnail provider instance.
       
    42      */
       
    43     static CThumbnailImageProvider* NewL();
       
    44 
       
    45     /**
       
    46      * Destructor
       
    47      *
       
    48      * @since S60 v5.0
       
    49      */
       
    50     virtual ~CThumbnailImageProvider();
       
    51 
       
    52     /**
       
    53      * Function that will provide thumbnail from given parameters.
       
    54      *
       
    55      * @since S60 v5.0
       
    56      * @param aFs File server session
       
    57      * @param aFile Source image file.
       
    58      * @param aMimeType MIME-type of the image file.
       
    59      * @param aFlags Flags for thumbnail creation.
       
    60      * @param aDisplayMode Used display mode.
       
    61      */
       
    62     void GetThumbnailL( RFs& aFs, RFile64& aFile, const TDataType& aMimeType,
       
    63         const CThumbnailManager::TThumbnailFlags aFlags, const TDisplayMode
       
    64         aDisplayMode, const CThumbnailManager::TThumbnailQualityPreference aQualityPreference  );
       
    65     
       
    66     /**
       
    67      * Function that will provide thumbnail from given parameters.
       
    68      *
       
    69      * @since S60 v5.0
       
    70      * @param aFs File server session
       
    71      * @param aBuffer Source image buffer.
       
    72      * @param aMimeType MIME-type of the image file.
       
    73      * @param aFlags Flags for thumbnail creation.
       
    74      * @param aDisplayMode Used display mode.
       
    75      */    
       
    76     void GetThumbnailL( RFs& aFs, TDesC8* aBuffer, const
       
    77         TDataType& aMimeType, const CThumbnailManager::TThumbnailFlags aFlags,
       
    78         const TDisplayMode aDisplayMode, const CThumbnailManager::TThumbnailQualityPreference aQualityPreference  );
       
    79     
       
    80     /**
       
    81      * Function that will provide thumbnail from given parameters.
       
    82      *
       
    83      * @since S60 v5.0
       
    84      * @param aFs File server session
       
    85      * @param aBuffer Source image buffer.
       
    86      */ 
       
    87     void GetThumbnailL( RFs& aFs, TDesC8& aBuffer);
       
    88 
       
    89     /**
       
    90      * Cancel a previous thumbnail request, if any.
       
    91      *
       
    92      * @since S60 5.0
       
    93      */
       
    94     void CancelGetThumbnail();
       
    95 
       
    96 private:
       
    97 
       
    98     /**
       
    99      * C++ default constructor
       
   100      *
       
   101      * @since S60 v5.0
       
   102      * @return New image thumbnail provider instance.
       
   103      */
       
   104     CThumbnailImageProvider();
       
   105 
       
   106 private:
       
   107 
       
   108     /**
       
   109      * Thumbnail decoder.
       
   110      */
       
   111     CThumbnailImageDecoder* iImageDecoder;
       
   112 
       
   113     /**
       
   114      * Thumbnail decoderv2.
       
   115     */
       
   116     CThumbnailImageDecoderv2* iImageDecoderv2;
       
   117     
       
   118    /**
       
   119      * File server session.
       
   120      * Not own.
       
   121      */
       
   122     RFs iFs;
       
   123 
       
   124     /**
       
   125      * Mime-type of image
       
   126      */
       
   127     TDataType iMimeType;
       
   128 };
       
   129 
       
   130 #include "thumbnailprovider.inl"
       
   131 
       
   132 #endif // THUMBNAILIMAGEPROVIDER_H