gfxconversion/mifconv/inc/mifconv_iconbinaryconverter.h
changeset 0 f453ebb75370
equal deleted inserted replaced
-1:000000000000 0:f453ebb75370
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Mifconv icon binary converters class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __MIFCONVICONBINARYCONVERTER_H__
       
    20 #define __MIFCONVICONBINARYCONVERTER_H__
       
    21 
       
    22 #include "mifconv_fileconverter.h"
       
    23 #include <fstream>
       
    24 
       
    25 /**
       
    26  * Converter class for .svg to .svgb conversion:
       
    27  */
       
    28 
       
    29 class MifConvIconBinaryConverter : public MifConvFileConverter
       
    30 {
       
    31 public:
       
    32 
       
    33     /**
       
    34      * Default constructor
       
    35      */
       
    36     MifConvIconBinaryConverter();
       
    37 
       
    38     /**
       
    39      * Destructor
       
    40      */
       
    41     virtual ~MifConvIconBinaryConverter();
       
    42 
       
    43     // From MifConvFileConverter:
       
    44 	virtual void AppendFile( const MifConvSourceFile& sourcefile );
       
    45 	virtual void Convert();
       
    46 	virtual void Cleanup(bool err = false);
       
    47 	virtual void Init();
       
    48 	virtual void CleanupTargetFiles();
       
    49 
       
    50 protected:
       
    51 
       
    52     /**
       
    53      * Converts files to svgb files.     
       
    54      */
       
    55 	virtual void ConvertToSvgb();
       
    56 
       
    57     /**
       
    58      * Removes temporary files from the file system.
       
    59      */
       
    60 	virtual void CleanupTempFiles();
       
    61 
       
    62     /**
       
    63      * Runs the external converter.     
       
    64      */
       
    65     void RunExtConverter();
       
    66 
       
    67     /**
       
    68      * Creates and initializes the temporary file     
       
    69      */
       
    70     void InitTempFile();
       
    71    
       
    72     /**
       
    73      * Returns default path to external converter.
       
    74      * @return Default path to external converter.
       
    75      */
       
    76     const MifConvString& GetDefaultExtConverterPath();
       
    77 
       
    78     void ConvertToBinaryFilename( MifConvString& input );
       
    79 private:
       
    80     
       
    81     MifConvString iTempDir;
       
    82     MifConvStringList iTempFilenames;
       
    83     MifConvString iDefaultExtConverterPath;    
       
    84 };
       
    85 
       
    86 
       
    87 #endif