iaupdate/IAD/engine/controller/src/iaupdatedependencyxmlsubparser.cpp
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 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 "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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "iaupdatedependencyxmlsubparser.h"
       
    21 #include "iaupdatenodedependencyxmlparser.h"
       
    22 #include "iaupdateplatformdependencyxmlparser.h"
       
    23 #include "iaupdateprotocolconsts.h"
       
    24 
       
    25 
       
    26 CIAUpdateDependencyXmlSubParser* CIAUpdateDependencyXmlSubParser::NewL( 
       
    27                      RPointerArray< CIAUpdateNodeDependency>& aNodeDependencies,
       
    28                      CIAUpdatePlatformDependency& aPlatformDependency )
       
    29     {
       
    30     CIAUpdateDependencyXmlSubParser* self =
       
    31         CIAUpdateDependencyXmlSubParser::NewLC( aNodeDependencies, aPlatformDependency );
       
    32     CleanupStack::Pop( self );
       
    33     return self;
       
    34     }
       
    35 
       
    36 
       
    37 CIAUpdateDependencyXmlSubParser* CIAUpdateDependencyXmlSubParser::NewLC( 
       
    38                      RPointerArray< CIAUpdateNodeDependency>& aNodeDependencies,
       
    39                      CIAUpdatePlatformDependency& aPlatformDependency )
       
    40     {
       
    41     CIAUpdateDependencyXmlSubParser* self =
       
    42         new( ELeave ) CIAUpdateDependencyXmlSubParser();
       
    43     CleanupStack::PushL( self );
       
    44     self->ConstructL( aNodeDependencies, aPlatformDependency );
       
    45     return self;    
       
    46     }
       
    47 
       
    48 
       
    49 CIAUpdateDependencyXmlSubParser::CIAUpdateDependencyXmlSubParser()
       
    50 : CIAUpdateXmlSubParser()
       
    51     {
       
    52     
       
    53     }
       
    54     
       
    55     
       
    56 void CIAUpdateDependencyXmlSubParser::ConstructL( 
       
    57                       RPointerArray< CIAUpdateNodeDependency>& aNodeDependencies,
       
    58                       CIAUpdatePlatformDependency& aPlatformDependency )
       
    59     {
       
    60     CIAUpdateXmlSubParser::ConstructL( IAUpdateProtocolConsts::KDependencies() );
       
    61     
       
    62     // Add sub parsers to the list
       
    63     CIAUpdateNodeDependencyXmlParser* nodeDependencyParser(
       
    64         CIAUpdateNodeDependencyXmlParser::NewLC( aNodeDependencies ) );
       
    65     SubParsers().AppendL( nodeDependencyParser );
       
    66     CleanupStack::Pop( nodeDependencyParser );
       
    67     
       
    68     CIAUpdatePlatformDependencyXmlParser* platformDependencyParser(
       
    69         CIAUpdatePlatformDependencyXmlParser::NewLC( aPlatformDependency ) );
       
    70     SubParsers().AppendL( platformDependencyParser );
       
    71     CleanupStack::Pop( platformDependencyParser );    
       
    72     }
       
    73 
       
    74 
       
    75 CIAUpdateDependencyXmlSubParser::~CIAUpdateDependencyXmlSubParser()
       
    76     {
       
    77     }