aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-06-20 15:40:34 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-06-21 09:02:51 +0200
commit7eb12e4cd3be60b4aaf18530d0c927bef386e913 (patch)
tree1f1e574e47bfaf44d78cf60609833088d6e718ab /sources
parent46b61c8e5fb69fd098eeb0609af0cfef84c7f60e (diff)
Add the QHttpServer classes
Change-Id: I9b58e806019ee7294da466a5fce1f1b7ed01c8a3 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources')
-rw-r--r--sources/pyside6/PySide6/QtHttpServer/CMakeLists.txt42
-rw-r--r--sources/pyside6/PySide6/QtHttpServer/typesystem_httpserver.xml23
-rw-r--r--sources/pyside6/cmake/PySideHelpers.cmake1
-rw-r--r--sources/pyside6/tests/QtHttpServer/CMakeLists.txt1
4 files changed, 67 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/QtHttpServer/CMakeLists.txt b/sources/pyside6/PySide6/QtHttpServer/CMakeLists.txt
new file mode 100644
index 000000000..6c10ec9a4
--- /dev/null
+++ b/sources/pyside6/PySide6/QtHttpServer/CMakeLists.txt
@@ -0,0 +1,42 @@
+project(QtHttpServer)
+
+set(QtHttpServer_SRC
+ ${QtHttpServer_GEN_DIR}/qabstracthttpserver_wrapper.cpp
+ ${QtHttpServer_GEN_DIR}/qfuturehttpserverresponse_wrapper.cpp
+ ${QtHttpServer_GEN_DIR}/qhttpserver_wrapper.cpp
+ ${QtHttpServer_GEN_DIR}/qhttpserverfutureresponse_wrapper.cpp
+ ${QtHttpServer_GEN_DIR}/qhttpserverresponder_wrapper.cpp
+ ${QtHttpServer_GEN_DIR}/qhttpserverrequest_wrapper.cpp
+ ${QtHttpServer_GEN_DIR}/qhttpserverresponse_wrapper.cpp
+ ${QtHttpServer_GEN_DIR}/qhttpserverrouter_wrapper.cpp
+ ${QtHttpServer_GEN_DIR}/qhttpserverrouterrule_wrapper.cpp
+# module is always needed
+ ${QtHttpServer_GEN_DIR}/qthttpserver_module_wrapper.cpp)
+
+set(QtHttpServer_include_dirs ${QtHttpServer_SOURCE_DIR}
+ ${QtHttpServer_BINARY_DIR}
+ ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Concurrent_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS}
+ ${Qt${QT_MAJOR_VERSION}WebSockets_INCLUDE_DIRS}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_GEN_DIR}
+ ${QtConcurrent_GEN_DIR}
+ ${QtNetwork_GEN_DIR}
+ ${QtWebSockets_GEN_DIR})
+
+set(QtHttpServer_libraries pyside6
+ ${Qt${QT_MAJOR_VERSION}HttpServer_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Core_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Concurrent_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}Network_LIBRARIES}
+ ${Qt${QT_MAJOR_VERSION}WebSockets_LIBRARIES})
+
+set(QtHttpServer_deps QtCore QtConcurrent QtNetwork QtWebSockets)
+
+create_pyside_module(NAME QtHttpServer
+ INCLUDE_DIRS QtHttpServer_include_dirs
+ LIBRARIES QtHttpServer_libraries
+ DEPS QtHttpServer_deps
+ TYPESYSTEM_PATH QtHttpServer_SOURCE_DIR
+ SOURCES QtHttpServer_SRC)
diff --git a/sources/pyside6/PySide6/QtHttpServer/typesystem_httpserver.xml b/sources/pyside6/PySide6/QtHttpServer/typesystem_httpserver.xml
new file mode 100644
index 000000000..9f4ea243f
--- /dev/null
+++ b/sources/pyside6/PySide6/QtHttpServer/typesystem_httpserver.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+-->
+<typesystem package="PySide6.QtHttpServer">
+ <load-typesystem name="QtConcurrent/typesystem_concurrent.xml" generate="no"/>
+ <load-typesystem name="QtWebSockets/typesystem_websockets.xml" generate="no"/>
+
+ <typedef-type name="QFutureHttpServerResponse" source="QFuture&lt;QHttpServerResponse&gt;"/>
+ <object-type name="QAbstractHttpServer"/>
+ <object-type name="QHttpServer"/>
+ <object-type name="QHttpServerFutureResponse"/>
+ <object-type name="QHttpServerResponder">
+ <enum-type name="StatusCode"/>
+ </object-type>
+ <object-type name="QHttpServerRequest">
+ <enum-type name="Method" flags="Methods"/>
+ </object-type>
+ <object-type name="QHttpServerResponse"/>
+ <object-type name="QHttpServerRouter"/>
+ <object-type name="QHttpServerRouterRule"/>
+</typesystem>
diff --git a/sources/pyside6/cmake/PySideHelpers.cmake b/sources/pyside6/cmake/PySideHelpers.cmake
index 0de8e1bdc..d4e7c7959 100644
--- a/sources/pyside6/cmake/PySideHelpers.cmake
+++ b/sources/pyside6/cmake/PySideHelpers.cmake
@@ -86,6 +86,7 @@ macro(collect_optional_modules)
Designer
Xml
Help Multimedia
+ HttpServer
MultimediaWidgets
OpenGL
OpenGLWidgets
diff --git a/sources/pyside6/tests/QtHttpServer/CMakeLists.txt b/sources/pyside6/tests/QtHttpServer/CMakeLists.txt
new file mode 100644
index 000000000..2f7cb08b9
--- /dev/null
+++ b/sources/pyside6/tests/QtHttpServer/CMakeLists.txt
@@ -0,0 +1 @@
+# Please add some tests, here