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