telephonyserverplugins/attestltsy/config/modifyfeaturedb.pl
branchAT_Test_LTSY
changeset 51 6012a0dcf61c
parent 6 9b3b5a50db11
equal deleted inserted replaced
34:7c3d96ebb735 51:6012a0dcf61c
    17 # 
    17 # 
    18 #
    18 #
    19 
    19 
    20 use strict;
    20 use strict;
    21 use FMCreate;
    21 use FMCreate;
       
    22 use File::Copy;
    22 
    23 
    23 #
    24 #
    24 # Hardwire the datafile - this is only an example.
    25 # Hardwire the datafile - this is only an example.
    25 # 
    26 # 
    26 my $datfile = "/epoc32/release/winscw/udeb/z/private/10205054/features.dat";
    27 my $datfile = "/epoc32/release/winscw/udeb/z/private/10205054/features.dat";
    27 my $datfile2 = "/epoc32/release/winscw/udeb/z/private/10205054/features2.dat";
    28 my $datfile2 = "/epoc32/release/winscw/udeb/z/private/10205054/features2.dat";
    28 my $datfileback = "/epoc32/release/winscw/udeb/z/private/10205054/features.bak";
    29 my $datfileback = "/epoc32/release/winscw/udeb/z/private/10205054/features.bak";
       
    30 my $datfilerom = "/epoc32/data/z/private/10205054/features.dat";
    29 
    31 
    30 #
    32 #
    31 # Create an object that represents a feature data file.
    33 # Create an object that represents a feature data file.
    32 #
    34 #
    33 my $fmc = FMCreate->new();
    35 my $fmc = FMCreate->new();
    46 my $ff;
    48 my $ff;
    47 my @tomtab;
    49 my @tomtab;
    48 
    50 
    49 $tomtab[0] = 81; 	# KFeatureIdProtocolGsm
    51 $tomtab[0] = 81; 	# KFeatureIdProtocolGsm
    50 $tomtab[1] = 82; 	# KFeatureIdProtocolWcdma
    52 $tomtab[1] = 82; 	# KFeatureIdProtocolWcdma
    51 $tomtab[1] = 1696;	# KFeatureIdOnScreenDialer
    53 $tomtab[2] = 1696;	# KFeatureIdOnScreenDialer
       
    54 $tomtab[3] = 1715;	# KFeatureIdTouchCallHandling
    52 
    55 
    53 foreach $ffuid (@tomtab)
    56 foreach $ffuid (@tomtab)
    54 #for ($ffuid = 1696; $ffuid <= 1696; $ffuid++)
       
    55 {
    57 {
    56 	$ff = $fmc->GetFeatureFlagByUID($ffuid);
    58 	$ff = $fmc->GetFeatureFlagByUID($ffuid);
    57 	if(ref($ff) ne "FeatureFlag")
    59 	if(ref($ff) ne "FeatureFlag")
    58 	{
    60 	{
    59 		printf ("Feature flag uid 0x%0x was not already in $datfile, creating it.\n", $ffuid);
    61 		printf ("Feature flag uid 0x%0x was not already in $datfile, creating it.\n", $ffuid);
    82 #
    84 #
    83 # Now write out the file to a new location
    85 # Now write out the file to a new location
    84 #
    86 #
    85 $fmc->WriteToFile($datfile2) or die "Couldn't write feature data file '$datfile2'\n";
    87 $fmc->WriteToFile($datfile2) or die "Couldn't write feature data file '$datfile2'\n";
    86 
    88 
       
    89 copy($datfile2, $datfilerom) or die "Couldn't copy the data file for ROM usage: '$datfilerom'\n";
    87 rename($datfile, $datfileback) or die "Couldn't backup feature data file '$datfile'\n";
    90 rename($datfile, $datfileback) or die "Couldn't backup feature data file '$datfile'\n";
    88 rename($datfile2, $datfile) or die "Couldn't copy feature data file '$datfile2'\n";
    91 rename($datfile2, $datfile) or die "Couldn't copy feature data file '$datfile2'\n";
    89 
    92 
    90 printf ("\tFeature Database setup\n");
    93 printf ("\tFeature Database setup\n");
    91 #
    94 #