AusweisApp
Lade ...
Suche ...
Keine Treffer
UIPlugInWebService.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
11#include "HttpHandler.h"
12#include "HttpRequest.h"
13#include "HttpServer.h"
14#include "UIPlugIn.h"
15
16#include "context/AuthContext.h"
17
18class test_UIPlugInWebService;
19class test_UIPlugInWebServiceBrowserHandler;
20
21namespace governikus
22{
23
28 : public UIPlugIn
29 , private HttpHandler
30{
32 Q_PLUGIN_METADATA(IID "governikus.UIPlugIn" FILE "metadata.json")
33 Q_INTERFACES(governikus::UIPlugIn)
36
37 private:
38 enum class ExistingAppResult : int
39 {
40 REBIND_SUCCEED,
41 REBIND_FAILED,
42 SHOWUI_SUCCEED,
43 SHOWUI_TIMEOUT
44 };
45
47
48 [[nodiscard]] bool listening();
49 [[nodiscard]] bool initialize() override;
50 [[nodiscard]] ExistingAppResult handleExistingApp(quint16 pPort, const QHostAddress& pHost) const;
51
52 void setCommonHeaders(HttpResponse& pResponse) const;
56
57 void sendWorkflowAlreadyActive(const QSharedPointer<HttpRequest>& pRequest) const;
58 void handleShowUiRequest(const QString& pUiModule, const QSharedPointer<HttpRequest>& pRequest) override;
59 void handleWorkflowRequest(const QSharedPointer<HttpRequest>& pRequest) override;
60
61 private Q_SLOTS:
62 void doShutdown() override;
63 void onWorkflowStarted(const QSharedPointer<WorkflowRequest>& pRequest) override;
64 void onWorkflowFinished(const QSharedPointer<WorkflowRequest>& pRequest) override;
65 void onWorkflowUnhandled(const QSharedPointer<WorkflowRequest>& pRequest) override;
66 void onNewRequest(const QSharedPointer<HttpRequest>& pRequest);
67
68 public:
70 ~UIPlugInWebService() override = default;
71};
72
73} // namespace governikus
Definition ECardApiResult.h:31
Definition GlobalStatus.h:22
Definition HttpResponse.h:19
This an API through a local web service as specified by TR-03124-1.
Definition UIPlugInWebService.h:30
UIPlugInWebService()
Definition UIPlugInWebService.cpp:29
friend class ::test_UIPlugInWebServiceBrowserHandler
Definition UIPlugInWebService.h:35
~UIPlugInWebService() override=default
friend class ::test_UIPlugInWebService
Definition UIPlugInWebService.h:34
http_status
Definition http_parser.h:155
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:16
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:114