camerauis/activepalette/Src/ActivePalette2Factory.cpp
branchRCL_3
changeset 24 bac7acad7cb3
parent 0 1ddebce53859
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Creates concrete implementation of AP*
       
    15 */
       
    16 
       
    17 
       
    18 /**
       
    19  * @file ActivePalette2Factory.cpp
       
    20  * Creates concrete implementation of AP
       
    21  */
       
    22 
       
    23 #include "ActivePalette2BuildConfig.h"
       
    24 
       
    25 #ifdef AP2_USE_2D_RENDERING
       
    26 #include "ActivePalette2BasicUI.h"
       
    27 #endif
       
    28 
       
    29 #ifdef AP2_USE_3D_RENDERING
       
    30 #include "ActivePalette2HUI.h"
       
    31 #endif
       
    32 
       
    33 #include <activepalette2factory.h>
       
    34 #include <activepalette2ui.h>
       
    35 
       
    36 
       
    37 // ----------------------------------------------------------------------------
       
    38 // ActivePalette2Factory::CreateActivePaletteUIL
       
    39 // ----------------------------------------------------------------------------
       
    40 #ifdef AP2_USE_2D_RENDERING
       
    41 EXPORT_C MActivePalette2UI* ActivePalette2Factory::CreateActivePaletteUIL(TActivePalette2DrawMode aDrawMode)
       
    42     {
       
    43     return CActivePalette2BasicUI::NewL(aDrawMode);
       
    44     }
       
    45 #else
       
    46 EXPORT_C MActivePalette2UI* ActivePalette2Factory::CreateActivePaletteUIL(TActivePalette2DrawMode /* aDrawMode */ )
       
    47 	{
       
    48     User::Leave(KErrNotSupported);
       
    49     return NULL;
       
    50 	}
       
    51 #endif // AP2_USE_2D_RENDERING    
       
    52 
       
    53 
       
    54 // ----------------------------------------------------------------------------
       
    55 // ActivePalette2Factory::CreateHUIActivePaletteUIL
       
    56 // ----------------------------------------------------------------------------
       
    57 #ifdef AP2_USE_3D_RENDERING
       
    58 EXPORT_C MActivePalette2UI* ActivePalette2Factory::CreateHUIActivePaletteUIL(CHuiEnv& aEnv)
       
    59 	{
       
    60 	return CActivePalette2HUI::NewL(aEnv);
       
    61 	}
       
    62 #else
       
    63 EXPORT_C MActivePalette2UI* ActivePalette2Factory::CreateHUIActivePaletteUIL(CHuiEnv& /* aEnv */ )
       
    64 	{
       
    65     User::Leave(KErrNotSupported);
       
    66 	return NULL;
       
    67 	}
       
    68 #endif // AP2_USE_3D_RENDERING
       
    69 
       
    70 
       
    71 EXPORT_C MActivePalette2UI* ActivePalette2Factory::CreateGuiActivePaletteUIL( MGui* /*aGui*/ )
       
    72     {
       
    73     User::Leave(KErrNotSupported);
       
    74     return NULL;
       
    75     }