|
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 "iaupdateplatformdescriptionxmlparser.h" |
|
25 #include "iaupdateplatformdependency.h" |
|
26 #include "iaupdateprotocolconsts.h" |
|
27 |
|
28 |
|
29 CIAUpdatePlatformDescriptionXmlParser* CIAUpdatePlatformDescriptionXmlParser::NewL( |
|
30 CIAUpdatePlatformDependency& aDependency ) |
|
31 { |
|
32 CIAUpdatePlatformDescriptionXmlParser* self = |
|
33 CIAUpdatePlatformDescriptionXmlParser::NewLC( aDependency ); |
|
34 CleanupStack::Pop( self ); |
|
35 return self; |
|
36 } |
|
37 |
|
38 |
|
39 CIAUpdatePlatformDescriptionXmlParser* CIAUpdatePlatformDescriptionXmlParser::NewLC( |
|
40 CIAUpdatePlatformDependency& aDependency ) |
|
41 { |
|
42 CIAUpdatePlatformDescriptionXmlParser* self = |
|
43 new( ELeave ) CIAUpdatePlatformDescriptionXmlParser( aDependency ); |
|
44 CleanupStack::PushL( self ); |
|
45 self->ConstructL(); |
|
46 return self; |
|
47 } |
|
48 |
|
49 |
|
50 CIAUpdatePlatformDescriptionXmlParser::CIAUpdatePlatformDescriptionXmlParser( |
|
51 CIAUpdatePlatformDependency& aDependency ) |
|
52 : CIAUpdateXmlSubParser(), |
|
53 iDependency( aDependency ) |
|
54 { |
|
55 |
|
56 } |
|
57 |
|
58 |
|
59 void CIAUpdatePlatformDescriptionXmlParser::ConstructL() |
|
60 { |
|
61 CIAUpdateXmlSubParser::ConstructL( IAUpdateProtocolConsts::KPlatformDescription() ); |
|
62 } |
|
63 |
|
64 |
|
65 CIAUpdatePlatformDescriptionXmlParser::~CIAUpdatePlatformDescriptionXmlParser() |
|
66 { |
|
67 } |
|
68 |
|
69 |
|
70 void CIAUpdatePlatformDescriptionXmlParser::OnContentL( const TDesC8& aBytes, |
|
71 TInt aErrorCode ) |
|
72 { |
|
73 // If the parent wants to do something with the information. |
|
74 CIAUpdateXmlSubParser::OnContentL( aBytes, aErrorCode ); |
|
75 |
|
76 if ( AcceptData() ) |
|
77 { |
|
78 // Because there is no current subparser set, this means |
|
79 // that this parser is the leaf parser at the moment. |
|
80 |
|
81 // We have gotten content for this element. |
|
82 // Now, set the platform information to the dependency object. |
|
83 Dependency().SetPlatformL( aBytes ); |
|
84 } |
|
85 } |
|
86 |
|
87 |
|
88 CIAUpdatePlatformDependency& CIAUpdatePlatformDescriptionXmlParser::Dependency() |
|
89 { |
|
90 return iDependency; |
|
91 } |
|
92 |