summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-10-17 14:19:27 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-10-17 14:19:27 (GMT)
commit5751be941b444a719eec44fe501ab5db0526a009 (patch)
treee98509d0b11c5b8e9a4753aa87d067b0c5270f3c
parent5aaed0a7f3b8cd8791438572aa4ad167135fa7bd (diff)
downloadkolab-utils-5751be941b444a719eec44fe501ab5db0526a009.tar.gz
Moved some shared code to new libkolabutils.
-rw-r--r--CMakeLists.txt25
-rw-r--r--fbdaemon/tests/CMakeLists.txt1
-rw-r--r--fbdaemon/tests/fbgeneratortest.cpp129
-rw-r--r--lib/CMakeLists.txt26
-rw-r--r--lib/jobs/CMakeLists.txt (renamed from jobs/CMakeLists.txt)0
-rw-r--r--lib/jobs/fetchmessagesjob.cpp (renamed from jobs/fetchmessagesjob.cpp)0
-rw-r--r--lib/jobs/fetchmessagesjob.h (renamed from jobs/fetchmessagesjob.h)0
-rw-r--r--lib/jobs/findkolabfoldersjob.cpp (renamed from jobs/findkolabfoldersjob.cpp)0
-rw-r--r--lib/jobs/findkolabfoldersjob.h (renamed from jobs/findkolabfoldersjob.h)0
-rw-r--r--lib/jobs/getuserlistjob.cpp (renamed from jobs/getuserlistjob.cpp)0
-rw-r--r--lib/jobs/getuserlistjob.h (renamed from jobs/getuserlistjob.h)0
-rw-r--r--lib/jobs/imapjob.cpp120
-rw-r--r--lib/jobs/imapjob.h32
-rw-r--r--lib/jobs/messagemodifyjob.cpp (renamed from jobs/messagemodifyjob.cpp)0
-rw-r--r--lib/jobs/messagemodifyjob.h (renamed from jobs/messagemodifyjob.h)0
-rw-r--r--lib/jobs/probekolabserverjob.cpp (renamed from jobs/probekolabserverjob.cpp)0
-rw-r--r--lib/jobs/probekolabserverjob.h (renamed from jobs/probekolabserverjob.h)0
-rw-r--r--lib/jobs/sequentialcompositejob.cpp (renamed from jobs/sequentialcompositejob.cpp)0
-rw-r--r--lib/jobs/sequentialcompositejob.h (renamed from jobs/sequentialcompositejob.h)0
-rw-r--r--lib/jobs/setupkolabfoldersjob.cpp (renamed from jobs/setupkolabfoldersjob.cpp)0
-rw-r--r--lib/jobs/setupkolabfoldersjob.h (renamed from jobs/setupkolabfoldersjob.h)0
-rw-r--r--lib/kolabaccount.cpp (renamed from migrationutility/kolabaccount.cpp)0
-rw-r--r--lib/kolabaccount.h (renamed from migrationutility/kolabaccount.h)0
-rw-r--r--lib/object.h (renamed from migrationutility/object.h)0
-rw-r--r--lib/uiproxy.h (renamed from migrationutility/uiproxy.h)0
-rw-r--r--migrationutility/CMakeLists.txt4
-rw-r--r--migrationutility/tests/CMakeLists.txt6
-rw-r--r--migrationutility/tests/migrationscenariotest.cpp2
28 files changed, 321 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c6f550..93f65e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,9 @@ project (KolabUtilsFormat)
cmake_minimum_required(VERSION 2.6)
+cmake_policy(SET CMP0013 NEW)
+
+
option( USE_LIBCALENDARING "Use libcalendaring" FALSE )
set(CMAKE_MODULE_PATH ${KolabUtilsFormat_SOURCE_DIR}/cmake/modules)
@@ -32,7 +35,7 @@ endif()
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -fexceptions -UQT_NO_EXCEPTIONS -g" )
-include_directories(./ ${QT_INCLUDES} ${KDE_INCLUDES} ${Libkolab_INCLUDES} ${Libkolabxml_INCLUDES})
+include_directories(./ lib ${QT_INCLUDES} ${KDE_INCLUDES} ${Libkolab_INCLUDES} ${Libkolabxml_INCLUDES})
set(COMMON_DEPENDENCIES
${Libkolab_LIBRARIES}
@@ -40,21 +43,9 @@ set(COMMON_DEPENDENCIES
${QT_QTXML_LIBRARY}
${QT_GUI_LIBRARY}
${KDE_LIBRARIES}
-
-)
-
-add_subdirectory(jobs)
-QT4_WRAP_CPP(JOB_MOC
- ${CMAKE_CURRENT_SOURCE_DIR}/jobs/findkolabfoldersjob.h
- ${CMAKE_CURRENT_SOURCE_DIR}/jobs/probekolabserverjob.h
- ${CMAKE_CURRENT_SOURCE_DIR}/jobs/sequentialcompositejob.h
- ${CMAKE_CURRENT_SOURCE_DIR}/jobs/messagemodifyjob.h
- ${CMAKE_CURRENT_SOURCE_DIR}/jobs/fetchmessagesjob.h
- ${CMAKE_CURRENT_SOURCE_DIR}/jobs/setupkolabfoldersjob.h
- ${CMAKE_CURRENT_SOURCE_DIR}/jobs/getuserlistjob.h
)
-set( JOBS_SRCS ${JOBS_SRCS} ${JOB_MOC} )
+add_subdirectory(lib)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
@@ -69,7 +60,7 @@ QT4_WRAP_CPP(SRC_MOC
)
add_executable(kolab-formatupgrade ${UPGRADE_SRCS} ${SRC_MOC} ${JOBS_SRCS})
-target_link_libraries(kolab-formatupgrade ${COMMON_DEPENDENCIES})
+target_link_libraries(kolab-formatupgrade ${COMMON_DEPENDENCIES} kolabutils)
install(TARGETS kolab-formatupgrade
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
@@ -90,7 +81,7 @@ QT4_WRAP_CPP(FB_MOC
set( FBDAEMON_SRCS ${FBDAEMON_SRCS} ${FB_MOC} ${JOBS_SRCS} )
add_executable(kolab-freebusyd ${FBDAEMON_SRCS} ${JOB_SRCS})
-target_link_libraries(kolab-freebusyd ${COMMON_DEPENDENCIES})
+target_link_libraries(kolab-freebusyd ${COMMON_DEPENDENCIES} kolabutils)
install(TARGETS kolab-freebusyd
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
@@ -118,4 +109,4 @@ add_subdirectory(migrationutility)
########## tests
-add_subdirectory(tests) \ No newline at end of file
+#add_subdirectory(tests)
diff --git a/fbdaemon/tests/CMakeLists.txt b/fbdaemon/tests/CMakeLists.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/fbdaemon/tests/CMakeLists.txt
@@ -0,0 +1 @@
+
diff --git a/fbdaemon/tests/fbgeneratortest.cpp b/fbdaemon/tests/fbgeneratortest.cpp
new file mode 100644
index 0000000..0cb9560
--- /dev/null
+++ b/fbdaemon/tests/fbgeneratortest.cpp
@@ -0,0 +1,129 @@
+/*
+ * Copyright (C) 2012 Christian Mollekopf <mollekopf@kolabsys.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <QObject>
+#include <QTest>
+#include <QDebug>
+#include <kolabobject.h>
+#include "fbdaemon/fbgeneratorjob.h"
+
+class FBGeneratorTest: public QObject
+{
+ Q_OBJECT
+
+ QString sourcehost;
+ QString targethost;
+ QString user;
+ QString admin;
+ QString adminpw;
+ qint16 port;
+
+public:
+ explicit MigrationScenarioTest(QObject* parent = 0)
+ : QObject(parent),
+ sourcehost("192.168.122.104"),
+ targethost("192.168.122.10"),
+ user("john.doe@example.org"),
+ admin("cyrus-admin"),
+ adminpw("admin"),
+ port(143)
+ {
+ }
+
+ virtual ~MigrationScenarioTest(){};
+
+private:
+
+ void setupSourceAccount()
+ {
+ KolabServer *kolabServer = new KolabServer(this);
+ kolabServer->setHost(sourcehost, port);
+ kolabServer->setAdminCredentials(admin, adminpw);
+ KolabAccount *account = kolabServer->getAccount(user);
+ account->cleanAccount();
+ createFolders(account, folders);
+ }
+
+ void setupTargetAccount()
+ {
+ //Depending on the test scenario, clear target account
+ }
+
+ void executeGeneration()
+ {
+ QObject obj;
+
+ FBGeneratorJob *job = new FBGeneratorJob(targethost, port, user, &obj);
+ job->exec();
+ }
+
+ void checkFolders(SourceAccount *account, const QList<Folder> &folders)
+ {
+ const QStringList &receivedFolders = account->lookupFolderList();
+ QStringList::const_iterator recIt = receivedFolders.constBegin();
+ QList<Folder>::const_iterator foldersIt = folders.constBegin();
+ QCOMPARE(receivedFolders.size(), folders.size());
+ for (;foldersIt != folders.constEnd() && recIt != receivedFolders.constEnd(); ++foldersIt, ++recIt) {
+ qDebug() << "Folder: " << *recIt;
+ QCOMPARE(*recIt, foldersIt->name);
+ //TODO Check folder annotations
+
+ const QList<Object> &objects = account->getObjects(foldersIt->name);
+ QCOMPARE(objects.size(), foldersIt->objects.size());
+
+ QList<Object>::const_iterator recObjIt = objects.constBegin();
+ QList<Object>::const_iterator objIt = foldersIt->objects.constBegin();
+ for (;objIt != foldersIt->objects.constEnd() && recObjIt != objects.constEnd(); ++objIt, ++recObjIt) {
+ //TODO Check converted messages
+ foreach (const QByteArray &flag, objIt->flags) {
+ QVERIFY(recObjIt->flags.contains(flag));
+ }
+ }
+ }
+ }
+
+ void checkTargetAccount()
+ {
+
+ QObject obj;
+ KolabSourceServer *kolabSourceServer = new KolabSourceServer(&obj);
+ kolabSourceServer->setHost(targethost, port);
+ kolabSourceServer->setAdminCredentials(admin, adminpw);
+ kolabSourceServer->setSingleUser(user);
+
+ SourceAccount *account = kolabSourceServer->getSourceAccount(user);
+ checkFolders(account, folders);
+ account->logout();
+ }
+
+ void checkSourceAccount()
+ {
+ //If we start clearing the source server on successful migration, check that messages are really gone.
+ }
+
+private slots:
+ void testGenerator()
+ {
+ setupTargetAccount();
+ executeGeneration();
+ checkTargetAccount();
+ }
+
+};
+QTEST_MAIN( FBGeneratorTest )
+
+#include "fbgeneratortest.moc" \ No newline at end of file
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
new file mode 100644
index 0000000..9763171
--- /dev/null
+++ b/lib/CMakeLists.txt
@@ -0,0 +1,26 @@
+
+include_directories(./)
+
+add_subdirectory(jobs)
+QT4_WRAP_CPP(JOB_MOC
+ ${CMAKE_CURRENT_SOURCE_DIR}/jobs/findkolabfoldersjob.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/jobs/probekolabserverjob.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/jobs/sequentialcompositejob.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/jobs/messagemodifyjob.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/jobs/fetchmessagesjob.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/jobs/setupkolabfoldersjob.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/jobs/getuserlistjob.h
+)
+set( JOBS_SRCS ${JOBS_SRCS} ${JOB_MOC} )
+
+QT4_WRAP_CPP(MOC
+ ${CMAKE_CURRENT_SOURCE_DIR}/kolabaccount.h
+)
+
+set(SRCS ${JOBS_SRCS}
+ kolabaccount.cpp
+ ${MOC}
+)
+
+add_library(kolabutils ${SRCS})
+target_link_libraries(kolabutils ${COMMON_DEPENDENCIES})
diff --git a/jobs/CMakeLists.txt b/lib/jobs/CMakeLists.txt
index a9796ef..a9796ef 100644
--- a/jobs/CMakeLists.txt
+++ b/lib/jobs/CMakeLists.txt
diff --git a/jobs/fetchmessagesjob.cpp b/lib/jobs/fetchmessagesjob.cpp
index 01afe56..01afe56 100644
--- a/jobs/fetchmessagesjob.cpp
+++ b/lib/jobs/fetchmessagesjob.cpp
diff --git a/jobs/fetchmessagesjob.h b/lib/jobs/fetchmessagesjob.h
index 74425e1..74425e1 100644
--- a/jobs/fetchmessagesjob.h
+++ b/lib/jobs/fetchmessagesjob.h
diff --git a/jobs/findkolabfoldersjob.cpp b/lib/jobs/findkolabfoldersjob.cpp
index 7de422a..7de422a 100644
--- a/jobs/findkolabfoldersjob.cpp
+++ b/lib/jobs/findkolabfoldersjob.cpp
diff --git a/jobs/findkolabfoldersjob.h b/lib/jobs/findkolabfoldersjob.h
index db1f86c..db1f86c 100644
--- a/jobs/findkolabfoldersjob.h
+++ b/lib/jobs/findkolabfoldersjob.h
diff --git a/jobs/getuserlistjob.cpp b/lib/jobs/getuserlistjob.cpp
index 3e0b561..3e0b561 100644
--- a/jobs/getuserlistjob.cpp
+++ b/lib/jobs/getuserlistjob.cpp
diff --git a/jobs/getuserlistjob.h b/lib/jobs/getuserlistjob.h
index 399b1ec..399b1ec 100644
--- a/jobs/getuserlistjob.h
+++ b/lib/jobs/getuserlistjob.h
diff --git a/lib/jobs/imapjob.cpp b/lib/jobs/imapjob.cpp
new file mode 100644
index 0000000..78a364a
--- /dev/null
+++ b/lib/jobs/imapjob.cpp
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2012 Christian Mollekopf <mollekopf@kolabsys.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "imapjob.h"
+
+#include "authenticationjob.h"
+#include <jobs/probekolabserverjob.h>
+#include <QTimer>
+#include <kimap/logoutjob.h>
+#include <kolab/errorhandler.h>
+
+class UiProxy: public KIMAP::SessionUiProxy {
+ public:
+ //We need this for ssl errors such as untrusted certificates
+ bool ignoreSslError(const KSslErrorUiData& /*errorData*/) {
+// Warning() << "Error during ssl";
+ return true;
+ }
+};
+
+KolabJob::KolabJob(const QString& hostName, qint16 port, const QString& username, QObject* parent)
+: KJob(parent),
+ mHostName(hostName),
+ mPort(port),
+ mUserName(username),
+ mSession(0)
+{
+}
+
+void KolabJob::onSessionStateChanged(KIMAP::Session::State newState, KIMAP::Session::State oldState)
+{
+// Debug() << newState;
+ if (newState == KIMAP::Session::Disconnected && oldState != KIMAP::Session::Disconnected) {
+ Warning() << "lost connenction";
+ }
+}
+
+void KolabJob::start()
+{
+ Debug() << "===========================================================";
+ Debug() << "starting kolab job: " << mUserName << " on " << mHostName;
+
+ //Create the session in the same batch as the LoginJob, if we enter the eventloop in between the session might break
+ mSession = new KIMAP::Session( mHostName, mPort, this );
+ mSession->setUiProxy( KIMAP::SessionUiProxy::Ptr(new UiProxy()) );
+ QObject::connect( mSession, SIGNAL(stateChanged(KIMAP::Session::State,KIMAP::Session::State)),
+ this, SLOT(onSessionStateChanged(KIMAP::Session::State,KIMAP::Session::State)) );
+ AuthenticationJob *job = new AuthenticationJob(mUserName, mSession, this);
+ QObject::connect( job, SIGNAL(result(KJob*)),
+ this, SLOT(onAuthDone(KJob*)) );
+ job->start();
+}
+
+QStringList KolabJob::requiredFolders()
+{
+ return QStringList();
+}
+
+void KolabJob::onAuthDone(KJob *job)
+{
+ if ( job->error() ) {
+ Warning() << job->errorString();
+ setError(KJob::UserDefinedError);
+ emitResult();
+ return;
+ }
+// Debug() << "login successful";
+ ProbeKolabServerJob *probeJob = new ProbeKolabServerJob(mSession, this);
+ probeJob->createDefaultsIfMissing(requiredFolders());
+ QObject::connect(probeJob, SIGNAL(result(KJob*)), this, SLOT(onProbeDone(KJob*)));
+ probeJob->start();
+}
+
+void KolabJob::onProbeDone(KJob* job)
+{
+ if ( job->error() ) {
+ Warning() << job->errorString();
+ setError(KJob::UserDefinedError);
+ emitResult();
+ return;
+ }
+ ProbeKolabServerJob *capabilitiesJob = qobject_cast<ProbeKolabServerJob*>( job );
+ Q_ASSERT(capabilitiesJob);
+ startWork(capabilitiesJob);
+}
+
+void KolabJob::logout()
+{
+// Debug() << "logging out";
+ KIMAP::LogoutJob *job = new KIMAP::LogoutJob(mSession);
+ connect(job, SIGNAL(result(KJob*)), this, SLOT(onLogoutDone(KJob*)));
+ job->start();
+}
+
+void KolabJob::onLogoutDone(KJob *job )
+{
+// Debug() << "logout done";
+ if ( job->error() ) {
+ Warning() << job->errorString();
+ setError(KJob::UserDefinedError);
+ }
+ mSession->close();
+ mSession->deleteLater();
+ mSession = 0;
+ emitResult();
+}
diff --git a/lib/jobs/imapjob.h b/lib/jobs/imapjob.h
new file mode 100644
index 0000000..5e035e9
--- /dev/null
+++ b/lib/jobs/imapjob.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2012 Christian Mollekopf <mollekopf@kolabsys.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef IMAPJOB_H
+#define IMAPJOB_H
+
+class ImapJob
+{
+ void onSessionStateChanged(KIMAP::Session::State newState, KIMAP::Session::State oldState);
+ QString mHostName;
+ qint16 mPort;
+private Q_SLOTS:
+ void onAuthDone(KJob*);
+ void onLogoutDone(KJob*);
+ void onDone();
+};
+
+#endif // IMAPJOB_H
diff --git a/jobs/messagemodifyjob.cpp b/lib/jobs/messagemodifyjob.cpp
index cb2e749..cb2e749 100644
--- a/jobs/messagemodifyjob.cpp
+++ b/lib/jobs/messagemodifyjob.cpp
diff --git a/jobs/messagemodifyjob.h b/lib/jobs/messagemodifyjob.h
index 5fea67f..5fea67f 100644
--- a/jobs/messagemodifyjob.h
+++ b/lib/jobs/messagemodifyjob.h
diff --git a/jobs/probekolabserverjob.cpp b/lib/jobs/probekolabserverjob.cpp
index 197a283..197a283 100644
--- a/jobs/probekolabserverjob.cpp
+++ b/lib/jobs/probekolabserverjob.cpp
diff --git a/jobs/probekolabserverjob.h b/lib/jobs/probekolabserverjob.h
index eff69e9..eff69e9 100644
--- a/jobs/probekolabserverjob.h
+++ b/lib/jobs/probekolabserverjob.h
diff --git a/jobs/sequentialcompositejob.cpp b/lib/jobs/sequentialcompositejob.cpp
index b9c5951..b9c5951 100644
--- a/jobs/sequentialcompositejob.cpp
+++ b/lib/jobs/sequentialcompositejob.cpp
diff --git a/jobs/sequentialcompositejob.h b/lib/jobs/sequentialcompositejob.h
index 210995a..210995a 100644
--- a/jobs/sequentialcompositejob.h
+++ b/lib/jobs/sequentialcompositejob.h
diff --git a/jobs/setupkolabfoldersjob.cpp b/lib/jobs/setupkolabfoldersjob.cpp
index b906fcb..b906fcb 100644
--- a/jobs/setupkolabfoldersjob.cpp
+++ b/lib/jobs/setupkolabfoldersjob.cpp
diff --git a/jobs/setupkolabfoldersjob.h b/lib/jobs/setupkolabfoldersjob.h
index 2062d38..2062d38 100644
--- a/jobs/setupkolabfoldersjob.h
+++ b/lib/jobs/setupkolabfoldersjob.h
diff --git a/migrationutility/kolabaccount.cpp b/lib/kolabaccount.cpp
index c55511f..c55511f 100644
--- a/migrationutility/kolabaccount.cpp
+++ b/lib/kolabaccount.cpp
diff --git a/migrationutility/kolabaccount.h b/lib/kolabaccount.h
index d2bdea8..d2bdea8 100644
--- a/migrationutility/kolabaccount.h
+++ b/lib/kolabaccount.h
diff --git a/migrationutility/object.h b/lib/object.h
index 1d34e1a..1d34e1a 100644
--- a/migrationutility/object.h
+++ b/lib/object.h
diff --git a/migrationutility/uiproxy.h b/lib/uiproxy.h
index d91e95b..d91e95b 100644
--- a/migrationutility/uiproxy.h
+++ b/lib/uiproxy.h
diff --git a/migrationutility/CMakeLists.txt b/migrationutility/CMakeLists.txt
index 6a22a41..c4fdf4e 100644
--- a/migrationutility/CMakeLists.txt
+++ b/migrationutility/CMakeLists.txt
@@ -15,7 +15,6 @@ set(MIGRATION_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/coordinationjob.cpp
${CMAKE_CURRENT_SOURCE_DIR}/sourceaccount.cpp
${CMAKE_CURRENT_SOURCE_DIR}/sourceserver.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/kolabaccount.cpp
${CMAKE_CURRENT_SOURCE_DIR}/kolabserver.cpp
)
@@ -26,13 +25,12 @@ QT4_WRAP_CPP(MIGRATION_MOC
${CMAKE_CURRENT_SOURCE_DIR}/coordinationjob.h
${CMAKE_CURRENT_SOURCE_DIR}/sourceaccount.h
${CMAKE_CURRENT_SOURCE_DIR}/sourceserver.h
- ${CMAKE_CURRENT_SOURCE_DIR}/kolabaccount.h
${CMAKE_CURRENT_SOURCE_DIR}/kolabserver.h
)
add_executable(kolab-migration ${MIGRATION_SRCS} ${MIGRATION_MOC} ${JOBS_SRCS} main.cpp)
-target_link_libraries(kolab-migration ${COMMON_DEPENDENCIES})
+target_link_libraries(kolab-migration ${COMMON_DEPENDENCIES} kolabutils)
install(TARGETS kolab-migration
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
diff --git a/migrationutility/tests/CMakeLists.txt b/migrationutility/tests/CMakeLists.txt
index 37b2be6..6c029b1 100644
--- a/migrationutility/tests/CMakeLists.txt
+++ b/migrationutility/tests/CMakeLists.txt
@@ -18,7 +18,7 @@ qt4_generate_moc(
# message("blasbblab ${kolabproxy_shared_relative_SRCS} : ${MIGRATION_SRCS}")
# message("sdfsdf ${MIGRATIONTEST_MOC}")
-add_executable(migrationtest ${MIGRATION_SRCS} ${MIGRATION_MOC} ${JOBS_SRCS} migrationtest.cpp)
+add_executable(migrationtest ${MIGRATION_SRCS} ${MIGRATION_MOC} migrationtest.cpp)
# set_target_properties(migrationtest PROPERTIES AUTOMOC TRUE)
target_link_libraries(migrationtest ${COMMON_DEPENDENCIES} ${QT_QTTEST_LIBRARY})
@@ -27,5 +27,5 @@ qt4_generate_moc(
${CMAKE_CURRENT_SOURCE_DIR}/migrationscenariotest.cpp
${CMAKE_CURRENT_BINARY_DIR}/migrationscenariotest.moc
)
-add_executable(migrationscenariotest ${MIGRATION_SRCS} ${MIGRATION_MOC} ${JOBS_SRCS} migrationscenariotest.cpp)
-target_link_libraries(migrationscenariotest ${COMMON_DEPENDENCIES} ${QT_QTTEST_LIBRARY})
+add_executable(migrationscenariotest ${MIGRATION_SRCS} ${MIGRATION_MOC} migrationscenariotest.cpp)
+target_link_libraries(migrationscenariotest ${COMMON_DEPENDENCIES} ${QT_QTTEST_LIBRARY} kolabutils)
diff --git a/migrationutility/tests/migrationscenariotest.cpp b/migrationutility/tests/migrationscenariotest.cpp
index f952e45..e54cd88 100644
--- a/migrationutility/tests/migrationscenariotest.cpp
+++ b/migrationutility/tests/migrationscenariotest.cpp
@@ -22,7 +22,7 @@
#include "migrationutility/coordinationjob.h"
#include "migrationutility/kolabserver.h"
#include "migrationutility/sourceserver.h"
-#include "migrationutility/kolabaccount.h"
+#include "lib/kolabaccount.h"
struct Folder