Vanilla.PDF  1.4.1
Cross-platform toolkit for creating and modifying PDF documents
c_file.h
Go to the documentation of this file.
1 #ifndef _C_FILE_H
2 #define _C_FILE_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 
48  VANILLAPDF_API error_type CALLING_CONVENTION File_Open(string_type filename, FileHandle** result);
49 
53  VANILLAPDF_API error_type CALLING_CONVENTION File_OpenStream(InputOutputStreamHandle* input_stream, string_type name, FileHandle** result);
54 
60  VANILLAPDF_API error_type CALLING_CONVENTION File_Create(string_type filename, FileHandle** result);
61 
65  VANILLAPDF_API error_type CALLING_CONVENTION File_CreateStream(InputOutputStreamHandle* input_stream, string_type name, FileHandle** result);
66 
72  VANILLAPDF_API error_type CALLING_CONVENTION File_Initialize(FileHandle* handle);
73 
79  VANILLAPDF_API error_type CALLING_CONVENTION File_IsEncrypted(FileHandle* handle, boolean_type* result);
80 
84  VANILLAPDF_API error_type CALLING_CONVENTION File_SetEncryptionPassword(FileHandle* handle, string_type password);
85 
92  VANILLAPDF_API error_type CALLING_CONVENTION File_SetEncryptionKey(FileHandle* handle, EncryptionKeyHandle* key);
93 
97  VANILLAPDF_API error_type CALLING_CONVENTION File_XrefChain(FileHandle* handle, XrefChainHandle** result);
98 
102  VANILLAPDF_API error_type CALLING_CONVENTION File_GetIndirectObject(FileHandle* handle, biguint_type obj_number, ushort_type gen_number, ObjectHandle** result);
103 
107  VANILLAPDF_API error_type CALLING_CONVENTION File_ToUnknown(FileHandle* handle, IUnknownHandle** result);
108 
112  VANILLAPDF_API error_type CALLING_CONVENTION File_FromUnknown(IUnknownHandle* handle, FileHandle** result);
113 
118  VANILLAPDF_API error_type CALLING_CONVENTION File_Release(FileHandle* handle);
119 
122 #ifdef __cplusplus
123 };
124 #endif
125 
126 #endif /* _C_FILE_H */
error_type File_Create(string_type filename, FileHandle **result)
Creates a file for writing.
uint16_t ushort_type
16-bit unsigned integer
Definition: c_types.h:46
Input stream can read and interpret input from sequences of characters.
error_type File_IsEncrypted(FileHandle *handle, boolean_type *result)
Determine if file is encrypted.
error_type File_XrefChain(FileHandle *handle, XrefChainHandle **result)
Get chain of xref tables for iteration.
Represents collection of XrefHandle.
error_type File_SetEncryptionKey(FileHandle *handle, EncryptionKeyHandle *key)
Set files encryption key.
uint64_t biguint_type
64-bit unsigned integer type
Definition: c_types.h:77
error_type File_Open(string_type filename, FileHandle **result)
Opens a file for reading.
This file contains all type forward declarations returned by the library API.
const char * string_type
C-Style string.
Definition: c_types.h:82
Base class for syntactic tokens.
error_type File_FromUnknown(IUnknownHandle *handle, FileHandle **result)
Convert IUnknownHandle to FileHandle.
error_type File_CreateStream(InputOutputStreamHandle *input_stream, string_type name, FileHandle **result)
Uses arbitrary stream as a file.
uint32_t error_type
This is return value type of all API functions.
Definition: c_types.h:25
error_type File_GetIndirectObject(FileHandle *handle, biguint_type obj_number, ushort_type gen_number, ObjectHandle **result)
Find exact object within all xref tables.
This file contains macro declarations for importing and exporting symbols from library boundaries...
error_type File_ToUnknown(FileHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
Represents encryption key other than password.
This file contains types and constants used as parameters or return values.
Represents low-level file access handle.
Base class for reference counting.
error_type File_Initialize(FileHandle *handle)
Perform basic intialization.
error_type File_Release(FileHandle *handle)
Decrement the internal reference counter.
error_type File_SetEncryptionPassword(FileHandle *handle, string_type password)
Set encryption password.
int8_t boolean_type
Boolean type supported in C.
Definition: c_types.h:31
error_type File_OpenStream(InputOutputStreamHandle *input_stream, string_type name, FileHandle **result)
Opens an input stream for reading.