sandbox-calendaring-types.patch

V. Richter, 06/12/2014 12:58 PM

Download (41.4 KB)

View differences:

proto/sandbox/rst/calendar/Attendee.proto
1
package rst.calendar;
2

  
3
option java_outer_classname = "AttendeeType";
4

  
5
/**
6
 * A description of an Attendee of a calendar component.
7
 *
8
 * For a html documentation of the RFC 2445 iCalendar specification visit
9
 * http://www.kanzaki.com/docs/ical/
10
 *
11
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
12
 */
13
message Attendee {
14

  
15
    /**
16
    * Used to specify a calendar user type.
17
    */
18
    enum Usertype {
19

  
20
        /**
21
        * An individual.
22
        */
23
        INDIVIDUAL = 1;
24

  
25
        /**
26
        * A group of individuals.
27
        */
28
        GROUP = 2;
29

  
30
        /**
31
        * An physical resource.
32
        */
33
        RESOURCE = 3;
34

  
35
        /**
36
        * A room.
37
        */
38
        ROOM = 4;
39
    }
40

  
41
    /**
42
    * Used to specify the participation role of an attendee.
43
    */
44
    enum Role {
45

  
46
        /**
47
        * Chair of the calendar entity.
48
        */
49
        CHAIR = 1;
50

  
51
        /**
52
        * Someone whose participation is required.
53
        */
54
        REQ_PARTICIPANT = 2;
55

  
56
        /**
57
        * Someone whose participation is optional.
58
        */
59
        OPT_PARTICIPANT = 3;
60

  
61
        /**
62
        * Someone whose participation is for information purposes only.
63
        */
64
        NON_PARTICIPANT = 4;
65
    }
66

  
67
    /**
68
    * Used to specify the participation status of an attendee.
69
    */
70
    enum Status {
71

  
72
        /**
73
        * The attendee has yet to react.
74
        */
75
        NEEDS_ACTION = 1;
76

  
77
        /**
78
        * The attendee has accepted the participation.
79
        */
80
        ACCEPTED = 2;
81

  
82
        /**
83
        * The attendee has declined the participation.
84
        */
85
        DECLINED = 3;
86
    }
87

  
88
    /**
89
    * Specifies the attendees calendar user address as URI.
90
    * This can for example be a MAILTO
91
    * corresponds to CAL-ADDRESS
92
    */
93
    required string address = 1;
94

  
95
    /**
96
    * Specifies the CalendarUserTYPE of the attendee.
97
    * corresponds to CUTYPE
98
    */
99
    optional Usertype cutype = 6 [default = INDIVIDUAL];
100

  
101
    /**
102
    * Specifies the groups the attendee belongs to via a comma separated list of double quoted URIs.
103
    * corresponds to MEMBER
104
    */
105
    optional string member = 7;
106

  
107
    /**
108
    * Specifies the participation role of the attendee.
109
    * corresponds to ROLE
110
    */
111
    optional Role role = 8 [default = REQ_PARTICIPANT];
112

  
113
    /**
114
    * Specifies the participation status of the attendee.
115
    * corresponds to PARTSTAT
116
    */
117
    optional Status part_status = 9 [default = NEEDS_ACTION];
118

  
119
    /**
120
    * Specifies whether the favor of a reply is requested.
121
    * corresponds to RSVP
122
    */
123
    optional bool reply_requested = 10 [default = false];
124

  
125
    /**
126
    * An URI specifying a user to whom this participation was delegated.
127
    * corresponds to DELEGATED-TO
128
    */
129
    optional string delegated_to = 11;
130

  
131
    /**
132
    * An URI specifying a user from which this participation was delegated.
133
    * corresponds to DELEGATED-FROM
134
    */
135
    optional string delegated_from = 12;
136

  
137
    /**
138
    * Specifies another user that is acting on behalf of the attendee
139
    * corresponds to SENT-BY
140
    */
141
    optional string sentby = 4;
142

  
143
    /**
144
    * Specifies the common or display name of the attendee.
145
    * corresponds to CN
146
    */
147
    optional string common_name = 2;
148

  
149
    /**
150
    * Specifies a reference to the directory associated with the attendee.
151
    * corresponds to DIR
152
    */
153
    optional string directory = 3;
154

  
155
    /**
156
    * Specifies the language. Connected to display_name.
157
    * corresponds to LANGUAGE
158
    */
159
    optional string language = 5;
160

  
161
}
proto/sandbox/rst/calendar/CalendarComponents.proto
1
package rst.calendar;
2

  
3
import "rst/calendar/TimeZone.proto";
4
import "rst/calendar/Event.proto";
5
import "rst/calendar/Todo.proto";
6

  
7
option java_outer_classname = "CalendarComponentsType";
8

  
9
/**
10
 * A container message for multiple calendar components.
11
 *
12
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
13
 */
14
message CalendarComponents {
15

  
16
    /**
17
     * A set of TimeZones
18
     */
19
    repeated calendar.TimeZone timezones = 1;
20

  
21
    /**
22
     * A set of Events
23
     */
24
    repeated calendar.Event events = 2;
25

  
26
    /**
27
     * A set of Todos
28
     */
29
    repeated calendar.Todo todos = 3;
30

  
31
    /**
32
     * A set of Journals (to be implemented)
33
     */
34
    //optional calendar.Journal journals = 4;
35

  
36
    /**
37
     * A set of Freebusy time informations/requests (to be implemented)
38
     */
39
    //optional calendar.Freebusy freebusies = 5;
40

  
41
    /**
42
     * A set of Alarms (to be implemented)
43
     */
44
    //optional calendar.Alarm alarms = 6;
45

  
46
}
proto/sandbox/rst/calendar/DateTime.proto
1
package rst.calendar;
2

  
3
option java_outer_classname = "DateTimeType";
4

  
5
/**
6
 * A description of date and time.
7
 *
8
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
9
 */
10
message DateTime {
11

  
12
    /**
13
     * The year
14
     */
15
    enum Type {
16

  
17
        /**
18
        * Specifies that this time is meant to be in absolute Coordinated Universal Time
19
        */
20
        UTC = 1;
21

  
22
        /**
23
        * Used to specify time which is not bound to any timezone.
24
        * example: dinner may be always at 6pm regardless of the current timezone.
25
        */
26
        FLOATING = 2;
27

  
28
        /**
29
        * Specifies that this time is bound to a specific time zone.
30
        * This requires the timezone_id field to be set.
31
        */
32
        LOCAL = 3;
33

  
34
    }
35

  
36
    /**
37
     * Specifies whether this time is floating, utc or local.
38
     */
39
    optional Type type = 1 [default = UTC];
40

  
41
    /**
42
     * Specifies the timezone to which this time is bound.
43
     * MUST be specified when type is LOCAL. Has no meaning in the other cases.
44
     */
45
    optional string timezone_id = 2 [default = "UTC"];
46

  
47
    /**
48
     * The time since epoch (01.01.1970 at 00:00 UTC) in milliseconds.
49
     */
50
    optional uint64 time = 3 [default = 0];
51

  
52
}
proto/sandbox/rst/calendar/Duration.proto
1
package rst.calendar;
2

  
3
option java_outer_classname = "DurationType";
4

  
5
/**
6
 * A description of duration following ISO 8601.
7
 *
8
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
9
 */
10
message Duration {
11

  
12
    /**
13
    * The amount of weeks in this duration.
14
    */
15
    optional uint32 weeks = 3 [default = 0];
16

  
17
    /**
18
    * The amount of days in this duration.
19
    */
20
    optional uint32 days = 4 [default = 0];
21

  
22
    /**
23
    * The amount of hours in this duration.
24
    */
25
    optional uint32 hours = 5 [default = 0];
26

  
27
    /**
28
    * The amount of minutes in this duration.
29
    */
30
    optional uint32 minutes = 6 [default = 0];
31

  
32
    /**
33
    * The amount of seconds in this duration.
34
    */
35
    optional uint32 seconds = 7 [default = 0];
36

  
37
}
proto/sandbox/rst/calendar/Event.proto
1
package rst.calendar;
2

  
3
import "rst/calendar/TimeZone.proto";
4
import "rst/calendar/DateTime.proto";
5
import "rst/calendar/RecurrenceId.proto";
6
import "rst/calendar/Duration.proto";
7
import "rst/calendar/Attendee.proto";
8
import "rst/calendar/Organizer.proto";
9
import "rst/calendar/Recurrence.proto";
10
import "rst/calendar/RequestStatus.proto";
11
import "rst/calendar/Relationship.proto";
12

  
13
option java_outer_classname = "EventType";
14

  
15
/**
16
 * A description of an calendar event following the icalendar definitions.
17
 *
18
 * For a html documentation of the RFC 2445 iCalendar specification visit
19
 * http://www.kanzaki.com/docs/ical/
20
 *
21
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
22
 */
