AusweisApp
Lade ...
Suche ...
Keine Treffer
UiPluginWebSocket.h
gehe zur Dokumentation dieser Datei
1
5#pragma once
6
7#include "HttpRequest.h"
8#include "HttpServer.h"
9#include "UiPlugin.h"
10#include "UiPluginJson.h"
11
12#include <QDir>
13#include <QMap>
14#include <QScopedPointer>
15#include <QWebSocket>
16#include <QWebSocketServer>
17
18namespace governikus
19{
20
22 : public UiPlugin
23{
24 Q_OBJECT
25 Q_PLUGIN_METADATA(IID "governikus.UiPlugin" FILE "metadata.json")
26 Q_INTERFACES(governikus::UiPlugin)
27
28 private:
29 QSharedPointer<HttpServer> mHttpServer;
30 QWebSocketServer mServer;
31 QScopedPointer<QWebSocket, QScopedPointerDeleteLater> mConnection;
32 QSharedPointer<HttpRequest> mRequest;
33 QPointer<UiPluginJson> mJson;
34 QSharedPointer<WorkflowContext> mContext;
35 bool mUiDomination;
36 bool mUiDominationPrevUsedAsSDK;
37
38 private Q_SLOTS:
39 void doShutdown() override;
40 void onWorkflowStarted(const QSharedPointer<WorkflowRequest>& pRequest) override;
41 void onWorkflowFinished(const QSharedPointer<WorkflowRequest>& pRequest) override;
42 void onUiDomination(const UiPlugin* pUi, const QString& pInformation, bool pAccepted) override;
43 void onUiDominationReleased() override;
44 void onNewWebSocketRequest(const QSharedPointer<HttpRequest>& pRequest);
45 void onNewConnection();
46 void onClientDisconnected();
47 void onTextMessageReceived(const QString& pMessage);
48 void onJsonMessage(const QByteArray& pMessage);
49
50 public:
52 ~UiPluginWebSocket() override = default;
53
54 [[nodiscard]] bool initialize() override;
55};
56
57} // namespace governikus
Definition UiPluginWebSocket.h:23
bool initialize() override
Definition UiPluginWebSocket.cpp:40
~UiPluginWebSocket() override=default
UiPluginWebSocket()
Definition UiPluginWebSocket.cpp:27
Defines the AccessRight and AccessRole enum.
Definition CommandApdu.h:17