os/security/cryptoservices/filebasedcertificateandkeystores/source/generic/server/FSRunPackage.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200 (2012-06-15)
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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  @file
    21 */
    22 
    23 #include "FSRunPackage.h"
    24 
    25 CRunPackage::~CRunPackage()
    26 	{
    27 	TInt count = iDeleteActions.Count();
    28 	for (TInt i = 0; i < count; ++i)
    29 		{
    30 		delete iDeleteActions[i];
    31 		}
    32 
    33 	iDeleteActions.Close();
    34 	}
    35 
    36 // Adds a new destructor action - only called by AddDeleteOnly, AddCloseDelete, and
    37 // AddReleaseOnly methods
    38 TInt CRunPackage::AddDeleteAction(CBase* aAction)
    39 	{
    40 	TInt err = KErrNone;
    41 	if (!aAction)
    42 		{
    43 		err = KErrNoMemory;
    44 		}
    45 	else
    46 		{
    47 		err = iDeleteActions.Append(aAction);
    48 
    49 		if (err)
    50 			{
    51 			// delete the action if we couldn't add
    52 			delete aAction;
    53 			}
    54 		}
    55 	return err;
    56 	}