phoneuis/BubbleManager/Inc/BMImageReader.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Reader for JPEG/GIF/BMP images (ImageHandlingLib wrapper)
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef BMIMAGEREADER_H
       
    20 #define BMIMAGEREADER_H
       
    21 
       
    22 #include <MIHLViewerObserver.h>
       
    23 
       
    24 #include "BMMediaReader.h"
       
    25 
       
    26 class MIHLFileImage;
       
    27 class MIHLBitmap;
       
    28 class MIHLImageViewer;
       
    29 
       
    30 /**
       
    31  *  Reader for JPEG/GIF/BMP images (ImageHandlingLib wrapper)
       
    32  *
       
    33  *  @lib BubbleManager
       
    34  *  @since S60 v3.2
       
    35  */
       
    36 class CBubbleImageReader : public CBubbleMediaReader,
       
    37                            public MIHLViewerObserver
       
    38     {
       
    39 public:    
       
    40 
       
    41     static CBubbleImageReader* NewL( 
       
    42         const TDesC& aFileName );
       
    43 	
       
    44     virtual ~CBubbleImageReader();
       
    45 
       
    46 private: // from CBubbleMediaReader
       
    47     
       
    48     void  StartReadingL(
       
    49         const TSize& aTargetSize,
       
    50         const TReal& aScaleFactor,
       
    51         const TRect& aClipRect, 
       
    52         MBubbleMediaReaderObserver* aObserver );
       
    53         
       
    54     TInt SetScaleAndClip(
       
    55         const TSize& aTargetSize,
       
    56         const TReal& aScaleFactor,
       
    57         const TRect& aClipRect );        
       
    58     
       
    59     void  CancelReading();
       
    60     
       
    61     const TSize SourceSize() const;
       
    62     
       
    63     TBool IsAnimation() const;
       
    64     
       
    65     void  Play();
       
    66     
       
    67     void  Stop();
       
    68     
       
    69 private: // from MIHLViewerObserver
       
    70     
       
    71     void ViewerBitmapChangedL();
       
    72     
       
    73     void ViewerError( TInt aError );     
       
    74     
       
    75 
       
    76 private:
       
    77     
       
    78     CBubbleImageReader();
       
    79 
       
    80     void ConstructL( const TDesC& aFileName );
       
    81 
       
    82 private: // data
       
    83     
       
    84     // Owned
       
    85     MIHLFileImage* iSourceImage;
       
    86     // Owned
       
    87     MIHLBitmap* iDestinationBitmap;
       
    88     // Owned
       
    89     MIHLImageViewer* iViewerEngine;
       
    90     
       
    91     };
       
    92 
       
    93 #endif // BMIMAGEREADER_H