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

Feature request. Custom callback methods #33

Closed
gerchicov-bp opened this issue Mar 21, 2016 · 8 comments
Closed

Feature request. Custom callback methods #33

gerchicov-bp opened this issue Mar 21, 2016 · 8 comments

Comments

@gerchicov-bp
Copy link

int CALLBACK CallbackProc(UINT msg, long UserData, long P1, long P2)
int CALLBACK BufferedReadCallbackProc(UINT msg, long UserData, long P1, long P2)
These functions can be accessed from the code inside URKArchive.mm.
What about to add a public way to access them? For example I want to customize UCM_CHANGEVOLUME event

@abbeycode
Copy link
Owner

In order to help design the API for this request, can you please provide some example use cases for this feature?

@gerchicov-bp
Copy link
Author

https://github.com/fishman/rar_expander/blob/master/RarExpander.mm
It handles UCM_CHANGEVOLUME. I can't find an info what does this code do but my project uses this event too. But anyways I could copy it "as is" because UnrarKit doesn't handle this event at all

@abbeycode
Copy link
Owner

Thanks, that link's helpful, but I'd still like to know how you plan to use the feature. Why is that event useful to you?

@gerchicov-bp
Copy link
Author

Sorry but I can't post my code. The only thing I can say is it handles something like error and in some cases returns -1 (failure) but the default implementation (including UnrarKit) always returns 0 even doesn't allow to handle this event without editing of the library's sources

@abbeycode
Copy link
Owner

I'm not asking you to post code, I only mean why do you need this feature? Why is the UCM_CHANGEVOLUME event important to you? I'm looking for an explanation, not code.

As an example, for your other feature request, the answer could be "Because I'd like to show users of my app how much space a file will take up, so they can decide whether or not to extract it". I didn't ask for a use case for that feature, because I could picture use cases on my own. I don't currently see what you would use that callback for, so I'm asking you to help me understand.

@abbeycode
Copy link
Owner

@gerchicov-bp I've addressed your other feature request. If you're able to help me understand this request better, I can include this along with it on the next release.

@gerchicov-bp
Copy link
Author

anyways I've already created a block which is called inside this static callback method but this block is defined as public and I can always override/redefine it.

@abbeycode
Copy link
Owner

Ok, feel free to submit a pull request to share back your contribution. I'm going to close this now - let me know if there's anything else I can do to help.

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

No branches or pull requests

2 participants