Efl.Io.Queue (class)

Description

Generic In-memory queue of data to be used as I/O.

This class is to be used to receive temporary data using Efl.Io.Writer.write and hold it until someone calls Efl.Io.Reader.read to consume it.

A fixed sized queue can be implemented by setting Efl.Io.Queue.limit followed by Efl.Io.Queue.preallocate

Since 1.19

Inheritance

Efl.Object (class)

Full hierarchy

Members

can_read (get, set) protected set [Overridden from Efl.Io.Reader]

If true will notify Efl.Io.Reader.read can be called without blocking or failing.
Eina_Bool efl_io_reader_can_read_get(const Eo *obj);
void efl_io_reader_can_read_set(Eo *obj, Eina_Bool can_read);


can_write (get, set) protected set [Overridden from Efl.Io.Writer]

If true will notify Efl.Io.Writer.write can be called without blocking or failing.
Eina_Bool efl_io_writer_can_write_get(const Eo *obj);
void efl_io_writer_can_write_set(Eo *obj, Eina_Bool can_write);


clear

Clears the queue. Same as reading all data.
void efl_io_queue_clear(Eo *obj);


close [Overridden from Efl.Io.Closer]

Closes the Input/Output object.
Eina_Error efl_io_closer_close(Eo *obj);


close_on_destructor (get, set) [Overridden from Efl.Io.Closer]

If true will automatically close() on object destructor.
Eina_Bool efl_io_closer_close_on_destructor_get(const Eo *obj);
void efl_io_closer_close_on_destructor_set(Eo *obj, Eina_Bool close_on_destructor);


close_on_exec (get, set) [Overridden from Efl.Io.Closer]

If true will automatically close resources on exec() calls.
Eina_Bool efl_io_closer_close_on_exec_get(const Eo *obj);
Eina_Bool efl_io_closer_close_on_exec_set(Eo *obj, Eina_Bool close_on_exec);


closed (get, set) [Overridden from Efl.Io.Closer]

If true will notify object was closed.
Eina_Bool efl_io_closer_closed_get(const Eo *obj);
Eina_Bool efl_io_closer_closed_set(Eo *obj, Eina_Bool is_closed);


destructor [Overridden from Efl.Object]

Call the object's destructor.
void efl_destructor(Eo *obj);


discard

Discard the given number of bytes.
void efl_io_queue_discard(Eo *obj, size_t amount);


eos (get, set) protected set [Overridden from Efl.Io.Reader]

If true will notify end of stream.
Eina_Bool efl_io_reader_eos_get(const Eo *obj);
void efl_io_reader_eos_set(Eo *obj, Eina_Bool is_eos);


eos_mark

Mark this end-of-stream.
void efl_io_queue_eos_mark(Eo *obj);


finalize [Overridden from Efl.Object]

Called at the end of efl_add. Should not be called, just overridden.
Efl_Object *efl_finalize(Eo *obj);


limit (get, set)

Limit how big the buffer can grow.
size_t efl_io_queue_limit_get(const Eo *obj);
void efl_io_queue_limit_set(Eo *obj, size_t size);


preallocate

Immediately pre-allocate a buffer of at least a given size.
void efl_io_queue_preallocate(Eo *obj, size_t size);


read [Overridden from Efl.Io.Reader]

Reads data into a pre-allocated buffer.
Eina_Error efl_io_reader_read(Eo *obj, Eina_Rw_Slice rw_slice);


slice (get)

Gain temporary access to queue's internal read memory.
Eina_Slice efl_io_queue_slice_get(const Eo *obj);


usage (get)

How many bytes are available for read
size_t efl_io_queue_usage_get(const Eo *obj);


write [Overridden from Efl.Io.Writer]

Writes data from a pre-populated buffer.
Eina_Error efl_io_writer_write(Eo *obj, Eina_Slice slice, Eina_Slice *remaining);


Inherited

Efl.Object
allow_parent_unref (get, set) Allow an object to be deleted by unref even if it has a parent.
children_iterator_new Get an iterator on all childrens
comment (get, set) A human readable comment for the object
composite_attach Make an object a composite object of another.
composite_detach Detach a composite object from another object.
composite_part_is Check if an object is part of a composite object.
constructor Call the object's constructor.
debug_name_override Build a read-only name for this object used for debugging.
del Unrefs the object and reparents it to NULL.
event_callback_forwarder_add Add an event callback forwarder for an event and an object.
event_callback_forwarder_del Remove an event callback forwarder for an event and an object.
event_callback_stop Stop the current callback call.
event_freeze Freeze events of object.
event_freeze_count (get) Return freeze events of object.
class event_global_freeze Freeze events of object.
class event_global_freeze_count (get) Return freeze events of object.
class event_global_thaw Thaw events of object.
event_thaw Thaw events of object.
finalized (get) True if the object is already finalized, otherwise false.
name (get, set) The name of the object.
name_find Find a child object with the given name and return it.
parent (get, set) The parent of an object.
provider_find Searches upwards in the object tree for a provider which knows the given class/interface.

Events

slice,changed

The read-slice returned by Efl.Io.Queue.slice may have changed.
EFL_IO_QUEUE_EVENT_SLICE_CHANGED(void)


Inherited

Efl.Io.Closer
closed Notifies closed, when property is marked as true
Efl.Io.Reader
can_read,changed Notifies can_read property changed.
eos Notifies end of stream, when property is marked as true.
Efl.Io.Writer
can_write,changed Notifies can_write property changed.
Efl.Object
callback,add A callback was added.
callback,del A callback was deleted.
del Object is being deleted.
destruct Object has been fully destroyed. It can not be used beyond this point. This event should only serve to clean up any dangling pointer.