phoneclientserver/phoneserver/Inc/ImageHandler/cphsrvimagesaver.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     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:  Image saver header
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CPHSRVIMAGESAVER_H
       
    20 #define C_CPHSRVIMAGESAVER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class RFs;
       
    25 class MPhSrvImageSaverObserver;
       
    26 class CFileMan;
       
    27 class CImageDecoder;
       
    28 class CBitmapScaler;
       
    29 
       
    30 /**
       
    31 *  Image saver.
       
    32 *
       
    33 *  @since S60 v5.0
       
    34 */
       
    35 NONSHARABLE_CLASS( CPhSrvImageSaver )
       
    36 :   public CActive
       
    37     {
       
    38 public: // constructor
       
    39     
       
    40     static CPhSrvImageSaver* NewL( 
       
    41         RFs& aFs,
       
    42         const TFileName& aPrivatePath,
       
    43         MPhSrvImageSaverObserver& aObserver );
       
    44     
       
    45     ~CPhSrvImageSaver();
       
    46 
       
    47 public: // new methods
       
    48 
       
    49     void SaveImageL( const TDesC& aFileName );
       
    50 
       
    51     void CopyImageL( const TDesC& aFileName );
       
    52     
       
    53     void ScaleImageL();
       
    54     
       
    55     TInt IsPrimaryFileInUse( TBool& aIsInUse );
       
    56     
       
    57     TInt ConstructVtFileSaveName( 
       
    58         const TDesC& aSourceFileName, 
       
    59         TName& aTargetFileName );
       
    60 
       
    61 private: // from CActive
       
    62 
       
    63     void RunL();
       
    64     
       
    65     void DoCancel();    
       
    66     
       
    67 private:
       
    68 
       
    69     void ConstructL();
       
    70         
       
    71     CPhSrvImageSaver( RFs& aFs, 
       
    72         const TFileName& aPrivatePath,
       
    73         MPhSrvImageSaverObserver& aObserver);
       
    74         
       
    75 private:
       
    76 
       
    77     // file server session
       
    78     RFs& iFs;
       
    79 
       
    80     // path to private directory
       
    81     const TFileName& iPath;
       
    82     
       
    83     // for checking image files
       
    84     CFileMan* iFileManager;
       
    85     
       
    86     // for decoding image file
       
    87     CImageDecoder* iImageDecoder;
       
    88     
       
    89     // for scaling single frame image
       
    90     CBitmapScaler* iScaler;
       
    91     
       
    92     // for notifying save completion
       
    93     MPhSrvImageSaverObserver& iObserver;
       
    94     
       
    95     
       
    96 
       
    97     };
       
    98 
       
    99 #endif // C_CPHSRVIMAGESAVER_H
       
   100 
       
   101 
       
   102 // End of File