All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SignatureHandler.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2020 by PDFTron Systems Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPSDFSignatureHandler
6 #define PDFTRON_H_CPPSDFSignatureHandler
7 
8 #include <vector>
9 #include <Common/BasicTypes.h>
10 #include <Common/UString.h>
11 #include <SDF/Obj.h>
12 #include <C/Common/TRN_Types.h>
13 #include <C/SDF/TRN_SignatureHandler.h>
14 
15 namespace pdftron {
16 namespace SDF {
17 
21 typedef size_t SignatureHandlerId;
22 
29 {
30 public:
36  virtual UString GetName() const;
37 
42  virtual void AppendData(const std::vector<pdftron::UInt8>& data);
43 
50  virtual bool Reset();
51 
57  virtual std::vector<pdftron::UInt8> CreateSignature();
58 
64  virtual SignatureHandler* Clone() const = 0;
65 
69  virtual ~SignatureHandler();
70 
71 #ifndef SWIGHIDDEN_SIG
72  static TRN_Exception TRN_SIGAPI TRN_SignatureHandlerGetNameImpl(TRN_UString* out_name, void* derived);
73  static TRN_Exception TRN_SIGAPI TRN_SignatureHandlerAppendDataImpl(const TRN_SignatureData in_data, void* derived);
74  static TRN_Exception TRN_SIGAPI TRN_SignatureHandlerResetImpl(TRN_Bool* out_result, void* derived);
75  static TRN_Exception TRN_SIGAPI TRN_SignatureHandlerCreateSignatureImpl(TRN_SignatureData* out_signature, void* derived);
76  //static TRN_Exception TRN_SIGAPI TRN_SignatureHandlerValidateSignatureImpl(TRN_Obj in_sig_dict, TRN_ValidateSignatureResult* out_result, void* derived);
77  static TRN_Exception TRN_SIGAPI TRN_SignatureHandlerDestroyImpl(void* derived);
78 
79  std::vector<pdftron::UInt8> m_signature_data;
80 #endif // SWIGHIDDEN_SIG
81 }; // class SignatureHandler
82 
83 }; // namespace SDF
84 }; // namespace pdftron
85 
86 #include <Impl/SignatureHandler.inl>
87 
88 #endif // PDFTRON_H_CPPSDFSignatureHandler
static TRN_Exception TRN_SIGAPI TRN_SignatureHandlerGetNameImpl(TRN_UString *out_name, void *derived)
virtual void AppendData(const std::vector< pdftron::UInt8 > &data)
size_t SignatureHandlerId
static TRN_Exception TRN_SIGAPI TRN_SignatureHandlerResetImpl(TRN_Bool *out_result, void *derived)
virtual SignatureHandler * Clone() const =0
static TRN_Exception TRN_SIGAPI TRN_SignatureHandlerAppendDataImpl(const TRN_SignatureData in_data, void *derived)
static TRN_Exception TRN_SIGAPI TRN_SignatureHandlerDestroyImpl(void *derived)
static TRN_Exception TRN_SIGAPI TRN_SignatureHandlerCreateSignatureImpl(TRN_SignatureData *out_signature, void *derived)
virtual std::vector< pdftron::UInt8 > CreateSignature()
std::vector< pdftron::UInt8 > m_signature_data
virtual UString GetName() const