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