diff --git a/doorlockd/CMakeLists.txt b/doorlockd/CMakeLists.txt index ee60423..2dfde31 100644 --- a/doorlockd/CMakeLists.txt +++ b/doorlockd/CMakeLists.txt @@ -58,30 +58,30 @@ find_package (Threads) find_package(Qt5Widgets) set(LIBDOORLOCK_SRCS - src/clientmessage.cpp - src/clientmessage.h - src/daemon.cpp - src/daemon.h - src/door.cpp - src/door.h - src/doormessage.h - src/logger.cpp - src/logger.h - src/logic.cpp - src/logic.h - src/response.cpp - src/response.h - src/util.cpp - src/util.h) + lib/clientmessage.cpp + lib/clientmessage.h + lib/door.cpp + lib/door.h + lib/doormessage.h + lib/logger.cpp + lib/logger.h + lib/logic.cpp + lib/logic.h + lib/response.cpp + lib/response.h + lib/util.cpp + lib/util.h) set(DOORLOCKD_SRCS - src/doorlockd.cpp) + daemon/daemon.cpp + daemon/daemon.h + daemon/doorlockd.cpp) set(DOORLOCK_CLIENT_SRCS - src/qrwidget.cpp - src/qrwidget.h - src/doorlock-client.cpp - src/mainwindow.h) + client/qrwidget.cpp + client/qrwidget.h + client/doorlock-client.cpp + client/mainwindow.h) add_library(doorlock STATIC ${LIBDOORLOCK_SRCS}) target_link_libraries(doorlock jsoncpp ldap ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) diff --git a/doorlockd/src/doorlock-client.cpp b/doorlockd/client/doorlock-client.cpp similarity index 97% rename from doorlockd/src/doorlock-client.cpp rename to doorlockd/client/doorlock-client.cpp index 0772db2..d8e29f0 100644 --- a/doorlockd/src/doorlock-client.cpp +++ b/doorlockd/client/doorlock-client.cpp @@ -6,10 +6,11 @@ #include #include -#include "clientmessage.h" #include "config.h" -#include "logger.h" -#include "response.h" + +#include "../lib/clientmessage.h" +#include "../lib/logger.h" +#include "../lib/response.h" #include "mainwindow.h" diff --git a/doorlockd/src/mainwindow.h b/doorlockd/client/mainwindow.h similarity index 100% rename from doorlockd/src/mainwindow.h rename to doorlockd/client/mainwindow.h diff --git a/doorlockd/src/qrwidget.cpp b/doorlockd/client/qrwidget.cpp similarity index 100% rename from doorlockd/src/qrwidget.cpp rename to doorlockd/client/qrwidget.cpp diff --git a/doorlockd/src/qrwidget.h b/doorlockd/client/qrwidget.h similarity index 100% rename from doorlockd/src/qrwidget.h rename to doorlockd/client/qrwidget.h diff --git a/doorlockd/src/daemon.cpp b/doorlockd/daemon/daemon.cpp similarity index 100% rename from doorlockd/src/daemon.cpp rename to doorlockd/daemon/daemon.cpp diff --git a/doorlockd/src/daemon.h b/doorlockd/daemon/daemon.h similarity index 100% rename from doorlockd/src/daemon.h rename to doorlockd/daemon/daemon.h diff --git a/doorlockd/src/doorlockd.cpp b/doorlockd/daemon/doorlockd.cpp similarity index 99% rename from doorlockd/src/doorlockd.cpp rename to doorlockd/daemon/doorlockd.cpp index 7e644e1..fbefc63 100644 --- a/doorlockd/src/doorlockd.cpp +++ b/doorlockd/daemon/doorlockd.cpp @@ -10,10 +10,11 @@ #include -#include "daemon.h" +#include "../lib/logic.h" +#include "../lib/util.h" + #include "config.h" -#include "logic.h" -#include "util.h" +#include "daemon.h" namespace po = boost::program_options; using boost::asio::ip::tcp; diff --git a/doorlockd/src/clientmessage.cpp b/doorlockd/lib/clientmessage.cpp similarity index 100% rename from doorlockd/src/clientmessage.cpp rename to doorlockd/lib/clientmessage.cpp diff --git a/doorlockd/src/clientmessage.h b/doorlockd/lib/clientmessage.h similarity index 100% rename from doorlockd/src/clientmessage.h rename to doorlockd/lib/clientmessage.h diff --git a/doorlockd/src/door.cpp b/doorlockd/lib/door.cpp similarity index 100% rename from doorlockd/src/door.cpp rename to doorlockd/lib/door.cpp diff --git a/doorlockd/src/door.h b/doorlockd/lib/door.h similarity index 100% rename from doorlockd/src/door.h rename to doorlockd/lib/door.h diff --git a/doorlockd/src/doormessage.h b/doorlockd/lib/doormessage.h similarity index 100% rename from doorlockd/src/doormessage.h rename to doorlockd/lib/doormessage.h diff --git a/doorlockd/src/logger.cpp b/doorlockd/lib/logger.cpp similarity index 100% rename from doorlockd/src/logger.cpp rename to doorlockd/lib/logger.cpp diff --git a/doorlockd/src/logger.h b/doorlockd/lib/logger.h similarity index 100% rename from doorlockd/src/logger.h rename to doorlockd/lib/logger.h diff --git a/doorlockd/src/logic.cpp b/doorlockd/lib/logic.cpp similarity index 100% rename from doorlockd/src/logic.cpp rename to doorlockd/lib/logic.cpp diff --git a/doorlockd/src/logic.h b/doorlockd/lib/logic.h similarity index 100% rename from doorlockd/src/logic.h rename to doorlockd/lib/logic.h diff --git a/doorlockd/src/response.cpp b/doorlockd/lib/response.cpp similarity index 100% rename from doorlockd/src/response.cpp rename to doorlockd/lib/response.cpp diff --git a/doorlockd/src/response.h b/doorlockd/lib/response.h similarity index 100% rename from doorlockd/src/response.h rename to doorlockd/lib/response.h diff --git a/doorlockd/src/util.cpp b/doorlockd/lib/util.cpp similarity index 100% rename from doorlockd/src/util.cpp rename to doorlockd/lib/util.cpp diff --git a/doorlockd/src/util.h b/doorlockd/lib/util.h similarity index 100% rename from doorlockd/src/util.h rename to doorlockd/lib/util.h