releasing/cbrtools/perl/Symbian/CBR/MRP.pm
author Ross Qin <ross.qin@nokia.com>
Thu, 28 Oct 2010 11:18:50 +0800
changeset 667 a3b39a14147a
parent 602 3145852acc89
permissions -rw-r--r--
Remove the PrintingServices component from TB10.1 on wards(on behalf of dane.waby@nokia.com)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
602
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     1
# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     2
# All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     3
# This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     5
# which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     7
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     8
# Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
     9
# Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    10
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    11
# Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    12
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    13
# Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    14
# 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    15
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    16
# Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    17
# Symbian::CBR::MRP
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    18
#
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    19
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    20
package Symbian::CBR::MRP;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    21
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    22
use strict;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    23
use Carp;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    24
use File::Spec;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    25
use base qw(Symbian::CBR::MRPInterface);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    26
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    27
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    28
sub new {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    29
    my $pkg = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    30
    my $mrpName = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    31
    my $verbose = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    32
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    33
    if (!$mrpName || shift) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    34
        # caller(0))[3] gives the package and the method called, e.g. Symbian::CBR::MRP::new
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    35
        croak "Invalid number of arguments passed to " . (caller(0))[3] . "\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    36
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    37
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    38
    my $self = {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    39
            'mrpName' => $mrpName,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    40
            'verbose' => $verbose};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    41
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    42
    bless $self, $pkg;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    43
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    44
    return $self;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    45
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    46
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    47
sub SetIPR {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    48
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    49
    my $category = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    50
    my $path = lc(shift) || 'default';
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    51
    my $exportRestricted = (shift) ? 1 : 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    52
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    53
    if (!$category || shift) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    54
        croak "Invalid number of arguments passed to " . (caller(0))[3] . "\n";        
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    55
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    56
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    57
    if ($category !~ /^[a-z]$/i) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    58
        #Check that the IPR category specified is indeed a valid category
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    59
        croak "Error: IPR category $category is invalid\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    60
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    61
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    62
    $path = File::Spec->canonpath($path); # Normalise the path
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    63
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    64
    # remove trailing slashes
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    65
    $path =~ s/[\\\/]$//;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    66
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    67
    if (exists $self->{unresolvedIPR}->{$path}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    68
        return 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    69
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    70
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    71
    $self->{unresolvedIPR}->{$path} = {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    72
                    category => uc($category),
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    73
                    exportRestricted => $exportRestricted};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    74
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    75
    return 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    76
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    77
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    78
sub SetComponent {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    79
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    80
    my $operand = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    81
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    82
    if (!$operand || shift) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    83
        croak "Invalid number of arguments passed to " . (caller(0))[3] . "\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    84
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    85
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    86
    if (exists $self->{componentName}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    87
        return 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    88
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    89
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    90
    $self->{componentName} = $operand;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    91
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    92
    return 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    93
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    94
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    95
sub SetNotesSource {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    96
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    97
    my $operand = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    98
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
    99
    if (!$operand || shift) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   100
        croak "Invalid number of arguments passed to " . (caller(0))[3] . "\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   101
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   102
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   103
    if (exists $self->{notesSource}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   104
        return 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   105
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   106
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   107
    $operand = File::Spec->canonpath($operand); # Normalise the path
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   108
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   109
    if (!-f $operand) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   110
       croak "Error: Notes source \"$operand\" does not exist\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   111
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   112
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   113
    $self->{notesSource} = $operand;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   114
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   115
    return 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   116
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   117
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   118
sub SetSource {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   119
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   120
    my $operand = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   121
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   122
    if (!$operand || shift) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   123
        croak "Invalid number of arguments passed to " . (caller(0))[3] . "\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   124
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   125
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   126
    $operand = File::Spec->canonpath($operand); # Normalise the path
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   127
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   128
    #remove trailing slashes
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   129
    $operand =~ s/[\\\/]$//;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   130
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   131
    if (!-e $operand) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   132
       croak "Error: Source \"$operand\" does not exist\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   133
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   134
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   135
    if (exists $self->{sourceItems}->{$operand}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   136
        return 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   137
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   138
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   139
    $self->{sourceItems}->{$operand} = 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   140
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   141
    return 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   142
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   143
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   144
sub SetBinary {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   145
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   146
    my @operand = @{shift()} if (ref $_[0] eq 'ARRAY');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   147
    my $test = (shift) ? 1 : 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   148
    my $remove = (shift) ? 1 : 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   149
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   150
    if (!scalar(@operand) || shift) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   151
        croak "Invalid number of arguments passed to " . (caller(0))[3] . "\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   152
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   153
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   154
    my $path = shift @operand;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   155
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   156
    $path = File::Spec->canonpath($path); # Normalise the path
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   157
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   158
    push @{$self->{binary}}, {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   159
                        path    => $path,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   160
                        test    => $test,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   161
                        remove  => $remove,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   162
                        words   => [@operand]};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   163
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   164
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   165
sub SetExports {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   166
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   167
    my $operand = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   168
    my $test = (shift) ? 1 : 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   169
    my $dependantComponent = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   170
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   171
    if (!$operand || shift) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   172
        croak "Invalid number of arguments passed to " . (caller(0))[3] . "\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   173
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   174
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   175
    if (exists $self->{exports}->{$operand}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   176
        croak "Error: 'exports' entry for \"$operand\" defined more than once in $self->{mrpName}\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   177
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   178
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   179
    $operand = File::Spec->canonpath($operand); # Normalise the path
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   180
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   181
    if (!-e $operand) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   182
        croak "Error: Exports path \"$operand\" does not exist\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   183
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   184
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   185
    $self->{exports}->{$operand} = $test;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   186
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   187
    if ($dependantComponent) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   188
        push (@{$self->{exports}->{_dependantComponent}}, $dependantComponent);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   189
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   190
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   191
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   192
sub SetExportFile {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   193
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   194
    my $source = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   195
    my $destination = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   196
    my $remove = (shift) ? 1 : 0;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   197
    my $dependantComponent = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   198
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   199
    if (!$source || shift) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   200
        croak "Invalid number of arguments passed to " . (caller(0))[3] . "\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   201
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   202
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   203
    unless ($source and $destination) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   204
        croak "Error: Incorrect syntax to 'export_file' keyword in \"$self->{mrpName}\"\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   205
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   206
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   207
    $source = File::Spec->canonpath($source); # Normalise the path
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   208
    $destination = File::Spec->canonpath($destination);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   209
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   210
    if (!$remove) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   211
        if (!-e $source) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   212
            croak "Error: Export file \"$source\" does not exist\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   213
        }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   214
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   215
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   216
    push @{$self->{exportFiles}}, {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   217
                    source      => $source,                  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   218
                    destination => $destination,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   219
                    remove      => $remove};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   220
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   221
    if ($dependantComponent) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   222
        push (@{$self->{exports}->{_dependantComponent}}, $dependantComponent);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   223
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   224
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   225
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   226
sub GetIPRInformation {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   227
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   228
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   229
    if (exists $self->{IPR}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   230
        return $self->{IPR};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   231
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   232
    else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   233
        return {};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   234
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   235
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   236
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   237
sub Component {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   238
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   239
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   240
    if ($self->{componentName}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   241
        return $self->{componentName};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   242
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   243
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   244
    return undef;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   245
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   246
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   247
sub GetExportComponentDependencies {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   248
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   249
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   250
    if (exists $self->{exports}->{_dependantComponent}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   251
        return @{$self->{exports}->{_dependantComponent}}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   252
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   253
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   254
    return undef;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   255
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   256
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   257
sub GetSource {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   258
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   259
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   260
    if (exists $self->{sourceItems}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   261
        return [keys %{$self->{sourceItems}}];
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   262
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   263
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   264
    return [];
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   265
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   266
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   267
sub ValidateParsing {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   268
    my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   269
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   270
    # This flag stops the reader from trying to populate the object more than once
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   271
    $self->{populated} = 1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   272
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   273
    if (exists $self->{sourceItems} && !exists $self->{unresolvedIPR}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   274
        # If no IPR information exists in the MRP file then we set the IPR category
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   275
        # for each source item to undef.  This is so that incorrect IPR information is
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   276
        # not returned.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   277
        
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   278
        foreach my $sourceItem (keys %{$self->{sourceItems}}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   279
            $self->{IPR}->{$sourceItem} = {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   280
                                           category => undef,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   281
                                           exportRestricted => undef,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   282
                                           };
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   283
        }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   284
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   285
    else {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   286
        # Reconcile the IPR information here so that any warnings are produced sooner...
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   287
        # IPR information can only be included if it matches a source line in the MRP file
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   288
        # All other IPR lines will be ignored.  The reconciliation is done here as IPR
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   289
        # lines may appear before source lines in the MRP file.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   290
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   291
        if (!defined $self->{sourceItems} && exists $self->{unresolvedIPR}->{default}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   292
            carp "Warning: The default IPR entry does not apply to any source statements in \"$self->{mrpName}\"\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   293
        }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   294
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   295
        # Match IPR against source statement by using the length...
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   296
        foreach my $sourceItem (keys %{$self->{sourceItems}}) {    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   297
            # The sort below sorts by longest line first, not shortest line first. Note $b <=> $a, not $a <=> $b...
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   298
            # This allows us to match the most relevant line first, based on longest length/best match 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   299
            foreach my $iprItem (sort {length($b) <=> length($a)} keys %{$self->{unresolvedIPR}}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   300
                next if ($iprItem eq 'default');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   301
                # If the source item contains the IPR path then it is a match 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   302
                if ($sourceItem =~ m/^\Q$iprItem\E([\\\/]|$)/i) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   303
                    $self->{IPR}->{$sourceItem} = $self->{unresolvedIPR}->{$iprItem};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   304
                    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   305
                    last;   
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   306
                }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   307
            }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   308
                 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   309
            # If it didn't match an IPR then we assign the default
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   310
            if (!exists $self->{IPR}->{$sourceItem}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   311
                $self->{IPR}->{$sourceItem} = $self->{unresolvedIPR}->{default};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   312
            }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   313
        }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   314
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   315
        delete $self->{unresolvedIPR}->{default};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   316
    
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   317
        # Find IPR entries which do live under a source folder...
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   318
        foreach my $iprItem (keys %{$self->{unresolvedIPR}}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   319
            next if (exists $self->{IPR}->{$iprItem});
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   320
            
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   321
            foreach my $sourceItem (keys %{$self->{sourceItems}}) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   322
                if ($iprItem =~ /^\Q$sourceItem\E/i) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   323
                    $self->{IPR}->{$iprItem} = $self->{unresolvedIPR}->{$iprItem};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   324
                    last;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   325
                }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   326
            }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   327
         
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   328
            if (!grep /\Q$iprItem\E/i, (keys %{$self->{IPR}})) {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   329
                # Otherwise this IPR statement does not apply to this MRP file...
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   330
                carp "Warning: The IPR entry for \"$iprItem\" does not apply to any source statements in \"$self->{mrpName}\"\n";
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   331
            }     
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   332
        }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   333
        
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   334
        delete $self->{unresolvedIPR};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   335
    }
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   336
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   337
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   338
sub Populated {
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   339
  my $self = shift;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   340
  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   341
  return $self->{populated};
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   342
}
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   343
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   344
1;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   345
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   346
__END__
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   347
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   348
=pod
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   349
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   350
=head1 NAME
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   351
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   352
Symbian::CBR::MRP - An object representation of an MRP file
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   353
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   354
=head1 SYNOPSIS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   355
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   356
 use Symbian::CBR::MRP;
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   357
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   358
 # Construct a Symbian::CBR::MRP object 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   359
 my $mrpObject = Symbian::CBR::MRP->new(mrpName);
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   360
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   361
 # Use the setters to populate the object
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   362
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   363
 $mrpObject->SetComponent('componentName');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   364
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   365
 $mrpObject->SetSource('\src\aSrcFolder');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   366
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   367
 $mrpObject->SetNotesSource('\componentDefs\notes.src');
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   368
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   369
 # Validate the parsing\perform any post parsing operations
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   370
 $mrpObject->ValidateParsing();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   371
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   372
 ...
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   373
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   374
 # Getting information from the Symbian::CBR::MRP object
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   375
 my $iprInformation = $mrpObject->GetIPRInformation();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   376
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   377
 # Get the component name
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   378
 my $componentName = $mrpObject->GetComponent();
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   379
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   380
=head1 DESCRIPTION
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   381
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   382
This object represents an MRP file.  It is intended to be created and populated
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   383
by an MRP file parser, for example Symbian::CBR::MRP::Reader.  No parsing
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   384
functionality is included with this object.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   385
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   386
Once the object has been populated the parser should call the ValidateParsing()
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   387
method, which will perform any post-population actions, such as resolving IPR
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   388
information etc.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   389
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   390
=head1 METHODS
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   391
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   392
=head2 new(mrpName, verbose)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   393
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   394
Instantiates a Symbian::CBR::MRP object.  The mrpName argument is only used for
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   395
printing error and warning messages.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   396
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   397
=head2 GetIPRInformation()
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   398
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   399
Returns a hash containing the IPR information for the component.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   400
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   401
The format is the returned data is a hash:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   402
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   403
    Path = (
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   404
                    category = char,
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   405
                    exportRestricted = boolean
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   406
            )
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   407
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   408
=head2 SetBinary(@arguments, test, remove)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   409
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   410
Sets the binary information.  @arguments is an array containing the arguments
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   411
from the MRP line, in the order in which they appeared.  
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   412
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   413
=head2 SetComponent(componentName)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   414
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   415
Sets the name of the component to componentName.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   416
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   417
=head2 SetExportFile(source, destination, remove, dependantComponent)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   418
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   419
Sets the export file information.  The source and destination arguments are both
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   420
required, if they are not specified a fatal error will be produced.  The source
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   421
file will also be checked to see if it exists and that it has not already been
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   422
specified as an export file.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   423
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   424
If the export file is not included as source for the current MRP component then
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   425
the dependant component will also need to be specified.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   426
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   427
=head2 SetExports(path, test, dependantComponent)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   428
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   429
Sets the location of the bld.inf from where the export information can be derived.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   430
The location will be checked to see if it exists and that it has not already been
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   431
specified.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   432
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   433
If the exports are not included as source for the current MRP component then
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   434
the dependant component will also need to be specified.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   435
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   436
=head2 SetIPR(category, path, exportRestricted)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   437
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   438
Sets the IPR information for the component.  If no path is specified then the
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   439
IPR category is set to be the default category for the component.  The
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   440
exportRestricted argument is boolean.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   441
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   442
If the same path is specified more than once a fatal error will be produced.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   443
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   444
=head2 SetNotesSource(noteSourcePath)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   445
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   446
Sets the notes source to the notesSourcePath specified.  If the notes source has
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   447
already been set, or the path does not exist, a fatal error will be produced.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   448
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   449
=head2 SetSource(sourcePath)
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   450
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   451
Adds the sourcePath to the list of included source entries for the component.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   452
If the source path does not exist or the path has already been added then a
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   453
fatal error will be produced.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   454
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   455
=head2 ValidateParsing()
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   456
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   457
This method needs to be called once the parser has finished setting all the
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   458
information.  Currently this method reconciles IPR statements against the
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   459
components source, and also checks that required dependant components have
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   460
been set.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   461
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   462
If this method is not run then IPR information will be unavailable.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   463
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   464
=head2 GetExportComponentDependencies()
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   465
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   466
Returns an array containing the any components which the current component has
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   467
dependencies on.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   468
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   469
=head2 Component()
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   470
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   471
Returns the component name.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   472
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   473
=head2 Populated()
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   474
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   475
The MRP file is parsed by a reader, which then populates this MRP object.  The
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   476
Populated method returns a boolean value indicating if the object has been
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   477
populated.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   478
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   479
=head1 COPYRIGHT
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   480
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   481
 Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   482
 All rights reserved.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   483
 This component and the accompanying materials are made available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   484
 under the terms of the License "Eclipse Public License v1.0"
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   485
 which accompanies this distribution, and is available
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   486
 at the URL "http://www.eclipse.org/legal/epl-v10.html".
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   487
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   488
 Initial Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   489
 Nokia Corporation - initial contribution.
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   490
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   491
 Contributors:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   492
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   493
 Description:
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   494
 
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   495
3145852acc89 add releasing to new structure
jjkang
parents:
diff changeset
   496
=cut