We want to move away from glib eventually. Until then, we use a simple
wrapper around the hash-table functions so we need to change a single
place only.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
When deleting a hook we should not search for the callback only. Otherwise
we might remove the wrong callback. Therefore, we now search for callback
and data argument. If multiple callbacks are registered with the same data
and cb, then we don't care which one is removed as this wouldn't make any
difference. They behave the same way, anyway.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
The hook structure can be used to provide a central hook where other
subsystems can register callbacks.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>