All Classes Namespaces Files Functions Variables Groups
Events.idl
Go to the documentation of this file.
1 /**
2  * @file Events.idl
3  * @brief Calendar Events, Exceptions, Recurrence
4  *
5  * @author Marek Sykora, Dusan Juhas
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <Calendars.idl>
11 
12 module kerio {
13 module jsonapi {
14 module webmail {
15 module events {
16 
17 struct Event {
18  kerio::web::KId id; ///< [READ-ONLY] global identification
19  kerio::web::KId folderId; ///< [REQUIRED FOR CREATE] [WRITE-ONCE] global identification of folder in which is the event defined
20  Watermark watermark;
21  kerio::jsonapi::webmail::calendars::EventAccess access; ///< [READ-ONLY] scope of access of user to this event
22  string summary;
23  string location;
24  string description;
25  kerio::jsonapi::webmail::calendars::EventLabel label;
26  kerio::web::StringList categories;
27  UtcDateTime start;
28  UtcDateTime end;
29  long travelMinutes; ///< // X-APPLE-TRAVEL-DURATION;VALUE=DURATION:PT15M
30  kerio::jsonapi::webmail::calendars::FreeBusyStatus freeBusy; ///< also known as TimeTransparency
31  boolean isPrivate; ///< also known as Class
32  boolean isAllDay;
33  PriorityType priority;
35  kerio::jsonapi::webmail::calendars::AttendeeList attendees;
37  boolean isCancelled; ///< [READ-ONLY] is cancelled by organiser
38 };
39 
40 typedef sequence<Event> EventList;
41 
42 enum EventUpdateType {
43  EUpdateRequest,
44  EUpdateReply,
45  EUpdateCancel
46 };
47 
48 enum EventActionType {
49  EActionCreate, ///< new invitation
50  EActionChangedTime, ///< time of meating was changed
51  EActionChangedSummary, ///< summary of meating was changed
52  EActionChangedLocation, ///< location of meating was changed
53  EActionChangedDescription ///< description of meating was changed
54 };
55 
56 typedef sequence<EventActionType> EventActionTypeList;
57 
58 struct EventUpdate {
59  kerio::web::KId id; ///< [READ-ONLY] global identification (e-mail where an update or an invitation is placed)
60  kerio::web::KId eventId; ///< [READ-ONLY] global identification of caused event
61  kerio::web::KId eventFolderId; ///< [READ-ONLY] global identification of caused event
62  kerio::web::KId occurrenceId; ///< [READ-ONLY] global identification of caused event (if whole recurrent event is updated , there is first occurrence)
63  boolean isException;
64  long seqNumber;
65  boolean isObsolete;
66  UtcDateTime deliveryTime;
67  EventUpdateType type;
68  string summary;
69  string location;
70  UtcDateTime start;
71  UtcDateTime end;
72  UtcDateTime totalEnd;
73  string description;
75  EventActionTypeList actions;
76 };
77 
78 typedef sequence<EventUpdate> EventUpdateList;
79 
80 /** Constants for composing kerio::web::SearchQuery */
81 module searchFields {
82  const string QUICKSEARCH = "QUICKSEARCH"; ///< [SEARCHABLE]
83  const string uid = "uid"; ///< [SEARCHABLE] string
84  const string summary = "summary"; ///< [SEARCHABLE][SORTABLE] string
85  const string location = "location"; ///< [SEARCHABLE][SORTABLE] string
86  const string start = "start"; ///< [SEARCHABLE][SORTABLE] UtcDateTime
87  const string end = "end"; ///< [SEARCHABLE][SORTABLE] UtcDateTime
88  const string reminder = "reminder"; ///< [SEARCHABLE] UtcDateTime
89  const string attendees = "attendees"; ///< [SEARCHABLE] string
90  const string organizer = "organizer"; ///< [SEARCHABLE] string
91  const string isAllDay = "isAllDay"; ///< [SEARCHABLE] boolean
92  const string hasReminder = "hasReminder"; ///< [SEARCHABLE] boolean
93  const string rule = "rule"; ///< [SEARCHABLE][SORTABLE] string
94 };
95 
96 interface Events {
97 
98  /**
99  * Get a list of events.
100  *
101  * @param list - all found events
102  * @param totalItems - number of events found if there is no limit
103  * @param folderIds - list of global identifiers of folders to be listed
104  * @param query - query attributes and limits
105  */
106  void get(out EventList list, out long totalItems, in kerio::web::KIdList ids, in kerio::web::SearchQuery query);
107 
108  /**
109  * Get an event.
110  *
111  * @param result - found event
112  * @param id - global identifier of requested event
113  */
114  void getById(out Event result, in kerio::web::KId id);
115 
116  /**
117  * Get updates or invitations from Calendar INBOX by global identifiers.
118  *
119  * @param errors - list of updates that failed to optain
120  * @param eventUpdates - list of updates or invitattions
121  * @param ids - list of global identifiers of EventUpdates
122  */
123  void getEventUpdates(out kerio::web::ErrorList errors, out EventUpdateList eventUpdates, in kerio::web::KIdList ids);
124 
125  /**
126  * Get all updates or invitations from Calendar INBOX.
127  *
128  * @param errors - list of mailboxes that failed to search
129  * @param eventUpdates - list of updates or invitattions
130  * @param mailboxIds - list of global identifiers of mailboxes
131  */
132  void getEventUpdateList(out EventUpdateList eventUpdates);
133 
134 
135  /**
136  * Get all updates or invitations from Calendar INBOX.
137  *
138  * @param errors - list of mailboxes that failed to search
139  * @param eventUpdates - list of updates or invitattions
140  * @param mailboxIds - list of global identifiers of mailboxes
141  */
142  void getSharedEventUpdateList(out kerio::web::ErrorList errors, out EventUpdateList eventUpdates, in kerio::web::KIdList mailboxIds);
143 
144  /**
145  * Remove a list of events.
146  *
147  * @param errors - list of events that failed to remove
148  * @param ids - list of global identifiers of events to be removed
149  */
150  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList ids);
151 
152  /**
153  * Remove a list of EventUpdates.
154  *
155  * @param errors - list of updates that failed to remove
156  * @param ids - list of global identifiers of EventUpdates to be removed
157  */
158  void removeEventUpdates(out kerio::web::ErrorList errors, in kerio::web::KIdList ids);
159 
160  /**
161  * Copy existing events to folder
162  *
163  * @param errors - error message list
164  * @param ids - list of global identifiers of events to be copied
165  * @param folder - target folder
166  */
167  void copy(out kerio::web::ErrorList errors, out CreateResultList result, in kerio::web::KIdList ids, in kerio::web::KId folder);
168 
169  /**
170  * Create events.
171  *
172  * @param errors - list of events that failed on creation
173  * @param result - particular results for all items
174  * @param events - list of events to be created
175  */
176  void create(out kerio::web::ErrorList errors, out CreateResultList result, in EventList events);
177 
178  /**
179  * Get an occurrence.
180  *
181  * @param result - result
182  * @param attachmentId - global identifier of attachment
183  */
184  void createFromAttachment(out CreateResult result, in kerio::web::KId attachmentId);
185 
186  /**
187  * Set events.
188  *
189  * @param errors - error message list
190  * @param events - modifications of events.
191  */
192  void set(out kerio::web::ErrorList errors, out SetResultList result, in EventList events);
193 
194  /**
195  * Move existing events to folder
196  *
197  * @param errors - error message list
198  * @param ids - list of global identifiers of events to be moved
199  * @param folder - target folder
200  */
201  void move(out kerio::web::ErrorList errors, out CreateResultList result, in kerio::web::KIdList ids, in kerio::web::KId folder);
202 };
203 
204 }; }; }; }; // end of namespace
205