1
/* Evolution calendar interface
3
* Copyright (C) 2000 Eskil Heyn Olsen
4
* Copyright (C) 2000 Ximian, Inc.
5
* Copyright (C) 2000 Ximian, Inc.
7
* Authors: Eskil Heyn Olsen <deity@eskil.dk>
8
* Federico Mena-Quintero <federico@ximian.com>
11
#ifndef _EVOLUTION_DATASERVER_CALENDAR_IDL_
12
#define _EVOLUTION_DATASERVER_CALENDAR_IDL_
20
/* A calendar component (event/todo/journal/etc), represented as an
23
typedef string CalObj;
24
typedef sequence<CalObj> CalObjSeq;
26
typedef sequence<string> stringlist;
28
/* A unique identifier for a calendar component */
29
typedef string CalObjUID;
31
/* A unique identifier for an event recurrence */
32
typedef string CalRecurID;
34
/* Simple sequence of strings */
35
typedef sequence<string> StringSeq;
37
/* Sequence of unique identifiers */
38
typedef sequence<CalObjUID> CalObjUIDSeq;
40
/* A unique identifier and the recurrence id for calendar components */
46
/* sequence of ids of calendar components */
47
typedef sequence<CalObjID> CalObjIDSeq;
49
/* A VTIMEZONE component, represented as an iCalendar string. */
50
typedef string CalTimezoneObj;
52
/* A unique identifier for a VTIMEZONE component, i.e. its TZID. */
53
typedef string CalTimezoneObjUID;
55
/* A unique identifier for an alarm subcomponent */
56
typedef string CalAlarmUID;
58
/* Flags for getting UID sequences */
59
typedef long CalObjType;
60
const CalObjType TYPE_EVENT = 1 << 0;
61
const CalObjType TYPE_TODO = 1 << 1;
62
const CalObjType TYPE_JOURNAL = 1 << 2;
63
const CalObjType TYPE_ANY = 0x07;
65
/* Flags for getting UID sequences */
66
typedef long CalObjModType;
67
const CalObjModType MOD_THIS = 1 << 0;
68
const CalObjModType MOD_THISANDPRIOR = 1 << 1;
69
const CalObjModType MOD_THISANDFUTURE = 1 << 2;
70
const CalObjModType MOD_ALL = 0x07;
72
/* Flags for getting URI sequences */
74
const CalMode MODE_LOCAL = 1 << 0;
75
const CalMode MODE_REMOTE = 1 << 1;
76
const CalMode MODE_ANY = 0x07;
78
/* Types of object changes made */
79
typedef long CalObjChangeType;
80
const CalObjChangeType ADDED = 1 << 0;
81
const CalObjChangeType MODIFIED = 1 << 1;
82
const CalObjChangeType DELETED = 1 << 2;
84
/* Used to store a time_t */
85
typedef unsigned long Time_t;
87
/* An instance of a calendar component that actually occurs. These are
88
* "virtual" objects in that they are used to represent instances of
89
* recurring events and alarms. "Real" objects just contain the
90
* information required to figure out the times at which they recur or
93
struct CalObjInstance {
99
/* Used to transfer a list of component occurrences */
100
typedef sequence<CalObjInstance> CalObjInstanceSeq;
102
/* An object change */
103
struct CalObjChange {
105
CalObjChangeType type;
108
/* Used to transfer a list of changed components */
109
typedef sequence<CalObjChange> CalObjChangeSeq;
111
/* Used to represent users and lists of users */
113
typedef sequence<User> UserList;
122
ObjectIdAlreadyExists,
123
AuthenticationFailed,
124
AuthenticationRequired,
127
UnsupportedAuthenticationMethod,
133
/* These can be returned for successful searches, but
134
indicate the result set was truncated */
135
SearchSizeLimitExceeded,
136
SearchTimeLimitExceeded,
148
/* Handle to a live query on a calendar */
149
interface CalView : Bonobo::Unknown {
150
oneway void start ();
153
/* Listener for changes in a query of a calendar */
154
interface CalViewListener : Bonobo::Unknown {
155
oneway void notifyObjectsAdded (in stringlist objects);
156
oneway void notifyObjectsModified (in stringlist objects);
157
oneway void notifyObjectsRemoved (in CalObjIDSeq ids);
158
oneway void notifyQueryProgress (in string message, in short percent);
159
oneway void notifyQueryDone (in CallStatus status);
162
/* Calendar client interface */
163
interface Cal : Bonobo::Unknown {
164
exception NotFound {};
165
exception InvalidRange {};
167
/* A calendar is identified by its URI */
168
readonly attribute string uri;
170
oneway void open (in boolean only_if_exists, in string username, in string password);
171
oneway void remove ();
173
/* Check write permissions for calendar */
174
oneway void isReadOnly ();
176
/* Information on the backend's capabilities */
177
oneway void getStaticCapabilities ();
179
/* Return the cal address associated with this calendar, if any. */
180
oneway void getCalAddress ();
182
oneway void getAlarmEmailAddress ();
184
/* Returns the LDAP attribute to get attendees from */
185
oneway void getLdapAttribute ();
187
/* For going online/offline */
188
void setMode (in CalMode mode);
190
/* Get a default object of the backend's type */
191
oneway void getDefaultObject ();
193
/* Gets a component based on its URI */
194
oneway void getObject (in CalObjUID uid, in CalRecurID rid);
196
oneway void getObjectList (in string query);
198
/* Methods for manipulating timezones */
199
oneway void getTimezone (in CalTimezoneObjUID tzid);
200
oneway void addTimezone (in CalTimezoneObj tz);
201
/* The timezone used to resolve DATE and floating DATE-TIME values. */
202
oneway void setDefaultTimezone (in CalTimezoneObj tz);
204
/* Gets a list of components that changed */
205
oneway void getChanges (in string change_id);
207
/* Returns free/busy objects for the given interval */
208
oneway void getFreeBusy (in UserList users, in Time_t start, in Time_t end);
210
/* Discards an alarm from a given component */
211
oneway void discardAlarm (in CalObjUID uid, in CalAlarmUID auid);
213
/* Methods for manipulating iCalendar objects */
214
oneway void createObject (in CalObj calobj);
215
oneway void modifyObject (in CalObj calobj, in CalObjModType mod);
216
oneway void removeObject (in CalObjUID uid, in CalRecurID rid, in CalObjModType mod);
218
/* get attachment list for an object */
219
oneway void getAttachmentList (in CalObjUID uid, in CalRecurID rid);
221
/* Methods for getting/sending iCalendar VCALENDARS via iTip/iMip */
222
oneway void receiveObjects (in CalObj calobj);
223
oneway void sendObjects (in CalObj calobj);
226
oneway void getQuery (in string sexp, in CalViewListener ql);
229
/* Listener for changes in a calendar */
230
interface CalListener : Bonobo::Unknown {
231
/* Return status when setting calendar mode */
233
MODE_SET, /* All OK */
234
MODE_NOT_SET, /* Generic error */
235
MODE_NOT_SUPPORTED /* Mode not supported */
238
oneway void notifyReadOnly (in CallStatus status, in boolean read_only);
239
oneway void notifyCalAddress (in CallStatus status, in string address);
240
oneway void notifyAlarmEmailAddress (in CallStatus status, in string address);
241
oneway void notifyLDAPAttribute (in CallStatus status, in string ldap_attribute);
242
oneway void notifyStaticCapabilities (in CallStatus status, in string capabilities);
244
oneway void notifyCalOpened (in CallStatus status);
245
oneway void notifyCalRemoved (in CallStatus status);
247
oneway void notifyObjectCreated (in CallStatus status, in string uid);
248
oneway void notifyObjectModified (in CallStatus status);
249
oneway void notifyObjectRemoved (in CallStatus status);
251
oneway void notifyAlarmDiscarded (in CallStatus status);
253
oneway void notifyObjectsReceived (in CallStatus status);
254
oneway void notifyObjectsSent (in CallStatus status, in UserList users, in CalObj calobj);
256
oneway void notifyDefaultObjectRequested (in CallStatus status, in CalObj object);
257
oneway void notifyObjectRequested (in CallStatus status, in CalObj object);
258
oneway void notifyObjectListRequested (in CallStatus status, in stringlist objects);
259
oneway void notifyQuery (in CallStatus status, in CalView query);
261
oneway void notifyTimezoneRequested (in CallStatus status, in CalTimezoneObj tz);
262
oneway void notifyTimezoneAdded (in CallStatus status, in CalTimezoneObjUID tzid);
263
oneway void notifyDefaultTimezoneSet (in CallStatus status);
265
oneway void notifyChanges (in CallStatus status, in CalObjChangeSeq changes);
266
oneway void notifyFreeBusy (in CallStatus status, in CalObjSeq freebusy);
268
oneway void notifyAttachmentListRequested (in CallStatus status, in stringlist attachments);
270
/* Called from a Calendar when the mode is changed */
271
oneway void notifyCalSetMode (in SetModeStatus status, in CalMode mode);
273
/* Called from a Calendar when there is an error not notified otherwise */
274
oneway void notifyErrorOccurred (in string message);
276
oneway void notifyAuthRequired ();
280
/* A calendar factory, can load and create calendars */
281
interface CalFactory : Bonobo::Unknown {
282
exception NilListener {};
283
exception InvalidURI {};
284
exception UnsupportedMethod {};
286
Cal getCal (in string source, in CalObjType type, in CalListener listener)
287
raises (NilListener, InvalidURI, UnsupportedMethod);