diff -r 000000000000 -r 05e9090e2422 uigraphics/AknIcon/src/AknIconFormatHandlerFactory.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uigraphics/AknIcon/src/AknIconFormatHandlerFactory.cpp Thu Dec 17 09:14:12 2009 +0200 @@ -0,0 +1,77 @@ +/* +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +// INCLUDE FILES +#include +#include +#include "AknIconFormatHandlerFactory.h" +#include "AknIconTraces.h" + +#ifdef __SVGT +#include "AknSvgFormatHandler.h" +#endif // __SVGT +#include "AknNGAFormatHandler.h" + +#ifdef __NVG +#include "AknNvgFormatHandler.h" +#endif // __NVG + +// CONSTANTS + +// ============================ MEMBER FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// AknIconFormatHandlerFactory::NewIconFormatHandlerL +// ----------------------------------------------------------------------------- +// +MAknIconFormatHandler* AknIconFormatHandlerFactory::NewIconFormatHandlerL( + const TInt aType,TSize aBitmapSize,TDisplayMode aBitmapDspMode,TDisplayMode aMaskDspMode ) + { + MAknIconFormatHandler* handler = NULL; + + switch ( aType ) + { +#ifdef __NVG + case EIconFormatNVG: + handler = CAknNvgFormatHandler::NewL(); + break; +#endif // __NVG +#ifdef __SVGT + case EIconFormatSVG: +#ifndef __ONLYNGAICON + handler = CAknSvgFormatHandler::NewL(EIconFormatSVG, aBitmapSize, aBitmapDspMode, aMaskDspMode); + break; +#endif +#endif // __SVGT + case EIconFormatNGA: + handler = CAknNGAFormatHandler::NewL(EIconFormatNGA, aBitmapSize, aBitmapDspMode, aMaskDspMode); + break; + default: + break; + } + + if ( !handler ) + { + User::Leave( KErrNotSupported ); + } + + return handler; + } + +// End of File