Vanilla.PDF  1.4.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 
91  typedef enum {
105 
111 
117 
123  } XrefEntryType;
124 
136  VANILLAPDF_API error_type CALLING_CONVENTION Xref_GetTrailerDictionary(XrefHandle* handle, DictionaryObjectHandle** result);
137 
141  VANILLAPDF_API error_type CALLING_CONVENTION Xref_GetLastXrefOffset(XrefHandle* handle, offset_type* result);
142 
146  VANILLAPDF_API error_type CALLING_CONVENTION Xref_GetIterator(XrefHandle* handle, XrefIteratorHandle** result);
147 
151  VANILLAPDF_API error_type CALLING_CONVENTION Xref_ToUnknown(XrefHandle* handle, IUnknownHandle** result);
152 
156  VANILLAPDF_API error_type CALLING_CONVENTION Xref_FromUnknown(IUnknownHandle* handle, XrefHandle** result);
157 
162  VANILLAPDF_API error_type CALLING_CONVENTION Xref_Release(XrefHandle* handle);
163 
174  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_GetValue(XrefIteratorHandle* handle, XrefEntryHandle** result);
175 
179  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_Next(XrefIteratorHandle* handle);
180 
184  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_IsValid(XrefIteratorHandle* handle, boolean_type* result);
185 
189  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_ToUnknown(XrefIteratorHandle* handle, IUnknownHandle** result);
190 
194  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_FromUnknown(IUnknownHandle* handle, XrefIteratorHandle** result);
195 
200  VANILLAPDF_API error_type CALLING_CONVENTION XrefIterator_Release(XrefIteratorHandle* handle);
201 
212  VANILLAPDF_API error_type CALLING_CONVENTION XrefChain_GetIterator(XrefChainHandle* handle, XrefChainIteratorHandle** result);
213 
217  VANILLAPDF_API error_type CALLING_CONVENTION XrefChain_ToUnknown(XrefChainHandle* handle, IUnknownHandle** result);
218 
222  VANILLAPDF_API error_type CALLING_CONVENTION XrefChain_FromUnknown(IUnknownHandle* handle, XrefChainHandle** result);
223 
228  VANILLAPDF_API error_type CALLING_CONVENTION XrefChain_Release(XrefChainHandle* handle);
229 
240  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_GetValue(XrefChainIteratorHandle* handle, XrefHandle** result);
241 
245  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_Next(XrefChainIteratorHandle* handle);
246 
250  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_IsValid(XrefChainIteratorHandle* handle, boolean_type* result);
251 
255  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_ToUnknown(XrefChainIteratorHandle* handle, IUnknownHandle** result);
256 
260  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_FromUnknown(IUnknownHandle* handle, XrefChainIteratorHandle** result);
261 
266  VANILLAPDF_API error_type CALLING_CONVENTION XrefChainIterator_Release(XrefChainIteratorHandle* handle);
267 
278  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_GetType(XrefEntryHandle* handle, XrefEntryType* result);
279 
283  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_GetObjectNumber(XrefEntryHandle* handle, biguint_type* result);
284 
288  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_GetGenerationNumber(XrefEntryHandle* handle, ushort_type* result);
289 
293  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_InUse(XrefEntryHandle* handle, boolean_type* result);
294 
298  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_ToUnknown(XrefEntryHandle* handle, IUnknownHandle** result);
299 
303  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_FromUnknown(IUnknownHandle* handle, XrefEntryHandle** result);
304 
309  VANILLAPDF_API error_type CALLING_CONVENTION XrefEntry_Release(XrefEntryHandle* handle);
310 
321  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_GetObjectNumber(XrefEntryHandle* handle, biguint_type* result);
322 
326  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_GetGenerationNumber(XrefEntryHandle* handle, ushort_type* result);
327 
331  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_InUse(XrefFreeEntryHandle* handle, boolean_type* result);
332 
336  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_GetNextFreeObjectNumber(XrefFreeEntryHandle* handle, biguint_type* result);
337 
341  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_ToEntry(XrefFreeEntryHandle* handle, XrefEntryHandle** result);
342 
346  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_FromEntry(XrefEntryHandle* handle, XrefFreeEntryHandle** result);
347 
351  VANILLAPDF_API error_type CALLING_CONVENTION XrefFreeEntry_Release(XrefFreeEntryHandle* handle);
352 
363  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_GetObjectNumber(XrefEntryHandle* handle, biguint_type* result);
364 
368  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_GetGenerationNumber(XrefEntryHandle* handle, ushort_type* result);
369 
373  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_GetOffset(XrefUsedEntryHandle* handle, offset_type* result);
374 
378  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_InUse(XrefUsedEntryHandle* handle, boolean_type* result);
379 
383  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_GetReference(XrefUsedEntryHandle* handle, ObjectHandle** result);
384 
388  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_ToEntry(XrefUsedEntryHandle* handle, XrefEntryHandle** result);
389 
393  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_FromEntry(XrefEntryHandle* handle, XrefUsedEntryHandle** result);
394 
398  VANILLAPDF_API error_type CALLING_CONVENTION XrefUsedEntry_Release(XrefUsedEntryHandle* handle);
399 
410  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_GetObjectNumber(XrefEntryHandle* handle, biguint_type* result);
411 
415  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_GetGenerationNumber(XrefEntryHandle* handle, ushort_type* result);
416 
420  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_InUse(XrefCompressedEntryHandle* handle, boolean_type* result);
421 
425  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_GetReference(XrefCompressedEntryHandle* handle, ObjectHandle** result);
426 
430  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_GetIndex(XrefCompressedEntryHandle* handle, size_type* result);
431 
436  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_GetObjectStreamNumber(XrefCompressedEntryHandle* handle, biguint_type* result);
437 
441  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_ToEntry(XrefCompressedEntryHandle* handle, XrefEntryHandle** result);
442 
446  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_FromEntry(XrefEntryHandle* handle, XrefCompressedEntryHandle** result);
447 
451  VANILLAPDF_API error_type CALLING_CONVENTION XrefCompressedEntry_Release(XrefCompressedEntryHandle* handle);
452 
455 #ifdef __cplusplus
456 };
457 #endif
458 
459 #endif /* _C_XREF_H */
Definition: c_xref.h:116
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
Represents pointer to cross-reference 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:110
error_type XrefChainIterator_FromUnknown(IUnknownHandle *handle, XrefChainIteratorHandle **result)
Convert IUnknownHandle to XrefChainIteratorHandle.
Represents collection of XrefHandle.
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:122
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...
Represents base entry type within XrefHandle.
Represents pointer to cross-reference entry 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.
Represents key-value map.
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. (The generation number of the ...
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.
Represents either cross-reference table or stream.
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 iterator.
XrefEntryType
Required for conversion to derived types.
Definition: c_xref.h:91
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:104
error_type XrefCompressedEntry_FromEntry(XrefEntryHandle *handle, XrefCompressedEntryHandle **result)
Convert XrefEntryHandle to XrefUsedEntryHandle.
error_type XrefIterator_IsValid(XrefIteratorHandle *handle, boolean_type *result)
Determine 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.