diff options
Diffstat (limited to 'common/mailpreprocessor.h')
-rw-r--r-- | common/mailpreprocessor.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/common/mailpreprocessor.h b/common/mailpreprocessor.h new file mode 100644 index 0000000..715e336 --- /dev/null +++ b/common/mailpreprocessor.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2015 Christian Mollekopf <chrigi_1@fastmail.fm> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | */ | ||
19 | #include "sink_export.h" | ||
20 | |||
21 | #include "pipeline.h" | ||
22 | |||
23 | class SINK_EXPORT MailPropertyExtractor : public Sink::EntityPreprocessor<Sink::ApplicationDomain::Mail> | ||
24 | { | ||
25 | public: | ||
26 | virtual ~MailPropertyExtractor(){} | ||
27 | virtual void newEntity(Sink::ApplicationDomain::Mail &mail, Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE; | ||
28 | virtual void modifiedEntity(const Sink::ApplicationDomain::Mail &oldMail, Sink::ApplicationDomain::Mail &newMail,Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE; | ||
29 | private: | ||
30 | void updatedIndexedProperties(Sink::ApplicationDomain::Mail &mail); | ||
31 | }; | ||
32 | |||
33 | class SINK_EXPORT MimeMessageMover : public Sink::EntityPreprocessor<Sink::ApplicationDomain::Mail> | ||
34 | { | ||
35 | public: | ||
36 | MimeMessageMover(); | ||
37 | virtual ~MimeMessageMover(){} | ||
38 | |||
39 | void newEntity(Sink::ApplicationDomain::Mail &mail, Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE; | ||
40 | void modifiedEntity(const Sink::ApplicationDomain::Mail &oldMail, Sink::ApplicationDomain::Mail &newMail, Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE; | ||
41 | void deletedEntity(const Sink::ApplicationDomain::Mail &mail, Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE; | ||
42 | |||
43 | private: | ||
44 | QString moveMessage(const QString &oldPath, const Sink::ApplicationDomain::Mail &mail); | ||
45 | }; | ||