Skip to content

TORController's observer events should be more concrete, and also renamed to handlers #12

Open

Description

@mxms0

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions