All Classes Namespaces Files Functions Variables Groups
Occurrences.idl
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 occurrences {
16 
17 enum ModificationType {
18  modifyAll,
19  modifyThis,
20  modifyAllFollowing,
21  modifyMasterEvent
22 };
23 
24 struct Occurrence {
25  kerio::web::KId id; ///< [READ-ONLY] global identification
26  kerio::web::KId eventId; ///< [READ-ONLY] global identification of appropriate event
27  kerio::web::KId folderId; ///< [REQUIRED FOR CREATE] [WRITE-ONCE] global identification of folder in which is the event defined
28  Watermark watermark;
29  kerio::jsonapi::webmail::calendars::EventAccess access; ///< [READ-ONLY] scope of access of user to this occurrence
30  string summary;
31  string location;
32  string description;
33  kerio::jsonapi::webmail::calendars::EventLabel label;
34  kerio::web::StringList categories;
35  UtcDateTime start;
36  UtcDateTime end;
37  long travelMinutes; ///< // X-APPLE-TRAVEL-DURATION;VALUE=DURATION:PT15M
38  kerio::jsonapi::webmail::calendars::FreeBusyStatus freeBusy; ///< also known as TimeTransparency
39  boolean isPrivate; ///< also known as Class
40  boolean isAllDay;
41  PriorityType priority;
42  kerio::jsonapi::webmail::calendars::RecurrenceRule rule; ///< not filled in listing method
43  kerio::jsonapi::webmail::calendars::AttendeeList attendees;
44  kerio::jsonapi::webmail::calendars::Reminder reminder; ///< not filled in listing method
45  boolean isException; ///< [READ-ONLY] it does not make sense to write it
46  boolean hasReminder; ///< [READ-ONLY]
47  boolean isRecurrent; ///< [READ-ONLY]
48  boolean isCancelled; ///< [READ-ONLY] is cancelled by organiser
49  long seqNumber; ///< [READ-ONLY]
50 
51  ModificationType modification; ///< [WRITE-ONLY]
52 };
53 
54 typedef sequence<Occurrence> OccurrenceList;
55 
56 /** Constants for composing kerio::web::SearchQuery */
57 module searchFields {
58  const string QUICKSEARCH = "QUICKSEARCH"; ///< [SEARCHABLE]
59  const string uid = "uid"; ///< [SEARCHABLE] string
60  const string summary = "summary"; ///< [SEARCHABLE][SORTABLE] string
61  const string location = "location"; ///< [SEARCHABLE][SORTABLE] string
62  const string start = "start"; ///< [SEARCHABLE][SORTABLE] UtcDateTime (Mandatory for search occurence in some timerange)
63  const string end = "end"; ///< [SEARCHABLE][SORTABLE] UtcDateTime (Mandatory for search occurence in some timerange)
64  const string reminder = "reminder"; ///< [SEARCHABLE] UtcDateTime
65  const string attendees = "attendees"; ///< [SEARCHABLE] string
66  const string organizer = "organizer"; ///< [SEARCHABLE] string
67  const string isAllDay = "isAllDay"; ///< [SEARCHABLE] [SORTABLE] boolean
68  const string hasReminder = "hasReminder"; ///< [SEARCHABLE] boolean
69  const string rule = "rule"; ///< [SEARCHABLE] string
70  const string searchTime = "searchTime"; ///< [SEARCHABLE] [SORTABLE](Get the nearest occurrence since the time stamp. The future occurrence is preferred but if there is none the last occurrence is returned.)
71 };
72 
73 interface Occurrences {
74 
75  /**
76  * Get a list of occurrences.
77  * Items rule and reminder in the occurrence aren't filled. If necessary use getOccurrence method.
78  *
79  * @param list - all found events
80  * @param totalItems - number of events found if there is no limit
81  * @param folderIds - list of global identifiers of folders to be listed
82  * @param query - query attributes and limits
83  */
84  void get(out OccurrenceList list, out long totalItems, in kerio::web::KIdList folderIds, in kerio::web::SearchQuery query);
85 
86  /**
87  * Get an occurrence.
88  *
89  * @param result - found occurrence
90  * @param eventId - global identifier of requested occurrence's event
91  * @param occurrenceId - local identifier of requested occurrence
92  */
93  void getById(out kerio::web::ErrorList errors, out OccurrenceList result, in kerio::web::KIdList ids);
94 
95  /**
96  * Get an occurrence.
97  *
98  * @param result - found occurrence
99  * @param attachmentId - global identifier of attachment
100  */
101  void getFromAttachment(out Occurrence result, in kerio::web::KId attachmentId);
102 
103  /**
104  * Remove a list of occurrences.
105  *
106  * @param errors - list of occurrences that failed to remove
107  * @param occurrences - occurrences to be removed. Only fields 'id' and 'modification' are required.
108  */
109  void remove(out kerio::web::ErrorList errors, in OccurrenceList occurrences);
110 
111  /**
112  * Set occurrences.
113  *
114  * @param errors - error message list
115  * @param occurrences - modifications of occurrences.
116  */
117  void set(out kerio::web::ErrorList errors, out SetResultList result, in OccurrenceList occurrences);
118 
119  /**
120  * Set part status to occurrence or event and send response to organizer.
121  *
122  * @param id - identifiers of events or occurrence
123  * @param response - response and status
124  */
125  void setPartStatus(in kerio::web::KId id, in kerio::jsonapi::webmail::calendars::PartStatusResponse response);
126 };
127 
128 }; }; }; }; // end of namespace
129