os/persistentdata/featuremgmt/featureregistry/tools/featregconfig/scripts/makefeatregconfig.pl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 # Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 # All rights reserved.
     3 # This component and the accompanying materials are made available
     4 # under the terms of "Eclipse Public License v1.0"
     5 # which accompanies this distribution, and is available
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 #
     8 # Initial Contributors:
     9 # Nokia Corporation - initial contribution.
    10 #
    11 # Contributors:
    12 #
    13 # Description:
    14 # Write a Feature Registry Configuration File
    15 # 
    16 #
    17 
    18 use strict;
    19 
    20 my $record = pack 'a4I3',
    21 	'feat',		# Must be exactly this
    22 	0,			# Must be exactly this
    23 	3,			# feature entry count
    24 	2;			# default-supported range count
    25 # Feature Entries:
    26 $record .= pack 'I6',
    27 	1,			# UID1
    28 	1,			# status of UID1 (bit 0 = 0x1 is set if feature is present)
    29 	59,			# UID2
    30 	3,			# status
    31 	60,			# and so on
    32 	0;			# ...
    33 # Default Supported Ranges:	
    34 $record .= pack 'I2',
    35 	 50,		# Low UID
    36 	 200;		# High UID
    37 # Symbian Essential Default supported range
    38 $record .= pack 'I2',
    39 	 0x10279806,# Low UID
    40 	 0x10281805;# High UID
    41 #$record .= '?' x 66000; # to make the file larger than the limit
    42 
    43 my $BINCONFIG;
    44 open ($BINCONFIG, '>featreg.cfg') or die "Could not open binary config file for writing\n";
    45 binmode $BINCONFIG;
    46 syswrite $BINCONFIG, $record, length $record;
    47 close($BINCONFIG);
    48 exit;