phonebookui/Phonebook/BCardEng/inc/CBCardImageUtil.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 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: 
       
    15 *       Image manipulation utilities needed in BCardEngine.    
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CBCARDIMAGEUTIL_H__
       
    21 #define __CBCARDIMAGEUTIL_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CFbsBitmap;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 NONSHARABLE_CLASS(CBCardImageUtil) : 
       
    32         public CBase
       
    33 	{
       
    34     public: // constructor and destructor
       
    35         /**
       
    36          * Constructor
       
    37          */
       
    38         static CBCardImageUtil* NewL();
       
    39 
       
    40         /**
       
    41          * Destructor
       
    42          */
       
    43         ~CBCardImageUtil();
       
    44 
       
    45     public:  // implementation
       
    46         /**
       
    47         * Saves the given bitmap to a 8-bit descriptor according in
       
    48         * jpeg format
       
    49         *
       
    50         * @param    aBitmap The bitmap to store.
       
    51         * @return   The resulting jpeg descriptor. Note: caller must
       
    52         *           take the ownership.
       
    53         */
       
    54         HBufC8* BitmapToDescL(CFbsBitmap& aBitmap);
       
    55 
       
    56 	private: // Callbacks for image conversion
       
    57 		static void ConversionDone(TAny* aThis, TInt aError);
       
    58         void ConversionDone(TInt aError);
       
    59         
       
    60     private: // member data
       
    61 		/// Own: ETrue while running
       
    62         TBool iRunning;
       
    63 		/// Own: error code
       
    64         TInt iError;
       
    65 		/// Own: active scheduler
       
    66         CActiveSchedulerWait iWait;
       
    67     };
       
    68 
       
    69 #endif // __CBCARDIMAGEUTIL_H__
       
    70             
       
    71 // End of File