Skip to content

BTFusePlugin handler callbacks don't really allow for handler modularization #37

@breautek

Description

@breautek

The android counterpart uses an OOP approach where you have to instantiate an APIHandler which allows for generic access to the plugin, typed appropriately.

The iOS implementation is to accept a callback block, and thus have no way to pass through the plugin instance. Simple plugins relied on weak block references.

Obj-c doesn't really have a concept of generics so the android approach may not work well, often plugin API handlers needs to have knowledge of the concrete class to use plugin-specific APIs.

A possible approach is to continue to use the callback block approach, but don't actually abstract BTFusePluginAPIHandle implementation, rather abstract concrete implementations that accepts the plugin instance, and passes through the BTFusePluginAPIHandle parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions