[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [KSecretService] b9c0f80: Move around files and split the large
From:       Michael Leupold <lemma () confuego ! org>
Date:       2010-11-09 19:14:26
Message-ID: 20101109191426.4933DA60DC () git ! kde ! org
[Download RAW message or body]


	A	 lib/secrettool.h	 [License: GPL(v2)]


	A	 lib/secrettool.cpp	 [License: GPL(v2)]

commit b9c0f805edb8d3a8dc26a82b3cf4205b9d76631a
Author: Michael Leupold <lemma@confuego.org>
Date:   Tue Aug 10 08:59:29 2010 +0000

    Move around files and split the large CMakeLists.txt into smaller chunks inside \
the various directories. This is natural as the sources are split into several static \
libraries anyway.  
    svn path=/trunk/playground/base/ksecretservice/; revision=1161503

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 364c932..aa0d29e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,56 +11,14 @@ INCLUDE_DIRECTORIES (
    ${QCA2_INCLUDE_DIR}
    ${CMAKE_SOURCE_DIR}
    ${CMAKE_CURRENT_BINARY_DIR}
+   lib
 )
 
-SET (ksecretservice_backend_SRCS
-   # Backend
-   backend/backendbase.cpp
-   backend/backendcollection.cpp
-   backend/backendcollectionmanager.cpp
-   backend/backenditem.cpp
-   backend/backendmaster.cpp
-   backend/asynccall.cpp
-   backend/securebuffer.cpp
-   backend/temporary/temporarycollection.cpp
-   backend/temporary/temporarycollectionmanager.cpp
-   backend/temporary/temporaryitem.cpp
-   backend/ksecret/ksecretfile.cpp
-   backend/ksecret/ksecretcollectionmanager.cpp
-   backend/ksecret/ksecretcollection.cpp
-   backend/ksecret/ksecretitem.cpp
-)
-
-KDE4_ADD_LIBRARY (ksecretservicebackend STATIC ${ksecretservice_backend_SRCS})
-TARGET_LINK_LIBRARIES (ksecretservicebackend ${KDE4_KDECORE_LIBS} ${QCA2_LIBRARIES})
-
-SET (ksecretservice_daemon_SRCS
-   # Daemon
-   daemon/item.cpp
-   daemon/collection.cpp
-   daemon/prompt.cpp
-   daemon/secret.cpp
-   daemon/service.cpp
-   daemon/session.cpp
-
-   # Daemon DBus adaptors
-   daemon/dbus/dbustypes.cpp
-   daemon/dbus/collectionadaptor.cpp
-   daemon/dbus/itemadaptor.cpp
-   daemon/dbus/promptadaptor.cpp
-   daemon/dbus/serviceadaptor.cpp
-   daemon/dbus/sessionadaptor.cpp
-
-   secrettool.cpp
-)
-
-KDE4_ADD_LIBRARY (ksecretservicedaemon STATIC ${ksecretservice_daemon_SRCS})
-TARGET_LINK_LIBRARIES (ksecretservicedaemon ${KDE4_KDECORE_LIBS} ${QCA2_LIBRARIES})
-
 KDE4_ADD_EXECUTABLE (ksecretserviced main.cpp)
 TARGET_LINK_LIBRARIES (ksecretserviced
    ksecretservicebackend
    ksecretservicedaemon
+   ksecretservicelib
    ${KDE4_KDEUI_LIBS}
 )
 
diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt
index 034a7f7..c2da991 100644
--- a/backend/CMakeLists.txt
+++ b/backend/CMakeLists.txt
@@ -1,2 +1,23 @@
 INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR})
 ADD_SUBDIRECTORY (tests)
+
+SET (ksecretservice_backend_SRCS
+   # Backend
+   backendbase.cpp
+   backendcollection.cpp
+   backendcollectionmanager.cpp
+   backenditem.cpp
+   backendmaster.cpp
+   asynccall.cpp
+   securebuffer.cpp
+   temporary/temporarycollection.cpp
+   temporary/temporarycollectionmanager.cpp
+   temporary/temporaryitem.cpp
+   ksecret/ksecretfile.cpp
+   ksecret/ksecretcollectionmanager.cpp
+   ksecret/ksecretcollection.cpp
+   ksecret/ksecretitem.cpp
+)
+
+KDE4_ADD_LIBRARY (ksecretservicebackend STATIC ${ksecretservice_backend_SRCS})
+TARGET_LINK_LIBRARIES (ksecretservicebackend ${KDE4_KDECORE_LIBS} ${QCA2_LIBRARIES})
\ No newline at end of file
diff --git a/backend/ksecret/ksecretcollection.cpp \
b/backend/ksecret/ksecretcollection.cpp index d4087d0..b2c4909 100644
--- a/backend/ksecret/ksecretcollection.cpp
+++ b/backend/ksecret/ksecretcollection.cpp
@@ -22,7 +22,7 @@
 #include "ksecretcollectionmanager.h"
 #include "ksecretfile.h"
 #include "../securebuffer.h"
-#include "secrettool.h"
+#include <secrettool.h>
 
 #include <QtCore/QBuffer>
 #include <QtCore/QFile>
diff --git a/backend/ksecret/ksecretcollectionmanager.cpp \
b/backend/ksecret/ksecretcollectionmanager.cpp index 7dc31d6..619d267 100644
--- a/backend/ksecret/ksecretcollectionmanager.cpp
+++ b/backend/ksecret/ksecretcollectionmanager.cpp
@@ -21,7 +21,7 @@
 #include "ksecretcollectionmanager.h"
 #include "ksecretcollection.h"
 
-#include "secrettool.h"
+#include <secrettool.h>
 
 #include <QtCore/QTimer>
 #include <QtCore/QDir>
