summaryrefslogtreecommitdiffstats
path: root/examples/imapresource
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/imapresource
parentf447c09956f91e979754664cdecca3c0dc9f2188 (diff)
downloadsink-a2a4d09cbd42d3de8380ee0061a80cdc0bfb4e6c.tar.gz
sink-a2a4d09cbd42d3de8380ee0061a80cdc0bfb4e6c.zip
Removed unnecessary default implementations
Diffstat (limited to 'examples/imapresource')
-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
4 files changed, 3 insertions, 83 deletions
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)