cryptoservices/filebasedcertificateandkeystores/source/generic/server/FSRunPackage.cpp
equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2005-2009 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 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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 /** |
|
22 @file |
|
23 */ |
|
24 |
|
25 #include "FSRunPackage.h" |
|
26 |
|
27 CRunPackage::~CRunPackage() |
|
28 { |
|
29 TInt count = iDeleteActions.Count(); |
|
30 for (TInt i = 0; i < count; ++i) |
|
31 { |
|
32 delete iDeleteActions[i]; |
|
33 } |
|
34 |
|
35 iDeleteActions.Close(); |
|
36 } |
|
37 |
|
38 // Adds a new destructor action - only called by AddDeleteOnly, AddCloseDelete, and |
|
39 // AddReleaseOnly methods |
|
40 TInt CRunPackage::AddDeleteAction(CBase* aAction) |
|
41 { |
|
42 TInt err = KErrNone; |
|
43 if (!aAction) |
|
44 { |
|
45 err = KErrNoMemory; |
|
46 } |
|
47 else |
|
48 { |
|
49 err = iDeleteActions.Append(aAction); |
|
50 |
|
51 if (err) |
|
52 { |
|
53 // delete the action if we couldn't add |
|
54 delete aAction; |
|
55 } |
|
56 } |
|
57 return err; |
|
58 } |