dependencies/mifconv/src/mifconv_bitmapheaderconverter.cpp
author kashif.sayed
Fri, 26 Mar 2010 01:54:20 +0530
branchv5backport
changeset 26 bef183758dfa
parent 21 11157e26c4a7
permissions -rw-r--r--
Dependencies for idlefw user: kashif.sayed branch 'v5backport'
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 bitmap header converter 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
#include "mifconv.h"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    20
#include "mifconv_bitmapheaderconverter.h"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    21
#include "mifconv_argumentmanager.h"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    22
#include "mifconv_util.h"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    23
#include "mifconv_exception.h"
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
const int MIF_ID_FIRST = 16384;
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
/**
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
MifConvBitmapHeaderConverter::MifConvBitmapHeaderConverter()
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
iCurrentSourceId(MIF_ID_FIRST)
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
	MifConvArgumentManager* argMgr = MifConvArgumentManager::Instance();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    35
    iHeaderFilename = argMgr->StringValue(MifConvHeaderArg);
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
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
 */
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    41
MifConvBitmapHeaderConverter::~MifConvBitmapHeaderConverter()
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
}
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    44
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    45
/**
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    46
 *
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    47
 */
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    48
void MifConvBitmapHeaderConverter::Init()
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
    CleanupTargetFiles();
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
/**
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
 */
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    56
void MifConvBitmapHeaderConverter::CleanupTargetFiles()
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
	if( MifConvUtil::FileExists(iHeaderFilename) )
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
        // Try to remove file MIFCONV_MAX_REMOVE_TRIES times, no exception in case of failure:
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    61
        MifConvUtil::RemoveFile(iHeaderFilename, MIFCONV_MAX_REMOVE_TRIES, true);
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
}
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
/**
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
void MifConvBitmapHeaderConverter::AppendFile( const MifConvSourceFile& sourcefile )
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
	iSourceFiles.push_back( sourcefile );	
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
/**
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    74
 *
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 MifConvBitmapHeaderConverter::Convert()
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
    // Check if the headerfile name is given. Return if not:    
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    79
    if( iHeaderFilename.length() > 0 )
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
        cout << "Writing mbg: " << iHeaderFilename << endl;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    82
        MifConvUtil::EnsurePathExists(iHeaderFilename, true);
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    83
    }
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    84
    else
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
        return;
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
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    89
    // Create / open the header file:
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    90
    fstream headerFile(iHeaderFilename.c_str(), ios::out|ios::trunc);
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    91
    
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    92
    // If file creation/opening was not successful, give warning and return:
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    93
    if( !headerFile.is_open() )
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    94
    {
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    95
        MifConvString debugStr("WARNING: Headerfile " + iHeaderFilename + " cannot be opened for writing.");
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    96
        cout <<  debugStr  << endl;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    97
        MifConvUtil::DebugLog(debugStr);
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    98
        return;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    99
    }
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   100
    iDestFile = &headerFile; // Save the pointer to the file stream    
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   101
    (*iDestFile) << endl;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   102
    // Write the beginning of the header file:
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   103
    WriteStart();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   104
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   105
    // Add source file items to enumerator:
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   106
    for( MifConvSourceFileList::iterator i = iSourceFiles.begin(); i != iSourceFiles.end(); ++i )
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   107
    {
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   108
        WriteItemToHeader(*i);
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   109
    }
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   110
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   111
    // Write the end of the file...
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   112
    WriteEnd();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   113
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   114
    // ...and close the file:
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   115
    iDestFile->close();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   116
}
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   117
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   118
/**
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   119
 *
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   120
 */
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   121
void MifConvBitmapHeaderConverter::WriteStart()
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   122
{
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   123
    (*iDestFile) << "/* This file has been generated, DO NOT MODIFY. */" << endl;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   124
    (*iDestFile) << "enum TMif" << MifConvUtil::UnadornedFilename(iHeaderFilename) << "\n\t{" << endl;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   125
}
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   126
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   127
/**
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   128
 *
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   129
 */
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   130
void MifConvBitmapHeaderConverter::WriteItemToHeader( const MifConvSourceFile& source )
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   131
{
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   132
    MifConvString unadornedHeaderFile(MifConvUtil::UnadornedFilename(iHeaderFilename));
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   133
    
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   134
    (*iDestFile) << "\tEMbm" << unadornedHeaderFile << MifConvUtil::UnadornedFilename(source.Filename()) <<  " = " << iCurrentSourceId++ << "," << endl;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   135
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   136
    // Write mask also, if any:
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   137
    if( source.MaskDepth() != IconMaskDepth_Undefined )
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   138
    {
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   139
        (*iDestFile) << "\tEMbm" << unadornedHeaderFile << MifConvUtil::UnadornedFilename(source.Filename()) <<  "_mask = " << iCurrentSourceId++ << "," << endl;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   140
    }
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   141
    else
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   142
    {
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   143
        // Skip mask ID if mask not present so that adding a mask later does not change IDs.
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   144
        iCurrentSourceId++;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   145
    }
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   146
}
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   147
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   148
/**
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   149
 *
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   150
 */
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   151
void MifConvBitmapHeaderConverter::WriteEnd()
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   152
{
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   153
    (*iDestFile) << "\tEMbm" << MifConvUtil::UnadornedFilename(iHeaderFilename) << "LastElement" << endl;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   154
    (*iDestFile) << "\t};" << endl;
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   155
}
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   156
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   157
/**
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   158
 *
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   159
 */
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   160
void MifConvBitmapHeaderConverter::Cleanup(bool err)
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   161
{
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   162
    if( err )
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   163
	{
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   164
	    CleanupTargetFiles();
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   165
	}
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   166
}