Vanilla.PDF  1.4.1
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 
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 
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 */
error_type InputStream_ReadBuffer(InputStreamHandle *handle, bigint_type length, BufferHandle **result)
Reads data from input stream and stores them in the resulting buffer.
error_type InputStream_CreateFromFile(string_type filename, InputStreamHandle **result)
Opens an existing file at filename for read.
Input stream can read and interpret input from sequences of characters.
This file contains all type forward declarations returned by the library API.
const char * string_type
C-Style string.
Definition: c_types.h:82
error_type InputStream_ToUnknown(InputStreamHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
error_type InputStream_CreateFromBuffer(BufferHandle *data, InputStreamHandle **result)
Reads all data from buffer and stores them for later use.
error_type InputStream_ToBuffer(InputStreamHandle *handle, BufferHandle **result)
Reads all data from the input stream and returns them as a single large buffer.
int64_t bigint_type
64-bit signed integer type
Definition: c_types.h:72
uint32_t error_type
This is return value type of all API functions.
Definition: c_types.h:25
This file contains macro declarations for importing and exporting symbols from library boundaries...
error_type InputStream_SetInputPosition(InputStreamHandle *handle, offset_type value)
Sets current offset in the input stream.
error_type InputStream_Release(InputStreamHandle *handle)
Decrement the internal reference counter.
error_type InputStream_GetInputPosition(InputStreamHandle *handle, offset_type *result)
Gets current offset in the input stream.
This file contains types and constants used as parameters or return values.
int64_t offset_type
Offset type compatible with standard IO.
Definition: c_types.h:56
error_type InputStream_FromUnknown(IUnknownHandle *handle, InputStreamHandle **result)
Convert IUnknownHandle to InputStreamHandle.
Represents memory stored data.
Base class for reference counting.
error_type 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.