1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /*
3  * GData Client
4  * Copyright (C) Philip Withnall 2015 <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_ACCESS_RULE_H
21 #define GDATA_CALENDAR_ACCESS_RULE_H
22 
23 #include <glib.h>
24 #include <glib-object.h>
25 
26 #include <gdata/gdata-access-rule.h>
27 
28 G_BEGIN_DECLS
29 
30 /**
31  * GDATA_CALENDAR_ACCESS_ROLE_READ:
32  *
33  * The users specified by the #GDataCalendarAccessRule have read-only access to
34  * the calendar.
35  *
36  * Since: 0.7.0
37  */
38 #define GDATA_CALENDAR_ACCESS_ROLE_READ "http://schemas.google.com/gCal/2005#read"
39 
40 /**
41  * GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY:
42  *
43  * The users specified by the #GDataCalendarAccessRule can only see the
44  * free/busy information on the calendar; not event details.
45  *
46  * Since: 0.7.0
47  */
48 #define GDATA_CALENDAR_ACCESS_ROLE_FREE_BUSY "http://schemas.google.com/gCal/2005#freebusy"
49 
50 /**
51  * GDATA_CALENDAR_ACCESS_ROLE_EDITOR:
52  *
53  * The users specified by the #GDataCalendarAccessRule have full edit access to
54  * the calendar, except they can’t change the calendar’s access rules.
55  *
56  * Since: 0.7.0
57  */
58 #define GDATA_CALENDAR_ACCESS_ROLE_EDITOR "http://schemas.google.com/gCal/2005#editor"
59 
60 /**
61  * GDATA_CALENDAR_ACCESS_ROLE_OWNER:
62  *
63  * The users specified by the #GDataCalendarAccessRule have full owner access
64  * to the calendar.
65  *
66  * Since: 0.7.0
67  */
68 #define GDATA_CALENDAR_ACCESS_ROLE_OWNER "http://schemas.google.com/gCal/2005#owner"
69 
70 /**
71  * GDATA_CALENDAR_ACCESS_ROLE_ROOT:
72  *
73  * The users specified by the #GDataCalendarAccessRule have full administrator
74  * access to the calendar server. This is only available in Google Apps For
75  * Your Domain.
76  *
77  * Since: 0.7.0
78  */
79 #define GDATA_CALENDAR_ACCESS_ROLE_ROOT "http://schemas.google.com/gCal/2005#root"
80 
81 #define GDATA_TYPE_CALENDAR_ACCESS_RULE		(gdata_calendar_access_rule_get_type ())
82 #define GDATA_CALENDAR_ACCESS_RULE(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CALENDAR_ACCESS_RULE, GDataCalendarAccessRule))
83 #define GDATA_CALENDAR_ACCESS_RULE_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CALENDAR_ACCESS_RULE, GDataCalendarAccessRuleClass))
84 #define GDATA_IS_CALENDAR_ACCESS_RULE(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CALENDAR_ACCESS_RULE))
85 #define GDATA_IS_CALENDAR_ACCESS_RULE_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CALENDAR_ACCESS_RULE))
86 #define GDATA_CALENDAR_ACCESS_RULE_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CALENDAR_ACCESS_RULE, GDataCalendarAccessRuleClass))
87 
88 /**
89  * GDataCalendarAccessRule:
90  *
91  * All the fields in the #GDataCalendarAccessRule structure are private and
92  * should never be accessed directly.
93  *
94  * Since: 0.17.2
95  */
96 typedef struct {
97 	GDataAccessRule parent;
98 } GDataCalendarAccessRule;
99 
100 /**
101  * GDataCalendarAccessRuleClass:
102  *
103  * All the fields in the #GDataCalendarAccessRuleClass structure are private
104  * and should never be accessed directly.
105  *
106  * Since: 0.17.2
107  */
108 typedef struct {
109 	/*< private >*/
110 	GDataAccessRuleClass parent;
111 
112 	/*< private >*/
113 	/* Padding for future expansion */
114 	void (*_g_reserved0) (void);
115 	void (*_g_reserved1) (void);
116 } GDataCalendarAccessRuleClass;
117 
118 GType gdata_calendar_access_rule_get_type (void) G_GNUC_CONST;
119 
120 GDataCalendarAccessRule *
121 gdata_calendar_access_rule_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
122 
123 G_END_DECLS
124 
125 #endif /* !GDATA_CALENDAR_ACCESS_RULE_H */
126