sl@0: #ifndef __APPUIDMAP_H__ sl@0: #define __APPUIDMAP_H__/* sl@0: * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #include "encdec.h" sl@0: /** sl@0: * @file sl@0: * @internalComponent sl@0: */ sl@0: sl@0: class AppUidMap sl@0: { sl@0: public: sl@0: // Insert new entry, if ok returns true and aLastIndex/aFirstDef sl@0: // are not set. sl@0: // sl@0: // Duplicate Uids are NOT allowed. Duplicate definitions/names sl@0: // (mapping to different UIDs) are allowed, but not recommended. sl@0: // sl@0: // If a duplicate UID is seen, then aLastIndex is set to the file sl@0: // index of the LAST definition seen and aFirstName is set to the sl@0: // FIRST definition/name saved for aUid. Then aInputFileIndex is sl@0: // saved as the new LAST definition file index, but the saved sl@0: // definition/name is NOT updated. sl@0: // sl@0: // The returned aLastIndex is used to check if there is more than sl@0: // one definition within a single input file (which is an error if sl@0: // the input file is a human readable config file). sl@0: // sl@0: // The returned aFirstDef gives the first/winning definition. sl@0: static bool InsertUidDefinition(TInt32 aUid, const std::string &aDef, TInt32 aInputFileIndex, sl@0: TInt32 &aLastIndex, std::string &aFirstDef); sl@0: sl@0: static void GenerateEnumEntries(); sl@0: static EnumEntry *EnumEntries(); sl@0: private: sl@0: }; sl@0: sl@0: sl@0: sl@0: sl@0: #endif