dependencies/mifconv/inc/mifconv.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 definitions.
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 __MIFCONV_H__
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    20
#define __MIFCONV_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
#if (defined( _MSC_VER ) && _MSC_VER <= 1200 ) //1200 == VC++ 6.0    
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    23
        #pragma warning(disable: 4100)
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    24
        #pragma warning(disable: 4511)
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    25
        #pragma warning(disable: 4512)
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    26
        #pragma warning(disable: 4530)
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    27
        #pragma warning(disable: 4663)
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    28
        #pragma warning(disable: 4710)
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    29
        #pragma warning(disable: 4786)
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    30
        #pragma warning(disable: 4800)
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    31
#endif
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
#include <iostream>
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    34
#include <fstream>
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    35
using namespace std;
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
#include "mifconv_types.h"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    38
using namespace MifConvDefs;
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
// Mifconv version
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    41
static const MifConvString MifConvVersion("3.1.7");
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    42
static const MifConvString MifConvDate("10th July 2009");
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    43
static const MifConvString MifConvYears("2009");
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
// Mifconv return values:
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    46
#define MIFCONV_ERROR       1
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    47
#define MIFCONV_NO_ERROR    0
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    48
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    49
#define MIFCONV_WILDCARD "*"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    50
#define BMP_FILE_EXTENSION "bmp"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    51
#define SVG_FILE_EXTENSION "svg"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    52
#define SVGB_BINARY_FILE_EXTENSION "svgb"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    53
#define HEADER_FILE_EXTENSION "mbg"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    54
#define MBM_FILE_EXTENSION "mbm"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    55
#define MIF_FILE_EXTENSION "mif"
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
#define FILE_EXTENSION_SEPARATOR "."
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    58
#define STRING_LIST_ARGUMENT_SEPARATOR ";"
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
#ifdef MSVC7
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    61
    #define FILE_IN_BINARY_NOCREATE_FLAGS (ios::in | ios::binary | ios::nocreate)
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    62
#else
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    63
    #define FILE_IN_BINARY_NOCREATE_FLAGS (ios::in | ios::binary) 
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    64
#endif
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
#ifdef WIN32
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    67
    #define DIR_SEPARATOR "\\"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    68
    #define DIR_SEPARATOR2 '\\'
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    69
    #define INCORRECT_DIR_SEPARATOR "/"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    70
    #define INCORRECT_DIR_SEPARATOR2 '/'
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    71
    #define OPTION_PREFIX1_STR "/"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    72
    #define OPTION_PREFIX1_CHAR '/'
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    73
    #define OPTION_PREFIX2_STR "-"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    74
    #define OPTION_PREFIX2_CHAR '-'    
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    75
#else
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    76
    #define DIR_SEPARATOR "/"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    77
    #define DIR_SEPARATOR2 '/'    
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    78
    #define INCORRECT_DIR_SEPARATOR "\\"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    79
    #define INCORRECT_DIR_SEPARATOR2 '\\'
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    80
    #define OPTION_PREFIX1_STR "-"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    81
    #define OPTION_PREFIX1_CHAR '-'
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    82
    #define OPTION_PREFIX2_STR "-"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    83
    #define OPTION_PREFIX2_CHAR '-' 
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    84
#endif
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
// BMCONV defines
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    87
#define BMCONV_EXECUTABLE_NAME "bmconv"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    88
#define BMCONV_TEMP_FILE_POSTFIX "_###_bmconv_tmp_cmd_file"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    89
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    90
#if defined (__SERIES60_30__) || defined (__SERIES60_31__) || defined (__S60_32__)
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    91
#define BMCONV_OPTION_PREFIX "/"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    92
#else
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    93
#define BMCONV_OPTION_PREFIX "-"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    94
#endif
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    95
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    96
#define BMCONV_QUIET_PARAMETER "q"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    97
#define BMCONV_PALETTE_PARAMETER "p"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    98
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
    99
// SVGTBINENCODE defines
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   100
#define SVGTBINENCODE_EXECUTABLE_NAME "svgtbinencode"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   101
#define SVGTBINENCODE_OPTION_PREFIX "-"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   102
#define SVGTBINENCODE_VERSION_PARAMETER "v"
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   103
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   104
// Bitmap searching directories
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   105
static const MifConvString S60_PATH = "epoc32" + MifConvString(DIR_SEPARATOR) + "s60";
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   106
static const MifConvString S60_ICONS_PATH   = S60_PATH + MifConvString(DIR_SEPARATOR) + "icons";
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   107
static const MifConvString S60_BITMAPS_PATH = S60_PATH + MifConvString(DIR_SEPARATOR) + "bitmaps";
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   108
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   109
// Environment variable names
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   110
static const MifConvString EPOCROOT_ENV = MifConvString("EPOCROOT");
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   111
static const MifConvString SBS_BUILD_DIR_ENV = MifConvString("SBS_BUILD_DIR");
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   112
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   113
// EPOC paths
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   114
static const MifConvString EPOC32_PATH = "epoc32";
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   115
static const MifConvString DEFAULT_EPOCROOT = MifConvString("");
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   116
static const MifConvString EPOC_TOOLS_PATH = "epoc32" + MifConvString(DIR_SEPARATOR) + "tools";
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
static const MifConvString EPOC_BUILD_PATH = "epoc32" + MifConvString(DIR_SEPARATOR) + "build";
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   119
static const MifConvString EPOC_ICON_BUILD_PATH_POSTFIX = "s60" + MifConvString(DIR_SEPARATOR) + "icons";
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
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   122
// Debug logging file environment variable
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   123
static const MifConvString MIFCONV_DEBUG_FILE_ENV("MIFCONV_DEBUG_FILE");
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   124
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   125
// Maximum amount of target file removal tries
11157e26c4a7 added dependencies for homescreen package
Christian Morlok <symbian.org@christianmorlok.de>
parents:
diff changeset
   126
#define MIFCONV_MAX_REMOVE_TRIES    10
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
#endif