FreeRDP
stream.c File Reference
#include <winpr/assert.h>
#include <winpr/crt.h>
#include <winpr/stream.h>
#include "stream.h"
#include "../log.h"

Macros

#define STREAM_TAG   WINPR_TAG("wStream")
 
#define STREAM_ASSERT(cond)
 

Functions

BOOL Stream_EnsureCapacity (wStream *s, size_t size)
 
BOOL Stream_EnsureRemainingCapacity (wStream *s, size_t size)
 
wStream * Stream_New (BYTE *buffer, size_t size)
 
wStream * Stream_StaticConstInit (wStream *s, const BYTE *buffer, size_t size)
 
wStream * Stream_StaticInit (wStream *s, BYTE *buffer, size_t size)
 
void Stream_EnsureValidity (wStream *s)
 
void Stream_Free (wStream *s, BOOL bFreeBuffer)
 
BOOL Stream_SetLength (wStream *_s, size_t _l)
 
BOOL Stream_SetPosition (wStream *_s, size_t _p)
 
void Stream_SealLength (wStream *_s)
 
size_t Stream_GetRemainingCapacity (wStream *_s)
 
size_t Stream_GetRemainingLength (wStream *_s)
 
BOOL Stream_Write_UTF16_String (wStream *s, const WCHAR *src, size_t length)
 
BOOL Stream_Read_UTF16_String (wStream *s, WCHAR *dst, size_t length)
 

Macro Definition Documentation

◆ STREAM_ASSERT

#define STREAM_ASSERT (   cond)
Value:
do \
{ \
if (!(cond)) \
{ \
WLog_FATAL(STREAM_TAG, "%s [%s:%s:%" PRIuz "]", #cond, __FILE__, __FUNCTION__, \
__LINE__); \
winpr_log_backtrace(STREAM_TAG, WLOG_FATAL, 20); \
abort(); \
} \
} while (0)

◆ STREAM_TAG

#define STREAM_TAG   WINPR_TAG("wStream")

Function Documentation

◆ Stream_EnsureCapacity()

BOOL Stream_EnsureCapacity ( wStream *  s,
size_t  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Stream_EnsureRemainingCapacity()

BOOL Stream_EnsureRemainingCapacity ( wStream *  s,
size_t  size 
)
Here is the call graph for this function:

◆ Stream_EnsureValidity()

void Stream_EnsureValidity ( wStream *  s)
Here is the caller graph for this function:

◆ Stream_Free()

void Stream_Free ( wStream *  s,
BOOL  bFreeBuffer 
)
Here is the call graph for this function:

◆ Stream_GetRemainingCapacity()

size_t Stream_GetRemainingCapacity ( wStream *  _s)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Stream_GetRemainingLength()

size_t Stream_GetRemainingLength ( wStream *  _s)
Here is the call graph for this function:

◆ Stream_New()

wStream* Stream_New ( BYTE buffer,
size_t  size 
)

◆ Stream_Read_UTF16_String()

BOOL Stream_Read_UTF16_String ( wStream *  s,
WCHAR *  dst,
size_t  length 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Stream_SealLength()

void Stream_SealLength ( wStream *  _s)
Here is the call graph for this function:

◆ Stream_SetLength()

BOOL Stream_SetLength ( wStream *  _s,
size_t  _l 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Stream_SetPosition()

BOOL Stream_SetPosition ( wStream *  _s,
size_t  _p 
)
Here is the call graph for this function:

◆ Stream_StaticConstInit()

wStream* Stream_StaticConstInit ( wStream *  s,
const BYTE buffer,
size_t  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Stream_StaticInit()

wStream* Stream_StaticInit ( wStream *  s,
BYTE buffer,
size_t  size 
)
Here is the caller graph for this function:

◆ Stream_Write_UTF16_String()

BOOL Stream_Write_UTF16_String ( wStream *  s,
const WCHAR *  src,
size_t  length 
)
Here is the call graph for this function:
Here is the caller graph for this function:
STREAM_TAG
#define STREAM_TAG
Definition: stream.c:32
WLOG_FATAL
#define WLOG_FATAL
Definition: include/winpr/wlog.h:44