PoDoFo  1.0.0-dev
PdfEncryptSession.h
1 
7 #ifndef PDF_ENCRYPT_SESSION
8 #define PDF_ENCRYPT_SESSION
9 
10 #include "PdfEncrypt.h"
11 
12 namespace PoDoFo {
13 
17 class PODOFO_API PdfEncryptSession final
18 {
19  friend class PdfMemDocument;
20  PODOFO_PRIVATE_FRIEND(class PdfParser);
21  PODOFO_PRIVATE_FRIEND(class PdfImmediateWriter);
22 
23 private:
26  PdfEncryptSession(const PdfEncrypt& encrypt, const PdfEncryptContext& context);
27  PdfEncryptSession(const std::shared_ptr<PdfEncrypt>& encrypt);
28  PdfEncryptSession(const PdfEncryptSession&) = default;
29 
30 public:
31  PdfEncrypt& GetEncrypt() { return *m_Encrypt; }
32  PdfEncryptContext& GetContext() { return m_Context; }
33 
34 private:
35  PdfEncryptSession& operator=(const PdfEncryptSession&) = delete;
36 
37 private:
38  std::shared_ptr<PdfEncrypt> m_Encrypt;
39  PdfEncryptContext m_Context;
40 };
41 
42 }
43 
44 #endif // PDF_ENCRYPT_SESSION
A bundle of the encrypt object together a context.
Definition: PdfEncryptSession.h:18
A class that is used to encrypt a PDF file and set document permissions on the PDF file.
Definition: PdfEncrypt.h:122
PdfMemDocument is the core class for reading and manipulating PDF files and writing them back to disk...
Definition: PdfMemDocument.h:39
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition: basetypes.h:16