asalkeld/libqb — Issue #21: Add qb_map_notify_del_by_userdata() or simerlar
Author: asalkeld
Created: 2011-11-24 20:56:21+00:00
State: open
Labels: RFE

From source code it looks like there is no way to delete a
concrete tracker, if there are more than one with same
function + prefix/key_name + events.

So let me give you example:

libqb_events = QB_MAP_NOTIFY_INSERTED;

qb_map_notify_add(icmap_map, key_name, fn, libqb_events, 1);
qb_map_notify_add(icmap_map, key_name, fn, libqb_events, 2);
qb_map_notify_add(icmap_map, key_name, fn, libqb_events, 3);

Now let's say, I want to remove notifier with user_data 2, it's not
possible, because trie_notify_del will delete first/last (depending on
QB_MAP_NOTIFY_RECURSIVE).

Do you think it's possible to implement functionality, which will return
id/pointer (just something) which can be used for deleting of concrete
event trigger? (I can also imagine to use user_data as this id).