~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to calendar/idl/Evolution-DataServer-Calendar.idl

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Evolution calendar interface
2
 
 *
3
 
 * Copyright (C) 2000 Eskil Heyn Olsen
4
 
 * Copyright (C) 2000 Ximian, Inc.
5
 
 * Copyright (C) 2000 Ximian, Inc.
6
 
 *
7
 
 * Authors: Eskil Heyn Olsen <deity@eskil.dk>
8
 
 *          Federico Mena-Quintero <federico@ximian.com>
9
 
 */
10
 
 
11
 
#ifndef _EVOLUTION_DATASERVER_CALENDAR_IDL_
12
 
#define _EVOLUTION_DATASERVER_CALENDAR_IDL_
13
 
 
14
 
#include <Bonobo.idl>
15
 
 
16
 
module GNOME {
17
 
module Evolution {
18
 
 
19
 
module Calendar {
20
 
        /* A calendar component (event/todo/journal/etc), represented as an
21
 
         * iCalendar string.
22
 
         */
23
 
        typedef string CalObj;
24
 
        typedef sequence<CalObj> CalObjSeq;
25
 
 
26
 
        typedef sequence<string> stringlist;
27
 
 
28
 
        /* A unique identifier for a calendar component */
29
 
        typedef string CalObjUID;
30
 
 
31
 
        /* A unique identifier for an event recurrence */
32
 
        typedef string CalRecurID;
33
 
 
34
 
        /* Simple sequence of strings */
35
 
        typedef sequence<string> StringSeq;
36
 
 
37
 
        /* Sequence of unique identifiers */
38
 
        typedef sequence<CalObjUID> CalObjUIDSeq;
39
 
 
40
 
        /* A unique identifier and the recurrence id for calendar components */ 
41
 
        struct CalObjID {
42
 
                CalObjUID uid;
43
 
                CalRecurID rid;
44
 
        };
45
 
        
46
 
        /* sequence of ids of calendar components */
47
 
        typedef sequence<CalObjID> CalObjIDSeq;
48
 
 
49
 
        /* A VTIMEZONE component, represented as an iCalendar string. */
50
 
        typedef string CalTimezoneObj;
51
 
 
52
 
        /* A unique identifier for a VTIMEZONE component, i.e. its TZID. */
53
 
        typedef string CalTimezoneObjUID;
54
 
 
55
 
        /* A unique identifier for an alarm subcomponent */
56
 
        typedef string CalAlarmUID;
57
 
 
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;
64
 
 
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;
71
 
 
72
 
        /* Flags for getting URI sequences */
73
 
        typedef long CalMode;
74
 
        const CalMode MODE_LOCAL   = 1 << 0;
75
 
        const CalMode MODE_REMOTE  = 1 << 1;
76
 
        const CalMode MODE_ANY     = 0x07;
77
 
 
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;
83
 
 
84
 
        /* Used to store a time_t */
85
 
        typedef unsigned long Time_t;
86
 
        
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
91
 
         * trigger.  
92
 
         */
93
 
        struct CalObjInstance {
94
 
                CalObjUID uid;
95
 
                Time_t start;
96
 
                Time_t end;
97
 
        };
98
 
 
99
 
        /* Used to transfer a list of component occurrences */
100
 
        typedef sequence<CalObjInstance> CalObjInstanceSeq;
101
 
 
102
 
        /* An object change */
103
 
        struct CalObjChange {
104
 
                CalObj calobj;
105
 
                CalObjChangeType type;
106
 
        };
107
 
 
108
 
        /* Used to transfer a list of changed components */
109
 
        typedef sequence<CalObjChange> CalObjChangeSeq;
110
 
 
111
 
        /* Used to represent users and lists of users */
112
 
        typedef string User;
113
 
        typedef sequence<User> UserList;
114
 
 
115
 
        enum CallStatus {
116
 
                Success,
117
 
                RepositoryOffline,
118
 
                PermissionDenied,
119
 
                InvalidRange,
120
 
                ObjectNotFound,
121
 
                InvalidObject,
122
 
                ObjectIdAlreadyExists,
123
 
                AuthenticationFailed,
124
 
                AuthenticationRequired,
125
 
                UnsupportedField,
126
 
                UnsupportedMethod,
127
 
                UnsupportedAuthenticationMethod,
128
 
                TLSNotAvailable,
129
 
                NoSuchCal,
130
 
                UnknownUser,
131
 
                OfflineUnavailable,
132
 
 
133
 
                /* These can be returned for successful searches, but
134
 
                   indicate the result set was truncated */
135
 
                SearchSizeLimitExceeded,
136
 
                SearchTimeLimitExceeded,
137
 
 
138
 
                InvalidQuery,
139
 
                QueryRefused,
140
 
 
141
 
                CouldNotCancel,
142
 
                
143
 
                OtherError,
144
 
                InvalidServerVersion
145
 
 
146
 
        };
147
 
 
148
 
        /* Handle to a live query on a calendar */
149
 
        interface CalView : Bonobo::Unknown {
150
 
