|
1 /* |
|
2 * Copyright (c) 2008-2009 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: ECom search interface definition |
|
15 * |
|
16 */ |
|
17 |
|
18 // Interface's (abstract base class's) destructor |
|
19 |
|
20 inline CPreSyncPlugin::~CPreSyncPlugin() |
|
21 { |
|
22 |
|
23 REComSession::DestroyedImplementation(iDtor_ID_Key); |
|
24 } |
|
25 |
|
26 inline CPreSyncPlugin* |
|
27 CPreSyncPlugin::NewL(TUid aImplementationUid) |
|
28 { |
|
29 TAny* ptr = REComSession::CreateImplementationL( |
|
30 aImplementationUid,_FOFF(CPreSyncPlugin,iDtor_ID_Key)); |
|
31 // The type of TAny* ptr should be CPreSyncPlugin. |
|
32 return REINTERPRET_CAST(CPreSyncPlugin*, ptr); |
|
33 } |
|
34 |
|
35 inline CPreSyncPlugin* CPreSyncPlugin::NewL(const TDesC8& aParam) |
|
36 { |
|
37 // Define options, how the default resolver will find appropriate |
|
38 // implementation. |
|
39 TEComResolverParams resolverParams; |
|
40 resolverParams.SetDataType(aParam); |
|
41 resolverParams.SetWildcardMatch(ETrue); // Allow wildcard matching |
|
42 |
|
43 TAny* ptr = REComSession::CreateImplementationL( |
|
44 KPreSyncPluginInterfaceUid, |
|
45 _FOFF(CPreSyncPlugin,iDtor_ID_Key),resolverParams); |
|
46 |
|
47 // The type of TAny* ptr should be CTmoPhonebookSyncInterfaceDefinitionDlg. |
|
48 return REINTERPRET_CAST(CPreSyncPlugin*, ptr); |
|
49 } |