iaupdate/IAD/engine/controller/src/iaupdatenodeversionxmlparser.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 14 May 2010 15:58:48 +0300
changeset 33 8110bf1194d1
parent 0 ba25891c3a9e
permissions -rw-r--r--
Revision: 201017 Kit: 201019

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:   ?Description
*
*/



#include <xml/documentparameters.h>
#include <xml/taginfo.h>
#include <xml/attribute.h>

#include "iaupdatenodeversionxmlparser.h"
#include "iaupdateversionmajorxmlparser.h"
#include "iaupdateversionminorxmlparser.h"
#include "iaupdateversionbuildxmlparser.h"
#include "iaupdateprotocolconsts.h"



CIAUpdateNodeVersionXmlParser::CIAUpdateNodeVersionXmlParser( 
                                         CIAUpdateNodeDependency*& aDependency )
: CIAUpdateXmlSubParser(),
  iDependency( aDependency )
    {
    
    }
    
    
void CIAUpdateNodeVersionXmlParser::ConstructL( const TDesC8& aElementLocalName )
    {
    CIAUpdateXmlSubParser::ConstructL( aElementLocalName );    

    // Create sub parsers for the version element handling

    CIAUpdateVersionMajorXmlParser* majorParser(
        CIAUpdateVersionMajorXmlParser::NewLC( Version() ) );
    SubParsers().AppendL( majorParser );
    CleanupStack::Pop( majorParser );

    CIAUpdateVersionMinorXmlParser* minorParser(
        CIAUpdateVersionMinorXmlParser::NewLC( Version() ) );
    SubParsers().AppendL( minorParser );
    CleanupStack::Pop( minorParser );

    CIAUpdateVersionBuildXmlParser* buildParser(
        CIAUpdateVersionBuildXmlParser::NewLC( Version() ) );
    SubParsers().AppendL( buildParser );
    CleanupStack::Pop( buildParser );    
    }


CIAUpdateNodeVersionXmlParser::~CIAUpdateNodeVersionXmlParser()
    {
    }


CIAUpdateNodeDependency& CIAUpdateNodeVersionXmlParser::DependencyL()
    {
    if ( !iDependency )
        {
        User::Leave( KErrNotFound );
        }
        
    return *iDependency;
    }


TIAUpdateVersion& CIAUpdateNodeVersionXmlParser::Version()
    {
    return iVersion;
    }