23
message Event {
24

  
25
    /**
26
    * This is used to restrict viewability of of the event
27
    */
28
    enum Viewability {
29

  
30
        /**
31
        * The event entry can be seen by public.
32
        */
33
        PUBLIC = 1;
34

  
35
        /**
36
        * The event entry is private.
37
        */
38
        PRIVATE = 2;
39

  
40
        /**
41
        * The event entry can be is confidential.
42
        */
43
        CONFIDENTIAL = 3;
44
    }
45

  
46
    /**
47
    * The overall status of an event
48
    */
49
    enum Status {
50

  
51
        /**
52
        * Used for tentative events
53
        */
54
        TENTATIVE = 1;
55

  
56
        /**
57
        * Used for confirmed events
58
        */
59
        CONFIRMED = 2;
60

  
61
        /**
62
        * Used for cancelled events
63
        */
64
        CANCELLED = 3;
65
    }
66

  
67
    /**
68
    * The transparency of an event
69
    */
70
    enum Transparency {
71

  
72
        /**
73
        * Used for events which do not consume time in the calendar.
74
        */
75
        TRANSPARENT = 1;
76

  
77
        /**
78
        * Used for events which actually consume time in the calendar.
79
        */
80
        OPAQUE = 2;
81
    }
82

  
83
    /**
84
     * Specifies the privacy classification of this event.
85
     * corresponds to CLASS
86
     */
87
    optional Viewability viewability = 1 [default = PUBLIC];
88

  
89
    /**
90
     * Specifies when the entry was created.
91
     * more precisely: tells when this calendar data was first created in the calendar store
92
     * corresponds to CREATED and must be in UTC-time
93
     */
94
    //@constraint(value.type == DateTime.Type.UTC)
95
    optional calendar.DateTime created_utc = 2;
96

  
97
    /**
98
     * A more complete description of the event.
99
     * corresponds to DESCRIPTION
100
     */
101
    optional string description = 3;
102

  
103
    /**
104
     * Specifies when the event begins
105
     * corresponds to DTSTART
106
     */
107
    optional calendar.DateTime dtstart = 4;
108

  
109
    /**
110
     * Specifies the global position of the associated activity.
111
     * corresponds to the latitude part of GEO
112
     */
113
    optional double geo_latitude = 5 [default = 0.];
114

  
115
    /**
116
     * Specifies the global position of the associated activity.
117
     * corresponds to the longitude part of GEO
118
     */
119
    optional double geo_longitude = 31 [default = 0.];
120

  
121
    /**
122
     * Specifies when the entry was modified the last time.
123
     * more precisely: tells when this calendar data was last modified in the calendar store
124
     * corresponds to LAST-MODIFIED and must be in UTC-time
125
     */
126
    //@constraint(value.type == DateTime.Type.UTC)
127
    optional calendar.DateTime last_mod = 6;
128

  
129
    /**
130
     * Specifies where the event will take place.
131
     * corresponds to LOCATION
132
     */
133
    optional string location = 7;
134

  
135
    /**
136
     * Defines the organizer for the event.
137
     * corresponds to ORGANIZER
138
     */
139
    optional calendar.Organizer organizer = 8;
140

  
141
    /**
142
     * The priority of the event
143
     * corresponds to PRIORITY
144
     * 0 means not defined, 1 ist highest, 9 is lowest priority.
145
     */
146
    //@constraint(0 <= value <= 9)
147
    optional uint32 priority = 9  [default = 0];
148

  
149
    /**
150
     * Specifies when the entry was created.
151
     * more precise: when the iCalendar object representation of the
152
     * calendar service information was created or last modified
153
     * corresponds to DTSTAMP
154
     */
155
    optional calendar.DateTime dtstamp = 10;
156

  
157
    /**
158
     * This is incremented every time the event is changed significantly.
159
     * corresponds to SEQUENCE
160
     */
161
    optional uint32 seq = 11 [default = 0];
162

  
163

  
164
    /**
165
     * The overall status of the event.
166
     * corresponds to STATUS
167
     */
168
    optional Status status = 12 [default = CONFIRMED];
169

  
170
    /**
171
     * A short summary or the subject of the event.
172
     * corresponds to SUMMARY
173
     */
174
    optional string summary = 13;
175

  
176
    /**
177
     * Specifies whether this event is transparent to busy-time searches or not.
178
     * corresponds to TRANSP
179
     */
180
    optional Transparency transp = 14 [default = OPAQUE];
181

  
182
    /**
183
     * The globally unique id of the event
184
     * corresponds to UID
185
     */
186
    optional string uid = 15;
187

  
188
    /**
189
     * The Uniform Resource Locator associated with ehis event.
190
     * corresponds to URL
191
     */
192
    optional string url = 16;
193

  
194
    /**
195
     * Combined with uid and sequence, this can be used to reference a specific event in a recurrence set.
196
     * corresponds to RECURRENCE-ID
197
     */
198
    optional calendar.RecurrenceId recurid = 17;
199

  
200
    /**
201
    * Specifies when the event ends
202
    * either dtend or duration can be specified but not both at the same time.
203
    * corresponds to DTEND
204
    */
205
    optional calendar.DateTime dtend = 18;
206

  
207
    /**
208
    * Specifies the duration of the event.
209
    * either dtend or duration can be specified but not both at the same time.
210
    * corresponds to DURATION
211
    */
212
    optional calendar.Duration duration = 19;
213

  
214
    /**
215
     * This provides a means to attach a document via URI or binary attachment as string.
216
     * corresponds to ATTACH
217
     */
218
    repeated string attach = 20;
219

  
220
    /**
221
     * Specifies attendees to this event.
222
     * corresponds to ATTENDEE
223
     */
224
    repeated calendar.Attendee attendee = 21;
225

  
226
    /**
227
     * A list of categories, this event is associated with.
228
     * corresponds to CATEGORIES
229
     */
230
    repeated string categories  = 22;
231

  
232
    /**
233
     * Provides a comment to this event.
234
     * corresponds to COMMENT
235
     */
236
    repeated string comment  = 23;
237

  
238
    /**
239
     * Contact information or reference to contact information.
240
     * corresponds to CONTACT
241
     */
242
    repeated string contact  = 24;
243

  
244
    /**
245
    * Specifies a set of dates when the Event gets occures
246
    * corresponds to RDATE, RRULE, EXDATE & EXRULE
247
    */
248
    optional calendar.Recurrence recurrence = 25;
249

  
250
    /**
251
     * Holds the status code of a sceduling request.
252
     * corresponds to REQUEST-STATUS
253
     */
254
    repeated calendar.RequestStatus rstatus  = 26;
255

  
256
    /**
257
     * Represents relationships to other calendar components.
258
     * corresponds to RELATED-TO
259
     */
260
    repeated calendar.Relationship related  = 27;
261

  
262
    /**
263
     * Specifies the equipment or resources needed for this event.
264
     * corresponds to RESOURCES
265
     */
266
    repeated string resources  = 28;
267

  
268
}
proto/sandbox/rst/calendar/Observance.proto
1
package rst.calendar;
2

  
3
import "rst/calendar/DateTime.proto";
4
import "rst/calendar/Recurrence.proto";
5

  
6
option java_outer_classname = "ObservanceType";
7

  
8
/**
9
 * A description of a shift in a timezone following the icalendar definitions.
10
 * Observances are used to describe standard-daylight changes for a timezone.
11
 *
12
 * For a html documentation of the RFC 2445 iCalendar specification visit
13
 * http://www.kanzaki.com/docs/ical/
14
 * corresponds to tzprop
15
 *
16
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
17
 */
