AusweisApp2
PaosCreator.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 #include "paos/ResponseType.h"
10 
11 #include <QXmlStreamWriter>
12 
13 namespace governikus
14 {
15 
17 {
18  Q_DISABLE_COPY(PaosCreator)
19 
20  public:
21  enum class Namespace
22  {
24  };
25 
26  private:
27  static const QMap<Namespace, QString> mNamespacePrefix;
28  static const QMap<Namespace, QString> mNamespace;
29 
30  QByteArray mContent;
31  QString mRelatedMessageId;
32 
33  void createEnvelopeElement();
34  void createHeaderElement();
35 
36  protected:
37  QXmlStreamWriter mWriter;
38 
39  void writeTextElement(const QString& pQualifiedName, const QByteArray& pText);
40  virtual void createBodyElement() = 0;
41 
42  void createResultElement(const ResponseType& pResponse);
43 
44  PaosCreator();
45  virtual ~PaosCreator();
46 
47  public:
54  QByteArray marshall();
55 
56  void setRelatedMessageId(const QString& pId);
57  static QString getNamespace(Namespace pPrefix);
58  static QString getNamespacePrefix(Namespace pPrefix, const QString& pSuffix = QString());
59  static QString getNamespaceType(Namespace pPrefix, const QString& pType);
60 };
61 
62 } // namespace governikus
Definition: PaosCreator.h:17
void setRelatedMessageId(const QString &pId)
Definition: PaosCreator.cpp:97
QByteArray marshall()
Creates an XML structure of underlying information. Be aware that this method will create the structu...
Definition: PaosCreator.cpp:87
void createResultElement(const ResponseType &pResponse)
Definition: PaosCreator.cpp:177
virtual void createBodyElement()=0
static QString getNamespacePrefix(Namespace pPrefix, const QString &pSuffix=QString())
Definition: PaosCreator.cpp:64
QXmlStreamWriter mWriter
Definition: PaosCreator.h:37
void writeTextElement(const QString &pQualifiedName, const QByteArray &pText)
Definition: PaosCreator.cpp:145
static QString getNamespaceType(Namespace pPrefix, const QString &pType)
Definition: PaosCreator.cpp:56
Namespace
Definition: PaosCreator.h:22
static QString getNamespace(Namespace pPrefix)
Definition: PaosCreator.cpp:50
PaosCreator()
Definition: PaosCreator.cpp:38
Definition: ResponseType.h:20
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16