Vanilla.PDF  1.5.1
Cross-platform toolkit for creating and modifying PDF documents
c_xref.h
Go to the documentation of this file.
1 #ifndef _C_XREF_H
2 #define _C_XREF_H
3 
4 #include "vanillapdf/c_export.h"
5 #include "vanillapdf/c_handles.h"
6 #include "vanillapdf/c_values.h"
7 
8 #ifdef __cplusplus
9 extern "C"
10 {
11 #endif
12 
94  typedef enum {
108 
114 
120 
126  } XrefEntryType;
127 
139  VANILLAPDF_API error_type CALLING_CONVENTION Xref_GetTrailerDictionary(XrefHandle* handle, DictionaryObjectHandle** result);
140 
144  VANILLAPDF_API error_type CALLING_CONVENTION Xref_GetLastXrefOffset(XrefHandle* handle, offset_type* result);
145 
149  VANILLAPDF_API error_type CALLING_CONVENTION Xref_GetIterator(XrefHandle* handle, XrefIteratorHandle** result);
150 
154  VANILLAPDF_API error_type CALLING_CONVENTION Xref_ToUnknown(XrefHandle* handle, IUnknownHandle** result);
155 
159  VANILLAPDF_API error_type CALLING_CONVENTION Xref_FromUnknown(IUnknownHandle* handle, XrefHandle** result);
160 
165  VANILLAPDF_API error_type CALLING_CONVENTION Xref_Release(XrefHandle* handle);
166 
177  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_GetValue(XrefIteratorHandle* handle, XrefEntryHandle** result);
178 
182  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_Next(XrefIteratorHandle* handle);
183 
187  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_IsValid(XrefIteratorHandle* handle, boolean_type* result);
188 
192  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_ToUnknown(XrefIteratorHandle* handle, IUnknownHandle** result);
193 
197  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_FromUnknown(IUnknownHandle* handle, XrefIteratorHandle** result);
198 
203  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_Release(XrefIteratorHandle* handle);
204 
215  VANILLAPDF_API error_type CALLING_CONVENTION XrefChain_GetIterator(XrefChainHandle* handle, XrefChainIteratorHandle** result);
216 
220  VANILLAPDF_API error_type CALLING_CONVENTION XrefChain_ToUnknown(XrefChainHandle* handle, IUnknownHandle** result);
221 
225  VANILLAPDF_API error_type CALLING_CONVENTION XrefChain_FromUnknown(IUnknownHandle* handle, XrefChainHandle** result);
226 
231  VANILLAPDF_API error_type CALLING_CONVENTION XrefChain_Release(XrefChainHandle* handle);
232 
243  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_GetValue(XrefChainIteratorHandle* handle, XrefHandle** result);
244 
248  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_Next(XrefChainIteratorHandle* handle);
249 
253  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_IsValid(XrefChainIteratorHandle* handle, boolean_type* result);
254 
258  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_ToUnknown(XrefChainIteratorHandle* handle, IUnknownHandle** result);
259 
263  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_FromUnknown(IUnknownHandle* handle, XrefChainIteratorHandle** result);
264 
269  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_Release(XrefChainIteratorHandle* handle);
270 
281  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_GetType(XrefEntryHandle* handle, XrefEntryType* result);
282 
286  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_GetObjectNumber(XrefEntryHandle* handle, biguint_type* result);
287 
291  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_GetGenerationNumber(XrefEntryHandle* handle, ushort_type* result);
292 
296  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_InUse(XrefEntryHandle* handle, boolean_type* result);
297 
301  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_ToUnknown(XrefEntryHandle* handle, IUnknownHandle** result);
302 
306  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_FromUnknown(IUnknownHandle* handle, XrefEntryHandle** result);
307 
312  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_Release(XrefEntryHandle* handle);
313 
324  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_GetObjectNumber(XrefEntryHandle* handle, biguint_type* result);
325 
329  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_GetGenerationNumber(XrefEntryHandle* handle, ushort_type* result);
330 
334  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_InUse(XrefFreeEntryHandle* handle, boolean_type* result);
335 
339  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_GetNextFreeObjectNumber(XrefFreeEntryHandle* handle, biguint_type* result);
340 
344  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_ToEntry(XrefFreeEntryHandle* handle, XrefEntryHandle** result);
345 
349  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_FromEntry(XrefEntryHandle* handle, XrefFreeEntryHandle** result);
350 
354  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_Release(XrefFreeEntryHandle* handle);
355 
366  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_GetObjectNumber(XrefEntryHandle* handle, biguint_type* result);
367 
371  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_GetGenerationNumber(XrefEntryHandle* handle, ushort_type* result);
372 
376  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_GetOffset(XrefUsedEntryHandle* handle, offset_type* result);
377 
381  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_InUse(XrefUsedEntryHandle* handle, boolean_type* result);
382 
386  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_GetReference(XrefUsedEntryHandle* handle, ObjectHandle** result);
387 
391  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_ToEntry(XrefUsedEntryHandle* handle, XrefEntryHandle** result);
392 
396  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_FromEntry(XrefEntryHandle* handle, XrefUsedEntryHandle** result);
397 
401  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_Release(XrefUsedEntryHandle* handle);
402 
413  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_GetObjectNumber(XrefEntryHandle* handle, biguint_type* result);
414 
418  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_GetGenerationNumber(XrefEntryHandle* handle, ushort_type* result);
419 
423  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_InUse(XrefCompressedEntryHandle* handle, boolean_type* result);
424 
428  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_GetReference(XrefCompressedEntryHandle* handle, ObjectHandle** result);
429 
433  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_GetIndex(XrefCompressedEntryHandle* handle, size_type* result);
434 
440  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_GetObjectStreamNumber(XrefCompressedEntryHandle* handle, biguint_type* result);
441 
445  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_ToEntry(XrefCompressedEntryHandle* handle, XrefEntryHandle** result);
446 
450  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_FromEntry(XrefEntryHandle* handle, XrefCompressedEntryHandle** result);
451 
455  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_Release(XrefCompressedEntryHandle* handle);
456 
459 #ifdef __cplusplus
460 };
461 #endif
462 
463 #endif /* _C_XREF_H */
Definition: c_xref.h:119
error_type XrefUsedEntry_Release(XrefUsedEntryHandle *handle)
Decrement the internal reference counter.
error_type XrefFreeEntry_ToEntry(XrefFreeEntryHandle *handle, XrefEntryHandle **result)
Reinterpret current object as XrefEntryHandle.
error_type XrefIterator_Release(XrefIteratorHandle *handle)
Decrement the internal reference counter.
uint16_t ushort_type
16-bit unsigned integer
Definition: c_types.h:46
A pointer to XrefHandle within XrefChainHandle collection.
error_type Xref_ToUnknown(XrefHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
error_type XrefChainIterator_GetValue(XrefChainIteratorHandle *handle, XrefHandle **result)
Get cross-reference section from current iterator position.
error_type XrefCompressedEntry_GetGenerationNumber(XrefEntryHandle *handle, ushort_type *result)
Get entry generation number.
error_type XrefEntry_ToUnknown(XrefEntryHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
error_type XrefChainIterator_ToUnknown(XrefChainIteratorHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
error_type XrefChain_FromUnknown(IUnknownHandle *handle, XrefChainHandle **result)
Convert IUnknownHandle to XrefChainHandle.
Definition: c_xref.h:113
error_type XrefChainIterator_FromUnknown(IUnknownHandle *handle, XrefChainIteratorHandle **result)
Convert IUnknownHandle to XrefChainIteratorHandle.
An ordered collection of all XrefHandle within the PDF file.
error_type XrefChainIterator_IsValid(XrefChainIteratorHandle *handle, boolean_type *result)
Determine if the current iterator position is valid.
Represents used entry within cross-reference section.
error_type XrefUsedEntry_InUse(XrefUsedEntryHandle *handle, boolean_type *result)
Quick check, if the entry is used or compressed.
error_type XrefFreeEntry_GetObjectNumber(XrefEntryHandle *handle, biguint_type *result)
Get entry object number.
error_type XrefCompressedEntry_GetIndex(XrefCompressedEntryHandle *handle, size_type *result)
The index of this object within the object stream.
error_type XrefUsedEntry_GetReference(XrefUsedEntryHandle *handle, ObjectHandle **result)
Get reference to the object represented by this entry.
error_type XrefChainIterator_Release(XrefChainIteratorHandle *handle)
Decrement the internal reference counter.
error_type Xref_FromUnknown(IUnknownHandle *handle, XrefHandle **result)
Convert IUnknownHandle to XrefHandle.
error_type XrefUsedEntry_GetObjectNumber(XrefEntryHandle *handle, biguint_type *result)
Get entry object number.
uint64_t biguint_type
64-bit unsigned integer type
Definition: c_types.h:77
error_type XrefCompressedEntry_ToEntry(XrefCompressedEntryHandle *handle, XrefEntryHandle **result)
Reinterpret current object as XrefEntryHandle.
Definition: c_xref.h:125
This file contains all type forward declarations returned by the library API.
error_type XrefEntry_GetType(XrefEntryHandle *handle, XrefEntryType *result)
Get entry type.
Represents free entry within cross-reference section.
error_type XrefCompressedEntry_GetReference(XrefCompressedEntryHandle *handle, ObjectHandle **result)
Get reference to the object represented by this entry.
error_type XrefEntry_Release(XrefEntryHandle *handle)
Decrement the internal reference counter.
uint32_t size_type
Size type defined in standard library.
Definition: c_types.h:62
error_type Xref_GetLastXrefOffset(XrefHandle *handle, offset_type *result)
Get byte offset in the decoded stream from the beginning of the file to the beginning of the xref key...
error_type XrefFreeEntry_Release(XrefFreeEntryHandle *handle)
Decrement the internal reference counter.
error_type XrefIterator_GetValue(XrefIteratorHandle *handle, XrefEntryHandle **result)
Get cross-reference entry from current iterator position.
error_type XrefIterator_FromUnknown(IUnknownHandle *handle, XrefIteratorHandle **result)
Convert IUnknownHandle to XrefIteratorHandle.
error_type Xref_Release(XrefHandle *handle)
Decrement the internal reference counter.
error_type XrefUsedEntry_GetOffset(XrefUsedEntryHandle *handle, offset_type *result)
Number of bytes from the beginning of the file to the beginning of the referenced object...
Cross-reference entry represents item within XrefHandle.
A pointer to XrefEntryHandle within XrefHandle collection.
error_type Xref_GetIterator(XrefHandle *handle, XrefIteratorHandle **result)
Get cross-reference entry iterator.
error_type XrefEntry_InUse(XrefEntryHandle *handle, boolean_type *result)
Quick check, if the entry is used or compressed.
A dictionary object is an associative table containing pairs of objects.
error_type XrefIterator_ToUnknown(XrefIteratorHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
error_type XrefCompressedEntry_GetObjectStreamNumber(XrefCompressedEntryHandle *handle, biguint_type *result)
The object number of the object stream in which this object is stored.
Represents compressed entry within cross-reference section.
error_type XrefFreeEntry_GetNextFreeObjectNumber(XrefFreeEntryHandle *handle, biguint_type *result)
Object number of the next free object.
error_type XrefIterator_Next(XrefIteratorHandle *handle)
Advance iterator to the next position.
Base class for syntactic tokens.
error_type XrefCompressedEntry_InUse(XrefCompressedEntryHandle *handle, boolean_type *result)
Quick check, if the entry is used or compressed.
The cross-reference table contains information that permits random access to indirect objects within ...
error_type XrefChainIterator_Next(XrefChainIteratorHandle *handle)
Advance iterator to the next position.
error_type XrefEntry_GetObjectNumber(XrefEntryHandle *handle, biguint_type *result)
Get entry object number.
error_type XrefFreeEntry_GetGenerationNumber(XrefEntryHandle *handle, ushort_type *result)
Get entry generation number.
error_type Xref_GetTrailerDictionary(XrefHandle *handle, DictionaryObjectHandle **result)
Get cross-reference table meta-data dictionary.
uint32_t error_type
This is return value type of all API functions.
Definition: c_types.h:25
error_type XrefFreeEntry_InUse(XrefFreeEntryHandle *handle, boolean_type *result)
Quick check, if the entry is used or compressed.
error_type XrefCompressedEntry_GetObjectNumber(XrefEntryHandle *handle, biguint_type *result)
Get entry object number.
This file contains macro declarations for importing and exporting symbols from library boundaries...
error_type XrefEntry_FromUnknown(IUnknownHandle *handle, XrefEntryHandle **result)
Convert IUnknownHandle to XrefEntryHandle.
error_type XrefChain_GetIterator(XrefChainHandle *handle, XrefChainIteratorHandle **result)
Get cross-reference section iterator.
XrefEntryType
Required for conversion to derived types.
Definition: c_xref.h:94
error_type XrefChain_Release(XrefChainHandle *handle)
Decrement the internal reference counter.
error_type XrefCompressedEntry_Release(XrefCompressedEntryHandle *handle)
Decrement the internal reference counter.
error_type XrefEntry_GetGenerationNumber(XrefEntryHandle *handle, ushort_type *result)
Get entry generation number.
This file contains types and constants used as parameters or return values.
error_type XrefUsedEntry_GetGenerationNumber(XrefEntryHandle *handle, ushort_type *result)
Get entry generation number.
This type is not actually used.
Definition: c_xref.h:107
error_type XrefCompressedEntry_FromEntry(XrefEntryHandle *handle, XrefCompressedEntryHandle **result)
Convert XrefEntryHandle to XrefUsedEntryHandle.
error_type XrefIterator_IsValid(XrefIteratorHandle *handle, boolean_type *result)
Check if the current iterator position is valid.
int64_t offset_type
Offset type compatible with standard IO.
Definition: c_types.h:56
Base class for reference counting.
error_type XrefFreeEntry_FromEntry(XrefEntryHandle *handle, XrefFreeEntryHandle **result)
Convert XrefEntryHandle to XrefFreeEntryHandle.
error_type XrefUsedEntry_FromEntry(XrefEntryHandle *handle, XrefUsedEntryHandle **result)
Convert XrefEntryHandle to XrefUsedEntryHandle.
int8_t boolean_type
Boolean type supported in C.
Definition: c_types.h:31
error_type XrefUsedEntry_ToEntry(XrefUsedEntryHandle *handle, XrefEntryHandle **result)
Reinterpret current object as XrefEntryHandle.
error_type XrefChain_ToUnknown(XrefChainHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.