Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#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):

http://codereview.adblockplus.org/4578638519336960/

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.

Change History (10)

comment:1 Changed 5 years ago by fhd

  • Ready set

comment:2 Changed 5 years ago by trev

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.

comment:3 Changed 5 years ago by trev

  • Cc trev added

comment:4 Changed 5 years ago 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 5 years ago by fhd

  • Priority changed from P4 to P2

comment:6 Changed 5 years ago by fhd

  • Blocking 98 added

comment:7 Changed 5 years ago by fhd

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:8 Changed 5 years ago 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 5 years ago by fhd

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:10 Changed 5 years ago by trev

  • Owner set to fhd
Note: See TracTickets for help on using tickets.