|
1 /* |
|
2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Interface's (abstract base class's) static factory method implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <e32def.h> |
|
19 #include <ecom\ecom.h> |
|
20 |
|
21 // --------------------------------------------------------------------------- |
|
22 // CUssdExtensionInterface::NewL |
|
23 // Interface's (abstract base class's) static factory method implementation. |
|
24 // Asks ECOM plugin framework to instantiate appropriate concret plugin |
|
25 // implementation. |
|
26 // --------------------------------------------------------------------------- |
|
27 // |
|
28 inline CUssdExtensionInterface* CUssdExtensionInterface::NewL() |
|
29 { |
|
30 TEComResolverParams resolutionParameters; |
|
31 resolutionParameters.SetGenericMatch(ETrue); |
|
32 TAny* interface = REComSession::CreateImplementationL ( |
|
33 KUssdExtensionInterfaceUid, _FOFF (CUssdExtensionInterface, iDtor_ID_Key), resolutionParameters, KRomOnlyResolverUid); |
|
34 |
|
35 return reinterpret_cast <CUssdExtensionInterface*> (interface); |
|
36 } |
|
37 |
|
38 // --------------------------------------------------------------------------- |
|
39 // CUssdExtensionInterface::NewL |
|
40 // Interface's (abstract base class's) static factory method implementation. |
|
41 // Asks ECOM plugin framework to instantiate appropriate concret plugin |
|
42 // implementation. |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 inline CUssdExtensionInterface* CUssdExtensionInterface::NewL(const TDesC8& aOperationName) |
|
46 { |
|
47 TEComResolverParams resolverParams; |
|
48 resolverParams.SetDataType (aOperationName); |
|
49 resolverParams.SetWildcardMatch (ETrue); |
|
50 |
|
51 TAny* interface = REComSession::CreateImplementationL (KUssdExtensionInterfaceUid, |
|
52 _FOFF (CUssdExtensionInterface, iDtor_ID_Key), resolverParams, KRomOnlyResolverUid); |
|
53 |
|
54 return reinterpret_cast <CUssdExtensionInterface*> (interface); |
|
55 } |
|
56 |
|
57 // --------------------------------------------------------------------------- |
|
58 // CUssdExtensionInterface::~CUssdExtensionInterface |
|
59 // Interface's (abstract base class's) destructor |
|
60 // --------------------------------------------------------------------------- |
|
61 // |
|
62 inline CUssdExtensionInterface::~CUssdExtensionInterface() |
|
63 { |
|
64 REComSession::DestroyedImplementation (iDtor_ID_Key); |
|
65 } |
|
66 |
|
67 |