18
message Observance {
19

  
20
    /**
21
     * Tells whether the observance describes a daylight or standard time
22
     */
23
    enum ShiftType {
24

  
25
        /**
26
         * An observance setting the timezone to standard (winter) time
27
         */
28
        STANDARD                  = 1;
29

  
30
        /**
31
         * An observance setting the timezone to daylight (summer) time
32
         */
33
        DAYLIGHT                  = 2;
34
    }
35

  
36
    /**
37
    * The type of this observance.
38
    * STANDARD for winter
39
    * DAYLIGHT for summer
40
    */
41
    required ShiftType type = 3 [default = STANDARD];
42

  
43
    /**
44
    * Specifies when the Observance begins
45
    * corresponds to DTSTART and shoud be in UTC
46
    *
47
    * To get all occurences of the observance create a set of dates
48
    * from recurrence_dates and recurrence_rules between start_utc and end_utc
49
    * and substract the set of dates produced by exclude_dates and exclude rules.
50
    */
51
    required calendar.DateTime start_utc = 4;
52

  
53
    /**
54
    * Specifies the name of the observance
55
    * corresponds to TZNAME
56
    */
57
    optional string name = 6;
58

  
59
    /**
60
    * Specifies a set of dates when the observance gets active
61
    * corresponds to RDATE, RRULE. (EXDATE & EXRULE should be ignored.)
62
    */
63
    optional calendar.Recurrence recurrence = 7;
64

  
65
    /**
66
    * Specifies the time offset in use before the observance is active in milliseconds
67
    * corresponds to TZOFFSETFROM
68
    */
69
    required sint64 offset_from = 8 [default = 0];
70

  
71
    /**
72
    * Specifies the time offset in use while observance is active in milliseconds
73
    * corresponds to TZOFFSETTO
74
    */
75
    required sint64 offset_to = 9 [default = 0];
76

  
77
}
proto/sandbox/rst/calendar/Organizer.proto
1
package rst.calendar;
2

  
3
option java_outer_classname = "OrganizerType";
4

  
5
/**
6
 * A description of a organizer of a calendar component.
7
 *
8
 * For a html documentation of the RFC 2445 iCalendar specification visit
9
 * http://www.kanzaki.com/docs/ical/
10
 *
11
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
12
 */
13
message Organizer {
14

  
15
    /**
16
    * Specifies the organizers calendar user address as URI.
17
    * This can for example be a MAILTO
18
    * corresponds to CAL-ADDRESS
19
    */
20
    required string address = 1;
21

  
22
    /**
23
    * Specifies the common or display name of the organizer.
24
    * corresponds to CN
25
    */
26
    optional string common_name = 2;
27

  
28
    /**
29
    * Specifies a reference to the directory associated with the organizer.
30
    * corresponds to DIR
31
    */
32
    optional string directory = 3;
33

  
34
    /**
35
    * Specifies another user that is acting on behalf of the organizer
36
    * corresponds to SENT-BY
37
    */
38
    optional string sentby = 4;
39

  
40
    /**
41
    * Specifies the language. Connected to display_name.
42
    * corresponds to LANGUAGE
43
    */
44
    optional string language = 5;
45

  
46
}
proto/sandbox/rst/calendar/Recurrence.proto
1
package rst.calendar;
2

  
3
import "rst/calendar/DateTime.proto";
4
import "rst/calendar/RecurrenceRule.proto";
5

  
6
option java_outer_classname = "RecurrenceType";
7

  
8
/**
9
 * A description of a recurrence following the icalendar definitions.
10
 * can be used to generate a set of dates.
11
 *
12
 * The final set of dates is created by combining all dates from recurrence_dates
13
 * and recurrence_rules and removing all dates generated by exclude_dates and
14
 * exclude_rules.
15
 *
16
 * For a html documentation of the RFC 2445 iCalendar specification visit
17
 * http://www.kanzaki.com/docs/ical/
18
 *
19
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
20
 */
