enesim  0.0.23.1
Drawinglibrary
Modules | Typedefs | Functions
Stream

Stream sources. More...

Modules

 File
 

File based stream inherits from \1.


 Buffer
 

Buffer based stream inherits from \1.


 Base64
 

Base64 stream.


Typedefs

typedef struct _Enesim_Stream Enesim_Stream

Functions

EAPI Enesim_Streamenesim_stream_ref (Enesim_Stream *thiz)
 Increase the reference counter of a stream.
EAPI void enesim_stream_unref (Enesim_Stream *thiz)
 Decrease the reference counter of a stream.
EAPI ssize_t enesim_stream_read (Enesim_Stream *thiz, void *buffer, size_t len)
 Reads from a stream.
EAPI ssize_t enesim_stream_write (Enesim_Stream *thiz, void *buffer, size_t len)
 Writes from a stream.
EAPI size_t enesim_stream_length (Enesim_Stream *thiz)
 Gets the length of a stream.
EAPI void * enesim_stream_mmap (Enesim_Stream *thiz, size_t *size)
 Map the stream in memory.
EAPI void enesim_stream_munmap (Enesim_Stream *thiz, void *ptr)
 Unmaps the memory of a stream.
EAPI void enesim_stream_reset (Enesim_Stream *thiz)
 Reset the stream reading/writing position.
EAPI const char * enesim_stream_uri_get (Enesim_Stream *thiz)
 Get the URI of a stream.
EAPI Eina_Bool enesim_stream_type_get (Enesim_Stream *thiz, const char **lib, const char **name)
 Get the type of a stream .

Detailed Description

Stream sources.


Typedef Documentation

typedef struct _Enesim_Stream Enesim_Stream

Stream handle


Function Documentation

Increase the reference counter of a stream.

Parameters:
[in]thizThe stream
Returns:
The input parameter thiz for programming convenience
EAPI void enesim_stream_unref ( Enesim_Stream thiz)

Decrease the reference counter of a stream.

Parameters:
[in]thizThe stream
EAPI ssize_t enesim_stream_read ( Enesim_Stream thiz,
void *  buffer,
size_t  len 
)

Reads from a stream.

Parameters:
[in]thizThe stream to read from
[in]bufferWhere to read the data into
[in]lenHow many bytes to read
Returns:
The number of bytes read
EAPI ssize_t enesim_stream_write ( Enesim_Stream thiz,
void *  buffer,
size_t  len 
)

Writes from a stream.

Parameters:
[in]thizThe stream to write to
[in]bufferThe data to write
[in]lenHow many bytes to write
Returns:
The number of bytes written
EAPI size_t enesim_stream_length ( Enesim_Stream thiz)

Gets the length of a stream.

Parameters:
[in]thizThe stream to get the length from
Returns:
The length of the stream
EAPI void* enesim_stream_mmap ( Enesim_Stream thiz,
size_t *  size 
)

Map the stream in memory.

Parameters:
[in]thizThe stream to map
[out]sizeThe size of the mapped buffer
Returns:
The memory mapped pointer
EAPI void enesim_stream_munmap ( Enesim_Stream thiz,
void *  ptr 
)

Unmaps the memory of a stream.

Parameters:
[in]thizThe stream to unmap
[in]ptrThe mapped memory
EAPI void enesim_stream_reset ( Enesim_Stream thiz)

Reset the stream reading/writing position.

Parameters:
[in]thizThe stream to reset

On every enesim_stream_read or enesim_stream_write the internal position of the stream is advanced, this function resets the position of the stream

EAPI const char* enesim_stream_uri_get ( Enesim_Stream thiz)

Get the URI of a stream.

Parameters:
[in]thizThe stream to get the URI from
Returns:
The URI of a stream [Transfer none]

Every stream has an URI associated that identifies the origin of stream data. This function gets such URI

EAPI Eina_Bool enesim_stream_type_get ( Enesim_Stream thiz,
const char **  lib,
const char **  name 
)

Get the type of a stream .

Parameters:
[in]thizThe stream to get the type from
[out]libThe ender library associated with this stream
[out]nameThe ender item name of the renderer

This function is needed for ender in order to downcast a stream

 All Data Structures Variables