dependencies/mifconv/inc/mifconv_mifconverter.h
author Christian Morlok <symbian.org@christianmorlok.de>
Wed, 07 Apr 2010 14:35:19 +0200
branchv5backport
changeset 54 666a2952b5b3
parent 21 11157e26c4a7
permissions -rw-r--r--
renamed dlls+exe to prevent conflicts with existing files in emulator; changelog attached. * renamed dlls/exe: - aifw.dll to aifw_hs.dll - cputils to cputils_hs - aiidleint.dll to aiidleint_hs.dll - aiutils.dll to aiutils_hs.dll - MenuInterface.dll to MenuInterface_hs.dll - XCFW.dll to XCFW_hs.dll - homescreen.exe to homescreen_hs.exe - ailaunch.exe to ailaunch_hs.exe * new UID for Active Idle (aifw_hs.dll, aiidleint_hs.dll and homescreen.exe): #define AI_UID3_AIFW_COMMON 0xEDFF45C4 (was 0x102750F0 = 271012080) * new UID for cputils_hs.dll: 0xE3E7134E (was 0x20016B7F = 536963967) * new UID for AI Utilities Factory (aiutils_hs.dll): 0xEC55106C (was 0x10281865 = 271063141) * new UID for MenuInterface_hs.dll: 0xEEE24485 (was 0x10210EAB = 270601899) * new UID for XCFW_hs.dll: 0xEB12332F (was 0x10210EA0 = 270601888) * new UID for ailaunch_hs.exe: 0xEF5A047A (was 0x200286E3 = 537036515)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 MIF 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 __MIFCONVMIFCONVERTER_H__
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    20
#define __MIFCONVMIFCONVERTER_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
#include <vector>
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
/**
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    27
 * Converter class for converting source files to .mif file.
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
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    30
class MifConvMifConverter : public MifConvFileConverter
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    31
{
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    32
public:
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
    /**
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    35
     * Default constructor
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    36
     */ 
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    37
    MifConvMifConverter();
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
    /**
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    40
     * Destructor
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    41
     */
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    42
    virtual ~MifConvMifConverter();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    43
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    44
    // From MifConvFileConverter
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    45
	virtual void AppendFile( const MifConvSourceFile& sourcefile );
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    46
	virtual void Convert();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    47
	virtual void Cleanup(bool err = false);
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    48
	virtual void Init();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    49
	virtual void CleanupTargetFiles();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    50
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    51
protected:
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
    /**
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    54
     * Converts files to .mif file
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    55
     * @param argMgr Reference to argument manager object. 
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
	virtual void ConvertToMif();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    58
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
     * Removes temporary files from the file system.
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
	virtual void CleanupTempFiles();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    63
    
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
     * Creates and initializes the temporary file.
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    66
     * @param argMgr Reference to argument manager object.
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
    void InitTempFile();
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
    /**
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    71
     * Add source file to the temporary file     
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    72
     * @param srcFile Source file object
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    73
     */
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    74
    void AppendSourceToTempFile(const MifConvSourceFile& srcFile);
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
    void ReadFileContents();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    77
    void OpenTargetFile();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    78
    void WriteTargetHeader();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    79
    void WriteIconArray();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    80
    void WriteIcons();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    81
    void WriteIconHeader(const MifConvSourceFile& src);
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    82
    void WriteIconData(const MifConvSourceFile& src);
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    83
    MifConvDefs::IconFormatType ReadIconBinaryType(const MifConvSourceFile& src);
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
private:
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    87
    
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    88
    MifConvString iTargetFilename;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    89
    fstream iTargetFile;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    90
    typedef std::vector<char*> StringPtrVector;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    91
    StringPtrVector iContentPointers;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    92
};
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    93
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    94
#endif