AusweisApp
Lade ...
Suche ...
Keine Treffer
UrlUtil.h
gehe zur Dokumentation dieser Datei
1
5#pragma once
6
7#include "EnumHelper.h"
8
9#include <QString>
10#include <QUrl>
11#include <QUrlQuery>
12
13
14namespace governikus
15{
16
18 UNKNOWN,
19 SHOWUI,
20 STATUS,
22 )
23
24
25
28class UrlUtil
29{
30 private:
31 UrlUtil() = delete;
32 ~UrlUtil() = delete;
33
34 public:
38 static QUrl getUrlOrigin(const QUrl& pUrl);
39
43 static bool isMatchingSameOriginPolicy(const QUrl& pUrl1, const QUrl& pUrl2);
44
45 static void setHiddenSettings(const QUrlQuery& pUrl);
46 static QPair<UrlQueryRequest, QString> getRequest(const QUrlQuery& pUrl);
47
48 template<typename T>
49 static T prepareToEnum(const QString& pStr, T pDefault)
50 {
51 return Enum<T>::fromString(pStr.toUpper().replace(QLatin1Char('-'), QLatin1Char('_')), pDefault);
52 }
53
54
55};
56
57} // namespace governikus
#define defineEnumType(enumName,...)
Definition EnumHelper.h:85
static EnumTypeT fromString(const char *const pValue, EnumTypeT pDefault)
Definition EnumHelper.h:156
#define T(v)
Definition http_parser.cpp:237
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
UNKNOWN
Definition ResponseApdu.h:65
STATUS
Definition MsgTypes.h:26
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:114