equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2006-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 the License "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 * crypto base API implementation |
|
16 * crypto base API implementation |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 /** |
|
22 @file |
|
23 */ |
|
24 |
|
25 #include <cryptospi/plugincharacteristics.h> |
|
26 #include <cryptospi/cryptobaseapi.h> |
|
27 #include <cryptospi/cryptoplugin.h> |
|
28 #include <e32std.h> |
|
29 |
|
30 using namespace CryptoSpi; |
|
31 |
|
32 // |
|
33 // CCryptoBase |
|
34 // |
|
35 CCryptoBase::CCryptoBase(MPlugin* aPlugin, TInt aLibHandle) |
|
36 : iPlugin(aPlugin), iLibHandle(aLibHandle) |
|
37 { |
|
38 } |
|
39 |
|
40 EXPORT_C void CCryptoBase::GetCharacteristicsL(const TCharacteristics*& aPluginCharacteristics) |
|
41 { |
|
42 iPlugin->GetCharacteristicsL(aPluginCharacteristics); |
|
43 } |
|
44 |
|
45 EXPORT_C const CExtendedCharacteristics* CCryptoBase::GetExtendedCharacteristicsL() |
|
46 { |
|
47 return iPlugin->GetExtendedCharacteristicsL(); |
|
48 } |
|
49 |
|
50 EXPORT_C void CCryptoBase::Reset() |
|
51 { |
|
52 iPlugin->Reset(); |
|
53 } |
|
54 |
|
55 CCryptoBase::~CCryptoBase() |
|
56 { |
|
57 //Close the plugin |
|
58 iPlugin->Close(); |
|
59 |
|
60 //Close the library |
|
61 RLibrary lib; |
|
62 lib.SetHandle(iLibHandle); |
|
63 lib.Close(); |
|
64 } |
|
65 |