|
1 /* |
|
2 * Copyright (c) 2008-2008 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: Abstract base class for renderer plugins |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // ----------------------------------------------------------------------------- |
|
21 // |
|
22 // ----------------------------------------------------------------------------- |
|
23 // |
|
24 inline CHuiRenderPluginBase::CHuiRenderPluginBase() |
|
25 { |
|
26 } |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 inline CHuiRenderPluginBase::~CHuiRenderPluginBase() |
|
33 { |
|
34 REComSession::DestroyedImplementation(iDtor_ID_Key); |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 inline CHuiRenderPluginBase* CHuiRenderPluginBase::NewL(const TDesC& aMatchData) |
|
42 { |
|
43 // Convert match data to 8-bits |
|
44 HBufC8* buf = HBufC8::NewLC(aMatchData.Length()); |
|
45 TPtr8 data = buf->Des(); |
|
46 data.Copy(aMatchData); |
|
47 data.LowerCase(); // change to lower case |
|
48 |
|
49 // Set resolving parameters |
|
50 TEComResolverParams resolverParams; |
|
51 resolverParams.SetDataType(data); |
|
52 |
|
53 // Get the instantiation |
|
54 CHuiRenderPluginBase* renderPlugin = REINTERPRET_CAST(CHuiRenderPluginBase*, |
|
55 REComSession::CreateImplementationL(KUidHuiRenderPluginBase, |
|
56 _FOFF(CHuiRenderPluginBase, iDtor_ID_Key), |
|
57 resolverParams)); |
|
58 CleanupStack::PopAndDestroy(buf); |
|
59 return renderPlugin; |
|
60 } |