summaryrefslogtreecommitdiffstats
path: root/common/domain/mail.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-21 13:09:46 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-21 13:13:56 +0100
commit7a98c9853726ed09abd35a447f9854c5459a855d (patch)
tree50aa14c43ab616529d35fdf91f6ed8d69887c8ab /common/domain/mail.h
parenta2a4d09cbd42d3de8380ee0061a80cdc0bfb4e6c (diff)
downloadsink-7a98c9853726ed09abd35a447f9854c5459a855d.tar.gz
sink-7a98c9853726ed09abd35a447f9854c5459a855d.zip
Move type implementations in one place
Having them separated is rather pointless (since we need one for every type, and all types are the interface of sink, as one), and caused quite a bit of friction when adding new types. This will also make it easier to change things for all types.
Diffstat (limited to 'common/domain/mail.h')
-rw-r--r--common/domain/mail.h52
1 files changed, 0 insertions, 52 deletions
diff --git a/common/domain/mail.h b/common/domain/mail.h
deleted file mode 100644
index e052448..0000000
--- a/common/domain/mail.h
+++ /dev/null
@@ -1,52 +0,0 @@
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#pragma once
20
21#include "applicationdomaintype.h"
22
23class QByteArray;
24
25template<typename T>
26class ReadPropertyMapper;
27template<typename T>
28class WritePropertyMapper;
29class IndexPropertyMapper;
30
31class TypeIndex;
32
33namespace Sink {
34namespace ApplicationDomain {
35 namespace Buffer {
36 struct Mail;
37 struct MailBuilder;
38 }
39
40template<>
41class TypeImplementation<Sink::ApplicationDomain::Mail> {
42public:
43 typedef Sink::ApplicationDomain::Buffer::Mail Buffer;
44 typedef Sink::ApplicationDomain::Buffer::MailBuilder BufferBuilder;
45 static void configure(TypeIndex &index);
46 static void configure(ReadPropertyMapper<Buffer> &propertyMapper);
47 static void configure(WritePropertyMapper<BufferBuilder> &propertyMapper);
48 static void configure(IndexPropertyMapper &indexPropertyMapper);
49};
50
51}
52}