diff options
Diffstat (limited to 'common/domain/typeimplementations.cpp')
-rw-r--r-- | common/domain/typeimplementations.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/common/domain/typeimplementations.cpp b/common/domain/typeimplementations.cpp index 615c8e8..b584138 100644 --- a/common/domain/typeimplementations.cpp +++ b/common/domain/typeimplementations.cpp | |||
@@ -67,6 +67,10 @@ typedef IndexConfig<Event, | |||
67 | ValueIndex<Event::Uid> | 67 | ValueIndex<Event::Uid> |
68 | > EventIndexConfig; | 68 | > EventIndexConfig; |
69 | 69 | ||
70 | typedef IndexConfig<Todo, | ||
71 | ValueIndex<Todo::Uid> | ||
72 | > TodoIndexConfig; | ||
73 | |||
70 | typedef IndexConfig<Calendar, | 74 | typedef IndexConfig<Calendar, |
71 | ValueIndex<Calendar::Name> | 75 | ValueIndex<Calendar::Name> |
72 | > CalendarIndexConfig; | 76 | > CalendarIndexConfig; |
@@ -218,6 +222,37 @@ void TypeImplementation<Event>::configure(IndexPropertyMapper &) | |||
218 | } | 222 | } |
219 | 223 | ||
220 | 224 | ||
225 | void TypeImplementation<Todo>::configure(TypeIndex &index) | ||
226 | { | ||
227 | TodoIndexConfig::configure(index); | ||
228 | } | ||
229 | |||
230 | QMap<QByteArray, int> TypeImplementation<Todo>::typeDatabases() | ||
231 | { | ||
232 | return merge(QMap<QByteArray, int>{{QByteArray{Todo::name} + ".main", 0}}, TodoIndexConfig::databases()); | ||
233 | } | ||
234 | |||
235 | void TypeImplementation<Todo>::configure(PropertyMapper &propertyMapper) | ||
236 | { | ||
237 | SINK_REGISTER_SERIALIZER(propertyMapper, Todo, Uid, uid); | ||
238 | SINK_REGISTER_SERIALIZER(propertyMapper, Todo, Summary, summary); | ||
239 | SINK_REGISTER_SERIALIZER(propertyMapper, Todo, Description, description); | ||
240 | SINK_REGISTER_SERIALIZER(propertyMapper, Todo, CompletedDate, completedDate); | ||
241 | SINK_REGISTER_SERIALIZER(propertyMapper, Todo, DueDate, dueDate); | ||
242 | SINK_REGISTER_SERIALIZER(propertyMapper, Todo, StartDate, startDate); | ||
243 | SINK_REGISTER_SERIALIZER(propertyMapper, Todo, Status, status); | ||
244 | SINK_REGISTER_SERIALIZER(propertyMapper, Todo, Priority, priority); | ||
245 | SINK_REGISTER_SERIALIZER(propertyMapper, Todo, Categories, categories); | ||
246 | SINK_REGISTER_SERIALIZER(propertyMapper, Todo, Ical, ical); | ||
247 | SINK_REGISTER_SERIALIZER(propertyMapper, Todo, Calendar, calendar); | ||
248 | } | ||
249 | |||
250 | void TypeImplementation<Todo>::configure(IndexPropertyMapper &) | ||
251 | { | ||
252 | |||
253 | } | ||
254 | |||
255 | |||
221 | void TypeImplementation<Calendar>::configure(TypeIndex &index) | 256 | void TypeImplementation<Calendar>::configure(TypeIndex &index) |
222 | { | 257 | { |
223 | CalendarIndexConfig::configure(index); | 258 | CalendarIndexConfig::configure(index); |