AusweisApp2
UrlUtil.h
gehe zur Dokumentation dieser Datei
1 
6 #pragma once
7 
8 #include "ECardApiResult.h"
9 
10 #include <QSslCertificate>
11 #include <QString>
12 #include <QUrl>
13 
14 namespace governikus
15 {
16 
22 class UrlUtil
23 {
24  UrlUtil() = delete;
25  ~UrlUtil() = delete;
26 
27  static inline QString removePrefix(QString pStr);
28  static inline QString getSuffix(ECardApiResult::Minor pMinor);
29 
30  public:
34  static QUrl getUrlOrigin(const QUrl& pUrl);
35 
39  static bool isMatchingSameOriginPolicy(const QUrl& pUrl1, const QUrl& pUrl2);
40 
44  static QUrl addMajorMinor(const QUrl& pUrl, const GlobalStatus& pStatus);
45 
46 };
47 
48 } // namespace governikus
governikus::ECardApiResult::Minor::SAL_Cancellation_by_User
@ SAL_Cancellation_by_User
governikus::ECardApiResult::Minor
Minor
Definition: ECardApiResult.h:44
governikus::GlobalStatus::Code::Paos_Error_AL_Communication_Error
@ Paos_Error_AL_Communication_Error
governikus::ECardApiResult::Major::Error
@ Error
governikus::UrlUtil::addMajorMinor
static QUrl addMajorMinor(const QUrl &pUrl, const GlobalStatus &pStatus)
Append result to URL.
Definition: UrlUtil.cpp:64
governikus::ECardApiResult::Major
Major
Definition: ECardApiResult.h:36
governikus::GlobalStatus::Code::Paos_Error_SAL_Cancellation_by_User
@ Paos_Error_SAL_Cancellation_by_User
governikus::GlobalStatus::isOriginServer
bool isOriginServer() const
Definition: GlobalStatus.cpp:415
governikus::ECardApiResult::Minor::AL_Communication_Error
@ AL_Communication_Error
governikus::GlobalStatus::Code::Paos_Error_DP_Trusted_Channel_Establishment_Failed
@ Paos_Error_DP_Trusted_Channel_Establishment_Failed
governikus::GlobalStatus::isError
bool isError() const
Definition: GlobalStatus.cpp:427
governikus::ECardApiResult::getMajorString
QString getMajorString() const
Definition: ECardApiResult.cpp:544
governikus::ECardApiResult::Minor::DP_Trusted_Channel_Establishment_Failed
@ DP_Trusted_Channel_Establishment_Failed
governikus::UrlUtil::getUrlOrigin
static QUrl getUrlOrigin(const QUrl &pUrl)
Determines the URL origin, i.e.
Definition: UrlUtil.cpp:19
governikus
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15
governikus::ECardApiResult::getMinorString
QString getMinorString() const
Definition: ECardApiResult.cpp:550
governikus::GlobalStatus
Definition: GlobalStatus.h:20
governikus::GlobalStatus::getStatusCode
Code getStatusCode() const
Definition: GlobalStatus.cpp:84
ECardApiResult.h
governikus::UrlUtil::isMatchingSameOriginPolicy
static bool isMatchingSameOriginPolicy(const QUrl &pUrl1, const QUrl &pUrl2)
Checks whether the same origin policy is satisfied for the two specified URL.
Definition: UrlUtil.cpp:42
governikus::ECardApiResult::Major::Ok
@ Ok
UrlUtil.h
governikus::UrlUtil
Utility class for checking various constraints on URLs.
Definition: UrlUtil.h:23