1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /*
3  * GData Client
4  * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
5  *
6  * GData Client is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * GData Client is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with GData Client.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef GDATA_CALENDAR_QUERY_H
21 #define GDATA_CALENDAR_QUERY_H
22 
23 #include <glib.h>
24 #include <glib-object.h>
25 
26 #include <gdata/gdata-query.h>
27 #include <gdata/gdata-types.h>
28 
29 G_BEGIN_DECLS
30 
31 #define GDATA_TYPE_CALENDAR_QUERY		(gdata_calendar_query_get_type ())
32 #define GDATA_CALENDAR_QUERY(o)			(G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CALENDAR_QUERY, GDataCalendarQuery))
33 #define GDATA_CALENDAR_QUERY_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CALENDAR_QUERY, GDataCalendarQueryClass))
34 #define GDATA_IS_CALENDAR_QUERY(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CALENDAR_QUERY))
35 #define GDATA_IS_CALENDAR_QUERY_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CALENDAR_QUERY))
36 #define GDATA_CALENDAR_QUERY_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CALENDAR_QUERY, GDataCalendarQueryClass))
37 
38 typedef struct _GDataCalendarQueryPrivate	GDataCalendarQueryPrivate;
39 
40 /**
41  * GDataCalendarQuery:
42  *
43  * All the fields in the #GDataCalendarQuery structure are private and should never be accessed directly.
44  */
45 typedef struct {
46 	GDataQuery parent;
47 	GDataCalendarQueryPrivate *priv;
48 } GDataCalendarQuery;
49 
50 /**
51  * GDataCalendarQueryClass:
52  *
53  * All the fields in the #GDataCalendarQueryClass structure are private and should never be accessed directly.
54  */
55 typedef struct {
56 	/*< private >*/
57 	GDataQueryClass parent;
58 
59 	/*< private >*/
60 	/* Padding for future expansion */
61 	void (*_g_reserved0) (void);
62 	void (*_g_reserved1) (void);
63 } GDataCalendarQueryClass;
64 
65 GType gdata_calendar_query_get_type (void) G_GNUC_CONST;
66 
67 GDataCalendarQuery *gdata_calendar_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
68 GDataCalendarQuery *gdata_calendar_query_new_with_limits (const gchar *q, gint64 start_min, gint64 start_max) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
69 
70 gboolean gdata_calendar_query_get_future_events (GDataCalendarQuery *self) G_GNUC_PURE;
71 void gdata_calendar_query_set_future_events (GDataCalendarQuery *self, gboolean future_events);
72 const gchar *gdata_calendar_query_get_order_by (GDataCalendarQuery *self) G_GNUC_PURE;
73 void gdata_calendar_query_set_order_by (GDataCalendarQuery *self, const gchar *order_by);
74 gboolean gdata_calendar_query_get_single_events (GDataCalendarQuery *self) G_GNUC_PURE;
75 void gdata_calendar_query_set_single_events (GDataCalendarQuery *self, gboolean single_events);
76 gint64 gdata_calendar_query_get_start_min (GDataCalendarQuery *self);
77 void gdata_calendar_query_set_start_min (GDataCalendarQuery *self, gint64 start_min);
78 gint64 gdata_calendar_query_get_start_max (GDataCalendarQuery *self);
79 void gdata_calendar_query_set_start_max (GDataCalendarQuery *self, gint64 start_max);
80 const gchar *gdata_calendar_query_get_timezone (GDataCalendarQuery *self) G_GNUC_PURE;
81 void gdata_calendar_query_set_timezone (GDataCalendarQuery *self, const gchar *_timezone);
82 guint gdata_calendar_query_get_max_attendees (GDataCalendarQuery *self) G_GNUC_PURE;
83 void gdata_calendar_query_set_max_attendees (GDataCalendarQuery *self, guint max_attendees);
84 gboolean gdata_calendar_query_show_deleted (GDataCalendarQuery *self) G_GNUC_PURE;
85 void gdata_calendar_query_set_show_deleted (GDataCalendarQuery *self, gboolean show_deleted);
86 
87 #ifndef LIBGDATA_DISABLE_DEPRECATED
88 gint64 gdata_calendar_query_get_recurrence_expansion_start (GDataCalendarQuery *self) G_GNUC_DEPRECATED_FOR (gdata_calendar_query_get_single_events);
89 void gdata_calendar_query_set_recurrence_expansion_start (GDataCalendarQuery *self, gint64 start) G_GNUC_DEPRECATED_FOR (gdata_calendar_query_set_single_events);
90 gint64 gdata_calendar_query_get_recurrence_expansion_end (GDataCalendarQuery *self) G_GNUC_DEPRECATED_FOR (gdata_calendar_query_get_single_events);
91 void gdata_calendar_query_set_recurrence_expansion_end (GDataCalendarQuery *self, gint64 end) G_GNUC_DEPRECATED_FOR (gdata_calendar_query_set_single_events);
92 
93 const gchar *gdata_calendar_query_get_sort_order (GDataCalendarQuery *self) G_GNUC_PURE G_GNUC_DEPRECATED;
94 void gdata_calendar_query_set_sort_order (GDataCalendarQuery *self, const gchar *sort_order) G_GNUC_DEPRECATED_FOR (g_list_sort);
95 #endif /* !LIBGDATA_DISABLE_DEPRECATED */
96 
97 G_END_DECLS
98 
99 #endif /* !GDATA_CALENDAR_QUERY_H */
100