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