summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-10 06:10:07 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-10 06:10:07 (GMT)
commit87e31e59a89e356f20c21e26f7acc12b75eaa741 (patch)
tree4bd14bbb6d33f9e228e606bcebc8723a86ca1d96
parentada4c19fa0751a6dd40d8122738b9997b33f8ccc (diff)
Add shared lib
-rw-r--r--kaddressbook/importexportplugins/shared/CMakeLists.txt3
-rw-r--r--kaddressbook/importexportplugins/shared/importexportengine.cpp46
-rw-r--r--kaddressbook/importexportplugins/shared/importexportengine.h40
3 files changed, 88 insertions, 1 deletions
diff --git a/kaddressbook/importexportplugins/shared/CMakeLists.txt b/kaddressbook/importexportplugins/shared/CMakeLists.txt
index 4fdf11a..d34671c 100644
--- a/kaddressbook/importexportplugins/shared/CMakeLists.txt
+++ b/kaddressbook/importexportplugins/shared/CMakeLists.txt
@@ -1,4 +1,5 @@
set(kaddressbookimportexportprivatelib_SRCS
+ importexportengine.cpp
)
add_library(kaddressbookimportexportlibprivate ${kaddressbookimportexportprivatelib_SRCS})
@@ -7,7 +8,7 @@ generate_export_header(kaddressbookimportexportlibprivate BASE_NAME kaddressbook
target_link_libraries(kaddressbookimportexportlibprivate
PRIVATE
- KF5::I18n KF5::Contacts KF5::AkonadiContact KF5::Contacts KF5::AkonadiWidgets
+ KF5::I18n KF5::Contacts KF5::AkonadiContact KF5::Contacts KF5::KaddressbookImportExport
)
set_target_properties(kaddressbookimportexportlibprivate
diff --git a/kaddressbook/importexportplugins/shared/importexportengine.cpp b/kaddressbook/importexportplugins/shared/importexportengine.cpp
new file mode 100644
index 0000000..e75f089
--- /dev/null
+++ b/kaddressbook/importexportplugins/shared/importexportengine.cpp
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "importexportengine.h"
+
+ImportExportEngine::ImportExportEngine(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+ImportExportEngine::~ImportExportEngine()
+{
+
+}
+
+void ImportExportEngine::setContactList(const KAddressBookImportExport::KAddressBookImportExportContactList &contacts)
+{
+ mContactsList = contacts;
+}
+
+void ImportExportEngine::exportContacts()
+{
+
+}
+
+void ImportExportEngine::importContacts()
+{
+
+}
diff --git a/kaddressbook/importexportplugins/shared/importexportengine.h b/kaddressbook/importexportplugins/shared/importexportengine.h
new file mode 100644
index 0000000..bbea166
--- /dev/null
+++ b/kaddressbook/importexportplugins/shared/importexportengine.h
@@ -0,0 +1,40 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef IMPORTEXPORTENGINE_H
+#define IMPORTEXPORTENGINE_H
+
+#include <QObject>
+#include <KAddressBookImportExport/KAddressBookImportExportContactList>
+
+class ImportExportEngine : public QObject
+{
+ Q_OBJECT
+public:
+ explicit ImportExportEngine(QObject *parent = Q_NULLPTR);
+ ~ImportExportEngine();
+ void setContactList(const KAddressBookImportExport::KAddressBookImportExportContactList &contacts);
+
+ void importContacts();
+ void exportContacts();
+private:
+ KAddressBookImportExport::KAddressBookImportExportContactList mContactsList;
+};
+
+#endif // IMPORTEXPORTENGINE_H