KD SOAP API Documentation  2.1
KDSoapServer.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** This file is part of the KD Soap project.
4 **
5 ** SPDX-FileCopyrightText: 2010-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: MIT
8 **
9 ****************************************************************************/
10 #ifndef KDSOAPSERVER_H
11 #define KDSOAPSERVER_H
12 
13 #include "KDSoapServerGlobal.h"
15 #include <QtNetwork/QSslConfiguration>
16 #include <QtNetwork/QTcpServer>
17 
18 class KDSoapThreadPool;
19 
29 class KDSOAPSERVER_EXPORT KDSoapServer : public QTcpServer
30 {
31  Q_OBJECT
32 public:
38  explicit KDSoapServer(QObject *parent = 0);
39 
44  ~KDSoapServer();
45 
46  enum Feature
47  {
48  Public = 0,
49  Ssl = 1,
50  AuthRequired = 2
51  // bitfield, next item is 4
52  };
53  Q_DECLARE_FLAGS(Features, Feature)
54 
55 
59  void setFeatures(Features features);
60 
64  Features features() const;
65 
73  void setThreadPool(KDSoapThreadPool *threadPool);
74 
78  KDSoapThreadPool *threadPool() const;
79 
86  void setPath(const QString &path);
87 
91  QString path() const;
92 
99  QString endPoint() const;
100 
110  virtual QObject *createServerObject() = 0;
111 
118  void setUse(KDSoapMessage::Use use);
122  KDSoapMessage::Use use() const;
123 
124  enum LogLevel
125  {
128  LogEveryCall
129  };
142  void setLogLevel(LogLevel level);
146  LogLevel logLevel() const;
147 
153  void setLogFileName(const QString &fileName);
154 
158  QString logFileName() const;
159 
163  void flushLogFile();
164 
169  void closeLogFile();
170 
178  void setMaxConnections(int sockets);
179 
185  int maxConnections() const;
186 
195  static bool setExpectedSocketCount(int sockets);
196 
204  int numConnectedSockets() const;
205 
211  int totalConnectionCount() const;
212 
217  void resetTotalConnectionCount();
218 
225  void setWsdlFile(const QString &file, const QString &pathInUrl);
226 
230  QString wsdlFile() const;
231 
235  QString wsdlPathInUrl() const;
236 
237 #ifndef QT_NO_SSL
241  QSslConfiguration sslConfiguration() const;
242 
247  void setSslConfiguration(const QSslConfiguration &config);
248 #endif
249 
250 public Q_SLOTS:
255  void suspend();
256 
260  void resume();
261 
262 Q_SIGNALS:
268 
269 protected: void incomingConnection(qintptr socketDescriptor) override;
271 
272 private:
273  friend class KDSoapServerSocket;
274  void log(const QByteArray &text);
275  class Private;
276  Private *const d;
277 };
278 
279 #endif
#define KDSOAPSERVER_EXPORT
void connectionRejected()
virtual QObject * createServerObject()=0

© 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 Tue Jun 13 2023 12:18:34 for KD SOAP API Documentation by doxygen 1.9.1