diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-21 12:41:55 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-21 12:41:55 +0100 |
commit | a2a4d09cbd42d3de8380ee0061a80cdc0bfb4e6c (patch) | |
tree | 79f24c33afb9d341cbb5e531182c926f03492e16 /examples/dummyresource | |
parent | f447c09956f91e979754664cdecca3c0dc9f2188 (diff) | |
download | sink-a2a4d09cbd42d3de8380ee0061a80cdc0bfb4e6c.tar.gz sink-a2a4d09cbd42d3de8380ee0061a80cdc0bfb4e6c.zip |
Removed unnecessary default implementations
Diffstat (limited to 'examples/dummyresource')
-rw-r--r-- | examples/dummyresource/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/dummyresource/facade.cpp | 51 | ||||
-rw-r--r-- | examples/dummyresource/facade.h | 44 | ||||
-rw-r--r-- | examples/dummyresource/resourcefactory.cpp | 8 |
4 files changed, 6 insertions, 99 deletions
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) | |||
4 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | 4 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) |
5 | 5 | ||
6 | 6 | ||
7 | add_library(${PROJECT_NAME} SHARED facade.cpp resourcefactory.cpp domainadaptor.cpp dummystore.cpp) | 7 | add_library(${PROJECT_NAME} SHARED resourcefactory.cpp domainadaptor.cpp dummystore.cpp) |
8 | generate_flatbuffers(${PROJECT_NAME} dummycalendar) | 8 | generate_flatbuffers(${PROJECT_NAME} dummycalendar) |
9 | qt5_use_modules(${PROJECT_NAME} Core Network) | 9 | qt5_use_modules(${PROJECT_NAME} Core Network) |
10 | target_link_libraries(${PROJECT_NAME} sink) | 10 | target_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 | |||
24 | DummyResourceFacade::DummyResourceFacade(const Sink::ResourceContext &context) | ||
25 | : Sink::GenericFacade<Sink::ApplicationDomain::Event>(context) | ||
26 | { | ||
27 | } | ||
28 | |||
29 | DummyResourceFacade::~DummyResourceFacade() | ||
30 | { | ||
31 | } | ||
32 | |||
33 | |||
34 | DummyResourceMailFacade::DummyResourceMailFacade(const Sink::ResourceContext &context) | ||
35 | : Sink::GenericFacade<Sink::ApplicationDomain::Mail>(context) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | DummyResourceMailFacade::~DummyResourceMailFacade() | ||
40 | { | ||
41 | } | ||
42 | |||
43 | |||
44 | DummyResourceFolderFacade::DummyResourceFolderFacade(const Sink::ResourceContext &context) | ||
45 | : Sink::GenericFacade<Sink::ApplicationDomain::Folder>(context) | ||
46 | { | ||
47 | } | ||
48 | |||
49 | DummyResourceFolderFacade::~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 | |||
25 | class DummyResourceFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Event> | ||
26 | { | ||
27 | public: | ||
28 | DummyResourceFacade(const Sink::ResourceContext &context); | ||
29 | virtual ~DummyResourceFacade(); | ||
30 | }; | ||
31 | |||
32 | class DummyResourceMailFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Mail> | ||
33 | { | ||
34 | public: | ||
35 | DummyResourceMailFacade(const Sink::ResourceContext &context); | ||
36 | virtual ~DummyResourceMailFacade(); | ||
37 | }; | ||
38 | |||
39 | class DummyResourceFolderFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Folder> | ||
40 | { | ||
41 | public: | ||
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 | ||
47 | SINK_DEBUG_AREA("dummyresource") | 47 | SINK_DEBUG_AREA("dummyresource") |
48 | 48 | ||
49 | using namespace Sink; | ||
50 | |||
49 | class DummySynchronizer : public Sink::Synchronizer { | 51 | class DummySynchronizer : public Sink::Synchronizer { |
50 | public: | 52 | public: |
51 | 53 | ||
@@ -194,9 +196,9 @@ Sink::Resource *DummyResourceFactory::createResource(const Sink::ResourceContext | |||
194 | 196 | ||
195 | void DummyResourceFactory::registerFacades(const QByteArray &resourceName, Sink::FacadeFactory &factory) | 197 | void 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 | ||
202 | void DummyResourceFactory::registerAdaptorFactories(const QByteArray &resourceName, Sink::AdaptorFactoryRegistry ®istry) | 204 | void DummyResourceFactory::registerAdaptorFactories(const QByteArray &resourceName, Sink::AdaptorFactoryRegistry ®istry) |