uiservicetab/vimpstengine/tsrc/vimpstengine_ut/src/stubs/s_vimpstengineaimagehandler.h
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 2008 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: s_vimpstengineaimagehandler.h
       
    15 *
       
    16 */
       
    17 #ifndef __CVIMPSTENGINEIMAGEHANDLER_H
       
    18 #define __CVIMPSTENGINEIMAGEHANDLER_H
       
    19 
       
    20 //  INCLUDES
       
    21 #include <e32base.h>
       
    22 
       
    23 #include "mvimpstimageprocessobserver.h"
       
    24 
       
    25 // FORWARD DECLARATIONS           
       
    26 class CVimpstImageProcessor;
       
    27 class CFbsBitmap;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 /**
       
    31  * This Class is wrapper over the CVimpstImageProcessor implements the processing of image
       
    32  * @lib vimpstengine.lib
       
    33  * @since S60 5.0 
       
    34  */
       
    35 NONSHARABLE_CLASS( CVIMPSTEngineImageHandler ) : public CBase,							   
       
    36                                                  public MCAImageProcessObserver
       
    37 
       
    38     {
       
    39 
       
    40 
       
    41     public:  // Two-phased constructors and destructor
       
    42 
       
    43         /**
       
    44          * Two-phased constructor.
       
    45          */
       
    46 
       
    47         IMPORT_C static CVIMPSTEngineImageHandler* NewL();
       
    48         /**
       
    49          * Two-phased constructor.
       
    50          */										
       
    51         IMPORT_C static CVIMPSTEngineImageHandler* NewLC();
       
    52         /**
       
    53          * By default Symbian 2nd phase constructor is private.
       
    54          */
       
    55         void ConstructL();
       
    56         /**
       
    57          * C++ Destructor.
       
    58          */
       
    59         virtual ~CVIMPSTEngineImageHandler();
       
    60 
       
    61 
       
    62     private:
       
    63 
       
    64         /**
       
    65          * default constructor
       
    66          */
       
    67         CVIMPSTEngineImageHandler();
       
    68 
       
    69 
       
    70 
       
    71     public: 
       
    72         /**
       
    73          * process the image from file name
       
    74          * @return processed image content	     
       
    75          */
       
    76         IMPORT_C HBufC8* ProcessImageFromFileL(const TDesC& aFilename ,
       
    77                 const  TDesC8& aMimetype);
       
    78         /**
       
    79          * process the image from image data
       
    80          * @return processed image content      
       
    81          */
       
    82         IMPORT_C HBufC8* ProcessImageFromDataL( const TDesC8& aImageData , const TDesC8& aMimeType);
       
    83 			 /**
       
    84         * Get Bitmap
       
    85         * @return bitmap
       
    86         */   
       
    87         IMPORT_C CFbsBitmap& Bitmap();
       
    88     public:  // from MCAImageProcessObserver
       
    89 
       
    90         /**
       
    91          * See MCAImageProcessObserver	     
       
    92          */
       
    93         void HandleProcessingCompleteL( TInt aStatus );	
       
    94 
       
    95 
       
    96     private:   	
       
    97 
       
    98 
       
    99         //Result code from waited request
       
   100         TInt    iReqResult;
       
   101 
       
   102         // Owns content
       
   103         HBufC8* iContent;
       
   104 
       
   105         // Owns imageporcessor
       
   106         CVimpstImageProcessor* iProcessor;
       
   107         
       
   108         // own active sheduler 
       
   109         CActiveSchedulerWait    iWait;
       
   110 
       
   111     };
       
   112 
       
   113 #endif      //__CVIMPSTENGINEIMAGEHANDLER_H
       
   114 
       
   115 // End of File