vpnengine/dmadengine/src/dmadcommand.cpp
changeset 0 33413c0669b9
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     1 /*
       
     2 * Copyright (c) 2002 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: Implementation of CDmAdCommand.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "dmadcommand.h"
       
    20 #include "vpnlogger.h"
       
    21 
       
    22 
       
    23 CDmAdCommand* CDmAdCommand::NewL(const TDesC8& aUri, const TInt aStatusRef, TBool aLeaf)
       
    24     {
       
    25     TRACE("CDmAdCommand::NewL");
       
    26     
       
    27     CDmAdCommand *self = NewLC(aUri, aStatusRef, aLeaf);
       
    28     CleanupStack::Pop(); // self
       
    29     return self;
       
    30     }
       
    31 
       
    32 CDmAdCommand* CDmAdCommand::NewLC(const TDesC8& aUri, const TInt aStatusRef, TBool aLeaf)
       
    33     {
       
    34     CDmAdCommand *self = new (ELeave) CDmAdCommand(aStatusRef, aLeaf);
       
    35     CleanupStack::PushL(self);
       
    36     self->ConstructL(aUri);
       
    37     return self;
       
    38     }
       
    39 
       
    40 void CDmAdCommand::ConstructL(const TDesC8& /*aUri*/)
       
    41     {
       
    42     TRACE("CDmAdCommand::ConstructL");
       
    43     }
       
    44     
       
    45 CDmAdCommand::CDmAdCommand(const TInt aStatusRef, TBool aLeaf) :
       
    46     iStatusRef(aStatusRef), iStatus(KErrNone), iLeaf(aLeaf)
       
    47     {
       
    48     TRACE("CDmAdCommand::CDmAdCommand");
       
    49     }
       
    50     
       
    51 CDmAdCommand::~CDmAdCommand()
       
    52     {
       
    53     TRACE("CDmAdCommand::~CDmAdCommand");
       
    54     }
       
    55     
       
    56 void CDmAdCommand::CleanupOperationDeleteCArrayPtr(TAny* aPtr)
       
    57     {
       
    58     if (aPtr == NULL)
       
    59         {
       
    60         return;
       
    61         }
       
    62     CArrayPtr<CDmAdCommand>* array = REINTERPRET_CAST(CArrayPtr<CDmAdCommand>*,aPtr);
       
    63     array->ResetAndDestroy();
       
    64     delete array;
       
    65     }
       
    66