|
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 "iaupdateplatformdependencyxmlparser.h" |
|
25 #include "iaupdateplatformversionfloorxmlparser.h" |
|
26 #include "iaupdateplatformversionroofxmlparser.h" |
|
27 #include "iaupdateplatformdescriptionxmlparser.h" |
|
28 #include "iaupdateprotocolconsts.h" |
|
29 |
|
30 |
|
31 CIAUpdatePlatformDependencyXmlParser* CIAUpdatePlatformDependencyXmlParser::NewL( |
|
32 CIAUpdatePlatformDependency& aDependency ) |
|
33 { |
|
34 CIAUpdatePlatformDependencyXmlParser* self = |
|
35 CIAUpdatePlatformDependencyXmlParser::NewLC( aDependency ); |
|
36 CleanupStack::Pop( self ); |
|
37 return self; |
|
38 } |
|
39 |
|
40 |
|
41 CIAUpdatePlatformDependencyXmlParser* CIAUpdatePlatformDependencyXmlParser::NewLC( |
|
42 CIAUpdatePlatformDependency& aDependency ) |
|
43 { |
|
44 CIAUpdatePlatformDependencyXmlParser* self = |
|
45 new( ELeave ) CIAUpdatePlatformDependencyXmlParser( aDependency ); |
|
46 CleanupStack::PushL( self ); |
|
47 self->ConstructL(); |
|
48 return self; |
|
49 } |
|
50 |
|
51 |
|
52 CIAUpdatePlatformDependencyXmlParser::CIAUpdatePlatformDependencyXmlParser( |
|
53 CIAUpdatePlatformDependency& aDependency ) |
|
54 : CIAUpdateXmlSubParser(), |
|
55 iDependency( aDependency ) |
|
56 { |
|
57 |
|
58 } |
|
59 |
|
60 |
|
61 void CIAUpdatePlatformDependencyXmlParser::ConstructL() |
|
62 { |
|
63 CIAUpdateXmlSubParser::ConstructL( IAUpdateProtocolConsts::KPlatformDependency() ); |
|
64 |
|
65 // Add sub parsers to the list |
|
66 |
|
67 CIAUpdatePlatformVersionXmlParser* versionFloorParser( |
|
68 CIAUpdatePlatformVersionFloorXmlParser::NewLC( Dependency() ) ); |
|
69 SubParsers().AppendL( versionFloorParser ); |
|
70 CleanupStack::Pop( versionFloorParser ); |
|
71 |
|
72 CIAUpdatePlatformVersionXmlParser* versionRoofParser( |
|
73 CIAUpdatePlatformVersionRoofXmlParser::NewLC( Dependency() ) ); |
|
74 SubParsers().AppendL( versionRoofParser ); |
|
75 CleanupStack::Pop( versionRoofParser ); |
|
76 |
|
77 CIAUpdatePlatformDescriptionXmlParser* platformParser( |
|
78 CIAUpdatePlatformDescriptionXmlParser::NewLC( Dependency() ) ); |
|
79 SubParsers().AppendL( platformParser ); |
|
80 CleanupStack::Pop( platformParser ); |
|
81 } |
|
82 |
|
83 |
|
84 CIAUpdatePlatformDependencyXmlParser::~CIAUpdatePlatformDependencyXmlParser() |
|
85 { |
|
86 } |
|
87 |
|
88 |
|
89 CIAUpdatePlatformDependency& CIAUpdatePlatformDependencyXmlParser::Dependency() |
|
90 { |
|
91 return iDependency; |
|
92 } |