Vanilla.PDF  2.0.0
Cross-platform toolkit for creating and modifying PDF documents
c_input_output_stream.h
Go to the documentation of this file.
1#ifndef _C_INPUT_OUTPUT_STREAM_INTERFACE_H
2#define _C_INPUT_OUTPUT_STREAM_INTERFACE_H
3
7
8#ifdef __cplusplus
9extern "C"
10{
11#endif
12
35 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_CreateFromFile(string_type filename, InputOutputStreamHandle** result);
36
40 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_CreateFromMemory(InputOutputStreamHandle** result);
41
45 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_Read(InputOutputStreamHandle* handle, bigint_type length, char* result, bigint_type* read_length);
46
50 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_ReadBuffer(InputOutputStreamHandle* handle, bigint_type length, BufferHandle** result);
51
55 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_GetInputPosition(InputOutputStreamHandle* handle, offset_type* result);
56
60 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_SetInputPosition(InputOutputStreamHandle* handle, offset_type value);
61
65 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_GetOutputPosition(InputOutputStreamHandle* handle, offset_type* result);
66
70 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_SetOutputPosition(InputOutputStreamHandle* handle, offset_type value);
71
75 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_WriteString(InputOutputStreamHandle* handle, string_type data);
76
80 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_WriteBuffer(InputOutputStreamHandle* handle, BufferHandle* data);
81
85 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_Flush(InputOutputStreamHandle* handle);
86
90 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_ToInputStream(InputOutputStreamHandle* handle, InputStreamHandle** result);
91
95 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_FromInputStream(InputStreamHandle* handle, InputOutputStreamHandle** result);
96
100 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_ToOutputStream(InputOutputStreamHandle* handle, OutputStreamHandle** result);
101
106
110 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_ToUnknown(InputOutputStreamHandle* handle, IUnknownHandle** result);
111
115 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_FromUnknown(IUnknownHandle* handle, InputOutputStreamHandle** result);
116
121 VANILLAPDF_API error_type CALLING_CONVENTION InputOutputStream_Release(InputOutputStreamHandle* handle);
122
125#ifdef __cplusplus
126};
127#endif
128
129#endif /* _C_INPUT_OUTPUT_STREAM_INTERFACE_H */
This file contains macro declarations for importing and exporting symbols from library boundaries.
This file contains all type forward declarations returned by the library API.
This file contains types and constants used as parameters or return values.
Represents memory stored data.
Base class for reference counting.
Input stream can read and interpret input from sequences of characters.
error_type CALLING_CONVENTION InputOutputStream_WriteBuffer(InputOutputStreamHandle *handle, BufferHandle *data)
Appends buffer data to current output stream instance.
error_type CALLING_CONVENTION InputOutputStream_ReadBuffer(InputOutputStreamHandle *handle, bigint_type length, BufferHandle **result)
Reads data from input stream and stores them in the resulting buffer.
error_type CALLING_CONVENTION InputOutputStream_GetOutputPosition(InputOutputStreamHandle *handle, offset_type *result)
Gets current offset in the output stream.
error_type CALLING_CONVENTION InputOutputStream_CreateFromMemory(InputOutputStreamHandle **result)
Creates a memory buffer for data manipulation.
error_type CALLING_CONVENTION InputOutputStream_FromOutputStream(OutputStreamHandle *handle, InputOutputStreamHandle **result)
Convert InputStreamHandle to InputOutputStreamHandle.
error_type CALLING_CONVENTION InputOutputStream_Read(InputOutputStreamHandle *handle, bigint_type length, char *result, bigint_type *read_length)
Reads data from input stream and stores them in the resulting array.
error_type CALLING_CONVENTION InputOutputStream_Flush(InputOutputStreamHandle *handle)
Flushes all pending data from the stream to it's destination.
error_type CALLING_CONVENTION InputOutputStream_SetOutputPosition(InputOutputStreamHandle *handle, offset_type value)
Sets current offset in the output stream.
error_type CALLING_CONVENTION InputOutputStream_FromInputStream(InputStreamHandle *handle, InputOutputStreamHandle **result)
Convert InputStreamHandle to InputOutputStreamHandle.
error_type CALLING_CONVENTION InputOutputStream_CreateFromFile(string_type filename, InputOutputStreamHandle **result)
Opens an existing file at filename for read and write.
error_type CALLING_CONVENTION InputOutputStream_ToOutputStream(InputOutputStreamHandle *handle, OutputStreamHandle **result)
Reinterpret current object as OutputStreamHandle.
error_type CALLING_CONVENTION InputOutputStream_Release(InputOutputStreamHandle *handle)
Decrement the internal reference counter.
error_type CALLING_CONVENTION InputOutputStream_GetInputPosition(InputOutputStreamHandle *handle, offset_type *result)
Gets current offset in the input stream.
error_type CALLING_CONVENTION InputOutputStream_WriteString(InputOutputStreamHandle *handle, string_type data)
Appends null terminated string data to current output stream instance.
error_type CALLING_CONVENTION InputOutputStream_SetInputPosition(InputOutputStreamHandle *handle, offset_type value)
Sets current offset in the input stream.
error_type CALLING_CONVENTION InputOutputStream_ToInputStream(InputOutputStreamHandle *handle, InputStreamHandle **result)
Reinterpret current object as InputStreamHandle.
error_type CALLING_CONVENTION InputOutputStream_FromUnknown(IUnknownHandle *handle, InputOutputStreamHandle **result)
Convert IUnknownHandle to InputOutputStreamHandle.
error_type CALLING_CONVENTION InputOutputStream_ToUnknown(InputOutputStreamHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
Input stream can read and interpret input from sequences of characters.
Output stream can write sequences of characters and represent other kinds of data.
uint32_t error_type
This is return value type of all API functions.
Definition c_types.h:25
int64_t offset_type
Offset type compatible with standard IO.
Definition c_types.h:56
int64_t bigint_type
64-bit signed integer type
Definition c_types.h:72
const char * string_type
C-Style string.
Definition c_types.h:82