equal
deleted
inserted
replaced
|
1 #!perl -w |
|
2 # Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: |
|
15 # This simple script shows how to display the content of a feature manager |
|
16 # data file. |
|
17 # |
|
18 # |
|
19 |
|
20 use strict; |
|
21 use fmcreate; |
|
22 |
|
23 # |
|
24 # Find out what file the user is interested in.. |
|
25 # Make sure it's specified and exists. |
|
26 # |
|
27 my $datfile = $ARGV[-1]; |
|
28 die "Usage: showfeatcontent.pl <featmanager-data-filename>" |
|
29 unless(defined($datfile)); |
|
30 die "Specify an existing file" unless(-f $datfile); |
|
31 |
|
32 # |
|
33 # Create an object that represents a feature data file. |
|
34 # |
|
35 my $fmc = FMCreate->new(); |
|
36 |
|
37 # |
|
38 # Load the content of the data file into our FMCreate object. |
|
39 # Note that this will die if the content does not seem to be a feature set |
|
40 # file. This can happen if the first four bytes aren't 'feat' or if reading |
|
41 # the file fails at any point. This will also happen if the file is the wrong |
|
42 # size. |
|
43 # |
|
44 $fmc->LoadUp($datfile); |
|
45 |
|
46 # |
|
47 # Display the content. |
|
48 # |
|
49 $fmc->ShowALL(); |