21
message Recurrence {
22

  
23
    /**
24
    * Specifies a set of specific dates to include
25
    * corresponds to RDATE
26
    */
27
    repeated calendar.DateTime recurrence_dates = 1;
28

  
29
    /**
30
    * Specifies a set of rules that generate dates to include
31
    * corresponds to RRULE
32
    */
33
    repeated calendar.RecurrenceRule recurrence_rules = 2;
34

  
35
    /**
36
    * Specifies a set of dates to exclude
37
    * corresponds to EXDATE
38
    */
39
    repeated calendar.DateTime exclude_dates = 3;
40

  
41
    /**
42
    * Specifies a set of rules that generate dates to exclude
43
    * corresponds to EXRULE
44
    */
45
    repeated calendar.RecurrenceRule exclude_rules = 4;
46

  
47
}
proto/sandbox/rst/calendar/RecurrenceId.proto
1
package rst.calendar;
2

  
3
import "rst/calendar/DateTime.proto";
4

  
5
option java_outer_classname = "RecurrenceIdType";
6

  
7
/**
8
 * The recurrence id can be used to reference a single component out of a
9
 * recurring component set.
10
 *
11
 * While the UID of a component references its whole recurrence set the
12
 * combination of the UID with a RecurrenceId can be used to point to a
13
 * specific instance whithin a set.
14
 *
15
 * For a html documentation of the RFC 2445 iCalendar specification visit
16
 * http://www.kanzaki.com/docs/ical/
17
 * this corresponds to RECURRENCE-ID
18
 *
19
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
20
 */
21
message RecurrenceId {
22

  
23
    /**
24
    * Specifies whether this RecurrenceId uses a date or a date-time
25
    */
26
    enum Type {
27

  
28
        /**
29
        * Specifies a date and time.
30
        */
31
        DATE_TIME = 1;
32

  
33
        /**
34
        * Specifies a date without time.
35
        */
36
        DATE = 2;
37
    }
38

  
39

  
40
    /**
41
    * Specifies whether this RecurrenceId references a single instance
42
    * a set with all prior/future instances
43
    * corresponds to RANGE
44
    */
45
    enum Range {
46

  
47
        /**
48
        * Specifies a single instance.
49
        */
50
        SINGLE = 1;
51

  
52
        /**
53
        * Specifies an instance and all instances after it.
54
        */
55
        THISANDFUTURE = 2;
56

  
57
        /**
58
        * Specifies a instance and all instances prior to it.
59
        */
60
        THISANDPRIOR = 3;
61
    }
62

  
63
    /**
64
    * Specifies whether the id should be interpreted as a date with time or to ignore time.
65
    * corresponds to ridparam.VALUE
66
    */
67
    optional Type type = 1 [default = DATE_TIME];
68

  
69
    /**
70
    * Specifies whether a single date or set is referenced.
71
    * corresponds to RANGE
72
    */
73
    optional Range range = 2 [default = SINGLE];
74

  
75
    /**
76
    * Specifies ReferenceId value as a calendar.DateTime this should match the date value
77
    * of an instance in the recurrence set.
78
    * corresponds to ridval
79
    */
80
    optional calendar.DateTime rid = 3;
81

  
82
}
proto/sandbox/rst/calendar/RecurrenceRule.proto
1
package rst.calendar;
2

  
3
import "rst/calendar/DateTime.proto";
4

  
5
option java_outer_classname = "RecurrenceRuleType";
6

  
7
/**
8
 * Specifies a rule for dates to reaccur.
9
 *
10
 * For a html documentation of the RFC 2445 iCalendar specification visit
11
 * http://www.kanzaki.com/docs/ical/
12
 *
13
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
14
 */
