400e968f50c638c50e3db55358212c8243bb27e0
[framework/api/media-content.git] / include / media_filter.h
1 /*\r
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved\r
3 *\r
4 * Licensed under the Apache License, Version 2.0 (the "License");\r
5 * you may not use this file except in compliance with the License.\r
6 * You may obtain a copy of the License at\r
7 *\r
8 * http://www.apache.org/licenses/LICENSE-2.0\r
9 *\r
10 * Unless required by applicable law or agreed to in writing, software\r
11 * distributed under the License is distributed on an "AS IS" BASIS,\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13 * See the License for the specific language governing permissions and\r
14 * limitations under the License. \r
15 */\r
16 \r
17 \r
18 \r
19 #ifndef __TIZEN_MEDIA_FILTER_H__\r
20 #define __TIZEN_MEDIA_FILTER_H__\r
21 \r
22 #include <media_content_type.h>\r
23 \r
24 \r
25 #ifdef __cplusplus\r
26 extern "C" {\r
27 #endif /* __cplusplus */\r
28 \r
29 /**\r
30  * @addtogroup CAPI_CONTENT_MEDIA_FILTER_INFO_MODULE\r
31  * @{\r
32  */\r
33 \r
34 /**\r
35  * @brief Creates a media info filter handle.\r
36  * @details This function creates a media info filter handle. The handle can be\r
37  * used to get filtered information based on filter properties i.e. offset, count,search type, search keyword, \r
38  * media type and order.\r
39  *@remarks The @a filter handle must be released with media_info_filter_destroy() by you. \r
40  * @param[out] filter A handle to media info filter\r
41  * @return 0 on success, otherwise a negative error value.\r
42  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
43  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
44  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
45  * @see media_info_filter_destroy()\r
46  *\r
47  */\r
48 int media_info_filter_create(media_info_filter_h* filter);\r
49 \r
50 /**\r
51  * @brief Destroys a media info filter handle.\r
52  * @details The function frees all resources related to the media info filter handle. The filter\r
53  * handle no longer can be used to perform any operation. A new filter handle\r
54  * has to be created before the next usage.\r
55  *\r
56  * @param[in] filter The handle to media info filter\r
57  * @return 0 on success, otherwise a negative error value.\r
58  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
59  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
60  * @see media_info_filter_create()\r
61  *\r
62  */\r
63 int media_info_filter_destroy(media_info_filter_h filter);\r
64 \r
65 \r
66 /**\r
67  * @brief Set the media info filter's offset and count.\r
68  * @details This function set the @a offset and @a count for the given filter used to limit number of items returned.\r
69  *  For example, if you set the @a offset as 10 and @a count as 5, then only searched data from 10 to 14 will be returned when the filter is used with foreach functions. \r
70  *\r
71  * @param[in] filter The handle to media info filter\r
72  * @param[in] offset The start position of the given filter(Starting from zero).\r
73  * @param[in] count The number of items to be searched with respect to offset\r
74  * @return return 0 on success, otherwise a negative error value.\r
75  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
76  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
77  * @see media_info_filter_create()\r
78  * @see media_info_filter_destroy() \r
79  */\r
80 int media_info_filter_set_offset(media_info_filter_h filter, int offset, int count);\r
81 \r
82 \r
83 /**\r
84  * @brief Set the @a search @a keyword and @a search @a type for given @a filter.\r
85  *\r
86  * @param[in] filter The handle to media info filter\r
87  * @param[in] search_type The type which user want to search. e.g. display name\r
88  * @param[in] search_keyword The keyword which user want to search.\r
89  * @return return 0 on success, otherwise a negative error value.\r
90  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
91  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
92  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
93  * @see media_info_filter_create()\r
94  * @see media_info_filter_destroy()  \r
95  */\r
96 int media_info_filter_set_search_keyword(media_info_filter_h filter, media_info_search_type_e search_type, const char *search_keyword);\r
97 \r
98 \r
99 /**\r
100  * @brief Set the media info filter's content order either descending or ascending.\r
101  *\r
102  * @param[in] filter The media info filter handle\r
103  * @param[in] order The search order type\r
104  * @return return 0 on success, otherwise a negative error value.\r
105  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
106  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
107  * @see media_info_filter_create()\r
108  * @see media_info_filter_destroy()  \r
109  */\r
110 int media_info_filter_set_order(media_info_filter_h filter, media_content_order_e order);\r
111 \r
112 \r
113 /**\r
114  * @brief Set the media info filter's content type.\r
115  *\r
116 \r
117  *\r
118  * @param[in] filter The handle to Media Info filter.\r
119  * @param[in] media_type The type of the content(#media_content_type_e) \n\r
120  * To allow searching over different content types, you should use bitwise 'OR' operator to compose 'type' parameter. \r
121  * @return return 0 on success, otherwise a negative error value.\r
122  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
123  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
124  * @see media_info_filter_create()\r
125  * @see media_info_filter_destroy()  \r
126  */\r
127 int media_info_filter_set_media_type(media_info_filter_h filter,int media_type);\r
128 \r
129 \r
130 /**\r
131  * @brief Gets the @a offset and @a count for the given @a filter used to limit number of items returned.\r
132  *\r
133  * @param[in] filter The handle to Media Info filter\r
134  * @param[out] offset The start position of the given filter(Starting from zero).\r
135  * @param[out] count The number of items to be searched with respect to offset.\r
136  * @return return 0 on success, otherwise a negative error value.\r
137  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
138  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
139  * @see media_info_filter_create()\r
140  * @see media_info_filter_destroy()  \r
141  */\r
142 int media_info_filter_get_offset(media_info_filter_h filter, int* offset, int* count);\r
143 \r
144 \r
145 /**\r
146  * @brief Gets the @a search @a keyword and @a search @a type for given @a filter.\r
147  *\r
148  * @remarks @a search_keyword must be released with free() by you. \r
149  * @param[in] filter The handle to media info filter\r
150  * @param[out] search_type The type of search\r
151  * @param[out] search_keyword The keyword which user want to search\r
152  * @return return 0 on success, otherwise a negative error value.\r
153  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
154  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
155  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
156  * @see media_info_filter_create()\r
157  * @see media_info_filter_destroy()  \r
158  */\r
159 int media_info_filter_get_search_keyword(media_info_filter_h filter,media_info_search_type_e* search_type, char **search_keyword);\r
160 \r
161 \r
162 /**\r
163  * @brief Gets the media info filter's content order.\r
164  * @details This function gets the @a order for given @a filter.\r
165  *\r
166  * @param[in] filter The handle to media info filter\r
167  * @param[out] order The search order type\r
168  * @return return 0 on success, otherwise a negative error value.\r
169  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
170  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
171  * @see media_info_filter_create()\r
172  * @see media_info_filter_destroy()  \r
173  */\r
174 int media_info_filter_get_order(media_info_filter_h filter, media_content_order_e* order);\r
175 \r
176 \r
177 /**\r
178  * @brief Gets the media info filter's content type.\r
179  * @details This function gets the content type (#media_content_type_e) for given filter\r
180  *\r
181  *\r
182  * @param[in] filter The handle to media info filter\r
183  * @param[out] type The type of the media content(#media_content_type_e) \n\r
184  * To allow searching over different content types, you should use bitwise 'OR' operator to compose 'type' parameter. \r
185  * @return return 0 on success, otherwise a negative error value.\r
186  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
187  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
188  * @see media_info_filter_create()\r
189  * @see media_info_filter_destroy()  \r
190  */\r
191 int media_info_filter_get_media_type(media_info_filter_h filter,int* type);\r
192 \r
193 /**\r
194  * @}\r
195  */\r
196 \r
197 \r
198 \r
199 /**\r
200  * @addtogroup CAPI_CONTENT_MEDIA_FILTER_FOLDER_MODULE\r
201  * @{\r
202  */\r
203 \r
204 \r
205 /**\r
206  * @brief Creates a media folder filter handle.\r
207  * @details This function creates a media folder filter handle. The handle can be\r
208  * used to get filtered information based on filter properties i.e. offset, count, search type, search keyword\r
209  * and order.\r
210  *\r
211  * @remarks The @a filter handle must be released with media_info_filter_destroy() by you. \r
212  * @param[out] filter  A handle to media folder filter\r
213  * @return 0 on success, otherwise a negative error value.\r
214  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
215  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
216  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
217  * @see media_folder_filter_destroy(),\r
218  *\r
219  */\r
220 int media_folder_filter_create(media_folder_filter_h* filter);\r
221 \r
222 /**\r
223  * @brief Destroys a media media folder filter\r
224  * @details The function frees all resources related to the media folder filter handle. The filter\r
225  * handle no longer can be used to perform any operation. A new filter handle\r
226  * has to be created before the next usage.\r
227  *\r
228  * @param[in] filter The handle to media folder filter\r
229  * @return 0 on success, otherwise a negative error value.\r
230  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
231  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
232  * @see media_folder_filter_create()\r
233  *\r
234  */\r
235 \r
236 int media_folder_filter_destroy(media_folder_filter_h filter);\r
237 \r
238 \r
239 /**\r
240  * @brief Set the media folder filter's offset and count.\r
241  * @details This function set the @a offset and @a count for the given filter used to limit number of items returned.\r
242  *  For example, if you set the @a offset as 10 and @a count as 5, then only searched data from 10 to 14 will be returned when the filter is used with foreach functions. \r
243  *\r
244  * @param[in] filter The handle to media folder filter\r
245  * @param[in] offset The start position of the given filter(Starting from zero).\r
246  * @param[in] count The number of items to be searched with respect to offset.\r
247  * @return return 0 on success, otherwise a negative error value.\r
248  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
249  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
250  * @see media_folder_filter_create()\r
251  * @see media_folder_filter_destroy() \r
252  */\r
253 int media_folder_filter_set_offset(media_folder_filter_h filter, int offset, int count);\r
254 \r
255 \r
256 /**\r
257  * @brief Set the @a search @a keyword and @a search @a type for given @a filter.\r
258  *\r
259  * @param[in] filter The handle to media folder filter\r
260  * @param[in] search_type The type which user want to search.\r
261  * @param[in] search_keyword The keyword which user want to search\r
262  * @return return 0 on success, otherwise a negative error value.\r
263  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
264  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
265  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
266  * @see media_folder_filter_create()\r
267  * @see media_folder_filter_destroy() \r
268  */\r
269 int media_folder_filter_set_search_keyword(media_folder_filter_h filter,media_folder_search_type_e search_type,const char *search_keyword);\r
270 \r
271 \r
272 /**\r
273  * @brief Set the media folder filter's content order either descending or ascending.\r
274  *\r
275  * @param[in] filter the handle to media folder filter\r
276  * @param[in] order The search order type\r
277  * @return return 0 on success, otherwise a negative error value.\r
278  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
279  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
280  * @see media_folder_filter_create()\r
281  * @see media_folder_filter_destroy() \r
282  */\r
283 int media_folder_filter_set_order(media_folder_filter_h filter, media_content_order_e order);\r
284 \r
285 \r
286 \r
287 /**\r
288  * @brief Gets the @a offset and @a count for the given @a filter used to limit number of items returned.\r
289  *\r
290  * @param[in] filter The handle to media folder filter\r
291  * @param[out] offset The start position of the given filter(Starting from zero).\r
292  * @param[out] count The number of items to be searched with respect to offset.\r
293  * @return return 0 on success, otherwise a negative error value.\r
294  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
295  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
296  * @see media_folder_filter_create()\r
297  * @see media_folder_filter_destroy()\r
298  */\r
299 int media_folder_filter_get_offset(media_folder_filter_h filter, int* offset, int* count);\r
300 \r
301 \r
302 /**\r
303  * @brief Gets the @a search @a keyword and @a search @a type for given @a filter.\r
304  *\r
305  * @remarks search_keyword must be released with free() by you. \r
306  * @param[in] filter The handle to media folder filter\r
307  * @param[out] search_type The type of search\r
308  * @param[out] search_keyword The keyword which user want to search\r
309  * @return return 0 on success, otherwise a negative error value.\r
310  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
311  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
312  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
313  * @see media_folder_filter_create()\r
314  * @see media_folder_filter_destroy()\r
315  */\r
316 int media_folder_filter_get_search_keyword(media_folder_filter_h filter,media_folder_search_type_e* search_type, char **search_keyword);\r
317 \r
318 \r
319 /**\r
320  * @brief Gets the media folder filter's content order.\r
321  * @details This function gets the @a order for given @a filter.\r
322  *\r
323  * @param[in] filter The handle to media folder filter\r
324  * @param[out] order The search order type\r
325  * @return return 0 on success, otherwise a negative error value.\r
326  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
327  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
328  * @see media_folder_filter_create()\r
329  * @see media_folder_filter_destroy() \r
330  */\r
331 int media_folder_filter_get_order(media_folder_filter_h filter, media_content_order_e* order);\r
332 \r
333 \r
334 \r
335 /**\r
336  * @}\r
337  */\r
338 \r
339 \r
340 \r
341 \r
342 /**\r
343  * @addtogroup CAPI_CONTENT_MEDIA_FILTER_AUDIO_MODULE\r
344  * @{\r
345  */\r
346  \r
347 \r
348 \r
349 /**\r
350  * @brief Creates a audio filter handle.\r
351  * @details This function creates a #media_audio_filter_h filter handle. The handle can be\r
352  * used to get filtered information based on filter properties i.e. offset, count, search keyword\r
353  * and order.\r
354  *\r
355  * @param[out] filter A handle to media audio filter\r
356  * @return 0 on success, otherwise a negative error value.\r
357  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
358  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
359  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
360  * @see media_audio_filter_destroy(),\r
361  *\r
362  */\r
363 int media_audio_filter_create(media_audio_filter_h* filter);\r
364 \r
365 /**\r
366  * @brief Destroys a media audio filter handle.\r
367  * @details The function frees all resources related to the media audio filter handle. The filter\r
368  * handle no longer can be used to perform any operation. A new filter handle\r
369  * has to be created before the next usage.\r
370  *\r
371  * @param[in] filter The handle to media audio filter\r
372  * @return 0 on success, otherwise a negative error value.\r
373  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
374  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
375  * @see media_audio_filter_create()\r
376  *\r
377  */\r
378 \r
379 int media_audio_filter_destroy(media_audio_filter_h filter);\r
380 \r
381 \r
382 /**\r
383  * @brief Set the media audio filter's offset and count.\r
384  * @details This function set the @a offset and @a count for the given filter used to limit number of items returned.\r
385  *  For example, if you set the @a offset as 10 and @a count as 5, then only searched data from 10 to 14 will be returned when the filter is used with foreach functions. \r
386  *\r
387  * @param[in] filter The handle to media audio filter\r
388  * @param[in] offset The start position of the given filter (Starting from zero).\r
389  * @param[in] count The number of items to be searched with respect to offset.\r
390  * @return return 0 on success, otherwise a negative error value.\r
391  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
392  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
393  * @see media_audio_filter_create()\r
394  * @see media_audio_filter_destroy() \r
395  */\r
396 int media_audio_filter_set_offset(media_audio_filter_h filter, int offset, int count);\r
397 \r
398 \r
399 /**\r
400  * @brief Set the @a search @a keyword and @a search @a type for given @a filter.\r
401  *\r
402  * @param[in] filter The handle to media audio filter\r
403  * @param[in] search_keyword The keyword which user want to search\r
404  * @return return 0 on success, otherwise a negative error value.\r
405  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
406  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
407  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
408  * @see media_audio_filter_create()\r
409  * @see media_audio_filter_destroy() \r
410  */\r
411 int media_audio_filter_set_search_keyword(media_audio_filter_h filter,media_audio_search_type_e search_type,const char *search_keyword);\r
412 \r
413 \r
414 /**\r
415  * @brief Set the media audio filter's content order either descending or ascending.\r
416  *\r
417  * @param[in] filter The handle to media audio filter\r
418  * @param[in] order The search order type\r
419  * @return return 0 on success, otherwise a negative error value.\r
420  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
421  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
422  * @see media_audio_filter_create()\r
423  * @see media_audio_filter_destroy() \r
424  */\r
425 int media_audio_filter_set_order(media_audio_filter_h filter, media_content_order_e order);\r
426 \r
427 \r
428 \r
429 \r
430 /**\r
431  * @brief Gets the @a offset and @a count for the given @a filter used to limit number of items returned.\r
432  *\r
433  * @param[in] filter The handle to media audio filter\r
434  * @param[out] offset The start position of the given filter (Starting from zero).\r
435  * @param[out] count The number of items to be searched with respect to offset.\r
436  * @return return 0 on success, otherwise a negative error value.\r
437  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
438  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
439  * @see media_audio_filter_create()\r
440  * @see media_audio_filter_destroy()  \r
441  */\r
442 int media_audio_filter_get_offset(media_audio_filter_h filter, int* offset, int* count);\r
443 \r
444 \r
445 /**\r
446  * @brief Gets the @a search @a keyword and @a search @a type for given @a filter.\r
447  *\r
448  * @remarks search_keyword must be released with free() by you. \r
449  * @param[in] filter The handle to media audio filter\r
450  * @param[out] search_type The type of search\r
451  * @param[out] search_keyword  The keyword which user want to search\r
452  * @return return 0 on success, otherwise a negative error value.\r
453  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
454  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
455  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
456  * @see media_audio_filter_create()\r
457  * @see media_audio_filter_destroy()  \r
458  */\r
459 int media_audio_filter_get_search_keyword(media_audio_filter_h filter,media_audio_search_type_e* search_type,char **search_keyword);\r
460 \r
461 \r
462 /**\r
463  * @brief Gets the media audio filter's content order.\r
464  * @details This function gets the @a order for given @a filter.\r
465  *\r
466  * @param[in] filter The handle to media audio filter\r
467  * @param[out] order The search order type\r
468  * @return return 0 on success, otherwise a negative error value.\r
469  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
470  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
471  * @see media_audio_filter_create()\r
472  * @see media_audio_filter_destroy()  \r
473  */\r
474 int media_audio_filter_get_order(media_audio_filter_h filter, media_content_order_e* order);\r
475 \r
476 \r
477 /**\r
478  * @}\r
479  */\r
480 \r
481 \r
482 \r
483 /**\r
484  * @addtogroup CAPI_CONTENT_MEDIA_FILTER_TAG_MODULE\r
485  * @{\r
486  */\r
487 \r
488 \r
489 /**\r
490  * @brief Creates a media tag filter handle.\r
491  * @details This function creates a #media_tag_filter_h filter handle. The handle can be\r
492  * used to get filtered information based on filter properties i.e. offset, count, search keyword\r
493  * and order.\r
494  *\r
495  * @param[out] filter A handle to media tag filter\r
496  * @return 0 on success, otherwise a negative error value.\r
497  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
498  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
499  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
500  * @see media_tag_filter_destroy(),\r
501  *\r
502  */\r
503 int media_tag_filter_create(media_tag_filter_h* filter);\r
504 \r
505 /**\r
506  * @brief Destroys a media tag filter handle.\r
507  * @details The function frees all resources related to the tag filter handle. The filter\r
508  * handle no longer can be used to perform any operation. A new filter handle\r
509  * has to be created before the next usage.\r
510  *\r
511  * @param[in]  The handle to media tag filter\r
512  * @return 0 on success, otherwise a negative error value.\r
513  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
514  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
515  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
516  * @see media_tag_filter_create()\r
517  *\r
518  */\r
519 \r
520 int media_tag_filter_destroy(media_tag_filter_h filter);\r
521 \r
522 /**\r
523  * @brief Set the media tag filter's offset and count.\r
524  * @details This function set the @a offset and @a count for the given filter used to limit number of items returned.\r
525  *  For example, if you set the @a offset as 10 and @a count as 5, then only searched data from 10 to 14 will be returned when the filter is used with foreach functions. \r
526  *\r
527  *\r
528  * @param[in] filter  The handle to media tag filter\r
529  * @param[in] offset The start position of the given filter(Starting from zero).\r
530  * @param[in] count The number of items to be searched with respect to offset.\r
531  * @return return 0 on success, otherwise a negative error value.\r
532  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
533  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
534  * @see media_tag_filter_create()\r
535  * @see media_tag_filter_destroy() \r
536  */\r
537 int media_tag_filter_set_offset(media_tag_filter_h filter, int offset, int count);\r
538 \r
539 \r
540 /**\r
541  * @brief Set the @a search @a keyword and @a search @a type for given @a filter.\r
542  *\r
543  * @param[in] filter  The handle to media tag filter\r
544  * @param[in] search_type The type which user want to search. \r
545  * @param[in] search_keyword The keyword which user want to search.\r
546  * @return return 0 on success, otherwise a negative error value.\r
547  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
548  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
549  * @see media_tag_filter_create()\r
550  * @see media_tag_filter_destroy() \r
551  */\r
552 int media_tag_filter_set_search_keyword(media_tag_filter_h filter,media_tag_search_type_e search_type,const char *search_keyword);\r
553 \r
554 \r
555 /**\r
556  * @brief Set the media tag filter's content order either descending or ascending.\r
557  *\r
558  * @param[in] filter  The handle to media tag filter\r
559  * @param[in] order The search order type\r
560  * @return return 0 on success, otherwise a negative error value.\r
561  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
562  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
563  * @see media_tag_filter_create()\r
564  * @see media_tag_filter_destroy() \r
565  */\r
566 int media_tag_filter_set_order(media_tag_filter_h filter, media_content_order_e order);\r
567 \r
568 \r
569 \r
570 /**\r
571  * @brief Gets the @a offset and @a count for the given @a filter used to limit number of items returned.\r
572  *\r
573  * @param[in] filter The handle to media tag filter\r
574  * @param[out] offset The start position of the given filter(Starting from zero).\r
575  * @param[out] count The number of items to be searched with respect to offset.\r
576  * @return return 0 on success, otherwise a negative error value.\r
577  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
578  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
579  * @see media_tag_filter_create()\r
580  * @see media_tag_filter_destroy() \r
581  */\r
582 int media_tag_filter_get_offset(media_tag_filter_h filter, int* offset, int* count);\r
583 \r
584 \r
585 /**\r
586  * @brief Gets the @a search @a keyword and @a search @a type for given @a filter.\r
587  *\r
588  * @remarks search_keyword must be released with free() by you.\r
589  * @param[in] filter  The handle to media tag filter\r
590  * @param[out] search_type The type of search\r
591  * @param[out] search_keyword  The keyword which user want to search\r
592  * @return return 0 on success, otherwise a negative error value.\r
593  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
594  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
595  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
596  * @see media_tag_filter_create()\r
597  * @see media_tag_filter_destroy() \r
598  */\r
599 int media_tag_filter_get_search_keyword(media_tag_filter_h filter, media_tag_search_type_e *search_type,char **search_keyword);\r
600 \r
601 \r
602 /**\r
603  * @brief Gets the media tag filter's content order.\r
604  * @details This function gets the @a order for given @a filter.\r
605  *\r
606  * @param[in] filter  The handle to media tag filter\r
607  * @param[out] order The search order type\r
608  * @return return 0 on success, otherwise a negative error value.\r
609  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
610  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
611  * @see media_tag_filter_create()\r
612  * @see media_tag_filter_destroy() \r
613  */\r
614 int media_tag_filter_get_order(media_tag_filter_h filter, media_content_order_e* order);\r
615 \r
616 /**\r
617  * @}\r
618  */\r
619  \r
620 \r
621 \r
622 /**\r
623  * @addtogroup CAPI_CONTENT_MEDIA_FILTER_BOOKMARK_MODULE\r
624  * @{\r
625  */\r
626  \r
627 \r
628 \r
629 /**\r
630  * @brief Creates a video bookmark filter handle.\r
631  * @details This function creates a #video_bookmark_filter_h filter handle. The handle can be\r
632  * used to get filtered information based on filter properties i.e. offset, count and order.\r
633  *\r
634  * @param[out] filter A handle to video bookmark filter\r
635  * @return 0 on success, otherwise a negative error value.\r
636  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
637  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
638  * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory\r
639  * @see video_bookmark_filter_destroy(),\r
640  *\r
641  */\r
642 int video_bookmark_filter_create(video_bookmark_filter_h* filter);\r
643 \r
644 /**\r
645  * @brief Destroys a video bookmark filter handle.\r
646  * @details The function frees all resources related to the bookmark filter handle. The filter\r
647  * handle no longer can be used to perform any operation. A new filter handle\r
648  * has to be created before the next usage.\r
649  *\r
650  * @param[in] filter The handle to video bookmark filter\r
651  * @return 0 on success, otherwise a negative error value.\r
652  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
653  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
654  * @see video_bookmark_filter_create()\r
655  *\r
656  */\r
657 \r
658 int video_bookmark_filter_destroy(video_bookmark_filter_h filter);\r
659 \r
660 /**\r
661  * @brief Set the video bookmark filter's offset.\r
662  * @details This function set the offset and count for the given bookmark filter used to limit number of items returned.\r
663  *\r
664  * @param[in] filter The handle to video bookmark filter\r
665  * @param[in] offset The start position of the given filter (Starting from zero).\r
666  * @param[in] count The number of items to be searched with respect to offset.\r
667  * @return return 0 on success, otherwise a negative error value.\r
668  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
669  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
670  * @see video_bookmark_filter_create()\r
671  * @see video_bookmark_filter_destroy() \r
672  */\r
673 int video_bookmark_filter_set_offset(video_bookmark_filter_h filter, int offset, int count);\r
674 \r
675 \r
676 /**\r
677  * @brief Set the video bookmark filter's content order either descending or ascending.\r
678  *\r
679  * @param[in] filter The handle to video bookmark filter\r
680  * @param[in] order The search order type\r
681  * @return return 0 on success, otherwise a negative error value.\r
682  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
683  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
684  * @see video_bookmark_filter_create()\r
685  * @see video_bookmark_filter_destroy() \r
686  */\r
687 int video_bookmark_filter_set_order(video_bookmark_filter_h filter, media_content_order_e order);\r
688 \r
689 \r
690 /**\r
691  * @brief Gets the @a offset and @a count for the given @a filter used to limit number of items returned.\r
692  *\r
693  * @param[in] filter  The handle to video bookmark filter\r
694  * @param[out] offset The start position of the given filter (Starting from zero).\r
695  * @param[out] count The number of items to be searched with respect to offset.\r
696  * @return return 0 on success, otherwise a negative error value.\r
697  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
698  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
699  * @see video_bookmark_filter_create()\r
700  * @see video_bookmark_filter_destroy() \r
701  */\r
702 int video_bookmark_filter_get_offset(video_bookmark_filter_h filter, int* offset, int* count);\r
703 \r
704 \r
705 /**\r
706  * @brief Gets the video bookmark filter's content order.\r
707  * @details This function gets the @a order for given @a filter.\r
708  *\r
709  * @param[in] filter  The handle to video bookmark filter\r
710  * @param[out] order The search order type\r
711  * @return return 0 on success, otherwise a negative error value.\r
712  * @retval #MEDIA_CONTENT_ERROR_NONE Successful\r
713  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter\r
714  * @see video_bookmark_filter_create()\r
715  * @see video_bookmark_filter_destroy()\r
716  */\r
717 int video_bookmark_filter_get_order(video_bookmark_filter_h filter, media_content_order_e* order);\r
718 \r
719 /**\r
720  * @}\r
721  */\r
722 \r
723 \r
724 #ifdef __cplusplus\r
725 }\r
726 #endif /* __cplusplus */\r
727 \r
728 #endif /* __TIZEN_MEDIA_FILTER_H__ */\r
729 \r