Tor.framework
Tor.framework copied to clipboard
TORController's observer events should be more concrete, and also renamed to handlers
TORController currently has -addObserverForStatusEvents:
, which passes a block with strings and dictionaries with unknown keys.
Type
, severity
, action
, can all be made into enums. I'm not sure what currently is in args
, but perhaps making that into an object too, that way it's clear what values are expected to be in it (optional).
Secondly, and feel free to correct me, they should probably be handlers, not observers, even though this is a pedantic thing. They return a bool indicating whether or not they are the designated handler (or are choosing to act as one) for the specified data.