Tizen 2.1 base
[apps/core/preloaded/calendar.git] / include / query.h
1 /*
2   *
3   *  Copyright 2012  Samsung Electronics Co., Ltd
4   *
5   *  Licensed under the Flora License, Version 1.0 (the "License");
6   *  you may not use this file except in compliance with the License.
7   *  You may obtain a copy of the License at
8   *
9   *       http://floralicense.org/license/
10   *
11   *  Unless required by applicable law or agreed to in writing, software
12   *  distributed under the License is distributed on an "AS IS" BASIS,
13   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   *  See the License for the specific language governing permissions and
15   *  limitations under the License.
16   */
17
18 #ifndef __CALENDAR_QUERY_H__
19 #define __CALENDAR_QUERY_H__
20
21 #include "cld.h"
22 #include <calendar2.h>
23
24 calendar_query_h cal_query_create_list_more_normal_query(
25                 unsigned int time_property_id, const struct tm* start, int direction);
26
27 calendar_query_h cal_query_create_list_more_allday_query(
28                 unsigned int time_property_id, const struct tm* start, int direction);
29
30 calendar_query_h cal_query_create_list_more_task_query(
31                 const struct tm* start, int direction, bool include_completed);
32
33 calendar_query_h cal_query_create_list_range_query(const char* view_uri,
34                 unsigned int start_time_property_id, unsigned int end_time_property_id,
35                 const struct tm* start, const struct tm* end, bool all_day);
36
37 calendar_query_h cal_query_create_due_date_task_list_query(
38                 struct tm *start, struct tm *end,
39                 Eina_Bool is_show_completed_task,
40                 _calendar_task_sort_type sort_type);
41
42 calendar_query_h cal_query_create_all_task_list_query(
43                 struct tm *start, struct tm *end,
44                 Eina_Bool is_show_completed_task,
45                 _calendar_task_sort_type sort_type);
46
47 calendar_query_h cal_query_create_task_search_query(
48                 const char* keyword);
49
50 typedef void (*cal_for_each_record_callback)(calendar_record_h record, void* data);
51
52 void cal_do_for_each_record_in_list(calendar_list_h list, cal_for_each_record_callback cb, void* data);
53
54 calendar_query_h cal_query_create_all_event_list_query(void);
55
56 #endif