Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
breautek opened this issue Dec 25, 2023 · 0 comments

Comments

@breautek
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant