os/security/securityanddataprivacytools/securitytools/certapp/encdec/appuidmap.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200 (2012-06-15)
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
#ifndef __APPUIDMAP_H__
sl@0
     2
#define __APPUIDMAP_H__/*
sl@0
     3
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     4
* All rights reserved.
sl@0
     5
* This component and the accompanying materials are made available
sl@0
     6
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     7
* which accompanies this distribution, and is available
sl@0
     8
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     9
*
sl@0
    10
* Initial Contributors:
sl@0
    11
* Nokia Corporation - initial contribution.
sl@0
    12
*
sl@0
    13
* Contributors:
sl@0
    14
*
sl@0
    15
* Description: 
sl@0
    16
*
sl@0
    17
*/
sl@0
    18
sl@0
    19
sl@0
    20
#include "encdec.h"
sl@0
    21
/**
sl@0
    22
 * @file
sl@0
    23
 * @internalComponent
sl@0
    24
 */
sl@0
    25
sl@0
    26
class AppUidMap
sl@0
    27
	{
sl@0
    28
public:
sl@0
    29
	// Insert new entry, if ok returns true and aLastIndex/aFirstDef
sl@0
    30
	// are not set.
sl@0
    31
	//
sl@0
    32
	// Duplicate Uids are NOT allowed. Duplicate definitions/names
sl@0
    33
	// (mapping to different UIDs) are allowed, but not recommended.
sl@0
    34
	//
sl@0
    35
	// If a duplicate UID is seen, then aLastIndex is set to the file
sl@0
    36
	// index of the LAST definition seen and aFirstName is set to the
sl@0
    37
	// FIRST definition/name saved for aUid. Then aInputFileIndex is
sl@0
    38
	// saved as the new LAST definition file index, but the saved
sl@0
    39
	// definition/name is NOT updated.
sl@0
    40
	//
sl@0
    41
	// The returned aLastIndex is used to check if there is more than
sl@0
    42
	// one definition within a single input file (which is an error if
sl@0
    43
	// the input file is a human readable config file).
sl@0
    44
	//
sl@0
    45
	// The returned aFirstDef gives the first/winning definition.
sl@0
    46
	static bool InsertUidDefinition(TInt32 aUid, const std::string &aDef, TInt32 aInputFileIndex,
sl@0
    47
										TInt32 &aLastIndex, std::string &aFirstDef);
sl@0
    48
sl@0
    49
	static void GenerateEnumEntries();
sl@0
    50
	static EnumEntry *EnumEntries();
sl@0
    51
private:
sl@0
    52
	};
sl@0
    53
sl@0
    54
sl@0
    55
sl@0
    56
sl@0
    57
#endif