I'd say: Call the hook before the deletion with the full event list
(or event ids only, not sure *) and have them return true or false to
indicate whether the event should be deleted or the operation aborted.

This may serve to create an evil extension which won't let you delete
anything? Well, yes, but why the hell would you install that
extension? And if you do, it's your fault :P.

(* Full events may be needed by some extension, but require us to do a
query to fetch the event if there is at least on hook. To avoid that
we could just send the event ids, but then there may be two extensions
fetching the info by themselves so doing two queries. Not sure what is
worse. I think I tend to 'only IDs' to KISS).

-- 
delete_event_hook for extensions
https://bugs.launchpad.net/bugs/595919
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.

Status in Zeitgeist Framework: New

Bug description:
Right now zeitgeist extensions have no way of knowing when events are deleted. 
I propose adding a delete_event_hook() method on the Extension class that 
extensions can override. The delete_event_hook() method should take an event_id 
as its sole argument.

I need this functionality in the FTS extension.



_______________________________________________
Mailing list: https://launchpad.net/~zeitgeist
Post to     : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp

Reply via email to