author | kashif.sayed |
Fri, 26 Mar 2010 04:17:01 +0530 | |
branch | v5backport |
changeset 31 | a3e98f9c292b |
parent 21 | 11157e26c4a7 |
permissions | -rw-r--r-- |
21
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
1 |
/* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
3 |
* All rights reserved. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
8 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
11 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
12 |
* Contributors: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
13 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
14 |
* Description: Mifconv icon binary converters class. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
15 |
* |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
16 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
17 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
18 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
19 |
#ifndef __MIFCONVICONBINARYCONVERTER_H__ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
20 |
#define __MIFCONVICONBINARYCONVERTER_H__ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
21 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
22 |
#include "mifconv_fileconverter.h" |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
23 |
#include <fstream> |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
24 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
25 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
26 |
* Converter class for .svg to .svgb conversion: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
27 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
28 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
29 |
class MifConvIconBinaryConverter : public MifConvFileConverter |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
30 |
{ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
31 |
public: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
32 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
33 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
34 |
* Default constructor |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
35 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
36 |
MifConvIconBinaryConverter(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
37 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
38 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
39 |
* Destructor |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
40 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
41 |
virtual ~MifConvIconBinaryConverter(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
42 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
43 |
// From MifConvFileConverter: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
44 |
virtual void AppendFile( const MifConvSourceFile& sourcefile ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
45 |
virtual void Convert(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
46 |
virtual void Cleanup(bool err = false); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
47 |
virtual void Init(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
48 |
virtual void CleanupTargetFiles(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
49 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
50 |
protected: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
51 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
52 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
53 |
* Converts files to svgb files. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
54 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
55 |
virtual void ConvertToSvgb(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
56 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
57 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
58 |
* Removes temporary files from the file system. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
59 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
60 |
virtual void CleanupTempFiles(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
61 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
62 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
63 |
* Runs the external converter. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
64 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
65 |
void RunExtConverter(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
66 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
67 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
68 |
* Creates and initializes the temporary file |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
69 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
70 |
void InitTempFile(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
71 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
72 |
/** |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
73 |
* Returns default path to external converter. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
74 |
* @return Default path to external converter. |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
75 |
*/ |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
76 |
const MifConvString& GetDefaultExtConverterPath(); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
77 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
78 |
void ConvertToBinaryFilename( MifConvString& input ); |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
79 |
private: |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
80 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
81 |
MifConvString iTempDir; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
82 |
MifConvStringList iTempFilenames; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
83 |
MifConvString iDefaultExtConverterPath; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
84 |
}; |
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
85 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
86 |
|
11157e26c4a7
added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff
changeset
|
87 |
#endif |