From a60cfc8ab4fbc97646b8770a43894380971efabe Mon Sep 17 00:00:00 2001 From: Nathan Osman Date: Fri, 17 Jul 2015 12:42:25 -0700 Subject: [PATCH] Moved all of the header files to a separate directory. --- examples/chatserver/apihandler.h | 2 +- examples/chatserver/main.cpp | 6 ++--- examples/fileserver/main.cpp | 4 ++-- src/CMakeLists.txt | 27 ++++------------------ src/{ => QHttpEngine}/QFilesystemHandler | 0 src/{ => QHttpEngine}/QHttpHandler | 0 src/{ => QHttpEngine}/QHttpParser | 0 src/{ => QHttpEngine}/QHttpServer | 0 src/{ => QHttpEngine}/QHttpSocket | 0 src/{ => QHttpEngine}/QIByteArray | 0 src/{ => QHttpEngine}/QIODeviceCopier | 0 src/{ => QHttpEngine}/QLocalFile | 0 src/{ => QHttpEngine}/QObjectHandler | 0 src/{ => QHttpEngine}/qfilesystemhandler.h | 1 - src/{ => QHttpEngine}/qhttphandler.h | 1 - src/{ => QHttpEngine}/qhttpparser.h | 1 - src/{ => QHttpEngine}/qhttpserver.h | 1 - src/{ => QHttpEngine}/qhttpsocket.h | 1 - src/{ => QHttpEngine}/qibytearray.h | 1 - src/{ => QHttpEngine}/qiodevicecopier.h | 1 - src/{ => QHttpEngine}/qlocalfile.h | 1 - src/{ => QHttpEngine}/qobjecthandler.h | 1 - src/qfilesystemhandler.cpp | 4 ++-- src/qfilesystemhandler_p.h | 4 ++-- src/qhttphandler.cpp | 3 ++- src/qhttphandler_p.h | 2 +- src/qhttpparser.cpp | 2 +- src/qhttpserver.cpp | 4 ++-- src/qhttpserver_p.h | 4 ++-- src/qhttpsocket.cpp | 2 +- src/qhttpsocket_p.h | 4 ++-- src/qibytearray.cpp | 2 +- src/qiodevicecopier.cpp | 2 +- src/qiodevicecopier_p.h | 2 +- src/qlocalfile.cpp | 2 +- src/qlocalfile_p.h | 2 +- src/qobjecthandler.cpp | 2 +- src/qobjecthandler_p.h | 4 ++-- tests/TestQFilesystemHandler.cpp | 4 ++-- tests/TestQHttpHandler.cpp | 4 ++-- tests/TestQHttpParser.cpp | 4 ++-- tests/TestQHttpServer.cpp | 4 ++-- tests/TestQHttpSocket.cpp | 4 ++-- tests/TestQIByteArray.cpp | 2 +- tests/TestQIODeviceCopier.cpp | 2 +- tests/TestQLocalFile.cpp | 2 +- tests/TestQObjectHandler.cpp | 4 ++-- tests/common/qsimplehttpclient.h | 2 +- 48 files changed, 49 insertions(+), 76 deletions(-) rename src/{ => QHttpEngine}/QFilesystemHandler (100%) rename src/{ => QHttpEngine}/QHttpHandler (100%) rename src/{ => QHttpEngine}/QHttpParser (100%) rename src/{ => QHttpEngine}/QHttpServer (100%) rename src/{ => QHttpEngine}/QHttpSocket (100%) rename src/{ => QHttpEngine}/QIByteArray (100%) rename src/{ => QHttpEngine}/QIODeviceCopier (100%) rename src/{ => QHttpEngine}/QLocalFile (100%) rename src/{ => QHttpEngine}/QObjectHandler (100%) rename src/{ => QHttpEngine}/qfilesystemhandler.h (97%) rename src/{ => QHttpEngine}/qhttphandler.h (99%) rename src/{ => QHttpEngine}/qhttpparser.h (98%) rename src/{ => QHttpEngine}/qhttpserver.h (98%) rename src/{ => QHttpEngine}/qhttpsocket.h (99%) rename src/{ => QHttpEngine}/qibytearray.h (98%) rename src/{ => QHttpEngine}/qiodevicecopier.h (98%) rename src/{ => QHttpEngine}/qlocalfile.h (98%) rename src/{ => QHttpEngine}/qobjecthandler.h (98%) diff --git a/examples/chatserver/apihandler.h b/examples/chatserver/apihandler.h index 072f6a5..373d6c6 100644 --- a/examples/chatserver/apihandler.h +++ b/examples/chatserver/apihandler.h @@ -25,7 +25,7 @@ #include -#include +#include class ApiHandler : public QObjectHandler { diff --git a/examples/chatserver/main.cpp b/examples/chatserver/main.cpp index 0d10cfb..d8a26da 100644 --- a/examples/chatserver/main.cpp +++ b/examples/chatserver/main.cpp @@ -27,9 +27,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "apihandler.h" diff --git a/examples/fileserver/main.cpp b/examples/fileserver/main.cpp index ca3c2bb..f6cb8bb 100644 --- a/examples/fileserver/main.cpp +++ b/examples/fileserver/main.cpp @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include int main(int argc, char * argv[]) { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5ec6ec3..7d5dbff 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,26 +1,7 @@ configure_file(qhttpengine.h.in "${CMAKE_CURRENT_BINARY_DIR}/qhttpengine.h") -set(HEADERS - "${CMAKE_CURRENT_BINARY_DIR}/qhttpengine.h" - QFilesystemHandler - qfilesystemhandler.h - QHttpHandler - qhttphandler.h - QHttpParser - qhttpparser.h - QHttpServer - qhttpserver.h - QHttpSocket - qhttpsocket.h - QIByteArray - qibytearray.h - QIODeviceCopier - qiodevicecopier.h - QLocalFile - qlocalfile.h - QObjectHandler - qobjecthandler.h -) +file(GLOB HEADERS "${PROJECT_NAME}/*") +set(HEADERS "${HEADERS}" "${CMAKE_CURRENT_BINARY_DIR}/qhttpengine.h") set(SRC qfilesystemhandler.cpp @@ -42,13 +23,13 @@ else() set(OUTPUT_NAME ${PROJECT_NAME}) endif() -add_library(qhttpengine SHARED ${SRC}) +add_library(qhttpengine SHARED ${HEADERS} ${SRC}) qt5_use_modules(qhttpengine Network) target_include_directories(qhttpengine PUBLIC "$" "$" - "$" + "$" ) set_target_properties(qhttpengine PROPERTIES diff --git a/src/QFilesystemHandler b/src/QHttpEngine/QFilesystemHandler similarity index 100% rename from src/QFilesystemHandler rename to src/QHttpEngine/QFilesystemHandler diff --git a/src/QHttpHandler b/src/QHttpEngine/QHttpHandler similarity index 100% rename from src/QHttpHandler rename to src/QHttpEngine/QHttpHandler diff --git a/src/QHttpParser b/src/QHttpEngine/QHttpParser similarity index 100% rename from src/QHttpParser rename to src/QHttpEngine/QHttpParser diff --git a/src/QHttpServer b/src/QHttpEngine/QHttpServer similarity index 100% rename from src/QHttpServer rename to src/QHttpEngine/QHttpServer diff --git a/src/QHttpSocket b/src/QHttpEngine/QHttpSocket similarity index 100% rename from src/QHttpSocket rename to src/QHttpEngine/QHttpSocket diff --git a/src/QIByteArray b/src/QHttpEngine/QIByteArray similarity index 100% rename from src/QIByteArray rename to src/QHttpEngine/QIByteArray diff --git a/src/QIODeviceCopier b/src/QHttpEngine/QIODeviceCopier similarity index 100% rename from src/QIODeviceCopier rename to src/QHttpEngine/QIODeviceCopier diff --git a/src/QLocalFile b/src/QHttpEngine/QLocalFile similarity index 100% rename from src/QLocalFile rename to src/QHttpEngine/QLocalFile diff --git a/src/QObjectHandler b/src/QHttpEngine/QObjectHandler similarity index 100% rename from src/QObjectHandler rename to src/QHttpEngine/QObjectHandler diff --git a/src/qfilesystemhandler.h b/src/QHttpEngine/qfilesystemhandler.h similarity index 97% rename from src/qfilesystemhandler.h rename to src/QHttpEngine/qfilesystemhandler.h index 82fcf90..3a76668 100644 --- a/src/qfilesystemhandler.h +++ b/src/QHttpEngine/qfilesystemhandler.h @@ -29,7 +29,6 @@ class QHTTPENGINE_EXPORT QFilesystemHandlerPrivate; /** - * @class QFilesystemHandler qfilesystemhandler.h QFilesystemHandler * @brief Handler for filesystem requests * * This handler responds to requests for resources on a local filesystem. The diff --git a/src/qhttphandler.h b/src/QHttpEngine/qhttphandler.h similarity index 99% rename from src/qhttphandler.h rename to src/QHttpEngine/qhttphandler.h index 785720d..1c9b727 100644 --- a/src/qhttphandler.h +++ b/src/QHttpEngine/qhttphandler.h @@ -32,7 +32,6 @@ class QHTTPENGINE_EXPORT QHttpHandlerPrivate; /** * @brief Base class for URL handlers - * @headerfile qhttphandler.h QHttpHandler * * When a request is received by a QHttpServer, it invokes the route() method * of its handler which is used to determine what happens to the request. All diff --git a/src/qhttpparser.h b/src/QHttpEngine/qhttpparser.h similarity index 98% rename from src/qhttpparser.h rename to src/QHttpEngine/qhttpparser.h index 87047e6..1f2559a 100644 --- a/src/qhttpparser.h +++ b/src/QHttpEngine/qhttpparser.h @@ -39,7 +39,6 @@ typedef QMap QHttpHeaderMap; /** * @brief Utility methods for parsing HTTP requests and responses - * @headerfile qhttpparser.h QHttpParser * * This class provides a set of static methods for parsing HTTP request and * response headers. Functionality is broken up into smaller methods in order diff --git a/src/qhttpserver.h b/src/QHttpEngine/qhttpserver.h similarity index 98% rename from src/qhttpserver.h rename to src/QHttpEngine/qhttpserver.h index 59de2bc..6cbf97d 100644 --- a/src/qhttpserver.h +++ b/src/QHttpEngine/qhttpserver.h @@ -34,7 +34,6 @@ class QHTTPENGINE_EXPORT QHttpServerPrivate; /** * @brief HTTP server - * @headerfile qhttpserver.h QHttpServer * * This class provides a TCP server that listens for HTTP requests on the * specified address and port. When a new request is received, a QHttpSocket diff --git a/src/qhttpsocket.h b/src/QHttpEngine/qhttpsocket.h similarity index 99% rename from src/qhttpsocket.h rename to src/QHttpEngine/qhttpsocket.h index 42be233..7950a8d 100644 --- a/src/qhttpsocket.h +++ b/src/QHttpEngine/qhttpsocket.h @@ -32,7 +32,6 @@ class QHTTPENGINE_EXPORT QHttpSocketPrivate; /** * @brief Implementation of the HTTP protocol - * @headerfile qhttpsocket.h QHttpSocket * * QHttpSocket provides a class derived from QIODevice that can be used to * read data from and write data to an HTTP client through a QTcpSocket diff --git a/src/qibytearray.h b/src/QHttpEngine/qibytearray.h similarity index 98% rename from src/qibytearray.h rename to src/QHttpEngine/qibytearray.h index d7534ba..2a5d2f4 100644 --- a/src/qibytearray.h +++ b/src/QHttpEngine/qibytearray.h @@ -29,7 +29,6 @@ /** * @brief Case-insensitive subclass of QByteArray - * @headerfile qibytearray.h QIByteArray * * The QIByteArray is identical to the QByteArray class in all aspects except * that it performs comparisons in a case-insensitive manner. diff --git a/src/qiodevicecopier.h b/src/QHttpEngine/qiodevicecopier.h similarity index 98% rename from src/qiodevicecopier.h rename to src/QHttpEngine/qiodevicecopier.h index 939e888..ca8defe 100644 --- a/src/qiodevicecopier.h +++ b/src/QHttpEngine/qiodevicecopier.h @@ -32,7 +32,6 @@ class QHTTPENGINE_EXPORT QIODeviceCopierPrivate; /** * @brief Device copier - * @headerfile qiodevicecopier.h QIODeviceCopier * * QIODeviceCopier provides a set of methods for reading data from a QIODevice * and writing it to another. The class operates asynchronously and therefore diff --git a/src/qlocalfile.h b/src/QHttpEngine/qlocalfile.h similarity index 98% rename from src/qlocalfile.h rename to src/QHttpEngine/qlocalfile.h index 2bc1ad9..bb749fb 100644 --- a/src/qlocalfile.h +++ b/src/QHttpEngine/qlocalfile.h @@ -31,7 +31,6 @@ class QHTTPENGINE_EXPORT QLocalFilePrivate; /** * @brief Locally accessible file - * @headerfile qlocalfile.h QLocalFile * * QLocalFile uses platform-specific functions to create a file containing * information that will be accessible only to the local user. This is diff --git a/src/qobjecthandler.h b/src/QHttpEngine/qobjecthandler.h similarity index 98% rename from src/qobjecthandler.h rename to src/QHttpEngine/qobjecthandler.h index 8db44e3..580f7be 100644 --- a/src/qobjecthandler.h +++ b/src/QHttpEngine/qobjecthandler.h @@ -30,7 +30,6 @@ class QHTTPENGINE_EXPORT QObjectHandlerPrivate; /** * @brief Handler for invoking slots - * @headerfile qobjecthandler.h QObjectHandler * * This handler enables incoming requests to invoke a matching slot in a * QObject-derived class. The request body is expected to contain parameters diff --git a/src/qfilesystemhandler.cpp b/src/qfilesystemhandler.cpp index 1ef6794..d1c739b 100644 --- a/src/qfilesystemhandler.cpp +++ b/src/qfilesystemhandler.cpp @@ -25,9 +25,9 @@ #include #include -#include "qfilesystemhandler.h" +#include "QHttpEngine/qfilesystemhandler.h" +#include "QHttpEngine/qiodevicecopier.h" #include "qfilesystemhandler_p.h" -#include "qiodevicecopier.h" // Template for listing directory contents const QString ListTemplate = diff --git a/src/qfilesystemhandler_p.h b/src/qfilesystemhandler_p.h index 23a2f4c..168bebf 100644 --- a/src/qfilesystemhandler_p.h +++ b/src/qfilesystemhandler_p.h @@ -27,8 +27,8 @@ #include #include -#include "qfilesystemhandler.h" -#include "qhttpsocket.h" +#include "QHttpEngine/qfilesystemhandler.h" +#include "QHttpEngine/qhttpsocket.h" class QFilesystemHandlerPrivate : public QObject { diff --git a/src/qhttphandler.cpp b/src/qhttphandler.cpp index 9934542..1092e89 100644 --- a/src/qhttphandler.cpp +++ b/src/qhttphandler.cpp @@ -20,7 +20,8 @@ * IN THE SOFTWARE. */ -#include "qhttphandler.h" +#include + #include "qhttphandler_p.h" QHttpHandlerPrivate::QHttpHandlerPrivate(QHttpHandler *handler) diff --git a/src/qhttphandler_p.h b/src/qhttphandler_p.h index 57b07e3..bd0592a 100644 --- a/src/qhttphandler_p.h +++ b/src/qhttphandler_p.h @@ -28,7 +28,7 @@ #include #include -#include "qhttphandler.h" +#include "QHttpEngine/qhttphandler.h" typedef QPair Redirect; typedef QPair SubHandler; diff --git a/src/qhttpparser.cpp b/src/qhttpparser.cpp index f5c1a59..c6e6dae 100644 --- a/src/qhttpparser.cpp +++ b/src/qhttpparser.cpp @@ -22,7 +22,7 @@ #include -#include "qhttpparser.h" +#include "QHttpEngine/qhttpparser.h" void QHttpParser::split(const QByteArray &data, const QByteArray &delim, int maxSplit, QList &parts) { diff --git a/src/qhttpserver.cpp b/src/qhttpserver.cpp index 6f6db34..cfdcb6a 100644 --- a/src/qhttpserver.cpp +++ b/src/qhttpserver.cpp @@ -22,9 +22,9 @@ #include -#include "qhttpserver.h" +#include "QHttpEngine/qhttpserver.h" +#include "QHttpEngine/qhttpsocket.h" #include "qhttpserver_p.h" -#include "qhttpsocket.h" QHttpServerPrivate::QHttpServerPrivate(QHttpServer *httpServer) : QObject(httpServer), diff --git a/src/qhttpserver_p.h b/src/qhttpserver_p.h index aea8027..ff1e185 100644 --- a/src/qhttpserver_p.h +++ b/src/qhttpserver_p.h @@ -26,8 +26,8 @@ #include #include -#include "qhttphandler.h" -#include "qhttpserver.h" +#include "QHttpEngine/qhttphandler.h" +#include "QHttpEngine/qhttpserver.h" class QHttpServerPrivate : public QObject { diff --git a/src/qhttpsocket.cpp b/src/qhttpsocket.cpp index de57281..0cdaff0 100644 --- a/src/qhttpsocket.cpp +++ b/src/qhttpsocket.cpp @@ -22,7 +22,7 @@ #include -#include "qhttpsocket.h" +#include "QHttpEngine/qhttpsocket.h" #include "qhttpsocket_p.h" // Predefined error response requires a simple HTML template to be returned to diff --git a/src/qhttpsocket_p.h b/src/qhttpsocket_p.h index a166fa1..ad83db0 100644 --- a/src/qhttpsocket_p.h +++ b/src/qhttpsocket_p.h @@ -26,8 +26,8 @@ #include #include -#include "qhttpparser.h" -#include "qhttpsocket.h" +#include "QHttpEngine/qhttpparser.h" +#include "QHttpEngine/qhttpsocket.h" class QHttpSocketPrivate : public QObject { diff --git a/src/qibytearray.cpp b/src/qibytearray.cpp index 4722607..1e12a0e 100644 --- a/src/qibytearray.cpp +++ b/src/qibytearray.cpp @@ -22,7 +22,7 @@ #include -#include "qibytearray.h" +#include "QHttpEngine/qibytearray.h" QIByteArray::QIByteArray() {} diff --git a/src/qiodevicecopier.cpp b/src/qiodevicecopier.cpp index 4697f93..f9493f0 100644 --- a/src/qiodevicecopier.cpp +++ b/src/qiodevicecopier.cpp @@ -22,7 +22,7 @@ #include -#include "qiodevicecopier.h" +#include "QHttpEngine/qiodevicecopier.h" #include "qiodevicecopier_p.h" // Default value for the bufferSize property diff --git a/src/qiodevicecopier_p.h b/src/qiodevicecopier_p.h index 880db4c..aa94a0c 100644 --- a/src/qiodevicecopier_p.h +++ b/src/qiodevicecopier_p.h @@ -26,7 +26,7 @@ #include #include -#include "qiodevicecopier.h" +#include "QHttpEngine/qiodevicecopier.h" class QIODeviceCopierPrivate : public QObject { diff --git a/src/qlocalfile.cpp b/src/qlocalfile.cpp index 4b037c7..f884ff6 100644 --- a/src/qlocalfile.cpp +++ b/src/qlocalfile.cpp @@ -30,7 +30,7 @@ # include #endif -#include "qlocalfile.h" +#include "QHttpEngine/qlocalfile.h" #include "qlocalfile_p.h" QLocalFilePrivate::QLocalFilePrivate(QLocalFile *localFile) diff --git a/src/qlocalfile_p.h b/src/qlocalfile_p.h index 3dcd3d3..3db73a1 100644 --- a/src/qlocalfile_p.h +++ b/src/qlocalfile_p.h @@ -25,7 +25,7 @@ #include -#include "qlocalfile.h" +#include "QHttpEngine/qlocalfile.h" class QLocalFilePrivate : public QObject { diff --git a/src/qobjecthandler.cpp b/src/qobjecthandler.cpp index dd58b14..298d3f9 100644 --- a/src/qobjecthandler.cpp +++ b/src/qobjecthandler.cpp @@ -28,7 +28,7 @@ #include #include -#include "qobjecthandler.h" +#include "QHttpEngine/qobjecthandler.h" #include "qobjecthandler_p.h" QObjectHandlerPrivate::QObjectHandlerPrivate(QObjectHandler *handler) diff --git a/src/qobjecthandler_p.h b/src/qobjecthandler_p.h index f93b5d6..5483172 100644 --- a/src/qobjecthandler_p.h +++ b/src/qobjecthandler_p.h @@ -26,8 +26,8 @@ #include #include -#include "qhttpsocket.h" -#include "qobjecthandler.h" +#include "QHttpEngine/qhttpsocket.h" +#include "QHttpEngine/qobjecthandler.h" class QObjectHandlerPrivate : public QObject { diff --git a/tests/TestQFilesystemHandler.cpp b/tests/TestQFilesystemHandler.cpp index 274a6f4..622f6b4 100644 --- a/tests/TestQFilesystemHandler.cpp +++ b/tests/TestQFilesystemHandler.cpp @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include #include "common/qsimplehttpclient.h" #include "common/qsocketpair.h" diff --git a/tests/TestQHttpHandler.cpp b/tests/TestQHttpHandler.cpp index 28826e7..bb3d02e 100644 --- a/tests/TestQHttpHandler.cpp +++ b/tests/TestQHttpHandler.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include "common/qsimplehttpclient.h" #include "common/qsocketpair.h" diff --git a/tests/TestQHttpParser.cpp b/tests/TestQHttpParser.cpp index 47700f3..e50ceb2 100644 --- a/tests/TestQHttpParser.cpp +++ b/tests/TestQHttpParser.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include typedef QList QByteArrayList; diff --git a/tests/TestQHttpServer.cpp b/tests/TestQHttpServer.cpp index f040505..0e9bac3 100644 --- a/tests/TestQHttpServer.cpp +++ b/tests/TestQHttpServer.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include "common/qsimplehttpclient.h" diff --git a/tests/TestQHttpSocket.cpp b/tests/TestQHttpSocket.cpp index 3733a2d..3513418 100644 --- a/tests/TestQHttpSocket.cpp +++ b/tests/TestQHttpSocket.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include "common/qsimplehttpclient.h" #include "common/qsocketpair.h" diff --git a/tests/TestQIByteArray.cpp b/tests/TestQIByteArray.cpp index 9f7b6af..6029857 100644 --- a/tests/TestQIByteArray.cpp +++ b/tests/TestQIByteArray.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include const char *Value1 = "test"; const char *Value2 = "TEST"; diff --git a/tests/TestQIODeviceCopier.cpp b/tests/TestQIODeviceCopier.cpp index f7b9a79..fe6a34c 100644 --- a/tests/TestQIODeviceCopier.cpp +++ b/tests/TestQIODeviceCopier.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include "common/qsocketpair.h" diff --git a/tests/TestQLocalFile.cpp b/tests/TestQLocalFile.cpp index 628f8fb..b273e05 100644 --- a/tests/TestQLocalFile.cpp +++ b/tests/TestQLocalFile.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include const QString ApplicationName = "QHttpEngine"; diff --git a/tests/TestQObjectHandler.cpp b/tests/TestQObjectHandler.cpp index 8bc9b52..8b5fc3d 100644 --- a/tests/TestQObjectHandler.cpp +++ b/tests/TestQObjectHandler.cpp @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include "common/qsimplehttpclient.h" #include "common/qsocketpair.h" diff --git a/tests/common/qsimplehttpclient.h b/tests/common/qsimplehttpclient.h index 993cacd..4fbce38 100644 --- a/tests/common/qsimplehttpclient.h +++ b/tests/common/qsimplehttpclient.h @@ -27,7 +27,7 @@ #include #include -#include +#include /** * @brief Simple HTTP client for testing purposes