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
22
namespace
governikus
23
{
24
25
class
UIPlugInWebSocket
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
:
55
UIPlugInWebSocket
();
56
~UIPlugInWebSocket
()
override
=
default
;
57
58
[[
nodiscard
]]
bool
initialize
()
override
;
59
};
60
61
}
// namespace governikus
HttpRequest.h
HttpServer.h
UIPlugInJson.h
UIPlugIn.h
governikus::UIPlugInWebSocket
Definition
UIPlugInWebSocket.h:27
governikus::UIPlugInWebSocket::UIPlugInWebSocket
UIPlugInWebSocket()
Definition
UIPlugInWebSocket.cpp:27
governikus::UIPlugInWebSocket::~UIPlugInWebSocket
~UIPlugInWebSocket() override=default
governikus::UIPlugInWebSocket::initialize
bool initialize() override
Definition
UIPlugInWebSocket.cpp:40
governikus
Implementation of GeneralAuthenticate response APDUs.
Definition
CommandApdu.h:16
governikus::decodeObject
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition
ASN1TemplateUtil.h:114
src
ui
websocket
UIPlugInWebSocket.h
Erzeugt von
1.10.0