Microsoft Information Protection (MIP) SDK for C: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C
Loading...
Searching...
No Matches
stream_cc.h File Reference

Defines stream callback functions. More...

+ Include dependency graph for stream_cc.h:

Go to the source code of this file.

Typedefs

typedef mip_cc_handlemip_cc_stream
 

Functions

 MIP_CC_API (mip_cc_result) MIP_CC_CreateStream(const mip_cc_stream_read_callback_fn readCallback
 Creates a stream.
 
 MIP_CC_API (void) MIP_CC_ReleaseStream(mip_cc_stream stream)
 Release resources associated with a stream handle.
 
 MIP_CC_CALLBACK (mip_cc_stream_canread_callback_fn, bool, void *input)
 call back function definition for a check if stream can be read from.
 
 MIP_CC_CALLBACK (mip_cc_stream_canwrite_callback_fn, bool, void *input)
 call back function definition for a check if stream can be written to.
 
 MIP_CC_CALLBACK (mip_cc_stream_flush_callback_fn, bool, void *input)
 callback function definition for flushing the stream.
 
 MIP_CC_CALLBACK (mip_cc_stream_getsize_callback_fn, int64_t, void *input)
 call back function definition for getting the size of the content within the stream.
 
 MIP_CC_CALLBACK (mip_cc_stream_position_callback_fn, int64_t, void *input)
 call back function definition for getting the current position within the stream.
 
 MIP_CC_CALLBACK (mip_cc_stream_read_callback_fn, int64_t, void *input, uint8_t *buffer, int64_t bufferLength)
 Callback function definition for reading into a buffer from the stream.
 
 MIP_CC_CALLBACK (mip_cc_stream_seek_callback_fn, void, void *input, int64_t position)
 callback function definition for Seeking specific position within the stream.
 
 MIP_CC_CALLBACK (mip_cc_stream_setsize_callback_fn, void, void *input, int64_t value)
 call back function definition for setting the stream size.
 
 MIP_CC_CALLBACK (mip_cc_stream_write_callback_fn, int64_t, void *input, const uint8_t *buffer, int64_t bufferLength)
 Callback function definition for Writing into the stream from a buffer.
 

Variables

const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn canReadCallback
 
const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn canWriteCallback
 
const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn const mip_cc_stream_getsize_callback_fn const mip_cc_stream_setsize_callback_fn void mip_cc_stream mip_cc_errorerrorInfo
 
const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn flushCallback
 
const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn const mip_cc_stream_getsize_callback_fn getSizeCallback
 
const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn const mip_cc_stream_getsize_callback_fn const mip_cc_stream_setsize_callback_fn void * input
 
const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn positionCallback
 
const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn seekCallback
 
const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn const mip_cc_stream_getsize_callback_fn const mip_cc_stream_setsize_callback_fn setSizeCallback
 
const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn const mip_cc_stream_getsize_callback_fn const mip_cc_stream_setsize_callback_fn void mip_cc_streamstream
 
const mip_cc_stream_write_callback_fn writeCallback
 

Detailed Description

Defines stream callback functions.

Definition in file stream_cc.h.

Typedef Documentation

◆ mip_cc_stream

Definition at line 142 of file stream_cc.h.

Function Documentation

◆ MIP_CC_API() [1/2]

MIP_CC_API ( mip_cc_result ) const

Creates a stream.

Parameters
readCallbackFunction pointer for reading into a buffer from the stream
writeCallbackFunction pointer for writeing into the stream from a buffer
flushCallbackFunction pointer for writing a log statement
seekCallbackFunction pointer for seeking specific position within the stream
canReadCallbackFunction pointer for a check if stream can be read from
canWriteCallbackFunction pointer for a check if stream can be written to
positionCallbackFunction pointer for getting the current position within the stream
getSizeCallbackFunction pointer for getting the size of the content within the stream
setSizeCallbackFunction pointer for setting the stream size
inputUser defined input parameters
stream[Output] Handle to stream object
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure

◆ MIP_CC_API() [2/2]

MIP_CC_API ( void )

Release resources associated with a stream handle.

Parameters
streamstream to be released

◆ MIP_CC_CALLBACK() [1/9]

MIP_CC_CALLBACK ( mip_cc_stream_canread_callback_fn ,
bool ,
void * input )

call back function definition for a check if stream can be read from.

Parameters
inputuser defined input parameters
Returns
true if readable else false.

◆ MIP_CC_CALLBACK() [2/9]

MIP_CC_CALLBACK ( mip_cc_stream_canwrite_callback_fn ,
bool ,
void * input )

call back function definition for a check if stream can be written to.

Parameters
inputuser defined input parameters
Returns
true if writeable else false.

◆ MIP_CC_CALLBACK() [3/9]

MIP_CC_CALLBACK ( mip_cc_stream_flush_callback_fn ,
bool ,
void * input )

callback function definition for flushing the stream.

Parameters
inputuser defined input parameters
Returns
true if successful else false.

◆ MIP_CC_CALLBACK() [4/9]

MIP_CC_CALLBACK ( mip_cc_stream_getsize_callback_fn ,
int64_t ,
void * input )

call back function definition for getting the size of the content within the stream.

Parameters
inputuser defined input parameters
Returns
the stream size.

◆ MIP_CC_CALLBACK() [5/9]

MIP_CC_CALLBACK ( mip_cc_stream_position_callback_fn ,
int64_t ,
void * input )

call back function definition for getting the current position within the stream.

Parameters
inputuser defined input parameters
Returns
position within the stream.

◆ MIP_CC_CALLBACK() [6/9]

MIP_CC_CALLBACK ( mip_cc_stream_read_callback_fn ,
int64_t ,
void * input,
uint8_t * buffer,
int64_t bufferLength )

Callback function definition for reading into a buffer from the stream.

Parameters
inputuser defined input parameters
bufferpointer to a buffer
bufferLengthbuffer size.
Returns
number of bytes read.

◆ MIP_CC_CALLBACK() [7/9]

MIP_CC_CALLBACK ( mip_cc_stream_seek_callback_fn ,
void ,
void * input,
int64_t position )

callback function definition for Seeking specific position within the stream.

Parameters
inputuser defined input parameters
positionto seek into stream.

◆ MIP_CC_CALLBACK() [8/9]

MIP_CC_CALLBACK ( mip_cc_stream_setsize_callback_fn ,
void ,
void * input,
int64_t value )

call back function definition for setting the stream size.

Parameters
inputuser defined input parameters
streamsize.

◆ MIP_CC_CALLBACK() [9/9]

MIP_CC_CALLBACK ( mip_cc_stream_write_callback_fn ,
int64_t ,
void * input,
const uint8_t * buffer,
int64_t bufferLength )

Callback function definition for Writing into the stream from a buffer.

Parameters
inputuser defined input parameters
bufferpointer to a buffer
bufferLengthbuffer size.
Returns
number of bytes written.

Variable Documentation

◆ canReadCallback

const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn canReadCallback

Definition at line 167 of file stream_cc.h.

◆ canWriteCallback

const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn canWriteCallback

Definition at line 168 of file stream_cc.h.

◆ errorInfo

const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn const mip_cc_stream_getsize_callback_fn const mip_cc_stream_setsize_callback_fn void mip_cc_stream mip_cc_error* errorInfo

Definition at line 174 of file stream_cc.h.

◆ flushCallback

const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn flushCallback

Definition at line 165 of file stream_cc.h.

◆ getSizeCallback

const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn const mip_cc_stream_getsize_callback_fn getSizeCallback

Definition at line 170 of file stream_cc.h.

◆ input

const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn const mip_cc_stream_getsize_callback_fn const mip_cc_stream_setsize_callback_fn void* input

Definition at line 172 of file stream_cc.h.

◆ positionCallback

const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn positionCallback

Definition at line 169 of file stream_cc.h.

◆ seekCallback

const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn seekCallback

Definition at line 166 of file stream_cc.h.

◆ setSizeCallback

const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn const mip_cc_stream_getsize_callback_fn const mip_cc_stream_setsize_callback_fn setSizeCallback

Definition at line 171 of file stream_cc.h.

◆ stream

const mip_cc_stream_write_callback_fn const mip_cc_stream_flush_callback_fn const mip_cc_stream_seek_callback_fn const mip_cc_stream_canread_callback_fn const mip_cc_stream_canwrite_callback_fn const mip_cc_stream_position_callback_fn const mip_cc_stream_getsize_callback_fn const mip_cc_stream_setsize_callback_fn void mip_cc_stream* stream

Definition at line 173 of file stream_cc.h.

◆ writeCallback

const mip_cc_stream_write_callback_fn writeCallback

Definition at line 164 of file stream_cc.h.