1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /*
3  * GData Client
4  * Copyright (C) Philip Withnall 2009–2010 <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_GD_REMINDER_H
21 #define GDATA_GD_REMINDER_H
22 
23 #include <glib.h>
24 #include <glib-object.h>
25 
26 #include <gdata/gdata-parsable.h>
27 
28 G_BEGIN_DECLS
29 
30 /**
31  * GDATA_GD_REMINDER_ALERT:
32  *
33  * The #GDataGDReminder:method for an alert to appear in the user's browser.
34  *
35  * Since: 0.7.0
36  */
37 #define GDATA_GD_REMINDER_ALERT "alert"
38 
39 /**
40  * GDATA_GD_REMINDER_EMAIL:
41  *
42  * The #GDataGDReminder:method for an alert to be sent to the user by e-mail.
43  *
44  * Since: 0.7.0
45  */
46 #define GDATA_GD_REMINDER_EMAIL "email"
47 
48 /**
49  * GDATA_GD_REMINDER_SMS:
50  *
51  * The #GDataGDReminder:method for an alert to be sent to the user by SMS.
52  *
53  * Since: 0.7.0
54  */
55 #define GDATA_GD_REMINDER_SMS "sms"
56 
57 #define GDATA_TYPE_GD_REMINDER		(gdata_gd_reminder_get_type ())
58 #define GDATA_GD_REMINDER(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_GD_REMINDER, GDataGDReminder))
59 #define GDATA_GD_REMINDER_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_GD_REMINDER, GDataGDReminderClass))
60 #define GDATA_IS_GD_REMINDER(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_GD_REMINDER))
61 #define GDATA_IS_GD_REMINDER_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_GD_REMINDER))
62 #define GDATA_GD_REMINDER_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_GD_REMINDER, GDataGDReminderClass))
63 
64 typedef struct _GDataGDReminderPrivate	GDataGDReminderPrivate;
65 
66 /**
67  * GDataGDReminder:
68  *
69  * All the fields in the #GDataGDReminder structure are private and should never be accessed directly.
70  *
71  * Since: 0.2.0
72  */
73 typedef struct {
74 	GDataParsable parent;
75 	GDataGDReminderPrivate *priv;
76 } GDataGDReminder;
77 
78 /**
79  * GDataGDReminderClass:
80  *
81  * All the fields in the #GDataGDReminderClass structure are private and should never be accessed directly.
82  *
83  * Since: 0.4.0
84  */
85 typedef struct {
86 	/*< private >*/
87 	GDataParsableClass parent;
88 
89 	/*< private >*/
90 	/* Padding for future expansion */
91 	void (*_g_reserved0) (void);
92 	void (*_g_reserved1) (void);
93 } GDataGDReminderClass;
94 
95 GType gdata_gd_reminder_get_type (void) G_GNUC_CONST;
96 
97 GDataGDReminder *gdata_gd_reminder_new (const gchar *method, gint64 absolute_time, gint relative_time) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
98 
99 const gchar *gdata_gd_reminder_get_method (GDataGDReminder *self) G_GNUC_PURE;
100 void gdata_gd_reminder_set_method (GDataGDReminder *self, const gchar *method);
101 
102 gint64 gdata_gd_reminder_get_absolute_time (GDataGDReminder *self);
103 void gdata_gd_reminder_set_absolute_time (GDataGDReminder *self, gint64 absolute_time);
104 gboolean gdata_gd_reminder_is_absolute_time (GDataGDReminder *self);
105 
106 gint gdata_gd_reminder_get_relative_time (GDataGDReminder *self) G_GNUC_PURE;
107 void gdata_gd_reminder_set_relative_time (GDataGDReminder *self, gint relative_time);
108 
109 G_END_DECLS
110 
111 #endif /* !GDATA_GD_REMINDER_H */
112