imageeditorengine/JpegScaler/src/JpegScaler.cpp
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 #include "JpegScaler.h"
       
    21 #include "JpegScalerImpl.h"
       
    22 
       
    23 EXPORT_C CJpegScaler* CJpegScaler::NewL(RFs & aFsSession)
       
    24 {
       
    25     CJpegScaler* scaler = new(ELeave) CJpegScaler();
       
    26     CleanupStack::PushL(scaler);
       
    27     scaler->ConstructL(aFsSession);
       
    28     CleanupStack::Pop();
       
    29     return scaler;
       
    30 }
       
    31 
       
    32 EXPORT_C CJpegScaler::~CJpegScaler()
       
    33 {
       
    34     delete iImplementation;
       
    35 }
       
    36 	
       
    37 EXPORT_C void CJpegScaler::Scale(TRequestStatus* aRequestStatus, const TFileName& aSrcFileName, const TFileName& aTrgFileName, const TSize& aDestinationSize)
       
    38 {
       
    39     iImplementation->Scale(aRequestStatus, aSrcFileName, aTrgFileName, aDestinationSize);    
       
    40 }
       
    41 
       
    42 EXPORT_C void CJpegScaler::Cancel()
       
    43 {
       
    44     iImplementation->Cancel();    
       
    45 }
       
    46 
       
    47 CJpegScaler::CJpegScaler()
       
    48 {
       
    49     
       
    50 }
       
    51 
       
    52 void CJpegScaler::ConstructL(RFs & aFsSession)
       
    53 {
       
    54     iImplementation = CJpegScalerImpl::NewL(aFsSession);
       
    55 }
       
    56 
       
    57 // End of File