15
message RecurrenceRule {
16

  
17
    /**
18
     * Tells the frequence of the occurance
19
     */
20
    enum Frequence {
21

  
22
        /**
23
        * Every second
24
        */
25
        SECONDLY = 1;
26

  
27
        /**
28
        * Every minute
29
        */
30
        MINUTELY = 2;
31

  
32
        /**
33
        * Every hour
34
        */
35
        HOURLY = 3;
36

  
37
        /**
38
        * Every day
39
        */
40
        DAILY = 4;
41

  
42
        /**
43
        * Every week
44
        */
45
        WEEKLY = 5;
46

  
47
        /**
48
        * Every month
49
        */
50
        MONTHLY = 6;
51

  
52
        /**
53
        * Every year
54
        */
55
        YEARLY = 7;
56

  
57
    }
58

  
59
    /**
60
    * Defines a day in within the week
61
    */
62
    enum Weekday {
63

  
64
        /**
65
        * Sunday
66
        */
67
        SU = 1;
68

  
69
        /**
70
        * Monday
71
        */
72
        MO = 2;
73

  
74
        /**
75
        * Tuesday
76
        */
77
        TU = 3;
78

  
79
        /**
80
        * Wednesday
81
        */
82
        WE = 4;
83

  
84
        /**
85
        * Thursday
86
        */
87
        TH = 5;
88

  
89
        /**
90
        * Friday
91
        */
92
        FR = 6;
93

  
94
        /**
95
        * Saturday
96
        */
97
        SA = 7;
98
    }
99

  
100
    /**
101
    * The stop condition type of the reccurance set
102
    */
103
    enum Type {
104

  
105
        /**
106
        * Creates an exact number of occurances
107
        */
108
        COUNT = 1;
109

  
110
        /**
111
        * Stop condition is an end date
112
        */
113
        UNTIL = 2;
114
    }
115

  
116
    /**
117
    * The stop condition type of this RecurrenceRule
118
    */
119
    optional Type type = 1 [default = COUNT];
120

  
121
    /**
122
    * Specifies the end date of the recurrence.
123
    * corresponds to UNTIL and should only be set when type is UNTIL
124
    */
125
    optional DateTime until_date_utc = 2;
126

  
127
    /**
128
    * Specifies the recurrence count.
129
    * corresponds to COUNT and should only be set when type is COUNT
130
    */
131
    optional uint32 count = 3 [default = 0];
132

  
133
    /**
134
    * Specifies the frequence of the reccurance.
135
    * corresponds to FREQ
136
    */
137
    required Frequence frequence = 4 [default = YEARLY];
138

  
139
    /**
140
    * Tells how often the rule repeats.
141
    * example: interval = n and frequence = weekly means every n'th week
142
    * corresponds to INTERVAL
143
    */
144
    optional uint32 interval = 5 [default = 1];
145

  
146
    /**
147
    * A list of occurance seconds.
148
    * corresponds to BYSECOND
149
    */
150
    //@constraint(0 <= value < 60)
151
    repeated uint32 by_second = 6;
152

  
153
    /**
154
    * A list of occurance minutes.
155
    * corresponds to BYMINUTE
156
    */
157
    //@constraint(0 <= value < 60)
158
    repeated uint32 by_minute = 7;
159

  
160
    /**
161
    * A list of occurance hours.
162
    * corresponds to BYHOUR
163
    */
164
    //@constraint(0 <= value < 24)
165
    repeated uint32 by_hour = 8;
166

  
167
    /**
168
    * A list of occurance weekdays.
169
    * corresponds to BYDAY
170
    */
171
    repeated Weekday by_day = 9;
172

  
173
    /**
174
    * A list of occurance weekdays.
175
    * corresponds to BYDAY with preceding integer
176
    * example: frequence = MONTHLY, by_day = MO and by_day_n = -1 means the last monday of the month
177
    */
178
    repeated sint32 by_day_n = 10;
179

  
180
    /**
181
    * A list of occurance days of the month.
182
    * corresponds to BYMONTHDAY
183
    * negative integers count from the end of the month
184
    */
185
    //@constraint(-31 <= value <= 31)
186
    repeated sint32 by_month_day = 11;
187

  
188
    /**
189
    * A list of occurance days of the year.
190
    * corresponds to BYYEARDAY
191
    * negative integers count from the end of the year
192
    */
193
    //@constraint(-366 <= value <= 366)
194
    repeated sint32 by_year_day = 12;
195

  
196
    /**
197
    * A list of occurance weeks of the year.
198
    * corresponds to BYWEEKNO
199
    * negative integers count backwards
200
    */
201
    //@constraint(-53 <= value <= 53)
202
    repeated sint32 by_week_number = 13;
203

  
204
    /**
205
    * A list of occurance months.
206
    * corresponds to BYMONTH
207
    */
208
    //@constraint(1 <= value <= 31)
209
    repeated uint32 by_month = 14;
210

  
211
    /**
212
    * Further filters the set by specifying which occurance to use.
213
    * corresponds to BYSETPOS
214
    * example: frequence = MONTHLY, by_day=MO,TU,WE,TH,FR and by_set_pos = -1 specifies the last workday of the month
215
    */
216
    repeated sint32 by_set_pos = 15;
217

  
218
    /**
219
    * Specifies which day is the first day of the week
220
    * corresponds to WKST
221
    */
222
    optional Weekday week_start = 16 [default = MO];
223

  
224
}
proto/sandbox/rst/calendar/Relationship.proto
1
package rst.calendar;
2

  
3
option java_outer_classname = "RelationshipType";
4

  
5
/**
6
 * This is used to specify relationships between calendar components.
7
 * corresponds to RELATED-TO
8
 *
9
 * For a html documentation of the RFC 2445 iCalendar specification visit
10
 * http://www.kanzaki.com/docs/ical/
11
 *
12
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
13
 */
