Update contrib.
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * crypto plugin extended characteristic implementation
20 #include <cryptospi/extendedcharacteristics.h>
21 #include <cryptospi/plugincharacteristics.h>
22 #include <cryptospi/cryptospidef.h>
24 using namespace CryptoSpi;
27 // Implementation of Extended Characteristics
30 EXPORT_C CExtendedCharacteristics* CExtendedCharacteristics::NewL(TInt aAvailableConcurrency,
33 CExtendedCharacteristics* self = new(ELeave) CExtendedCharacteristics();
34 CleanupStack::PushL(self);
35 self->ConstructL(aAvailableConcurrency, aExclusiveUse);
40 EXPORT_C CExtendedCharacteristics::~CExtendedCharacteristics()
42 delete iExtCharacteristics;
45 EXPORT_C void CExtendedCharacteristics::AddCharacteristicL(const TInt aValue, TUid aUid)
47 iExtCharacteristics->AddL(aValue, aUid);
50 EXPORT_C void CExtendedCharacteristics::AddCharacteristicL(const TDesC8& aValue, TUid aUid)
52 iExtCharacteristics->AddL(aValue, aUid);
55 EXPORT_C TInt CExtendedCharacteristics::GetTIntCharacteristicL(TUid aUid) const
57 return iExtCharacteristics->GetTIntL(aUid);
60 EXPORT_C const TDesC8& CExtendedCharacteristics::GetTDesC8CharacteristicL(TUid aUid) const
62 return iExtCharacteristics->GetTDesC8L(aUid);
65 EXPORT_C const CCryptoParams* CExtendedCharacteristics::ListExtendedCharacteristics() const
67 return iExtCharacteristics;
70 void CExtendedCharacteristics::ConstructL(TInt aAvailableConcurrency, TBool aExclusiveUse)
72 iExtCharacteristics = CCryptoParams::NewL();
73 iExtCharacteristics->AddL(aAvailableConcurrency, KConcurrencyTypeUid);
74 iExtCharacteristics->AddL(aExclusiveUse, KExclusiveUseTypeUid);
77 CExtendedCharacteristics::CExtendedCharacteristics()