photosgallery/viewframework/commandhandlers/commandhandlerupnp/inc/glxupnpthumbnailsaver.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:    Saves the thumbnail
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_GLXTHUMBNAILSAVER_H__
       
    21 #define C_GLXTHUMBNAILSAVER_H__
       
    22 
       
    23 #include<e32def.h>
       
    24 #include<e32base.h>
       
    25 #include<f32file.h>
       
    26 
       
    27 class CFbsBitmap;
       
    28 class CGlxDefaultThumbnailContext;
       
    29 class CImageEncoder;
       
    30 class CFbsBitGc;
       
    31 
       
    32 
       
    33   
       
    34 
       
    35 //  CLASS DEFINITION
       
    36 
       
    37 /**
       
    38  * Observer for the thumbnail save activity
       
    39  */
       
    40 class  MGlxThumbnailSaveComplete
       
    41     {
       
    42 public:     
       
    43     /**
       
    44     * Informs the completion of file save
       
    45     * @param a aPath contains the file path
       
    46     * @return none
       
    47     */    
       
    48     virtual void HandleFileSaveCompleteL(const TDesC& aPath) = 0;
       
    49     };
       
    50     
       
    51 //  CLASS DEFINITION
       
    52 /**
       
    53  * Thumbnail saver class 
       
    54  */
       
    55 NONSHARABLE_CLASS( CGlxThumbnailSaver ):public CActive
       
    56     {
       
    57 
       
    58 public:
       
    59 
       
    60     /**
       
    61     * Two-phased constructor.
       
    62     */
       
    63     static CGlxThumbnailSaver* NewL(MGlxThumbnailSaveComplete* aObserver);
       
    64 
       
    65     /**
       
    66     * Destructor.
       
    67     */
       
    68     ~CGlxThumbnailSaver();
       
    69 
       
    70     /**
       
    71     * Creates the video overlay icon 
       
    72     * @return none
       
    73     */
       
    74     void CreateVideoIconL(CFbsBitmap* aThumbnail);
       
    75     
       
    76     /**
       
    77     * Creates the default video overlay icon
       
    78     * @return none
       
    79     */
       
    80     void CreateDefaultVideoIconL();
       
    81     
       
    82     /**
       
    83     * Creates the default image overlay icon
       
    84     * @return none
       
    85     */
       
    86     void CreateDefaultImageIconL();
       
    87 
       
    88 private:
       
    89 
       
    90     /**
       
    91     * Constructor 
       
    92     * @return none
       
    93     */
       
    94     CGlxThumbnailSaver(MGlxThumbnailSaveComplete* aObserver);
       
    95 
       
    96     /**
       
    97     * Symbian 2-phase constructor 
       
    98     * @return none
       
    99     */
       
   100     void ConstructL(); 
       
   101 
       
   102     /**
       
   103     * Creates the video strip icon 
       
   104     * @return none
       
   105     */    
       
   106     void CreateVideoStripIconL();
       
   107 
       
   108     /**
       
   109     * Active objects request completion event
       
   110     */
       
   111     void RunL();
       
   112 
       
   113     /**
       
   114     * Cancellation of a request
       
   115     */ 	    
       
   116     void DoCancel();
       
   117     
       
   118 private:   
       
   119 
       
   120     //File server session instance
       
   121     RFs iFs;
       
   122 
       
   123     //videostrip ,This will be overlayed on the video thumbnail
       
   124     CFbsBitmap* iVideoStrip;
       
   125 
       
   126     //video strip mask ,used to create the video strip icon from the mif file
       
   127     CFbsBitmap* iVideoStripMask;
       
   128 
       
   129     //image encoder,used for the video overlay icon saving
       
   130     CImageEncoder* iImageEncoder;
       
   131 
       
   132     //temporay bitmap
       
   133     //used to blit the overlay icon and the thumnail of the video
       
   134     CFbsBitmap* iTempBitmap;
       
   135 
       
   136     //  Observer which informs the renderer class  about the completion of the  thumbnail save
       
   137     MGlxThumbnailSaveComplete* iObserver;
       
   138     };
       
   139 #endif