|
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 #ifndef IA_UPDATE_INTER_DEP_XML_PARSER_H |
|
21 #define IA_UPDATE_INTER_DEP_XML_PARSER_H |
|
22 |
|
23 |
|
24 #include <e32cmn.h> |
|
25 |
|
26 #include "iaupdatexmlsubparser.h" |
|
27 |
|
28 class CIAUpdateNodeDependency; |
|
29 |
|
30 |
|
31 /** |
|
32 * CIAUpdateInterDepXmlParser handles the node dependency elements and |
|
33 * inserts information into the node dependency object. Also, inserts the dependency |
|
34 * object to the given node dependency array. |
|
35 * |
|
36 * @since S60 v3.2 |
|
37 */ |
|
38 class CIAUpdateInterDepXmlParser : public CIAUpdateXmlSubParser |
|
39 { |
|
40 |
|
41 public: |
|
42 |
|
43 /** |
|
44 * @param aDependencies Array where node dependencies that are |
|
45 * created according to the XML data are appended. |
|
46 * @return CIAUpdateInterDepXmlParser* Created object. |
|
47 * |
|
48 * @since S60 v3.2 |
|
49 */ |
|
50 static CIAUpdateInterDepXmlParser* NewL( |
|
51 RPointerArray< CIAUpdateNodeDependency >& aDependencies ); |
|
52 |
|
53 /** |
|
54 * @see CIAUpdateInterDepXmlParser::NewL |
|
55 * |
|
56 * @since S60 v3.2 |
|
57 */ |
|
58 static CIAUpdateInterDepXmlParser* NewLC( |
|
59 RPointerArray< CIAUpdateNodeDependency >& aDependencies ); |
|
60 |
|
61 |
|
62 /** |
|
63 * Destructor |
|
64 * |
|
65 * @since S60 v3.2 |
|
66 */ |
|
67 virtual ~CIAUpdateInterDepXmlParser(); |
|
68 |
|
69 |
|
70 public: // CIAUpdateXmlSubParser |
|
71 |
|
72 /** |
|
73 * @see CIAUpdateXmlSubParser::OnStartElementL |
|
74 * |
|
75 * @since S60 v3.2 |
|
76 */ |
|
77 virtual void OnStartElementL( const Xml::RTagInfo& aElement, |
|
78 const Xml::RAttributeArray& aAttributes, |
|
79 TInt aErrorCode ); |
|
80 |
|
81 /** |
|
82 * @see CIAUpdateXmlSubParser::OnEndElementL |
|
83 * |
|
84 * @since S60 v3.2 |
|
85 */ |
|
86 virtual void OnEndElementL( const Xml::RTagInfo& aElement, |
|
87 TInt aErrorCode ); |
|
88 |
|
89 |
|
90 protected: |
|
91 |
|
92 /** |
|
93 * Constructor |
|
94 * |
|
95 * @see CIAUpdateInterDepXmlParser::NewL |
|
96 * |
|
97 * |
|
98 * @since S60 v3.2 |
|
99 */ |
|
100 CIAUpdateInterDepXmlParser( RPointerArray< CIAUpdateNodeDependency >& aDependencies ); |
|
101 |
|
102 /** |
|
103 * 2nd. phase constructor. |
|
104 * Adds the node dependency sub parsers to the parent class sub parser list. |
|
105 * |
|
106 * @since S60 v3.2 |
|
107 */ |
|
108 virtual void ConstructL(); |
|
109 |
|
110 |
|
111 private: |
|
112 |
|
113 // Prevent these if not implemented |
|
114 CIAUpdateInterDepXmlParser( const CIAUpdateInterDepXmlParser& aObject ); |
|
115 CIAUpdateInterDepXmlParser& operator =( const CIAUpdateInterDepXmlParser& aObject ); |
|
116 |
|
117 |
|
118 private: // data |
|
119 |
|
120 // Current dependency object. That will be inserted into the dependencies array |
|
121 // when parsing is done for the object. |
|
122 CIAUpdateNodeDependency* iDependency; |
|
123 |
|
124 // Reference to the dependency array where parsed dependencies will be inserted. |
|
125 RPointerArray< CIAUpdateNodeDependency >& iDependencies; |
|
126 |
|
127 }; |
|
128 |
|
129 #endif // IA_UPDATE_INTER_DEP_XML_PARSER_H |