Vanilla.PDF  2.0.0
Cross-platform toolkit for creating and modifying PDF documents
c_input_stream.h
Go to the documentation of this file.
1#ifndef _C_INPUT_STREAM_INTERFACE_H
2#define _C_INPUT_STREAM_INTERFACE_H
3
7
8#ifdef __cplusplus
9extern "C"
10{
11#endif
12
33 VANILLAPDF_API error_type CALLING_CONVENTION InputStream_CreateFromFile(string_type filename, InputStreamHandle** result);
34
40 VANILLAPDF_API error_type CALLING_CONVENTION InputStream_CreateFromBuffer(BufferHandle* data, InputStreamHandle** result);
41
46 VANILLAPDF_API error_type CALLING_CONVENTION InputStream_Read(InputStreamHandle* handle, bigint_type length, char* result, bigint_type* read_length);
47
51 VANILLAPDF_API error_type CALLING_CONVENTION InputStream_ReadBuffer(InputStreamHandle* handle, bigint_type length, BufferHandle** result);
52
57 VANILLAPDF_API error_type CALLING_CONVENTION InputStream_ToBuffer(InputStreamHandle* handle, BufferHandle** result);
58
62 VANILLAPDF_API error_type CALLING_CONVENTION InputStream_GetInputPosition(InputStreamHandle* handle, offset_type* result);
63
67 VANILLAPDF_API error_type CALLING_CONVENTION InputStream_SetInputPosition(InputStreamHandle* handle, offset_type value);
68
72 VANILLAPDF_API error_type CALLING_CONVENTION InputStream_ToUnknown(InputStreamHandle* handle, IUnknownHandle** result);
73
77 VANILLAPDF_API error_type CALLING_CONVENTION InputStream_FromUnknown(IUnknownHandle* handle, InputStreamHandle** result);
78
83 VANILLAPDF_API error_type CALLING_CONVENTION InputStream_Release(InputStreamHandle* handle);
84
87#ifdef __cplusplus
88};
89#endif
90
91#endif /* _C_INPUT_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 InputStream_ToUnknown(InputStreamHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
error_type CALLING_CONVENTION InputStream_GetInputPosition(InputStreamHandle *handle, offset_type *result)
Gets current offset in the input stream.
error_type CALLING_CONVENTION InputStream_CreateFromBuffer(BufferHandle *data, InputStreamHandle **result)
Reads all data from buffer and stores them for later use.
error_type CALLING_CONVENTION InputStream_ToBuffer(InputStreamHandle *handle, BufferHandle **result)
Reads all data from the input stream and returns them as a single large buffer.
error_type CALLING_CONVENTION InputStream_FromUnknown(IUnknownHandle *handle, InputStreamHandle **result)
Convert IUnknownHandle to InputStreamHandle.
error_type CALLING_CONVENTION InputStream_Read(InputStreamHandle *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 InputStream_Release(InputStreamHandle *handle)
Decrement the internal reference counter.
error_type CALLING_CONVENTION InputStream_SetInputPosition(InputStreamHandle *handle, offset_type value)
Sets current offset in the input stream.
error_type CALLING_CONVENTION InputStream_CreateFromFile(string_type filename, InputStreamHandle **result)
Opens an existing file at filename for read.
error_type CALLING_CONVENTION InputStream_ReadBuffer(InputStreamHandle *handle, bigint_type length, BufferHandle **result)
Reads data from input stream and stores them in the resulting buffer.
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