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