|
1 // Copyright (c) 2004-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 "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 // Implementation of CSecureBUREncryptKeySource class. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @released |
|
21 */ |
|
22 #include "sbencrypt.h" |
|
23 #include "sbencryptimpl.h" |
|
24 |
|
25 namespace conn |
|
26 { |
|
27 EXPORT_C CSecureBUREncryptKeySource* CSecureBUREncryptKeySource::NewL() |
|
28 { |
|
29 CSecureBUREncryptKeySource* pSelf = new CSecureBUREncryptKeySource(); |
|
30 CleanupStack::PushL(pSelf); |
|
31 pSelf->ConstructL(); |
|
32 CleanupStack::Pop(pSelf); |
|
33 |
|
34 return pSelf; |
|
35 } |
|
36 |
|
37 CSecureBUREncryptKeySource::CSecureBUREncryptKeySource() |
|
38 /** |
|
39 C++ constructor |
|
40 */ |
|
41 { |
|
42 } |
|
43 |
|
44 EXPORT_C CSecureBUREncryptKeySource::~CSecureBUREncryptKeySource() |
|
45 { |
|
46 delete iImpl; |
|
47 } |
|
48 |
|
49 void CSecureBUREncryptKeySource::ConstructL() |
|
50 /** |
|
51 Symbian 2nd phase construction |
|
52 */ |
|
53 { |
|
54 iImpl = CSecureBURKeySourceImpl::NewL(); |
|
55 } |
|
56 |
|
57 EXPORT_C void CSecureBUREncryptKeySource::GetDefaultBufferForBackupL(TDriveNumber aDrive, |
|
58 TBool& aGotBuffer, |
|
59 TDes& aBuffer) |
|
60 { |
|
61 iImpl->GetDefaultBufferForBackupL(aDrive, aGotBuffer, aBuffer); |
|
62 } |
|
63 |
|
64 |
|
65 |
|
66 EXPORT_C void CSecureBUREncryptKeySource::GetBackupKeyL(TDriveNumber aDrive, TSecureId aSID, |
|
67 TBool &aDoEncrypt, TDes8& aKey, |
|
68 TBool& aGotBuffer, TDes& aBuffer) |
|
69 { |
|
70 iImpl->GetBackupKeyL(aDrive, aSID, aDoEncrypt, aKey, aGotBuffer, aBuffer); |
|
71 } |
|
72 |
|
73 |
|
74 |
|
75 EXPORT_C void CSecureBUREncryptKeySource::GetRestoreKeyL(TDriveNumber aDrive, TSecureId aSID, |
|
76 TBool aGotBuffer, TDes& aBuffer, |
|
77 TBool &aGotKey, TDes8& aKey) |
|
78 { |
|
79 iImpl->GetRestoreKeyL(aDrive, aSID, aGotBuffer, aBuffer, aGotKey, aKey); |
|
80 } |
|
81 } |
|
82 |