omaprovisioning/provisioning/ProvisioningEngine/Src/WPPhoneFactory.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 15 Jul 2010 19:36:11 +0300
branchRCL_3
changeset 23 4af31167ea77
parent 0 b497e44ab2fc
permissions -rw-r--r--
Revision: 201024 Kit: 2010127

/*
* 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:  Factory for phone interface.
*
*/


//  INCLUDE FILES
#include <e32std.h>
#include "WPPhoneFactory.h"
#include "MWPPhone.h"
#include "CWPPhone.h"
#include "CWPPhoneEmul.h"
#include "WPEngineDebug.h"

// CONSTANTS

// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// WPPhoneFactory::CreateL
// -----------------------------------------------------------------------------
//
EXPORT_C MWPPhone* WPPhoneFactory::CreateL()
    {
    DEBUG( "WPPhoneFactory: Creating phone" );
    MWPPhone* phone = CreateLC();
    CleanupStack::Pop();
    DEBUG( "WPPhoneFactory: Created" );
    return phone;
    }

// -----------------------------------------------------------------------------
// WPPhoneFactory::CreateLC
// -----------------------------------------------------------------------------
//
EXPORT_C MWPPhone* WPPhoneFactory::CreateLC()
    {
#ifdef __WINS__
    return CWPPhoneEmul::NewLC();
#else
    return CWPPhone::NewLC();
#endif
    }

//  End of File