omaprovisioning/provisioning/ProvisioningEngine/Src/WPPhoneFactory.cpp
changeset 0 b497e44ab2fc
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Factory for phone interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 //  INCLUDE FILES
       
    20 #include <e32std.h>
       
    21 #include "WPPhoneFactory.h"
       
    22 #include "MWPPhone.h"
       
    23 #include "CWPPhone.h"
       
    24 #include "CWPPhoneEmul.h"
       
    25 #include "WPEngineDebug.h"
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // ============================ MEMBER FUNCTIONS ===============================
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // WPPhoneFactory::CreateL
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 EXPORT_C MWPPhone* WPPhoneFactory::CreateL()
       
    36     {
       
    37     DEBUG( "WPPhoneFactory: Creating phone" );
       
    38     MWPPhone* phone = CreateLC();
       
    39     CleanupStack::Pop();
       
    40     DEBUG( "WPPhoneFactory: Created" );
       
    41     return phone;
       
    42     }
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // WPPhoneFactory::CreateLC
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 EXPORT_C MWPPhone* WPPhoneFactory::CreateLC()
       
    49     {
       
    50 #ifdef __WINS__
       
    51     return CWPPhoneEmul::NewLC();
       
    52 #else
       
    53     return CWPPhone::NewLC();
       
    54 #endif
       
    55     }
       
    56 
       
    57 //  End of File