diff options
author | Rémi Nicole <nicole@kolabsystems.com> | 2018-04-13 11:51:18 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-04-13 11:51:24 +0200 |
commit | cd81aed814286887911d99648d62bbb3c63e404c (patch) | |
tree | c98b6e65d56e5fff82ed8f8a431de47e149c38a1 /common/eventpreprocessor.h | |
parent | edbb4c9c82e34e90ad15ad151901e65c2c2cfb66 (diff) | |
download | sink-cd81aed814286887911d99648d62bbb3c63e404c.tar.gz sink-cd81aed814286887911d99648d62bbb3c63e404c.zip |
Change most of Event's properties to extracted properties
Summary: Fix T8485
Reviewers: cmollekopf
Reviewed By: cmollekopf
Tags: #sink
Maniphest Tasks: T8485
Differential Revision: https://phabricator.kde.org/D12106
Diffstat (limited to 'common/eventpreprocessor.h')
-rw-r--r-- | common/eventpreprocessor.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/common/eventpreprocessor.h b/common/eventpreprocessor.h new file mode 100644 index 0000000..3fde8b2 --- /dev/null +++ b/common/eventpreprocessor.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2018 Christian Mollekopf <chrigi_1@fastmail.fm> | ||
3 | * Copyright (C) 2018 Rémi Nicole <minijackson@riseup.net> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the | ||
17 | * Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include "pipeline.h" | ||
22 | #include "sink_export.h" | ||
23 | |||
24 | class SINK_EXPORT EventPropertyExtractor : public Sink::EntityPreprocessor<Sink::ApplicationDomain::Event> | ||
25 | { | ||
26 | using Event = Sink::ApplicationDomain::Event; | ||
27 | |||
28 | public: | ||
29 | virtual ~EventPropertyExtractor() {} | ||
30 | virtual void newEntity(Event &event) Q_DECL_OVERRIDE; | ||
31 | virtual void modifiedEntity(const Event &oldEvent, Event &newEvent) Q_DECL_OVERRIDE; | ||
32 | |||
33 | private: | ||
34 | static void updatedIndexedProperties(Event &event, const QByteArray &rawIcal); | ||
35 | }; | ||