os/persistentdata/featuremgmt/featureregistry/tools/featregconfig/scripts/makefeatregconfig.pl
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/featuremgmt/featureregistry/tools/featregconfig/scripts/makefeatregconfig.pl	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,48 @@
     1.4 +# Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +# All rights reserved.
     1.6 +# This component and the accompanying materials are made available
     1.7 +# under the terms of "Eclipse Public License v1.0"
     1.8 +# which accompanies this distribution, and is available
     1.9 +# at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +#
    1.11 +# Initial Contributors:
    1.12 +# Nokia Corporation - initial contribution.
    1.13 +#
    1.14 +# Contributors:
    1.15 +#
    1.16 +# Description:
    1.17 +# Write a Feature Registry Configuration File
    1.18 +# 
    1.19 +#
    1.20 +
    1.21 +use strict;
    1.22 +
    1.23 +my $record = pack 'a4I3',
    1.24 +	'feat',		# Must be exactly this
    1.25 +	0,			# Must be exactly this
    1.26 +	3,			# feature entry count
    1.27 +	2;			# default-supported range count
    1.28 +# Feature Entries:
    1.29 +$record .= pack 'I6',
    1.30 +	1,			# UID1
    1.31 +	1,			# status of UID1 (bit 0 = 0x1 is set if feature is present)
    1.32 +	59,			# UID2
    1.33 +	3,			# status
    1.34 +	60,			# and so on
    1.35 +	0;			# ...
    1.36 +# Default Supported Ranges:	
    1.37 +$record .= pack 'I2',
    1.38 +	 50,		# Low UID
    1.39 +	 200;		# High UID
    1.40 +# Symbian Essential Default supported range
    1.41 +$record .= pack 'I2',
    1.42 +	 0x10279806,# Low UID
    1.43 +	 0x10281805;# High UID
    1.44 +#$record .= '?' x 66000; # to make the file larger than the limit
    1.45 +
    1.46 +my $BINCONFIG;
    1.47 +open ($BINCONFIG, '>featreg.cfg') or die "Could not open binary config file for writing\n";
    1.48 +binmode $BINCONFIG;
    1.49 +syswrite $BINCONFIG, $record, length $record;
    1.50 +close($BINCONFIG);
    1.51 +exit;