Opened on 09/02/2014 at 05:05:35 AM
Closed on 09/23/2014 at 08:06:39 AM
Last modified on 10/13/2014 at 11:07:34 AM
#1296 closed change (fixed)
Add setters for the updateAvailable event
Reported by: | fhd | Assignee: | fhd |
---|---|---|---|
Priority: | P2 | Milestone: | |
Module: | Libadblockplus | Keywords: | |
Cc: | trev | Blocked By: | |
Blocking: | #98 | Platform: | Unknown |
Ready: | yes | Confidential: | no |
Tester: | Verified working: | no | |
Review URL(s): |
Description (last modified by fhd)
Background
FilterEngine currently throws two events that clients can react to: filterChange and updateAvailable.
While there's FilterEngine::SetFilterChangeCallback to register a callback for that event, handlers for updateAvailable need to be registered manually via JsEngine::SetEventCallback.
The main problem with this is that users of Libadblockplus won't be aware that they can handle updateAvailable events, and at least the latter is something our own clients should use.
What to change
Add methods for adding and removing callbacks for the updateAvailable event to FilterEngine.
Attachments (0)
Change History (10)
comment:1 Changed on 09/02/2014 at 05:05:46 AM by fhd
- Ready set
comment:2 Changed on 09/02/2014 at 01:09:20 PM by trev
comment:3 Changed on 09/02/2014 at 01:10:57 PM by trev
- Cc trev added
comment:4 Changed on 09/02/2014 at 01:25:59 PM by fhd
- Description modified (diff)
- Summary changed from Add setters for the init and updateAvailable events to Add setters for the updateAvailable event
Yeah sure, I was sure I had changed this here...
comment:5 Changed on 09/03/2014 at 01:00:47 PM by fhd
- Priority changed from P4 to P2
comment:6 Changed on 09/03/2014 at 01:01:22 PM by fhd
- Blocking 98 added
comment:7 Changed on 09/18/2014 at 03:03:06 PM by fhd
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:8 Changed on 09/22/2014 at 01:50:33 PM by fhd
Pushed this since I accidentally pushed https://hg.adblockplus.org/libadblockplus-binaries/rev/6f79af14ad4e (subrepo change), and didn't want an inconsistent state.
comment:9 Changed on 09/23/2014 at 08:06:39 AM by fhd
- Resolution set to fixed
- Status changed from reviewing to closed
comment:10 Changed on 10/13/2014 at 11:07:34 AM by trev
- Owner set to fhd
You don't need to register a callback for the init event - this event is an implementation detail of the FilterEngine, indeed the constructor will block until that event is fired.
Arguably, creating a more explicit way to set updateAvailable callback is an option.