sdkcreationmw/sdkbuild/SDK_WINSCW/ifsheets.pm
author Shabe Razvi <shaber@symbian.org>
Thu, 04 Nov 2010 17:22:05 +0000
changeset 4 b3b823debf08
parent 0 b26acd06ea60
permissions -rw-r--r--
Workaround for Bug 3917 - CWinsockInterface::DataSent calls NotifyDataSent which is not implemented.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     1
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     2
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     3
# All rights reserved.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     4
# This component and the accompanying materials are made available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     5
# under the terms of "Eclipse Public License v1.0"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     6
# which accompanies this distribution, and is available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     8
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     9
# Initial Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    11
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    12
# Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    13
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    14
# Description: 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    15
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    16
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    17
package ifsheets;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    18
############################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    19
# 13.6.2005: 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    20
#  - Added support for the Removed column in the black list.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    21
#  - Added support for "For Adaptation" And "Extended SDK" columns
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    22
#    in the readInfo*2 functions (just to read the data into the hash).
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    23
#  - currently there is NO support to get extended SDK /for adaptation API lists
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    24
#    based on some release.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    25
############################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    26
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    27
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    28
##########################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    29
# Libraries used
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    30
##########################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    31
use strict;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    32
use Win32::OLE qw(in with);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    33
use Win32::OLE::Const 'Microsoft Excel';
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    34
use Exporter ();     # Needed to make constants available to caller.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    35
use excel_support;    # opening/closing workbook, etc.. functions.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    36
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    37
##########################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    38
# Defining all the "global" variables, that we are using.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    39
##########################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    40
use vars qw(
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    41
            @ISA
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    42
            @EXPORT
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    43
            );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    44
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    45
@ISA = qw(Exporter); # Inherit from Exporter module (import method needed).
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    46
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    47
# Define all the functions defined by this module
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    48
use subs qw(
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    49
	    isSupported
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    50
	    addToHash
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    51
	    isRowWanted
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    52
	    setRowValue
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    53
	    getError
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    54
	    checkRel
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    55
	    checkApiRelRoadMap
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    56
	    checkFileRelRoadMap
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    57
	    readInfo
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    58
	    checkConflicts
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    59
	    readInfo2
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    60
	    readCRepInfo2
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    61
	    readBlackList
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    62
	    );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    63
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    64
##########################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    65
# Define the exports from this module that can be used
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    66
# Outside
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    67
##########################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    68
@EXPORT = qw(
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    69
             &getExcelApp
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    70
	     &quitExcelApp
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    71
	     &isSupported
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    72
	     &openWorkbook
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    73
	     &getWorkSheet
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    74
	     &readInfo
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    75
	     &checkConflicts
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    76
	     &readInfo2
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    77
	     &readCRepInfo2
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    78
	     &readBlackList
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    79
             );
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    80
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    81
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    82
##########################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    83
# Global variables inside this module (constants
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    84
##########################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    85
# For 2.0 template version there are 32 columns
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    86
my $globalMaxColCount = 32;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    87
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    88
# How many empty lines we are allowed to encounter before we 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    89
# stop handling specific sheet. 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    90
my $globalMaxEmptyRowCount = 10;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    91
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    92
my $currFileName = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    93
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    94
##########################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    95
# Error constants
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    96
##########################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    97
my $TEMPLATE_SYNTAX_ERROR = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    98
my $API_DESC_MISSING_ERROR = 10;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    99
my $API_REL_MISSING_ERROR = 11;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   100
my $API_REL_SYNTAX_ERROR = 12;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   101
my $API_REL_LOGICAL_ERROR = 13;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   102
my $API_HEADERS_IN_ROW_ERROR = 14;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   103
my $API_ADAPTATION_ERROR = 15;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   104
my $DLL_SYNTAX_ERROR = 20;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   105
my $LIB_SYNTAX_ERROR = 30;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   106
my $FILE_MORE_THAN_ONE_FILE_ERROR = 40;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   107
my $FILE_COLUMN_SYNTAX_ERROR = 41;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   108
my $FILE_REL_SYNTAX_ERROR = 42;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   109
my $FILE_REL_LOGICAL_ERROR = 43;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   110
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   111
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   112
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   113
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   114
# Functions checks if the template version is supported or not.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   115
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   116
# We only support template version 1.5,1.5.1 and 1.6
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   117
# From 1.5 onwards the template version is located in the "Instructions"-sheet
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   118
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   119
# Params: refToWorkbook,refToTemplateVersion
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   120
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   121
# Return: 0 not supported
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   122
#         1 is supported
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   123
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   124
#         Also the found template version is stored to the refToTemplateVersion
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   125
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   126
sub isSupported
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   127
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   128
    my $refToWb = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   129
    my $refToTemplateVersion = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   130
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   131
    # Get the instructions sheet, since it contains the template version.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   132
    my $refToWorksheet = getWorkSheet $refToWb,"Instructions";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   133
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   134
    # The instructions sheet => then try the main page. In 1.8 the instructions
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   135
    # page was removed.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   136
    if(! defined($refToWorksheet))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   137
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   138
	$refToWorksheet = getWorkSheet $refToWb,"Main";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   139
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   140
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   141
    # No main or instructions sheet => not supported.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   142
    if(! defined($refToWorksheet))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   143
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   144
	return 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   145
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   146
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   147
    # the template version in in cell C2. (both tabs the place is same)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   148
    my $templVersion  = $$refToWorksheet->Cells( 2, 3  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   149
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   150
    if(defined($refToTemplateVersion))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   151
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   152
	$$refToTemplateVersion = $templVersion;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   153
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   154
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   155
    # Support version 1.5 and 1.5.1
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   156
    if( defined($templVersion) && $templVersion =~ /^\s*1\.5(\.1)*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   157
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   158
	return 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   159
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   160
    # Support version 1.6
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   161
    if( defined($templVersion) && $templVersion =~ /^\s*1\.6$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   162
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   163
	return 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   164
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   165
    # Support version 1.7 and 1.7.*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   166
    if( defined($templVersion) && $templVersion =~ /^\s*1\.7(\.[0-9]+)*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   167
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   168
	return 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   169
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   170
    # Support version 1.8 and 1.8.*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   171
    if( defined($templVersion) && $templVersion =~ /^\s*1\.8(\.[0-9]+)*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   172
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   173
	return 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   174
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   175
    # Support version 1.9 and 1.9.*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   176
    if( defined($templVersion) && $templVersion =~ /^\s*1\.9(\.[0-9]+)*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   177
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   178
	return 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   179
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   180
    # Support version 2.0 and 2.0.*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   181
    if( defined($templVersion) && $templVersion =~ /^\s*2\.0(\.[0-9]+)*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   182
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   183
	return 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   184
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   185
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   186
    return 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   187
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   188
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   189
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   190
# Function defines what is the next api ordinal to be used in the 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   191
# hash return by readInfo2 and readCRepInfo2 methods.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   192
# there.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   193
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   194
# Params: refToHash
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   195
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   196
# Return: next ordinal
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   197
##########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   198
sub sortNumerically
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   199
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   200
    $a <=> $b;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   201
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   202
sub getNextOrdinal
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   203
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   204
    my $refToHash = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   205
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   206
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   207
    my @ordinalsInOrder =  sort sortNumerically ( keys(%$refToHash));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   208
    my $highestValue = pop @ordinalsInOrder;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   209
    $highestValue++;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   210
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   211
    return $highestValue;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   212
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   213
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   214
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   215
# Function adds the information in the str into the has, if the information is not
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   216
# there.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   217
# It also separates command separated items before adding them
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   218
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   219
# Params: refToHash, text added.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   220
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   221
# Return: -
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   222
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   223
sub addToHash
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   224
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   225
    my $refToHash = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   226
    my $str = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   227
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   228
    # No need to do anything, if there is nothing to do.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   229
    if(! defined($str) || $str =~ /^\s*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   230
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   231
	return;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   232
    } 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   233
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   234
    # The items can be separated by "," and there could be additional
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   235
    # space before of after the separator.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   236
    my @items = split /\s*[,\n ]+\s*/,$str;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   237
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   238
    my $item;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   239
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   240
    # Add each item to the hash. This is only done, if the item does not
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   241
    # exist there before.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   242
    foreach $item (@items)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   243
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   244
	# all spaces and newlines taken away before addition
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   245
	$item =~ s/\s*//g;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   246
	chomp($item);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   247
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   248
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   249
	# Add if not added earlier (avoiding duplicate entries)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   250
	if( !defined( $$refToHash{$item}) && $item !~ /^\s*N\/A\s*$/i && $item !~ /^\s*\-\s*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   251
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   252
	    # It does not matter what is the value, since we are only interested in the
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   253
	    # key.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   254
	    $$refToHash{$item} = 1; 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   255
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   256
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   257
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   258
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   259
# Function expects to find the fromStr and obsoletedStr in format "Sx0 <rel>, Sx0 <rel>", where x is 6 0r 9.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   260
# It tries to determinate, if the range matches to the given release for the given platform
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   261
# Possible combinations "", "S60 <rel>","S90 <rel>","S60 <rel>, S90 <Rel>"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   262
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   263
# Params: plat, rel, isAPIrow,fromStr, obsoletedStr
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   264
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   265
# Return:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   266
#   1 is part of wanted platform
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   267
#   2 has been removed in this/prev releases
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   268
#   3 is coming in future releases
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   269
#   4 no release for the API in given str
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   270
# Note: 0 is used outside of this function.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   271
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   272
sub isRowWanted
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   273
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   274
    my $plat = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   275
    my $rel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   276
    my $isApiRow = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   277
    my $fromStr = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   278
    my $obsoletedStr = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   279
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   280
    #######################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   281
    # First check the obsoleted field. If that matches, it really does not matter
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   282
    # what is the from string.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   283
    #######################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   284
    if(defined($obsoletedStr) && $obsoletedStr =~ /$plat/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   285
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   286
	# the value was defined and contains the platform wanted.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   287
	# Now extract the release for the wanted platform.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   288
	if($obsoletedStr =~ /$plat\s+([0-9.]+)/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   289
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   290
	    my $obsoletedRelInSheet = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   291
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   292
	    # check, if the line has been obsoleted, if yes then return false.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   293
	    if($rel >= $obsoletedRelInSheet)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   294
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   295
		return 2;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   296
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   297
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   298
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   299
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   300
    #######################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   301
    # If the row was not obsoleted, then check the from-value.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   302
    #######################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   303
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   304
    # If there is no value in the field the item is handled differently depending
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   305
    # if the row is API row or header row.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   306
    if( ! defined($fromStr) || $fromStr =~ /^\s*$/ ||  $fromStr !~ /$plat/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   307
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   308
	return 4;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   309
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   310
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   311
    # The platform was specified in the field. Now find out the number
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   312
    if($fromStr =~ /$plat\s+([0-9.]+)/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   313
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   314
	my $platRelInSheet = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   315
	if( $rel >= $platRelInSheet)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   316
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   317
	    # belongs to the release
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   318
	    return 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   319
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   320
	else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   321
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   322
	    # does not belong to the release
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   323
	    return 3;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   324
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   325
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   326
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   327
    # We should only come here, if the information was somehow wrongly specified.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   328
    # (for instance numbers in the release was not a number, but something else)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   329
    return 4;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   330
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   331
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   332
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   333
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   334
# function sets the given rel value, if the value was defined
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   335
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   336
# Params: referenceToVariable, value
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   337
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   338
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   339
sub setRelValue
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   340
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   341
    my $refToVar = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   342
    my $value = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   343
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   344
    if(defined($value) && $value !~ /^\s*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   345
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   346
	$$refToVar = $value;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   347
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   348
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   349
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   350
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   351
# Function generates an error item
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   352
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   353
# Params: errNbr, ... <other information>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   354
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   355
# Return: reference to an error item list
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   356
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   357
sub getError
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   358
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   359
    my $errNbr = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   360
    my $refToDetailsList = \@_;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   361
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   362
    my @errItem;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   363
    push(@errItem,$errNbr);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   364
    push(@errItem,$currFileName);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   365
    push(@errItem,@$refToDetailsList);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   366
   
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   367
    return \@errItem;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   368
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   369
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   370
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   371
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   372
# Checks the syntax of the given release field
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   373
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   374
# Params: checked rel value
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   375
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   376
# Return:  0 OK
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   377
#         >0 NOK
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   378
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   379
sub checkRel
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   380
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   381
    my $checkedRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   382
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   383
    # No value defined => return OK
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   384
    if($checkedRel == -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   385
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   386
	return 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   387
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   388
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   389
    # Only S60 or S90 release specified
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   390
    if($checkedRel =~ /^\s*S[69]0 [0-9]+\.[0-9]+\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   391
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   392
	return 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   393
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   394
    # Both S60 or S90 release specified
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   395
    if($checkedRel =~ /^\s*S[69]0 [0-9]+\.[0-9]+\s*\,\s*S[69]0 [0-9]+\.[0-9]+\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   396
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   397
	return 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   398
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   399
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   400
    # Otherwise error
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   401
    return 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   402
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   403
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   404
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   405
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   406
# Function checks that the information in the files for given release are OK.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   407
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   408
# Params: refToErrList, checkedPlatform, apiName, sdkRel,oemRel,internalRel,privateRel
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   409
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   410
# Return:  0 no errors found
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   411
#          > 0 amount of  errors found
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   412
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   413
sub checkApiRelRoadMap
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   414
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   415
    my $refToErrorList = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   416
    my $checkedPlatform = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   417
    my $apiName = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   418
    my $apiSdkRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   419
    my $apiOemRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   420
    my $apiInternalRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   421
    my $apiPrivateRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   422
    my $apiDeprecatedRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   423
    my $apiObsoletedRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   424
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   425
    my $sdk = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   426
    my $oem = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   427
    my $int = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   428
    my $priv = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   429
    my $dep = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   430
    my $obs = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   431
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   432
    my $errorsBeforeCheck = scalar(@$refToErrorList);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   433
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   434
    if($apiSdkRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   435
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   436
	$sdk = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   437
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   438
    if($apiOemRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   439
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   440
	$oem = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   441
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   442
    if($apiInternalRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   443
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   444
	$int = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   445
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   446
    if($apiPrivateRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   447
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   448
	$priv = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   449
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   450
    if($apiDeprecatedRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   451
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   452
	$dep = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   453
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   454
    if($apiObsoletedRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   455
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   456
	$obs = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   457
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   458
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   459
    if($sdk != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   460
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   461
	if($sdk < $oem || $sdk < $int || $sdk <  $priv)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   462
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   463
	    push(@$refToErrorList,getError($API_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   464
					   $apiName, "SDK release"));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   465
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   466
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   467
    if($oem != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   468
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   469
	if($oem < $int || $oem <  $priv)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   470
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   471
	    push(@$refToErrorList,getError($API_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   472
					   $apiName, "Oem release"));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   473
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   474
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   475
    if($int != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   476
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   477
	if($int <  $priv)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   478
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   479
	    push(@$refToErrorList,getError($API_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   480
					   $apiName, "Internal release"));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   481
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   482
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   483
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   484
    if($dep != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   485
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   486
	if($dep < $sdk || $dep < $oem || $dep < $int || $dep <  $priv)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   487
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   488
	    push(@$refToErrorList,getError($API_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   489
					   $apiName, "Deprecated release value."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   490
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   491
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   492
    if($obs != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   493
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   494
	if($obs < $sdk || $obs < $oem || $obs < $int || $obs <  $priv || $obs < $dep)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   495
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   496
	    push(@$refToErrorList,getError($API_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   497
					   $apiName, "Obsoleted release value."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   498
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   499
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   500
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   501
    return  scalar(@$refToErrorList) - $errorsBeforeCheck;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   502
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   503
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   504
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   505
# Function checks that the information in the files for given release are OK.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   506
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   507
# Params: refToErrList, checkedPlatform, apiName, fileName,apiSdkRel,apiOemRel,apiInternalRel,apiPrivateRel, 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   508
#         apiDeprecatedRel,apiObsoletedeRel,fileSdkRel,fileOemRel,fileInternalRel,filePrivateRel, 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   509
#         fileDeprecatedRel,fileObsoletedeRel
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   510
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   511
# Return:  0 no errors found
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   512
#          > 0 amount of  errors found
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   513
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   514
sub checkFileRelRoadMap
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   515
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   516
    my $refToErrorList = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   517
    my $checkedPlatform = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   518
    my $apiName = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   519
    my $fileName = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   520
    my $apiSdkRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   521
    my $apiOemRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   522
    my $apiInternalRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   523
    my $apiPrivateRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   524
    my $apiDeprecatedRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   525
    my $apiObsoletedRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   526
    my $fileSdkRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   527
    my $fileOemRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   528
    my $fileInternalRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   529
    my $filePrivateRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   530
    my $fileDeprecatedRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   531
    my $fileObsoletedRel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   532
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   533
    my $apiSdk = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   534
    my $apiOem = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   535
    my $apiInt = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   536
    my $apiPriv = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   537
    my $apiDep = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   538
    my $apiObs = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   539
    my $fileSdk = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   540
    my $fileOem = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   541
    my $fileInt = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   542
    my $filePriv = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   543
    my $fileDep = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   544
    my $fileObs = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   545
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   546
    my $errorsBeforeCheck = scalar(@$refToErrorList);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   547
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   548
    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   549
    # Parse the wanted platform release from all the fields.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   550
    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   551
    if($apiSdkRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   552
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   553
	$apiSdk = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   554
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   555
    if($apiOemRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   556
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   557
	$apiOem = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   558
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   559
    if($apiInternalRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   560
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   561
	$apiInt = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   562
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   563
    if($apiPrivateRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   564
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   565
	$apiPriv = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   566
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   567
    if($apiDeprecatedRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   568
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   569
	$apiDep = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   570
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   571
    if($apiObsoletedRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   572
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   573
	$apiObs = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   574
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   575
    if($fileSdkRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   576
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   577
	$fileSdk = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   578
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   579
    if($fileOemRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   580
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   581
	$fileOem = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   582
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   583
    if($fileInternalRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   584
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   585
	$fileInt = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   586
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   587
    if($filePrivateRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   588
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   589
	$filePriv = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   590
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   591
    if($fileDeprecatedRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   592
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   593
	$fileDep = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   594
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   595
    if($fileObsoletedRel =~ /$checkedPlatform\s+([0-9]+\.[0-9]+)/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   596
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   597
	$fileObs = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   598
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   599
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   600
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   601
    # --------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   602
    # Actual error checking
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   603
    # --------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   604
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   605
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   606
    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   607
    # Check that the file row releases make sence in logical way
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   608
    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   609
    my $currErrAmount = scalar(@$refToErrorList);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   610
    if($fileSdk != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   611
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   612
	if($fileSdk < $fileOem || $fileSdk < $fileInt || $fileSdk <  $filePriv)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   613
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   614
	    push(@$refToErrorList,getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   615
					   "$apiName :: $fileName", "SDK release \"$checkedPlatform $fileSdk\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   616
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   617
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   618
    if($fileOem != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   619
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   620
	if($fileOem < $fileInt || $fileOem <  $filePriv)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   621
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   622
	    push(@$refToErrorList,getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   623
					   "$apiName :: $fileName", "Oem release \"$checkedPlatform $fileOem\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   624
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   625
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   626
    if($fileInt != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   627
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   628
	if($fileInt <  $filePriv)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   629
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   630
	    push(@$refToErrorList,getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   631
					   "$apiName :: $fileName", "Internal release \"$checkedPlatform $fileInt\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   632
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   633
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   634
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   635
    if($fileDep != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   636
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   637
	if($fileDep < $fileSdk || $fileDep < $fileOem || $fileDep < $fileInt || $fileDep <  $filePriv)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   638
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   639
	    push(@$refToErrorList,getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   640
					   "$apiName :: $fileName", "Deprecated release \"$checkedPlatform $fileDep\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   641
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   642
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   643
    if($fileObs != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   644
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   645
	if($fileObs < $fileSdk || $fileObs < $fileOem || $fileObs < $fileInt || $fileObs <  $filePriv || $fileObs < $fileDep)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   646
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   647
	    push(@$refToErrorList,getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   648
					   "$apiName :: $fileName", "Obsoleted release \"$checkedPlatform $fileObs\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   649
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   650
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   651
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   652
    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   653
    # Check the release information for the file compared to the release information defined for the API
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   654
    #  (these are only checked, if there was no syntax errors in the release fields for the file).
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   655
    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   656
    if($currErrAmount == scalar(@$refToErrorList))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   657
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   658
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   659
	# Compare the SDK information in the file against the API rel information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   660
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   661
	if($fileSdk != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   662
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   663
	    # If API is not SDK => error, since file was defined as SDK
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   664
	    if($apiSdk == -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   665
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   666
		push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   667
		     getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   668
			      "$apiName :: $fileName", "File defined as SDK, but API is not a SDK API."));	       
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   669
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   670
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   671
	    else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   672
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   673
		if($fileSdk < $apiSdk)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   674
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   675
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   676
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   677
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   678
				  "File defined as SDK from \"$checkedPlatform $fileSdk\", ",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   679
				  "but API defined as SDK only from \"$checkedPlatform $apiSdk\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   680
		    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   681
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   682
		if($apiObs != -1 && $fileSdk > $apiObs)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   683
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   684
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   685
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   686
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   687
				  "File defined as SDK from \"$checkedPlatform $fileSdk\",",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   688
				  "but API was defined as obsoleted \"$checkedPlatform $apiObs\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   689
		    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   690
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   691
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   692
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   693
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   694
	# Compare the Oem information in the file against the API rel information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   695
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   696
	if($fileOem != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   697
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   698
	    # If API is not Oem => error, since file was defined as Oem
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   699
	    if($apiOem == -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   700
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   701
		push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   702
		     getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   703
			      "$apiName :: $fileName", "File defined as Oem, but API is not an Oem API."));	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   704
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   705
	    else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   706
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   707
		if($fileOem < $apiOem)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   708
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   709
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   710
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   711
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   712
				  "File defined as Oem from \"$checkedPlatform $fileOem\",",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   713
				  "but API defined as OEM only from \"$checkedPlatform $apiOem\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   714
		    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   715
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   716
		if($apiSdk != -1 && $fileOem >= $apiSdk)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   717
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   718
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   719
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   720
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   721
				  "File defined as Oem from \"$checkedPlatform $fileOem\", " ,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   722
				  "but API was defined as SDK from \"$checkedPlatform $apiSdk\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   723
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   724
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   725
		if($apiObs != -1 && $fileOem > $apiObs)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   726
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   727
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   728
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   729
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   730
				  "File defined as Oem from \"$checkedPlatform $fileOem\", ",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   731
				  "but API was defined as obsoleted \"$checkedPlatform $apiObs\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   732
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   733
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   734
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   735
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   736
	# Compare the Internal information in the file against the API rel information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   737
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   738
	if($fileInt != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   739
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   740
	    # If API is not Internal => error, since file was defined as such
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   741
	    if($apiInt == -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   742
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   743
		push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   744
		     getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   745
			      "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   746
			      "File defined as Internal, but API is not an Internal API."));	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   747
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   748
	    else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   749
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   750
		if($fileInt < $apiInt)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   751
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   752
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   753
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   754
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   755
				  "File defined as Internal from \"$checkedPlatform $fileInt\", " ,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   756
				  "but API defined as Internal only from \"$checkedPlatform $apiInt\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   757
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   758
		if($apiSdk != -1 && $fileInt >= $apiSdk )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   759
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   760
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   761
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   762
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   763
				  "File defined as Internal from \"$checkedPlatform $fileInt\", " ,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   764
				  "but API was defined as SDK from \"$checkedPlatform $apiSdk\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   765
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   766
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   767
		if($apiOem != -1 && $fileInt >= $apiOem)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   768
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   769
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   770
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   771
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   772
				  "File defined as Internal from \"$checkedPlatform $fileInt\", " ,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   773
				  "but API was defined as Oem from \"$checkedPlatform $apiOem\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   774
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   775
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   776
		if($apiObs != -1 && $fileInt > $apiObs)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   777
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   778
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   779
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   780
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   781
				  "File defined as Internal from \"$checkedPlatform $fileInt\", " ,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   782
				  "but API was defined as obsoleted \"$checkedPlatform $apiObs\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   783
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   784
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   785
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   786
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   787
	# Compare the Internal information in the file against the API rel information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   788
	#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   789
	if($filePriv != -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   790
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   791
	    # If API is not Private => error, since file was defined as such
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   792
	    if($apiPriv == -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   793
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   794
		push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   795
		     getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   796
			      "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   797
			      "File defined as Private, but API is not an Private API."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   798
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   799
	    else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   800
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   801
		if($filePriv < $apiPriv)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   802
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   803
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   804
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   805
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   806
				  "File defined as Private from \"$checkedPlatform $filePriv\", " ,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   807
				  "but API defined as Private only from \"$checkedPlatform $apiPriv\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   808
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   809
		if($apiSdk != -1 && $filePriv >= $apiSdk)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   810
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   811
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   812
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   813
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   814
				  "File defined as Private from \"$checkedPlatform $filePriv\", " ,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   815
				  "but API was defined as SDK from \"$checkedPlatform $apiSdk\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   816
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   817
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   818
		if($apiOem != -1 && $filePriv >= $apiOem)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   819
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   820
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   821
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   822
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   823
				  "File defined as Private from \"$checkedPlatform $filePriv\", " ,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   824
				  "but API was defined as Oem from \"$checkedPlatform $apiOem\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   825
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   826
		if($apiInt != -1 && $filePriv >= $apiInt)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   827
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   828
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   829
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   830
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   831
				  "File defined as Private from \"$checkedPlatform $filePriv\", " ,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   832
				  "but API was defined as Internal from \"$checkedPlatform $apiInt\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   833
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   834
		if($apiObs != -1 && $filePriv > $apiObs)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   835
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   836
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   837
			 getError($FILE_REL_LOGICAL_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   838
				  "$apiName :: $fileName", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   839
				  "File defined as Private from \"$checkedPlatform $filePriv\", " ,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   840
				  "but API was defined as obsoleted \"$checkedPlatform $apiObs\" onwards."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   841
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   842
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   843
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   844
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   845
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   846
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   847
################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   848
# Function adds the lib to the hash, if it contains valid data
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   849
################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   850
sub addLibToHash
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   851
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   852
    my $refToLibHash = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   853
    my $lib = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   854
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   855
    if($lib !~ /^\s*N\/A\s*$/i && $lib !~ /^\s*\-\s*$/ && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   856
       $lib !~ /\s*\(*\s*ECOM\s*\)*\s*$/i && $lib !~ /^\s*tbd\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   857
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   858
	addToHash $refToLibHash,$lib;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   859
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   860
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   861
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   862
################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   863
# Function adds the dll to the hash, if it contains valid data
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   864
################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   865
sub addDllToHash
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   866
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   867
    my $refToDllHash = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   868
    my $dll = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   869
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   870
    if($dll !~ /^\s*N\/A\s*$/i && $dll !~ /^\s*\-\s*$/ && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   871
       $dll !~ /\s*\(*\s*ECOM\s*\)*\s*$/i && $dll !~ /^\s*tbd\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   872
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   873
	addToHash $refToDllHash,$dll;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   874
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   875
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   876
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   877
# Function that reads specified platform release information from the given worksheet
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   878
#  The information is put to the hashed passed as parameters
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   879
##  		if($dll !~ /^\s*N\/A\s*$/i && $dll !~ /^\s*\-\s*$/ && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   880
#  		   $dll !~ /\s*\(*\s*ECOM\s*\)*\s*$/i && $dll !~ /^\s*tbd\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   881
#  		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   882
#  		    addToHash $refToDllHash,$dll;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   883
#  		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   884
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   885
# Params: referenceToWorksheet,wantedPlatform, wantedRelease, reftoHeaderHash,refToDllHash, refToLibHash,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   886
#         reftoNonSdkHeaders, [refToNonSdkLibsHash]
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   887
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   888
# Return: -
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   889
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   890
sub readInfo     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   891
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   892
    my $refToWorksheet = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   893
    my $plat = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   894
    my $rel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   895
    my $reftoHeaderHash = shift;  # SDK headers
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   896
    my $refToDllHash = shift;     # SDK dll's
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   897
    my $refToLibHash = shift;     # SDK Libs
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   898
    my $refToNonSdkHeaderHash = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   899
    my $refToFutureHeaderHash = shift; # Files that are coming in future releases 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   900
    my $refToRemovedHeaderHash = shift; # Files that are removed in previous releases 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   901
    my $refToNonSdkLibHash = shift;    # optional, migth not exists
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   902
    my $refToFutureLibHash = shift;    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   903
    my $refToRemovedLibHash = shift;   
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   904
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   905
    # check that sheet really exists (it could be missing)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   906
    if(not defined($refToWorksheet))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   907
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   908
	return;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   909
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   910
    # handle optionality
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   911
    if(! defined($refToNonSdkLibHash))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   912
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   913
	my %hash;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   914
	$refToNonSdkLibHash = \%hash;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   915
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   916
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   917
    # look to header information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   918
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   919
    # API Name
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   920
    # Header file(s)    (or "File(s)" in template version 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   921
    # Purpose	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   922
    # Responsible
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   923
    # SDK
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   924
    # Oem               (or "Partner" in template version 1.6->1.8 or "Domain" from 1.9->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   925
    # Internal
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   926
    # Private   (migth be missing, as is the case in the symbian sheet)	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   927
    # Adaptation
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   928
    # Specification
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   929
    # DLL
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   930
    # Import Lib
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   931
    # Other
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   932
    # Grouping           (or "Subsystem" in template version 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   933
    # Clients
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   934
    # Deprecated
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   935
    # Obsoleted          (or "Removed" in template version 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   936
    # Partner(s)         (Only from 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   937
    # Partner Contact(s) (Only from 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   938
    # Owner
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   939
    # Note
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   940
    my $apiNameIndex = getIndexByColName $refToWorksheet,"API Name",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   941
    my $fileNameIndex = getIndexByColName $refToWorksheet,"Header file(s)",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   942
    if( !defined($fileNameIndex) || $fileNameIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   943
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   944
	$fileNameIndex = getIndexByColName $refToWorksheet,"File(s)",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   945
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   946
    my $purposeIndex = getIndexByColName $refToWorksheet,"Purpose",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   947
    my $sdkIndex = getIndexByColName $refToWorksheet,"SDK",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   948
    my $oemIndex = getIndexByColName $refToWorksheet,"Oem",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   949
    if( !defined($oemIndex) || $oemIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   950
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   951
	$oemIndex = getIndexByColName $refToWorksheet,"Partner",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   952
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   953
    if( !defined($oemIndex) || $oemIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   954
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   955
	$oemIndex = getIndexByColName $refToWorksheet,"Domain",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   956
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   957
    my $internalIndex = getIndexByColName $refToWorksheet,"Internal",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   958
    my $privateIndex =  getIndexByColName $refToWorksheet,"Private",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   959
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   960
    my $dllIndex = getIndexByColName $refToWorksheet,"DLL",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   961
    my $libIndex = getIndexByColName $refToWorksheet,"Import Lib",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   962
    my $obsoletedIndex =  getIndexByColName $refToWorksheet,"Obsoleted",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   963
    if( !defined($obsoletedIndex) || $obsoletedIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   964
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   965
	$obsoletedIndex = getIndexByColName $refToWorksheet,"Removed",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   966
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   967
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   968
    my $row = 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   969
    my $isAPIRow = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   970
    my $isRowWanted = 0;  # is the row part of given SDK release
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   971
    my $isAPIWanted = 0;  # is the api part of given SDK release
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   972
    my $emptyRowCount = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   973
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   974
    ######################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   975
    # Loop row by row until we have found $globalMaxEmptyRowCount of rows
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   976
    # empty one after each other.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   977
    ######################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   978
    for( $row = 2;; $row++ ) 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   979
    {	         
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   980
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   981
	# Read the needed rows from the row
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   982
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   983
	my $apiName   = $$refToWorksheet->Cells( $row, $apiNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   984
        my $fileName  = $$refToWorksheet->Cells( $row, $fileNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   985
        my $purpose   = $$refToWorksheet->Cells( $row, $purposeIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   986
        my $sdk       = $$refToWorksheet->Cells( $row, $sdkIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   987
        my $oem       = $$refToWorksheet->Cells( $row, $oemIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   988
        my $internal  = $$refToWorksheet->Cells( $row, $internalIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   989
        my $private;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   990
	if($privateIndex > 0)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   991
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   992
	    $private = $$refToWorksheet->Cells( $row, $privateIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   993
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   994
	my $dll       = $$refToWorksheet->Cells( $row, $dllIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   995
	my $lib       = $$refToWorksheet->Cells( $row, $libIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   996
	my $obsoleted = $$refToWorksheet->Cells( $row, $obsoletedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   997
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   998
	if($apiName =~ /^\s*Comment:/ || $purpose =~ /removed by nokia/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
   999
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1000
	    next;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1001
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1002
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1003
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1004
	# We only allow $globalMaxEmptyRowCount empty rows, before we stop
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1005
	# handling the specific sheet
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1006
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1007
	if(! (defined($apiName) || defined($fileName)|| defined($dll) ||
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1008
	      defined($lib) || defined($obsoleted)))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1009
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1010
	    $emptyRowCount++;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1011
	    if($emptyRowCount > $globalMaxEmptyRowCount)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1012
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1013
		last;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1014
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1015
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1016
	else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1017
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1018
	    # Was not empty line, reset counter.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1019
	    $emptyRowCount = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1020
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1021
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1022
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1023
	# Check, if is an api line and is the API wanted
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1024
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1025
        $isAPIRow = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1026
        if(defined($apiName) and $apiName !~ /^\s*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1027
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1028
	    $isAPIRow = 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1029
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1030
	# Check, if the line is wanted
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1031
        $isRowWanted = isRowWanted  $plat,$rel,$isAPIRow,$sdk,$obsoleted;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1032
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1033
	# Case where the api/file was not wanted 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1034
	if($isRowWanted == 4)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1035
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1036
	    my $isRowWanted2 = isRowWanted  $plat,$rel,$isAPIRow,$oem,$obsoleted;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1037
	    if($isRowWanted2 == 4)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1038
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1039
		$isRowWanted2 = isRowWanted  $plat,$rel,$isAPIRow,$internal,$obsoleted;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1040
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1041
# Do not check the private field, since those are not in epoc32/include
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1042
#  	    if($isRowWanted2 == 4 && $privateIndex > 0)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1043
#  	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1044
#  		$isRowWanted2 = isRowWanted  $plat,$rel,$isAPIRow,$private,$obsoleted;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1045
#  	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1046
	    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1047
	    if($isRowWanted2 == 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1048
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1049
		# means that the row is in the release, but non-sdk
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1050
		$isRowWanted = 4;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1051
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1052
	    else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1053
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1054
		$isRowWanted = $isRowWanted2;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1055
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1056
	} # if($isRowWanted == 4)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1057
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1058
        # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1059
        # Handle the API line
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1060
        # ----------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1061
        if($isAPIRow == 1 || ($isAPIRow == 0 && $isRowWanted != 1))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1062
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1063
	    # Store the information in the separate variable, since we
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1064
	    # need the information, when handling headers (reason is that
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1065
	    # the headers can override the API information, but normally the 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1066
	    # API information is directly the headers information)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1067
	    $isAPIWanted = $isRowWanted if $isAPIRow == 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1068
	    if($isAPIWanted == 1 && $isRowWanted != 2 && $isRowWanted != 3)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1069
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1070
		# NOTE: in the following addings, we do not add  "N/A", "TBD","(ECOM)"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1071
		#       "ECOM", "-" values
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1072
		#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1073
		# Add the information to the hashes. They migth not all contain
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1074
		# information, but the called function handles the case.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1075
		# (for instance there should be no headers defined)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1076
		
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1077
		if($fileName !~ /^\s*tbd\s*$/i && $fileName !~ /^\s*DIR:/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1078
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1079
		    addToHash $reftoHeaderHash,$fileName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1080
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1081
		addDllToHash $refToDllHash,$dll;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1082
		addLibToHash $refToLibHash,$lib;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1083
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1084
	    elsif($isAPIWanted == 2 || $isRowWanted == 2)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1085
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1086
		if($fileName !~ /^\s*tbd\s*$/i && $fileName !~ /^\s*DIR:/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1087
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1088
		    addToHash $refToRemovedHeaderHash,$fileName;		
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1089
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1090
		addLibToHash $refToRemovedLibHash,$lib;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1091
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1092
	    elsif($isAPIWanted == 3 || $isRowWanted == 3)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1093
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1094
		if($fileName !~ /^\s*tbd\s*$/i && $fileName !~ /^\s*DIR:/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1095
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1096
		    addToHash $refToFutureHeaderHash,$fileName;		
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1097
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1098
		addLibToHash $refToFutureLibHash,$lib;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1099
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1100
	    elsif($isAPIWanted != 4)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1101
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1102
		if($fileName !~ /^\s*tbd\s*$/i && $fileName !~ /^\s*DIR:/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1103
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1104
		    addToHash $refToNonSdkHeaderHash,$fileName;		
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1105
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1106
		addLibToHash $refToNonSdkLibHash,$lib;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1107
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1108
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1109
        # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1110
        # Handle the header line, if the API is wanted and row is wanted
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1111
        # ----------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1112
        elsif($isRowWanted == 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1113
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1114
	    if($isAPIWanted == 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1115
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1116
		# Add the information to the hashes. They migth not all contain
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1117
		# information, but the called function handles the case.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1118
		if($fileName !~ /^\s*tbd\s*$/i && $fileName !~ /^\s*DIR:/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1119
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1120
		    addToHash $reftoHeaderHash,$fileName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1121
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1122
		addDllToHash $refToDllHash,$dll;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1123
		addLibToHash $refToLibHash,$lib;	    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1124
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1125
	    # If the api row was empty => private or no release specified => do not include it anywhere.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1126
	    elsif($isAPIWanted != 4)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1127
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1128
		if($fileName !~ /^\s*tbd\s*$/i && $fileName !~ /^\s*DIR:/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1129
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1130
		    addToHash $refToNonSdkHeaderHash,$fileName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1131
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1132
		addLibToHash $refToNonSdkLibHash,$lib;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1133
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1134
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1135
        # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1136
        # Handle the header line, row is not wanted
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1137
        # ----------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1138
#  	else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1139
#  	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1140
#  	    if($fileName !~ /^\s*tbd\s*$/i && $fileName !~ /^\s*DIR:/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1141
#  	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1142
#  		addToHash $refToNonSdkHeaderHash,$fileName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1143
#  	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1144
#  	    addLibToHash $refToNonSdkLibHash,$lib;	    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1145
#	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1146
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1147
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1148
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1149
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1150
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1151
# Function that reads all the information in the given interface sheet and checks 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1152
#  for conlicts/inconsistencies.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1153
# The following things are currently checked:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1154
#   - The 1 row is according to the template (at least the most important fields)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1155
#   - API row
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1156
#        *  always contains Description
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1157
#        * The SDK/OEM/Internal/Private/deprecated/obsoleted column values are in correct syntax
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1158
#        * API row has to contain at least 1 categorization
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1159
#        * There are no headers defined in the API row
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1160
#   - The lib field 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1161
#        * Does not contain "dll" definitions
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1162
#        * No "TBD" values
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1163
#   - The dll field 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1164
#        * Does not contain "lib" definitions
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1165
#        * No "TBD" values
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1166
#   - The header row
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1167
#        * exactly one file for each row
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1168
#        * only allowed values (no TBD for example)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1169
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1170
# Params: referenceToWorksheet, Sheet name, refToConflictList
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1171
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1172
# Return: -
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1173
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1174
# The syntax of refToConflictList  is:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1175
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1176
#  errorTypes:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1177
#     0  = incorrect template format, details is the description as text
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1178
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1179
#   (
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1180
#    (errorType,<details, format depends on the errprType (see above))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1181
#   (
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1182
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1183
sub checkConflicts
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1184
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1185
    my $refToWorksheet = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1186
    my $sheetName = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1187
    my $refToErrorList = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1188
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1189
    # check that sheet really exists (it could be missing)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1190
    if(not defined($refToWorksheet))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1191
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1192
	return;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1193
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1194
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1195
    $sheetName =~ /([a-zA-Z0-9_ \.]+\.xls)/i;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1196
    $currFileName = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1197
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1198
    # look to header information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1199
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1200
    # API Name
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1201
    # Header file(s)    (or "File(s)" in template version 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1202
    # Purpose	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1203
    # Responsible
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1204
    # SDK
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1205
    # Oem               (or "Partner" in template version 1.6->1.8 or "Domain" from 1.9->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1206
    # Internal
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1207
    # Private   (migth be missing, as is the case in the symbian sheet)	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1208
    # Adaptation
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1209
    # Specification
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1210
    # DLL
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1211
    # Import Lib
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1212
    # Other
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1213
    # Grouping           (or "Subsystem" in template version 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1214
    # Clients
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1215
    # Deprecated
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1216
    # Obsoleted          (or "Removed" in template version 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1217
    # Partner(s)         (Only from 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1218
    # Partner Contact(s) (Only from 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1219
    # Owner
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1220
    # Note
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1221
    my $apiNameIndex = getIndexByColName $refToWorksheet,"API Name",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1222
    my $fileNameIndex = getIndexByColName $refToWorksheet,"Header file(s)",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1223
    if( !defined($fileNameIndex) || $fileNameIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1224
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1225
	$fileNameIndex = getIndexByColName $refToWorksheet,"File(s)",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1226
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1227
    my $purposeIndex = getIndexByColName $refToWorksheet,"Purpose",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1228
    my $sdkIndex = getIndexByColName $refToWorksheet,"SDK",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1229
    my $oemIndex = getIndexByColName $refToWorksheet,"Oem",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1230
    if( !defined($oemIndex) || $oemIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1231
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1232
	$oemIndex = getIndexByColName $refToWorksheet,"Partner",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1233
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1234
    if( !defined($oemIndex) || $oemIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1235
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1236
	$oemIndex = getIndexByColName $refToWorksheet,"Domain",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1237
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1238
    my $internalIndex = getIndexByColName $refToWorksheet,"Internal",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1239
    my $privateIndex =  getIndexByColName $refToWorksheet,"Private",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1240
    my $adaptIndex = getIndexByColName $refToWorksheet,"Adaptation",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1241
    my $dllIndex = getIndexByColName $refToWorksheet,"DLL",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1242
    my $libIndex = getIndexByColName $refToWorksheet,"Import Lib",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1243
    my $deprecatedIndex =  getIndexByColName $refToWorksheet,"Deprecated",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1244
    my $obsoletedIndex =  getIndexByColName $refToWorksheet,"Obsoleted",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1245
    if( !defined($obsoletedIndex) || $obsoletedIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1246
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1247
	$obsoletedIndex = getIndexByColName $refToWorksheet,"Removed",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1248
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1249
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1250
    #############################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1251
    # Check, that column names are correct ones
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1252
    #############################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1253
    if($apiNameIndex < 0 || $fileNameIndex < 0 || $sdkIndex < 0 || 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1254
       $oemIndex < 0 ||  $internalIndex < 0)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1255
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1256
	push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1257
	     getError($TEMPLATE_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1258
		      "The column names are not according to the template."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1259
	return;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1260
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1261
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1262
    my $row = 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1263
    my $isAPIRow = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1264
    my $isRowWanted = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1265
    my $isAPIWanted = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1266
    my $emptyRowCount = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1267
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1268
    my $isConflict = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1269
    my $currApiName = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1270
    my $apiSdkRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1271
    my $apiOemRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1272
    my $apiInternalRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1273
    my $apiPrivateRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1274
    my $apiDeprecatedRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1275
    my $apiObsoletedRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1276
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1277
    my $currApiRelInfoOK = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1278
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1279
    ######################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1280
    # Loop row by row until we have found $globalMaxEmptyRowCount of rows
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1281
    # empty one after each other.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1282
    ######################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1283
    for( $row = 2;; $row++ ) 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1284
    {	         
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1285
	$isConflict = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1286
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1287
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1288
	# Read the needed rows from the row
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1289
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1290
	my $apiName   = $$refToWorksheet->Cells( $row, $apiNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1291
        my $fileName    = $$refToWorksheet->Cells( $row, $fileNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1292
        my $purpose   = $$refToWorksheet->Cells( $row, $purposeIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1293
        my $sdk       = $$refToWorksheet->Cells( $row, $sdkIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1294
	my $oem       = $$refToWorksheet->Cells( $row, $oemIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1295
	my $internal  = $$refToWorksheet->Cells( $row, $internalIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1296
	my $adapt     = $$refToWorksheet->Cells( $row, $adaptIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1297
	my $dll       = $$refToWorksheet->Cells( $row, $dllIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1298
	my $lib       = $$refToWorksheet->Cells( $row, $libIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1299
	my $deprecated = $$refToWorksheet->Cells( $row, $deprecatedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1300
	my $obsoleted = $$refToWorksheet->Cells( $row, $obsoletedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1301
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1302
	my $private;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1303
	if($privateIndex > 0)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1304
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1305
	    $private   = $$refToWorksheet->Cells( $row, $privateIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1306
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1307
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1308
	# We only allow $globalMaxEmptyRowCount empty rows, before we stop
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1309
	# handling the specific sheet
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1310
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1311
	if(! (defined($apiName) || defined($fileName)|| defined($dll) ||
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1312
	      defined($lib) || defined($obsoleted)))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1313
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1314
	    $emptyRowCount++;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1315
	    if($emptyRowCount > $globalMaxEmptyRowCount)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1316
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1317
		last;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1318
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1319
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1320
	else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1321
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1322
	    # Was not empty line, reset counter.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1323
	    $emptyRowCount = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1324
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1325
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1326
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1327
	# Handle API row
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1328
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1329
        $isAPIRow = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1330
        if(defined($apiName) and $apiName !~ /^\s*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1331
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1332
	    $isAPIRow = 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1333
	    $currApiRelInfoOK = 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1334
	    $currApiName = $apiName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1335
	    # Reset the release values and set new values to them.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1336
	    $apiSdkRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1337
	    $apiOemRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1338
	    $apiInternalRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1339
	    $apiPrivateRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1340
	    $apiDeprecatedRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1341
	    $apiObsoletedRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1342
	    setRelValue(\$apiSdkRel,$sdk);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1343
	    setRelValue(\$apiOemRel,$oem);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1344
	    setRelValue(\$apiInternalRel,$internal);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1345
	    setRelValue(\$apiDeprecatedRel,$deprecated);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1346
	    setRelValue(\$apiObsoletedRel,$obsoleted);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1347
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1348
	    if($privateIndex > -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1349
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1350
		setRelValue(\$apiPrivateRel,$private);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1351
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1352
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1353
	    if($apiName =~ /^\s*Comment:/ || $purpose =~ /removed by nokia/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1354
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1355
		next;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1356
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1357
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1358
	    ################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1359
            # Error checking
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1360
	    ################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1361
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1362
	    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1363
	    # API description is needed
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1364
	    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1365
	    if(!defined($purpose) || $purpose =~ /^\s*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1366
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1367
		push(@$refToErrorList,getError($API_DESC_MISSING_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1368
					       $currApiName));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1369
	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1370
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1371
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1372
	    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1373
	    # Adaptation field has to be set for API
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1374
	    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1375
	    if($purpose !~ /is a collection api/i && defined($adapt))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1376
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1377
		if( $adapt !~ /^\s*No\s*$/ && $adapt !~ /^\s*Yes\s*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1378
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1379
		    push(@$refToErrorList,getError($API_ADAPTATION_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1380
						   $currApiName,"Value was: \"$adapt\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1381
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1382
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1383
	    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1384
	    # Check that release information is in correct format
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1385
	    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1386
	    my $currErrAmount = scalar(@$refToErrorList);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1387
	    if(checkRel($apiSdkRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1388
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1389
		push(@$refToErrorList,getError($API_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1390
					       $currApiName,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1391
					       "SDK release value \"$apiSdkRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1392
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1393
	    if(checkRel($apiOemRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1394
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1395
		push(@$refToErrorList,getError($API_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1396
					       $currApiName,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1397
					       "OEM release value \"$apiOemRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1398
	    }   
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1399
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1400
	    if(checkRel($apiInternalRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1401
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1402
		push(@$refToErrorList,getError($API_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1403
					       $currApiName,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1404
					       "Internal release value \"$apiInternalRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1405
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1406
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1407
	    if($privateIndex > -1 && checkRel($apiPrivateRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1408
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1409
		push(@$refToErrorList,getError($API_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1410
					       $currApiName,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1411
					       "Private release value \"$apiPrivateRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1412
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1413
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1414
	    if(checkRel($apiDeprecatedRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1415
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1416
		push(@$refToErrorList,getError($API_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1417
					       $currApiName,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1418
					       "Deprecated release value \"$apiDeprecatedRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1419
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1420
	    if(checkRel($apiObsoletedRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1421
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1422
		push(@$refToErrorList,getError($API_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1423
					       $currApiName,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1424
					       "Obsoleted release value \"$apiObsoletedRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1425
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1426
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1427
	    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1428
	    # Check the release information for the api
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1429
	    #  (these are only checked, if there was no syntax errors in the release fields.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1430
            #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1431
	    if($currErrAmount == scalar(@$refToErrorList))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1432
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1433
		# 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1434
		# Check that there is at least one release for the API.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1435
		# 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1436
		if($apiSdkRel == -1 && $apiOemRel == -1 && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1437
		   $apiInternalRel == -1 && $apiPrivateRel == -1 && $purpose !~ /is a collection api/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1438
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1439
		    push(@$refToErrorList,getError($API_REL_MISSING_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1440
						   $currApiName));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1441
		    $currApiRelInfoOK = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1442
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1443
		elsif($apiSdkRel == -1 && $apiOemRel == -1 && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1444
		      $apiInternalRel == -1 && $apiPrivateRel == -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1445
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1446
		    if(checkApiRelRoadMap($refToErrorList,"S60",$currApiName,$apiSdkRel,$apiOemRel,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1447
					$apiInternalRel,$apiPrivateRel,$apiDeprecatedRel,$apiObsoletedRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1448
		    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1449
			$currApiRelInfoOK = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1450
		    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1451
		    if(checkApiRelRoadMap($refToErrorList,"S90",$currApiName,$apiSdkRel,$apiOemRel,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1452
					$apiInternalRel,$apiPrivateRel,$apiDeprecatedRel,$apiObsoletedRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1453
		    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1454
			$currApiRelInfoOK = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1455
		    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1456
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1457
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1458
	    else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1459
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1460
		$currApiRelInfoOK = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1461
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1462
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1463
	    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1464
	    # Check that there are no headers defined in the API row
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1465
	    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1466
	    if($fileName !~ /^\s*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1467
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1468
		push(@$refToErrorList,getError($API_HEADERS_IN_ROW_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1469
					       $currApiName));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1470
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1471
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1472
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1473
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1474
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1475
	# Check the LIB and DLL fields.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1476
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1477
	if(defined($dll) && $dll !~ /^\s*$/ && $dll !~ /\s*\(*\s*ECOM\s*\)*\s*$/i && $dll !~ /^\s*tbd\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1478
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1479
	    if( $dll =~ /\.lib/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1480
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1481
		push(@$refToErrorList,getError($DLL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1482
					       $currApiName,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1483
					       "DLL column contains LIBs."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1484
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1485
	    elsif( $dll !~ /\.[dll|agt|nif|prt|csy|mdl]/i && $dll !~ /^\s*N\/A\s*$/i && $dll !~ /^\s*\-\s*$/i )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1486
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1487
		push(@$refToErrorList,getError($DLL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1488
					       $currApiName,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1489
					       "DLL column contains illegal value(s):", 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1490
					       " \"$dll\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1491
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1492
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1493
	if(defined($lib) && $lib !~ /^\s*$/ && $lib !~ /\s*\(*\s*ECOM\s*\)*\s*$/i && $lib !~ /^\s*tbd\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1494
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1495
	    if( $lib =~ /\.dll/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1496
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1497
		push(@$refToErrorList,getError($LIB_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1498
					       $currApiName, 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1499
					       "LIB column contains DLLs."));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1500
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1501
	    elsif( $lib !~ /\.lib/i && $lib !~ /^\s*N\/A\s*$/i && $lib !~ /^\s*\-s*$/i )
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1502
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1503
		push(@$refToErrorList,getError($LIB_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1504
					       $currApiName, 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1505
					       "LIB column contains illegal values.",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1506
					       "\"$lib\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1507
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1508
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1509
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1510
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1511
	# Check file definition rows (only if the api row was ok) 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1512
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1513
	if($isAPIRow == 0  && defined($fileName) && $fileName !~ /^\s*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1514
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1515
	    # Set the release values for header information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1516
	    my $hdrSdkRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1517
	    my $hdrOemRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1518
	    my $hdrInternalRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1519
	    my $hdrPrivateRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1520
	    my $hdrDeprecatedRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1521
	    my $hdrObsoletedRel = -1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1522
	    setRelValue(\$hdrSdkRel,$sdk);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1523
	    setRelValue(\$hdrOemRel,$oem);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1524
	    setRelValue(\$hdrInternalRel,$internal);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1525
	    setRelValue(\$hdrDeprecatedRel,$deprecated);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1526
	    setRelValue(\$hdrObsoletedRel,$obsoleted);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1527
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1528
	    if($privateIndex > -1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1529
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1530
		setRelValue(\$hdrPrivateRel,$private);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1531
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1532
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1533
	    ################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1534
	    # Error checking
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1535
	    ################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1536
	    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1537
	    # Check that only allowed values are used
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1538
	    if( $fileName !~ /^\s*DIR:/i  && $fileName !~ /^\s*FILE:/i &&
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1539
		$fileName !~ /^\s*[a-zA-Z0-9\\\/_-]+\.[h|inl|rh|hrh|loc|pan]/i && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1540
		$fileName !~ /^\s*tbd\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1541
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1542
		push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1543
		     getError($FILE_COLUMN_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1544
			      $currApiName,"\"$fileName\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1545
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1546
	    # 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1547
            # Check that there is only 1 file in the row.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1548
	    #
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1549
	    elsif($fileName =~ /(\.[h|inl|rh|hrh|loc|pan])/ig)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1550
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1551
		my @list;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1552
		@list = ($fileName =~ /(\.[h|inl|rh|hrh|loc|pan])/ig);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1553
		if(scalar(@list) > 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1554
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1555
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1556
			 getError($FILE_MORE_THAN_ONE_FILE_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1557
				  $currApiName, "\"$fileName\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1558
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1559
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1560
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1561
	    # 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1562
	    # Check that the release information is correctly defined
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1563
	    # (only checked, if API row was OK from that point 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1564
	    if($currApiRelInfoOK == 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1565
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1566
		#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1567
		# Check that release information is in correct format
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1568
		#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1569
		my $currErrAmount = scalar(@$refToErrorList);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1570
		if(checkRel($hdrSdkRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1571
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1572
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1573
			 getError($FILE_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1574
				  "$currApiName :: $fileName",
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1575
				  "SDK release value \"$hdrSdkRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1576
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1577
		if(checkRel($hdrOemRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1578
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1579
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1580
			 getError($FILE_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1581
				  "$currApiName :: $fileName", "OEM release value \"$hdrOemRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1582
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1583
		if(checkRel($hdrInternalRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1584
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1585
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1586
			 getError($FILE_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1587
				  "$currApiName :: $fileName", "Internal release value \"$hdrInternalRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1588
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1589
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1590
		if($privateIndex > -1 && checkRel($hdrPrivateRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1591
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1592
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1593
			 getError($FILE_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1594
				  "$currApiName :: $fileName", "Private release value \"$hdrPrivateRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1595
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1596
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1597
		if(checkRel($hdrDeprecatedRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1598
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1599
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1600
			 getError($FILE_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1601
				  "$currApiName :: $fileName", "Deprecated release value \"$hdrDeprecatedRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1602
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1603
		if(checkRel($hdrObsoletedRel))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1604
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1605
		    push(@$refToErrorList,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1606
			 getError($FILE_REL_SYNTAX_ERROR,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1607
				  "$currApiName :: $fileName", "Obsoleted release value \"$hdrObsoletedRel\""));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1608
		}		
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1609
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1610
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1611
		#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1612
		# Check the release information for the file
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1613
		#  (these are only checked, if there was no syntax errors in the release fields.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1614
		#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1615
		if($currErrAmount == scalar(@$refToErrorList))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1616
		{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1617
		    checkFileRelRoadMap($refToErrorList,"S60",$currApiName,$fileName,$apiSdkRel,$apiOemRel,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1618
					 $apiInternalRel,$apiPrivateRel,$apiDeprecatedRel,$apiObsoletedRel,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1619
					 $hdrSdkRel,$hdrOemRel,$hdrInternalRel,$hdrPrivateRel,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1620
					 $hdrDeprecatedRel,$hdrObsoletedRel);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1621
		    checkFileRelRoadMap($refToErrorList,"S90",$currApiName,$fileName,$apiSdkRel,$apiOemRel,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1622
					 $apiInternalRel,$apiPrivateRel,$apiDeprecatedRel,$apiObsoletedRel,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1623
					 $hdrSdkRel,$hdrOemRel,$hdrInternalRel,$hdrPrivateRel,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1624
					 $hdrDeprecatedRel,$hdrObsoletedRel);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1625
		}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1626
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1627
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1628
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1629
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1630
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1631
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1632
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1633
#################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1634
# Extracs from the given string S60 and S90 releases
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1635
# and puts then into the hash, if releases were found.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1636
#################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1637
sub addToTypeHash
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1638
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1639
    my $refToHash = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1640
    my $str = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1641
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1642
    if($str=~ /S60\s+([0-9.]+)/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1643
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1644
	$$refToHash{"s60"} = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1645
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1646
    if($str=~ /S90\s+([0-9.]+)/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1647
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1648
	$$refToHash{"s90"} = $1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1649
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1650
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1651
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1652
# Function that reads certain columns from the interface sheet to the given hash.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1653
# The function is intended to be called for the c++ API definitions.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1654
# For the cenrep/P&S APIs use the "readCrepInfo2"-function
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1655
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1656
# The format of the returned hash is:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1657
#  {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1658
#    <ordinal>  => 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1659
#                  {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1660
#                  "api_name" => <APIName>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1661
#                  "api_type" => "1"    # 1 means c++, 2 means cenrep/P&S apis 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1662
#                  "owner_entity" => <API owner entity>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1663
#                  "files" => {<file1> => 1 ,<file2> => 1,...}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1664
#                  "purpose"      => <purpose text>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1665
#                  "sdk"          => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1666
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1667
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1668
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1669
#                  "partner"      => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1670
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1671
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1672
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1673
#                  "internal"     => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1674
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1675
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1676
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1677
#                  "private"      => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1678
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1679
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1680
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1681
#                  "adapt"      => "0 = no adaptation, 1 = adaptation"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1682
#                  "specification" => <spec name(s)>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1683
#                  "dll"       => {<dll1> => 1,<dll2> => 1,...}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1684
#                  "lib"       => {<dll1> => 1,<dll2> => 1,...}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1685
#                  "subsystem" => <subsystem name>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1686
#                  "deprecated"   => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1687
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1688
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1689
#                          my $refToHash = shift;          }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1690
#                  "removed"      => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1691
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1692
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1693
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1694
#                  "partners"         => <namesStr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1695
#                  "partner_contacts" => <namesStr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1696
#                  "base"      => "0 = not base service, 1 = is base service"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1697
#                  "clients"          => <namesStr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1698
#                  "clients_org"      => <namesStr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1699
#                  "owner"        => <API owner name>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1700
#                  "for_adapt_since"   => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1701
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1702
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1703
#                  "for_adapt_deprecated"   => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1704
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1705
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1706
#                  "for_adapt_removed"      => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1707
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1708
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1709
#                  "extended_sdk_since"   => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1710
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1711
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1712
#                  "extended_sdk_deprecated"   => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1713
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1714
#                          my $refToHash = shift;          }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1715
#                  "extended_sdmy $refToHash = shift;k_removed"      => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1716
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1717
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1718
#                  }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1719
# etc....
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1720
#  }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1721
# Note the that refToHash is assumed to be an empty hash.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1722
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1723
# Note 1: The S60/s90 keys are not defined, if there was no information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1724
#         in the type for the API.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1725
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1726
# Params: referenceToWorksheet,refToHash,defOwnerEntity,defOwner
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1727
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1728
# Return: -
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1729
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1730
sub readInfo2     
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1731
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1732
    my $refToWorksheet = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1733
    my $refToHash = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1734
    my $defOwnerEntity = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1735
    my $defOwner = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1736
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1737
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1738
    # check that sheet really exists (it could be missing)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1739
    if(not defined($refToWorksheet))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1740
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1741
	return;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1742
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1743
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1744
    # getNextOrdinal
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1745
    my $nextOrdinal = getNextOrdinal $refToHash;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1746
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1747
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1748
    # look to header information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1749
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1750
    # API Name
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1751
    # Header file(s)    (or "File(s)" in template version 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1752
    # Purpose	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1753
    # Responsible
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1754
    # SDK
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1755
    # Oem               (or "Partner" in template version 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1756
    # Internal
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1757
    # Private   (migth be missing, as is the case in the symbian sheet)	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1758
    # Adaptation
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1759
    # Specification
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1760
    # DLL
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1761
    # Import Lib
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1762
    # Other
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1763
    # Grouping           (or "Subsystem" in template version 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1764
    # Clients
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1765
    # Deprecated
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1766
    # Obsoleted          (or "Removed" in template version 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1767
    # Partner(s)         (Only from 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1768
    # Partner Contact(s) (Only from 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1769
    # Owner
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1770
    # Note
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1771
    # For Adaptation Since (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1772
    # For Adaptation Deprecated (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1773
    # For Adaptation Removed (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1774
    # Extended SDK Since (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1775
    # Extended SDK Depricated (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1776
    # Extended SDK Removed (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1777
    my $ownerNameEntityIndex = getIndexByColName $refToWorksheet,"Owner Entity",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1778
    my $apiNameIndex = getIndexByColName $refToWorksheet,"API Name",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1779
    my $fileNameIndex = getIndexByColName $refToWorksheet,"Header file(s)",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1780
    if( !defined($fileNameIndex) || $fileNameIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1781
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1782
	$fileNameIndex = getIndexByColName $refToWorksheet,"File(s)",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1783
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1784
    my $purposeIndex = getIndexByColName $refToWorksheet,"Purpose",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1785
    my $sdkIndex = getIndexByColName $refToWorksheet,"SDK",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1786
    my $oemIndex = getIndexByColName $refToWorksheet,"Oem",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1787
    if( !defined($oemIndex) || $oemIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1788
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1789
	$oemIndex = getIndexByColName $refToWorksheet,"Partner",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1790
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1791
    if( !defined($oemIndex) || $oemIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1792
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1793
	$oemIndex = getIndexByColName $refToWorksheet,"Domain",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1794
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1795
    my $internalIndex = getIndexByColName $refToWorksheet,"Internal",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1796
    my $privateIndex =  getIndexByColName $refToWorksheet,"Private",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1797
    my $adaptIndex = getIndexByColName $refToWorksheet,"Adaptation",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1798
    my $specificationIndex = getIndexByColName $refToWorksheet,"Specification",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1799
    my $dllIndex = getIndexByColName $refToWorksheet,"DLL",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1800
    my $libIndex = getIndexByColName $refToWorksheet,"Import Lib",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1801
    my $ssNameIndex = getIndexByColName $refToWorksheet,"Subsystem",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1802
    if( !defined($ssNameIndex) || $ssNameIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1803
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1804
	$ssNameIndex = getIndexByColName $refToWorksheet,"Grouping",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1805
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1806
    my $deprecatedIndex =  getIndexByColName $refToWorksheet,"Deprecated",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1807
    my $removedIndex =  getIndexByColName $refToWorksheet,"Obsoleted",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1808
    if( !defined($removedIndex) || $removedIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1809
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1810
	$removedIndex = getIndexByColName $refToWorksheet,"Removed",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1811
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1812
    my $partnerIndex = getIndexByColName $refToWorksheet,"Partner(s)",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1813
    my $partnerContactIndex = getIndexByColName $refToWorksheet,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1814
                                              "Partner Contact(s)",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1815
    my $baseServiceIndex = getIndexByColName $refToWorksheet,"Base Service",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1816
    my $clientIndex = getIndexByColName $refToWorksheet,"Clients",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1817
    my $clientOrgIndex = getIndexByColName $refToWorksheet,"Client Org",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1818
    my $ownerNameIndex = getIndexByColName $refToWorksheet,"Owner",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1819
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1820
    my $forAdaptationSinceIndex = getIndexByColName $refToWorksheet,"For Adaptation Since",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1821
    my $forAdaptationDeprecatedIndex = getIndexByColName $refToWorksheet,"For Adaptation Deprecated",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1822
    my $forAdaptationRemovedIndex = getIndexByColName $refToWorksheet,"For Adaptation Removed",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1823
    my $extendedSDKSinceIndex = getIndexByColName $refToWorksheet,"Extended SDK Since",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1824
    my $extendedSDKDeprecatedIndex = getIndexByColName $refToWorksheet,"Extended SDK Depricated",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1825
    my $extendedSDKRemovedIndex = getIndexByColName $refToWorksheet,"Extended SDK Removed",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1826
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1827
    my $row = 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1828
    my $emptyRowCount = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1829
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1830
    ######################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1831
    # Loop row by row until we have found $globalMaxEmptyRowCount of rows
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1832
    # empty one after each other.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1833
    ######################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1834
    my $currApiName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1835
    my $currApiOrdinal;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1836
    for( $row = 2;; $row++ ) 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1837
    {	         
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1838
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1839
	# Read the needed rows from the row
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1840
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1841
	my $ownerEntity =  $defOwnerEntity;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1842
	if($ownerNameEntityIndex > 0)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1843
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1844
	    $ownerEntity = $$refToWorksheet->Cells( $row, $ownerNameEntityIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1845
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1846
	my $apiName   = $$refToWorksheet->Cells( $row, $apiNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1847
        my $fileName  = $$refToWorksheet->Cells( $row, $fileNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1848
        my $purpose   = $$refToWorksheet->Cells( $row, $purposeIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1849
        my $sdk       = $$refToWorksheet->Cells( $row, $sdkIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1850
	my $oem       = $$refToWorksheet->Cells( $row, $oemIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1851
	my $internal  = $$refToWorksheet->Cells( $row, $internalIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1852
	my $private  = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1853
	if($privateIndex > 0)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1854
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1855
	    $private = $$refToWorksheet->Cells( $row, $privateIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1856
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1857
	my $adapt     = $$refToWorksheet->Cells( $row, $adaptIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1858
	my $specification = $$refToWorksheet->Cells( $row, $specificationIndex   )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1859
	my $dll       = $$refToWorksheet->Cells( $row, $dllIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1860
	my $lib       = $$refToWorksheet->Cells( $row, $libIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1861
	my $ssName    = $$refToWorksheet->Cells( $row, $ssNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1862
	my $deprecated = $$refToWorksheet->Cells( $row, $deprecatedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1863
	my $removed    = $$refToWorksheet->Cells( $row, $removedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1864
	my $partner = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1865
	$partner = $$refToWorksheet->Cells( $row, $partnerIndex  )->{ 'Value' } if $partnerIndex > 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1866
	my $partnerContact = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1867
	$partnerContact = $$refToWorksheet->Cells( $row, $partnerContactIndex  )->{ 'Value' } if $partnerContactIndex > 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1868
	my $baseService = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1869
	$baseService = $$refToWorksheet->Cells( $row, $baseServiceIndex  )->{ 'Value' } if $baseServiceIndex > 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1870
	my $client = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1871
	$client = $$refToWorksheet->Cells( $row, $clientIndex  )->{ 'Value' } if $clientIndex > 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1872
	my $clientOrg = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1873
	$clientOrg = $$refToWorksheet->Cells( $row, $clientOrgIndex  )->{ 'Value' } if $clientOrgIndex > 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1874
	my $ownerName    = $$refToWorksheet->Cells( $row, $ownerNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1875
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1876
	my $forAdaptationSince = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1877
	my $forAdaptationDeprecated = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1878
	my $forAdaptationRemoved = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1879
	my $extendedSDKSince = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1880
	my $extendedSDKDeprecated = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1881
	my $extendedSDKRemoved = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1882
	# All the 6 columsn came at the same time => if 1 is present => all are present.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1883
	# We just check one, since this makes the code a little bit less 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1884
	if( $forAdaptationSinceIndex > 0)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1885
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1886
	    $forAdaptationSince = $$refToWorksheet->Cells( $row, $forAdaptationSinceIndex  )->{ 'Value' }  ;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1887
	    $forAdaptationDeprecated = $$refToWorksheet->Cells( $row, $forAdaptationDeprecatedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1888
	    $forAdaptationRemoved = $$refToWorksheet->Cells( $row, $forAdaptationRemovedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1889
	    $extendedSDKSince = $$refToWorksheet->Cells( $row, $extendedSDKSinceIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1890
	    $extendedSDKDeprecated = $$refToWorksheet->Cells( $row, $extendedSDKDeprecatedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1891
	    $extendedSDKRemoved = $$refToWorksheet->Cells( $row, $extendedSDKRemovedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1892
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1893
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1894
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1895
	# We only allow $globalMaxEmptyRowCount empty rows, before we stop
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1896
	# handling the specific sheet
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1897
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1898
	if(! (defined($apiName) || defined($fileName)|| defined($dll) ||
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1899
	      defined($lib)))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1900
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1901
	    $emptyRowCount++;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1902
	    if($emptyRowCount > $globalMaxEmptyRowCount)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1903
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1904
		last;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1905
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1906
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1907
	else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1908
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1909
	    # Was not empty line, reset counter.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1910
	    $emptyRowCount = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1911
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1912
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1913
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1914
	# Check, if is an comment line. If so, then ignore line
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1915
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1916
        if(defined($apiName) and $apiName =~ /^\s*Comment:/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1917
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1918
            next;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1919
        }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1920
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1921
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1922
	# Check, if is an api line
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1923
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1924
        if(defined($apiName) and $apiName !~ /^\s*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1925
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1926
	    $currApiName = $apiName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1927
	    $currApiOrdinal = $nextOrdinal;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1928
	    $nextOrdinal++;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1929
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1930
            my %newHash;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1931
            $$refToHash{$currApiOrdinal} =  \%newHash;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1932
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1933
	    $newHash{"api_name"} = $currApiName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1934
	    $newHash{"api_type"} = 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1935
            my %hash1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1936
            my %hash2;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1937
            my %hash3;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1938
            my %hash4;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1939
            my %hash5;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1940
            my %hash6;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1941
            my %hash7;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1942
            my %hash8;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1943
            my %hash9;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1944
            my %hash10;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1945
            my %hash11;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1946
            my %hash12;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1947
            my %hash13;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1948
            my %hash14;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1949
            my %hash15;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1950
            $newHash{"owner_entity"}     = $ownerEntity;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1951
            $newHash{"files"} = \%hash1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1952
	    $newHash{"purpose"} = $purpose;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1953
            $newHash{"sdk"} = \%hash4;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1954
	    addToTypeHash(\%hash4,$sdk);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1955
            $newHash{"partner"} = \%hash5;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1956
	    addToTypeHash(\%hash5,$oem);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1957
            $newHash{"internal"} = \%hash6;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1958
	    addToTypeHash(\%hash6,$internal);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1959
            $newHash{"private"} = \%hash7;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1960
	    addToTypeHash(\%hash7,$private);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1961
	    $newHash{"adapt"} = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1962
	    $newHash{"adapt"} = 1 if $adapt =~ /yes/i;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1963
	    $newHash{"specification"} =  $specification;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1964
            $newHash{"dll"} = \%hash2;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1965
            $newHash{"lib"} = \%hash3;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1966
            $newHash{"subsystem"} = $ssName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1967
            $newHash{"depracated"} = \%hash8;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1968
	    addToTypeHash(\%hash8,$deprecated);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1969
            $newHash{"removed"} = \%hash9;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1970
	    addToTypeHash(\%hash9,$removed);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1971
	    $newHash{"partners"} =  $partner;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1972
	    $newHash{"partner_contacts"} =  $partnerContact;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1973
	    $newHash{"base"} =  0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1974
	    $newHash{"base"} =  1 if $baseService =~/yes/i;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1975
	    $newHash{"clients"} =  $client;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1976
	    $newHash{"clients_org"} =  $clientOrg;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1977
            $newHash{"owner"}     = $ownerName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1978
	    $newHash{"owner"}     = $defOwner if $ownerName =~ /^\s*$/;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1979
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1980
	    # For adaptation
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1981
            $newHash{"for_adapt_since"} = \%hash10;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1982
	    addToTypeHash(\%hash10,$forAdaptationSince);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1983
            $newHash{"for_adapt_deprecated"} = \%hash11;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1984
	    addToTypeHash(\%hash11,$forAdaptationDeprecated);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1985
            $newHash{"for_adapt_removed"} = \%hash12;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1986
	    addToTypeHash(\%hash12,$forAdaptationRemoved);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1987
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1988
	    # extended sdk
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1989
            $newHash{"extended_sdk_since"} = \%hash13;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1990
	    addToTypeHash(\%hash13,$extendedSDKSince);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1991
            $newHash{"extended_sdk_deprecated"} = \%hash14;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1992
	    addToTypeHash(\%hash14,$extendedSDKDeprecated);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1993
            $newHash{"extended_sdk_removed"} = \%hash15;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1994
	    addToTypeHash(\%hash15,$extendedSDKRemoved);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1995
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1996
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1997
	# Handle the files column. (ignore some special cases)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1998
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  1999
        if(defined($fileName) && $fileName !~ /^\s*DIR:/i  && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2000
           $fileName !~ /^\s*FILE:/i && $fileName !~ /^\s*$/ && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2001
	   $fileName !~ /^\s*tbd\s*$/i && $fileName !~ /^\s*n\/?a\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2002
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2003
           my $refToApiHash = $$refToHash{$currApiOrdinal};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2004
           my $refToFilesHash = $$refToApiHash{"files"};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2005
           $$refToFilesHash{$fileName} = 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2006
        }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2007
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2008
	# Handle the dlls column. (ignore some special cases)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2009
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2010
        if(defined($dll) && $dll !~ /^\s*$/ && $dll !~ /^\s*ECOM\s*$/i && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2011
	   $dll !~ /^\s*tbd\s*$/i && $dll !~ /^\s*n\/?a\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2012
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2013
           my $refToApiHash = $$refToHash{$currApiOrdinal};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2014
           my $refToDllHash = $$refToApiHash{"dll"};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2015
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2016
           addToHash($refToDllHash,$dll);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2017
        }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2018
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2019
	# Handle the lib column. (ignore some special cases)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2020
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2021
        if(defined($lib) && $lib !~ /^\s*$/ && $lib !~ /^\s*ECOM\s*$/i && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2022
	   $lib !~ /^\s*tbd\s*$/i && $lib !~ /^\s*n\/?a\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2023
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2024
           my $refToApiHash = $$refToHash{$currApiOrdinal};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2025
           my $refToLibHash = $$refToApiHash{"lib"};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2026
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2027
           addToHash($refToLibHash,$lib);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2028
        }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2029
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2030
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2031
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2032
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2033
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2034
# Function that reads certain columns from the interface sheet to the given hash.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2035
# The function is intended to be called for the cenrep/P&S API definitions.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2036
# For the c++ APIs use the "readInfo2"-function
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2037
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2038
# The format of the returned hash is:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2039
#  {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2040
#  <ordinal>  => {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2041
#  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2042
#                  "api_name" => <apiName>    # 1 means c++, 2 means cenrep/P&S apis 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2043
#                  "api_type" => "2"    # 1 means c++, 2 means cenrep/P&S apis 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2044
#                  "owner_entity" => <API owner entity>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2045
#                  "uid" => <uid>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2046
#                  "type" => "cenrep/ps" 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2047
#                  "keys" => {<key1> => 1 ,<key12> => 1,...}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2048
#                  "purpose"      => <purpose text>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2049
#                  "sdk"          => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2050
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2051
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2052
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2053
#                  "partner"      => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2054
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2055
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2056
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2057
#                  "internal"     => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2058
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2059
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2060
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2061
#                  "private"      => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2062
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2063
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2064
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2065
#                  "relFeatuers" => <relatedFeature(s)>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2066
#                  "subsystem" => <subsystem name>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2067
#                  "deprecated"   => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2068
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2069
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2070
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2071
#                  "removed"      => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2072
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2073
#                                    "s90" => <releaseNbr>  # Note 1:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2074
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2075
#                  "partners"         => <namesStr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2076
#                  "partner_contacts" => <namesStr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2077
#                  "clients"          => <namesStr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2078
#                  "clients_org"      => <namesStr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2079
#                  "owner"        => <API owner name>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2080
#                  "for_adapt_since"   => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2081
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2082
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2083
#                  "for_adapt_deprecated"   => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2084
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2085
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2086
#                  "for_adapt_removed"      => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2087
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2088
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2089
#                  "extended_sdk_since"   => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2090
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2091
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2092
#                  "extended_sdk_deprecated"   => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2093
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2094
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2095
#                  "extended_sdk_removed"      => { 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2096
#                                    "s60" => <releaseNbr>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2097
#                                    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2098
#                  }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2099
# etc....
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2100
#  }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2101
# Note the that refToHash is assumed to be an empty hash.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2102
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2103
# Note 1: The S60/s90 keys are not defined, if there was no information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2104
#         in the type for the API.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2105
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2106
# Params: referenceToWorksheet,refToHash,defOwnerEntity,defOwner
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2107
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2108
# Return: -
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2109
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2110
sub readCRepInfo2
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2111
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2112
    my $refToWorksheet = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2113
    my $refToHash = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2114
    my $defOwnerEntity = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2115
    my $defOwner = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2116
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2117
    # check that sheet really exists (it could be missing)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2118
    if(not defined($refToWorksheet))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2119
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2120
	return;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2121
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2122
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2123
    # getNextOrdinal
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2124
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2125
    my $nextOrdinal = getNextOrdinal $refToHash;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2126
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2127
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2128
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2129
    # look to header information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2130
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2131
    # API Name
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2132
    # Uid Name
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2133
    # Key Name
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2134
    # Purpose	
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2135
    # Type
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2136
    # SDK
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2137
    # Domain               
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2138
    # Internal
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2139
    # Private
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2140
    # Subsystem
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2141
    # Clients
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2142
    # Client Org
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2143
    # Deprecated
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2144
    # Removed
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2145
    # Related Features
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2146
    # Partner(s)         (Only from 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2147
    # Partner Contact(s) (Only from 1.6->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2148
    # Owner
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2149
    # Note
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2150
    # For Adaptation Since (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2151
    # For Adaptation Deprecated (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2152
    # For Adaptation Removed (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2153
    # Extended SDK Since (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2154
    # Extended SDK Depricated (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2155
    # Extended SDK Removed (only from 2.0->)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2156
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2157
    my $ownerNameEntityIndex = getIndexByColName $refToWorksheet,"Owner Entity",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2158
    my $apiNameIndex = getIndexByColName $refToWorksheet,"API Name",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2159
    my $uidNameIndex = getIndexByColName $refToWorksheet,"Uid Name",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2160
    my $keyNameIndex = getIndexByColName $refToWorksheet,"Key Name",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2161
    my $keyTypeIndex = getIndexByColName $refToWorksheet,"Type",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2162
    my $purposeIndex = getIndexByColName $refToWorksheet,"Purpose",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2163
    my $sdkIndex = getIndexByColName $refToWorksheet,"SDK",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2164
    my $oemIndex = getIndexByColName $refToWorksheet,"Domain",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2165
    if( !defined($oemIndex) || $oemIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2166
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2167
	$oemIndex = getIndexByColName $refToWorksheet,"Partner",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2168
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2169
    my $internalIndex = getIndexByColName $refToWorksheet,"Internal",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2170
    my $privateIndex =  getIndexByColName $refToWorksheet,"Private",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2171
    my $ssNameIndex = getIndexByColName $refToWorksheet,"Subsystem",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2172
    if( !defined($ssNameIndex) || $ssNameIndex < 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2173
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2174
	$ssNameIndex = getIndexByColName $refToWorksheet,"Subsystem full",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2175
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2176
    my $deprecatedIndex =  getIndexByColName $refToWorksheet,"Deprecated",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2177
    my $removedIndex =  getIndexByColName $refToWorksheet,"Removed",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2178
    my $partnerIndex = getIndexByColName $refToWorksheet,"Partner(s)",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2179
    my $partnerContactIndex = getIndexByColName $refToWorksheet,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2180
                                              "Partner Contact(s)",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2181
    my $clientIndex = getIndexByColName $refToWorksheet,"Clients",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2182
    my $clientOrgIndex = getIndexByColName $refToWorksheet,"Client Org",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2183
    my $ownerNameIndex = getIndexByColName $refToWorksheet,"Owner",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2184
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2185
    my $forAdaptationSinceIndex = getIndexByColName $refToWorksheet,"For Adaptation Since",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2186
    my $forAdaptationDeprecatedIndex = getIndexByColName $refToWorksheet,"For Adaptation Deprecated",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2187
    my $forAdaptationRemovedIndex = getIndexByColName $refToWorksheet,"For Adaptation Removed",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2188
    my $extendedSDKSinceIndex = getIndexByColName $refToWorksheet,"Extended SDK Since",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2189
    my $extendedSDKDeprecatedIndex = getIndexByColName $refToWorksheet,"Extended SDK Depricated",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2190
    my $extendedSDKRemovedIndex = getIndexByColName $refToWorksheet,"Extended SDK Removed",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2191
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2192
    my $row = 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2193
    my $emptyRowCount = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2194
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2195
    ######################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2196
    # Loop row by row until we have found $globalMaxEmptyRowCount of rows
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2197
    # empty one after each other.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2198
    ######################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2199
    my $currApiName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2200
    my $currApiOrdinal;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2201
    for( $row = 2;; $row++ ) 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2202
    {	         
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2203
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2204
	# Read the needed rows from the row
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2205
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2206
	my $ownerEntity =  $defOwnerEntity;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2207
	if($ownerNameEntityIndex > 0)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2208
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2209
	    $ownerEntity = $$refToWorksheet->Cells( $row, $ownerNameEntityIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2210
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2211
	my $apiName   = $$refToWorksheet->Cells( $row, $apiNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2212
	my $uidName   = $$refToWorksheet->Cells( $row, $uidNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2213
        my $keyName  = $$refToWorksheet->Cells( $row, $keyNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2214
        my $keyType  = $$refToWorksheet->Cells( $row, $keyTypeIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2215
        my $purpose   = $$refToWorksheet->Cells( $row, $purposeIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2216
        my $sdk       = $$refToWorksheet->Cells( $row, $sdkIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2217
	my $oem       = $$refToWorksheet->Cells( $row, $oemIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2218
	my $internal  = $$refToWorksheet->Cells( $row, $internalIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2219
	my $private = $$refToWorksheet->Cells( $row, $privateIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2220
	my $ssName    = $$refToWorksheet->Cells( $row, $ssNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2221
	my $deprecated = $$refToWorksheet->Cells( $row, $deprecatedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2222
	my $removed    = $$refToWorksheet->Cells( $row, $removedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2223
	my $partner = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2224
	$partner = $$refToWorksheet->Cells( $row, $partnerIndex  )->{ 'Value' } if $partnerIndex > 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2225
	my $partnerContact = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2226
	$partnerContact = $$refToWorksheet->Cells( $row, $partnerContactIndex  )->{ 'Value' } if $partnerContactIndex > 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2227
	my $client = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2228
	$client = $$refToWorksheet->Cells( $row, $clientIndex  )->{ 'Value' } if $clientIndex > 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2229
	my $clientOrg = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2230
	$clientOrg = $$refToWorksheet->Cells( $row, $clientOrgIndex  )->{ 'Value' } if $clientOrgIndex > 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2231
	my $ownerName    = $$refToWorksheet->Cells( $row, $ownerNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2232
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2233
	my $forAdaptationSince = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2234
	my $forAdaptationDeprecated = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2235
	my $forAdaptationRemoved = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2236
	my $extendedSDKSince = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2237
	my $extendedSDKDeprecated = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2238
	my $extendedSDKRemoved = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2239
	# All the 6 columsn came at the same time => if 1 is present => all are present.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2240
	# We just check one, since this makes the code a little bit less 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2241
	if( $forAdaptationSinceIndex > 0)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2242
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2243
	    $forAdaptationSince = $$refToWorksheet->Cells( $row, $forAdaptationSinceIndex  )->{ 'Value' }  ;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2244
	    $forAdaptationDeprecated = $$refToWorksheet->Cells( $row, $forAdaptationDeprecatedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2245
	    $forAdaptationRemoved = $$refToWorksheet->Cells( $row, $forAdaptationRemovedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2246
	    $extendedSDKSince = $$refToWorksheet->Cells( $row, $extendedSDKSinceIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2247
	    $extendedSDKDeprecated = $$refToWorksheet->Cells( $row, $extendedSDKDeprecatedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2248
	    $extendedSDKRemoved = $$refToWorksheet->Cells( $row, $extendedSDKRemovedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2249
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2250
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2251
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2252
	# We only allow $globalMaxEmptyRowCount empty rows, before we stop
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2253
	# handling the specific sheet
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2254
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2255
	if(! (defined($apiName) || defined($keyName)))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2256
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2257
	    $emptyRowCount++;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2258
	    if($emptyRowCount > $globalMaxEmptyRowCount)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2259
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2260
		last;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2261
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2262
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2263
	else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2264
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2265
	    # Was not empty line, reset counter.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2266
	    $emptyRowCount = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2267
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2268
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2269
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2270
	# Check, if is an comment line. If so, then ignore line
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2271
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2272
        if(defined($apiName) and $apiName =~ /^\s*Comment:/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2273
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2274
            next;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2275
        }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2276
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2277
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2278
	# Check, if is an api line
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2279
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2280
        if(defined($apiName) and $apiName !~ /^\s*$/)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2281
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2282
	    $currApiName = $apiName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2283
	    $currApiOrdinal = $nextOrdinal;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2284
	    $nextOrdinal++;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2285
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2286
            my %newHash;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2287
            $$refToHash{$currApiOrdinal} =  \%newHash;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2288
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2289
	    $newHash{"api_name"} = $currApiName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2290
	    $newHash{"api_type"} = "2";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2291
            my %hash1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2292
            my %hash2;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2293
            my %hash3;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2294
            my %hash4;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2295
            my %hash5;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2296
            my %hash6;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2297
            my %hash7;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2298
            my %hash8;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2299
            my %hash9;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2300
            my %hash10;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2301
            my %hash11;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2302
            my %hash12;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2303
            my %hash13;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2304
            my %hash14;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2305
            my %hash15;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2306
            $newHash{"owner_entity"}     = $ownerEntity;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2307
            $newHash{"uid"} = $uidName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2308
            $newHash{"type"} = "ps";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2309
            $newHash{"type"} = "cenrep" if $keyType =~ /centrep/i;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2310
            $newHash{"keys"} = \%hash1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2311
	    $newHash{"purpose"} = $purpose;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2312
            $newHash{"sdk"} = \%hash4;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2313
	    addToTypeHash(\%hash4,$sdk);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2314
            $newHash{"partner"} = \%hash5;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2315
	    addToTypeHash(\%hash5,$oem);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2316
            $newHash{"internal"} = \%hash6;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2317
	    addToTypeHash(\%hash6,$internal);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2318
            $newHash{"private"} = \%hash7;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2319
	    addToTypeHash(\%hash7,$private);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2320
            $newHash{"subsystem"} = $ssName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2321
            $newHash{"depracated"} = \%hash8;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2322
	    addToTypeHash(\%hash8,$deprecated);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2323
            $newHash{"removed"} = \%hash9;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2324
	    addToTypeHash(\%hash9,$removed);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2325
	    $newHash{"partners"} =  $partner;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2326
	    $newHash{"partner_contacts"} =  $partnerContact;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2327
	    $newHash{"clients"} =  $client;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2328
	    $newHash{"clients_org"} =  $clientOrg;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2329
            $newHash{"owner"}     = $ownerName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2330
	    $newHash{"owner"}     = $defOwner if $ownerName =~ /^\s*$/;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2331
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2332
	    # For adaptation
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2333
            $newHash{"for_adapt_since"} = \%hash10;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2334
	    addToTypeHash(\%hash10,$forAdaptationSince);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2335
            $newHash{"for_adapt_deprecated"} = \%hash11;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2336
	    addToTypeHash(\%hash11,$forAdaptationDeprecated);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2337
            $newHash{"for_adapt_removed"} = \%hash12;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2338
	    addToTypeHash(\%hash12,$forAdaptationRemoved);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2339
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2340
	    # extended sdk
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2341
            $newHash{"extended_sdk_since"} = \%hash13;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2342
	    addToTypeHash(\%hash13,$extendedSDKSince);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2343
            $newHash{"extended_sdk_deprecated"} = \%hash14;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2344
	    addToTypeHash(\%hash14,$extendedSDKDeprecated);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2345
            $newHash{"extended_sdk_removed"} = \%hash15;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2346
	    addToTypeHash(\%hash15,$extendedSDKRemoved);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2347
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2348
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2349
	# Handle the files column. (ignore some special cases)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2350
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2351
        if(defined($keyName) && $keyName !~ /^\s*$/ && 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2352
	   $keyName !~ /^\s*tbd\s*$/i && $keyName !~ /^\s*n\/?a\s*$/i)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2353
        {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2354
           my $refToApiHash = $$refToHash{$currApiOrdinal};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2355
           my $refToKeysHash = $$refToApiHash{"keys"};
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2356
           $$refToKeysHash{$keyName} = 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2357
        }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2358
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2359
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2360
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2361
###########################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2362
# Function assumes that black list sheet as been given. All files that
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2363
# belong to the given platform and releases black list are put into the hash
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2364
# format of the hash:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2365
#
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2366
# {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2367
#  file1 => 1,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2368
#  file2 => 1,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2369
#  etc...
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2370
# }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2371
sub readBlackList
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2372
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2373
    my $refToWorksheet = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2374
    my $plat = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2375
    my $rel = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2376
    my $refToHash = shift;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2377
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2378
    # check that sheet really exists (it could be missing)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2379
    if(not defined($refToWorksheet))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2380
    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2381
	return;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2382
    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2383
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2384
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2385
    # look to header information
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2386
    # ----------------------------------------------------------------  
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2387
    # file
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2388
    # Since
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2389
    my $fileNameIndex = getIndexByColName $refToWorksheet,"File/Dir",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2390
    my $sinceIndex = getIndexByColName $refToWorksheet,"Since",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2391
    my $removedIndex = getIndexByColName $refToWorksheet,"Removed",$globalMaxColCount;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2392
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2393
    my $row = 1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2394
    my $emptyRowCount = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2395
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2396
    ######################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2397
    # Loop row by row until we have found $globalMaxEmptyRowCount of rows
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2398
    # empty one after each other.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2399
    ######################################################################
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2400
    for( $row = 2;; $row++ ) 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2401
    {	         
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2402
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2403
	# Read the needed rows from the row
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2404
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2405
        my $fileName    = $$refToWorksheet->Cells( $row, $fileNameIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2406
        my $since       = $$refToWorksheet->Cells( $row, $sinceIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2407
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2408
        my $removed     = "";
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2409
	if($removedIndex >= 0)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2410
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2411
	    $removed    = $$refToWorksheet->Cells( $row, $removedIndex  )->{ 'Value' };
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2412
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2413
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2414
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2415
	# We only allow $globalMaxEmptyRowCount empty rows, before we stop
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2416
	# handling the specific sheet
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2417
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2418
	if(! (defined($fileName)|| defined($since)))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2419
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2420
	    $emptyRowCount++;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2421
	    if($emptyRowCount > $globalMaxEmptyRowCount)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2422
	    {
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2423
		last;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2424
	    }
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2425
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2426
	else
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2427
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2428
	    # Was not empty line, reset counter.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2429
	    $emptyRowCount = 0;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2430
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2431
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2432
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2433
	# Check, if line is wanted
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2434
	#------------------------------------------------------------
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2435
	if(isRowWanted($plat,$rel,1,$since,$removed) == 1)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2436
	{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2437
	    addToHash $refToHash,$fileName;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2438
	}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2439
    }    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2440
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2441
1;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
  2442