Foxit PDF SDK
fs_pdfassociatefiles.h
Go to the documentation of this file.
1 
15 #ifndef FS_PDFASSOCIATE_H_
16 #define FS_PDFASSOCIATE_H_
17 
18 #include "common/fs_common.h"
19 #include "pdf/annots/fs_annot.h"
20 
26 namespace foxit {
27 namespace pdf {
28 namespace graphics {
29 class ImageObject;
30 class FormXObject;
31 class GraphicsObject;
32 } // namespace graphics
33 
34 namespace objects {
35 class PDFObject;
36 } // namespace objects
37 class PDFPage;
38 class FileSpec;
39 
53 class AssociatedFiles FS_FINAL : public Base {
54  public:
60  typedef enum _Relationship {
99  } Relationship;
100 
101 
107  AssociatedFiles(const AssociatedFiles& other);
116 
124  bool operator == (const AssociatedFiles& other) const;
132  bool operator != (const AssociatedFiles& other) const;
133 
142  explicit AssociatedFiles(const PDFDoc& pdf_doc);
143 
146 
154  bool IsEmpty() const;
155 
166 
179 
191  FileSpec GetAssociatedFile(objects::PDFObject* pdf_object, int index);
192 
209 
221  void AssociateFile(objects::PDFObject* pdf_object, const FileSpec& file_spec);
222 
245  void AssociateFile(foxit::pdf::graphics::GraphicsObject* graphics_object, int mark_content_item_index,
246  foxit::pdf::objects::PDFObject* current_resource, const char* property_name, const foxit::pdf::FileSpec& file_spec);
247 
259  void AssociateFile(const foxit::pdf::PDFPage& page, const foxit::pdf::FileSpec& file_spec);
260 
273 
286  void AssociateFile(foxit::pdf::graphics::FormXObject* form_xobject, const foxit::pdf::FileSpec& file_spec);
287 
299  void AssociateFile(const foxit::pdf::annots::Annot& annot, const foxit::pdf::FileSpec& file_spec);
300 
312  void RemoveAssociatedFile(objects::PDFObject* pdf_object, int index);
313 
329  void RemoveAssociatedFile(foxit::pdf::graphics::GraphicsObject* graphics_object, int index);
330 
331  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
332  explicit AssociatedFiles(FS_HANDLE handle = NULL);
333 };
334 } // namespace pdf
335 } // namespace foxit
336 
337 #endif
338 
Definition: fs_pdfgraphicsobject.h:1411
The relationship is "Supplement" which means the file specification represents a supplemental represe...
Definition: fs_pdfassociatefiles.h:82
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
Definition: fs_filespec.h:38
Definition: fs_annot.h:754
void RemoveAssociatedFile(objects::PDFObject *pdf_object, int index)
Remove an associated file (represented by FileSpec) in a specified PDF dictionary object,...
Definition: fs_pdfassociatefiles.h:53
int GetAssociatedFilesCount(objects::PDFObject *pdf_object)
Get the count of associated files in a PDF dictionary object which represents the dictionary of an an...
Header file for common definitions and classes.
bool operator==(const AssociatedFiles &other) const
Equal operator.
Relationship
Enumeration for the relationship between PDF document and the associated file.
Definition: fs_pdfassociatefiles.h:60
Definition: fs_pdfobject.h:55
The relationship is "Data" which means the file specification represents information used to derive a...
Definition: fs_pdfassociatefiles.h:72
The relationship is "Encrypted payload" which means the file specification is an encrypted payload do...
Definition: fs_pdfassociatefiles.h:88
bool IsEmpty() const
Check whether current object is empty or not.
bool operator !=(const AssociatedFiles &other) const
Not equal operator.
AssociatedFiles & operator=(const AssociatedFiles &other)
Assign operator.
Definition: fs_pdfgraphicsobject.h:241
Foxit namespace.
Definition: fs_compare.h:27
The relationship is "Alternative" which means the file specification is an alternative representation...
Definition: fs_pdfassociatefiles.h:77
void AssociateFile(objects::PDFObject *pdf_object, const FileSpec &file_spec)
Associate a file (represented by FileSpec) with a PDF dictionary object which represents the dictiona...
Definition: fs_pdfgraphicsobject.h:1065
#define NULL
The null-pointer value.
Definition: fx_system.h:767
Definition: fs_pdfdoc.h:389
FileSpec GetAssociatedFile(objects::PDFObject *pdf_object, int index)
Get an associated file (represented by FileSpec) in a specified PDF dictionary object,...
Definition: fs_pdfpage.h:342
The relationship is "Schema" which means the file specification is a schema definition for the associ...
Definition: fs_pdfassociatefiles.h:98
The relationship is not known or cannot be described by other values.
Definition: fs_pdfassociatefiles.h:62
Header file for annotation related definitions and classes.
The relationship is "Form data" which means the file specification is the data associated with the "A...
Definition: fs_pdfassociatefiles.h:93
Definition: fs_basictypes.h:399
The relationship is "Source" which means the file specification is the original source material for t...
Definition: fs_pdfassociatefiles.h:67
AssociatedFiles(const AssociatedFiles &other)
Constructor, with another associated files object.