KD SOAP  2.0.0
KDSoapServer.h
1 /****************************************************************************
2 **
3 ** This file is part of the KD Soap library.
4 **
5 ** SPDX-FileCopyrightText: 2010-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: LicenseRef-KDAB-KDSoap-AGPL3-Modified OR LicenseRef-KDAB-KDSoap OR LicenseRef-KDAB-KDSoap-US
8 **
9 ** Licensees holding valid commercial KD Soap licenses may use this file in
10 ** accordance with the KD Soap Commercial License Agreement provided with
11 ** the Software.
12 **
13 ** Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 **
15 ****************************************************************************/
16 #ifndef KDSOAPSERVER_H
17 #define KDSOAPSERVER_H
18 
19 #include "KDSoapServerGlobal.h"
20 #include <KDSoapClient/KDSoapMessage.h>
21 #include <QtNetwork/QTcpServer>
22 #include <QtNetwork/QSslConfiguration>
23 
24 class KDSoapThreadPool;
25 
35 class KDSOAPSERVER_EXPORT KDSoapServer : public QTcpServer
36 {
37  Q_OBJECT
38 public:
44  explicit KDSoapServer(QObject *parent = 0);
45 
50  ~KDSoapServer();
51 
52  enum Feature
53  {
54  Public = 0,
55  Ssl = 1,
56  AuthRequired = 2
57  // bitfield, next item is 4
58  };
59  Q_DECLARE_FLAGS(Features, Feature)
60 
61 
65  void setFeatures(Features features);
66 
70  Features features() const;
71 
79  void setThreadPool(KDSoapThreadPool *threadPool);
80 
84  KDSoapThreadPool *threadPool() const;
85 
92  void setPath(const QString &path);
93 
97  QString path() const;
98 
105  QString endPoint() const;
106 
116  virtual QObject *createServerObject() = 0;
117 
124  void setUse(KDSoapMessage::Use use);
128  KDSoapMessage::Use use() const;
129 
130  enum LogLevel
131  {
132  LogNothing,
133  LogFaults,
134  LogEveryCall
135  };
148  void setLogLevel(LogLevel level);
152  LogLevel logLevel() const;
153 
159  void setLogFileName(const QString &fileName);
160 
164  QString logFileName() const;
165 
169  void flushLogFile();
170 
175  void closeLogFile();
176 
184  void setMaxConnections(int sockets);
185 
191  int maxConnections() const;
192 
201  static bool setExpectedSocketCount(int sockets);
202 
210  int numConnectedSockets() const;
211 
217  int totalConnectionCount() const;
218 
223  void resetTotalConnectionCount();
224 
231  void setWsdlFile(const QString &file, const QString &pathInUrl);
232 
236  QString wsdlFile() const;
237 
241  QString wsdlPathInUrl() const;
242 
243 #ifndef QT_NO_SSL
244 
247  QSslConfiguration sslConfiguration() const;
248 
253  void setSslConfiguration(const QSslConfiguration &config);
254 #endif
255 
256 public Q_SLOTS:
261  void suspend();
262 
266  void resume();
267 
268 Q_SIGNALS:
274 
275 protected: void incomingConnection(qintptr socketDescriptor) override;
277 
278 private:
279  friend class KDSoapServerSocket;
280  void log(const QByteArray &text);
281  class Private;
282  Private *const d;
283 };
284 
285 #endif
KDSoapServer::createServerObject
virtual QObject * createServerObject()=0
KDSoapServer
Definition: KDSoapServer.h:36
KDSoapValue::Use
Use
Definition: KDSoapValue.h:272
QObject
QString
KDSoapThreadPool
Definition: KDSoapThreadPool.h:33
KDSoapServer::Feature
Feature
Definition: KDSoapServer.h:53
KDSoapServer::connectionRejected
void connectionRejected()
QByteArray

© 2010-2022 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-soap/
Generated on Fri Jul 22 2022 15:57:43 for KD SOAP by doxygen 1.8.20