65 |
65 |
66 /** |
66 /** |
67 * CGlxDataSourceTaskMde class |
67 * CGlxDataSourceTaskMde class |
68 * Base class for mde tasks: provides task generic functionality. |
68 * Base class for mde tasks: provides task generic functionality. |
69 */ |
69 */ |
70 NONSHARABLE_CLASS(CGlxDataSourceTaskMde) : public CGlxDataSourceTask, public MMdEQueryObserver |
70 NONSHARABLE_CLASS(CGlxDataSourceTaskMde) : public CGlxDataSourceTask, |
|
71 public MMdEQueryObserver |
71 { |
72 { |
72 public: |
73 public: |
73 /** |
74 /** |
74 * Constructor. |
75 * Constructor. |
75 * @param aRequest request to be executed. |
76 * @param aRequest request to be executed. |
76 * @param aObserver observer to be informed when task has completed. |
77 * @param aObserver observer to be informed when task has completed. |
77 * @param aDataSource data source to be used by this object. |
78 * @param aDataSource data source to be used by this object. |
78 */ |
79 */ |
79 CGlxDataSourceTaskMde(CGlxRequest* aRequest, MGlxDataSourceRequestObserver& aObserver, |
80 CGlxDataSourceTaskMde(CGlxRequest* aRequest, MGlxDataSourceRequestObserver& |
80 CGlxDataSource* aDataSource); |
81 aObserver, CGlxDataSource* aDataSource); |
81 |
82 |
82 /** |
83 /** |
83 * Destructor. |
84 * Destructor. |
84 */ |
85 */ |
85 ~CGlxDataSourceTaskMde(); |
86 ~CGlxDataSourceTaskMde(); |
140 * Returns a pointer to the CGlxDataSourceMde object passed in on instantiation. |
141 * Returns a pointer to the CGlxDataSourceMde object passed in on instantiation. |
141 * @return a pointer to the CGlxDataSourceMde object passed in on instantiation. |
142 * @return a pointer to the CGlxDataSourceMde object passed in on instantiation. |
142 */ |
143 */ |
143 CGlxDataSourceMde* DataSource(); |
144 CGlxDataSourceMde* DataSource(); |
144 |
145 |
145 void AddMonthFilterL(const TGlxMediaId& aContainerId, TGlxFilterProperties& aFilterProperties); |
146 void AddMonthFilterL(const TGlxMediaId& aContainerId, |
|
147 TGlxFilterProperties& aFilterProperties); |
146 |
148 |
147 void AddMonthFilterL(CMdEObject* aMonth, TGlxFilterProperties& aFilterProperties); |
149 void AddMonthFilterL(CMdEObject* aMonth, TGlxFilterProperties& aFilterProperties); |
148 |
150 |
149 /** |
151 /** |
150 * Set query contditions by container id and filter properties. |
152 * Set query contditions by container id and filter properties. |
152 * @param aContainerId Id of the container |
154 * @param aContainerId Id of the container |
153 * @param aContainerIsLeft. This should be set to to ETrue if the container is on the left side of the releation, or |
155 * @param aContainerIsLeft. This should be set to to ETrue if the container is on the left side of the releation, or |
154 * EFalse if the container is on the right side of the relation |
156 * EFalse if the container is on the right side of the relation |
155 * |
157 * |
156 */ |
158 */ |
157 void SetQueryConditionsL(CMdEQuery& aQuery, const TGlxFilterProperties& aFilterProperties, const TGlxMediaId aContainerId, CMdEObjectDef& aObjectDef); |
159 void SetQueryConditionsL(CMdEQuery& aQuery, const TGlxFilterProperties& aFilterProperties, |
158 |
160 const TGlxMediaId aContainerId, CMdEObjectDef& aObjectDef); |
159 void SetQueryFilterConditionsL(CMdELogicCondition& aLogicCondition, CMdEObjectDef& aObjectDef, const TGlxFilterProperties& aFilterProperties); |
161 |
160 |
162 void SetQueryFilterConditionsL(CMdELogicCondition& aLogicCondition, CMdEObjectDef& aObjectDef, |
161 void SetSortOrderL(CMdEQuery& aQuery, CMdEObjectDef& aObjectDef, const TGlxFilterProperties& aFilterProperties); |
163 const TGlxFilterProperties& aFilterProperties); |
|
164 |
|
165 void SetSortOrderL(CMdEQuery& aQuery, CMdEObjectDef& aObjectDef, |
|
166 const TGlxFilterProperties& aFilterProperties); |
162 |
167 |
163 /** |
168 /** |
164 * Returns the maximum number of items that a query should find. |
169 * Returns the maximum number of items that a query should find. |
165 * @return Maximum number of results |
170 * @return Maximum number of results |
166 */ |
171 */ |
169 /** |
174 /** |
170 * Removes and destroys the oldest query in iQueries. |
175 * Removes and destroys the oldest query in iQueries. |
171 */ |
176 */ |
172 void RemoveQuery(); |
177 void RemoveQuery(); |
173 |
178 |
174 void DoQueryL(CMdEObjectDef& aObjectDef, TBool aIsContent, TGlxQueryType aQueryType, TQueryResultMode aResultMode, const TGlxMediaId& aContainerId); |
179 void DoQueryL(CMdEObjectDef& aObjectDef, TBool aIsContent, TGlxQueryType aQueryType, |
|
180 TQueryResultMode aResultMode, const TGlxMediaId& aContainerId); |
175 |
181 |
176 /** |
182 /** |
177 * Adds queries for images and or videos to the query queue. The queries will return objects |
183 * Adds queries for images and or videos to the query queue. The queries will return objects |
178 * of type image or video that have ids specified by aObjectIds. |
184 * of type image or video that have ids specified by aObjectIds. |
179 * @param aObjectIds A list of the ids of the required objects. |
185 * @param aObjectIds A list of the ids of the required objects. |
180 * @param aFilterProperties TGlxFilterProperties.iItemType is used to determine if only |
186 * @param aFilterProperties TGlxFilterProperties.iItemType is used to determine if only |
181 * image or video queries are required if iItemType is not set to EGlxFilterImage or |
187 * image or video queries are required if iItemType is not set to EGlxFilterImage or |
182 * EGlxFitlerVideo a query for images will be queued first followed by a query for videos. |
188 * EGlxFitlerVideo a query for images will be queued first followed by a query for videos. |
183 */ |
189 */ |
184 void QueueImageVideoObjectQueriesL(const RArray<TGlxMediaId>& aObjectIds, const TGlxFilterProperties& aFilterProperties); |
190 void QueueImageVideoObjectQueriesL(const RArray<TGlxMediaId>& aObjectIds, |
|
191 const TGlxFilterProperties& aFilterProperties); |
185 |
192 |
186 /** |
193 /** |
187 * Adds a query for tag objects that have ids specified by aObjectIds |
194 * Adds a query for tag objects that have ids specified by aObjectIds |
188 * to the query queue. |
195 * to the query queue. |
189 * @param aObjectIds A list of the ids of the required objects. |
196 * @param aObjectIds A list of the ids of the required objects. |