|
1 // Copyright (c) 2007-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 the License "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 // |
|
15 |
|
16 #include <caf/streaming/keyassociation.h> |
|
17 #include <e32cmn.h> |
|
18 #include <e32def.h> |
|
19 |
|
20 using namespace StreamAccess; |
|
21 |
|
22 EXPORT_C CIpSecKeyAssociation* CIpSecKeyAssociation::NewL(TInt32 aSpi, HBufC8* aEncryptionKey, |
|
23 HBufC8* aAuthenticationKey) |
|
24 { |
|
25 CIpSecKeyAssociation* self = CIpSecKeyAssociation::NewLC(aSpi, aEncryptionKey, aAuthenticationKey); |
|
26 CleanupStack::Pop(self); |
|
27 return self; |
|
28 } |
|
29 |
|
30 EXPORT_C CIpSecKeyAssociation* CIpSecKeyAssociation::NewLC(TInt32 aSpi, HBufC8* aEncryptionKey, |
|
31 HBufC8* aAuthenticationKey) |
|
32 { |
|
33 CIpSecKeyAssociation* self = new (ELeave) CIpSecKeyAssociation(aSpi, aEncryptionKey, aAuthenticationKey); |
|
34 CleanupStack::PushL(self); |
|
35 return self; |
|
36 } |
|
37 |
|
38 CIpSecKeyAssociation::CIpSecKeyAssociation(TInt32 aSpi, HBufC8* aEncryptionKey, HBufC8* aAuthenticationKey) : |
|
39 iSpi(aSpi), iEncryptionKey(aEncryptionKey), |
|
40 iAuthenticationKey(aAuthenticationKey) |
|
41 { |
|
42 } |
|
43 |
|
44 |
|
45 TInt32 CIpSecKeyAssociation::GetSpiL() const |
|
46 { |
|
47 return iSpi; |
|
48 } |
|
49 |
|
50 const HBufC8* CIpSecKeyAssociation::GetEncryptionKeyL() const |
|
51 { |
|
52 return iEncryptionKey; |
|
53 } |
|
54 |
|
55 const HBufC8* CIpSecKeyAssociation::GetAuthenticationKeyL() const |
|
56 { |
|
57 return iAuthenticationKey; |
|
58 } |
|
59 |
|
60 |