summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-21 12:41:55 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-21 12:41:55 +0100
commita2a4d09cbd42d3de8380ee0061a80cdc0bfb4e6c (patch)
tree79f24c33afb9d341cbb5e531182c926f03492e16 /examples
parentf447c09956f91e979754664cdecca3c0dc9f2188 (diff)
downloadsink-a2a4d09cbd42d3de8380ee0061a80cdc0bfb4e6c.tar.gz
sink-a2a4d09cbd42d3de8380ee0061a80cdc0bfb4e6c.zip
Removed unnecessary default implementations
Diffstat (limited to 'examples')
-rw-r--r--examples/davresource/CMakeLists.txt2
-rw-r--r--examples/davresource/davresource.cpp4
-rw-r--r--examples/davresource/facade.cpp44
-rw-r--r--examples/davresource/facade.h36
-rw-r--r--examples/dummyresource/CMakeLists.txt2
-rw-r--r--examples/dummyresource/facade.cpp51
-rw-r--r--examples/dummyresource/facade.h44
-rw-r--r--examples/dummyresource/resourcefactory.cpp8
-rw-r--r--examples/imapresource/CMakeLists.txt2
-rw-r--r--examples/imapresource/facade.cpp44
-rw-r--r--examples/imapresource/facade.h36
-rw-r--r--examples/imapresource/imapresource.cpp4
12 files changed, 12 insertions, 265 deletions
diff --git a/examples/davresource/CMakeLists.txt b/examples/davresource/CMakeLists.txt
index f8cbdb4..9f134c2 100644
--- a/examples/davresource/CMakeLists.txt
+++ b/examples/davresource/CMakeLists.txt
@@ -5,7 +5,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
5 5
6find_package(KPimKDAV REQUIRED) 6find_package(KPimKDAV REQUIRED)
7 7
8add_library(${PROJECT_NAME} SHARED facade.cpp davresource.cpp domainadaptor.cpp) 8add_library(${PROJECT_NAME} SHARED davresource.cpp domainadaptor.cpp)
9qt5_use_modules(${PROJECT_NAME} Core Network) 9qt5_use_modules(${PROJECT_NAME} Core Network)
10target_link_libraries(${PROJECT_NAME} sink KPim::KDAV) 10target_link_libraries(${PROJECT_NAME} sink KPim::KDAV)
11 11
diff --git a/examples/davresource/davresource.cpp b/examples/davresource/davresource.cpp
index f110eb0..d116397 100644
--- a/examples/davresource/davresource.cpp
+++ b/examples/davresource/davresource.cpp
@@ -271,8 +271,8 @@ Sink::Resource *DavResourceFactory::createResource(const ResourceContext &contex
271 271
272void DavResourceFactory::registerFacades(const QByteArray &name, Sink::FacadeFactory &factory) 272void DavResourceFactory::registerFacades(const QByteArray &name, Sink::FacadeFactory &factory)
273{ 273{
274 factory.registerFacade<Sink::ApplicationDomain::Contact, DavResourceContactFacade>(name); 274 factory.registerFacade<ApplicationDomain::Contact, DefaultFacade<ApplicationDomain::Contact>>(name);
275 factory.registerFacade<Sink::ApplicationDomain::Addressbook, DavResourceAddressbookFacade>(name); 275 factory.registerFacade<ApplicationDomain::Addressbook, DefaultFacade<ApplicationDomain::Contact>>(name);
276} 276}
277 277
278void DavResourceFactory::registerAdaptorFactories(const QByteArray &name, Sink::AdaptorFactoryRegistry &registry) 278void DavResourceFactory::registerAdaptorFactories(const QByteArray &name, Sink::AdaptorFactoryRegistry &registry)
diff --git a/examples/davresource/facade.cpp b/examples/davresource/facade.cpp
deleted file mode 100644
index 8ee1b01..0000000
--- a/examples/davresource/facade.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * Copyright (C) 2014 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
20#include "facade.h"
21
22#include <QDir>
23#include <QFileInfo>
24
25#include "query.h"
26
27DavResourceContactFacade::DavResourceContactFacade(const Sink::ResourceContext &context)
28 : Sink::GenericFacade<Sink::ApplicationDomain::Contact>(context)
29{
30}
31
32DavResourceContactFacade::~DavResourceContactFacade()
33{
34}
35
36
37DavResourceAddressbookFacade::DavResourceAddressbookFacade(const Sink::ResourceContext &context)
38 : Sink::GenericFacade<Sink::ApplicationDomain::Addressbook>(context)
39{
40}
41
42DavResourceAddressbookFacade::~DavResourceAddressbookFacade()
43{
44}
diff --git a/examples/davresource/facade.h b/examples/davresource/facade.h
deleted file mode 100644
index d520891..0000000
--- a/examples/davresource/facade.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * Copyright (C) 2014 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
20#pragma once
21
22#include "common/facade.h"
23
24class DavResourceContactFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Contact>
25{
26public:
27 DavResourceContactFacade(const Sink::ResourceContext &context);
28 virtual ~DavResourceContactFacade();
29};
30
31class DavResourceAddressbookFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Addressbook>
32{
33public:
34 DavResourceAddressbookFacade(const Sink::ResourceContext &context);
35 virtual ~DavResourceAddressbookFacade();
36};
diff --git a/examples/dummyresource/CMakeLists.txt b/examples/dummyresource/CMakeLists.txt
index 6400f0c..2bbaa47 100644
--- a/examples/dummyresource/CMakeLists.txt
+++ b/examples/dummyresource/CMakeLists.txt
@@ -4,7 +4,7 @@ add_definitions(-DQT_PLUGIN)
4include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) 4include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
5 5
6 6
7add_library(${PROJECT_NAME} SHARED facade.cpp resourcefactory.cpp domainadaptor.cpp dummystore.cpp) 7add_library(${PROJECT_NAME} SHARED resourcefactory.cpp domainadaptor.cpp dummystore.cpp)
8generate_flatbuffers(${PROJECT_NAME} dummycalendar) 8generate_flatbuffers(${PROJECT_NAME} dummycalendar)
9qt5_use_modules(${PROJECT_NAME} Core Network) 9qt5_use_modules(${PROJECT_NAME} Core Network)
10target_link_libraries(${PROJECT_NAME} sink) 10target_link_libraries(${PROJECT_NAME} sink)
diff --git a/examples/dummyresource/facade.cpp b/examples/dummyresource/facade.cpp
deleted file mode 100644
index 4343eba..0000000
--- a/examples/dummyresource/facade.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * Copyright (C) 2014 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
20#include "facade.h"
21
22#include "domainadaptor.h"
23
24DummyResourceFacade::DummyResourceFacade(const Sink::ResourceContext &context)
25 : Sink::GenericFacade<Sink::ApplicationDomain::Event>(context)
26{
27}
28
29DummyResourceFacade::~DummyResourceFacade()
30{
31}
32
33
34DummyResourceMailFacade::DummyResourceMailFacade(const Sink::ResourceContext &context)
35 : Sink::GenericFacade<Sink::ApplicationDomain::Mail>(context)
36{
37}
38
39DummyResourceMailFacade::~DummyResourceMailFacade()
40{
41}
42
43
44DummyResourceFolderFacade::DummyResourceFolderFacade(const Sink::ResourceContext &context)
45 : Sink::GenericFacade<Sink::ApplicationDomain::Folder>(context)
46{
47}
48
49DummyResourceFolderFacade::~DummyResourceFolderFacade()
50{
51}
diff --git a/examples/dummyresource/facade.h b/examples/dummyresource/facade.h
deleted file mode 100644
index 1bb45fd..0000000
--- a/examples/dummyresource/facade.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * Copyright (C) 2014 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
20#pragma once
21
22#include "common/facade.h"
23#include "common/domain/event.h"
24
25class DummyResourceFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Event>
26{
27public:
28 DummyResourceFacade(const Sink::ResourceContext &context);
29 virtual ~DummyResourceFacade();
30};
31
32class DummyResourceMailFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Mail>
33{
34public:
35 DummyResourceMailFacade(const Sink::ResourceContext &context);
36 virtual ~DummyResourceMailFacade();
37};
38
39class DummyResourceFolderFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Folder>
40{
41public:
42 DummyResourceFolderFacade(const Sink::ResourceContext &context);
43 virtual ~DummyResourceFolderFacade();
44};
diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp
index e915710..cf20633 100644
--- a/examples/dummyresource/resourcefactory.cpp
+++ b/examples/dummyresource/resourcefactory.cpp
@@ -46,6 +46,8 @@
46 46
47SINK_DEBUG_AREA("dummyresource") 47SINK_DEBUG_AREA("dummyresource")
48 48
49using namespace Sink;
50
49class DummySynchronizer : public Sink::Synchronizer { 51class DummySynchronizer : public Sink::Synchronizer {
50 public: 52 public:
51 53
@@ -194,9 +196,9 @@ Sink::Resource *DummyResourceFactory::createResource(const Sink::ResourceContext
194 196
195void DummyResourceFactory::registerFacades(const QByteArray &resourceName, Sink::FacadeFactory &factory) 197void DummyResourceFactory::registerFacades(const QByteArray &resourceName, Sink::FacadeFactory &factory)
196{ 198{
197 factory.registerFacade<Sink::ApplicationDomain::Event, DummyResourceFacade>(resourceName); 199 factory.registerFacade<ApplicationDomain::Event, DefaultFacade<ApplicationDomain::Event>>(resourceName);
198 factory.registerFacade<Sink::ApplicationDomain::Mail, DummyResourceMailFacade>(resourceName); 200 factory.registerFacade<ApplicationDomain::Mail, DefaultFacade<ApplicationDomain::Mail>>(resourceName);
199 factory.registerFacade<Sink::ApplicationDomain::Folder, DummyResourceFolderFacade>(resourceName); 201 factory.registerFacade<ApplicationDomain::Folder, DefaultFacade<ApplicationDomain::Folder>>(resourceName);
200} 202}
201 203
202void DummyResourceFactory::registerAdaptorFactories(const QByteArray &resourceName, Sink::AdaptorFactoryRegistry &registry) 204void DummyResourceFactory::registerAdaptorFactories(const QByteArray &resourceName, Sink::AdaptorFactoryRegistry &registry)
diff --git a/examples/imapresource/CMakeLists.txt b/examples/imapresource/CMakeLists.txt
index 15a720d..61680cd 100644
--- a/examples/imapresource/CMakeLists.txt
+++ b/examples/imapresource/CMakeLists.txt
@@ -8,7 +8,7 @@ find_package(KIMAP2 0.0.1 REQUIRED)
8 8
9include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) 9include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
10 10
11add_library(${PROJECT_NAME} SHARED facade.cpp imapresource.cpp domainadaptor.cpp imapserverproxy.cpp) 11add_library(${PROJECT_NAME} SHARED imapresource.cpp domainadaptor.cpp imapserverproxy.cpp)
12qt5_use_modules(${PROJECT_NAME} Core Network) 12qt5_use_modules(${PROJECT_NAME} Core Network)
13target_link_libraries(${PROJECT_NAME} sink KF5::Mime KIMAP2) 13target_link_libraries(${PROJECT_NAME} sink KF5::Mime KIMAP2)
14 14
diff --git a/examples/imapresource/facade.cpp b/examples/imapresource/facade.cpp
deleted file mode 100644
index 2829bb1..0000000
--- a/examples/imapresource/facade.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * Copyright (C) 2014 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
20#include "facade.h"
21
22#include <QDir>
23#include <QFileInfo>
24
25#include "domainadaptor.h"
26#include "queryrunner.h"
27
28ImapResourceMailFacade::ImapResourceMailFacade(const Sink::ResourceContext &context)
29 : Sink::GenericFacade<Sink::ApplicationDomain::Mail>(context)
30{
31}
32
33ImapResourceMailFacade::~ImapResourceMailFacade()
34{
35}
36
37ImapResourceFolderFacade::ImapResourceFolderFacade(const Sink::ResourceContext &context)
38 : Sink::GenericFacade<Sink::ApplicationDomain::Folder>(context)
39{
40}
41
42ImapResourceFolderFacade::~ImapResourceFolderFacade()
43{
44}
diff --git a/examples/imapresource/facade.h b/examples/imapresource/facade.h
deleted file mode 100644
index 1d24856..0000000
--- a/examples/imapresource/facade.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * Copyright (C) 2014 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
20#pragma once
21
22#include "common/facade.h"
23
24class ImapResourceMailFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Mail>
25{
26public:
27 ImapResourceMailFacade(const Sink::ResourceContext &context);
28 virtual ~ImapResourceMailFacade();
29};
30
31class ImapResourceFolderFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Folder>
32{
33public:
34 ImapResourceFolderFacade(const Sink::ResourceContext &context);
35 virtual ~ImapResourceFolderFacade();
36};
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp
index ba0251c..4f6f748 100644
--- a/examples/imapresource/imapresource.cpp
+++ b/examples/imapresource/imapresource.cpp
@@ -949,8 +949,8 @@ Sink::Resource *ImapResourceFactory::createResource(const ResourceContext &conte
949 949
950void ImapResourceFactory::registerFacades(const QByteArray &name, Sink::FacadeFactory &factory) 950void ImapResourceFactory::registerFacades(const QByteArray &name, Sink::FacadeFactory &factory)
951{ 951{
952 factory.registerFacade<Sink::ApplicationDomain::Mail, ImapResourceMailFacade>(name); 952 factory.registerFacade<ApplicationDomain::Mail, DefaultFacade<ApplicationDomain::Mail>>(name);
953 factory.registerFacade<Sink::ApplicationDomain::Folder, ImapResourceFolderFacade>(name); 953 factory.registerFacade<ApplicationDomain::Folder, DefaultFacade<ApplicationDomain::Folder>>(name);
954} 954}
955 955
956void ImapResourceFactory::registerAdaptorFactories(const QByteArray &name, Sink::AdaptorFactoryRegistry &registry) 956void ImapResourceFactory::registerAdaptorFactories(const QByteArray &name, Sink::AdaptorFactoryRegistry &registry)