|
1 /* |
|
2 * Copyright (c) 2006 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: Implementation of DevCertKeyEncryptor |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <ecom/ecom.h> |
|
20 #include "DevCertKeyEncryptor.h" |
|
21 |
|
22 |
|
23 // ======== MEMBER FUNCTIONS ======== |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // CDevCertKeyEncryptor::NewL() |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 CDevCertKeyEncryptor* CDevCertKeyEncryptor::NewL() |
|
30 { |
|
31 CDevCertKeyEncryptor* self = NewLC(); |
|
32 CleanupStack::Pop( self ); |
|
33 return self; |
|
34 } |
|
35 |
|
36 |
|
37 // --------------------------------------------------------------------------- |
|
38 // CDevCertKeyEncryptor::NewLC() |
|
39 // --------------------------------------------------------------------------- |
|
40 // |
|
41 CDevCertKeyEncryptor* CDevCertKeyEncryptor::NewLC() |
|
42 { |
|
43 CDevCertKeyEncryptor* self = new(ELeave)CDevCertKeyEncryptor(); |
|
44 CleanupStack::PushL( self ); |
|
45 self->ConstructL(); |
|
46 return self; |
|
47 } |
|
48 |
|
49 |
|
50 // --------------------------------------------------------------------------- |
|
51 // CDevCertKeyEncryptor::~CDevCertKeyEncryptor() |
|
52 // --------------------------------------------------------------------------- |
|
53 // |
|
54 CDevCertKeyEncryptor::~CDevCertKeyEncryptor() |
|
55 { |
|
56 REComSession::DestroyedImplementation(iDtorIDKey); |
|
57 |
|
58 if(iKeyEncryptor) |
|
59 { |
|
60 iKeyEncryptor->Release(); |
|
61 } |
|
62 } |
|
63 |
|
64 |
|
65 // --------------------------------------------------------------------------- |
|
66 // CDevCertKeyEncryptor::CreateImplementationL() |
|
67 // --------------------------------------------------------------------------- |
|
68 // |
|
69 MKeyEncryptor* CDevCertKeyEncryptor::CreateImplementationL() |
|
70 { |
|
71 TAny* ptr = REComSession::CreateImplementationL(iImplementationUID, iDtorIDKey); |
|
72 iKeyEncryptor = static_cast<MKeyEncryptor*>(ptr); |
|
73 return iKeyEncryptor; |
|
74 } |
|
75 |
|
76 |
|
77 // --------------------------------------------------------------------------- |
|
78 // CDevCertKeyEncryptor::IsPluginExistL() |
|
79 // --------------------------------------------------------------------------- |
|
80 // |
|
81 TBool CDevCertKeyEncryptor::IsPluginExistL() |
|
82 { |
|
83 RImplInfoPtrArray array; |
|
84 REComSession::ListImplementationsL(KKeyEncryptorInterfaceUID, array); |
|
85 |
|
86 if( array.Count()) |
|
87 { |
|
88 iImplementationUID = array[0]->ImplementationUid(); |
|
89 array.ResetAndDestroy(); |
|
90 return ETrue; |
|
91 } |
|
92 else |
|
93 { |
|
94 array.ResetAndDestroy(); |
|
95 return EFalse; |
|
96 } |
|
97 } |
|
98 |
|
99 |
|
100 // --------------------------------------------------------------------------- |
|
101 // CDevCertKeyEncryptor::CDevCertKeyEncryptor() |
|
102 // --------------------------------------------------------------------------- |
|
103 // |
|
104 CDevCertKeyEncryptor::CDevCertKeyEncryptor() |
|
105 { |
|
106 } |
|
107 |
|
108 |
|
109 // --------------------------------------------------------------------------- |
|
110 // CDevCertKeyEncryptor::ConstructL() |
|
111 // --------------------------------------------------------------------------- |
|
112 // |
|
113 void CDevCertKeyEncryptor::ConstructL() |
|
114 { |
|
115 } |
|
116 |
|
117 //EOF |
|
118 |