First public contribution.
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #include <ups/dialogcreator.h>
20 #include <ups/upserr.h>
21 #include <ecom/ecom.h>
24 using namespace UserPromptService;
26 EXPORT_C CDialogCreator::CDialogCreator()
30 : CActive(EPriorityStandard)
34 EXPORT_C CDialogCreator::~CDialogCreator()
39 REComSession::DestroyedImplementation(iDtor_ID_Key);
42 EXPORT_C CDialogCreator* CDialogCreator::NewL(const TUid& aDialogCreatorImplementationId)
44 Creates a new dialog creator.
45 @param aDialogCreatorImplementationId The UID of the dialog creator implemenation
46 as specified in the policy file.
48 @return A pointer to the new dialog creator implementation.
52 DEBUG_PRINTF2(_L8("Instantiating dialog creator 0x%08x"), aDialogCreatorImplementationId);
54 REComSession::CreateImplementationL(aDialogCreatorImplementationId,
55 _FOFF(CDialogCreator,iDtor_ID_Key)));
59 DEBUG_PRINTF3(_L8("Failed to instantiate dialog creator 0x%08x, err = %d"),
60 aDialogCreatorImplementationId.iUid, err);
63 if (err == KErrNotFound)
65 err = KErrUpsMissingDialogCreator;
67 User::LeaveIfError(err);
68 return reinterpret_cast<CDialogCreator*>(plugin);
71 EXPORT_C TInt CDialogCreator::GetExtension(TUint aExtensionId, TAny*& a0, TAny* a1)
73 Allows extension of this interface. Calls Extension_
75 @param aExtensionId The UID of the interface to instantiate.
76 @param a0 A reference to a pointer that should be set to the newly
78 @param a1 Data specific to the instantiate of the specified interface.
80 @return KErrNone if the extension is supported or KErrNotSupported if the extension is not
81 recognised; otherwise, a system wide error may be returned.
84 return Extension_(aExtensionId, a0, a1);
87 EXPORT_C TInt CDialogCreator::Extension_(TUint aExtensionId, TAny*& a0, TAny* a1)
89 return CActive::Extension_(aExtensionId, a0, a1);