                oneway void start ();
151
 
        };
152
 
 
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);
160
 
        };
161
 
 
162
 
        /* Calendar client interface */
163
 
        interface Cal : Bonobo::Unknown {
164
 
                exception NotFound {};
165
 
                exception InvalidRange {};
166
 
                
167
 
                /* A calendar is identified by its URI */
168
 
                readonly attribute string uri;
169
 
 
170
 
                oneway void open (in boolean only_if_exists, in string username, in string password);
171
 
                oneway void remove ();
172
 
 
173
 
                /* Check write permissions for calendar */
174
 
                oneway void isReadOnly ();
175
 
                
176
 
                /* Information on the backend's capabilities */
177
 
                oneway void getStaticCapabilities ();
178
 
 
179
 
                /* Return the cal address associated with this calendar, if any. */
180
 
                oneway void getCalAddress ();           
181
 
 
182
 
                oneway void getAlarmEmailAddress ();
183
 
 
184
 
                /* Returns the LDAP attribute to get attendees from */
185
 
                oneway void getLdapAttribute ();
186
 
 
187
 
                /* For going online/offline */
188
 
                void setMode (in CalMode mode);
189
 
 
190
 
                /* Get a default object of the backend's type */
191
 
                oneway void getDefaultObject ();
192
 
                
193
 
                /* Gets a component based on its URI */
194
 
                oneway void getObject (in CalObjUID uid, in CalRecurID rid);
195
 
 
196
 
                oneway void getObjectList (in string query);            
197
 
 
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);
203
 
 
204
 
                /* Gets a list of components that changed */
205
 
                oneway void getChanges (in string change_id);
206
 
 
207
 
                /* Returns free/busy objects for the given interval */
208
 
                oneway void getFreeBusy (in UserList users, in Time_t start, in Time_t end);
209
 
 
210
 
                /* Discards an alarm from a given component */
211
 
                oneway void discardAlarm (in CalObjUID uid, in CalAlarmUID auid);
212
 
 
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);
217
 
 
218
 
                /* get attachment list for an object */
219
 
                oneway void getAttachmentList (in CalObjUID uid, in CalRecurID rid);            
220
 
                
221
 
                /* Methods for getting/sending iCalendar VCALENDARS via iTip/iMip */
222
 
                oneway void receiveObjects (in CalObj calobj);
223
 
                oneway void sendObjects (in CalObj calobj);
224
 
 
225
 
                /* Query methods */
226
 
                oneway void getQuery (in string sexp, in CalViewListener ql);
227
 
        };
228
 
 
229
 
        /* Listener for changes in a calendar */
230
 
        interface CalListener : Bonobo::Unknown {
231
 
                /* Return status when setting calendar mode */
232
 
                enum SetModeStatus {
233
 
                        MODE_SET,                    /* All OK */
234
 
                        MODE_NOT_SET,                /* Generic error */
235
 
                        MODE_NOT_SUPPORTED           /* Mode not supported */
236
 
                };
237
 
 
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);
243
 
                
244
 
                oneway void notifyCalOpened (in CallStatus status);
245
 
                oneway void notifyCalRemoved (in CallStatus status);
246
 
 
247
 
                oneway void notifyObjectCreated (in CallStatus status, in string uid);
248
 
                oneway void notifyObjectModified (in CallStatus status);
249
 
                oneway void notifyObjectRemoved (in CallStatus status);
250
 
 
251
 
                oneway void notifyAlarmDiscarded (in CallStatus status);
252
 
        
253
 
                oneway void notifyObjectsReceived (in CallStatus status);
254
 
                oneway void notifyObjectsSent (in CallStatus status, in UserList users, in CalObj calobj);
255
 
                
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);
260
 
 
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);
264
 
 
265
 
                oneway void notifyChanges (in CallStatus status, in CalObjChangeSeq changes);
266
 
                oneway void notifyFreeBusy (in CallStatus status, in CalObjSeq freebusy);
267
 
 
268
 
                oneway void notifyAttachmentListRequested (in CallStatus status, in stringlist attachments);
269
 
                
270
 
                /* Called from a Calendar when the mode is changed */
271
 
                oneway void notifyCalSetMode (in SetModeStatus status, in CalMode mode);                
272
 
 
273
 
                /* Called from a Calendar when there is an error not notified otherwise */
274
 
                oneway void notifyErrorOccurred (in string message);
275
 
          
276
 
                oneway void notifyAuthRequired ();
277
 
          
278
 
        };
279
 
 
280
 
        /* A calendar factory, can load and create calendars */
281
 
        interface CalFactory : Bonobo::Unknown {
282
 
                exception NilListener {};
283
 
                exception InvalidURI {};
284
 
                exception UnsupportedMethod {};
285
 
 
286
 
                Cal getCal (in string source, in CalObjType type, in CalListener listener)
287
 
                        raises (NilListener, InvalidURI, UnsupportedMethod);
288
 
        };
289
 
};
290
 
};
291
 
};
292
 
 
293
 
#endif