14
message Relationship {
15

  
16
    /**
17
    * Specifies the type of the relationship.
18
    */
19
    enum Type {
20

  
21
        /**
22
        * The component is a subordinate of the referenced component.
23
        */
24
        PARENT = 1;
25

  
26
        /**
27
        * The component is a superior of the referenced component.
28
        */
29
        CHILD = 2;
30

  
31
        /**
32
        * The component is a peer of the referenced component.
33
        */
34
        SIBLING = 3;
35
    }
36

  
37
    /**
38
    * The type of the referenced component.
39
    * corresponds to RELTYPE
40
    */
41
    optional Type reltype = 1 [default = PARENT];
42

  
43
    /**
44
    * The unique identifier of the related component. This should
45
    * typically be its uid.
46
    * corresponds to the text part of RELATED-TO
47
    */
48
    required string uid = 2;
49

  
50
}
proto/sandbox/rst/calendar/RequestStatus.proto
1
package rst.calendar;
2

  
3
option java_outer_classname = "RequestStatusType";
4

  
5
/**
6
 * A description of a status code used in scheduling requests.
7
 *
8
 * For a html documentation of the RFC 2445 iCalendar specification visit
9
 * http://www.kanzaki.com/docs/ical/
10
 *
11
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
12
 */
13
message RequestStatus {
14

  
15
    /**
16
    * Specifies the language of the status code.
17
    * corresponds to LANGUAGE
18
    */
19
    optional string language = 1;
20

  
21
    /**
22
    * A hierarchical numeric status code as string.
23
    * 3-tuple of integers separated by a period character.
24
    * example: "3.1.2"
25
    *
26
    * The level of the integer corresponds to the level of status code
27
    * granularity (least granularity to highest from left to right).
28
    *
29
    * The return status interpretation of the leftmost integer is following:
30
    * 1.xx preliminary success, completition is pending
31
    * 2.xx completed successfully
32
    * 3.xx not successful, error in the syntax or semantic of the request
33
    * 4.xx scheduling error, an error occured whithin the calendaring service not directly related to the request-
34
    *
35
    * corresponds to REQUEST-STATUS.statcode
36
    */
37
    required string status_code = 2;
38

  
39
    /**
40
    * A status description text.
41
    * corresponds to REQUEST-STATUS.stardesc
42
    */
43
    required string status_description = 3;
44

  
45
    /**
46
    * Exception data as text. Can be the offending property name and
47
    * value or a complete property line.
48
    * corresponds to REQUEST-STATUS.extdata
49
    */
50
    required string exception_text_data = 4;
51

  
52
}
proto/sandbox/rst/calendar/TimeZone.proto
1
package rst.calendar;
2

  
3
import "rst/calendar/DateTime.proto";
4
import "rst/calendar/Observance.proto";
5

  
6
option java_outer_classname = "TimeZoneType";
7

  
8
/**
9
 * A description of a timezone following the icalendar definitions.
10
 *
11
 * For a html documentation of the RFC 2445 iCalendar specification visit
12
 * http://www.kanzaki.com/docs/ical/
13
 *
14
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
15
 */
16
//@constraint(len(.standards) + len(.daylights) > 0)
17
message TimeZone {
18

  
19
    /**
20
     * The id of the timezone. This should be unique.
21
     * corresponds to TZID
22
     */
23
    required string tz_id = 1;
24

  
25
    /**
26
     * Specifies when the timezone was modified the last time.
27
     * more precisely: tells when this timezone data was last modified in the calendar store
28
     * corresponds to LAST-MODIFIED and must be in UTC-time
29
     */
30
    //@constraint(value.type == calendar.DateTime.Type.UTC)
31
    optional calendar.DateTime last_mod = 2;
32

  
33
    /**
34
     * Specifies a network location where an up to date version of this timezone can be retrieved.
35
     * corresponds to TZURL
36
     */
37
    optional string tz_url = 3;
38

  
39
    /**
40
     * The location to which this timezone applies
41
     * corresponds to X-LIC-LOCATION (non standard)
42
     */
43
    optional string x_location = 4;
44

  
45
    /**
46
     * a collection of standard-observances for this timezone
47
     * corresponds to STANDARD
48
     */
49
    repeated calendar.Observance standards = 5;
50

  
51
    /**
52
     * a collection of daylight-observances for this timezone
53
     * corresponds to DAYLIGHT
54
     */
55
    repeated calendar.Observance daylights = 6;
56

  
57
}
proto/sandbox/rst/calendar/Todo.proto
1
package rst.calendar;
2

  
3
import "rst/calendar/TimeZone.proto";
4
import "rst/calendar/DateTime.proto";
5
import "rst/calendar/RecurrenceId.proto";
6
import "rst/calendar/Duration.proto";
7
import "rst/calendar/Attendee.proto";
8
import "rst/calendar/Organizer.proto";
9
import "rst/calendar/Recurrence.proto";
10
import "rst/calendar/RequestStatus.proto";
11
import "rst/calendar/Relationship.proto";
12

  
13
option java_outer_classname = "TodoType";
14

  
15
/**
16
 * A description of an calendar todo following the icalendar definitions.
17
 *
18
 * For a html documentation of the RFC 2445 iCalendar specification visit
19
 * http://www.kanzaki.com/docs/ical/
20
 *
21
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
22
 */
