AusweisApp2
MobileEIDTypeInfo.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 
10 #include "SecurityInfo.h"
11 
12 
13 namespace governikus
14 {
15 
28 {
29  ASN1_OBJECT* mProtocol;
30  ASN1_TYPE* mRequiredData;
31 };
32 DECLARE_ASN1_FUNCTIONS(mobileeidtypeinfo_st)
34 
35 
36 /*
37  * Wrapper for structure mobileeidtypeinfo_st.
38  */
40  : public SecurityInfo
41 {
42  friend class QSharedPointer<const MobileEIDTypeInfo>;
43 
44  private:
45  const QSharedPointer<const mobileeidtypeinfo_st> mDelegate;
46 
47  explicit MobileEIDTypeInfo(const QSharedPointer<const mobileeidtypeinfo_st>& pDelegate);
48  [[nodiscard]] ASN1_OBJECT* getProtocolObjectIdentifier() const override;
49  static bool acceptsProtocol(const ASN1_OBJECT* pObjectIdentifier);
50 
51  public:
52  static QSharedPointer<const MobileEIDTypeInfo> decode(const QByteArray& pBytes);
53  [[nodiscard]] QByteArray encode() const;
54 };
55 
56 
57 inline QDebug operator<<(QDebug pDbg, const QSharedPointer<const MobileEIDTypeInfo>& pMobileEIDTypeInfo)
58 {
59  QDebugStateSaver saver(pDbg);
60  pDbg.nospace().noquote() << pMobileEIDTypeInfo->getOid();
61  return pDbg;
62 }
63 
64 
65 } // namespace governikus
#define DECLARE_ASN1_OBJECT(name)
Definition: ASN1TemplateUtil.h:176
Definition: MobileEIDTypeInfo.h:41
Definition: SecurityInfo.h:48
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16
QByteArray encode() const
QDebug operator<<(QDebug pDbg, const CommandApdu &pCommandApdu)
Definition: CommandApdu.h:94
Definition: MobileEIDTypeInfo.h:28
ASN1_TYPE * mRequiredData
Definition: MobileEIDTypeInfo.h:30
ASN1_OBJECT * mProtocol
Definition: MobileEIDTypeInfo.h:29