17 |
17 |
18 |
18 |
19 #ifndef M_AINATIVERENDERER_H |
19 #ifndef M_AINATIVERENDERER_H |
20 #define M_AINATIVERENDERER_H |
20 #define M_AINATIVERENDERER_H |
21 |
21 |
|
22 // System includes |
22 #include <e32base.h> |
23 #include <e32base.h> |
|
24 |
|
25 // User includes |
23 #include "aidevicestatuscontentmodel.h" |
26 #include "aidevicestatuscontentmodel.h" |
24 #include "aiscutcontentmodel.h" |
|
25 #include "aiprofileplugincontentmodel.h" |
27 #include "aiprofileplugincontentmodel.h" |
26 |
28 |
27 |
29 // Forward declarations |
|
30 class CHsContentPublisher; |
28 class RFile; |
31 class RFile; |
29 class MAiPropertyExtension; |
|
30 |
32 |
31 namespace AiNativeUiController |
33 namespace AiNativeUiController |
32 { |
34 { |
33 |
35 |
34 /** |
36 /** |
35 * Base class for renderers in native ui controller. |
37 * Base class for renderers in native ui controller. |
36 * |
38 * |
37 * @since S60 3.2 |
39 * @since S60 3.2 |
38 */ |
40 */ |
39 class CAiNativeRenderer : public CBase |
41 NONSHARABLE_CLASS( CAiNativeRenderer ) : public CBase |
40 { |
42 { |
41 |
|
42 public: |
43 public: |
43 |
44 |
44 virtual ~CAiNativeRenderer(); |
45 ~CAiNativeRenderer(); |
45 |
46 |
|
47 public: |
|
48 // new methods |
|
49 |
46 /** |
50 /** |
47 * Publish resource. |
51 * Publish resource. |
48 * |
52 * |
49 * @since S60 3.2 |
53 * @since S60 3.2 |
50 * @param aPlugin is publishing plugin. |
54 * @param aPlugin is publishing plugin. |
51 * @param aContent is id of the content. |
55 * @param aContent is id of the content. |
52 * @param aResource is id of the resource. |
56 * @param aResource is id of the resource. |
53 * @param aIndex is index of the content. |
57 * @param aIndex is index of the content. |
54 * @return KErrNone if publish is successful. |
58 * @return KErrNone if publish is successful. |
55 */ |
59 */ |
56 virtual TInt Publish( MAiPropertyExtension& aPlugin, |
60 virtual TInt Publish( CHsContentPublisher& aPlugin, |
57 TInt aContent, |
61 TInt aContent, |
58 TInt aResource, |
62 TInt aResource, |
59 TInt aIndex ); |
63 TInt aIndex ); |
60 |
64 |
61 /** |
65 /** |
66 * @param aContent is id of the content. |
70 * @param aContent is id of the content. |
67 * @param aText is published text. |
71 * @param aText is published text. |
68 * @param aIndex is index of the content. |
72 * @param aIndex is index of the content. |
69 * @return KErrNone if publish is successful. |
73 * @return KErrNone if publish is successful. |
70 */ |
74 */ |
71 virtual TInt Publish( MAiPropertyExtension& aPlugin, |
75 virtual TInt Publish( CHsContentPublisher& aPlugin, |
72 TInt aContent, |
76 TInt aContent, |
73 const TDesC16& aText, |
77 const TDesC16& aText, |
74 TInt aIndex ); |
78 TInt aIndex ); |
75 |
79 |
76 /** |
80 /** |
81 * @param aContent is id of the content. |
85 * @param aContent is id of the content. |
82 * @param aBuf is published data. |
86 * @param aBuf is published data. |
83 * @param aIndex is index of the content. |
87 * @param aIndex is index of the content. |
84 * @return KErrNone if publish is successful. |
88 * @return KErrNone if publish is successful. |
85 */ |
89 */ |
86 virtual TInt Publish( MAiPropertyExtension& aPlugin, |
90 virtual TInt Publish( CHsContentPublisher& aPlugin, |
87 TInt aContent, |
91 TInt aContent, |
88 const TDesC8& aBuf, |
92 const TDesC8& aBuf, |
89 TInt aIndex ); |
93 TInt aIndex ); |
90 |
94 |
91 /** |
95 /** |
96 * @param aContent is id of the content. |
100 * @param aContent is id of the content. |
97 * @param aFile is reference to opened file. |
101 * @param aFile is reference to opened file. |
98 * @param aIndex is index of the content. |
102 * @param aIndex is index of the content. |
99 * @return KErrNone if publish is successful. |
103 * @return KErrNone if publish is successful. |
100 */ |
104 */ |
101 virtual TInt Publish( MAiPropertyExtension& aPlugin, |
105 virtual TInt Publish( CHsContentPublisher& aPlugin, |
102 TInt aContent, |
106 TInt aContent, |
103 RFile& aFile, |
107 RFile& aFile, |
104 TInt aIndex ); |
108 TInt aIndex ); |
105 |
109 |
106 /** |
110 /** |
110 * @param aPlugin is publishing plugin. |
114 * @param aPlugin is publishing plugin. |
111 * @param aContent is id of the content. |
115 * @param aContent is id of the content. |
112 * @param aIndex is index of the content. |
116 * @param aIndex is index of the content. |
113 * @return KErrNone if cleaning works. |
117 * @return KErrNone if cleaning works. |
114 */ |
118 */ |
115 virtual TInt Clean( MAiPropertyExtension& aPlugin, TInt aContent ); |
119 virtual TInt Clean( CHsContentPublisher& aPlugin, TInt aContent ); |
116 |
120 |
117 /** |
121 /** |
118 * Renderer must implement this method if it needs to support resource publishing. |
122 * Renderer must implement this method if it needs to support resource publishing. |
119 * |
123 * |
120 * Default implementation leaves with KErrNotFound. |
124 * Default implementation leaves with KErrNotFound. |
123 * @param aPlugin is publishing plugin. |
127 * @param aPlugin is publishing plugin. |
124 * @param aContent is id of the content. |
128 * @param aContent is id of the content. |
125 * @param aResource is id of the resource. |
129 * @param aResource is id of the resource. |
126 * @param aIndex is index of the content. |
130 * @param aIndex is index of the content. |
127 */ |
131 */ |
128 virtual void DoPublishL( MAiPropertyExtension& aPlugin, |
132 virtual void DoPublishL( CHsContentPublisher& aPlugin, |
129 TInt aContent, |
133 TInt aContent, |
130 TInt aResource, |
134 TInt aResource, |
131 TInt aIndex ); |
135 TInt aIndex ); |
132 |
136 |
133 /** |
137 /** |
139 * @param aPlugin is publishing plugin. |
143 * @param aPlugin is publishing plugin. |
140 * @param aContent is id of the content. |
144 * @param aContent is id of the content. |
141 * @param aText is published text. |
145 * @param aText is published text. |
142 * @param aIndex is index of the content. |
146 * @param aIndex is index of the content. |
143 */ |
147 */ |
144 virtual void DoPublishL( MAiPropertyExtension& aPlugin, |
148 virtual void DoPublishL( CHsContentPublisher& aPlugin, |
145 TInt aContent, |
149 TInt aContent, |
146 const TDesC16& aText, |
150 const TDesC16& aText, |
147 TInt aIndex ); |
151 TInt aIndex ); |
148 |
152 |
149 /** |
153 /** |
155 * @param aPlugin is publishing plugin. |
159 * @param aPlugin is publishing plugin. |
156 * @param aContent is id of the content. |
160 * @param aContent is id of the content. |
157 * @param aBuf is published data. |
161 * @param aBuf is published data. |
158 * @param aIndex is index of the content. |
162 * @param aIndex is index of the content. |
159 */ |
163 */ |
160 virtual void DoPublishL( MAiPropertyExtension& aPlugin, |
164 virtual void DoPublishL( CHsContentPublisher& aPlugin, |
161 TInt aContent, |
165 TInt aContent, |
162 const TDesC8& aBuf, |
166 const TDesC8& aBuf, |
163 TInt aIndex ); |
167 TInt aIndex ); |
164 |
168 |
165 /** |
169 /** |
171 * @param aPlugin is publishing plugin. |
175 * @param aPlugin is publishing plugin. |
172 * @param aContent is id of the content. |
176 * @param aContent is id of the content. |
173 * @param aFile is reference to file client. |
177 * @param aFile is reference to file client. |
174 * @param aIndex is index of the content. |
178 * @param aIndex is index of the content. |
175 */ |
179 */ |
176 virtual void DoPublishL( MAiPropertyExtension& aPlugin, |
180 virtual void DoPublishL( CHsContentPublisher& aPlugin, |
177 TInt aContent, |
181 TInt aContent, |
178 RFile& aFile, |
182 RFile& aFile, |
179 TInt aIndex ); |
183 TInt aIndex ); |
180 |
184 |
181 /** |
185 /** |
185 * |
189 * |
186 * @since S60 3.2 |
190 * @since S60 3.2 |
187 * @param aPlugin is publishing plugin. |
191 * @param aPlugin is publishing plugin. |
188 * @param aContent is id of the content. |
192 * @param aContent is id of the content. |
189 */ |
193 */ |
190 virtual void DoCleanL( MAiPropertyExtension& aPlugin, TInt aContent ); |
194 virtual void DoCleanL( CHsContentPublisher& aPlugin, TInt aContent ); |
191 |
195 |
192 /** |
196 /** |
193 * Called when UI switches to foreground. |
197 * Called when UI switches to foreground. |
194 */ |
198 */ |
195 virtual void FocusObtainedL() { }; |
199 virtual void FocusObtainedL() { }; |
236 * @since S60 3.2 |
240 * @since S60 3.2 |
237 * @param aContentId is content id. |
241 * @param aContentId is content id. |
238 * @param aMimeType is mime type. |
242 * @param aMimeType is mime type. |
239 * @return ETrue if match is successful. |
243 * @return ETrue if match is successful. |
240 */ |
244 */ |
241 TBool MatchMimeType( MAiPropertyExtension& aPlugin, TInt aContentId, const TDesC8& aMimeType ) const; |
245 TBool MatchMimeType( CHsContentPublisher& aPlugin, TInt aContentId, const TDesC8& aMimeType ) const; |
242 |
246 |
243 |
247 |
244 /** |
248 /** |
245 * Does mime type check. |
249 * Does mime type check. |
246 * |
250 * |
247 * @since S60 3.2 |
251 * @since S60 3.2 |
248 * @param aPlugin is publishing plugin. |
252 * @param aPlugin is publishing plugin. |
249 * @param aContentId is id of the content. |
253 * @param aContentId is id of the content. |
250 */ |
254 */ |
251 void DoMimeTypeCheckL( MAiPropertyExtension& aPlugin, TInt aContentId ); |
255 void DoMimeTypeCheckL( CHsContentPublisher& aPlugin, TInt aContentId ); |
252 |
256 |
253 }; |
257 }; |
254 |
258 |
255 } // namespace AiNativeUiController |
259 } // namespace AiNativeUiController |
256 |
260 |