sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: using namespace StreamAccess; sl@0: sl@0: EXPORT_C CIpSecKeyAssociation* CIpSecKeyAssociation::NewL(TInt32 aSpi, HBufC8* aEncryptionKey, sl@0: HBufC8* aAuthenticationKey) sl@0: { sl@0: CIpSecKeyAssociation* self = CIpSecKeyAssociation::NewLC(aSpi, aEncryptionKey, aAuthenticationKey); sl@0: CleanupStack::Pop(self); sl@0: return self; sl@0: } sl@0: sl@0: EXPORT_C CIpSecKeyAssociation* CIpSecKeyAssociation::NewLC(TInt32 aSpi, HBufC8* aEncryptionKey, sl@0: HBufC8* aAuthenticationKey) sl@0: { sl@0: CIpSecKeyAssociation* self = new (ELeave) CIpSecKeyAssociation(aSpi, aEncryptionKey, aAuthenticationKey); sl@0: CleanupStack::PushL(self); sl@0: return self; sl@0: } sl@0: sl@0: CIpSecKeyAssociation::CIpSecKeyAssociation(TInt32 aSpi, HBufC8* aEncryptionKey, HBufC8* aAuthenticationKey) : sl@0: iSpi(aSpi), iEncryptionKey(aEncryptionKey), sl@0: iAuthenticationKey(aAuthenticationKey) sl@0: { sl@0: } sl@0: sl@0: sl@0: TInt32 CIpSecKeyAssociation::GetSpiL() const sl@0: { sl@0: return iSpi; sl@0: } sl@0: sl@0: const HBufC8* CIpSecKeyAssociation::GetEncryptionKeyL() const sl@0: { sl@0: return iEncryptionKey; sl@0: } sl@0: sl@0: const HBufC8* CIpSecKeyAssociation::GetAuthenticationKeyL() const sl@0: { sl@0: return iAuthenticationKey; sl@0: } sl@0: sl@0: