summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsockethandshakeoptions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/websockets/qwebsockethandshakeoptions.h')
-rw-r--r--src/websockets/qwebsockethandshakeoptions.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/websockets/qwebsockethandshakeoptions.h b/src/websockets/qwebsockethandshakeoptions.h
new file mode 100644
index 0000000..eac3344
--- /dev/null
+++ b/src/websockets/qwebsockethandshakeoptions.h
@@ -0,0 +1,49 @@
+// Copyright (C) 2022 Menlo Systems GmbH, author Arno Rehn <a.rehn@menlosystems.com>.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+
+#ifndef QWEBSOCKETHANDSHAKEOPTIONS_H
+#define QWEBSOCKETHANDSHAKEOPTIONS_H
+
+#include <QtCore/QSharedDataPointer>
+#include <QtCore/QStringList>
+
+#include "QtWebSockets/qwebsockets_global.h"
+
+QT_BEGIN_NAMESPACE
+
+class QWebSocketHandshakeOptionsPrivate;
+
+QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QWebSocketHandshakeOptionsPrivate, Q_WEBSOCKETS_EXPORT)
+
+class Q_WEBSOCKETS_EXPORT QWebSocketHandshakeOptions
+{
+public:
+ QWebSocketHandshakeOptions();
+ QWebSocketHandshakeOptions(const QWebSocketHandshakeOptions &other);
+ QWebSocketHandshakeOptions(QWebSocketHandshakeOptions &&other) noexcept = default;
+ ~QWebSocketHandshakeOptions();
+
+ QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QWebSocketHandshakeOptions)
+ QWebSocketHandshakeOptions &operator=(const QWebSocketHandshakeOptions &other);
+
+ void swap(QWebSocketHandshakeOptions &other) noexcept { d.swap(other.d); }
+
+ QStringList subprotocols() const;
+ void setSubprotocols(const QStringList &protocols);
+
+private:
+ bool equals(const QWebSocketHandshakeOptions &other) const;
+
+ friend bool operator==(const QWebSocketHandshakeOptions &lhs,
+ const QWebSocketHandshakeOptions &rhs) { return lhs.equals(rhs); }
+ friend bool operator!=(const QWebSocketHandshakeOptions &lhs,
+ const QWebSocketHandshakeOptions &rhs) { return !lhs.equals(rhs); }
+
+ QSharedDataPointer<QWebSocketHandshakeOptionsPrivate> d;
+ friend class QWebSocketHandshakeOptionsPrivate;
+};
+
+QT_END_NAMESPACE
+
+#endif // QWEBSOCKETHANDSHAKEOPTIONS_H