23
message Todo {
24

  
25
    /**
26
    * This is used to restrict viewability of of the  todo
27
    */
28
    enum Viewability {
29

  
30
        /**
31
        * The todo entry can be seen by public.
32
        */
33
        PUBLIC = 1;
34

  
35
        /**
36
        * The todo entry is private.
37
        */
38
        PRIVATE = 2;
39

  
40
        /**
41
        * The todo entry can be is confidential.
42
        */
43
        CONFIDENTIAL = 3;
44
    }
45

  
46
    /**
47
    * The overall status of a todo
48
    */
49
    enum Status {
50

  
51
        /**
52
        * Used for todos that need an action.
53
        */
54
        NEEDS_ACTION = 1;
55

  
56
        /**
57
        * Used for completed todos.
58
        */
59
        COMPLETED = 2;
60

  
61
        /**
62
        * Used for todos that are currently in process of.
63
        */
64
        IN_PROCESS = 3;
65

  
66
        /**
67
        * Used for cancelled todos.
68
        */
69
        CANCELLED = 4;
70
    }
71

  
72
    /**
73
     * Specifies the privacy classification of this todo.
74
     * corresponds to CLASS
75
     */
76
    optional Viewability viewability = 1 [default = PUBLIC];
77

  
78
    /**
79
     * Specifies the date and time this todo was completed.
80
     * corresponds to COMPLETED
81
     */
82
    //@constraint(value.type == DateTime.Type.UTC)
83
    optional calendar.DateTime completed_utc = 29;
84

  
85
    /**
86
     * Specifies when the entry was created.
87
     * more precisely: tells when this calendar data was first created in the calendar store
88
     * corresponds to CREATED and must be in UTC-time
89
     */
90
    //@constraint(value.type == DateTime.Type.UTC)
91
    optional calendar.DateTime created_utc = 2;
92

  
93
    /**
94
     * A more complete description of the todo.
95
     * corresponds to DESCRIPTION
96
     */
97
    optional string description = 3;
98

  
99
    /**
100
     * Specifies when the entry was created.
101
     * more precise: when the iCalendar object representation of the
102
     * calendar service information was created or last modified
103
     * corresponds to DTSTAMP
104
     */
105
    optional calendar.DateTime dtstamp = 10;
106

  
107
    /**
108
     * Specifies when the todo begins
109
     * corresponds to DTSTART
110
     */
111
    optional calendar.DateTime dtstart = 4;
112

  
113
    /**
114
     * Specifies the global position of the associated activity.
115
     * corresponds to the latitude part of GEO
116
     */
117
    optional double geo_latitude = 5 [default = 0.];
118

  
119
    /**
120
     * Specifies the global position of the associated activity.
121
     * corresponds to the longitude part of GEO
122
     */
123
    optional double geo_longitude = 31 [default = 0.];
124

  
125
    /**
126
     * Specifies when the entry was modified the last time.
127
     * more precisely: tells when this calendar data was last modified in the calendar store
128
     * corresponds to LAST-MODIFIED and must be in UTC-time
129
     */
130
    //@constraint(value.type == DateTime.Type.UTC)
131
    optional calendar.DateTime last_mod = 6;
132

  
133
    /**
134
     * Specifies where the todo will take place.
135
     * corresponds to LOCATION
136
     */
137
    optional string location = 7;
138

  
139
    /**
140
     * Defines the organizer for the todo.
141
     * corresponds to ORGANIZER
142
     */
143
    optional calendar.Organizer organizer = 8;
144

  
145
    /**
146
     * Specifies the completition status of the todo as positive integer (0-100)
147
     * corresponds to PERCENT-COMPLETE
148
     */
149
    //@constraint(0 <= value <= 100)
150
    optional uint32 percent = 30 [default = 0];
151

  
152
    /**
153
     * The priority of the todo
154
     * corresponds to PRIORITY
155
     * 0 means not defined, 1 ist highest, 9 is lowest priority.
156
     */
157
    //@constraint(0 <= value <= 9)
158
    optional uint32 priority = 9 [default = 0];
159

  
160
    /**
161
     * Combined with uid and sequence, this can be used to reference a specific todo in a recurrence set.
162
     * corresponds to RECURRENCE-ID
163
     */
164
    optional calendar.RecurrenceId recurid = 17;
165

  
166
    /**
167
     * This is incremented every time the todo is changed significantly.
168
     * corresponds to SEQUENCE
169
     */
170
    optional uint32 seq = 11 [default = 0];
171

  
172

  
... This diff was truncated because it exceeds the maximum size that can be displayed.