diff --git a/backend/tests/CMakeLists.txt b/backend/tests/CMakeLists.txt
index be14404..3951b1d 100644
--- a/backend/tests/CMakeLists.txt
+++ b/backend/tests/CMakeLists.txt
@@ -1,7 +1,11 @@
 INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
 
-KDE4_ADD_EXECUTABLE (ksecretservice_backend_test backendtest.cpp \
                ../../secrettool.cpp)
-TARGET_LINK_LIBRARIES (ksecretservice_backend_test ksecretservicebackend \
${QT_QTTEST_LIBRARIES}) +KDE4_ADD_EXECUTABLE (ksecretservice_backend_test \
backendtest.cpp) +TARGET_LINK_LIBRARIES (ksecretservice_backend_test
+   ksecretservicebackend
+   ksecretservicelib
+   ${QT_QTTEST_LIBRARIES}
+)
 
 ADD_TEST (BackendItemCollectionHandlingTest ksecretservice_backend_test)
 
diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt
index 034a7f7..13bceb9 100644
--- a/daemon/CMakeLists.txt
+++ b/daemon/CMakeLists.txt
@@ -1,2 +1,23 @@
 INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR})
 ADD_SUBDIRECTORY (tests)
+
+SET (ksecretservice_daemon_SRCS
+   # Daemon
+   item.cpp
+   collection.cpp
+   prompt.cpp
+   secret.cpp
+   service.cpp
+   session.cpp
+
+   # Daemon DBus adaptors
+   dbus/dbustypes.cpp
+   dbus/collectionadaptor.cpp
+   dbus/itemadaptor.cpp
+   dbus/promptadaptor.cpp
+   dbus/serviceadaptor.cpp
+   dbus/sessionadaptor.cpp
+)
+
+KDE4_ADD_LIBRARY (ksecretservicedaemon STATIC ${ksecretservice_daemon_SRCS})
+TARGET_LINK_LIBRARIES (ksecretservicedaemon ${KDE4_KDECORE_LIBS} ${QCA2_LIBRARIES})
diff --git a/daemon/tests/CMakeLists.txt b/daemon/tests/CMakeLists.txt
index a776797..42b54ab 100644
--- a/daemon/tests/CMakeLists.txt
+++ b/daemon/tests/CMakeLists.txt
@@ -16,6 +16,7 @@ KDE4_ADD_EXECUTABLE (ksecretservice_daemon_test
 TARGET_LINK_LIBRARIES (ksecretservice_daemon_test
    ksecretservicebackend
    ksecretservicedaemon
+   ksecretservicelib
    ${QT_QTTEST_LIBRARIES}
 )
 
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 2095d54..7a28533 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -1,6 +1,7 @@
 SET (ksecretservice_lib_SRCS
    jobqueue.cpp
    queuedjob.cpp
+   secrettool.cpp
 )
 
 KDE4_ADD_LIBRARY (ksecretservicelib STATIC ${ksecretservice_lib_SRCS})
diff --git a/lib/secrettool.cpp b/lib/secrettool.cpp
new file mode 100644
index 0000000..41ee316
--- /dev/null
+++ b/lib/secrettool.cpp
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2010, Michael Leupold <lemma@confuego.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) version 3 or any later version
+ * accepted by the membership of KDE e.V. (or its successor approved
+ * by the membership of KDE e.V.), which shall act as a proxy
+ * defined in Section 14 of version 3 of the license.
+ *
+ * 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.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "secrettool.h"
+
+#include <QtCore/QUuid>
+#include <QtCore/QRegExp>
+
+QString createId()
+{
+   return QUuid::createUuid().toString().remove(QRegExp("[\\{\\}-]"));
+}
diff --git a/lib/secrettool.h b/lib/secrettool.h
new file mode 100644
index 0000000..26f3515
--- /dev/null
+++ b/lib/secrettool.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2010, Michael Leupold <lemma@confuego.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) version 3 or any later version
+ * accepted by the membership of KDE e.V. (or its successor approved
+ * by the membership of KDE e.V.), which shall act as a proxy
+ * defined in Section 14 of version 3 of the license.
+ *
+ * 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.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SECRETTOOL_H
+#define SECRETTOOL_H
+
+#include <QtCore/QString>
+
+/**
+  * Create a unique identifier for a collection.
+  *
+  * @return a uuid that can be used for a collection
+  */
+QString createId();
+
+#endif
diff --git a/secrettool.cpp b/secrettool.cpp
deleted file mode 100644
index 41ee316..0000000
--- a/secrettool.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2010, Michael Leupold <lemma@confuego.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) version 3 or any later version
- * accepted by the membership of KDE e.V. (or its successor approved
- * by the membership of KDE e.V.), which shall act as a proxy
- * defined in Section 14 of version 3 of the license.
- *
- * 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.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "secrettool.h"
-
-#include <QtCore/QUuid>
-#include <QtCore/QRegExp>
-
-QString createId()
-{
-   return QUuid::createUuid().toString().remove(QRegExp("[\\{\\}-]"));
-}
diff --git a/secrettool.h b/secrettool.h
deleted file mode 100644
index 26f3515..0000000
--- a/secrettool.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2010, Michael Leupold <lemma@confuego.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) version 3 or any later version
- * accepted by the membership of KDE e.V. (or its successor approved
- * by the membership of KDE e.V.), which shall act as a proxy
- * defined in Section 14 of version 3 of the license.
- *
- * 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.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef SECRETTOOL_H
-#define SECRETTOOL_H
-
-#include <QtCore/QString>
-
-/**
-  * Create a unique identifier for a collection.
-  *
-  * @return a uuid that can be used for a collection
-  */
-QString createId();
-
-#endif


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic