omaprovisioning/provisioning/ProvisioningEngine/Src/WPPhoneFactory.cpp
changeset 0 b497e44ab2fc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omaprovisioning/provisioning/ProvisioningEngine/Src/WPPhoneFactory.cpp	Thu Dec 17 09:07:52 2009 +0200
@@ -0,0 +1,57 @@
+/*
+* 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