Microsoft Information Protection (MIP) SDK for C++: Reference 1.16
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
EditableStream Class Referenceabstract

#include <src/api/mip/editable_stream.h>

Inheritance diagram for EditableStream:
Collaboration diagram for EditableStream:

Public Member Functions

virtual bool CanRead () const =0
 A check if stream can be read from.
 
virtual bool CanWrite () const =0
 A check if stream can be written to.
 
virtual int64_t Delete (int64_t numBytes)=0
 Delete a number of bytes from the stream.
 
virtual bool Flush ()=0
 flush the stream.
 
virtual int64_t Insert (const uint8_t *buffer, int64_t bufferLength)=0
 Insert a buffer into the stream.
 
virtual int64_t Position ()=0
 Get the current position within the stream.
 
virtual int64_t Read (uint8_t *buffer, int64_t bufferLength)=0
 Read into a buffer from the stream.
 
virtual void Seek (int64_t position)=0
 Seek specific position within the stream.
 
virtual int64_t Size ()=0
 Get the size of the content within the stream.
 
virtual void Size (int64_t value)=0
 Set the stream size.
 
virtual int64_t Update (const uint8_t *buffer, int64_t bufferLength, int64_t replaceLength)=0
 Update a number of bytes in the stream from a buffer.
 
virtual int64_t Write (const uint8_t *buffer, int64_t bufferLength)=0
 Write into the stream from a buffer.
 

Detailed Description

Definition at line 41 of file editable_stream.h.

Member Function Documentation

◆ CanRead()

virtual bool Stream::CanRead ( ) const
pure virtualinherited

A check if stream can be read from.

Returns
true if readable else false.

◆ CanWrite()

virtual bool Stream::CanWrite ( ) const
pure virtualinherited

A check if stream can be written to.

Returns
true if writeable else false.

◆ Delete()

virtual int64_t EditableStream::Delete ( int64_t numBytes)
pure virtual

Delete a number of bytes from the stream.

Parameters
numBytesnumber of bytes to delete.
Returns
number of bytes deleted.
Note
This will not move the stream position.

◆ Flush()

virtual bool Stream::Flush ( )
pure virtualinherited

flush the stream.

Returns
true if successful else false.

◆ Insert()

virtual int64_t EditableStream::Insert ( const uint8_t * buffer,
int64_t bufferLength )
pure virtual

Insert a buffer into the stream.

Parameters
bufferpointer to a buffer
bufferLengthbuffer size.
Returns
number of bytes written.
Note
This will seek to the end of the inserted section.

◆ Position()

virtual int64_t Stream::Position ( )
pure virtualinherited

Get the current position within the stream.

Returns
position within the stream.

◆ Read()

virtual int64_t Stream::Read ( uint8_t * buffer,
int64_t bufferLength )
pure virtualinherited

Read into a buffer from the stream.

Parameters
bufferpointer to a buffer
bufferLengthbuffer size.
Returns
number of bytes read.

◆ Seek()

virtual void Stream::Seek ( int64_t position)
pure virtualinherited

Seek specific position within the stream.

Parameters
positionto seek into stream.

◆ Size() [1/2]

virtual int64_t Stream::Size ( )
pure virtualinherited

Get the size of the content within the stream.

Returns
the stream size.

◆ Size() [2/2]

virtual void Stream::Size ( int64_t value)
pure virtualinherited

Set the stream size.

Parameters
streamsize.

◆ Update()

virtual int64_t EditableStream::Update ( const uint8_t * buffer,
int64_t bufferLength,
int64_t replaceLength )
pure virtual

Update a number of bytes in the stream from a buffer.

Parameters
bufferpointer to a buffer
bufferLengthbuffer size.
replaceLengthnumber of bytes to replace.
Returns
number of bytes written.
Note
This will seek to the end of the updated section.

◆ Write()

virtual int64_t Stream::Write ( const uint8_t * buffer,
int64_t bufferLength )
pure virtualinherited

Write into the stream from a buffer.

Parameters
bufferpointer to a buffer
bufferLengthbuffer size.
Returns
number of bytes written.

The documentation for this class was generated from the following file: