|
1 /* |
|
2 * Copyright (c) 2005-2007 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: Builder class for XML UI node identifiers. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_XMLNODEIDGENERATOR_H |
|
20 #define C_XMLNODEIDGENERATOR_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class MAiPropertyExtension; |
|
25 struct TAiPublisherInfo; |
|
26 struct TAiContentItem; |
|
27 |
|
28 namespace AiXmlUiController |
|
29 { |
|
30 |
|
31 /** |
|
32 * @ingroup group_xmluicontroller |
|
33 * |
|
34 * Xml node id generator.Generates an identifier that is used to look up |
|
35 * settings node from XML UI model. |
|
36 * |
|
37 * @lib AiXmlUiMain |
|
38 */ |
|
39 class CXmlNodeIdGenerator : public CBase |
|
40 { |
|
41 public: // Construction |
|
42 |
|
43 static CXmlNodeIdGenerator* NewL(); |
|
44 |
|
45 ~CXmlNodeIdGenerator(); |
|
46 |
|
47 // New methods |
|
48 |
|
49 /** |
|
50 * Generates an identifier that is used to look up settings node from |
|
51 * XML UI model. |
|
52 * |
|
53 * @param aPubInfo Active Idle publisher info to use in the |
|
54 * identifier generation. |
|
55 * @return content node identifier. |
|
56 */ |
|
57 TPtrC SettingsNodeIdL( const TAiPublisherInfo& aPubInfo); |
|
58 |
|
59 /** |
|
60 * Generates an identifier that is used to look up content node from |
|
61 * XML UI model. |
|
62 * |
|
63 * @param aPlugin Active Idle publisher to use in the identifier |
|
64 * generation. |
|
65 * @param aContentItem Active Idle content item to use in the |
|
66 * identifier generation. |
|
67 * @return content node identifier. |
|
68 */ |
|
69 TPtrC ContentNodeIdL(MAiPropertyExtension& aPlugin, const TAiContentItem& aContentItem); |
|
70 |
|
71 /** |
|
72 * Generates an identifier that is used to look up content node from |
|
73 * XML UI model. |
|
74 * |
|
75 * @param aPubInfo Active Idle publisher info to use in the |
|
76 * identifier generation. |
|
77 * @param aContentItem Active Idle content item to use in the |
|
78 * identifier generation. |
|
79 * @return content node identifier. |
|
80 */ |
|
81 TPtrC ContentNodeIdL(const TAiPublisherInfo& aPubInfo, const TAiContentItem& aContentItem); |
|
82 |
|
83 /** |
|
84 * Generates an identifier that is used to look up resource node from |
|
85 * XML UI model. |
|
86 * |
|
87 * @param aPlugin Active Idle publisher to use in the identifier |
|
88 * generation. |
|
89 * @param aContentItem Active Idle content item to use in the |
|
90 * identifier generation. |
|
91 * @return resource node identifier. |
|
92 */ |
|
93 TPtrC ResourceNodeIdL(MAiPropertyExtension& aPlugin, const TAiContentItem& aContentItem); |
|
94 |
|
95 /** |
|
96 * Generates an identifier that is used to look up resource node from |
|
97 * XML UI model. |
|
98 * |
|
99 * @param aPubInfo Active Idle publisher info to use in the |
|
100 * identifier generation. |
|
101 * @param aContentItem Active Idle content item to use in the |
|
102 * identifier generation. |
|
103 * @return resource node identifier. |
|
104 */ |
|
105 TPtrC ResourceNodeIdL(const TAiPublisherInfo& aPubInfo, const TAiContentItem& aContentItem); |
|
106 |
|
107 private: // Construction |
|
108 |
|
109 CXmlNodeIdGenerator(); |
|
110 |
|
111 void ConstructL(); |
|
112 |
|
113 private: // Data |
|
114 |
|
115 HBufC* iContentNodeIdBuf; |
|
116 |
|
117 }; |
|
118 |
|
119 } // namespace AiXmlUiController |
|
120 |
|
121 #endif // C_XMLNODEIDGENERATOR_H |