|
1 /* |
|
2 * Copyright (c) 2002-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: |
|
15 * Name : Compressor.inl |
|
16 * Part of : deflatecomp |
|
17 * inline functions for compressor plugins. |
|
18 * Version : 1.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 inline CSigCompCompressor::CSigCompCompressor() |
|
25 { |
|
26 } |
|
27 |
|
28 inline CSigCompCompressor::~CSigCompCompressor() |
|
29 { |
|
30 REComSession::DestroyedImplementation(iUniqueKey); |
|
31 } |
|
32 |
|
33 inline CSigCompCompressor* CSigCompCompressor::NewL( |
|
34 const TDesC8& aMatchString, |
|
35 MSigCompStateMgr* aStateMgr, |
|
36 TStateItem* aStateItem, |
|
37 TInt aStateItemLength, |
|
38 TBool aUploadState) |
|
39 { |
|
40 TCompressorInitParams initParams; |
|
41 initParams.iStateMgr = aStateMgr; |
|
42 initParams.iStateItem = aStateItem; |
|
43 initParams.iStateItemLength = aStateItemLength; |
|
44 initParams.iUploadState = aUploadState; |
|
45 |
|
46 /* Set up the interface find for the default resolver. */ |
|
47 TEComResolverParams resolverParams; |
|
48 resolverParams.SetDataType(aMatchString); |
|
49 resolverParams.SetWildcardMatch(ETrue); |
|
50 return reinterpret_cast<CSigCompCompressor*> |
|
51 (REComSession::CreateImplementationL( |
|
52 KCompressorInterfaceUid, |
|
53 _FOFF(CSigCompCompressor, iUniqueKey), |
|
54 &initParams, |
|
55 resolverParams, |
|
56 KRomOnlyResolverUid)); |
|
57 } |
|
58 |
|
59 inline CSigCompCompressor* CSigCompCompressor::NewL( |
|
60 const TDesC8& aMatchString, |
|
61 MSigCompStateMgr* aStateMgr) |
|
62 { |
|
63 TCompressorInitParams initParams; |
|
64 initParams.iStateMgr = aStateMgr; |
|
65 initParams.iStateItem = NULL; |
|
66 initParams.iStateItemLength = 0; |
|
67 initParams.iUploadState = EFalse; |
|
68 |
|
69 /* Set up the interface find for the default resolver. */ |
|
70 TEComResolverParams resolverParams; |
|
71 resolverParams.SetDataType(aMatchString); |
|
72 resolverParams.SetWildcardMatch(ETrue); |
|
73 return reinterpret_cast<CSigCompCompressor*> |
|
74 (REComSession::CreateImplementationL( |
|
75 KCompressorInterfaceUid, |
|
76 _FOFF(CSigCompCompressor, iUniqueKey), |
|
77 &initParams, |
|
78 resolverParams, |
|
79 KRomOnlyResolverUid)); |
|
80 } |