omaprovisioning/provisioning/ProvisioningEngine/Src/WPPhoneFactory.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 15:52:47 +0300
changeset 22 19fb38abab1d
parent 0 b497e44ab2fc
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
* 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