|
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Purpose: Inline implementations of CPushSecurityPolicy functions |
|
15 // |
|
16 // |
|
17 // |
|
18 |
|
19 // Local includes |
|
20 // |
|
21 #include "CPushSecurityPolicy.h" |
|
22 |
|
23 // System includes |
|
24 // |
|
25 #include <ecom/ecom.h> |
|
26 |
|
27 inline CPushSecurityPolicy::CPushSecurityPolicy() |
|
28 : CBase() |
|
29 { |
|
30 } |
|
31 |
|
32 inline CPushSecurityPolicy::~CPushSecurityPolicy() |
|
33 { |
|
34 REComSession::DestroyedImplementation(iDtor_ID_Key); |
|
35 } |
|
36 |
|
37 inline CPushSecurityPolicy* CPushSecurityPolicy::NewL(const TDesC& aMatchData) |
|
38 { |
|
39 // Convert match data to 8-bits |
|
40 HBufC8* buf = HBufC8::NewLC(aMatchData.Length()); |
|
41 TPtr8 data = buf->Des(); |
|
42 data.Copy(aMatchData); |
|
43 |
|
44 // Set resolving parameters |
|
45 TEComResolverParams resolverParams; |
|
46 resolverParams.SetDataType(data); |
|
47 resolverParams.SetWildcardMatch(ETrue); |
|
48 |
|
49 // Get the instantiation |
|
50 |
|
51 CPushSecurityPolicy* securityPolicy = REINTERPRET_CAST(CPushSecurityPolicy*, |
|
52 REComSession::CreateImplementationL(KUidPushSecurityPolicy, |
|
53 _FOFF(CPushSecurityPolicy, iDtor_ID_Key), |
|
54 resolverParams)); |
|
55 CleanupStack::PopAndDestroy(buf); |
|
56 return securityPolicy; |
|
57 } |
|
58 |