|
1 <!-- locations provided by component --> |
|
2 <defineLocation id="MAIN_FILE" domain="cpp" dir="${src}" |
|
3 file="${instanceName}.cpp" |
|
4 owned="false" |
|
5 location=""> |
|
6 </defineLocation> |
|
7 |
|
8 <defineLocation id="MAIN_SYSTEM_INCLUDES" baseLocation="MAIN_FILE" |
|
9 location="region(Generated System Includes)" |
|
10 filter="unique-includes"/> |
|
11 |
|
12 <template location="MAIN_SYSTEM_INCLUDES"/> |
|
13 |
|
14 <defineLocation id="MAIN_INCLUDES" baseLocation="MAIN_FILE" |
|
15 location="region(Generated Includes)" |
|
16 filter="unique-includes"/> |
|
17 |
|
18 <template location="MAIN_INCLUDES"><![CDATA[ |
|
19 #include "${instanceName}.h" |
|
20 ]]> </template> |
|
21 <template location="MAIN_INCLUDES"><![CDATA[ |
|
22 #include "${instance.findChildOfType("com.nokia.sdt.series60.CAknDocument").name}.h" |
|
23 ]]> </template> |
|
24 |
|
25 <defineLocation id="HEADER_FILE" domain="cpp" dir="${inc}" |
|
26 file="${instanceName}.h" |
|
27 owned="false" |
|
28 location=""> |
|
29 </defineLocation> |
|
30 <defineLocation id="HEADER_INCLUDES" baseLocation="HEADER_FILE" |
|
31 location="region(Generated Includes)" |
|
32 filter="unique-includes"> |
|
33 <template><![CDATA[ |
|
34 #include <aknapp.h> |
|
35 ]]> </template> |
|
36 </defineLocation> |
|
37 <defineLocation id="HEADER_CONSTANTS" baseLocation="HEADER_FILE" |
|
38 location="region(Generated Constants)"> |
|
39 </defineLocation> |
|
40 <defineLocation id="CLASS" baseLocation="HEADER_FILE" |
|
41 owned="false" |
|
42 location="class(${className})"> |
|
43 <template ><![CDATA[ |
|
44 /** |
|
45 * |
|
46 * @class ${className} ${instanceName}.h |
|
47 * @brief A CAknApplication-derived class is required by the S60 application |
|
48 * framework. It is subclassed to create the application's document |
|
49 * object. |
|
50 */ |
|
51 class ${className} : public CAknApplication |
|
52 { |
|
53 private: |
|
54 TUid AppDllUid() const; |
|
55 CApaDocument* CreateDocumentL(); |
|
56 |
|
57 }; |
|
58 ]]> </template> |
|
59 </defineLocation> |
|
60 |
|
61 <!-- contributions for this file --> |
|
62 |
|
63 |
|
64 <template location="MAIN_FILE"><![CDATA[ |
|
65 /** |
|
66 * @brief Returns the application's UID (override from CApaApplication::AppDllUid()) |
|
67 * @return UID for this application (KUid${instanceName}) |
|
68 */ |
|
69 TUid ${className}::AppDllUid() const |
|
70 { |
|
71 return KUid${instanceName}; |
|
72 } |
|
73 |
|
74 /** |
|
75 * @brief Creates the application's document (override from CApaApplication::CreateDocumentL()) |
|
76 * @return Pointer to the created document object (${instance.findChildOfType("com.nokia.sdt.series60.CAknDocument").className}) |
|
77 */ |
|
78 CApaDocument* ${className}::CreateDocumentL() |
|
79 { |
|
80 return ${instance.findChildOfType("com.nokia.sdt.series60.CAknDocument").className}::NewL( *this ); |
|
81 } |
|
82 ]]> |
|
83 </template> |
|
84 |
|
85 <template location="MAIN_INCLUDES"><![CDATA[ |
|
86 #ifdef EKA2 |
|
87 #include <eikstart.h> |
|
88 #endif |
|
89 ]]> </template> |
|
90 |
|
91 |
|
92 <template location="MAIN_FILE"><![CDATA[ |
|
93 #ifdef EKA2 |
|
94 |
|
95 /** |
|
96 * @brief Called by the application framework to construct the application object |
|
97 * @return The application (${className}) |
|
98 */ |
|
99 LOCAL_C CApaApplication* NewApplication() |
|
100 { |
|
101 return new ${className}; |
|
102 } |
|
103 |
|
104 /** |
|
105 * @brief This standard export is the entry point for all Series 60 applications |
|
106 * @return error code |
|
107 */ |
|
108 GLDEF_C TInt E32Main() |
|
109 { |
|
110 return EikStart::RunApplication( NewApplication ); |
|
111 } |
|
112 |
|
113 #else // Series 60 2.x main DLL program code |
|
114 |
|
115 /** |
|
116 * @brief This standard export constructs the application object. |
|
117 * @return The application (${className}) |
|
118 */ |
|
119 EXPORT_C CApaApplication* NewApplication() |
|
120 { |
|
121 return new ${className}; |
|
122 } |
|
123 |
|
124 /** |
|
125 * @brief This standard export is the entry point for all Series 60 applications |
|
126 * @return error code |
|
127 */ |
|
128 GLDEF_C TInt E32Dll(TDllReason /*reason*/) |
|
129 { |
|
130 return KErrNone; |
|
131 } |
|
132 |
|
133 #endif // EKA2 |
|
134 ]]> </template> |
|
135 |
|
136 <template mode="upgrade(1.0,1.1)" location="MAIN_FILE"> |
|
137 @@@ Change use of __SERIES60_3X__ to EKA2 |
|
138 - #ifdef __SERIES60_3X__ |
|
139 - /** |
|
140 + #ifdef EKA2 |
|
141 + |
|
142 + /** |
|
143 </template> |
|
144 |
|
145 <template mode="upgrade(1.0,1.1)" location="MAIN_FILE"> |
|
146 @@@ Change use of __SERIES60_3X__ to EKA2 |
|
147 return KErrNone; |
|
148 } |
|
149 |
|
150 - #endif // __SERIES60_3X__ |
|
151 + #endif // EKA2 |
|
152 </template> |
|
153 |
|
154 <template location="HEADER_FILE"> |
|
155 #ifndef ${instanceName.toUpperCase()}_H |
|
156 #define ${instanceName.toUpperCase()}_H |
|
157 |
|
158 </template> |
|
159 |
|
160 <template location="HEADER_INCLUDES"/> |
|
161 |
|
162 <template location="HEADER_CONSTANTS"><![CDATA[ |
|
163 const TUid KUid${instanceName} = { ${properties.uid} }; |
|
164 ]]> </template> |
|
165 |
|
166 <template location="CLASS"/> |
|
167 |
|
168 <template location="HEADER_FILE"> |
|
169 |
|
170 #endif // ${instanceName.toUpperCase()}_H |
|
171 </template> |
|
172 |
|
173 <!-- child contributions --> |
|
174 <inline> |
|
175 // iterate children |
|
176 contribs.addAll(Engine.generateChildContributions(form)) |
|
177 |
|
178 // fix up the phases so they point to real locations |
|
179 Engine.assignLocationsForPhase(contribs, "MainIncludes", "MAIN_INCLUDES"); |
|
180 Engine.assignLocationsForPhase(contribs, "HeaderIncludes", "HEADER_INCLUDES"); |
|
181 </inline> |