imageeditorengine/JpegScaler/inc/JpegScalerImpl.h
changeset 1 edfc90759b9f
equal deleted inserted replaced
0:57d4cdd99204 1:edfc90759b9f
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "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 * Ixonos Plc
       
    14 *
       
    15 * Description:  
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef JPEGSCALERIMPL_H
       
    21 #define JPEGSCALERIMPL_H
       
    22 
       
    23 
       
    24 // INCLUDES
       
    25 #include <f32file.h>
       
    26 #include <e32base.h>
       
    27 
       
    28 #include "CJpegScale.h"
       
    29 
       
    30 // debug log writer
       
    31 //#include "imageeditordebugutils.h"
       
    32 
       
    33 // CONSTANTS
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 
       
    37 /*	CLASS: 	CJpegScalerImpl
       
    38 *
       
    39 *	CJpegScalerImpl
       
    40 *	Internal representation of CJpegScaler
       
    41 *
       
    42 */
       
    43 class CJpegScalerImpl : public CAsyncOneShot//, public MJpegScaleCallBack
       
    44 {
       
    45     
       
    46 public:
       
    47 
       
    48 /** @name Methods:*/
       
    49 //@{
       
    50 
       
    51 	/** NewL factory method, pops cleanup stack
       
    52 	*
       
    53 	*	@param - aFsSession
       
    54 	*	@return pointer to created CJpegScalerImpl object
       
    55 	*/
       
    56 	static CJpegScalerImpl * NewL (RFs& aFsSession);
       
    57 
       
    58 	/** Destructor
       
    59 	*
       
    60 	*	@param -
       
    61 	*	@return -
       
    62 	*/
       
    63 	~CJpegScalerImpl ();
       
    64 
       
    65     /** RunL
       
    66 	*
       
    67 	*	@param -
       
    68 	*	@return -
       
    69 	*/
       
    70 	virtual void RunL();
       
    71 
       
    72     /** Scale
       
    73 	*
       
    74 	*	@param -
       
    75 	*	@return -
       
    76 	*/
       
    77     void Scale(TRequestStatus* aRequestStatus, const TFileName& aSrcFileName, const TFileName& aTrgFileName, const TSize& aDestinationSize);
       
    78 
       
    79 private:
       
    80 
       
    81 	/** Default constructor
       
    82 	*
       
    83 	*	@param - aFsSession
       
    84 	*	@return -
       
    85 	*/
       
    86 	CJpegScalerImpl (RFs& aFsSession);
       
    87 
       
    88 	/** Second phase constructor, may leave
       
    89 	*
       
    90 	*	@param -
       
    91 	*	@return -
       
    92 	*/
       
    93 	void ConstructL ();
       
    94 
       
    95 	/** Callback function for CJpegScale
       
    96 	*
       
    97 	*	@param -
       
    98 	*	@return -
       
    99 	*/
       
   100     //void JpegStatusCallBack( TInt aPercentReady );
       
   101 
       
   102 private:
       
   103 
       
   104     /// File Server session handle
       
   105     RFs& 						iFsSession;
       
   106 
       
   107     /// Source and target files
       
   108     TFileName					iSourceFileName;
       
   109     TFileName					iTargetFileName;
       
   110 
       
   111     /// Scaler
       
   112     CJpegScale*                 iScale;
       
   113 
       
   114     /// Caller request status
       
   115     TRequestStatus*             iCallerReqStatus;
       
   116 
       
   117 #if defined (LOG_TIMING)
       
   118     TTime                       iStartTime;
       
   119     TTime                       iSavingStartTime;
       
   120     TTime                       iFinishTime;
       
   121 #endif
       
   122 
       
   123 
       
   124 };
       
   125 
       
   126 #endif
       
   127 
       
   128 
       
   129 // End of File