sl@0: /* sl@0: * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "upslog.h" sl@0: sl@0: using namespace UserPromptService; sl@0: sl@0: EXPORT_C CDialogCreator::CDialogCreator() sl@0: /** sl@0: Constructor sl@0: */ sl@0: : CActive(EPriorityStandard) sl@0: { sl@0: } sl@0: sl@0: EXPORT_C CDialogCreator::~CDialogCreator() sl@0: /** sl@0: Destructor sl@0: */ sl@0: { sl@0: REComSession::DestroyedImplementation(iDtor_ID_Key); sl@0: } sl@0: sl@0: EXPORT_C CDialogCreator* CDialogCreator::NewL(const TUid& aDialogCreatorImplementationId) sl@0: /** sl@0: Creates a new dialog creator. sl@0: @param aDialogCreatorImplementationId The UID of the dialog creator implemenation sl@0: as specified in the policy file. sl@0: sl@0: @return A pointer to the new dialog creator implementation. sl@0: */ sl@0: { sl@0: TAny* plugin(0); sl@0: DEBUG_PRINTF2(_L8("Instantiating dialog creator 0x%08x"), aDialogCreatorImplementationId); sl@0: TRAPD(err, plugin = sl@0: REComSession::CreateImplementationL(aDialogCreatorImplementationId, sl@0: _FOFF(CDialogCreator,iDtor_ID_Key))); sl@0: sl@0: if (err != KErrNone) sl@0: { sl@0: DEBUG_PRINTF3(_L8("Failed to instantiate dialog creator 0x%08x, err = %d"), sl@0: aDialogCreatorImplementationId.iUid, err); sl@0: } sl@0: sl@0: if (err == KErrNotFound) sl@0: { sl@0: err = KErrUpsMissingDialogCreator; sl@0: } sl@0: User::LeaveIfError(err); sl@0: return reinterpret_cast(plugin); sl@0: } sl@0: sl@0: EXPORT_C TInt CDialogCreator::GetExtension(TUint aExtensionId, TAny*& a0, TAny* a1) sl@0: /** sl@0: Allows extension of this interface. Calls Extension_ sl@0: sl@0: @param aExtensionId The UID of the interface to instantiate. sl@0: @param a0 A reference to a pointer that should be set to the newly sl@0: instantiated object. sl@0: @param a1 Data specific to the instantiate of the specified interface. sl@0: sl@0: @return KErrNone if the extension is supported or KErrNotSupported if the extension is not sl@0: recognised; otherwise, a system wide error may be returned. sl@0: */ sl@0: { sl@0: return Extension_(aExtensionId, a0, a1); sl@0: } sl@0: sl@0: EXPORT_C TInt CDialogCreator::Extension_(TUint aExtensionId, TAny*& a0, TAny* a1) sl@0: { sl@0: return CActive::Extension_(aExtensionId, a0, a1); sl@0: }