Countly / Countly/countly-sdk-cpp
HTTPClient callback has no way of accessing non-global data
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 34
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
typically with callbacks a void* is passed when setting the callback, and then when something calls the callback, they will pass it that void*. this allows users to cast the void* in to whatever data they need within the callback.
without this, only static/global data is accessible from within the callback, which is quite limiting.
alternatively, something like std::function or a templated function could be used instead, to allow us to pass a lambda for the callback and capture state.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the HTTPClient callback registration and invocation paths in the C++ SDK; the issue does not name specific files or tests. Compare the requested void* context approach with the suggested std::function or templated callback, then define the supported callback behavior and add coverage before considering the work complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100