iaupdate/IAD/engine/controller/src/iaupdateplatformversionxmlparser.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 <xml/documentparameters.h>
       
    21 #include <xml/taginfo.h>
       
    22 #include <xml/attribute.h>
       
    23 
       
    24 #include "iaupdateplatformversionxmlparser.h"
       
    25 #include "iaupdateversionmajorxmlparser.h"
       
    26 #include "iaupdateversionminorxmlparser.h"
       
    27 #include "iaupdateversionbuildxmlparser.h"
       
    28 #include "iaupdateprotocolconsts.h"
       
    29 
       
    30 
       
    31 
       
    32 CIAUpdatePlatformVersionXmlParser::CIAUpdatePlatformVersionXmlParser( 
       
    33                                     CIAUpdatePlatformDependency& aDependency )
       
    34 : CIAUpdateXmlSubParser(),
       
    35   iDependency( aDependency )
       
    36     {
       
    37     
       
    38     }
       
    39     
       
    40     
       
    41 void CIAUpdatePlatformVersionXmlParser::ConstructL( const TDesC8& aElementLocalName )
       
    42     {
       
    43     CIAUpdateXmlSubParser::ConstructL( aElementLocalName );    
       
    44 
       
    45     // Create sub parsers for the version element handling
       
    46 
       
    47     CIAUpdateVersionMajorXmlParser* majorParser(
       
    48         CIAUpdateVersionMajorXmlParser::NewLC( Version() ) );
       
    49     SubParsers().AppendL( majorParser );
       
    50     CleanupStack::Pop( majorParser );
       
    51 
       
    52     CIAUpdateVersionMinorXmlParser* minorParser(
       
    53         CIAUpdateVersionMinorXmlParser::NewLC( Version() ) );
       
    54     SubParsers().AppendL( minorParser );
       
    55     CleanupStack::Pop( minorParser );
       
    56 
       
    57     CIAUpdateVersionBuildXmlParser* buildParser(
       
    58         CIAUpdateVersionBuildXmlParser::NewLC( Version() ) );
       
    59     SubParsers().AppendL( buildParser );
       
    60     CleanupStack::Pop( buildParser );    
       
    61 
       
    62     // Note for future improvements: 
       
    63     // If date XML should be supported, then this is a good place to
       
    64     // create the parser for that. Same way as other parsers above.
       
    65     }
       
    66 
       
    67 
       
    68 CIAUpdatePlatformVersionXmlParser::~CIAUpdatePlatformVersionXmlParser()
       
    69     {
       
    70     }
       
    71 
       
    72 
       
    73 CIAUpdatePlatformDependency& CIAUpdatePlatformVersionXmlParser::Dependency()
       
    74     {
       
    75     return iDependency;
       
    76     }
       
    77 
       
    78 
       
    79 TIAUpdateVersion& CIAUpdatePlatformVersionXmlParser::Version()
       
    80     {
       
    81     return iVersion;
       
    82     }
       
    83