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 "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: #include sl@0: #include sl@0: #include "panic.h" sl@0: sl@0: void Panic(TStdPluginPanic aPanic) sl@0: { sl@0: _LIT(KStdPanicCategory, "WSERV-PLUGIN"); sl@0: User::Panic(KStdPanicCategory, aPanic); sl@0: } sl@0: sl@0: GLDEF_C TDisplayMode ParseDisplayMode(const TDesC& aModeName) sl@0: { sl@0: // Not using _LIT because we only want the string temporarily, not permanently on the heap. sl@0: if (!aModeName.CompareF(_L("Color16MAP"))) sl@0: return EColor16MAP; sl@0: else if (!aModeName.CompareF(_L("Color16MA"))) sl@0: return EColor16MA; sl@0: else if (!aModeName.CompareF(_L("Color16MU"))) sl@0: return EColor16MU; sl@0: else if (!aModeName.CompareF(_L("Color64K"))) sl@0: return EColor64K; sl@0: else if (!aModeName.CompareF(_L("Color4K"))) sl@0: return EColor4K; sl@0: else if (!aModeName.CompareF(_L("Color256"))) sl@0: return EColor256; sl@0: else if (!aModeName.CompareF(_L("Color16"))) sl@0: return EColor16; sl@0: else if (!aModeName.CompareF(_L("Gray256"))) sl@0: return EGray256; sl@0: else if (!aModeName.CompareF(_L("Gray16"))) sl@0: return EGray16; sl@0: else if (!aModeName.CompareF(_L("Gray4"))) sl@0: return EGray4; sl@0: else if (!aModeName.CompareF(_L("Gray2"))) sl@0: return EGray2; sl@0: else sl@0: return ENone; sl@0: }