28 #ifndef INC_KERNEL_OC_STREAM_H_ 29 #define INC_KERNEL_OC_STREAM_H_ 32 #include <oc_errors.h> 34 #include <oc_stdlib.h> 41 #define _________________________________________TYPES_SECTION______________________________________________________________________________ 47 oC_Stream_Type_Input = (1<<0),
48 oC_Stream_Type_Output = (1<<1)
55 oC_Stream_Type_t Type;
61 #undef _________________________________________TYPES_SECTION______________________________________________________________________________ 69 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________ 73 extern oC_Stream_t oC_Stream_New (
Allocator_t Allocator , AllocationFlags_t Flags , oC_Stream_Type_t Type ,
const char * Name , oC_Driver_t Driver ,
const void * Config );
74 extern bool oC_Stream_Delete ( oC_Stream_t * Stream );
75 extern bool oC_Stream_IsCorrect ( oC_Stream_t Stream );
76 extern bool oC_Stream_IsType ( oC_Stream_t Stream , oC_Stream_Type_t Type );
77 extern oC_ErrorCode_t oC_Stream_Write ( oC_Stream_t Stream ,
const char * Buffer , uint32_t * Size , oC_IoFlags_t IoFlags );
78 extern oC_ErrorCode_t oC_Stream_Read ( oC_Stream_t Stream ,
char * outBuffer , uint32_t * Size , oC_IoFlags_t IoFlags );
79 extern oC_ErrorCode_t oC_Stream_ClearReadBuffer ( oC_Stream_t Stream );
80 extern const char * oC_Stream_GetName ( oC_Stream_t Stream );
81 extern oC_Driver_t oC_Stream_GetDriver ( oC_Stream_t Stream );
83 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________ identifier for allocations
The file with interface for driver creating.
static const oC_Allocator_t Allocator