|
1 /* |
|
2 * Copyright (c) 2007-2007 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 "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: CCFPendingPersistencyTask class declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "cfpendingpersistencytask.h" |
|
19 |
|
20 CCFPendingPersistencyTask::CCFPendingPersistencyTask( TCFPersistencyMode aMode, |
|
21 CCFOperationNode& aNode ) : |
|
22 iPersistencyMode( aMode ), |
|
23 iOperationNode( &aNode ) |
|
24 { |
|
25 } |
|
26 |
|
27 |
|
28 CCFPendingPersistencyTask::~CCFPendingPersistencyTask() |
|
29 { |
|
30 delete iFileName; |
|
31 } |
|
32 |
|
33 CCFPendingPersistencyTask* CCFPendingPersistencyTask::NewLC( |
|
34 TCFPersistencyMode aMode, |
|
35 const TDesC& aFileName, |
|
36 CCFOperationNode& aNode ) |
|
37 { |
|
38 CCFPendingPersistencyTask* self = new (ELeave)CCFPendingPersistencyTask( |
|
39 aMode, aNode ); |
|
40 CleanupStack::PushL(self); |
|
41 self->ConstructL( aFileName ); |
|
42 return self; |
|
43 } |
|
44 |
|
45 CCFPendingPersistencyTask* CCFPendingPersistencyTask::NewL( |
|
46 TCFPersistencyMode aMode, |
|
47 const TDesC& aFileName, |
|
48 CCFOperationNode& aNode ) |
|
49 { |
|
50 CCFPendingPersistencyTask* self=CCFPendingPersistencyTask::NewLC( |
|
51 aMode, aFileName, aNode ); |
|
52 CleanupStack::Pop(); // self; |
|
53 return self; |
|
54 } |
|
55 |
|
56 void CCFPendingPersistencyTask::ConstructL( const TDesC& aFileName ) |
|
57 { |
|
58 iFileName = aFileName.AllocL(); |
|
59 } |
|
60 |
|
61 |
|
62 CCFPendingPersistencyTask::TCFPersistencyMode CCFPendingPersistencyTask::Mode() |
|
63 { |
|
64 return iPersistencyMode; |
|
65 } |
|
66 |
|
67 const TDesC& CCFPendingPersistencyTask::FileName() |
|
68 { |
|
69 if( iFileName ) |
|
70 { |
|
71 return *iFileName; |
|
72 } |
|
73 else |
|
74 { |
|
75 return KNullDesC; |
|
76 } |
|
77 } |
|
78 |
|
79 CCFOperationNode& CCFPendingPersistencyTask::Operation() |
|
80 { |
|
81 return *iOperationNode; |
|
82 } |