From 380d093b46f7ef010357c7baa944788d3e1c0e54 Mon Sep 17 00:00:00 2001 From: Jan Moringen Date: Fri, 20 Nov 2015 12:39:09 +0100 Subject: [PATCH] changes --- proto/sandbox/rst/calendar/CalendarList.proto | 2 +- proto/sandbox/rst/calendar/CalendarQuery.proto | 41 +++++++++++++ .../sandbox/rst/calendar/CalendarQueryResult.proto | 69 ++++++++++++++++++++++ proto/sandbox/rst/calendar/CalendarRequest.proto | 41 ------------- proto/sandbox/rst/calendar/CalendarResult.proto | 68 --------------------- proto/sandbox/rst/calendar/CalendarUpdate.proto | 15 +++-- 6 files changed, 121 insertions(+), 115 deletions(-) create mode 100644 proto/sandbox/rst/calendar/CalendarQuery.proto create mode 100644 proto/sandbox/rst/calendar/CalendarQueryResult.proto delete mode 100644 proto/sandbox/rst/calendar/CalendarRequest.proto delete mode 100644 proto/sandbox/rst/calendar/CalendarResult.proto diff --git a/proto/sandbox/rst/calendar/CalendarList.proto b/proto/sandbox/rst/calendar/CalendarList.proto index a5668d0..e086d06 100644 --- a/proto/sandbox/rst/calendar/CalendarList.proto +++ b/proto/sandbox/rst/calendar/CalendarList.proto @@ -10,7 +10,7 @@ option java_outer_classname = "CalendarListType"; message CalendarList { /** - * A List of calender info objects. + * A List of calender id. */ repeated string calendar_id = 1; diff --git a/proto/sandbox/rst/calendar/CalendarQuery.proto b/proto/sandbox/rst/calendar/CalendarQuery.proto new file mode 100644 index 0000000..507482c --- /dev/null +++ b/proto/sandbox/rst/calendar/CalendarQuery.proto @@ -0,0 +1,41 @@ +package rst.calendar; + +option java_outer_classname = "CalendarQueryType"; + +import "rst/calendar/DateTime.proto"; + +/** + * A request for calendar data. + * + * @author Viktor Richter + */ +message CalendarQuery { + + /** + * Ignore calendar components before start time. + */ + optional DateTime start_time = 1; + + /** + * Ignore calendar components afrer end time. + */ + optional DateTime end_time = 2; + + /** + * Search for @ref Todo entries. + */ + optional bool search_todos = 3 [default = true]; + + /** + * Search for @ref Event entries. + */ + optional bool search_events = 4 [default = true]; + + /** + * If this is true, each entry which is between @ref .start_time + * and @ref .end_time will be augmented with a list of time + * periods in which it occurs. + */ + required bool calculate_time_periods = 5 [default = false]; + +} diff --git a/proto/sandbox/rst/calendar/CalendarQueryResult.proto b/proto/sandbox/rst/calendar/CalendarQueryResult.proto new file mode 100644 index 0000000..a53af4a --- /dev/null +++ b/proto/sandbox/rst/calendar/CalendarQueryResult.proto @@ -0,0 +1,69 @@ +package rst.calendar; + +option java_outer_classname = "CalendarQueryResultType"; + +import "rst/calendar/DateTime.proto"; +import "rst/calendar/Event.proto"; +import "rst/calendar/Todo.proto"; +import "rst/calendar/TimeZone.proto"; + +/** + * The answer to a @ref CalendarQuery. + * + * @author Viktor Richter + */ +message CalendarQueryResult { + + /** + * Describes one specific time period. + */ + message TimePeriod { + + /** + * When the time period starts. + */ + required DateTime start = 1; + + /** + * When the time period ends. + */ + required DateTime end = 2; + } + + /** + * Describes an event and optionally all of its occurrences. + */ + message EventWithTimes { + + /** + * The event description. + */ + required Event event = 1; + + /** + * Time periods where this event applies to. + */ + repeated TimePeriod time = 2; + + } + + /** + * The list of timezones needed by the @ref Event and @ref Todo + * messages contained in this message. + */ + repeated TimeZone timezone = 1; + + /** + * A list of @ref Event messages that match the corresponding @ref + * CalendarQuery and their occurrence times (when requested). + */ + repeated EventWithTimes event = 2; + + /** + * A list of @ref Todo messages that match the corresponding @ref + * CalendarQuery. + */ + repeated Todo todo = 3; + + +} diff --git a/proto/sandbox/rst/calendar/CalendarRequest.proto b/proto/sandbox/rst/calendar/CalendarRequest.proto deleted file mode 100644 index 040699d..0000000 --- a/proto/sandbox/rst/calendar/CalendarRequest.proto +++ /dev/null @@ -1,41 +0,0 @@ -package rst.calendar; - -option java_outer_classname = "CalendarRequestType"; - -import "rst/calendar/DateTime.proto"; - -/** - * A request for calendar data. - * - * @author Viktor Richter - */ -message CalendarRequest { - - /** - * Ignore calendar components before start time. - */ - optional DateTime start_time = 1; - - /** - * Ignore calendar components afrer end time. - */ - optional DateTime end_time = 2; - - /** - * Search for todo entries. - */ - optional bool search_todos = 3 [default = true]; - - /** - * Search for event entries. - */ - optional bool search_events = 4 [default = true]; - - /** - * If this is true each entry which is between start and - * end date will be additionally augmented with a list of - * time periods in which it occurs. - */ - required bool calculate_time_periods = 5 [default = false]; - -} diff --git a/proto/sandbox/rst/calendar/CalendarResult.proto b/proto/sandbox/rst/calendar/CalendarResult.proto deleted file mode 100644 index 2df3344..0000000 --- a/proto/sandbox/rst/calendar/CalendarResult.proto +++ /dev/null @@ -1,68 +0,0 @@ -package rst.calendar; - -option java_outer_classname = "CalendarResultType"; - -import "rst/calendar/DateTime.proto"; -import "rst/calendar/Event.proto"; -import "rst/calendar/Todo.proto"; -import "rst/calendar/TimeZone.proto"; - -/** - * The answer to a CalendarRequest. - * - * @author Viktor Richter - */ -message CalendarResult { - - /** - * Describes one specific time period. - */ - message TimePeriod { - - /** - * When the time period starts. - */ - required DateTime start = 1; - - /** - * When the time period ends. - */ - required DateTime end = 2; - } - - /** - * Describes an event and optionally all of its occurances. - */ - message EventWithTimes { - - /** - * The event description. - */ - required Event event = 1; - - /** - * Time periods where this event applies to. - */ - repeated TimePeriod time = 2; - - } - - /** - * THe obligatory list of timezones needed by the events and todos - * contained in this message. - */ - repeated TimeZone timezone = 1; - - /** - * A list of events that match the correesponding CalendarRequest - * and their occurrence times (when requested). - */ - repeated EventWithTimes event = 2; - - /** - * A list of todos that match the correesponding CalendarRequest. - */ - repeated Todo todo = 3; - - -} diff --git a/proto/sandbox/rst/calendar/CalendarUpdate.proto b/proto/sandbox/rst/calendar/CalendarUpdate.proto index cfa9878..09106b7 100644 --- a/proto/sandbox/rst/calendar/CalendarUpdate.proto +++ b/proto/sandbox/rst/calendar/CalendarUpdate.proto @@ -7,29 +7,34 @@ import "rst/calendar/Todo.proto"; import "rst/calendar/TimeZone.proto"; /** - * Describes the changes between two calendar versions. + * Describes changes between two calendar versions. * * @author Viktor Richter */ message CalendarUpdate { /** - * A set of TimeZones needed by the events and todos in this message. + * A set of @ref TimeZone messages needed by the @ref Event + * messages and @ref Todo messages in this message. */ repeated TimeZone timezones = 3; /** - * A set of Events which changed between the two versons. + * A set of @ref Event messages which changed between the two + * versions. */ repeated Event changed_events = 4; /** - * A set of Todos which changed between the two versons. + * A set of @ref Todo messages which changed between the two + * versions. */ repeated Todo changed_todos = 5; /** - * A set of ids of entries (todos and events) which were removed between the two versons. + * A set of ids of entries (@ref Todo and @ref Event messages) + * which were removed between the two versions. */ repeated string removed_entry_ids = 6; + } -- 2.6.0