Hi
One the the next items on the TODO list
(
http://libqb.org/wiki/index.php/Todo_List)
is to review the current API. The point of this
is to avoid problems in the future once the library
is deployed. If anyone is willing to help I would
appreciate it, the more eyes the better!
My self-review is below:
-Angus
General
-------
- all "objects" must be reference counted (and with common names like
ABC_ref() ABC_unref() )
ipcs
----
- It has the only use of hdb and it's probably the one that needs this the least.
Change to a pointer and add a reference count API.
- Better naming of connection functions, maybe "qb_ipcs_conn_xyz()"
- Deal better with qb_ipcs_context_[gs]et() alloc/free and refcounting - it's a mess!
At the moment the object is allocated outside of ipcs but freed inside - yuk
One solution is to add another callback disconnected() and use this as the current
destroyed_connection() has been used, then the destroyed changes meaning to
"the connection object is now been free'ed", and the user can free the
context memory.
- Support message queues?
What message queues to support if any?
loop_timer
----------
We now have much more accurate timers with timerfd_create() and it
would make sense to uiltize them better.
- Change the API to have a better resolution (milli -> micro or nano seconds)
- It would be more efficient to have repeating timers to prevent
close() + timerfd_create() + epoll_ctl()
But this would also mean we would hen need reset()/stop()/start()
Anyone have any ideas about good API for timers?
- We should also support absolute timers.